I hereby claim:
- I am ishahid on github.
- I am ishahid (https://keybase.io/ishahid) on keybase.
- I have a public key whose fingerprint is DD3B DD86 B1D3 AD6B 2F49 722E 1451 55DE 0BAD E780
To claim this, I am signing this object:
def ugly_number(n): | |
""" Returns Nth ugly number """ | |
assert n > 0, 'The argument must be greater than zero.' | |
list = [0]*n | |
i2, i3, i5 = 0, 0, 0 | |
w2, w3, w5 = 2, 3, 5 | |
w, list[0] = 1, 1 | |
import re | |
units = { | |
0: 'Zero', 1: 'One', 2: 'Two', 3: 'Three', 4: 'Four', 5: 'Five', 6: 'Six', 7: 'Seven', 8: 'Eight', 9: 'Nine' | |
} | |
tens = { | |
10: 'Ten', 11: 'Eleven', 12: 'Twelve', 13: 'Thirteen', 14: 'Fourteen', 15: 'Fifteen', 16: 'Sixteen', | |
17: 'Seventeen', 18: 'Eighteen', 19: 'Nineteen', 20: 'Twenty', 30: 'Thirty', 40: 'Forty', 50: 'Fifty', | |
60: 'Sixty', 70: 'Seventy', 80: 'Eighty', 90: 'Ninety' | |
} |
def signature(word): | |
""" Returns the sorted word """ | |
return ''.join(sorted(word)) | |
def anagrams(word): | |
""" Returns a list of all anagrams for a given word """ | |
words = [w.strip().lower() for w in open('words.txt')] |
def sum(args): | |
""" Returns sum of all elements of a given list, recursively """ | |
if len(args) == 0: | |
return 0 | |
return args[0] + sum(args[1:]) | |
if __name__ == "__main__": |
#!/usr/bin/python | |
"""Generate a random API key | |
https://gist.github.com/ishahid/54f0478e480234fa44ec | |
""" | |
import base64 | |
import hashlib | |
import random |
#!/usr/bin/python | |
"""Get quote from stock market using Google Finance | |
https://gist.github.com/ishahid/9f0823c19b6d387529f4 | |
""" | |
try: | |
import os, sys | |
import json | |
import googlefinance as google |
I hereby claim:
To claim this, I am signing this object:
++++++++++ initialize counter (cell #0) to 10 | |
[ use loop to set the next six cells to 70/80/90/100/30/10 | |
> +++++ ++ add 7 to cell #1 | |
> +++++ +++ add 8 to cell #2 | |
> +++++ ++++ add 9 to cell #3 | |
> +++++ +++++ add 10 to cell #4 | |
> +++ add 3 to cell #5 | |
> + add 1 to cell #6 | |
<<<<<< - decrement counter (cell #0) | |
] |
# A list of possible reserved words | |
reserved_words = [ | |
# Companies | |
'amazon', 'apple', 'atlassian', 'canonical', 'facebook', 'github', | |
'google', 'htc', 'huawei', 'ibm', 'microsoft', 'mozilla', 'naughtydog', | |
'nintendo', 'nokia', 'rim', 'samsung', 'sony', 'toshiba', 'twitter', | |
'ubisoft', 'wikipedia', 'xref', 'yahoo', | |
# Operating systems |
# --------------------------------------------------------------------------- | |
# | |
# Description: This file holds all my BASH configuration and aliases | |
# | |
# Sections: | |
# 1. Environment Configuration | |
# 2. Make Terminal Better (remapping defaults and adding functionality) | |
# 3. File and Folder Management | |
# 4. Searching | |
# 5. Process Management |