Random quotes using Game of Thrones Quotes
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
//http://stackoverflow.com/questions/872310/javascript-swap-array-elements | |
Array.prototype.swap = function (x,y) { | |
var b = this[x]; | |
this[x] = this[y]; | |
this[y] = b; | |
return this; | |
} | |
//https://en.wikipedia.org/wiki/Heap's_algorithm |
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
function RNAtoProtein(str){ | |
var protein = []; | |
var codons = str.match(/.{3}/g); //http://stackoverflow.com/questions/6259515/javascript-elegant-way-to-split-string-into-segments-n-characters-long | |
var codonDict = {"UUU": "F", | |
"CUU": "L", | |
"AUU": "I", | |
"GUU": "V", | |
"UUC": "F", | |
"CUC": "L", | |
"AUC": "I", |
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
function proteinMass(protein){ | |
var aminoWeightDict = | |
{ | |
"A":71.03711, | |
"C":103.00919, | |
"D":115.02694, | |
"E":129.04259, | |
"F":147.06841, | |
"G":57.02146, | |
"H":137.05891, |
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
//http://stackoverflow.com/questions/149055/how-can-i-format-numbers-as-money-in-javascript | |
function formatPrice(aPrice){ | |
var n = aPrice; | |
var i = String(parseInt(n = Math.abs(Number(n) || 0).toFixed(2))); | |
var j = (j = i.length) > 3 ? j % 3 : 0; | |
return (j ? i.substr(0, j) + "." : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + ".") + (2 ? "," + Math.abs(n - i).toFixed(2).slice(2) : ""); | |
} |
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
// Run this in the F12 javascript console in chrome | |
// if a redirect happens, the page will pause | |
// this helps because chrome's network tab's | |
// "preserve log" seems to technically preserve the log | |
// but you can't actually LOOK at it... | |
// also the "replay xhr" feature does not work after reload | |
// even if you "preserve log". | |
window.addEventListener("beforeunload", function() { debugger; }, false) |
- General Background and Overview
- Probabilistic Data Structures for Web Analytics and Data Mining : A great overview of the space of probabilistic data structures and how they are used in approximation algorithm implementation.
- Models and Issues in Data Stream Systems
- Philippe Flajolet’s contribution to streaming algorithms : A presentation by Jérémie Lumbroso that visits some of the hostorical perspectives and how it all began with Flajolet
- Approximate Frequency Counts over Data Streams by Gurmeet Singh Manku & Rajeev Motwani : One of the early papers on the subject.
- [Methods for Finding Frequent Items in Data Streams](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.187.9800&rep
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
Traceback (most recent call last): | |
File "/Users/polveira/Projects/dvc/dvc/command/status.py", line 54, in do_run | |
with_deps=self.args.with_deps, | |
File "/Users/polveira/Projects/dvc/dvc/repo/status.py", line 88, in status | |
all_tags=all_tags, | |
File "/Users/polveira/Projects/dvc/dvc/repo/status.py", line 52, in _cloud_status | |
used, jobs, remote=remote, show_checksums=show_checksums | |
File "/Users/polveira/Projects/dvc/dvc/data_cloud.py", line 167, in status | |
targets, jobs=jobs, remote=cloud, show_checksums=show_checksums | |
File "/Users/polveira/Projects/dvc/dvc/remote/local.py", line 604, in status |
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
Modify iodev/hdimage/cdrom_osx.cc:194 for line: if ((devname = (char *) strrchr(devpath, '/')) != NULL) { | |
brew install sdl pkg-config | |
./configure --with-sdl | |
change Makefile: prefix = ~/bochs | |
do mkdir ~/bochs before doing make install |