pyqt learning - use the mouse to click to get the position of the point and draw

1) Problem motivation and usage scenarios In a recent project, the required function is to use the mouse to add nodes (the position where the mouse clicks is the node coordinates), and the point coordinates can be displayed visually and dynamically after being added. 2) Problem solving process In ordinary python drawing, my commonly used too ...

Posted by paulmo on Mon, 06 Dec 2021 11:56:29 -0800

dtreeviz: a great decision tree visualization and model interpretability tool

Decision tree is the basic building block of gradient elevator and random forest. Visual decision tree is very helpful in learning the working principle and interpretability of these models. However, the current visualization package is still very rudimentary and does not help novices much. When I visited Github recently, I found a great dtree ...

Posted by stallingjohn on Mon, 06 Dec 2021 11:47:30 -0800

Algorithm notes - Basic Algorithms

Quick sort Algorithm idea: select a number in the array x x x. Make all > = x >=x >=The number of X is on the right, ...

Posted by yellowzm on Mon, 06 Dec 2021 11:37:59 -0800

Educational Codeforces Round 117 (Rated for Div. 2)

Educational Codeforces Round 117 (Rated for Div. 2) A. Distance https://codeforces.com/contest/1612/problem/A The conditions given in the title are The distance is Manhattan distance, which is equivalent to step size. From the half condition of the topic, we can get that the step size and are ab step size, and each step size is half of AB step ...

Posted by josh_mcqueen on Mon, 06 Dec 2021 11:32:45 -0800

[pytorch] free some networks

preface The best, most efficient and most concise is "scheme 1".Scheme IStep 1: fixed basic networkCode template:# Gets the state of the part to be fixed_ dict: pre_state_dict = torch.load(model_path, map_location=torch.device('cpu') # Imported (remember strict=False): model.load_state_dict(pre_state_dict, strict=False) print('Load m ...

Posted by arcarocket on Mon, 06 Dec 2021 11:28:46 -0800

GFPGAN source code analysis - Part 6

2021SC@SDUSC Source code: archs\gfpganv1_clean_arch.py This paper mainly analyzes gfpganv1_ clean_ Under arch.py class GFPGANv1Clean(nn.Module) class_ init_ () method catalogue class GFPGANv1Clean(nn.Module) init() (1) Settings for channels (2) Call torch.nn.Conv2d() to create a convolutional neural network (3) Downsample (4) u ...

Posted by jabapyth on Mon, 06 Dec 2021 11:21:47 -0800

SpringBoot uses the RSocket protocol

1, Problems of HTTP in micro service scenario For the SpringCloud microservice architecture, each SpringBoot project is a service. Each service exposes the REST interface and calls each other through the HTTP protocol. Traditional HTTP adopts heavy text transmission, and the transmission message is divided into three parts: starting line, head ...

Posted by jgmiddel on Mon, 06 Dec 2021 10:54:01 -0800

Use vitepress + github Pages to build your own blog website

Vuepress should have been used by many people, and   VitePress   yes   VuePress   The next generation framework is to support vue 3.0   web site framework.In its documentation, it is called   Vuepress's brothers have some advantages over others:be based on   Vite   instead of   Webpack   So fast ...

Posted by jasoncable on Mon, 06 Dec 2021 10:48:47 -0800

Detailed explanation of delay function in Linux kernel

There are two main ways to implement the delay involved in the kernel: busy waiting or sleep waiting. The former blocks the program and occupies the CPU until the delay time arrives, while the latter suspends the process (sets the process to sleep and releases CPU resources). Therefore, the former is generally used for accurate delay with delay ...

Posted by rednaxel on Mon, 06 Dec 2021 10:47:42 -0800

JavaScript Advanced~Array Method reduce

reduce()   Method performs a reducer function (ascending execution) on each element in the array, summarizing its results as a single return value. A little abstract, meaning you can see that after each element has been executed, there will be a summary result from which you can return a value you want, which can be of any type. Grammar Fo ...

Posted by etnastyles on Mon, 06 Dec 2021 10:26:41 -0800