Skip to content

Instantly share code, notes, and snippets.

# -*- coding: utf-8 -*-
import itertools
import re
import urlparse
import boto
import warc
from boto.s3.key import Key
from gzipstream import GzipStreamFile
@estasney
estasney / rebuild_search_indices.py
Last active May 21, 2018 23:55 — forked from davebarkerxyz/rebuild_search_indices.py
Rebuild Flask-WhooshAlchemy search indices (Python 3, Mega-Tutorial Style)
#!/usr/bin/env python
import datetime
import sys
sys.path.append("mysite")
from app_folder import create_app
from app_folder.models import YOUR_MODEL
app = create_app()
'use strict';var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.checkStringArgs=function(e,g,f){if(null==e)throw new TypeError("The 'this' value for String.prototype."+f+" must not be null or undefined");if(g instanceof RegExp)throw new TypeError("First argument to String.prototype."+f+" must not be a regular expression");return e+""};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(e,g,f){e!=Array.prototype&&e!=Object.prototype&&(e[g]=f.value)};$jscomp.getGlobal=function(e){return"undefined"!=typeof window&&window===e?e:"undefined"!=typeof global&&null!=global?global:e};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.polyfill=function(e,g,f,h){if(g){f=$jscomp.global;e=e.split(".");for(h=0;h<e.length-1;h++){var x=e[h];x in f||(f[x]={});f=f[x]}e=e[e.length-1];h=f[e];g=g(h);g!=h&&null!=g&&$jscomp.defineProperty(f,e,{configurable:!0,writable:!0,value:g})}};
$jsc
@estasney
estasney / synonyms.py
Created May 14, 2018 02:46
Finding Synonyms by Cooccurence
import pandas as pd
import numpy as np
from operator import itemgetter
import flashtext
from fuzzywuzzy import fuzz
from flashtext import KeywordProcessor
from sklearn.feature_extraction.text import CountVectorizer
df = pd.read_pickle(r"skill_counts.p")
df = pd.DataFrame.from_dict(list(df.items()))
@estasney
estasney / d3.json
Last active February 28, 2018 16:50 — forked from emeeks/d3.layout.orbit.js
Orbit Layout 4
{
"name": "cisco",
"children": [
{
"children": [
{
"name": "learn"
},
{
"name": "play"
source target
cisco customer
cisco work
cisco team
customer work
customer team
customer experience
work team
work experience
work business
@estasney
estasney / graph_corpus.py
Created February 26, 2018 00:32
Graph Structure - From Corpus, Using SQLAlchemy, CoreNLP, Gensim
# coding: utf-8
# In[2]:
import sys
sys.path.append(r"/home/eric/NLP_Tools/MyTools")
import Resume_Cleaner
@estasney
estasney / .block
Created February 12, 2018 03:27 — forked from mbostock/.block
Modifying a Force Layout
license: gpl-3.0
@estasney
estasney / .block
Created February 12, 2018 01:03 — forked from mbostock/.block
Link Nodes by Name
license: gpl-3.0
@estasney
estasney / .block
Last active February 12, 2018 02:21 — forked from mbostock/.block
Force Layout from CSV
license: gpl-3.0