This file contains 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
# There are 10 labels starting from 0 to 9 | |
print(f'Unique train labels: {np.unique(train_labels)}') | |
print(f'Unique test labels: {np.unique(test_labels)}') |
This file contains 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
# Shape of training nad test data | |
print(f'Shape of train_images: {train_images.shape}') | |
print(f'Shape of train_labels: {train_labels.shape}') | |
print(f'Shape of test_images: {test_images.shape}') | |
print(f'Shape of test_labels: {test_labels.shape}') |
This file contains 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
fashion_mnist = tf.keras.datasets.fashion_mnist | |
(train_images, train_labels), (test_images, test_labels) = fashion_mnist.load_data() | |
# Creating class label array | |
class_names = ['T-shirt/top', 'Trouser', 'Pullover', 'Dress', 'Coat', 'Sandal', 'Shirt', 'Sneaker', 'Bag', 'Ankle boot'] |
This file contains 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
# List all files under the input directory | |
for dirname, _, filenames in os.walk('/kaggle/input'): | |
for filename in filenames: | |
print(os.path.join(dirname, filename)) | |
# List of physical devices | |
tf.config.experimental.list_physical_devices() |
This file contains 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
import tensorflow as tf | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import os, datetime |
This file contains 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
import pkg_resources | |
import types | |
def get_imports(): | |
for name, val in globals().items(): | |
if isinstance(val, types.ModuleType): | |
name = val.__name__.split(".")[0] | |
elif isinstance(val, type): | |
name = val.__module__.split(".")[0] |
This file contains 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
1. Go to C:\Users\<my_username>\AppData\Roaming and locate the .gitkraken folder | |
2. Inside this folder you can find a localRepoCache file. | |
3. Remove the entries that areunwanted/ duplicated, and restart the Gitkraken. |
This file contains 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
1. Run below command on terminal from where you want to copy the packeges or supprting files | |
"npm pack" | |
for more details about this command ref. https://docs.npmjs.com/cli/pack.html | |
2. Now copy the entire source code folder icluding 'node_modules' on host PC | |
3. And run below command from host PC terminal 'npm install <name>-<version>.tgz'. Here name is from step 1 | |
4. Now your code should work on host PC. | |
5. In case any error change the project name in 'package.json' on host PC. |
This file contains 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
Ref. https://blog.cloudboost.io/nodejs-pm2-startup-on-windows-db0906328d75 | |
In above document Ref Section : [1b]> PM2 save | |
This section explains how to configure one application and save the configurations. | |
But if we run 'pm2 save' cmd it will override the previous configurations. | |
In order to start multiple applications together load all the applications using command 'pm2 reload ecosystem.config.js --env=production' | |
and then run 'pm2 save' command at the end. It takes a snapshot of currently running Node applications. | |
We can then restore these applications using 'pm2 resurrect'. Same command will be called during windows reboot. |
This file contains 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
VS Code ships with a Git source control manager (SCM) extension. | |
But to use it with GitHub public/private repository please install Git on PC. Make sure to install the latest version of Git. | |
Go to 'https://github.com/' and create new repository for your project. e.g. gitTest | |
Now click on 'Clone or Download' and copy the url .e.g. https://github.com/satishgunjal/gitTest.git | |
Now open the terminal from VS Code and go to the location where you want to create this project directoty. | |
e.g. terminal path:> C:\Users\satish.gunjal\Google Drive\My Projects\Node.js\Workspace | |
'gitTest' Project folder will be created under 'Workspace' folder in file system | |
Now select Terminal Window and type: | |
git config --global user.name <github userID> | |
git clone <URL from github link copied earlier> >> this will create the 'gitTest' folder under 'Workspace' folder |