Skip to content

Instantly share code, notes, and snippets.

@raphaeldelio
raphaeldelio / AddressWithNumericIndexed.java
Created July 29, 2025 08:57
New test for testing generation of metamodel for fields annotated with @NumericField in nested classes
package valid;
import com.redis.om.spring.annotations.Indexed;
import com.redis.om.spring.annotations.NumericIndexed;
import com.redis.om.spring.annotations.Searchable;
import lombok.Data;
import lombok.NonNull;
import lombok.RequiredArgsConstructor;
@Data
@raphaeldelio
raphaeldelio / JedisPipeliningSample.java
Last active July 10, 2025 13:15
pipelining-sample
import redis.clients.jedis.*;
import java.util.ArrayList;
import java.util.List;
public class RedisStringBenchmarkTest {
static final int NUM_OBJECTS = 100_000;
static final int OBJECT_SIZE = 50000; // bytes
static final int BATCH_SIZE = 10_000; // control how many commands per pipeline execution
@raphaeldelio
raphaeldelio / jedis-issue.ipynb
Created June 2, 2025 06:46
Resource not being returned when executing transactions with JedisPooled
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@raphaeldelio
raphaeldelio / jedis-transaction-issue.ipynb
Created June 2, 2025 06:32
JedisPooled gets stuck when handling more than eight transactions in a row.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@raphaeldelio
raphaeldelio / main.java
Created January 15, 2025 17:51
Fine Tuning with DJL example
package dev.raphaeldelio;
import ai.djl.Model;
import ai.djl.basicdataset.cv.classification.ImageFolder;
import ai.djl.engine.Engine;
import ai.djl.modality.cv.transform.*;
import ai.djl.ndarray.NDList;
import ai.djl.ndarray.types.Shape;
import ai.djl.nn.Block;
import ai.djl.nn.Parameter;
import ai.djl.nn.SequentialBlock;
data class Product(
@Indexed
val name: String,
@Indexed
val price: Double
)
@Document
data class Store(
@Id
@Indexed
var id: String? = null,
@Indexed
var name: String,
@Searchable
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("org.springframework.boot") version "2.7.1"
id("io.spring.dependency-management") version "1.0.11.RELEASE"
kotlin("jvm") version "1.6.21"
kotlin("plugin.spring") version "1.6.21"
}
group = "com.raphaeldelio"
data class Product(
@Indexed
val name: String,
@Indexed
val price: Double
)
spring:
cloud:
gcp:
pubsub:
emulator-host: "localhost:8085" # Telling Spring to connect to this PubSub host and port
stream:
poller:
fixed-delay: 5000 # limiting the number of messages that will be generated by the supplier to one every five seconds
function:
definition: sumNumbers;generateNumbers #functions bound to Spring Cloud Stream