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 | |
| # requires-python = ">=3.11" | |
| # dependencies = [ | |
| # "pillow>=11.2.1", | |
| # ] | |
| # /// | |
| # usage: uv run this_script.py <path_to_png> | |
| import sys |
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
| #include <TM1637Display.h> | |
| #define CLK_PIN 2 | |
| #define DIO_PIN 3 | |
| const int SPEED_PINS[] = { 4, 5, 6, 7 }; | |
| const int NUM_SPEED_PINS = sizeof(SPEED_PINS) / sizeof(SPEED_PINS[0]); | |
| const int REFRESH_RATES_HZ[] = { 30, 60, 90, 120 }; | |
| const int RATE_DEFAULT_HZ = 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
| <# | |
| .SYNOPSIS | |
| Generates a high frame rate video with SMPTE timecode overlay. | |
| .DESCRIPTION | |
| This script creates a video file with a timecode burned in using FFmpeg. | |
| The video frame rate is configurable and can be set to any desired duration. | |
| .PARAMETER Duration | |
| Duration of the video in seconds (default: 10) |
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 'dart:typed_data'; | |
| import 'package:image/image.dart' as img; | |
| const dim = 512; | |
| const maxInt16Value = 32767; | |
| const maxInt8Value = 255; | |
| final Int16List testData = () { | |
| final buffer = Int16List(dim * dim); |
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 'package:flutter/material.dart'; | |
| void main() => runApp(const App()); | |
| class App extends StatefulWidget { | |
| const App({super.key}); | |
| @override | |
| State<App> createState() => _AppState(); | |
| } |
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 'dart:math'; | |
| enum AppRoute { root, login, welcome } | |
| void main() { | |
| final randomNumberGenerator = Random(); | |
| final isAuthenticated = randomNumberGenerator.nextBool(); | |
| final hasSeenWelcome = randomNumberGenerator.nextBool(); | |
| final initialLocation = isAuthenticated |
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 | |
| # Check if an argument is provided | |
| if [ -z "$1" ]; then | |
| echo "Usage: $0 <bitrate>" | |
| exit 1 | |
| fi | |
| # Store the original settings.json | |
| mv settings.json settings_orig.json |
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 'package:flutter/material.dart'; | |
| import 'dart:math'; | |
| void main() { | |
| runApp(const CardGameApp()); | |
| } | |
| class CardGameApp extends StatelessWidget { | |
| const CardGameApp({super.key}); |
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 'package:flutter/material.dart'; | |
| void main() { | |
| runApp(const MyApp()); | |
| } | |
| class MyApp extends StatelessWidget { | |
| const MyApp({super.key}); | |
| @override |
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 bluetooth | |
| import sys | |
| if len(sys.argv) != 2: | |
| print(f"usage: {sys.argv[0]} <message>") | |
| sys.exit(1) | |
| message = sys.argv[1] | |
| nearby_devices = bluetooth.discover_devices( |
NewerOlder