This "head_tail_file" gist is a contrived example of a command line utility facilitating AI code generation experimentation.
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
| // swift-tools-version: 5.9 | |
| import PackageDescription | |
| let package = Package( | |
| name: "fdbs", | |
| platforms: [.macOS(.v12)], | |
| dependencies: [ | |
| .package(url: "https://github.com/apple/swift-argument-parser", from: "1.2.0") | |
| ], | |
| targets: [ |
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 julia | |
| # | |
| # M U L T I F L O A T . J L | |
| # | |
| # Multi Float Basic Statistics | |
| # | |
| # multifloat.jl last updated on Tue Mar 10 20:52:50 2026 by O.H. as 0v01 | |
| # | |
| # Descendant of bfbs.jl 0v11, but adapted to use the MultiFloat package | |
| # and its Float64x4 type for high precision calculations. It is a testbed |
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 | |
| # | |
| # N E T W O R K _ S C A N . P Y | |
| # | |
| # network_scan.py last edited on Wed Feb 16 19:26:35 2026 as 0v8 | |
| # | |
| # Ping scan the local network for devices with known MAC addresses | |
| # and record their IPv4 addresses and ping status. The results are | |
| # displayed in two tables, one sorted by device name and the other |
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/python | |
| # | |
| # C S V S T A T S . P Y | |
| # | |
| # Output the basic stats for one or more data files containing | |
| # one or more columns of numbers. If there are multiple columns | |
| # of numbers then they must be separated by a comma. Comments | |
| # are allowed in the data files if the comments are started with | |
| # a # (i.e. hash character). | |
| # |
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
| // | |
| // A N A L Y S E _ C S V . G O | |
| // | |
| // | |
| // | |
| // Display basic statistics of one or more columns of numbers separated by commas | |
| // in one or more 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
| #! /bin/python | |
| # | |
| # F R O N I U S P V _ G R A P H . P Y | |
| # | |
| # Last Modified on Fri Jan 04 21:23:30 2026 as version 0v12 | |
| # | |
| # Code to graph the real-time data from a Fronius Primo inverter. | |
| # | |
| # Graphs Output AC Voltage and Output AC Power by default and the | |
| # user can select alternate data to graph via command line options. |
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/sh | |
| # | |
| # This shell script allows a quick check on whether Apple have done | |
| # anything about the feedback on the short-comings of MacOS ping. | |
| # | |
| # Needs to have a target that responds to ICMP requests (i.e. ping request). | |
| # In my case my local router (192.168.1.1) responds to ICMP requests apart from | |
| # MASK_REQ. Edit "LOCAL_IP_ROUTER" value to suit a different network setup. | |
| # | |
| LOCAL_IP4_ROUTER=192.168.1.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
| // | |
| // T R Y _ 1 _ U T F 8 _ C H A R | |
| // | |
| // try_1_utf8_char.rs last edited on Sat Feb 22 16:09:31 2025 | |
| // | |
| // Display a character from the UTF-8 bytes (or Unicode code point) specified | |
| // on the command line. | |
| // | |
| // N.B. 1. The quickest and easiest access to similar, and probably | |
| // better, functionality as this rust code is to use the following |
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
| // | |
| // F I L E _ B Y T E _ D I S P L A Y | |
| // | |
| // File Byte display | |
| // | |
| // Display the bytes in a small file, or the first 1000 bytes | |
| // of a larger file. | |
| // | |
| // Warning: lacks adequate command line parameter checking | |
| // |
NewerOlder