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
| """Create a .zip archive of a .NET solution directory with build artifacts omitted. | |
| If the solution directory is tracked in a Git repository that has a .gitignore to | |
| exclude .NET build artifacts, consider `git archive <branch> -o <filename>` instead. | |
| """ | |
| import argparse | |
| import fnmatch | |
| import hashlib |
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
| """Generate a .NET solution with one or more projects.""" | |
| import argparse | |
| import subprocess | |
| import sys | |
| from dataclasses import dataclass | |
| from pathlib import Path | |
| from typing import Self | |
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
| """Calculate the video bitrate for video compression software | |
| to achieve a given filesize and duration. | |
| Intended for use with HandBrake: https://handbrake.fr/ | |
| Result bitrate should be copied to your constant/average bitrate. | |
| Note that input filesize is in megabytes, not mebibytes. | |
| """ | |
| import re |
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/python3 | |
| """Produce filesize statistics from a list of workshop mods.""" | |
| # /// script | |
| # dependencies = [] | |
| # requires-python = ">=3.11" | |
| # /// | |
| from __future__ import annotations |
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/python3 | |
| """Manage workshop mods for an Arma 3 server. | |
| See ${prog} help for more information. | |
| """ | |
| # /// script | |
| # dependencies = [] | |
| # requires-python = ">=3.11" |
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/python3 | |
| """Backup a Minecraft world into an archive. | |
| CAUTION: This script has not been thoroughly tested and you may encounter bugs. | |
| By default, this script will perform the following tasks: | |
| 1. Download mcrcon from https://github.com/Tiiffi/mcrcon, if needed | |
| 2. Send an RCON command to disable automatic saving and save the world | |
| 3. Create an archive of the world/ directory named "world-%Y-%m-%d.zip" | |
| 4. Send an RCON command to re-enable automatic saving |
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
| TGC_fnc_getAbsClosureSpeed = { | |
| params ["_observer", "_target"]; | |
| private _dir = getPosATL _target vectorFromTo getPosATL _observer; | |
| private _velocity = velocity _target; | |
| private _angle = vectorNormalized _velocity vectorDotProduct _dir; | |
| vectorMagnitude (_velocity vectorMultiply _angle) | |
| }; | |
| TGC_fnc_isRadarGuided = { | |
| params ["_ammo"]; | |
| private _property = configFile >> "CfgAmmo" >> _ammo >> "weaponLockSystem"; |
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 datetime | |
| import discord | |
| from discord import app_commands | |
| from discord.ext import commands | |
| bot = commands.Bot(".", intents=discord.Intents.default()) | |
| @bot.command() | |
| @commands.is_owner() |
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 datetime | |
| import textwrap | |
| from tkinter import BooleanVar, Tk | |
| from tkinter.ttk import Checkbutton, Frame, Label, Style | |
| LOREM_IPSUM = "Lorem ipsum odor amet, consectetuer adipiscing elit. Vivamus tincidunt ultricies accumsan feugiat ultrices sagittis tellus? Turpis penatibus convallis; suscipit nisl tincidunt suscipit litora? Ex fusce facilisis ullamcorper aenean iaculis metus pharetra libero. Feugiat fermentum fermentum mauris urna curabitur diam ad. Volutpat parturient arcu nec semper etiam vitae augue convallis dui. Gravida neque lacus donec interdum finibus ullamcorper. Sodales aliquam tempor tempor purus curabitur mauris ridiculus aptent." | |
| class TaskCard(Frame): | |
| MAX_DESCRIPTION_CHARS = 256 |
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
| from tkinter import Tk | |
| from tkinter.ttk import Frame, Label, Style | |
| class Table(Frame): | |
| """Presents tabular data in a self-contained widget.""" | |
| def __init__(self, parent, rows, *, title): | |
| super().__init__(parent) |
NewerOlder