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
Monday megathread: Project ideas!

Comment any project ideas beginner or advanced in this thread for others to give a try! If you complete one make sure to reply to the comment with how you found it and attach some source code!

/r/Python
https://redd.it/iwpexy
This media is not supported in your browser
VIEW IN TELEGRAM
[R] Photorealistic Rendering and 3D Scene Reconstruction - Double free zoom lecture by the author of both papers

/r/MachineLearning
https://redd.it/iwl0b9
Original Zen of Python

/r/Python
https://redd.it/iwoml8
How to handle forever-incremental Models and setup Meta-Models?

Been trying to properly get started with Django on-off, but there are just some things I cannot work out. Been using Flask for smaller projects now with SQLAlchemy & Celery because it's way more straight forward. But now that I want to start building something bigger and focus on it, I wanted to get some – probably basic – questions out of the way.

Let's assume we're a bank. And we're making a model for `client`, `account` and `transactions`.

1. Because we're a bank, we do not want to rely on simply updating an `account balance` value, but evaluate the account's balance by evaluating every transaction that was ever made on said account to see how much the current value is. **Q:** after a while this gets quite big and takes long to compute; how do you *squash* to say "hey, this is the current value – calculated on Sept 1st – you only have to re-evaluate new transactions for said account starting Sept 1? Like how do we handle that on a database/model level and how do we run the task?

2. We have multiple `account` types a `client` can have, with various conditions (like monthly cost, max

/r/django
https://redd.it/iwhbv7
Help

Hello Everyone,

I need help with my Django project, which is about rating the professors of my college. Part I'm Struck with is, I want to give an option for the user to give an anonymous rating if they wish to.

/r/django
https://redd.it/iwu2zb
IPython in VSCode? Help please

I'm new to programming and VSCode, so please forgive my ignorance or lack of understanding!

I am following a Computer Science college course which might be a tad out-dated. Anyways, in the course it is recommended that the students use VSCode as their text editor and the Anaconda distribution of Python. I am using the regular version of Python, not the Anaconda distribution.

Since IPython is not installed by default, I went to the VSCode marketplace and downloaded the extension "IPython for VSCode". However, IPython still appears not to work (I am trying to use the IPython REPL in the terminal).

Does anyone know how to use IPython in VSCode? I don't even know if this is still a thing.... I'm confused re: the relationship between IPython and Jupyter. But what I'm trying to do is to use the IPython REPL in the VSCode terminal, so that I can follow along with my college course.

​

Thanks for your help!

/r/IPython
https://redd.it/iwpkvx
[R] 'Less Than One'-Shot Learning

[https://arxiv.org/abs/2009.08449](https://arxiv.org/abs/2009.08449)

>Deep neural networks require large training sets but suffer from high computational cost and long training times. Training on much smaller training sets while maintaining nearly the same accuracy would be very beneficial. In the few-shot learning setting, a model must learn a new class given only a small number of samples from that class. One-shot learning is an extreme form of few-shot learning where the model must learn a new class from a single example. We propose the \`less than one'-shot learning task where models must learn N new classes given only M<N examples and we show that this is achievable with the help of soft labels. We use a soft-label generalization of the k-Nearest Neighbors classifier to explore the intricate decision landscapes that can be created in the \`less than one'-shot learning setting. We analyze these decision landscapes to derive theoretical lower bounds for separating N classes using M<N soft-label samples and investigate the robustness of the resulting systems.

Update:

Code - [https://github.com/ilia10000/SLkNN](https://github.com/ilia10000/SLkNN)

Binder demo - [https://mybinder.org/v2/gh/ilia10000/SLkNN/master?filepath=%2Fsoft-knn%2Fsoft\_knn\_vis.ipynb](https://mybinder.org/v2/gh/ilia10000/SLkNN/master?filepath=%2Fsoft-knn%2Fsoft_knn_vis.ipynb)

&#x200B;

/r/MachineLearning
https://redd.it/iwex8z
Fully Featured Live Chat Social Media Web App Made With Django Channels

Unfortunately it’s not open sourced as of now, but I’m happy to answer any questions you might have!


#Website:


[theHang](https://thehang.io/)


#Videos:


[Browse and open rooms](https://youtu.be/19onK9H3mbg)


[Participate in conversations](https://youtu.be/mvcCvGjPtt0)


[Form relationships](https://youtu.be/EE953qGYNZc)


[theHang on mobile](https://youtu.be/RPmz4YtqfcQ)

/r/django
https://redd.it/ix37ex
created some customized tkinter widgets with a 3d looking

/r/Python
https://redd.it/iwzbzs
Django multiple forms as popups and AJAX!!!

In my project I have a page where all the multiple user types are listed as cards and I was trying to add a detail view to each card with update and delete options within the card detail display. So this basically calls for AJAX calls. But I can't seem to figure out how to nest views within templates and style each forms according to my needs. Any advice?

/r/django
https://redd.it/ix243a
Needed python packages and versions of jupyter notebook

I want to retrieve all the pip packages and versions what is needed in a specific jupyter notebook so I know what packages are required to execute the notebook without errors.

Is there such a library or one liner to achieve this.

The problem with "pip freeze" is that it will show all installed packages what is more than needed for a minimalistic environment.

/r/JupyterNotebooks
https://redd.it/ix1cdc
Just made a learning Python Diagram that I made my background to learn terms easier. Let me know what you think.

/r/Python
https://redd.it/iwtgvj
CSS Static files in Django

Why do I need to keep changing the name of my css file to load it's features?
What triggers the issue?
And is there another way around it?

What am I missing here

/r/djangolearning
https://redd.it/ix6ydc
[D] Deconstructing the GPT-3 economy

As we all know, OpenAI plans to commercialize GPT-3 come October. But will the massive language model actually become a profitable language model?

I had a deep dive into the costs of developing, running, and maintaining GPT-3. There's a lot we don't know about the process and the possible deals between OpenAI and Microsoft that might have cut down the costs.

Here's my take, based on what we do know. I would be glad to have your opinion on it:

[https://bdtechtalks.com/2020/09/21/gpt-3-economy-business-model/](https://bdtechtalks.com/2020/09/21/gpt-3-economy-business-model/)

Key points:

* The costs of developing GPT-3 are in the eight-figures ($10M+)
* The costs of running GPT-3 are in the five-figures ($10K+/month)
* There are costs for staffing, support, legal, ethics, privacy, security, etc
* Model decay will probably require retraining or fine-tuning every once in a while ($1M+/year?)

If it works, it could be huge, a new application development platform that could be as huge as the cloud maybe. If it doesn't, it will be a great woe for the OpenAI team, who are under intense pressure to turn in profits to secure the next round of funding.

/r/MachineLearning
https://redd.it/ix16bc
im trying to replicate the functionality of reddit is wagtail the best way to go? or there is a better option.



/r/django
https://redd.it/ixh9fe
Weird Requests from Foreign IPs; Should I be worried?

Hello! Thanks for reading and any help is appreciated!

Background:
I created my first web API, and I feel so empowered! My router has a DNS service, and I am able to obtain a free sub domain via the brand company of the router, so I spun up the Flask development server via Python and port forwarded outside requests to my PC via the router.

I have only shared the URL with family and friends, but I noticed foreign IPs sending odd requests after reviewing the the first day’s log. Some attempt Linux shell commands and one even attempted to post a .cgi file, but they all received 404 responses or HTTPStatus.BAD_REQUEST, so I assume whatever they were trying had failed.

Questions:
- How worried should I be about these odd requests?
- If my server is returning 404 to these requests, am I then protected from these hacks?
- Related to the above question, does the Flask werkzeug or a WSGI server provide the benefit of trapping bad requests? It seems like if my site was just a index.html file, some of these Linux shell commands would get executed on my server.
- Is there a resource of best practices I can read to

/r/flask
https://redd.it/ixf1nx
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/ixcguc