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
Jump Out of the Jupyter Notebook with nbconvert

Easily Convert Notebooks to Python Scripts and Sharable Files. I wrote a little guide to using nbconvert from the command line. Feedback welcome!

[https://towardsdatascience.com/jump-out-of-the-jupyter-notebook-with-nbconvert-7d4748960702](https://towardsdatascience.com/jump-out-of-the-jupyter-notebook-with-nbconvert-7d4748960702)

/r/IPython
https://redd.it/as0mal
Celery beat without separate dyno on Heroku

Currently have Django + RabbitMQ + Celery hosted on heroku for my production servers. My procfile is as follows:


web: gunicorn uw_api_project.wsgi --log-file -
worker1: celery -A uw_api_project worker -Q uw -l info --without-gossip --without-mingle --without-heartbeat
beat: celery -A uw_api_project worker -B

Is it not possible to run celery beat in the same dyno as worker1 on production? I've read in several places that `-B` or `--beat` flags are available only for development, however, I've tried running `--beat` as well as `-B` on the same worker as suggested in this [article](https://drdaeman.github.io/heroku-djcelery-example/) to no avail. Do I really need to pay for a another dyno on Heroku to manage celery beat?


/r/django
https://redd.it/as142s
A database of notebooks for scientists and students
https://www.gited.io

/r/JupyterNotebooks
https://redd.it/aruwuf
Announcing the 1.1.0 release of my completely free and open source python project, Social Amnesia! This tool lets you wipe out old reddit and twitter items, automatically and on a schedule, with configuration tools to save the items you care about. Now with support for 2FA!

​

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

[https://github.com/Nick-Gottschlich/Social-Amnesia](https://github.com/Nick-Gottschlich/Social-Amnesia)

Direct link to release with downloadables: [https://github.com/Nick-Gottschlich/Social-Amnesia/releases/tag/v1.1.0](https://github.com/Nick-Gottschlich/Social-Amnesia/releases/tag/v1.1.0)

# What's new?

\- Social Amnesia now works fully with reddit and twitter 2FA/MFA (2 Factor Authorization/Multi Factor Authorization). If you have MFA set up you will be taken to a sign on page for reddit to allow Social Amnesia to work properly without having to send a new token every hour. Twitter will have the same login process whether you have MFA set up or not.

\- I've added information text to the login page of the app so that people will know what the limitations of the API are for reddit and twitter.

# What is this?

I’m excited to release 1.0.0 of my side project, Social Amnesia! This completely free and open source software allows you to wipe out old reddit and twitter posts, comments, tweets, and favorites, automatically and on a schedule. It also allows you to configure certain items to be saved based on configuration options like number of upvotes, favorites, or retweets, whether an item has been gilded, how old an item is, or by specifically whitelisting items you would like to have saved.

# Who is this for?

You may be wary of what you post on reddit, twitter, facebook (if you even

/r/Python
https://redd.it/as0pro
How do you create a login pop up that shows on the current page, and not in a new page ? How do you process the form, via JS ?



/r/flask
https://redd.it/as2q9z
Decouple User object from django monolith

I have a project, where I have to migrate user to a different service altogether. So, what should be done? I wanted to write a custom auth backend, but in django documentation it says the get_user function in my custom backend should accept an user_id, which should be the the username, database ID, or any other primary key, but i don't have user now in my django app. So if someone could guide me through this, it would help me a lot. Thanks!

/r/django
https://redd.it/as7srj
Suggestion on where to host a commercial Django website?

I'm building a commercial Django site (backed by Postgresql database) that will expect a moderate amount of visitors (perhaps a few thousands a day).

I am currently with Namecheap using Cpanel. Trying to set up Django on Cpanel hasn't been easy due to lack of quality tutorial (feel free to link one!)

I've heard things about PaaS like Heroku that supposedly works easily with Django. What's the difference between PaaS and just good old Cpanel? Is it worth checking out? I don't want to get trapped into paying more money over a long run though. Any thoughts on where to host a Django site for cheap?

/r/django
https://redd.it/as8bua
Any known inventory management systems based on Django?

Hi all,

We're looking for a Django based inventory management system with warehouse capabilities to build off of.

Are there any known ones on the market? Commercial / Enterprise grade solutions are also a consideration.

Or even Python in general.

/r/django
https://redd.it/as8nrs
How do I deploy my postgresql database to Linux web hosting server?

I got my Django app with Postgresql backend running locally, and now I am ready to deploy it to the Linux hosting server. I have seen tutorials on how to do it, but none of them mentioned what to do with the Postgresql database. Can anyone link a tutorial or enlighten me on what to do with my database? Thanks!

/r/django
https://redd.it/as9vci
A Complete Machine Learning Project Walk-Through in Python

[http://on.morioh.net/537a78ef4d](http://on.morioh.net/537a78ef4d)

/r/Python
https://redd.it/as7qpd
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/asascf
django-pivot now supports multi-level pivot tables

Thanks to [Rafał Jaworski](https://github.com/rafal-jaworski) for adding support for multi-level pivot tables to [django-pivot](https://github.com/martsberger/django-pivot).

All feedback appreciated.

/r/django
https://redd.it/asank9
Django admin usage

Hi all,

Just wondering how many people use the Django admin site when developing for clients? I have never actually used the admin functionality for a client build, Ive always built the 'admin stuff' myself.

The reason Im asking is I feel I may be missing a trick and have always liked some of the 'out-of-the-box' features bundled with admin but have never taken the time to try and customise the site.

Thanks.

/r/django
https://redd.it/asb99f
Creating magic functions in IPython

Hi!

I just found out that there is a subreddit for IPython - that's super cool!

Sorry for a duplicated post (I already wrote about this in r/Python and r/learnpython), but I wrote a short series of 3 articles about how to create magic functions in IPython and I thought it might be interesting for some people here. The documentation of IPython is pretty amazing, but I wanted to practice a bit and create some fun little helpers in each part.

So here is what you can find in each part:

* [Part 1](https://switowski.com/python/ipython/2019/02/01/creating-magic-functions-part1.html) \- where I'm explaining what magic functions are and I'm creating a line magic to interpret some simple *Polish notation* math equations.
* [Part 2](https://switowski.com/python/ipython/2019/02/08/creating-magic-functions-part2.html) \- where I'm talking about cell magic (and "line AND cell magic functions") and I'm writing a type checker that will run `mypy` on a block of code (cell).
* [Part 3](https://switowski.com/python/ipython/2019/02/15/creating-magic-functions-part3.html) \- where I'm talking about `Magics classes`, explaining the difference between creating a magic function with a decorator vs writing a class inheriting from `Magics` and finally - I'm writing a type checker (I actually found the type checker from the previous part to be quite useful!) that can check previous commands (in the same

/r/IPython
https://redd.it/asefnh
Flask Simple Background Task Control

Hello. I'm trying to connect a frontend UI with a task running in the background.
I know about celery but I'm looking for something simpler which is faster to set up and requires less effort.

/r/flask
https://redd.it/ashd3y
Why does mybinder.org not recognize a requirements.txt file?

I am attempting to load a Jupyter Notebook through mybinder.org. The repository that the Notebook is in includes a `requirements.txt` file with the content

parsl

because the Notebook uses the `parsl` library.

When I load the notebook and import the library, execution stops with the error

ModuleNotFoundError: No module named 'parsl'

The `requirements.txt` file is _right there_. I have no idea what else to do to get mybinder.org to load the module. What am I missing?

/r/IPython
https://redd.it/asbnhk