From 2159e47e287920c1a89188ba789329344e952034 Mon Sep 17 00:00:00 2001 From: jwansek Date: Tue, 29 Apr 2025 20:28:44 +0100 Subject: Various bug fixes --- Dockerfile | 2 +- docker-compose.yml | 4 ++-- edaweb/app.py | 4 ++-- edaweb/static/images/random.jpg | Bin 0 -> 202536 bytes papers.md | 25 +++++++++++++++++++++++++ scripts/export.sh | 2 +- scripts/update.sh | 2 +- 7 files changed, 32 insertions(+), 7 deletions(-) create mode 100644 edaweb/static/images/random.jpg create mode 100644 papers.md diff --git a/Dockerfile b/Dockerfile index 67b38ff..7fdac3d 100755 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:22.10 +FROM ubuntu:jammy-20250404 MAINTAINER Eden Attenborough "eden.attenborough@outlook.com" ENV TZ=Europe/London RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone diff --git a/docker-compose.yml b/docker-compose.yml index 3d5c58e..67976bf 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,8 +7,8 @@ services: image: reg.reaweb.uk/edaweb volumes: - /tmp/:/media/ISOs/ - - ./static/:/app/static/ - - ./edaweb.conf:/app/edaweb.conf + - ./edaweb/static/:/app/edaweb/static/ + - ./edaweb.conf:/app/edaweb/edaweb.conf - ./edaweb-docker.pem:/keys/docker-key.pem ports: - "6969:6969" diff --git a/edaweb/app.py b/edaweb/app.py index 6902fe4..436df7a 100644 --- a/edaweb/app.py +++ b/edaweb/app.py @@ -17,7 +17,7 @@ import io app = flask.Flask(__name__) CONFIG = configparser.ConfigParser(interpolation = None) -CONFIG.read("edaweb.conf") +CONFIG.read(os.path.join(os.path.dirname(__file__), "edaweb.conf")) shown_images = set() shown_sidebar_images = set() @@ -224,7 +224,7 @@ def serve_random(): sbi = services.get_random_image(tags) req = urllib.request.Request(sbi.imurl) mediaContent = urllib.request.urlopen(req).read() - with open(os.path.join("static", "images", "random.jpg"), "wb") as f: + with open(os.path.join(os.path.dirname(__file__), "static", "images", "random.jpg"), "wb") as f: f.write(mediaContent) with database.Database() as db: diff --git a/edaweb/static/images/random.jpg b/edaweb/static/images/random.jpg new file mode 100644 index 0000000..4e23beb Binary files /dev/null and b/edaweb/static/images/random.jpg differ diff --git a/papers.md b/papers.md new file mode 100644 index 0000000..8da5119 --- /dev/null +++ b/papers.md @@ -0,0 +1,25 @@ +this page lists some of the papers i have written! it's not an exhaustive list, just mostly the ones i'm most proud of the latex of + +## published papers + +i pinky promise i've had academic papers published, im just going to add them when they've actually been published not just accepted + +## coursework + +### level 7 + +#### advanced ai + + + +this was part of the assessment for an 'advanced ai' module, it mostly pertains to bayesian networks + +#### advanced robotics + + + +this assessment pertains to learning from demonstration with manipulators in robotics, and mostly talks about and does some experiments with dynamic movement primitives (DMPs) and stable estimator of dynamic systems (SEDs) + + + + diff --git a/scripts/export.sh b/scripts/export.sh index c65a6e9..1d17cf1 100755 --- a/scripts/export.sh +++ b/scripts/export.sh @@ -9,4 +9,4 @@ read export_name echo "Exporting blog post " $id " to " $export_name touch $export_name -sudo docker run -it --entrypoint python3 -v "$(pwd)/edaweb.conf":/app/edaweb.conf -v "$(pwd)/$export_name":/app/$export_name --network mariadb --rm reg.reaweb.uk/edaweb /app/parser.py export -i $id -u root -o $export_name +sudo docker run -it --entrypoint python3 -v "$(pwd)/edaweb.conf":/app/edaweb/edaweb.conf -v "$(pwd)/$export_name":/app/$export_name --network mariadb --rm reg.reaweb.uk/edaweb /app/edaweb/parser.py export -i $id -u root -o $export_name diff --git a/scripts/update.sh b/scripts/update.sh index b082f18..fe225cb 100755 --- a/scripts/update.sh +++ b/scripts/update.sh @@ -3,4 +3,4 @@ echo -n "Input blog post ID to update: " read id -sudo docker run -it --entrypoint python3 -v "$(pwd)/edaweb.conf":/app/edaweb.conf -v "$(pwd)/$1":/app/$1 --network mariadb --rm reg.reaweb.uk/edaweb /app/parser.py update -i $id -u root -m $1 +sudo docker run -it --entrypoint python3 -v "$(pwd)/edaweb.conf":/app/edaweb/edaweb.conf -v "$(pwd)/$1":/app/$1 --network mariadb --rm reg.reaweb.uk/edaweb /app/edaweb/parser.py update -i $id -u root -m $1 -- cgit v1.2.3