Skip to content

Instantly share code, notes, and snippets.

View K-Wu's full-sized avatar
🆑
κ = α|working> + β|slacking>

Kun Wu K-Wu

🆑
κ = α|working> + β|slacking>
View GitHub Profile
@K-Wu
K-Wu / cvt_eesast_csv_to_vcf
Last active May 28, 2017 00:03
A script to convert csv file to vcf file, which can be imported to Contact App on mobile phone.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#A script to convert csv file to vcf file, which can be imported to Contact App on mobile phone.
#eesast csv format 姓名,性别,生日,农历生日,班级,宿舍号,手机号,电子邮箱,部门,GitHub用户名,职位
"""
vcf format
BEGIN:VCARD
VERSION:3.0
FN;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:=E5=90=B4=E6=98=86
BDAY;VALUE=text:1900-00-00
@K-Wu
K-Wu / autopackage.bat
Created March 3, 2017 12:26
building windows executable from latest commit for python repo
:: This is one script for auto package necessary files distributed to competitors for TeamStyle18 programming contest @EE.THU
:: github-release.exe is built from https://github.com/c4milo/github-release
cd teamstyle18
set GITHUB_TOKEN=[redacted]
git pull origin master
pyinstaller --onefile src/main.py
rename dist\main.exe dist\cpclash.exe
git log --oneline >githashtmp.txt
set /p latestcommit=<githashtmp.txt
set hash=%latestcommit:~0,6%
@K-Wu
K-Wu / bing2quizlet.py
Created February 25, 2017 04:17
import to quizlet from bing dictionary
#!/usr/bin/python2.7
# -*- coding: UTF-8 -*-
import sys
if len(sys.argv)!=3:
print "Usage:"
print "python bing2quizlet.py BingDictExport.txt QuizletImport.txt"
exit(1)
print sys.argv
infile=sys.argv[1]
outfile=sys.argv[2]