Skip to content

Commit f78adfc

Browse files
author
root
committed
first commit
1 parent 812fcdc commit f78adfc

16 files changed

Lines changed: 1135 additions & 0 deletions
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"cells": [],
3+
"metadata": {},
4+
"nbformat": 4,
5+
"nbformat_minor": 2
6+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"cells": [],
3+
"metadata": {},
4+
"nbformat": 4,
5+
"nbformat_minor": 2
6+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"cells": [],
3+
"metadata": {},
4+
"nbformat": 4,
5+
"nbformat_minor": 2
6+
}
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "raw",
5+
"metadata": {},
6+
"source": [
7+
"class inheritence"
8+
]
9+
},
10+
{
11+
"cell_type": "code",
12+
"execution_count": 12,
13+
"metadata": {},
14+
"outputs": [],
15+
"source": [
16+
"class baseclass:\n",
17+
" def basefunc(self):\n",
18+
" self.a=10\n",
19+
" self.b=20\n",
20+
" print(\"hola!!\")\n",
21+
" \n",
22+
" "
23+
]
24+
},
25+
{
26+
"cell_type": "code",
27+
"execution_count": 13,
28+
"metadata": {},
29+
"outputs": [],
30+
"source": [
31+
"class derievedclass(baseclass):\n",
32+
" \n",
33+
" \n",
34+
" \n",
35+
" def show(self):\n",
36+
" self.basefunc()\n",
37+
" "
38+
]
39+
},
40+
{
41+
"cell_type": "code",
42+
"execution_count": 14,
43+
"metadata": {},
44+
"outputs": [],
45+
"source": [
46+
"obj=derievedclass()"
47+
]
48+
},
49+
{
50+
"cell_type": "code",
51+
"execution_count": 15,
52+
"metadata": {},
53+
"outputs": [
54+
{
55+
"name": "stdout",
56+
"output_type": "stream",
57+
"text": [
58+
"hola!!\n"
59+
]
60+
},
61+
{
62+
"ename": "AttributeError",
63+
"evalue": "'derievedclass' object has no attribute 'display'",
64+
"output_type": "error",
65+
"traceback": [
66+
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
67+
"\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)",
68+
"\u001b[0;32m<ipython-input-15-3a5b94642195>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mobj\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mshow\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
69+
"\u001b[0;32m<ipython-input-13-0ad2372b0e19>\u001b[0m in \u001b[0;36mshow\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mshow\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 6\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mbasefunc\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 7\u001b[0;31m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdisplay\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
70+
"\u001b[0;31mAttributeError\u001b[0m: 'derievedclass' object has no attribute 'display'"
71+
]
72+
}
73+
],
74+
"source": [
75+
"obj.show()"
76+
]
77+
},
78+
{
79+
"cell_type": "code",
80+
"execution_count": null,
81+
"metadata": {},
82+
"outputs": [],
83+
"source": []
84+
}
85+
],
86+
"metadata": {
87+
"kernelspec": {
88+
"display_name": "Python 3",
89+
"language": "python",
90+
"name": "python3"
91+
},
92+
"language_info": {
93+
"codemirror_mode": {
94+
"name": "ipython",
95+
"version": 3
96+
},
97+
"file_extension": ".py",
98+
"mimetype": "text/x-python",
99+
"name": "python",
100+
"nbconvert_exporter": "python",
101+
"pygments_lexer": "ipython3",
102+
"version": "3.5.2"
103+
}
104+
},
105+
"nbformat": 4,
106+
"nbformat_minor": 2
107+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"cells": [],
3+
"metadata": {},
4+
"nbformat": 4,
5+
"nbformat_minor": 2
6+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"cells": [],
3+
"metadata": {},
4+
"nbformat": 4,
5+
"nbformat_minor": 2
6+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"cells": [],
3+
"metadata": {},
4+
"nbformat": 4,
5+
"nbformat_minor": 2
6+
}

One.ipynb

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"##Creating an environment"
8+
]
9+
},
10+
{
11+
"cell_type": "raw",
12+
"metadata": {},
13+
"source": [
14+
"1. Create a project direcory and within that directory, Use \n",
15+
"\n",
16+
"$ pipenv install --version(two/three)\n",
17+
"\n",
18+
"to create an environment, here the version specifies the python version\n",
19+
"\n",
20+
"2. $ pipenv shell (to activate the environemnt)\n",
21+
"\n",
22+
"3. $ easy_install package_name (to install the specific packages from the Python Package Index(pypi))\n"
23+
]
24+
},
25+
{
26+
"cell_type": "code",
27+
"execution_count": null,
28+
"metadata": {},
29+
"outputs": [],
30+
"source": []
31+
},
32+
{
33+
"cell_type": "code",
34+
"execution_count": null,
35+
"metadata": {},
36+
"outputs": [],
37+
"source": []
38+
}
39+
],
40+
"metadata": {
41+
"kernelspec": {
42+
"display_name": "Python 3",
43+
"language": "python",
44+
"name": "python3"
45+
},
46+
"language_info": {
47+
"codemirror_mode": {
48+
"name": "ipython",
49+
"version": 3
50+
},
51+
"file_extension": ".py",
52+
"mimetype": "text/x-python",
53+
"name": "python",
54+
"nbconvert_exporter": "python",
55+
"pygments_lexer": "ipython3",
56+
"version": "3.5.2"
57+
}
58+
},
59+
"nbformat": 4,
60+
"nbformat_minor": 2
61+
}

Pipfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[[source]]
2+
3+
verify_ssl = true
4+
name = "pypi"
5+
url = "https://pypi.python.org/simple"
6+
7+
8+
[dev-packages]
9+
10+
11+
12+
[packages]
13+
14+
three = "*"

Pipfile.lock

Lines changed: 126 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)