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
# this is the loop that loads the LIWC dataset into a dictionary for me | |
# note, I'm loading the function words into the set if they're not marked | |
# as emotion | |
for line in f: | |
l = line.rstrip().split("\t") | |
word = l[0] | |
if '125' in l: | |
if '126' in l: | |
score = 1 | |
LIWC[word] = (score,i) |
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
test = linkage(normed_dist_winner_matters_array,method = 'ward') | |
d = dendrogram(test); | |
k= 19 | |
fig = figure() | |
clustered_matrix = [] | |
nodes_order = list(reversed(d['leaves'])) | |
nodes_order = list(d['leaves']) | |
for leaf1 in nodes_order: | |
row = [] |
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
langs = ["chinese","portuguese","english","indonesian","russian","french","korean","spanish","arabic","german"] | |
for lang in langs: | |
f = open("labMT2"+lang+".txt","r") | |
f.readline() | |
stdDevs = [line.rstrip().split("\t")[3] for line in f] | |
f.close() | |
print(stdDevs[:10]) | |
f = open("vectors/labMTscoresStd-"+lang+".csv","w") | |
f.write("\n".join(stdDevs)) | |
f.close() |
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
tweets = ['a','b','c'] | |
scores = ['c' for i in range(len(tweets))] | |
if __name__ == '__main__': | |
i = 0 | |
while i < len(tweets): | |
scores[i] = input(tweets[i]+":\n") | |
if scores[i] == 'b': | |
i -= 1 | |
else: |
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
flash_cards = ['self-similarity', | |
'deterministic vs. stochastic', | |
'context-free vs. context-sensitive', | |
'parameterless vs. parameterized', | |
'Kolmogorov complexity', | |
'Shannon''s entropy', | |
'derivatives, eigenvalues, Lyapunov exponents', | |
'analytical vs. numerical solution', | |
'Taylor series expansion', | |
'round-off error and truncation error', |
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
function zooit() { | |
## ssh areagan@zoo.uvm.edu mkdir -p public_html/files/$(date +%Y/%m) | |
rsync -avzr $1 areagan@zoo.uvm.edu:/users/a/r/areagan/public_html/files/$(date +%Y/%m) | |
echo "andyreagan.com/files/$(date +%Y/%m)/$1" | tr -d '\n' | pbcopy | |
echo "link is in the clipboard" | |
} |
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
<div id="mapcontent"></div> | |
<script type="text/javascript">$('#mapcontent').load('http://tools.newbreedmarketing.com/mapmaker/api/allearth/');</script> | |
<script src="http://cdn2.hubspot.net/hubfs/415283/scripts/maps-on-load-minimal-hardcoded.js"></script> |
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 matplotlib.pyplot as plt | |
fig = plt.figure(figsize=(10,10)) | |
ax = fig.add_axes([0.2,0.2,0.7,0.7]) | |
ax.plot() | |
# ax.set_ylim() | |
# ax.set_xlim() | |
# ax.legend() | |
ax.set_xlabel('',fontsize=15) | |
ax.set_ylabel('',fontsize=15) |
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
using PyPlot | |
import PyPlot.plt | |
using PyCall | |
@pyimport matplotlib as mpl | |
patches = mpl.pymember("patches") | |
fig = plt.figure(figsize=(15,10)) | |
ax = fig[:add_axes]([0.2,0.2,0.7,0.7]) |
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
Runge | |
EnKF | |
Kutta | |
incompressible | |
blockMesh | |
integrations | |
McMaster | |
RMS | |
ODE's | |
Boussinesq |