I hereby claim:
- I am mahmoudhossam on github.
- I am mahmoudhossam (https://keybase.io/mahmoudhossam) on keybase.
- I have a public key whose fingerprint is BB0D 2F43 0DC4 1C98 A9FF B60B D93B B4FD 958B BDC3
To claim this, I am signing this object:
def roman_numeral_to_int(string): | |
symbols = { | |
'I': 1, | |
'V': 5, | |
'X': 10, | |
'L': 50, | |
'C': 100, | |
'D': 500, | |
'M': 1000 | |
} |
rofi usage: | |
rofi [-options ...] | |
Command line only options: | |
-no-config Do not load configuration, use default values. | |
-v,-version Print the version number and exit. | |
-dmenu Start in dmenu mode. | |
-display [string] X server to contact. | |
${DISPLAY} | |
-h,-help This help message. |
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
#Warn ; Enable warnings to assist with detecting common errors. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
#SingleInstance force | |
$Capslock::Esc | |
$Esc::Capslock |
upstream django { | |
server 127.0.0.1:9000; # for a web port socket (we'll use this first) | |
} | |
import requests | |
def unshorten(url): | |
try: | |
r = requests.head(url, allow_redirects=True) | |
except: | |
return r.url | |
return r.url |
I hereby claim:
To claim this, I am signing this object:
from pyquery import PyQuery as pq | |
import requests | |
import psycopg2 as pg | |
def get_title(element): | |
return element.cssselect('.media-heading a')[0].text | |
def get_rating(element): | |
el = element.cssselect("div[style='color:#F1870A']")[0] |
/* begin table creation */ | |
create table department | |
(department_id serial primary key, | |
name varchar(20) not null | |
); | |
create table branch | |
(branch_id serial primary key, | |
name varchar(20) not null, |
This is in response to this article.
In the 21st century where 2k monitors exist, saving a line of code here or there really isnt a valid argument. Especially when source files can most of the time fit all on one screen. Code folding also exists in many good IDEs.
2k monitors do exist, but not everybody has them. I have a single 20" monitor with a resolution of 1600*900.
Saving a line of code here and there does count for something when you're looking at a ~9000 line monstrosity like this.
def insertion_sort(seq): | |
j = 1 | |
for i in range(1, len(seq)): | |
j = i | |
while j > 0 and seq[j] < seq[j-1]: | |
seq[j], seq[j-1] = seq[j-1], seq[j] | |
j -= 1 | |
return seq |