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
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
I'm building a tool for programmers quickly create great looking emails

Hi r/Python \-

I'm building [https://postheat.com](https://postheat.com/), a platform for building and sending emails - and I’m giving access to the email editor for free.

One of the major features of Post Heat is the ability to build great looking emails from templates and get the corresponding html - I’m giving this feature away to the Reddit r/Python community for free because I have always struggled to build good emails for my side projects in the past, and I hope this will help save time for any python users who need to build emails.

If you want to try it out:

* Go to [https://postheat.com/create](https://postheat.com/create) to access the editor
* Build a great looking email, then click on the </> button to get the html for the email you just built.

&#x200B;

https://preview.redd.it/0bof02t5zjf61.png?width=624&format=png&auto=webp&s=68068a37859480c9cea034d5f78b5fe3df327705

* Collect your free email html

&#x200B;

https://preview.redd.it/plkjd7l6zjf61.png?width=624&format=png&auto=webp&s=b246d2814c97b8aa64940c46ba11809c7f0adc06

I hope this saves time for all founders, developers, and indie hackers in the future when they have to build emails for marketing, notifications, newsletters, etc…

Any feedback on how I can improve the website is greatly appreciated!

Thank You!

/r/Python
https://redd.it/lcuntm
Earn arcade style Achievements while coding!

I made a package that analyzes your python script and gives you achievements based on different coding concepts you use (example in image down below). Just import the package at the top, and use your functions, loops, etc. and run it as you normally would!

https://preview.redd.it/lb594popgkf61.png?width=625&format=png&auto=webp&s=bc4a213bcdd2fc4b45aad4106878ddbb97dccfd7

Achievements have dependencies, so some need to be unlocked before others, and are persistent, so you don't need to cram them all in at once. A handful of basic concepts are implemented (from printing "hello world" up to classes and objects), and plenty more to come!

Github Link: https://github.com/raviolliii/dev-achievements

PyPi Link: https://pypi.org/project/dev-achievements/

/r/Python
https://redd.it/lcwqlf
Inspired by Computerphile's latest video, I wrote a short script to display your computer network geographically.

&#x200B;

Github: https:\/\/github.com\/2435191\/TracerouteVisualization

/r/Python
https://redd.it/lcwrv4
How to use Flask-Migrate and Zappa?

I've got an Aurora DB on AWS with Flask-SQLAlchemy. Locally, I can use the convenient Flask-Migrate to run database migrations, but 'live' this is more challenging since Zappa converts Flask into lambda functions and it seems once its on Lambda, its no longer really 'flask' so I can't run Flask db migrate etc.

What have people done to handle SQL migrations with a setup like this?

EDIT:At the bottom of the Flask-Migrate documentation, it shows how the commands can be invoked directly. On the Zappa documentation, it shows how to invoke a command stored on your application. To make this work, I made a script at the top level called `commands.py` and imported from flask_migrate the functions I needed.

I can then invoke zappa invoke dev commands.migrate

/r/flask
https://redd.it/lczgmp
D Anyone else find themselves rolling their eyes at a lot of mainstream articles that talk about “AI”?

I’m not talking about papers, or articles from more scientific publications, but mainstream stuff that gets published on the BBC, CNN, etc. Stuff that makes it to Reddit front pages.

There’s so much misinformation out there, it’s honestly nauseating. AI is doom and gloom nonsense ranging from racist AIs to the extinction of human kind.

I just wish people would understand that we are so incomprehensibly far away from a true, thinking machine. The stuff we have now that is called “ai” are just fancy classification/regression models that rely on huge amounts of data to train. The applications are awesome, no doubt, but ultimately AI in its current state is just another tool in the belt of a researcher/engineer. AI itself is neither good, or bad, in the same way that a chainsaw is neither good or bad. It’s just another tool.

Tldr: I rant about the misinformation regarding AI in its current state.

/r/MachineLearning
https://redd.it/lcuq4b
I created a series in Python that takes you through every detail step-by-step (code included) on how to create your own algorithmic trading bot that trades the financial and crypto markets for free.

# How to create an algorithmic trading bot with Python

&#x200B;

1. Overview \- An overview of the project.
2. Design \- Requirements and how the trader operates.
3. Getting financial data into Python \- Pulling financial data into Python from MetaTrader5.
4. Open a trade using the MT5 API with Python \- How to open a trade programmatically via MetaTrader 5.
5. Close a trade with MT5 using Python \- How to close an open trade with MetaTrader 5.
6. Creating an algotrader/trading bot with Python – Part 1 \- Creating the trading bot loop and opening trades with an entry strategy.
7. Creating an algotrader/trading bot with Python – Part 2 \- Implementing a strategy reader.
8. Creating an algotrader/trading bot with Python – Part 3 \- Closing a trade with an exit strategy.
9. Creating a strategy for your algorithmic trading bot – Part 1 \- Creating a dynamic strategy with JSON for trading part 1.
10. Creating a strategy for your algorithmic trading bot – Part 2 \- Creating a dynamic strategy with JSON for trading part 2.
11. Dynamically calculate lot size for your algorithmic trading bot \- Dynamically calculate your position size based on account size and risk.
12. Send messages from Python to Slack \- Sending

/r/Python
https://redd.it/ld81ic
Simple word-replacer script

Hi guys new to python and i made this simple script. Any advice regarding code quality and other stuff will be highly appreciated.


https://github.com/ginop-1/word-replacer

/r/Python
https://redd.it/ld5hfp
Any interesting open projects to join? Or anyone want with some good ideas want to start one?

Edit - making a virtual assistant. Anyone wanting to contribute dm:)

/r/Python
https://redd.it/ld82ds
Creating an RPG Character Builder

By popular demand from last weeks event, today I'm going to step into a realm of Python that I'm not comfortable with \~ classes. I never need to build classes in my daily life so tonight for the code along challenge I'm going to attempt to build an RPG Character Creator using classes and make the characters fight each other to the death. So in order to prepare for this I've spent the week thinking about different approaches and training relentlessly. . .

&#x200B;

Training Python in the Gym

Thinking about Python while training with Cat

&#x200B;

If you're interested in learning about classes, python, ask questions, hanging out with nerds, or want to come help me figure my way through this code - Join the code along and hang out with us tonight or join us in discord! We have a few folks who have been working with python daily for years and are throwing ourselves out there to help python noobies or be there for people while they learn on their own.

&#x200B;

Discord for casual Python shenanigans: Minimoose Lodge

Stream for the funzies: M1N1M00SE (Tonight at 6PM EST)

/r/Python
https://redd.it/ldfaka
Nginx for static HTML?

Hey guys! I'm relatively new to server-side rendering and all the best practices, so I have a question surrounding static content.

Assuming I'm working on a Flask app with some server-side rendered content, if I have a page that requires no templating or server-side rendering, should I defer from Flask and opt for a CDN or Nginx for serving that content?

My login page, for instance, is completely static, so I'm not sure if I should be serving it from Flask.

I'm sure it would be more performant, but I'm unclear as to the best way to separate routing for Flask -served pages and the static pages. I'm sure a reverse proxy could do this, but adding configuration for static sites at this level seems arduous. Is this common? And it's just a matter of configuring proxy routing for each of the static pages? Or is this overkill, and I should just render the static HTML, given that all the other pages will be server-rendered anyway.

Also, even if Flask still serves the login page, I assume all JS and CSS would ideally be served from something more suited for static content? This one seems easier to configure.

I should mention that I'm thinking in

/r/flask
https://redd.it/ldlwn6
P Sense: Open Source Framework for Video Understanding & Action Recognition with Deep Learning

Very happy to share with the community the news that the team I work for recently released an inference engine called sense that enables developers to use RGB camera input to predict human actions. No pose estimation, no skeleton tracking, just end-to-end deep learning.

We strive to make it the all-in-one toolkit to collect and clean video data, train powerful and efficient video classifiers, and deploy to any device (with iOS and Android support).

The inference engine is accompanied by our pre-trained weights that individuals can download for free. The models are small, efficient, and run smoothly on CPUs. With the pre-trained weights, our stack supports demos such as gesture recognition, fitness tracking, fitness repetition counter and calorie counting out of the box.

You can perform transfer learning on the weights to train your own video classifier and customize the model to your use cases.

Feel free to give it a try, open an issue, give us feedback! We want to make it more fun and exciting for you to use 👉 https://github.com/TwentyBN/sense

/r/MachineLearning
https://redd.it/ld8yjz
Any good tutorials on pairing Vue with Django?

Ive been using Bootstrap and straightforward HTML files to make everything work but I wanted to start using JS and work with more languages/frameworks. I'm a little confused on how to have django interact with Vue since not only does the framework use HTMLs, but apps/components too. Im still new to Vue frankly so Im not expecting to pop out a beautifully made UI out my ass but I hope I can learn enough from a good tutorial. Thanks for any tips.

/r/django
https://redd.it/ldm7wq
Saturday Daily Thread: Resource Request and Sharing!

Found a neat resource related to Python over the past week? Looking for a resource to explain a certain topic?

Use this thread to chat about and share Python resources!

/r/Python
https://redd.it/ldkzyi
New to Django, Need help accessing python manage.py runserver

Hey all,

I just started to learn Django to help build a portfolio that I wish to build. However, as I go through the steps in this website, I run into a bit of a problem that I am not sure how to address. I have managed to make a virtual environment though when trying to run

python manage.py runserver

in the cmd prompt, I am getting an error suggesting that it can't open the file, and there is no such file or directory. I believe I am running Python as an administrator but I can check again if that matters. Below is a picture of what I am getting. If anyone here could lend a hand that would be great!

https://preview.redd.it/cm5kslglzpf61.png?width=1920&format=png&auto=webp&s=7d2a6c92713ee820cb1e7d97f31c96edad108bd0

/r/djangolearning
https://redd.it/ldgnh5