I used #Python #Pandas to total AWS S3 payments.
Data was in a CSV file. But numbers in the "Amount" column were written as "USD 12.34".
Here's what I did:
(
df['Amount']
.str.replace('USD', '') # remove "USD"
.astype(float) # no strip needed!
.sum()
)

Thought I’d give Polars a try, since I needed to rework some Python code that uses Pandas anyway
Nope. I do not care for the syntax, and the documentation is more opaque than I’d care for. And since it’s newer and less widely known, there aren’t a lot of answered questions already out there
I’ll be sticking with Pandas for the foreseeable future
Hướng dẫn chi tiết cách huấn luyện mô hình phân đoạn ảnh (instance segmentation) trên dataset tùy chỉnh bằng Detectron2. Bài viết trình bày quy trình từ chuẩn bị dataset COCO, đăng ký dữ liệu, cấu hình mô hình Mask R-CNN, huấn luyện và kiểm tra trực quan. Phù hợp cho dân nghiên cứu AI/Deep Learning muốn áp dụng Detectron2 vào dự án riêng.
#AI #DeepLearning #Detectron2 #MachineLearning #PhânĐoạnHìnhẢnh #InstanceSegmentation #ComputerVision #Python #Dataset #Tutorial
Nuro is hiring Software Technical Lead, Behavior & Triage Labeling
🔧 #cplusplus #golang #python #techlead
🌎 Mountain View, California
⏰ Full-time
🏢 Nuro
Job details https://jobsfordevelopers.com/jobs/software-technical-lead-behavior-triage-labeling-at-nuro-ai-dec-23-2025-51ea2c?utm_source=mastodon.world&utm_medium=social&utm_campaign=posting
#jobalert #jobsearch #hiring
In #Python, given some kind of bunch of things (a `dict`, a `list`, whatever), but you only want one thing out of it, there are lots of ways to do it:
* All the normal things: the first one, the last one, some specific index, using a key, whatever (appropriate for almost every case where the bunch of things is some kind of `Mapping`)
* When you need to search, e.g., it's not just the first one, it's the first one such that it satisfies some predicate `p`. I posted on this a bit ago (see https://hachyderm.io/@YesJustWolf/115862957105718629):
`next(e for e in bunch if p(e))`,
`next(e for e in bunch if p(e), None)`
But what if there's only one thing in the bunch. And for mappings, you don't happen to know the key of that one thing (nor do you need to know).
* `bunch[0]`: ugly and a bit magic to my eye because it contains a number (the key you explicitly don't care about)
* `bunch.pop()`: I personally find this slightly better (and it works on more things), but it modifies `bunch` and like the expression above, doesn't express your knowledge that `len(bunch)==1`
* Yes, the `next` method I mention above works here, but it's way more work and visual noise
Destructuring assignment does exactly what I want. Imagining `bunch` to be a dictionary where I want to get the value of the one and only item in it, but without modifying the `dict`:
`(v,) = bunch.values()`
That clearly explains that I know there's only one. Works even though I don't know the key of that one item (yes, it would have been easy enough to find, but I don't care here).
I'm sure similar tools exist, but I had fun buidling a resume generator that creates a PDF from YAML data, styled with HTML + CSS.
https://github.com/thwbh/curricu-loom
#python #resume #cv #resumeTemplates
Teaching data structures in Python gets easier with 𝗺𝗲𝗺𝗼𝗿𝘆_𝗴𝗿𝗮𝗽𝗵 visualizations. Data structures are no longer abstract concepts but concrete, clear and easy to debug.
This Hash_Map (Hash_Table) is a Python implementation similar to 'dict'. The demo visualizes:
- adding key–value pairs
- rehashing
- lookup by key
- iterating over keys
#Python #programming #memory_graph

My day job is all about #Python (which I love). Here are some personal rules, specific to working with Python projects:
* Do **not** install or modify global tools, especially Python itself or any packages. This means a given system might not even **have** a global Python
* Always use virtual environments (`uv` agrees with me, and doesn't need this but). I always set the global environment variable `PIP_REQUIRE_VIRTUALENV`.
* The two rules above mean my virtual environment contains (not via a link, it's really there) Python itself (and of course, of the right version)
* Virtual environments always live **inside** a project directory. Never global.
* Activate virtual environments only **inside** the project directory (`direnv` #direnv makes this easy)
* Don't install (let alone use) #Anaconda, #Miniconda, or #Mamba, because those violate all the rules above (but see the next rule)
* Anaconda-based packages implies a `pixi` #Pixi project (it's the same people, but a better answer, and you still get what you want -- the correct packages)
* No Anaconda-based packages implies a `uv` #UV project
* Always use `pyproject.toml` #pyprojecttoml over any other config file (e.g., `requirements.txt #requirementstxt), except where things just don't work, such as needing `pyrefly.toml`
* `uv`, `pixi`, and `direnv` must exist outside of any project, so install them at the user level, or else globally if and only if that is appropriate and compelling enough to override rule one
That was a wall of text, but in practice doing it this way is trivial. It's probably **less** work than you have been doing. This post is just about managing your Python versions, environments, and projects. Not about, e.g., using `pre-commit` #precommit, or doing type checking, etc. But if you follow these rules, your work will be easier, faster, more adaptable, and encounter fewer obstacles.
Your favorite #Python 🐍 libraries are lying to you.
• `pip install orjson` - that's Rust.
• `pip install polars` - Rust.
• `pip install cryptography` - Rust.
• `pip install pydantic` - the core is Rust.
• `pip install ruff` - Rust again.
🛠️ Đã ra mắt CODED FLOWS – công cụ kéo‑thả Python trực quan, biến code AI thành các block tái sử dụng. Người dùng có thể kéo‑thả, chia sẻ package (ML, query DB, chuẩn dữ liệu) và xuất ra script Python. Giúp giảm việc viết lại mã lặp lại trong các dự án nội bộ. #CodedFlows #AI #Python #NoCode #Automation #CôngCụ #LậpTrình #DataTools
https://www.reddit.com/r/SideProject/comments/1qr6qna/i_built_a_visual_python_tool_that_turns_ai/
Gráfico de imagen con histograma en la parte superior
#Matplotlib #Python
Analizar la distribución de características en mapas de calor #ML #AprendizajeAutomatico
#Anzoategui #Lecheria
Engine Data displayed live on Dash.
In the auto world, there are lots of overarching standards that all automakers comply with. There are also lots of proprietary technologies that each automaker creates and uses for its own benefit. [Shehriyar Qureshi] has recently been diving into Suzuki’s Serial Data Line standard, and has created a digital dash using the data gained.
https://github.com/thatdevsherry/suzui-rs
#suzuki #digital #engine #data #dash #display #diy #engineer #media #python #rust #programming #car #tech #raspberrypi #news
