Heroku deployment
Hi guys so i tried to deploy on heroku and it didn't work so I tried again and this time i used the "heroku create [name\] to create another app. And then ran git push heroku master after commiting changes but the error i got was
( ! [remote rejected\] master -> master (pre-receive hook declined)
error: failed to push some refs to 'old appname'.
So I wanted to know why it pushed to the old one and not the new one and how to fix it
Also another different question, do you guys have two settings like "local_settings.py and settings.py" or only one.
/r/django
https://redd.it/ktf7t0
Hi guys so i tried to deploy on heroku and it didn't work so I tried again and this time i used the "heroku create [name\] to create another app. And then ran git push heroku master after commiting changes but the error i got was
( ! [remote rejected\] master -> master (pre-receive hook declined)
error: failed to push some refs to 'old appname'.
So I wanted to know why it pushed to the old one and not the new one and how to fix it
Also another different question, do you guys have two settings like "local_settings.py and settings.py" or only one.
/r/django
https://redd.it/ktf7t0
My second attempt to build portfolio from scratch with flask.
http://khashayar.pythonanywhere.com/
/r/flask
https://redd.it/kta26h
http://khashayar.pythonanywhere.com/
/r/flask
https://redd.it/kta26h
Pythonanywhere
Simplepycodes | Welcome
Programming tutorialss, Python tutorials, Database, Game development
Confusion regarding django channels
I recently is thinking about making asynchronous apps , I know about django channels but I feel they are not production ready.I have not known any company use django channels.What are your opinions about django channels?
/r/django
https://redd.it/ktimi5
I recently is thinking about making asynchronous apps , I know about django channels but I feel they are not production ready.I have not known any company use django channels.What are your opinions about django channels?
/r/django
https://redd.it/ktimi5
reddit
Confusion regarding django channels
I recently is thinking about making asynchronous apps , I know about django channels but I feel they are not production ready.I have not known any...
How do you bind a file (not uploaded but internally generated) to a model's FileField after the model has been saved?
I have a model that takes, among other fields, a video as a `models.FileField()`, two text files as `models.FileField()` and an image as a `models.ImageField()`. Now, of these four fields, only the video and one text file are uploaded by the user, the other text file and the image are generated internally and—I think, so far—need to be bound to model fields. The image needs to be displayed in a page and the text file will be available for download. I still don't know how to offer this download, but I'm trying to have it as a model field.
Something like this ([`models.py`](https://models.py)):
class Project(models.Model):
project_name = models.CharField(unique=True, max_length=80)
video_file = models.FileField(upload_to=user_directory_path)
original_text_file = models.FileField(
blank=True,
upload_to=user_directory_path
)
generated_text_file = models.FileField(blank=True)
# This image is generated with
/r/django
https://redd.it/ktk9iq
I have a model that takes, among other fields, a video as a `models.FileField()`, two text files as `models.FileField()` and an image as a `models.ImageField()`. Now, of these four fields, only the video and one text file are uploaded by the user, the other text file and the image are generated internally and—I think, so far—need to be bound to model fields. The image needs to be displayed in a page and the text file will be available for download. I still don't know how to offer this download, but I'm trying to have it as a model field.
Something like this ([`models.py`](https://models.py)):
class Project(models.Model):
project_name = models.CharField(unique=True, max_length=80)
video_file = models.FileField(upload_to=user_directory_path)
original_text_file = models.FileField(
blank=True,
upload_to=user_directory_path
)
generated_text_file = models.FileField(blank=True)
# This image is generated with
/r/django
https://redd.it/ktk9iq
Good Django libraries to read to really understand class-based views?
Are there any Django libraries that make extensive use of class-based views that I might study if I want to gain an in-depth understanding of how to use them? The Django documentation is OK at explaining what they are and how they work but most of the examples are very trivial in nature. I'd like to become a "power user" and for that I need lots of code to study. I've looked at the Classy Class-Based Views examples but they seem too "meta" to me to shed any real light on how to use them in practice. Thanks.
/r/djangolearning
https://redd.it/ktbx5i
Are there any Django libraries that make extensive use of class-based views that I might study if I want to gain an in-depth understanding of how to use them? The Django documentation is OK at explaining what they are and how they work but most of the examples are very trivial in nature. I'd like to become a "power user" and for that I need lots of code to study. I've looked at the Classy Class-Based Views examples but they seem too "meta" to me to shed any real light on how to use them in practice. Thanks.
/r/djangolearning
https://redd.it/ktbx5i
ccbv.co.uk
Django Class-Based-View Inspector -- Classy CBV
The best way to understand Django's class-based views is to see it in Classy CBV, so pick your version and jump in at the deep end.
N AI-based image compression will be standardized!
https://jpeg.org/items/20201014\_press.html
JPEG initiates standardisation of image compression based on AI
/r/MachineLearning
https://redd.it/ktceww
https://jpeg.org/items/20201014\_press.html
JPEG initiates standardisation of image compression based on AI
/r/MachineLearning
https://redd.it/ktceww
reddit
[N] AI-based image compression will be standardized!
[https://jpeg.org/items/20201014\_press.html](https://jpeg.org/items/20201014_press.html) JPEG initiates standardisation of image compression...
I automated a full time full before it could be advertised
Thought this was funny. I work as an Accountant and last week my Manager let me know that due to a Government audit we would be required to fully itemise our government funding client statements.
The problem is that our client statement involve charges from third party companies who are paid from this government funding and all these invoices are held on a third party website.
The third party website said they couldn't help and it was determined that due to how slow the website is as well as other factors (the invoices are all listed as individual download links, some invoices are password protected pdf's, some are jpg's, the website layout is terrible) that it would require 160-180 hours of manual work and therefore a new admin person would need to be hired.
So I wrote something in Python that opens a headless browser, grabs all client names, then goes through each clients account and downloads every invoice, skips any client with no invoices, converts all jpg's to pdf's and resizes them so they fit correctly on the page and merges all invoices into one file per client to form our new statement file.
It takes about about an hour to
/r/Python
https://redd.it/ktj4jq
Thought this was funny. I work as an Accountant and last week my Manager let me know that due to a Government audit we would be required to fully itemise our government funding client statements.
The problem is that our client statement involve charges from third party companies who are paid from this government funding and all these invoices are held on a third party website.
The third party website said they couldn't help and it was determined that due to how slow the website is as well as other factors (the invoices are all listed as individual download links, some invoices are password protected pdf's, some are jpg's, the website layout is terrible) that it would require 160-180 hours of manual work and therefore a new admin person would need to be hired.
So I wrote something in Python that opens a headless browser, grabs all client names, then goes through each clients account and downloads every invoice, skips any client with no invoices, converts all jpg's to pdf's and resizes them so they fit correctly on the page and merges all invoices into one file per client to form our new statement file.
It takes about about an hour to
/r/Python
https://redd.it/ktj4jq
reddit
I automated a full time full before it could be advertised
Thought this was funny. I work as an Accountant and last week my Manager let me know that due to a Government audit we would be required to fully...
Application data flow between browser, Nuxt and Django for simple CRUD app with session authentication (repo, article & diagram in comments)
/r/django
https://redd.it/kts9xw
/r/django
https://redd.it/kts9xw
This media is not supported in your browser
VIEW IN TELEGRAM
[P] [D] ML algorithm that can morph any two images without reference points.
https://redd.it/ktnwcv
@pythondaily
https://redd.it/ktnwcv
@pythondaily
Sunday Daily Thread: What's everyone working on this week?
Tell /r/python what you're working on this week! You can be bragging, grousing, sharing your passion, or explaining your pain. Talk about your current project or your pet project; whatever you want to share.
/r/Python
https://redd.it/ku2q3e
Tell /r/python what you're working on this week! You can be bragging, grousing, sharing your passion, or explaining your pain. Talk about your current project or your pet project; whatever you want to share.
/r/Python
https://redd.it/ku2q3e
reddit
Sunday Daily Thread: What's everyone working on this week?
Tell /r/python what you're working on this week! You can be bragging, grousing, sharing your passion, or explaining your pain. Talk about your...
As a thank you to the community, here is my new book: Slither into Data Structures and Algorithms
Hi everyone!
A couple of years ago I released "Slither into Python" for free online which was an introduction to Python for complete beginners. I released it for free as a thank you to the Python community in general. You can view that here.
The feedback was amazing (thank you all, I'm delighted you enjoyed it!). It inspired me to write another book that I felt was the natural extension to it - focusing on data structures and algorithms. In fact, I had a lot of requests for it after the last two chapters of that book so that inspired me even more to write this.
I had started on it a while back but work became super busy and last year happened so I kind of forgot about it. However I recently came across the files and decided to pick it back up.
It's now complete: "Slither into Data Structures and Algorithms: A concise guide to the backbone of the digital world through Python" and you can check it out here: slitherintoalgorithms.com.
The chapter on Graphs is up and free to read on the site! Again, I'd like to thank everyone on this subreddit that gave such amazing feedback and improvements for my last
/r/Python
https://redd.it/ku09n3
Hi everyone!
A couple of years ago I released "Slither into Python" for free online which was an introduction to Python for complete beginners. I released it for free as a thank you to the Python community in general. You can view that here.
The feedback was amazing (thank you all, I'm delighted you enjoyed it!). It inspired me to write another book that I felt was the natural extension to it - focusing on data structures and algorithms. In fact, I had a lot of requests for it after the last two chapters of that book so that inspired me even more to write this.
I had started on it a while back but work became super busy and last year happened so I kind of forgot about it. However I recently came across the files and decided to pick it back up.
It's now complete: "Slither into Data Structures and Algorithms: A concise guide to the backbone of the digital world through Python" and you can check it out here: slitherintoalgorithms.com.
The chapter on Graphs is up and free to read on the site! Again, I'd like to thank everyone on this subreddit that gave such amazing feedback and improvements for my last
/r/Python
https://redd.it/ku09n3
Slitherintopython
Betturkey Giriş — Türk bahis sitesi Bettürkey
Betturkey, her zaman güncel giriş adresi ile Türkiye'nin en iyi bahis ve casino sitesi Betturkey'dir. Her zaman güncel giriş adresine sahip olmak için Telegram ve Twitter'da abone olun.
D Color coding equations
I've seen this done in a few places and wanted to give it a try - where you color code parts of mathematical equations so that it's easier to follow them around, or to group them.
At a glance it seems easier to follow around and see some relationships. Wonder whether it can be a distraction when reading the text. What are your opinions on it?
Example: (screenshot from https://lab-ml.com/labml\_nn/transformers/relative\_mha.html)
https://preview.redd.it/ir7zouvns8a61.png?width=1062&format=png&auto=webp&s=c603bb1681a83efbbbacf382ccf8e511c51efafb
/r/MachineLearning
https://redd.it/ktkuay
I've seen this done in a few places and wanted to give it a try - where you color code parts of mathematical equations so that it's easier to follow them around, or to group them.
At a glance it seems easier to follow around and see some relationships. Wonder whether it can be a distraction when reading the text. What are your opinions on it?
Example: (screenshot from https://lab-ml.com/labml\_nn/transformers/relative\_mha.html)
https://preview.redd.it/ir7zouvns8a61.png?width=1062&format=png&auto=webp&s=c603bb1681a83efbbbacf382ccf8e511c51efafb
/r/MachineLearning
https://redd.it/ktkuay
LabML Neural Networks
Relative Multi-Headed Attention
Documented implementation with explanations of Relative Multi-Headed Attention from paper Transformer-XL.
Sane: Makefile for Humans
Despite being a great and flexible tool (proof of which is how long it's been around for!), I've always been a little frustrated by
1. How cumbersome and opaque the grammar of Make is (
2. How hard it is to keep state (which usually ends up in having a recipe be a single long bash line with a lot of
`Sane` (`sane-build` in PyPI) is an attempt to create an alternative that incorporates the ideas of
From the project's
> - Recipes are python functions with recipe/file/hook dependencies.
> - If a recipe A depends on recipe B, recipe B is checked. If B is ran, then A is ran afterwards.
> - Recipes are ran if its dependency files are newer than its target files (or if either cannot be found).
> - Recipes with no dependencies are always ran.
> - Hooks are a way to tag dependencies. Recipes depending on a hook depend on all recipes with that hook.
> - Everything else is standard Python.
Like its name indicates,
/r/Python
https://redd.it/ktxk80
Despite being a great and flexible tool (proof of which is how long it's been around for!), I've always been a little frustrated by
Make in two aspects:1. How cumbersome and opaque the grammar of Make is (
$* $< $@?!)2. How hard it is to keep state (which usually ends up in having a recipe be a single long bash line with a lot of
\s --- and that's ugly and hard to read.)`Sane` (`sane-build` in PyPI) is an attempt to create an alternative that incorporates the ideas of
Make, but provides the full flexibility of Python in terms of writing logic.From the project's
README:> - Recipes are python functions with recipe/file/hook dependencies.
> - If a recipe A depends on recipe B, recipe B is checked. If B is ran, then A is ran afterwards.
> - Recipes are ran if its dependency files are newer than its target files (or if either cannot be found).
> - Recipes with no dependencies are always ran.
> - Hooks are a way to tag dependencies. Recipes depending on a hook depend on all recipes with that hook.
> - Everything else is standard Python.
Like its name indicates,
sane tries to be as uncomplicated as possible/r/Python
https://redd.it/ktxk80
GitHub
GitHub - mikeevmm/sane: make, but sane.
make, but sane. Contribute to mikeevmm/sane development by creating an account on GitHub.
A list of tutorials for beginners
I have been working on a series of videos to show the basics of Python Programming to beginners. If you are new to the language, programming in general, or would like a quick reference to some basic concepts, this will hopefully be a good resource for you!
[Introduction](https://youtu.be/eJt-leDZqls)
Creating, Using, and Manipulating Variables
[Working with Arrays and Dictionaries](https://youtu.be/BsgfRXaVTik)
Controlling Program Flow with Loops
[Recycling Code with Functions](https://youtu.be/Dwkb2rcoT2U)
Creating Abstract Objects through Classes
[Relating Objects to One Another with Inheritance](https://youtu.be/POkIYB1vlcA)
Replacing Parent Methods by Overriding Functions
[Utilizing Static and Class Variables](https://youtu.be/u55vEYcMWko)
Creating Virtual Environments
The tutorials follow a long-term series where I build bigger projects, so the list will grow over time. I would love to hear suggestions for more videos to make!
/r/Python
https://redd.it/ktqnce
I have been working on a series of videos to show the basics of Python Programming to beginners. If you are new to the language, programming in general, or would like a quick reference to some basic concepts, this will hopefully be a good resource for you!
[Introduction](https://youtu.be/eJt-leDZqls)
Creating, Using, and Manipulating Variables
[Working with Arrays and Dictionaries](https://youtu.be/BsgfRXaVTik)
Controlling Program Flow with Loops
[Recycling Code with Functions](https://youtu.be/Dwkb2rcoT2U)
Creating Abstract Objects through Classes
[Relating Objects to One Another with Inheritance](https://youtu.be/POkIYB1vlcA)
Replacing Parent Methods by Overriding Functions
[Utilizing Static and Class Variables](https://youtu.be/u55vEYcMWko)
Creating Virtual Environments
The tutorials follow a long-term series where I build bigger projects, so the list will grow over time. I would love to hear suggestions for more videos to make!
/r/Python
https://redd.it/ktqnce
YouTube
Learn Python: Ep. 0 - Introduction
Welcome to my series for Learning Python, where I will be teaching fundamental concepts in the Python programming language. These videos will focus on one aspect of Python at a time, but your understanding of the material will be greatly improved through…
How to use Billplz secret key for FPX payment in Flask
Hi there good day, I am new to payment gateway and would like to integrate it with Flask. I am currently using Billplz as my FPX payment gateway. I do not have any examples on using Billplz with flask and hence I am stuck at here currently. They have provided a secret key with a few API references on payment methods. Can I use to call the payment gateway like this http/API/secretkey/bank. Is my understanding wrong? Appreciate if can share any guidelines on how to setup payment gateway with only secret key.
This is their website by the way. https://www.billplz.com/api#introduction
/r/flask
https://redd.it/ku9nnc
Hi there good day, I am new to payment gateway and would like to integrate it with Flask. I am currently using Billplz as my FPX payment gateway. I do not have any examples on using Billplz with flask and hence I am stuck at here currently. They have provided a secret key with a few API references on payment methods. Can I use to call the payment gateway like this http/API/secretkey/bank. Is my understanding wrong? Appreciate if can share any guidelines on how to setup payment gateway with only secret key.
This is their website by the way. https://www.billplz.com/api#introduction
/r/flask
https://redd.it/ku9nnc
reddit
How to use Billplz secret key for FPX payment in Flask
Hi there good day, I am new to payment gateway and would like to integrate it with Flask. I am currently using Billplz as my FPX payment gateway....
Web Scraping with Python for Beginner - Easiest Way
https://www.youtube.com/watch?v=98WgEhQaZvs
/r/Python
https://redd.it/ku9fb4
https://www.youtube.com/watch?v=98WgEhQaZvs
/r/Python
https://redd.it/ku9fb4
YouTube
Web Scraping With Python For Beginners - Easiest Way
Learn how to perform web scraping with python in the easiest way possible. In this tutorial, I will teach you how to scrape any web page using python and a chrome extension. The best part about this tutorial is that you would have to write very less code…
I finally did something I feel was worth while
I work in the public health sector, an area with very bad technology debt. A lot of data is still on paper, scattered throughout spreadsheets, or somewhere else and deemed to exist so it's fine we don't need to track that. It's totally fine.
Well, I work in research and evaluation and for a very large grant, I needed to connect our student records to a federal database that tracks where they are out in the field once they have started medical residency and become established as doctors.
We only had names of students, and many python headaches later I ended up with a script to write all of the results for each API call to an Excel file, except I had to enter each first and last name manually.
We were going to make a graduate student do the manual entry of it all. It probably would've taken months. But then I realized I could just make a little script to do the entries instead.
It was very stitched together, and it almost certainly could have been more elegant, but it worked and only took a couple of days for it to go through all of it.
/r/Python
https://redd.it/kty4h3
I work in the public health sector, an area with very bad technology debt. A lot of data is still on paper, scattered throughout spreadsheets, or somewhere else and deemed to exist so it's fine we don't need to track that. It's totally fine.
Well, I work in research and evaluation and for a very large grant, I needed to connect our student records to a federal database that tracks where they are out in the field once they have started medical residency and become established as doctors.
We only had names of students, and many python headaches later I ended up with a script to write all of the results for each API call to an Excel file, except I had to enter each first and last name manually.
We were going to make a graduate student do the manual entry of it all. It probably would've taken months. But then I realized I could just make a little script to do the entries instead.
It was very stitched together, and it almost certainly could have been more elegant, but it worked and only took a couple of days for it to go through all of it.
/r/Python
https://redd.it/kty4h3
reddit
I finally did something I feel was worth while
I work in the public health sector, an area with very bad technology debt. A lot of data is still on paper, scattered throughout spreadsheets, or...
Pyradox: State of the Art Neural Networks for Deep Learning
🎉 Introducing pyradox: a python library that helps you with implementing various state of the art neural networks in a totally customizable fashion using TensorFlow 2.
Check out how it can be used to Detect location of Keypoints on face images: https://ritvik19.medium.com/facial-key-points-detection-using-pyradox-f2a6cf6a862f
You can find pyradox here: https://github.com/Ritvik19/pyradox
Don't forget to ⭐ the repo!
/r/Python
https://redd.it/kubmlz
🎉 Introducing pyradox: a python library that helps you with implementing various state of the art neural networks in a totally customizable fashion using TensorFlow 2.
Check out how it can be used to Detect location of Keypoints on face images: https://ritvik19.medium.com/facial-key-points-detection-using-pyradox-f2a6cf6a862f
You can find pyradox here: https://github.com/Ritvik19/pyradox
Don't forget to ⭐ the repo!
/r/Python
https://redd.it/kubmlz
Medium
Facial Key-points Detection using pyradox
pyradox is a python library helps you with implementing various state of the art neural networks in a totally customizable fashion using…
How to mask a domain name with another?
I created a web app, where a user get a pre-made website upon signup (e.g. www.webapp.com/user1) I would like users to use custom domains for their websites.
For example, I'd like www.webapp.com/user1 to be accessible via a new custom URL www.user-custom-domain-name.com.
I know both WordPress and Wix allow users to do this.
Does anyone know? Any help or pointer would be appreciated. Thank you.
​
P.S. I'm using PythonAnywhere's paid service and PythonAnywhere is using uWSGI as server layer.
/r/flask
https://redd.it/ku3q6q
I created a web app, where a user get a pre-made website upon signup (e.g. www.webapp.com/user1) I would like users to use custom domains for their websites.
For example, I'd like www.webapp.com/user1 to be accessible via a new custom URL www.user-custom-domain-name.com.
I know both WordPress and Wix allow users to do this.
Does anyone know? Any help or pointer would be appreciated. Thank you.
​
P.S. I'm using PythonAnywhere's paid service and PythonAnywhere is using uWSGI as server layer.
/r/flask
https://redd.it/ku3q6q
PyPLANE - open source ODE solver written in Python
Hey everyone! Introducing our new app PyPLANE: your new favourite GUI-based solver for ordinary differential equations. https://github.com/m-squared96/PyPLANE
​
PyPLANE is built using NumPy, SymPy and Matplotlib in the backend, with a PyQt frontend. As it's an app it's not up on PyPI, but if you run Linux it can be installed via the Snap store using `sudo snap install pyplane`. Windows users: we don't have the executable ready yet, but watch this space. Mac users: sorry bro.
​
This is an early release, so expect some stability issues. But fear not! We plan on rolling out a full, stable V1 release before too long. If you want to get involved, join us on GitHub. This is a great opportunity to do something novel with some of the cornerstone modules used in data science, and a great project to include in any portfolio.
/r/Python
https://redd.it/kughg4
Hey everyone! Introducing our new app PyPLANE: your new favourite GUI-based solver for ordinary differential equations. https://github.com/m-squared96/PyPLANE
​
PyPLANE is built using NumPy, SymPy and Matplotlib in the backend, with a PyQt frontend. As it's an app it's not up on PyPI, but if you run Linux it can be installed via the Snap store using `sudo snap install pyplane`. Windows users: we don't have the executable ready yet, but watch this space. Mac users: sorry bro.
​
This is an early release, so expect some stability issues. But fear not! We plan on rolling out a full, stable V1 release before too long. If you want to get involved, join us on GitHub. This is a great opportunity to do something novel with some of the cornerstone modules used in data science, and a great project to include in any portfolio.
/r/Python
https://redd.it/kughg4
GitHub
GitHub - m-squared96/PyPLANE: An open source replacement to the traditional DFIELD and PPLANE applications for solving systems…
An open source replacement to the traditional DFIELD and PPLANE applications for solving systems of ODEs - m-squared96/PyPLANE
I created a pandemic simulator using Python & pygame
I recently started working on a pandemic simulator. My goal is to make people aware on how fast and easily the virus could be spread. The green dots are safe people, red infected and blue are the immune. My code will be available later to run some simulations yourself!
https://www.youtube.com/watch?v=bD258\_Tz8ME
Keep safe!
/r/Python
https://redd.it/kufbao
I recently started working on a pandemic simulator. My goal is to make people aware on how fast and easily the virus could be spread. The green dots are safe people, red infected and blue are the immune. My code will be available later to run some simulations yourself!
https://www.youtube.com/watch?v=bD258\_Tz8ME
Keep safe!
/r/Python
https://redd.it/kufbao
YouTube
Pandemic Simulation using Python & Pygame
Small example on about my project simulating the pandemic and why we should flatten the curve. Using this small simulation environment I want to show why we all should keep our distance. My goal is to make people aware on how fast and easily the virus could…