Skip to content

Instantly share code, notes, and snippets.

View iamdejan's full-sized avatar
🎯
Focusing

Giovanni Dejan iamdejan

🎯
Focusing
  • 08:42 (UTC +07:00)
View GitHub Profile
@iamdejan
iamdejan / hierarchical-motion-planning-prompt.txt
Created June 28, 2026 15:52
Hierarchical Motion Planning prompt
Hierarchical Motion Planning is a two-layer logic that allows self-driving cars to have a planned path at the beginning of the journey, while being able to avoid sudden collision with another moving object (e.g. other cars, pedestrians). Here is how the hierarchy typically works:
1. Layer 1: The Global Planner (The "GPS"):
- Algorithm: A*
- Input: A high-definition (HD) static map of the world (lanes, road boundaries, stop signs).
- Goal: Find the most efficient route from Point A to Point B.
- Characteristics: It is slow and computationally expensive because it considers a large area. It assumes the world is "static" (it doesn't know about a pedestrian walking across the street right now).
2. The Local Planner (The "Reflexes")
- Algorithm: RRT*
- Input: Real-time sensor data (LiDAR, Cameras) and a small segment of the Global Path.
- Goal: Ensure the car doesn't hit anything that just appeared. If a ball rolls into the road, the Local Planner deviates from the A* path to avoid it a
@iamdejan
iamdejan / rag-openrouter-example.py
Created June 28, 2026 15:47
Example of RAG using OpenRouter models.
# an example of RAG using OpenRouter
import numpy as np
from openai import OpenAI
# Initialize the OpenRouter client
client = OpenAI(
base_url="https://openrouter.ai",
api_key="your_openrouter_api_key_here",
)
@iamdejan
iamdejan / mandarin-sentence-parsing-prompt-template.txt
Last active June 28, 2026 15:47
Prompt template for Mandarin sentence parsing.
You are an expert in Mandarin and English, with over 20 years of experience. Now, you are here to help me learn reading Chinese characters by parsing the given sentence and include pinyin in Typst form. I want you to parse this Mandarin sentence into Typst form:
[ Mandarin sentence here ]
Parse the sentence into logical words, so that I can read the character groupings for a word. I've included some examples to help you.
Example 1 (simple sentence):
Input:
我爱你
Output:
@iamdejan
iamdejan / math-model-parameter.csv
Created March 26, 2026 10:03
Model parameters for math testings.
Model Context Length GPU Offload CPU Thread Pool Size Evaluation Batch Size Number of Experts Number of layers to force the experts to CPU Temperature Top K Sampling Repeat Penalty Top P Sampling Min P Sampling
allenai/Olmo-3-7B-Think 7729 32 8 512 - - 0.6 40 1.1 0.95 0.05
lm-provers/QED-Nano 84878 36 8 784 - - 0.6 40 1.1 0.95 0.05
mradermacher/Nemotron-Cascade-2-30B-A3B-GGUF 16384 52 8 784 8 8 1 40 1.1 0.95 0.05
microsoft/Phi-4-mini-reasoning 60319 32 8 784 - - 0.8 40 1.1 0.95 0.05
bartowski/nvidia_OpenMath-Nemotron-14B-GGUF 25844 48 8 784 - - 0.6 40 1.1 0.95 0.05
inclusionAI/Ring-mini-2.0 4096 20 8 784 8 0 0.6 40 1.1 0.95 0.05
@iamdejan
iamdejan / performance-comparison.csv
Last active March 20, 2026 05:22
Performance comparsion
Problem Performance Metrics qwen2.5-1.5b-vibethinker-heretic-uncensored-abliterated qwen/qwen3-coder-30b
Palindrome Partitioning Runtime (in ms) 47 44
Memory (in MB) 33.3 34.2
IPO Runtime (in ms) 231 425
Memory (in MB) 47.9 45.4
Maximum Product Subarray Runtime (in ms) 3 7
Memory (in MB) 19.7 19.8
Dungeon Game Runtime (in ms) 3 3
Memory (in MB) 20.1 20.1
House Robber II Runtime (in ms) 0 0
@iamdejan
iamdejan / prompt-template.md
Last active March 20, 2026 04:20
Prompt Template for Leetcode questions.

You are a competitive programmer, and you are my teammate. We are on Leetcode contest together, and I want you to solve this question:

{{ Problem Title }}

{{ Description }}

Example 1:

{{ Input, output, and explanation (if any) for example 1 }}
@iamdejan
iamdejan / model-parameter.csv
Last active March 20, 2026 04:07
Tables for my latest Medium post
Model Context Length GPU Offload CPU Thread Pool Size Evaluation Batch Size Number of Experts Number of layers to force the experts to CPU Temperature Top K Sampling Repeat Penalty Top P Sampling Min P Sampling
qwen2.5-1.5b-vibethinker-heretic-uncensored-abliterated 131072 28 8 784 - - 0.8 40 1.1 0.95 0.05
qwen/qwen3-coder-30b 64213 48 8 784 8 8 0.7 20 1.05 0.8 0.05
@iamdejan
iamdejan / k8s-rollout-demo-github-actions.yaml
Created May 26, 2022 09:51
Github Actions for K8s Rollout Demo
name: Build and Deploy Image
on:
push:
branches:
- "main"
jobs:
Main:
runs-on: ubuntu-20.04
steps:
- name: Checkout repository code
@iamdejan
iamdejan / gke-custer.tf
Created May 26, 2022 06:46
GKE cluster provisioning
# GKE cluster
resource "google_container_cluster" "primary" {
name = "${var.project_id}-gke"
location = var.region
# We can't create a cluster with no node pool defined, but we want to only use
# separately managed node pools. So we create the smallest possible default
# node pool and immediately delete it.
remove_default_node_pool = true
initial_node_count = 1