Skip to content

Instantly share code, notes, and snippets.

View louis030195's full-sized avatar

louis030195 louis030195

View GitHub Profile
View humeAi.js
const createJob = async (image) => {
const url = 'https://api.hume.ai/v0/batch/jobs';
const formData = new FormData();
formData.append('file', image);
const response = await fetch(url, {
method: 'POST',
headers: {
'X-Hume-Api-Key': process.env.HUME_API_KEY,
'Accept': 'application/json',
View posthog_bounce_rate.sql
SELECT
(COUNT(DISTINCT CASE
WHEN (raw_session_replay_events.click_count = 0 AND raw_session_replay_events.active_milliseconds < 60000)
THEN raw_session_replay_events.session_id
ELSE NULL
END) * 100.0) / COUNT(DISTINCT properties.$session_id) AS bounce_rate
FROM
events
INNER JOIN
raw_session_replay_events ON events.properties.$session_id = raw_session_replay_events.session_id
View messy_imagebind_playground.py
import data
import torch
from models import imagebind_model
from models.imagebind_model import ModalityType
import uvicorn
from fastapi import FastAPI
import requests
device = "cuda:0" if torch.cuda.is_available() else "cpu"
@louis030195
louis030195 / pushing_your_brain_waves_to_permaweb.ts
Created July 22, 2023 00:47
Pushing your electrical brain activity from Neurosity Crown to Arweave, the permaweb
View pushing_your_brain_waves_to_permaweb.ts
import Bundlr from "@bundlr-network/client";
import fs from "fs";
import Arweave from "arweave";
import { Neurosity } from "@neurosity/sdk";
const jwk = JSON.parse(fs.readFileSync("wallet.json").toString());
const neurosity = new Neurosity();
neurosity.login({
email: process.env.NEUROSITY_EMAIL!,
View brainwaves.py
from websockets import connect
import json
import numpy as np
from sklearn.decomposition import IncrementalPCA as PCA
import streamlit as st
import plotly.graph_objects as go
# Create initial figure
fig = go.Figure()
View s1s2llm.md

Today, I bring to you a thought-provoking concept: the amalgamation of technology and psychology, or more specifically, the application of System 1 and System 2 LLMs in AI programming. This idea was born from two main observations I made.

Firstly, there is the revolutionary technology of "embeddings" that has seen its usage skyrocket since 2022. It allows us to create a programmable memory for AI, thus eliminating the need to grapple with prompt engineering. I began to ponder if there could be a more efficient alternative to embeddings, one that utilizes fast and economical LLMs.

Secondly, the theory of System 1 and System 2 in psychology, which speaks about two different decision-making processes in our brain, caught my attention. System 1 corresponds to our intuitive, automatic, often subconscious thought process, like recognizing facial expressions. On the other hand, System 2 is deliberate, slower, and more logical, like solving complex math problems.

Inspired by this theory, I began to explore the po

@louis030195
louis030195 / mineflayerGithubRepoReadingAssistant.js
Last active July 4, 2023 20:10
shitty attempt to build a mineflayer ai assistant to create bots :D
View mineflayerGithubRepoReadingAssistant.js
const { exec } = require('child_process');
const recursive = require("recursive-readdir");
const { Configuration, OpenAIApi } = require("openai");
const readline = require('readline');
const fs = require('fs');
const path = require('path');
async function listModels() {
const response = await fetch("https://api.airtable.com/v0/appwJMZ6IAUnKpSwV/all", {
@louis030195
louis030195 / becoming_a_motley_host.md
Last active July 6, 2023 21:58
Becoming a Motley host, supporting @louis030195 initiative to assemble a decentralized llm network, for more details, read https://motley-ai.vercel.app/
@louis030195
louis030195 / consumingMotleyLLMs.js
Last active July 4, 2023 18:36
Consume Motley LLMs for free, read more at https://motley-ai.vercel.app/ or contact louis030195 on discord
View consumingMotleyLLMs.js
const { Configuration, OpenAIApi } = require("openai");
/**
* Lists all models available on the platform.
* @async
* @returns {Promise<Object>} A promise that resolves to an object containing a list of models.
* @example
* listModels().then(models => console.log(models));
*/
View motley.js
/**
* Lists all models available on the platform.
* @async
* @returns {Promise<Object>} A promise that resolves to an object containing a list of models.
* @example
* listModels().then(models => console.log(models));
*/
async function listModels() {
const response = await fetch("https://api.airtable.com/v0/appwJMZ6IAUnKpSwV/all", {
headers: {