Skip to content

Instantly share code, notes, and snippets.

View kenfehling's full-sized avatar
:octocat:

Ken Fehling kenfehling

:octocat:
View GitHub Profile
@kenfehling
kenfehling / mxnet_pytorch_benchmark.py
Last active June 30, 2018 17:37
MXNet vs. PyTorch benchmark, comparing imperative vs. symbolic and single vs. half precision
import torch
from torch import nn as ptnn
from torch.autograd import Variable
import mxnet as mx
from mxnet.gluon import nn as mxnn
from mxnet import nd, initializer
from enum import IntEnum
from time import time
use_cuda = torch.cuda.is_available()
@kenfehling
kenfehling / summary.py
Last active July 17, 2018 09:36 — forked from kylemcdonald/summary.py
Pytorch model summary
from collections import OrderedDict
import torch as th
import torch.nn as nn
from torch.autograd import Variable
from torch.nn import Parameter
fmt = ' {:<20} {:>15} {:>15} {:>10}'
def stringify_shape(shape):
@kenfehling
kenfehling / Dockerfile
Last active March 23, 2019 12:02
Docker: Ubuntu 16.04 with Node 6.10.2, Selenium Standalone, Chrome Headless
FROM ubuntu:16.04
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
apt-transport-https \
openjdk-8-jre-headless \
curl \
xz-utils \
unzip \
bzip2 \
@kenfehling
kenfehling / index.html
Created September 15, 2015 21:30
A starter HTML page for JavaScript tutorials
<!DOCTYPE html>
<html lang="en">
<head>
<script src="main.js"></script>
<meta charset="UTF-8">
<title>Tutorial</title>
<style>
html, body {
margin: 0;
padding: 0;
#!/usr/bin/env bash
# For opening a file from the heads up display of Figwheel in IntelliJ IDEA
# Made for OS X but should work similarly on Linux with a different CMD variable
# Add this script to your path (ex. ~/bin) and use from
# :open-file-command in the :figwheel section of project.clj
INTELLIJ_VERSION=14 # Change for your (whole number) version of IntelliJ IDEA
CMD="/Applications/IntelliJ IDEA ${INTELLIJ_VERSION}.app/Contents/MacOS/idea"
"$CMD" "$PWD" --line $2 "$PWD/$1"