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
import math | |
def get_digits_string_map(num): | |
return list(map(int, str(num))) | |
def get_digits_string_list(num): | |
return [int(char) for char in str(num)] | |
def get_digits(num): | |
return [(num // (10 ** i)) % 10 for i in range(int(math.log10(num)), -1, -1)] |
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
def production(): | |
env.hosts = ['you.web.server'] | |
env.user = 'something' | |
env.project_root = '/path/to/your.project/' | |
env.activate = 'source /path.to/your/virtualenv/bin/activate' # virtualenv | |
def virtualenv(command): | |
run(env.activate + '&&' + command) | |
def copy_db_to_local(): |