This file contains hidden or 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import fnmatch | |
import os | |
import sys | |
def find_files(filepath, patterns): | |
matches = 0 | |
if os.path.exists(filepath): |
This file contains hidden or 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
#!/usr/bin/env python | |
# -*- encoding: utf-8 -*- | |
import os | |
import sys | |
import os.path | |
path_dirs = os.getenv('PATH').split(':') | |
cmd = sys.argv[1] |
This file contains hidden or 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
from random import random | |
import types | |
def list_without_comprehension(): | |
l = [] | |
for i in xrange(1000): | |
l.append(int(random()*100 % 100)) | |
return l | |
def list_with_comprehension(): |
NewerOlder