سلام دوستان
(قبلا هم پستی مشابه گذاشته بودم)
درصورتی که تعدادی فایل که اسمشون با عدد شروع میشه داشته باشین، مثلا وقتی یک آموزش ویدئویی دانلود میکنید؛ بعضی پلیرها پلیلیست اشتباهی تولید میکنن و مثلا بعد از پخش فایل یک، بجای پخش فایل شمارهی ۲ میره و فایل شماره ۱۰ رو پخش میکنن و علت این مشکل اینه که پلیرشما اون عدد رو نامبر فرض نمیکنه بلکه استرینگ میبینه و لیستش رو برحسب استرینگ مرتب میکنه که نتیجه برای ما دردسر ساز میشه. برای اصلاح این مشکل میتونیم با اضافه کردن چندتا صفر به اول فایل و درواقع justify کردن اسم فیلمها با چندتا صفر درصورت نیاز، ترتیب رو اصلاح کنیم.
(قبلا هم پستی مشابه گذاشته بودم)
درصورتی که تعدادی فایل که اسمشون با عدد شروع میشه داشته باشین، مثلا وقتی یک آموزش ویدئویی دانلود میکنید؛ بعضی پلیرها پلیلیست اشتباهی تولید میکنن و مثلا بعد از پخش فایل یک، بجای پخش فایل شمارهی ۲ میره و فایل شماره ۱۰ رو پخش میکنن و علت این مشکل اینه که پلیرشما اون عدد رو نامبر فرض نمیکنه بلکه استرینگ میبینه و لیستش رو برحسب استرینگ مرتب میکنه که نتیجه برای ما دردسر ساز میشه. برای اصلاح این مشکل میتونیم با اضافه کردن چندتا صفر به اول فایل و درواقع justify کردن اسم فیلمها با چندتا صفر درصورت نیاز، ترتیب رو اصلاح کنیم.
renamer.py
1.6 KB
فایل پیوست، یک اسکریپت پایتون هست که میاد و اسم فایلها رو به چهارتاصفر r-just میکنه و درنتیجه ترتیبشون توی پلیلیستها درست میشه.
پیشفرض دایرکتوری فعلی که ترمینال موقع اجرای اسکریپت در اون قرار داره و فرمتفایلها mp4 فرض شده. ولی میتونید توی کد عوض کنید.
(میتونید روی لینوکس و مک این فایل رو executable کنید و با فلگ -d و -f دایرکتوری و فرمت دلخواه بهش بدین.)
پیشفرض دایرکتوری فعلی که ترمینال موقع اجرای اسکریپت در اون قرار داره و فرمتفایلها mp4 فرض شده. ولی میتونید توی کد عوض کنید.
(میتونید روی لینوکس و مک این فایل رو executable کنید و با فلگ -d و -f دایرکتوری و فرمت دلخواه بهش بدین.)
How to build a web app with multiple subdomains using Nginx
https://blog.logrocket.com/how-to-build-web-app-with-multiple-subdomains-nginx/
https://blog.logrocket.com/how-to-build-web-app-with-multiple-subdomains-nginx/
LogRocket Blog
How to build a web app with multiple subdomains using Nginx - LogRocket Blog
Providing multiple, custom subdomains to clients can be a bit tricky to configure — learn how to do it with Nginx in this tutorial.
Top 5 Myths around Python Programming Language
https://www.analyticsinsight.net/top-5-myths-around-python-programming-language/
https://www.analyticsinsight.net/top-5-myths-around-python-programming-language/
Analytics Insight
Top 5 Myths around Python Programming Language
The developers’ community must know the top five myths around Python or the popular Python myths to debunk and work with Python programming language efficiently and effectively. Myths of Python are needed to be debunked.
Python: use Ray to run functions in parallel
https://lovethepenguin.com/python-use-ray-to-run-functions-in-parallel-871f7a6678c4
https://lovethepenguin.com/python-use-ray-to-run-functions-in-parallel-871f7a6678c4
Medium
Python: use Ray to run functions in parallel
There are many ways to run functions in parallel, but there might be many caveats to deal with. We can overcome all those caveats by using…
8 Tips For Object-Oriented Programming in Python
https://www.geeksforgeeks.org/8-tips-for-object-oriented-programming-in-python/
https://www.geeksforgeeks.org/8-tips-for-object-oriented-programming-in-python/
GeeksforGeeks
8 Tips For Object-Oriented Programming in Python - GeeksforGeeks
A Computer Science portal for geeks. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions.
Forwarded from Python Socket
Programming Notes for Professionals books
تعدادی کتابچه رایگان در زمینههای مختلف از جمله برنامه نویسی که بسیار ارزشمند است.
حتما ببینید:
https://goalkicker.com/
@pythonsocket
تعدادی کتابچه رایگان در زمینههای مختلف از جمله برنامه نویسی که بسیار ارزشمند است.
حتما ببینید:
https://goalkicker.com/
@pythonsocket
Goalkicker
Free Programming Books; HTML5, CSS3, JavaScript, PHP, Python...
Free Programming Books on Android development, C, C#, CSS, HTML5, iOS development, Java, JavaScript, PowerShell, PHP, Python, SQL Sever and more
Security And Django · Matt Layman
https://www.mattlayman.com/understand-django/secure-apps/
https://www.mattlayman.com/understand-django/secure-apps/
Matt Layman
Security And Django
You want to protect your users' privacy, right? The goal is noble and users demand it, but how do you do it? In this Understand Django article, we'll look at some areas that improve the security of your application.
Speeding Up Python with Concurrency, Parallelism, and asyncio
https://testdriven.io/blog/concurrency-parallelism-asyncio/
https://testdriven.io/blog/concurrency-parallelism-asyncio/
testdriven.io
Speeding Up Python with Concurrency, Parallelism, and asyncio
Details what concurrency and parallel programming are in Python and shows practical examples of using multithreading, concurrent.futures, and asyncio.
Learn Asynchronus Programming - JavaScript Tutorial
https://gamedevacademy.org/javascript-asynchronus-programming-tutorial/
https://gamedevacademy.org/javascript-asynchronus-programming-tutorial/
GameDev Academy
Learn Asynchronous Programming - JavaScript Tutorial - GameDev Academy
https://www.youtube.com/watch?v=viZWFwCCCeA
Python removes 'dead batteries' from standard library
https://www.infoworld.com/article/3653636/python-removes-dead-batteries-from-standard-library.html
https://www.infoworld.com/article/3653636/python-removes-dead-batteries-from-standard-library.html
InfoWorld
Python removes ‘dead batteries’ from standard library
A slew of obsolete modules are slated to be dropped from Python, a possible prelude to a process for keeping the standard library cleaner.
5 JetBrains plugins to boost your productivity!
https://betterprogramming.pub/5-jetbrains-plugins-to-boost-your-productivity-ecf5461ad642
https://betterprogramming.pub/5-jetbrains-plugins-to-boost-your-productivity-ecf5461ad642
Medium
5 JetBrains Plugins To Boost Your Productivity!
As you code, search, and collaborate
Django Formsets Tutorial - Build dynamic forms with Htmx
https://justdjango.com/blog/dynamic-forms-in-django-htmx
https://justdjango.com/blog/dynamic-forms-in-django-htmx
JustDjango
Learn how to build web applications using Django and Python
Build a Hash Table in Python With TDD – Real Python
https://realpython.com/python-hash-table/
https://realpython.com/python-hash-table/
Realpython
Build a Hash Table in Python With TDD – Real Python
In this step-by-step tutorial, you'll implement the classic hash table data structure using Python. Along the way, you'll learn how to cope with various challenges such as hash code collisions while practicing test-driven development (TDD).
Django Formsets Tutorial - Build dynamic forms with Htmx
https://justdjango.com/blog/dynamic-forms-in-django-htmx
https://justdjango.com/blog/dynamic-forms-in-django-htmx
JustDjango
Learn how to build web applications using Django and Python
Build an Android application with Kivy Python framework
https://blog.logrocket.com/build-android-application-kivy-python-framework/
https://blog.logrocket.com/build-android-application-kivy-python-framework/
LogRocket Blog
Build an Android application with Kivy Python framework - LogRocket Blog
With the Python Kivy framework, you can develop platform-independent applications that compile for iOS, Android, Windows, macOS, and Linux.