Skip to content

Instantly share code, notes, and snippets.

View houstonhaynes's full-sized avatar

Houston Haynes houstonhaynes

View GitHub Profile
@houstonhaynes
houstonhaynes / GICS_extended.csv
Created December 16, 2024 16:47
Expanded GICS taxonomy with some custom curated entries for Non-Profit & NGOs plus Public Sector
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 3.
10101010,Oil & Gas Drilling,Drilling contractors or owners of drilling rigs that contract their services for drilling wells.,101010,Energy Equipment & Services,1010,Energy,10,Energy
10101020,Oil & Gas Equipment & Services,"Manufacturers of equipment, including drilling rigs and equipment, and providers of supplies such as fractured silica and services to companies involved in the drilling, evaluation and completion of oil and gas wells. This Sub-Industry includes companies that provide information and data services such as seismic data collection primarily to the oil & gas industry and distributors of oil & gas equipment products. This Sub-Industry excludes oil spill services companies classified in the Environmental & Facilities Services Sub-Industry.",101010,Energy Equipment & Services,1010,Energy,10,Energy
10102010,Integrated Oil & Gas,"Integrated oil companies engaged in the exploration & production of oil and gas, as well as at least one other significant activity in either refining, marketing and transp
@houstonhaynes
houstonhaynes / Update-and-BuildProject.ps1
Last active December 18, 2024 19:17
Sample webhook and build/deploy script for .NET back end server
#!/usr/bin/env pwsh
param (
[Parameter(Mandatory = $true)]
[string]$refBranch
)
function Update-and-BuildProject {
param (
[string]$repoUrl,
@houstonhaynes
houstonhaynes / callAzureOpenAI.fs
Last active October 10, 2024 14:34
Function that calls Azure OpenAI endpoint
let callAzureOpenAI (text: string) =
task {
let apiKey = Environment.GetEnvironmentVariable("AZUREOPENAI_API_KEY")
if String.IsNullOrEmpty(apiKey) then
return! ServerError.failwith (ServerError.Exception "Azure OpenAI API key is not set.")
else
let url = "https://[YOUR_AZURE_SERVICE]/openai/deployments/gpt-35-turbo/chat/completions?api-version=2024-02-15-preview"
use httpClient = new HttpClient()
httpClient.DefaultRequestHeaders.Add("api-key", apiKey)
let requestPayload = {
@houstonhaynes
houstonhaynes / ParseCMS_CSVtoParquet.fs
Created August 2, 2024 00:51
Parse CMS Medicare Part D data into state-based parquet files
open System
open System.IO
open ParquetSharp
open ParquetSharp.Schema
let fileInputPath = "Files/"
let fileOutputPath = "Files/parquet/"
// Define the file dictionary
let fileDict =
@houstonhaynes
houstonhaynes / WeatherReading.fs
Last active July 3, 2024 02:02
Modules for reading from the OpenWeatherMap API (BYOK)
module WeatherReading
open System
type Coordinates =
{
lon: float
lat: float
}
@houstonhaynes
houstonhaynes / git-pull-Meadow.ps1
Last active June 1, 2024 03:12
A script to cycle through each "Meadow." folder and run 'git pull' then output results to a local log file.
# Define the root directory where you want to start the search
$rootDirectory = "D:\repos"
# Create a unique log file with a datetime stamp
$logFileName = "Meadow_pull_log_$(Get-Date -Format 'yyyyMMdd_HHmmss').txt"
$logFilePath = Join-Path -Path $rootDirectory -ChildPath $logFileName
# Get immediate child folders (one level down)
$childFolders = Get-ChildItem -Path $rootDirectory -Directory
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"console_title_template": "{{ if .Root }}root @ {{.HostName}} {{ end }}{{ .Shell }} in {{ .Folder }}",
"blocks": [
{
"alignment": "left",
"segments": [
{
"background": "#575656",
"foreground": "#D6DEEB",
@houstonhaynes
houstonhaynes / ZoomView.axaml
Created January 1, 2024 23:12
Scrollbar Chart Setup
<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ic="using:FluentIcons.Avalonia"
mc:Ignorable="d" d:DesignWidth="1400" d:DesignHeight="800"
xmlns:lvc="clr-namespace:LiveChartsCore.SkiaSharpView.Avalonia;assembly=LiveChartsCore.SkiaSharpView.Avalonia"
xmlns:vm="using:AidenDesktop.ViewModels"
Design.DataContext="{Binding Source={x:Static vm:ChartViewModel.DesignVM}}"
x:DataType="vm:ZoomViewModel"
@houstonhaynes
houstonhaynes / DoughnutView.axaml
Last active December 13, 2023 18:45
ViewModel that uses a recursive update function to "reach" multiple model elements from a single data set change
<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="1200" d:DesignHeight="850"
xmlns:lvc="using:LiveChartsCore.SkiaSharpView.Avalonia"
xmlns:vm="using:AvaloniaExample.ViewModels"
xmlns:avalonia="clr-namespace:LiveChartsCore.SkiaSharpView.Avalonia;assembly=LiveChartsCore.SkiaSharpView.Avalonia"
Design.DataContext="{Binding Source={x:Static vm:DoughnutViewModel.DesignVM}}"
x:DataType="vm:DoughnutViewModel"
{
"final_space": true,
"console_title": true,
"console_title_style": "folder",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"horizontal_offset": 0,
"vertical_offset": 0,