From d16b6e2107d77cf0ff66aabbadc698337fca95cf Mon Sep 17 00:00:00 2001 From: Tushar Sharma Date: Wed, 3 Oct 2018 02:39:34 +0530 Subject: [PATCH 1/2] Add files via upload --- Handwriting_Recognizer_DNN_classifier.py | 24 ++++++++++++++++++++++++ distance.py | 4 ++++ locator.py | 5 +++++ 3 files changed, 33 insertions(+) create mode 100644 Handwriting_Recognizer_DNN_classifier.py create mode 100644 distance.py create mode 100644 locator.py diff --git a/Handwriting_Recognizer_DNN_classifier.py b/Handwriting_Recognizer_DNN_classifier.py new file mode 100644 index 0000000..01481c6 --- /dev/null +++ b/Handwriting_Recognizer_DNN_classifier.py @@ -0,0 +1,24 @@ +#Importing Libraries +import numpy as np +import tensorflow as tf +import tensorflow.contrib.learn as learn +import tensorflow.contrib.metrics as metrics + +#Importing Dataset +mnist = learn.datasets.load_dataset('mnist') + +#Training Datasets +data = mnist.train.images +labels = np.asarray(mnist.train.labels, dtype=np.int32) +test_data = mnist.test.images +test_labels = np.asarray(mnist.test.labels, dtype=np.int32) +feature_columns = learn.infer_real_valued_columns_from_input(data) + +#Applying Classifiers +classifier = learn.DNNClassifier(feature_columns=feature_columns, n_classes=10,hidden_units=[1024,512,256]) +classifier.fit(data, labels, batch_size=100, steps=1000) + +#Evaluating the Results +classifier.evaluate(test_data, test_labels) +accuracy_score = classifier.evaluate(test_data, test_labels)["accuracy"] +print('Accuracy: {0:f}'.format(accuracy_score)) \ No newline at end of file diff --git a/distance.py b/distance.py new file mode 100644 index 0000000..73d12b7 --- /dev/null +++ b/distance.py @@ -0,0 +1,4 @@ +import geocoder +g = geocoder.ipinfo('me') +print(g.latlng) + diff --git a/locator.py b/locator.py new file mode 100644 index 0000000..f3cbbda --- /dev/null +++ b/locator.py @@ -0,0 +1,5 @@ +import geocoder +t=input("enter the location:") +g = geocoder.arcgis(t) +print(g.latlng) + From a8f3805c20cff52d6720aa1a2bfc76a298638753 Mon Sep 17 00:00:00 2001 From: Tushar Sharma Date: Wed, 3 Oct 2018 02:40:32 +0530 Subject: [PATCH 2/2] Update and rename distance.py to location_using_ip_address.py --- distance.py => location_using_ip_address.py | 1 - 1 file changed, 1 deletion(-) rename distance.py => location_using_ip_address.py (98%) diff --git a/distance.py b/location_using_ip_address.py similarity index 98% rename from distance.py rename to location_using_ip_address.py index 73d12b7..387f098 100644 --- a/distance.py +++ b/location_using_ip_address.py @@ -1,4 +1,3 @@ import geocoder g = geocoder.ipinfo('me') print(g.latlng) -