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
def draw_fractal(n_columns=40, n_rows=20, | |
min_real=-1.5, min_imag=-1.0, max_real=1.0, max_imag=1.0, | |
max_iterations=200, render_chars = 'abcdefghijklmnopqrstuvw '): | |
''' | |
This renders a Mandelbrot set fractal in text mode. | |
http://en.wikipedia.org/wiki/Mandelbrot_set | |
Defaults: | |
def draw_fractal(n_columns=80, n_rows=40, |
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 python | |
# | |
import os | |
import urllib | |
import csv | |
import sys | |
import re | |
from google.appengine.ext import blobstore |
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
; SIRDS Piece Of Shiite | |
; by danslemur ([email protected]) | |
; 5/18/2003 | |
; for EFnet #asm compo 7 - Make a 256 byte intro for 386/486 class PC's | |
; | |
; I got bored and didn't fill in the whole 256 bytes. It's 185 bytes now. Eh! | |
; | |
; Thanks to: | |
; - Razzia for his helpful size optimization post on www.movnet.org/forum, | |
; - matja for showing me a better way to write a 4x4 block to the buffer, |
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 PUBLIC "-//W3C//DTD HTML 4.01//EN"> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Force based label placement</title> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?2.6.0"></script> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.layout.js?2.6.0"></script> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.geom.js?2.6.0"></script> | |
</head> | |
<body> |
This file has been truncated, but you can view the full file.
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
{ | |
"nodes": [ | |
{ | |
"name": "http://vivo.cornell.edu/individual/AI-ICAR-0203DF692AC00007436" | |
}, | |
{ | |
"name": "http://vivo.cornell.edu/individual/AI-ICAR-0203DF692AC000088DF" | |
}, | |
{ | |
"name": "http://vivo.cornell.edu/individual/AI-ICAR-0203DF692AC000050FB" |
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
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> | |
<script type="text/javascript"> | |
// How often the stopwatch is actually updated | |
Stopwatch.interval_ms = 200; | |
function Stopwatch(time_offset, ratio_to_realtime, display_increment_ms, display_function) { | |
this.start_time = (new Date()).getTime(); | |
if(time_offset) { | |
this.start_time -= time_offset; |
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 csv | |
import os | |
import glob | |
import re | |
from collections import defaultdict as dd | |
src_path = "C:\\Users\\Nick\\Dropbox\\MTS Relational Event Network Modeling\\MTS Data\\NU Newest Chatlogs" | |
# Read in all data from all the files and index it in a data structure by session, | |
# sender, receiver, and the message. This will aid in finding the duplicates later. |
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 csv | |
import os | |
import glob | |
src_path = 'C:\\Users\\Nick\\Dropbox\\MTS Relational Event Network Modeling\\MTS Data\\NU Newest Chatlogs\\Deduplicated Logs By Phase' | |
for filename in glob.glob(os.path.join(src_path, "*.txt")): | |
with open(filename, 'rb') as f: | |
rows = list(csv.reader(f, delimiter='\t')) | |
event_count = len(rows) |
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 PUBLIC "-//W3C//DTD HTML 4.01//EN"> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Force based label placement</title> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?2.6.0"></script> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.layout.js?2.6.0"></script> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.geom.js?2.6.0"></script> | |
</head> | |
<body> |
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 csv | |
with open('c:/users/nick/downloads/Shalinee_Survey_for_Kineo.csv', 'rb') as f: | |
rows = list(csv.DictReader(f)) | |
responses = [] | |
# Skipping the first row, it's effectively the key from column headers to | |
# question text | |
for row in rows[1:]: | |
# V5 is the heading for the column containing the email address |