Skip to content

Instantly share code, notes, and snippets.

View Streamweaver's full-sized avatar

Scott Turnbull Streamweaver

View GitHub Profile
# Conversation: Unpacking "Universal High Income" - A Post-Labor Economics Discussion
**Date**: 10/21/2025
**Model**: Claude Sonnet 4.5
## Context
Discussion prompted by tweets from Elon Musk stating "Working will be optional in the future" and "There will be universal high income."
---
@Streamweaver
Streamweaver / gist:c30ac533c17126ade1ac090709486ba3
Created July 26, 2025 22:23
Solodark Prompt to run a session.
# ROLE
You are “The Torch in the Dark,” an impartial Shadowdark referee and world builder assisting a solo player using the Solodark rules.
Your job is to adjudicate rules, generate encounters, and paint evocative scenes—never to seize narrative control away from the player.
# SYSTEM BASICS
* Use Shadowdark RPG rules and odds by default.
* Lean on the following oracles if randomness is needed:
@Streamweaver
Streamweaver / company_research.md
Created July 24, 2025 14:09
Company Research for Job Candidate Prompt

🕵️‍♂️ Deep‑Dive Company Research Prompt

ROLE

You are an interdisciplinary research analyst with expertise in corporate strategy, technology stacks, workplace culture, and talent intelligence.

MISSION

Produce a concise but comprehensive research brief on [COMPANY] , tailored to [POSITION], The output will help a senior candidate assess fit, prepare insightful interview questions, and negotiate from an informed position.

SOURCE SEED

from langchain_core.output_parsers.transform import BaseTransformOutputParser
from langchain_core.exceptions import OutputParserException
from langchain_core.messages import BaseMessage
from langchain_core.runnables.utils import AddableDict
import xml.etree.ElementTree as ET
from typing import Union, Optional, Any, Iterator, AsyncIterator, Literal
from bs4 import BeautifulSoup
import logging
import re
import contextlib
@Streamweaver
Streamweaver / gist:0144a6e76699f420ccae52053f074b9b
Created November 14, 2024 13:33
A common robust XML Output Parser example
from langchain_core.output_parsers.transform import BaseTransformOutputParser
from langchain_core.exceptions import OutputParserException
import xml.etree.ElementTree as ET
from typing import Union, Optional, Any
import re
from bs4 import BeautifulSoup
import logging
class RobustXMLOutputParser(BaseTransformOutputParser):
"""A more robust XML parser that handles malformed XML gracefully."""
@Streamweaver
Streamweaver / gist:28d5e896c039d6dea42868648661dbc2
Created January 2, 2021 05:50
Quick simulator of DnD Rolls in different conditions
import random
N = 100000 # Set this to the number of simulated rolls to aggregate
def d20():
return random.randint(1, 21)
def count_20s(lst):
@Streamweaver
Streamweaver / StaticUtils.cs
Created February 7, 2020 04:25
A simple set of static utilities I'm building up during Unity .
using UnityEngine;
namespace Streamweaver.Util
{
public static class StaticUtils
{
public static Vector3 GetRandomDir2D()
{
return new Vector3(Random.Range(-1f, 1f), Random.Range(-1f, 1f), 0).normalized;
}
@Streamweaver
Streamweaver / ActionState.cs
Last active February 7, 2020 04:21
An Action State Machine Pattern I like in Unity.
// Got this from Jason Weimann's videos. I like the pattern much better.
// from https://unity3d.college/2017/05/26/unity3d-design-patterns-state-basic-state-machine/
public class Entity: Monobehavior
{
private ActionState _currentState;
private void Update() {
_currentState.Tick();
}
@Streamweaver
Streamweaver / Singleton.cs
Created February 7, 2020 04:13
Singleton Class for Unity I like
using UnityEngine;
// Got this online and want to reuse for simple singletons.
namespace Streamweaver.Util
{
// Class taken from The Secret Labs Unity Cookbook repo
public class Singleton<T> : MonoBehaviour where T : MonoBehaviour
{
public static T instance
@Streamweaver
Streamweaver / CameraBoundaries.cs
Created January 18, 2020 04:06
This is a small utility script I use in simple 2D Unity games to world coordinates. I'd probably make this static and just pass in a cam object in the future so I can call it anytime.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Boundary : MonoBehaviour
{
Camera cam;
public float width, height;
// Start is called before the first frame update