This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ''' | |
| 将vcard文件转成先锋音讯录音盒的通讯录导入格式(csv,用gbk编码) | |
| csv文件行首是: | |
| 姓名,性别,组名,手机,Email,备注 | |
| ''' | |
| import csv | |
| import codecs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # .bashrc | |
| # Source global definitions | |
| if [ -f /etc/bashrc ]; then | |
| . /etc/bashrc | |
| fi | |
| # User specific environment | |
| if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]] | |
| then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Countdown timer in C | |
| **/ | |
| #include <stdio.h> | |
| #include <Windows.h> // Sleep, MessageBox | |
| void showhelp() { | |
| printf("countdown [[hours:]minutes:]seconds\n"); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ''' | |
| A simple countdown timer | |
| ''' | |
| import argparse | |
| import time # sleep | |
| import ctypes # MessageBeep, MessageBoxA | |
| def countdown(hms_string: str): | |
| hms = [ int(x) for x in hms_string.split(":") ] | |
| # print(hms) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # bash script to simulate a countdown timer | |
| # Inspired by https://superuser.com/questions/611538/is-there-a-way-to-display-a-countdown-or-stopwatch-timer-in-a-terminal | |
| function showhelp { | |
| echo "countdown [[hour:]min:]sec" | |
| } | |
| function beep { | |
| for j in 1 2 3; do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ' https://superuser.com/questions/198525/how-can-i-execute-a-windows-command-line-in-background | |
| Dim WinScriptHost | |
| Set WinScriptHost = CreateObject("WScript.Shell") | |
| WinScriptHost.Run Chr(34) & "D:\Applications\KDE Connect\bin\kdeconnect-start-wrapper.bat" & Chr(34), 0 | |
| Set WinScriptHost = Nothing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /****************************************************** | |
| * 请编程实现求两个超长非负数之和(限定使用C/C++或Java,不可使用类 | |
| * 似 BigDecimal等类库). | |
| * | |
| * 要求 | |
| * | |
| * ·不损失精度 | |
| * ·首尾均不出现无意义的0 | |
| * ·不出现无意义的小数点(比如1.00应该输出1) | |
| * ·不得使用除字符操作外的函数 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ''' | |
| 为图像添加红框和绿框。其中绿框中的内容为红框中的放大 | |
| 程序不处理不合法的框(直接报错),所以你应该确保输入的框不会越界 | |
| ''' | |
| #!/usr/bin/python3 | |
| import argparse | |
| import os | |
| import glob |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Refer to http://caffe.berkeleyvision.org/installation.html | |
| # Contributions simplifying and improving our build system are welcome! | |
| # cuDNN acceleration switch (uncomment to build with cuDNN). | |
| USE_CUDNN := 1 | |
| # CPU-only switch (uncomment to build without GPU support). | |
| # CPU_ONLY := 1 | |
| # uncomment to disable IO dependencies and corresponding data layers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
| BSD License | |
| """ | |
| import numpy as np | |
| # data I/O | |
| data = open('input.txt', 'r').read() # should be simple plain text file | |
| chars = list(set(data)) | |
| data_size, vocab_size = len(data), len(chars) |