a02d9d9f91d04ec2247f1dd955cf1fd912dc27f1,entity2rec/sparql.py,Sparql,get_item_metadata,#,120
Before Change
result = None
// if thumbnail is not there, scrape google
if "thumbnail" not in result.keys():
out = subprocess.check_output(["googleimagesdownload", "--keywords", "\"%s\"" % result["label"], "-sk", "\"%s\"" % item_type, "--print_urls", "-l", "1"])
url = out.decode("utf-8").split("\n")[4].replace("Image URL: ","")
result["thumbnail"] = url
except:
result = None
After Change
c+=1
pass
try:
result["author"] = result["authorlabo"]
except KeyError:
c+=1
pass
// at least one label must be there
if c == 3:
result = None
// either abstract or description must be there
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: D2KLab/entity2rec
Commit Name: a02d9d9f91d04ec2247f1dd955cf1fd912dc27f1
Time: 2018-11-15
Author: enricopalumbo0@gmail.com
File Name: entity2rec/sparql.py
Class Name: Sparql
Method Name: get_item_metadata
Project Name: freelunchtheorem/Conditional_Density_Estimation
Commit Name: c11520dbcc6c1c3889bc76a2b76f6adf5e99c54d
Time: 2019-05-02
Author: simonboehm@mailbox.org
File Name: cde/density_estimator/BaseNNEstimator.py
Class Name: BaseNNEstimator
Method Name: fit_by_cv
Project Name: regel/loudml
Commit Name: e7e01290997f66471c08848ee0a968e2526b4b9b
Time: 2019-09-29
Author: sebastien.regel@gmail.com
File Name: loudml/loudml/_version.py
Class Name:
Method Name: