This file contains hidden or 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
| # Configuration | |
| url = "http://127.0.0.1:8000/v1/chat/completions" | |
| payload = { | |
| "messages": [{"role": "user", "content": "Write 1000 short words; no markdown."}], | |
| "max_tokens": max_model_len - prompt_tokens, # max_tokens = maximum context length - request size | |
| "temperature": 0, | |
| "top_p": 1, | |
| "stream": False | |
| } |
This file contains hidden or 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
| #!/usr/bin/env python3 | |
| # mlx_ethtool_exporter.py | |
| # | |
| # Exposes rx/tx Bps computed from ethtool -S counters (same method as mlnx_perf): | |
| # rate = (curr_bytes - prev_bytes) / elapsed_seconds | |
| # | |
| # Metrics: | |
| # mlx_rx_bytes_phy_bps{iface="<ifname>"} <float> | |
| # mlx_tx_bytes_phy_bps{iface="<ifname>"} <float> | |
| # |
This file contains hidden or 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 main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| ) | |
| func main() { | |
| b := []byte(`{"key":"value"}`) |
This file contains hidden or 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 | |
| # ------ Creating Root CA | |
| echo "Create Root Key for sign the CA requests. -> rootCA.key" | |
| openssl genrsa -passout pass:easy2decode -aes256 -out rootCA.key 4096 | |
| echo "Create and self sign the CA Root Certificate -> rootCA.crt" | |
| openssl req -passin pass:easy2decode -new -key rootCA.key -x509 -out rootCA.crt -days 3650 |
This file contains hidden or 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
| arrange panes | |
| Ctrl-B : | |
| select-layout even-vertical|even-horizontal|tiled | |
| sent output to all panes | |
| Ctrl-B : | |
| setw synchronize-panes on |
This file contains hidden or 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
| sudo touch sender-azure.pcap | |
| sudo tshark -f "host 10.0.1.5" -w sender-azure.pcap | |
| sudo tshark -Y "ip.addr == 10.0.1.6" | |
This file contains hidden or 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
| Verify identation in VI : set cursorcolumn ( https://vi.stackexchange.com/questions/666/how-to-add-indentation-guides-lines ) | |
| Fix paste in VI : set paste | |
| Display linenumber : set number | |
| Turn off colors : syntax off |
This file contains hidden or 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
| :setw synchronize-panes | |
| :setw synchronize-panes off | |
| https://sanctum.geek.nz/arabesque/sync-tmux-panes/ |
This file contains hidden or 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
| kubectl run ubuntu --image=ubuntu --replicas=10 -- bash -c "sleep infinity" | |
| kubectl run ticker --image busybox -- /bin/sh -c 'while true; do date ; sleep 1 ; done' | |
| kubectl run ticker --image busybox -- /bin/sh -c 'i=0; while true; do echo $i `date` ; i=$(($i+1)); sleep 1 ; done' |
This file contains hidden or 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
| for i in *.key; do echo $i; openssl rsa -in $i -check ; read -n1 ; done | |
| for i in *.crt; do echo $i; openssl x509 -in $i -text -noout ; read -n1 ; done |
NewerOlder