This file contains hidden or 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
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
Version: GnuPG v1.4.12 (GNU/Linux) | |
mQINBFM0besBEADZdB3frS1S/uslISsWwyUcU5bRXAT2jXieZYWKHdZDFzl+RO/a | |
UXsom7YKYwxk85UK+lx0lyrxbSq9vsTO7ckPkCT1wonX3Lk+IhGJHvLBFBY6UUvd | |
XKRYUBs6/GkKD+j3GVWQDFeh20KAh970LoZEfY3GrADwRKd8mSSaJAEV2SHUkZso | |
wO7nVwdSo5Pxu5HUGowQ4RcqKDqoQf/aBle2WF20e2EFXIbDm+g7scpcW3fUELaY | |
85VK4wOhWPq0/lPiVvdSAeO6Nz8IE2buXR1FhiJfhpV367KK54ESKVxSDYwz014i | |
m1WHD/j8sDqqf314CpV2bSTkrUUzDohsyzQv46d7LZNm4ZROcQi2/EGJuYMEJBMH | |
+3lvzdBnAggYrLRw2mCnX13gStV6qxUDFXpN32tf6JdTHSEp+Uc1n8+UInGE68FW |
This file contains hidden or 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
<!-- ios standalone web app --> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<!-- ios status bar appearance, options: black, black-translucent --> | |
<meta name="apple-mobile-web-app-status-bar-style" content="black"> | |
<!-- ios icon, just one size because ios will scale it, remove "-precomposed" if you want ios to add effects --> | |
<link href="[email protected]" sizes="144x144" rel="apple-touch-icon-precomposed"> | |
<!-- ios startup images --> |
This file contains hidden or 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
(function(c){return c.replace(/\s+\^COMMA/g,",").replace(/\^SEMICOLON/g,";").replace(/\^COLON/g,":").replace(/\^PERIOD/g,".").replace(/\^BANG/g,"!").replace(/\^DASH/g,"-").replace(/\^HYPHEN/g,"h-h").replace(/\^EMDASH/g,"-e-").replace(/\^OPENQUOTE/g,' "').replace(/\^CLOSEQUOTE/g,'" ').replace(/\s+\./g,".").replace(/\s+\!/g,"!").replace(/\s+\,/g,",").replace(/\s+\;/g,";").replace(/\s+\:/g,":").replace(/\s\h\-\h\s/g,"-").replace(/[^!,"'.]\"\s/g,'"').replace(/\s+\-\e-\s+/g,"--").replace(/.+?[\.\?\!](\s|$)/g, function(b){return b.charAt(0).toUpperCase()+b.substr(1)}).replace(/\"[a-z]/g,function(b){return b.charAt(0)+b.charAt(1).toUpperCase()})})(a); |
This file contains hidden or 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
// Set the variables R, C, and U equal to 'replace', 'charAt', and 'toUpperCase' | |
// Replace searches a string and replaces characters | |
// charAt finds the char at a certain position | |
// toUpperCase makes things uppercase | |
R="replace", | |
C="charAt", | |
U="toUpperCase"; | |
// alert causes an on-screen pop-up, needed for this competition because I have to write to STDOUT |
This file contains hidden or 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
===== KEY VALUE PAIR ===== | |
var gopparties = { | |
"AL":"http://www.algop.org/" | |
"AK":"http://alaskarepublicans.com/" | |
"AZ":"http://www.azgop.org/" | |
"AR":"http://www.arkansasgop.org/" | |
"CA":"http://www.cagop.org/" | |
"CO":"http://www.cologop.org/" | |
"CT":"http://www.ctgop.org/" |
This file contains hidden or 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 datetime | |
ld = '' # Input wanted LD | |
legdistrict = [] | |
reader = csv.DictReader(open('active.txt', 'rb'), delimiter='\t') | |
for row in reader: | |
if row['LegislativeDistrict'] == 'ld': |
This file contains hidden or 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/bash | |
for ((i=1; i<51; i++)) | |
do | |
echo $i | python data.py >> c; | |
done |
This file contains hidden or 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/bash | |
for ((i=1; i<51; i++)) | |
do | |
(echo $i | python data.py >> b) & | |
done |
This file contains hidden or 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 | |
def bufcount(filename): | |
f = open(filename) | |
lines = 0 | |
buf_size = 1024 * 1024 | |
read_f = f.read # loop optimization | |
buf = read_f(buf_size) | |
while buf: |
This file contains hidden or 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
0 ;) eric@crunchbang ~/sbdmn/republican/CsvCount/CsvCount $ time (wc -l file.txt) | |
3898815 file.txt | |
real 0m0.333s | |
user 0m0.164s | |
sys 0m0.160s | |
0 ;) eric@crunchbang ~/sbdmn/republican/CsvCount/CsvCount $ time python ./lines.py | |
3898815 lines | |
real 0m1.128s |
OlderNewer