Skip to content

Commit bc08209

Browse files
authored
Merge pull request #1 from progrmoiz/master
sync
2 parents d778b8f + 0d782f9 commit bc08209

File tree

7 files changed

+24
-29
lines changed

7 files changed

+24
-29
lines changed

CODE_OF_CONDUCT.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ In the interest of fostering an open and welcoming environment, we as contributo
88

99
Examples of behavior that contributes to creating a positive environment include:
1010

11-
* Using welcoming and inclusive language
12-
* Being respectful of differing viewpoints and experiences
13-
* Gracefully accepting constructive criticism
14-
* Focusing on what is best for the community
15-
* Showing empathy towards other community members
11+
* Using welcoming and inclusive language.
12+
* Being respectful of differing viewpoints and experiences.
13+
* Gracefully accepting constructive criticism.
14+
* Focusing on what is best for the community.
15+
* Showing empathy towards other community members.
1616

1717
Examples of unacceptable behavior by participants include:
1818

@@ -28,19 +28,20 @@ Project maintainers are responsible for clarifying the standards of acceptable b
2828

2929
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
3030

31-
## Scope
31+
##Our Scope
3232

3333
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
3434

35-
## Enforcement
35+
##Our Enforcement
3636

3737
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at progrmoiz@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
3838

3939
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
4040

41-
## Attribution
41+
##Our Attribution
4242

43-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
43+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version].
4444

4545
[homepage]: http://contributor-covenant.org
4646
[version]: http://contributor-covenant.org/version/1/4/
47+
Read carefully

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
# ![Python Snippets](./logo.png "Python Snippets")
2-
3-
:snake: Python snippets of examples, to learn things and to make task easier.
2+
These Snippets can make your life a lot easier than expected, use it wisely.
43

54
---
65

7-
## Snippets
6+
## Snippets TO LEARN
87

98
- [string_import.py](string_import.py) example to show import module from string
109
- [classtools.py](classtools.py) assorted class utilities and tools
@@ -27,6 +26,7 @@
2726
- [mapattrs.py](mapattrs.py) Map all attributes on or inherited by an
2827
instance to the instance or class from which they are inherited.
2928

29+
3030
---
3131

3232
## Contributing

classtools.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,4 @@ class SubTest(TopTest):
3232
pass
3333

3434
X, Y = TopTest(), SubTest()
35-
print(X)
36-
print(Y)
35+
print(X,"\n",y)

listtree.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,22 +51,17 @@ def __str__(self):
5151

5252

5353
def tester(listerclass, sept=False):
54-
5554
class Super:
56-
57-
def __init__(self):
55+
def __init__(self):
5856
self.data1 = 'spam'
59-
60-
def ham(self):
57+
def ham(self):
6158
pass
6259

6360
class Sub(Super, listerclass):
64-
6561
def __init__(self):
6662
Super.__init__(self)
6763
self.data2 = 'eggs'
6864
self.data3 = 42
69-
7065
def spam(self):
7166
pass
7267

mydir.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!python
22
"""
3-
mydir.py: a module that lists the namespaces of other module
3+
mydir.py: a module that list the namespaces of other modules
44
"""
55
from __future__ import print_function
66

@@ -25,7 +25,7 @@ def listing(module, verbose=True):
2525

2626
if verbose:
2727
print(sepline)
28-
print(module.__name__, 'has %d names' % count)
28+
print(module.__name__, 'has following %d names' % count)
2929
print(sepline)
3030

3131
if __name__ == '__main__':

string_import.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# you can use builtin __import__ function
22

3-
modname = 'string'
3+
modname = 'strings'
44
string = __import__(modname)
5-
print(string)
5+
print(strings)
66

77
# Python official prefferred way
88

99
import importlib
10-
modname = 'string'
11-
string = importlib.import_module(modname)
12-
print(string)
10+
modname = 'strings'
11+
strings = importlib.import_module(modname)
12+
print(strings)

timer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def bestof(reps, func, *pargs, **kargs):
4343

4444
def bestoftotal(reps1, reps2, func, *pargs, **kargs):
4545
"""
46-
Best of totals:
46+
It will give best of total:
4747
(best of reps1 runs of (total of reps2 runs of func))
4848
"""
4949
return bestof(reps1, total, reps2, func, *pargs, **kargs)

0 commit comments

Comments
 (0)