This repo demonstrates moving from pandas to spark for big data analysis
Python - v3.5.2
Pandas - v0.19.2
Spark - v2.1.0
#!/bin/bash | |
# Script for installing Fish Shell on systems without root access. | |
# Fish Shell will be installed in $HOME/local/bin. | |
# It's assumed that wget and a C/C++ compiler are installed. | |
# exit on error | |
set -e | |
FISH_SHELL_VERSION=3.1.2 |
// Credits - https://gist.github.com/yershalom/a7c08f9441d1aadb13777bce4c7cdc3b | |
const base_url = 'https://api.github.com'; | |
function httpGet(theUrl, return_headers) { | |
var xmlHttp = new XMLHttpRequest(); | |
xmlHttp.open("GET", theUrl, false); // false for synchronous request | |
xmlHttp.send(null); | |
if (return_headers) { | |
return xmlHttp |
import typing | |
import matplotlib.pyplot as plt | |
import tensorflow as tf | |
def plot_confusion_matrix(cm: np.array, label_mappings:typing.Dict, num_classes:int) -> plt.Figure: | |
""" | |
| **@author:** Prathyush SP | |
| | |
| Create a confusion matrix using matplotlib | |
:param cm: A confusion matrix: A square ```numpy array``` of the same size as labels |
# -*- coding: utf-8 -*- | |
""" | |
| **@created on:** 11/05/17, | |
| **@author:** Prathyush SP, | |
| **@version:** v0.0.1 | |
| | |
| **Description:** | |
| DL Module Tests | |
| **Sphinx Documentation Status:** Complete | |
| |
# Argsort | |
l = [1,8,3,10,13, 23,4] | |
# Ascending | |
args = sorted(range(len(l)), key=l.__getitem__) | |
#[0, 2, 6, 1, 3, 4, 5] | |
# Descending | |
args[::-1] | |
#[5, 4, 3, 1, 6, 2, 0] | |
#!/usr/bin/env bash | |
# Remove and Install nvidia-docker2 | |
#======================================================================================================================================== | |
# If you have nvidia-docker 1.0 installed: we need to remove it and all existing GPU containers | |
docker volume ls -q -f driver=nvidia-docker | xargs -r -I{} -n1 docker ps -q -a -f volume={} | xargs -r docker rm -f | |
sudo apt-get purge -y nvidia-docker | |
# Add the package repositories | |
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | \ | |
sudo apt-key add - |
#!/bin/bash | |
# Install required softwares | |
sudo apt-get update | |
sudo apt-get install fish -y | |
sudo chsh -s /usr/bin/fish | |
# Setup static IP - | |
# LAN - 192.168.0.99 | |
# WLAN - 192.168.0.199 |
# No Proper documentation on installing horovod with spark support | |
# Reference - https://github.com/uber/horovod/blob/master/docs/spark.md | |
# Corrupt Java installtion - | |
sudo apt-add-repository ppa:webupd8team/java | |
sudo apt-get update | |
sudo apt-get install oracle-java8-installer | |
# Install Spark | |
wget http://mirrors.estointernet.in/apache/spark/spark-2.4.0/spark-2.4.0-bin-hadoop2.7.tgz |
# Install fish | |
cd /etc/yum.repos.d/ | |
sudo wget https://download.opensuse.org/repositories/shells:fish:release:2/RedHat_RHEL-6/shells:fish:release:2.repo | |
sudo yum install fish | |
# Update locatedb | |
sudo ionice -c3 updatedb | |
# Install g++ | |
sudo yum install gcc72-c++ |