From dac6a7873915cd7562b7821a5ba220be69bf995b Mon Sep 17 00:00:00 2001 From: Adam Oswald Date: Tue, 8 Nov 2022 16:45:10 +0000 Subject: [PATCH] Upload 8 files (#6) - Upload 8 files (7989fa35131e5f48691b13f6ae59c642509431d0) - Delete pre-commit-config.yaml (13858b0ee1c1b74a13c7dc4d9069285157b16773) - Rename whitesource.txt to .whitesource (05e57a7cd1f65f23b92e5b70bb2e85e46a3b2413) - Rename thoth.yaml to .thoth.yaml (47b57f0fa6250f080d2f05056d8802f029503090) - Rename pep8speaks.yml to .pep8speaks.yml (b61c1b49978b6fdf539ec2a08954ed23afa6e863) --- .pep8speaks.yml | 28 ++++++++++++++++++++++++++++ .thoth.yaml | 36 ++++++++++++++++++++++++++++++++++++ .whitesource | 14 ++++++++++++++ cleanthat.yaml | 15 +++++++++++++++ requirements.txt | 1 - style.css | 12 ++++++------ utils.py | 8 +++++--- 7 files changed, 104 insertions(+), 10 deletions(-) create mode 100644 .pep8speaks.yml create mode 100644 .thoth.yaml create mode 100644 .whitesource create mode 100644 cleanthat.yaml diff --git a/.pep8speaks.yml b/.pep8speaks.yml new file mode 100644 index 0000000..ae2a270 --- /dev/null +++ b/.pep8speaks.yml @@ -0,0 +1,28 @@ +# File : .pep8speaks.yml + +scanner: + diff_only: True # If False, the entire file touched by the Pull Request is scanned for errors. If True, only the diff is scanned. + linter: pycodestyle # Other option is flake8 + +pycodestyle: # Same as scanner.linter value. Other option is flake8 + max-line-length: 100 # Default is 79 in PEP 8 + ignore: # Errors and warnings to ignore + - W504 # line break after binary operator + - E402 # module level import not at top of file + - E731 # do not assign a lambda expression, use a def + - C406 # Unnecessary list literal - rewrite as a dict literal. + - E741 # ambiguous variable name + +no_blank_comment: True # If True, no comment is made on PR without any errors. +descending_issues_order: False # If True, PEP 8 issues in message will be displayed in descending order of line numbers in the file + +message: # Customize the comment made by the bot + opened: # Messages when a new PR is submitted + header: "Hello @{name}! Thanks for opening this PR. " + # The keyword {name} is converted into the author's username + footer: "Do see the [Hitchhiker's guide to code style](https://goo.gl/hqbW4r)" + # The messages can be written as they would over GitHub + updated: # Messages when new commits are added to the PR + header: "Hello @{name}! Thanks for updating this PR. " + footer: "" # Why to comment the link to the style guide everytime? :) + no_errors: "There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers: " diff --git a/.thoth.yaml b/.thoth.yaml new file mode 100644 index 0000000..5b747dd --- /dev/null +++ b/.thoth.yaml @@ -0,0 +1,36 @@ +host: khemenu.thoth-station.ninja +tls_verify: true +requirements_format: pipenv + +runtime_environments: + - name: default + operating_system: + name: ubi + version: "8" + python_version: "3.8" + recommendation_type: latest + + +# https://thoth-station.ninja/docs/developers/kebechet/managers.html#available-managers +managers: + - name: info + configuration: + enabled: true + - name: label-bot + configuration: + enabled: true + - name: pipfile-requirements + configuration: + enabled: true + - name: thoth-advise + configuration: + enabled: true + - name: thoth-provenance + configuration: + enabled: true + - name: update + configuration: + enabled: true + - name: version + configuration: + enabled: true diff --git a/.whitesource b/.whitesource new file mode 100644 index 0000000..9c7ae90 --- /dev/null +++ b/.whitesource @@ -0,0 +1,14 @@ +{ + "scanSettings": { + "baseBranches": [] + }, + "checkRunSettings": { + "vulnerableCheckRunConclusionLevel": "failure", + "displayMode": "diff", + "useMendCheckNames": true + }, + "issueSettings": { + "minSeverityLevel": "LOW", + "issueType": "DEPENDENCY" + } +} \ No newline at end of file diff --git a/cleanthat.yaml b/cleanthat.yaml new file mode 100644 index 0000000..85a6f9f --- /dev/null +++ b/cleanthat.yaml @@ -0,0 +1,15 @@ +syntax_version: "2021-08-02" +meta: + labels: + - "cleanthat" + refs: + branches: + - "refs/heads/develop" + - "refs/heads/main" + - "refs/heads/master" +source_code: + excludes: [] + includes: [] + encoding: "UTF-8" + line_ending: "UNKNOWN" +languages: [] diff --git a/requirements.txt b/requirements.txt index 4e0bb1e..0880b6d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,5 @@ # YOLOv5 requirements # Usage: pip install -r requirements.txt - python-dotenv https://gradio-builds.s3.amazonaws.com/queue-disconnect/v3/gradio-3.4b2-py3-none-any.whl --extra-index-url https://download.pytorch.org/whl/cu113 diff --git a/style.css b/style.css index d0b9a72..7399bad 100644 --- a/style.css +++ b/style.css @@ -1,27 +1,27 @@ h1 { text-align: center; } -div#result-grid { +#result-grid { max-width: 600px; max-height: 600px; } -div#result-grid-raw { +#result-grid-raw { max-width: 600px; max-height: 600px; } -div#result { +#result { max-width: 400px; max-height: 400px; } -div#result-raw { +#result-raw { max-width: 400px; max-height: 400px; } -div#result-video { +#result-video { max-width: 400px; max-height: 400px; } -img#visitor-badge { +#visitor-badge { display: block; margin: auto; } diff --git a/utils.py b/utils.py index 96a402c..16ec1bb 100644 --- a/utils.py +++ b/utils.py @@ -7,9 +7,11 @@ def convert_bytes_to_pil(bytes_string: bytes) -> Image: buffer.seek(0) return Image.open(buffer) + def is_google_colab(): try: - import google.colab - return True + import google.colab + + return True except: - return False \ No newline at end of file + return False