Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:

Akshit Arora aroraakshit

:octocat:
View GitHub Profile
@aroraakshit
aroraakshit / softmax.py
Created Mar 30, 2019 — forked from Hasil-Sharma/softmax.py
Vectorized softmax calculation using numpy
View softmax.py
import numpy as np
def softmax(x):
""" Compute the softmax for each row of the input x
Arguments:
x -- A N dimensional veector or M X N dimensional numpy matrix.
Return:
x -- modified x in-place
"""
View conda-environment-ty.yml
name: rapids012
channels:
- rapidsai
- nvidia
- conda-forge
- defaults
- numba
dependencies:
- python=3.6
- cudatoolkit=10.1
@aroraakshit
aroraakshit / gpu_dataproc_packages.sh
Last active Apr 7, 2021
Assumes 2xT4 GPUs are attached to an ubuntu based image.
View gpu_dataproc_packages.sh
#!/bin/bash
OS_NAME=$(lsb_release -is | tr '[:upper:]' '[:lower:]')
readonly OS_NAME
OS_DIST=$(lsb_release -cs)
readonly OS_DIST
CUDA_VERSION='10.2'
readonly CUDA_VERSION
readonly DEFAULT_NVIDIA_DEBIAN_GPU_DRIVER_VERSION='460.56'
View custom_gpu_init_actions.sh
#!/bin/bash
# Dataproc configurations
readonly HADOOP_CONF_DIR='/etc/hadoop/conf'
readonly HIVE_CONF_DIR='/etc/hive/conf'
readonly SPARK_CONF_DIR='/etc/spark/conf'
function execute_with_retries() {
local -r cmd=$1
for ((i = 0; i < 10; i++)); do