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 org.slf4j.Logger; | |
| import org.slf4j.LoggerFactory; | |
| import orin2.bcap.BCAPClient; | |
| import java.lang.reflect.Array; | |
| public class Orin2RobotManager { | |
| private BCAPClient m_client; | |
| private int hCtrl = 0; | |
| private int hRob = 0; |
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
| datecolumn = yourDF["date"] | |
| meaningful_date=pd.DataFrame({"year": datecolumn.dt.year, | |
| "month": datecolumn.dt.month, | |
| "day": datecolumn.dt.day, | |
| "hour": datecolumn.dt.hour, | |
| "dayofyear": datecolumn.dt.dayofyear, | |
| "week": datecolumn.dt.week, | |
| "weekofyear": datecolumn.dt.weekofyear, | |
| "dayofweek": datecolumn.dt.dayofweek, | |
| "weekday": datecolumn.dt.weekday, |
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
| datecolumn = yourDF["date"] | |
| meaningful_date=pd.DataFrame({"year": datecolumn.dt.year, | |
| "month": datecolumn.dt.month, | |
| "day": datecolumn.dt.day, | |
| "hour": datecolumn.dt.hour, | |
| "dayofyear": datecolumn.dt.dayofyear, | |
| "week": datecolumn.dt.week, | |
| "weekofyear": datecolumn.dt.weekofyear, | |
| "dayofweek": datecolumn.dt.dayofweek, | |
| "weekday": datecolumn.dt.weekday, |
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
| public class ScaleSeventeenPercent extends SameDiffLambdaLayer { | |
| @Override | |
| public SDVariable defineLayer(SameDiff sd, SDVariable x) { return x.mul(0.17); } | |
| @Override | |
| public InputType getOutputType(int layerIndex, InputType inputType) { return inputType; } | |
| } | |
| public class ScaleTenPercent extends SameDiffLambdaLayer { | |
| @Override |
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
| public class ScaleSeventeenPercent extends SameDiffLambdaLayer { | |
| @Override | |
| public SDVariable defineLayer(SameDiff sd, SDVariable x) { return x.mul(0.17); } | |
| @Override | |
| public InputType getOutputType(int layerIndex, InputType inputType) { return inputType; } | |
| } | |
| public class ScaleTenPercent extends SameDiffLambdaLayer { | |
| @Override |
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 | |
| source_dir="red2" | |
| list = os.listdir(source_dir) | |
| print(list) | |
| for index,filename in enumerate(list): | |
| src = os.path.join(source_dir,filename) | |
| dst = os.path.join(source_dir,"red"+str(index)+".jpg") | |
| os.rename(src,dst) |
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
| package my.skymind.denso; | |
| import orin2.bcap.BCAPClient; | |
| import java.lang.reflect.Array; | |
| public class Orin2RobotManager { | |
| private BCAPClient m_client; | |
| private int hCtrl = 0; | |
| private int hRob = 0; |
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 net.lingala.zip4j.core.ZipFile; | |
| import net.lingala.zip4j.exception.ZipException; | |
| import org.bytedeco.javacv.CanvasFrame; | |
| import org.bytedeco.javacv.Frame; | |
| import org.bytedeco.javacv.FrameGrabber; | |
| import org.bytedeco.javacv.OpenCVFrameConverter; | |
| import org.bytedeco.opencv.opencv_core.Mat; | |
| import org.bytedeco.opencv.opencv_core.Point; | |
| import org.bytedeco.opencv.opencv_core.Scalar; | |
| import org.bytedeco.opencv.opencv_core.Size; |
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 org.bytedeco.javacv.Frame; | |
| import org.bytedeco.javacv.FrameGrabber; | |
| import org.bytedeco.javacv.OpenCVFrameConverter; | |
| import org.bytedeco.opencv.opencv_core.*; | |
| import org.nd4j.linalg.io.ClassPathResource; | |
| import org.slf4j.Logger; | |
| import org.slf4j.LoggerFactory; | |
| import static org.bytedeco.opencv.global.opencv_core.flip; | |
| import static org.bytedeco.opencv.global.opencv_highgui.*; |
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
| package global.skymind.solution.convolution.objectdetection; | |
| import org.bytedeco.opencv.opencv_core.*; | |
| import static org.bytedeco.opencv.global.opencv_core.flip; | |
| import static org.bytedeco.opencv.global.opencv_imgproc.*; | |
| import org.bytedeco.javacv.*; | |
| import org.datavec.image.loader.NativeImageLoader; | |
| import org.datavec.image.transform.ColorConversionTransform; | |
| import org.deeplearning4j.nn.graph.ComputationGraph; |
NewerOlder