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 numpy as np | |
from itertools import accumulate, repeat, product | |
def partitions_with_overlap(image, partition_sizes, partitions_per_dim): | |
""" | |
Partition an image with overlap to list of images. | |
:param image: The image to partition. | |
:param partition_sizes: The sizes of the partition in each dimension. | |
:param partitions_per_dim: The number of partition per dimension. |
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
Get-WindowsCapability -Online | ? Name -like 'OpenSSH*' | |
# If OpenSSH client or server are not installed run the following | |
# Install the OpenSSH Client | |
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0 | |
# Install the OpenSSH Server | |
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0 | |
Start-Service sshd |
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 numpy as np | |
def rotation_matrix(axis, theta): | |
axis = np.asarray(axis) | |
axis = axis / np.sqrt(np.dot(axis, axis)) | |
a = np.cos(theta / 2.0) | |
b, c, d = -axis * np.sin(theta / 2.0) | |
aa, bb, cc, dd = a * a, b * b, c * c, d * d | |
bc, ad, ac, ab, bd, cd = b * c, a * d, a * c, a * b, b * d, c * d | |
return np.array([[aa + bb - cc - dd, 2 * (bc + ad), 2 * (bd - ac)], |