Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View rischanlab's full-sized avatar
💭
I may be slow to respond.

Rischan Mafrur rischanlab

💭
I may be slow to respond.
View GitHub Profile
@rischanlab
rischanlab / tweet_dumper.py
Created May 29, 2016 01:53 — forked from yanofsky/LICENSE
A script to download all of a user's tweets into a csv
#!/usr/bin/env python
# encoding: utf-8
import tweepy #https://github.com/tweepy/tweepy
import csv
#Twitter API credentials
consumer_key = ""
consumer_secret = ""
access_key = ""
@rischanlab
rischanlab / delete_all_tweets.py
Created May 24, 2016 17:31 — forked from vik-y/delete_all_tweets.py
This script will delete all of the tweets in a specified account.
# -*- coding: utf-8 -*-
"""
This script is forked originally from Dave Jeffery. The original implementation
was very slow and deleted around 2 tweets per second. Making it multithreaded I
am able to delete 30-50 tweets per second.
@author: vik-y
----------------------------------------------------------------------------
This script will delete all of the tweets in the specified account.
#to make the final table, I changed manually the n size every trial by: 1e3, 1e4, 1e5, 1e6, 1e7. Then I also chnaged the benchmark object 'res'
n <- 1e7
set.seed(51)
process <- data.frame(id=sample(100, n, rep=T), x=rnorm(n), y=runif(n), z=rpois(n, 1) pexp(2, rate=1/3) )
all <- multicore:::detectCores(all.tests=TRUE)
if(!require(rbenchmark)){
install.packages("rbenchmark")
} else{