Skip to content

Instantly share code, notes, and snippets.

View Luxter77's full-sized avatar
💭
In the process of imploding

Lucas Daniel Velazquez M. Luxter77

💭
In the process of imploding
View GitHub Profile
# Configuration
$Model = "granite3-dense:2b"
$OllamaExe = "ollama"
# Define Prompts of varying lengths to test memory ranges
$TestPrompts = [ordered]@{
"Short" = "What is the capital of France?"
"Medium" = "Explain the theory of relativity in simple terms."
"Long" = "Summarize the following text: " + ("The quick brown fox jumps over the lazy dog. " * 300)
}
<#
.SYNOPSIS
Enumerates Vulkan physical devices directly via the Vulkan API.
.DESCRIPTION
This script uses P/Invoke to load 'vulkan-1.dll' (part of standard display drivers)
and query the Vulkan loader for available physical devices (GPUs/CPUs).
It returns a list of devices with their corresponding API index, name, and hardware type.
This is useful for determining the correct device index for environment variables
without relying on external tools like 'vulkaninfo' or the Vulkan SDK.
@Luxter77
Luxter77 / build.ps1
Created January 21, 2026 16:14
micropython build+upload code buildtask
param([switch]$Upload, [switch]$Clean)
$ErrorActionPreference = "Stop"
$src = ".\src"
$dest = ".\mirror"
$port = "COM5"
# --- CLEAN STEP (Delete .mpy files from device) ---
if ($Clean) {
@Luxter77
Luxter77 / filter.lua
Created January 12, 2026 09:07
MAN Pages to Lorebook
-- filter.lua
local skip_titles = {["SEE ALSO"] = true, ["COMPATIBILITY"] = true}
local skipping = false
function Header(el)
local header_text = pandoc.utils.stringify(el.content)
if skip_titles[header_text] then
skipping = true
return {}
@Luxter77
Luxter77 / src_collisions.gml
Created September 2, 2025 19:33
fn_doCollide GML2
/**
* @function fn_doCollide
*
* @param {Id.Instance}.
* @param {Id.Asset.GMLObject} [collider=obj_collider].
*
* @returns {undefined}
*/
function fn_doCollide(subject, collider = obj_collider.object_index){
if (subject.vspeed != 0) {
Clear-Host
function Chunk-Objects {
param(
[Parameter(Mandatory = $true, ValueFromPipeline = $true)]
[psobject]$InputObject,
[ValidateRange(1, 100000)]
[int]$ChunkSize = 255
)
function Chunk-Objects {
param(
[Parameter(Mandatory = $true, ValueFromPipeline = $true)]
[psobject]$InputObject,
[ValidateRange(1, 100000)]
[int]$ChunkSize = 255
)
begin {
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
from zabbix_utils import ZabbixAPI
import json
TOKEN = "FILLME"
API_URL = ""
api = ZabbixAPI(url=API_URL)
api.login(token=TOKEN)
#!/usr/bin/env python3
from genericpath import isfile
from pdf2image import convert_from_path, pdfinfo_from_path
import collections, sys, os
from tqdm.auto import tqdm, trange
from glob import glob