Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions w1/anacondasetup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
## Basis Of Learning##
SnT project 2022

## step 1- Installing anacoda ##
download anaconda distribution from https://www.anaconda.com/download/#windows
install with all the packages.

## conda installation ##
Open anaconda navigator
In the anaconda navigator open powershell prompt there run the following commands
conda -V
it shows the version of conda installed on the windows

## creating virtual environments in conda ##
conda create -n name_of_the_file python=3.9
this creates a Venvironment

## to activate VEnvironment

conda activate deeplearn

## to install numpy,pandas,matplotlib

conda install numpy
conda install pandas
conda install matplotlib


## to check the version of the various libraries

print(numpy.__version__)
print(pandas.__version__)
print(matplotlib.__version__)

## completed with the anaconda distribution and created environments
29 changes: 29 additions & 0 deletions w1/jupiter_guide.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"after installing anaconda open anaconda navigator and then jupyter\n",
"notebook\n",
"\n",
"to create a new file in the notebook click on the “new”,and then select\n",
"the type of the file you want to create.\n",
"\n",
"if you create a python3 kernel notebook then you need to rename it by\n",
"clicking onthe topmost point right of the jupyter\n",
"\n",
"type the commands in the IN box and then for execution click on “run”\n",
"\n",
"the file by default get saved in cdrive . so we have created the file\n",
"now code for eg. print(“BcS OP”) after the completion of the file you\n",
"need to save\n",
"\n",
"and we completed the jupyter setup"
]
}
],
"nbformat": 4,
"nbformat_minor": 5,
"metadata": {}
}
61 changes: 61 additions & 0 deletions w1/matplotlib_guide.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## install matplotlib library using conda environment\n",
"\n",
"In the python3 kerenel import matplotlib.pyplot as plt\n",
"\n",
"## plotting methods\n",
"\n",
"by plot function you create a graph and to display it show function used\n",
"\n",
"\\*\\*\\*\\*\\*\\*line graph\\*\\*\\* plt.plot(\\[1,2,3\\],\\[4,5,6\\]) plt.show()\n",
"\n",
"## attributes\n",
"\n",
"\\*\\*label function is used to create axis names\n",
"\n",
"plt.plot(\\[1,2,3\\],\\[4,5,6\\]) plt.xlabel(“jkl”) plt.ylabel(“lkj”)\n",
"plt.show()\n",
"\n",
"**title function is used to give graph a name **legend is used in bar\n",
"and histogram\n",
"\n",
"plt.title(“regression_demo”) plt.legend()\n",
"\n",
"\\*\\*\\*\\*\\*\\*bar graph label for each bar and color for different graph\n",
"\n",
"plt.bar(\\[1,2,3\\],\\[4,5,6\\],label=“pros”,color=‘g’)\n",
"plt.bar(\\[7,8,9\\],\\[10,5,8\\],label=“os”,color=‘k’) plt.show()\n",
"\n",
"\\*\\*linewidth is used for differing line width\n",
"\n",
"plt.bar(\\[1,2,3\\],\\[4,5,6\\],label=“pros”,color=‘g’,linewidth=10)\n",
"plt.bar(\\[7,8,9\\],\\[10,5,8\\],label=“os”,color=‘k’,linewidth=14)\n",
"plt.show()\n",
"\n",
"\\*\\*grid is used for developing a grid\n",
"\n",
"plt.bar(\\[1,2,3\\],\\[4,5,6\\],label=“pros”,color=‘g’,linewidth=10)\n",
"plt.bar(\\[7,8,9\\],\\[10,5,8\\],label=“os”,color=‘k’,linewidth=14)\n",
"plt.grid(‘true’,color=‘c’) plt.show()\n",
"\n",
"\\*\\*\\*\\*\\*\\*histogram\n",
"\n",
"bins=\\[0,10,20,30,40,50,60,70,80,90,100\\]\n",
"ghbc=\\[0,22,33,21,30,45,54,56,55,87,54,90,54\\]\n",
"plt.hist(ghbc,bins,histtype=‘bar’,color=‘r’,rwidth=0.8)\n",
"\n",
"\\*\\*\\*\\*\\*\\*scatter\n",
"\n",
"x=\\[1.2.3.4.5\\] y=\\[2,0,8,7,6\\] plt.scatter(x,y,color=‘r’) plt.show()"
]
}
],
"nbformat": 4,
"nbformat_minor": 5,
"metadata": {}
}
59 changes: 59 additions & 0 deletions w1/numpy_guide.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## install the numpy library in conda environment\n",
"\n",
"In the notebook python kernel import numpy as np\n",
"\n",
"## creation of numpy arrays\n",
"\n",
"a=np.array(\\[elements\\]) eg. a=np.array(\\[1,2,3,4,5\\]) print(a)\n",
"—\\>\\[1,2,3,4,5\\]\n",
"\n",
"you can create a 2D array or nD array eg.\n",
"a=np.array(\\[\\[1,2,3\\],\\[4,5,6\\]\\]) print(a) —-\\>\\[\\[1,2,3\\] \\[4,5,6\\]\\]\n",
"\n",
"## attributes of arrays\n",
"\n",
"consider a array ‘a’ a=np.array(\\[1,2,3\\])\n",
"\n",
"*dimensions* a.ndim\n",
"\n",
"*shape* //gives the no.of rows,colns a.shape\n",
"\n",
"*type * a.dtype dtype’int32’ (output here)\n",
"\n",
"*itemsize* a.itemsize 4\n",
"\n",
"*nbytes* —-\\> gives total size of the array a.nbytes 12\n",
"\n",
"*getting a specific element* a\\[0,2\\] ——\\>3\n",
"\n",
"*getting a row* a\\[0,:\\] \\[1,2,3\\]\n",
"\n",
"*creating a array full of one or zero element* b=np.ones((2,3)\n",
",dtype=‘int32’) print(b) ———\\>\\[\\[1,1,1\\] \\[1,1,1\\]\\]\n",
"\n",
"*creating a array full of same element*\n",
"h=np.full((2,3),99,dtype=‘int32’) print(h)\n",
"\n",
"—-\\> \\[\\[99,99,99\\] \\[99,99,99\\]\\]\n",
"\n",
"*creating a identity matrix* j=np.identity(4) print(j)\n",
"\n",
"—\\> \\[\\[1,0,0,0\\] \\[0,1,0,0\\] \\[0,0,1,0\\] \\[0,0,0,1\\]\\]\n",
"\n",
"*some mathematical tool* np.cos(a) np.sin(a) a/2 a\\*\\*2 (gives all the\n",
"elements raised to the power 2)\n",
"\n",
"*matrix multiplication* np.matmul(a,b)"
]
}
],
"nbformat": 4,
"nbformat_minor": 5,
"metadata": {}
}