Python
Conda Installation and Use
· ☕ 2 min read
1. Installing conda 1 2 3 wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh bash Miniconda3-latest-Linux-x86_64.sh rm -rf Miniconda3-latest-Linux-x86_64.sh However, Miniconda cannot be used for free at large-scale commercial deployments, so you can use Miniforge as a drop-in alternative. 1 2 wget "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh" bash Miniforge3-$(uname)-$(uname -m).sh 2. Changing the default configuration 2.1 Initializing the Shell Without initialization, activating an environment reports CondaError: Run 'conda init' before 'conda activate'.

Usage of the transformers Library
· ☕ 3 min read
transformers is a Python library developed by Hugging Face for using and training pretrained Transformer models in natural language processing (NLP) tasks. It provides many powerful tools and features that make working with text data and building NLP models much easier. The library is widely used across a variety of

What Is Functional Programming
· ☕ 2 min read
1. What a Programming Paradigm Is A programming paradigm is a class of typical programming conventions. On one hand, it provides engineers with a way to model entities, linking the physical world to code; on the other hand, it provides engineers with a way of thinking about code and programs.

Django Performance: Database Query Optimization
· ☕ 4 min read
This article mainly offers optimization advice on Django fields and queries, and also introduces a performance analysis tool called Django-silk. I hope it helps you develop high-performance Django projects. 1. DBA’s Advice 1.1 Table Field Design Avoid null values; null values are hard to optimize queries around and take up extra index space Prefer INT over BIGINT, and describe fields as accurately as possible Use enums or integers instead of string types Use TIMESTAMP instead of DATETIME Do not put more than 20 fields in a single table Store IPs as integers 1.

Advanced Pytest: Mock
· ☕ 3 min read
1. Why We Need Mock When writing unit tests, the function under test is sometimes not a self-contained executable unit. It depends on external resources, such as the return value of another function or a value in a row of a database. To shield the test from interference from external