From 6d61e5793ac679dce9886a6b76b51e37bf131125 Mon Sep 17 00:00:00 2001 From: RonaldsonBellande Date: Tue, 3 Sep 2024 15:25:08 -0400 Subject: [PATCH] latest pushes --- LICENSE | 17 ++++ README.md | 2 +- configs/bellande/http_configs.bellande | 21 +++++ configs/bellande/tcp_configs.bellande | 21 +++++ configs/bellande/tls_configs.bellande | 21 +++++ configs/json/http_configs.json | 23 ++++++ configs/json/tcp_configs.json | 23 ++++++ configs/json/tls_configs.json | 23 ++++++ git_scripts/fix_errors.sh | 31 +++++++ git_scripts/push.sh | 25 ++++++ git_scripts/repository_recal.sh | 110 +++++++++++++++++++++++++ 11 files changed, 316 insertions(+), 1 deletion(-) create mode 100644 LICENSE create mode 100644 configs/bellande/http_configs.bellande create mode 100644 configs/bellande/tcp_configs.bellande create mode 100644 configs/bellande/tls_configs.bellande create mode 100644 configs/json/http_configs.json create mode 100644 configs/json/tcp_configs.json create mode 100644 configs/json/tls_configs.json create mode 100755 git_scripts/fix_errors.sh create mode 100755 git_scripts/push.sh create mode 100755 git_scripts/repository_recal.sh diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..ceb8485 --- /dev/null +++ b/LICENSE @@ -0,0 +1,17 @@ +Copyright (C) 2024 Bellande Robotics Sensors Research Innovation Center, Ronaldson Bellande + +This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License. +To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. + +You are free to: + +- Share — copy and redistribute the material in any medium or format +- Adapt — remix, transform, and build upon the material for any purpose, even commercially. + +Under the following terms: + +- Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use. +- ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original. +- No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits. + +This is a human-readable summary of (and not a substitute for) the license. See the full license text for more details. diff --git a/README.md b/README.md index 39de17b..3fa29e5 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# 📦 Bellande Probabilistic(Infinite Dimentions) +# 📦 Bellande Probabilistic (Infinite Dimentions) ## 🧙 Organization Website - [![Organization Website](https://img.shields.io/badge/Explore%20Our-Website-0099cc?style=for-the-badge)](https://robotics-sensors.github.io) diff --git a/configs/bellande/http_configs.bellande b/configs/bellande/http_configs.bellande new file mode 100644 index 0000000..a83b1be --- /dev/null +++ b/configs/bellande/http_configs.bellande @@ -0,0 +1,21 @@ +# Copyright (C) 2024 Bellande Robotics Sensors Research Innovation Center, Ronaldson Bellande +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# GNU General Public License v3.0 or later + +url: https://bellande-robotics-sensors-research-innovation-center.org + +endpoint_path: + bellande_probabilistic: /api/Bellande_Probabilistic/bellande_probabilistic_nd + +Bellande_Framework_Access_Key: bellande_web_api_opensource diff --git a/configs/bellande/tcp_configs.bellande b/configs/bellande/tcp_configs.bellande new file mode 100644 index 0000000..e42fa0f --- /dev/null +++ b/configs/bellande/tcp_configs.bellande @@ -0,0 +1,21 @@ +# Copyright (C) 2024 Bellande Robotics Sensors Research Innovation Center, Ronaldson Bellande +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# GNU General Public License v3.0 or later + +url: tcp://bellande-robotics-sensors-research-innovation-center.org + +endpoint_path: + bellande_step: /api/Bellande_Step/bellande_step_nd + +Bellande_Framework_Access_Key: bellande_web_api_opensource diff --git a/configs/bellande/tls_configs.bellande b/configs/bellande/tls_configs.bellande new file mode 100644 index 0000000..1b54948 --- /dev/null +++ b/configs/bellande/tls_configs.bellande @@ -0,0 +1,21 @@ +# Copyright (C) 2024 Bellande Robotics Sensors Research Innovation Center, Ronaldson Bellande +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# GNU General Public License v3.0 or later + +url: tls://bellande-robotics-sensors-research-innovation-center.org + +endpoint_path: + bellande_probabilistic: /api/bellande_probabilistic/bellande_probabilistic_nd + +Bellande_Framework_Access_Key: bellande_web_api_opensource diff --git a/configs/json/http_configs.json b/configs/json/http_configs.json new file mode 100644 index 0000000..018cb05 --- /dev/null +++ b/configs/json/http_configs.json @@ -0,0 +1,23 @@ +{ + "license": [ + "Copyright (C) 2024 Bellande Robotics Sensors Research Innovation Center, Ronaldson Bellande", + "This program is free software: you can redistribute it and/or modify", + "it under the terms of the GNU General Public License as published by", + "the Free Software Foundation, either version 3 of the License, or", + "(at your option) any later version.", + "", + "This program is distributed in the hope that it will be useful,", + "but WITHOUT ANY WARRANTY; without even the implied warranty of", + "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the", + "GNU General Public License for more details.", + "", + "You should have received a copy of the GNU General Public License", + "along with this program. If not, see .", + "GNU General Public License v3.0 or later" + ], + "url": "https://bellande-robotics-sensors-research-innovation-center.org", + "endpoint_path": { + "bellande_probabilistic": "/api/Bellande_Probabilistic/bellande_probabilistic_nd" + }, + "Bellande_Framework_Access_Key": "bellande_web_api_opensource" +} diff --git a/configs/json/tcp_configs.json b/configs/json/tcp_configs.json new file mode 100644 index 0000000..096eb06 --- /dev/null +++ b/configs/json/tcp_configs.json @@ -0,0 +1,23 @@ +{ + "license": [ + "Copyright (C) 2024 Bellande Robotics Sensors Research Innovation Center, Ronaldson Bellande", + "This program is free software: you can redistribute it and/or modify", + "it under the terms of the GNU General Public License as published by", + "the Free Software Foundation, either version 3 of the License, or", + "(at your option) any later version.", + "", + "This program is distributed in the hope that it will be useful,", + "but WITHOUT ANY WARRANTY; without even the implied warranty of", + "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the", + "GNU General Public License for more details.", + "", + "You should have received a copy of the GNU General Public License", + "along with this program. If not, see .", + "GNU General Public License v3.0 or later" + ], + "url": "tcp://bellande-robotics-sensors-research-innovation-center.org", + "endpoint_path": { + "bellande_step": "/tcp/Bellande_Step/bellande_step_nd" + }, + "Bellande_Framework_Access_Key": "bellande_tcp_api_opensource" +} diff --git a/configs/json/tls_configs.json b/configs/json/tls_configs.json new file mode 100644 index 0000000..e8d59ea --- /dev/null +++ b/configs/json/tls_configs.json @@ -0,0 +1,23 @@ +{ + "license": [ + "Copyright (C) 2024 Bellande Robotics Sensors Research Innovation Center, Ronaldson Bellande", + "This program is free software: you can redistribute it and/or modify", + "it under the terms of the GNU General Public License as published by", + "the Free Software Foundation, either version 3 of the License, or", + "(at your option) any later version.", + "", + "This program is distributed in the hope that it will be useful,", + "but WITHOUT ANY WARRANTY; without even the implied warranty of", + "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the", + "GNU General Public License for more details.", + "", + "You should have received a copy of the GNU General Public License", + "along with this program. If not, see .", + "GNU General Public License v3.0 or later" + ], + "url": "tls://bellande-robotics-sensors-research-innovation-center.org", + "endpoint_path": { + "bellande_step": "/tls/Bellande_Step/bellande_step_nd" + }, + "Bellande_Framework_Access_Key": "bellande_tls_api_opensource" +} diff --git a/git_scripts/fix_errors.sh b/git_scripts/fix_errors.sh new file mode 100755 index 0000000..2ebdbee --- /dev/null +++ b/git_scripts/fix_errors.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +# Get the URL from .git/config +git_url=$(git config --get remote.origin.url) + +# Check if a URL is found +if [ -z "$git_url" ]; then + echo "No remote URL found in .git/config." + exit 1 +fi + +# Clone the repository into a temporary folder +git clone "$git_url" tmp_clone + +# Check if the clone was successful +if [ $? -eq 0 ]; then + # Remove the existing .git directory if it exists + if [ -d ".git" ]; then + rm -rf .git + fi + + # Copy the .git directory from the clone to the current repository + cp -r tmp_clone/.git . + + # Remove the clone directory + rm -rf tmp_clone + + echo "Repository cloned and .git directory copied successfully." +else + echo "Failed to clone the repository." +fi diff --git a/git_scripts/push.sh b/git_scripts/push.sh new file mode 100755 index 0000000..0b793ae --- /dev/null +++ b/git_scripts/push.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +# Git push what is already in the repository +git pull --no-edit; git fetch; + +# Exclude specific files and directories +EXCLUDES=(".git" ".gitignore" "executable") + +# Find all non-hidden files and directories, excluding any hidden files and directories +find . -type f ! -path '*/.*' -print0 | while IFS= read -r -d '' file; do + # Check if the file is in the exclude list + should_exclude=false + for exclude in "${EXCLUDES[@]}"; do + if [[ "$(basename "$file")" == "$exclude" ]]; then + should_exclude=true + break + fi + done + + # Add file to staging area if it's not excluded + if [ "$should_exclude" = false ]; then + git add -f "$file" + fi +done +git commit -am "latest pushes"; git push diff --git a/git_scripts/repository_recal.sh b/git_scripts/repository_recal.sh new file mode 100755 index 0000000..4c7fd4f --- /dev/null +++ b/git_scripts/repository_recal.sh @@ -0,0 +1,110 @@ +#!/bin/bash + +# Git push what is already in the repository +git pull --no-edit; git fetch; git add .; git commit -am "latest pushes"; git push + +# Get the current directory +current_dir=$(pwd) + +# Read the remote repository URL from .git/config +remote_repo_url=$(git -C "$current_dir" config --get remote.origin.url) + +# Create a temporary directory for cloning the repository +temp_dir=$(mktemp -d) + +# Clone the repository into the temporary directory without using local references +git clone --no-local "$current_dir" "$temp_dir" + +# Switch to the temporary directory +cd "$temp_dir" + +# Create a temporary file to store the file list +tmp_file=$(mktemp) +# Create a temporary file to store the processed commits +processed_commits_file=$(mktemp) + +# Function to check if a commit has already been processed +is_commit_processed() { + local commit="$1" + + # Check if the commit is already processed + grep -Fxq "$commit" "$processed_commits_file" +} + +# Function to mark a commit as processed +mark_commit_processed() { + local commit="$1" + + # Mark the commit as processed + echo "$commit" >> "$processed_commits_file" +} + +# Function to check if a file or folder exists in the repository +file_exists_in_repo() { + local file_path="$1" + + # Check if the file or folder exists in the repository + git ls-tree --name-only -r HEAD | grep -Fxq "$file_path" +} + +# Function to process the files and folders in each commit +process_commit_files() { + local commit="$1" + + # Check if the commit has already been processed + if is_commit_processed "$commit"; then + echo "Commit $commit already processed. Skipping..." + return + fi + + # Get the list of files and folders in the commit (including subfolders) + git ls-tree --name-only -r "$commit" >> "$tmp_file" + + # Process each file or folder in the commit + while IFS= read -r line + do + # Check if the file or folder exists in the current push + if file_exists_in_repo "$line"; then + echo "Keeping: $line" + else + echo "Deleting: $line" + git filter-repo --path "$line" --invert-paths + fi + done < "$tmp_file" + + # Mark the commit as processed + mark_commit_processed "$commit" + + # Clear the temporary file + > "$tmp_file" +} + +# Iterate over each commit in the repository +git rev-list --all | while IFS= read -r commit +do + process_commit_files "$commit" +done + +# Push the filtered changes to the original repository +git remote add origin "$remote_repo_url" +git push --force origin main + +# Perform a history rewrite to remove the filtered files +git filter-repo --force + +# Fetch the changes from the remote repository +git -C "$current_dir" fetch origin + +# Merge the remote changes into the local repository +git -C "$current_dir" merge origin/main --no-edit + +# Update the local repository and reduce the size of .git if needed +git -C "$current_dir" gc --prune=now +git -C "$current_dir" reflog expire --expire=now --all +git -C "$current_dir" repack -ad + +# Clean up temporary files and directories +cd "$current_dir" +rm -rf "$temp_dir" +rm "$tmp_file" +rm "$processed_commits_file"