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
Do we like Medium links, here?

I've seen a lot of links for Medium on here. Personally, I hate Medium, so I always complain. Typically I'm met with downvotes, which is fine. But to that point, I have to ask...do we support folks posting their own Medium links here? I have a few things I'd like to share with the community, but if it's cool with everyone here to post it on Medium and then post the Medium link here, I don't mind grabbing whatever piddly kickbacks that Medium offers. I just don't want to be "That guy", you know?


Love this community, thanks for being so open, welcoming, and supportive of all the new devs out there!

/r/Python
https://redd.it/lbrr19
Maxima

It has been probably been brought up before so please be kind, or don't.

I know about maixma-jupyter, but there has to be a manual way to just incorporate maxima in Jupyter in the notebook.

I guess what I am saying is there a more difficult way to get maxima involved in a new jupyter notebook?

/r/JupyterNotebooks
https://redd.it/lbzc8m
Hosting on Django cpanel

Hie guys. I want to host my Django website on a shared server on Cpanel. I'm having trouble though. I'm seeing this index.html page.

default index.html page

I thought the passenger_wsgi.py file was supposed to run first but it's not. How do I make the passenger_wsgi file handle all the incoming requests? This is my first time and I'm so confused and there arent any tutorials or info on this online. If you need any more information I'm ready to give it.

/r/djangolearning
https://redd.it/lbsgvz
Thursday Daily Thread: 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/lc26ka
How can i use a variable from js to django?

So I have a model Articles which contains some articles from a page. And I want to show all info from db to a modal page on my site. The problem is that idk how to send the js variable which contains article's div id to django,so i could extract article with this pk.
I really struggle with that problem 2 days.Hope u know how to do that

/r/djangolearning
https://redd.it/lbl8si
Created and described a family of (Symmetric) Triangle Subdivision Tiles, the Python code is open source and straightforward. You can create 1000's of different images with a few lines of Python code




https://preview.redd.it/ti7keev7odf61.jpg?width=3840&format=pjpg&auto=webp&s=4b969e081c2a326acbc53fbe2d5aaa776437e120

Direct link to Python code:
https://github.com/josvromans/python\_shapes/blob/master/shapes/triangle\_subdivision.py
Explanation here (any feedback on the article is highly appreciated):
https://www.josvromans.com/blog/2021/1/triangle-subdivisions/


If you are into symmetry groups, please let me know if my math and terminology is correct. I hope to improve the blog post, and maybe publish it as a paper. But not before I got in touch with some experts in the field first...

/r/Python
https://redd.it/lc65v6
How to get started with Docker for a Django app(plus deployment options)?

So far I've only worked on very basic Django apps which I didnt bother deploying. Im currently about to start on a web app which will need some async work done - like sending out emails etc. I read about about Celery is used for this. Also, I want to deploy my app in a docker container on some cloud platform

​

Keeping all this in mind, which is the best way for me to go with respect to deployment(AWS/Heroku/Anything else). How should I dockerize my application? Should I have a Dockerfile from the start or should I 'dockerize' the application later? Basically, what are the best practices to follow when deploying a dockerized Django app which I should consider?

/r/djangolearning
https://redd.it/lb5ry6
I made a porn blocker! noFap baby

If you are interested in downloading it

you can find it at my github.

www.github.com/best-code/pornblocker

if you switch to the source branch you can look at the code.

I made two of them. One for people with python already on their machines and one executable for those who dont.

​

The executable is in the "New Folder" folder in the source branch and the non executable version is just those four files

AddLink.py

AddLinkExe.py

hostscopy.txt

firstTime.txt

​

hope this helps even just one of you guys out!

/r/Python
https://redd.it/lc7c9o
I made a Finance Database with over 180.000 tickers to make Investment Decisions easier

In my spare time I love to go through Financial data to understand what kind of companies exist and how sectors and industries evolve. However, I found that it required a lot of effort to figure out which companies belong to which industry and I often ran into paywalls that blocked me from accessing the exact data I was looking for. Platforms like Bloomberg offer such services but at ridiculous prices (up to $24.000 a year). This can make investment decisions for the Average Joe rather difficult especially if you don't want to follow 'the herd'. I wanted to change that.

Insert the **FinanceDatabase**. A database of over 180.000 symbols (80k+ companies, 15k+ ETFs, 30k+ Funds, 3k+ Cryptocurrencies and more) that is fully categorised per country, industry, sector, category and more. It features a 'Searcher' package (pip install FinanceDatabase) that has a user-friendly way of collecting the exact data you want (downloaded straight from the repository). For example, the following code returns all (listed) airlines in the United States (check Examples for more info) :

import FinanceDatabase as fd

airlinesus = fd.selectequities(country='United States', industry='Airlines')

And the following gives insights in ETFs

/r/Python
https://redd.it/lcexoa
Researchers From Google Brain Introduces Symbolic Programming And A Python Library Called PyGlove For Automated machine learning

A team of researchers from Google Brain introduces a new way of programming automated machine learning (AutoML) based on symbolic programming. The team also introduces a new python library called PyGlove that demonstrates the new paradigm’s promising results.

At present, Neural networks are extensively being adopted in various fields. However, determining the correct neural network architecture for a particular task becomes time and resource-consuming because of the increasing complexity in their architecture. Complicated architectures also lead to difficulty in hyperparameter selection. Automated Machine Learning (AutoML) is highly encouraged for automating these selection choices. In May 2017, Google coined AutoML for its neural architecture search (NAS). The approach is widely accepted in the ML research community to automate network hyperparameter and architecture choices.

Paper Summary: https://www.marktechpost.com/2021/02/03/researchers-from-google-brain-introduces-symbolic-programming-and-a-python-library-called-pyglove-for-automated-machine-learning/

Paper: https://arxiv.org/pdf/2101.08809.pdf

/r/Python
https://redd.it/lc9r1d
Has anyone used htmx with django?

Just starting to explore htmx. In a few of my pages, quite some ajax calls are there and it's a very user-driven page (meaning more reactive in nature and not just 1 final submit button).

Would like to know whether anyone here has experience using this combination of htmx and django. Any advice?

/r/django
https://redd.it/lceklc
In response to the "Medium bad" thread, here are couple of Medium authors from the Python community that are not clickbaits including Guido Van Rossum's

I agree with some of the sentiments shared in this thread, Medium is turning into YouTube at this point, you have to know all the right profiles. This is not a complete list of authors, just the ones I have had come across and found their posts to be both technical and informative. I'm opening this thread so if you know of an Python author whose upvotes/awards are well-deserved, please do post them in the comments. Thanks.

1. Guido Van Rossum Core Python Team: https://medium.com/@gvanrossum\_83706
2. Anthony Shaw Core Python Team: https://medium.com/@anthonypjshaw
3. Joannah Nanjekye Core Python Team: https://medium.com/@Captain_Joannah
4. Instagram Engineering: https://instagram-engineering.com/
5. Yeray Diaz: https://medium.com/@yeraydiazdiaz
6. Nick Humrich: https://medium.com/@nhumrich
7. Haki Benita: https://hakibenita.medium.com/
8. Khuyen Tran: https://khuyentran1476.medium.com/
9. Lev Maximov: https://medium.com/@levmaximov

Disclaimer: I'm not a Medium author myself, and I'm not affiliated with any of them that I listed, but I wish I was! Many of them are not frequent posters.

/r/Python
https://redd.it/lcl8w4
Jupyter Notebooks

Hi everyone! I am looking to find some information about people's experiences using Jupyter Notebooks in their team. If this is you or someone on your team, it would be super helpful if you could take just a minute to fill out this quick survey. Thanks so much!

/r/IPython
https://redd.it/lcq0d6
P Connected Papers partners with arXiv and Papers with Code

Hi everyone!
We launched Connected Papers 7 months ago in this very subreddit, with the goal to help researchers visually find and explore academic papers.

Input: a paper of your liking.Output: a full interactive graph of similar papers to explore.

For example, here is the graph for EfficientNet:

https://preview.redd.it/bb1dafwlihf61.png?width=1920&format=png&auto=webp&s=e38203ef3a517029e814548e890ebb4a96e189ba

Since launch we've been positively overwhelmed with feedback from the scientific community and half a million researchers using the tool.

Today is a big milestone for us - we have partnered with **arXiv.org** and from now on every paper page in arXiv will link to a corresponding Connected Papers graph.

It looks like this:

https://preview.redd.it/8eps82s7ihf61.png?width=1250&format=png&auto=webp&s=bff988753a09eea42b340504d77a8560a84f6772

And works like this:

https://i.redd.it/uu5qxcl8ihf61.gif

In addition, we've lately integrated with the awesome team at Papers with Code and whenever a paper has a code implementation, it will be presented straight in the paper links in the graph:

The icon links to the corresponding Papers with Code page

With the new additions, we hope Connected Papers will be even more helpful and accessible to Machine Learning researchers and we invite you to try us out!

/r/MachineLearning
https://redd.it/lcj6rg
Flask project for beginners

Hi, everyone!

I made a video about how to build a simple blog engine using Flask.
I think it's a good project for beginners to start with.

The touched topics are:

Basic app and the project structure
Routing a User's request and its handling, making a response to the User
Using HTML templates and template inheritance
Flask Blueprints
How to use SQLAlchemy to create models.
Using Tags for Posts and SQLAlchemy ManyToMany relationships.
Basic search and HTML forms usage in Flask
Pagination
Updating objects (posts and tags) via forms.
Flask admin panel
Access permissions to admin panel
Using custom CSS (small admin panel for creating, updating and deleting posts and tags)

The Demo of the project - the first 1 m. 19 sec. of the video.

Youtube:
https://youtube.com/watch?v=8d2KfERrb5Q&feature=share

Thanks for watching!

/r/flask
https://redd.it/lchuqp
Friday Daily Thread: 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/lcu3y9