This file contains hidden or 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 sys, json, inspect | |
from typing import get_type_hints | |
## MCP Server "Framework" ## | |
TOOLS, TOOL_DEFINITIONS = {}, [] | |
def tool(f): | |
TOOLS[f.__name__] = f | |
TOOL_DEFINITIONS.append(tool_definition(f)) |
This file contains hidden or 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
999999 |
This file contains hidden or 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
SELECT id, casestatus_id FROM counseling_case LIMIT 1; |
This file contains hidden or 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/bash | |
set -e | |
# Pre-configure root password | |
export DEBIAN_FRONTEND=noninteractive | |
ROOT_PASSWORD="your_password_here" | |
debconf-set-selections <<< "mysql-community-server mysql-community-server/root-pass password $ROOT_PASSWORD" | |
debconf-set-selections <<< "mysql-community-server mysql-community-server/re-root-pass password $ROOT_PASSWORD" | |
mkdir -p /tmp/mysql-install |
This file contains hidden or 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
#!/usr/bin/env bash | |
# Function to display help message | |
show_help() { | |
cat << EOF | |
Usage: minecraft-start [options] <username> | |
Launch Minecraft with the specified username. | |
Arguments: |
This file contains hidden or 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 fcntl, os, re, sys, signal | |
from subprocess import Popen, PIPE | |
from termcolor import colored | |
from itertools import cycle | |
RE = re.compile(r'(?:\x1B[@-_]|[\x80-\x9F])[0-?]*[ -/]*[@-~]') | |
CLEARLN = "\033[2K\r" | |
def escape_ansi(s): | |
return RE.sub('', s) |
This file contains hidden or 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
from functools import wraps | |
class Ror: | |
def __init__(self, func, args, kwargs): | |
self.func = func | |
self.args = args | |
self.kwargs = kwargs | |
def __ror__(self, arg): | |
return self.func(arg, *self.args, **self.kwargs) |
This file contains hidden or 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/bash | |
# COLOR CODES | |
# Red 31 41 | |
# Green 32 42 | |
# Yellow 33 43 | |
# Blue 34 44 | |
# Magenta 35 45 | |
# Cyan 36 46 | |
# White 37 47 |
This file contains hidden or 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
state = { | |
"users": | |
User.mutable.all() > { | |
"tags": Tag.mutable.up().all(), | |
}, | |
"movie": | |
Movie.mutable.get(pk=91) > { | |
"actors": Actor.mutable.up().all(), | |
"style": Style.mutable.up().get(), | |
} |
This file contains hidden or 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
from collections import namedtuple | |
ATTR_LOOKUP = 1 | |
ITEM_LOOKUP = 2 | |
Change = namedtuple("Change", "path to") | |
class Lookup(namedtuple("Lookup", "key lookup_type")): | |
def __str__(self): | |
if self.lookup_type == ATTR_LOOKUP: |
NewerOlder