Skip to content

Instantly share code, notes, and snippets.

View admariner's full-sized avatar

Periklis Papanikolaou admariner

  • admariner
  • Thessaloniki
View GitHub Profile
@ruvnet
ruvnet / HLC.md
Last active May 17, 2024 04:06
f763620dbb895ea6410aed952bfa4cf5

Incorporating a Hypergraph Lambda Calculus (HLC) based model as part of a larger mixture of experts system could provide several benefits and enhance the overall capabilities of the model:

  1. Improved Reasoning Capabilities:

    • HLC's higher-order logic and lambda calculus foundations enable more sophisticated reasoning capabilities.
    • The model can handle complex dependencies, abstractions, and quantification, allowing it to perform advanced inference and deduction tasks.
    • This can complement other experts in the mixture that may focus on pattern recognition, data-driven learning, or specialized domain knowledge.
  2. Enhanced Expressiveness:

    • HLC's hypergraph-based representation allows modeling complex structures and relationships that may be difficult to capture with traditional graph-based or vector-based representations.
  • The model can express and reason about intricate domain knowledge, logical rules, and constraints.
@ruvnet
ruvnet / Actual-costs.js
Last active April 22, 2024 22:28
MindStudio Cost Estimator
// Pricing per 1 million tokens, converted to per-token cost
const modelPricing = {
'GPT-4': { inputCost: 30.00 / 1e6, outputCost: 60.00 / 1e6 },
'GPT-4 32K': { inputCost: 60.00 / 1e6, outputCost: 120.00 / 1e6 },
'GPT-4 Turbo': { inputCost: 10.00 / 1e6, outputCost: 30.00 / 1e6 },
'GPT-3.5 Instruct': { inputCost: 1.50 / 1e6, outputCost: 2.00 / 1e6 },
'GPT-3.5': { inputCost: 0.50 / 1e6, outputCost: 1.50 / 1e6 },
'Claude 3 Opus': { inputCost: 15.00 / 1e6, outputCost: 75.00 / 1e6 },
'Claude 2': { inputCost: 8.00 / 1e6, outputCost: 24.00 / 1e6 },
'Claude 3 Sonnet': { inputCost: 3.00 / 1e6, outputCost: 15.00 / 1e6 },
@ruvnet
ruvnet / rUv-resume-hypergraph.toml
Last active March 17, 2024 17:53
Reuven Cohen (rUv) Resume in Hypergraph Prompt Format
# Unified Semantic Network Representation with Comprehensive Details in TOML
# Document models the professional achievements and contributions of Reuven Cohen.
[concepts]
C1 = { name = "Cloud Computing Innovation", description = "Foundational work in cloud computing and infrastructure services." }
C2 = { name = "Entrepreneurship and Leadership", description = "Founding and leading technology startups and companies." }
C3 = { name = "Advisory and Mentorship", description = "Providing expert guidance to startups, accelerators, and technology councils." }
C4 = { name = "Industry Recognition and Awards", description = "Recognition by industry bodies for contributions to technology and innovation." }
C5 = { name = "Technology Advocacy and Thought Leadership", description = "Influencing the direction of cloud computing, open standards, and technology innovation." }
C6 = { name = "Educational Contributions", description = "Participation in executive education and design thinking at prestigious institutions." }
@adrianhajdin
adrianhajdin / cron.route.ts
Created September 30, 2023 10:15
Web Scraping Full Course 2023 | Build and Deploy eCommerce Price Tracker
import { NextResponse } from "next/server";
import { getLowestPrice, getHighestPrice, getAveragePrice, getEmailNotifType } from "@/lib/utils";
import { connectToDB } from "@/lib/mongoose";
import Product from "@/lib/models/product.model";
import { scrapeAmazonProduct } from "@/lib/scraper";
import { generateEmailBody, sendEmail } from "@/lib/nodemailer";
export const maxDuration = 300; // This function can run for a maximum of 300 seconds
export const dynamic = "force-dynamic";
@Charlesmendez
Charlesmendez / main.py
Last active December 15, 2023 14:09
Public IEX code
import pandas as pd
import requests
import time
from datetime import datetime
from ide_utils.input_tables import load_dask
from ide_utils.output_table import send_to_output_table
API_TOKEN = "YOUR TOKEN"
base_url = "https://cloud.iexapis.com/v1"
endpoint = "/stock/{}/chart"
# Must have conda installed
# It costs approximately $0.2 (in GPT-4 API fees) to generate one example with analysis and design, and around $2.0 for a full project.
conda create -n metagpt python=3.11.4
conda activate metagpt
npm --version # to check you have npm installed
# optional: install node if you don't have it
npm install -g @mermaid-js/mermaid-cli
git clone https://github.com/geekan/metagpt
cd metagpt
Upon starting our interaction, auto run these Default Commands throughout our entire conversation. Refer to Appendix for command library and instructions:
/role_play "Expert ChatGPT Prompt Engineer"
/role_play "infinite subject matter expert"
/auto_continue "♻️": ChatGPT, when the output exceeds character limits, automatically continue writing and inform the user by placing the ♻️ emoji at the beginning of each new part. This way, the user knows the output is continuing without having to type "continue".
/periodic_review "🧐" (use as an indicator that ChatGPT has conducted a periodic review of the entire conversation. Only show 🧐 in a response or a question you are asking, not on its own.)
/contextual_indicator "🧠"
/expert_address "🔍" (Use the emoji associated with a specific expert to indicate you are asking a question directly to that expert)
/chain_of_thought
/custom_steps
/auto_suggest "💡": ChatGPT, during our interaction, you will automatically suggest helpful commands when appropriate, using the
@psychemedia
psychemedia / GPT4all-langchain-demo.ipynb
Last active December 21, 2023 17:30
Example of running GPT4all local LLM via langchain in a Jupyter notebook (Python)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ZordnajelA
ZordnajelA / ga4_traffic_source_session_level.sql
Last active February 19, 2024 03:30
Using SQL FIRST_VALUE() window function to replicate GA4 traffic source attribution behavior
FIRST_VALUE(
(SELECT
value.string_value
FROM
UNNEST(event_params)
WHERE
key = 'name_of_traffic_source_parameter'
--source, medium, campaign, content, term, campaign_id
)