Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am abuadan on github.
  • I am abu_adan (https://keybase.io/abu_adan) on keybase.
  • I have a public key ASCvWzemGjw3d76P5aFXoQV1s6uZd1kaZM7fAYCa0jFUFwo

To claim this, I am signing this object:

@abuadan
abuadan / sentiment.py
Created March 1, 2018 16:04 — forked from bbengfort/sentiment.py
An end-to-end demonstration of a Scikit-Learn SVM classifier trained on the positive and negative movie reviews corpus in NLTK.
import os
import time
import string
import pickle
from operator import itemgetter
from nltk.corpus import stopwords as sw
from nltk.corpus import wordnet as wn
from nltk import wordpunct_tokenize
@abuadan
abuadan / Liberal Regex Pattern for All URLs
Created October 22, 2017 12:26 — forked from gruber/Liberal Regex Pattern for All URLs
Liberal, Accurate Regex Pattern for Matching All URLs
The regex patterns in this gist are intended to match any URLs,
including "mailto:[email protected]", "x-whatever://foo", etc. For a
pattern that attempts only to match web URLs (http, https), see:
https://gist.github.com/gruber/8891611
# Single-line version of pattern:
(?i)\b((?:[a-z][\w-]+:(?:/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))
@abuadan
abuadan / keybase.md
Created October 6, 2017 14:26
abuadan keybase.md file

Keybase proof

I hereby claim:

  • I am abuadan on github.
  • I am abuadan (https://keybase.io/abuadan) on keybase.
  • I have a public key whose fingerprint is 267A D28A 5B64 845D 10A9 CC7D ED51 86A1 5D97 6F9B

To claim this, I am signing this object: