Skip to content

Instantly share code, notes, and snippets.

View ColeMurray's full-sized avatar

Cole Murray ColeMurray

View GitHub Profile
@ColeMurray
ColeMurray / Dockerfile
Last active July 19, 2023 03:35
basic-multi-layer-docker-build
FROM python:3.10-slim as sources
RUN apt-get -y update --fix-missing
ENV DEBIAN_FRONTEND=noninteractive
ARG SSH_KEY_PRIV
RUN apt-get update -qq && apt-get install -y git openssh-server
# Authorize SSH Host
@ColeMurray
ColeMurray / tornado-repo-download.sh
Created August 23, 2022 00:01
Script for downloading all repos from tornado-repositories
set -euxo
REPO_NAMES=(
"deployer"
"tornado-root-updater"
"tornado-verified-forks"
"tornado-deploy"
"tornado-aggregator"
"tornado-relayer-registry-subgraph"
"tornado-trees"
@ColeMurray
ColeMurray / README.md
Last active August 16, 2021 04:52
A patch adding local time information characteristic reading the NRF5 SDK for the ble_cts_c client

NRF5 SDK 17.0.2 ble_cts_c Patch

This patch adds support for local time information characteristic from the Current Time Service.

It adds an additional handle and data structure for storing the local time information.

typedef struct ATTR_PACKED {
    int8_t timezone_offset; // offset from UTC in increments of 15
 uint8_t dst_offset;
@ColeMurray
ColeMurray / requirements.txt
Created November 28, 2018 07:11
Requirements for age gender estimation tutorial
scipy==1.1.0
numpy==1.15.4
opencv-python==3.4.4.19
tqdm==4.28.1
@ColeMurray
ColeMurray / predict.py
Created November 28, 2018 06:37
Predict script for age gender estimation tutorial
import logging
from argparse import ArgumentParser
import tensorflow as tf
from scipy.misc import imread
from tensorflow.contrib import predictor
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
@ColeMurray
ColeMurray / requirements.txt
Last active November 28, 2018 06:08
Python dependencies for age estimation tutorial
scipy==1.1.0
numpy==1.15.4
opencv-python==3.4.4.19
tqdm==4.28.1
@ColeMurray
ColeMurray / Dockerfile.gpu
Last active November 28, 2018 05:51
Dockerfile gpu variant for age and gender estimation tutorial
FROM tensorflow/tensorflow:1.12.0-gpu-py3
RUN apt-get update \
&& apt-get install -y libsm6 libxrender-dev libxext6
ADD $PWD/requirements.txt /requirements.txt
RUN pip3 install -r /requirements.txt
CMD ["/bin/bash"]
@ColeMurray
ColeMurray / Dockerfile
Created November 28, 2018 05:33
Docker file for age and gender estimation tutorial
FROM tensorflow/tensorflow:1.12.0-py3
RUN apt-get update \
&& apt-get install -y libsm6 libxrender-dev libxext6
ADD $PWD/requirements.txt /requirements.txt
RUN pip3 install -r /requirements.txt
CMD ["/bin/bash"]
@ColeMurray
ColeMurray / train.py
Last active November 29, 2018 07:11
Training runner for tensorflow estimator
import argparse
import tensorflow as tf
from medium_age_estimation_tutorial.cnn_estimator import model_fn, serving_fn
from medium_age_estimation_tutorial.dataset import csv_record_input_fn
tf.logging.set_verbosity(tf.logging.INFO)
if __name__ == '__main__':
@ColeMurray
ColeMurray / dataset.py
Last active November 28, 2018 06:22
CSV reader over dataset
import os
import tensorflow as tf
def csv_record_input_fn(img_dir, filenames, img_size=150, repeat_count=-1, shuffle=True,
batch_size=16, random=True):
"""
Creates tensorflow dataset iterator over records from :param{filenames}.