Skip to content

Instantly share code, notes, and snippets.

View mgalgs's full-sized avatar
🍔
pizza

Mitchel Humpherys mgalgs

🍔
pizza
View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<name>GPS Coordinates Area</name>
<Placemark>
<name>Rectangle Area</name>
<Style>
<LineStyle>
<color>ff0000ff</color>
<width>2</width>
@mgalgs
mgalgs / rolemongering_verbosity.txt
Created September 26, 2023 23:43
Custom instructions for ChatGPT that add "verbosity" and "role" user settings
You'll adopt roles and verbosity according to user settings:
R=<role> V=<level>
Roles:
- E = Engineering virtuoso (e.g., electrical, computer, software, etc.)
- B = Business/finance virtuoso (e.g., economics, investments, geopolitics, etc.)
- G = Highly intelligent generalist with a wide variety of knowledge.
%% https://en.wikibooks.org/wiki/LaTeX/Letters
\documentclass[12pt]{letter}
\usepackage[a4paper,left=2cm, right=2cm, top=1.5cm, bottom=1.5cm]{geometry}
\signature{Your Name}
\address{Your Name
\\ Address1
\\ City, STATE 00000
\\ (555) 867-5309
\\ you@example.com}
\begin{document}
@mgalgs
mgalgs / .gitignore
Last active April 16, 2021 06:15
ftd_stats.py
/cnsfails202101b.txt
/cnsfails202102a.txt
/cnsfails202102b.txt
/cnsfails202103b.txt
/cnsfails202103a.txt
import sys
import os
import tensorflow as tf
def usage():
proggie = os.path.basename(sys.argv[0])
print(f"""\
Usage: {proggie} <input_saved_model_dir> <output>
// imgLib -> Image package from https://pub.dartlang.org/packages/image
import 'package:image/image.dart' as imglib;
import 'package:camera/camera.dart';
imglib.Image convertCameraImagetoImage(CameraImage image) {
try {
if (image.format.group == ImageFormatGroup.yuv420) {
return _convertYUV420(image);
} else if (image.format.group == ImageFormatGroup.bgra8888) {
return _convertBGRA8888(image);
@mgalgs
mgalgs / bndbox.dart
Created July 31, 2020 19:33
tflite detection error repro
// Based on https://github.com/shaqian/flutter_realtime_detection
import 'package:flutter/material.dart' show Border, BoxDecoration, BuildContext, Color, Container, EdgeInsets, FontWeight, Positioned, Stack, StatelessWidget, Text, TextStyle, Widget;
import 'dart:math' as math;
class BndBox extends StatelessWidget {
final List<dynamic> results;
final int previewH;
final int previewW;
final double screenH;
Mar 10 12:16:25 grinchel steam.desktop[5454]: No cached sticky mapping in ActivateActionSet.No cached sticky mapping in ActivateActionSet.Loaded Config for Local Selection Path for App ID 252950, Controller 0: /home/mgalgs/.local/share/Steam/steamapps/workshop/content/241100/1587909035/966483288118316973_legacy.bin
Mar 10 12:16:25 grinchel steam.desktop[5454]: Loaded Config for Local Override Path for App ID 252950, Controller 0: /home/mgalgs/.local/share/Steam//controller_base/empty.vdf
Mar 10 12:16:25 grinchel steam.desktop[5454]: GameAction [AppID 252950, ActionID 3] : LaunchApp changed task to ProcessingInstallScript with ""
Mar 10 12:16:31 grinchel steam.desktop[5454]: GameAction [AppID 252950, ActionID 3] : LaunchApp changed task to SynchronizingCloud with ""
Mar 10 12:16:32 grinchel steam.desktop[5454]: GameAction [AppID 252950, ActionID 3] : LaunchApp changed task to SiteLicenseSeatCheckout with ""
Mar 10 12:16:32 grinchel steam.desktop[5454]: GameAction [AppID 252950, ActionID 3] : LaunchApp changed
@mgalgs
mgalgs / active_window_xlib_demo.py
Created December 7, 2019 00:13
python-xlib example that prints the bbox of the currently active window
# Print the name and bounding box (x1, y1, x2, y2) for the active window in
# a loop.
import time
from collections import namedtuple
import Xlib
import Xlib.display
@mgalgs
mgalgs / the_early_life_of_harvey_r_allred__TEXT.txt
Created December 5, 2018 00:59
Stories from the Family of Orson Pratt Alred and Sarah Jane Rich Allred by Harvey Rich Allred and other family members
The Early Life
Of
Harvey R. Allred
STORIES FROM THE FAMILY OF
ORSON PRATT AND SARAH JANE RICH ALLRED
by
Harvey Rich Allred and other family members
Father and Mother were both born and raised in the Bear Lake area and spent