-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is for Table 1 in the paper.
- Loading branch information
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import sqlite3 | ||
|
||
con = sqlite3.connect("results.sqlite3") | ||
cur = con.cursor() | ||
|
||
def counts(table, fnc): | ||
filter = "original<>changed" if fnc else "original=changed" | ||
cur.execute( | ||
f""" | ||
select a,b, count(distinct original) from {table} where {filter} group by a,b | ||
""" | ||
) | ||
return cur.fetchall() | ||
|
||
|
||
print("Number of libraries by predictor and filename cases") | ||
print("-" * 70) | ||
for t in ("two_predictors", "three_predictors"): | ||
for fnc in (True, False): | ||
print("{0:s} {1:s}changed".format(t, "" if fnc else "un")) | ||
for r in counts(t,fnc): | ||
print(" ", r) |