Skip to content

Instantly share code, notes, and snippets.

View iziang's full-sized avatar

Ziang Guo iziang

View GitHub Profile
#!/usr/bin/env python
#
# Converts any integer into a base [BASE] number. I have chosen 62
# as it is meant to represent the integers using all the alphanumeric
# characters, [no special characters] = {0..9}, {A..Z}, {a..z}
#
# I plan on using this to shorten the representation of possibly long ids,
# a la url shortenters
#
#统计C文件和Python文件中有效代码行数
#Python文件中空行,以"#"开头的注释行,不在统计之列
#C文件中空行,以"//"开头的注释行,以"/* comment*/"包围的注释块,不再统计之列
import os
import re
from sys import argv
filename, name= argv
blank_line =re.compile(r"^ *$")