Forwarded from Udemy Coupons
Python Zero to Hero: Master Coding with Real Projects
Python for Beginners & Beyond: Learn to Code with Real-World Projects...
🏷 Category: it-and-software
🌍 Language: English (US)
👥 Students: 15,346 students
⭐️ Rating: 4.2/5.0 (138 reviews)
🏃♂️ Enrollments Left: 983
⏳ Expires In: 0D:4H:4M
💰 Price:$26.03 => FREE
🆔 Coupon: 42CE25692A9A939BF456
⚠️ Please note: A verification layer has been added to prevent bad actors and bots from claiming the courses, so it is important for genuine users to enroll manually to not lose this free opportunity.
💎 By: https://t.iss.one/DataScienceC
Python for Beginners & Beyond: Learn to Code with Real-World Projects...
🏷 Category: it-and-software
🌍 Language: English (US)
👥 Students: 15,346 students
⭐️ Rating: 4.2/5.0 (138 reviews)
🏃♂️ Enrollments Left: 983
⏳ Expires In: 0D:4H:4M
💰 Price:
🆔 Coupon: 42CE25692A9A939BF456
⚠️ Please note: A verification layer has been added to prevent bad actors and bots from claiming the courses, so it is important for genuine users to enroll manually to not lose this free opportunity.
💎 By: https://t.iss.one/DataScienceC
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
✨ Automate Python Data Analysis With YData Profiling ✨
📖 Automate exploratory data analysis by transforming DataFrames into interactive reports with one command from YData Profiling.
🏷️ #intermediate #data-science #data-viz
📖 Automate exploratory data analysis by transforming DataFrames into interactive reports with one command from YData Profiling.
🏷️ #intermediate #data-science #data-viz
✨ third-party libraries | Python Best Practices ✨
📖 Guidelines and best practices for choosing and using third-party libraries in your Python code.
🏷️ #Python
📖 Guidelines and best practices for choosing and using third-party libraries in your Python code.
🏷️ #Python
In Python 3.15, there will be a fully immutable dictionary.
A new public immutable type, frozendict, is added to the builtins module.
It is expected that
Why is this needed at all:
▪️ Do you want to use a map as a key in another
▪️
▪️ Defaults in function arguments: instead of a "mutable default", you can give
How it looks in the API:
▪️ The constructor "like a dict":
▪️ The order of insertion is preserved (as in a regular
▪️ The hash does not depend on the order of elements (logic via
▪️ There is a union via
▪️
An important point:
And a bonus for the stdlib: the authors have marked places where you can replace constant/public maps with
👉 @DataScience4
A new public immutable type, frozendict, is added to the builtins module.
It is expected that
frozendict will be "safe by design", because it prevents any unintended changes. This is useful not only for the CPython standard library, but also for third-party maintainers: you can rely on a reliable immutable dictionary type.Why is this needed at all:
dict or put it in a set? A regular dict is not allowed, but a frozendict is (if the values are also hashable). @functools.lru_cache() and arguments-dictionaries: it's difficult with a dict, but normal with a frozendict. frozendict(...) and not get surprises. How it looks in the API:
frozendict(), frozendict(**kwargs), frozendict(mapping) or iterable pairs, plus you can mix with **kwargs. dict). frozenset(items)), and the comparison is also based on the content, not on the order. | and an "update" |= (but |= does not mutate the object, but creates a new one). .copy() in CPython essentially returns the same object (shallow), and if you need deep copying, then copy.deepcopy(). An important point:
frozendict is NOT inherited from dict. This is done on purpose, so that you can't bypass the "immutability" by calling dict.__setitem__ and similar tricks. And a bonus for the stdlib: the authors have marked places where you can replace constant/public maps with
frozendict (including where MappingProxyType is now used). Please open Telegram to view this post
VIEW IN TELEGRAM
Python Enhancement Proposals (PEPs)
PEP 814 – Add frozendict built-in type | peps.python.org
A new public immutable type frozendict is added to the builtins module.
❤4
Beautiful Soup — a library for extracting data from HTML and XML files, which is perfect for web scraping.
1. Installation
pip install beautifulsoup4
2. Import
from bs4 import BeautifulSoup
import requests
3. Basic parsing
html_doc = "<html><body><p class='text'>Hello, world!</p></body></html>"
soup = BeautifulSoup(html_doc, 'html.parser') # or 'lxml', 'html5lib'
print(soup.p.text) # Hello, world!
4. Finding elements
# First found element
first_p = soup.find('p')
# Search by class or attribute
text_elem = soup.find('p', class_='text')
text_elem = soup.find('p', {'class': 'text'})
# All elements
all_p = soup.find_all('p')
all_text_class = soup.find_all(class_='text')
5. Working with attributes and text
a_tag = soup.find('a')
print(a_tag['href']) # value of the href attribute
print(a_tag.get_text()) # text inside the tag
print(a_tag.text) # alternative6. Navigating the tree
# Moving to parent, children, siblings
parent = soup.p.parent
children = soup.ul.children
next_sibling = soup.p.next_sibling
# Finding the previous/next element
prev_elem = soup.find_previous('p')
next_elem = soup.find_next('div')
7. Parsing a real page
response = requests.get('https://example.com')
soup = BeautifulSoup(response.text, 'html. parser')
title = soup.title.text
links = [a['href'] for a in soup.find_all('a', href=True)]8. CSS selectors
# More powerful and concise search
items = soup.select('div.content > p.text')
first_item = soup.select_one('a.button')
tags: #cheat_sheet #useful
Please open Telegram to view this post
VIEW IN TELEGRAM
Telegram
Code With Python
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
Admin: @HusseinSheikho || @Hussein_Sheikho
❤3👍1
✨ command-line interface (CLI) | Python Glossary ✨
📖 A text-based method of interacting with a program by typing commands into a terminal or console.
🏷️ #Python
📖 A text-based method of interacting with a program by typing commands into a terminal or console.
🏷️ #Python
✨ Quiz: Build a Hash Table in Python With TDD ✨
📖 Learn how Python hashing spreads values into buckets and powers hash tables. Practice collisions, uniform distribution, and test-driven development.
🏷️ #intermediate #algorithms #data-structures
📖 Learn how Python hashing spreads values into buckets and powers hash tables. Practice collisions, uniform distribution, and test-driven development.
🏷️ #intermediate #algorithms #data-structures
A bit of Python basics. Day 2: merging dictionaries
If you have two dictionaries that need to be merged, this can be done in two simple ways. You can use the merge operator (
1️⃣ Using the merge operator (
Output:
2️⃣ Method 2: using the merge operator (
With this operator, you need to put the dictionaries inside curly braces. In the code below, we "substitute" two dictionaries for merging using two operators
Output:
👉 https://t.iss.one/DataScience4
If you have two dictionaries that need to be merged, this can be done in two simple ways. You can use the merge operator (
|) or the operator (**). Below we have two dictionaries: first_dict and second_dict. We will use these two methods to merge the dictionaries. Here's the code:|)first_dict = {"kelly": 23,
"Derick": 14, "John": 7}
second_dict = {"Ravi": 45, "Mpho": 67}
combined_dict = first_dict | second_dict
print(combined_dict)Output:
{'kelly': 23, 'Derick': 14, 'John': 7, 'Ravi': 45, 'Mpho': 67}**)With this operator, you need to put the dictionaries inside curly braces. In the code below, we "substitute" two dictionaries for merging using two operators
*. Both dictionaries are enclosed in curly braces and separated by a comma.first_dict = {"kelly": 23,
"Derick": 14, "John": 7}
second_dict = {"Ravi": 45, "Mpho": 67}
combined_dict = {**first_dict, **second_dict}
print(combined_dict)Output:
{'kelly': 23, 'Derick': 14, 'John': 7, 'Ravi': 45, 'Mpho': 67>Please open Telegram to view this post
VIEW IN TELEGRAM
Telegram
Code With Python
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
Admin: @HusseinSheikho || @Hussein_Sheikho
❤1
✨ Python for Loops: The Pythonic Way ✨
📖 Learn how to use Python for loops to iterate over lists, tuples, strings, and dictionaries with Pythonic looping techniques.
🏷️ #intermediate #best-practices #python
📖 Learn how to use Python for loops to iterate over lists, tuples, strings, and dictionaries with Pythonic looping techniques.
🏷️ #intermediate #best-practices #python
❤2
Python tip
Adding an element to the end of a list
If you need to efficiently add elements from both ends, use
https://t.iss.one/DataScience4
Adding an element to the end of a list
(list.append) works in O(1), but inserting in the middle of the list is O(n) because elements need to be shiftedIf you need to efficiently add elements from both ends, use
collections.deque — there operations on the edges have complexity O(1)https://t.iss.one/DataScience4
Forwarded from ADMINOTEKA
This media is not supported in your browser
VIEW IN TELEGRAM
Весна близко, а значит, самое время просыпаться от зимней спячки, радоваться солнцу и… запускать рекламу, которая реально работает 🔥
Мы решили разбудить твой канал по-настоящему и разыграть 3 сертификата на 10 000 охватов каждому победителю — сотни проверенных каналов из различных лиг репостнут любой указанный тобой пост
Как участвовать:
✅ подписаться на 🅰 ️Adminoteka
✅ забустить канал по ссылке https://t.iss.one/boost/adm1noteka
2 марта рандомно выберем трёх счастливчиков. Весна официально начинается🌸
Мы решили разбудить твой канал по-настоящему и разыграть 3 сертификата на 10 000 охватов каждому победителю — сотни проверенных каналов из различных лиг репостнут любой указанный тобой пост
Как участвовать:
2 марта рандомно выберем трёх счастливчиков. Весна официально начинается
Please open Telegram to view this post
VIEW IN TELEGRAM
A bit of basics. Day 3: Calendar in Python
There is a built-in module in Python called
Let's say we want to see the calendar for April 2022. We use the
There are many other things you can do with
👉 https://t.iss.one/DataScience4
There is a built-in module in Python called
calendar. We can import this module to display the calendar. There are many things you can do with the calendar.Let's say we want to see the calendar for April 2022. We use the
month class from the calendar module and pass the year and month as arguments. See below:import calendar
month = calendar.month(2022, 4)
print(month)
There are many other things you can do with
calendar. For example, you can use it to check whether a given year is a leap year or not. Let's check if 2022 is a leap year.import calendar
month = calendar.isleap(2022)
print(month)
FalsePlease open Telegram to view this post
VIEW IN TELEGRAM
Telegram
Code With Python
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
Admin: @HusseinSheikho || @Hussein_Sheikho
❤2
✨ How to Use the OpenRouter API to Access Multiple AI Models via Python ✨
📖 Access models from popular AI providers in Python through OpenRouter's unified API with smart routing, fallbacks, and cost controls.
🏷️ #intermediate #ai #api
📖 Access models from popular AI providers in Python through OpenRouter's unified API with smart routing, fallbacks, and cost controls.
🏷️ #intermediate #ai #api
❤1