Skip to content

Commit 8cfd020

Browse files
committed
* enhance: removed duplicate files
1 parent 722f137 commit 8cfd020

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+90
-137
lines changed

.gitignore

Whitespace-only changes.

core_class/test.py

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/usr/bin/env python
2+
13
class FooType(object):
24
def __init__(self, id):
35
self.id = id
@@ -6,12 +8,8 @@ def __init__(self, id):
68
def __del__(self):
79
print self.id, 'died'
810

9-
def make_foo():
10-
print 'Making...'
11-
ft = FooType(1)
12-
print 'Returning...'
13-
return ft
11+
print 'Make instance...'
12+
13+
ft = FooType(1)
1414

15-
print 'Calling...'
16-
ft = make_foo()
1715
print 'End...'

core_date_time/test01.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/usr/bin/env python
2+
13
import datetime
24

35
print datetime.datetime.now().strftime("%y-%m-%d_%H-%M")

core_file/file-line-iterate.py

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env python
2+
3+
myfile = open( "./test.txt", "r" )
4+
5+
# Line include new line at the end
6+
for line in myfile :
7+
print( "linija %s", line )

core_file/file2string.py

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env python
2+
3+
myfile = open( "./test.txt", "r" )
4+
5+
data = myfile.read();
6+
7+
print( data )

core_file/open.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/env python
22

33
#read file to buffer
44
buffer = open('blah.txt', 'r').read();

core_file/test.txt

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
asdas
2+
asdasasd
3+
ad
4+
asdas
5+
asdasasds
6+
a

core_function/by_reference01.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/env python
22

33
# Function definition is here
44
def changeme( mylist ):
55
"This changes a passed list into this function"
6-
mylist.append([1,2,3,4]);
6+
mylist = [1,2,3,4]; # This would assig new reference in mylist
77
print "Values inside the function: ", mylist
88
return
99

core_function/by_reference02.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/env python
22

33
# Function definition is here
44
def changeme( mylist ):
@@ -9,6 +9,6 @@ def changeme( mylist ):
99

1010
# Now you can call changeme function
1111
mylist = [10,20,30];
12-
print "Values before: ", mylist
12+
print "Values before call: ", mylist
1313
changeme( mylist );
1414
print "Values outside the function: ", mylist
File renamed without changes.

core_function/function0.py

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env python
2+
3+
4+
def function( ):
5+
print( "asdas" )
6+
7+
function()
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
#!/usr/bin/env python
2+
3+
14
def function( number ):
25
print( number )
3-
6+
47
function( 100 )

core_function/function_pass.py

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env python
2+
3+
4+
def function( ):
5+
pass
6+
7+
function()
File renamed without changes.

core_function/params/variable.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/env python
22

33
# Function definition is here
44
def printinfo( arg1, *vartuple ):
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

core_function/simple01.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/env python
22

33
# Function definition is here
44
def printme( str ):

core_scope/test01.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/env python
22

33
total = 0; # This is global variable.
44
# Function definition is here
File renamed without changes.

core_types/list/remove.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/env python
22

33
aList = [123, 'xyz', 'zara', 'abc', 'xyz'];
44
aList.remove('xyz');

core_types/list/test01.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/usr/bin/env python
2+
13
a = ['a', 'b', 'c']
24

35
print a
File renamed without changes.

core_types/set/test01.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/usr/bin/env python
2+
13
a = {'jack', 'sjoerd'}
24
b = {'sjoerd', 'mick'}
35

File renamed without changes.

examples/yield-back-Inclomplete.py core_yield/yield-back-Inclomplete.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/env python
22

33
def counter(maximum):
44
i = 0

examples/yield.py core_yield/yield.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/env python
22

33
def generate_ints(N):
44
for i in range(N):

examples/file-line-iterate.py

-10
This file was deleted.

examples/file2string.py

-6
This file was deleted.

examples/function/by_reference01.py

-14
This file was deleted.

examples/function/by_reference02.py

-14
This file was deleted.

examples/line-by-line.py

-5
This file was deleted.

examples/os/os_environ.py

-2
This file was deleted.

examples/scope/test01.py

-13
This file was deleted.

examples/types/dict/dict01.py

-1
This file was deleted.

examples/types/list/test01.py

-17
This file was deleted.

examples/types/set/test01.py

-10
This file was deleted.

examples/types/str/interpolation.py

-20
This file was deleted.
File renamed without changes.
File renamed without changes.

license.txt

+18-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
1-
"THE BEER-WARE LICENSE":
2-
Dejan Milosavljevic wrote this file. As long as you retain this notice you
3-
can do whatever you want with this stuff. If we meet some day, and you think
4-
this stuff is worth it, you can buy me a beer in return. Dejan Milosavljevic.
1+
The MIT-Zero License
2+
3+
Copyright (c) 2016 Dejan D. M. Milosavljevic
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so.
11+
12+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18+
THE SOFTWARE.

readme.md

+8

examples/regular-expression.py regex/regex_match.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
#!/usr/bin/env python
2+
13
import re
24
p = re.compile('[a-z]+')
35

4-
5-
66
print(p.match('ababababab').span())
77

88

subprocess/popen.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/usr/bin/env python
2+
13
import subprocess
24
process = subprocess.Popen( [ 'help', '/?' ], stdout=subprocess.PIPE )
35
print str.split( process.communicate() [0], '\r\n' )
File renamed without changes.

0 commit comments

Comments
 (0)