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
#### PS1 customization #### | |
NONE="\[\033[0m\]" # unsets color to term fg color | |
# regular colors | |
K="\[\033[0;30m\]" # black | |
R="\[\033[0;31m\]" # red | |
G="\[\033[0;32m\]" # green | |
Y="\[\033[0;33m\]" # yellow | |
B="\[\033[0;34m\]" # blue | |
M="\[\033[0;35m\]" # magenta |
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
import operator, string | |
f = open('input.txt', 'r+') | |
s = f.read() | |
f.close() | |
just_words = s.lower().translate(string.maketrans("",""), string.punctuation) | |
counts = {} | |
for word in just_words.split(): | |
if word in counts: |
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
==> Downloading http://ftp9.us.postgresql.org/pub/mirrors/postgresql/source/v9.0.4/postgresql-9.0.4.tar.bz2 | |
File already downloaded in /Users/zain/Library/Caches/Homebrew | |
/usr/bin/tar xf /Users/zain/Library/Caches/Homebrew/postgresql-9.0.4.tar.bz2 | |
==> ./configure --disable-debug --prefix=/usr/local/Cellar/postgresql/9.0.4 --enable-thread-safety --with-bonjour --with-gssapi --with-krb5 --with-openssl --with-libxml --with-libxslt --with-python --with-perl --with-ossp-uuid --datadir=/usr/local/Cellar/postgresql/9.0.4/share/postgresql --docdir=/usr/local/Cellar/postgresql/9.0.4/share/doc/postgresql ARCHFLAGS='-arch x86_64' | |
./configure --disable-debug --prefix=/usr/local/Cellar/postgresql/9.0.4 --enable-thread-safety --with-bonjour --with-gssapi --with-krb5 --with-openssl --with-libxml --with-libxslt --with-python --with-perl --with-ossp-uuid --datadir=/usr/local/Cellar/postgresql/9.0.4/share/postgresql --docdir=/usr/local/Cellar/postgresql/9.0.4/share/doc/postgresql ARCHFLAGS='-arch x86_64' | |
checking build system |
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
==> Downloading http://download.berlios.de/mapnik/mapnik-0.7.1.tar.gz | |
File already downloaded in /Users/zain/Library/Caches/Homebrew | |
/usr/bin/tar xf /Users/zain/Library/Caches/Homebrew/mapnik-0.7.1.tar.gz | |
==> scons PREFIX=/usr/local/Cellar/mapnik/0.7.1 ICU_INCLUDES=/usr/local/Cellar/icu4c/4.4.1/include ICU_LIBS=/usr/local/Cellar/icu4c/4.4.1/lib install | |
scons PREFIX=/usr/local/Cellar/mapnik/0.7.1 ICU_INCLUDES=/usr/local/Cellar/icu4c/4.4.1/include ICU_LIBS=/usr/local/Cellar/icu4c/4.4.1/lib install | |
scons: Reading SConscript files ... | |
[94m | |
Welcome to Mapnik... | |
[0m |
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
==> Checking out http://svn.openstreetmap.org/applications/utils/export/osm2pgsql/ | |
/usr/bin/svn up --force http://svn.openstreetmap.org/applications/utils/export/osm2pgsql/ /Users/zain/Library/Caches/Homebrew/osm2pgsql--svn | |
Skipped 'http://svn.openstreetmap.org/applications/utils/export/osm2pgsql' | |
At revision 26305. | |
Summary of conflicts: | |
Skipped paths: 1 | |
/usr/bin/svn export --force /Users/zain/Library/Caches/Homebrew/osm2pgsql--svn /private/tmp/homebrew-osm2pgsql-HEAD-BTuw | |
Export complete. | |
==> ./autogen.sh | |
./autogen.sh |
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
“Turning Geo-Data into Geo-Visualizations” | |
When tasked with displaying geo-data, most developers decide to put some big red markers on an embeddable Google Map and call it a day. If want to create maps that are more beautiful, more interactive, and more usable, this session is for you. | |
Abstract: | |
This session is an introduction to the tools available for creating beautiful, interactive geo-visualizations for the web. | |
New tools and libraries have lowered the barrier of entry for creating useful maps. What was once exclusively the realm of traditional geographers is now accessible by almost any web developer. |
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 heaviest_incr_subseq(seq, weights): | |
dp = {} | |
dp[0] = weights[0] | |
for i in xrange(1, len(seq)): | |
dp[i] = weights[i] | |
for j in reversed(xrange(0, i - 1)): | |
if (dp[j] + weights[i] > dp[i]): | |
dp[i] = dp[j] + weights[i] | |
return max(dp.values()) |
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 mock import Mock, patch | |
import requests | |
class VSSecureMailWS: | |
def encrypt_and_send(self, url, data): | |
r = requests.post(url) | |
if r.status_code == 200: | |
return "{0} {1}".format(data, r.text) | |
else: | |
return "Error" |
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
import httplib, base64 | |
host = "server.com" | |
path = "/foo/bar" | |
username = "jess" | |
password = "hunter2" | |
http = httplib.HTTP(host) | |
http.putrequest("GET", path) |
OlderNewer