Load and apply style thru command script - automation

I automatically load a particular network when I start Cytoscape using a command script (-S flag). I'd like to also load a style file (.xml file) and apply it to the network. That is, the equivalent of:
File->Import->Styles from File...
Styles->Style Drop Down->Select new loaded style
Can this be done via any of the automation mechanisms?

The Cytoscape Automation wiki has instructions on how to find documentation on all the available commands:
https://github.com/cytoscape/cytoscape-automation/wiki/Trying-Automation
The following commands should help you perform your task:
vizmap/load file
vizmap/apply

Related

How to add a new version of VASP in pyiron

I have a new and compiled version of VASP that performs magnetic constrains of the local moment orientations on-the-fly, which I'd like to test and use with pyiron.
Please could you provide guidance and steps to follow in order to add this version of VASP to pyiron as one more executable?
Thank you,
Eduardo
You need to add corresponding run script(s) to the pyiron resources.
In your .pyiron config file the paths for the resources are stated as RESOURCE_PATHS = /comma/separated/list, /of/paths/to/the/resources.
In the resources you need to add the run scripts in the directory vasp/bin/ using the naming convention run_code_version[_mpie].sh. The actual run script is, of course, dependent on the cluster and the libraries used to build VASP and might look similar to
run_vasp_version.sh (single core version):
module load intel/...
srun -n 1 /path/to/the/new/executable/version/vasp_std
run_vasp_version_mpie.sh (mpi version):
module load intel/... impi/...
srun -n $1 /path/to/the/new/executable/version/vasp_std
Please have a look at the other vasp run scripts which you have used from the shared resources.
(For MPIE colleagues: Detailed examples for the setup/run scripts for vasp on cmti can be found in this privat repo.)

JMeter Test Results Monitoring/ Analysis

I want to start load testing by running JMeter from command line for more accurate test results, but how can I monitor the run and then analyze the results after the test finishes.
You can generate JTL (JMeter results) file while executing the JMX (JMeter script) file from command line. A sample command for generating JTL file will look like this..
jmeter -n -t path-to-jmeterScript.jmx -l path-to-jtlFile.jtl
After completion of script execution you can open the JMeter GUI and simply open the JTL file in any listener (as per your requirement).
Most of the listeners in JMeter have an option to save the results into a file. This file contains usually not the report itself, but the samples which are generated by the tests. If you define this filename, you can generate the reports using these saved files. For example see http://jmeter.apache.org/usermanual/component_reference.html#Summary_Report .
If you run JMeter in command-line non-GUI mode passing results file name via -l parameter it will output results there. After test finishes you will be able to open the file with the Listener of your choice and perform the analysis.
By default JMeter writes results in chunks, if you need to monitor them in real time add the following line to user.properties file (lives under /bin folder of your JMeter installation)
jmeter.save.saveservice.autoflush=true
You can use other properties which names start with jmeter.save.saveservice.* to control what metrics you need to store. The list with default values can be seen in jmeter.properties file. See Apache JMeter Properties Customization Guide for more information on various JMeter properties types and ways of working with them.
You can also consider running your JMeter test via Taurus tool - it provides some statistics as the test goes either in console mode or via web interface.

Running a JSON graph locally

I've been using Flowhub.io to do my development on the nodejs device. Now that the GUI-based design is done, I'm ready to take it offline and run the code via the command line. How would do I do this? I have the JSON file corresponding to the graph I created online, but not sure how to use the noflo nodejs module.
Could someone help me by showing me an example of how to load a graph using the noflo module, please? Thanks!
f you want to run an existing graph, you can use the --graph option.
noflo-nodejs --graph graphs/MyMainGraph.json
If you also want the process to exit when the network stops, you can pass --batch.
PS: I added this to the noflo-nodejs README.

Render Blender model on a server

We are using Blender to open a .blend model, apply some python code via the python console and create a .dae file.
Now we need to implement this functionality on a linux server to serve .dae files to a browser on request.
That means we (conceptually) need to trigger blender from the console, pass the .blend-file and the python script as arguments and make blender to output the .dae file.
We are not blender experts, so maybe you can tell me a) whether this is possible without starting the blender GUI and doing it manually or not and b) what options we have to achieve that functionality.
Blender is quite flexible. You can run it on a server without the GUI (in background mode) and also execute a python script within blender to manipulate the scene (e.g. export .DAE):
./blender --background --python yourExportDAEScript.py
More command line options available in the manual
yourExportDAEScript.py could manipulate the model and finally do something like:
bpy.ops.wm.collada_export(filepath="/DAE/EXPORT/PATH/file.dae")
More details in the Blender Python API

Selenium: How to read values from any file (text, excel or csv)?

Some of my project data needs to be changed every time i run the script. In order to have automated system i require to read values from any file and send its data as input to selenium script.
If you are using Selenium IDE, export your script to JUNIT ( java), then create a java project using that java file, then download the Selenium server library (jar file) and add to your project. then start the selenium server and run your script it should run successfully.
If it is working then you can simply use a java code to read files and set the values in the relevant places in your code.
ex: if you are using excel you can use jxl.jar library
You may refer my blog for more details. http://hrftools.blogspot.com/
From your description, it seems like you need to run the selenium script for different values and values have to be read from a file. You can use testNG's dataprovider to achieve this very easily.