ef00242112458c4e5d5ba8c4c8c15e02c22ca105,libraries/python/classification_compare.py,OutputCompare,getData,#OutputCompare#Any#,48
Before Change
def getData(self, filename):
with open(filename, "r") as f:
line = f.readline().strip()
dims_list = [int(dim.strip()) for dim in line.split(",")]
line = f.readline().strip()
content_list = [float(entry.strip()) for entry in line.split(",")]
dims = np.asarray(dims_list)
After Change
self.args.labels)
def getData(self, filename):
num_entries = 0
content_list = []
with open(filename, "r") as f:
line = f.readline()
dim_str = line
while (line != ""):
assert dim_str == line, \
"The dimensions do not match"
num_entries = num_entries + 1
dims_list = [int(dim.strip())
for dim in line.strip().split(",")]
line = f.readline().strip()
content_list.extend([float(entry.strip())
for entry in line.split(",")])
line = f.readline()
dims_list.insert(0, num_entries)
dims = np.asarray(dims_list)
content = np.asarray(content_list)
data = np.reshape(content, dims)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 4
Instances Project Name: facebook/FAI-PEP
Commit Name: ef00242112458c4e5d5ba8c4c8c15e02c22ca105
Time: 2018-12-21
Author: feisun@fb.com
File Name: libraries/python/classification_compare.py
Class Name: OutputCompare
Method Name: getData
Project Name: chakki-works/doccano
Commit Name: f8a72a0a60658d462753fe39a2119932358ccca5
Time: 2018-12-26
Author: sergiy.n@attendify.com
File Name: app/server/views.py
Class Name: DataUpload
Method Name: post
Project Name: shibing624/pycorrector
Commit Name: 4e144c9f842d7415d8be5bdbb5912d88ae32cced
Time: 2018-04-16
Author: 507153809@qq.com
File Name: pycorrector/seq2seq/corpus_reader.py
Class Name: CGEDReader
Method Name: read_samples_by_string
Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: b53e9baee8a3ff165048424b9be8fd020a78270e
Time: 2020-09-03
Author: tohaowu@google.com
File Name: perfkitbenchmarker/providers/gcp/gce_virtual_machine.py
Class Name: GceVirtualMachine
Method Name: UpdateInterruptibleVmStatus