From 9f6ef7cd3627601be6b76575288f6e4f3cda4352 Mon Sep 17 00:00:00 2001 From: r-sugawara Date: Tue, 10 Sep 2024 09:00:14 +0900 Subject: [PATCH 1/5] Update example_usage.py inpt seed --- data_structures/kd_tree/example/example_usage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data_structures/kd_tree/example/example_usage.py b/data_structures/kd_tree/example/example_usage.py index e270f0cdd245..81f307e5e62e 100644 --- a/data_structures/kd_tree/example/example_usage.py +++ b/data_structures/kd_tree/example/example_usage.py @@ -19,7 +19,7 @@ def main() -> None: hypercube_kdtree = build_kdtree(points.tolist()) # Generate a random query point within the same space - rng = np.random.default_rng() + rng = np.random.default_rng(5) query_point: list[float] = rng.random(num_dimensions).tolist() # Perform nearest neighbor search From 71414206a82cd8da4444997e6e0e37883ffcb192 Mon Sep 17 00:00:00 2001 From: r-sugawara Date: Tue, 10 Sep 2024 09:35:56 +0900 Subject: [PATCH 2/5] Update hypercube_points.py --- data_structures/kd_tree/example/hypercube_points.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data_structures/kd_tree/example/hypercube_points.py b/data_structures/kd_tree/example/hypercube_points.py index 2d8800ac9338..a48b8d58464d 100644 --- a/data_structures/kd_tree/example/hypercube_points.py +++ b/data_structures/kd_tree/example/hypercube_points.py @@ -16,6 +16,6 @@ def hypercube_points( An array of shape (num_points, num_dimensions) with generated points. """ - rng = np.random.default_rng() + rng = np.random.default_rng(5) shape = (num_points, num_dimensions) return hypercube_size * rng.random(shape) From cda5e7fa45743065229aec99b38463de83fe785b Mon Sep 17 00:00:00 2001 From: r-sugawara Date: Tue, 10 Sep 2024 10:06:45 +0900 Subject: [PATCH 3/5] Create scan.yml --- .github/workflows/scan.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/scan.yml diff --git a/.github/workflows/scan.yml b/.github/workflows/scan.yml new file mode 100644 index 000000000000..a0b82e8b50bd --- /dev/null +++ b/.github/workflows/scan.yml @@ -0,0 +1,21 @@ +on: + # Trigger analysis when pushing in master or pull requests, and when creating + # a pull request. + push: + branches: + - master + pull_request: + types: [opened, synchronize, reopened] +name: Main Workflow +jobs: + sonarcloud: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + # Disabling shallow clone is recommended for improving relevancy of reporting + fetch-depth: 0 + - name: SonarCloud Scan + uses: sonarsource/sonarcloud-github-action@master # Ex: v2.1.0, See the latest version at https://github.com/marketplace/actions/sonarcloud-scan + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} From 6f7e9fa54427250d7d24b1d4c3bad8760a7ae3f6 Mon Sep 17 00:00:00 2001 From: r-sugawara Date: Tue, 10 Sep 2024 01:07:26 +0000 Subject: [PATCH 4/5] updating DIRECTORY.md --- DIRECTORY.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/DIRECTORY.md b/DIRECTORY.md index 1ca537b991c8..e965d3b32ccf 100644 --- a/DIRECTORY.md +++ b/DIRECTORY.md @@ -243,6 +243,15 @@ * [Min Heap](data_structures/heap/min_heap.py) * [Randomized Heap](data_structures/heap/randomized_heap.py) * [Skew Heap](data_structures/heap/skew_heap.py) + * Kd Tree + * [Build Kdtree](data_structures/kd_tree/build_kdtree.py) + * Example + * [Example Usage](data_structures/kd_tree/example/example_usage.py) + * [Hypercube Points](data_structures/kd_tree/example/hypercube_points.py) + * [Kd Node](data_structures/kd_tree/kd_node.py) + * [Nearest Neighbour Search](data_structures/kd_tree/nearest_neighbour_search.py) + * Tests + * [Test Kdtree](data_structures/kd_tree/tests/test_kdtree.py) * Linked List * [Circular Linked List](data_structures/linked_list/circular_linked_list.py) * [Deque Doubly](data_structures/linked_list/deque_doubly.py) @@ -285,12 +294,6 @@ * Trie * [Radix Tree](data_structures/trie/radix_tree.py) * [Trie](data_structures/trie/trie.py) - * KD Tree - * [KD Tree Node](data_structures/kd_tree/kd_node.py) - * [Build KD Tree](data_structures/kd_tree/build_kdtree.py) - * [Nearest Neighbour Search](data_structures/kd_tree/nearest_neighbour_search.py) - * [Hypercibe Points](data_structures/kd_tree/example/hypercube_points.py) - * [Example Usage](data_structures/kd_tree/example/example_usage.py) ## Digital Image Processing * [Change Brightness](digital_image_processing/change_brightness.py) From 92d7a18ab9f4df6c6adff9fd208d87a85ddc2646 Mon Sep 17 00:00:00 2001 From: r-sugawara Date: Fri, 13 Sep 2024 09:53:00 +0900 Subject: [PATCH 5/5] Create sonar-project.properties --- sonar-project.properties | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sonar-project.properties diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 000000000000..c66d2f17021e --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,2 @@ +sonar.organization=r-sugawara-1 +sonar.projectKey=r-sugawara-1_desctop_notification