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 bash | |
set -uexo pipefail | |
if [ ! -f linuxdeploy-x86_64.AppImage ] | |
then | |
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage | |
fi | |
if [ ! -f linuxdeploy-plugin-appimage-x86_64.AppImage ] | |
then |
This file has been truncated, but you can view the full file.
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 numpy as np # type: ignore | |
from typing import List, Callable, Union, Optional, Text | |
def cartesian(arrays, out=None): | |
# type: (List[np.ndarray], np.ndarray) -> np.ndarray | |
""" | |
From https://stackoverflow.com/a/1235363 | |
Generate a cartesian product of input arrays. |
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 numpy as np | |
from typing import List, Callable, Union, Optional | |
def cartesian(arrays, out=None): | |
# type: (List[np.ndarray], np.ndarray) -> np.ndarray | |
""" | |
From https://stackoverflow.com/a/1235363 |
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
# A correct and dabnn-compatible PyTorch implementation of binary convolutions. | |
# It consists of a implementation of the binary convolution itself, and the way | |
# to make the implementation both ONNX- and dabnn-compatible | |
# 1. The input of binary convolutions should only be +1/-1, so we pad -1 instead | |
# of 0 by a explicit pad operation. | |
# 2. Since PyTorch doesn't support exporting Sign ONNX operator (until | |
# https://github.com/pytorch/pytorch/pull/20470 gets merged), we perform sign | |
# operation on input and weight by directly accessing the `data` | |
import torch |
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
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account. | |
Token for proof: | |
[Verifying my OpenPGP key: openpgp4fpr:ae767adf33d6dbc2746ce7ec845a581542488b59] |
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
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account. | |
Token for proof: | |
[Verifying my OpenPGP key: openpgp4fpr:ae767adf33d6dbc2746ce7ec845a581542488b59] |
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
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account. | |
Token for proof: | |
[Verifying my OpenPGP key: openpgp4fpr:ae767adf33d6dbc2746ce7ec845a581542488b59] |