Skip to content

Instantly share code, notes, and snippets.

View doc22940's full-sized avatar

Acampbell doc22940

View GitHub Profile
@doc22940
doc22940 / FileTransfer.py
Created January 15, 2020 09:06 — forked from omz/FileTransfer.py
File Transfer script for Pythonista (iOS)
# File Transfer for Pythonista
# ============================
# This script allows you to transfer Python files from
# and to Pythonista via local Wifi.
# It starts a basic HTTP server that you can access
# as a web page from your browser.
# When you upload a file that already exists, it is
# renamed automatically.
# From Pythonista's settings, you can add this script
# to the actions menu of the editor for quick access.
@doc22940
doc22940 / machine.js
Created February 21, 2020 01:19
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@doc22940
doc22940 / GLSL-Noise.md
Created February 25, 2020 12:35 — forked from patriciogonzalezvivo/GLSL-Noise.md
GLSL Noise Algorithms

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
	return mix(rand(fl), rand(fl + 1.0), fc);
}
@doc22940
doc22940 / convert.py
Created February 25, 2020 12:50 — forked from kylemcdonald/convert.py
Scrape ShaderToy. Instead of running this, consider downloading the files from here: https://goo.gl/MWGvkL Or if you want to do more work with ShaderToy data, consider using their API https://www.shadertoy.com/api
# !/usr/bin/env python
import os, re, argparse, json
parser = argparse.ArgumentParser(
description='Extract code from ShaderToy json.')
parser.add_argument('input')
parser.add_argument('output')
args = parser.parse_args()
@doc22940
doc22940 / Earth Mover's Distance.ipynb
Created February 25, 2020 13:00 — forked from kylemcdonald/Earth Mover's Distance.ipynb
Faster 1d Earth Mover's Distance with numpy and numba.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@doc22940
doc22940 / understanding-word-vectors.ipynb
Created February 25, 2020 13:03 — forked from aparrish/understanding-word-vectors.ipynb
Understanding word vectors: A tutorial for "Reading and Writing Electronic Text," a class I teach at ITP. (Python 2.7) Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@doc22940
doc22940 / remote-jupyter-notebook.md
Created February 25, 2020 13:05 — forked from AdamGagorik/remote-jupyter-notebook.md
Remote Jupyter Notebook

Description

Use these commands to run a jupyter server on a remote server and access it locally in a browser. You must have SSH access to the browser. Use any port you want.

Do not forget to change username@server to the correct value!

TLDR

where using command
@doc22940
doc22940 / pytorch-glumpy.md
Created February 25, 2020 13:08 — forked from victor-shepardson/pytorch-glumpy.md
using pycuda and glumpy to draw pytorch GPU tensors to the screen without copying to host memory