From f08fa4912cf8fd6a09a6f5cf018da64f757f5c19 Mon Sep 17 00:00:00 2001 From: David Chang Date: Sun, 10 Mar 2024 18:03:02 +0800 Subject: [PATCH 1/2] ver Mar10th changed AT element filtering --- .gitignore | 1 + at_processing/.gitignore | 4 + at_processing/filter.anal | 249 ++++++++++++++++++ at_processing/ubuntu_node_statistics.py | 22 ++ desktop_env/server/main.py | 12 +- .../415ef462-bed3-493a-ac36-ca8c6d23bf1b.json | 2 +- .../heuristic_retrieve.py | 69 ++--- 7 files changed, 322 insertions(+), 37 deletions(-) create mode 100644 at_processing/.gitignore create mode 100644 at_processing/filter.anal create mode 100644 at_processing/ubuntu_node_statistics.py diff --git a/.gitignore b/.gitignore index fc9dc79..a3543d8 100644 --- a/.gitignore +++ b/.gitignore @@ -171,6 +171,7 @@ tags-opts snapshots *.syncthing.*.tmp cache +version.folder test.xlsx test2.xlsx diff --git a/at_processing/.gitignore b/at_processing/.gitignore new file mode 100644 index 0000000..1719b90 --- /dev/null +++ b/at_processing/.gitignore @@ -0,0 +1,4 @@ +/*.json +/*.xml +/*.list +/*.png diff --git a/at_processing/filter.anal b/at_processing/filter.anal new file mode 100644 index 0000000..6c2e203 --- /dev/null +++ b/at_processing/filter.anal @@ -0,0 +1,249 @@ +vimc: hi AnalSecTitle term=bold cterm=bold: +vimc: syn match AnalSecTitle /^|\d\+\.\ .*$/: +vimc: syn match Comment /^#.*$/: +vimc: hi AnalMetaInfo term=italic ctermfg=red: +vimc: syn match AnalMetaInfo /^[A-Z]\:\ /: +vimc: syn match Todo /\\|^I\:/: +vimc: hi VIMC ctermfg=grey: +vimc: syn match VIMC /^vimc\:\ .*\:$/: +vimc: hi AnalComplete term=reverse,bold ctermfg=green: +vimc: syn match AnalComplete /✓$/: +vimc: hi AnalFail term=reverse,bold ctermfg=red: +vimc: syn match AnalFail /✗$/: + +vimc: hi AnalInfoElm term=reverse,bold ctermfg=cyan: +vimc: syn match AnalInfoElm /\0): + coordinates: Tuple[int, int] = eval(node.get("{{{:}}}screencoord".format("uri:deskat:component.at-spi.gnome.org"))) + sizes: Tuple[int, int] = eval(node.get("{{{:}}}size".format("uri:deskat:component.at-spi.gnome.org"))) + if coordinates[0]>0 and coordinates[1]>0 and sizes[0]>0 and sizes[1]>0: + filtered_nodes.append(node) return filtered_nodes @@ -134,12 +141,14 @@ def print_nodes_with_indent(nodes, indent=0): if __name__ == '__main__': - with open('chrome_desktop_example_1.xml', 'r', encoding='utf-8') as f: - xml_file_str = f.read() + import json + with open('2.json', 'r', encoding='utf-8') as f: + xml_file_str = json.load(f)["AT"] filtered_nodes = filter_nodes(find_leaf_nodes(xml_file_str)) print(len(filtered_nodes)) - masks = draw_bounding_boxes(filtered_nodes, 'screenshot.png', - 'chrome_desktop_example_1_tagged_remove.png', ) + masks = draw_bounding_boxes( filtered_nodes, '2.png' + , '2.a.png' + ) # print(masks) print(len(masks)) From 59348e31343a969a3a6786bc362ee85fd23e0a3c Mon Sep 17 00:00:00 2001 From: tsuky_chen <3107760494@qq.com> Date: Sun, 10 Mar 2024 23:49:28 +0800 Subject: [PATCH 2/2] fix multi apps --- .../multi_apps/69acbb55-d945-4927-a87b-8480e1a5bb7e.json | 2 +- .../multi_apps/b337d106-053f-4d37-8da0-7f9c4043a66b.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/evaluation_examples/examples/multi_apps/69acbb55-d945-4927-a87b-8480e1a5bb7e.json b/evaluation_examples/examples/multi_apps/69acbb55-d945-4927-a87b-8480e1a5bb7e.json index 9a2f5ae..6841447 100644 --- a/evaluation_examples/examples/multi_apps/69acbb55-d945-4927-a87b-8480e1a5bb7e.json +++ b/evaluation_examples/examples/multi_apps/69acbb55-d945-4927-a87b-8480e1a5bb7e.json @@ -45,7 +45,7 @@ "rules": { "include": [], "exclude": [ - "ModuleNotFoundError: No module named" + "Error:" ] } } diff --git a/evaluation_examples/examples/multi_apps/b337d106-053f-4d37-8da0-7f9c4043a66b.json b/evaluation_examples/examples/multi_apps/b337d106-053f-4d37-8da0-7f9c4043a66b.json index cba0a02..5f1750f 100644 --- a/evaluation_examples/examples/multi_apps/b337d106-053f-4d37-8da0-7f9c4043a66b.json +++ b/evaluation_examples/examples/multi_apps/b337d106-053f-4d37-8da0-7f9c4043a66b.json @@ -1,7 +1,7 @@ { "id": "b337d106-053f-4d37-8da0-7f9c4043a66b", "snapshot": "os", - "instruction": "Recently, I've been exploring the use of the Vim editor for code editing. However, the default settings don't display line numbers in Vim editor. Please search the internet for a tutorial on adding line numbers in Vim and setting it as default for my local Vim.", + "instruction": "Recently, I've been exploring the use of the Vim editor for code editing. However, the default settings don't display line numbers in Vim editor. Please search the Internet for a tutorial on adding absolute line numbers in Vim and setting it as default for my local Vim.", "source": "authors", "config": [ { @@ -52,7 +52,7 @@ "parameters": { "files": [ { - "url": "https://drive.usercontent.google.com/download?id=1CyhWjUS2oov4Fzc0VRwTh6LiS2Qu-T_8&export=download&authuser=0&confirm=t&uuid=9d0e2c62-895c-4bb3-a057-30cae60329ed&at=APZUnTVngSwARjYsWSmhSyHAqwID:1709647023362", + "url": "https://drive.usercontent.google.com/download?id=1CyhWjUS2oov4Fzc0VRwTh6LiS2Qu-T_8&export=download&authuser=0&confirm=t&uuid=384ea31d-c9ae-4e81-be19-42035c563014&at=APZUnTU9lsYwMLfWb7RIizGr1D7H:1710085473758", "path": "eval.sh" } ]