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
# 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 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 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 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
#!/bin/bash -e | |
# | |
# Improved backup script for Ubiquiti UniFi controller | |
# original source: http://wiki.ubnt.com/UniFi#Automated_Backup | |
# | |
# must contain: | |
# username=<username> | |
# password=<password> | |
source ~/.unifi-backup |
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
##---------------Begin: proguard configuration common for all Android apps ---------- | |
-optimizationpasses 5 | |
-dontusemixedcaseclassnames | |
-dontskipnonpubliclibraryclasses | |
-dontskipnonpubliclibraryclassmembers | |
-dontpreverify | |
-verbose | |
-dump class_files.txt | |
-printseeds seeds.txt | |
-printusage unused.txt |