#A Collection of NLP notes
##N-grams
###Calculating unigram probabilities:
P( wi ) = count ( wi ) ) / count ( total number of words )
In english..
[user] | |
name = Pavan Kumar Sunkara | |
email = pavan.sss1991@gmail.com | |
username = pksunkara | |
[init] | |
defaultBranch = master | |
[core] | |
editor = nvim | |
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol | |
pager = delta |
import Control.Monad | |
import Data.Char | |
import System.IO | |
import Network | |
import Data.Time.LocalTime | |
data RequestType = GET | POST deriving (Show) | |
data Request = Request { rtype :: RequestType, path :: String, options :: [(String,String)] } | |
data Response = Response { version :: String, statuscode :: Int } |
Select all and delete (actually move to buffer) | |
:%d | |
Select all and copy to buffer | |
:%y | |
Use p to paste the buffer. |
#A Collection of NLP notes
##N-grams
###Calculating unigram probabilities:
P( wi ) = count ( wi ) ) / count ( total number of words )
In english..
package main | |
import ( | |
"log" | |
"net/http" | |
) | |
func redirect(w http.ResponseWriter, r *http.Request) { | |
http.Redirect(w, r, "http://www.google.com", 301) |
docker ps | awk {' print $1 '} | tail -n+2 > tmp.txt; for line in $(cat tmp.txt); do docker kill $line; done; rm tmp.txt |
var Promise = function(wrappedFn, wrappedThis) { | |
this.then = function(wrappedFn, wrappedThis) { | |
this.next = new Promise(wrappedFn, wrappedThis); | |
return this.next; | |
}; | |
this.run = function() { | |
wrappedFn.promise = this; | |
wrappedFn.apply(wrappedThis); | |
}; |
package com.github.masahitojp; | |
import org.jivesoftware.smack.*; | |
import org.jivesoftware.smack.tcp.XMPPTCPConnection; | |
import org.jivesoftware.smack.tcp.XMPPTCPConnectionConfiguration; | |
import org.jivesoftware.smackx.muc.MultiUserChat; | |
import org.jivesoftware.smackx.muc.MultiUserChatManager; | |
import java.io.IOException; |
package main | |
import ( | |
"context" | |
"flag" | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
"os/signal" |