How do i run a Python script in a Google Workflow? - google-workflows

How do i run a Python script in a Google Workflow? I can't find any examples. Lots about the reverse ie Python running/creating workflows.

Google Workflows is not for running language scripts like Python. It is designed for users to create a workflow that executes stuff in a certain way and order. If you want to run some Python scripts, you could consider Cloud Functions.
​

Related

How to build a command line package from scripts?

I have spent time working on a bioinformatics project and produced numerous scripts and now I would like to use them for building a bioinformatics software that runs in the command line terminal, with the costumary manual and binary files. I would like to be able 1. to protect the code, 2. Make it fancy by not having to count with multiple scripts and 3. share the code with any one interested.
Since I don't really know where to start from, I would like to ask for orientation on the topic. I have been reading about script compilation and I think this could work, but I have scripts in three different coding languages, mainly python and bash, so I have not seen any tutorial on this specific case.
Any help as sharing resources (videos, manuals, software, etc.) or giving tips is appreciated. I know this is a VERY open question, so open answers are also welcome.
You could use the python argparse library to build a command line application that accepts arguments and flags. With this method, you can provide flags for user input and run your different scripts, including the bash scripts, based on user input.
https://realpython.com/command-line-interfaces-python-argparse/
Similarly, you can do this in a bash script that provides the user with options and run your other scripts based on input.
https://www.redhat.com/sysadmin/arguments-options-bash-scripts
I'm not sure what you mean by protect the code? If you mean hide the code, as far as I know, you cannot easily hide bash and python code or turn them into binaries if you want to share the script.

Python: is SimpleHTTPServer only capable of serving directory?

I have some experience in nodejs and php and almost zero experience in python, and I need to write a very simple 1-page script on my small VM which takes input through GET and executes some bash commands based on the input. So I thought python would be better suited for it since it already comes pre-installed with ubuntu, plus it would provide me an opportunity to start learning python.
I Googled all day and only found references to SimpleHTTPServer which only seems to be for delivering static server-side web-pages. Where do I start in python to achieve a mix of dynamic server-side pages and bash scripting with minimum additional installation and configuration?

Is it possible to automate running PDFelement using command line

I am currently trying to parse some PDF with tables to formats like csv/excel so that I can then programmatically process them with python, etc.
I have found that PDFElement does a good job converting PDF to excel, but have only been doing conversions manually via the GUI.
I'm hoping to be able to automate the process of batch converting PDF to excel using a program and was wondering if anyone had any ideas on how to best achieve this.
My initial instinct was to try to run the program .exe from command prompt using some arguments. However, based on their support page, it doesn't look like this functionality is supported.
Is there a way around this? Or should I resort to some sort of automated clicking script? Thanks!
PDFelement cannot be used from the command line. Their software provides a GUI and there is no way to automate tasks. I've spoken with their support.

Submitting an SGE job to PBS/Torque

Hi I am setting up a software pipeline (an extensive bioinformatic annotation tool) that was originally written to submit SGE jobs but I am on a PBS/Torque cluster. Any ideas about a way to convert these scripts from SGE to PBS? Or a piece of software available that can submit SGE jobs to PBS?
Thanks, Marcus
A search on the web found:
http://wiki.ibest.uidaho.edu/help/Tutorials/SGE_PBS_Converting.html
Creating a script that does replacement using the table from the above link would be simple, if not somewhat tedious.
Here is a useful side-by-side comparison of Torque and SGE commands:
https://kb.iu.edu/d/avgl.
I don't know of any tool that would convert the scripts automatically, since in some aspects the two systems can be quite different (e.g. they handle parallel environments differently, etc.).

Ruby server-side back end scripting tools/resources

I am trying to learn how ruby is used in a server based back end environment. For example I want to be running a ruby script 24/7 on a server. What are the best practices for this and how does one go about doing this?
Can anyone provide some resources on how to do this or if you could label what I am trying to do? I am unsure of the terms that I am supposed to be googling.
Use cron. From OS point of view Ruby app is just a script like bash.
Also all Unix OSes have some kind of daemon script (like see examples in /etc/init.d)
Try BackgroundRb - this is a special Rails plugin that works like a Linux daemon. You could use any classes/models defined in your Rails application within the background code. You could also pass data to/from background process.

Resources