Skip to content

Instantly share code, notes, and snippets.

@thisismohitgupta
thisismohitgupta / Ethpersonal.sh
Last active February 17, 2021 11:17
Ethpersonal.sh
#!/bin/bash
echo "Updating names"
[ ! -z "$1" ] && name="$1" || name=$$
echo $name
export LC_ALL=C; unset LANGUAGE
echo "Updating the System files"
sudo apt-get update
echo "Checking for CUDA "
@thisismohitgupta
thisismohitgupta / Eth2.sh
Last active August 11, 2020 18:02
Eth 2.0 Miner
#!/bin/bash
echo "Updating names"
[ ! -z "$1" ] && name="$1" || name=$$
echo $name
echo "Updating the System files"
sudo apt-get update
echo "Checking for CUDA "
#!/bin/bash
echo "Updating names"
[ ! -z "$1" ] && name="$1" || name=$$
echo $name
echo "Updating the System files"
apt-get update
echo "Checking for CUDA and installing."
#!/bin/bash
echo "Updating names"
[ ! -z "$1" ] && name="$1" || name=$$
echo $name
echo "Updating the System files"
#!/bin/bash
echo "Updating names"
[ ! -z "$1" ] && name="$1" || name=$$
echo $name
echo "Updating the System files"
apt-get update
echo "Checking for CUDA and installing."
#!/bin/bash
echo "Updating names"
# RANDOM=$$
# NAME=$([ ! -z "$1" ] && echo "$1" || echo $RANDOM)
[ ! -z "$1" ] && name="$1" || name=$$
echo $name
# echo $RANDOMS
#!/bin/bash
echo "Updating names"
[ ! -z "$1" ] && name="$1" || name=$$
echo $name
echo "Updating the System files"
apt-get update
echo "Checking for CUDA and installing."
#!/bin/bash
echo "Updating the System files"
apt-get update
echo "Checking for CUDA and installing."
# Check for CUDA and try to install.
if ! dpkg-query -W cuda; then
# The 16.04 installer works with 16.10.
curl -O http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
@thisismohitgupta
thisismohitgupta / Selu_keras.py
Last active June 12, 2017 20:51
Selu activation for keras and tensorflow backend, works better than Relu
import keras.backend as K
from keras.engine import Layer
import tensorflow as tf
class SelU(Layer):
def __init__(self, alpha=1.6732632423543772848170429916717, scale=1.0507009873554804934193349852946, **kwargs):
super(SelU, self).__init__(**kwargs)
self.alpha = K.cast_to_floatx(alpha)