Python

6287 readers
8 users here now

Welcome to the Python community on the programming.dev Lemmy instance!

πŸ“… Events

PastNovember 2023

October 2023

July 2023

August 2023

September 2023

🐍 Python project:
πŸ’“ Python Community:
✨ Python Ecosystem:
🌌 Fediverse
Communities
Projects
Feeds

founded 1 year ago
MODERATORS
151
12
submitted 9 months ago by jnovinger to c/python
152
153
 
 

I’m not a software developer, but I like to use Python to help speed up some of my office work. One of my regular tasks is to print a stack of ~40 sheets of paper, highlight key information for each entry (about 3 entries per page), and fill out a spreadsheet with that information that then gets loaded into our software.

This is time-consuming, and I’d like to write a program that can scan the OCR-ed PDFs and pull the relevant information into a CSV.

I’m confident I could handle it from there, but I know that PDFs are tricky files to work with. Are there any Python modules that might be a good fit for the approach I’m hoping to take here? Thanks!

154
 
 

cross-posted from: https://discuss.online/post/4110869

Conda (@[email protected]) writes:

Conda is moving our social media presence from Twitter/X to Mastodon and LinkedIn at the start of 2024. It's past time to move into spaces that are welcoming and more in line with our community values. Going forward, you can find us at 🐘 @[email protected] (https://fosstodon.org/@conda) πŸ”— Conda Community on LinkedIn

Read Conda is moving to Mastodon & LinkedIn | conda.org/blog

Conda (Software)

Conda provides package, dependency, and environment management for any language.

Using conda provides a streamlined approach to package management, platform compatibility, environment isolation, and access to an extensive package ecosystem. It is particularly beneficial for data scientists, researchers, and developers working with diverse software requirements across different projects.

Conda Community

The "conda" community is made up of millions of users, packaging maintainers and tool developers. Conda is not a single organization but rather a concerted effort of many different organizations, all devoted to the mission of providing easy access to various types of free software regardless of the operating system or programming language.

We firmly believe that everyone belongs in open-source, and we want to start by thanking you for taking the time to read this page. What follows is a high level summary of all the projects and organizations which make up the conda community with links provided where you can learn more or get involved yourself. The many meanings of "conda"

Traditionally associated with the Anaconda distribution, nowadays the term "conda" refers to more than just a package manager or a software repository. Its many definitions also encompass community packaging efforts like conda-forge and bioconda, as well as new tools developed in the Mamba and conda-incubator organizations. All these efforts show that the conda ecosystem is no longer defined by a single actor and continues to grow and thrive.

Organizations on GitHub include:

Some tools you might be familiar with are conda or conda-build themselves but also community efforts like mamba, boa, setup-miniconda, conda-lock or conda-tree, among many more.

Read more about the conda community.

155
 
 

Just fyi.

156
 
 

cross-posted from: https://programming.dev/post/8025145

2023-12-29 by Novica Nakov:

I notice that Ctrl+Enter for running the code in Python and in R is not the same thing.

Read the whole article

157
11
CPython Type System Internals: Video Series (codeconfessions.substack.com)
submitted 9 months ago by ericjmorey to c/python
158
159
 
 

Hi,

As CSS do not have a color-overlay[^1] filter.

There is some heavy work around:

https://isotropic.co/tool/hex-color-to-css-filter/

that use a combination of CSS filter to target the desired color...

Those online calculators are neat, but I would like an offline version, in case the provided one become inaccessible.

I've downloaded the zip of https://codepen.io/sosuke/pen/Pjoqqp

But it doesn't work locally.. :/

So I would like to know, if someone know one in 🐍 Python ? or how can I make one then ?

Or if someone know another way to have the color-overlay[^1] effect in html\css, I'm all ears !

Thank.

[^1]: To apply like in Photoshop a color on the shape of the image (so not on the parts that have transparency.

160
161
162
 
 

These stubs have only been out in a pypi package for about 2 months so many people do not know about them yet.

163
164
8
Home - PyOhio 2023 (www.pyohio.org)
submitted 10 months ago by jnovinger to c/python
 
 

Via https://mas.to/@mpirnat/111592702753147583

Looks like talks are already live!

165
 
 

I have developed a project in #python to follow #RSS feeds and send an email with daily news. It is more an excuse to practice python, git and design patterns than a real project, but feel free to use it if you find it useful. Suggestions, opinions and feedback are welcome.

https://github.com/xurxia/newswave

166
 
 

Hi, When im working with some big dataframes and I need to create some columns based on functions. So i have some code like this

Def function(row): function

And then I run the function on the df as

df['new column'] = df.apply(function, axis=1)

But I do this with 10 or more columns/functions at time. I don't think this is efficient because each time a column is created it had to parce the entire data frame. There's a way to create all the columns at the same time while parsing the rows only once?

Thanks for any help.

167
20
Python 3.11.7 is now available (pythoninsider.blogspot.com)
submitted 10 months ago* (last edited 10 months ago) by mac to c/python
 
 

Major new features and changes:

  • PEP 657 – Include Fine-Grained Error Locations in Tracebacks
  • PEP 654 – Exception Groups and except*
  • PEP 673 – Self Type
  • PEP 646 – Variadic Generics
  • PEP 680 – tomllib: Support for Parsing TOML in the Standard Library
  • PEP 675 – Arbitrary Literal String Type
  • PEP 655 – Marking individual TypedDict items as required or potentially-missing
  • bpo-46752 – Introduce task groups to asyncio
  • PEP 681 – Data Class Transforms
  • bpo-433030– Atomic grouping ((?>…)) and possessive quantifiers (*+, ++, ?+, {m,n}+) are now supported in regular expressions. The Faster Cpython Project is already yielding some exciting results. Python 3.11 is up to 10-60% faster than Python 3.10. On average, we measured a 1.22x speedup on the standard benchmark suite. See Faster CPython for details.
168
169
34
Real-world match/case (nedbatchelder.com)
submitted 10 months ago by jnovinger to c/python
170
 
 

Made a Mastodon bot using Mastodon.PY and I'm so happy it works! πŸ˜…

I just got this random idea in my head and decided to see if I could create it, so I built a working slots that uses the 4 image uploads to show the results. It will automatically grant you 10000 Coins the first time and playing costs 50 coins per play. The prices go from 25 to 750, every play adds 25 into the jackpot that starts at 500 when it gets won and 4 jokers will give jackpot. It will say the results in text too and it saves all wallet-amounts to file too which it can load back on restart however it gets killed. πŸ˜…

Sorry, just wanted to share this somewhere. πŸ˜… I hope it's fine here.

I am however not really promoting it, not even sure how it will do under pressure (probably get throttled by Mastodon eventually) and it might either stop working or switch account to one of it's own (it's currently just using a personal infobot for testing) depending how it goes... I'm assuming if I give it a 5 plays per day per user limit it could be manageable... πŸ€·β€β™‚οΈ

(If you still want to try it, please do not abuse or spam it or I will have to take it offline, but the command to play on Mastodon is: "@[email protected] !slots"

Anyway, thanks for reading about my victory! πŸ˜…

171
15
submitted 10 months ago* (last edited 10 months ago) by [email protected] to c/python
 
 

Hello, im looking for some beginer-intermediate knowledge in python. I'm interested in more text rather than video based courses preferably with exersises.

172
173
26
submitted 10 months ago by mac to c/python
174
8
submitted 10 months ago* (last edited 10 months ago) by jnovinger to c/python
 
 

As seen in https://news.ycombinator.com/item?id=38561682

Memray tracks and reports memory allocations, both in Python code and in compiled extension modules.

175
 
 

cross-posted from: https://programming.dev/post/6990204

Richard McElreath has made his course materials available on GitHub.

However, the course follows the 2nd edition of McElreath's book Statistical Rethinking which is not available in a free digital format.

After watching the first lecture in the Statistical Rethinking 2023 YouTube Playlist, I might go ahead and purchase the text and use this course instead of Trevor Hastie and Rob Tibshirani's An Introduction to Statistical Learning (with Applications in R or Python) course.

I also like that this resource has made an explicit attempt to provide code examples in Julia as well as the more popular Python and R.

I wasn't sure who Richard McElreath was so I did a quick search which revealed his position as Director of the Department of Human Behavior, Ecology and Culture at the Max Planck Institute for Evolutionary Anthropology in Leipzig.

view more: β€Ή prev next β€Ί