The following animation shows the first four iterations of sliding a 2D convolutional filter across an image, where the white pixels are encoded as 1 and the black pixels are encoded as -1.
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
""" | |
Encodes SNP format (TSV) into a numeric matrix (CSV) format. | |
See docstring in `main()` for more info, or run with --help. | |
""" | |
import click | |
import sys, os, csv, json | |
@click.command() | |
@click.argument("input_file", type=click.File("r")) |
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
""" | |
Adapts C implementation shown at | |
https://en.wikipedia.org/wiki/Hilbert_curve | |
(2018-12-19) | |
into Python. | |
""" | |
import sys | |
import numpy as np |
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
95 48 83 178 72 10 162 42 20 159 176 379 184 70 6 16 187 197 van | |
91 41 84 141 57 9 149 45 19 143 170 330 158 72 9 14 189 199 van | |
104 50 106 209 66 10 207 32 23 158 223 635 220 73 14 9 188 196 saab | |
93 41 82 159 63 9 144 46 19 143 160 309 127 63 6 10 199 207 van | |
85 44 70 205 103 52 149 45 19 144 241 325 188 127 9 11 180 183 bus | |
107 57 106 172 50 6 255 26 28 169 280 957 264 85 5 9 181 183 bus | |
97 43 73 173 65 6 153 42 19 143 176 361 172 66 13 1 200 204 bus | |
90 43 66 157 65 9 137 48 18 146 162 281 164 67 3 3 193 202 van | |
86 34 62 140 61 7 122 54 17 127 141 223 112 64 2 14 200 208 van | |
93 44 98 197 62 11 183 36 22 146 202 505 152 64 4 14 195 204 saab |
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.
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
# Quick `uv init` without src directory, "README.md", or "hello.py". | |
# Project name is optional (default to directory if not provided). | |
function uvi() { | |
if [ ! -z "$1" ] ; then | |
NAME="--name=$1" | |
fi | |
uv init --app --no-readme --no-workspace ${NAME} && rm hello.py | |
} | |
export -f uvi |
OlderNewer