This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime | |
MRECSET_TXT = 'MRECSET.TXT' | |
ENCODING = 'GB18030' | |
datetime_now = datetime.now().strftime("%H:%M %Y/%m/%d") | |
updated_lines = [] | |
with open(MRECSET_TXT, 'rb') as file: # encoding='GB18030' | |
for line in file: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package store | |
import ( | |
"context" | |
"math/rand" | |
"os" | |
"path/filepath" | |
"strconv" | |
"strings" | |
"testing" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/prometheus/prometheus/pull/10973 | |
apiVersion: apps/v1 | |
kind: StatefulSet | |
metadata: | |
labels: | |
app.kubernetes.io/component: prometheus | |
app.kubernetes.io/instance: prometheus | |
name: prometheus-wal-test | |
namespace: default | |
spec: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.PHONY: help build test deps clean | |
# Ref: https://gist.github.com/prwhite/8168133 | |
help: ## Display this help | |
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n\nTargets:\n"} \ | |
/^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-10s\033[0m %s\n", $$1, $$2 }' $(MAKEFILE_LIST) | |
GOOS ?= $(shell go env GOOS) | |
GOARCH ?= $(shell go env GOARCH) | |
NOW = $(shell date '+%Y-%m-%d') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/security/limits.conf | |
* soft nofile 51200 | |
* hard nofile 51200 | |
ulimit -n 51200 | |
# /etc/sysctl.conf see BDP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "starting" | |
for i in `seq 0 $1`; do | |
$2 & | |
done | |
for job in `jobs -p`; do | |
echo $job | |
wait $job |