Skip to content

Instantly share code, notes, and snippets.

View paraskuk's full-sized avatar
🎯
Focusing

Paraskevas Paraskevas paraskuk

🎯
Focusing
View GitHub Profile
@paraskuk
paraskuk / microgpt.py
Created March 1, 2026 14:44 — forked from karpathy/microgpt.py
microgpt
"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@paraskuk
paraskuk / kotlin_hello.py
Created February 26, 2025 22:18
Kotlin Execution in Python
import subprocess
import os
# Create Kotlin file content - Hello World
kotlin_code = """
fun main() {
println("Hello, World!")
}
"""
@paraskuk
paraskuk / java_program.py
Created February 26, 2025 22:11
Run Java Program with Subprocess Module in Python
import subprocess
import os
# Create Java file content - simple HW
java_code = """
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
@paraskuk
paraskuk / brownian_motion_sample.py
Last active August 29, 2023 16:27
Brownian Motion
import numpy as np
import matplotlib.pyplot as plt
def brownian_motion(n, dt, delta):
"""
Simulate a Brownian motion
:param n: Number of time steps
:param dt: Time step size
:param delta: The magnitude of movement
:return: Brownian motion path