This file contains 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
// This .NET 6 console app generates XML color palette files compatible with Adobe Illustrator and CorelDraw. | |
// Color palettes are sourced from the ScottPlot package. | |
foreach (var pal in ScottPlot.Palette.GetPalettes()) | |
{ | |
string xml = GetPaletteXml(pal); | |
string saveFolder = Path.GetFullPath("palettes"); | |
if (!Directory.Exists(saveFolder)) | |
Directory.CreateDirectory(saveFolder); |
This file contains 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
""" | |
This script finds text in a folder of PPT files and saves what is found | |
in a HMTL report that can be easily searched. It separates long phrases | |
from stray words to make important content easier to spot. | |
""" | |
import datetime | |
import collections | |
import collections.abc |
This file contains 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
// C code from the AD7705/AD7706 datasheet | |
// https://www.analog.com/media/en/technical-documentation/data-sheets/ad7705_7706.pdf | |
#include <math.h> | |
#include <io6811.h> | |
#define NUM_SAMPLES 1000 /* change the number of data samples */ | |
#define MAX_REG_LENGTH 2 /* this says that the max length of a register is 2 bytes */ | |
Writetoreg(int); | |
Read(int, char); |
This file contains 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
""" | |
This script renames all files in a folder to lowercase | |
""" | |
import pathlib | |
import shutil | |
folder = "./full/" | |
for path in pathlib.Path(folder).glob("*.*"): | |
path2 = path.parent.joinpath(str(path.name).lower()) |
This file contains 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
""" | |
Resize every image in a folder to create small and medium versions. | |
""" | |
import pathlib | |
from PIL import Image | |
def resize_width(path: pathlib.Path, out_folder: str, new_width: int): | |
"""Resize a image to use the given width.""" |
This file contains 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
/* This C# .NET console application demonstrates how to log in to QRZ.com | |
* and scrape information from the logbook. Tested/working in October 2024. | |
* | |
* To run this code: | |
* Install the latest .NET SDK https://dotnet.microsoft.com/ | |
* Create an empty folder and run 'dotnet new console' | |
* Edit Program.cs to contain the following | |
* Use the 'dotnet run' command to execute the program | |
*/ | |