Skip to content

Instantly share code, notes, and snippets.

View TheButlah's full-sized avatar
🦀
Oxidize everything

Ryan Butler TheButlah

🦀
Oxidize everything
View GitHub Profile
@TheButlah
TheButlah / config
Created November 26, 2018 22:48
SSH config
Host gpu1
HostName gpu-server-1.cds.engineering.cornell.edu
User ryan
Host gpu1 master slave-1 slave-2 slave-3
User hduser1
ForwardAgent yes
ForwardX11 yes
ForwardX11Trusted yes
@TheButlah
TheButlah / config.py
Last active November 26, 2018 22:45
Config File for PtPython
"""
Configuration for ``ptpython``.
Copy this file to ~/.ptpython/config.py
"""
from __future__ import unicode_literals
from ptpython.layout import CompletionVisualisation
__all__ = (
@carlthome
carlthome / Signal reconstruction from spectrograms.ipynb
Created May 31, 2018 13:53
Try to recover audio from filtered magnitudes when phase information has been lost.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import battlecode as bc
import random
import sys
import traceback
print("pystarting")
# A GameController is the main type that you talk to the game with.
# Its constructor will connect to a running game.
gc = bc.GameController()
@dmnsgn
dmnsgn / WebGL-WebGPU-frameworks-libraries.md
Last active November 12, 2024 14:35
A collection of WebGL and WebGPU frameworks and libraries

A non-exhaustive list of WebGL and WebGPU frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are wip/outdated/not maintained anymore.

Engines and libraries ⚙️

Name Stars Last Commit Description
three.js ![GitHub
@copperlight
copperlight / .bashrc
Created August 11, 2016 16:27
Window Subsystem for Linux ssh-agent Configuraton
# ... more above ...
# wsfl bash is not a login shell
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
# ssh-agent configuration
if [ -z "$(pgrep ssh-agent)" ]; then
rm -rf /tmp/ssh-*
@bsilver8192
bsilver8192 / BUILD
Created March 17, 2016 16:12
Basics of generating a compile_commands.json file with Bazel
py_binary(
name = 'generate_compile_command',
srcs = [
'generate_compile_command.py',
],
deps = [
'//third_party/bazel:extra_actions_proto_py',
],
)
@kukuruza
kukuruza / gist_cifar10_train.py
Last active November 4, 2024 17:36
Tensorflow: visualize convolutional filters (conv1) in Cifar10 model
from math import sqrt
def put_kernels_on_grid (kernel, pad = 1):
'''Visualize conv. filters as an image (mostly for the 1st layer).
Arranges filters into a grid, with some paddings between adjacent filters.
Args:
kernel: tensor of shape [Y, X, NumChannels, NumKernels]
pad: number of black pixels around each filter (between them)
@d-schmidt
d-schmidt / redirectExample.go
Last active March 12, 2024 08:04
How to redirect HTTP to HTTPS with a golang webserver.
package main
import (
"net/http"
"log"
)
func redirect(w http.ResponseWriter, req *http.Request) {
// remove/add not default ports from req.Host
target := "https://" + req.Host + req.URL.Path
if len(req.URL.RawQuery) > 0 {
@dlivingstone
dlivingstone / main.cpp
Created November 7, 2011 21:42
OpenGL with GLM & SDL: A simple program to demonstrate modern OpenGL programming (compatible with OpenGL 3.0 and later) CC-BY-SA Daniel Livingstone
#include <iostream>
#include <fstream>
// Windows specific: Uncomment the following line to open a console window for debug output
#if _DEBUG
#pragma comment(linker, "/subsystem:\"console\" /entry:\"WinMainCRTStartup\"")
#endif
// Simple OpenGL GLM/SDL demo
// Renders a rotating pyramid, showing 3 of 4 sides (allowing back faces to be seen)