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 | |
| """Sync Headscale DNS records for lab.nijho.lt Traefik hostnames. | |
| All generated records point to the Traefik tailnet IP. This is DNS for | |
| reverse-proxy entry, not a map from service name to the service's host. | |
| """ | |
| from __future__ import annotations | |
| import argparse |
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
| blueprint: | |
| name: ZHA – IKEA STYRBAR all controls & 6-temp palette (modern syntax) | |
| description: > | |
| Smooth, responsive control for the IKEA STYRBAR (square) remote on ZHA. | |
| • UP/DOWN (short): ON / OFF | |
| • UP/DOWN (hold): fast and smooth brightness stepping that stops immediately on release | |
| (implemented with `mode: restart` for zero run-on) | |
| • LEFT/RIGHT (short): cycle through 6 preset color temperatures (wrap-around; uses an input_number helper to track index) | |
| • LEFT/RIGHT (hold): smooth color temperature stepping that stops immediately on release |
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 bash | |
| # slurm-vscode.sh - VS Code launcher for Slurm | |
| # - Reads ~/.config/slurm_vscode/config (or $XDG_CONFIG_HOME) | |
| # - Remembers JobID in ~/.cache/slurm_vscode/jobid (or $XDG_CACHE_HOME) | |
| # - Reuses a running job if possible; otherwise submits a tiny "sleep infinity" holder job | |
| # - Launches local VS Code against the remote node via "ssh-remote+<node>" | |
| set -euo pipefail | |
| APP_NAME="slurm_vscode" |
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 | |
| # filepath: fix_lib_paths.sh | |
| # https://github.com/conda-forge/numpy-feedstock/issues/347#issuecomment-2746317575 | |
| # Activate the conda environment and run this script. | |
| set -e | |
| LIB_PATH="$CONDA_PREFIX/lib" | |
| # Find all dylib files |
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
| # /// script | |
| # dependencies = [ | |
| # "yfinance", | |
| # ] | |
| # /// | |
| import yfinance as yf | |
| from datetime import datetime, date | |
| import argparse | |
| import pandas as pd |
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
| import asyncio | |
| import json | |
| import os | |
| from rattler import ( | |
| Environment, | |
| LockFile, | |
| Platform, | |
| VirtualPackage, | |
| solve_with_sparse_repodata, | |
| ) |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>PipeFunc Graph</title> | |
| <script src="https://unpkg.com/jquery@3.6.1/dist/jquery.min.js"></script> | |
| <script src="https://unpkg.com/jquery-mousewheel@3.1.13/jquery.mousewheel.js"></script> | |
| <script src="https://unpkg.com/jquery-color@2.2.0/dist/jquery.color.js"></script> | |
| <script src="https://unpkg.com/d3@7.6.1/dist/d3.min.js"></script> |
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
| digraph { | |
| graph [bb="0,0,783.73,403", | |
| rankdir=LR | |
| ]; | |
| node [label="\N", | |
| shape=rectangle | |
| ]; | |
| subgraph cluster_legend { | |
| graph [bb="8,312,775.73,395", | |
| color=black, |
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
| NB=FNAME.ipynb | |
| pip install nbqa autoflake pyupgrade black isort nbconvert jupyter_contrib_nbextensions | |
| nbqa isort $NB | |
| nbqa black $NB | |
| nbqa autoflake -i --remove-all-unused-imports $NB | |
| nbqa pyupgrade $NB --py38-plus | |
| jupyter nbconvert --clear-output --inplace $NB |
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
| //@version=4 | |
| study(title="CTO Line", shorttitle="CTO", overlay=true, resolution="") | |
| smma(src, length) => | |
| smma = 0.0 | |
| smma := na(smma[1]) ? sma(src, length) : (smma[1] * (length - 1) + src) / length | |
| smma | |
| v1 = smma(hl2, 15) | |
| m1 = smma(hl2, 19) | |
| m2 = smma(hl2, 25) | |
| v2 = smma(hl2, 29) |
NewerOlder