Skip to content

Instantly share code, notes, and snippets.

View PArun's full-sized avatar

Arun Sharma PArun

View GitHub Profile
@PArun
PArun / 0_urllib2.py
Created July 11, 2012 12:45 — forked from kennethreitz/0_urllib2.py
urllib2 vs requests
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib2
gh_url = 'https://api.github.com'
req = urllib2.Request(gh_url)
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm()
@PArun
PArun / 0_urllib2.py
Created May 11, 2012 13:40 — forked from kennethreitz/0_urllib2.py
urllib2 vs requests
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib2
gh_url = 'https://api.github.com'
req = urllib2.Request(gh_url)
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm()
@PArun
PArun / webvisum.py
Created April 24, 2012 11:59 — forked from bramd/webvisum.py
Solve CAPTCHAs using the Webvisum API, requires a valid Webvisum username and password.
import sys
import urllib2
import requests
from xml.dom import minidom
from time import sleep
API_URL = 'http://api.webvisum.com/api_rest'
USERNAME = ''
PASSWORD = ''
@PArun
PArun / gist:2479092
Created April 24, 2012 11:58 — forked from stevejalim/gist:2478912
Django StrongPasswordField
import re
from django import forms
def is_password_strong_enough(value):
"""
"All passwords should be:
10+ characters long
contain at least one upper-case character
contain at least one lower-case character
contain at least one numeric digit