Skip to content

Instantly share code, notes, and snippets.

@ChaitanyaChandra
ChaitanyaChandra / sample.csv
Created June 5, 2025 00:46
Sample CSV, Sales
We can make this file beautiful and searchable if this error is corrected: It looks like row 9 should actually have 14 columns, instead of 3 in line 8.
Region,Country,Item Type,Sales Channel,Order Priority,Order Date,Order ID,Ship Date,Units Sold,Unit Price,Unit Cost,Total Revenue,Total Cost,Total Profit
Middle East and North Africa,Libya,Cosmetics,Offline,M,10/18/2014,686800706,10/31/2014,8446,437.20,263.33,3692591.20,2224085.18,1468506.02
North America,Canada,Vegetables,Online,M,11/7/2011,185941302,12/8/2011,3018,154.06,90.93,464953.08,274426.74,190526.34
Middle East and North Africa,Libya,Baby Food,Offline,C,10/31/2016,246222341,12/9/2016,1517,255.28,159.42,387259.76,241840.14,145419.62
Asia,Japan,Cereal,Offline,C,4/10/2010,161442649,5/12/2010,3322,205.70,117.11,683335.40,389039.42,294295.98
Sub-Saharan Africa,Chad,Fruits,Offline,H,8/16/2011,645713555,8/31/2011,9845,9.33,6.92,91853.85,68127.40,23726.45
Europe,Armenia,Cereal,Online,H,11/24/2014,683458888,12/28/2014,9528,205.70,117.11,1959909.60,1115824.08,844085.52
Sub-Saharan Africa,Eritrea,Cereal,Online,H,3/4/2015,679414975,4/17/2015,2844,205.70,117.11,585010.80,333060.84,251949.96
Europe,Montenegro,Clot
@ChaitanyaChandra
ChaitanyaChandra / wsl.md
Created July 29, 2024 12:36
WSL Systemd
  • add the following text in file /etc/wsl.conf
[boot]
systemd=true
  • list distributions
wsl -l -v
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-html
data:
index.html: |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 2
selector:
matchLabels:
app: nginx
template:
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-conf
data:
nginx.conf: |
user nginx;
worker_processes 3;
error_log /var/log/nginx/error.log;
events {
@ChaitanyaChandra
ChaitanyaChandra / kube_dashboard.yaml
Last active December 17, 2023 09:32
kubernetes dashboard
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@ChaitanyaChandra
ChaitanyaChandra / .bashrc
Created May 19, 2022 17:43
automatic git commit. commit should be like this : automatic commit #1
# add this alias text on your ~/.bashrc file or ~/.zprofile
alias gitp="source ~/gitp.sh"
@ChaitanyaChandra
ChaitanyaChandra / code.sh
Last active May 11, 2022 14:12
aws cli to upgrade lambda runtime
#!/bin/bash
# listing all functions in csv format using Regular expressions
lambda_fun=$(
aws lambda list-functions \
--function-version ALL \
--region=us-east-2 \
--output text \
--query "Functions[?Runtime=='python3.6'].FunctionName" | sed -E 's/ +/\\n/g')
@ChaitanyaChandra
ChaitanyaChandra / code.sh
Last active February 18, 2022 02:28
shell script to clone all github repo
# you need to install gh (github api)
# windows : choco install gh
# mac : brew install gh
username="ChaitanyaChandra" # user name or org name is required
limit=100
gh repo list $username --limit $limit | awk '{print $1}' > out.txt
while read -r line; do echo "git clone https://github.com/$line.git" >> final.sh ; done < out.txt
chmod +x final.sh
./final.sh