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/env python3 | |
# Find some suggestions on which shell commands you actually want an alias for: | |
# cat ~/.bash_history | python3 find_common_prefixes.py | sort -n | |
# cat ~/.zsh_history | cut -d ';' -f 2 | python3 find_common_prefixes.py | sort -n | |
import fileinput | |
class Node(): | |
def __init__(self, text = ''): | |
self.text = text |
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/python | |
import urllib2 | |
import re | |
import ssl | |
import sys | |
# # find generic mirrors | |
mirrors = urllib2.urlopen('http://www.debian.org/mirror/list') | |
https = [] |
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 sys | |
if len(sys.argv) != 3: | |
print ("Usage: " + sys.argv[0] + " INPUT.ADR OUTPUT.CSV\n") | |
print ("Convert the .adr contact format (names and email only) of the Opera mail client into gmail-compatible CSV.") | |
sys.exit(1) | |
adrfile = open(sys.argv[1], 'r') | |
csvfile = open(sys.argv[2], 'w+') |