Skip to content

Instantly share code, notes, and snippets.

@newbee1905
newbee1905 / init.lua
Created November 2, 2025 13:03
Basic Nvim config without LSP but with buffer autocomplete
-- Basic settings
vim.opt.number = true
vim.opt.relativenumber = true
vim.opt.tabstop = 2
vim.opt.shiftwidth = 2
vim.opt.expandtab = false
vim.opt.hlsearch = true
vim.opt.ignorecase = true
vim.opt.smartcase = true
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <stdbool.h>
#include <string.h>
#define POP_SIZE 50
#define MAX_GEN 10
#define NUM_ELEMENTS 3 // Number of elements in the composite
@newbee1905
newbee1905 / vector_database.py
Created November 4, 2024 15:19
Simple Vector Database
import numpy as np
from sentence_transformers import SentenceTransformer
import pickle
class VectorDatabase:
def __init__(self, sentence_transformer_model = "all-MiniLM-L6-v2"):
self.raw = np.empty((0,), dtype=str)
self.sentence_transformer = SentenceTransformer(sentence_transformer_model)
embedding_dim = self.sentence_transformer.get_sentence_embedding_dimension()
#!/bin/bash
# Set up directory in iOS Files accessible location
IOS_FILES_DIR="/mnt/containers/shared/SystemGroup/systemgroup.com.ish"
ALBUM_NAME="MyDownloadedPhotos"
FULL_PATH="$IOS_FILES_DIR/$ALBUM_NAME"
# Create album directory
mkdir -p "$FULL_PATH"
@newbee1905
newbee1905 / template.cc
Created December 14, 2023 07:35
C++ Leetcode Template
#pragma GCC optimize("Ofast")
#pragma GCC target("avx2,bmi,bmi2,popcnt,lzcnt")
static const int FAST__ = [](){
std::ios_base::sync_with_stdio(false);
std::cin.tie(nullptr);
std::cout.tie(nullptr);
return 0;
}();