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
Annihilating My Friend Will in a Python Fluid Simulation, Like the Cur He Is

/r/Python
https://redd.it/cg6rpf
Implement Vue into an existing Django (but not djangorest) project?

Hey, I'm still not a very advanced developer, but I was looking into learning a front end framework...with the primary goal of doing some on-the-fly data filtering in a form. Essentially I want to, when a user selects an option from a dropdown, filter another dropdown based on some parameters that are too cumbersome to have loading with the page.

So I figured I need some kind of framework to handle that, and I had a few questions:

1. Is Vue a good option for this, generally speaking?
2. Is there another, simpler way to do this? Have a small section of the page make calls to either a function in my Django project or straight to the database to retrieve some data.
3. If Vue IS a good option, how do I get around the fact that they both use the { } syntax? Am I going to have to rewrite my django templates to not actually include Django?

Any other insights would be great! I want to fully learn Vue or React soon, but thought maybe a simple implementation into a real-world existing project would be a nice way

/r/django
https://redd.it/cg52n0
[R] A repository of community detection (graph clustering) research papers with implementations (deep learning, spectral clustering, edge cuts, factorization)

​

https://i.redd.it/fj6royma9ub31.png

Link: [https://github.com/benedekrozemberczki/awesome-community-detection](https://github.com/benedekrozemberczki/awesome-community-detection)

The repository covers techniques such as deep learning, spectral clustering, edge cuts, factorization. I monthly update it with new papers when something comes out with code.

/r/MachineLearning
https://redd.it/cgbwk2
What to do next to be proficient at Django?

I have just finished Django For Beginners by William S. Vincent. Now I am learning basic CSS, HTML from [freeCodeCamp.org](https://freeCodeCamp.org). What should I do now to become proficient in Django? Should I finish another tutorial on Django(like Django For Girls) or should I revise the previous one another time? Thanks in advance.

/r/django
https://redd.it/cgftnd
This media is not supported in your browser
VIEW IN TELEGRAM
For those of you made uncomfortable by yesterdays simulation. No phones were harmed in the making of this simulation

/r/Python
https://redd.it/cghqy0
[D] What is OpenAI? I don't know anymore.

*Some [commentary](https://threadreaderapp.com/thread/1153364705777311745.html) from [Smerity](https://twitter.com/Smerity/status/1153364705777311745) about yesterday's [cash infusion](https://openai.com/blog/microsoft/) from MS into OpenAI:*

What is OpenAI? I don't know anymore.
A non-profit that leveraged good will whilst silently giving out equity for [years](https://twitter.com/gdb/status/1105137541970243584) prepping a shift to for-profit that is now seeking to license closed tech through a third party by segmenting tech under a banner of [pre](https://twitter.com/tsimonite/status/1153340994986766336)/post "AGI" technology?

The non-profit/for-profit/investor [partnership](https://openai.com/blog/openai-lp/) is held together by a set of legal documents that are entirely novel (=bad term in legal docs), are [non-public](https://twitter.com/gdb/status/1153305526026956800) + unclear, have no case precedence, yet promise to wed operation to a vague (and already re-interpreted) [OpenAI Charter](https://openai.com/charter/).

The claim is that [AGI](https://twitter.com/woj_zaremba/status/1105149945118519296) needs to be carefully and collaboratively guided into existence yet the output of almost [every](https://github.com/facebookresearch) [other](https://github.com/google-research/google-research) [existing](https://github.com/salesforce) [commercial](https://github.com/NVlabs) lab is more open. OpenAI runs a closed ecosystem where they primarily don't or won't trust outside of a small bubble.

I say this knowing many of the people there and with past and present love in my heart—I don't collaborate with OpenAI as I have no freaking clue what they're doing. Their primary form of communication is high entropy blog posts that'd be shock pivots for any normal start-up.

Many of their [blog posts](https://openai.com/blog/cooperation-on-safety/) and [spoken](https://www.youtube.com/watch?v=BJi6N4tDupk) [positions](https://www.youtube.com/watch?v=9EN_HoEk3KY) end up [influencing government

/r/MachineLearning
https://redd.it/cgmptl
Burnout & Personal Projects

I've been developing web apps using Django as my main tool for about 4 years now.

It started with needing to solve a problem at an old job (requiring a relatively simple CRUD db app with some vaguely interesting front end stuff) and Django seemed like a great tool. I read tutorials and the Django docs and taught myself the basics over a few weeks, refined and expanded the app, read some more, bought a copy of TwoScoops, asked lots of questions on Stack Overflow and on /r/django (shoutout pydanny), and refined it some more. Had some ideas for personal projects that interested me, learned how to use REST APIs, built a reddit bot, read about ML, put a small portfolio together on github and ended up getting headhunted to be the lead developer at a company with some interesting tech problems to solve and a Django codebase that was in desperate need of some TLC.

Fast forward a few years and professionally things have been great, the money has grown, but so has the responsibility and mental energy required.

I just realised its now been months since I touched a personal project or did any development outside of

/r/django
https://redd.it/cgn3q2
500+ Python Machine Learning Applications in Various Industries

An exhaustive ML/DS list sorted by industry.

​

1500+ Stars on GitHub:

[https://github.com/firmai/industry-machine-learning](https://github.com/firmai/industry-machine-learning)

Join the new list to get access to the catalogue from November 2019 - November 2020.

​

||||
|:-|:-|:-|
|[Accommodation & Food](https://github.com/firmai/industry-machine-learning#accommodation)|[Agriculture](https://github.com/firmai/industry-machine-learning#agriculture)|[Banking & Insurance](https://github.com/firmai/industry-machine-learning#bankfin)|
|[Biotechnological & Life Sciences](https://github.com/firmai/industry-machine-learning#biotech)|[Construction & Engineering](https://github.com/firmai/industry-machine-learning#construction)|[Education & Research](https://github.com/firmai/industry-machine-learning#education)|
|[Emergency & Relief](https://github.com/firmai/industry-machine-learning#emergency)|[Finance](https://github.com/firmai/industry-machine-learning#finance)|[Manufacturing](https://github.com/firmai/industry-machine-learning#manufacturing)|
|[Government and Public Works](https://github.com/firmai/industry-machine-learning#public)|[Healthcare](https://github.com/firmai/industry-machine-learning#healthcare)|[Media & Publishing](https://github.com/firmai/industry-machine-learning#media)|
|[Justice, Law and Regulations](https://github.com/firmai/industry-machine-learning#legal)|[Miscellaneous](https://github.com/firmai/industry-machine-learning#miscellaneous)|[Accounting](https://github.com/firmai/industry-machine-learning#accounting)|
|[Real Estate, Rental & Leasing](https://github.com/firmai/industry-machine-learning#realestate)|[Utilities](https://github.com/firmai/industry-machine-learning#utilities)|[Wholesale & Retail](https://github.com/firmai/industry-machine-learning#wholesale)|

/r/Python
https://redd.it/cgclop
What are the best ways to learn TDD with Django?

Hey guys,

I have been learning Django for the past 6 months and I want to be better at Python and specifically Django (Specifically Django 2.1+ or at least Django 2.0+ if possible). I am currently trying to learn about unit/functional testing in Django.

I tried looking at obeythetestinggoat, test-driven-django-development etc., i noticed most of the them are in Django 1.11 (LTS edition) or Django 1.6 etc.) which all of them are not in DJango 2.0. I am quite worried about the compatibility issues that I will come across if I follow these tutorials. Also, I am quite concern that these tutorials might be outdated pretty soon in the near future, that's why I feel pretty reluctant.

What are some of the good resources/best practices for TDD out there for Django 2.0+?

Also, any good django learning resources (about best practices etc.) are welcomed too!

I really appreciate your help! Thanks! You guys are awesome!

/r/django
https://redd.it/cgpsgn
Jobs in Django development

Here in Gurugram,India jobs for A fresher in Django development are very few and less paid compare to nodejs & php. Which makes me think whether Django is worth it? Or what skills should you learn with Django to grab a better offer.
Would love to see what people think about it!

/r/django
https://redd.it/cgqs70
Unique_together not working

Hey guys,

​

I have a problem with unique\_together.

In my DB I have a composite/multi-column key with two fields.

In my models.py im trying this:

​

class CheckSequences(models.Model):
sequence = models.CharField(db_column='SEQUENCE', max_length=50)
category = models.CharField(db_column='CATEGORY', max_length=100)
active = models.CharField(db_column='ACTIVE', max_length=5)
rule_number = models.CharField(db_column='RULE_NUMBER', max_length=50)

class Meta:
managed = False
db_table = 'CHECK_SEQUENCES'
unique_together = ("sequence", "category")

Since only one `primary_key` is allowed, this is the only solution I found to realize that.

But somehow, I always get this error:

​

('42S22', "[42S22] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Invalid column name 'id'. (207) (SQLExecDirectW)")

I think Django tries to find the auto-generated Id-field but obviously it doesn't exist, since I have a composite primary key.

I am using Django 2.1.0, I also considered to upgrade to 2.2.0 but that would be probematic through some dependencies.

​

I would appreciate any help and thoughts, if you need more information let me know.

​

Thanks

/r/django
https://redd.it/cgsr43
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/cgt306
Is this possible with django?

Hi Guys,

i'm relatively new to web development so pls be kind :D


So i'm trying to create a image gallery like this one: [https://scrolller.com](https://scrolller.com/)
Can I create such gallery only with django? How can i align the pictures together but keep their different sizes?

/r/django
https://redd.it/cgveiu
I'm really excited to announce the release of flask-praetorian 1.0.0!

It's here: [https://pypi.org/project/flask-praetorian/](https://pypi.org/project/flask-praetorian/)

​

I took way to long to finish up the last features for this release, but I'm excited to move to a new major release. Thanks to those that have been starring or suggesting the extension, and real big thanks to [pahrofit@github](https://github.com/pahrohfit) who contributed the *email registration* and *verify and update* features for the 1.0 release.

​

Constructive feedback welcome!

/r/flask
https://redd.it/ch03ng
Updating changed data displayed in active sessions screens

Say you have an app where multiple users are looking at the same data, and when data is updated by one user, you want to update the other users screens.

By what mechanism can Django do this , or what packages would be needed or recommended for this type of functionality?

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