I hereby claim:
- I am mos3abof on github.
- I am mos3abof (https://keybase.io/mos3abof) on keybase.
- I have a public key ASBlDut8UpMXWCqjKIconLKmTUGE628ZAKrdGkLDVRIftAo
To claim this, I am signing this object:
| #!/usr/bin/python | |
| # -*- coding: utf-8 -*- | |
| # Import DateTime | |
| from datetime import datetime, timedelta, date | |
| # Import urllib | |
| import urllib | |
| # Importing utilities from Fabric |
| <html><body><h1>It works!</h1> | |
| <p>This is the default web page for this server.</p> | |
| <p>The web server software is running but no content has been added, yet.</p> | |
| </body></html> |
| def hanoi(n, fr, to, spare): | |
| '''(int, str, str, str) | |
| Solve the classic puzzle Tower of Hanoi | |
| >>> hanoi(1, "Middle", "Left", "Right") | |
| - Move top ring in 'Middle' tower to the 'Left' tower | |
| ''' | |
| def print_move(fr, to): | |
| print "- Move top ring in '{}' tower to the '{}' tower".format(fr, to) |
| #!/usr/bin/python | |
| import subprocess | |
| command = ['traceroute', '216.81.59.173'] | |
| p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) | |
| lines = [] | |
| while(True): | |
| retcode = p.poll() |
| import math | |
| from matplotlib import pyplot | |
| figsize = (15, 5) | |
| pyplot.figure(figsize=figsize) | |
| pyplot.title('Paying it forward') | |
| data = [] | |
| end = 1000000 |
| #!/usr/bin/python | |
| # -*- coding: utf-8 -*- | |
| # Calculating different permutations of the democratic path we got in Egypt. | |
| from itertools import permutations | |
| i = ['دستور', 'برلمان', 'رئاسة'] | |
| results = [] | |
| for a in permutations(i, 3): |
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/python | |
| # -*- coding: utf-8 -*- | |
| #@author Mosab Ahmad <[email protected]> | |
| import datetime | |
| delta = datetime.datetime(2014, 6, 1) - datetime.datetime.now() | |
| days = delta.days | |
| seconds = delta.seconds |
| def ascii_to_binary(ascii_text): | |
| binary_text = '' | |
| for c in ascii_text: | |
| binary_text += bin(ord(c))[2:].zfill(8) | |
| return binary_text | |
| def binary_to_ascii(binary_text): | |
| return ''.join(chr(int(binary_text[i:i+8], 2)) for i in xrange(0, len(binary_text), 8)) |