Skip to content

Instantly share code, notes, and snippets.

👻

Cosmin Catalin SANDA cosmincatalin

👻
Block or report user

Report or block cosmincatalin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@cosmincatalin
cosmincatalin / install-rstudio-server.sh
Last active Oct 8, 2019
AWS EMR bootstrap to install RStudio Server along with sparklyr
View install-rstudio-server.sh
#!/bin/bash
# These variables can be overwritten using the arguments below
VERSION="1.1.463"
# drwho is listed as user in YARN's Resource Manager UI.
USER="drwho"
# Depending on where the EMR cluster lives, you might have to change this to avoid security issues.
# To change the default password (and user), use the arguments bellow.
# If the cluster is not visible on the Internet, you can just leave the defaults for convenience.
PASS="tardis"
@cosmincatalin
cosmincatalin / Shiny server with OAuth2.md
Last active Sep 13, 2017
Shiny community server with OAuth on Amazon EC2
View Shiny server with OAuth2.md

Shiny community server with OAuth on Amazon EC2

Description

This is detailed description of how to set-up a Shiny server (community edition) on an AWS EC2 instance, behind an OAuth2 security layer (Google OAuth2 in this case, but it can be something else).

Prerequisites

  • A Google Developer account
  • An Amazon Web Services account
@cosmincatalin
cosmincatalin / readme.md
Last active Sep 15, 2018
AWS EMR bootstrap to install R packages from CRAN
View readme.md

AWS EMR bootstrap to install R packages from CRAN

This bootstrap is useful if you want to deploy SparkR applications that run arbitrary code on the EMR cluster's workers. The R code will need to have its dependencies already installed on each of the workers, and will fail otherwise. This is the case if you use functions such as gapply or dapply.

How to use the bootstrap

  1. You will first have to download the gist to a file and then upload it to S3 in a bucket of your choice.
  2. Using the AWS EMR Console create a cluster and choose advanced options.
  3. In Step 3 you can configure your bootstraps. Choose to Configure and add a Custom action
@cosmincatalin
cosmincatalin / install-jupyter.sh
Last active Apr 16, 2018
AWS EMR bootstraps to install Jupyter (R, SparkR, Python 2, Python 3, PySpark)
View install-jupyter.sh
#!/bin/bash
MINICONDA_VERSION="4.3.21"
PANDAS_VERSION="0.20.3"
SCIKIT_VERSION="0.19.0"
while [[ $# > 1 ]]; do
key="$1"
case $key in
@cosmincatalin
cosmincatalin / object-counting-sagemaker-script.py
Created Mar 20, 2018
The first part of a SageMaker script for building an MXNet model that counts shapes in an image.
View object-counting-sagemaker-script.py
import logging
from pickle import load
import mxnet as mx
import numpy as np
from mxnet import autograd, nd, gluon
from mxnet.gluon import Trainer
from mxnet.gluon.loss import L2Loss
from mxnet.gluon.nn import Conv2D, MaxPool2D, Dropout, Flatten, Dense, Sequential
from mxnet.initializer import Xavier
@cosmincatalin
cosmincatalin / object-counting-sagemaker-script.py
Created Mar 21, 2018
The complete SageMaker script for building an MXNet model that counts shapes in an image.
View object-counting-sagemaker-script.py
import base64
import json
import logging
from pickle import load
import mxnet as mx
import numpy as np
from mxnet import autograd, nd, gluon
from mxnet.gluon import Trainer
from mxnet.gluon.loss import L2Loss
@cosmincatalin
cosmincatalin / notebook.ipynb
Last active Mar 21, 2018
The SageMaker attached notebook that allows building an MXNet model that counts shapes in an image
View notebook.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cosmincatalin
cosmincatalin / voice-recognition-sagemaker-script.py
Created May 31, 2018
Voice Recognition Sagemaker Script (Part1)
View voice-recognition-sagemaker-script.py
import base64
import glob
import json
import logging
import subprocess
import sys
import tarfile
import traceback
import uuid
import wave
@cosmincatalin
cosmincatalin / voice-recognition-sagemaker-script.py
Created May 31, 2018
Voice Recognition Sagemaker Script (Full)
View voice-recognition-sagemaker-script.py
import base64
import glob
import json
import logging
import subprocess
import sys
import tarfile
import traceback
import uuid
import wave
View voice-recognition-sagmaker-notebook.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
You can’t perform that action at this time.