Skip to content

Commit 78fa1e5

Browse files
committed
Added present and scikit-neuralnet to useful packages list and updated oop example
1 parent 0e5acd2 commit 78fa1e5

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

PyData/UsefulPackages.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ Explaining ML algorithms: https://github.com/slundberg/shap
202202
https://github.com/seatgeek/fuzzywuzzy
203203
https://github.com/RobinL/fuzzymatcher
204204
https://github.com/J535D165/recordlinkage
205+
scikit-neuralnetwork: https://github.com/aigamedev/scikit-neuralnetwork
205206

206207
# Webscraping
207208
beautifulsoup4
@@ -326,6 +327,7 @@ desktop automation: https://github.com/andohuman/pyKey
326327
code formatter: https://github.com/psf/black
327328
inspect live objects: https://docs.python.org/3/library/inspect.html
328329
py files to reveal slides: https://github.com/apiad/auditorium
330+
slides in terminal: https://github.com/vinayak-mehta/present
329331

330332
# Linux / CLI Utilities
331333
https://github.com/tldr-pages/tldr-python-client # replacement for man pages

oop/6-property-decorator/oop.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
class Employee:
32

43
def __init__(self, first, last):
@@ -12,10 +11,26 @@ def email(self):
1211
@property
1312
def fullname(self):
1413
return '{} {}'.format(self.first, self.last)
14+
15+
@fullname.setter
16+
def fullname(self, name):
17+
first, last = name.split(' ')
18+
self.first = first
19+
self.last = last
20+
21+
@fullname.deleter
22+
def fullname(self):
23+
print('Delete Name!')
24+
self.first = None
25+
self.last = None
1526

1627

1728
emp_1 = Employee('John', 'Smith')
1829

30+
emp_1.fullname = 'Corey Schafer'
31+
1932
print(emp_1.first)
2033
print(emp_1.email)
2134
print(emp_1.fullname)
35+
36+
del emp_1.fullname

0 commit comments

Comments
 (0)