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
{ | |
"metadata": { | |
"name": "Measuring the redundancy of text" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |
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 | |
# ASSUMPTIONS: you are on the staging server and want to build and run it | |
# first -- create a file called /var/www/envs/reqs.txt and paste the stuff below into it. | |
# then: | |
cd /var/www/envs/ ; rm -Rf rodney ; | |
virtualenv rodney ; cd rodney/ ; source bin/activate ; | |
virtualenv --relocatable . ; | |
pip install -U --force-reinstall --no-deps --ignore-installed -r ../reqs.txt ; |
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
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:4c29a1ff7ca0f7527fdf8246baed59e51d769e2a4e8365475b522e91736e250c" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ |
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
<!DOCTYPE html> | |
<!--[if lt IE 7]> <html class="lt-ie9 lt-ie8 lt-ie7"> <![endif]--> | |
<!--[if IE 7]> <html class="lt-ie9 lt-ie8"> <![endif]--> | |
<!--[if IE 8]> <html class="lt-ie9"> <![endif]--> | |
<!--[if gt IE 8]> <html> <![endif]--> | |
<head> |
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 rodney.campaign import Campaign, Click | |
query=Click.query | |
myc=query.filter(campaign_id=6).all() | |
import datetime | |
print "| click_id | UTC time | blogger_id | campaign_id | job_id | url |" | |
print "| --- | --- | --- | --- | --- | --- |" | |
for c in myc: | |
clickdict = c.to_dict() |
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
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:e60fd5dd6e149c76a21fd2cb0f4d59f091ed8c2c7a6e713e79df1ef3a729d924" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ |
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 qrcode | |
qr = qrcode.QRCode( | |
version=5, | |
error_correction=qrcode.constants.ERROR_CORRECT_M, | |
box_size=10, | |
border=2, | |
) | |
link = 'http://qr.metro.net/stops/10222/' |
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 qrcode | |
import human_curl as hurl | |
urls="""http://qr.metro.net/about/gwc/ | |
http://qr.metro.net/about/sba/ | |
http://qr.metro.net/about/wes/ | |
http://qr.metro.net/bikes/bikes-metro/ | |
http://qr.metro.net/news/media-kits/expo-media/ | |
http://qr.metro.net/projects/ | |
http://qr.metro.net/projects/30-10/ |
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
#!/usr/bin/env bash | |
POSTGIS_SQL_PATH=`pg_config --sharedir`/contrib/postgis-2.1 | |
createdb -E UTF8 template_postgis # Create the template spatial database. | |
createlang -d template_postgis plpgsql # Adding PLPGSQL language support. | |
psql -d postgres -c "UPDATE pg_database SET datistemplate='true' WHERE datname='template_postgis';" | |
psql -d template_postgis -f $POSTGIS_SQL_PATH/postgis.sql # Loading the PostGIS SQL routines | |
psql -d template_postgis -f $POSTGIS_SQL_PATH/spatial_ref_sys.sql | |
psql -d template_postgis -c "GRANT ALL ON geometry_columns TO PUBLIC;" # Enabling users to alter spatial tables. | |
psql -d template_postgis -c "GRANT ALL ON geography_columns TO PUBLIC;" | |
psql -d template_postgis -c "GRANT ALL ON spatial_ref_sys TO PUBLIC;" |
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
{ | |
version: 1408473258, | |
servicetypes: [ | |
{ | |
services: [ | |
{ | |
services: [ | |
], | |
shortname: "Owl Service", |
OlderNewer