Skip to content

Instantly share code, notes, and snippets.

View steven2358's full-sized avatar

Steven Van Vaerenbergh steven2358

View GitHub Profile
@steven2358
steven2358 / shopping_carts.md
Last active August 29, 2015 14:05
Shopping Carts
@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 / .htaccess
Created February 9, 2016 18:39
.htaccess for 301 redirect to new domain
Redirect 301 / http://www.newdomain.com/
@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 / 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 / cheatsheet.py
Created April 24, 2017 20:01
Python Cheat Sheet
###
# numpy
###
# convert variable to other data type
x.astype(np.float32)
@steven2358
steven2358 / conda_environment.md
Last active December 27, 2023 22:29
Conda environment commands
@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 / ffmpeg.md
Last active April 19, 2024 05:16
FFmpeg cheat sheet
@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()