Skip to content

Instantly share code, notes, and snippets.

View rueberger's full-sized avatar

Andrew Berger rueberger

View GitHub Profile
@rueberger
rueberger / juju models
Created December 12, 2017 18:19
System info
Controller: conjure-up-localhost-e8a
Model Cloud/Region Status Machines Access Last connection
conjure-canonical-kubern-75b localhost/localhost available 12 admin 2017-12-10
conjure-canonical-kubern-ee0* localhost/localhost available 12 admin 17 hours ago
controller localhost/localhost available 1 admin just now
@rueberger
rueberger / keybase.md
Created November 22, 2017 06:51
ownership proof

Keybase proof

I hereby claim:

  • I am rueberger on github.
  • I am rueberger (https://keybase.io/rueberger) on keybase.
  • I have a public key ASBO3HNq5_afMicR98MdxaEZ7sby0vVooTfsyrfZCiUw4wo

To claim this, I am signing this object:

@rueberger
rueberger / preprocessor_base.py
Created August 23, 2017 17:26
Draft of skeleton/desiderata for reproducible data pipeline
""" This module contains the Preprocessor abstract class
"""
from abc import ABC, abstractmethod
class Preprocessor(ABC):
""" Abstract interface for preprocessors
"""
[D 2017-07-27 22:25:38.734 JupyterHub app:740] Generating new cookie_secret
[I 2017-07-27 22:25:38.735 JupyterHub app:745] Writing cookie_secret to /srv/jupyterhub/jupyterhub_cookie_secret
[D 2017-07-27 22:25:38.735 JupyterHub app:796] Connecting to db: sqlite:///jupyterhub.sqlite
[W 2017-07-27 22:25:38.823 JupyterHub app:365]
Generating CONFIGPROXY_AUTH_TOKEN. Restarting the Hub will require restarting the proxy.
Set CONFIGPROXY_AUTH_TOKEN env or JupyterHub.proxy_auth_token config to avoid this message.
[W 2017-07-27 22:25:38.838 JupyterHub app:864] No admin users, admin interface will be unavailable.
[W 2017-07-27 22:25:38.838 JupyterHub app:865] Add any administrative users to `c.Authenticator.admin_users` in config.
[I 2017-07-27 22:25:38.838 JupyterHub app:892] Not using whitelist. Any authenticated user will be allowed.
'alembic (0.9.3)
asn1crypto (0.22.0)
backports.weakref (1.0rc1)
bkcharts (0.2)
bleach (1.5.0)
bokeh (0.12.6)
certifi (2017.4.17)
cffi (1.10.0)
chardet (3.0.2)
conda (4.3.22)
@rueberger
rueberger / show_img.py
Created June 6, 2017 20:49
render array as image in jupyter - python 3
import PIL.Image
from io import BytesIO
import IPython.display
import numpy as np
def showarray(a, fmt='png'):
a = np.uint8(((a - np.min(a)) / np.max(a)) * 255)
f = BytesIO()
PIL.Image.fromarray(a).save(f, fmt)
IPython.display.display(IPython.display.Image(data=f.getvalue()))
@rueberger
rueberger / parse_nvidia_smi.py
Created April 20, 2017 21:40
Simple script that parses and returns the output of nvidia-smi
import commands
import numpy as np
def fetch_gpu_status():
""" Run nvidia-smi and parse the output
requires Python 2 only dependency
"""
status_code, output = commands.getstatusoutput('nvidia-smi')
@rueberger
rueberger / ipp_gpu.py
Last active June 3, 2020 07:07
A quick way to distribute embarrassingly parallel things with ipyparallel on multiple gpus (or other things)
WS_N_GPUS = {
'turagas-ws1': 2,
'turagas-ws2': 2,
'turagas-ws3': 2,
'turagas-ws4': 2,
'c04u01': 8,
'c04u07': 8,
'c04u12': 8,
'c04u17': 8,
}
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
@rueberger
rueberger / Project ideas
Last active January 20, 2018 22:31
VS265 project ideas
I'm an undergrad in Physics interested in theoretical neuroscience and machine learning.
Some project ideas:
-Biology inspired music compression with Minimum Probability Flow learning and hopfield networks.
Image compression has been achieved with these techniques; adapting the
technique to music compression by mirroring the signal processing of the cochlea would be interesting.
Teammates with strong EECS backgrounds would be desired for this project.
I'd also be interested in using Minimum Probability Flow learning in other ways. It's a really efficient