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
Can Jupyter Notebook be used with files saved on cloud, or computer only?

Do my Jupyter Notebook files have to be saved on my computer hard drive? Can they be saved on a cloud instead?

/r/JupyterNotebooks
https://redd.it/lfn7b8
Lazy load imports for jupyter notebooks

Usually, I have a ton of imports at the top of my notebooks which slows down my startup time. I created a dead-simple (less than 50 lines of code) jupyter extension that enables lazy imports, which only imports packages as needed. This enables rapid bootups and a faster workflow!

Check it out here: https://github.com/jungerm2/JupyterLazyLoader

Let me know what you think! Any help/contributions are welcome!

/r/IPython
https://redd.it/lezphk
D Low data regime, what are your moves?

Hi, it's more than a month now since i've started working on a Project.
Basically it can be viewed as a medical image classification task.

The main problem is the dataset size, actually its a huuge problem, (<100). I've tried with GANs, TL, some sort of analitycal ROI extraction to feed the net.

But onestly right now I'm running out of ideas.
What do you tipically do in these situations? What was the size of the smallest dataset you've been able to achieve some valid results?
Any advice on papers to read?

Thanks.

/r/MachineLearning
https://redd.it/lfpw1w
Tuesday Daily Thread: 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 Daily Thread tomorrow (Wednesday) where you can ask any question! We may remove questions here and ask you to resubmit tomorrow.

This thread may be fairly low volume in replies, if you don't receive a response we recommend looking at r/LearnPython or joining the Python Discord server at https://discord.gg/python where you stand a better chance of receiving a response.

/r/Python
https://redd.it/lfpln1
Writing a book on autonomous quadcopter projects? Latex vs Jupyter Book?

Hi, So I finished my masters in computer science with a focus on deep learning and computer vision. Now I want to write a book showcasing some useful and popular things in this field. Here's a small list of libraries that I use in some chapters:

1. Eigen (3D geometry, Linear algebra)
2. Sophus (3D geometry, Lie algebra)
3. Ceres Solver (3D geometry)
4. ROS (Robotics software)
5. OpenCV (computer vision)
6. Tensorflow (deep learning)
7. Pandas, numpy, matplotlib (Data science)

I want to explore concepts in papers and showcase examples and projects which use these libraries. In Latex, I can simply add a code block in `listing` environment. But I want the code to be executable so that users can try it out themselves. Can the top 4 libraries be used along with Jupyter book so that the code I specify (which is written in C++ 14 btw, not python) is executable? These libraries are installed natively and not in a conda (or virtual) environment.

/r/JupyterNotebooks
https://redd.it/lg0exy
Is there a way for Django to secure the connection to a Postgres DB using one of Postgres's supported authentication methods?

When Django uses the Postgres credentials configured in the settings..py file to connect to the DB, is there a way to secure this connection that Django provides?

Postgres's supported authentication methods

/r/django
https://redd.it/lfyxrs
PEP 634 (Structural Pattern Matching) is approved! Welcome match statement,
https://realworldpython.hashnode.dev/structural-pattern-matching-pep-634-in-python

/r/Python
https://redd.it/lfz5af
The 22 Most-Used Python Packages in The World

Hi Reddit, I assembled the **top 22 most used Python packages in the world** (medium, link bypasses the paywall).

I did some research and wrote about each of them. I had a lot of fun writing this. I'd love to hear your comments!

/r/Python
https://redd.it/lfzbcg
Sending full html link through rendertemplate?

Hi all,
It is possible to send an html link through flask render\
template?

\-----------------------
app.route('/site1')
def site1():


data = '<a href="/info?id=12345">12345</a>'
return render_template('site1.html', data=data)
\-----------------------
I've tested the above, but it comes out as a string and not recognized as a link.

I can send the data and format it as <a href="/info?id={data}">{data}</a> within the html, but i'm using a table loop and the first entry is an id that I'd also like to be a link for drill down purposes. Fairly new to web design and hope I'm asking the question accurately.

Thank you!

/r/flask
https://redd.it/lg68xd
Django as a pure backend independent of the frontend or Django alongside the frontend when using React.

I've already built some parts of the frontend using React, and I was wondering now that I am going to start building the backend, which of the two approaches is more suitable.

&#x200B;

I know that both approaches are useable, but I am not sure about the trade-offs between using Django as an independent backend or using react as an app of a Django project.

&#x200B;

I am hoping that someone could point of the trade-offs between the two approaches or provide some resource to learn about the topic if possible.

&#x200B;

Thank you

/r/djangolearning
https://redd.it/lg50u2
Wednesday Daily Thread: Beginner questions

New to Python and have questions? Use this thread to ask anything about Python, there are no bad questions!

This thread may be fairly low volume in replies, if you don't receive a response we recommend looking at r/LearnPython or joining the Python Discord server at https://discord.gg/python where you stand a better chance of receiving a response.

/r/Python
https://redd.it/lgh38f
Whats the role tools like django-environ, python-dotenv etc when using django with docker?

I'm wondering what's the role/benfit of using the tools mentioned above when using django with docker? Is it mainly for local use without docker?

/r/django
https://redd.it/lghy32
A little jab at C in PEP 20 that I just noticed

In "The Zen of Python", PEP 20, the thirteenth guideline is written

There should be one-- and preferably only one --obvious way to do it.

Based on how those em-dashes are formatted, it feels like the guideline is poking fun at C (and other languages with C-like syntax). For those that aren't aware, in C you can decrement a variable by one, either with var-- or --var. (The difference being that the first expression evaluates, then increments, and the second increments, then evaluates, if that brief explanation makes any sense.)

In other words, there are two ways to do it; it's not Pythonic. I don't know if I'm a moron for not seeing this in the PEP until now, but in my defense I learned Python before I learned C. Also, it seems like the Wikipedia editors missed it, too, based on the formatting.

/r/Python
https://redd.it/lgeb8m
If you use Poetry and github actions 🏄‍♂️

If you use Poetry and Github actions, and don't already use an action for combining these, please check out our poetry install action!

https://github.com/snok/install-poetry

The action itself can be useful, but most of all I hope the repo docs might be helpful to people, as we've put a lot of work into providing useful example workflows that people can use as starting points for crafting their own.

We also recently put some extra effort into improving our Windows documentation - an area that people generally seem to struggle with.

Hope this can be of use to you - and feel free to raise issues, make contributions, or leave a comment here with any feedback! It would be much appreciated 👏

/r/Python
https://redd.it/lgryif