Help with secretkey
I know I have to set the secret\key using environment variables. I know how to do it. The only problem is that if I were to host my web application on a server, os.environ.get(variable) will no longer know where the variable is present locally on my machine.
Maybe I'm taking the wrong approach or do I need to create some sort of connection from the server to my PC? (although this way I would have to leave it on all the time, and it wouldn't make sense).
/r/flask
https://redd.it/1hrazdo
I know I have to set the secret\key using environment variables. I know how to do it. The only problem is that if I were to host my web application on a server, os.environ.get(variable) will no longer know where the variable is present locally on my machine.
Maybe I'm taking the wrong approach or do I need to create some sort of connection from the server to my PC? (although this way I would have to leave it on all the time, and it wouldn't make sense).
/r/flask
https://redd.it/1hrazdo
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
How to calculate the resources used by my entire django project
I want to know a way to calculate the resources (cpu and ram) my django project uses; I need that information to know the infrastructure requirements of the server where I will deploy.
/r/django
https://redd.it/1hs8usz
I want to know a way to calculate the resources (cpu and ram) my django project uses; I need that information to know the infrastructure requirements of the server where I will deploy.
/r/django
https://redd.it/1hs8usz
Reddit
From the django community on Reddit
Explore this post and more from the django community
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/1hs8l05
# 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/1hs8l05
Redditinc
Reddit Rules
Reddit Rules - Reddit
Model vs AbstractUser vs AbstractBaseUser
I'm building a web app that deals with the usual CRUD. A user should be able to sign in, it's data stored in posgresql, and perform login with email and passoword, afterwards. Also, there would be foreign keys as expected and the user might be able to upload files such as images, csv tables and other forms of data science information.
Creating a class model with models.Model is more common, so finding examples and bug soutions are easy. But at same time, people advise against it for new projects, especially with different auth methods (such as using email instead of username for login).
So basically AbstractBaseUser gives more freedom, but it's more complex and easier to make mistakes. And so I'll get much more bugs than now.
Finally, AbstractUser \~\~ Model, I guess. Wich option would be more appropriate and simple to use to build a website as above?
/r/django
https://redd.it/1hs7wzb
I'm building a web app that deals with the usual CRUD. A user should be able to sign in, it's data stored in posgresql, and perform login with email and passoword, afterwards. Also, there would be foreign keys as expected and the user might be able to upload files such as images, csv tables and other forms of data science information.
Creating a class model with models.Model is more common, so finding examples and bug soutions are easy. But at same time, people advise against it for new projects, especially with different auth methods (such as using email instead of username for login).
So basically AbstractBaseUser gives more freedom, but it's more complex and easier to make mistakes. And so I'll get much more bugs than now.
Finally, AbstractUser \~\~ Model, I guess. Wich option would be more appropriate and simple to use to build a website as above?
/r/django
https://redd.it/1hs7wzb
Reddit
From the django community on Reddit
Explore this post and more from the django community
Question about folder structure!
Hello everyone, how are you?
What is the best approach to a folder structure in a Django project?
The project will grow gradually and I would like a concise structure that allows for this growth, while not being a mess and making it easy for other people to start coding in this structure if necessary.
The project will be a system for schools, with two "fronts", basically a class management system, where teachers will be able to publish classes. There are more things regarding the application, but this is its core.
This would be the first "front", the second "front" is the part of the students, who will enter the portal and be able to see these classes.
I'm using Django as FullStack, with Templates and using Bootstrap for styling, PostgreSQL as database.
Could anyone tell me a good folder structure for a project like this that will grow?
Cheers!
/r/django
https://redd.it/1hs30it
Hello everyone, how are you?
What is the best approach to a folder structure in a Django project?
The project will grow gradually and I would like a concise structure that allows for this growth, while not being a mess and making it easy for other people to start coding in this structure if necessary.
The project will be a system for schools, with two "fronts", basically a class management system, where teachers will be able to publish classes. There are more things regarding the application, but this is its core.
This would be the first "front", the second "front" is the part of the students, who will enter the portal and be able to see these classes.
I'm using Django as FullStack, with Templates and using Bootstrap for styling, PostgreSQL as database.
Could anyone tell me a good folder structure for a project like this that will grow?
Cheers!
/r/django
https://redd.it/1hs30it
Reddit
From the django community on Reddit
Explore this post and more from the django community
How to make Django Manager and Model's interactions follow the Open/Closed Principle?
I am designing models for my Django App and am concerned with decoupling the caller's logic from the model's implementation, so that future changes to the model itself do not require changes downstream in the codebase. In short adhering to the Open/Closed Principle (OCP).
I am wondering what is a best practice to implement this while leveraging Django's framework best.
Conceptually, I believe it would make sense to do the following:
1. Custom Manager
/r/django
https://redd.it/1hsh1rz
I am designing models for my Django App and am concerned with decoupling the caller's logic from the model's implementation, so that future changes to the model itself do not require changes downstream in the codebase. In short adhering to the Open/Closed Principle (OCP).
I am wondering what is a best practice to implement this while leveraging Django's framework best.
Conceptually, I believe it would make sense to do the following:
from django.db import models
class FooManager(models.Manager):
def is_active(self):
return self.filter(is_active=True)
class Foo(models.Model):
_bar = models.CharField(max_length=100, db_column="bar")
is_active = models.BooleanField(default=True)
objects = FooManager()
@property
def bar(self):
return self._bar
@bar.setter
def bar(self, value):
if not self._bar:
self._bar = value
else:
#some setter logic
pass
1. Custom Manager
/r/django
https://redd.it/1hsh1rz
Reddit
From the django community on Reddit
Explore this post and more from the django community
Discussion How is LLM changing your job as a ML engineer
I just watched Andrew Ng’s talk on AI agents. He talked about how traditional ML tasks could take 6 months but now it only needs a weekend with LLMs.
It’s at 2-4mins into this talk. https://youtu.be/KrRD7r7y7NY?si=XDCAm7NFTMO3ayn3
Specifically, I guess he’s saying you can do zero shot learning with LLMs instead of gathering large amounts of labelled data, build and deploy a model. He used the example of sentiment analysis tasks.
I wonder if any one is experiencing this shift in productivity at work as a ML scientist.
My experience is companies don’t want to use chatGPT directly and try to build their own in house LLMs, I guess for data privacy and cost concerns.
Please share your experience.
/r/MachineLearning
https://redd.it/1hs41pt
I just watched Andrew Ng’s talk on AI agents. He talked about how traditional ML tasks could take 6 months but now it only needs a weekend with LLMs.
It’s at 2-4mins into this talk. https://youtu.be/KrRD7r7y7NY?si=XDCAm7NFTMO3ayn3
Specifically, I guess he’s saying you can do zero shot learning with LLMs instead of gathering large amounts of labelled data, build and deploy a model. He used the example of sentiment analysis tasks.
I wonder if any one is experiencing this shift in productivity at work as a ML scientist.
My experience is companies don’t want to use chatGPT directly and try to build their own in house LLMs, I guess for data privacy and cost concerns.
Please share your experience.
/r/MachineLearning
https://redd.it/1hs41pt
YouTube
Andrew Ng Explores The Rise Of AI Agents And Agentic Reasoning | BUILD 2024 Keynote
In recent years, the spotlight in AI has primarily been on large language models (LLMs) and emerging large multi-modal models (LMMs). Now, building on these tools, a new paradigm is emerging with the rise of AI agents and agentic reasoning, which are proving…
Should I go for Django?
Hey everyone, I am in 2nd Year of My bachelor's degree in Computer Science. I have been using Flask for the past 1 year. Many people have told me that there is no future of Flask. I know that Django is feature rich whereas Flask provides a minimalist approach where you only install what you need. But the problem arises is that I am concerned about my skills in the long run. Is Flask used at the production level? My goal is to crack Big Tech company. Is it really worth the hassle to move towards Django or should I move with Flask?
I hope to hear from the community.
#django #learndjango #python #drf #rest #api
/r/django
https://redd.it/1hsi5cz
Hey everyone, I am in 2nd Year of My bachelor's degree in Computer Science. I have been using Flask for the past 1 year. Many people have told me that there is no future of Flask. I know that Django is feature rich whereas Flask provides a minimalist approach where you only install what you need. But the problem arises is that I am concerned about my skills in the long run. Is Flask used at the production level? My goal is to crack Big Tech company. Is it really worth the hassle to move towards Django or should I move with Flask?
I hope to hear from the community.
#django #learndjango #python #drf #rest #api
/r/django
https://redd.it/1hsi5cz
Reddit
From the django community on Reddit
Explore this post and more from the django community
need help with linking
hello everyone
i am a first year engineering student and we have a group project and ive been assigned the linking part
we have the backend in python and front end in html(css and js) and i want to know how should i link them. I did a bit of research and learnt about flask but i cant find the right resource to learn it
the project is
This project leverages multiple APIs and NLPs to deliver a personalized learning experience. The system uses the YouTube data API to recommend videos based on user-entered keywords. Video content is transcribed using YouTube transcribe API and refined with NLP to provide concise summaries.
An interactive quiz model helps users test their knowledge. Additionally, a daily goals calendar allowing users to set, track, and manage their objectives. Also a database to log user data and let user save notes from the searched content.
The system combines seamless backend integration with a user-friendly interface, offering personalized insights and efficient learning support.
the backend is already done by my team member and we are working on the frontend
i do not have any knowledge about linking so any
/r/flask
https://redd.it/1hpvxps
hello everyone
i am a first year engineering student and we have a group project and ive been assigned the linking part
we have the backend in python and front end in html(css and js) and i want to know how should i link them. I did a bit of research and learnt about flask but i cant find the right resource to learn it
the project is
This project leverages multiple APIs and NLPs to deliver a personalized learning experience. The system uses the YouTube data API to recommend videos based on user-entered keywords. Video content is transcribed using YouTube transcribe API and refined with NLP to provide concise summaries.
An interactive quiz model helps users test their knowledge. Additionally, a daily goals calendar allowing users to set, track, and manage their objectives. Also a database to log user data and let user save notes from the searched content.
The system combines seamless backend integration with a user-friendly interface, offering personalized insights and efficient learning support.
the backend is already done by my team member and we are working on the frontend
i do not have any knowledge about linking so any
/r/flask
https://redd.it/1hpvxps
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
For those that use Python in their job: Do you like Python?
I'm just curious about whether you like it less or more than other programming languages you've used in your career. Does anything about Python annoy you? Is there anything that continues to feel satisfying to code?
/r/Python
https://redd.it/1hslvfw
I'm just curious about whether you like it less or more than other programming languages you've used in your career. Does anything about Python annoy you? Is there anything that continues to feel satisfying to code?
/r/Python
https://redd.it/1hslvfw
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Wanna tag along a professional Django project?
I’m a Sr Backend Developer and I’m about to start a brand new Django project for a little side gig I have.
I lurk a lot here and I see many of the same questions over and over. I figured some of you would like to tag along a professional (but small) Django project.
Note: this is gonna be completely free, but I’m not going to actively teach; more like stream and comment during my development process. Maybe answer a few questions here and there.
The project will involve celery, celery beat, PostgreSQL, and one or more LLMs yet to be chosen.
Probably no frontend, and I’ll do everything with Django-unfold customising the admin panel. And no, you won’t be able to use any of the code for commercial purposes.
Comment if interested and we’ll see the feasibility. I am in CET.
UPDATE:
Okay I wasn't expecting this much traction. I just created a Discord server to manage this. Apologies in advance, I suck at social media and Discord. I'm gonna f*ck something up. [Join here](https://discord.gg/tMNecyeU)
I will plan there the sessions. They will probably be mostly during weekends because I have a full time job to attend to.
UPDATE 2: since many have DM’d me in this regard,
/r/django
https://redd.it/1hsocpc
I’m a Sr Backend Developer and I’m about to start a brand new Django project for a little side gig I have.
I lurk a lot here and I see many of the same questions over and over. I figured some of you would like to tag along a professional (but small) Django project.
Note: this is gonna be completely free, but I’m not going to actively teach; more like stream and comment during my development process. Maybe answer a few questions here and there.
The project will involve celery, celery beat, PostgreSQL, and one or more LLMs yet to be chosen.
Probably no frontend, and I’ll do everything with Django-unfold customising the admin panel. And no, you won’t be able to use any of the code for commercial purposes.
Comment if interested and we’ll see the feasibility. I am in CET.
UPDATE:
Okay I wasn't expecting this much traction. I just created a Discord server to manage this. Apologies in advance, I suck at social media and Discord. I'm gonna f*ck something up. [Join here](https://discord.gg/tMNecyeU)
I will plan there the sessions. They will probably be mostly during weekends because I have a full time job to attend to.
UPDATE 2: since many have DM’d me in this regard,
/r/django
https://redd.it/1hsocpc
Discord
Join the Django & cool stuff Discord Server!
Check out the Django & cool stuff community on Discord - hang out with 58 other members and enjoy free voice and text chat.
SciPy 1.15.0 released: Full sparse array support, new differentiation module, Python 3.13t support
# SciPy 1.15.0 Release Notes
SciPy
many new features, numerous bug-fixes, improved test coverage and better
documentation. There have been a number of deprecations and API changes
in this release, which are documented below. All users are encouraged to
upgrade to this release, as there are a large number of bug-fixes and
optimizations. Before upgrading, we recommend that users check that
their own code does not use deprecated SciPy functionality (to do so,
run your code with
Our development attention will now shift to bug-fix releases on the
1.15.x branch, and on adding new features on the main branch.
This release requires Python
# Highlights of this release
Sparse arrays are now fully functional for 1-D and 2-D arrays. We recommend that all new code use sparse arrays instead of sparse matrices and that developers start to migrate their existing code from sparse matrix to sparse array: [`migration_to_sparray`](https://scipy.github.io/devdocs/reference/sparse.migration_to_sparray.html). Both `sparse.linalg` and `sparse.csgraph` work with either sparse matrix or sparse array and work internally with sparse array.
Sparse arrays now provide basic support for n-D arrays in the COO format including
/r/Python
https://redd.it/1hsqtz1
# SciPy 1.15.0 Release Notes
SciPy
1.15.0 is the culmination of 6 months of hard work. It contains many new features, numerous bug-fixes, improved test coverage and better
documentation. There have been a number of deprecations and API changes
in this release, which are documented below. All users are encouraged to
upgrade to this release, as there are a large number of bug-fixes and
optimizations. Before upgrading, we recommend that users check that
their own code does not use deprecated SciPy functionality (to do so,
run your code with
python -Wd and check for DeprecationWarning s). Our development attention will now shift to bug-fix releases on the
1.15.x branch, and on adding new features on the main branch.
This release requires Python
3.10-3.13 and NumPy 1.23.5 or greater.# Highlights of this release
Sparse arrays are now fully functional for 1-D and 2-D arrays. We recommend that all new code use sparse arrays instead of sparse matrices and that developers start to migrate their existing code from sparse matrix to sparse array: [`migration_to_sparray`](https://scipy.github.io/devdocs/reference/sparse.migration_to_sparray.html). Both `sparse.linalg` and `sparse.csgraph` work with either sparse matrix or sparse array and work internally with sparse array.
Sparse arrays now provide basic support for n-D arrays in the COO format including
add, subtract, reshape, transpose, matmul, dot, tensordot and others. More functionality is/r/Python
https://redd.it/1hsqtz1
GitHub
Release SciPy 1.15.0 · scipy/scipy
SciPy 1.15.0 Release Notes
SciPy 1.15.0 is the culmination of 6 months of hard work. It contains
many new features, numerous bug-fixes, improved test coverage and better
documentation. There have b...
SciPy 1.15.0 is the culmination of 6 months of hard work. It contains
many new features, numerous bug-fixes, improved test coverage and better
documentation. There have b...
Interactive Image Background Remover (open source Photoroom Alternative)
https://github.com/pricklygorse/Interactive-Image-Background-Remover
## What My Project Does
Removes backgrounds from images both automatically and interactively. The key feature of this is you can click parts of the image to remove them, refine and fine tune the background removal, instead of just getting an output and that is it. The workflow is building up a mask from parts of the image, using open weights background removal models to achieve this. It can use both unguided whole-image models (u2net, disnet, rmbg, birefnet) and guided models (segment anything variants). There is also a manual paintbrush if the models struggle.
I've also implemented background colours, simple blurred background and drop shadow effects.
My aim is to work vaguely towards an open source local Photoroom alternative. Its a very very long way from that, but as is, it should be functional for most background removal tasks that many other services struggle with.
## Target Audience
Anyone who needs to remove backgrounds from photos, and wants a "click to remove" workflow, instead of relying on outputs of unguided whole-image removal services. It is a hobby project tailored around my use cases but hopefully stable enough for sharing. The code is pretty rough in places as its my first GUI app
## Comparison
I started
/r/Python
https://redd.it/1hsx9ok
https://github.com/pricklygorse/Interactive-Image-Background-Remover
## What My Project Does
Removes backgrounds from images both automatically and interactively. The key feature of this is you can click parts of the image to remove them, refine and fine tune the background removal, instead of just getting an output and that is it. The workflow is building up a mask from parts of the image, using open weights background removal models to achieve this. It can use both unguided whole-image models (u2net, disnet, rmbg, birefnet) and guided models (segment anything variants). There is also a manual paintbrush if the models struggle.
I've also implemented background colours, simple blurred background and drop shadow effects.
My aim is to work vaguely towards an open source local Photoroom alternative. Its a very very long way from that, but as is, it should be functional for most background removal tasks that many other services struggle with.
## Target Audience
Anyone who needs to remove backgrounds from photos, and wants a "click to remove" workflow, instead of relying on outputs of unguided whole-image removal services. It is a hobby project tailored around my use cases but hopefully stable enough for sharing. The code is pretty rough in places as its my first GUI app
## Comparison
I started
/r/Python
https://redd.it/1hsx9ok
GitHub
GitHub - pricklygorse/Interactive-Image-Background-Remover: Python Tkinter GUI for interactive image background removal
Python Tkinter GUI for interactive image background removal - pricklygorse/Interactive-Image-Background-Remover
So is Django + Vue a good stack?
Hi, I have been stuck in tutorial hell for a while now and decided to build a project for my school. Essentially, its a webpage will allow students to interact with teachers and each other. Can't say much more than that because it is a pretty good business idea and I want to monetise it in the future.
It will need an authentication system, and it will involve the users updating information (so not view only, its dynamic), so a database would be necessary. Because students are using it there has to be no security issues, and it has to be visually pleasing.
I found a teacher at my school that is willing to help me out. He has some experience in Vue, and because I am reasonably familiar with Python, I thought of handling the back end with Django and the front-end with Vue, but I have come across people saying that this is an inefficient stack that doesn't make the best of either technology.
I also tried Firebase initially but couldn't get it to work with Vue because of a ton of "vulnerabilities" that I had no idea how to get rid of, no matter how many times a ran the
/r/django
https://redd.it/1hsvvkk
Hi, I have been stuck in tutorial hell for a while now and decided to build a project for my school. Essentially, its a webpage will allow students to interact with teachers and each other. Can't say much more than that because it is a pretty good business idea and I want to monetise it in the future.
It will need an authentication system, and it will involve the users updating information (so not view only, its dynamic), so a database would be necessary. Because students are using it there has to be no security issues, and it has to be visually pleasing.
I found a teacher at my school that is willing to help me out. He has some experience in Vue, and because I am reasonably familiar with Python, I thought of handling the back end with Django and the front-end with Vue, but I have come across people saying that this is an inefficient stack that doesn't make the best of either technology.
I also tried Firebase initially but couldn't get it to work with Vue because of a ton of "vulnerabilities" that I had no idea how to get rid of, no matter how many times a ran the
/r/django
https://redd.it/1hsvvkk
Reddit
From the django community on Reddit
Explore this post and more from the django community
Do you know a site or a person I can work for as a volunteer in Django?
I have finished learning Django a year ago and have done some private projects and also have intermediate knowledge of HTML and CSS. I have recently learned DRF and have worked on some of my own projects، But I want to work on real projects, develop and keep up with project experts and learn from them and gain experience in this field.
Is it possible to get help?
/r/django
https://redd.it/1hsxytf
I have finished learning Django a year ago and have done some private projects and also have intermediate knowledge of HTML and CSS. I have recently learned DRF and have worked on some of my own projects، But I want to work on real projects, develop and keep up with project experts and learn from them and gain experience in this field.
Is it possible to get help?
/r/django
https://redd.it/1hsxytf
Reddit
From the django community on Reddit
Explore this post and more from the django community
Saturday Daily Thread: Resource Request and Sharing! Daily Thread
# Weekly Thread: Resource Request and Sharing 📚
Stumbled upon a useful Python resource? Or are you looking for a guide on a specific topic? Welcome to the Resource Request and Sharing thread!
## How it Works:
1. Request: Can't find a resource on a particular topic? Ask here!
2. Share: Found something useful? Share it with the community.
3. Review: Give or get opinions on Python resources you've used.
## Guidelines:
Please include the type of resource (e.g., book, video, article) and the topic.
Always be respectful when reviewing someone else's shared resource.
## Example Shares:
1. Book: "Fluent Python" \- Great for understanding Pythonic idioms.
2. Video: Python Data Structures \- Excellent overview of Python's built-in data structures.
3. Article: Understanding Python Decorators \- A deep dive into decorators.
## Example Requests:
1. Looking for: Video tutorials on web scraping with Python.
2. Need: Book recommendations for Python machine learning.
Share the knowledge, enrich the community. Happy learning! 🌟
/r/Python
https://redd.it/1ht11yp
# Weekly Thread: Resource Request and Sharing 📚
Stumbled upon a useful Python resource? Or are you looking for a guide on a specific topic? Welcome to the Resource Request and Sharing thread!
## How it Works:
1. Request: Can't find a resource on a particular topic? Ask here!
2. Share: Found something useful? Share it with the community.
3. Review: Give or get opinions on Python resources you've used.
## Guidelines:
Please include the type of resource (e.g., book, video, article) and the topic.
Always be respectful when reviewing someone else's shared resource.
## Example Shares:
1. Book: "Fluent Python" \- Great for understanding Pythonic idioms.
2. Video: Python Data Structures \- Excellent overview of Python's built-in data structures.
3. Article: Understanding Python Decorators \- A deep dive into decorators.
## Example Requests:
1. Looking for: Video tutorials on web scraping with Python.
2. Need: Book recommendations for Python machine learning.
Share the knowledge, enrich the community. Happy learning! 🌟
/r/Python
https://redd.it/1ht11yp
YouTube
Data Structures and Algorithms in Python - Full Course for Beginners
A beginner-friendly introduction to common data structures (linked lists, stacks, queues, graphs) and algorithms (search, sorting, recursion, dynamic programming) in Python. This course will help you prepare for coding interviews and assessments.
🔗 Course…
🔗 Course…
Pycamo: Camouflage Pattern Generator
My project : Github:Pycamo.
What My Project Does:
Pycamo can generate camouflage from a input image base on fractal noise. It's have GUI so you can use it easily. You can custommize: Size, precentage of each color, complexity of pattern.
Target Audience:
It's just a toy
Comparison:
I have seen several camouflage generators online. Camogen Github: Camogen is the one I have found to have the best results. I know my tool is not as good as Camogen but I still wanted to create my own.
/r/Python
https://redd.it/1ht68e9
My project : Github:Pycamo.
What My Project Does:
Pycamo can generate camouflage from a input image base on fractal noise. It's have GUI so you can use it easily. You can custommize: Size, precentage of each color, complexity of pattern.
Target Audience:
It's just a toy
Comparison:
I have seen several camouflage generators online. Camogen Github: Camogen is the one I have found to have the best results. I know my tool is not as good as Camogen but I still wanted to create my own.
/r/Python
https://redd.it/1ht68e9
GitHub
GitHub - Minhtrna/Pycamo: Python Camouflage Pattern Generator, GUI available
Python Camouflage Pattern Generator, GUI available - Minhtrna/Pycamo
Phitter - A Python library for Statistical Distribution Fitting
I just encountered [Phitter](https://github.com/phitterio/phitter-kernel), a Python library that makes statistical distribution fitting both powerful and intuitive. Not my project, but looks very interesting!
# What is Phitter?
Phitter is a robust Python library that helps you identify and fit the most appropriate statistical distributions to your datasets. Think of it as your Swiss Army knife for probability distribution analysis - whether you're working with continuous or discrete data, Phitter has got you covered.
# Key Features:
* Support for 80+ probability distributions (both continuous and discrete)
* Three goodness-of-fit tests (Chi-Square, Kolmogorov-Smirnov, Anderson-Darling)
* Beautiful visualizations (histograms, PDFs, ECDFs, Q-Q plots)
* Parallel processing support for large datasets
* Comprehensive documentation and modeling guides
# Show Me The Code!
Here's how simple it is to get started:
import phitter
# Basic usage
data = [your_data_here]
phi = phitter.PHITTER(data)
phi.fit()
# Get a summary of the top k distributions
print(phi.summarize(k=5))
# Plot the results
phi.plot_histogram_distributions() # Shows fitted distributions
phi.plot_ecdf() # Empirical Cumulative Distribution Function
Want more control?
/r/Python
https://redd.it/1hsqp3x
I just encountered [Phitter](https://github.com/phitterio/phitter-kernel), a Python library that makes statistical distribution fitting both powerful and intuitive. Not my project, but looks very interesting!
# What is Phitter?
Phitter is a robust Python library that helps you identify and fit the most appropriate statistical distributions to your datasets. Think of it as your Swiss Army knife for probability distribution analysis - whether you're working with continuous or discrete data, Phitter has got you covered.
# Key Features:
* Support for 80+ probability distributions (both continuous and discrete)
* Three goodness-of-fit tests (Chi-Square, Kolmogorov-Smirnov, Anderson-Darling)
* Beautiful visualizations (histograms, PDFs, ECDFs, Q-Q plots)
* Parallel processing support for large datasets
* Comprehensive documentation and modeling guides
# Show Me The Code!
Here's how simple it is to get started:
import phitter
# Basic usage
data = [your_data_here]
phi = phitter.PHITTER(data)
phi.fit()
# Get a summary of the top k distributions
print(phi.summarize(k=5))
# Plot the results
phi.plot_histogram_distributions() # Shows fitted distributions
phi.plot_ecdf() # Empirical Cumulative Distribution Function
Want more control?
/r/Python
https://redd.it/1hsqp3x
GitHub
GitHub - phitterio/phitter-kernel: Phitter is a phython library for accurately fitting statistical distributions to datasets, offering…
Phitter is a phython library for accurately fitting statistical distributions to datasets, offering intuitive usage, comprehensive visualization, and support for multiple distributions to enhance d...
How to create a dynamic formset by reading data from an uploaded file and then allow it to be modified before final submission and storage
Hi,
I have the following usecase:
1) Users can upload a csv file of their bank transactions.
2) The file is parsed and converted into transactions instances and categorized. The categories and list of transactions are shown to the user.
3) The user can then make some modifications (e.g., change categories) and finally submit the formset leading to all transactions being saved in the database.
I am currently struggling with the (3) step and not able to get a formset work which is populated from data not yet in database.
Does anyone have examples of how to solve this? I can share code snippets of course.
Are there better alternatives for this problem? May be HTMX, given that formsets have such bad reviews.
p.s. my current approach is as follows:
I handle the uploaded csv file in the POST view and extract transactions. Using these transaction instances, I populate a formset and then render it. However, when I submit the formset no data is saved.
Any help highly appreciated!
/r/django
https://redd.it/1hss4oy
Hi,
I have the following usecase:
1) Users can upload a csv file of their bank transactions.
2) The file is parsed and converted into transactions instances and categorized. The categories and list of transactions are shown to the user.
3) The user can then make some modifications (e.g., change categories) and finally submit the formset leading to all transactions being saved in the database.
I am currently struggling with the (3) step and not able to get a formset work which is populated from data not yet in database.
Does anyone have examples of how to solve this? I can share code snippets of course.
Are there better alternatives for this problem? May be HTMX, given that formsets have such bad reviews.
p.s. my current approach is as follows:
I handle the uploaded csv file in the POST view and extract transactions. Using these transaction instances, I populate a formset and then render it. However, when I submit the formset no data is saved.
Any help highly appreciated!
/r/django
https://redd.it/1hss4oy
Reddit
From the django community on Reddit
Explore this post and more from the django community
Accessing foreign key in a template.
I'll use the typical models given with Django examples and explain the problem I'm having.
I'm listing the books out in a template and need to access the author of each book. I've tried {{book.author.name}} and it doesn't work. I've also seen recommendations to use {{book.author_set.all.0}}, but that doesn't work either. Any guidance on whether or not this is possible and how to go about it is appreciated.
/r/djangolearning
https://redd.it/1ht9o67
I'll use the typical models given with Django examples and explain the problem I'm having.
class Author(models.Model): name = models.CharField()class Book(models.Model): name = models.CharField() author = models.ForeignKey(Author)I'm listing the books out in a template and need to access the author of each book. I've tried {{book.author.name}} and it doesn't work. I've also seen recommendations to use {{book.author_set.all.0}}, but that doesn't work either. Any guidance on whether or not this is possible and how to go about it is appreciated.
/r/djangolearning
https://redd.it/1ht9o67
Reddit
From the djangolearning community on Reddit
Explore this post and more from the djangolearning community