Skip to content

Instantly share code, notes, and snippets.

""" GPT-4 Bot For Slack """
import os, json, re, faiss, pickle
from dotenv import load_dotenv
from flask import Flask, request
from slack_sdk import WebClient
from slack_bolt import App, Say
from slack_bolt.adapter.flask import SlackRequestHandler
from langchain.chat_models import ChatOpenAI
from langchain import PromptTemplate, LLMChain
from langchain.chains import OpenAIModerationChain, SequentialChain, LLMChain, SimpleSequentialChain
To create an Ethereum paywall in a React app using Hardhat, you can follow the steps below. This guide assumes you have Node.js, npm, and the MetaMask browser extension installed and set up.
Step 1: Set up the React app
First, create a new React app using the command:
```
npx create-react-app ethereum-paywall
```
Step 2: Install dependencies
@normandmickey
normandmickey / AsyncWebServer.ino
Created February 9, 2021 02:34
ESP32 Async Web Server for LNBits - LNURLp
#include "WiFi.h"
#include "ESPAsyncWebServer.h"
const char* ssid = "SSID";
const char* password = "PASSWORD";
AsyncWebServer server(80);
void setup() {
Serial.begin(115200);
#include <ezTime.h>
#include <M5ez.h>
#include <M5Stack.h>
#include <ArduinoJson.h>
#include <HTTPClient.h>
String ONApiKey = "Replace with your ON ApiKey";
String currency = "USD";
void setup() {
@normandmickey
normandmickey / M5Stack1
Created October 26, 2019 18:41
M5Stack
#include <ezTime.h>
#include <M5ez.h>
#include <M5Stack.h>
#include <ArduinoJson.h>
#include <HTTPClient.h>
void setup() {
ez.begin();
}
@normandmickey
normandmickey / BTCPayServer-RaspiblitzV1.3-RPI4B
Last active October 30, 2021 02:23
Install BTCPayServer on Raspiblitz V1.3 - Raspberry Pi 4B
These instructions are outdated.
Please visit https://btcpi.com for detailed instructions on installing BTCPayServer on the Raspberry Pi 4B.
#Install Dot-Net for ARM
cd /home/admin
sudo apt-get -y install libunwind8 gettext libssl1.0
wget https://download.visualstudio.microsoft.com/download/pr/9650e3a6-0399-4330-a363-1add761127f9/14d80726c16d0e3d36db2ee5c11928e4/dotnet-sdk-2.2.102-linux-arm.tar.gz
wget https://download.visualstudio.microsoft.com/download/pr/9d049226-1f28-4d3d-a4ff-314e56b223c5/f67ab05a3d70b2bff46ff25e2b3acd2a/aspnetcore-runtime-2.2.1-linux-arm.tar.gz
sudo mkdir /opt/dotnet
@normandmickey
normandmickey / keybase.md
Created February 23, 2019 13:15
Keybase

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@normandmickey
normandmickey / wpa_supplicant.conf
Created February 22, 2019 03:09
Raspbian Stretch - WPASupplicant File
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
country=US
network={
ssid="ssid"
psk="password"
key_mgmt=WPA-PSK
}
@normandmickey
normandmickey / BTCPi
Last active October 29, 2021 11:45
Install BTCPayServer on Raspberry Pi with Pruning and Fast Sync
Order from Lightning in a Box https://lightninginabox.co/product/btcpi/
or
Visit BTCPi.com for DIY instructions.
@normandmickey
normandmickey / BTCPayServer on Raspiblitz
Last active January 18, 2020 22:06
Install BTCPayServer on RaspiBlitz
#Install Dot-Net for ARM
cd /home/admin
sudo apt-get -y install libunwind8 gettext
wget https://download.visualstudio.microsoft.com/download/pr/9650e3a6-0399-4330-a363-1add761127f9/14d80726c16d0e3d36db2ee5c11928e4/dotnet-sdk-2.2.102-linux-arm.tar.gz
wget https://download.visualstudio.microsoft.com/download/pr/9d049226-1f28-4d3d-a4ff-314e56b223c5/f67ab05a3d70b2bff46ff25e2b3acd2a/aspnetcore-runtime-2.2.1-linux-arm.tar.gz
sudo mkdir /opt/dotnet
sudo tar -xvf dotnet-sdk-2.2.102-linux-arm.tar.gz -C /opt/dotnet/
sudo tar -xvf aspnetcore-runtime-2.2.1-linux-arm.tar.gz -C /opt/dotnet/
sudo ln -s /opt/dotnet/dotnet /usr/local/bin
dotnet --info