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
Download the following ZIPs: | |
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links) | |
Download the correct GApps for your Android version: | |
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161892865 - gapps-L-4-21-15.zip) | |
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip) | |
Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23501681358544845 - gapps-kk-20140606-signed.zip) | |
Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip) | |
Google Apps for Android 4.2 (https://www.androidfilehost.com/?fid=23060877490000128 - gapps-jb-20130812-signed.zip) |
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
#抓站神命令wget | |
wget -w 2 -r -np -k -p http://www.stanford.edu/class/cs193p/cgi-bin/drupal/ |
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
#This finds the longest substring that's in all of the words | |
def longest_substring(data): | |
substr = '' | |
if len(data) > 1 and len(data[0]) > 0: | |
for i in range(len(data[0])): | |
for j in range(len(data[0])-i+1): | |
if j > len(substr) and all(data[0][i:i+j] in x for x in data): | |
substr = data[0][i:i+j] | |
return substr |
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 contextlib import closing | |
import urllib | |
with closing(urllib.urlopen('http://www.python.org')) as page: | |
for line in page: | |
print line |
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 urllib2 | |
passman = urllib2.HTTPPasswordMgrWithDefaultRealm() | |
auth_handler = urllib2.HTTPBasicAuthHandler(passman) | |
auth_handler.add_password(None, url, username, password) | |
opener = urllib2.build_opener(auth_handler) | |
page = opener.open(url).read() |