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
Run notebook on GPU without creating a new environment

I’d have to re-install all my packages if I create a new environment. Is there a way to run the notebook on GPU without doing so. I installed CUDA toolkit and tensorflow-GPU btw.

/r/JupyterNotebooks
https://redd.it/w75d0d
Best payment processing packages?

I've been using django-paypal for payment processing for personal sites, and I used dj-stripe for one client site that didn't get many customers. I'm wondering, because I can't just have everyone use paypal, and dj-stripe is quite limited: how do you all handle payment processing, and what has your success been like?

I'm hoping to partner with a custom furniture seller I found on Etsy. If they want to partner with me, I'm going to need better payment processing than paypal

/r/django
https://redd.it/y0rdyu
How do i get out of paranthesis or similar things without pressing right- arrow everytime ? Is there a shortcut for this? Thank you

Hi guys just started learning. How do i get out of paranthesis or similar things without pressing right- arrow everytime ? The jupyter auto completes brackets , but everytime i ve had to press right arrow to get out of paranthesis/ brackets/ inverted comas after writing code.. its really annoying .. is there a a shortcut that i can use ?

Thanks

/r/JupyterNotebooks
https://redd.it/w65s42
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/y0u2xl
The Pdfalyzer is a tool for visualizing the inner tree structure of a PDF in large and colorful diagrams as well as scanning its internals for suspicious content

The Pdfalyzer is a command line tool (pdfalyze) as well as a library for working with, visualizing, and scanning the contents of a PDF.

Motivation for the project was personal: I got hacked by a PDF that turned out to be hiding its maleficent instructions inside the font binary where it was missed by modern malware scanners (twitter thread) (more details)

​

[GitHub](https://github.com/michelcrypt4d4mus/pdfalyzer)
PyPi
`pip3 install pdfalyzer` (use `pipx` instead if you have it)
Leverages: PyPDF2 (PDF parsing), AnyTree (data structure), yaralyzer (malware scanning/pattern matching with YARA), rich (colors/layout), and rich-argparse-plus (prettified help screen)

This tool was built to fill a gap in the PDF assessment landscape. Didier Stevens's pdfid.py and pdf-parser.py are still the best game in town when it comes to PDF analysis tools but they lack in the visualization department and also don't give you much to work with as far as giving you a data model you can write your own code around. Peepdf seemed promising but turned out to be in a buggy, out of date, and more or less unfixable state. And neither of them offered much in the way of tooling for embedded binary analysis. Thus I felt the world might be slightly improved

/r/Python
https://redd.it/y0rnqk
Tracking Endpoint Access

Hey guys!


Say for example, there's a specific endpoint I would like to monitor, which includes how many users are accessing that endpoint, how much traffic it receives, and the average response time for those endpoints.


Do you have any modules/services to suggest? Thanks!

/r/django
https://redd.it/y12z8t
How We Boosted Video Processing Speed 5x by Optimizing GPU Usage in Python

Hi, hope you'll fined it useful, please feel free to share your thoughts about it >>
My blog post


https://preview.redd.it/9mlcjuhyz6t91.png?width=1600&format=png&auto=webp&s=2f41ffc8920e9d043c57e07522220673718ed3cc

/r/Python
https://redd.it/y1bjxi
django-comments-dab - comments, likes, subscription and moderation
https://django-comment-dab.readthedocs.io/en/latest/

/r/django
https://redd.it/y1heu8
DataCamp is offering free access to their platform all week! Try it out now! https://bit.ly/3Q1tTO3

/r/JupyterNotebooks
https://redd.it/w4j7ux
R ReAct: Synergizing Reasoning and Acting in Language Models - Google Research 2022

Paper: https://arxiv.org/abs/2210.03629#google

Abstract:

>While large language models (LLMs) have demonstrated impressive capabilities across tasks in language understanding and interactive decision making, their abilities for reasoning (e.g. chain-of-thought prompting) and acting (e.g. action plan generation) have primarily been studied as separate topics. In this paper, we explore the use of LLMs to generate both reasoning traces and task-specific actions in an interleaved manner, allowing for greater synergy between the two: reasoning traces help the model induce, track, and update action plans as well as handle exceptions, while actions allow it to interface with external sources, such as knowledge bases or environments, to gather additional information. We apply our approach, named ReAct, to a diverse set of language and decision making tasks and demonstrate its effectiveness over state-of-the-art baselines, as well as improved human interpretability and trustworthiness over methods without reasoning or acting components. Concretely, on question answering (HotpotQA) and fact verification (Fever), ReAct overcomes issues of hallucination and error propagation prevalent in chain-of-thought reasoning by interacting with a simple Wikipedia API, and generates human-like task-solving trajectories that are more interpretable than baselines without reasoning traces. On two interactive decision making benchmarks (ALFWorld and WebShop), ReAct outperforms imitation and reinforcement learning methods by an

/r/MachineLearning
https://redd.it/y1mosn
Web Dev Topics.

Hi Django devs.

This is probably different from what y'all are used to, but I need your help.

I write about Django and I am looking to increase my list of Django blog posts.

Now, I am looking for blog topics that an intermediate or experienced Web developer would be interested in.

Any ideas on topics?

/r/django
https://redd.it/y1w7n6
Linode doest not allows connection after update

Hello, i just tried to deploy my django application on a linode but here is my problem :

When i started the linode and went to port 8000 of the ip adress in my browser, everything ran ok, i had the classic "installation successfull" django page on my screen with the satisfying rocket. BUT when i sent my local application to the server via GitHub, it suddently stoped to work, i mean i have " *ip_adress* does not allow connection page" in my browser. This is not a firewall problem, and i dont know what to do, does someone had the same problem than me ? Can seomeone help me because my hair is starting to fall right now... Maybe the server take a few time to run changes ? rly i dont know pls help

/r/django
https://redd.it/y2011g
Am I job-ready as a developer?

First of all, little background about me. Actually I'm a computer engineering graduate, I didn't pay much attention to code during my college period however I was decent in C and C++ , got straight A's. I didn't bother learning any frameworks which would have been useful in landing a job. After graduation, I worked in Infosys as an implementation officer( I had to install software on clients' computers and teach them how to use it .) So basically there was no coding involved. And the wage was way less than the developers. So I thought I would join MBA (btw I joined MBA because I got a full scholarship )and in the meantime, I would learn some framework and land a job. So I quit my job and joined MBA.

I picked up Django and I have built three simple projects till now. they are:

1. **Portfolio website:**

what I learned:

* MVT architecture

**2. Todo app:**

So basically I followed Dennis ivy's tutorial for this. What I learned:

* CRUD operation
* Class based views
* Specific user-based data and view
* Integrated with Postgres database
* Hosted on Heroku

**3. Blog website**

What I learned:

* How to handle static files and media files
* jinja2
* Implemented all

/r/django
https://redd.it/y1z26l
Help with error in Jupyter Notebooks

I am having an error with Jupyter Notebooks. My error is "NameError: name '_C' is not defined. I am writing a neural network to process the BCI Competition dataset. I've posted the code as a screenshot here.

I opened Jupyter through the Anaconda command prompt. All of the packages shown as imports are installed and I have restarted the kernel. In fact, this is the second notebook to try this. When I run 'pip install torch' it states that the requirement is already satisfied and I confirmed that through the Anaconda Navigator. Torch is installed in the base root.


Can anyone help me with my error?


​

https://preview.redd.it/lg48094rqac91.png?width=1078&format=png&auto=webp&s=a3f062a4b20073657f0fd6ab9b6d7686b7d99426

/r/JupyterNotebooks
https://redd.it/w1v7ts