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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- 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` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ 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’... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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.