Skip to content

Instantly share code, notes, and snippets.

View rhema's full-sized avatar

Rhema Linder rhema

View GitHub Profile
@dapurv5
dapurv5 / SpMatrixMult.java
Created May 18, 2013 02:29
Sparse Matrix Multiplication in Map Reduce
/**
* Copyright (c) 2013 Apurv Verma
*/
package org.anahata.hadoop.illustrations;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import org.anahata.commons.hadoop.io.IntInt;
@rcmiller
rcmiller / gdoc2latex.py
Last active December 19, 2015 12:59
This gist has been superseded by a repo: https://github.com/uid/gdoc-downloader
// see new code at https://github.com/uid/gdoc-downloader
@despens
despens / geo-torrent-checksums.pl
Created April 2, 2012 12:50
Automatic completion of geocities.archiveteam.torrent
#!/usr/bin/perl
our $VERSION = 1.00;
=pod
This script compares checksums of local files belonging to the Archive Team's
Geocities Torrent with checksums published on archive.org. It can generate
shell scripts that complete an aborted torrent download by getting
missing/broken parts from archive.org
@pwalsh
pwalsh / pyo on Mac OS X
Last active April 24, 2016 05:23
A short gist explaining how to compile pyo - the powerful Audio/DSP library for Python, on Mac OS X. The instructions are specifically for installing pyo with a brewed Python install - not with Mac OS X system Python.
# using brew installed Python
brew install portaudio portmidi libsndfile liblo jack
brew link portaudio portmidi libsndfile liblo
cd ~/Sites/tmp
svn checkout http://pyo.googlecode.com/svn/trunk/ pyo-read-only
@twasink
twasink / HadoopMain.java
Created February 4, 2014 22:27
Example Hadoop Job that reads a cache file loaded from S3
// Based on http://pragmaticintegrator.wordpress.com/2013/08/16/writing-a-hadoop-mapreduce-task-in-java/
package net.twasink.hadoop;
import java.io.File;
import java.net.URI;
import org.apache.commons.io.FileUtils;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.LongWritable;

Tone.js

What is it?

Tone.js is a Web Audio library which wraps and (hopefully) simplifies some of the Web Audio API.

The focus of Tone is on making interactive music:

* Musical timing - `"4n"`, `"8n"`, `"1:4:2"`, `"2m + 4t"`
* Musical notation - `"C4"`, `"Db4"`, `440`, `"440hz"`
@ksopyla
ksopyla / ubuntu16_tensorflow_cuda8.sh
Last active March 7, 2021 16:31
How to set up tensorflow with CUDA 8 cuDNN 5.1 in virtualenv with Python 3.5 on Ubuntu 16.04 http://ksopyla.com/2017/02/tensorflow-gpu-virtualenv-python3/
# This is shorthened version of blog post
# http://ksopyla.com/2017/02/tensorflow-gpu-virtualenv-python3/
# update packages
sudo apt-get update
sudo apt-get upgrade
#Add the ppa repo for NVIDIA graphics driver
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
@avandeursen
avandeursen / LICENSE.md
Last active May 16, 2021 20:21
Reviewing for Elsevier

This little note is licensed under a Creative Commons CC0 License, meaning "No Rights Reserved". So you can reuse this note in whatever way you want, and there is no need to attribute me. Enjoy! :-)

@kinoc
kinoc / jserv_hf_fast.py
Created June 21, 2021 10:54
Run HuggingFace converted GPT-J-6B checkpoint using FastAPI and Ngrok on local GPU (3090 or Titan)
# So you want to run GPT-J-6B using HuggingFace+FastAPI on a local rig (3090 or TITAN) ... tricky.
# special help from the Kolob Colab server https://colab.research.google.com/drive/1VFh5DOkCJjWIrQ6eB82lxGKKPgXmsO5D?usp=sharing#scrollTo=iCHgJvfL4alW
# Conversion to HF format (12.6GB tar image) found at https://drive.google.com/u/0/uc?id=1NXP75l1Xa5s9K18yf3qLoZcR6p4Wced1&export=download
# Uses GDOWN to get the image
# You will need 26 GB of space, 12+GB for the tar and 12+GB expanded (you can nuke the tar after expansion)
# Near Simplest Language model API, with room to expand!
# runs GPT-J-6B on 3090 and TITAN and servers it using FastAPI
# change "seq" (which is the context size) to adjust footprint
@pwalsh
pwalsh / install-python-pyo-on-raspberry-pi.md
Last active September 4, 2023 20:48
Install Python PYO on Raspberry Pi (Raspian Debian Wheezy)

How to install Python PYO on Raspberry Pi (Raspian Debian Wheezy)

An old version of PYO is installable via apt-get on Raspian. But, we want the latest, don't we...

Dependencies

sudo apt-get install python-dev libjack-jackd2-dev libportmidi-dev portaudio19-dev liblo-dev libsndfile-dev python-dev python-tk python-imaging-tk python-wxgtk2.8