Skip to content

Instantly share code, notes, and snippets.

View korymath's full-sized avatar

Kory korymath

View GitHub Profile
@korymath
korymath / old connect function
Created December 8, 2019 21:49
This is the old connect function.
// async function connect() {
// window.museClient = new MuseClient();
// setStatus(generalTranslations.connecting);
// try {
// await window.museClient.connect();
// await window.museClient.start();
// setStatus(generalTranslations.connected);
// if (window.museClient && window.museClient.eegReadings) {
function [current_error] = average_data_distance_error(n_groups, memberships, distances)
% Calculate average distance between data in clusters.
sum_error = 0;
for i_group = 1:n_groups
% indices of datapoints belonging to group i_group
i = find(memberships == i_group);
% cell array with N vectors to combine
elements = {i, i};
@korymath
korymath / readmecats.md
Created May 13, 2019 16:19 — forked from dannguyen/catdrawer-youtube-to-gif-README.md
Using youtube-dl and gifify from the command-line
@korymath
korymath / gist:1c1c4a8a7aabce4b1882cbfc7906b079
Created June 1, 2018 19:51 — forked from guisehn/gist:6648c8fdcd1102a22a22
Backup Heroku Postgres database and restore to local database

Grab new backup

Command: heroku pg:backups capture -a [app_name]

Download

Command: curl -o latest.dump `heroku pg:backups public-url -a [app_name]`

Restore backup dump into local db

@korymath
korymath / safari-night.sh
Created April 30, 2018 15:40 — forked from duncdrum/safari-night.sh
dark theme for Texshop
# Safari Reader Night Theme
# by @LogicaEns
# background = 39 40 34 (#272822)
defaults write TeXShop background_R 0.05
defaults write TeXShop background_G 0.06
defaults write TeXShop background_B 0.03
# commands = 102 217 239 (#66D9EF)
defaults write TeXShop commandred 0.3
import random
import itertools
import numpy as np
from tqdm import tqdm
# 0) define the starting set
num_students = 20
student_ids = np.arange(num_students)
all_combinations = list(itertools.combinations(student_ids, 2))
#!/bin/bash
# Exit on error #
set -e
# Clean up #
rm -rf ~/programs/libevent
rm -rf ~/programs/ncurses
rm -rf ~/programs/tmux
# Variable version #
python train.py --data_dir data/TAL --rnn_size 1024 --num_layers=3 --batch_size=128 --seq_length=256 --input_keep_prob 0.8 --output_keep_prob 0.5
@korymath
korymath / nao_ec2.sh
Created March 16, 2017 18:06
Running NAO simulations on EC2
# The people who are crazy enough to think they can change the world are the ones who do
https://krb-sjobs.brassring.com/TGnewUI/Search/home/HomeWithPreLoad?PageType=JobDetails&jobid=74414&partnerid=26059&siteid=5016&type=mail