Enter this in the search box along with your search terms:
Get all gists from the user santisbon.
user:santisbon
Find all gists with a .yml extension.
extension:yml
Find all gists with HTML files.
language:html
| #!/bin/bash | |
| # Bash function to download a file with wget, showing a progress bar and enables | |
| # re-downloading if interrupted. Also can automatically determine filename from | |
| # supplied URL or override from command line. | |
| # First argument is URL. | |
| # Second optional argument is filename. | |
| download () { | |
| local URL="$1" | |
| local FI="$2" |
| class SelfAttention(nn.Module): | |
| def __init__(self, attention_size, batch_first=False, non_linearity="tanh"): | |
| super(SelfAttention, self).__init__() | |
| self.batch_first = batch_first | |
| self.attention_weights = Parameter(torch.FloatTensor(attention_size)) | |
| self.softmax = nn.Softmax(dim=-1) | |
| if non_linearity == "relu": | |
| self.non_linearity = nn.ReLU() |
| #!/usr/bin/env bash | |
| # Example: | |
| # ./find-ecr-image.sh foo/bar mytag | |
| if [[ $# -lt 2 ]]; then | |
| echo "Usage: $( basename $0 ) <repository-name> <image-tag>" | |
| exit 1 | |
| fi | |
| IMAGE_META="$( aws ecr describe-images --repository-name=$1 --image-ids=imageTag=$2 2> /dev/null )" |
| case class Scored[T](item: T, value: Double) | |
| trait Val[-A] { | |
| def valueOf(a: A): Double | |
| } | |
| object Val { | |
| def apply[T: Val]: Val[T] = | |
| implicitly[Val[T]] | |
Enter this in the search box along with your search terms:
Get all gists from the user santisbon.
user:santisbon
Find all gists with a .yml extension.
extension:yml
Find all gists with HTML files.
language:html
| import keras | |
| import numpy as np | |
| timesteps = 60 | |
| input_dim = 64 | |
| samples = 10000 | |
| batch_size = 128 | |
| output_dim = 64 | |
| # Test data. |
| #!/usr/bin/env bash | |
| # Author: Sasha Nikiforov | |
| # source of inspiration | |
| # https://stackoverflow.com/questions/41293077/how-to-compile-tensorflow-with-sse4-2-and-avx-instructions | |
| # Detect platform | |
| if [ "$(uname)" == "Darwin" ]; then | |
| # MacOS |