دوستان سلام
اگر توی ویاسکد خواستین تستهای جنگو رو ران بگیرید ولی اونها رو پیدا نمیکنه یا ارورهایی مبنی برا اینکه اپها هنوز لود نشدن یا ...
من توی این فرک که از پلاگین تست پایتون برای ویاسکد هست مشکلش رو حل کردم و حالا میتونه تستهای جنگو رو با یونیت-تست پایتون ران کنه و خیلی شیک و مجلسی براتون نشون بده که موفق بودن یا شکست خوردن
امیدورام درصورتی که راضی بودین حداقل یک ستاره بدین بهش
@programming_tricks
https://github.com/mh-firouzjah/vscode-python-test-adapter
اصل داستان از اینجا شروع شده بود و چیزی که فعلا تونست حلش کنه هم همینجا پست کردم.
اگر توی ویاسکد خواستین تستهای جنگو رو ران بگیرید ولی اونها رو پیدا نمیکنه یا ارورهایی مبنی برا اینکه اپها هنوز لود نشدن یا ...
من توی این فرک که از پلاگین تست پایتون برای ویاسکد هست مشکلش رو حل کردم و حالا میتونه تستهای جنگو رو با یونیت-تست پایتون ران کنه و خیلی شیک و مجلسی براتون نشون بده که موفق بودن یا شکست خوردن
امیدورام درصورتی که راضی بودین حداقل یک ستاره بدین بهش
@programming_tricks
https://github.com/mh-firouzjah/vscode-python-test-adapter
اصل داستان از اینجا شروع شده بود و چیزی که فعلا تونست حلش کنه هم همینجا پست کردم.
GitHub
GitHub - mh-firouzjah/vscode-python-test-adapter: Python Test Adapter for the VS Code Test Explorer
Python Test Adapter for the VS Code Test Explorer - GitHub - mh-firouzjah/vscode-python-test-adapter: Python Test Adapter for the VS Code Test Explorer
9 Python String Manipulation Tricks That Make Your Coding Easier | by Yang Zhou | Feb, 2023
https://levelup.gitconnected.com/9-python-string-manipulation-tricks-that-make-your-coding-easier-67c17fd793b6
https://levelup.gitconnected.com/9-python-string-manipulation-tricks-that-make-your-coding-easier-67c17fd793b6
Medium
9 Python String Manipulation Tricks That Make Your Coding Easier
Handling strings in a Pythonic way
دوستان سلام!
@programming_tricks
اگر توی پروژه جنگویی لازمتون شد مثلا برای هر author تعدادی از پستهاش رو واکشی کنید
شاید یک روش ساده و سریع به ذهنتون بیاد که خب روی لیست(کوئریست) نویسندهها یک حلقه میزنیم و از هرکدوم هم تعداد مشخصی از پستهاش رو میگیریم و توی یک لیست جدید میریزم!
ولی همچین کاری نکنید!
این کار شما باعث میشه جنگو به ازای هر نویسنده یکبار دیتابیس رو کوئری بزنه و اون تعداد پست رو براش واکشی کنه
فکر میکنم اسم چنین مشکلی
n+1 queries problem
هست که خب مشخصه وقتی تعداد نویسندهها زیاد باشه چه بلایی سر پرفورمنس میاد.
اینجا یک روش دیگه رو نوشتم که خیلی بهینهتر هست و فقط یک کوئری میزنه برای همه نویسندهها و همون تعداد پست برای هرکدومشون رو هم جدا میکنه
حتی میتونید بازم با روشهایی مثل values_list همینم مختصرترش کنید و کیفیت بهتری بدست بیارید.(بسته به شرایط اگر لازم شد)
https://lnkd.in/eTus5H5n
@programming_tricks
اگر توی پروژه جنگویی لازمتون شد مثلا برای هر author تعدادی از پستهاش رو واکشی کنید
شاید یک روش ساده و سریع به ذهنتون بیاد که خب روی لیست(کوئریست) نویسندهها یک حلقه میزنیم و از هرکدوم هم تعداد مشخصی از پستهاش رو میگیریم و توی یک لیست جدید میریزم!
ولی همچین کاری نکنید!
این کار شما باعث میشه جنگو به ازای هر نویسنده یکبار دیتابیس رو کوئری بزنه و اون تعداد پست رو براش واکشی کنه
فکر میکنم اسم چنین مشکلی
n+1 queries problem
هست که خب مشخصه وقتی تعداد نویسندهها زیاد باشه چه بلایی سر پرفورمنس میاد.
اینجا یک روش دیگه رو نوشتم که خیلی بهینهتر هست و فقط یک کوئری میزنه برای همه نویسندهها و همون تعداد پست برای هرکدومشون رو هم جدا میکنه
حتی میتونید بازم با روشهایی مثل values_list همینم مختصرترش کنید و کیفیت بهتری بدست بیارید.(بسته به شرایط اگر لازم شد)
https://lnkd.in/eTus5H5n
Stack Overflow
How to get the latest 3 books from each author using django
Using the following django models:
class Author(models.Model):
name = models.CharField(max_length=100)
age = models.IntegerField()
class Book(models.Model):
name = models.CharField(max_...
class Author(models.Model):
name = models.CharField(max_length=100)
age = models.IntegerField()
class Book(models.Model):
name = models.CharField(max_...
How to create a reading list in Notion (with template)
https://zapier.com/blog/notion-reading-list/
https://zapier.com/blog/notion-reading-list/
Zapier
How to create a reading list in Notion (with template)
Love books and lists? This Notion template is for you—discover how to use Notion to organize your reading list.
How to describe professional experience in Python development if my code isn't shareable? [Can't share as per company policy]
https://workplace.stackexchange.com/questions/190212/how-to-describe-professional-experience-in-python-development-if-my-code-isnt-s
https://workplace.stackexchange.com/questions/190212/how-to-describe-professional-experience-in-python-development-if-my-code-isnt-s
The Workplace Stack Exchange
How to describe professional experience in Python development if my code isn't shareable? [Can't share as per company policy]
I'm seeking some career advice on getting into software engineering. My academic background is in EE and I'm currently in QA testing. I'm working with my employer's client, which is a major tech co...
Python for Business Analytics (Part 1) Cheat Sheet by ocivv - Download free from Cheatography
https://cheatography.com/ocivv/cheat-sheets/python-for-business-analytics-part-1/
https://cheatography.com/ocivv/cheat-sheets/python-for-business-analytics-part-1/
Cheatography
Python for Business Analytics (Part 1) Cheat Sheet
Understanding the Differences Between HTTP and HTTPS
https://dev.to/haszankauna/understanding-the-differences-between-http-and-https-3155
https://dev.to/haszankauna/understanding-the-differences-between-http-and-https-3155
DEV Community
Understanding the Differences Between HTTP and HTTPS
As the world becomes more connected, the need for secure communication between web servers and...
How to Become A Copy Editor (Even As A Beginner)
https://makealivingwriting.com/how-to-become-a-copy-editor/
https://makealivingwriting.com/how-to-become-a-copy-editor/
Make a Living Writing
How to Become A Copy Editor (Even As A Beginner)
If you've been considering becoming a copy editor, this article will go over what they do and how to get your foot in the door.
A Golang-based, scalable, high-performance, high availability distributed time series database
https://golang.ch/a-golang-based-scalable-high-performance-high-availability-distributed-time-series-database/
https://golang.ch/a-golang-based-scalable-high-performance-high-availability-distributed-time-series-database/
Golang Libraries, Apps, Golang Jobs and Go Tutorials
A Golang-based, scalable, high-performance, high availability distributed time series database
LinDB is an open-source Time Series Database that Admin UI Some admin ui snapshots. Overview Monitoring Dashboard Replication State Data Explore Explain Contributing Contributions are welcomed and greatly appreciated. See CONTRIBUTING for details on submitting…
Code Commit Guidelines using Conventional Commits | by Pragnesh Ghoda | Feb, 2023
https://proandroiddev.com/code-commit-guidelines-using-conventional-commits-379321ce3785
https://proandroiddev.com/code-commit-guidelines-using-conventional-commits-379321ce3785
Medium
Code Commit Guidelines using Conventional Commits
Let’s explore pre-commit a more structured way to commit history and how to make it easier for people to contribute to your projects
How to code in Python(using paradigms) - DEV Community
https://dev.to/this-is-learning/how-to-code-in-pythonusing-paradigms-4eo
https://dev.to/this-is-learning/how-to-code-in-pythonusing-paradigms-4eo
DEV Community
How to code in Python(using paradigms)
Introduction Programming Paradigms are the different approaches to solving computational...
Iterators and Iterables in Python: Run Efficient Iterations
https://realpython.com/python-iterators-iterables/
https://realpython.com/python-iterators-iterables/
Realpython
Iterators and Iterables in Python: Run Efficient Iterations – Real Python
In this tutorial, you'll learn what iterators and iterables are in Python. You'll learn how they differ and when to use them in your code. You'll also learn how to create your own iterators and iterables to make data processing more efficient.
GitHub Actions Importer is now generally available
https://github.blog/2023-03-01-github-actions-importer-is-now-generally-available/
https://github.blog/2023-03-01-github-actions-importer-is-now-generally-available/
The GitHub Blog
GitHub Actions Importer is now generally available
We’re excited to announce the general availability of GitHub Actions Importer. GitHub Actions Importer helps you plan, forecast, and automate migrations from Azure DevOps, CircleCI, GitLab, Jenkins, and Travis CI…