Skip to content

Instantly share code, notes, and snippets.

View jacqui's full-sized avatar

Jacqui Lough jacqui

View GitHub Profile
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active March 20, 2024 18:46
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@dannguyen
dannguyen / README.md
Last active December 28, 2023 15:21
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

@thomaspark
thomaspark / subnav.css
Last active June 6, 2023 10:19
Subnav for Bootstrap 2
section {
padding-top: 60px;
}
.subnav {
margin-bottom: 60px;
width: 100%;
height: 36px;
background-color: #eeeeee; /* Old browsers */
background-repeat: repeat-x; /* Repeat the gradient */
/*
Example Facebook Messenger app that pulls the user's public profile and echoes back any messages sent
with the user's first and last name.
So if I sent the bot "Good morning!" it will reply to me with "Echoing message from Jeff Israel: Good morning!"
*/
const bodyParser = require('body-parser');
const crypto = require('crypto');
const express = require('express');
@mikhailov
mikhailov / ruby_gc.sh
Created March 11, 2011 10:33
Ruby’s GC Configuration
- http://www.coffeepowered.net/2009/06/13/fine-tuning-your-garbage-collector/
- http://snaprails.tumblr.com/post/241746095/rubys-gc-configuration
article’s settings: ("spec spec" took 17-23!sec)
export RUBY_HEAP_MIN_SLOTS=1250000
export RUBY_HEAP_SLOTS_INCREMENT=100000
export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1
export RUBY_GC_MALLOC_LIMIT=30000000
export RUBY_HEAP_FREE_MIN=12500
@jacqui
jacqui / gist:983051
Created May 20, 2011 14:43 — forked from pauldix/gist:981916
Redis SORT command examples
# Optimized for writes, sort on read
# LVC
redis.hset("bonds|1", "bid_price", 96.01)
redis.hset("bonds|1", "ask_price", 97.53)
redis.hset("bonds|2", "bid_price", 95.50)
redis.hset("bonds|2", "ask_price", 98.25)
redis.sadd("bond_ids", 1)
redis.sadd("bond_ids", 2)
# coding=UTF-8
from __future__ import division
import nltk
import re
import requests
# Add your freebase key here
# If you don't have one, register at https://code.google.com/apis/console
FREEBASE_KEY = ""
@bryanl
bryanl / campfire-emoji.txt
Created January 27, 2011 16:34
campfire emoji
Surround these with : e.g. :calling:
+1
-1
bulb
calling
clap
cop
email
feet
@jacqui
jacqui / buenos-aires-recommendations.md
Last active July 27, 2017 15:56
places to eat, drink, stuff to do and see in the lovely port city of Buenos Aires

Buenos Aires

Restaurants & Food

  • Famous & fancy: Patagonia Sur
  • Pizzeria Guerrin excellent pizza, maybe the best in the city
  • Some cute cafes, all equally good, nice for breakfast or lunch: Malvon, Oui Oui
  • Historic cafe: Las Violetas
  • STEAK: some good places I've been are:
    • Social la Lechuza - ok, probably not the best steak in town, but for ambiance this place is neat, it's a social club with an owl (la lechuza) theme, walls are covered in customer drawings of, yes, owls. I like the joint.
@catwell
catwell / bench.lua
Created October 18, 2011 20:11
Redis Scripting speed
require "redis"
local WMAX = 100000
local rc = Redis.connect("unix:///tmp/redis.sock")
local rs_mhset = [[
local keys,argv,rcall = KEYS,ARGV,redis.call
local n,f = 0,argv[#keys+1]
for i,k in ipairs(keys) do n = n + rcall("hset",k,f,argv[i]) end
return n