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 logging | |
import os | |
import re | |
import socket | |
import stat | |
from datetime import datetime | |
import paramiko | |
import pytz | |
import redo |
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
# For local execution (does not require installing the library): | |
%reload_ext autoreload | |
%autoreload 2 | |
import sys; sys.path.append('../') | |
# Prettymaps | |
from prettymaps import * | |
# Vsketch | |
import vsketch | |
# OSMNX |
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 xmlrpclib | |
class ProcessStatus(object): | |
RUNNING = 'RUNNING' | |
STOPPED = 'STOPPED' | |
FATAL = 'FATAL' | |
RESTARTING = 'RESTARTING' | |
SHUTDOWN = 'SHUTDOWN' |
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/env python | |
# -*- coding: utf-8 -*- | |
from __future__ import print_function, absolute_import | |
from datetime import datetime, date | |
import collections | |
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/env python | |
# -*- coding: utf-8 -*- | |
""" | |
{Description} | |
{License_info} | |
""" | |
# Futures | |
from __future__ import print_function |
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
# Futures | |
from __future__ import unicode_literals | |
from __future__ import print_function | |
# Generic/Built-in | |
import datetime | |
import argparse | |
# Other Libs | |
import youtube_dl |
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/env python3 | |
# -*- coding: utf-8 -*- | |
from xlrd import xldate_as_datetime | |
import psycopg2 | |
import xlrd | |
import sys | |
DB_CONFIG_TEMPLATE = { |
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/env python3 | |
# -*- coding: utf-8 -*- | |
''' | |
question1: | |
大整数加法 | |
''' | |
def add(num1, num2): |
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/env python3 | |
# -*- coding: utf-8 -*- | |
def lsubstring(s): | |
start = max_len = 0 | |
seen = {} | |
for i, c in enumerate(s): | |
if start <= seen.get(c, -1): | |
start = seen[c] + 1 |