Skip to content

Instantly share code, notes, and snippets.


Chris thevirtuoso1973

View GitHub Profile
View helloWorld.Modusfile
hello_world_image(profile) :-
profile = "debug",
profile = "release",
)::set_cmd(["echo", "Hello", "World"]).
thevirtuoso1973 /
Last active Aug 8, 2022
Estimate Code Size
#!/usr/bin/env bash
# Use this script like `./ file1 file2 ... > output.txt`
set -eu;
function estimate()
cat $1 | wc
thevirtuoso1973 /
Last active Jun 8, 2021
This is an implementation of the approach described in to determine good areas to place the IPHRO system. You'd need to download the GDEM data from NASA's website.
import numpy as np
import os
import math
import random
import overpy
from scipy.spatial import KDTree
def simulatedAnnealing(data, maxIter=1000000):
# NOTE: this function/approach wasn't effective enough at finding the optimal value
thevirtuoso1973 /
Created Aug 7, 2020
Automate T1 Device Testing
#!/usr/bin/env bash
set -euo pipefail
cd ~/Documents/Code/Work/lner-app/iosApp
function testPhone() {
# Expects two arguments:
thevirtuoso1973 / config.el
Created Jan 3, 2020
My config.el file for doom emacs. Includes code that switches between a day/night theme depending on the time.
View config.el
;;; .doom.d/config.el -*- lexical-binding: t; -*-
;; Place your private configuration here:
;; Color theme changer depending on time
(setq hour
(substring (current-time-string) 11 13))) ;; gets the hour
(if (member hour (number-sequence 6 16)) ;; light theme if between 06:00-16:59
(setq now 'doom-solarized-light)
thevirtuoso1973 /
Created Jul 11, 2019
A script to search for youtube videos (and playlists) in the command line, displaying their url/video id. Works great with youtube-dl.
#!/usr/bin/env python2
# ^ also compatible with python3 ^
# This script executes a search request for the specified search term and prints the results.
# Sample usage:
# python --max-results=10 "megadeth album"
# uses the google api client module for python so make sure you install it
import argparse
from googleapiclient.discovery import build