This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# talib install script for kaggle | |
( | |
cd /tmp | |
wget https://artiya4u.keybase.pub/TA-lib/ta-lib-0.4.0-src.tar.gz | |
tar -xvf ta-lib-0.4.0-src.tar.gz | |
cd ta-lib | |
./configure --prefix=/usr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// nuxt module | |
// serialize server side rendering to prevent singleton problem like https://github.com/vuex-orm/vuex-orm/issues/514 | |
let seq = 1 | |
let lockPromise | |
const auxData = new WeakMap() | |
const lock = async (data) => { | |
while (lockPromise) { | |
console.log('serial-render waiting') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sysbench --test=memory run | |
sysbench 0.4.12: multi-threaded system evaluation benchmark | |
Running the test with following options: | |
Number of threads: 1 | |
Doing memory operations speed test | |
Memory block size: 1K | |
Memory transfer size: 102400M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# clone tutorial repository | |
git clone [email protected]:ai-mastering/tutorial-ruby.git | |
cd tutorial-ruby | |
# install dependencies | |
bundle install | |
# upload test.wav, do the mastering, and download the output as output.wav | |
bundle exec ruby main.rb --input test.wav --output output.wav |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# License of this script: CC0 | |
# Installation of dependent libraries and softwares is required to use this script | |
# ex. nasm, yasm, libmp3lame-dev, libopus-dev, libvorbis-dev, libvpx-dev... | |
set -ex | |
# setup | |
temp_dir=$(mktemp -d) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def new_safe_hash() | |
ifnone = lambda { |hash, key| | |
hash[key] = Hash.new(&ifnone) | |
} | |
Hash.new(&ifnone) | |
end | |
a = new_safe_hash() | |
a['x']['y'] = 3 | |
puts a |