Skip to content

Instantly share code, notes, and snippets.

View Rendiere's full-sized avatar

Renier Botha Rendiere

View GitHub Profile
@Rendiere
Rendiere / flac_to_mp3.py
Created February 4, 2024 21:16
Flac to MP3 Converter
'''
This script will convert all flac files in the current directory and its subdirectories to mp3 files.
What's nice about this script is that it will also remove the flac files after converting them to mp3.
This script uses ffmpeg to convert the files. You need to have ffmpeg installed on your system.
To install ffmpeg on Ubuntu, run the following command:
```
sudo apt-get install ffmpeg
```
@Rendiere
Rendiere / multi-git.md
Last active December 19, 2019 07:30 — forked from rosswd/multi-git-win.md
Setting up a Github and Bitbucket account on the same computer on Mac OS. Now with a guide for Windows 10.

Setting up github and bitbucket on the same computer (Mac OS)

Github will be the main account and bitbucket the secondary.

Intall Git

Use Homebrew to install Git.

Configure Git

  • git config --global user.name "Your Name"
  • git config --global user.email "username@email.com"
@Rendiere
Rendiere / confusion_matrix_pretty_print.py
Created May 17, 2019 08:56 — forked from shaypal5/confusion_matrix_pretty_print.py
Pretty print a confusion matrix with seaborn
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
def print_confusion_matrix(confusion_matrix, class_names, figsize = (10,7), fontsize=14):
"""Prints a confusion matrix, as returned by sklearn.metrics.confusion_matrix, as a heatmap.
Arguments
---------
confusion_matrix: numpy.ndarray
@Rendiere
Rendiere / convergence_plot_callback.py
Last active May 15, 2019 15:03
Convergence Plot Callback for skopt
from skopt import gp_minimize
from skopt.plots import plot_convergence
from IPython.display import clear_output
class ConvergencePlotCallback(object):
def __init__(self, figsize=(12,8)):
self.fig = plt.figure(figsize=figsize)
def __call__(self, res):
@Rendiere
Rendiere / .gitignore-python
Created January 26, 2018 07:43
Some .gitignore regulars for a python project. A combination of my own some gathered from templates
.idea/
__pycache__/
*.py[cod]
*$py.class
# Distribution / packaging
.Python
build/
develop-eggs/
@Rendiere
Rendiere / data.json
Last active July 5, 2022 16:10
Bubble chart with interactive bubbles on click
{
"name": "data",
"children": [
{
"name": "indoor",
"value": 33,
"colour": "#F00",
"children": [
{
"name": "question_1_1",
@Rendiere
Rendiere / 0_reuse_code.js
Created April 5, 2017 12:02
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