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 python | |
| import re | |
| import sys | |
| import urllib2 | |
| SIZE = "1920x1200" | |
| DOMAIN = "http://interfacelift.com" | |
| URL_FMT = "%s/wallpaper_beta/downloads/date/hdtv/index%%d.html" % DOMAIN |
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
| app | |
| *.o |
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
| $ python | |
| Python 2.5.1 (r251:54863, Feb 6 2009, 19:02:12) | |
| [GCC 4.0.1 (Apple Inc. build 5465)] on darwin | |
| Type "help", "copyright", "credits" or "license" for more information. | |
| >>> 1 + 2 | |
| 3 | |
| >>> def foo(bar0: | |
| File "<stdin>", line 1 | |
| def foo(bar0: | |
| ^ |
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
| $ dig 3rdengine.com mx | |
| ; <<>> DiG 9.4.3-P1 <<>> 3rdengine.com mx | |
| ;; global options: printcmd | |
| ;; Got answer: | |
| ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 42918 | |
| ;; flags: qr rd ra; QUERY: 1, ANSWER: 7, AUTHORITY: 0, ADDITIONAL: 0 | |
| ;; QUESTION SECTION: | |
| ;3rdengine.com. IN MX |
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
| def hexhamming(a, b, equal=False): | |
| if not equal: | |
| minl = min(len(a), len(b)) | |
| a = a[:minl] | |
| b = b[:minl] | |
| lookup = dict(zip("0123456789abcdef", range(16))) | |
| diffs = 0 | |
| for c1, c2 in zip(a, b): |
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 hashlib | |
| import sys | |
| def hamming(a, b): | |
| diffs = 0 | |
| for c1, c2 in zip(a, b): | |
| if c1 != c2: | |
| diffmask = ord(c1) ^ ord(c2) |
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
| solo | |
| flex | |
| scalable | |
| rubyonrails | |
| rails | |
| cloud | |
| web | |
| hosting | |
| ec2 | |
| aws |
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 pprint import pprint | |
| import re | |
| import sys | |
| import urllib2 | |
| URL = "http://www.modifiedcartrader.com/information/newestCars.aspx" | |
| TRANSLATIONS = {(1, "Label1"): "mileage", | |
| (1, "Label2"): "hp", | |
| (1, "Panel1"): "make", | |
| (2, "Label1"): "hp", |
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
| # put this in ~/.bash_profile or whatever | |
| python_or_python () { | |
| if [ "$1" == "" ]; then | |
| python | |
| else | |
| python "$@" | |
| fi | |
| } | |
| alias python="python_or_python" |
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/ruby -w | |
| CORPUS = 'magnus.tsv' | |
| RE_SKIPLIST = [ /^\#/, | |
| /^http:/ ] | |
| class Oracle | |
| def initialize(corpus) | |
| @corpus = corpus | |
| end |