Skip to content

Instantly share code, notes, and snippets.

@andrsnn
andrsnn / gist:2528b7a5cfc3c1f0bf2f636fa385b5a3
Created December 21, 2023 00:34
Python mix and combine audio files
import os
from pydub import AudioSegment
import numpy as np
from pydub.generators import WhiteNoise
import re
def apply_early_reflections(audio_segment, delay_time=50, feedback=0.5):
"""Applies early reflections to an audio segment."""
delay = AudioSegment.silent(duration=delay_time)
feedback_dB = 20 * np.log10(feedback)

Keybase proof

I hereby claim:

  • I am andrsnn on github.
  • I am andrsnn (https://keybase.io/andrsnn) on keybase.
  • I have a public key ASCIipF2VHkDgtCWgCsx8GRP1IxuvhrPHQyhGH1vw1MU8go

To claim this, I am signing this object:

@andrsnn
andrsnn / keybase.md
Created April 20, 2018 18:23
keybase.md

Keybase proof

I hereby claim:

  • I am andrsnn on github.
  • I am andrsnn (https://keybase.io/andrsnn) on keybase.
  • I have a public key ASDE1hbmPa0YxvPb9hX3dOUZJJc8s1-ltZMeT_GncIJpuAo

To claim this, I am signing this object:

@andrsnn
andrsnn / gist:938c6e72cf1f51493dc18bcecc90f8a9
Created August 28, 2017 21:24
Reproducing mongoose post init error handling
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var uri = 'mongodb://localhost:27017/development';
mongoose.connect(uri, function (err) {
if (err) throw new Error(err);
console.log(`Connected to ${uri}`);
var TestSchema = new Schema();
@andrsnn
andrsnn / index.js
Created December 1, 2015 04:15
requirebin sketch
var newLodash = require('lodash'),
oldLodash = window._;
var a = [{name: 'foo'}, { name: 'bar'}];
//bar
var b = newLodash.where(a, {name: 'bar'});
//foo, bar
var c = newLodash.where(a, function (obj) {
@andrsnn
andrsnn / gist:40b2e1813c957f6140e9
Created September 12, 2015 00:22
Transition Factory
function transitionFactory(Component){
console.log(Component);
// component.statics.willTransitionFrom = function(){
var TransitionFactory = React.createClass({
getInitialState: function(){