Skip to content

Instantly share code, notes, and snippets.

View tbenst's full-sized avatar

Tyler Benster tbenst

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import time
import torch as T
import torch.nn as nn
import torch.nn.functional as F
import torch.backends.cudnn as cudnn
cudnn.benchmark = True
class SuperResBlock(nn.Module):
"""Upsample Volume using subpixel convolution.
import time
import torch
import torch as T
import torch.nn as nn
import torch.nn.functional as F
import torch.backends.cudnn as cudnn
cudnn.benchmark = True
class SuperResBlock(nn.Module):
"""Upsample Volume using subpixel convolution.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
-- any type that has a value, eg Number, is kind `*`
-- Behavior is a type constructor aka "Higher Kinded Type"
-- This is a function that takes an `a`, a type variable
-- and returns a `Behavior`
-- so it has kind `* -> *`
newtype Behavior a = Behavior { at :: Number -> a}
at :: forall a. Behavior a -> Time -> a
-- this function lets us reify a value `a` at time `t`
@tbenst
tbenst / tb-overlay.nix
Last active October 27, 2018 04:14 — forked from LnL7/lnl-overlay.nix
self: super:
{
# Install overlay:
# > mkdir -p .config/nixpkgs/overlays
# # use ? to avoid caching
# > curl -L "https://gist.github.com/tbenst/0e2c7bd0219eda87e3915182071f224b/raw?$(date +%s%N)" -o ~/.config/nixpkgs/overlays/tb.nix
# > nix-env -f '<nixpkgs>' -r -iA userPackages
userPackages = super.userPackages or {} // {
hello = self.hello;
$ nix-shell $HM_PATH -A install
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_US",
LC_ALL = (unset),
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
downloading ‘https://github.com/rycee/home-manager/archive/master.tar.gz’... [0/0 KiB, 0.0 KiB/s]
unpacking ‘https://github.com/rycee/home-manager/archive/master.tar.gz’...
let
pkgs = import <nixpkgs> {};
in pkgs.buildFHSUserEnv {
name = "julia";
targetPkgs = pkgs: with pkgs; [
gnumake
gcc
clang
python
gfortran
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.