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 | |
""" | |
Filename: base64_image_encoder.py | |
Author: Robert Harrison | |
Date: September 30, 2025 | |
Description: Encode a PNG file to base64 and write the encoded string to a file. | |
Usage: python base64_image_encoder.py <path_to_png_file> | |
Example: pythonbase64_image_encoder.py input.py | |
Base64 encoded image is saved to output.txt | |
""" |
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 | |
""" | |
Filename: image_processor.py | |
Author: Robert Harrison | |
Date: September 30, 2025 | |
Description: Resize image to specified size, convert to circle, and save as PNG with transparency. | |
Usage: python image_processor.py <input_image_path> <output_image_path> [size] [padding] | |
Example: python image_processor.py input.png output.png 44 2 | |
""" |
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 | |
""" | |
Filename: resize_device_screenshots.py | |
Author: Robert Harrison | |
Date: June 6, 2025 | |
Description: Script to find and resize PNG screenshots for devices with fastlane size bugs. | |
Uses ImageMagick mogrify to resize images to proper resolutions while maintaining | |
aspect ratio and centering content. | |
Usage: python resize_device_screenshots.py <search_directory> | |
Example: python resize_device_screenshots.py ./screenshots |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>FILEHEADER</key> | |
<string> | |
// ___FILENAME___ | |
// ___PROJECTNAME___ | |
// | |
// Copyright © 2024 RWH Technology, LLC. All rights reserved. |
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
# See detailed instructions here: | |
# https://robertharrison.ca/blog/voice-cloning-tortoise-tts-apple-silicon/ | |
# Import PyTorch and Tortoise. | |
import torch | |
import torchaudio | |
import torch.nn as nn | |
import torch.nn.functional as F | |
from tortoise.api import TextToSpeech | |
from tortoise.utils.audio import load_audio, load_voice, load_voices |
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
const functions = require("firebase-functions"); | |
const {BigQuery} = require('@google-cloud/bigquery'); | |
exports.getMostPolluted = functions.https.onCall((data, context) => { | |
const bigQuery = new BigQuery(); | |
const query = 'SELECT location, city, country, value, timestamp FROM `bigquery-public-data.openaq.global_air_quality` WHERE pollutant = "pm25" AND timestamp > "2020-01-01" ORDER BY value DESC LIMIT 10'; | |
return bigQuery.query(query) |
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
// UIView+RoundedCorners.swift | |
// | |
// Created by Robert Harrison on 7/22/19. | |
// Copyright © 2019 Robert Harrison. All rights reserved. | |
// | |
// Usage: | |
// view.roundCorners([.topLeft, .topRight], cornerRadius: 8.0) | |
import UIKit |