Exercise G
Summary for some exercise.
Summary for some exercise.
Data structure of string.
Captures some features of Microsoft HoloLens.
Git is a powerful version management system. This posts captures the common used commands.
Microsoft Azure Remote Rendering is a service that can render high-quality, interactive 3D content, and stream it to your devices in real time.
Regular Expression, short as Regex, is an expression method for string.
VS Code is an amazing code editor, which contains various extensions and support multi-languages.
Ctrl+Shift+P
to open the VSCode command center to input commandOpen settings(JSON)
to edit the VS Code settingsIn order to use VS Code for the C# programming, we need to install
Then open a folder with VS Code, and use the terminal to type dotnet new console
to establish a new console project.
Then the VS Code will automatically generate some files and new a Program.cs
script.
Go to Dubug-Start without Debuging
, VS Code will add the required assets to the project(or press ctrl+shift+p
and type .net: Generate Assets for Build and Debug
), and open a launch.json
file for user to configure some settings of the C# project. Make sure the version of netcore is right. Then cick the Start without Debuging
again, the program will run.
For Python, we need to install
Open a folder and add a python file. Then press ctrl+shift+p
to open the command and type Python: select interpreter
to choose the python interpreter. Then go to Debug-Start without Debuging
to run the code.
In order to use Latex, we need to install
For environment, you can use virtualenv
to create a virtual python environment to seperate this to the original environment.
1 | virtualenv XX |
Note. the virtual env folder will be located to your current folder of the bash locates. When you change the path of the env folder, it will cause problem for some direct running module. Like pip
, jupyter
For packages, you can use the following command to export installed packages in env1 and install those packages in env2
1 | (env1) $ pip freeze > requirement.txt |
Some common Python library.
Opencv has a lot of useful functions.
1 | while True: |
1 | gray_img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) |
1 | hist = cv2.calcHist([img], [0, 1], None, [180, 256], [0, 180, 0, 256]) |
1 | _, mask = cv2.threshold(img[:, :, 1], 0, 255, cv2.THRESH_BINARY | cv2.THRESH_OTSU) |
1 | _, contours, _ = cv2.findContours(mask, cv2.RETR_CCOMP, cv2.CHAIN_APPROX_SIMPLE) |
1 | hull = cv2.convexHull(contour, returnPoints=False) |