#A Collection of NLP notes
##N-grams
###Calculating unigram probabilities:
P( wi ) = count ( wi ) ) / count ( total number of words )
In english..
#A Collection of NLP notes
##N-grams
###Calculating unigram probabilities:
P( wi ) = count ( wi ) ) / count ( total number of words )
In english..
[ Languages: English, Español, 日本語, 한국어, Português, Русский, Slovenščina, Українська, 中文 ]
function quickSort (arr) { | |
if (!arr.length) | |
return arr | |
var pivot = arr.splice(0, 1) | |
var less = [] | |
var greater = [] | |
arr.forEach(function (el) { | |
if (el <= pivot) |
%{ | |
Problem 7 (i): modexp function | |
Returns x ^ y mod n for x, y, and n > 1. | |
%} | |
function result = modexp (x, y, n) | |
%anything raised to 0th power = 1 so return 1 | |
if (y == 0) | |
result = 1; | |
return; | |
end |
http://localhost
as a redirect API in your API client's settingshttps://www.instagram.com/oauth/authorize/?client_id=<CLIENT_ID>&redirect_uri=http://localhost&response_type=token
http://localhost
ffmpeg -i in.mov -s 600x400 -pix_fmt rgb24 -r 10 -f gif - > out.gif |
var MAX_PHOTOS = 40; | |
var MIN_NUM_LIKES = 40; | |
var currIndex = 1; | |
var numDownloaded = 0; | |
var previewOpened = function (imgIndex) { | |
return !!($('._tf9x3').text() && $('img._icyx7').get(imgIndex-1)) | |
} |
var script = document.createElement('script'); | |
script.src = 'https://code.jquery.com/jquery.min.js'; | |
script.type = 'text/javascript'; | |
document.getElementsByTagName('head')[0].appendChild(script); |
curl -XPOST 'http://localhost:9200/fuzzytest/' -d ' | |
{ | |
settings: { | |
index: { | |
analysis: { | |
analyzer: { | |
default: { | |
type: "custom", | |
tokenizer: "uax_url_email", | |
filter: [ "lowercase" ] |
%{ | |
Problem 7 (ii) - Extended Euclid | |
Input: positive integers a,b with a >= b >= 0 | |
Output: integer array [ x,y,d ] such that | |
d = gcd(a,b) and ax + by = d | |
%} | |
function result = extended_Euclid (a, b) | |
if (b == 0) |