From fb4def0b6f86fa75f04ef46787c639c59ec45cf5 Mon Sep 17 00:00:00 2001 From: Siddhant Sinha <35433185+sid573@users.noreply.github.com> Date: Wed, 23 May 2018 18:15:06 +0530 Subject: [PATCH 1/7] Add files via upload Done Task 1 and Task 2 --- task1.py | 12 ++++++++++++ task2a.py | 15 +++++++++++++++ task2b.py | 17 +++++++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 task1.py create mode 100644 task2a.py create mode 100644 task2b.py diff --git a/task1.py b/task1.py new file mode 100644 index 0000000..78b6f0c --- /dev/null +++ b/task1.py @@ -0,0 +1,12 @@ +import numpy as np +import matplotlib.pyplot as plt + +a = np.random.random((1,500)) + +x = np.arange(0.1,100,.1) +y = (1/0.001)* np.log(x) + +#print(y) +#print(a) +plt.plot(x,y) +plt.show() diff --git a/task2a.py b/task2a.py new file mode 100644 index 0000000..f7a3942 --- /dev/null +++ b/task2a.py @@ -0,0 +1,15 @@ +import numpy as np +import matplotlib.pyplot as plt +import time + +start1_time = time.time() + +x = np.random.rand(10) +y = np.random.rand(10) + +#print(x) +#print(y) + +print(x.dot(y)) +print("--- %s seconds ---" % (time.time() - start1_time)) + diff --git a/task2b.py b/task2b.py new file mode 100644 index 0000000..6492bd2 --- /dev/null +++ b/task2b.py @@ -0,0 +1,17 @@ +import numpy as np +import matplotlib.pyplot as plt +import time + +start2_time = time.time() + +x = np.random.rand(10) +y = np.random.rand(10) + +sum = 0 +i=0 +for a in x: + sum = sum + (x[i]*y[i]) + i=i+1 +print(sum) + +print("--- %s seconds ---" % (time.time() - start2_time)) From b355a90357bc7504950dc46853469d9fb2abb24d Mon Sep 17 00:00:00 2001 From: Siddhant Sinha <35433185+sid573@users.noreply.github.com> Date: Wed, 23 May 2018 18:26:07 +0530 Subject: [PATCH 2/7] Delete task1.py --- task1.py | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 task1.py diff --git a/task1.py b/task1.py deleted file mode 100644 index 78b6f0c..0000000 --- a/task1.py +++ /dev/null @@ -1,12 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt - -a = np.random.random((1,500)) - -x = np.arange(0.1,100,.1) -y = (1/0.001)* np.log(x) - -#print(y) -#print(a) -plt.plot(x,y) -plt.show() From 42b845af28f14568aeff6697add1b948043ae91e Mon Sep 17 00:00:00 2001 From: Siddhant Sinha <35433185+sid573@users.noreply.github.com> Date: Wed, 23 May 2018 18:26:20 +0530 Subject: [PATCH 3/7] Delete task2a.py --- task2a.py | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 task2a.py diff --git a/task2a.py b/task2a.py deleted file mode 100644 index f7a3942..0000000 --- a/task2a.py +++ /dev/null @@ -1,15 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt -import time - -start1_time = time.time() - -x = np.random.rand(10) -y = np.random.rand(10) - -#print(x) -#print(y) - -print(x.dot(y)) -print("--- %s seconds ---" % (time.time() - start1_time)) - From 1067d9ae6d967a8f3186f7eb9bbc98136b7f153a Mon Sep 17 00:00:00 2001 From: Siddhant Sinha <35433185+sid573@users.noreply.github.com> Date: Wed, 23 May 2018 18:27:08 +0530 Subject: [PATCH 4/7] Delete task2b.py --- task2b.py | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 task2b.py diff --git a/task2b.py b/task2b.py deleted file mode 100644 index 6492bd2..0000000 --- a/task2b.py +++ /dev/null @@ -1,17 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt -import time - -start2_time = time.time() - -x = np.random.rand(10) -y = np.random.rand(10) - -sum = 0 -i=0 -for a in x: - sum = sum + (x[i]*y[i]) - i=i+1 -print(sum) - -print("--- %s seconds ---" % (time.time() - start2_time)) From 6207f9b03aea553d5981ce973fc3f8ce048c20b8 Mon Sep 17 00:00:00 2001 From: Siddhant Sinha <35433185+sid573@users.noreply.github.com> Date: Wed, 23 May 2018 18:41:40 +0530 Subject: [PATCH 5/7] Add files via upload --- task1.py | 12 ++++++++++++ task2a.py | 15 +++++++++++++++ task2b.py | 17 +++++++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 task1.py create mode 100644 task2a.py create mode 100644 task2b.py diff --git a/task1.py b/task1.py new file mode 100644 index 0000000..78b6f0c --- /dev/null +++ b/task1.py @@ -0,0 +1,12 @@ +import numpy as np +import matplotlib.pyplot as plt + +a = np.random.random((1,500)) + +x = np.arange(0.1,100,.1) +y = (1/0.001)* np.log(x) + +#print(y) +#print(a) +plt.plot(x,y) +plt.show() diff --git a/task2a.py b/task2a.py new file mode 100644 index 0000000..f7a3942 --- /dev/null +++ b/task2a.py @@ -0,0 +1,15 @@ +import numpy as np +import matplotlib.pyplot as plt +import time + +start1_time = time.time() + +x = np.random.rand(10) +y = np.random.rand(10) + +#print(x) +#print(y) + +print(x.dot(y)) +print("--- %s seconds ---" % (time.time() - start1_time)) + diff --git a/task2b.py b/task2b.py new file mode 100644 index 0000000..6492bd2 --- /dev/null +++ b/task2b.py @@ -0,0 +1,17 @@ +import numpy as np +import matplotlib.pyplot as plt +import time + +start2_time = time.time() + +x = np.random.rand(10) +y = np.random.rand(10) + +sum = 0 +i=0 +for a in x: + sum = sum + (x[i]*y[i]) + i=i+1 +print(sum) + +print("--- %s seconds ---" % (time.time() - start2_time)) From af3293ab63e7e991532aaf071bda85cd6759a797 Mon Sep 17 00:00:00 2001 From: Siddhant Sinha <35433185+sid573@users.noreply.github.com> Date: Mon, 28 May 2018 01:40:54 +0530 Subject: [PATCH 6/7] Rename task1.py to task1.ipynb --- task1.py => task1.ipynb | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename task1.py => task1.ipynb (100%) diff --git a/task1.py b/task1.ipynb similarity index 100% rename from task1.py rename to task1.ipynb From 2d661ecd3644b9ef33298b63f4a516989569c897 Mon Sep 17 00:00:00 2001 From: Siddhant Sinha <35433185+sid573@users.noreply.github.com> Date: Mon, 28 May 2018 01:41:48 +0530 Subject: [PATCH 7/7] Rename task1.ipynb to task1.py --- task1.ipynb => task1.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename task1.ipynb => task1.py (100%) diff --git a/task1.ipynb b/task1.py similarity index 100% rename from task1.ipynb rename to task1.py