Skip to content

Instantly share code, notes, and snippets.

View shenoy-anurag's full-sized avatar
🎯
Focusing

Anurag shenoy-anurag

🎯
Focusing
View GitHub Profile
@shenoy-anurag
shenoy-anurag / useful-bash-commands.sh
Last active September 21, 2022 05:04
Useful Bash commands
#!/usr/bin/env bash
alias ip="dig +short myip.opendns.com @resolver1.opendns.com" # returns public IP address.
alias localip="ipconfig getifaddr en0" # returns private/local network DHCP IP address. change to en1 if using ethernet.
service_name="mongod"
sudo service $service_name status # shows status of service_name. eg: sudo service mongod status
Please provide the AWS S3 Bucket Region: us-east-2
Use AWS Signature Version 4?[Y/n] Y
is_aws_signature_v4: True
Testing Connection...
[OK] Connection To S3 Account
[OK] Write Permissions
[ERROR] Read Permissions
Error Connecting to S3: Please check you have read permissions on the S3 bucket.
Details: Traceback (most recent call last):
File "/Users/anurags/Projects/DataOps/diffgram/install.py", line 290, in validate_s3_connection
@shenoy-anurag
shenoy-anurag / diffgram-cluster.yml
Created June 3, 2022 21:00
Diffgram EKS Cluster
apiVersion: eksctl.io/v1alpha5
availabilityZones:
- us-east-2b
- us-east-2a
- us-east-2c
cloudWatch:
clusterLogging: {}
iam:
vpcResourceControllerPolicy: true
withOIDC: false
@shenoy-anurag
shenoy-anurag / typescript-learning.js
Created March 16, 2022 01:42
Learning the basics of Typescript and Javascript
console.log("Hello World");
let id: number = 3.14;
let num_name: string = "Pi";
let isRational: boolean = true;
let ch: any = 'c'
let n = undefined
let n2 = null
console.log(typeof n)
@shenoy-anurag
shenoy-anurag / Keras-dev-aarch64.dockerfile
Created February 3, 2022 20:00
Builds keras-dev container for arm64 / aarch64 systems
FROM python:3.9
# https://code.visualstudio.com/docs/remote/containers-advanced#_creating-a-nonroot-user
ARG USERNAME=keras-vscode
ARG USER_UID=1000
ARG USER_GID=$USER_UID
# Create the user
RUN groupadd --gid $USER_GID $USERNAME \
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \
@shenoy-anurag
shenoy-anurag / Plot_Examples.md
Created September 15, 2021 00:56 — forked from gizmaa/Plot_Examples.md
Various Julia plotting examples using PyPlot

FWIW: I'm not the author of the content presented here (which is an outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

What's an Effective Engineer?

@shenoy-anurag
shenoy-anurag / mutability_in_python.py
Created July 14, 2021 13:46
Mutable vs Immutable Objects in Python
"""
Mutable vs Immutable objects in Python
"""
# Numbers are immutable
a = 10
b = a
b += 1
@shenoy-anurag
shenoy-anurag / run_jupyter.py
Created October 23, 2020 23:20
Run Jupyter notebook
import subprocess
# Run Jupyter notebook server:
subprocess.call(["jupyter", "notebook"])
# Install Kernel:
# subprocess.call(['ipython', 'kernel', 'install', '--user', '--name=venv'])
@shenoy-anurag
shenoy-anurag / LinkedStack.py
Created August 8, 2020 23:16
An implementation of stacks using a linked list
class Node:
def __init__(self, item, next):
self.item = item
self.next = next
class LinkedStack:
def __init__(self):
self.n = 0
self.first = None