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
| @echo off | |
| set OPENSSL_VERSION=3.4.0 | |
| REM Dependencies | |
| REM * MSVC build tools (https://visualstudio.microsoft.com/vs/community/) | |
| REM > winget install Microsoft.VisualStudio.2022.BuildTools --override "--wait --passive --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.Windows10SDK.20348" | |
| REM * git (https://git-scm.com/downloads/win) | |
| REM > winget install Git.Git | |
| REM * perl (https://strawberryperl.com/) |
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 | |
| set -e | |
| pipx_dir="${HOME}/.local/bin" | |
| mkdir -p $pipx_dir | |
| echo "#!/bin/bash | |
| if [[ \"\$1\" == \"-U\" ]]; then | |
| echo \"Fetching latest pipx tag from GitHub\" |
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
| @echo off | |
| setlocal EnableDelayedExpansion | |
| set pipx_dir=!LOCALAPPDATA!\Programs\Python\Launcher | |
| echo. | |
| if not exist "!pipx_dir!\NUL" mkdir "!pipx_dir!" 2>nul | |
| (echo.@echo off | |
| echo.if "%%1" == "-U" ( | |
| echo. setlocal enabledelayedexpansion |
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 struct | |
| # pip install pymodbus[serial] | |
| from pymodbus.client import ModbusSerialClient | |
| from pymodbus.exceptions import ModbusIOException | |
| def read_holding_registers(): | |
| def unpack(r, i): | |
| a, b = r.registers[i-1:i+1] |
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
| """ | |
| Creates a movie of an image that starts off blurry and gradually comes into focus. | |
| """ | |
| from msl.loadlib import LoadLibrary | |
| jar = LoadLibrary('ij.jar') | |
| ij = jar.lib.ij | |
| def make_movie(url=None, start_sigma=30, nframes=100, fps=24): |
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
| """Dump a Sphinx objects.inv file to a human-readable file. | |
| Examples: | |
| Local file | |
| dump("/path/to/objects.inv") | |
| Python | |
| dump("https://docs.python.org/3") | |
| Numpy |