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
| import codecs | |
| # input file chunk size in bytes | |
| BLOCKSIZE = 120000 | |
| sourceFileName = "moto_file.txt" | |
| targetFileName = "atarashii_file.txt" | |
| with codecs.open(sourceFileName, "r", "gb18030") as sourceFile: | |
| with codecs.open(targetFileName, "w", "utf-8") as targetFile: | |
| while True: | |
| contents = sourceFile.read(BLOCKSIZE) | |
| if not contents: |
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
| [user] | |
| email = xxxx@xxx.com | |
| name = xxxx | |
| [core] | |
| excludesfile = ~/.gitignore_global | |
| editor = vim | |
| [alias] | |
| lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative | |
| cm = commit | |
| cmm = commit -m |
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 general Debian .bashrc setup | |
| # Author: freenik | |
| # | |
| # | |
| # do 'source ~/.bashrc' in '~/.bash_profile' or '~/.bash_login' to auto load .bashrc | |
| # | |
| # | |
| GREEN="\[$(tput setaf 2)\]" |
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
| from itertools import product | |
| A = map(int,raw_input().split()) | |
| B = map(int,raw_input().split()) | |
| A.sort() | |
| B.sort() | |
| res = product(A, B) | |
| # you can also get res from |