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 mymap(fn, iterable): | |
| for x in iterable: | |
| yield fn(x) | |
| class A(object): | |
| def __init__(self, x): | |
| self.x = x |
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
| function FakeMap() { | |
| var data = []; | |
| function indexOf(key) { | |
| var i; | |
| for (i = 0; i < data.length; i++) { | |
| if (data[i].key === key) return i; | |
| } | |
| return -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
| # retrieves commit relative date and message | |
| humanify() { | |
| while read hash; do | |
| # echo to trim the new line | |
| echo $( git log -n 1 ..$hash --format='%ci : %h : %s%n%b' ) | |
| done | |
| } | |
| # show the commits! | |
| git fsck --unreachable | grep -oP '(?<=commit )\w+' | humanify | sort |
NewerOlder