nb2dash: Convert Jupyter notebooks to interactive dashboards with WASM
Hey r/ipython! Today, I'm lauching nb2dash, a tool to convert Jupyter notebooks into dashboards, and I'd love to get your feedback.
https://nb2dash.ploomberapp.io
You can see a sample dashboard here: https://nb2dash.ploomberapp.io/notebook/bb8086c0
https://reddit.com/link/1f9rajw/video/hr40j3dht0nd1/player
# What it does
Upload your Jupyter notebook (.ipynb file)
Get back a link to an interactive dashboard version of your notebook
# Target Audience
Data practitioners who want to easily share an interactive analysis, machine learning model or any other interactive app.
# Key features
Free to use: No sign-up required
Easy: Just drag and drop your notebook file
Quick: Processing usually takes 1-2 minutes
Shareable: Get a link you can send to anyone
# Tech stack
Flask for the web app (receive uploads and process notebook)
NGINX for rendering processed notebooks
Voici for converting notebooks into standalone WASM pages
Redis and rq for task queueing
# Comparison
When people want to share a notebook, they often convert it into HTML or PDF. However, this is hinders interactivity. Alternatively, you might use Voila to deploy it as a web app but that requires paying to a hosting provider. Voici uses WASM, meaning your notebook is a static site and all compute happens locally, reducing cost by a huge margin. Note that WASM and Voici are still early technologies
/r/IPython
https://redd.it/1f9rajw
Hey r/ipython! Today, I'm lauching nb2dash, a tool to convert Jupyter notebooks into dashboards, and I'd love to get your feedback.
https://nb2dash.ploomberapp.io
You can see a sample dashboard here: https://nb2dash.ploomberapp.io/notebook/bb8086c0
https://reddit.com/link/1f9rajw/video/hr40j3dht0nd1/player
# What it does
Upload your Jupyter notebook (.ipynb file)
Get back a link to an interactive dashboard version of your notebook
# Target Audience
Data practitioners who want to easily share an interactive analysis, machine learning model or any other interactive app.
# Key features
Free to use: No sign-up required
Easy: Just drag and drop your notebook file
Quick: Processing usually takes 1-2 minutes
Shareable: Get a link you can send to anyone
# Tech stack
Flask for the web app (receive uploads and process notebook)
NGINX for rendering processed notebooks
Voici for converting notebooks into standalone WASM pages
Redis and rq for task queueing
# Comparison
When people want to share a notebook, they often convert it into HTML or PDF. However, this is hinders interactivity. Alternatively, you might use Voila to deploy it as a web app but that requires paying to a hosting provider. Voici uses WASM, meaning your notebook is a static site and all compute happens locally, reducing cost by a huge margin. Note that WASM and Voici are still early technologies
/r/IPython
https://redd.it/1f9rajw
One more Question
in jupyter notebook when i try to save a photo for object detection it shows this error:
<string>:1: SyntaxWarning: invalid escape sequence '\w'
even when i try to set variables
Does anyone know the reason?
/r/IPython
https://redd.it/1f9lwqd
in jupyter notebook when i try to save a photo for object detection it shows this error:
<string>:1: SyntaxWarning: invalid escape sequence '\w'
even when i try to set variables
Does anyone know the reason?
/r/IPython
https://redd.it/1f9lwqd
Reddit
From the IPython community on Reddit
Explore this post and more from the IPython community
PEP695 Migration Tool
Now that PEP 695 is a little over 2 years old and it has been almost a year since it was officially introduced in python 3.12, the new type parameter syntax will slowly become the standard way of defining TypeVars, ParamSpecs and TypeVarTuples as well as creating Type aliases with the
# What My Project Does
This is why the past few days I spent time building
Install
Format code using
More info, including examples of code that
https://github.com/yowoda/pep695
# Target
/r/Python
https://redd.it/1f9uai8
Now that PEP 695 is a little over 2 years old and it has been almost a year since it was officially introduced in python 3.12, the new type parameter syntax will slowly become the standard way of defining TypeVars, ParamSpecs and TypeVarTuples as well as creating Type aliases with the
type keyword. After I spent some time using python the last couple of weeks, I realized that adapting "old" projects of mine to the new syntax really takes more time than I'm willing to invest, especially as some have a pretty large codebase.# What My Project Does
This is why the past few days I spent time building
pep695, a tool that automatically rewrites code to conform to PEP 695 syntax for you. Install
pep695 using pip:pip install pep695Format code using
pep695 format <path1> <path2> <pathN> ... [-p | --parallel] or just check for errors using pep695 check <path1> <path2> <pathN>. I just published this project today which is why I'm still looking for people to test this project on their own codebase, doesn't matter if it's small or large, any feedback is appreciated!More info, including examples of code that
pep695 can rewrite for you on the github repo:https://github.com/yowoda/pep695
# Target
/r/Python
https://redd.it/1f9uai8
Python Enhancement Proposals (PEPs)
PEP 695 – Type Parameter Syntax | peps.python.org
This PEP specifies an improved syntax for specifying type parameters within a generic class, function, or type alias. It also introduces a new statement for declaring type aliases.
Any tips for courses with a full application that aren't on video?
I recently discovered William Vincent's book which is a step by step application, starting with Docker, I'm looking for things like that because it's a way to learn DevOps as well. However, most of them are Udemy courses, and video is more complex!
Note: The only problem with the book is that it's from 2019, but I'll adapt to the time.
/r/django
https://redd.it/1f9r2h6
I recently discovered William Vincent's book which is a step by step application, starting with Docker, I'm looking for things like that because it's a way to learn DevOps as well. However, most of them are Udemy courses, and video is more complex!
Note: The only problem with the book is that it's from 2019, but I'll adapt to the time.
/r/django
https://redd.it/1f9r2h6
Reddit
From the django community on Reddit
Explore this post and more from the django community
Interactive Mapping with ipyopenlayers
https://blog.jupyter.org/interactive-mapping-with-ipyopenlayers-2b8bc93bb6c4
/r/IPython
https://redd.it/1f9r0hs
https://blog.jupyter.org/interactive-mapping-with-ipyopenlayers-2b8bc93bb6c4
/r/IPython
https://redd.it/1f9r0hs
Medium
Interactive Mapping with ipyopenlayers
Bringing the Power of OpenLayers to Jupyter.
Hey Django community, I heard a lot of you use PostgreSQL! If you do, please take a moment and fill out the 2024 State of PostgreSQL Survey. It's created for the community, by the community; the more responses, the more accurate and helpful the results. Any questions or comments? Let's talk!
https://form.typeform.com/to/wtUFIZwA
/r/django
https://redd.it/1fa298d
https://form.typeform.com/to/wtUFIZwA
/r/django
https://redd.it/1fa298d
Typeform
The State of PostgreSQL 2024 survey is now open! 🎉
Share your experiences and feedback with the larger PostgreSQL community! Complete the survey before September 30th at 11:59 pm PT.
[P] This week, I implemented the paper, "Pay Attention to MLPs", in Tinygrad! :D
To experiment with more interesting model architectures, I implemented gMLP in Tinygrad!
If anyone wants to give some feedback, it will be welcomed.
* \[Repository\]: [https://github.com/EthanBnntt/tinygrad-gmlp](https://github.com/EthanBnntt/tinygrad-gmlp)
* \[Installation\]: `pip install gmlp_tinygrad`
* \[Original Paper\]: [https://doi.org/10.48550/ARXIV.2105.08050](https://doi.org/10.48550/ARXIV.2105.08050)
[A diagram showing the gMLP architecture](https://preview.redd.it/3s58nla804nd1.png?width=330&format=png&auto=webp&s=3f00f8364e9e0ac00da13ce28199d59330ebaef3)
/r/MachineLearning
https://redd.it/1fa5kop
To experiment with more interesting model architectures, I implemented gMLP in Tinygrad!
If anyone wants to give some feedback, it will be welcomed.
* \[Repository\]: [https://github.com/EthanBnntt/tinygrad-gmlp](https://github.com/EthanBnntt/tinygrad-gmlp)
* \[Installation\]: `pip install gmlp_tinygrad`
* \[Original Paper\]: [https://doi.org/10.48550/ARXIV.2105.08050](https://doi.org/10.48550/ARXIV.2105.08050)
[A diagram showing the gMLP architecture](https://preview.redd.it/3s58nla804nd1.png?width=330&format=png&auto=webp&s=3f00f8364e9e0ac00da13ce28199d59330ebaef3)
/r/MachineLearning
https://redd.it/1fa5kop
GitHub
GitHub - EthanBnntt/tinygrad-gmlp: An implementation of gated MLPs in tinygrad, as an alternative to transformers.
An implementation of gated MLPs in tinygrad, as an alternative to transformers. - EthanBnntt/tinygrad-gmlp
Friday Daily Thread: r/Python Meta and Free-Talk Fridays
# Weekly Thread: Meta Discussions and Free Talk Friday 🎙️
Welcome to Free Talk Friday on /r/Python! This is the place to discuss the r/Python community (meta discussions), Python news, projects, or anything else Python-related!
## How it Works:
1. Open Mic: Share your thoughts, questions, or anything you'd like related to Python or the community.
2. Community Pulse: Discuss what you feel is working well or what could be improved in the /r/python community.
3. News & Updates: Keep up-to-date with the latest in Python and share any news you find interesting.
## Guidelines:
All topics should be related to Python or the /r/python community.
Be respectful and follow Reddit's Code of Conduct.
## Example Topics:
1. New Python Release: What do you think about the new features in Python 3.11?
2. Community Events: Any Python meetups or webinars coming up?
3. Learning Resources: Found a great Python tutorial? Share it here!
4. Job Market: How has Python impacted your career?
5. Hot Takes: Got a controversial Python opinion? Let's hear it!
6. Community Ideas: Something you'd like to see us do? tell us.
Let's keep the conversation going. Happy discussing! 🌟
/r/Python
https://redd.it/1fa1gk2
# Weekly Thread: Meta Discussions and Free Talk Friday 🎙️
Welcome to Free Talk Friday on /r/Python! This is the place to discuss the r/Python community (meta discussions), Python news, projects, or anything else Python-related!
## How it Works:
1. Open Mic: Share your thoughts, questions, or anything you'd like related to Python or the community.
2. Community Pulse: Discuss what you feel is working well or what could be improved in the /r/python community.
3. News & Updates: Keep up-to-date with the latest in Python and share any news you find interesting.
## Guidelines:
All topics should be related to Python or the /r/python community.
Be respectful and follow Reddit's Code of Conduct.
## Example Topics:
1. New Python Release: What do you think about the new features in Python 3.11?
2. Community Events: Any Python meetups or webinars coming up?
3. Learning Resources: Found a great Python tutorial? Share it here!
4. Job Market: How has Python impacted your career?
5. Hot Takes: Got a controversial Python opinion? Let's hear it!
6. Community Ideas: Something you'd like to see us do? tell us.
Let's keep the conversation going. Happy discussing! 🌟
/r/Python
https://redd.it/1fa1gk2
Redditinc
Reddit Rules
Reddit Rules - Reddit
Best platform to host production django apps
Hey everyone,
We are currently using Heroku to host our application and looking for alternatives.
We are using railway for our staging environment but don't have much confidence yet. We are also considering Elastic Beanstalk too.
Any comments are much appreciated.
Thanks!
/r/django
https://redd.it/1fa6p1q
Hey everyone,
We are currently using Heroku to host our application and looking for alternatives.
We are using railway for our staging environment but don't have much confidence yet. We are also considering Elastic Beanstalk too.
Any comments are much appreciated.
Thanks!
/r/django
https://redd.it/1fa6p1q
Reddit
From the django community on Reddit
Explore this post and more from the django community
What is the purpose or a use-case of a Django admin?
I always ever worked with FastAPI, Flask and ExpressJS for creating APIs for web projects, and now I'm trying out Django.
I followed a tutorial to try setting up and re-doing API's I've built with the other frameworks, and I found myself with a dozen tables related to Django, popping up in my database.
I went to the /admin route and saw that I could login.
What is the purpose of having this kind of user management for accessing the database? I never had to use anything like that with the other frameworks.
Is that suited for some kind of work environment where you want to give employees certain rights, like some can't add new tables and others can? Is that the scope of this admin feature?
If so, I guess I can skip it for my personal projects?
/r/django
https://redd.it/1f9wqog
I always ever worked with FastAPI, Flask and ExpressJS for creating APIs for web projects, and now I'm trying out Django.
I followed a tutorial to try setting up and re-doing API's I've built with the other frameworks, and I found myself with a dozen tables related to Django, popping up in my database.
I went to the /admin route and saw that I could login.
What is the purpose of having this kind of user management for accessing the database? I never had to use anything like that with the other frameworks.
Is that suited for some kind of work environment where you want to give employees certain rights, like some can't add new tables and others can? Is that the scope of this admin feature?
If so, I guess I can skip it for my personal projects?
/r/django
https://redd.it/1f9wqog
Reddit
From the django community on Reddit
Explore this post and more from the django community
Django News - Django security releases issued: 5.1.1, 5.0.9, and 4.2.16
https://django-news.com/issues/249
/r/django
https://redd.it/1fac6s4
https://django-news.com/issues/249
/r/django
https://redd.it/1fac6s4
Django-News
Django security releases issued: 5.1.1, 5.0.9, and 4.2.16
Djangonaut Space Session 3 Applications, evolving auth.User, unbound Redis connections, and more.
How To Perform Unit Testing in Flask
https://www.digitalocean.com/community/tutorials/unit-test-in-flask
/r/flask
https://redd.it/1fa9mno
https://www.digitalocean.com/community/tutorials/unit-test-in-flask
/r/flask
https://redd.it/1fa9mno
Digitalocean
How To Perform Unit Testing in Flask | DigitalOcean
Learn how to efficiently test your Flask applications using pytest to ensure robust and error-free code.
Need Help with Offline License System and Periodic Server Checks in Flask App
Hi everyone,
I’ve developed a local Flask app that uses SQLite and a Tkinter interface to run locally. I recently added a license system but think it could be improved, especially when it comes to managing license expiration and periodic checks.
Here’s how my current system works:
I have an admin dashboard (hosted on my server) where I generate and manage licenses.
Each license has a start date, end date, and
The user enters a username, password, and the activation code in the app, and the app sends a request to my server to verify the license and get the relevant dates and status.
If the license is valid, I store a hashed combination of the username, password, and hardware ID (HWID) in a file called
The app is mostly designed to work offline, but the activation process requires internet access.
I have a
/r/flask
https://redd.it/1fa9g27
Hi everyone,
I’ve developed a local Flask app that uses SQLite and a Tkinter interface to run locally. I recently added a license system but think it could be improved, especially when it comes to managing license expiration and periodic checks.
Here’s how my current system works:
I have an admin dashboard (hosted on my server) where I generate and manage licenses.
Each license has a start date, end date, and
activation_status (default = 0), and I generate an activation code for the user.The user enters a username, password, and the activation code in the app, and the app sends a request to my server to verify the license and get the relevant dates and status.
If the license is valid, I store a hashed combination of the username, password, and hardware ID (HWID) in a file called
license on the user's device. The start and end dates are also saved in a local SQLite database on the user’s device.The app is mostly designed to work offline, but the activation process requires internet access.
I have a
login_required decorator that checks the license status before allowing access to any protected route. If the license has/r/flask
https://redd.it/1fa9g27
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Desperate and Willing to pay for ALL-AUTH solution.
I have a problem. When a user signs up to my site using their email, then later logs in with email provider (eg. Google), all auth treats this like a new user and objects to them having the same email. How can I make it understand that it's the same user and give them access?
I've looked around for far too long and found nothing that solves this. I'm willing to pay for a solution, and I will make the answer public for all to benefit.
P.s apologies if I'm not allowed to solicit but after all, I am desperate.
/r/django
https://redd.it/1fac0m6
I have a problem. When a user signs up to my site using their email, then later logs in with email provider (eg. Google), all auth treats this like a new user and objects to them having the same email. How can I make it understand that it's the same user and give them access?
I've looked around for far too long and found nothing that solves this. I'm willing to pay for a solution, and I will make the answer public for all to benefit.
P.s apologies if I'm not allowed to solicit but after all, I am desperate.
/r/django
https://redd.it/1fac0m6
Reddit
From the django community on Reddit
Explore this post and more from the django community
Pass JSON to Templates using Include
How do I pass Json to Template from main Template where the variable gets defined not by view.py but main_template.html
template
main template
In the above example, I want to define the icon here itself in the main_template.html rather than the view.
/r/django
https://redd.it/1faee90
How do I pass Json to Template from main Template where the variable gets defined not by view.py but main_template.html
template
main template
In the above example, I want to define the icon here itself in the main_template.html rather than the view.
/r/django
https://redd.it/1faee90
Best approach to allowing only the staff users to have the access
I have two snippets here and which one is the best approach/practice for only allowing staff users have the access to certain data. In my case accessing user profile. Any suggestion will be greatly appreciated. Thank you very much.
example 1:
@api_view(['GET'])
@authentication_classes[TokenAutentication]
def get_profile_view(request):
if request.user.is_staff:
profiles = Profile.objects.all()
serializer = ProfileSerializer(profiles, many=True)
return Response(serializer.data, status=status.HTTP_200_OK)
return Response({'error': 'Not allowed'}, status=status.HTTP_400_BAD_REQUEST)
example 2:
@api_view(['GET'])
@permission_classes([IsAdminUser])
@authentication_classes[TokenAutentication]
def get_profile_view(request):
profiles = Profile.objects.all()
serializer = ProfileSerializer(profiles, many=True)
return Response(serializer.data, status=status.HTTP_200_OK)
/r/django
https://redd.it/1fajw75
I have two snippets here and which one is the best approach/practice for only allowing staff users have the access to certain data. In my case accessing user profile. Any suggestion will be greatly appreciated. Thank you very much.
example 1:
@api_view(['GET'])
@authentication_classes[TokenAutentication]
def get_profile_view(request):
if request.user.is_staff:
profiles = Profile.objects.all()
serializer = ProfileSerializer(profiles, many=True)
return Response(serializer.data, status=status.HTTP_200_OK)
return Response({'error': 'Not allowed'}, status=status.HTTP_400_BAD_REQUEST)
example 2:
@api_view(['GET'])
@permission_classes([IsAdminUser])
@authentication_classes[TokenAutentication]
def get_profile_view(request):
profiles = Profile.objects.all()
serializer = ProfileSerializer(profiles, many=True)
return Response(serializer.data, status=status.HTTP_200_OK)
/r/django
https://redd.it/1fajw75
Reddit
From the django community on Reddit
Explore this post and more from the django community
First website
Hi everyone, I have created my first website and wanted to share it with you all
It is a website for my brother who owns his own carpentry business.
https://ahbcarpentry.com/
I used plain js, css, html and of course flask.
I hope you like it
Any criticism is appreciated
/r/flask
https://redd.it/1fal6l0
Hi everyone, I have created my first website and wanted to share it with you all
It is a website for my brother who owns his own carpentry business.
https://ahbcarpentry.com/
I used plain js, css, html and of course flask.
I hope you like it
Any criticism is appreciated
/r/flask
https://redd.it/1fal6l0
What is the purpose for Middleware and when should I use it (or not)?
I'm not sure I fully understand the purpose of how/when to use Middleware.
One of the things I am looking to do is to take input from a user from a django front end and pass it to just straight python scripts to do some things on the backend, and then pass stuff back to the django front end.
Is that how/where I would use Middleware? (I have read the django docs for middleware but they are not always the most clear, or I'm not that smart.)
/r/djangolearning
https://redd.it/1fajavz
I'm not sure I fully understand the purpose of how/when to use Middleware.
One of the things I am looking to do is to take input from a user from a django front end and pass it to just straight python scripts to do some things on the backend, and then pass stuff back to the django front end.
Is that how/where I would use Middleware? (I have read the django docs for middleware but they are not always the most clear, or I'm not that smart.)
/r/djangolearning
https://redd.it/1fajavz
Reddit
From the djangolearning community on Reddit
Explore this post and more from the djangolearning community
PyJSX - Write JSX directly in Python
Working with HTML in Python has always been a bit of a pain. If you want something declarative,
there's Jinja, but that is basically a separate language and a lot of Python features are not available.
With PyJSX I wanted to add first-class support for HTML in Python.
Here's the repo: https://github.com/tomasr8/pyjsx
## What my project does
Put simply, it lets you write JSX in Python.
Here's an example:
# coding: jsx
from pyjsx import jsx, JSX
def hello():
print(<h1>Hello, world!</h1>)
(There's more to it, but this is the gist). Here's a more complex example:
# coding: jsx
from pyjsx import jsx, JSX
def Header(children, style=None, rest) -> JSX:
return <h1 style={style}>{children}</h1>
def Main(children, rest) -> JSX:
return <main>{children}</main>
def App() -> JSX:
return (
<div>
<Header style={{"color": "red"}}>Hello,
/r/Python
https://redd.it/1falc1s
Working with HTML in Python has always been a bit of a pain. If you want something declarative,
there's Jinja, but that is basically a separate language and a lot of Python features are not available.
With PyJSX I wanted to add first-class support for HTML in Python.
Here's the repo: https://github.com/tomasr8/pyjsx
## What my project does
Put simply, it lets you write JSX in Python.
Here's an example:
# coding: jsx
from pyjsx import jsx, JSX
def hello():
print(<h1>Hello, world!</h1>)
(There's more to it, but this is the gist). Here's a more complex example:
# coding: jsx
from pyjsx import jsx, JSX
def Header(children, style=None, rest) -> JSX:
return <h1 style={style}>{children}</h1>
def Main(children, rest) -> JSX:
return <main>{children}</main>
def App() -> JSX:
return (
<div>
<Header style={{"color": "red"}}>Hello,
/r/Python
https://redd.it/1falc1s
GitHub
GitHub - tomasr8/pyjsx: Write JSX directly in Python
Write JSX directly in Python. Contribute to tomasr8/pyjsx development by creating an account on GitHub.
How to handle JSON data received from API calls in relation to my Django models/database?
I've recently started working in web development and specifically with Django as the backend. When dealing with JSON responses from external API calls, I always wonder how to store and handle this data efficiently in my database.
Should I:
- Store the entire JSON response in a JSONField in my model, and then parse the JSON when I need specific fields by accessing the relevant keys?
OR
- Parse the JSON upon receiving it and store each key/value pair in separate fields in my model?
What are the pros and cons of each approach, and when would one method be preferable over the other? I thought that I maybe can learn from your best practices :)
/r/django
https://redd.it/1faj6nw
I've recently started working in web development and specifically with Django as the backend. When dealing with JSON responses from external API calls, I always wonder how to store and handle this data efficiently in my database.
Should I:
- Store the entire JSON response in a JSONField in my model, and then parse the JSON when I need specific fields by accessing the relevant keys?
OR
- Parse the JSON upon receiving it and store each key/value pair in separate fields in my model?
What are the pros and cons of each approach, and when would one method be preferable over the other? I thought that I maybe can learn from your best practices :)
/r/django
https://redd.it/1faj6nw
Reddit
From the django community on Reddit
Explore this post and more from the django community