b
: Batch sizei
: Input features (Linear)o
: Output featuresc_in
: Input channelsc_out
: Output channelsn
: Input/output length (1D sequence, often number of tokens)n_in
: Input length (1D sequence)n_out
: Output length (1D sequence)
This file contains 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
BSD 3-Clause License | |
Copyright (c) Soumith Chintala 2016, | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without | |
modification, are permitted provided that the following conditions are met: | |
* Redistributions of source code must retain the above copyright notice, this | |
list of conditions and the following disclaimer. |
This file contains 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
BSD 3-Clause License | |
Copyright (c) Soumith Chintala 2016, | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without | |
modification, are permitted provided that the following conditions are met: | |
* Redistributions of source code must retain the above copyright notice, this | |
list of conditions and the following disclaimer. |
This file contains 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 necessary libraries | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from matplotlib.animation import FuncAnimation | |
# Define the SplitComplex class | |
class SplitComplex: | |
def __init__(self, real, j_component): | |
self.real = real | |
self.j_component = j_component |
This file contains 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
{ | |
inputs.flake-utils.url = "github:numtide/flake-utils"; | |
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; | |
outputs = { self, nixpkgs, flake-utils }: | |
let | |
inherit (nixpkgs) lib; | |
# Add the flake's overlay to each of the pkgs |
Experimental nix service for jupyterlab instead of jupyter using Tweag's jupyterWith expressions.
This is a temporary hack I'm using while waiting for jupyterWith to be contributed to nixpkgs (see https://github.com/tweag/jupyterWith/tree/1176b9e8d173f2d2789705ad55c7b53a06155e0f#nixpkgs)
This file contains 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
#! /usr/bin/env -S nix-env -if | |
{ pkgs ? import <nixpkgs> {}, ... }: | |
let | |
norman-layout = pkgs.fetchurl { | |
url = "https://gist.githubusercontent.com/rehno-lindeque/ad5fef21f15ad13a9a355bbbd41fdc0a/raw/aa7948603ee266bd2a0bb6c9778ae7dd8bd1eccb/xmodmap.norman"; | |
sha256 = "14a63as7i35g6gkf0sqb324ck9k61w1vsdnz30sf8svnp4c0wjgq"; | |
}; | |
in | |
{ |
This file contains 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
{ ... }: | |
# Temporarily enable ssh | |
{ | |
services = { | |
# Enable the OpenSSH daemon. | |
openssh = { | |
enable = true; | |
# Use for initial login |
This file contains 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
! My personalized version of the xmodmap for the Norman layout. | |
! http://normanlayout.info | |
! Originally from https://github.com/deekayen/norman | |
keycode 49 = grave asciitilde dead_tilde asciitilde | |
keycode 10 = 1 exclam exclamdown onesuperior | |
keycode 11 = 2 at masculine twosuperior | |
keycode 12 = 3 numbersign ordfeminine threesuperior | |
keycode 13 = 4 dollar cent sterling | |
keycode 14 = 5 percent EuroSign yen |
This file contains 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
#! /usr/bin/env nix-shell | |
#! nix-shell -i runghc -p "haskellPackages.ghcWithPackages (pkgs: with pkgs; [ text free exceptions_0_10_0 ])" | |
#! nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/nixpkgs-unstable.tar.gz | |
-- #! nix-shell -i runghc -p haskellPackages.text haskellPackages.free "haskellPackages.callHackage ''exceptions'' ''0.10.0'' {}" | |
{-# language DeriveFunctor, FlexibleInstances #-} | |
-- | Historical background reading for this experiment (in historical order): | |
-- | |
-- * https://stackoverflow.com/questions/41966893/why-is-there-no-monadmask-instance-for-exceptt |
NewerOlder