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
Lets plot: An interactive Python plotting library using ggplot's API
https://github.com/JetBrains/lets-plot/blob/master/README_PYTHON.md

/r/Python
https://redd.it/ipgk0r
[D] How are you handling Covid's impact on your already deployed forecasting/pricing models?

I am currently working as a pricing analyst and I have a bunch of demand forecasting models in production, I use them along with a bunch of rules to suggest prices to my clients (Mostly Hotel chains, ferry's, etc). Now, most of these folks are slowly opening-up their traffic. Now my question is I want to retrain my forecasting models :

1. How should I handle the missing period March-August?
2. With things opening, is there any literature or dataset around how users behaved in the travel sector after COVID like events?
3. It would be also great if you can share how you are adjusting your current models ( in any sector) to adjust for Covid's impact.

/r/MachineLearning
https://redd.it/ipggr8
Any good tutorials for flask and React.?

There are several that show you setup but none that show you multiple views/routes. Any one got any links?!

/r/flask
https://redd.it/ipj4ga
Thursday megathread: Python careers!

Discussion of using Python in a professional environment, getting jobs in Python and more!

**This thread is not for recruitment, please see** r/PythonJobs **or the thread in the sidebar for that.**

/r/Python
https://redd.it/ipsa5f
New Update for ObFile Compiler out!!!

So here is ObFile 1.1.1 release info

Check it out here:
[https://github.com/kavinjindal/ObFile](https://github.com/kavinjindal/ObFile)

After many suggestions, I have added various things and removed various features from ObFile

* Removed time.sleep commands
* Added Message Box System
* Added setup file to install modules
* Fixed indents and spaces
* Fixed bugs
* Updated Menu
*

/r/Python
https://redd.it/ipynkw
I published a tutorial where I extract spectrograms from audio files with Python

In my new video, I explain how to extract spectrograms from an audio file with Python and Librosa using the Short-Time Fourier Transform. I also introduce different types of spectrograms and compare the spectrograms of music in different genres.

This video is part of the Audio Processing for Machine Learning series. This course aims to teach you how to process audio data 🎧 and extract relevant audio features for your machine learning applications 🤖🤖.

Here’s the video:

[https://www.youtube.com/watch?v=3gzI4Z2OFgY&list=PL-wATfeyAMNqIee7cH3q1bh4QJFAaeNv0&index=16](https://www.youtube.com/watch?v=3gzI4Z2OFgY&list=PL-wATfeyAMNqIee7cH3q1bh4QJFAaeNv0&index=16)

/r/Python
https://redd.it/iq0pog
DjangoCon Europe 2020 is FREE

Hi all,

Just to let you know that DjangoCon Europe 2020 has already published their schedule:
[https://cfp.2020.djangocon.eu/porto/schedule/](https://cfp.2020.djangocon.eu/porto/schedule/)

And the tickets are FREE!
[https://pretix.eu/djceu2020/tickets/](https://pretix.eu/djceu2020/tickets/)

Website: [https://2020.djangocon.eu/](https://2020.djangocon.eu/)
Twitter: [https://twitter.com/DjangoConEurope](https://twitter.com/DjangoConEurope)

Cheers!

/r/django
https://redd.it/iq0dfg
Add Audio Tag to Django Admin

Hello there,

I'm making a music app where the Admin can listen audios available in a database.

Is there away that I can add a section in Django Admin where I can reproduce audio using html <audio/> tag

/r/django
https://redd.it/iq7loy
Dynamically create raw SQL query without running risk of SQL injection?

I can no longer battle with the Django ORM, so we need to write our queries in raw SQL using \`connection.cursor()\`. But how can we conditionally build parts of a query without doing string interpolation and thereby risking SQL injection?

For example, saw we have the following query:

`cursor = connection.cursor()`

`cursor.execute("SELECT * FROM sometable WHERE soemetable.thing = 'foo' ")`

&#x200B;

But we only want to have the WHERE statement in the query depending upon other conditions and we can't just leave the WHERE statement equaling NULL or empty string or whatever?

/r/django
https://redd.it/iq827d
Stop users from accessing my API?

Hello everyone,

I'm a big noob, so I don't know if this question even makes sense, but regardless:

Is it possible to stop users from sending API requests programmatically? That is, still allow API requests from users in my frontend, but stop them sending API requests from something such as Python's `requests` library.

For example, most popular services (Twitter, Youtube, etc.) have (at least I think) an API that the public is allowed to use (with limits), and an API that is used when you do something such as tweet.

I know about decorators like `@permission_classes([IsAuthenticated])`, but I don't think that would help since you can still send authentication credentials in the headers.

Any help is much appreciated!

/r/django
https://redd.it/iq9ob9
Friday megathread: Free chat Friday!

Use this thread to talk about anything Python related! Questions, news, projects and any relevant discussion around Python is permitted!

/r/Python
https://redd.it/iqfher
Very nice 👍

/r/Python
https://redd.it/iqer5r
Skeleton of a green tree python

/r/Python
https://redd.it/iqhlvk
What's the best way to add a single HTML button that updates a model?

I'm working on a project similar to Reddit, where the user can join and leave communities. I'm currently stuck on how to add a functional "join"/"leave" button to the page.

The models I use are a many-to-many relationship between User and Community, so joining adds the current user to <community_name>.members.all().

I'm not sure how to make the buttons do this. I thought about making a Join form whose only element is the submit button and using JavaScript to switch to the Leave form when it's clicked. Would that even work, and would it be the best way to approach this? I've only got a basic knowledge of JavaScript so I wouldn't know where to begin if it requires JQuery or something like that.

/r/djangolearning
https://redd.it/iqjc36
How is Django 3.1 so far? I'm coming from 1.11 LTS

For those of you using Django 3.1, how is it? Is it worth using over the 2.2 LTS?

My last project was 1.11 LTS and I did enjoy using it.

I would prefer an LTS version so there is less pressure to upgrade. But 3.1 looks pretty shiny.

/r/django
https://redd.it/iqe6dr
As long as you code, you’ll have these feelings !

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