Skip to content

Commit

Permalink
Try and make this example output deterministic to avoid confusion.
Browse files Browse the repository at this point in the history
  • Loading branch information
jjhenkel committed Jan 22, 2021
1 parent f4cc735 commit f18b5b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion rq2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Printing details:
+ data[n].raw_dockerfile
+ data[n].clean_stdout_log
+ Example of pre-processed data we used for clustering:
['the command / bin / sh c go wrapper download returned a non zero code : 1']
['add failed : failed to get http : / / repo1 . maven . org / maven2 / org / codehaus / cargo / cargo jetty 7 and onwards deployer / 1 . 4 . 4 / cargo jetty 7 and onwards deployer 1 . 4 . 4 . war with status 501 https required : 501 https required . ', 'use https : / / repo1 . maven . org / maven2 / ', 'more information at https : / / links . sonatype . com / central / 501 https required']
```

## Details
Expand Down
2 changes: 2 additions & 0 deletions rq2/clustering.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
data.append(json.loads(fin.read().decode('utf-8')))
print(' + Done!')

data = sorted(data, key=lambda x: x['clean_stderr_log'])

print('Printing details:')
print(' + Number of records: {}'.format(len(data)))
print(' + Available fields:')
Expand Down

0 comments on commit f18b5b8

Please sign in to comment.