Skip to content

Instantly share code, notes, and snippets.

View bcattle's full-sized avatar

bcattle bcattle

View GitHub Profile
@bcattle
bcattle / PhotoLibraryAssetManager.swift
Created November 2, 2016 22:07
Photo Library Asset Manager, a code sample illustrating an asynchronous queue loading assets from Apple's iCloud service
//
// PhotoLibraryAssetManager.swift
// Koowalla
//
// Created by Bryan Cattle on 8/22/16.
// Copyright © 2016 Koowalla, Inc. All rights reserved.
//
import UIKit
import Bolts
@bcattle
bcattle / config-4.4.35-33.55.amzn1.x86_64
Created August 13, 2017 21:54
AWS Lambda Kernel Config
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86_64 4.4.35-33.55.amzn1.x86_64 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_PERF_EVENTS_INTEL_UNCORE=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"
@bcattle
bcattle / image_capture.py
Created August 1, 2019 20:29
Simple python code to capture images from a webcam
# -*- coding: utf-8 -*-
"""
Spyder Editor
This is a temporary script file.
"""
# Install OpenCV with
# pip install opencv-python
@bcattle
bcattle / live_timeseries.py
Created August 13, 2019 16:49
Live update plotting of a random timeseries using matplotlib
# Ours, no blit, plot a timeseries
from datetime import datetime
from matplotlib import pyplot
from matplotlib.animation import FuncAnimation
from random import randrange
import numpy as np
n_pts = 256
x_data = np.linspace(0, n_pts-1, n_pts)
y_data = np.zeros(n_pts)
@bcattle
bcattle / decorators.py
Created July 25, 2023 21:44
Minimal working decorator example in the style of `flask.App.route()`
import functools
import numpy as np
class DataServiceManager:
def __init__(self) -> None:
pass
def service(self, **options):
print('service() called')