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
| i | |
| me | |
| my | |
| myself | |
| we | |
| our | |
| ours | |
| ourselves | |
| you | |
| your |
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 matplotlib.pyplot as plt | |
| import networkx as nx | |
| from pysqlite2 import dbapi2 | |
| connection = dbapi2.Connection('bredewiki-templates.sqlite3') | |
| sql = "SELECT DISTINCT pid FROM brede WHERE (template='paper' OR template='conference_paper');" | |
| cursor = connection.cursor() | |
| cursor.execute(sql) | |
| pids = [ row[0] for row in cursor.fetchall() ] |
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
| # wget http://neuro.imm.dtu.dk/services/bredewiki/download/bredewiki-templates.sqlite3 | |
| import matplotlib.pyplot as plt | |
| import networkx as nx | |
| from pysqlite2 import dbapi2 | |
| connection = dbapi2.Connection('bredewiki-templates.sqlite3') | |
| sql = "SELECT DISTINCT tid FROM brede WHERE (template='paper' OR template='conference_paper');" | |
| cursor = connection.cursor() | |
| cursor.execute(sql) | |
| tids = [ row[0] for row in cursor.fetchall() ] |
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
| # Code inspired and developed from: | |
| # http://streamhacker.com/2010/05/10/text-classification-sentiment-analysis-naive-bayes-classifier/ | |
| from __future__ import division | |
| import nltk.classify, nltk.corpus, nltk.classify.util | |
| from pylab import * | |
| filebase = '/home/fn' |
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
| Source | Target | Type | Id | Weight | Average Degree | |
|---|---|---|---|---|---|---|
| 1 | 3 | Undirected | 1 | 1.0 | 1.0 | |
| 2 | 10 | Undirected | 8 | 1.0 | 1.0 | |
| 3 | 4 | Undirected | 2 | 1.0 | 1.0 | |
| 4 | 5 | Undirected | 3 | 1.0 | 1.0 | |
| 5 | 10 | Undirected | 4 | 1.0 | 1.0 | |
| 8 | 2 | Undirected | 7 | 1.0 | 1.0 | |
| 8 | 9 | Undirected | 11 | 1.0 | 1.0 | |
| 10 | 1 | Undirected | 5 | 1.0 | 1.0 | |
| 10 | 6 | Undirected | 10 | 1.0 | 1.0 |
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
| def run_pg_fouine(): | |
| info = host_info[env.host_string] | |
| db_name = info.tags.get('Name') | |
| sudo('perl -pi -e "s/log_min_duration_statement = .*/log_min_duration_statement = 0/" /etc/postgresql/9.*/main/postgresql.conf') | |
| sudo('/etc/init.d/postgresql reload') | |
| time.sleep(30) | |
| sudo('perl -pi -e "s/log_min_duration_statement = .*/log_min_duration_statement = 500/" /etc/postgresql/9.*/main/postgresql.conf') | |
| sudo('/etc/init.d/postgresql reload') | |
| run('tail -n 100000 /var/log/postgresql/postgresql-9.*-main.log > /tmp/pgfouine.txt') | |
| run('gzip -f /tmp/pgfouine.txt') |
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
| <?php | |
| //returns a big old hunk of JSON from a non-private IG account page. | |
| function scrape_insta($username) { | |
| $insta_source = file_get_contents('http://instagram.com/'.$username); | |
| $shards = explode('window._sharedData = ', $insta_source); | |
| $insta_json = explode(';</script>', $shards[1]); | |
| $insta_array = json_decode($insta_json[0], TRUE); | |
| return $insta_array; | |
| } |
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
| This is free and unencumbered software released into the public domain. | |
| Anyone is free to copy, modify, publish, use, compile, sell, or | |
| distribute this software, either in source code form or as a compiled | |
| binary, for any purpose, commercial or non-commercial, and by any | |
| means. | |
| In jurisdictions that recognize copyright laws, the author or authors | |
| of this software dedicate any and all copyright interest in the | |
| software to the public domain. We make this dedication for the benefit |
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
| library(stringr) | |
| library(lubridate) | |
| library(ggplot2) | |
| library(scales) | |
| getwd() | |
| setwd("~/Desktop/Personal_Projects/Immersion/") | |
| i <- read.csv("./immersion.csv", header=TRUE, as.is=TRUE) | |
| ## Only get those emails that I sent |
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
| 4r5e | |
| 5h1t | |
| 5hit | |
| a55 | |
| anal | |
| anus | |
| ar5e | |
| arrse | |
| arse | |
| ass |
OlderNewer