Skip to content

Instantly share code, notes, and snippets.

View nfedyashev's full-sized avatar

Nikita Fedyashev nfedyashev

View GitHub Profile
@nfedyashev
nfedyashev / gist:1294822
Created October 18, 2011 07:34 — forked from nicholasjhenry/gist:1110289
Sandi Metz - Less - The Path to Better Design
# Sandi Metz - Less - The Path to Better Design
# http://vimeo.com/26330100
# http://less-goruco.heroku.com/
#
# Abstractions are more stable than concretions.
class Trip
attr_reader :bicycles, :customers, :vehicle
def prepare(preparers)
@nfedyashev
nfedyashev / deploy.rb
Created June 21, 2012 15:33 — forked from LRDesign/deploy.rb
Capistrano recipe to sync rails database and files, using remote database.yml instead of local for remote credentials
set :sync_directories, ["public/assets", "public/galleries"]
set :sync_backups, 3
@nfedyashev
nfedyashev / README.md
Created March 24, 2016 19:50 — forked from dannguyen/README.md
Using Google Cloud Vision API to OCR scanned documents to extract structured data

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

require 'rubygems'
require 'v8'
require 'johnson'
require 'ruby_parser'
sexp=Johnson::Parser.parse %{
var sum=function sum (x,y) {
return x+y
};
@nfedyashev
nfedyashev / install-rabbitmq.sh
Created January 5, 2020 04:15 — forked from yetanotherchris/install-rabbitmq.sh
RabbitMQ on Docker with admin UI
# AWS specific install of Docker
sudo yum update -y
sudo yum install -y docker
sudo service docker start
sudo usermod -a -G docker ec2-user
# exit the SSH session, login again
# Docker
docker run -d --hostname my-rabbit --name some-rabbit -p 4369:4369 -p 5671:5671 -p 5672:5672 -p 15672:15672 rabbitmq
@nfedyashev
nfedyashev / presentation.org
Created February 15, 2021 22:29 — forked from abrochard/presentation.org
Notes from the "Conquering Kubernetes with Emacs" presentation

Conquering Kubernetes with Emacs

Specific Annoying workflow

Listing pods with kubectl get pods, then select a pod name and copy paste it into kubectl logs [pod name]

Why?

  • I want to streamline my workflow and stop using the terminal
  • learn more about kubernetes
  • main kubernetes extension for Emacs out there is greedy for permissions