Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
#!/usr/bin/env python | |
import getopt, sys, re, urllib2, urllib, BaseHTTPServer | |
from urllib2 import Request, urlopen, URLError, HTTPError | |
################## HEADER ################################### | |
# | |
# Traceroute-like HTTP scanner | |
# Using the "Max-Forwards" header |
#!/bin/bash | |
mkdir my_project | |
cd my_project | |
echo " . . . Downloading file stanford-ner-2014-08-27.zip" | |
# NOTE: need to update link for further versions | |
wget http://nlp.stanford.edu/software/stanford-ner-2014-08-27.zip | |
echo " . . . Unpacking stanford-ner-2014-08-27.zip" |
'''cjson, jsonlib, simplejson, and yajl also use C code | |
demjson did not use C code, but was too painfully slow to benchmark | |
(took about 20 seconds for these tests) | |
''' | |
import json | |
import sys | |
import time | |
with open('doc.json') as f: |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
Pragma: akamai-x-cache-on, akamai-x-cache-remote-on, akamai-x-check-cacheable, akamai-x-get-cache-key, akamai-x-get-extracted-values, akamai-x-get-nonces, akamai-x-get-ssl-client-session-id, akamai-x-get-true-cache-key, akamai-x-serial-no |
class CaselessDictionary(dict): | |
"""Dictionary that enables case insensitive searching while preserving case sensitivity | |
when keys are listed, ie, via keys() or items() methods. | |
Works by storing a lowercase version of the key as the new key and stores the original key-value | |
pair as the key's value (values become dictionaries).""" | |
def __init__(self, initval={}): | |
if isinstance(initval, dict): | |
for key, value in initval.iteritems(): |