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
<!DOCTYPE html> | |
<html> | |
<head> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous"> | |
</head> | |
<body> | |
<div class="container"> |
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 os | |
import json | |
import time | |
from fabric.api import local, run, cd, env, task | |
from fabric.operations import get | |
from fabric.context_managers import cd, prefix | |
from settings import DATABASES, MEDIA_ROOT |
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
from somewhere import get_mongo_db | |
# assuming get_mongo_db returns db instance | |
class MongoException(Exception): | |
pass | |
class MongoField(object): | |
pass |
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
# Source: http://firepear.net/docs/python3-futures-2.html | |
from concurrent.futures import ThreadPoolExecutor | |
import random | |
import time | |
def sleep_until_the_future(**kwargs): | |
kwargs['launchtime'] = time.time() | |
time.sleep(kwargs['sleeptime']) | |
return kwargs |