Skip to content

Instantly share code, notes, and snippets.

View lordlinus's full-sized avatar

Sunil Sattiraju lordlinus

View GitHub Profile
#!/usr/bin/env python
# csv2hashed.py
#
# Usage:
# $ csv2hashed.py --salt SALT --input original.csv --output hashedfile.csv
#
# Assumptions:
# - This script performs basic normalization and is configured to read first_name, last_name and birthdate columns only
# - This script assumes the first column is always PersonID which
{
"attrFields": {
"attribute_1": "International aid/development worker",
"attribute_2": 3762,
"attribute_3": "B-",
"attribute_4": "Scott-Mendoza",
"attribute_5": "M",
"attribute_6": "2007-01-09",
"attribute_7": 8.302579812
},
colordiff <(jq -S '.configurations | .[].\"$1\".properties | select (.!=null)' $2) <(jq -S '.configurations | .[].\"$1\".properties | select (.!=null)' $3)
cat some.json| jq '. as $in
| reduce leaf_paths as $path ({};
. + { ($path | map(tostring) | join(".")): $in | getpath($path) })' | sort
[{
"operation": "default",
"spec": {
"temp": {
"name": "Token",
"type": "string",
"doc": "DR generate Hex token"
}
}
},
apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common -y
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository \
# converting csv into json and fix the value with spaces
jq split("\n") | .[] | split(",") | {k:.[0], v:[.[1] | split(" ") | .[]]}
import numpy as np,pandas as pd,dash,dash_daq as daq,fastai,fbprophet,joblib,lightgbm as lgb,matplotlib,matplotlib.pyplot as plt,plotly,psycopg2,pyqtgraph as pg,spacy,tensorflow as tf,torch,torch.nn as nn,torch.optim as optim,xgboost as xgb
from tensorflow import keras
package_version=f"""---Package and Version Installed ---
Numpy: {np.__version__}
Pandas: {pd.__version__}
Dash: {dash.__version__}
Dash_daq: {daq.__version__}
Fastai: {fastai.__version__}
Fbprophet: {fbprophet.__version__}
JobLib: {joblib.__version__}
dir "c:\aws\download" # Check the dir and list the files
Write-Host 'Conda packages Install'
Set-Location "c:\aws\download"
# Ensure anaconda is installed
Start-Process -FilePath 'conda' -ArgumentList 'install anaconda -y' -wait
# Install packages
Start-Process -FilePath 'conda' -ArgumentList 'install tensorflow=1.14.0 keras=2.2.4 -y' -wait
Start-Process -FilePath 'conda' -ArgumentList 'install -c conda-forge dash=1.3.0 orange3==3.23.1 lightgbm==2.3.0 -y' -wait
cudatoolkit==10.1.168
cudnn==7.6.0
h2o-py==3.18.0.2
py-xgboost==0.9.0