Skip to content

Instantly share code, notes, and snippets.

@markrmiller
markrmiller / build_pylucene.sh
Created August 3, 2025 00:04
build pylucene
#!/usr/bin/env bash
set -Eeuo pipefail
trap 'echo "❌ failed at line ${LINENO}" >&2' ERR
LUCENE_VER=10.0.0
WORKDIR=$(pwd)/pylucene-trunk
PYLUCENE=$WORKDIR/lucene-pylucene
LUCENE_DIR=$PYLUCENE/lucene-java-$LUCENE_VER
JAVA_HOME=/usr/lib/jvm/java-21-openjdk
JDK_PKG=jdk21-openjdk
@torch.no_grad()
def __call__(
self,
video_path: str,
audio_path: str,
video_out_path: str,
video_mask_path: str = None,
num_frames: int = 16,
video_fps: int = 25,
audio_sample_rate: int = 16000,
import java.io.IOException;
import java.lang.invoke.MethodHandles;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;
#!/bin/bash
# Define Solr version
SOLR_VERSION="9.5.0"
SOLR_COLLECTION="testCreateWithDefaultConfigSet"
SOLR_ZK="localhost:14332/solr"
SOLR_DIR="solr-$SOLR_VERSION"
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
import tkinter as tk
import os
import glob
from pathlib import Path
from tkinter import filedialog
from PIL import Image, ImageTk
class ImageManager:
@markrmiller
markrmiller / asf-oauth-example.py
Created October 12, 2021 05:22 — forked from Humbedooh/asf-oauth-example.py
ASF Oauth Examples
#!/usr/bin/env python3
""" ASF OAuth example in Python 3"""
import cgi
import os
import requests
import urllib
import uuid
def init_oauth():
[
{
"jmhVersion" : "1.32",
"benchmark" : "org.apache.lucene.jmh.benchmarks.search.FuzzyQuery2.fuzzySearch",
"mode" : "thrpt",
"threads" : 1,
"forks" : 1,
"jvm" : "/opt/hostedtoolcache/jdk/11.0.12/x64/bin/java",
"jvmArgs" : [
"-Djmh.shutdownTimeout=5",