Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/expect -f
# Dependency for this script
# sudo apt-get install expect
set timeout -1
spawn polly login
expect "Enter user name:"
send -- "$env(POLLY_USER_NAME)\r"
expect "Enter password:"
send -- "$env(POLLY_USER_PASSWORD)\n"
#!/bin/bash
BIN_PATH_POLLY=$(which polly)
if [[ "$BIN_PATH_POLLY" == "" ]]
then
echo "Polly not installed already"
else
echo "Uninstalling and removing cache so that fresh version can be installed"
BIN_PATH=$(dirname $BIN_PATH_POLLY)
PATH_TO_DEL=$(realpath $BIN_PATH/../lib/node_modules/@elucidatainc)
npm uninstall -g @elucidatainc/pollycli
#!/bin/bash
BIN_PATH_POLLY=$(which polly)
if [[ "$BIN_PATH_POLLY" == "" ]]
then
echo "Polly not installed already"
else
echo "Uninstalling and removing cache so that fresh version can be installed"
BIN_PATH=$(dirname $BIN_PATH_POLLY)
PATH_TO_DEL=$(realpath $BIN_PATH/../lib/node_modules/@elucidatainc)
npm uninstall -g @elucidatainc/pollycli
@GeorgeSabu
GeorgeSabu / Dockerfile
Last active April 3, 2020 09:33
Shiny App Docker template
#################### R version that is needed ##################
FROM rocker/r-ver:<r-version>
RUN apt-get update && apt-get install --no-install-recommends -y \
gdebi-core \
pandoc \
pandoc-citeproc \
libcurl4-gnutls-dev \
default-jre-headless \
libcairo2-dev \
@GeorgeSabu
GeorgeSabu / start_and_wait_till_job_ends.sh
Last active March 31, 2020 10:30
A example bash script which starts a job and waits till the job is complete
#!/bin/bash
# Starting a Polly job
# And this adds the output to a file called startme.txt
polly jobs submit --workspace-id <pass_workspace_id> --job-file $(pwd)/argojob.json > startme.txt
# Seeing the status
cat startme.txt
# checking if the job is been successfully submited ot not
# If error in submission exit with status 1
# If submitted successfully check the status of the job in regular intervals
SUCCESS_ERROR_INSTART=$(cat startme.txt | grep "Success:")
@GeorgeSabu
GeorgeSabu / Dockerfile
Last active September 2, 2020 09:49
Example docker job to upload and download Polly files
# In this example the docker is being built with docker name "mithoopolly/polly_cli_test" and tag "latest"
FROM ubuntu:latest
# update the node and npm
RUN apt-get update && \
apt-get install -y \
curl \
git \
uuid-runtime \
&& \
curl -sL https://deb.nodesource.com/setup_10.x | bash - && \
@GeorgeSabu
GeorgeSabu / model_parameters.csv
Last active March 31, 2020 08:31
An example to run "n" number of ML models using Polly CLI jobs
A B C job_name job_file_name
A1 B1 C1 job name 1 job_file_name1
A2 B2 C2 job name 2 job_file_name2
A3 B3 C3 job name 3 job_file_name3
A4 B4 C4 job name 4 job_file_name4
A5 B5 C5 job name 5 job_file_name5
A6 B6 C6 job name 6 job_file_name6
A7 B7 C7 job name 7 job_file_name7
A8 B8 C8 job name 8 job_file_name8
A9 B9 C9 job name 9 job_file_name9