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/sh | |
# This script opens the last screenshot taken and runs OCR on it to extract text. | |
# It used tesseract (see https://tesseract-ocr.github.io/) | |
# Configured with Ubuntu's Screenshots folder. Change to your own. | |
SCREENSHOTS_DIR=$HOME/Pictures/Screenshots | |
# Create the folder to put the output into, if needed | |
mkdir -p $SCREENSHOTS_DIR/ocr_output |
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
""" | |
Modified langchain.agents.AgentExecutor that runs one step at a time. (Based on langchain 0.0.147) | |
See the example usage in main() at the bottom of this file. | |
""" | |
import time | |
from typing import Dict, Any, List, Union, Tuple, Iterator | |
from langchain.agents import AgentExecutor, ZeroShotAgent | |
from langchain.input import get_color_mapping | |
from langchain.llms.fake import FakeListLLM |
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
### Keybase proof | |
I hereby claim: | |
* I am didmar on github. | |
* I am didmar (https://keybase.io/didmar) on keybase. | |
* I have a public key ASCrIhT6oH3n7LdamwDGw7O-M13MXQS1I-DBPu0ybD2eIwo | |
To claim this, I am signing this object: |
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
Play this game by pasting the script in http://www.puzzlescript.net/editor.html |
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/sh | |
# Uninstall Nix, tested with Ubuntu 22.04 | |
# For your .bashrc and .zshrc, manually edit them to remove Nix related lines | |
for i in {1..32}; do sudo userdel nixbld${i}; done | |
sudo groupdel nixbld | |
sudo rm -rf /etc/nix /nix /var/root/.nix-profile /var/root/.nix-defexpr /var/root/.nix-channels \ |
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
Play this game by pasting the script in http://www.puzzlescript.net/editor.html |
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/sh | |
# Runs the given command and notifies you through Slack when its done ! | |
# You must first create a slack hook and set your username | |
URL="https://hooks.slack.com/services/T000000000/B0000000/xxxxxxxxxxxxxxx" | |
USERNAME="@your_user_name_here" | |
COMMAND=$* | |
$COMMAND | |
RET=$? |
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
## Shell command aliases for Docker | |
dockerip() { | |
# Get container ip | |
docker inspect --format '{{ .NetworkSettings.IPAddress }}' $1 | |
} | |
dockerkillall() { | |
printf "\n>>> Kill all running containers\n\n" && docker kill $(docker ps -q) | |
} | |
dockercleanc() { |