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
#!/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""" |
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
#!/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: |
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
#!/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: |
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
#!/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: |
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
#!/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): |
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 node:latest | |
RUN mkdir -p /app | |
WORKDIR /app | |
COPY package.json /app/ | |
RUN npm install | |
RUN npm install -g nodemon | |
EXPOSE 3000 |
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
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) |
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
{ | |
"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": { |
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
/* | |
* common elements | |
*/ | |
.button { | |
align-items: center; | |
box-sizing: border-box; | |
color: #d32323; | |
display: flex; | |
font-size: 4vh; |
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
#home { | |
display: grid; | |
grid-template-columns: auto; | |
grid-template-rows: repeat(4, auto) 5vh; | |
grid-template-areas: "find" "price" "drive" "donate" "footer"; | |
} |
OlderNewer