View debian-mpd-alsa.txt
#see /proc/asound/cards for card num
#cat /etc/asound.conf
pcm.!default {
type plug
slave.pcm "plugequal"
pcm.dmixer {
View multi monitor i3 setup
Monitors: 2
0: +DP-0 2560/597x1440/336+0+0 DP-0
1: +HDMI-0 1920/597x1080/336+2560+0 HDMI-0
➜ ~ xrandr --output DP-0 --left-of HDMI-0
# or
➜ ~ xrandr --output HDMI-0 --left-of DP-0

Using Google Cloud Vision API's OCR to extract text from photos and scanned documents

Just a quickie test in Python 3 (using Requests) to see if Google Cloud Vision can be used to effectively OCR a scanned data table and preserve its structure, in the way that products such as ABBYY FineReader can OCR an image and provide Excel-ready output.

The short answer: No. While Cloud Vision provides bounding polygon coordinates in its output, it doesn't provide it at the word or region level, which would be needed to then calculate the data delimiters.

On the other hand, the OCR quality is pretty good, if you just need to identify text anywhere in an image, without regards to its physical coordinates. I've included two examples:

####### 1. A low-resolution photo of road signs


Keybase proof

I hereby claim:

  • I am nfedyashev on github.
  • I am nfedyashev ( on keybase.
  • I have a public key ASDinTHZ0p1CqRzPQVphLzIPY6iqBCZ1G0BbtuDhHj0TRQo

To claim this, I am signing this object:

# Disable NewRelic pinging
curl -X POST -H "X-Api-Key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
heroku maintenance:on --app yourapp-staging
heroku pg:reset DATABASE --confirm yourapp-staging --app yourapp-staging
heroku pgbackups:restore DATABASE `heroku pgbackups:url --app yourapp-production` --app yourapp-staging --confirm yourapp-staging
git remote add heroku_yourapp-staging
git push heroku_yourapp-staging $COMMIT_ID:master -f
heroku_run 'rake db:migrate' yourapp-staging
heroku restart --app yourapp-staging
heroku maintenance:off --app yourapp-staging
#Usage: heroku_run 'rake db:migrate' veeqo-staging
function heroku_run() {
buffer_file=/tmp/last_heroku_run_`date +%N`
heroku run "$1; echo \$?" --app $2 2>&1 | tee $buffer_file
return `tail -1 $buffer_file`
#!/usr/bin/env bash
apt-get -y update
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline5-dev libyaml-dev
cd /tmp
tar -xvzf ruby-1.9.3-p194.tar.gz
cd ruby-1.9.3-p194/
./configure --prefix=/usr/local
make install