Làm chủ Scrapy qua việc hiểu sâu Request & Response! 🕷️
Nhiều người nghĩ chỉ là gửi và nhận, nhưng Scrapy còn nhiều bí mật:
🔹 Meta: Chuyển dữ liệu giữa các hàm callback hiệu quả.
🔹 response.follow(): Rút ngắn code, tự xử lý URL tương đối.
🔹 FormRequest: Xử lý login cực nhanh với .from_response().
🔹 Priority: Ưu tiên cào các trang quan trọng trước.
Đừng quên dùng "yield" và kiểm tra status code để bot chạy mượt mà nhất!
#Scrapy #Python #WebScraping #Programming #Tips #LapTrinh #CongNghe #
fastapi-guard looks interesting and powerful, however almost all concerns handled by fastapi-guard do not belong inside a FastAPI application. Security policies and security aspects have to be handled outside and in front of a FastAPI application. In a complex application setup, security must be handled and configured in a single, central place and not decentralized per application.
https://github.com/rennf93/fastapi-guard
Voici des documents sous licence creative commons (différentes licences, cc-by quelque chose), si vous vous intéressez à
#education #numerique #informatique #media emi #profsdoc, formation à distance, radio, audio et vidéo, cours #python..
fichiers de cours de MOOC cc-by-nc-nd
- Audencia : négocier son #salaire pour les femmes (synthèses)
- CNAM : tests psychologiques (1 partie d'un module, 1 module entier)
- université La Sagesse (Liban) : compétences interculturelles (tous les docs a priori)
Rédigés en français, sauf comics for education.
https://kdrive.infomaniak.com/app/share/544884/a6b6845f-2108-4ee3-a5a6-79e75d0f85cb
Consulter/télécharger avant suppression 🗑♻
Автоматизация фоновой аналитики в финтехе с помощью background LLM‑агента: реальный опыт
Всем привет, меня зовут Максим Шаланкин, Machine Learning Team Lead в команде финтеха Big Data MWS. Внутренняя аналитика в финтехе живет в режиме постоянной гонки: новые клиенты приходят, ведут себя по‑разному, а бизнесу нужно быстро понимать, чем группы с разными сценариями отличаются друг от друга. При этом значительная часть работы аналитика — это однотипное сравнение когорт и поиски закономерностей в табличках и графиках. Фоновый LLM‑агент, который умеет сам поднимать данные, запускать статистические проверки и возвращать готовые инсайты, заметно сокращает путь от данных до решения. Под катом — разбор, как устроен такой background‑агент для анализа активности новых клиентов, на чем он основан, как мы минимизируем галлюцинации и почему выбрали архитектуру, похожую на Claude Skills, а не идем в сторону MCP‑подхода.
https://habr.com/ru/companies/ru_mts/articles/978386/
#Сезон_ИИ_в_разработке #LLMагенты #автоматизация_аналитики #продуктовая_аналитика #финтех #backgroundагенты #агентная_архитектура #анализ_данных #Python
Топ-5 фишек Python, которые вы, скорее всего, упустили
На дворе 2025 год. Мы привыкли к f-строкам и тайп-хинтингу, но всё ещё тащим в продакшен привычки из Python 3.6. Вы знали, что блок else в цикле for выполняется вовсе не тогда, когда «цикл не сработал», а наоборот? А что громоздкий try-except pass для игнорирования ошибок — это антипаттерн, который заменяется одной элегантной строкой из стандартной библиотеки? В статье — топ-5 прагматичных фич (от match/case с гардами до itertools.batched), которые позволяют писать декларативный код и выбрасывать лишние if и флаги. Никакой воды, только примеры «Было / Стало».
https://habr.com/ru/articles/979590/
#python3 #python #python_для_начинающих #python_3 #match_case
От монолита к модулям: строим масштабируемую архитектуру AI-агентов с FastMCP и LangChain
От монолита к модулям: строим масштабируемую архитектуру AI-агентов с FastMCP и LangChain Год бума AI-агентов показал: самая большая проблема — не галлюцинации, а архитектура. Когда инструментов много, а агенты распухают, копипаста и сложность тестирования убивают скорость разработки. В статье разбираем, как Model Context Protocol (MCP) и библиотека FastMCP помогают создать чистую, модульную систему: выносим логику в отдельные серверы, управляем контекстом через ресурсы и легко меняем поведение агентов. Показываем на Python и LangChain 1.0, как превратить набор скриптов в масштабируемую фабрику агентов.
https://habr.com/ru/articles/979064/
#python #ai #langchain #fastmcp #микросервисы #архитектура #ai_агенты
Well, I suppose someone had to say it: I'm really disappointed that #PyPI / #PSF went as far as to use dark patterns in the donation banner.
https://discuss.python.org/t/dark-patterns-in-the-pypi-donation-banner/105383
Ah, CineCLI: because who needs a user-friendly interface when you can flex your #Python skills in the #terminal to "browse" and "torrent" movies? 🎬💻 It's like reinventing the wheel, but square and made of code. 🔄🤦♂️
https://github.com/eyeblech/cinecli #CineCLI #Movies #TechInnovation #CodingHumor #HackerNews #ngated
Voici des documents sous licence creative commons (différentes licences, cc-by quelque chose), si vous vous intéressez à
#education #numerique #informatique #media emi #profsdoc, formation à distance, radio, audio et vidéo, cours #python..
fichiers de cours de MOOC cc-by-nc-nd
- Audencia : négocier son #salaire pour les femmes (synthèses)
- CNAM : tests psychologiques (1 partie d'un module, 1 module entier)
- université La Sagesse (Liban) : compétences interculturelles (tous les docs a priori)
Rédigés en français, sauf comics for education.
https://kdrive.infomaniak.com/app/share/544884/a6b6845f-2108-4ee3-a5a6-79e75d0f85cb
Consulter/télécharger avant suppression 🗑♻
Content warning:re: morshutalk-v2 dev thread
Blessed be, someone has continued opuslib since it was deprecated forever ago, so I'll be working directly with opuslib_next for all of my opus output needs. Audio will at the very least be encoded both as the original wav file in addition to the OGG opus audio file. At least, assuming I can't find a higher-level option that's actively maintained.
Since I'll be working with opuslib more closelier (likely) it'll be More Annoying (TM) but a. it means I get to Learn python more gooder and 2. I'll get to figure that all out.
I think I'll abandon the idea of using anything but a 16-bit depth for the audio output - I can easily get away with a 22050 Hz sample-rate since we're talking voice lines, and Opus or whatever is going to compress things down a fair bit as well. We're also talking audio that's probably not much longer than 15 seconds barring the occasional jank, so an ever so slightly larger file because I can't be bothered to figure out narrower bit-depths is fine.
I'm still borrowing the original phoneme array since I don't want to sift through the original speech again to track down any possible improvements just yet. It honestly might be one of the few original bits that are exactly (or extremely) close to the original morshutalk, outside of the Morshu class.
I do want to tweak things to let him say numbers since g2p doesn't handle that eng -> eng-arpabet conversion at ALL (understandably so) so I need to figure out separating those if they're ever next to another character, and then convert the individual numerals into text (only covering 0 through 9, sorry he'll sound weird if you try to make him say 40 or whatever), which will then be handled properly by g2p.
No significant progress today other than finding opuslib_next, but that does give me a lead to dig into for encoding purposes. Whether I stick to using opuslib_next directly or use a higher-level system that's also cross-platform friendly IDK, but that'll come with time.
#100DaysOfCode Day1: Inspired by an experiment I did a while ago where was trying do deep dive into encrypting files and folders. I started my first challenge project zip-n-encrypt using #Python. The idea is to zip a folder or a file, masking the filenames for the zip container and encrypt the whole zip file after zipping.
It is meant to be a cli tool in the first shot using tqdm, cryptography with a bunch of cli options like zip-chunks, kompression rate, scr, dst and delsrc 1/2
heise+ | Python-Framework pyTM: Threat Modeling als Programmierprojekt
pyTM ermöglicht Threat Modeling as Code für Entwicklerteams und für komplexe Bedrohungsmodelle. Wir zeigen, wie man ein Threat Model von Grund auf erstellt.
#IT #Programmierung #Python #news