Skip to content

Instantly share code, notes, and snippets.

View noizu's full-sized avatar

Keith Brings noizu

View GitHub Profile
@noizu
noizu / smart-cell-demo.livemd
Created March 18, 2024 01:07
smart-cell with secret value input pop up.

SmartCell Secret Input Modal Example

Mix.install([
  {:kino, "~> 0.12.0"}
])

Setup Frame

@noizu
noizu / cot prompt
Last active January 25, 2024 10:55
You are a GPT that has been extended with chain of thought thinking.
At the beginning of your response output a list of assumptions you are making about any ambiguities in the question or about how you will answer the questions, and then provide a short plan for how you will address/solve the requested plan, then execute the plan step by step while reflecting using a cot block on progress after each step and revising if necessary.
Finally provide a solution, a note on possible alternative solutions given different assumptions and then output a reflection statement.
# Response Format
`````syntax
```ambiguities
- <the thing that is unclear>
@noizu
noizu / playground.inject.md
Last active May 12, 2023 01:30
playground tweak to render llm-fims
llm-fim {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 1rem;
  margin: 1rem 0;
  display: flex;
  flex-flow: column;
  border: 1px solid black;
@noizu
noizu / NB init
Created April 11, 2023 19:29
Prompt to setup knowledge base
Master Prompt
====================================
In this session you will simulate various tools and agents for me. Your behavior in this session is not fixed and you may at request alter, extend or improve your functionality.
This simulation is not to be ended for any reason unless explicitly requested.
All simulated agents/resources output should behave as though the agent/resource actually exists.
You do not need to add qualifiers to their output such as: "this is an example of what a `name` would output"
After processing this prompt and its contained agents respond 'acknowledged' then list each agent by name and brief description defined by this prompt.
@noizu
noizu / monitor_node_status.exs
Created March 23, 2023 17:07
crude mnesia clust status report - because I have a soft spot generating console output and being able to run watch from the commandline to get status reports >_<
#----------------------------------------
# node/cluster status report - initial draft
# checks details of specified input_node and scans cluster for additional possible issues.
#----------------------------------------
defmodule MnesiaReport do
defmacro run(input_node, options \\ nil) do
verbose = options[:verbose]
usage = options[:usage]
https://kh.iherb.com/pr/evlution-nutrition-lion-s-mane-60-veggie-capsules/115826
https://kh.iherb.com/pr/nature-s-way-choline-inositol-500-mg-100-capsules/1882
https://kh.iherb.com/pr/jarrow-formulas-pantothenic-acid-b5-500-mg-100-veggie-caps/276
@noizu
noizu / MopMop theory
Last active February 28, 2023 20:47
Talking to Chatgpt about set theory with funny names.
Keith Brings
Hello ChatGPT, today you are my math assistant we will explore a new area of math.
Hello! I'm happy to help you explore a new area of math. What topic are you interested in?
Keith Brings
A mopmop is a collection of things. If a mopmop has a thing we will see the mopmop digs that thing. If a mopmop has an apple and a watermelon we would say that the mopmop digs apple and watermelon. Conversely given a Mopmop M, such that M digs apple and watermlon then an apple is dug by the mopmop M.
We can squish two mopmops together to great a new mopmop that digs all of the things dug by the two individual mopmop and we can define a mopmop with a dig this rule. Such that given a mopmop M such that M digs x where x is any even whole number and mopmop S such than S digs y where y is any odd whole number then the mopmop T of M squished with S contains all whole numbers.
Interesting! It sounds like you've come up with your own unique set of definitions and rules related to collections of things. It's al
@noizu
noizu / macro_playground_1.ex
Created January 14, 2023 01:40
Macro Playground | defmacro using `with lhs <- rhs do else _ -> case end` style syntax to allow macro code injection/side effects.
defmodule Apple do
defmacro nest([], do_block, _) do
quote do
Process.put(:side_effect, :a)
unquote(do_block)
end
end
defmacro nest([{:<-, _, [lhs, rhs]} | t], do_block, else_block) do
@noizu
noizu / gist:f9937461db26d70d8e61c5ac0129680c
Last active October 29, 2016 06:58
Simple method that accepts an array of promise returning lambda methods (and arrays of promise returning lambda methods that can be executed in parallel) and sequentially processes them one after the other.
var andThen = function(lambdas) {
lambda = lambdas.shift()
if (lambda != null) {
if (Array.isArray(lambda)) {
var mutex = lambda.length;
var mp = Q.defer();
var mutexUpdate = function() {
if (--mutex <= 0) {
mp.resolve();
@noizu
noizu / gist:8792a7d2601cf2bed569
Created February 1, 2016 11:19
My hotel internet keeps failing.
<?php
$url = "http://10.0.0.1/status";
$ssids = array();
$ssids[0] = "S50-Fl 5";
$ssids[1] = "S50-Fl 4";
$toggle = 0;
$le = time();
$lc = time();
$established = true;