Skip to content

Instantly share code, notes, and snippets.

View deadlysyn's full-sized avatar
☁️
yelling at clouds

Mike Hoskins deadlysyn

☁️
yelling at clouds
View GitHub Profile
@deadlysyn
deadlysyn / ex1.py
Last active September 26, 2016 03:46
#!/usr/bin/env python
#
# practicepython.org exercise 1:
# get name and age, then tell user when they will be 100
from datetime import date
def get_num(prompt='Number? '):
"""helper function to prompt for a number"""
@deadlysyn
deadlysyn / ex2.py
Last active September 26, 2016 03:46
#!/usr/bin/env python
#
# practicepython.org exercise 2:
# ask for number, and respond differently based on even/odd
def get_num(prompt='Number? '):
"""helper function to prompt for a number"""
_num = 0
while True:
#!/usr/bin/env python
#
# practicepython.org exercise 3:
# given a list, print elements that are less than 5.
def get_num(prompt='Number? '):
"""helper function to prompt for a number"""
_num = 0
while True:
@deadlysyn
deadlysyn / ex4.py
Last active September 26, 2016 05:11
#!/usr/bin/env python
#
# practicepython.org exercise 4:
# given a number, print all divisors.
def get_num(prompt='Number? '):
"""helper function to prompt for a number"""
_num = 0
while True:
#!/usr/bin/env python
#
# practicepython.org exercise 5:
# given two lists, print common elements but don't repeat.
import random
def gen_lists(max_size=100, max_num=1000):
FROM node:latest
RUN mkdir -p /app
WORKDIR /app
COPY package.json /app/
RUN npm install
RUN npm install -g nodemon
EXPOSE 3000
DOCKER=/usr/local/bin/docker
IMG=chowchow
build:
$(DOCKER) build . -t $(IMG)
run:
$(DOCKER) run --rm -v $(PWD):/app -p 3000:3000 \
-e IP="0.0.0.0" \
-e API_KEY="${API_KEY}" $(IMG)
{
"name": "chowchow",
"version": "1.0.0",
"description": "find food fast",
"main": "app.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "nodemon app.js"
},
"repository": {
/*
* common elements
*/
.button {
align-items: center;
box-sizing: border-box;
color: #d32323;
display: flex;
font-size: 4vh;
#home {
display: grid;
grid-template-columns: auto;
grid-template-rows: repeat(4, auto) 5vh;
grid-template-areas: "find" "price" "drive" "donate" "footer";
}