Skip to content

Instantly share code, notes, and snippets.

View cdw's full-sized avatar

Dave Williams cdw

View GitHub Profile
@cdw
cdw / Calibrate farmbot.ipynb
Created November 15, 2021 21:54
Calibrate farmbot camera
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cdw
cdw / Calibrate camera.ipynb
Created November 5, 2021 22:49
OpenCV camera calibration for borescope
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cdw
cdw / onnx_convert.py
Last active September 21, 2021 23:02
ONNX Conversion for SQuAD example
torch.onnx.export(model = torch_model,
args = (dummy_input['input_ids'].to(device), dummy_input['attention_mask'].to(device)), #Tuple of inputs for models that take more than one input
f = onnx_path,
export_params = True,
opset_version=11,
do_constant_folding = True,
input_names = ['input_ids', 'attention_mask'],
output_names = ['output'],
dynamic_axes = {'input_ids': {0: 'batch_size'},
'attention_mask': {0: 'batch_size'},
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from typing import List, Union
import numpy as np
class TicTacToe:
"""Play a game of tictactoe, optionally against a human"""
@cdw
cdw / 01_structure_tensor.ipynb
Created April 10, 2020 19:57
Structure tensor for quantifying orientation and level of organization in myofibrils
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cdw
cdw / 04_clustering_metrics.ipynb
Created April 6, 2020 17:38
Clustering metrics for comparing colony clusteringh
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cdw
cdw / Untitled.ipynb
Last active March 18, 2020 21:08
Bar plot with error
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cdw
cdw / 2020_02_11_14_22_timelapse_seg_clustering.ipynb
Last active February 12, 2020 23:06
Cluster metrics for colony-formation evaluation
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cdw
cdw / 01_cell_cycle.ipynb
Last active January 24, 2020 00:40
Cell cycle for c6
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cdw
cdw / 01_read_lif.ipynb
Created January 14, 2020 22:28
Load timelapse frames from Leica microscopes (LIF format)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.