Skip to content

Instantly share code, notes, and snippets.

View tap222's full-sized avatar
💭
Tech Lead Capgemini R and D

Tapas tap222

💭
Tech Lead Capgemini R and D
View GitHub Profile
@tap222
tap222 / gist:f7178ff63fc02af34cd3b0430e30581f
Created May 7, 2017 20:34 — forked from ttezel/gist:4138642
Natural Language Processing Notes

#A Collection of NLP notes

##N-grams

###Calculating unigram probabilities:

P( wi ) = count ( wi ) ) / count ( total number of words )

In english..

# Thanking everyone who wished me on my birthday
import requests
import json
AFTER = 123456
TOKEN = ' <insert token here> '
def get_posts():
"""Returns dictionary of id, first names of people who posted on my wall
rm(list = ls())
gc()
dir()
suppressMessages(library(lubridate))
suppressMessages(library(caret))
suppressMessages(library(gbm))
suppressPackageStartupMessages(library(data.table))
suppressPackageStartupMessages(library(h2o))
@tap222
tap222 / facebook_spammer.py
Created April 22, 2017 10:26
Facebook Spammer
import fb #To install this package run: sudo pip install fb
from facepy import GraphAPI #To install this package run: sudo pip install facepy
import time
token=""#Insert access token here.
facebook=fb.graph.api(token)
graph1 = GraphAPI(token)