Skip to content

Instantly share code, notes, and snippets.

@brownan
brownan / prompt.py
Last active May 21, 2024 18:50
Ollama command line interface with Markdown rendering
#!/bin/env python3
import argparse
import io
import json
import os
import sys
import urllib.parse
import urllib.request
from typing import Optional, NamedTuple
import StringIO
import pty
import os
import subprocess
import termios
import fcntl
import errno
def postfork():
"""This is executed in the forked child, before it executes the requested
import sys
import math
import numpy
from overviewer.world import ChunkDoesntExist
from overviewer import blockdefinitions
from overviewer.oil import Matrix
from overviewer import textures
from overviewer.isometricrenderer import IsometricRenderer
d6450e937791232c201ab933451815b2 a_Data.MHK
9658363d21012c757ed8ef5412c4f363 a_Sounds.MHK
e386ace2719cfe36cc94b7e79c829694 b2_data.MHK
ea84fee7c06975b030841706dee24dec b_Data.MHK
8b6df65ea01caea7200f4be1f64c65e8 b_Sounds.MHK
32742619cd38a9c82d6403c9ea8acf2b g_Data.MHK
7998b57be99188e03a9ff292e71e169a g_Sounds.MHK
cbbfe924f4f64b61901841fab44751b6 j_Data1.MHK
310c4f169d96c124122133ae9cafcf36 j_Data2.MHK
b27fcc84564db0776b28781ad0a24c2d j_Sounds.MHK
@brownan
brownan / twitch.py
Last active November 11, 2018 12:30
Python script to get a window's size and position, then launch avconv to stream that window to twitch.tv
#!/usr/bin/env python3
# Adapted from http://www.creativetux.com/2012/11/streaming-to-twitchtv-with-linux.html
#
# Make sure to put your twitch.tv key in a file called "key" in the current directory.
#
# Before running, make sure PulseAudio is set up with the correct loopback modules
# and a null sink named "mix". You can use something ilke the following commands:
#
# pactl load-module module-null-sink sink_name=mix
import StringIO
import pty
import os
import subprocess
import termios
import fcntl
import errno
def postfork():
"""This is executed in the forked child, before it executes the requested
gah
spiders
hanging
wooden
wednesday
snuggles
errors
cooking
golden
therefore
2012-10-26 16:56:49 achin any weider than gravity?
2012-10-26 16:56:54 agrif less weird
2012-10-26 16:56:58 agrif gravity is insane
2012-10-26 16:57:47 agrif so did you know that electromagnetism is what pushes back on you when you push on a wall?
2012-10-26 16:57:56 achin yes, i think i did
2012-10-26 16:58:12 achin well, i could have said that, but don't really *know* what it means
2012-10-26 16:58:48 achin but i think the notion is that, at the atomic level, there's not much that distinquishes us from everything else. just the strength of the forces that hold atoms near each other. or something
2012-10-26 16:59:10 achin which, if that's an accurate way to view things, is fairly mind-blowing
2012-10-26 17:00:38 CounterPillow I, for my part, like pooping.
2012-10-26 17:01:25 brownan CounterPillow
(?:
(free|cracked)?
-?
minecraft
-?
(
install|get| (?:gift-?)?codes?(?:-?gen(?:erator)?)?|rewards?|acc(?:t|ount)s?(?:free)?|now| forever
)?
Antec Performance One Series P183 V3 Black Aluminum / Steel / Plastic ATX Mid Tower Computer Case
http://www.newegg.com/Product/Product.aspx?Item=N82E16811129174
Intel BOXDZ68DB LGA 1155 Intel Z68 HDMI SATA 6Gb/s USB 3.0 ATX Intel Motherboard
http://www.newegg.com/Product/Product.aspx?Item=N82E16813121527
PNY XLR8 VCGGTX660TXPB-C GeForce GTX 660 Ti 2GB 192-bit GDDR5 PCI Express 3.0 x16 HDCP Ready SLI Support Video Card w/ HDMI Cable
http://www.newegg.com/Product/Product.aspx?Item=N82E16814133467
CORSAIR Professional Series HX650 650W ATX12V v2.2 / EPS12V 2.91 SLI Ready 80 PLUS GOLD Certified Modular Active PFC Power Supply