Skip to content

Instantly share code, notes, and snippets.

View Raghuvar's full-sized avatar
😇

Raghuvar Prajapati Raghuvar

😇
View GitHub Profile
@Raghuvar
Raghuvar / README.md
Created May 8, 2018 13:27 — forked from dannguyen/README.md
Using Python 3.x and Google Cloud Vision API to OCR scanned documents to extract structured data

Using Python 3 + 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

@Raghuvar
Raghuvar / README.md
Created August 27, 2019 05:35 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


# Run every time you login or update .bash_profile
export KAFKA_HOME=/usr/hdp/2.5.0.0-1245/kafka
export PATH=$PATH:$KAFKA_HOME/bin
# Create topics
kafka-topics.sh --create \
--zookeeper nn01.itversity.com:2181,nn02.itversity.com:2181,rm01.itversity.com:2181 \
--replication-factor 1 \
--partitions 1 \
--topic kafkadg
@Raghuvar
Raghuvar / generate-certificates.sh
Created November 8, 2019 03:05
Generate self-signed ssl certificates.
#!/bin/bash
# set values for certificate DNs
# note: CN is set to different values in the sections below
ORG="000_Test_Certificates"
# set values that the commands will share
VALID_DAYS=360
CA_KEY=ca.key
CA_CERT=ca.crt