This file contains hidden or 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
<!-- | |
https://github.com/evansque/polygonize | |
--> | |
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> | |
<div class="container"> | |
<header id="header"> | |
<div class="cell-size-value-wrapper"> | |
<span>Cell size:</span> | |
<span id="cell-size-value">30</span> |
This file contains hidden or 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
from datetime import datetime | |
import urllib.request | |
import base64 | |
import json | |
import time | |
import os | |
webui_server_url = 'http://127.0.0.1:7860' | |
out_dir = 'api_out' |
This file contains hidden or 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
"""QA Chatbot streaming using FastAPI, LangChain Expression Language , OpenAI, and Chroma. | |
Features | |
-------- | |
- Persistent Chat Memory: | |
Stores chat history in a local file. | |
- Persistent Vector Store: | |
Stores document embeddings in a local vector store. | |
- Standalone Question Generation: | |
Rephrases follow-up questions to standalone questions in their original language. |
This file contains hidden or 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
atl*CLI> core show help | |
! -- Execute a shell command | |
acl show -- Show a named ACL or list all named ACLs | |
ael reload -- Reload AEL configuration | |
ael set debug {read|tokens|macros|contexts|off} -- Enable AEL debugging flags | |
agi dump html -- Dumps a list of AGI commands in HTML format | |
agi exec -- Add AGI command to a channel in Async AGI | |
agi set debug [on|off] -- Enable/Disable AGI debugging | |
agi show commands [topic] -- List AGI commands or specific help | |
aoc set debug -- enable cli debugging of AOC messages |
This file contains hidden or 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
# install docker in Debian 11/WSL2 | |
# uses systemd-genie since docker requires systemd but it's not available for WSL | |
# this is an alternative to Docker Desktop | |
# prerequisites | |
sudo apt-get update | |
sudo apt-get dist-upgrade | |
sudo apt-get install ca-certificates curl wget gnupg lsb-release apt-transport-https | |
# systemd-genie requires dotnet runtime, add Microsoft repo |
This file contains hidden or 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
const _ = require('lodash') | |
const actionTree = generateActionTree() | |
const steps = resolveDependencies(actionTree) | |
console.log(steps) | |
function resolveDependencies(cmds) { | |
const dependencies = fetchDependencies(actionTree) | |
const steps = chunkIntoSteps(dependencies) | |
return steps |
This file contains hidden or 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
// function binomialCoeff(n, k) { | |
// if ((k === 0) || (k === n)) { | |
// return 1n | |
// } else { | |
// return binomialCoeff(n - 1n, k - 1n) + binomialCoeff(n - 1n, k) | |
// } | |
// } | |
// function isDivisible(value) { |
This file contains hidden or 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
const express = require('express'); | |
const request = require('request-promise'); | |
const PORT = process.env.PORT || 5000; | |
const app = express(); | |
app.use(express.json()); | |
const returnScraperApiUrl = (apiKey) => `http://api.scraperapi.com?api_key=${apiKey}&autoparse=true`; |
This file contains hidden or 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 { createContext, ReactNode, useEffect, useState } from 'react' | |
type Theme = 'light' | 'dark'; | |
type ThemeContextProviderProps = { | |
children: ReactNode; | |
} | |
type ThemeContextType = { | |
theme: Theme; |
This file contains hidden or 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
/* Hide border on tab bar, force its state to 'scroll', adjust margin-left for width of scrollbar. | |
#tabbar { | |
border: 0; | |
overflow-y: scroll !important; | |
margin-left: -18px !important; | |
} | |
*/ | |
/* Hide .twisty and adjust margins so favicons have 7px on left. */ | |
.tab .twisty { |
NewerOlder