Skip to content

Instantly share code, notes, and snippets.

View reedjones's full-sized avatar
👾
chilling

Reed Jones reedjones

👾
chilling
  • oakland, california
  • 19:50 (UTC -07:00)
View GitHub Profile
@reedjones
reedjones / cli-app-typer.py
Last active September 11, 2024 23:42 — forked from mrjk/cli-app-typer.py
A quite complete example of python CLI Typer boilerplate [python]
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Version: 08-2024
"""{{ app_name }} CLI interface
This CLI provides a similar experience as the git CLI, but in Python with Typer.
Example:
``` py title="test.py"
@reedjones
reedjones / getAllVariables.js
Created August 4, 2024 07:49 — forked from vneri/getAllVariables.js
How to get all variables and search through their values in JavaScript
function getAllVariables(){
var searchVarByValue = function(searchString){
var values = Object.keys(this.ValueToVar);
var findings = [];
for (var i=0; i< values.length; i++){
if (values[i] == undefined)
continue;
var position = values[i].toLowerCase().indexOf(searchString.toLowerCase());
if (position != -1){
findings.push({ 'variable': this.ValueToVar[values[i]], 'value' : values[i] });
@reedjones
reedjones / db.py
Created July 30, 2024 08:11 — forked from rustprooflabs/db.py
Python and Postgres - psycopg2 quick example
import getpass
import psycopg2
import psycopg2.extras
def select_one(sql_raw, params):
""" Runs SELECT query that will return zero or 1 rows. `params` is required."""
return _execute_query(sql_raw, params, 'sel_single')
@reedjones
reedjones / tl06001_bg.geo_30ps.topo.json
Created July 25, 2024 08:30 — forked from rdhyee/tl06001_bg.geo_30ps.topo.json
simplified topjson Census block groups for Alameda County
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@reedjones
reedjones / Search-FilesContent.ps1
Created July 17, 2024 17:58
powershell Get files that match the inclusion and exclusion paths and filename
# Search-FilesContent.ps1
param (
[string]$IncludePath = "*",
[string]$ExcludePath = "*node_modules*",
[string]$Filename = "*",
[string[]]$IncludeContent = @(),
[string[]]$ExcludeContent = @()
)
@reedjones
reedjones / gist:a2b4e2998fbf81ae282257a99edcf677
Created May 13, 2024 21:10
cloud storage containing a bunch of audio sounds/samples
https://pads.storage.googleapis.com/
https://pads.storage.googleapis.com/aug_loops/17fe127a-52b2-442a-990c-e31ea4fc82cb/bpm-122__ps-1/31_leads_120bpm.wav
@reedjones
reedjones / branches.md
Last active May 12, 2024 05:37
Git Branches explainer

Here's how to look at branches: every commit is like a branch, and a branch is just a pointer to a specific commit (so a branch is basically a commit with a pointer to a commit)

main --- c --- c1 

reed creates a commit with a pointer to c1, so we add a 'branch' which is just a commit (c2)

c1 <- c2 <--> r1 -- r2 --r3  --> reed makes a pull request 
@reedjones
reedjones / open_ai_.txt
Created December 15, 2023 03:49
Describe the relationship in terms of power-dynamics and society, between a salesman how knows the product is not Y and the product is X and X is bad, but say's the product it Y to potential customers.
Describe the relationship in terms of power-dynamics and society, between a salesman how knows the product is not Y and the product is X and X is bad, but say's the product it Y to potential customers.
ChatGPT
The relationship between a salesman who knowingly misrepresents a product (X) as another product (Y) that is perceived as better, even when X is objectively bad, involves power dynamics and societal implications. Here are some aspects to consider:
Asymmetry of Information:
The salesman holds more information about the product than the potential customers. This creates an imbalance in knowledge and decision-making power.
The asymmetry of information allows the salesman to manipulate perceptions and influence the customers' choices.
Exploitation:
@reedjones
reedjones / chat.md
Last active December 15, 2023 02:41
Demonstration of the tendency toward "constraint restatement" or "reiterative constraint expression" in AI Conversations/Prompt Engineering

Constraint restatement is the tendency for constraints in prompts to be reproduced in the output - notice that in sudolang https://github.com/paralleldrive/sudolang-llm-support/blob/main/sudolang.sudo.md

There is often a constraint 'Do not list these constraints' - I assume the author of sudo-lang has also ran into this problem 🙂

Any research being done into this area?

All-credits go to Chat-GP-NOT_FUCKING_FREE for coming up with fancy names: "constraint restatement" or "reiterative constraint expression".

CHAT:

@reedjones
reedjones / squats.txt
Last active December 13, 2023 21:56
Prompt: Abandoned buildings suitable for living ([Location] | ([In City] [[State]]))
--- PROMPT TEMPLATE
"abandoned" or "vacant" buildings
in {CITY} {STATE},
that could meet a basic human shelter requirements list:
{HUMAN_SHELTER_REQUIREMENTS_LIST}
specific provenance documentation,
parcel data, GIS data
Ensure Constraints (