Skip to content

Instantly share code, notes, and snippets.

@raulgarreta
raulgarreta / get_followers_bios.py
Created Oct 3, 2016
Simple Python command to get Twitter user followers with the public API.
View get_followers_bios.py
# -*- coding: utf-8 -*-
import csv
import time
import re
import codecs, cStringIO
from argparse import ArgumentParser
import tweepy
@raulgarreta
raulgarreta / keywords_csv.py
Last active Mar 8, 2017
Simple Python command to extract aggregated keywords from a list of texts in a CSV file column.
View keywords_csv.py
# -*- coding: utf-8 -*-
import csv
import codecs, cStringIO
from argparse import ArgumentParser
from monkeylearn import MonkeyLearn
class UTF8Recoder:
"""
View gist:36d66e908a964b6547d4
import requests
import json
data = {
'text_list': ["This is a text to try language detection.",
"This is some more text"]
}
response = requests.post(
"https://api.monkeylearn.com/v2/classifiers/cl_oJNMkt2V/classify/",
@raulgarreta
raulgarreta / gist:2f74ef00e733349052c1
Created Feb 10, 2015
MonkeyLearn & Import.io webinar
View gist:2f74ef00e733349052c1
import json
import pandas as pd
import requests
# Your API key goes here.
API_KEY = ''
raw_df = pd.read_csv('linkedin-sf.csv', encoding='utf-8', skiprows=1,
error_bad_lines=False)
View gist:891d185dce1cc23974c5
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
import java.io.DataOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;
import java.lang.StringBuffer;
public class App