This file contains 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
{ | |
{I have|I’ve} been {surfing|browsing} online more than {three|3|2|4} hours today, yet I never found any | |
interesting article like yours. {It’s|It is} pretty worth enough for me. | |
{In my opinion|Personally|In my view}, if all {webmasters|site owners|website | |
owners|web owners} and bloggers made good content as | |
you did, the {internet|net|web} will be {much more|a lot more} useful than ever before.| | |
I {couldn’t|could not} {resist|refrain from} commenting. {Very well|Perfectly|Well|Exceptionally well} written!| | |
{I will|I’ll} {right away|immediately} {take hold of|grab|clutch|grasp|seize|snatch} your {rss|rss feed} as I {can not|can’t} {in finding|find|to find} your {email|e-mail} subscription {link|hyperlink} | |
or {newsletter|e-newsletter} service. Do {you have|you’ve} any? |
This file contains 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
ln -s /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google /path/to/virtualenv/lib/python2.7/site-packages/google |
This file contains 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
In [8]: def t(): | |
f = ([],) | |
f[0] += [1] | |
return f | |
...: | |
In [9]: dis.dis(t) | |
2 0 BUILD_LIST 0 | |
3 BUILD_TUPLE 1 | |
6 STORE_FAST 0 (f) |
This file contains 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 f1(): | |
a = 0 | |
a += 1 | |
dis.dis(f1) |
I hereby claim:
- I am jsocol on github.
- I am jamessocol (https://keybase.io/jamessocol) on keybase.
- I have a public key whose fingerprint is B856 FE22 4F11 9DB0 F88E 3BDD 80F9 3DCE 9EBF CF1D
To claim this, I am signing this object:
This file contains 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 boto.dynamodb2 import connect_to_region | |
from boto.provider import Provider | |
aws_settings_provider = Provider('aws') | |
def create_connection(): | |
aws_region = # get the AWS region of the EC2 instance | |
# connect_to_region passes along the named arguments | |
# to the DynamoDBConnection class that gets created |
This file contains 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
>>> class NewStyle(object): | |
... def foo(self): | |
... return 'foo' | |
>>> class OldStyle(): | |
... def foo(self): | |
... return 'foo' | |
>>> dir(NewStyle) | |
['__class__', |
This file contains 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
#!/bin/bash | |
# Flush memcached with a single command. | |
echo "flush_all" | nc localhost 11211 |
This file contains 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
#!/bin/bash | |
# Fetch and prune all remotes. | |
for r in `git remote` | |
do | |
git remote prune $r | |
git fetch $r | |
done |
OlderNewer