Skip to content

Commit 1d21cbc

Browse files
Day 14 - Web App with Flask, FastAPI, ngrok, and Invictify
1 parent be86c43 commit 1d21cbc

File tree

16 files changed

+640
-0
lines changed

16 files changed

+640
-0
lines changed

tutorial-reference/Day 14/Pipfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[[source]]
2+
name = "pypi"
3+
url = "https://pypi.org/simple"
4+
verify_ssl = true
5+
6+
[dev-packages]
7+
8+
[packages]
9+
flask = "*"
10+
gunicorn = "*"
11+
uvicorn = "*"
12+
fastapi = "*"
13+
requests = "*"
14+
pandas = "*"
15+
requests-html = "*"
16+
17+
[requires]
18+
python_version = "3.8"

tutorial-reference/Day 14/Pipfile.lock

Lines changed: 438 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
Rank,Release Group,Worldwide,Domestic,%,Foreign,%
2+
1,Bad Boys for Life,"$419,074,646","$204,417,855",48.8%,"$214,656,791",51.2%
3+
2,Sonic the Hedgehog,"$306,766,470","$146,066,470",47.6%,"$160,700,000",52.4%
4+
3,Dolittle,"$223,343,452","$77,047,065",34.5%,"$146,296,387",65.5%
5+
4,Birds of Prey: And the Fantabulous Emancipation of One Harley Quinn,"$201,858,461","$84,158,461",41.7%,"$117,700,000",58.3%
6+
5,The Invisible Man,"$122,914,050","$64,914,050",52.8%,"$58,000,000",47.2%
7+
6,The Gentlemen,"$114,996,853","$36,296,853",31.6%,"$78,700,000",68.4%
8+
7,The Call of the Wild,"$107,604,626","$62,342,368",57.9%,"$45,262,258",42.1%
9+
8,The Grudge,"$49,511,319","$21,221,803",42.9%,"$28,289,516",57.1%
10+
9,Fantasy Island,"$47,315,959","$26,441,782",55.9%,"$20,874,177",44.1%
11+
10,Underwater,"$40,882,928","$17,291,078",42.3%,"$23,591,850",57.7%
12+
11,Like a Boss,"$29,753,143","$22,169,514",74.5%,"$7,583,629",25.5%
13+
12,Bloodshot,"$28,428,855","$10,021,787",35.3%,"$18,407,068",64.7%
14+
13,Emma.,"$25,155,355","$10,055,355",40%,"$15,100,000",60%
15+
14,Gretel & Hansel,"$21,282,967","$15,347,654",72.1%,"$5,935,313",27.9%
16+
15,Brahms: The Boy II,"$20,311,536","$12,611,536",62.1%,"$7,700,000",37.9%
17+
16,The Turning,"$18,474,062","$15,472,775",83.8%,"$3,001,287",16.2%
18+
17,The Way Back,"$14,690,514","$13,590,514",92.5%,"$1,100,000",7.5%
19+
18,La Belle Époque,"$14,298,084",-,-,"$14,298,084",100%
20+
19,I Still Believe,"$10,484,984","$9,868,521",94.1%,"$616,463",5.9%
21+
20,The Hunt,"$6,512,500","$5,812,500",89.3%,"$700,000",10.7%
22+
21,Las Pildoras De Mi Novio,"$6,292,780","$2,971,116",47.2%,"$3,321,664",52.8%
23+
22,The Rhythm Section,"$5,989,583","$5,437,971",90.8%,"$551,612",9.2%
24+
23,My Spy,"$4,418,501",-,-,"$4,418,501",100%
25+
24,The Last Full Measure,"$3,006,059","$2,949,212",98.1%,"$56,847",1.9%
26+
25,The Lodge,"$2,679,438","$1,666,564",62.2%,"$1,012,874",37.8%
27+
26,Trolls World Tour,"$1,887,828",-,-,"$1,887,828",100%
28+
27,Blind Eyes Opened,"$234,505","$234,505",100%,-,-
29+
28,Burden,"$139,270","$139,270",100%,-,-
30+
29,"14 Days, 12 Nights","$122,806","$122,530",99.8%,$276,0.2%
31+
30,First Cow,"$101,068","$101,068",100%,-,-
32+
31,Run,"$4,052",-,-,"$4,052",100%
33+
32,Mulan,$874,-,-,$874,100%
34+
33,A Quiet Place Part II,$159,-,-,$159,100%
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<h1>Hello World</h1>
2+
<p>http://localhost:8000</p>
3+
<p>http://127.0.0.1:8000</p>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import os
2+
import datetime
3+
4+
BASE_DIR = os.path.dirname(__file__)
5+
log_dir = os.path.join(BASE_DIR, "logs")
6+
os.makedirs(log_dir, exist_ok=True)
7+
8+
def trigger_log_save():
9+
filename = f"{datetime.datetime.now()}.txt"
10+
filepath = os.path.join(log_dir, filename)
11+
with open(filepath, 'w+') as f:
12+
f.write("")

tutorial-reference/Day 14/logs/2020-04-06 11:22:00.968551.txt

Whitespace-only changes.

tutorial-reference/Day 14/logs/2020-04-06 12:22:00.912814.txt

Whitespace-only changes.

tutorial-reference/Day 14/logs/2020-04-06 13:22:00.853037.txt

Whitespace-only changes.

tutorial-reference/Day 14/run1.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
gunicorn server1:app --bind 127.0.0.1:8888

tutorial-reference/Day 14/run1.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
gunicorn server1:app --bind 127.0.0.1:8888

0 commit comments

Comments
 (0)