This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"editor.fontSize": 16, | |
"editor.fontFamily": "Fira Code", | |
"editor.fontLigatures": true, | |
"workbench.colorTheme": "Monokai", | |
"window.zoomLevel": 0 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Foo(object): | |
def __init__(self): | |
pass | |
def bar(self, baz, qux): | |
return baz + qux | |
def main(): | |
x = Foo() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def walk(top, topdown=True, onerror=None, followlinks=False): | |
"""Directory tree generator. | |
For each directory in the directory tree rooted at top (including top | |
itself, but excluding '.' and '..'), yields a 3-tuple | |
dirpath, dirnames, filenames | |
dirpath is a string, the path to the directory. dirnames is a list of | |
the names of the subdirectories in dirpath (excluding '.' and '..'). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fileinput | |
import sys | |
import urllib2 | |
def check_404(url): | |
try: | |
urllib2.urlopen(url); | |
except urllib2.HTTPError as e: | |
if e.code == 404: | |
print url |