بچهها بچهها با نمره ۱۲.۲۹ مشروط نشدم😂🤝 فقط با ۲۹ آخرش و در کل هم ۳ تا امتحان
BROOO😂
BROOO😂
👍6👎1🔥1🍾1
Forwarded from Oh My Task! (Shahriar Shariati)
Gunicorn with Uvicorn inside
I'm up to reading the Gunicorn and Uvicorn source code and playing with the parameters to see the actual process/thread/coroutine management of those. I will write a detailed blog post about it soon but so far I wanna explain to you why it's recommended to use the Gunicorn web server with Uvicorn worker class.
The Gunicorn provides powerful worker management with lots of customizations. Gunicorn manages workers, and workers manage Python web applications. There are two types of workers which are sync and async. The term "async" here is a bit different than the async functions in Python. It's about the way worker serves the requests.
There are a couple of default worker classes in Gunicorn such as
Here is the moment that Uvicorn comes. Although the Uvicorn is a standalone web server that runs ASGI applications in Python, but it does not have the abilities of Gunicorn. The great thing that developers of Uvicorn have done is that they developed a Uvicorn worker class based on the basic Gunicorn worker class. So you can easily run the Gunicorn to manage Uvicorn workers, and use this worker to serve incoming requests with async web applications.
To do that you can simply run this command:
This command will spawn 4 Uvicorn workers and loads the ASGI application into them. So you have the performance of Gunicorn and Uvicorn together.
You might ask if we should avoid running our apps only with Uvicorn? The answer is not the same for different situations. Sometimes you wanna keep the running process of a web application flat and simple to put it as a single processing unit into Kubernetes pods or Docker containers for better management and debugging. So you should see your structure first.
@OhMyTask
I'm up to reading the Gunicorn and Uvicorn source code and playing with the parameters to see the actual process/thread/coroutine management of those. I will write a detailed blog post about it soon but so far I wanna explain to you why it's recommended to use the Gunicorn web server with Uvicorn worker class.
The Gunicorn provides powerful worker management with lots of customizations. Gunicorn manages workers, and workers manage Python web applications. There are two types of workers which are sync and async. The term "async" here is a bit different than the async functions in Python. It's about the way worker serves the requests.
There are a couple of default worker classes in Gunicorn such as
sync, eventlet, gevent, torando and gthread. There are differences between request and web application handling in these workers that I will explore in the upcoming blog post. However, none of them can run the async functions in Python. So you will lose the power of this handy process manager for just being in async code style.Here is the moment that Uvicorn comes. Although the Uvicorn is a standalone web server that runs ASGI applications in Python, but it does not have the abilities of Gunicorn. The great thing that developers of Uvicorn have done is that they developed a Uvicorn worker class based on the basic Gunicorn worker class. So you can easily run the Gunicorn to manage Uvicorn workers, and use this worker to serve incoming requests with async web applications.
To do that you can simply run this command:
gunicorn example:app -w 4 -k uvicorn.workers.UvicornWorker
This command will spawn 4 Uvicorn workers and loads the ASGI application into them. So you have the performance of Gunicorn and Uvicorn together.
You might ask if we should avoid running our apps only with Uvicorn? The answer is not the same for different situations. Sometimes you wanna keep the running process of a web application flat and simple to put it as a single processing unit into Kubernetes pods or Docker containers for better management and debugging. So you should see your structure first.
@OhMyTask
Talent is cheaper than table salt. What separates the talented individual from the successful one is a lot of hard work.
- Stephen King
👍3
محتواهایی که برای آموزش میبینی/میخوانی/میشنوی(میچشی؟🗿) فارسی با انگلیسی؟
Anonymous Poll
28%
فارسی
72%
انگلیسی
TorhamDev | تورهام 😳
محتواهایی که برای آموزش میبینی/میخوانی/میشنوی(میچشی؟🗿) فارسی با انگلیسی؟
شاید هم هر دو، ولی کدوم بیشتر؟
👍1
Forwarded from Oh My Task! (Shahriar Shariati)
An article that worth reading. It’s about comparing Python, Java and Go performance in multi-threaded computations.
The article shows the benchmarks of running Matrix multiplication, QuickSort and Conway’s game of life algorithms. These are the algorithms that take more than O(n) time complexity to run. Multithreading could do a lot for speedup the running process of them.
- Read Article
@OhMyTask
The article shows the benchmarks of running Matrix multiplication, QuickSort and Conway’s game of life algorithms. These are the algorithms that take more than O(n) time complexity to run. Multithreading could do a lot for speedup the running process of them.
- Read Article
@OhMyTask
TorhamDev | تورهام 😳
پسر با sql میشه یک برنامه کامل نوشت 😂
برای اونایی که نمیدونن.
خیلی ها SQL فقط زبانی میدونن که باهاش رو اطلاعات دیتابیس CRUD انجام بدند. اما SQL یک عالمه فیچر متفاوت داره که واقعا به نظرم تبدیلش میکنه به زبان کامل برای نوشتن یک برنامه 😂.
۱. فانکشن داره
۲. چیزی به اسم پریسیژر داره که شبیه فانکشن با کمی تفاوت
۳. متغیر
۵. اعمال ریاضی انجام میده
۶. به دیتابیس هم که وصل هست 😂
تازه فیچر خوبش اینه که اگه از سیمیکالن(;) آخر هر دستور خوشتنون نمیاد میتونید تغییرش بدید به هرچی که دوست دارید🤝
خیلی ها SQL فقط زبانی میدونن که باهاش رو اطلاعات دیتابیس CRUD انجام بدند. اما SQL یک عالمه فیچر متفاوت داره که واقعا به نظرم تبدیلش میکنه به زبان کامل برای نوشتن یک برنامه 😂.
۱. فانکشن داره
۲. چیزی به اسم پریسیژر داره که شبیه فانکشن با کمی تفاوت
۳. متغیر
۵. اعمال ریاضی انجام میده
۶. به دیتابیس هم که وصل هست 😂
تازه فیچر خوبش اینه که اگه از سیمیکالن(;) آخر هر دستور خوشتنون نمیاد میتونید تغییرش بدید به هرچی که دوست دارید🤝
🥴14
این وبسایت خیلی خوبه دسته بندیها متخلفی داره مثل سیستم دیزاین، ترمینال لینوکسی، aws و ...
https://techbyexample.com/
@TorhamDevCH
https://techbyexample.com/
@TorhamDevCH
👍5
خارج از محتوا tech، خلاصه مقاله برای اونایی که حال ندارن:
ما یک سری عادتهای خاص داریم که وقتی اونها انجام میدیم باعث میشه منظمتر بشیم و بقیه کارامون هم انجام بدیم، مثل صبح زود بیدارشدن یا ورزش کردت که بعدش تو اون روز کارهامون کامل انجام میدیم. کلیت مقاله میگه که این عادتها پیدا کنید و سعی کنید بهبود بدیدشون و بیشتر انجامشون بدید. برای من خودم صبح زود بیدار شدنه :)
https://jamesclear.com/keystone-habits
@TorhamDevCH
ما یک سری عادتهای خاص داریم که وقتی اونها انجام میدیم باعث میشه منظمتر بشیم و بقیه کارامون هم انجام بدیم، مثل صبح زود بیدارشدن یا ورزش کردت که بعدش تو اون روز کارهامون کامل انجام میدیم. کلیت مقاله میگه که این عادتها پیدا کنید و سعی کنید بهبود بدیدشون و بیشتر انجامشون بدید. برای من خودم صبح زود بیدار شدنه :)
https://jamesclear.com/keystone-habits
@TorhamDevCH
James Clear
Keystone Habits: The Simple Way to Improve All Aspects of Your Life
Use the right keystone habits and you'll find success much more quickly. Read this article to learn how keystone habits work and how you can use them.
❤5👍1
Forwarded from Nima Tech Talk 💻
لطفا، بیاین از خودمون شروع کنیم تا این بساط شهربازی جمع بشه
به موقعیت هایی که:
- رنج حقوقی ندارد
- شرح کار روشن و مشخص ندارد
- حقوق نا مشخص و نا معین دارد
- لیست مهارت ها با موقعیت مطابقت ندارد
رزومه نفرستید، کمک کنین تا متوجه بشن که نیرو متخصص، سرمایه است، نه برده
کسی که به نیرو متخصص نیاز داره، کارفرماست
به لیست من آیتم اضافه کن
https://www.linkedin.com/posts/nimahkh_%D9%85%D9%86-%D9%85%D9%88%D9%86%D8%AF%D9%85-%D8%A7%DA%AF%D9%87-%D9%86%DB%8C%D8%B1%D9%88%DB%8C-%DA%A9%D8%A7%D8%B1-%D8%A8%D8%A7-%D8%B3%D8%A7%D8%A8%D9%82%D9%87-%D9%85%DB%8C%D8%AE%D9%88%D8%A7%DB%8C%D9%86-%DA%86%D8%B1%D8%A7-activity-7160898793264005120-OYBq?utm_source=share&utm_medium=member_desktop
به موقعیت هایی که:
- رنج حقوقی ندارد
- شرح کار روشن و مشخص ندارد
- حقوق نا مشخص و نا معین دارد
- لیست مهارت ها با موقعیت مطابقت ندارد
رزومه نفرستید، کمک کنین تا متوجه بشن که نیرو متخصص، سرمایه است، نه برده
کسی که به نیرو متخصص نیاز داره، کارفرماست
به لیست من آیتم اضافه کن
https://www.linkedin.com/posts/nimahkh_%D9%85%D9%86-%D9%85%D9%88%D9%86%D8%AF%D9%85-%D8%A7%DA%AF%D9%87-%D9%86%DB%8C%D8%B1%D9%88%DB%8C-%DA%A9%D8%A7%D8%B1-%D8%A8%D8%A7-%D8%B3%D8%A7%D8%A8%D9%82%D9%87-%D9%85%DB%8C%D8%AE%D9%88%D8%A7%DB%8C%D9%86-%DA%86%D8%B1%D8%A7-activity-7160898793264005120-OYBq?utm_source=share&utm_medium=member_desktop
👍19💯1
Nima Tech Talk 💻
لطفا، بیاین از خودمون شروع کنیم تا این بساط شهربازی جمع بشه به موقعیت هایی که: - رنج حقوقی ندارد - شرح کار روشن و مشخص ندارد - حقوق نا مشخص و نا معین دارد - لیست مهارت ها با موقعیت مطابقت ندارد رزومه نفرستید، کمک کنین تا متوجه بشن که نیرو متخصص، سرمایه است،…
برنامه نویسا اتحادیه ندارن داشتن هم اتفاقی نمیوفتاد :). واقعا لازم داریم یک سایتی باشه یک سری قوانین رو بنویسن و هممون اون رو رعایت کنیم تا این شرکت ها مثلا باهوش ایرانی جمع بشن
👍16
بچه ها بخاطر اینکه چندتا از ممبرا اومدن شکایت کردن سر بات ها صغرا، کبرا و سلنا مخفی و ... که اسپم میکنن و ریپلای و بعد پاک میکنن. گروه کامنت ها باید جوین باشید حتما تا بتونید کامنت بزارید.
🫡7🤣2