Skip to content

Instantly share code, notes, and snippets.

'''
>>> data = '{"username": "oscar", "password": "trashcan", "account": 1234, "amount": 12.03}'
>>> deposit(data)
'OK'
>>> data = '{"username": "oscar", "password": "trash", "account": 1234, "amount": 14.98}'
>>> deposit(data)
'Invalid Password'
>>> data = '{"username": "oscar", "password": "trashcan", "account": 1234, "amount": 4.12}'
>>> withdraw(data)
'OK'
@jeremyosborne
jeremyosborne / testing_md_formatting.md
Created June 14, 2016 17:18
This is a test of formatting
var blah = 'yep'
var blah = 'yep yep yep yep'
var blahBlah = function () {
# Download pictures of cats.
# 1) Ask the user for width of the cat.
# 2) Ask the user for the height of the cat.
# 3) Ask the user for the name of the cat image.
# 4) Download the cat image.
# 5) ONLY IF... the name of the cat image doesn't already
# exist on disk.
# BONUS
# * Build a webpage with ALLLLLL of the images downloaded.
#
# 1) Ask the user their name.
# 2) Generate a random number between 1 and 20.
# 3) Give the user 5 guesses to guess the number.
# 4) If the user is wrong, tell them "high" or "low"
# 5) If they user is right, tell them they won and exit.
# 6) If they don't get the answer right in 5 tries, tell
# them they lost and exit.
#
# EXTRA CREDIT
#
# pip install beautifulsoup4==4.2.1
# pip install flask==0.10.1
#
# https://gist.github.com/jeremyosborne/6114464
import os
import re
import requests
from flask import Flask, render_template, request