Open ~/.bash_profile
in your favorite editor and add the following content to the bottom.
# Git branch in prompt.
parse_git_branch() {
#!/bin/sh | |
log() { | |
format="$1"; shift | |
# shellcheck disable=SC2059 | |
>&2 printf "$format\n" "$@" | |
} | |
usage() { | |
>&2 cat <<EOF |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Filter, Map & Reduce</title> | |
</head> |
. | |
.. | |
........ | |
@ | |
* | |
*.* | |
*.*.* | |
🎠| |
0 |
pm disable-user --user 0 com.caf.fmradio | |
pm disable-user --user 0 com.coloros.activation | |
pm disable-user --user 0 com.coloros.activation.overlay.common | |
pm disable-user --user 0 com.coloros.alarmclock | |
pm disable-user --user 0 com.coloros.appmanager | |
pm disable-user --user 0 com.coloros.assistantscreen | |
pm disable-user --user 0 com.coloros.athena | |
pm disable-user --user 0 com.coloros.avastofferwall | |
pm disable-user --user 0 com.coloros.backuprestore | |
pm disable-user --user 0 com.coloros.backuprestore.remoteservice |
#!/usr/bin/env bash | |
# 2017-11-20T09:57:46.101+0000 1511171866101 65 Flat xDrip-DexcomG5 | |
LINE=$(curl "https://acron-nightscout.herokuapp.com/api/v1/entries" 2> /dev/null | head -n1 ) | |
TIME_THEN=$(echo $LINE | awk '{ print $2 }' | cut -c -10) | |
TIME_NOW=$(date +%s) | |
MMOL=$(echo $LINE | awk '{ print $3 }') | |
ARROW=$(echo $LINE | awk '{ print $4 }') | |
MINS_SINCE=$(echo "($TIME_NOW - ${TIME_THEN:-0}) / 60" | bc | xargs printf "%sm ago") | |
case $ARROW in | |
Flat) ARROW_SYM="\\u2192" |
const byteToHex = (byte) => { | |
const key = '0123456789abcdef' | |
let bytes = new Uint8Array(byte) | |
let newHex = '' | |
let currentChar = 0 | |
for (let i=0; i<bytes.length; i++) { // Go over each 8-bit byte | |
currentChar = (bytes[i] >> 4) // First 4-bits for first hex char | |
newHex += key[currentChar] // Add first hex char to string | |
currentChar = (bytes[i] & 15) // Erase first 4-bits, get last 4-bits for second hex char | |
newHex += key[currentChar] // Add second hex char to string |
import evdev | |
import curses | |
import string | |
import random | |
import math | |
import sys | |
import copy | |
import time | |
from selectors import DefaultSelector, EVENT_READ |
国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
Ubuntu 16.04+、Debian 8+、CentOS 7+
Considering the lack of multi-threaded download support in the official huggingface-cli
, and the inadequate error handling in hf_transfer
, this command-line tool smartly utilizes wget
or aria2
for LFS files and git clone
for the rest.
--exclude
or --include
to skip or specify files, save time for models with duplicate formats (e.g., *.bin
or *.safetensors
).--hf_username
and --hf_token
to authenticate.HF_ENDPOINT
environment variable.