This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Add the following flags to your sysctl.conf file | |
# | |
kern.ipc.shmmax=134217728 | |
kern.ipc.shmmin=1 | |
kern.ipc.shmmni=1048576 | |
kern.ipc.shmseg=1024 | |
kern.ipc.shmall=1048576 | |
kern.ipc.somaxconn=32767 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Function to check the exit status of the last command and handle errors | |
check_error() { | |
if [ $? -ne 0 ]; then | |
echo "Error: $1 failed. Exiting." | |
exit 1 | |
fi | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Update package repository | |
pkg update | |
# Install X.Org | |
pkg install -y xorg | |
# Install KDE Plasma | |
pkg install -y kde5 | |
# Install SDDM (display manager) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import time | |
from dotenv import load_dotenv | |
load_dotenv() | |
from pydantic import BaseModel, Field | |
from typing import TypedDict, Literal | |
from langgraph.graph import StateGraph, END | |
from langgraph.prebuilt import ToolNode | |
from langgraph.graph import MessagesState | |
from langchain.tools import tool |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Configuration variables | |
POSTGRES_VERSION="16.3" | |
POSTGRES_PREFIX="/usr/local/pgsql" | |
DATA_DIR="$POSTGRES_PREFIX/data" | |
LOGFILE="$POSTGRES_PREFIX/logfile" | |
BUILD_DIR="/tmp/postgresql-build" | |
PYTHON3_PATH=$(which python3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function mapArray(arr,cb){ | |
let res = []; | |
for(const e of arr){ | |
res.push(cb(e)); | |
} | |
return res; | |
} | |
function filterArray(arr, cb){ | |
let res = []; |