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
import matplotlib.pyplot as plt | |
import numpy as np | |
class Solution: | |
def __init__( | |
self, | |
a: float, | |
b: list[float], | |
c: list[float], |
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
# See https://alist.nn.ci/guide/install/docker.html | |
# See the log output for the admin's info: `docker exec -it alist ./alist admin` | |
version: '3.3' | |
services: | |
alist: | |
restart: always | |
volumes: | |
- './config:/opt/alist/data' | |
- '/root/service/data:/data' | |
ports: |
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
services: | |
# See https://github.com/jesec/flood/discussions/120 | |
# Access Flood and register a user with `/config/.local/share/rtorrent/rtorrent.sock` rTorrent socket path | |
flood: | |
hostname: flood | |
image: jesec/flood:master | |
user: 0:0 | |
restart: unless-stopped | |
command: --port 3001 --allowedpath /data | |
environment: |
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/sh | |
username="YOUR_USERNAME" | |
password="YOUR_PASSWORD" | |
content=$(curl -s "http://172.16.200.11") | |
# if [ $(echo "${content}" | hexdump -e '"%_p"' | grep -m 1 -o "tologin") ]; then | |
# echo "tologin" | |
# curl -d "DDDDD=${username}&upass=${password}&0MKKey=123" -s "http://172.16.200.11" > /dev/null | |
if [ ! "${content}" ]; then |
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
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
; #Warn ; Enable warnings to assist with detecting common errors. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
; Reference https://medium.com/@chrisdhanaraj/mapping-your-macos-keybinds-to-windows-b6009c50065b | |
; Option Key Shortcuts | |
<!BS::Send {LCtrl Down}{BackSpace}{LCtrl Up} | |
<!Left::Send {LCtrl Down}{Left}{LCtrl Up} |
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
import datetime | |
import json | |
import os | |
import re | |
import subprocess | |
import sys | |
import textwrap | |
from typing import Self | |
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 | |
set -e | |
rm -rf slash | |
mkdir slash | |
pushd slash > /dev/null | |
mkdir -p private/var | |
pushd private/var > /dev/null |
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
for dir in */; do | |
if [ ! -d "${dir}.git" ]; then | |
continue | |
fi | |
pushd ${dir} > /dev/null | |
echo ${dir}$(git branch --show-current) | |
git pull | |
popd > /dev/null | |
done |
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
use rand::{rngs::ThreadRng, Rng}; | |
const U5C_W: [i32; 90] = [ | |
60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, | |
60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, | |
60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, | |
60, 660, 1260, 1860, 2460, 3060, 3660, 4260, 4860, 5460, 6060, 6660, 7260, 7860, 8460, 9060, | |
9660, 10260, | |
]; | |
const U4C_W: [i32; 10] = [510, 510, 510, 510, 510, 510, 510, 510, 5610, 10710]; |
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
import json | |
from typing import Any, List | |
from httpx import Client | |
class CardSquare: | |
""" | |
https://webstatic.mihoyo.com/ys/event/bbs-lineup-qskp/index.html#/pc/publish | |
""" |
OlderNewer