- A graphical introduction to dynamic programming by Avik Das
- Dynamic programming deep-dive: Chain Matrix Multiplication by Avik Das
- Real-world dynamic programming: seam carving by Avik Das
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
################################################################################ | |
# sox cheat sheet | |
################################################################################ | |
# Example commands for the sox command-line audio processing tool, | |
# for manipulating or batch processing audio files. | |
################################################################################ | |
# Daniel Jones <[email protected]> | |
################################################################################ | |
################################################################################ |
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/env bash | |
firefoxbookmarks() { | |
mkdir -p /tmp/bookmark/ && \ | |
cp ~/.mozilla/firefox/0fkse04m.default/places.sqlite /tmp/bookmark && \ | |
sqlite3 -line /tmp/bookmark/places.sqlite 'select moz_places.url, moz_bookmarks.title from moz_bookmarks join moz_places on moz_bookmarks.fk = moz_places.id' && \ | |
rm /tmp/bookmark/places.sqlite | |
} |
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
import NaturalLanguage | |
let text = "All human beings are born free and equal in dignity and rights. They are endowed with reason and conscience and should act towards one another in a spirit of brotherhood." | |
let tokenizer = NLTokenizer(unit: .word) | |
tokenizer.string = text | |
//let tokenArray = tokenizer.tokens(for: strRange) | |
tokenizer.enumerateTokens(in: text.startIndex..<text.endIndex) { tokenRange, _ in | |
print(text[tokenRange]) | |
return true |
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
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters | |
from spell import * | |
updater = Updater(token="") | |
dispatcher = updater.dispatcher | |
import logging | |
logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', | |
level=logging.INFO) |
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
# L (x -- y) | |
# Natural logarithm of `x`. | |
# By Taylor series expansion of `ln(x)=ln((1+t)/(1-t))`. | |
# See https://en.wikipedia.org/wiki/Natural_logarithm#Numerical_value | |
[ 1-d2+/ | |
d2*Sk # Initialize multiplier | |
d*Sy # Initialize multiplier factor | |
0Ss # Initialize accumulator | |
10K^Sp # Initialize 10^k power | |
[ d1r/lk*ls+lsrdss # Update accumulator |