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
const num_days = 16_000_000; | |
const num_participants = 100_000; | |
const samples = 100_000; | |
let collisions = 0; | |
const percentageFormatter = new Intl.NumberFormat('en-US', { | |
style: 'percent', | |
maximumFractionDigits: 3, | |
}); |
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 | |
# This script takes any (high resolution) video file as input and converts it to WebM (VP8 & Vorbis) and MP4 (H264 & AAC) for HTML5 <video>. For each format, it creates a high quality (`-hq`) and a low quality (`-lq`) version. | |
# ffmpeg has to be installed, see http://docs.sublimevideo.net/encode-videos-for-the-web for more instructions. | |
# Usage: videoToWeb.sh <inputfile> | |
# This is heavily inspired by | |
# - https://github.com/kornl/video-conversion/blob/master/convert_video_for_html_5.sh | |
# - https://github.com/mickro/video2html5/blob/master/video2html5.sh | |
# - http://diveintohtml5.info/video.html#webm-cli |