Anaconda virtual environment configuration Python library and Spyder compiler

This article introduces the installation of third-party libraries for the virtual environment of Python in Anaconda and supporting Spyder and other Software‘s approach. In the article How to create an Anaconda virtual Python environment, we introduced the method of creating, using and deleting the Python virtual environment in the Anaconda environment; and after creating the […]

What should I do if the Spyder version upgrade fails in the Anaconda virtual environment?

This article describes various ways to update Spyder software versions in Anaconda for a virtual environment with an older version of Python method. First, let’s take a look at the requirements to be implemented in this article. According to the method mentioned in the article # Anaconda virtual environment to install Python library and Spyder […]

k8s storage volume (empyDir;hostPath;nfs)

k8s storage volume Table of contents One: emptyDir storage volume 1.1 Why use storage volumes 1.2 The role of emptyDir storage volume 1.3 Example Two: hostPath volume 2.1 Function 2.2 Example Three: nfs shared storage 3.1 Install and configure nfs service 3.2 master node operation One: emptyDir storage volume 1.1 Why use storage volumes The […]

Pydantic interface definition check (1)

When I was learning FastAPI before, FastAPI built an API high-performance web framework (1) I saw that there are many usage scenarios of pydantic, so let’s take a look at this module separately. The official documentation of pydantic: https://docs.pydantic.dev/latest/ Usage interface: https://docs.pydantic.dev/latest/usage/models/ pydantic enforces type hints at runtime and provides friendly errors when data is […]

Excerpts of Python making simulated keystrokes, pyautogui library and partial solutions to the problem that the library does not work in some windows (PyDirectInput library, winio driver-level simulation)

Article directory @[toc] 1. Use the pyautogui library 1. Install the pyautogui library 2. Import and use in py (1) Guide package (2) Basic mouse control (3) Basic keyboard control (4) Screen shot (5) Image location recognition 3. There are problems 2. Use the PyDirectInput library to solve the problem that some game windows do […]

230603 – Sphinx configure Pydata-Sphinx-Theme theme + adjust sidebar width

Before and after comparison width setting define layout /* Change the default width of primary sidebar */ .bd-sidebar-primary {<!– –> width: 15%; } /* Change the default width of secondary sidebar */ .bd-sidebar-secondary {<!– –> width: 15%; } /* Maximum the main content */ .bd-main .bd-content .bd-article-container {<!– –> max-width: 100%; /* default is 60em […]

Use of scrapy+scrapyd+scrapydweb (take a case demonstration)

Preliminary preparation–create a scrapy crawler (Take Shanghai Hotline-Hot News as an example: https://hot.online.sh.cn/node/node_65634.htm) 1. Install scrapy, scrapyd, scrapydweb pip install scrapy pip install scrapyd pip install scrapyd-client pip install scrapydweb 2. Create project scrapy startproject newsspider 3. Create a news crawler scrapy genspider news news.com 4. Project development and improvement 1) Configuration of settings file […]

Facial forgery recognition project PyDeepFakeDet reproduced

Reference blog: PyDeepFakeDet project reproduction experiment report In general, it is similar to the idea of referring to the blog, but there are still many detailed problems and bugs in the process, which are worth recording. Project Introduction The goal of this project is to detect facial forgery images by using neural network models. Various […]

Application of the general model based on Pydantic encapsulation in API request verification

Introduction Pydantic is a popular library for data validation and parsing, often used in FastAPI and other modern Python projects. When processing API requests, we often need to check the validity of request parameters, such as date range, pagination and sorting, etc. In this article, we’ll describe how to implement these features in Pydantic using […]

Solved scrapyd error builtins.NotImplementedError: spawnProcess not available since pywin32 is not installed.

Successfully solved the problem of starting the crawler with pywin32 already installed or reporting an error: builtins.NotImplementedError: spawnProcess not available since pywin32 is not installed. 1. Error phenomenon Use the scrapyd command to start the remote crawler: curl http://localhost:6800/scheduler.json -d project=myproject -d spider=myspider After execution, it shows that the execution is successful, but the crawler […]