Skip to content

Instantly share code, notes, and snippets.

View prafulfillment's full-sized avatar
🐶
Speaking to 🐶 & 🐬

praful mathur prafulfillment

🐶
Speaking to 🐶 & 🐬
View GitHub Profile
@prafulfillment
prafulfillment / docopt_httpie
Created February 5, 2013 03:26
Trying to implement HTTPie's CLI with docopt.
#!/usr/bin/env python
"""
usage: http [METHOD] <URL> [REQUEST ITEM [REQUEST ITEM ...]]
HTTPie - cURL for humans. <http://httpie.org>
Positional arguments:
These arguments come after any flags and in the order they are listed
here. Only URL is required.
@prafulfillment
prafulfillment / fibonacci_number.py
Last active December 9, 2015 23:18
Fibonacci Number methods w/timing
import timeit
#import sys
# Implementation:
def matmult(A, B):
# multiplies 2x2 matrix
def val(i, j):
return (A[i][0] * B[0][j]) + (A[i][1] * B[1][j])
return ((val(0, 0), val(0, 1)),