Python Daily
2.57K subscribers
1.48K photos
53 videos
2 files
38.9K links
Daily Python News
Question, Tips and Tricks, Best Practices on Python Programming Language
Find more reddit channels over at @r_channels
Download Telegram
This media is not supported in your browser
VIEW IN TELEGRAM
[R] AutoSweep: Recovering 3D Editable Objects from a Single Photograph

/r/MachineLearning
https://redd.it/gtaq94
Retrieving data from html forms without rendering templates

So we have this homework where we have to retrieve data from an html form, after sending the file as 'send_static_file'. However, we are not supposed to use flask templates at all. Is there any way to do this?

/r/flask
https://redd.it/gt9wmf
Can I use a file server without any software like NGINX?

We have a server that we plan to serve our static files. I want to ask what's the point of using a web server software like NGINX?

Why it is recommended if it is not necesarry?

/r/django
https://redd.it/gtbpn1
Django REST Framework got hacked

DRF's website got hacked with a page displaying a page of African American people got killed by police "I presume". Does anyone know when it will be back?

​

​

https://preview.redd.it/s631vkjxlx151.png?width=704&format=png&auto=webp&s=e7cad0638da27fc076ca450c38ba9990897ac411

/r/django
https://redd.it/gthakw
Python performance comparison in my project's unittest (via Gitlab CI/CD)

/r/Python
https://redd.it/gtgsot
This media is not supported in your browser
VIEW IN TELEGRAM
Deploy as many Django websites as you want with one simple command

/r/django
https://redd.it/gtguph
Where is the "default project template"?

The Django [docs](https://docs.djangoproject.com/en/3.0/ref/contrib/admin/) for the admin site say

> The admin is enabled in the default project template used by `startproject`.
>
If you’re not using the default project template, here are the requirements: [...]


This "default project template" is not defined. What is the default project template named, and where is it located? Web search and Docs search are turning up nothing.

/r/djangolearning
https://redd.it/gtdvgh
This media is not supported in your browser
VIEW IN TELEGRAM
A Hangman AI that tries to solve words given by the user!

/r/Python
https://redd.it/gtie5f
[D] Zero-Shot Learning for Text Classification

Hi everyone,

With GPT-3 released, there has been a renewed interest in zero-shot learning in the NLP community. I've written a summary of one of the earlier papers that proposed zero-shot text classification. Please check it out and share your feedback.

Article: https://amitness.com/2020/05/zero-shot-text-classification/

/r/MachineLearning
https://redd.it/gtij5d
What to use for front end development to make it easy and clean? Do nice html/css templates exist? Easy frameworks that work well with django?

I am a software developer that primarily develops applications. I am new to web apps so it might be no surprise to you I have 0 experience with front end development. Ideally, I would like to make the process as easy as possible. I like "minimalist" web app design which could also mean simpler front end code.

I have seen some suggestions online to use React with django? I have heard of people using bootstrap as well? I quite honestly don't know anything more about these 2 frameworks than what you can learn in a google search. I'm genuinely curious if the django community has a consensus on what to use if you are a backend developer looking to make front ends quickly and easily...

Thank you :)

/r/django
https://redd.it/gtpnsx
Two forms csrf token non-unique id chrome warning

Hi,

When using two flask forms on one page chrome is giving warning about non-unique ids of csrf id field. Is there any way to change the id of csrf field.

Or do I just ignore the error ?

/r/flask
https://redd.it/gtjwbt
Need Help! Jupyter Notebook shutting down immediately after opening.

So here is the detailed problem
I have installed anaconda package.
As soon as I click on the jupyter/anaconda, a little window pops up and exits immediately within a second.

Please help if you know the solution

/r/JupyterNotebooks
https://redd.it/gtv5mz
Any up to date tutorial on web scraping?

A lot of the tutorials I have found thus far are either out of date or confused me due to the websites they used being updated

/r/Python
https://redd.it/gttql2
This media is not supported in your browser
VIEW IN TELEGRAM
I created the first cross-platform Python library to create native context menus!

/r/Python
https://redd.it/gtzk7v
What is the best way to create Django + React project?

I wonder how to create django and react website, I know there is way when you create django app called frontend and put all react stuff there, but I'm not sure if it's the most convenient way.

/r/django
https://redd.it/gtwwyr
This media is not supported in your browser
VIEW IN TELEGRAM
[Update] Shooting pose analysis and basketball shot detection web App and API with Flask [GitHub repo in comment]

/r/flask
https://redd.it/gu055f
I configured my terminal to teach me a new word everyday! Every time I open a new terminal window, I have a python script that scrapes dictionary.com and gives me the word of the day. On top of that, I have a motivational quote displayed as well :)

/r/Python
https://redd.it/gu9nzq
Help with Python Claqses

Hi Guys and Girls.

I'm new to Python but not programming.

I having trouble understanding how I can update a class that is a Tkinter frame.

The frame is created with a def \_\_init\_\_ and all the text is added.

My question is how do I then reference this frame from a function to update the text on that frame. Basically I am updating a database and want to update the figures in the current frame / window.

Some of the code is below

### Create a class for the Dashboard page.  This will also be the start page when the application starts
`class Dashboard (tk.Frame):`
`def __init__(self, parent, controller):`
`tk.Frame.__init__(self,parent, bg="#263D42")`
`label = tk.Label(self, text="Author Dashboard", font=TITLE_FONT, bg="#263D42", fg="white", pady = 20)`
`label.grid(row=0, column=0, sticky="nsew")`
`stat = GetStatsSQL('allPapers')`

`tk.Label(self, text="Number of Publications in the Database", bg="#263D42", fg="white").grid(row=1, column=0, sticky="w")`
`tk.Label(self, text=stat, bg="#263D42", fg="white").grid(row=1, column=1)`
`stat = GetStatsSQL('authors')`

`tk.Label(self, text="Number of Authors in the Database", bg="#263D42", fg="white").grid(row=2, column=0, sticky="w")`
`tk.Label(self, text=stat, bg="#263D42", fg="white").grid(row=2, column=1)`
`stat = GetStatsSQL('journal')`

`tk.Label(self, text="Number of Journals in the Database", bg="#263D42", fg="white").grid(row=3, column=0, sticky="w")`

`tk.Label(self, text=stat, bg="#263D42", fg="white").grid(row=3, column=1)`
`stat = GetStatsSQL('conference')`
`tk.Label(self, text="Number of Conference Papers in the Database", bg="#263D42", fg="white").grid(row=4, column=0, sticky="w")`
`tk.Label(self, text=stat, bg="#263D42", fg="white").grid(row=4, column=1)`
`def update():`
`stat = GetStatsSQL('allPapers')`

`tk.Label(APP, text=stat, bg="#263D42", fg="white").grid(row=1, column=1)`

This is the dashboard class to create and display the dashboard. You can see in the code that there a functions that call SQL to return a result and display it.

What I want to to refresh this page after the database has been changed by another function.

I gave create a function in the Dashboard class but I'm unsure how I can change the tk.label test set when the class was created.

Thanks

Brian

/r/Python
https://redd.it/gudzii