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 | |
# Bash Script to Install FFMPEG in Ubuntu 14.04 | |
# Ref: http://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu | |
# Opsional: install exiftool: apt-get install libimage-exiftool-perl | |
# | |
# Author: Edi Septriyanto http://masedi.net <hi@masedi.net> | |
######################################################################## | |
CURDIR=$(pwd) |
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
mboplatek:YouCompleteMe oplatek$ env | |
SHELL=/usr/local/bin/bash | |
XPC_FLAGS=0x0 | |
TERM_PROGRAM_VERSION=433 | |
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.XIpE0VAAVX/Listeners | |
TERM_SESSION_ID=C59A55E3-366C-4651-A75B-C5C0F8825111 | |
PWD=/Users/oplatek/.vim/bundle/YouCompleteMe | |
LOGNAME=oplatek | |
LaunchInstanceID=580A1386-878E-47F0-A69F-1380E631C731 | |
HOME=/Users/oplatek |
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
SHELL=/usr/local/bin/bash | |
XPC_FLAGS=0x0 | |
TERM_PROGRAM_VERSION=433 | |
CONDA_EXE=/Users/oplatek/anaconda3/bin/conda | |
_CE_M= | |
TMUX=/private/tmp/tmux-501/default,7388,0 | |
LANGUAGE=en_US.UTF-8 | |
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.XIpE0VAAVX/Listeners | |
TERM_SESSION_ID=2A640EC8-E79E-485A-B850-BDE24A8DEB18 | |
EDITOR=vim |
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
-- The C compiler identification is AppleClang 12.0.0.12000032 | |
-- The CXX compiler identification is AppleClang 12.0.0.12000032 | |
-- Detecting C compiler ABI info | |
-- Detecting C compiler ABI info - done | |
-- Check for working C compiler: /usr/bin/llvm-gcc - skipped | |
-- Detecting C compile features | |
-- Detecting C compile features - done | |
-- Detecting CXX compiler ABI info | |
-- Detecting CXX compiler ABI info - done | |
-- Check for working CXX compiler: /usr/bin/llvm-g++ - skipped |
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
curl --include \ | |
--no-buffer \ | |
--header "Connection: Upgrade" \ | |
--header "Upgrade: websocket" \ | |
--header "Host: example.com:80" \ | |
--header "Origin: http://example.com:80" \ | |
--header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \ | |
--header "Sec-WebSocket-Version: 13" \ | |
http://example.com:80/ |
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
curl --include \ | |
--no-buffer \ | |
--header "Connection: Upgrade" \ | |
--header "Upgrade: websocket" \ | |
--header "Host: example.com:80" \ | |
--header "Origin: http://example.com:80" \ | |
--header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \ | |
--header "Sec-WebSocket-Version: 13" \ | |
http://example.com:80/ |
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
# coding: utf-8 | |
import sounddevice as sd | |
duration = 10 | |
fs = 16000 | |
rec = sd.rec(duration * fs, samplerate=fs, channels=1, dtype='int16') | |
sd.wait() | |
pcm = rec.tostring() | |
with open('test.raw', 'wb') as w: | |
w.write(pcm) |
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 | |
# Script for installing tmux on systems where you don't have root access. | |
# tmux will be installed in $HOME/local/bin. | |
# It's assumed that wget and a C/C++ compiler are installed. | |
# exit on error | |
set -e | |
TMUX_VERSION=2.3 |
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 | |
[ -z $1 ] && python=3.4 | |
if [ $(whoami) = root ] ; then | |
user='' | |
else | |
echo Not running under sudo. pip install --user | |
user='--user' | |
fi | |
if [ $python = '2.7' ] ; then |
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 lengths2mask2d(lengths, max_len): | |
batch_size = lengths.get_shape().as_list()[0] | |
# Filled the row of 2d array with lengths | |
lengths_transposed = tf.expand_dims(lengths, 1) | |
lengths_tiled = tf.tile(lengths_transposed, [1, max_len]) | |
# Filled the rows of 2d array 0, 1, 2,..., max_len ranges | |
rng = tf.to_int64(tf.range(0, max_len, 1)) | |
range_row = tf.expand_dims(rng, 0) | |
range_tiled = tf.tile(range_row, [batch_size, 1]) |
NewerOlder