Skip to content

Instantly share code, notes, and snippets.

View ramayac's full-sized avatar
Code forward!

ramayac ramayac

Code forward!
View GitHub Profile

Business Models

Advertising

Models Examples
Display ads Yahoo!
Search ads Google
@ramayac
ramayac / hngen.py
Created December 12, 2013 16:13 — forked from grantslatton/hngen.py
import urllib2
import re
import sys
from collections import defaultdict
from random import random
"""
PLEASE DO NOT RUN THIS QUOTED CODE FOR THE SAKE OF daemonology's SERVER, IT IS
NOT MY SERVER AND I FEEL BAD FOR ABUSING IT. JUST GET THE RESULTS OF THE
CRAWL HERE: http://pastebin.com/raw.php?i=nqpsnTtW AND SAVE THEM TO "archive.txt"
import sys
import subprocess
import tempfile
import urllib
text = sys.stdin.read()
chart_url_template = ('http://chart.apis.google.com/chart?'
'cht=qr&chs=300x300&chl={data}&chld=H|0')
chart_url = chart_url_template.format(data=urllib.quote(text))
@ramayac
ramayac / pyoauth.py
Last active December 12, 2015 02:38
import urlparse
import oauth2 as oauth
consumer_key = 'consumer_key'
consumer_secret = 'consumer_secret'
request_token_url = 'http://www.tumblr.com/oauth/request_token'
access_token_url = 'http://www.tumblr.com/oauth/access_token'
authorize_url = 'http://www.tumblr.com/oauth/authorize'
@ramayac
ramayac / main.py
Created June 13, 2011 17:24
App Engine app to let two anonymous users talk to eachother via XMPP -- http://chatwithstrangers.appspot.com
#!/usr/bin/env python
import logging
from google.appengine.api import memcache
from google.appengine.api import xmpp
from google.appengine.ext import db
from google.appengine.ext import webapp
from google.appengine.ext.webapp import util
from google.appengine.ext.webapp import xmpp_handlers