Abduaziz Py 🔥


Channel's geo and language: Uzbekistan, Uzbek
Category: Technologies


@AbduazizZiyodov'ning o'zi bilgan va foydali bo'lishi mumkin bo'lgan ma'lumotlarini barchaga ulashish maqsadida ochgan kanali.

Related channels  |  Similar channels

Channel's geo and language
Uzbekistan, Uzbek
Statistics
Posts filter






"No hate", shunchaki qiziq.

@AbduazizPy

580 0 5 11 26


757 0 0 19 12

💣 No More Bare Excepts

https://peps.python.org/pep-0760

try:
risky_operation()
except:
handle_any_error()
Maqsad yuqoridagidek uslubni yo'qotish. Quyidagini "majburiy" qilish:
try:
risky_operation()
except Exception as e:
handle_expected_error(e)
Dasturchi aynan qaysi exceptionni handle qilayotganini bilishi va kodda ko'rsatishi shart. Lekin hamma holatni qamrab oladigan universal handler ham yozib bo'lmaydi, kutilmagan holatlar juda ham ko'p (MemoryError exception'i uchun handler yozganmisiz hech ?)

Bularni hisobga olgan holda, avvaliga bizga ma'lum bo'lgan barcha exceptionlarni handle qilib, keyin qolgan holatlar uchun kod yozib qo'ysak bo'ladi menimcha:
try:
do_stuff()
except SomeExc:
...
except SomeSomeExc:
...
except Exception as exc:
...
finally:
...
else:
...
try/except:pass yozadiganlarga yuboramiz.

* edit-1: The syntax will be fully disallowed in Python 3.17.
* edit-2: PEPni 'https://t.me/AbduazizPy/355?comment=3349' rel='nofollow'>chopishibdi, post scheduled bo'lgan edi.

@AbduazizPy


Video is unavailable for watching
Show in Telegram
🆕 Telegram update: verification platform

* https://telegram.org/blog/gifts-verification-platform#verification-platform
* https://core.telegram.org/gateway

SMS verifikatsiyaga alternativ, arzonroq ekan:

Verification via Telegram costs $0.01 per user – greatly reducing operating costs for your service. By comparison, SMS verification can cost up to 50 times more per user.
The Telegram Verification Platform also ensures instant delivery of your messages – unlike SMS, which can take several minutes to arrive and have failure rates as high as 5


Yaxshi yangilik. Avvaldan telegram botlar orqali "passwordless" avtorizatsiyani yo'lga qo'yganlar ham bor lekin. O'zbekistonda har bir telefonga bitta telegram to'g'ri kelishini hisobga olsak juda ham qulay yechim. 42.uz da adashmasam shunday uslub.

Telegram shuni alohida platforma/api darajasiga olib chiqib, "soqqa" qilyapdi. Barakasini bersin.

deb xabar qiladi muxbirimiz.

@AbduazizPy

709 0 7 13 14

https://www.youtube.com/watch?v=TB2wqzGSsqM


"They constantly try to sell language"

@Abduaziz


🐧 G - "Gigachad"

Universitetlarda talabalarni linux ishlatishga majburlash ijobiy albatta.

@AbduazizPy

700 0 2 19 20

🔥 Python 3️⃣.1️⃣3️⃣

3.13-versiyani avvalgilaridan farqi juda ham katta. Avvalgilari qandaydur "typing"ga oid yangi "fishka"lar bilan quloqga lag'monni ilgan bo'lsa, bu safargisi ancha qattiq(eksperimental yangiliklar). Asosiy yangiliklar:

* Interaktiv interpretatorni yaxshilashdi (terminalda python desangiz chiqadigan konsol).
* Free-Threaded rejim. Ya'ni GIL(global interpreter lock)ni o'chirib qo'yish mumkin. Multithreading "scam" deb bo'lmaydi endi.
* JIT kompilyatori qo'shildi (optimizatsiya deb tushunishingiz mumkin).

Xullas, vaqt ajratib nimalar o'zgardi/qo'shildi ekan deb o'qib chiqganingiz ma'qul menimcha.

📕 Havola: https://docs.python.org/3.13/whatsnew/3.13.html

* edit: 1-oktyabr kuni reliz.

@AbduazizPy


*️⃣ Redis: xatolik

Odatda docker orqali ishga tushuraman, lekin tizim o'zida "native" o'rnatilganini xohlaydi bu ko'ngil. Har doim tushunarsiz xatolik berardi systemctl(systemd) orqali ishga tushurilganda, sizda ham vujudga kelsa fix:

sudo chown -R redis:redis /var/log/redis
sudo chmod -R u+rwX,g+rwX,u+rx /var/log/redis
sudo chmod +r /etc/redis/redis.conf

Shu skriptni apt orqali o'rnatayotganda nega qo'shib qo'yishmagani qiziq. Redis'ning systemd servisi redis foydalanuvchisi tomonidan ishga tushurilar ekan, shuni biror super foydalanuvchiga o'zgartirib to'g'irlab qo'yish mumkin bo'lsa kerak. Lekin tepadagi yechim xavfsizroq.

#redis #note #error

@AbduazizPy

635 0 2 18 10



🐘 PostgreSQL 17

Perfomance, memory usage(xotiradan x20 marta kamroq joy egallaydigan ma'lumot turi ishlab chiqishibdi) bo'yicha zo'r yangilanishlar bo'ldi deb yozibdi ekan akalar.

https://www.postgresql.org/about/news/postgresql-17-released-2936

Who cares.

Just use PostgreSQL. Chiqganini & borligini bilib qo'ysangiz yetarli. O'rnatguncha versiyasiga e'tibor bermaysiz baribir.

@AbduazizPy


Kimdur mandan kodimga komment yozishni so'rasa:

@AbduazizPy



782 0 2 20 24

https://www.bullshitremover.com

Bizga shuni linkedin bilan integratsiyasi kerak, firefox addon/chrome extension ko'rinishida.

@AbduazizPy


🌞 Pythonda ham bunchalik oson/tushunarli bo'lmasa kerak grafik interfeys qurish.

#include "raylib.h"
#include "resource_dir.h"

const int W_WIDTH = 800, W_HEIGHT = 600;
const char APP_TITLE[] = "BruhGL",
RESOURCES_DIR[] = "resources";

int main()
{
SetConfigFlags(
FLAG_VSYNC_HINT | FLAG_WINDOW_HIGHDPI
);
InitWindow(W_WIDTH, W_HEIGHT, APP_TITLE);
// rasm va boshqa assetlar saqlanadigan folder
SearchAndSetResourceDir(RESOURCES_DIR);

while (!WindowShouldClose())
{
BeginDrawing();
ClearBackground(BLACK);

DrawText(
"Abduaziz Py", // matn
W_WIDTH / 2, // x o'qidagi o'rni
W_HEIGHT / 2, // y o'qidagi o'rni
30, // shrift hajmi
ORANGE // rangi
);
EndDrawing();
}

CloseWindow();
return 0;
}

🔥 More: https://www.raylib.com

@AbduazizPy


✖️ Python: "@" operatori

Matritsalarni ko'paytirishda foydalanilarkan. List ma'lumot turida emas, numpy matristsalarida ishlar ekan. Qiziq, avval bilmagandim.

https://peps.python.org/pep-0465

* edit: Nega "@"?
This PEP proposes a new binary operator to be used for matrix multiplication, called @. (Mnemonic: @ is * for mATrices.)


@AbduazizPy


"Toksik" rust programmistlar(katta ehtimol bilan):

https://www.reddit.com/r/linux/comments/1fg630o/comment/lmzwpcm

@AbduazizPy


🦊 Firefox: vertical tabs

about:config sahifasiga o'tamiz, va quyidagi parametrlarni belgilaymiz:

sidebar.revamp -> true
sidebar.verticalTabs -> true

Firefox'ni qayta ishga tushuramiz. Hozircha ishlab chiqish jarayonida bu "feature", yomon emas.

@AbduazizPy


Dasturchi|Programmist|SWE|Koder|ITishnik lar kuni bilan tabriklayman. Feel free to touch some grass, winter is coming!

tmux/alacrity/nix|arch/rust|zig|haskell/neovim|zed ishlatadiganlarniyam tabriklanglar agar ko'chada ko'rib qolsangizlar (you probably won't).

@Mabrur k6rdzmi

@AbduazizPy

20 last posts shown.