Compare commits
No commits in common. "master" and "master" have entirely different histories.
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"scriptLanguage" : "PYTHON",
|
"scriptLanguage" : "PYTHON_3",
|
||||||
"executableScriptName" : "sample_app.py",
|
"executableScriptName" : "sample_app.py",
|
||||||
"inputFiles" : [ {
|
"inputFiles" : [ {
|
||||||
"dataType" : "text_data",
|
"dataType" : "text_data",
|
||||||
@ -18,6 +18,6 @@
|
|||||||
"fileName" : "multiplied_numbers_plot.png",
|
"fileName" : "multiplied_numbers_plot.png",
|
||||||
"isReturnedValue" : false
|
"isReturnedValue" : false
|
||||||
} ],
|
} ],
|
||||||
"requiredTools" : [ "python3", "python-numpy" ],
|
"requiredTools" : [ "python3" ],
|
||||||
"requiredComputationResources" : { }
|
"requiredComputationResources" : { }
|
||||||
}
|
}
|
@ -5,7 +5,7 @@
|
|||||||
# Sample function created for demonstration of creating custom applications functionality
|
# Sample function created for demonstration of creating custom applications functionality
|
||||||
# See also https://docs.cyfronet.pl/display/ISDOC/Creating+Custom+Applications
|
# See also https://docs.cyfronet.pl/display/ISDOC/Creating+Custom+Applications
|
||||||
|
|
||||||
import numpy as np
|
from numpy import loadtxt
|
||||||
import matplotlib.pyplot as plt
|
import matplotlib.pyplot as plt
|
||||||
|
|
||||||
def main(numbers_file, multiplier):
|
def main(numbers_file, multiplier):
|
||||||
@ -20,10 +20,8 @@ def main(numbers_file, multiplier):
|
|||||||
numbers.
|
numbers.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
numbers = np.genfromtxt(numbers_file, comments="#", delimiter=",", unpack=False)
|
numbers = loadtxt(numbers_file, comments="#", delimiter=",", unpack=False)
|
||||||
numbers = numbers[~np.isnan(numbers)]
|
|
||||||
numbers = np.array(numbers).flatten()
|
|
||||||
multiplied_numbers = numbers * multiplier
|
multiplied_numbers = numbers * multiplier
|
||||||
plt.figure()
|
plt.figure()
|
||||||
plt.plot(multiplied_numbers)
|
plt.plot(multiplied_numbers)
|
||||||
plt.savefig('multiplied_numbers_plot.png')
|
plt.savefig('multiplied_numbers_plot.png')
|
||||||
|
Loading…
Reference in New Issue
Block a user