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
# Ask questions about a document using Ollama and Langchain. | |
# This leverages a local LLM to provide insights into any document. | |
# It's far from perfect, as it's power is limited by the LLM size. | |
# It leverages the langchain library to perform tasks like document loading, | |
# text splitting, embedding generation, and using the Ollama client for generating answers. | |
# You need to have Ollama installed (with model llama2:13b available). See https://github.com/jmorganca/ollama | |
# Usage: |
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 argparse | |
import subprocess | |
import os | |
import math | |
from openai import OpenAI | |
MAX_SIZE = 26214400 # Maximum file size (in bytes) | |
# Parse command line arguments | |
parser = argparse.ArgumentParser( |
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
#!/bin/python3 | |
# Converts Revolut CSV format into a CSV table | |
# format which is easier for automated processing. | |
# | |
# Removes the following categories automatically: | |
# general, transfers | |
# | |
# Usage: | |
# |
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
#!/bin/python3 | |
# Converts Swedbank CSV format into a CSV table | |
# format which is easier for automated processing. | |
# | |
# Usage: | |
# | |
# 1. Save file as swedbank-csv.py and open terminal in folder location. | |
# 2. In termial: python3 swedbank-csv.py -i <path to source CSV> | |
# 3. For more info, run: python3 swedbank-csv.py --help |
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
<script src="https://cdn.jsdelivr.net/gh/amark/gun@master/gun.js"></script> | |
<script src="https://cdn.jsdelivr.net/gh/amark/gun@master/sea.js"></script> | |
<!-- <script src="https://cdn.jsdelivr.net/npm/gun/gun.js"></script> | |
<script src="https://cdn.jsdelivr.net/npm/gun/sea.js"></script> --> | |
<script src="https://cdn.jsdelivr.net/npm/lodash@4.17.15/lodash.min.js"></script> | |
<script> | |
;(() => { | |
// Reset by uncommenting the next line, run once and comment out again. | |
// sessionStorage.clear(); | |
localStorage.clear(); |
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
# Deletes old bot Slack messages using slack_cleaner2 | |
# https://github.com/sgratzl/slack-cleaner | |
# Usage: | |
# 1. Install slack_cleaner2 and Arrow | |
# 2. Run with token as CLI arg. E.g. `python slack_cleaner.py <token xoxp-...>` | |
import arrow | |
import time | |
import sys | |
from slack_cleaner2 import * |
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
<html><body> | |
<style> | |
html, body { | |
background: rgb(245, 245, 245); | |
margin: 0; | |
padding: 0; | |
} | |
div { | |
position: relative; | |
overflow: hidden; |