Skip to content

Instantly share code, notes, and snippets.

View ravener's full-sized avatar
❤️
owo

Ravener ravener

❤️
owo
View GitHub Profile
@ravener
ravener / det.py
Last active October 8, 2022 18:23
Calculate determinant of an n × n matrix in Python
# Get the submatrix of A
# Removing the ii-th row and jj-th column
def sub(A, ii, jj):
matrix = []
for i in range(len(A)):
if i == ii:
continue
@ravener
ravener / changelog.sh
Created June 24, 2022 07:58
Generate CHANGELOG.md from git tags
#!/usr/bin/bash
# A bash script to generate a markdown changelog from git tags
# Run this inside a git repository to generate CHANGELOG.md file
if [ ! -d ".git" ]; then
echo "Error: Not a git repository"
exit 1
fi
@ravener
ravener / vm.js
Created June 29, 2018 18:03
Virtual Machine in JavaScript
/*
MIT License
Copyright (c) 2018 Free TNT
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is