-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from pmhalvor/cline/home-refactor
Refactor: Notion integration running on Flask Nginx has been updated to point to the docker container running the gunicorn server serving the flask app that is my site
- Loading branch information
Showing
60 changed files
with
1,191 additions
and
246 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM python:3.11-slim | ||
|
||
WORKDIR /new_home | ||
|
||
COPY requirements.txt ./ | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
COPY new_home/*.py ./ | ||
COPY new_home/templates ./templates | ||
COPY new_home/static ./static | ||
|
||
ENV FLASK_ENV=production | ||
ARG PORT=5001 | ||
ENV PORT=${PORT} | ||
|
||
EXPOSE ${PORT} | ||
|
||
CMD ["sh", "-c", "gunicorn -b 0.0.0.0:${PORT} app:app"] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM python:3.11-slim | ||
|
||
WORKDIR /new_radio | ||
|
||
# COPY requirements.txt ./ | ||
# RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
# COPY new_radio/*.py ./ | ||
|
||
# ENV FLASK_ENV=production | ||
# ARG PORT=5001 | ||
# ENV PORT=${PORT} | ||
|
||
# EXPOSE ${PORT} | ||
|
||
# CMD ["sh", "-c", "gunicorn -b 0.0.0.0:${PORT} app:app"] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# build/push/pull the docker images | ||
build: | ||
docker compose build | ||
|
||
push: | ||
docker compose push | ||
|
||
pull: | ||
git pull | ||
docker compose pull | ||
|
||
build-push: build push | ||
|
||
pull-up: pull up | ||
|
||
# run the server | ||
up: | ||
docker compose up -d | ||
|
||
down: | ||
docker compose down | ||
|
||
run: up down | ||
|
||
restart: down up |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
services: | ||
new_home: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile.home | ||
container_name: new_home | ||
image: ghcr.io/pmhalvor/website:latest | ||
restart: always | ||
ports: | ||
- "5001:5001" | ||
env_file: | ||
- .env | ||
environment: | ||
DEBUG: "false" | ||
platform: linux/amd64 | ||
|
||
# new_radio: | ||
# build: | ||
# context: . | ||
# dockerfile: Dockerfile.radio | ||
# container_name: new_radio | ||
# restart: always | ||
# ports: | ||
# - "5002:5002" | ||
# env_file: | ||
# - .env | ||
# environment: | ||
# DEBUG: "false" | ||
# platform: linux/amd64 |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
prompts_list = [ | ||
{ | ||
"img_url": "/static/img/chatgpt_logo.png", | ||
"title": "Anomaly detection", | ||
"descr": "Some deep learning approaches to anomaly detection on an image dataset.", | ||
"file_url": "https://chatgpt.com/share/e/9808d736-fc0d-4e97-ad1c-cba4a79b8070", | ||
}, | ||
{ | ||
"img_url": "/static/img/chatgpt_logo.png", | ||
"title": "Facts about lobsters", | ||
"descr": "Why would lobsters need 12 color receptors?", | ||
"file_url": "https://chat.openai.com/share/40498b9c-4f3f-4221-a2a5-9140ed9905e0", | ||
}, | ||
{ | ||
"img_url": "/static/img/chatgpt_logo.png", | ||
"title": "Building regex strings", | ||
"descr": "Extracting an S3 bucket name from a full resource path.", | ||
"file_url": "https://chat.openai.com/share/dd5826fe-622c-4208-8d73-b820c628b668", | ||
}, | ||
{ | ||
"img_url": "/static/img/chatgpt_logo.png", | ||
"title": "Dealing with unbalanced data", | ||
"descr": "Some techniques for dealing with skewed data in ML projects.", | ||
"file_url": "https://chat.openai.com/share/eefbbd37-38eb-42f3-bf4f-948647c706e7", | ||
}, | ||
{ | ||
"img_url": "/static/img/chatgpt_logo.png", | ||
"title": "Naming Music Workout DJ", | ||
"descr": "Brainstorming potential names for my Endurabeats app.", | ||
"file_url": "https://chat.openai.com/share/0d5764e2-1be3-41af-a1a3-3d3e6ea92b12", | ||
}, | ||
{ | ||
"img_url": "/static/img/chatgpt_logo.png", | ||
"title": "Activation Functions", | ||
"descr": "A refresher on activation functions and weight decay with an example.", | ||
"file_url": "https://chat.openai.com/share/7dccc3ca-575f-4a00-890e-97ce67424cce", | ||
}, | ||
{ | ||
"img_url": "/static/img/chatgpt_logo.png", | ||
"title": "Rom-com Movie suggestions", | ||
"descr": "Brainstorming what to watch with a robot assistant.", | ||
"file_url": "https://chat.openai.com/share/b3d02f46-ded9-4ad5-bf6d-7eff8f3f018e", | ||
}, | ||
{ | ||
"img_url": "/static/img/chatgpt_logo.png", | ||
"title": "Python reduce function", | ||
"descr": "Two breif examples of how 'functools.reduce' works.", | ||
"file_url": "https://chat.openai.com/share/2de6f54c-84d3-40f2-b6bc-76a54b8f2f27", | ||
}, | ||
] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,25 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>code</title> | ||
{% load static %} | ||
{% load home_tags %} | ||
<title>code</title> | ||
<link rel="stylesheet" type="text/css" href="{% static 'css/main.css' %}"> | ||
<link rel="stylesheet" type="text/css" href="{% static 'css/code.css' %}"> | ||
<link rel="shortcut icon" type="image/png" href="{% static 'favicon.ico' %}"/> | ||
</head> | ||
|
||
<body> | ||
{% include "includes/navbar.html" %} | ||
{% include "includes/navbar2.html" %} | ||
|
||
<div class="container"> | ||
{% for item in code_list %} | ||
<div class="card"> | ||
<a href= "{{ item.file_loc.url }}" class="card"> | ||
<img src="{{ item.img_loc.url }}" class="card"> | ||
<h3>{{ item.title }}</h3> | ||
<p>{{ item.descr }}</p> | ||
</a> | ||
</div> | ||
{% card img_url=item.img_loc.url title=item.title descr=item.descr file_url=item.file_loc.url %} | ||
{% endfor %} | ||
</div> | ||
|
||
|
||
{% include "includes/footer.html" %} | ||
</body> | ||
|
||
</html> | ||
</html> |
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
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
Oops, something went wrong.