Skip to content

Instantly share code, notes, and snippets.

Oliver oliver006

  • NYC
Block or report user

Report or block oliver006

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@lizthegrey
lizthegrey / attributes.rb
Last active Jan 28, 2020
Hardening SSH with 2fa
View attributes.rb
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'
@dannguyen
dannguyen / README.md
Last active Dec 25, 2019
Using Python 3.x and Google Cloud Vision API to OCR scanned documents to extract structured data
View README.md

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

@ryancdotorg
ryancdotorg / frag32.py
Created Aug 20, 2015
A FAT32 fragmenter, because I am a horrible person.
View frag32.py
#!/usr/bin/env python
import random
import struct
import sys
# Most of the Fat32 class was cribbed from https://gist.github.com/jonte/4577833
def ppNum(num):
return "%s (%s)" % (hex(num), num)
@danawoodman
danawoodman / 1-react-websockets-reflux.md
Last active May 23, 2018
Using WebSockets with Reflux and React
View 1-react-websockets-reflux.md

WebSockets + Reflux + React

Using WebSockets, React and Reflux together can be a beautiful thing, but the intial setup can be a bit of a pain. The below examples attempt to offer one (arguably enjoyable) way to use these tools together.

Overview

This trifect works well if you think of things like so:

  1. Reflux Store: The store fetches, updates and persists data. A store can be a list of items or a single item. Most of the times you reach for this.state in react should instead live within stores. Stores can listen to other stores as well as to events being fired.
  2. Reflux Actions: Actions are triggered by components when the component wants to change the state of the store. A store listens to actions and can listen to more than one set of actions.
@jimmycuadra
jimmycuadra / cloud-config.yml
Last active Feb 1, 2019
CoreOS cloud-config for DigitalOcean with iptables firewall
View cloud-config.yml
#cloud-config
coreos:
etcd:
# generate a new token for each unique cluster from https://discovery.etcd.io/new
discovery: https://discovery.etcd.io/<token>
# multi-region deployments, multi-cloud deployments, and droplets without
# private networking need to use $public_ipv4
addr: $private_ipv4:4001
peer-addr: $private_ipv4:7001
@filipbec
filipbec / gist:5998034874b119fab0e4
Created Sep 5, 2014
Scannr - Keys for obtaining US Driver's license data
View gist:5998034874b119fab0e4
@debasishg
debasishg / gist:8172796
Last active Jan 19, 2020
A collection of links for streaming algorithms and data structures
View gist:8172796
  1. General Background and Overview
You can’t perform that action at this time.