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 Data.Ratio | |
import Data.List | |
import Graphics.GD | |
type MandelNum = Double | |
maxIterations :: Int | |
maxIterations = 255 | |
main :: IO() |
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
.turquoise.background { | |
background-color: #1ABC9C; | |
} | |
.turquoise.text { | |
color: #1ABC9C; | |
} | |
.turquoise.border { | |
border-color: #1ABC9C; | |
} |
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
#include <sys/types.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <string.h> | |
#include <event.h> | |
#include <evhttp.h> |
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
<canvas></canvas> | |
<script> | |
var L, M, Vect, v; | |
M = { | |
TAU: Math.PI * 2, | |
vary: function(amt) { | |
return 2 * amt * (Math.random() - 0.5); |
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 os | |
from multiprocessing import Pool | |
NUM_PROCESSES = 4 | |
ALLOWED_EXTENSION = '.txt' | |
NEW_EXTENSION = '.reversed.txt' | |
OUTPUT_DIR = os.path.join(os.getcwd(), 'output') | |
def processFile(file): | |
# process a file, delegated over multiple processes |
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 calendar | |
from datetime import datetime | |
import types | |
import json | |
from functools import wraps | |
def convert_arg(type_name, value): | |
converter = None | |
if not isinstance(type_name, basestring): | |
converter = type_name |
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 mongoalchemy.fields import DocumentField, StringField | |
from mongoalchemy.session import Session | |
from mongoalchemy.query import BadQueryException, BadResultException | |
from mongoalchemy.query_expression import QueryField | |
from mongoalchemy.document import DocumentMeta | |
from pymongo.errors import DuplicateKeyError | |
from pytz import utc |
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
# Simple GitHub Webhook Listener | |
express = require 'express' | |
bodyParser = require 'body-parser' | |
crypto = require 'crypto' | |
bufPack = require 'bufferpack' | |
app = express() | |
PORT = process.argv[2] or process.env.PORT or 8081 | |
AUTH_SECRET = process.argv[3] or process.env.SECRET_TOKEN or 'test' |
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
request = require 'request' | |
lastLunches = '' | |
module.exports = (callback) -> | |
request { | |
url: "http://www.urbanspoon.com/api/ispin?p=1&n=7003&r=#{lastLunches}&l=70&v=6f" | |
}, (err, msg, data) -> | |
fields = (data.split '\t') | |
restaurantID = fields[0] |
OlderNewer