Skip to content

Instantly share code, notes, and snippets.

View andrewxhill's full-sized avatar

Andrew W. Hill andrewxhill

View GitHub Profile
import { Agent } from '@mastra/core';
import { MCPConfiguration } from '@mastra/mcp';
import { anthropic } from '@ai-sdk/anthropic';
import { config } from 'dotenv';
import { ChainOfThoughtLog, TradingPrediction, TokenPriceData, AgentStrategy, storeChainOfThought, storePrediction, storeTokenPriceData, storeAgentStrategy, initializeBucket } from './recall-client.js';
// Load environment variables
config();
// Validate required environment variables
@andrewxhill
andrewxhill / setup.sh
Created March 7, 2025 00:02
setup a basic recall agent
#!/bin/bash
# =============================================================================
# Crypto Trading Opportunity Detection Agent Setup Script
# Created by: Claude Code
# Version: 1.0.0
# =============================================================================
# Color definitions for better readability
GREEN='\033[0;32m'
@andrewxhill
andrewxhill / setup.sh
Created March 6, 2025 15:16
setup script for recall agent starter kit
#!/bin/bash
# Colors for better readability
GREEN='\033[0;32m'
BLUE='\033[0;34m'
YELLOW='\033[1;33m'
RED='\033[0;31m'
NC='\033[0m' # No Color
echo -e "${BLUE}======================================================${NC}"
@andrewxhill
andrewxhill / Random Access File Formats.md
Last active August 27, 2024 16:59
example random access formats
File Format Indices (within file) Index Types Sharding Analysis Library DB Interfaces (Examples) Performance Granularity Compression Data Types Durability Security Community/Support Maturity Cost/License Basin Use-cases
Nimble Columns and streams Block encoding, cascading (recursive/composite) encoding, pluggable encoding selection policies Supported Flatbuffers, SIMD, GPU Designed for wide workloads, extensibility APIs Thousands to tens of thousands of columns and streams Flatbuffers, block encoding, recursive/composite encoding Many, with extensibility for additional encodings In development, no stability/versioning guarantees yet Focus on a single unified library to prevent fragmentation Work in progress, community support through Meta Active development, no stable release yet Open-source, dependenc
@andrewxhill
andrewxhill / README.md
Last active September 3, 2024 15:36
A list of frameworks for decision making and where they are most helpful.
Framework (starter video) Internal & External Factors Analysis Competitive Environment Analysis Product/Market Growth Strategy Performance Measurement Decision Path Analysis Financial Evaluation Risk Identification & Management Organizational Alignment
SWOT Analysis
PESTLE Analysis
@andrewxhill
andrewxhill / Chain Of Trust (but verify).ipynb
Last active March 5, 2025 14:31
Chain of Trust - but verify...
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@andrewxhill
andrewxhill / TransferLogs.sol
Created May 4, 2023 18:53
Generate queryable ownership records and transfer logs in any ERC721. This example is extending OpenZepplin functions. You can see the contract here https://mumbai.polygonscan.com/address/0xB837771546756D58d2EB79CDb0281Bc5F84bC704 and the owner logs here https://testnets.opensea.io/assets/mumbai/0x4b48841d4b32c4650e4abc117a03fe8b51f38f68/5969 an…
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;
import "@openzeppelin/contracts@4.8.3/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts@4.8.3/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts@4.8.3/token/ERC721/utils/ERC721Holder.sol";
import "@openzeppelin/contracts@4.8.3/access/Ownable.sol";
import "@openzeppelin/contracts@4.8.3/utils/Counters.sol";
import "@tableland/evm/contracts/ITablelandTables.sol";
import "@tableland/evm/contracts/utils/TablelandDeployments.sol";
@andrewxhill
andrewxhill / ReadTablelandValue.sol
Last active November 29, 2022 00:24
Uses midpointapi.com to return a single cell value from any table or sql request on Tableland
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.17;
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableMap.sol";
interface IMidpoint {
function callMidpoint(uint64 midpointId, bytes calldata _data) external returns(uint256 requestId);
}
// trigger bridge deposit for a user with their wallet
const onSubmit = () => {
api
.addDeposit()
.then(() => setDeposit(true))
.catch((err: Error) => alert(err.message));
};