Skip to content

Instantly share code, notes, and snippets.

View ryanjulian's full-sized avatar

Ryan Julian ryanjulian

View GitHub Profile
@ryanjulian
ryanjulian / test_keras.py
Last active January 21, 2019 23:36
Testing Keras serialization for custom layers
"""MLP Layer based on tf.keras.layer."""
import numpy as np
import tensorflow as tf
from tensorflow.keras.layers import Dense
from tensorflow.keras.layers import Layer as KerasLayer
from tensorflow.keras.models import Model as KerasModel
from tensorflow.keras.models import Sequential
from tensorflow.python.framework import tensor_shape
# flake8: noqa
@ryanjulian
ryanjulian / conda_cs188.sh
Last active February 3, 2019 22:46
conda installation script for louise
#!/usr/bin/env bash
# This script installs conda for CS188 on macOS distributions.
# Exit if any error occurs
# set -e
### START OF CODE GENERATED BY Argbash v2.6.1 one line above ###
die()
{
local _ret=$2
@ryanjulian
ryanjulian / hello_prefect.py
Last active August 12, 2020 22:23
Prefect + dask.distributed Quickstart
import time
from prefect import task, Flow
from prefect.engine.executors import DaskExecutor
from prefect.environments import LocalEnvironment
from prefect.utilities.logging import get_logger
logger = get_logger('dask-example')
executor = DaskExecutor(address='tcp://localhost:8786')
@ryanjulian
ryanjulian / Dockerfile
Created July 25, 2020 22:53
Use volume mounts for code with the dev image
ARG PARENT_IMAGE=ubuntu:18.04
# Garage base target ###########################################################
FROM $PARENT_IMAGE AS garage-18.04
# http://bugs.python.org/issue19846
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
ENV LANG C.UTF-8
# apt dependencies