diff --git a/app.py b/app.py new file mode 100644 index 0000000..2bac2fc --- /dev/null +++ b/app.py @@ -0,0 +1,75 @@ +# /// script +# dependencies = ["flask", "flask_cors", "waitress", "markdown"] +# /// +import os +import json +import markdown +from flask import Flask, render_template, send_from_directory +from flask_cors import CORS + +app = Flask(__name__, template_folder='.', static_folder='static') + +CORS(app) + +@app.route("/favicon.ico") +def favicon(): + return send_from_directory( + os.path.join(app.root_path, 'static/assets/favicon.ico'), + 'favicon.ico', mimetype='image/x-icon' + ) + + +@app.errorhandler(404) +def not_found(e): + return render_template("./templates/not_found.html") + +@app.route("/home") +def home(): + return render_template("./templates/home.html") + +@app.route("/") +def index(): + return render_template("./templates/home.html") + +@app.route("/posts") +def posts(): + posts = [] + for folder in os.listdir("./static/posts"): + with open(os.path.join("./static/posts", folder, "metadata.json"), "r") as f: + metadata = json.load(f) + + post = { + "post_id": folder, + "metadata": metadata, + } + + posts.append(post) + + return render_template("./templates/post_list.html", posts=posts) + + +@app.route("/posts/") +def get_post(post_id): + for folder in os.listdir("./static/posts"): + if folder == post_id: + with open(os.path.join("./static/posts", folder, "metadata.json"), "r") as f: + metadata = json.load(f) + with open(os.path.join("./static/posts", folder, "post.md"), "r") as f: + post_md = f.read() + post_html = markdown.markdown(post_md, extensions=["tables"]) + + post = { + "post_id": post_id, + "metadata": metadata, + "post_md": post_html, + } + + return render_template("./templates/post.html", post=post) + + return render_template("./templates/not_found.html") + + + +if __name__ == "__main__": + from waitress import serve + serve(app, host="0.0.0.0", port=8080) diff --git a/archive posts/MECC2024/images/arch.png b/archive posts/MECC2024/images/arch.png new file mode 100644 index 0000000..af8af37 Binary files /dev/null and b/archive posts/MECC2024/images/arch.png differ diff --git a/archive posts/MECC2024/metadata.json b/archive posts/MECC2024/metadata.json new file mode 100644 index 0000000..836f82c --- /dev/null +++ b/archive posts/MECC2024/metadata.json @@ -0,0 +1,7 @@ +{ + "title": "Using Graph attention to get graphs", + "date": "05-30-2025", + "description": "A little post to test stuff out", + "image": "None", + "tags": ["very", "gay"] +} \ No newline at end of file diff --git a/archive posts/MECC2024/post.md b/archive posts/MECC2024/post.md new file mode 100644 index 0000000..20aa327 --- /dev/null +++ b/archive posts/MECC2024/post.md @@ -0,0 +1,12 @@ +# Introduction + + + +# Section 1 + + +| ![Architecture Diagram](https://akshaykolli.net/static/posts/MECC2024/images/arch.png) | +|:--:| +| *Architecture of the Model* | + +this is an image \ No newline at end of file diff --git a/static/assets/courier_prime/.DS_Store b/static/assets/courier_prime/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/static/assets/courier_prime/.DS_Store differ diff --git a/static/assets/courier_prime/Read me.txt b/static/assets/courier_prime/Read me.txt new file mode 100644 index 0000000..c49013f --- /dev/null +++ b/static/assets/courier_prime/Read me.txt @@ -0,0 +1,44 @@ +ABOUT COURIER PRIME +=================== + +Courier Prime is a TrueType monospaced font designed specifically for screenplays. It was designed by Alan Dague-Greene for John August and released by Quote-Unquote Apps under the SIL Open Font License (OFL). + +Visit http://quoteunquoteapps.com/courierprime for more information and the latest updates. + +SIL Open Font License: http://scripts.sil.org/OFL + +INSTALLATION +============ + +Mac OS X: + +Select all the font files and double-click the selected files. Then, click 'Install Font' at the bottom of the preview window. + +Windows 7 & 8: + +The easiest way to install a font is to double-click on a font file to open the font preview and select 'Install'. + +Windows Vista: + +To install a TrueType or OpenType font on Windows Vista, right-click on the font file and then select 'Install'. You can also drag or paste a font into the Fonts Control Panel. + +Windows XP: + +1. From the 'Start' menu select 'Control Panel', then select the 'Appearance and Themes' category. + +2. Select 'Fonts' from the 'See Also' panel at the left of this screen. + +3. On the 'File' menu, select 'Install New Font...' + +4. Click the drive and folder that contain the fonts you want to add. + +5. To select more than one font to add, press and hold down the CTRL key, click the fonts you want, then click on 'OK'. + +For more information on installing fonts on Windows, visit this link: http://www.microsoft.com/typography/truetypeinstall.mspx + + +CHANGELOG +========= + +January 25, 2013 Courier Prime version 1.203 +- Initial release diff --git a/static/assets/courier_prime/courer_prime_italic.ttf b/static/assets/courier_prime/courer_prime_italic.ttf new file mode 100644 index 0000000..75a1343 Binary files /dev/null and b/static/assets/courier_prime/courer_prime_italic.ttf differ diff --git a/static/assets/courier_prime/courier_prime.ttf b/static/assets/courier_prime/courier_prime.ttf new file mode 100644 index 0000000..db4e6c1 Binary files /dev/null and b/static/assets/courier_prime/courier_prime.ttf differ diff --git a/static/assets/courier_prime/courier_prime_bold.ttf b/static/assets/courier_prime/courier_prime_bold.ttf new file mode 100644 index 0000000..1b0888c Binary files /dev/null and b/static/assets/courier_prime/courier_prime_bold.ttf differ diff --git a/static/assets/courier_prime/courier_prime_bold_italic.ttf b/static/assets/courier_prime/courier_prime_bold_italic.ttf new file mode 100644 index 0000000..d4e7186 Binary files /dev/null and b/static/assets/courier_prime/courier_prime_bold_italic.ttf differ diff --git a/static/assets/favicon.ico b/static/assets/favicon.ico new file mode 100644 index 0000000..b7cbbab Binary files /dev/null and b/static/assets/favicon.ico differ diff --git a/static/assets/images/dp.jpeg b/static/assets/images/dp.jpeg new file mode 100644 index 0000000..79ddf1d Binary files /dev/null and b/static/assets/images/dp.jpeg differ diff --git a/static/style.css b/static/style.css new file mode 100644 index 0000000..fa7c28b --- /dev/null +++ b/static/style.css @@ -0,0 +1,125 @@ +@font-face { + font-family: "typewriter"; + src: url("assets/courier_prime/courier_prime.ttf") format("truetype"); + font-weight: normal; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: "typewriter"; + src: url("assets/courier_prime/courier_prime_bold.ttf") format("truetype"); + font-weight: bold; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: "typewriter"; + src: url("assets/courier_prime/courier_prime_italic.ttf") format("truetype"); + font-weight: normal; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: "typewriter"; + src: url("assets/courier_prime/courier_prime_bold_italic.ttf") format("truetype"); + font-weight: bold; + font-style: italic; + font-display: swap; +} + +h1, h3, p { + font-family: "typewriter"; + font-weight: normal; +} + +h1 { + margin-bottom: 0; +} + +h3 { + margin-top: 0; +} + + +a { + text-decoration: none !important; + color: inherit !important; + font-family: 'typewriter'; + font-size: 20px; + margin: 4px; +} + +.posts { + display: block; + text-align: center; + align-items: center; + justify-items: center; + justify-content: center; +} + +#posts-title { + font-family: "typewriter"; + margin-bottom: 8rem; +} + +#post_listing { + justify-items: left; + text-align: left; + margin-left: 100px; + /* border: 2px solid black; */ + background-color: rgb(166, 156, 156, 0.1) ; + padding-left: 10px; + padding-right: 10px; + padding-top: 1px; + border-radius: 10px; + margin-top: 0; + padding-top: 4px; + +} + +#post_listing h1 { + margin-top: 4px; +} + +#post_listing h3 { + margin-bottom: 4px; + padding-bottom: 4px; +} + +.post { + justify-items: center; + text-align: center; + align-items: center; + width: 50%; + margin-left: auto; + margin-right: auto; +} + +.post_meta { + justify-items: center; + text-align: center; + align-items: center; +} + +.post_body { + width: 100%; + justify-items: left; + text-align: left; + align-items: left; + margin-bottom: 0; + padding-left: 10%; + /* padding-right: 20%; */ + font-family: "typewriter"; +} + +.post_body h1 h2 h3 { + font-family: "typewriter"; +} + +table { + margin-left: auto; + margin-right: auto; +} diff --git a/templates/home.html b/templates/home.html new file mode 100644 index 0000000..3a89a06 --- /dev/null +++ b/templates/home.html @@ -0,0 +1,33 @@ + + + + + Akshay Kolli + + + + + + + + +
Posts Home + Code +
+ + + +

Akshay Kolli

+

CS PhD candidate at UMass Lowell

+

+ Hello! I love ALMOST everything about machine learning, software engineering, physics, Jimi Hendrix and building stuff in general. + I do stuff with CUDA (Nvidia please be nicer to people), Python and Rust. Always excited about new hardware and software. Do reach out to me if you + you want to tell me about cool stuff. + + +

+

+ reach me at echo -n "YWtzaGF5a29sbGlAaG90bWFpbC5jb20=" | base64 --decode. +

+ + \ No newline at end of file diff --git a/templates/not_found.html b/templates/not_found.html new file mode 100644 index 0000000..ba89c69 --- /dev/null +++ b/templates/not_found.html @@ -0,0 +1,32 @@ + +< + + + + Akshay Kolli + + + + + + + +

404 ERROR

+ + + \ No newline at end of file diff --git a/templates/post.html b/templates/post.html new file mode 100644 index 0000000..8eaf7e0 --- /dev/null +++ b/templates/post.html @@ -0,0 +1,32 @@ + + + + + Akshay Kolli + + + + + + + + + +
Posts Home
+
+ + + +
+ {{ post.post_md| safe }} +
+ +
+ + + + \ No newline at end of file diff --git a/templates/post_list.html b/templates/post_list.html new file mode 100644 index 0000000..1b8b846 --- /dev/null +++ b/templates/post_list.html @@ -0,0 +1,36 @@ + + + + + Akshay Kolli + + + + + + + + +
Posts Home
+ + +

Posts

+ {% if posts|length == 0 %} +

Well this is awkward, I swear I had some posts

+ + {% endif %} + {% for post in posts %} + +
+ +

{{ post.metadata.title }}

+

{{ post.metadata.date }}

+

{{ post.metadata.description }}

+ +
+
+ {% endfor %} + +
+ + \ No newline at end of file