Skip to content

Instantly share code, notes, and snippets.

@Nahuel990
Nahuel990 / vsrq.py
Created October 12, 2025 12:44
Variable-Stage Residual Quantization (VSRQ)
import numpy as np
import faiss
from sentence_transformers import SentenceTransformer
from sklearn.neighbors import NearestNeighbors
from tqdm import tqdm
# CONFIG - IMPROVED
N = 100_000
Qn = 2_000
M_MAX = 8
(function autoCompleteUdemy() {
const interval = setInterval(() => {
// Handle the accordion toggle buttons: Open any closed panels
const accordionToggles = document.querySelectorAll('.js-panel-toggler[aria-expanded="false"]');
accordionToggles.forEach((toggle) => {
toggle.click(); // Simulate click to expand section
console.log("Expanded section");
});
// Find the checkbox to mark as complete (if not already checked)
@Nahuel990
Nahuel990 / reduxSample.js
Created October 2, 2019 23:02
Basic redux sample
const reducer = (state = [], action) => {
if (action.type === 'split'){
return action.payload.split('')
}
return state
};
const store = Redux.createStore(reducer);
//displays empty array (state = [])
store.getState();
import io.restassured.RestAssured;
import org.json.JSONException;
import org.json.JSONObject;
import org.junit.Before;
import org.junit.Test;
import static io.restassured.RestAssured.given;
import static org.hamcrest.CoreMatchers.hasItems;
import static org.hamcrest.core.Is.is;
plugins {
id 'java'
}
group 'test'
version '1.0-SNAPSHOT'
sourceCompatibility = 1.8
repositories {