Learn Python Coding
38.8K subscribers
608 photos
27 videos
22 files
366 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
โœจ concatenation | Python Glossary โœจ

๐Ÿ“– The operation of joining two or more strings end-to-end to create a new string.

๐Ÿท๏ธ #Python
โค2
๐ŸตMeet Fotbo โ€” the VPS with a monkey mascot and zero BS.


The deal: Fast NVMe storage, European servers, full control. No surprise bills, no corporate jargon, no waiting days for support.
The specs: โšก NVMe SSD that actually makes a difference ๐ŸŒ Netherlands โ€ข Poland โ€ข Germany ๐Ÿ’ฐ Starting at โ‚ฌ4.80/month (yeah, really) ๐Ÿ”ง Do whatever you want โ€” it's your server ๐Ÿ“Š Outperforms AWS, DigitalOcean & Vultr in benchmarks
Perfect for: Training neural networks without selling your kidney. Running Jupyter 24/7. Testing that crazy idea at 3 AM. Deploying models that actually need to scale. Scraping data without rate limits ruining your day.


๐ŸŽ -35% OFF FIRST MONTH Coupon: MONKEY35
https://fotbo.com/


Built by devs who got tired of overpriced cloud providers. Also, there's a monkey ๐Ÿ’
โค2
Django ModelSearch โ€” intelligent search for models

It indexes Django models and allows searching through the ORM. It works with PostgreSQL FTS, SQLite FTS5, Elasticsearch, and OpenSearch
</i>
Supports:
โ€ข autocomplete
โ€ข faceted search
โ€ข fuzzy search
โ€ข structured queries
โ€ข index rebuilding without downtime
โค2
What if you could see the entire dependency tree of a single team?

You can only debug version conflicts when you understand which packages depend on what. But manually sorting out these connections in a pile of nested dependencies is tedious and time-consuming.

uv tree does this automatically: it displays a complete dependency graph so you can track any package and understand where it came from.

Key features:

โœ…Full visualization of dependencies
โœ…Highlights dependencies for which updates are available
โœ…Shows which packages depend on a specific library
โœ…Filters the tree to show only the dependencies of the selected package

Installation uv: pip install uv

๐Ÿ‘‰ @DataScience4
Please open Telegram to view this post
VIEW IN TELEGRAM
โค3
This media is not supported in your browser
VIEW IN TELEGRAM
๐Ÿ’ป GHOSTCREW โ€” A Python AI tool for penetration testers and security professionals that conducts vulnerability searches in any services.

It works like a red team within your system. You describe the task in plain language โ€” then it plans the attack itself, selects tools, and proceeds through the entire process: from reconnaissance to reporting. Without manual fiddling and endless commands.

What it can do in practice:

โžก๏ธ Checks everything: code, business logic, network traffic, protocols.
โžก๏ธ Analyzes the found vulnerabilities and explains where the problem is and how to fix it.
โžก๏ธ Works autonomously โ€” you just launch it and get a full-fledged research.
โžก๏ธ Connects MCP servers and tools (nmap, metasploit, ffuf, etc.) itself.
โžก๏ธ Uses Pentesting Task Trees for meaningful decision-making, not just brute force.
โžก๏ธ Supports ready-made workflows for comprehensive checks.
โžก๏ธ Generates detailed reports in Markdown with facts and recommendations.
โžก๏ธ Remembers the dialogue context and doesn't "get lost" after a couple of requests.
โžก๏ธ Sees real files: wordlists, payloads, configs โ€” and uses them in its work.
โžก๏ธ Allows you to choose an AI model and customize its behavior.
โžก๏ธ No registration and no restrictions.

โš™๏ธ Installation:
git clone https://github.com/GH05TCREW/ghostcrew.git
cd ghostcrew
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt


โ–ถ๏ธ Usage:
python main.py


โš ๏ธ The information is provided solely for informational purposes. And it encourages to pay attention to security issues.

โ™Ž๏ธ GitHub/Instructions

#python #soft #github
Please open Telegram to view this post
VIEW IN TELEGRAM
โค5
โœจ global variable | Python Glossary โœจ

๐Ÿ“– A variable defined at the top level of a module.

๐Ÿท๏ธ #Python
๐Ÿ˜ฐ A repository of more than 100+ ready-made Python scripts that solve a bunch of tasks - without reinventing the wheel and suffering at night.

๐Ÿ’ฌ parsing and searching on the internet;
๐Ÿ’ฌ working with photos and videos;
๐Ÿ’ฌ keyloggers and password managers;
๐Ÿ’ฌ cloning websites;
๐Ÿ’ฌ automating routines;
๐Ÿ’ฌ and dozens of other useful things for real cases.

๐Ÿ”ฅ Ready-made practice + code, suitable for both learning and work.

โฌ‡๏ธ Save it, it will definitely come in handy!

#python #soft #github
Please open Telegram to view this post
VIEW IN TELEGRAM
โค6๐Ÿ‘1
Forwarded from Tech Jobs Hub
๐Ÿ”ฅ Generating fake data in Python โ€” no pain at all

If you're testing forms, mockups, or just want to play with data, there's Mimesis โ€” a generator of fake data. Names, emails, addresses, and phone numbers. There's a location setting that allows you to select a country, and the data will be generated accordingly.

๐Ÿ“ฆ Installation:
from typing import Dict
from mimesis.enums import Gender
from mimesis import Person

def generate_fake_user(locale: str = "es", gender: Gender = Gender.MALE) -> Dict[str, str]:
    """
    Generates fake user data based on the locale and gender.

    :param locale: The locale (for example, 'ru', 'en', 'es')
    :param gender: The gender (Gender.MALE or Gender.FEMALE)
    :return: A dictionary with the fake user data
    """
    person = Person(locale)

    user_data = {
        "name": person.full_name(gender=gender),
        "height": person.height(),
        "phone": person.telephone(),
        "occupation": person.occupation(),
    }

    return user_data

if __name__ == "__main__":
    fake_user = generate_fake_user(locale="es", gender=Gender.MALE)
    print(fake_user)


๐Ÿ“Œ Result:
{
  'name': 'Carlos Herrera',
  'height': '1.84',
  'phone': '912 475 289',
  'occupation': 'Arquitecto'
)


โšก๏ธ Mimesis can:
๐Ÿ–ฑ Generate names, addresses, phone numbers, professions, etc. 
๐Ÿ–ฑ Work with different countries (๐Ÿ‡ท๐Ÿ‡บ ru, ๐Ÿ‡บ๐Ÿ‡ธ en, ๐Ÿ‡ช๐Ÿ‡ธ es, etc.) 
๐Ÿ–ฑ Suitable for tests, fake accounts, demo data in projects, and bots.

โš™๏ธ GitHub/Instructions

Save it, it'll come in handy ๐Ÿ‘

#python #github #interview
Please open Telegram to view this post
VIEW IN TELEGRAM
โค6
โœจ How to Integrate Local LLMs With Ollama and Python โœจ

๐Ÿ“– Learn how to integrate your Python projects with local models (LLMs) using Ollama for enhanced privacy and cost efficiency.

๐Ÿท๏ธ #intermediate #ai #tools
โค1
โœจ introspection | Python Glossary โœจ

๐Ÿ“– The ability of a program to examine the type or properties of an object at runtime.

๐Ÿท๏ธ #Python
โœจ local variable | Python Glossary โœจ

๐Ÿ“– A variable that you bind inside a function or method body.

๐Ÿท๏ธ #Python
โœจ Quiz: How to Integrate ChatGPT's API With Python Projects โœจ

๐Ÿ“– Test your knowledge of the ChatGPT API in Python. Practice sending prompts with openai and handling text and code responses in this quick quiz.

๐Ÿท๏ธ #intermediate #ai #api
โค1
How to correctly terminate Python scripts

In production, it's important to clearly signal the result of the program's work. For this, sys.exit(<code>) is used:
โ€ข 0 โ€” success
โ€ข a non-zero value โ€” error

This approach helps CI/CD, Docker or cron to correctly respond to failures. It's mandatory for CLI utilities and automation, so that the execution is predictable

https://t.iss.one/DataScience4
โค6
โœจ Anaconda Navigator | Python Tools โœจ

๐Ÿ“– A desktop graphical interface included with the Anaconda Distribution.

๐Ÿท๏ธ #Python
โค2
โœจ unpacking | Python Glossary โœจ

๐Ÿ“– Passing multiple values at once by expanding an iterable.

๐Ÿท๏ธ #Python
โœจ Quiz: How to Integrate Local LLMs With Ollama and Python โœจ

๐Ÿ“– Check your understanding of using Ollama with Python to run local LLMs, generate text, chat, and call tools for private, offline apps.

๐Ÿท๏ธ #intermediate #ai #tools
โค1
๐Ÿ™๐Ÿ’ธ 500$ FOR THE FIRST 500 WHO JOIN THE CHANNEL! ๐Ÿ™๐Ÿ’ธ

Join our channel today for free! Tomorrow it will cost 500$!

https://t.iss.one/+0-w7MQwkOs02MmJi

You can join at this link! ๐Ÿ‘†๐Ÿ‘‡

https://t.iss.one/+0-w7MQwkOs02MmJi
โค4
Working with f-strings: more possibilities than it seems!

f-strings often replace .format() in everyday code, but their capabilities are not always fully utilized. They support formatting, function calls, working with data structures, and convenient debugging (from 3.8+).

f-strings are convenient for aligning columns without additional tools. This makes the output readable in the CLI and logs:
rows = [
    ("id", "name", "role"),
    (1, "Ivan", "admin"),
    (2, "Olga", "editor"),
]

for r in rows:
    print(f"{r[0]:<5} {r[1]:<10} {r[2]:<10}")


Debug expressions (Python 3.8+): {x=> displays the name and value of the variable, which speeds up debugging. Supports formatting of calculations:
x = 12
y = 7
print(f"{x=} {y=} {x*y=} x/y={x/y:.3f}")


Specifiers !r, !a: !r - repr(), !a - ascii() for unambiguous logs. Eliminates ambiguities in the output of objects:
path = "/var/data/config.yaml"
print(f"{path!r} {path!a}")  # repr and ascii()


Specifiers support width and padding, for example 08d for zeros. This is convenient for reports and IDs:
n = 42
print(f"{n:08d}")  # โ†’ #00000042


You can access dictionaries and immediately calculate metrics, for example len():
data = {"user": "Ivan", "items": [1, 2, 3]}
print(f"{data['user&#39]}=ยป, items={data['items&#39]}")
print(f"len(data['items&#39])={len(data['items&#39])}")


๐Ÿ”ฅ f-strings are a cool tool for formatting, logging, and debugging, if you apply them taking into account the version of Python and the context of the output.

๐Ÿšช @DataScience4
Please open Telegram to view this post
VIEW IN TELEGRAM
โค4
Forwarded from Tech Jobs Hub
Python Clean Code: Stop Writing Bad Code โ€” Lessons from Uncle Bob

Are you tired of writing messy and unorganized code that leads to frustration and bugs? You can transform your code from a confusing mess into something crystal clear with a few simple changes. In this article, we'll explore key principles from the book "Clean Code" by Robert C. Martin, also known as Uncle Bob, and apply them to Python. Whether you're a web developer, software engineer, data analyst, or data scientist, these principles will help you write clean, readable, and maintainable Python code.

Read: https://habr.com/en/articles/841820/

https://t.iss.one/CodeProgrammer ๐Ÿง 
Please open Telegram to view this post
VIEW IN TELEGRAM
โค1
โœจ relative import | Python Glossary โœจ

๐Ÿ“– Import modules from the same package or parent packages using leading dots.

๐Ÿท๏ธ #Python