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 getDotted(data, field, def, delimeter) { | |
delimeter = delimeter || '.'; | |
if (field.indexOf(delimeter) < 0) { | |
return data[field] || def; | |
} | |
var components = field.split(delimeter); | |
components = components.reverse(); | |
while (!!components.length && (typeof(data) == 'object')) { | |
data = data[components.pop()] | |
} |
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
import functools | |
import logging | |
from pymongo.errors import AutoReconnect | |
from pymongo import Connection | |
from pymongo import ReplicaSetConnection | |
import time | |
import types | |
def wrap(func, num_retries, sleep_interval): | |
@functools.wraps(func) |
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
Learn: | |
software transactional memory | |
couroutines | |
* http://www.dabeaz.com/coroutines/Coroutines.pdf | |
python 3 | |
* Improvements to GIL | |
http://www.dabeaz.com/python/GIL.pdf | |
pypy | |
* Maybe getting rid of gil | |
* jit genarator |
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
Learn: | |
software transactional memory | |
couroutines | |
* http://www.dabeaz.com/coroutines/Coroutines.pdf | |
python 3 | |
* Improvements to GIL | |
http://www.dabeaz.com/python/GIL.pdf | |
pypy | |
* Maybe getting rid of gil | |
* jit genarator |
NewerOlder