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
fruits = ['apple', 'banana', 'grape'] | |
for fruit in fruits: | |
print(fruit) |
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
from chainer import cuda | |
from chainer import function | |
from chainer.utils import type_check | |
import numpy as np | |
import cupy as cp | |
def _kern(): | |
return cuda.elementwise( | |
'T cond, T x, T slope', 'T y', |
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
# License: | |
# I hereby state this snippet is below "threshold of originality" where applicable (public domain). | |
# | |
# Otherwise, since initially posted on Stackoverflow, use as: | |
# CC-BY-SA 3.0 skyking, Glenn Maynard, Axel Huebl | |
# http://stackoverflow.com/a/31047259/2719194 | |
# http://stackoverflow.com/a/4858123/2719194 | |
import builtins | |
import types |
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
tap "golangci/tap" | |
tap "gromgit/fuse" | |
tap "grpc/grpc" | |
tap "homebrew/bundle" | |
tap "homebrew/cask" | |
tap "homebrew/core" | |
tap "kyoshidajp/ghkw" | |
tap "px4/px4" | |
brew "a2ps" | |
brew "arp-scan" |
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 torch | |
import torch.optim as optim | |
import numpy as np | |
import cv2 # Ground truth生成や比較でのRodrigues変換に一部使用 | |
from scipy.spatial.transform import Rotation as R_scipy # Ground truthの回転生成用 | |
# PyTorchによるRodriguesの公式(回転ベクトルから回転行列へ) | |
def rodrigues_pytorch(rvecs_batch): | |
""" | |
Rodriguesの公式を用いて、回転ベクトルのバッチを回転行列のバッチに変換します。 |
OlderNewer