ترفندهای برنامه‌نویسی
164 subscribers
27 photos
3 videos
22 files
615 links
Download Telegram
تم دارک وی‌اس‌کد رو کمی تغییر دادم، و البته تم دومی هم بهش اضافه کردم.
از لینک زیر میتونید نصبشون کنید(برای نصب هردو تم کافیه همین لینک رو دنبال کنید)
https://marketplace.visualstudio.com/items?itemName=MahdiFirouzjaah.fzj-dark-theme&ssr=false#review-details

منتظر نظرات سازنده‌ی شما هستم🙏.

آی‌دی کانال👇:
programming_tricks
🔴 کانال برنامه نویسی پایتون و سیستم های نهفته با مینی کامپیوتر رزبری پای

هوش مصنوعی ,لینوکس , پایتون


لینک کانال :

@raspberry_python

لینک گروه:
@python_QA
persian_chars_regex.py
538 B
الگوی regex برای حروف فارسی
fastest_prime_genarator.py
803 B
یکی از سریع‌ترین توابع برای پیدا کردن همه‌ی اعداد اول کوچکتر از یک عدد مفروض
📣 کانال تریک‌های برنامه‌نویسی

کانالی پیرامون پایتون و جنگو و وی‌اس‌کد با موضوعاتی که کمتر در آموزش‌ها و گروه‌های دیگر مورد توجه قرار می‌گیرد

📌 لینک کانال:
https://t.me/programming_tricks


⁉️ در قسمت کامنت‌ها و یا گروه پرسش و پاسخ سعی میکنیم به سوالات پیرموان موضوعیت گروه پاسخ داده شود.

📌 لینک گروه گفتگو و پرسش و پاسخ:
https://t.me/py_dj_discus

📬 از نظرات و مطلب پیشنهادی استقبال می‌شود.
https://t.me/mh_firouzjaah
subtitle_encoder.py
437 B
دوستان عزیز
حتما دیدین گاهی وقتا فایل‌های زیرنویس شما دچار مشکل میشن و متن داخلشون به درستی نمایش داده نمیشه!
خب برای من بیشتر این حالت بخاطر اشتباهی توی encode کردن این فایل‌ها هست و در اکثر موارد هم اون انکد اشتباه windows-1256 یا arabic هست.
با اجرای این کد از شما دایرکتوری یا path اون فایلهای زیرنویس رو میگیره و اصلاحشون می‌کنه!


آی‌دی کانال👇:
programming_tricks
Note: In Python 2.x, filter() returns list objects. This behavior changed in Python 3.x. Now the function returns a filter object, which is an iterator that yields items on demand. Python iterators are well known to be memory efficient.
Note There is a subtlety when the sequence is being modified by the loop (this can only occur for mutable sequences, e.g. lists). An internal counter is used to keep track of which item is used next, and this is incremented on each iteration. When this counter has reached the length of the sequence the loop terminates. This means that if the suite deletes the current (or a previous) item from the sequence, the next item will be skipped (since it gets the index of the current item which has already been treated). Likewise, if the suite inserts an item in the sequence before the current item, the current item will be treated again the next time through the loop. This can lead to nasty bugs that can be avoided by making a temporary copy using a slice of the whole sequence, e.g.,
for x in a[:]:
if x < 0: a.remove(x)