Skip to content

Instantly share code, notes, and snippets.

View dtaivpp's full-sized avatar

David Tippett dtaivpp

View GitHub Profile
dtaivpp /
Last active May 16, 2024 16:03
Shows how to use semantic search locally on OpenSearch using Distillibert.

Local Semantic Search in OpenSearch!

If you'd like to watch this demo through it's available on YouTube or if you prefer reading there is a walkthrough on my blog.

Cluster settings for Amazon OpenSearch and Locally running

PUT /_cluster/settings
    "persistent": {
        "plugins.ml_commons.only_run_on_ml_node": false,
dtaivpp /
Last active June 14, 2024 16:56
This is a shell script for setting up a single node cluster for OpenSearch. This is something you can use in local development. It creates a secret password that is random every time.
# 1. To run this script curl it locally:
# curl -o
# 2. Change it to be executable:
# chmod +x
# 3. Run it:
# ./
# This will create:
# - docker-compose.yml file for OpenSearch

Semantic Search with OpenSearch and Cohere

Cluster Settings:

PUT /_cluster/settings
    "persistent": {
        "plugins.ml_commons.allow_registering_model_via_url": true,
        "plugins.ml_commons.only_run_on_ml_node": false,
        "plugins.ml_commons.connector_access_control_enabled": true,
dtaivpp /
Created April 27, 2023 16:01
This is a workflow to share docker containers/images by exporting and then importing them.

Find the image to save

docker images

Save to destination

docker save -o /path/to/output.tar org/container


docker docker load -i /path/to/output.tar

dtaivpp / old-opensearch-docker-compose.yml
Last active May 13, 2024 16:18
A single node OpenSearch and OpenSearch dashboards docker compose.
image: opensearchproject/opensearch:${OPENSEARCH_VERSION:-2.11.1}
container_name: opensearch
discovery.type: single-node opensearch
OPENSEARCH_JAVA_OPTS: "-Xms512m -Xmx512m"
- opensearch-data:/usr/share/opensearch/data
dtaivpp /
Last active December 3, 2023 14:42
An introduction to logging in Python!
# Download this file with:
# curl -L -o
import logging
# Named loggers
logger = logging.getLogger(__name__)
dtaivpp / nvidia-containerd-config.toml
Created July 25, 2022 14:40
Containerd config.toml for Nvidia-Container-Runtime
version = 2
default_runtime_name = "nvidia"
privileged_without_host_devices = false
runtime_engine = ""
usage: ghdorker [-h] [-v] [-s {repo,user,org}] [-d DORKS] [--debug] [-o OUTPUT_FILENAME] [--options INPUT_OPTION [INPUT_OPTION ...]] search
Search github for github dorks
positional arguments:
search The repo, username, or organization you would like to search
optional arguments:
-h, --help show this help message and exit
-v, --version show program's version number and exit
dtaivpp /
Created September 28, 2021 15:14
This is a quick script for scraping over a terraform directory and extracting the resources used
import yaml
import os
yaml_files = []
rootDir = '.'
for dirName, subdirList, fileList in os.walk(rootDir):
for fname in fileList:
if fname[-4:] == 'yaml':
yaml_files.append( dirName + "/" + fname)
"name": "Python 3",
"build": {
"dockerfile": "Dockerfile",
"context": "..",
"args": {
// Update 'VARIANT' to pick a Python version: 3, 3.6, 3.7, 3.8, 3.9
"VARIANT": "3",
// Options
"INSTALL_NODE": "true",