Skip to content

Instantly share code, notes, and snippets.

View shofetim's full-sized avatar

Jordan Schatz shofetim

View GitHub Profile
anonymous
anonymous / gist:005640fb943434d247f4
Created December 4, 2014 19:52
Harvest: list running co-worker timers

With [Basic Auth][basic], who are your [co-workers][people]:

$ curl -H 'Authorization: Basic …' -H 'Accept: application/json' https://example.harvestapp.com/people
>   jq 'map(select(.user.is_active)) | map(.user | {first_name: .first_name, last_name: .last_name, id: .id})'
[
  {
    "id": 1234,
    "last_name": "Alice",
    "first_name": "Bobsdaughter"

},

@martinklepsch
martinklepsch / logging.cljc
Last active July 2, 2024 13:37
simple Clojurescript logging using Google Closure logging tools
;; This previously was CLJX but has now been updated to use cljc. Thanks @caskolkm
;; https://gist.github.com/caskolkm/39d823f5bac7051d3062
(ns app.logging
(:refer-clojure :exclude [time])
(:require #?(:clj [clojure.tools.logging :as log]
:cljs [goog.log :as glog]))
#?(:cljs (:import goog.debug.Console)))
#?(:cljs
@mars
mars / reactjs-filepicker.js
Last active March 8, 2018 05:09
Use Filepicker.io with React.js (v0.14, ES2015, & JSX)
/*
Filepicker lib must be loaded from script tag in HTML:
<script type="text/javascript" src="//api.filepicker.io/v2/filepicker.js"></script>
*/
class FilepickerInput extends React.Component {
componentDidMount() {
const filepickerElement = this.refs.filepicker;
if (typeof filepicker !== 'undefined') {
// Single-page app integration: https://developers.filepicker.com/docs/support/integration/117
@shofetim
shofetim / README.md
Created March 24, 2016 23:06 — 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