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 script matches names like "Mr. Bennet" (and not just "Bennet") | |
# in the XML output of CoreNLP, which has one word per token | |
import xml.etree.ElementTree as ET | |
e = ET.parse('test.xml').getroot() | |
word_list = [] | |
character_dict = dict() |
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 codecs | |
import matplotlib.pyplot as plt | |
import sys | |
import csv | |
reload(sys) | |
sys.setdefaultencoding("ISO-8859-1") | |
in_file = sys.argv[1] | |
out_file = sys.argv[2] |
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
setInterval(function() { | |
var ts = Math.round((new Date()).getTime() / 1000); | |
client.query('BEGIN', function(err, result) { | |
if (err) { | |
return console.error('error running query', err); | |
} | |
for (var k in big_dict) { | |
// use hasOwnProperty to filter out keys from the Object.prototype | |
if (big_dict.hasOwnProperty(k)) { | |
var symbol = k; |
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
#!/bin/bash | |
if [[ -z $(grep dockerhost /etc/hosts) ]] | |
then | |
echo `/sbin/ip route|awk '/default/ { print $3 }'` dockerhost >> /etc/hosts | |
fi |
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
0,15,30,45 * * * * sh *full path to script here*/*scriptnamehere*.sh &>/dev/null |
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
module.exports = { | |
index: function(req, res) { | |
res.sendfile(__dirname, 'index.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
#!/bin/bash | |
#Clear all routes on vpn routing table (this is to make sure there isn't any crap left over from a previous vpn connection | |
/sbin/ip route flush table 100 | |
#Copy routing table from main routing table into vpn table | |
/sbin/ip route show table main | grep -Ev ^default | while read ROUTE ; do ip route add table vpn $ROUTE; done | |
#Add default gateway to vpn routing table | |
/sbin/ip route add default via ${route_vpn_gateway} dev ${dev} table 100 | |
/sbin/ip rule add from ${ifconfig_local} table 100 |
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
events { | |
worker_connections 4096; | |
} | |
http { | |
client_max_body_size 0; | |
server { | |
listen 80; | |
location / { | |
proxy_pass http://127.0.0.1:3000/; |
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
docker run -d -v $(pwd):/home/jovyan/work -p 8888:8888 jupyter/minimal-notebook |
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
docker images -q | xargs docker rmi |
OlderNewer