🇺🇦 Python Programming Сhallenges
رفتن به کانال در Telegram
Размышления на тему решения различных задач по спортивному программированию на Python и не только.
نمایش بیشتر839
مشترکین
اطلاعاتی وجود ندارد24 ساعت
اطلاعاتی وجود ندارد7 روز
+1730 روز
در حال بارگیری داده...
کانالهای مشابه
ابر برچسبها
هیچ دادهای
مشکلی وجود دارد؟ لطفاً صفحه را تازه کنید یا با مدیر پشتیبانی ما تماس بگیرید.
اشارات ورودی و خروجی
---
---
---
---
---
---
جذب مشترکین
سپتامبر '24
سپتامبر '24
+27
در 0 کانالها
اوت '24
+45
در 0 کانالها
Get PRO
ژوئیه '24
+416
در 0 کانالها
Get PRO
ژوئن '240
در 0 کانالها
Get PRO
مه '240
در 0 کانالها
Get PRO
آوریل '240
در 0 کانالها
Get PRO
مارس '240
در 0 کانالها
Get PRO
فوریه '240
در 0 کانالها
Get PRO
ژانویه '240
در 0 کانالها
Get PRO
دسامبر '230
در 0 کانالها
Get PRO
نوامبر '230
در 0 کانالها
Get PRO
اکتبر '230
در 0 کانالها
Get PRO
سپتامبر '230
در 0 کانالها
Get PRO
اوت '230
در 0 کانالها
Get PRO
ژوئیه '230
در 0 کانالها
Get PRO
ژوئن '230
در 0 کانالها
Get PRO
مه '230
در 0 کانالها
Get PRO
آوریل '230
در 0 کانالها
Get PRO
مارس '230
در 0 کانالها
Get PRO
فوریه '230
در 0 کانالها
Get PRO
ژانویه '230
در 0 کانالها
Get PRO
دسامبر '220
در 0 کانالها
Get PRO
نوامبر '220
در 0 کانالها
Get PRO
اکتبر '220
در 0 کانالها
Get PRO
سپتامبر '22
+3
در 0 کانالها
Get PRO
اوت '220
در 0 کانالها
Get PRO
ژوئیه '220
در 0 کانالها
Get PRO
ژوئن '220
در 0 کانالها
Get PRO
مه '22
+3
در 0 کانالها
Get PRO
آوریل '22
+11
در 0 کانالها
Get PRO
مارس '220
در 0 کانالها
Get PRO
فوریه '220
در 0 کانالها
Get PRO
ژانویه '220
در 0 کانالها
Get PRO
دسامبر '210
در 0 کانالها
Get PRO
نوامبر '210
در 0 کانالها
Get PRO
اکتبر '210
در 0 کانالها
Get PRO
سپتامبر '210
در 0 کانالها
Get PRO
اوت '210
در 0 کانالها
Get PRO
ژوئیه '210
در 0 کانالها
Get PRO
ژوئن '21
+1
در 0 کانالها
Get PRO
مه '21
+4
در 0 کانالها
Get PRO
آوریل '21
+6
در 0 کانالها
Get PRO
مارس '21
+414
در 0 کانالها
| تاریخ | رشد مشترکین | اشارات | کانالها | |
| 25 سپتامبر | 0 | |||
| 24 سپتامبر | +1 | |||
| 23 سپتامبر | +1 | |||
| 22 سپتامبر | 0 | |||
| 21 سپتامبر | +1 | |||
| 20 سپتامبر | +23 | |||
| 19 سپتامبر | 0 | |||
| 18 سپتامبر | 0 | |||
| 17 سپتامبر | 0 | |||
| 16 سپتامبر | 0 | |||
| 15 سپتامبر | 0 | |||
| 14 سپتامبر | 0 | |||
| 13 سپتامبر | 0 | |||
| 12 سپتامبر | 0 | |||
| 11 سپتامبر | 0 | |||
| 10 سپتامبر | 0 | |||
| 09 سپتامبر | 0 | |||
| 08 سپتامبر | 0 | |||
| 07 سپتامبر | 0 | |||
| 06 سپتامبر | 0 | |||
| 05 سپتامبر | 0 | |||
| 04 سپتامبر | 0 | |||
| 03 سپتامبر | +1 | |||
| 02 سپتامبر | 0 | |||
| 01 سپتامبر | 0 |
پستهای کانال
Today, around 15:25 GMT +2, I’ll present my talk at
@pyconit
about debugging Python applications inside the docker and k8s cluster. You can watch it online using the stream link https://2024.pycon.it/en/streaming or attend (Room Lasagna).
#pycon #pyconit #k8s
| 2 | https://twitter.com/1st1/status/1493748843430567942?s=21 | 606 |
| 3 | Scalene: a high-performance CPU, GPU and memory profiler for Python
https://github.com/plasma-umass/scalene | 430 |
| 4 | Found very intersting approach to count the digits of an integers #python:
from math import floor, log10
def count_digits(n):
return 1 + floor(log10(n))
In [2]: count_digits(5)
Out[2]: 1
In [3]: count_digits(999)
Out[3]: 3
In [4]: count_digits(1000)
Out[4]: 4 | 586 |
| 5 | blue is a somewhat less uncompromising code formatter than black, the OG of Python formatters.
https://github.com/grantjenks/blue | 381 |
| 6 | Performance comparison: counting words in Python, Go, C++, C, AWK, Forth, and Rust
https://benhoyt.com/writings/count-words/ | 372 |
| 7 | It's just a trick
It's because unary minus is right-associative and binds tighter than binary minus which is left-associative
-12 // 5 => - 3
- (-12 // 5) => +3
The rest is just putting 0 at the start:
--0 == 0
and --0--12//5 is parsed as
-(-(0)) - (- (12 // 5))
from Twitter https://twitter.com/ericpromislow/status/1362475189125095425?s=21 | 514 |
| 8 | I can't recall where I saw this originally, but you can use the spaceship operator "--0--" to turn floor division into ceiling division:
>>> 12//5
2
>>> --0-- 12//5
3
There's also the ++0++ operator when you want to emphasize that you really *do* mean floor division:
>>> ++0++ 12//5
2
from https://bugs.python.org/issue43255#msg387248
But yes, -(-n // d) is the easy (if a little bit cryptic) way to get the ceiling of n / d. | 392 |
| 9 | Armin dislikes new PEP regarding structural pattern matching https://twitter.com/mitsuhiko/status/1359263135304187910
btw PEP has been approved!
https://www.python.org/dev/peps/pep-0636/ | 456 |
| 10 | Interesting thread how to solve interview problem https://twitter.com/al_grigor/status/1357028887209902088?s=21 | 473 |
| 11 | Releasing pip 20.3, featuring new dependency resolver
https://pyfound.blogspot.com/2020/11/pip-20-3-new-resolver.html | 751 |
| 12 | Airflow 2.0 ->
https://www.astronomer.io/blog/introducing-airflow-2-0/ | 863 |
| 13 | Hypermodern Python 👩🚀 🐍
Chapter 1: Setup
Chapter 2: Testing
Chapter 3: Linting
Chapter 4: Typing
Chapter 5: Documentation
Chapter 6: CI/CD
https://cjolowicz.github.io/posts/hypermodern-python-01-setup/ | 1 024 |
| 14 | Python 3.9 is around the corner
https://lwn.net/SubscriberLink/831783/8afbf1812decf4d9/ | 949 |
| 15 | Note #71 The seven rules of a great Git commit message
1. Separate subject from body with a blank line
2. Limit the subject line to 50 characters
3. Capitalize the subject line
4. Do not end the subject line with a period
5. Use the imperative mood in the subject line
6. Wrap the body at 72 characters
7. Use the body to explain what and why vs. how
https://chris.beams.io/posts/git-commit/ | 965 |
| 16 | Asynchronous IO Support for Core and ORM
SQLAlchemy 1.4 now supports Python asyncio-compatible database drivers using an all-new asyncio front-end interface to Connection for Core usage as well as Session for ORM use, using the AsyncConnection and AsyncSession objects.
https://docs.sqlalchemy.org/en/14/changelog/migration_14.html#asynchronous-io-support-for-core-and-orm | 906 |
| 17 | PEP 622 -- Structural Pattern Matching
Interesting proposal for python 3.10.
The proposed indentation structure is as following:
match some_expression:
case pattern_1:
...
case pattern_2:
...
and example from pep:
match number:
case 0:
print("Nothing")
case 1:
print("Just one")
case 2:
print("A couple")
case -1:
print("One less than nothing")
case 1-1j:
print("Good luck with that...")
https://www.python.org/dev/peps/pep-0622/ | 990 |
| 18 | Note #68: The Rules of Optimization Club
1. You do not optimize.
2. You do not optimize, without measuring first.
3. When the performance is not bound by the code, but by external factors, the optimization is over.
4. Only optimize code that already has full unit test coverage.
5. One factor at a time.
6. No unresolved bugs, no schedule pressure.
7. Testing will go on as long as it has to.
8. If this is your first night at Optimization Club, you have to write a test case.
from https://wiki.c2.com/?RulesOfOptimizationClub | 398 |
| 19 | https://youtu.be/8S8zwJBOD0w | 318 |
| 20 | Restructuring data, the Python way.
>>> import glom
>>> glom.assign({}, "a.b.c.d", 42, missing=dict)
{'a': {'b': {'c': {'d': 42}}}}
# Path-based access for nested structures
>>> target = {'a': {'b': {'c': 'd'}}}
>>> glom(target, 'a.b.c')
'd'
happy glomming! 😋
https://glom.readthedocs.io/en/latest/ | 791 |
