Skip to content

Instantly share code, notes, and snippets.

@kduy
kduy / pytest.md
Created October 12, 2018 14:33 — forked from kwmiebach/pytest.md
pytest cheat sheet

Usage

(Create a symlink pytest for py.test)

pytest [options] [file_or_dir] [file_or_dir] ...

Help:

@kduy
kduy / get_aws_link
Last active September 14, 2018 03:54
Annotation tool

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
@kduy
kduy / mixing_recordings.md
Created January 16, 2018 05:43 — forked from ktoraskartwilio/mixing_recordings.md
Mixing Recordings

When mixing the tracks, we need to consider that they might (and probably have) started at different times. If we were to merge tracks without taking this into account, we would end up with synchronization issues. In our example, since Bob got in the room a good 20s (and that’s really a huge time for synchronization of audios), mixing both Alice’s and Bob’s audio tracks together would end up having one speaking over the other.

To make merging easier, the start time of all tracks from the same room is the creation of the room itself. Let’s get the start times for all the tracks from this room

Get Alice's audio start time

@kduy
kduy / mixing_recordings.md
Created January 16, 2018 05:43 — forked from ktoraskartwilio/mixing_recordings.md
Mixing Recordings

When mixing the tracks, we need to consider that they might (and probably have) started at different times. If we were to merge tracks without taking this into account, we would end up with synchronization issues. In our example, since Bob got in the room a good 20s (and that’s really a huge time for synchronization of audios), mixing both Alice’s and Bob’s audio tracks together would end up having one speaking over the other.

To make merging easier, the start time of all tracks from the same room is the creation of the room itself. Let’s get the start times for all the tracks from this room

Get Alice's audio start time

@kduy
kduy / mysql_to_s3
Last active November 22, 2017 11:46
#!/bin/sh
# Updates etc at: https://github.com/woxxy/MySQL-backup-to-Amazon-S3
# Under a MIT license
# change these variables to what you need
MYSQLROOT=root
MYSQLPASS=********
S3BUCKET=******
FILENAME=mysql_backup
@kduy
kduy / string_util
Last active November 22, 2017 11:43
# -*- coding: utf-8 -*-
import json
import re
from uuid import uuid4
import random
import unicodedata
# module settings
__version__ = '0.6.0'
@kduy
kduy / opencv-2.4.9-ubuntu.md
Last active November 22, 2017 11:43
install opencv 2.4.9 in ubuntu 14.04
wget https://raw.githubusercontent.com/jayrambhia/Install-OpenCV/master/Ubuntu/2.4/opencv2_4_9.sh
chmod +x opencv2_4_9.sh 
./opencv2_4_9.sh 

sudo apt-get install python-opencv
@kduy
kduy / caffe_ec2.md
Last active November 22, 2017 11:43
Install caffe in EC2

Machine

  • Launch ami-d05e75b8 from here
  • Choose a GPU instance type: g2.2xlarge or g2.8xlarge
  • Increase the size of the storage (this depends on what else you plan to install, I’d suggest at least 20 GB)

Install Cuda 7.0

wget http://developer.download.nvidia.com/compute/cuda/7_0/Prod/local_installers/rpmdeb/cuda-repo-ubuntu1404-7-0-local_7.0-28_amd64.deb

sudo dpkg -i cuda-repo-ubuntu1404-7-0-local_7.0-28_amd64.deb