5b50317099f0d5dd43e12333de0721c08fafe432,aocr/util/dataset.py,,generate,#Any#Any#Any#Any#,15
Before Change
for idx, line in enumerate (f) :
(img_path, label) = line.rstrip("\n" ).split("\t" , 1 )
if not label:
logging.error("skipping image due to missing label %s" , img_path)
continue
with open (img_path, "rb" ) as img_file:
img = img_file.read()
After Change
for idx, line in enumerate (f) :
line = line.rstrip("\n" )
try :
(img_path, label) = line.split("\t" , 1 )
except ValueError:
logging.error("missing filename or label, ignoring line %i: %s" , idx+1 , line)
continue
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances Project Name: emedvedev/attention-ocr
Commit Name: 5b50317099f0d5dd43e12333de0721c08fafe432
Time: 2017-11-11
Author: ckirmse@yahoo.com
File Name: aocr/util/dataset.py
Class Name:
Method Name: generate
Project Name: facebook/FAI-PEP
Commit Name: 20e169d51e180628b7af8149776f92ebb0c3b257
Time: 2018-03-05
Author: feisun@fb.com
File Name: benchmarking/git_driver.py
Class Name: ExecutablesBuilder
Method Name: _buildExecutables
Project Name: home-assistant/home-assistant
Commit Name: 754d536974fccd0768b90938d79071ba0910714a
Time: 2016-10-21
Author: martin@dasos.com
File Name: homeassistant/components/media_player/squeezebox.py
Class Name: LogitechMediaServer
Method Name: get_player_status