timerring

Shell Scripting Fundamentals

July 25, 2022 · 23 min read
Tutorial
Shell | VPS

Shell is the language we use to communicate with the operating system through the command line.

Shell scripts can run directly on the command line, or a set of logic can be organized into a file for reuse. The command line can be thought of as a “shell script executing line by line.”

There are many common kinds of shell scripts in Linux, including:

  • Bourne Shell (/usr/bin/sh or /bin/sh)
  • Bourne Again Shell (/bin/bash)
  • C Shell (/usr/bin/csh)
  • K Shell (/usr/bin/ksh)
  • zsh
  • …

Linux systems generally use bash by default.

The file should begin with #! /bin/bash to specify bash as the script interpreter.

Read the full text -> A total of 4.68k words


Image Classification and Foundational Vision Models

March 7, 2022 · 3 min read
Tutorial
Python | Computer Vision

Process #

  1. Collect data

  2. Define the model

    Usually a function containing parameter variables: \(y=F_{\Theta}(X)\)

    Example: \(y=\sigma\left(\Theta^{T} X\right)\)

  3. Train Find the optimal parameters \(\Theta^{*}\) so that the model \(y=F_{\Theta^{*}}(X)\) achieves the highest accuracy on the training set

  4. Predict For a new image \(\hat{X}\) , use the trained model to predict its class, namely \(\hat{y}=F_{\Theta^{*}}(\hat{X})\)

Read the full text -> A total of 0.76k words


SSH Remote Access and File Transfer

February 12, 2022 · 4 min read
Tutorial
SSH | VPS

Log In to the Server #

ssh user@hostname
  • user: username
  • hostname: IP address or domain name

The first time you log in, you will see this prompt:

The authenticity of host '123.57.47.211 (123.57.47.211)' can't be established.
ECDSA key fingerprint is SHA256:iy237yysfCe013/l+
Are you sure you want to continue connecting (yes/no/[fingerprint])?

Enter yes and press Enter. This records the server’s information in ~/.ssh/known_hosts.

Then enter the password to log in to the remote server. The default login port is 22. To log in through a specific port:

ssh user@hostname -p 22
Read the full text -> A total of 0.86k words


Introduction to Web APIs

July 10, 2021 · 3 min read
Tutorial
JavaScript | Frontend

Strictly speaking, most of what we learned in the JavaScript section belongs to ECMAScript. ECMAScript, or ES, defines language standards such as the syntax rules for variables, data types, expressions, statements, and functions. Browsers implement most of the ECMAScript specification and extend it with practical features. These extensions are called Web APIs.

Read the full text -> A total of 0.69k words


JavaScript Data Types

July 9, 2021 · 3 min read
Tutorial
JavaScript | Frontend

JavaScript is a weakly typed, or dynamic, language. You do not need to declare a variable’s type in advance; its type is determined automatically while the program runs.

var age = 10; // Number
var areYouOk = 'yes'; // String

JavaScript has dynamic types, meaning the same variable can be used for different types (its type can change).

var x = 6; // x is a number
var x = "Bill"; // x is a string
Read the full text -> A total of 0.78k words