Skip to content

Instantly share code, notes, and snippets.

Thein Oo thoo

  • University of Pittsburgh Medical Center
  • Pittsburgh, PA
Block or report user

Report or block thoo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@thoo
thoo / pickle
Last active Feb 22, 2019
#save_object #pickle
View pickle
# pickle has a bug which won't let you save more than large (GB) files
import joblib
def save_obj(obj, name, name_dir='data' ):
"""
Save to pickle.
Parameters
----------
obj : any object
@thoo
thoo / pandas_validation_errors.ipynb
Created Feb 4, 2019 — forked from kynan/pandas_validation_errors.ipynb
Pandas documentation validation errors
View pandas_validation_errors.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@thoo
thoo / 2017-03-USC-Career-Conference-Supplementary.md
Created May 17, 2017 — forked from jbwhit/2017-03-USC-Career-Conference-Supplementary.md
Here are the supplementary materials for my USC Career Conference Keynote.
View 2017-03-USC-Career-Conference-Supplementary.md
@thoo
thoo / 00-about-search-api-examples.md
Created Mar 26, 2017 — forked from jasonrudolph/00-about-search-api-examples.md
5 entertaining things you can find with the GitHub Search API
View 00-about-search-api-examples.md
View Build tensorflow on OSX with NVIDIA CUDA support.md

Build tensorflow on OSX with NVIDIA CUDA support (GPU acceleration)

These instructions are based on Mistobaan's gist but expanded and updated to work with the latest tensorflow OSX CUDA PR.

Requirements

OS X 10.10 (Yosemite) or newer

@thoo
thoo / multiclass_roc.ipynb
Created Mar 23, 2017 — forked from kathyxchen/multiclass_roc.ipynb
starting on an example for multiclass one-vs-one and one-vs-rest ROC AUC score approximations, issue#3298
View multiclass_roc.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@thoo
thoo / plot_roc.py
Created Mar 22, 2017 — forked from podshumok/plot_roc.py
Python pyplot receiver operating characteristic (ROC) curve with colorbar
View plot_roc.py
import numbers
import six
import numpy
import matplotlib.collections
from matplotlib import pyplot
# using example from
# http://nbviewer.ipython.org/github/dpsanders/matplotlib-examples/blob/master/colorline.ipynb
@thoo
thoo / README-Template.md
Created Mar 9, 2017 — forked from PurpleBooth/README-Template.md
A template to make good README.md
View README-Template.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@thoo
thoo / README-Template.md
Created Mar 9, 2017 — forked from PurpleBooth/README-Template.md
A template to make good README.md
View README-Template.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@thoo
thoo / pg_copy_from.py
Created Mar 7, 2017 — forked from jsheedy/pg_copy_from.py
benchmark for postgres inserts using copy_from and IteratorFile from https://gist.github.com/jsheedy/ed81cdf18190183b3b7d
View pg_copy_from.py
import time
import psycopg2
from iter_file import IteratorFile
conn = psycopg2.connect(host="localhost", database="test")
# args = [(1,2), (3,4), (5,6)]
args = [(i,i+1) for i in range(1,1*10**4,2)]
You can’t perform that action at this time.