[computer graphics] clipping algorithm of straight line segment (source code + experimental report)
See the end of the text for the code
1. Purpose and content of the experiment
1.1 experimental purpose
Three line segment generation algorithms (DDA, improved Bresenham line drawing algorithm and improved midpoint line drawing algorithm) are realized through Python language, the core ideas of the three algorithms are deeply understood, ...
Posted by bryanptcs on Tue, 21 Sep 2021 17:13:53 -0700
2021-9-21 opencv learning
About Anaconda installation cv2
Before learning opencv, we must first install the library functions of OpenCV.
Let's demonstrate the mistake first
First, we enter the following command in the Anaconda Prompt window:
conda install opencv-python
Then an error will appear: PackagesNotFoundError: The following packages are not available ...
Posted by nestorvaldez on Tue, 21 Sep 2021 14:21:06 -0700
Ethereum smart contract and Oracle realize the transmission of confidential data
Suppose we have a scenario where we need to save a password in the smart contract. When the user calls the contract to deposit a certain amount of ether, the contract will inform the user of the password. This scenario is very simple, but it is not easy to implement, because the code of the smart contract is transparent to everyone, so it is ea ...
Posted by dipenmistry on Tue, 21 Sep 2021 13:23:24 -0700
Crawling web page data using Python
When you need information on some web pages in the past, it is very convenient to use Python to write crawlers to crawl.
1. Use urllib.request to get the web page
Urllib is a built-in HTTP Library in Python. Using urllib, you can efficiently collect data in very simple steps; With Beautiful and other HTML parsing libraries, large crawlers for ...
Posted by phorman on Mon, 20 Sep 2021 22:46:05 -0700
Use of python functions and modules
Use of python functions and modules
Function function
In python, using functions can reduce code repeatability and increase program modularity. The purpose of using functions is to reduce programming difficulty and code reuse.
Define function
In Python, you can use the def keyword to define functions. Like variables, each function also has ...
Posted by jbruns on Mon, 20 Sep 2021 22:13:24 -0700
Python basic syntax
catalogue
1, Variable
1.1 function of variables
1.2 variable definition of Python
2, Data type
3, Output
3.1 format output
3.2. Built in function format
3.3. f- format string
3.4. Truth!
3.5 escape character and terminator
4, Input
4.1 grammar
4.2 characteristics
5, Convert data type
6, Operator
7, Conditional statement
7.1 int ...
Posted by the_loser on Mon, 20 Sep 2021 21:29:02 -0700
Three dimensional reconstruction tool pcyly tutorial in python -- spatial partition and search operation of octree
This tutorial is open source: GitHub Welcome, star
preface
Octree is a tree based data structure used to manage sparse 3-D data. Each internal node has exactly eight child nodes. In this tutorial, we will learn how to use octree for spatial partition and neighbor search in point cloud data. In particular, we explained how to perform &qu ...
Posted by Neptunus Maris on Mon, 20 Sep 2021 16:28:54 -0700
Fundamentals of machine learning: the use of numpy
1, Numpy advantage
1. Introduction to ndarray
NumPy provides an N-dimensional array type ndarray, which describes a collection of "items" of the same type. Store with ndarray:
import numpy as np
# Create ndarray
score = np.array(
[[80, 89, 86, 67, 79],
[78, 97, 89, 67, 81],
[90, 94, 78, 67, 74],
[91, 91, 90, 67, 69],
[76, 87, 75, ...
Posted by qrt123 on Mon, 20 Sep 2021 11:24:57 -0700
Basic structure of JavaScript
Rotation chart
It is often located on the home page and used as a large picture for activity promotion. It can be played automatically by clicking the left and right switch button, or by clicking the small dot on the picture
Tab Toggle
It is used to click different labels or titles to display different contents
Form Validation ...
Posted by fangorn on Mon, 20 Sep 2021 09:37:22 -0700
Python - FastAPI + SubProcess Mobile Real Time Start Task
I. Introduction
In engineering practice, it is common to design Cron Protect scripts to monitor task execution when a task fails or fails for other reasons, but it will not work if the task execution times out and Cron Protect does not exit. Kill will be forced at this timeDrop the task and restart it, but every time you need to log in to the ...
Posted by seanstuart on Mon, 20 Sep 2021 09:01:54 -0700