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
def _wrap_fn(params) | |
return params # do whatever here | |
def __getattr__(self, method_name): | |
return lambda msg: getattr(self._subobject, method_name)(self._wrap_fn(params)) |
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
#!/bin/bash | |
for dir in */; | |
do | |
dir=${dir%*/} | |
echo "###############################################################################" | |
echo ${dir##*/} | |
cd $dir | |
git fetch --all | |
git merge --ff-only |
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
### Keybase proof | |
I hereby claim: | |
* I am chetmancini on github. | |
* I am chet (https://keybase.io/chet) on keybase. | |
* I have a public key whose fingerprint is 8C75 B5CF 1A1C D211 C5A4 34D3 0CD4 D498 9549 EA0A | |
To claim this, I am signing this object: |
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/python | |
from random import shuffle | |
with open("/usr/share/dict/words") as f: | |
content = f.readlines() | |
shuffle(content) | |
for word in content[:5]: | |
print word |
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
def countLinesOfCode(path): | |
"""Procedure to count total lines of code in each file | |
""" | |
total = 0 | |
listing = os.listdir(path) | |
for fname in listing: | |
if fname[-2:] == "py": | |
with open(fname) as f: | |
for i, l in enumerate(f): | |
if len(l) > 80: |
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
uses SysUtils, Classes, IdHashMessageDigest, idHash; | |
function TTesterApp.CompareHashes(const File1: string; const File2: string): Boolean; | |
function MD5(const FileName: string): string; | |
var | |
IDMD5: TIdHashMessageDigest5; | |
FileStream: TFileStream; | |
begin | |
idmd5 := TIdHashMessageDigest5.Create; |