Skip to content

Instantly share code, notes, and snippets.

View piotr-jozwiak's full-sized avatar
🚀
It’s Impossible, that’s sure. So let’s start working.

Piotr Jóźwiak piotr-jozwiak

🚀
It’s Impossible, that’s sure. So let’s start working.
  • Gdańsk, Poland
  • 04:53 (UTC +02:00)
View GitHub Profile
@alsunseri
alsunseri / install-brew-for-a-dev-on-Amazon-linux2.sh
Created July 30, 2023 22:33
quickly install homebrew on Amazon Linux 2
#!/usr/bin/bash
# on amazon linux II my developers can not run sudo and more importantly no user has a password.
# installing linuxbrew/homebrew is a pain unless you do this:
# as root ( or sudo from the admin user )
mkdir -p /home/linuxbrew/
chown $THE_DEV_USERNAME: /home/linuxbrew/
#### root/admin work is done !!!!
# then the developer themselves can run the rest:
#
# as THE_DEV_USERNAME person
@thomwolf
thomwolf / pytorch_weight_initialization.py
Created October 3, 2017 11:54
Simple way to reproduce Keras default initialisation in a typical pyTorch NLP model
def init_weights(self):
"""
Here we reproduce Keras default initialization weights to initialize Embeddings/LSTM weights
"""
ih = (param.data for name, param in self.named_parameters() if 'weight_ih' in name)
hh = (param.data for name, param in self.named_parameters() if 'weight_hh' in name)
b = (param.data for name, param in self.named_parameters() if 'bias' in name)
nn.init.uniform(self.embed.weight.data, a=-0.5, b=0.5)
for t in ih:
nn.init.xavier_uniform(t)
@scottburton11
scottburton11 / gist:3222152
Created August 1, 2012 00:58
Audio Compression for Voiceover

About compression

Audio compression is used to reduce the dynamic range of a recording. Dynamic range is the difference between the loudest and softest parts of an audio signal. It was originally used to guard against defects when cutting wax and vinyl phonograph records, but generally became useful as a way of increasing the loudness of an audio recording without achieving distortion.

The goal of most compression applications is to increase the amplitude of the softest parts of a recording, without increasing the amplitude of the loudest parts.

Compressor anatomy

Compressors generally all have the same conceptual parts. However, not all compressors present variable controls for all parts to the user. If you don't see all of your compressor's controls here, there's a chance it either has a fixed value (and no control), or is named something else: