Discover gists
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 |
#! /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 |
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.
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 |
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]}} |
#!/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 |
Note: This gist may be outdated, thanks to all contributors in comments.
adb
is the Android CLI tool with which you can interact with your android device, from your PC
You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.
Don't hesitate to read comments, there is useful tips, thanks guys for this !