[ Launch: Tributary inlet ] 6843559 by hyponymous
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<head> | |
<meta charset="utf-8"> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.15/lodash.min.js"> </script> | |
<script src="https://d3js.org/d3.v5.min.js"></script> | |
<style type="text/css"> | |
.timeline { | |
pointer-events: all; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import itertools | |
import numpy as np | |
N = 1000 | |
d = 500 | |
x_normal = np.random.multivariate_normal([0], [[1]], [N, d]).reshape([N, d]) | |
x_spherical = x_normal / np.linalg.norm(x_normal, axis=1)[:, np.newaxis] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import copy | |
# fun from Ernest! | |
# | |
# Given two strings s and t, determine whether some anagram of t is a substring of s. | |
# For example: if s = "udacity" and t = "ad", then the function returns True. | |
# Your function definition should look like: question1(s, t) and return a boolean True or False. | |
def q_mike(s, t): | |
def add_to_hist(c, hist): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* global d3, _ */ | |
var CONFIG = { | |
transitionDuration: 0, | |
stepDelay: 10, | |
// learning rate | |
alpha: 0.1, | |
// deviation from greediness | |
epsilon: 1e-2, | |
// reward discount factor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
file=$(pbpaste); git diff -b -M :1:$file :2:$file >~/tmp/left.diff; git diff -b -M :1:$file :3:$file >~/tmp/right.diff; vim -O ~/tmp/left.diff ~/tmp/right.diff # ;three-way |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vim +/"^[<>|=]\{7}" $(git status -sb | grep "^UU" | cut -d' ' -f 2) # ;edit-conflicted |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
head -c 15 </dev/random | python3 -c "import sys, base64; sys.stdout.write('{}\n'.format(base64.b85encode(sys.stdin.buffer.read()).decode('utf-8')))" # ;b85-pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# File: wason.py | |
# Author: Michael David Plotz | |
# Date: Thu Jan 9 23:15:20 PST 2014 | |
# | |
import re | |
def is_num(arg): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# File: extract.py | |
# Author: Michael David Plotz | |
# Date: Fri Dec 20 21:01:41 PST 2013 | |
# | |
# Extract images and labels from MNIST database (http://yann.lecun.com/exdb/mnist/) | |
# | |
import argparse |
NewerOlder