Skip to content

Instantly share code, notes, and snippets.

View kevinmartinjos's full-sized avatar

Kevin Martin Jose kevinmartinjos

View GitHub Profile
@kevinmartinjos
kevinmartinjos / pagerank.y
Created January 19, 2020 16:29
Pagerank - irdm sheet 11 problem 1
import numpy as np
def iterate(alpha, n, P, pi):
e = np.array([[1], [1], [1], [1], [1], [1]])
return (alpha * e)/n + (1-alpha) * np.matmul(np.transpose(P), pi)
if __name__ == "__main__":
P = np.array([
[0, 0.5, 0, 0.5, 0, 0],
function! LoadTerminal()
let bnr = bufnr('!/bin/bash')
if bnr > 0
:sbuffer !/bin/bash
else
:term
endif
endfunction
@kevinmartinjos
kevinmartinjos / mlx_torch_matmul.ipynb
Created April 20, 2025 20:18
Matmul time: MLX vs PyTorch
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kevinmartinjos
kevinmartinjos / Shibuya_et_al.py
Created September 14, 2025 18:39
Shibuya et al: Binary MLP for MNIST
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.utils.data import DataLoader
from datasets import load_dataset
import numpy as np
from typing import Dict, Any
from torch.optim import Optimizer