Skip to content

Instantly share code, notes, and snippets.

View colinmford's full-sized avatar

Colin M. Ford colinmford

View GitHub Profile
@tatianamac
tatianamac / tatiana-mac-speaker-rider.md
Last active April 4, 2025 06:30
Tatiana Mac's Speaker Rider

Speaker Rider

by Tatiana Mac

Last updated 14 April 2021

What is a speaker rider?

As speaking comes with immense privilege, I have crafted a speaker rider to set expectations and boundaries around my engagement. I am grateful to all the conference organisers who have brilliantly hosted me. I would love to continue to exercise this privilege to speak at conferences, and use this privilege to make the landscape more accessible and beneficial to tech's most historically excluded and marginalised communities.

Considerations

😫 I provide a lot of explanations for those of you who never had to consider these things. Most thoughtful conferences I've attended check most of these boxes intrinsically, particularly when conference runners are experienced speakers. They get it.

@simoncozens
simoncozens / HTKerner.py
Created February 1, 2019 15:42
HT LetterKerner, first draft
#MenuTitle: HT LetterKerner
# Put this in your HTLetterSpacer script directory so it can find
# the library.
# Todo:
# Does not handle whole-font yet.
# Does not know or care about kerning groups.
# The reference glyph should be adjusted based on the letter pair
# - "n" works well for lowercase-lowercase
@prateekchandrayan
prateekchandrayan / MNISTwithKeras.py
Last active June 17, 2021 07:10
MNIST prediction using Keras and building CNN from scratch in Keras
#Step 1
import cv2 # working with, mainly resizing, images
import numpy as np # dealing with arrays
import os # dealing with directories
from random import shuffle # mixing up or currently ordered data that might lead our network astray in training.
from tqdm import tqdm # a nice pretty percentage bar for tasks. Thanks to viewer Daniel BA1/4hler for this suggestion
import tensorflow as tf #Import Tensorflow
import glob #This will extract all files from the folder
import keras
from keras.preprocessing.image import ImageDataGenerator
# Robofont script to remove broken image paths, keeping good ones intact.
import os
f = CurrentFont()
layerOrder = ['foreground']
layerOrder.extend(f.layerOrder)
for g in f:
for layerName in layerOrder:
layeredGlyph = g.getLayer(layerName)
@dannguyen
dannguyen / README.md
Last active September 10, 2024 19:41
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

@gumblex
gumblex / PathFitter.py
Created April 4, 2015 12:01
Path fitter in Python - An Algorithm for Automatically Fitting Digitized Curves
"""
Ported from Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
http://paperjs.org/
Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey
http://scratchdisk.com/ & http://jonathanpuckey.com/
Distributed under the MIT license. See LICENSE file for details.
All rights reserved.
@okay-type
okay-type / aPreviewer.py
Last active August 29, 2015 14:03
aPreviewer.py for Robofont, show the current glyph big and small as a simple alternative to looking at drawings in space center.
# jackson @ okaytype.com
# simpler big glyph preview window v3
from vanilla import Window
from defconAppKit.windows.baseWindow import BaseWindowController
from mojo import events
from mojo.events import addObserver, removeObserver
from mojo.glyphPreview import GlyphPreview
class BigGlyphPreview(BaseWindowController):
@okay-type
okay-type / Ventriloquist.py
Last active May 5, 2018 11:48
Ventriloquist: insert a dummy dsig table (with serials)
# Ventriloquist - Build 0.1
# insert a dummy dsig table with unique numbers into .otf fonts
# the idea is to kill two birds with one stone
# this idea needs lots of testing
# to do: add SerialDump[] to a txt file for record keeping
#
# [email protected]
from fontTools.ttLib import TTFont
from mojo.compile import *
@okay-type
okay-type / MetricsAdj.py
Last active December 21, 2015 23:18
Metrics Adjuster
# [email protected]
### requires an icon file toolGoMetrics.pdf in the same folder
# download it from www.theharrietseries.com/crypt/robofont/toolGoMetrics.pdf
### updated 2013/03/10 — linked to didfontopen observers, just set as a startup script
### updated 2013/07/16 — fixed lame selection traceback and broken spacecenter adjustments
# to do: adjust by percent, uniform adjust, remember last setting
import os
from vanilla import *
from mojo.UI import CurrentFontWindow, CurrentSpaceCenter
@ndarville
ndarville / business-models.md
Last active February 27, 2025 10:00
Business models based on the compiled list at http://news.ycombinator.com/item?id=4924647. I find the link very hard to browse, so I made a simple version in Markdown instead.

Business Models

Advertising

Models Examples
Display ads Yahoo!
Search ads Google