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
| SET nnabla_build_folder_name=build | |
| SET nnabla_root=./nnable | |
| SET build_type=Release | |
| call .\nnable\build-tools\msvc\build_cpplib.bat | |
| call .\nnable-ext-cuda\build-tools\msvc\build_cpplib.bat | |
| cd .\nnable | |
| ren build build_Release | |
| cd ..\ | |
| cd .\nnable-ext-cuda |
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
| SET nnabla_version=1.12.0 | |
| powershell wget https://github.com/sony/nnabla/archive/v%nnabla_version%.zip -o nnable.zip | |
| powershell wget https://github.com/sony/nnabla-ext-cuda/archive/v%nnabla_version%.zip -o nnable-ext-cuda.zip | |
| powershell Expand-Archive -Path nnable.zip -Force -DestinationPath ./nnable | |
| powershell Move-Item ./nnable/nnabla-%nnabla_version%/* ./nnable/ | |
| powershell Remove-Item -Path ./nnable/nnabla-%nnabla_version% |
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 os | |
| import pathlib | |
| from tqdm import tqdm | |
| from PIL import Image | |
| import img2pdf | |
| # !pip install pathlib tqdm Pillow img2pdf | |
| def ConvertImage2Pdf(pdfFileName,imageDirPath,ext="png"): | |
| file = pathlib.Path(imageDirPath) |
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
| #pragma once | |
| #ifndef QUATERNIONFILTER_H | |
| #define QUATERNIONFILTER_H | |
| class QuaternionFilter | |
| { | |
| float GyroMeasError = PI * (40.0f / 180.0f); // gyroscope measurement error in rads/s (start at 40 deg/s) | |
| float GyroMeasDrift = PI * (0.0f / 180.0f); // gyroscope measurement drift in rad/s/s (start at 0.0 deg/s/s) | |
| float beta = sqrt(3.0f / 4.0f) * GyroMeasError; // compute beta |
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
| # https://www.tutorialspoint.com/check-if-a-point-is-inside-outside-or-on-the-ellipse-in-cplusplus | |
| def isInsideEllipse(ellipse,point): | |
| (x0, y0), bb, aa, phi_b_deg = ellipse | |
| (x1, y1) = point | |
| angle = np.radians(phi_b_deg) | |
| if aa > bb: | |
| a = aa/2 | |
| b = bb/2 |
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
| #https://github.com/joferkington/oost_paper_code/blob/master/error_ellipse.py | |
| def confidence_ellipse(x, y, n_std=3.0): | |
| def eigsorted(cov): | |
| vals, vecs = np.linalg.eigh(cov) | |
| order = vals.argsort()[::-1] | |
| return vals[order], vecs[:,order] | |
| xy = (np.mean(x), np.mean(y)) | |
| cov = np.cov(x, y) | |
| vals, vecs = eigsorted(cov) |
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 tqdm import tqdm | |
| import pandas as pd | |
| import pathlib | |
| targetDirectry = "./test" | |
| requestFile = "**/**/**/*.bmp" | |
| file = pathlib.Path(targetDirectry) | |
| pathList = list(file.glob(requestFile)) | |
| for i in (range(len(pathList))): |
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
| // Author : Katsuyoshi Hotta | |
| // sudo apt-get install libudev | |
| // udevadm info --query=all --name=/dev/video0 | |
| #include <stdio.h> | |
| #include <unistd.h> | |
| #include <libudev.h> | |
| int main() | |
| { |