This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#conda create an env | |
conda create -n py376-tf241 ipykernel python=3.7.6 | |
conda activate py376-tf241 | |
# find out current gpu avaliablity | |
import tensorflow as tf | |
print(tf.__version__) | |
print(tf.config.list_pysical_devices()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# create a topic with specified partitons | |
kafka-topics --bootstrap-server xx.xx.xx.xx:39092 --create --partitions 2 --topic test-partitions | |
kafka-topics --bootstrap-server xx.xx.xx.xx:39092 --describe --topic test-partitions | |
# create a topic with default partitions | |
kafka-topics --bootstrap-server xx.xx.xx.xx:39092 --create --topic test-def-partitions | |
kafka-topics --bootstrap-server xx.xx.xx.xx:39092 --describe --topic test-def-partitions | |
# alter the number of partitions of an existing topic | |
kafka-topics --bootstrap-server xx.xx.xx.xx:39092 --alter --topic test-def-partitions --partitions 3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install | |
pip install tensorflowjs | |
# convert h5 model to json | |
tensorflowjs_converter --input_format=keras model_3.h5 model_3.json | |
# view the model in json format: | |
python -m json.tool model.json | |
# note: jq need os access to install, not just a pip install, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubectl config set-context --current --namespace=namepsace_name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo red | base64 | |
# cmVkCg== | |
echo "cmVkCg==" | base64 -D | |
# red |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!curl http://docker-registry.default-tenant.app.us-sales-32.iguazio-cd0.com/v2/_catalog | json_pp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sed 's/<search regex>/<replacement>/g' <input file> <output file> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo amazon-linux-extras install docker | |
sudo systemctl enable docker | |
sudo systemctl start docker | |
sudo usermod -aG docker ec2-user # allows you to run `docker` commands without `sudo` | |
sudo reboot | |
docker info |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo yum install golang -y | |
go version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew install hudochenkov/sshpass/sshpass |