Skip to content

Instantly share code, notes, and snippets.

View t0mst0ne's full-sized avatar

ChenChang Shih t0mst0ne

View GitHub Profile
@t0mst0ne
t0mst0ne / combine.py
Created March 30, 2018 02:47 — forked from glombard/combine.py
Merging 4 images into one with Python and PIL/Pillow
# Combine multiple images into one.
#
# To install the Pillow module on Mac OS X:
#
# $ xcode-select --install
# $ brew install libtiff libjpeg webp little-cms2
# $ pip install Pillow
#
from __future__ import print_function
@t0mst0ne
t0mst0ne / interactive_plot.py
Created March 21, 2018 14:17 — forked from braaannigan/interactive_plot.py
Interactive plots with holoviews in a jupyter notebook - needs to be in two separate code cells, see text for details
# The following must be executed in a jupyter notebook rather than a shell environment.
# Use numpy to work with arrays
import numpy as np
# Use scipy.stats to do plot some statistical data
import scipy.stats as stats
import holoviews as hv
# Holoviews builds on top of either the Matplotlib or Bokeh plotting library. Choose to use Bokeh
# in these plots as interactive plots work very well with Bokeh
hv.notebook_extension('bokeh')
@t0mst0ne
t0mst0ne / readme.md
Created February 25, 2018 02:11 — forked from baraldilorenzo/readme.md
VGG-19 pre-trained model for Keras

##VGG19 model for Keras

This is the Keras model of the 19-layer network used by the VGG team in the ILSVRC-2014 competition.

It has been obtained by directly converting the Caffe model provived by the authors.

Details about the network architecture can be found in the following arXiv paper:

Very Deep Convolutional Networks for Large-Scale Image Recognition

K. Simonyan, A. Zisserman

@t0mst0ne
t0mst0ne / MRPyMC3.ipynb
Created July 10, 2017 14:49 — forked from AustinRochford/MRPyMC3.ipynb
MRPyMC3-Multilevel Regression and Poststratification with PyMC3
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@t0mst0ne
t0mst0ne / HLS_dvr.sh
Created September 21, 2016 00:21 — forked from John07/HLS_dvr.sh
A small script to make recording http live streams (HLS, those streams that work on iOS devices) nicer on a Mac. Script records the stream for a defined period of time and sends the user notifications if anything goes wrong and once it's done.
# required: ffmpeg (e.g. from homebrew), terminal-notifier from https://github.com/alloy/terminal-notifier
# you can schedule this with launchd to run e.g. weekly
# Specify in seconds how long the script should record (default here is 1 hour).
seconds=3600
# Date format for the recording file name
DATE=`date "+%d-%m-%y_%H-%M"`
# start ffmpeg recording
@t0mst0ne
t0mst0ne / bayesian_neural_network.ipynb
Created June 5, 2016 12:19 — forked from twiecki/bayesian_neural_network.ipynb
Bayesian Neural Network in PyMC3
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@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 / 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 root@107.170.203.104
root@107.170.203.104'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 / 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:

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.