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 urllib.request, time, json, datetime, socket, re, tiktoken, openai, os | |
import numpy as np | |
import pandas as pd | |
from openai.embeddings_utils import distances_from_embeddings | |
# Usage: OPENAI_API_KEY="key-here" python3 pln_qa.py | |
MODELS = {"text-ada-001": 0.0004, "text-babbage-001": 0.0005, "text-curie-001": 0.002, "text-davinci-001": 0.02, "gpt-3.5-turbo": (0.0015, 0.002)} | |
model = "gpt-3.5-turbo" | |
DB = 'pln_db-noembed.csv' |
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
// ==UserScript== | |
// @name Bluesky Word Filters | |
// @namespace https://staging.bsky.app/ | |
// @version 0.3 | |
// @description remove junk posts from feeds (does't hide from profiles) | |
// @author Discordian | |
// @match https://staging.bsky.app/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net | |
// @grant none | |
// ==/UserScript== |
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 requests, json, time, threading, base64, math | |
# NOTE: This only works with go-ipfs v0.10.0 or *earlier* /w pubsub enabled. | |
# Use full path to circuit, destination will be appended (you must change these, they are node specific) | |
CIRCUITS = ["/dns6/ipfs.thedisco.zone/tcp/4430/p2p/12D3KooWChhhfGdB9GJy1GbhghAAKCUR99oCymMEVS4eUcEy67nt/p2p-circuit/p2p/", "/dns4/ipfs.thedisco.zone/tcp/4430/p2p/12D3KooWChhhfGdB9GJy1GbhghAAKCUR99oCymMEVS4eUcEy67nt/p2p-circuit/p2p/"] | |
# The address of your local node (must be accepting websockets and be reverse proxied with SSL support for wss) | |
NODE = "http://localhost:5001" | |
# Used for trying to track already announced peers |