- list packages upgradable
sudo apt update
sudo apt list --upgradable
- upgrade a specific package
sudo apt-get install --only-upgrade
| import numpy as np | |
| l2l = 0 | |
| l2f = 1 | |
| f2l = 2 | |
| f2f = 3 | |
| bt601_y2r_coeff = np.array([ | |
| # l2l | |
| [[ 1, 0, 1.37070536], |
| import numpy as np | |
| # BT.601 coefficients | |
| K_r = 0.2990 | |
| K_b = 0.1140 | |
| # 0.5870 | |
| K_g = 1 - K_r - K_b | |
| # # BT.709 coefficients | |
| # K_r = 0.2126 |
| #!/usr/bin/python3 | |
| # -*- coding: UTF-8 -*- | |
| import subprocess | |
| import sys | |
| import os | |
| from os import listdir | |
| import os.path | |
| from os.path import isfile, join | |
| import time |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <stdlib.h> | |
| #include <stdint.h> | |
| #define AVCC_HEADER_OFFSET 4 | |
| #define AVCC_NALU_LEN_UINT_SIZE_MINUS_1_MASK 0x3 | |
| #define AVCC_HEADER_SPS_CNT_OFFSET 5 | |
| #define SPS_CNT_MASK 0x1f | |
| #define START_CODE_SIZE 4 |
| ## resize | |
| ```shell | |
| convert dragon_sm.gif -resize 64x64 resize_dragon.gif | |
| ``` | |
| ## resize with ignoring sapect Raio | |
| ```shell | |
| convert dragon_sm.gif -resize 64x64\! exact_dragon.gif | |
| ``` |
| #!/usr/bin/python3 | |
| # -*- coding: UTF-8 -*- | |
| import json | |
| import yaml | |
| import datetime | |
| import os.path | |
| import os | |
| with open('./notes.json', 'r') as json_file: |
| ## Reference | |
| [Google doc](https://developer.android.com/reference/android/view/KeyEvent) | |
| [stackoverflow](https://stackoverflow.com/questions/7789826/adb-shell-input-events) | |
| ## Keycode | |
| ``` | |
| 0 --> "KEYCODE_UNKNOWN" | |
| 1 --> "KEYCODE_MENU" | |
| 2 --> "KEYCODE_SOFT_RIGHT" |
sudo apt update
sudo apt list --upgradable
sudo apt-get install --only-upgrade
| { | |
| // Use IntelliSense to learn about possible attributes. | |
| // Hover to view descriptions of existing attributes. | |
| // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "type": "gdb", | |
| "request": "attach", | |
| "name": "Attach to arm64 linux", |
| #!/bin/bash | |
| INNER_KEYBOARD_ID=$(xinput list | grep "AT Translated Set 2 keyboard" | cut -f 2 | cut -d "=" -f 2) | |
| INNER_KEYBOARD_STATUS=$(xinput list | grep "AT Translated Set 2 keyboard" | cut -f 3 | sed 's/\[//' |awk '{print $1}') | |
| if [ $INNER_KEYBOARD_STATUS = "slave" ]; then | |
| echo "floating..." | |
| xinput float $INNER_KEYBOARD_ID | |
| elif [ $INNER_KEYBOARD_STATUS = "floating" ]; then | |
| echo "reattach..." | |
| xinput reattach $INNER_KEYBOARD_ID 3 |