Skip to content
Snippets Groups Projects
Commit 545ca322 authored by Eilert Tunheim's avatar Eilert Tunheim
Browse files

Added empty python script

parent b3f722d4
No related branches found
No related tags found
No related merge requests found
......@@ -11,7 +11,12 @@ import org.apache.commons.math3.stat.descriptive.SummaryStatistics;
import org.apache.commons.math3.stat.regression.SimpleRegression;
import org.python.util.PythonInterpreter;
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.*;
import java.util.stream.DoubleStream;
import java.util.stream.IntStream;
public class LineChartFunctionality {
......@@ -187,8 +192,27 @@ public class LineChartFunctionality {
}
//PythonInterpreter.initialize(System.getProperties(),System.getProperties(), data);
//Process process = Runtime.getRuntime().exec(LineChartFunctionality.class.getResource("/com.application/DataProcessing/NonlinearRegression.py").getFile());
//BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
//System.out.println(reader.readLine());
/*
ProcessBuilder pb = new ProcessBuilder("python", "/com.application/DataProcessing/NonlinearRegression.py",Arrays.deepToString(data));
Process p = pb.start();
BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()));
int ret = new Integer(in.readLine());
System.out.println("value is : " + ret);
*/
//pythonInterpreter.execfile(LineChartFunctionality.class.getResource("/com.application/DataProcessing/NonlinearRegression.py").getFile());
//pythonInterpreter.execfile();
PythonInterpreter pythonInterpreter = new PythonInterpreter();
DoubleStream stream = Arrays.stream(data).flatMapToDouble(x -> Arrays.stream(x));
//pythonInterpreter.execfile(stream,LineChartFunctionality.class.getResource("/com.application/DataProcessing/NonlinearRegression.py").getFile());
//InputStream inputStream = Arrays.stream(data).toArray();
XYChart.Series<String, Number> regressionSeries = new XYChart.Series<String, Number>();
......
print("This line will be printed.")
print(locals())
\ No newline at end of file
print("This line will be printed.")
print(locals())
\ No newline at end of file
No preview for this file type
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment