WASM-powered codespaces for Python notebooks on GitHub
What my project does
During a hackweek, we built this project that allows you to run marimo and Jupyter notebooks directly from GitHub in a Wasm-powered, codespace-like environment. What makes this powerful is that we mount the GitHub repository's contents as a filesystem in the notebook, making it really easy to share notebooks with data.
All you need to do is prepend 'https://marimo.app' to any Python notebook on GitHub. Some examples:
Jupyter Notebook: [https://marimo.app/github.com/jakevdp/PythonDataScienceHandb...](https://marimo.app/github.com/jakevdp/PythonDataScienceHandbook/blob/master/notebooks/02.08-Sorting.ipynb)
marimo notebook: https://marimo.app/github.com/marimo-team/marimo/blob/07e8d1...
Jupyter notebooks are automatically converted into marimo notebooks using basic static analysis and source code transformations. Our conversion logic assumes the notebook was meant to be run top-down, which is usually but not always true [2\]. It can convert many notebooks, but there are still some edge cases.
We implemented the filesystem mount using our own FUSE-like adapter that links the GitHub repository’s contents to the Python filesystem, leveraging Emscripten’s filesystem API. The file tree is loaded on startup to avoid waterfall requests when reading many directories deep, but loading the file contents is lazy. For example, when you write Python that looks like
with open("./data/cars.csv") as f:
print(f.read())
# or
/r/Python
https://redd.it/1i270co
What my project does
During a hackweek, we built this project that allows you to run marimo and Jupyter notebooks directly from GitHub in a Wasm-powered, codespace-like environment. What makes this powerful is that we mount the GitHub repository's contents as a filesystem in the notebook, making it really easy to share notebooks with data.
All you need to do is prepend 'https://marimo.app' to any Python notebook on GitHub. Some examples:
Jupyter Notebook: [https://marimo.app/github.com/jakevdp/PythonDataScienceHandb...](https://marimo.app/github.com/jakevdp/PythonDataScienceHandbook/blob/master/notebooks/02.08-Sorting.ipynb)
marimo notebook: https://marimo.app/github.com/marimo-team/marimo/blob/07e8d1...
Jupyter notebooks are automatically converted into marimo notebooks using basic static analysis and source code transformations. Our conversion logic assumes the notebook was meant to be run top-down, which is usually but not always true [2\]. It can convert many notebooks, but there are still some edge cases.
We implemented the filesystem mount using our own FUSE-like adapter that links the GitHub repository’s contents to the Python filesystem, leveraging Emscripten’s filesystem API. The file tree is loaded on startup to avoid waterfall requests when reading many directories deep, but loading the file contents is lazy. For example, when you write Python that looks like
with open("./data/cars.csv") as f:
print(f.read())
# or
/r/Python
https://redd.it/1i270co
GitHub
GitHub - marimo-team/marimo: A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script…
A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor....
What is the best way to ban someone's IP?
Long story short, I operate a golf wiki, and it's grown enough to have my first horrific and racist troll updating courses with wildly inappropriate things.
It's pretty clear that this person *doesn't realize your full IP is posted with any anonymous edit*.
Having never encountered this problem before, I'm trying to figure out an effective way of taking edit privileges away without the user trying to find a workaround.
First however, I need to know which IP to ban. I've been using **request.access_route** rather than **request.remote_addr** because it seems to be more complete, but I'm going to be honest that I'm not entirely sure whether that is necessary.
It seem like the best method would be to use **request.access_route**, but then to take the -1th list item from that list and ban that? Or should I simple ban the entire access route.
I don't want to accidentally ban the public library, but we don't exactly have access to mac addresses... so... I'm not entirely sure what to do.
Any advice from someone who is better informed on networking stuff?
/r/flask
https://redd.it/1i27y66
Long story short, I operate a golf wiki, and it's grown enough to have my first horrific and racist troll updating courses with wildly inappropriate things.
It's pretty clear that this person *doesn't realize your full IP is posted with any anonymous edit*.
Having never encountered this problem before, I'm trying to figure out an effective way of taking edit privileges away without the user trying to find a workaround.
First however, I need to know which IP to ban. I've been using **request.access_route** rather than **request.remote_addr** because it seems to be more complete, but I'm going to be honest that I'm not entirely sure whether that is necessary.
It seem like the best method would be to use **request.access_route**, but then to take the -1th list item from that list and ban that? Or should I simple ban the entire access route.
I don't want to accidentally ban the public library, but we don't exactly have access to mac addresses... so... I'm not entirely sure what to do.
Any advice from someone who is better informed on networking stuff?
/r/flask
https://redd.it/1i27y66
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Apache or Nginx
What's better to use on Django project with mysql bd as a web-server, apache or nginx?
/r/django
https://redd.it/1i213fe
What's better to use on Django project with mysql bd as a web-server, apache or nginx?
/r/django
https://redd.it/1i213fe
Reddit
From the django community on Reddit
Explore this post and more from the django community
Thursday Daily Thread: Python Careers, Courses, and Furthering Education!
# Weekly Thread: Professional Use, Jobs, and Education 🏢
Welcome to this week's discussion on Python in the professional world! This is your spot to talk about job hunting, career growth, and educational resources in Python. Please note, this thread is not for recruitment.
---
## How it Works:
1. Career Talk: Discuss using Python in your job, or the job market for Python roles.
2. Education Q&A: Ask or answer questions about Python courses, certifications, and educational resources.
3. Workplace Chat: Share your experiences, challenges, or success stories about using Python professionally.
---
## Guidelines:
- This thread is not for recruitment. For job postings, please see r/PythonJobs or the recruitment thread in the sidebar.
- Keep discussions relevant to Python in the professional and educational context.
---
## Example Topics:
1. Career Paths: What kinds of roles are out there for Python developers?
2. Certifications: Are Python certifications worth it?
3. Course Recommendations: Any good advanced Python courses to recommend?
4. Workplace Tools: What Python libraries are indispensable in your professional work?
5. Interview Tips: What types of Python questions are commonly asked in interviews?
---
Let's help each other grow in our careers and education. Happy discussing! 🌟
/r/Python
https://redd.it/1i2botq
# Weekly Thread: Professional Use, Jobs, and Education 🏢
Welcome to this week's discussion on Python in the professional world! This is your spot to talk about job hunting, career growth, and educational resources in Python. Please note, this thread is not for recruitment.
---
## How it Works:
1. Career Talk: Discuss using Python in your job, or the job market for Python roles.
2. Education Q&A: Ask or answer questions about Python courses, certifications, and educational resources.
3. Workplace Chat: Share your experiences, challenges, or success stories about using Python professionally.
---
## Guidelines:
- This thread is not for recruitment. For job postings, please see r/PythonJobs or the recruitment thread in the sidebar.
- Keep discussions relevant to Python in the professional and educational context.
---
## Example Topics:
1. Career Paths: What kinds of roles are out there for Python developers?
2. Certifications: Are Python certifications worth it?
3. Course Recommendations: Any good advanced Python courses to recommend?
4. Workplace Tools: What Python libraries are indispensable in your professional work?
5. Interview Tips: What types of Python questions are commonly asked in interviews?
---
Let's help each other grow in our careers and education. Happy discussing! 🌟
/r/Python
https://redd.it/1i2botq
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Explore OSS built in the Flask ecosystem!
Hi r/flask ! I'm part of a small team building a new discovery tool for open source called **market.dev**. It's a way to easily search and browse what's happening in OSS - for projects, people, and resources. Here's the Flask ecosystem at a glance.
We built this because we wanted an ecosystem centric view of open source, auto-categorized and easily to keep up with. We also wanted to explore a **redesigned project view** with focus on what the repo is about, community info, package downloads where available, related projects and the ability to compare repos easily.
Here's what else you can use this for:
[Find other people in the Flask comunity](https://market.dev/ecosystems/flask/experts), and filter by location
Find Flask projects looking for contributors
There's a lot still to do - search and comparisons are two things we're focused on right now. But I would love some feedback from this sub to see how useful this is to you, and any features you'd like to see!
Thanks so much in advance for any feedback!
/r/flask
https://redd.it/1i27xs4
Hi r/flask ! I'm part of a small team building a new discovery tool for open source called **market.dev**. It's a way to easily search and browse what's happening in OSS - for projects, people, and resources. Here's the Flask ecosystem at a glance.
We built this because we wanted an ecosystem centric view of open source, auto-categorized and easily to keep up with. We also wanted to explore a **redesigned project view** with focus on what the repo is about, community info, package downloads where available, related projects and the ability to compare repos easily.
Here's what else you can use this for:
[Find other people in the Flask comunity](https://market.dev/ecosystems/flask/experts), and filter by location
Find Flask projects looking for contributors
There's a lot still to do - search and comparisons are two things we're focused on right now. But I would love some feedback from this sub to see how useful this is to you, and any features you'd like to see!
Thanks so much in advance for any feedback!
/r/flask
https://redd.it/1i27xs4
market.dev
Business tools for developers.
Any well known open-source python packages use Astral's uv tool?
I'm looking a Astral's uv, and it seems very interesting to manage applications and their dependencies. Even for internal packages I can see its use, but I'm having a hard time seen the workflow for an open-source public package where you need to support multiple Python versions and test with them.
Do you know of any open-source package project that uses uv in its workflow?
/r/Python
https://redd.it/1i20lvm
I'm looking a Astral's uv, and it seems very interesting to manage applications and their dependencies. Even for internal packages I can see its use, but I'm having a hard time seen the workflow for an open-source public package where you need to support multiple Python versions and test with them.
Do you know of any open-source package project that uses uv in its workflow?
/r/Python
https://redd.it/1i20lvm
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
How do I run a standlone function in Django?
I have this function in a module. (not in views). Which processes some data periodically and saves the results. But Celery is giving me issues running it and I don't know if the function actually works as intended or not. So I want to run that function only for testing. How do I do this?
/r/djangolearning
https://redd.it/1i2ka0x
I have this function in a module. (not in views). Which processes some data periodically and saves the results. But Celery is giving me issues running it and I don't know if the function actually works as intended or not. So I want to run that function only for testing. How do I do this?
/r/djangolearning
https://redd.it/1i2ka0x
Reddit
From the djangolearning community on Reddit
Explore this post and more from the djangolearning community
AutoResearch: A Pure-Python open-source LLM-driven research automation tool
Hello, everyone
I recently developed a new open-source LLM-driven research automation tool, called AutoResearch. It can automatically conduct various tasks related to machine learning research, the key function is:
Topic-to-Survey Automation \- In one sentence, it converts a topic or research question into a comprehensive survey of relevant papers. It generates keywords, retrieves articles for each keyword, merges duplicate articles, ranks articles based on their impacts, summarizes the articles from the topic, method, to results, and optionally checks code availability. It also organizes and zips results for easy access.
When searching for research papers, the results from a search engine can vary significantly depending on the specific keywords used, even if those keywords are conceptually similar. For instance, searching for "LLMs" versus "Large Language Models" may yield different sets of papers. Additionally, when experimenting with new keywords, it can be challenging to remember whether a particular paper has already been checked. Furthermore, the process of downloading papers and organizing them with appropriate filenames can be tedious and time-consuming.
This tool streamlines the entire process by automating several key tasks. It suggests multiple related keywords to ensure comprehensive coverage of the topic, merges duplicate results to avoid redundancy, and automatically names downloaded files using the paper
/r/Python
https://redd.it/1i2lw4i
Hello, everyone
I recently developed a new open-source LLM-driven research automation tool, called AutoResearch. It can automatically conduct various tasks related to machine learning research, the key function is:
Topic-to-Survey Automation \- In one sentence, it converts a topic or research question into a comprehensive survey of relevant papers. It generates keywords, retrieves articles for each keyword, merges duplicate articles, ranks articles based on their impacts, summarizes the articles from the topic, method, to results, and optionally checks code availability. It also organizes and zips results for easy access.
When searching for research papers, the results from a search engine can vary significantly depending on the specific keywords used, even if those keywords are conceptually similar. For instance, searching for "LLMs" versus "Large Language Models" may yield different sets of papers. Additionally, when experimenting with new keywords, it can be challenging to remember whether a particular paper has already been checked. Furthermore, the process of downloading papers and organizing them with appropriate filenames can be tedious and time-consuming.
This tool streamlines the entire process by automating several key tasks. It suggests multiple related keywords to ensure comprehensive coverage of the topic, merges duplicate results to avoid redundancy, and automatically names downloaded files using the paper
/r/Python
https://redd.it/1i2lw4i
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
DeepEval: The Open-Source LLM Evaluation Framework
Hello everyone, I've been working on DeepEval over the past \~1 year and managed to somehow grow it to almost half a million monthly downloads now. I thought it would be nice to share what it does and how may it help.
What My Project Does
DeepEval is an open source LLM evaluation framework that started off as "Pytest for LLMs". This resonated surprisingly well with the python community and those on hackernews, which really motivated me to keep working on it since. DeepEval offers a ton of evaluation metrics powered by LLMs (yes a bit weird I know, but trust me on this one), as well as a whole ecosystem to generate evaluation datasets to help you get up and running with LLM testing even if you have no testset to start with.
In a nutshell, it has:
(Mostly) Research backed, SOTA metrics covering chatbots, agents, and RAG.
Dataset generation, very useful for those with no evaluation dataset and don't have time to prepare one.
Tightly integrated with Pytest. Lots of big companies turns out are including DeepEval in their CI/Cd pipelines
Free platform to store datasets, evaluation results, catch regressions, etc.
Who is this for?
DeepEval is for anyone building LLM applications, or
/r/Python
https://redd.it/1i2kafp
Hello everyone, I've been working on DeepEval over the past \~1 year and managed to somehow grow it to almost half a million monthly downloads now. I thought it would be nice to share what it does and how may it help.
What My Project Does
DeepEval is an open source LLM evaluation framework that started off as "Pytest for LLMs". This resonated surprisingly well with the python community and those on hackernews, which really motivated me to keep working on it since. DeepEval offers a ton of evaluation metrics powered by LLMs (yes a bit weird I know, but trust me on this one), as well as a whole ecosystem to generate evaluation datasets to help you get up and running with LLM testing even if you have no testset to start with.
In a nutshell, it has:
(Mostly) Research backed, SOTA metrics covering chatbots, agents, and RAG.
Dataset generation, very useful for those with no evaluation dataset and don't have time to prepare one.
Tightly integrated with Pytest. Lots of big companies turns out are including DeepEval in their CI/Cd pipelines
Free platform to store datasets, evaluation results, catch regressions, etc.
Who is this for?
DeepEval is for anyone building LLM applications, or
/r/Python
https://redd.it/1i2kafp
Reddit
From the Python community on Reddit: DeepEval: The Open-Source LLM Evaluation Framework
Explore this post and more from the Python community
Is it a good practice to wrap immutable values in list's or other mutable types to make them mutable
so the question is really simple is it this good practice
def modx(x):
x[0] += 1
val = [42]
modx(val)
is this ok to do I dont have a spesific use case for this except maybe implementing a some data structures. I am just wondering if this is a good/bad practice GENERALLY
/r/Python
https://redd.it/1i25y78
so the question is really simple is it this good practice
def modx(x):
x[0] += 1
val = [42]
modx(val)
is this ok to do I dont have a spesific use case for this except maybe implementing a some data structures. I am just wondering if this is a good/bad practice GENERALLY
/r/Python
https://redd.it/1i25y78
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Flask in AWS Lambda not showing favicon
I have an AWS lambda built using Flask, served through API Gateway. This is deployed to AWS using Terraform. I am unable to get the favicon to load correctly when deployed through this method. The favicon works flawlessly on my local machine.
Following the advice discovered here, I am able to get the icon URL to no longer return a 502; it returns a 200. However, the icon is unable to be displayed. I can navigate directly to the icon in the browser, but I still have the same undisplayed image.
I have tried using a PNG instead of ICO, with the same results.
Of note, when I am able to see the icon locally, I see it loads with type image/x-icon, but remotely it loads as image/vnd.microsoft.icon.
My handler setup:
def handler(event, context):
base64contenttypes = "image/vnd.microsoft.icon", "image/x-icon"
return awsgi.response(app, event, context, base64contenttypes)
HTML link
favicon.ico is stored in the /static directory.
API specs in Terraform
resource "awsapigatewayrestapi" "api" {
body = jsonencode({
"openapi" : "3.0.1",
/r/flask
https://redd.it/1i2shcl
I have an AWS lambda built using Flask, served through API Gateway. This is deployed to AWS using Terraform. I am unable to get the favicon to load correctly when deployed through this method. The favicon works flawlessly on my local machine.
Following the advice discovered here, I am able to get the icon URL to no longer return a 502; it returns a 200. However, the icon is unable to be displayed. I can navigate directly to the icon in the browser, but I still have the same undisplayed image.
I have tried using a PNG instead of ICO, with the same results.
Of note, when I am able to see the icon locally, I see it loads with type image/x-icon, but remotely it loads as image/vnd.microsoft.icon.
My handler setup:
def handler(event, context):
base64contenttypes = "image/vnd.microsoft.icon", "image/x-icon"
return awsgi.response(app, event, context, base64contenttypes)
HTML link
<link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}">favicon.ico is stored in the /static directory.
API specs in Terraform
resource "awsapigatewayrestapi" "api" {
body = jsonencode({
"openapi" : "3.0.1",
/r/flask
https://redd.it/1i2shcl
Plotly Community Forum
Serving favicon for Dash applications on AWS Lambda + API Gateway
While using AWS Lambda + AWS API Gateway for hosting and accessing my Dash applications, I had a lot of issues getting the favicon to load for my apps. After extensive trial and error, I finally found a solution and wanted to share it here, since solutions…
fruitstand: A Library for Regression Testing LLMs
I have recently been finished the first version of a library I've been working on called fruitstand
What My Project Does
fruitstand is a Python library designed to regression test large language models (LLMs). Unlike traditional deterministic functions, LLMs are inherently nondeterministic, making it challenging to verify that a model upgrade or switch maintains the desired behavior.
fruitstand addresses this by allowing developers to:
• Create a Baseline: Capture responses from a current LLM for specific test queries.
• Test New Models: Compare responses from other models or updated versions against the baseline.
• Set a Similarity Threshold: Ensure that new responses are sufficiently similar to the baseline, thereby maintaining consistent application behavior.
This is particularly useful for tasks like intent detection in chatbots or other applications where maintaining a consistent response is critical during model updates.
Target Audience
fruitstand is primarily aimed at developers and data scientists working with LLMs in production environments. It is useful for:
• Ensuring Consistency: For applications where consistent behavior across LLM versions is critical, like chatbots or automated customer support.
• Regression Testing: Those who want to automate the process of verifying that new model versions do not degrade the performance of their systems.
• LLM Comparison: Anyone looking to switch between different LLM providers
/r/Python
https://redd.it/1i2u3nh
I have recently been finished the first version of a library I've been working on called fruitstand
What My Project Does
fruitstand is a Python library designed to regression test large language models (LLMs). Unlike traditional deterministic functions, LLMs are inherently nondeterministic, making it challenging to verify that a model upgrade or switch maintains the desired behavior.
fruitstand addresses this by allowing developers to:
• Create a Baseline: Capture responses from a current LLM for specific test queries.
• Test New Models: Compare responses from other models or updated versions against the baseline.
• Set a Similarity Threshold: Ensure that new responses are sufficiently similar to the baseline, thereby maintaining consistent application behavior.
This is particularly useful for tasks like intent detection in chatbots or other applications where maintaining a consistent response is critical during model updates.
Target Audience
fruitstand is primarily aimed at developers and data scientists working with LLMs in production environments. It is useful for:
• Ensuring Consistency: For applications where consistent behavior across LLM versions is critical, like chatbots or automated customer support.
• Regression Testing: Those who want to automate the process of verifying that new model versions do not degrade the performance of their systems.
• LLM Comparison: Anyone looking to switch between different LLM providers
/r/Python
https://redd.it/1i2u3nh
GitHub
GitHub - deckard-designs/fruitstand: A library for regression testing llm prompts
A library for regression testing llm prompts. Contribute to deckard-designs/fruitstand development by creating an account on GitHub.
I wrote optimizers for TensorFlow and Keras
What My Project Does:
This library implements optimizers for TensorFlow and Keras that are used in the same way as Keras optimizers. This library contains optimizers that Keras doesn't include. You can use these optimizers on models built with TensorFlow or Keras.
Target Audience:
This library is helpful for anyone using TensorFlow and Keras.
Comparison:
This library implements optimizers not included in Keras.
https://github.com/NoteDance/optimizers
/r/Python
https://redd.it/1i2r7z0
What My Project Does:
This library implements optimizers for TensorFlow and Keras that are used in the same way as Keras optimizers. This library contains optimizers that Keras doesn't include. You can use these optimizers on models built with TensorFlow or Keras.
Target Audience:
This library is helpful for anyone using TensorFlow and Keras.
Comparison:
This library implements optimizers not included in Keras.
https://github.com/NoteDance/optimizers
/r/Python
https://redd.it/1i2r7z0
GitHub
GitHub - NoteDance/optimizers at producthunt
This project implements optimizers for TensorFlow and Keras, which can be used in the same way as Keras optimizers. Machine learning, Deep learning - GitHub - NoteDance/optimizers at producthunt
My first django project
Hi, I am a college 2nd year trying to get more experience and I learned Django for around 3ish months. With learning, I made this simple project and I wanted to get feedback on where I can improve and if this is good enough to put on my resume. The only thing I'm worried about is if these projects are overdone and putting on my resume is worth it. Thank you! This is the Github: https://github.com/Ryan11c/mathify the live version is also linked inside the repo!
/r/django
https://redd.it/1i2u65w
Hi, I am a college 2nd year trying to get more experience and I learned Django for around 3ish months. With learning, I made this simple project and I wanted to get feedback on where I can improve and if this is good enough to put on my resume. The only thing I'm worried about is if these projects are overdone and putting on my resume is worth it. Thank you! This is the Github: https://github.com/Ryan11c/mathify the live version is also linked inside the repo!
/r/django
https://redd.it/1i2u65w
GitHub
GitHub - Ryan11c/mathify: Full-stack web application offering math tools and resources. Made with Django, Bootstrap 5, HTML, CSS…
Full-stack web application offering math tools and resources. Made with Django, Bootstrap 5, HTML, CSS, and JavaScript - Ryan11c/mathify
Building a Machine Learning Model from Scratch in Python
Model Architecture, Evaluation, Data Prep, and more covered in a tutorial: https://codedoodles.substack.com/p/build-your-own-machine-learning-model
/r/Python
https://redd.it/1i2z59j
Model Architecture, Evaluation, Data Prep, and more covered in a tutorial: https://codedoodles.substack.com/p/build-your-own-machine-learning-model
/r/Python
https://redd.it/1i2z59j
Substack
Build your own Machine Learning Model using TensorFlow
A tutorial to get hands-on experience with ML
Best practices for Flask and DynamoDB?
I've built a few side projects with Flask and DynamoDB and, while it's not a complicated feat, I feel like things are always a bit more cumbersome than they should be. Perhaps it's by Django background, but I think there has to be a better way to do what I'm doing. Does anyone have a favorite resource (tutorial, course, book) to learn best practices for Flask+DynamoDB?
/r/flask
https://redd.it/1i2x4i2
I've built a few side projects with Flask and DynamoDB and, while it's not a complicated feat, I feel like things are always a bit more cumbersome than they should be. Perhaps it's by Django background, but I think there has to be a better way to do what I'm doing. Does anyone have a favorite resource (tutorial, course, book) to learn best practices for Flask+DynamoDB?
/r/flask
https://redd.it/1i2x4i2
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Show Django forms inside a modal using HTMX
https://joshkaramuth.com/blog/django-htmx-modal-forms/
/r/djangolearning
https://redd.it/1i18ruq
https://joshkaramuth.com/blog/django-htmx-modal-forms/
/r/djangolearning
https://redd.it/1i18ruq
Joshkaramuth
Show Django forms inside a modal using HTMX
Learn how to create and edit models using Django forms inside a modal using HTMX