Forwarded from Python | Тесты
🤔 Какой метод используется для создания списка кортежей из двух списков?
Anonymous Quiz
25%
map()
56%
zip()
15%
chain()
4%
product()
Forwarded from Python | Тесты
🤔 Какой метод используется для добавления всех элементов из одного множества в другое?
Anonymous Quiz
30%
union()
31%
extend()
26%
add()
13%
update()
Forwarded from Python | Тесты
Ставь 👍 если знал ответ, 🔥 если нет
Забирай 📚Базу Знаний
Please open Telegram to view this post
VIEW IN TELEGRAM
Forwarded from Python | Тесты
Ставь 👍 если знал ответ, 🔥 если нет
Забирай 📚Базу Знаний
Please open Telegram to view this post
VIEW IN TELEGRAM
Forwarded from Python | Тесты
Ставь 👍 если знал ответ, 🔥 если нет
Забирай 📚Базу Знаний
Please open Telegram to view this post
VIEW IN TELEGRAM
Forwarded from Python | Тесты
🤔 Какой метод используется для создания генератора в Python?
Anonymous Quiz
22%
generator()
57%
yield()
5%
create()
17%
generate()
Forwarded from Python | Тесты
Ставь 👍 если знал ответ, 🔥 если нет
Забирай 📚Базу Знаний
Please open Telegram to view this post
VIEW IN TELEGRAM
Forwarded from Python | Тесты
🤔 Какой метод используется для асинхронного ожидания завершения корутины в Python?
Anonymous Quiz
27%
async()
9%
wait()
60%
await()
3%
complete()
Forwarded from Python | Тесты
Ставь 👍 если знал ответ, 🔥 если нет
Забирай 📚Базу Знаний
Please open Telegram to view this post
VIEW IN TELEGRAM
Forwarded from Python | Тесты
🤔 Какой результат выполнения выражения list(zip(range(3), range(3, 0, -1)))?
Anonymous Quiz
64%
[(0, 3), (1, 2), (2, 1)]
15%
[(0, 2), (1, 1), (2, 0)]
16%
[(0, 3), (1, 2), (2, 1), (3, 0)]
5%
[(0, 3), (1, 2), (2, 1), (2, 0)]
Forwarded from Python | Тесты
Вот 10 обучающих каналов по самым востребованным направлениям в IT.
Выбирай своё направление:
📖 IT Архив: @archive_ready
Please open Telegram to view this post
VIEW IN TELEGRAM
Forwarded from Python | Тесты
🤔 Какой метод используется для создания нового списка, содержащего только уникальные элементы исходного списка, сохраняя их порядок?
Anonymous Quiz
53%
set()
30%
unique()
7%
fromkeys()
11%
OrderedDict.fromkeys()
Forwarded from Python | Тесты
Ставь 👍 если знал ответ, 🔥 если нет
Забирай 📚Базу Знаний
Please open Telegram to view this post
VIEW IN TELEGRAM
Forwarded from Python | Тесты
🤔 Какой результат выполнения выражения {i: i for i in range(3)}.setdefault(3, 10)?
Anonymous Quiz
24%
3
43%
10
14%
None
18%
KeyError
Forwarded from Python | Тесты
Ставь 👍 если знал ответ, 🔥 если нет
Забирай 📚Базу Знаний
Please open Telegram to view this post
VIEW IN TELEGRAM
Forwarded from Python | Тесты
Ставь 👍 если знал ответ, 🔥 если нет
Забирай 📚Базу Знаний
Please open Telegram to view this post
VIEW IN TELEGRAM
Forwarded from Простой Python | Программирование
Гайд по обработке ошибок
Делимся гайдом по обработке ошибок в Python. Ты узнаешь, когда следует перехватывать исключения, генерируемые вызываемыми тобой функциями; какие классы исключений нужно перехватывать и многое другое.
👉Читать статью
#статьи
Делимся гайдом по обработке ошибок в Python. Ты узнаешь, когда следует перехватывать исключения, генерируемые вызываемыми тобой функциями; какие классы исключений нужно перехватывать и многое другое.
👉Читать статью
#статьи
Forwarded from Python Daily
Ididi, dependency injection, in a single line of code
Ididi is a pythonic dependency injection lib, with ergonomic apis, without boilplate code, works out of the box.
# What My Project Does
it builds a dependency graph based on your type hints, and inject those dependencies into corresponding classes/functions.
In the base case, all you need to do is to make a call to
# Quick Start
Here’s a quick example of how idid works:
import ididi
class Config:
def init(self, env: str = "prod"):
self.env = env
class Database:
def init(self, config: Config):
self.config = config
class UserRepository:
def init(self, db: Database):
self.db = db
class UserService:
def init(self, repo: UserRepository):
/r/Python
https://redd.it/1gn5erp
Ididi is a pythonic dependency injection lib, with ergonomic apis, without boilplate code, works out of the box.
# What My Project Does
it builds a dependency graph based on your type hints, and inject those dependencies into corresponding classes/functions.
In the base case, all you need to do is to make a call to
instance = ididi.solve(class)
and you are done.# Quick Start
Here’s a quick example of how idid works:
import ididi
class Config:
def init(self, env: str = "prod"):
self.env = env
class Database:
def init(self, config: Config):
self.config = config
class UserRepository:
def init(self, db: Database):
self.db = db
class UserService:
def init(self, repo: UserRepository):
/r/Python
https://redd.it/1gn5erp
GitHub
GitHub - raceychan/ididi: advanced pythonic dependency injection lib, with ergonomic apis, without boilplate code, works out of…
advanced pythonic dependency injection lib, with ergonomic apis, without boilplate code, works out of the box. - raceychan/ididi
Forwarded from Python Daily
Monday Daily Thread: Project ideas!
# Weekly Thread: Project Ideas 💡
Welcome to our weekly Project Ideas thread! Whether you're a newbie looking for a first project or an expert seeking a new challenge, this is the place for you.
## How it Works:
1. **Suggest a Project**: Comment your project idea—be it beginner-friendly or advanced.
2. **Build & Share**: If you complete a project, reply to the original comment, share your experience, and attach your source code.
3. **Explore**: Looking for ideas? Check out Al Sweigart's ["The Big Book of Small Python Projects"](https://www.amazon.com/Big-Book-Small-Python-Programming/dp/1718501242) for inspiration.
## Guidelines:
* Clearly state the difficulty level.
* Provide a brief description and, if possible, outline the tech stack.
* Feel free to link to tutorials or resources that might help.
# Example Submissions:
## Project Idea: Chatbot
**Difficulty**: Intermediate
**Tech Stack**: Python, NLP, Flask/FastAPI/Litestar
**Description**: Create a chatbot that can answer FAQs for a website.
**Resources**: [Building a Chatbot with Python](https://www.youtube.com/watch?v=a37BL0stIuM)
# Project Idea: Weather Dashboard
**Difficulty**: Beginner
**Tech Stack**: HTML, CSS, JavaScript, API
**Description**: Build a dashboard that displays real-time weather information using a weather API.
**Resources**: [Weather API Tutorial](https://www.youtube.com/watch?v=9P5MY_2i7K8)
## Project Idea: File Organizer
**Difficulty**: Beginner
**Tech Stack**: Python, File I/O
**Description**: Create a script that organizes files in a directory into sub-folders based on file type.
**Resources**: [Automate the Boring Stuff: Organizing Files](https://automatetheboringstuff.com/2e/chapter9/)
Let's help each other grow. Happy
/r/Python
https://redd.it/1goetbj
# Weekly Thread: Project Ideas 💡
Welcome to our weekly Project Ideas thread! Whether you're a newbie looking for a first project or an expert seeking a new challenge, this is the place for you.
## How it Works:
1. **Suggest a Project**: Comment your project idea—be it beginner-friendly or advanced.
2. **Build & Share**: If you complete a project, reply to the original comment, share your experience, and attach your source code.
3. **Explore**: Looking for ideas? Check out Al Sweigart's ["The Big Book of Small Python Projects"](https://www.amazon.com/Big-Book-Small-Python-Programming/dp/1718501242) for inspiration.
## Guidelines:
* Clearly state the difficulty level.
* Provide a brief description and, if possible, outline the tech stack.
* Feel free to link to tutorials or resources that might help.
# Example Submissions:
## Project Idea: Chatbot
**Difficulty**: Intermediate
**Tech Stack**: Python, NLP, Flask/FastAPI/Litestar
**Description**: Create a chatbot that can answer FAQs for a website.
**Resources**: [Building a Chatbot with Python](https://www.youtube.com/watch?v=a37BL0stIuM)
# Project Idea: Weather Dashboard
**Difficulty**: Beginner
**Tech Stack**: HTML, CSS, JavaScript, API
**Description**: Build a dashboard that displays real-time weather information using a weather API.
**Resources**: [Weather API Tutorial](https://www.youtube.com/watch?v=9P5MY_2i7K8)
## Project Idea: File Organizer
**Difficulty**: Beginner
**Tech Stack**: Python, File I/O
**Description**: Create a script that organizes files in a directory into sub-folders based on file type.
**Resources**: [Automate the Boring Stuff: Organizing Files](https://automatetheboringstuff.com/2e/chapter9/)
Let's help each other grow. Happy
/r/Python
https://redd.it/1goetbj
YouTube
Build & Integrate your own custom chatbot to a website (Python & JavaScript)
In this fun project you learn how to build a custom chatbot in Python and then integrate this to a website using Flask and JavaScript.
Starter Files: https://github.com/patrickloeber/chatbot-deployment
Get my Free NumPy Handbook: https://www.python-engi…
Starter Files: https://github.com/patrickloeber/chatbot-deployment
Get my Free NumPy Handbook: https://www.python-engi…
Forwarded from Python Daily
pipe-operator: Elixir's pipe operator in Python
TLDR: pipe-operator is an open-source python package which brings similar features to elixir's
\---
Hey there! Thought it might be of interest to some of you! I come from Python but lately I've been working with Elixir (mostly at work) and came to really enjoy its pipe operator
# What My Project Does
It provides similar features to elixir
As for those 2 very different implementation, they are:
A pythonic class-based one, which is fully compatible with linters and type-checkers
And an elixir-like one, with a syntax resembling elixir's, which will drive you linters mad
# Target Audience
I don't think anyone would be using this in production/work projects, but it can be a fun tool for developers' side projects who enjoy functional programming.
# Quick demo
Python implementation:
/r/Python
https://redd.it/1go69ha
TLDR: pipe-operator is an open-source python package which brings similar features to elixir's
|> tap then
to Python, with 2 vastly different implementations. Because why not :D\---
Hey there! Thought it might be of interest to some of you! I come from Python but lately I've been working with Elixir (mostly at work) and came to really enjoy its pipe operator
|>
and its related features like tap
, then
, and shortcut syntaxes. So I thought to myself: "could be fun to bring this to python". So I did, and the **pipe-operator** project was born.# What My Project Does
It provides similar features to elixir
|>
, allowing you to chain operations without using intermediary variables. Through 2 very different implementations, you can pass the result of the previous expression as the first parameter of the next one.As for those 2 very different implementation, they are:
A pythonic class-based one, which is fully compatible with linters and type-checkers
And an elixir-like one, with a syntax resembling elixir's, which will drive you linters mad
# Target Audience
I don't think anyone would be using this in production/work projects, but it can be a fun tool for developers' side projects who enjoy functional programming.
# Quick demo
Python implementation:
/r/Python
https://redd.it/1go69ha
GitHub
GitHub - Jordan-Kowal/pipe-operator: Elixir's pipe operator in Python
Elixir's pipe operator in Python. Contribute to Jordan-Kowal/pipe-operator development by creating an account on GitHub.
Forwarded from Python Daily
JupyterLite Terminal
https://blog.jupyter.org/jupyterlite-terminal-edb3f80dc1c0
/r/IPython
https://redd.it/1gqm6oe
https://blog.jupyter.org/jupyterlite-terminal-edb3f80dc1c0
/r/IPython
https://redd.it/1gqm6oe
Medium
JupyterLite Terminal
JupyterLite is an unofficial Jupyter distribution that runs entirely in the web browser without any server components. Deployment and…