Skip to content

Instantly share code, notes, and snippets.

View steven2358's full-sized avatar

Steven Van Vaerenbergh steven2358

View GitHub Profile
@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 / 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 / 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 / cheatsheet.py
Created April 24, 2017 20:01
Python Cheat Sheet
###
# numpy
###
# convert variable to other data type
x.astype(np.float32)
@steven2358
steven2358 / kaggle.py
Last active March 8, 2016 15:13
Check if Kaggle has launched a competition today
# Check if Kaggle has launched a competition today.
#
# Ported to Python 2 from https://github.com/BraunPhilipp/snippets/blob/master/kaggle.py
from urllib2 import urlopen
from bs4 import BeautifulSoup
import time
import random
import string
import datetime
@steven2358
steven2358 / .htaccess
Created February 9, 2016 18:39
.htaccess for 301 redirect to new domain
Redirect 301 / http://www.newdomain.com/
@steven2358
steven2358 / hide_language_options.info
Created November 18, 2013 13:15
Drupal 6 module to hide language options on the user edit page
name = Hide language Options
description = "Hide the language options on the user edit page."
dependencies[] = locale
package = User interface
version = "6.x-1.0"
core = "6.x"
project = "hide_language_options"
@steven2358
steven2358 / hide_user_history.info
Created November 18, 2013 13:10
Drupal 6 module to hide user history in user profile
name = Hide user history
description = "Hide the history tab on user pages."
package = User interface
version = "6.x-1.0"
core = "6.x"
project = "hide_user_history"
@steven2358
steven2358 / 0_reuse_code.js
Created November 18, 2013 13:08
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@steven2358
steven2358 / README.md
Last active December 24, 2015 02:39
Simple Slide: A jQuery slideshow that simply fades between a list of images.

Simple Slide

A jQuery slideshow that simply fades between a list of images.

Features:

  • Options: slide duration, fade time
  • Allows for multiple slideshows at once
  • No bells
  • No whistles