Skip to content

Instantly share code, notes, and snippets.

View LinuxIsCool's full-sized avatar
💭
Preparing the ship.

Shawn Anderson LinuxIsCool

💭
Preparing the ship.
View GitHub Profile
@LinuxIsCool
LinuxIsCool / data.json
Created April 17, 2025 22:58
ElizaOS Force Directed Graph
This file has been truncated, but you can view the full file.
@LinuxIsCool
LinuxIsCool / eliza-postgres.md
Created April 14, 2025 20:32
Running ElizaOS with PostgreSQL and Exporting the Schema

Complete Walkthrough: Running ElizaOS with PostgreSQL and Exporting the Schema

This step-by-step guide will walk you through the process of configuring ElizaOS to use PostgreSQL instead of its default embedded database, and then exporting the database schema for analysis or documentation purposes.

Prerequisites

Before starting, ensure you have the following:

  • ElizaOS installed (repo cloned)
  • PostgreSQL installed on your system
@LinuxIsCool
LinuxIsCool / lightrag-fish.md
Last active April 12, 2025 18:06
running-lightrag-virtualfish

Setting Up LightRAG with Fish Shell: A Journey

Quick Start Guide

# Clone repo
git clone https://github.com/HKUDS/lightrag.git
cd lightrag

# Set up environment
@LinuxIsCool
LinuxIsCool / simple_claude.md
Created January 4, 2025 20:54
Simple Claude in Python

pip install python-dotenv anthropic set ANTHROPIC_API_KEY your-api-key-here

from anthropic import Anthropic
from dotenv import load_dotenv
import os

# Load environment variables
load_dotenv()
@LinuxIsCool
LinuxIsCool / rustr.fish
Created November 15, 2024 18:53
Function for building and running a rust script using local build directory
function rustr
if test (count $argv) -ne 1
echo "Usage: rustr <filename>"
return 1
end
set filename $argv[1]
set output_file (string replace -r '\.rs$' '' $filename)
# Create the build directory if it doesn't exist
@LinuxIsCool
LinuxIsCool / generat_ requirements.sh
Created November 7, 2024 17:22
Generate requirements.txt from poetry
poetry export -f requirements.txt --without-hashes | sed 's/;.*//' > requirements.txt
@LinuxIsCool
LinuxIsCool / serialize_param.py
Last active October 17, 2024 23:20
Simple Serialization for Nested Parameterized Objects
import param as pm
import pandas as pd
def serialize_param(obj: pm.Parameterized, skip_dataframes=True, exclude_params=None):
"""
Recursively serialize a Parameterized object into a nested dictionary.
Parameters:
- obj: pm.Parameterized
The object to serialize.
@LinuxIsCool
LinuxIsCool / hvpoints.py
Created October 5, 2024 16:44
Simple but Powerful usage of Holoviews Points
import holoviews as hv
hv.extension('bokeh')
import pandas as pd
nodes = [
{
'name': 'A',
'x': 1,
'y': 0.5,
@LinuxIsCool
LinuxIsCool / line.py
Created September 26, 2024 17:07
Simplest line between two points in hvplot and holoview
import pandas as pd
import holoviews as hv
import hvplot.pandas
hv.Points((1,1)).opts(size=10) * hv.Points((2,2)).opts(size=10) * pd.DataFrame([[1,1],[2,2]]).hvplot.line(x='0',y='1')
@LinuxIsCool
LinuxIsCool / poetry_requirements.sh
Created May 7, 2024 20:15
Create simple requriements file from poetry environment
poetry export -f requirements.txt --without-hashes | sed 's/;.*//' > requirements.txt