f8a72a0a60658d462753fe39a2119932358ccca5,app/server/views.py,DataUpload,post,#DataUpload#Any#,58
Before Change
])
else:
reader = csv.reader(form_data)
Document.objects.bulk_create([
Document(text=line[0].strip(), project=project)
for line in reader
])
elif import_format == "json":
form_data = request.FILES["file"].file
After Change
// TODO: Move to the configuration
batch_size = 500
while True:
batch = list(it.islice(documents, batch_size))
if not batch:
break
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
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: EducationalTestingService/skll
Commit Name: e6b037e428c705168d7bc7173df2d38efcb56147
Time: 2013-07-19
Author: dblanchard@ets.org
File Name: megam_to_libsvm.py
Class Name:
Method Name: convert_to_libsvm
Project Name: facebookresearch/ParlAI
Commit Name: 4c1958d2000458f72c2c554e414c794bf8ca0748
Time: 2019-03-05
Author: samuel.humeau@gmail.com
File Name: parlai/core/torch_ranker_agent.py
Class Name: TorchRankerAgent
Method Name: eval_step