Skip to content

Instantly share code, notes, and snippets.

@hhsecond
hhsecond / multipleModelsinRedisAI.py
Last active February 13, 2024 13:43
This script shows how to use RedisAI to store and serve multiple models. It uses redisai-py==0.9.0 and ml2rt as external dependencies
#############################################################
# Script is using input resources from redisai-example repo #
# https://github.com/RedisAI/redisai-examples #
# #
#############################################################
from pathlib import Path
import multiprocessing
import redisai
import ml2rt
@hhsecond
hhsecond / nrrd2jpg.py
Created April 29, 2020 09:37
Convert nrrd files to jpgs. This is used as the preprocessing stage for coviddata.store
#########################################################
# It needs python3.x, scipy 1.2.3 and medpy to work #
# pip install scipy==1.2.3 #
# pip install MEDPY #
#########################################################
import argparse
import json
from pathlib import Path
@hhsecond
hhsecond / loops.ts
Created January 31, 2024 05:52
Loops client
import LoopsClient from "loops";
function getLoopsClient(): LoopsClient {
if (!process.env.LOOPS_APIKEY) {
throw new Error("Missing LOOPS_APIKEY environment variable");
}
return new LoopsClient(process.env.LOOPS_APIKEY);
}
interface DataVariables {