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
Thursday Daily Thread: Python Careers, Courses, and Furthering Education!

Discussion of using Python in a professional environment, getting jobs in Python as well as ask questions about courses to further your python education!

This thread is not for recruitment, please see r/PythonJobs or the thread in the sidebar for that.

/r/Python
https://redd.it/uik8hx
Throw your hands in the air if you cancelled your PyCharm subscription because you dreaded opening it and waiting 3,000 years for it to "index your project" instead of you being able to get something done. goodbye pycharm. Hello VS Code.

I just cancelled my PyCharm subscription after being a faithful purchaser of the Pro version for 5 years. I really liked the ability to navigate complex object hierarchies.. it saved my bacon once... but I refuse to use this thing on a personal basis and deal with 3-10 minutes of "scanning.... indexing ....." .

later JetBrains.

/r/Python
https://redd.it/uivtiq
JupyterHub server vs remote kernel: handle VPN drops for long-running notebooks

Summary of my needs

Retail supply-chain data from relational databases. Data sets are usually 1 - 100 GB in size.
All data is on-prem in my employer's data center, not cloud based.
Pandas or Dask and scikit-learn for clustering, classification, and regression
Models often take several hours to train. Pandas DataFrame joins or aggregations can also be slow, sometimes.
I am requesting a Linux server, since a Windows 10 VDI with 4 cores and 16 GB RAM is limiting
I work from home, and OpenVPN and home internet disconnections are a real concern with long-running notebooks.

I see a few options

Jupyter on my laptop plus remote kernel ([https://pypi.org/project/remote-kernel/](https://pypi.org/project/remote-kernel/))
JupyterHub on remote server.

Is there a good way to re-connect to a running kernel after a network disconnect and not miss any cell outputs? Which of those options is better? If not, my options are

Keep using a Windows 10 VDI to connect to the JupyterHub server. (I'm not thrilled with this option.)
Use a DAG workflow engine like Prefect or Airflow for any calculation that might take over 5 minutes. Persist results with Parquet or Joblib. Jupyter notebooks would be mostly for plotting and exploratory data analysis.

​

Edit:

I know that Jupyter uses

/r/JupyterNotebooks
https://redd.it/uj0qta
Is it possible to make Django work with Amazon Aurora with Read Replica

Hi. I've been exploring amazon aurora lately and I got stuck on connecting my application to "Write" endpoint and "Read" endpoint.

Just wanna ask if someone already did this. Can't find any good solution online.


Thank you!

/r/django
https://redd.it/ujd078
Download file into downloads folder

New to flask. Having trouble finding how to download a file into the downloads folder of the user instead of into the source folder of the code. Thanks

/r/flask
https://redd.it/ujc2jz
Code works in terminal, not in Juptyer?

This may not be the right sub, but I've been trying to get this to work for months now.

I've got a python script that uses a keytab to authenticate with Spark, then submits a job to Spark. The script works fine in our old environment, and works great from the terminal in the new environment. I've got all environmental variables on both systems set the same. But when I try to run the python script from Juptyer in the new environment, I get an error on the keytab, even though I get a return value of 0 when using kinit to invoke the keytab. The error is on creating the spark context, and states that the keytab is invalid, even though I successfully invoke the keytab in the step before submitting the spark context.

/r/JupyterNotebooks
https://redd.it/uh3np3
D Simple Questions Thread

Please post your questions here instead of creating a new thread. Encourage others who create new posts for questions to post here instead!

Thread will stay alive until next one so keep posting after the date in the title.

Thanks to everyone for answering questions in the previous thread!

/r/MachineLearning
https://redd.it/uawla1
Merge two related Django projects or keep them separate?

I'm weighing out the pros and cons of merging the retail and wholesale applications of a business. The two projects aren't massive but there are quite a few shared classes and even some shared models/db tables between them. Hosting, servers, and deployment strategies are basically identical.

My instinct is that the pros outweigh the cons but I'm wondering if there's anything that I'm missing here?

Pros:

1. Easier to maintain - update packages, versions, databases, shared classes in code, etc one time rather than two
1. Cheaper web hosting

Cons:

1. Small changes require redeployment of full application

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

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/uk0tyy
I am trying to run a code cell in a Jupyter notebook but it always end up with this error. What should I do ?

/r/JupyterNotebooks
https://redd.it/ue3k13
Why is it so hard to output a running scripts output live to a webbrowser?

I am new to webdev... I am currently trying to get rq & socketio working...
With flask I am able to get the following working:
Submit > do a thing, when thing finished > dump output of thing to client

However, what I am finding near impossible

Submit.... run a python script, output from python script to client, keep running script, a bit more output from script to client, keep running script, send last bit of output to client.

I understand that it will require ajax to update the page without reloading, but whichever way i turn i can't seem to find a simple way of doing this.

Why is something that I would have assumed would be very simple so hard?

/r/flask
https://redd.it/ukvc2v
D Simple Questions Thread

Please post your questions here instead of creating a new thread. Encourage others who create new posts for questions to post here instead!

Thread will stay alive until next one so keep posting after the date in the title.

Thanks to everyone for answering questions in the previous thread!

/r/MachineLearning
https://redd.it/ul3jib
Learn to use Jupyter Notebook and Command Line Interfaces!

My friends and I created a Jupyter Notebook and CLI Guide to help beginners get started with these important data/computer science tools. Any feedback welcome!

/r/JupyterNotebooks
https://redd.it/ulsszh
Replace bash scripts with iPython ...scripts?

I recently discovered the joy of using iPython for all of my bash needs, but want to fully transition form using the terminal. Is there a way I can execute bash statements in a python script using the iPython "!sudo ___" syntax or similar? Thanks!

/r/IPython
https://redd.it/uj87m9
Learning Python and Flask. Major milestone completed on my personal web project. So much more to do. Welcome any feedback.
https://www.mooie.me/race

/r/flask
https://redd.it/um90cj