Skip to content

Instantly share code, notes, and snippets.

View ck37's full-sized avatar

Chris Kennedy ck37

View GitHub Profile
options(scipen = 20)
worst_case = (2 / 5) * 2^32
(worst_cases = c(worst_case - 1, worst_case))
(not_worst_cases = c((1 / 5) * 2^32, 1.5 * 2^32))
(m_max = c(round(exp(10:21)), not_worst_cases, worst_cases))
set.seed(3932354)
result = data.frame(m_max, lg_m_max = log(m_max), stat = NA)
for (m_i in 1:length(m_max)) {
x = sample(m_max[m_i], 1000000, replace = TRUE)
Password:
Please wait, logging in...
Log in successful.
Starting at line 0.
Line: 50. Added: 50. Failed: 0.
Line: 100. Added: 100. Failed: 0.
Line: 150. Added: 150. Failed: 0.
$ easy_install mechanize
$ wget http://downloads.sourceforge.net/libgmail/libgmail-0.1.11.tar.gz
$ tar zxvf libgmail-0.1.11.tar.gz
$ cd libgmail-0.1.11/; sudo python setup.py install
$ wget http://is.gd/kois
$ python gmail_add_emails.py data_sync_account@gmail.com one_email_per_line.txt
#!/usr/bin/env python
#
# gmail_add_emails.py - Add a file of emails into a gmail contact list.
#
# Author: chrisken (at) ck37 com (hat tip to libgmail example code)
#
# License: GPL 2.0
#
import os