Skip to content

Instantly share code, notes, and snippets.

View jmikedupont2's full-sized avatar
๐Ÿ˜€
Thanks for the follows! Have a nice day.

Mike DuPont jmikedupont2

๐Ÿ˜€
Thanks for the follows! Have a nice day.
View GitHub Profile
table agents {
id uuid [pk, not null, default: `gen_random_uuid()`]
enabled boolean [not null, default: true]
createdAt timestamptz [not null, default: `now()`]
updatedAt timestamptz [not null, default: `now()`]
name text
username text
system text
bio jsonb [not null]
message_examples jsonb [default: `'[]'::jsonb`]
import { PGlite } from "@electric-sql/pglite";
const db = new PGlite("file:///var/run/agent/database/");
//let res = await db.query("select table_schema, count(*) from information_schema.tables group by table_schema;");
//let res = await db.query("select table_name,table_schema from information_schema.tables where table_schema = 'public';");
let res = await db.query("select * from public.worlds;");
//console.log(res)
res.rows.forEach((row) => {
@jmikedupont2
jmikedupont2 / transfer_ssm_file.sh
Last active March 3, 2025 17:34 — forked from lukeplausin/transfer_ssm_file.sh
Transfer a file to EC2 SSM instance without using S3 (SSM only)
# This script will explain how to transfer a file to EC2 using SSM ONLY!
# You will need to have permission to run SSM commands on the target machine and have sudo access as well
# Infos
INSTANCE_ID=i-1234567890
FILE_NAME=/opt/agent/strace.log
#ย Step 1: Run command on machine to install netcat and dump from port to filename
# < Start session
INF initializing upgrade `v0.32.0`
INF initializing upgrade `v0.34.0`
INF initializing upgrade `v0.24.0`
INF initializing upgrade `akash_v0.15.0_cosmos_v0.44.x`
INF initializing upgrade `v0.20.0`
INF initializing upgrade `v0.26.0`
INF initializing upgrade `v0.28.0`
INF initializing upgrade `v0.30.0`
INF starting node with ABCI Tendermint in-process
INF service start impl=multiAppConn module=proxy msg={}
00one00 [email protected]:00one00/eliaz.git (fetch)
01xcoder [email protected]:01xcoder/eliza.git (fetch)
0glabs [email protected]:0glabs/0g-eliza.git (fetch)
0hexquant [email protected]:0hexquant/eliza.git (fetch)
0x0000369 [email protected]:0x0000369/eliza.git (fetch)
0x1rubck [email protected]:0x1rubck/eliza.git (fetch)
0x2bc [email protected]:0x2bc/eliza.git (fetch)
0x311decker [email protected]:0x311decker/eliza.git (fetch)
0x330a [email protected]:0x330a/eliza.git (fetch)
0x369D [email protected]:0x369D/eliza.git (fetch)
All dependencies: 11.48 MiB
All dependencies: 11.73 MiB
All dependencies: 11.74 MiB
All dependencies: 11.85 MiB
All dependencies: 122.02 MiB
All dependencies: 12.29 MiB
All dependencies: 12.44 MiB
All dependencies: 12.48 MiB
All dependencies: 13.39 MiB
cat <<END > ./run.sh
#!/bin/bash
sudo apt update
export DEBIAN_FRONTEND=noninteractive
apt-get install -y emacs-nox tmux jq
END
sudo bash ./run.sh
File "/opt/swarms/api/main.py", line 965, in create_app
api = SwarmsAPI()
^^^^^^^^^^^
File "/opt/swarms/api/main.py", line 656, in __init__
self.store = StoreManager.get_instance()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/swarms/api/main.py", line 597, in get_instance
cls._instance = AgentStore()
^^^^^^^^^^^^
File "/opt/swarms/api/main.py", line 232, in __init__
(job, pid=8561) from swarms.artifacts.main_artifact import Artifact
(job, pid=8561) File "/var/task/agent_workspace/.venv/lib/python3.12/site-packages/swarms/artifacts/main_artifact.py\
", line 5, in <module>
(job, pid=8561) from pydantic import BaseModel, Field, validator
(job, pid=8561) File "/var/task/agent_workspace/.venv/lib/python3.12/site-packages/pydantic/__init__.py", line 404, \
in __getattr__
(job, pid=8561) stacklevel=2,
(job, pid=8561) ^^^^^^^^^
(job, pid=8561) File "/usr/lib/python3.12/importlib/__init__.py", line 90, in import_module
(job, pid=8561) return _bootstrap._gcd_import(name[level:], package, level)
@jmikedupont2
jmikedupont2 / gist:61f0c150dadd6c2c2da42d82eda641e4
Created November 30, 2024 17:45
generate image with invoke-ai.github.io
fetch("http://localhost:9090/api/v1/queue/default/enqueue_batch", {
"headers": {
"accept": "*/*",
"accept-language": "en-US,en;q=0.9",
"cache-control": "no-cache",
"content-type": "application/json",
"pragma": "no-cache"
},
"referrer": "http://192.168.1.90:9090/",
"referrerPolicy": "strict-origin-when-cross-origin",