Skip to content

Instantly share code, notes, and snippets.

View hbredin's full-sized avatar

Hervé BREDIN hbredin

View GitHub Profile
@loretoparisi
loretoparisi / wavesurfer.js
Last active December 20, 2023 00:08
Wavesurfer js setup with timing labels and time formating callback
/**
* Wavesurfer.js minimalistic example with
* regions loading, save, plugins, waveform loading from json, waveform zoom, player events, keyboard codes, auto play
* @author: Loreto Parisi (loretoparisi at gmail dot com) - mainly, some code and functions adpated from Wavesurfer examples
* @disclaimer: code adapted from online examples
*/
// JavaScript
// Wrap the native DOM audio element play function and handle any autoplay errors
@juanmc2005
juanmc2005 / model.py
Last active October 3, 2022 15:27
PLDA scoring using Pyannote (https://github.com/pyannote/pyannote-audio) and a customized version of PLDA (https://github.com/RaviSoji/plda) to include some specific features like length normalization and latent space dimension tuning
# Copyright 2017 Ravi Sojitra. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@f0k
f0k / rolling_median_bench.py
Last active December 22, 2022 08:49
rolling median implementations benchmark
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Compares some algorithms for computing a sliding median of an array.
Results:
scipy.signal.medfilt2d is a bit faster than scipy.ndimage.filter.median_filter
and significantly faster than scipy.signal.medfilt.
Maintaining a sorted list of the window becomes faster than that for a filter
@cobyism
cobyism / gh-pages-deploy.md
Last active November 19, 2024 09:32
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).