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 argparse | |
import ftplib | |
import io | |
import os.path | |
import sys | |
def main(host,user,passw,prefix_glob,destination_directory,optional_chdir=None): | |
if not os.path.isdir(destination_directory): |
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 argparse | |
import codecs | |
import json | |
import os.path | |
import requests | |
import sys | |
import sqlite3 | |
import time | |
import traceback |
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
<head> | |
<script src="http://code.jquery.com/jquery-1.7.2.js"></script> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
var hostProtocol = (("https:" == document.location.protocol) ? "https" : "http"); | |
$.getScript( | |
hostProtocol+'://5003.xg4ken.com/media/getpx.php?cid=XXXXXX', | |
function(){ | |
console.log("about to log request after initial dom rendering, not on initial dom render."); |
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> | |
<html> | |
<head> | |
<title>dedicated pixel test</title> | |
<script type="text/javascript" src="//cpadna1.com/p.ashx?o=1246&f=js&t=1"></script> | |
</head> | |
<body> | |
use developer tools to check out network activity. | |
</body> | |
</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
import os | |
import pandas | |
def main(): | |
data_directory = './replay-correction' | |
output_fname = './icon_code_count.csv' | |
dates = [] | |
codes = [] |
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 argparse | |
import tensorflow as tf | |
import sys | |
def flowfib(n): | |
''' f_n = f_n-1 + f_n-2 | |
Fails in a somewhat interesting way, showing that ints passed to constants are cast to 32 bit signed ints, | |
causing overflow pretty early in fibonacci sequence. | |
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 numpy as np | |
import matplotlib.pyplot as plt | |
'''Makes a simple histogram from a file containing the frequency counts for each number | |
''' | |
def make_histogram(): | |
#The format of the counts is a file with two columns, separated by commas | |
#first col: visit number (bin) |
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 sys | |
from boto.s3.connection import S3Connection | |
def main(args): | |
c = S3Connection() | |
l = c.get_bucket(args[0]).list(prefix=args[1]) | |
print "keyname,size" | |
for k in l: | |
print "%s,%d" % (k.name, k.size) |
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 numpy as np | |
import matplotlib.pyplot as plt | |
import matplotlib.mlab | |
def make_bars(): | |
d = matplotlib.mlab.csv2rec("os_visit_counts.txt",names=('os','visits')) | |
sorted_indeces = np.argsort(d['visits']) | |
x = d['os'][sorted_indeces] | |
y = np.log10(d['visits'][sorted_indeces]) |
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 boto | |
import boto.s3.connection | |
import os.path | |
def main(): | |
aws_key = '' | |
aws_secret = '' | |
bucket_name = '' | |
prefix = '' |
OlderNewer