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
I am excited to share my 8th published book, Python 101, geared for beginners and intermediate level readers

/r/Python
https://redd.it/isbjm4
I am Looking for an example app using Django-filter, django-tables, and django-crispy-forms.

Can someone point me to example apps with source code using all three of these together?

Django-filter, django-tables, django-crispy-forms.

​

[https://github.com/carltongibson/django-filter](https://github.com/carltongibson/django-filter)

[https://github.com/jieter/django-tables2](https://github.com/jieter/django-tables2)

[https://github.com/django-crispy-forms/django-crispy-forms/](https://github.com/django-crispy-forms/django-crispy-forms/)

/r/django
https://redd.it/isua9y
Tuesday megathread: Advanced questions

Have some burning questions on advanced Python topics? Use this thread to ask more advanced questions related to Python.

**If your question is a beginner question we hold a beginner megathread tomorrow (Wednesday) where you can ask any question! We may remove questions here and ask you to resubmit tomorrow.**

/r/Python
https://redd.it/isxcbx
Does Beautiful Soup web scraping refresh the page?

I’m web scraping a website that has a live tracking ticker (count of subscribers).

I read somewhere that web scraping refreshes the page which makes the web developers “unhappy”. However, since I’m simply monitoring a css label.... is it still messing up something on the user side? Possibly giving him too much traffic?

/r/Python
https://redd.it/it53iw
[R] New ML algorithms developed by Facebook, Linkedin, Google Maps, Twitter, Amazon, and Pinterest

Found some interesting research presentations that showcase new machine learning models developed and applied by these internet companies to tackle real-world problems.

* [TIES: Temporal Interaction Embeddings For Enhancing Social Media Integrity At Facebook](https://crossminds.ai/video/5f3369780576dd25aef288cf/) (ML model for preventing the spread of misinformation, fake account detection, and reducing ads payment risks at **Facebook**)
* [BusTr: predicting bus travel times from real-time traffic](https://crossminds.ai/video/5f3369790576dd25aef288db/) (ML model for translating traffic forecasts into predictions of bus delays in **Google Maps** for areas without official real-time bus tracking)
* [Ads Allocation in Feed via Constrained Optimization](https://crossminds.ai/video/5f33697a0576dd25aef288ea/) (Evaluating a set of algorithms for **LinkedIn** newsfeed ads serving for an optimal balance of revenue and user engagement)
* [SimClusters: Community-Based Representations for Heterogeneous Recommendations at Twitter](https://crossminds.ai/video/5f3369790576dd25aef288d5/) (A more accurate & faster algorithm for community discovery and personalized recommendations at **Twitter**)
* [Shop The Look: Building a Large Scale Visual Shopping System at Pinterest](https://crossminds.ai/video/5f3369790576dd25aef288d7/) (AI system behind **Pinterest**'s online visual shopping discovery service)
* [AutoKnow: Self-Driving Knowledge Collection for Products of Thousands of Types](https://crossminds.ai/video/5f3369730576dd25aef288a6/) (An automatic, scalable, and integrative knowledge graph for massive product knowledge collection at **Amazon**)

p.s. You can find paper URLs in the video notes.

/r/MachineLearning
https://redd.it/it44ix
Trying to get username for a query in a form.

Hi,

I have the following form which I've made after reading stackoverflow questions.

class PayForm(forms.Form):
def __init__(self, *args, **kwargs):
self.user = kwargs.pop('user',None)
super(PayForm, self).__init__(*args, **kwargs)

print(self.user)

date = forms.DateField()
total = forms.IntegerField()
#company = forms.ModelMultipleChoiceField(Company.objects.filter(employees=self.user))

my issue is I get a name error for self when I uncomment company, the init seems to work but it appears to be called after the variables are set. anyone have a clue what's up with this?

basically what i'm trying to do is this:

I have a model for companies, in that model I have a manytoomany field which can be populated by several usernames, in my form I only want that user to be be able to select companies that contain this user.

/r/djangolearning
https://redd.it/it9c5m
Running a tensorflow model using celery/huey worker

Hey i am making a django project that uses a tensorflow model to create and make predictions. What i am trying to do is that, i wanna use a celery worker to achieve this. The prediction will be made in the background using that celery worker. Is this a good approach and will this work?

/r/django
https://redd.it/it684g
Can I use Flask for only the database, but create all the front end in Html, CSS, and some JS?

So I am a beginner and I was following Corey Schafer's Flask tutorial when I ran into a huge problem and couldn't debug it. I was forced to scrap it and I wanted to try again, but this time only use SQLAlchemy for the database part, and Html/CSS/JS for the front end. Is that possible or do I HAVE to use the exact html and css?

/r/flask
https://redd.it/ithy8u
Wednesday megathread: Beginner questions

New to Python and have questions? Use this thread to ask anything about Python, there are no bad questions!

/r/Python
https://redd.it/itknop
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/iu8062
An update on Python 4

/r/Python
https://redd.it/itzn13
Best Way To Start Learning Python - A Complete Roadmap

Python is one of the most popular language among programmers.

Now the question is ***where to start? How much time it will take to learn this language? what topics you should cover? what are the Python libraries or frameworks?*** As a beginner, you will be confused that what should I choose first.

Should I learn all the concepts from a book or should I go for an online tutorial? Let’s discuss the [Entire road-map to become a Python developer.](https://www.geeksforgeeks.org/best-way-to-start-learning-python-a-complete-roadmap/)

/r/Python
https://redd.it/itoq8j
How to handle file uploads in Django Rest Framework?

Hello!

I'm currently working on a Django API in the Django Rest Framework. The API needs to be able to support ( and I suspect - a lot ) of file uploads more or less simultaneously. The file sizes may vary wildly. The application needs to analyse and then destroy the files.

I'm having trouble with the research for this issue, as there doesn't really seem to be a production ready solution out there.

In Flask I would probably use some sort of multi upload and maybe something like Celery. Does Django have it's own "worker" implementation? What would be the most optimal way to handle a lot of "analyse this file for me" requests?

/r/django
https://redd.it/iu4rf1
Build a web app in 20 minutes

Beset by pandemic, smoke and 2020 in general, I have found solace in creating a generator that creates multi-table, multi-form apps for sqlalchemy databases. It enables you to build an app in 10 minutes.

It’s based on Flask AppBuilder, itself based on Flask and SqlAlchemy.

Check it out on github: [https://github.com/valhuber/fab-quick-start](https://github.com/valhuber/fab-quick-start)

/r/Python
https://redd.it/iubkx2
Anyone doing Monolithic Django?

Printing a hello world over kubernetes cluster is an overkill, so are multiple microservices when you do not need them. I loved monolithic django, but with the advent of microservices architecture and modern JS libraries react, vue, and the likes, here is what you got to do

​

1. Create a DRF Backend
2. Take care of authentication at both ends
3. Build your SPA in a modern JS framework.

The good is modularity, maintainability, better UX controls, super interactive UIs, and the likes, the bad is you need to write more code. In simple cases the good old django templates is good enough. Is anyone still doing them? I love the organised new age FE framework code, the imports that come with ES6.

​

Is anyone still doing monolith with django template and ES6. If so, mind sharing your workflow, and libraries?

/r/django
https://redd.it/iudzvz