from flask import Flask
app = Flask(__name__)
@app.route('/', methods=['GET'])
def hello():
return 'HELLO WORLD'
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 smtplib, os | |
from email import Encoders | |
from email.Utils import COMMASPACE, formatdate | |
from email.MIMEText import MIMEText | |
from email.MIMEBase import MIMEBase | |
from email.MIMEMultipart import MIMEMultipart | |
import argparse | |
import sys | |
#INFO |
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
#!/bin/bash | |
sudo pip install virtualenv | |
sudo pip install virtualenvwrapper | |
export WORKON_HOME=~/Envs | |
source /usr/local/bin/virtualenvwrapper.sh |
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
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 | |
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list | |
sudo apt-get update | |
sudo apt-get install -y mongodb-org |
This information is read from https://thinkster.io/learn-to-build-realtime-webapps/
curl -L https://npmjs.org/install.sh | sh (Run as root -- sudo su)
- For details read https://www.npmjs.com/package/npm
curl -sL https://deb.nodesource.com/setup | sudo bash - (Run as root -- sudo su)
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 traceback | |
from functools import wraps | |
def retry(retries=5, quantum_backoff=5, exception=Exception): | |
def real_retry(func): | |
@wraps(func) | |
def wrapper(*args, **kwargs): | |
tries = 0 | |
exc = None | |
while tries <= retries: |