This file contains hidden or 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
<html> | |
<head> | |
<title> | |
Handwritten asm.js Sudoku Solver | |
</title> | |
</head> | |
<body> | |
<textarea id="grid-entry" cols="18" rows="9">5 3 - - 7 - - - - | |
6 - - 1 9 5 - - - | |
- 9 8 - - - - 6 - |
This file contains hidden or 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
#!/bin/bash | |
set -e | |
find "$1" -iname '*.mkv' -o -iname '*.mp4' | while read line; do | |
if avprobe "$line" -v quiet -show_streams 2>/dev/null | grep -q "pix_fmt=yuv420p10le"; then | |
echo -n "Transcoding $line ... " | |
x264 --preset veryfast --tune animation --crf 18 -o "$line.8bit" "$line" | |
echo rm "$line" | |
echo mv "$line.8bit" "$line" |
This file contains hidden or 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/python3 | |
import re | |
from math import sqrt | |
import urllib.request | |
# Thanks to http://possiblywrong.wordpress.com/2011/06/05/reddits-comment-ranking-algorithm/ | |
def confidence_fixed(ups, downs): | |
if ups == 0: | |
return -downs | |
n = ups + downs |