python

Back Open Paginator
24.12.2025 07:14
devto_vn_bot (@devto_vn_bot@mastodon.maobui.com)

🤖 Hướng dẫn nhanh: Thêm hình quỷ (alive/dead) vào sprite trong game 2D Tkinter. Chuẩn bị 6 file PNG (blue, green, red), đặt trong thư mục images, dùng `tkinter.PhotoImage` tải ngẫu nhiên màu quỷ, hiển thị bằng `create_image` và chuyển sang ảnh chết khi click. Mã mẫu đầy đủ bao gồm khởi tạo, di chuyển, va chạm và hàm `die()`.

#Tkinter #Python #GameDev #LậpTrình #2DGame #Sprite #DemonSprite #Code #Tutorial

dev.to/sdkfz181tiger/getting-s




Show Original Post


24.12.2025 07:12
devto_vn_bot (@devto_vn_bot@mastodon.maobui.com)

Bài viết hướng dẫn thêm tính năng dừng sprite khi click trong game 2D dùng Tkinter. Định nghĩa biến dead, phương thức die() đánh dấu sprite “chết” và đổi màu đỏ, hàm is_hit() kiểm tra khoảng cách click. Trong on_mouse_clicked() kiểm tra từng sprite, nếu chưa chết và bị click sẽ gọi die() và dừng vòng lặp. Cập nhật mã nguồn đầy đủ cho sprite và vòng lặp game. #Tkinter #Python #GameDev #LậpTrình #2DGame #PhátTriểnGame #MắtBão #code #programming

dev.to/sdkfz181tiger/getting-s




Show Original Post


24.12.2025 07:07
tinoeberl (@tinoeberl@mastodon.online)

#Steady-#Klimacrew

#BahnMonitor-Projekt: 2. Welche Architektur sollte der Bot haben?

Bevor es ans Coden geht, ist etwas Grübeln über eine sinnvolle Gliederung der Module ratsam. Wie sieht die Dateihierarchie aus? Wie bekommt man den #Code pflegeleicht? Welche #Bibliotheken werden benötigt? Und so habe ich das gemacht:

tino-eberl.de/vibe-coding/pyth

#Python #BahnBubble #VibeCoding #OpenData #APIIntegration #VisualStudioCode




Show Original Post


24.12.2025 06:36
jamesthebard (@jamesthebard@social.linux.pizza)

Finished up Day 11 of Advent of Code and it was definitely easier than Day 10. Nothing fancy and it's pretty fast. Did have to think about how to get part 2 solved, but it was more an implementation issue more than me just smashing keys and hoping a solution fell out.

Solution: git.jamesthebard.net/jweatherl

#adventofcode2025 #adventofcode #python #programming




Show Original Post


24.12.2025 06:15
devto_vn_bot (@devto_vn_bot@mastodon.maobui.com)

List comprehension trong Python cho phép gộp vòng lặp, điều kiện và tạo danh sách trong một dòng, giảm tải nhận thức so với cách viết truyền thống (for‑if‑append). Công cụ Python Structure Viewer hiển thị cấu trúc cây và bản dịch tiếng Anh, giúp thấy rõ “mẫu” của phép tính và tối ưu hoá mã. #Python #ListComprehension #LậpTrình #CấuTrúcCode #Programming #CodeCleanliness

dev.to/aaron_rose_0787cc8b4775




Show Original Post


24.12.2025 06:13
devto_vn_bot (@devto_vn_bot@mastodon.maobui.com)

Gateway LLM: Python (LiteLLM) vs Go (Bifrost). LiteLLM thích nhanh, linh hoạt, traffic ít; Bifrost được tối ưu cho quy mô, độ ổn định, concurrency, failover và dự đoán hiệu năng khi gateway trở thành hạ tầng. Lựa chọn ngôn ngữ đúng thời điểm giảm rủi ro và chi phí vận hành. #AI #LLM #Python #Go #Infrastructure #CôngNghệ #Bifrost #LiteLLM

dev.to/debmckinney/python-base




Show Original Post


24.12.2025 06:12
devto_vn_bot (@devto_vn_bot@mastodon.maobui.com)

LLM gateways nhanh chóng trở thành hạ tầng AI, nhưng khi lưu lượng tăng liên tục Python (LiteLLM) gặp giới hạn: độ trễ tăng, CPU cao, retry rối. Go‑based Bifrost giảm latency, quản lý hàng ngàn request đồng thời nhờ goroutine và bộ nhớ ổn định, thích cho môi trường sản xuất quy mô lớn. #AI #LLM #Go #Python #Bifrost #CôngNghệ #TriTueNhanTao

dev.to/debmckinney/why-llm-gat




Show Original Post


24.12.2025 05:13
devto_vn_bot (@devto_vn_bot@mastodon.maobui.com)

Đang dùng print() để debug? Hãy chuyển sang module logging của Python để phù hợp sản phẩm. Cài đặt logger, thiết lập mức DEBUG‑INFO‑WARNING‑ERROR‑CRITICAL, ghi vào file hoặc JSON, tích hợp với Flask và Docker (docker logs). Nâng cao khả năng theo dõi và bảo trì. #Python #Logging #Developer #LậpTrình #CôngNghệ

dev.to/claudeprime/python-logg




Show Original Post


24.12.2025 05:12
devto_vn_bot (@devto_vn_bot@mastodon.maobui.com)

SQLite là lựa chọn nhẹ cho các dự án phụ và MVP: không cần cài đặt, sao chép file để triển khai, sao lưu đơn giản, hiệu năng đọc cao, và hỗ trợ ghi đồng thời tốt cho môi trường đơn máy. Khi dự án vượt quá ~1TB hoặc cần đồng thời nhiều server, chuyển sang Postgres. #SQLite #Python #Database #SideProject #DựÁnNhỏ #CơSởDữLiệu #MVP

dev.to/claudeprime/sqlite-in-p




Show Original Post


24.12.2025 04:51
alcea (@alcea@infosec.exchange)
@alcea •acws #acws
Welp.
Why not also revamp the #python one ?

now it can do everything the other one can.
Minus the obnoxious server writes and leaving a device open for commands :ablobcatnomcookie:

https://www.youtube.com/watch?v=KszeTstAO5A&feature=youtu.be
https://codeberg.org/alceawisteria/AudioplayerIntentWebController/src/branch/main/PythonVer

You will need:
* wireless adb enabled
* adb on your computer
* the libraries installed the py wants in the beginning.

Thats it.

Quite nice. will fetch the ip adress from a *.txt
(Which you can task macrodroid to write via a php if you want so it is accessible anywhre), or update it manually or something.
Or enter it each run.
Its up to you :P )

I just realized the audio was coming from my headphone..
So no #CopyrightInFridgeMint 2day

#CodeAlcea


Show Original Post


24.12.2025 04:47
borgbackup (@borgbackup@fosstodon.org)

#borgbackup 2.0.0b20 was just released!

There is quite some new stuff and also some fixes, please help with testing the betas!

github.com/borgbackup/borg/rel

#backup #linux #bsd #macOS #openindiana #haiku #python #cython #borg




Show Original Post


24.12.2025 04:14
devto_vn_bot (@devto_vn_bot@mastodon.maobui.com)

Resend API cho phép dev gửi email giao dịch nhanh chỉ trong 5 phút, 6 dòng code Python và 3 000 mail/tháng miễn phí. Dễ dàng xác thực domain, lấy API key, hỗ trợ đính kèm file, xử lý lỗi và tuân thủ CAN‑SPAM. Thích hợp cho dự án indie! #Resend #Email #Python #Developer #GửiEmail #CôngCụ #API

dev.to/claudeprime/send-transa




Show Original Post


1 ...769 770 771 772 773 774 775 776 777 778 779 ...1579
UP