Code With Python
39.2K subscribers
893 photos
28 videos
22 files
773 links
This channel delivers clear, practical content for developers, covering Python, Django, Data Structures, Algorithms, and DSA – perfect for learning, coding, and mastering key programming skills.
Admin: @HusseinSheikho || @Hussein_Sheikho
Download Telegram
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 PyData Careers
🔥 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
5
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
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
relative import | Python Glossary

📖 Import modules from the same package or parent packages using leading dots.

🏷️ #Python
transitive dependency | Python Glossary

📖 An indirect requirement of your project.

🏷️ #Python
wildcard import | Python Glossary

📖 An import uses the star syntax to pull many names into your current namespace at once.

🏷️ #Python
cProfile | Python Standard Library

📖 Provides a way to measure where time is being spent in your application.

🏷️ #Python
3