This is a set of things I suggest you do on a new Ubuntu machine to make it nice and (almost) Mac-like.
sudo apt install -y xclip
sudo apt install -y caffeine
sudo apt install -y gnome-tweaks
letters = 'abcdefghijklmnopqrstuvwxyz' | |
with open('/usr/share/dict/words', 'rt') as in_file: | |
words = [x.strip() for x in in_file.readlines()] | |
counts = {} | |
starts = {} | |
total = 0 | |
for letter in letters: | |
counts[letter] = len([x for x in words if x.endswith(letter)]) |
""" | |
Generate points for a dodecahedron by solving an | |
optimization problem. | |
Gradient descent doesn't always converge to the global | |
minimum, so I run it repeatedly and keep printing the | |
solutions it comes up with if they're better than the | |
previous solution. | |
""" |
""" | |
Get 99% accuracy on MNIST with a norm-activated network. | |
Test set: Average loss: 0.0395, Accuracy: 9880/10000 (99%) | |
Based on: https://github.com/pytorch/examples/blob/master/mnist/main.py | |
""" | |
import argparse | |
import torch |
// Solve this logic puzzle: | |
// https://xmonader.github.io/prolog/2018/12/21/solving-murder-prolog.html | |
package main | |
import ( | |
"fmt" | |
"github.com/unixpickle/approb" | |
) |
""" | |
Histogram actors by birthday and astrological sign. | |
""" | |
import datetime | |
import re | |
import requests | |
function(canvas, video) { | |
function setupAudioLevel() { | |
window.HACK_VOLUME_LEVEL = 0.0; | |
navigator.mediaDevices.getUserMedia({ audio: true, video: false }).then((stream) => { | |
const ctx = new AudioContext(); | |
const source = ctx.createMediaStreamSource(stream); | |
const node = ctx.createScriptProcessor(4096, 1, 1); | |
node.onaudioprocess = (event) => { | |
const buffer = event.inputBuffer.getChannelData(0); | |
let sum = 0; |
function(canvas, video) { | |
function setupAudioLevel() { | |
window.HACK_VOLUME_LEVEL = 0.0; | |
navigator.mediaDevices.getUserMedia({ audio: true, video: false }).then((stream) => { | |
const ctx = new AudioContext(); | |
const source = ctx.createMediaStreamSource(stream); | |
const node = ctx.createScriptProcessor(4096, 1, 1); | |
node.onaudioprocess = (event) => { | |
const buffer = event.inputBuffer.getChannelData(0); | |
let sum = 0; |