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:
| /** | |
| * A quick solution for the question in this blog post: | |
| * http://www.thousandtyone.com/blog/EasierThanFizzBuzzWhyCantProgrammersPrint100To1.aspx | |
| * | |
| * Took me 30 seconds, without the comments. | |
| * | |
| * The problem: | |
| * Print 100 to 1. | |
| * You need to start with "for(int i=0;" and continue from there. | |
| * You cannot write anything before "for(int i=0;". |
| #!/usr/bin/python | |
| # -*- coding: utf-8 -*- | |
| #@author Mosab Ahmad <[email protected]> | |
| import os | |
| import re | |
| MOVIES_PATH = '/home/mosab/Videos/youtube' |
| [Desktop Entry] | |
| Name=Pycharm 3.4.1 | |
| Comment=Python IDE | |
| TryExec=/path/to/pycharm-community-3.4.1/bin/pycharm.sh | |
| Exec=/path/to/pycharm-community-3.4.1/bin/pycharm.sh | |
| Icon=/path/to/pycharm-community-3.4.1/bin/pycharm.png | |
| Categories=Development;IDE;Python; | |
| Terminal=false | |
| Type=Application | |
| StartupNotify=true |
| select | |
| table_name | |
| from | |
| information_schema.KEY_COLUMN_USAGE | |
| where | |
| table_schema = 'my_database' | |
| and referenced_table_name = 'my_table'; |
| 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)) |
| #!/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 |
I hereby claim:
To claim this, I am signing this object:
| #!/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): |
| import math | |
| from matplotlib import pyplot | |
| figsize = (15, 5) | |
| pyplot.figure(figsize=figsize) | |
| pyplot.title('Paying it forward') | |
| data = [] | |
| end = 1000000 |
| #!/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() |