Learn Python Coding
40.9K subscribers
723 photos
37 videos
24 files
538 links
Learn Python through simple, practical examples and real coding ideas. Clear explanations, useful snippets, and hands-on learning for anyone starting or improving their programming skills.

Admin: @HusseinSheikho || @Hussein_Sheikho
Download Telegram
πŸ”₯ Free IT & Dev Study Kits – 2026 Prep & Double 11 Giveaway

Prepping for cloud, dev, or AI roles this year? These free kits cover the gaps most people skip β€” cert basics, hands-on labs, and mock exams.
πŸ“˜ Cert E-Book β€” Cisco & AWS fundamentals, ideal for first-time cert takers
β†’
https://tinyurl.com/ynutkhec
πŸͺœ Online Free Course β€” a structured path that works great as a refresher before exams
β†’
https://tinyurl.com/4kvuk4m6
☁️ Free AI Materials β€” from LLM basics to fine-tuning practice notebooks
β†’
https://tinyurl.com/2z46z8f4
πŸ“Š Cloud Study Guide β€” cheat-sheet style, handy for interview prep
β†’
https://tinyurl.com/ymncyj5k
🧠 Free Mock Exam β€” test yourself before booking the real thing
β†’
https://tinyurl.com/y7ffwecz

🎁 Double 11 Giveaway β€” win iPhone Duo & Amazon Gift Cards


πŸ“Œ Save this or forward it to your dev/study group β€” good resources are worth sharing. πŸ’ͺ
🌐 Join Community to Draw: https://chat.whatsapp.com/KkbnOUuS55aJdZMtTGrVYL
πŸ“² Personalized help: https://wa.link/xd2
❀4πŸ‘2
πŸš€ asyncio.Queue.shutdown() β€” shutting down handlers without special markers

Starting with Python 3.13, the asyncio.Queue can be closed using shutdown(), without the need to use None or other special values.

import asyncio

async def worker(queue):
while True:
try:
task = await queue.get()
except asyncio.QueueShutDown:
break

print(task)
queue.task_done()

async def main():
queue = asyncio.Queue()
task = asyncio.create_task(worker(queue))

await queue.put("task-1")
await queue.put("task-2")

queue.shutdown()
await queue.join()
await task

asyncio.run(main())

After shutdown(), no new items are added, and existing items are processed. When the queue is empty, get() will raise asyncio.QueueShutDown.

For a forced shutdown, there is shutdown(immediate=True), which clears the queue but may disrupt the normal behavior of join().

#Python #Asyncio #Programming #DevTips #Coding #Tech

✨ Join Best TG Channels https://t.iss.one/addlist/0f6vfFbEMdAwODBk

⭐️ Join Our WhatsApp Channel https://whatsapp.com/channel/0029VaC7Weq29753hpcggW2A
❀1
🚨 SURPRISE ALERT! 🚨

Stop paying full price on Udemy. Seriously. πŸ’Έ

I built a bot that hunts down 100% FREE Udemy coupons 24/7 β€” while you sleep, eat, or scroll. 🎯

Here's the magic:

πŸ“š Mini App catalog β€” every active free coupon in one place
πŸ”” Auto-push β€” new courses land straight in your chat
πŸ“’ Live channel β€” never miss a deal

Why it matters?
Most people pay $200+ for courses you can grab for $0 β€” if you know where to look. Now you have a bot that does the looking for you. ⚑

πŸŽ“ Try it now: https://t.iss.one/UdemySybot?start=adsun

Your future self (and your wallet) will thank you. πŸ’œ
❀1
Extracting named entities (NER) from contract texts using spaCy. πŸ“

Manually parsing legal documents to find organizations, dates, and amounts is too time-consuming. The spaCy library allows you to automatically find and classify named entities in unstructured text. We will write a Python script that loads a language model and recognizes key entities in a contract excerpt. πŸš€

We will install the spaCy library and download a pre-trained language model for working with the Russian language. πŸ‡·πŸ‡Ί

pip install spacy && python3 -m spacy download ru_core_news_sm


The spaCy library and the Russian language model have been successfully loaded into the environment. βœ…

We will create a Python script called extract_ner.py that processes the contract text through a language pipeline and prints the identified entities. 🐍

import spacy

nlp = spacy.load("ru_core_news_sm")
text = "OOO 'Vector' undertakes to pay 500,000 rubles by October 15, 2026, in Moscow."
doc = nlp(text)

for ent in doc.ents:
print(f"{ent.text}


#spacy #python #nlp #dataScience #programming #automation

✨ Join Best TG Channels https://t.iss.one/addlist/0f6vfFbEMdAwODBk

⭐️ Join Our WhatsApp Channel https://whatsapp.com/channel/0029VaC7Weq29753hpcggW2A
❀1
πŸ’» Into programming, AI or web development?

The tech world moves fast, and there's always something new to explore. Whether you're coding, testing new tools, or keeping up with the latest tech trends, having a reliable internet connection matters.

🌐 That's where DWZVPN comes in.
βœ”οΈ 30 days free
βœ”οΈ Multiple server locations
βœ”οΈ Switch between servers
βœ”οΈ Secure and private connections
βœ”οΈ Choose which apps use the VPN with Custom App Routing


πŸ‘‰πŸΌ No commitment. Download and try it:
Free, Secure & Private VPN | DWZVPN

Our channel : https://t.iss.one/dwzvpn
 
πŸ€– ANDROID
🍎 IOS
πŸ’» WINDOWS
πŸ” MAC
❀1
Voluptuous - Data Validation in Python

Voluptuous is a Python library for data validation using schemas. It allows you to define acceptable values for fields and validate data received from users, APIs, or other sources.

To get started, import the library:

import voluptuous as v


https://t.iss.one/pythonRe
❀2
This channels is for Programmers, Coders, Software Engineers.

0️⃣ Python
1️⃣ Data Science
2️⃣ Machine Learning
3️⃣ Data Visualization
4️⃣ Artificial Intelligence
5️⃣ Data Analysis
6️⃣ Statistics
7️⃣ Deep Learning
8️⃣ programming Languages

βœ… https://t.iss.one/addlist/8_rRW2scgfRhOTc0

βœ… https://t.iss.one/Codeprogrammer
Please open Telegram to view this post
VIEW IN TELEGRAM
❀3
If you trade cryptocurrencies and are feeling confused about the current market, I strongly recommend you join the group I’ve mentioned

The group shares the following content every day:

βœ… One trading signal a day (with a success rate of up to 85%)
βœ… Real-time updates on cryptocurrency market trends
βœ… Personalised, one-to-one technical trading advice

Whether you’re a beginner or an experienced trader, you’re welcome to join the group to exchange ideas and gain useful insights

Join nowοΌ›https://walink.ai/agdK2Qq
🌟 Detecting Hallucinations in LLM Responses through Perplexity Calculation πŸ€–

Hallucinations in language models lead to the generation of false, yet convincingly sounding, facts. πŸ“
Calculating the perplexity of the generated text allows us to assess the model's confidence in its responses. πŸ“Š
We will write a Python script to calculate perplexity and filter out questionable generations. 🐍

Let's install the
transformers

and
torch

libraries to work with language models and calculate perplexity.
pip install transformers torch

The libraries for calculating perplexity have been successfully installed. βœ…

Let's create a Python script called
perplexity_check.py

that calculates the perplexity level for a given text.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "gpt2"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id)

inputs = tokenizer("Example text for perplexity check.", return_tensors="pt")
with torch.no_grad():
    outputs = model(**inputs, labels=inputs["input_ids"])
print("Loss value:", outputs.loss.item())

The perplexity calculation script has been successfully created and is ready to run. πŸš€
# Verify the script's functionality
python3 -c "import torch; print('PyTorch Ready')"

Expected output:
PyTorch Ready

# cleanup (remove the test script)
rm -f perplexity_check.py

An abnormally high perplexity often indicates that the model has started "hallucinating" and generating illogical text. 🚫

Integrate this threshold into safety filters (Guardrails) to automatically block incorrect responses. πŸ›‘οΈ

https://t.iss.one/pythonRe

#Python #AI #LLM #MachineLearning #Coding #Tech

🌟 Join Best TG Channels
https://t.iss.one/addlist/0f6vfFbEMdAwODBk

⭐️ Join Our WhatsApp Channel
https://whatsapp.com/channel/0029VaC7Weq29753hpcggW2A
Please open Telegram to view this post
VIEW IN TELEGRAM
❀4
inspect.getattr_static() β€” Retrieving attributes without executing external code!

The standard getattr() function doesn't always simply read an attribute. It can invoke a @property, a descriptor, or a custom __getattr__, potentially triggering arbitrary object logic.
class User:    @property    def token(self):        print("Loading token...")        return "secret"user = User()print(getattr(user, "token"))# Loading token...# secret


This behavior can be undesirable for object analysis tools.

The standard library provides inspect.getattr_static(), which retrieves an attribute without the usual dynamic access mechanism.
from inspect import getattr_staticattr = getattr_static(user, "token")print(type(attr))# <class 'property'>


Instead of executing the property, the function returns the property object itself. This allows you to inspect the class structure without executing the code associated with reading the attribute.

This is useful when working with objects that dynamically create attributes using getattr.
class Config:    def __getattr__(self, name):        print(f"Loading {name}")        return 42config = Config()print(getattr(config, "timeout"))# Loading timeout# 42


getattr_static() does not call __getattr__. Therefore, you can check for a missing attribute without any side effects.
print(getattr_static(config, "timeout", None))# None


Static retrieval does not guarantee the same value as the standard getattr(). It may return a descriptor instead of the computed value, and it may not discover some dynamically accessible attributes at all.

πŸ”₯ inspect.getattr_static() allows you to inspect object attributes without executing properties or custom access methods, which is useful when developing debuggers, serializers, and code analysis tools.

https://t.iss.one/pythonRe ✈️
Please open Telegram to view this post
VIEW IN TELEGRAM
❀3
Forwarded from Machine Learning
πŸ”₯ Free IT & Dev Study Kits + Double 11 Giveaway 🎁

Prepping for cloud, dev, or AI roles? These free kits cover the gaps most people skip:
πŸ“˜ Cert E-Book (Cisco & AWS) β†’ https://tinyurl.com/ynutkhec
πŸͺœ Free Online Course β†’ https://tinyurl.com/4kvuk4m6
☁️ Free AI Materials β†’ https://tinyurl.com/2z46z8f4

πŸŽ‰ Black Friday Lucky Draw β€” win iPhone Duo, $50 Amazon Gift Card, Blinkstory Coins, PMP/Cisco training & more!
πŸ‘‰ Join Lucky Draw Now: https://www.spotoexam.com/snsblackfriday2026/?id=snscxy
🌐 Community draw: https://chat.whatsapp.com/KkbnOUuS55aJdZMtTGrVYL
πŸ“² Admin Noya: https://wa.me/8619559123054

πŸ“Œ Save or forward to your study group β€” good resources are worth sharing! πŸ’ͺ
❀2
πŸ›‘ Cloudflare killing your bots?

Peak clears Turnstile and the 5-second
"Just a moment" wall in one API call.

Pay only when it solves
$0.35/1k at volume,
cheaper than CapSolver
Proxyless option, bring no proxies
Drop-in API, token back in seconds

🎟 15% off your first top-up: PEAK15
Free trial, no card.

πŸ‘‰ peak.fo / @peakfo
❀1
If you trade cryptocurrencies and are feeling confused about the current market, I strongly recommend you join the group I’ve mentioned

The group shares the following content every day:

βœ… One trading signal a day (with a success rate of up to 85%)
βœ… Real-time updates on cryptocurrency market trends
βœ… Personalised, one-to-one technical trading advice

Whether you’re a beginner or an experienced trader, you’re welcome to join the group to exchange ideas and gain useful insights

Join now:https://t.iss.one/+Mbs-qinH3bwxODk0