A poll for #python #programming people, about the acceptable number of "return" statements in a single function/method.
My answer is in a comment.
My little Python module to manage an El Gato stream deck recently got support for multiple actions per key which is now used in production on my stream. One-press 'live key' which switch the scene to 'Coming soon', starts streaming and recording all at once.
https://code.malenfant.net/didier/StreamDeckLayoutManager
#Python #StreamDeck #ElGatoStreamDeck #Streaming
After *finally* organizing my Karakeep instance a little better, instead of just one big bucket of links, I made sub-lists for different categories. All of them are just subsets of the big bucket and stay up to date using tags. Check them out here: https://tldr.cam/links
What started as a simple script evolved into a full-fledged data engineering and NLP pipeline that can process a decade's worth of legal decisions in minutes. https://hackernoon.com/python-script-to-read-and-judge-1500-legal-cases #python
#Evernote 's transcribe method works pretty well. But it does halicunate new versions of sentences.
#Claude Code also works quite good. I was surprised it wouldn't write code, but directly transcribes it. Which burns through my credits.
#Claude Code also created some #Python code for this. It used #pytesseract for the OCR solution. And that out of the box was simply horrible. Unreadable.
/2
What's up with t-strings in Python 3.14?
They're a neat feature! But most Python users don't need to think about them until a library they're using tells them to use one.
🔍 / #software / #web / #framework / #Python
Asyncpg is the connector for PostgreSQL and asyncio-flavored Python. Here's how to use it without other libraries on FastAPI and Air projects.
🐱🔗 https://laravista.altervista.org/CatLink/links/404
#catlink #softwareweb #softwarewebframework #softwarewebframeworkPython #Asyncpg #PostgreSQL #FastAPI #Air
And many thanks to the people that decided you should only need to
'pip install jwst'
to get the whole calibration pipeline installed. I thought it would be a lot more difficult.
The warning that it doesn't run on Windows could be a bit larger though 😅
One reason why I've never really done any #JWST processing was the awful 1/f noise (banding) that's typical to the Stage 3 products from MAST.
I finally got around to installing the JWST pipeline locally, and reprocess these data with tweaked parameters.
I am trying to render a .qmd file that has both #Python and #R in #Positron but I get an error. I filed a ticket here:
Issue: https://github.com/posit-dev/positron/issues/10041
Here is my repo where I have the code:
GitHub: https://github.com/spsanderson/ollama_practice
Nice, lazy import in Python on the way.
https://peps.python.org/pep-0810/
Though I must say that pythonbuilder (https://codeberg.org/harald/pythonbuilder ) is able to start up, define ~20 targets, analyze them, and if there is nothing to do, finish in around 50ms. Lazy loading might hardly improve it, but lets see.
#python #pythonbuilder #lazyimport
[Перевод] Инструкция по бесплатной GPT генерации новых фичей для наращивания точности ML модели
Одним из самых важных навыков любого специалиста по данным или ML инженера является умение извлекать информативные признаки из исходного набора данных. Этот процесс называемый feature engineering (инженерия признаков), — одна из самых полезных техник при построении моделей машинного обучения. Работа с данными требует значительных инженерных усилий. Хотя современные библиотеки вроде scikit-learn помогают нам с большей частью рутинных операций, по-прежнему критически важно понимать структуру данных и адаптировать её под задачу, которую вы решаете. Создание новых, более качественных признаков позволяет модели лучше улавливать зависимости, отражающие особенности предметной области и влияющие на результаты факторы. Разумеется, feature engineering — это времязатратный, креативный и нередко утомительный процесс, требующий экспериментов и опыта. Недавно я наткнулся на интересный инструмент — Upgini . Следуя тренду на использование Large Language Models (LLM), Upgini применяет GPT от OpenAI, чтобы автоматизировать процесс feature engineering для ваших данных. Подробнее о python библиотеке Upgini можно почитать на GitHub странице проекта. У проекта уже 345 звездных оценок, что является показателем востребованности и полезности функционала. 👉 GitHub - upgini/upgini: Data search library for Machine Learning
https://habr.com/ru/articles/956310/
#python #gpt #openai #скоринг #auc #машинное_обучение #нейронные_сети #data_mining #data_science #machine_learning