62 chunk_list =
lambda l,n: [l[i:i+n]
for i
in range(0, len(l), n)]
63 rows_paths = chunk_list(paths_to_pictures,2)
64 cell_template =
' <td style="width: 640px;"><A href=%s><IMG src="%s" width="640" align="center" border="0"></A></td>' 65 row_template =
''' <tr> 67 rows =
''.
join([row_template %
''.
join([ cell_template % (path,path)
for path
in row])
for row
in rows_paths])
68 reference =
'<A href=%s>Reference</A>' % ref_file
if ref_file
else 'Reference not available' 69 source =
'<A href=%s>Input Source</A>' % source_file
if ref_file
else 'Source not available' 70 return ''' <h3>%s ( <A href=%s>Root File</A> ) ( %s ) ( %s ) ( <A href=%s>Full Directory Content</A> )</h3> 71 <table style="text-align: left; " border="1" cellpadding="2" cellspacing="1"> 76 ''' % (dataset_name, root_link, reference, source, dir_link, rows)
77 def usual_validation_dataset_template(dataset_name, root_link, ref_file, dir_link, paths_to_pictures, source_file)
static std::string join(char **cmd)