Skip to content

Instantly share code, notes, and snippets.

View charlesreid1's full-sized avatar

Chaz Reid charlesreid1

View GitHub Profile
N=10000;
d=1e-6; %Diameter of particle
mu=1e-3; %viscosity of water
T=293; %temprature
KB=1.38e-23; %Boltzman const
pi=3.1415;
% drag Coeff -strength of random force exerting on particl
g=3*pi*mu*d; %Drag coef
disp (g);
tt=1000; % Maximum time
# order list alphanumerically
# test with "bespin" theme only for now
# add others when things are working
# see https://github.com/chriskempson/base16-schemes-source/blob/master/list.yaml
#
unclaimed: https://github.com/chriskempson/base16-unclaimed-schemes
@charlesreid1
charlesreid1 / pubwatcher.py
Created November 28, 2017 12:48 — forked from minrk/pubwatcher.py
Watch IOPub traffic from IPython engines
import os
import sys
import json
import zmq
from IPython.zmq.session import Session
from IPython.parallel.util import disambiguate_url
from IPython.utils.path import get_ipython_dir
def main(connection_file):
@charlesreid1
charlesreid1 / pims_pip_output
Last active November 13, 2017 19:58
Comparing simple test
(testenv) root@ae3529a7c667:/# python pimstest.py
(testenv) root@ae3529a7c667:/#
@charlesreid1
charlesreid1 / diff
Last active November 13, 2017 09:26
Difference between trackpy gold standard from v0.3.1 and v0.3.2
2,1843c2,1882
< 0,512.0071477195371,4.273995915588836,278.235303351588,2.353972064243239,0.12516142050543072,10.796060102818595,6474.0,0.10214914058912275,0,0
< 250,24.98458510987209,279.64545752705806,288.7472566095956,2.3530612706411356,0.10643695966985917,11.743082918855315,6550.0,0.08385554779595847,0,1
< 249,4.898809523809524,280.1579131652661,270.4697162600869,2.3853251162816664,0.047452256482122056,10.322548694800236,6579.0,0.07849174640937663,0,2
< 248,289.0549597855228,278.4621313672922,282.59160830535694,2.186894305267831,0.15954627644392788,16.194090154227894,6438.0,0.11392144854080957,0,3
< 247,46.67976164202163,277.12271021849483,429.09603794623735,2.516202187736437,0.03472796038281141,14.868258211776487,6715.0,0.06037953231533099,0,4
< 246,190.05354227881162,275.36238981390795,290.073088552047,2.438535979063745,0.06413777002817747,10.796060102818595,6484.0,0.09929879452619292,0,5
< 245,335.90923781308913,273.65634258012386,351.62957159443374,2.2181704391134236,0.04635704635782087,19.035158602338
@charlesreid1
charlesreid1 / imread
Created November 9, 2017 21:15
Results from using different imread() functions
In [1]: from skimage.io import imread as skimage_imread
In [2]: from matplotlib.pyplot import imread as plt_imread
In [3]: from scipy.ndimage import imread as scipy_imread
In [4]: skimage_imread('bulk_water_000.png')
Out[4]:
array([[[146, 125, 54, 255],
[146, 125, 54, 255],
@charlesreid1
charlesreid1 / README.md
Last active October 27, 2017 08:40
Simple Face Detection Algorithm with OpenCV 2.4, Python 2.7 on Mac OS X

Simple OpenCV Face Detection Example

Start by running install_opencv.sh to install the correct versions of everything on the Mac.

Then run prepare_example.sh to download materials needed for the facial detection algorithm.

Finally, run python2 facial_detection.py to detect faces and output the bounding box for any faces detected in the image.

Related repositories:

@charlesreid1
charlesreid1 / doit.sh
Last active May 27, 2024 17:06
Download the Large-scale CelebFaces Attributes (CelebA) Dataset from their Google Drive link
#!/bin/bash
#
# Download the Large-scale CelebFaces Attributes (CelebA) Dataset
# from their Google Drive link.
#
# CelebA: http://mmlab.ie.cuhk.edu.hk/projects/CelebA.html
#
# Google Drive: https://drive.google.com/drive/folders/0B7EVK8r0v71pWEZsZE9oNnFzTm8
python3 get_drive_file.py 0B7EVK8r0v71pZjFTYXZWM3FlRnM celebA.zip
@charlesreid1
charlesreid1 / indexable_dataset_example.py
Last active October 14, 2017 22:21
Example usage of Dataset objects for Fuel library. https://github.com/mila-udem/fuel
from fuel.datasets import IndexableDataset
from collections import OrderedDict
import numpy
seed = 1234
rng = numpy.random.RandomState(seed)
# Make some fake data
features = rng.randint(256, size=(8, 2, 2))
targets = rng.randint(4, size=(8, 1))
@charlesreid1
charlesreid1 / ghost.py
Created August 14, 2017 20:16
Python Keyboard Module Demo
import keyboard
import time
# Written for Mac OS X.
# 0x24 = Enter on Mac keyboards
keyboard.write("i")
time.sleep(3)
keyboard.write("Wake up Neo...",delay=0.2)
keyboard.press(0x24)