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
"""ajaxgoogle.py - Simple bindings to the AJAX Google Search API | |
(Just the JSON-over-HTTP bit of it, nothing to do with AJAX per se) | |
http://code.google.com/apis/ajaxsearch/documentation/reference.html#_intro_fonje | |
brendan o'connor - gist.github.com/28405 - anyall.org""" | |
try: | |
import json | |
except ImportError: | |
import simplejson as json | |
import urllib, urllib2 |
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
*.pbxproj -crlf -diff -merge |
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
/*var noun_type_train_station_start = { | |
name: "Train station", | |
label: "station", | |
default: "Stuttgart Hbf", | |
};*/ | |
var noun_type_train_station = { | |
name: "Train station", | |
label: "station", | |
default: "Stuttgart Hbf", |
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
Options +FollowSymlinks | |
RewriteEngine on | |
# No intersticial for direct reference and self-reference | |
RewriteCond %{HTTP_REFERER} !^$ | |
RewriteCond %{HTTP_REFERER} !^http(s)?://box.leebyron.com/.*$ [NC] | |
# Add a line item for every website you don't need an intersticial for | |
# I've added my own website, gmail and facebook | |
RewriteCond %{HTTP_REFERER} !^http(s)?://([^\.]*.)?leebyron.com/.*$ [NC] | |
RewriteCond %{HTTP_REFERER} !^http(s)?://mail.google.com/.*$ [NC] |
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
""" | |
Taken from: https://gist.github.com/1094140 | |
""" | |
from functools import wraps | |
from flask import request, current_app | |
def jsonp(func): | |
"""Wraps JSONified output for JSONP requests.""" |
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 __future__ import division | |
from pylab import * | |
# Sampling rate | |
fs = 128 # Hz | |
# Time is from 0 to 1 seconds, but leave off the endpoint, so that 1.0 seconds is the first sample of the *next* chunk | |
length = 1 # second | |
N = fs * length | |
t = linspace(0, length, num = N, endpoint = False) |
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/sh | |
### BEGIN INIT INFO | |
# Provides: supervisord | |
# Required-Start: $remote_fs | |
# Required-Stop: $remote_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Example initscript | |
# Description: This file should be used to construct scripts to be | |
# placed in /etc/init.d. |
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 geventwebsocket.handler import WebSocketHandler | |
from gevent.pywsgi import WSGIServer | |
from flask import Flask, request, render_template | |
app = Flask(__name__) | |
@app.route('/') | |
def index(): | |
return render_template('index.html') |
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 celery import chain | |
from django.core.management.base import BaseCommand | |
from . import tasks | |
class Command(BaseCommand): | |
def handle(self, *args, **kwargs): |
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 pylab import * | |
from scipy.stats import * | |
num_adults = 227e6 | |
basic_income = 7.25*40*50 | |
labor_force = 154e6 | |
disabled_adults = 21e6 | |
current_wealth_transfers = 3369e9 | |
def jk_rowling(num_non_workers): |
OlderNewer