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
# https://redis-py.readthedocs.io/en/latest/#redis.StrictRedis | |
import os | |
from functools import partial | |
import redis | |
from redlock import RedLock, RedLockFactory | |
#import configparser | |
#config = configparser.ConfigParser() | |
#config.read('config.ini') |
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
# https://github.com/python/cpython/blob/master/Lib/functools.py | |
from collections import namedtuple | |
from functools import partial | |
import pickle | |
from my_redis import Client | |
WRAPPER_ASSIGNMENTS = ('__module__', '__name__', '__qualname__', '__doc__', | |
'__annotations__') | |
WRAPPER_UPDATES = ('__dict__',) | |
def update_wrapper(wrapper, |
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
# conda activation | |
export PATH=~/anaconda3/bin:$PATH | |
# alias | |
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' | |
alias cd2='cd ../../' | |
alias egrep='egrep --color=auto' | |
alias fgrep='fgrep --color=auto' | |
alias fk='fuck' | |
alias grep='grep --color=auto' |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |