Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View steven2358's full-sized avatar

Steven Van Vaerenbergh steven2358

View GitHub Profile
@steven2358
steven2358 / cheatsheet.py
Created April 24, 2017 20:01
Python Cheat Sheet
###
# numpy
###
# convert variable to other data type
x.astype(np.float32)
@steven2358
steven2358 / pivinv.m
Created June 18, 2014 15:27
Inversion of a matrix by pivoting method
function [A_inv, d] = pivinv(A)
% PIVINV inversion of a matrix by pivoting method
%
% Input: A, a square matrix
% Outputs: A_inv, the inverse of A; d, the determinant of A
%
% Reference: Enrique Castillo and Francisco Jubete, "The Gamma-algorithm
% and some applications," International Journal of Mathematical Education
% in Science and Technology 35, no. 3 (2004): 369-389.
%
@steven2358
steven2358 / gource.sh
Last active May 15, 2018 22:26 — forked from lancewalton/gource.sh
Produces a video of the evolution of a git repository using gource (see https://gource.io/).
#!/bin/zsh
if (( !($# == 3) ))
then
echo "Usage:"
echo $0 "<ffmpeg preset> <output file base name> <seconds per day>"
exit 1
fi
"""
@steven2358
steven2358 / cue_sheet_converter.py
Last active October 2, 2019 22:01
Convert a playlist in text format to a cue file
# Convert a playlist in text format to a cue file
# Author: steven2358
# Usage:
# 1. Make a playlist file "playlist.txt" using this format:
'''
Album Artist - Album Name
FileName.mp3
MM:SS:mm - Artist1 - Title1
MM:SS:mm - Artist2 - Title2
MM:SS:mm - Artist3 - Title3
@steven2358
steven2358 / hello_world.py
Created July 23, 2020 09:42
Python Hello World - Empty file template with main() function.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
def main():
print('Hello world!')
if __name__ == '__main__':
main()
@steven2358
steven2358 / power_table.md
Last active November 19, 2021 21:12
Power table

Power table

base \ exponent 2 3 4 5 6 7 8 9 10
1,01 1,02 1,03 1,04 1,05 1,06 1,07 1,08 1,09 1,10
1,02 1,04 1,06 1,08 1,10 1,13 1,15 1,17 1,20 1,22
1,03 1,06 1,09 1,13 1,16 1,19 1,23 1,27 1,30 1,34
1,04 1,08 1,12 1,17 1,22 1,27 1,32 1,37 1,42 1,48
1,05 1,10 1,16 1,22 1,28 1,34 1,41 1,48 1,55 1,63
1,06 1,12 1,19 1,26 1,34 1,42 1,50 1,59 1,69 1,79
@steven2358
steven2358 / exponentiation_table.md
Created November 23, 2021 09:03
Exponentiation table

Exponentiation table

Results are rounded to two decimals.

base \ exponent 2 3 4 5 6 7 8 9 10
1,01 1,02 1,03 1,04 1,05 1,06 1,07 1,08 1,09 1,10
1,02 1,04 1,06 1,08 1,10 1,13 1,15 1,17 1,20 1,22
1,03 1,06 1,09 1,13 1,16 1,19 1,23 1,27 1,30 1,34
1,04 1,08 1,12 1,17 1,22 1,27 1,32 1,37 1,42 1,48
@steven2358
steven2358 / cheatsheet.matlab
Last active March 21, 2022 02:37
Matlab Cheat sheet
% Matlab cheat sheet
% Author: Steven Van Vaerenbergh
% Last version: https://gist.github.com/steven2358/7578242
%% SYSTEM
% seed a random generator
seed = 1;
rng('default');
@steven2358
steven2358 / index.html
Created March 24, 2016 22:36
Blank HTML5 document
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>title</title>
<link rel="stylesheet" href="style.css">
<script src="script.js"></script>
</head>
<body>
<!-- page content -->
@steven2358
steven2358 / bitcoin_wallet_matrix.md
Created August 18, 2014 17:54
Bitcoin Wallet Matrix