Skip to content

Commit

Permalink
removed merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
yinleon committed Dec 14, 2017
1 parent 5d46847 commit efe5df0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
10 changes: 0 additions & 10 deletions smappdragon/collection/csv_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ def __init__(self, filepath):
'''
def get_iterator(self):
tweet_parser = TweetParser()
<<<<<<< HEAD
if self.compression == 'bz2':
self.mode = binary_mode(self.mode)
csv_handle = bz2.open(self.filepath, self.mode, encoding=self.encoding)
Expand All @@ -38,15 +37,6 @@ def get_iterator(self):
csv_handle = gzip.open(self.filepath, self.mode, encoding=self.encoding)
else:
csv_handle = open(self.filepath, self.mode, encoding=self.encoding)
=======
file_extension = self.filepath.split('.')[-1]
if file_extension == 'bz2':
csv_handle = bzopen(self.filepath, 'r', encoding='utf-8')
elif file_extension == 'gz':
csv_handle = gzip.open(self.filepath,'r', encoding='utf-8')
else:
csv_handle = open(self.filepath, 'r', encoding='utf-8')
>>>>>>> f8e4d25f468a6a974d3d27f2ff40413918756b57
for count, tweet in enumerate(csv.DictReader(csv_handle)):
if self.limit < count+1 and self.limit != 0:
csv_handle.close()
Expand Down
3 changes: 0 additions & 3 deletions smappdragon/collection/json_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,17 @@ def __init__(self, filepath, compression=None, encoding='utf-8', throw_error=1,
'''
def get_iterator(self):
tweet_parser = TweetParser()
<<<<<<< HEAD
if self.compression == 'bz2':
self.mode = binary_mode(self.mode)
json_handle = bz2.open(self.filepath, self.mode, encoding=self.encoding)
elif self.compression == 'gzip':
self.mode = binary_mode(self.mode)
json_handle = gzip.open(self.filepath, self.mode, encoding=self.encoding)
=======
file_extension = self.filepath.split('.')[-1]
if file_extension == 'bz2':
json_handle = bzopen(self.filepath, 'r', encoding='utf-8')
elif file_extension == 'gz':
json_handle = gzip.open(self.filepath,'r', encoding='utf-8')
>>>>>>> f8e4d25f468a6a974d3d27f2ff40413918756b57
else:
json_handle = open(self.filepath, self.mode, encoding=self.encoding)
bad_lines = 0
Expand Down

0 comments on commit efe5df0

Please sign in to comment.