Semantic workflows backed by Transformers models
https://neuml.github.io/txtai/workflow/
/r/Python
https://redd.it/10ebcma
https://neuml.github.io/txtai/workflow/
/r/Python
https://redd.it/10ebcma
neuml.github.io
txtai - Workflow
txtai is an all-in-one open-source embeddings database for semantic search, LLM orchestration and language model workflows
Is it possible to sort a query.all
just a quick question for those well verse with flask. I'm trying to sort my query before being parse over to a template. Currently it is using model.query.all(), been trying to use .order_by with it but without any luck.
any feedback would be appreciated
/r/flask
https://redd.it/10ekg69
just a quick question for those well verse with flask. I'm trying to sort my query before being parse over to a template. Currently it is using model.query.all(), been trying to use .order_by with it but without any luck.
any feedback would be appreciated
/r/flask
https://redd.it/10ekg69
reddit
Is it possible to sort a query.all
just a quick question for those well verse with flask. I'm trying to sort my query before being parse over to a template. Currently it is using...
Open Source Django Projects for Study
Hello everyone,
I'm looking for open source projects made using Django, preferably Django REST Framework, that fix real business problems, and whose code I can analyze, get ideas and learn from.
So far I've got GitHub repositories of Saleor, Django CMS, Wagtail, and a few more, but I would like to see a solution like an inventory management system of a company, HR system, an API that manages data of a game server, something like that, but I guess anything you find interesting or worth seeing could help.
I know that companies wouldn't release their code like that, but there are probably open-source solutions released to the public somewhere on the internet.
So, are there any repositories you could recommend for analyzing, and learning Django a little more in-depth?
Thanks!
/r/django
https://redd.it/10epg4m
Hello everyone,
I'm looking for open source projects made using Django, preferably Django REST Framework, that fix real business problems, and whose code I can analyze, get ideas and learn from.
So far I've got GitHub repositories of Saleor, Django CMS, Wagtail, and a few more, but I would like to see a solution like an inventory management system of a company, HR system, an API that manages data of a game server, something like that, but I guess anything you find interesting or worth seeing could help.
I know that companies wouldn't release their code like that, but there are probably open-source solutions released to the public somewhere on the internet.
So, are there any repositories you could recommend for analyzing, and learning Django a little more in-depth?
Thanks!
/r/django
https://redd.it/10epg4m
reddit
Open Source Django Projects for Study
Hello everyone, I'm looking for open source projects made using Django, preferably Django REST Framework, that fix real business problems, and...
I made A Reddit Video Website.
My Website: https://vreddit.up.railway.app
This website fetcher data from reddit and presents the Videos in a youtube style.
You can Also Visit subreddits by going to sub search and also can search on whole reddit.
The above Version returns only SFW Videos For nsfw visit https://indianwebseries-hathori.koyeb.app/
Please Give Your feedbacks and also share your experiance. And It will be great if you can me suggestions.
/r/flask
https://redd.it/10f0h82
My Website: https://vreddit.up.railway.app
This website fetcher data from reddit and presents the Videos in a youtube style.
You can Also Visit subreddits by going to sub search and also can search on whole reddit.
The above Version returns only SFW Videos For nsfw visit https://indianwebseries-hathori.koyeb.app/
Please Give Your feedbacks and also share your experiance. And It will be great if you can me suggestions.
/r/flask
https://redd.it/10f0h82
Web app with JavaScript
Hi!
I need some advice. For my portfolio I want to build a web app for my national sports team. A bit like a news website but with some more features. I know Flask already and want to work on my JS skills also. I get confused when reading to use Flask for the backend and JS for frontend. I built Flask only apps without any JS. What will be different when using JS too? Are redirects, form submissions, validations, etc.. still handled by Flask? Do people still use jinja and what would be things I've done normally with Flask and now with JS?
Thank you!
/r/flask
https://redd.it/10ephsw
Hi!
I need some advice. For my portfolio I want to build a web app for my national sports team. A bit like a news website but with some more features. I know Flask already and want to work on my JS skills also. I get confused when reading to use Flask for the backend and JS for frontend. I built Flask only apps without any JS. What will be different when using JS too? Are redirects, form submissions, validations, etc.. still handled by Flask? Do people still use jinja and what would be things I've done normally with Flask and now with JS?
Thank you!
/r/flask
https://redd.it/10ephsw
reddit
Web app with JavaScript
Hi! I need some advice. For my portfolio I want to build a web app for my national sports team. A bit like a news website but with some more...
Is it Bad to have gunicorn --reload option enabled in Production?
Is there any downside to having the
/r/flask
https://redd.it/10ek15x
Is there any downside to having the
--reload option enabled for Gunicorn in production? For example, does it require additional memory or CPU or anything? I imagine it must have to poll for changes to files./r/flask
https://redd.it/10ek15x
reddit
Is it Bad to have gunicorn --reload option enabled in Production?
Is there any downside to having the `--reload` option enabled for Gunicorn in production? For example, does it require additional memory or CPU or...
I created some code to test the search functionality for elasticsearch to have a better understanding of the code. I wrote the code quickly so it is crappy code but it mostly runs . The problem is when I run the code and click search nothing appears. I assume it is the html causing the problems.
Can someone help fix the errors?
​
I am following this tutorial https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-xvi-full-text-search
​
​
​
To save time here is my environment.yaml code
name: py
channels:
- defaults
dependencies:
- python
- flask-wtf
- flask-sqlalchemy
- flask-login
- elasticsearch
- flask-migrate
- bcrypt
prefix: C:\Users\user\Anaconda3\envs\py
Also of important note I just want to state that I manually added the Post columns by using the code below in the command line.
​
from app import db, app
from app import User, Posts
with app.appcontext():
post = Post(title='The Second Posts', body='Here is the body text')
​
I also tested to see if the column was added and it seems to be by using the example below.
​
from app import Post
post = Post.query.filterby(body='Here is the body text').first( )
print(post)
print(post.title)
/r/flask
https://redd.it/10d1zgg
Can someone help fix the errors?
​
I am following this tutorial https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-xvi-full-text-search
​
​
​
To save time here is my environment.yaml code
name: py
channels:
- defaults
dependencies:
- python
- flask-wtf
- flask-sqlalchemy
- flask-login
- elasticsearch
- flask-migrate
- bcrypt
prefix: C:\Users\user\Anaconda3\envs\py
Also of important note I just want to state that I manually added the Post columns by using the code below in the command line.
​
from app import db, app
from app import User, Posts
with app.appcontext():
post = Post(title='The Second Posts', body='Here is the body text')
​
I also tested to see if the column was added and it seems to be by using the example below.
​
from app import Post
post = Post.query.filterby(body='Here is the body text').first( )
print(post)
print(post.title)
/r/flask
https://redd.it/10d1zgg
Miguelgrinberg
The Flask Mega-Tutorial, Part XVI: Full-Text Search
This is the sixteenth installment of the Flask Mega-Tutorial series, in which I'm going to add a full-text search capability to Microblog.You are reading the 2024 edition of the Flask Mega-Tutorial…
Wednesday Daily Thread: Beginner questions
New to Python and have questions? Use this thread to ask anything about Python, there are no bad questions!
This thread may be fairly low volume in replies, if you don't receive a response we recommend looking at r/LearnPython or joining the Python Discord server at https://discord.gg/python where you stand a better chance of receiving a response.
/r/Python
https://redd.it/10erylo
New to Python and have questions? Use this thread to ask anything about Python, there are no bad questions!
This thread may be fairly low volume in replies, if you don't receive a response we recommend looking at r/LearnPython or joining the Python Discord server at https://discord.gg/python where you stand a better chance of receiving a response.
/r/Python
https://redd.it/10erylo
Discord
Join the Python Discord Server!
We're a large community focused around the Python programming language. We believe that anyone can learn to code. | 412982 members
How often do you guys use Lambda?
I'm just curious as if it's really necessary and if I should learn it. Thank you for your time!
/r/Python
https://redd.it/10ey6cw
I'm just curious as if it's really necessary and if I should learn it. Thank you for your time!
/r/Python
https://redd.it/10ey6cw
reddit
How often do you guys use Lambda?
I'm just curious as if it's really necessary and if I should learn it. Thank you for your time!
stacked quantiles
This is going to be niche, but just in case. I use this code a lot, so I uploaded it. For those of us who work with pixels and such where you might have 10k of the same value.
stacked-quantile · PyPI
ShayHill/stacked\_quantile: Treat weighted values as multiple values. (github.com)
'Stacked' quantile functions. Close to weighted quantile functions.
These functions are used to calculate quantiles of a set of values, where each value has a weight. The typical process for calculating a weighted quantile is to create a CDF from the weights, then interpolate the values to find the quantile.
These functions, however, treat weighted values (given integer weights) exactly as multiple values.
So, values (1, 2, 3) with weights (4, 5, 6) will be treated as
(1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3) If the quantile falls exactly between two values, the non-weighted average of the two values is returned. This is consistent with the "weights as occurrences" interpretation. Strips all zero-weight values, so these will never be included in such averages.
If using non-integer weights, the results will be as if some scalar were applied to make all weights into integers.
This "weights as occurrences" interpretation has
/r/Python
https://redd.it/10ew7am
This is going to be niche, but just in case. I use this code a lot, so I uploaded it. For those of us who work with pixels and such where you might have 10k of the same value.
stacked-quantile · PyPI
ShayHill/stacked\_quantile: Treat weighted values as multiple values. (github.com)
'Stacked' quantile functions. Close to weighted quantile functions.
These functions are used to calculate quantiles of a set of values, where each value has a weight. The typical process for calculating a weighted quantile is to create a CDF from the weights, then interpolate the values to find the quantile.
These functions, however, treat weighted values (given integer weights) exactly as multiple values.
So, values (1, 2, 3) with weights (4, 5, 6) will be treated as
(1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3) If the quantile falls exactly between two values, the non-weighted average of the two values is returned. This is consistent with the "weights as occurrences" interpretation. Strips all zero-weight values, so these will never be included in such averages.
If using non-integer weights, the results will be as if some scalar were applied to make all weights into integers.
This "weights as occurrences" interpretation has
/r/Python
https://redd.it/10ew7am
PyPI
stacked-quantile
Secret messages in coding?
Is it possible to make short secret that only could be read when ran or by other programmers? I’m new to python, and I want to make a album cover that could hold a hidden text or something of the sort in a small bit of code. Just an idea I’m throwing around
/r/Python
https://redd.it/10eso5l
Is it possible to make short secret that only could be read when ran or by other programmers? I’m new to python, and I want to make a album cover that could hold a hidden text or something of the sort in a small bit of code. Just an idea I’m throwing around
/r/Python
https://redd.it/10eso5l
reddit
Secret messages in coding?
Is it possible to make short secret that only could be read when ran or by other programmers? I’m new to python, and I want to make a album cover...
Use Python to Scrape Republic Day Sale | Free Masterclass
https://www.eventbrite.com/e/use-python-to-scrape-republic-day-sale-free-masterclass-tickets-516423997077?aff=reddit
/r/Python
https://redd.it/10f1837
https://www.eventbrite.com/e/use-python-to-scrape-republic-day-sale-free-masterclass-tickets-516423997077?aff=reddit
/r/Python
https://redd.it/10f1837
Eventbrite
Use Python to Scrape Republic Day Sale | Free Masterclass
Learn how to use Python to scrape Republic Day Sale from Munmun Das, Principal – Automation and Innovation at Accenture.
UpgradeDjango.com - detailed Django release information all in one place
https://upgradedjango.com/
/r/django
https://redd.it/10eqtrh
https://upgradedjango.com/
/r/django
https://redd.it/10eqtrh
Upgradedjango
Upgrade Django
Info on currently supported versions of Django and tips on upgrading to newer releases. Find when old versions were released and information on what was in each release.
Delivery driver tip tracker: tkinter and openpyxl
Greetings, im current a delivery driver for a pizza chain and I wanted a way to track my tips, so I created a gui interface that allows me to input data and add it to an excel sheet, im really happy with this project as not only didnt I create it, I was able to recreate it in an object oriented way, if you have any criticism or anything I can improve on let me know!
youtube video on the project
github of the code
/r/Python
https://redd.it/10fb96m
Greetings, im current a delivery driver for a pizza chain and I wanted a way to track my tips, so I created a gui interface that allows me to input data and add it to an excel sheet, im really happy with this project as not only didnt I create it, I was able to recreate it in an object oriented way, if you have any criticism or anything I can improve on let me know!
youtube video on the project
github of the code
/r/Python
https://redd.it/10fb96m
YouTube
Python Project Showcase - Delivery Driver Interface ( using tkinter and classes)
A small project I made to track my tips as a delivery driver :) I am really happy with my project and wanted to showcase it!
If you see this video and have a criticism about my code or how I can improve, do leave a comment as it would help me!
*** Unfortunately…
If you see this video and have a criticism about my code or how I can improve, do leave a comment as it would help me!
*** Unfortunately…
A heavily tested (2k lines) and commented classic Red Black Tree implementation in Python and Ruby. Great for learning the material.
Back when I was trying to implement the structure, I could not find any open source implementations that were well written and commented.
I did not manage to find any implementation that had any significant amount of tests and as such was not sure if it even worked correctly.
I tried my best to describe the different operations needed thoroughly and have written a lot of tests (functional too) covering all operations, with drawn out trees in comments.
https://github.com/stanislavkozlovski/Red-Black-Tree
Any feedback is greatly appreciated :)
/r/Python
https://redd.it/10fev4r
Back when I was trying to implement the structure, I could not find any open source implementations that were well written and commented.
I did not manage to find any implementation that had any significant amount of tests and as such was not sure if it even worked correctly.
I tried my best to describe the different operations needed thoroughly and have written a lot of tests (functional too) covering all operations, with drawn out trees in comments.
https://github.com/stanislavkozlovski/Red-Black-Tree
Any feedback is greatly appreciated :)
/r/Python
https://redd.it/10fev4r
GitHub
GitHub - stanislavkozlovski/Red-Black-Tree: An extremely well tested and commented red black tree implementation. Worth a look…
An extremely well tested and commented red black tree implementation. Worth a look if you are studying the material. - stanislavkozlovski/Red-Black-Tree
Using Gaussian Elimination instead of a Monte Carlo simulation?
Using Python or R (or another program), let’s say I have two CSV sheets. One has a sample and the other is a reference sheet ( illustrated here: https://i.imgur.com/duNFu3w.jpg <-Sample
https://i.imgur.com/Ar9lO9Y.jpg <- Reference ). The sample is represented by numbers under element categories (Iron, Copper etc).
I want to get the sample classified in terms of percentages of the reference sheet categories. The output would be something like this for example: sample is “ 71% Category15, 8% Category9, 21% Category6. “
I have an existing Monte Carlo simulation in R and the process is slow and doesn’t yield results that are too accurate.
What alternatives exist to using a Monte Carlo simulation on this?
An existing Monte Carlo simulation would run combinations of the categories in the reference sheet to reach a combination similar to that in the Sample, so preferably the alternative would have a computationally similar output.
—— —— —— —— ——- —— —— ——- ——- ———- —-
I posted the question in another forum and received the following reply. Can someone give their opinion in terms of accuracy? (ie: do you think it will work given the problem above?)
“ Unless I didn't understand the problem at hand, linear algebra could
/r/Python
https://redd.it/10fckk2
Using Python or R (or another program), let’s say I have two CSV sheets. One has a sample and the other is a reference sheet ( illustrated here: https://i.imgur.com/duNFu3w.jpg <-Sample
https://i.imgur.com/Ar9lO9Y.jpg <- Reference ). The sample is represented by numbers under element categories (Iron, Copper etc).
I want to get the sample classified in terms of percentages of the reference sheet categories. The output would be something like this for example: sample is “ 71% Category15, 8% Category9, 21% Category6. “
I have an existing Monte Carlo simulation in R and the process is slow and doesn’t yield results that are too accurate.
What alternatives exist to using a Monte Carlo simulation on this?
An existing Monte Carlo simulation would run combinations of the categories in the reference sheet to reach a combination similar to that in the Sample, so preferably the alternative would have a computationally similar output.
—— —— —— —— ——- —— —— ——- ——- ———- —-
I posted the question in another forum and received the following reply. Can someone give their opinion in terms of accuracy? (ie: do you think it will work given the problem above?)
“ Unless I didn't understand the problem at hand, linear algebra could
/r/Python
https://redd.it/10fckk2
Process streaming data using Python in Google Colab or Jupyter Notebooks
https://infinyon.com/blog/2023/01/jupyter-with-real-time-data
/r/Python
https://redd.it/10fdlji
https://infinyon.com/blog/2023/01/jupyter-with-real-time-data
/r/Python
https://redd.it/10fdlji
Infinyon
How to process streaming data using Google Colab or Jupyter Notebook
Learn how to integrate Jupyter notebooks with real-time data streams using Python and InfinyOn Cloud.
What's your favourite thing about automated tests?
Hi there. I'm curious about how developers feel about writing automated tests like unit tests. What's the one thing you like, or have found helpful, about writing automated tests like unit test?
/r/Python
https://redd.it/10f935p
Hi there. I'm curious about how developers feel about writing automated tests like unit tests. What's the one thing you like, or have found helpful, about writing automated tests like unit test?
/r/Python
https://redd.it/10f935p
reddit
What's your favourite thing about automated tests?
Hi there. I'm curious about how developers feel about writing automated tests like unit tests. What's the one thing you like, or have found...
Can Flask Simply Run My Python Code?
Hi all,
I have a fairly simple python script (its a single class, about 200 lines) that helps me do my job and I want to share with members of my team and am unsure the best way to do this.
Some (important?) details:
1. The program does have a few user inputs and will return a single word/number (based on the inputs)
2. The other members of my team are NOT technical users - I would not trust them with having to install python or running anything from the terminal or an IDE.
3. security is not any security concerns here - anyone can see the source code (but am curious if you are able to see source code in flask)
I'm fairly proficient in python, but have never wanted to share a program with someone who's unable to run a .py file. I think a web app might be the best way to allow the non-technical users to access the program, but am unsure what might be the simplest way to create that? Currently I run the program in my terminal if that helps.
Would this be a good use case for Flask? Most tutorials I see online for flask seem to be blogs
/r/flask
https://redd.it/10fftz3
Hi all,
I have a fairly simple python script (its a single class, about 200 lines) that helps me do my job and I want to share with members of my team and am unsure the best way to do this.
Some (important?) details:
1. The program does have a few user inputs and will return a single word/number (based on the inputs)
2. The other members of my team are NOT technical users - I would not trust them with having to install python or running anything from the terminal or an IDE.
3. security is not any security concerns here - anyone can see the source code (but am curious if you are able to see source code in flask)
I'm fairly proficient in python, but have never wanted to share a program with someone who's unable to run a .py file. I think a web app might be the best way to allow the non-technical users to access the program, but am unsure what might be the simplest way to create that? Currently I run the program in my terminal if that helps.
Would this be a good use case for Flask? Most tutorials I see online for flask seem to be blogs
/r/flask
https://redd.it/10fftz3
reddit
Can Flask Simply Run My Python Code?
Hi all, I have a fairly simple python script (its a single class, about 200 lines) that helps me do my job and I want to share with members of my...