- Create a new directory with these three files (requirements.txt, main.py, README.md)
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python main.py
- Update
main()
to run the example prompt chains
Discover gists
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 os | |
import asyncio | |
import requests | |
import time | |
import json | |
import openai | |
from urllib.parse import quote_plus | |
from openai import OpenAI | |
from dotenv import load_dotenv |
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
#! /usr/bin/env sh | |
# A hyprland script for a laptop-external-monitor setup, toggling between which is in use | |
# Launch at startup to make hyprland disable the internal monitor if an external monitor is detected and enabled | |
# Additionally it's called with a keybind to switch between a laptop monitor and an external display | |
# Ideally the conditional monitor behaviour was instead done directly in hyprland.conf, but I'm not sure whether that's possible | |
# | |
# Relevant info: | |
# - hyprctl monitors: identifies currently enabled monitors |
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
async function check(req, res) { | |
const walletInfo = req.body.walletInfo as Wallet | |
if (!walletInfo?.connectItems?.tonProof) { | |
return res.status(httpStatus.BAD_REQUEST).send({ ok: false }) | |
} | |
const proof = walletInfo.connectItems.tonProof as TonProofItemReplySuccess | |
if (!proof) { | |
return res.status(httpStatus.BAD_REQUEST).send({ ok: false }) | |
} | |
This is not working complete code.
This is strictly a v0, scrapy, proof of concept for the first version of a personal AI Assistant working end to end in just ~322 LOC.
It's only a frame of reference for you to consume the core ideas of how to build a POC of a personal AI Assistant.
To see the high level of how this works check out the explanation video. To follow our agentic journey check out the @IndyDevDan channel.
Stay focused, keep building.
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
var crypto = require('crypto'); | |
// larger numbers mean better security, less | |
var config = { | |
// size of the generated hash | |
hashBytes: 32, | |
// larger salt means hashed passwords are more resistant to rainbow table, but | |
// you get diminishing returns pretty fast | |
saltBytes: 16, | |
// more iterations means an attacker has to take longer to brute force an |
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
defmodule Datalog do | |
defstruct rules: [], facts: %{} | |
alias Datalog.{Fact, Rule} | |
alias __MODULE__ | |
def new, do: %__MODULE__{} | |
def add_rule(%Datalog{rules: rules} = datalog, %Rule{} = rule) do | |
{:ok, %Datalog{datalog | rules: [rule | rules]}} |
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import gi | |
gi.require_version('EvinceView', '3.0') | |
gi.require_version('EvinceDocument', '3.0') | |
gi.require_version('Gtk', '3.0') | |
gi.require_version('Gdk', '3.0') | |
from gi.repository import Gtk, Gdk | |
from gi.repository import EvinceDocument | |
from gi.repository import EvinceView |
NewerOlder