Skip to content

Instantly share code, notes, and snippets.

@t0mst0ne
t0mst0ne / install.sh
Last active August 29, 2015 14:11 — forked from domderen/install.sh
#!/bin/sh
# installation of Oracle Java JDK.
sudo apt-get -y update
sudo apt-get -y install python-software-properties
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get -y update
sudo apt-get -y install oracle-java7-installer
# Installation of commonly used python scipy tools
def plot_correlogram(df,figsize=(20,20)):
''' Creat an n x n matrix of scatter plots for every
combination of numeric columns in a dataframe'''
cols = list(df.columns[df.dtypes=='float64'])
n = len(cols)
fig, ax = plt.subplots(n,n,figsize=figsize)
for i,y in enumerate(cols):
for j,x in enumerate(cols):
if i != n-1:
import json
import os
import time
import requests
from PIL import Image
from StringIO import StringIO
from requests.exceptions import ConnectionError
def go(query, path):
"""Download full size images from Google image search.

##TUNING##

Configuration

System: set file descriptors to 32K or 64K

vim /etc/security/limit.conf

"""Tools for searching Pubmed for a list of PMIDs.
The goal here is to search for many PMIDs at once, since searching
sequentially can take a long time. Using the the BioPython Entrez module
is super convenient to this end.
The results results are returned in a simple dictionary format.
"""
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@t0mst0ne
t0mst0ne / cx_oracle.md
Created October 23, 2015 04:14 — forked from kimus/cx_oracle.md
Installing python cx_oracle on Ubuntu

First of all, it just seems like doing anything with Oracle is obnoxiously painful for no good reason. It's the nature of the beast I suppose. cx_oracle is a python module that allows you to connect to an Oracle Database and issue queries, inserts, updates..usual jazz.

Linux

Step 1:

sudo apt-get install build-essential unzip python-dev libaio-dev

Step 2. Click here to download the appropriate zip files required for this. You'll need:

@t0mst0ne
t0mst0ne / install-tor.txt
Created January 8, 2016 15:50 — forked from pdp7/install-tor.txt
install tor non-exit relay on digital ocean
# My steps for creating a DigitalOcean server to run non-exit Tor node for just $5/mo
# Screen shots of my setup process: https://plus.google.com/photos/+DrewFustini/albums/6057260188204970945
# Create Digital Ocean account: https://www.digitalocean.com/
# Create Droplet on Digital Ocean: select $5/mo, and select Debian 7.0 64-bit
# This instructions are based on Tor Project: https://www.torproject.org/docs/tor-relay-debian.html.en
afustini@lappy486:~$ ssh [email protected]
[email protected]'s password:
You are required to change your password immediately (root enforced)
Linux Tor300SoF 3.2.0-4-amd64 #1 SMP Debian 3.2.54-2 x86_64
@t0mst0ne
t0mst0ne / fbfeed2csv.py
Created May 4, 2016 03:19 — forked from pofeng/fbfeed2csv.py
fbfeed2csv: a tool to download all posts from a user/group/page's facebook feed to a csv file
"""
modified for Python 2.7 and unicode
get your goup id at https://lookup-id.com/
get your acess token at https://developers.facebook.com/tools/explorer/
fork from
fbfeed2csv: a tool to download all posts from a user/group/page's facebook feed to a csv file
yuzawa-san
https://github.com/yuzawa-san
"""
@t0mst0ne
t0mst0ne / bayesian_neural_network.ipynb
Created June 5, 2016 12:19 — forked from twiecki/bayesian_neural_network.ipynb
Bayesian Neural Network in PyMC3
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.