From 728fad6caa7c598cd155374d758f6bf172350635 Mon Sep 17 00:00:00 2001 From: MichaelChan20 Date: Thu, 2 May 2024 13:56:58 +0200 Subject: [PATCH 01/17] Added pylint config --- pylintrc | 587 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 587 insertions(+) create mode 100644 pylintrc diff --git a/pylintrc b/pylintrc new file mode 100644 index 0000000..310e98f --- /dev/null +++ b/pylintrc @@ -0,0 +1,587 @@ +[MASTER] + +# A comma-separated list of package or module names from where C extensions may +# be loaded. Extensions are loading into the active Python interpreter and may +# run arbitrary code. +extension-pkg-allow-list= + +# A comma-separated list of package or module names from where C extensions may +# be loaded. Extensions are loading into the active Python interpreter and may +# run arbitrary code. (This is an alternative name to extension-pkg-allow-list +# for backward compatibility.) +extension-pkg-whitelist= + +# Return non-zero exit code if any of these messages/categories are detected, +# even if score is above --fail-under value. Syntax same as enable. Messages +# specified are enabled, while categories only check already-enabled messages. +fail-on= + +# Specify a score threshold to be exceeded before program exits with error. +fail-under=10.0 + +# Files or directories to be skipped. They should be base names, not paths. +ignore=CVS + +# Add files or directories matching the regex patterns to the ignore-list. The +# regex matches against paths and can be in Posix or Windows format. +ignore-paths= + +# Files or directories matching the regex patterns are skipped. The regex +# matches against base names, not paths. The default value ignores emacs file +# locks +ignore-patterns=^\.# + +# Python code to execute, usually for sys.path manipulation such as +# pygtk.require(). +#init-hook= + +# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the +# number of processors available to use. +jobs=1 + +# Control the amount of potential inferred values when inferring a single +# object. This can help the performance when dealing with large functions or +# complex, nested conditions. +limit-inference-results=100 + +# List of plugins (as comma separated values of python module names) to load, +# usually to register additional checkers. +load-plugins= + +# Pickle collected data for later comparisons. +persistent=yes + +# Minimum Python version to use for version dependent checks. Will default to +# the version used to run pylint. +py-version=3.11 + +# Discover python modules and packages in the file system subtree. +recursive=no + +# When enabled, pylint would attempt to guess common misconfiguration and emit +# user-friendly hints instead of false-positive error messages. +suggestion-mode=yes + +# Allow loading of arbitrary C extensions. Extensions are imported into the +# active Python interpreter and may run arbitrary code. +unsafe-load-any-extension=no + + +[MESSAGES CONTROL] + +# Only show warnings with the listed confidence levels. Leave empty to show +# all. Valid levels: HIGH, CONTROL_FLOW, INFERENCE, INFERENCE_FAILURE, +# UNDEFINED. +confidence= + +# Disable the message, report, category or checker with the given id(s). You +# can either give multiple identifiers separated by comma (,) or put this +# option multiple times (only on the command line, not in the configuration +# file where it should appear only once). You can also use "--disable=all" to +# disable everything first and then re-enable specific checks. For example, if +# you want to run only the similarities checker, you can use "--disable=all +# --enable=similarities". If you want to run only the classes checker, but have +# no Warning level messages displayed, use "--disable=all --enable=classes +# --disable=W". +disable=raw-checker-failed, + bad-inline-option, + locally-disabled, + file-ignored, + suppressed-message, + useless-suppression, + deprecated-pragma, + use-symbolic-message-instead + +# Enable the message, report, category or checker with the given id(s). You can +# either give multiple identifier separated by comma (,) or put this option +# multiple time (only on the command line, not in the configuration file where +# it should appear only once). See also the "--disable" option for examples. +enable=c-extension-no-member + + +[REPORTS] + +# Python expression which should return a score less than or equal to 10. You +# have access to the variables 'fatal', 'error', 'warning', 'refactor', +# 'convention', and 'info' which contain the number of messages in each +# category, as well as 'statement' which is the total number of statements +# analyzed. This score is used by the global evaluation report (RP0004). +evaluation=max(0, 0 if fatal else 10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)) + +# Template used to display messages. This is a python new-style format string +# used to format the message information. See doc for all details. +#msg-template= + +# Set the output format. Available formats are text, parseable, colorized, json +# and msvs (visual studio). You can also give a reporter class, e.g. +# mypackage.mymodule.MyReporterClass. +output-format=text + +# Tells whether to display a full report or only the messages. +reports=no + +# Activate the evaluation score. +score=yes + + +[REFACTORING] + +# Maximum number of nested blocks for function / method body +max-nested-blocks=5 + +# Complete name of functions that never returns. When checking for +# inconsistent-return-statements if a never returning function is called then +# it will be considered as an explicit return statement and no message will be +# printed. +never-returning-functions=sys.exit,argparse.parse_error + + +[BASIC] + +# Naming style matching correct argument names. +argument-naming-style=snake_case + +# Regular expression matching correct argument names. Overrides argument- +# naming-style. If left empty, argument names will be checked with the set +# naming style. +#argument-rgx= + +# Naming style matching correct attribute names. +attr-naming-style=snake_case + +# Regular expression matching correct attribute names. Overrides attr-naming- +# style. If left empty, attribute names will be checked with the set naming +# style. +#attr-rgx= + +# Bad variable names which should always be refused, separated by a comma. +bad-names=foo, + bar, + baz, + toto, + tutu, + tata + +# Bad variable names regexes, separated by a comma. If names match any regex, +# they will always be refused +bad-names-rgxs= + +# Naming style matching correct class attribute names. +class-attribute-naming-style=any + +# Regular expression matching correct class attribute names. Overrides class- +# attribute-naming-style. If left empty, class attribute names will be checked +# with the set naming style. +#class-attribute-rgx= + +# Naming style matching correct class constant names. +class-const-naming-style=UPPER_CASE + +# Regular expression matching correct class constant names. Overrides class- +# const-naming-style. If left empty, class constant names will be checked with +# the set naming style. +#class-const-rgx= + +# Naming style matching correct class names. +class-naming-style=PascalCase + +# Regular expression matching correct class names. Overrides class-naming- +# style. If left empty, class names will be checked with the set naming style. +#class-rgx= + +# Naming style matching correct constant names. +const-naming-style=UPPER_CASE + +# Regular expression matching correct constant names. Overrides const-naming- +# style. If left empty, constant names will be checked with the set naming +# style. +#const-rgx= + +# Minimum line length for functions/classes that require docstrings, shorter +# ones are exempt. +docstring-min-length=-1 + +# Naming style matching correct function names. +function-naming-style=snake_case + +# Regular expression matching correct function names. Overrides function- +# naming-style. If left empty, function names will be checked with the set +# naming style. +#function-rgx= + +# Good variable names which should always be accepted, separated by a comma. +good-names=i, + j, + k, + ex, + Run, + X_train, + X_test, + _ + +# Good variable names regexes, separated by a comma. If names match any regex, +# they will always be accepted +good-names-rgxs= + +# Include a hint for the correct naming format with invalid-name. +include-naming-hint=no + +# Naming style matching correct inline iteration names. +inlinevar-naming-style=any + +# Regular expression matching correct inline iteration names. Overrides +# inlinevar-naming-style. If left empty, inline iteration names will be checked +# with the set naming style. +#inlinevar-rgx= + +# Naming style matching correct method names. +method-naming-style=snake_case + +# Regular expression matching correct method names. Overrides method-naming- +# style. If left empty, method names will be checked with the set naming style. +#method-rgx= + +# Naming style matching correct module names. +module-naming-style=snake_case + +# Regular expression matching correct module names. Overrides module-naming- +# style. If left empty, module names will be checked with the set naming style. +#module-rgx= + +# Colon-delimited sets of names that determine each other's naming style when +# the name regexes allow several styles. +name-group= + +# Regular expression which should only match function or class names that do +# not require a docstring. +no-docstring-rgx=^_ + +# List of decorators that produce properties, such as abc.abstractproperty. Add +# to this list to register other decorators that produce valid properties. +# These decorators are taken in consideration only for invalid-name. +property-classes=abc.abstractproperty + +# Regular expression matching correct type variable names. If left empty, type +# variable names will be checked with the set naming style. +#typevar-rgx= + +# Naming style matching correct variable names. +variable-naming-style=snake_case + +# Regular expression matching correct variable names. Overrides variable- +# naming-style. If left empty, variable names will be checked with the set +# naming style. +#variable-rgx= + + +[FORMAT] + +# Expected format of line ending, e.g. empty (any line ending), LF or CRLF. +expected-line-ending-format= + +# Regexp for a line that is allowed to be longer than the limit. +ignore-long-lines=^\s*(# )??$ + +# Number of spaces of indent required inside a hanging or continued line. +indent-after-paren=4 + +# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 +# tab). +indent-string=' ' + +# Maximum number of characters on a single line. +max-line-length=100 + +# Maximum number of lines in a module. +max-module-lines=1000 + +# Allow the body of a class to be on the same line as the declaration if body +# contains single statement. +single-line-class-stmt=no + +# Allow the body of an if to be on the same line as the test if there is no +# else. +single-line-if-stmt=no + + +[LOGGING] + +# The type of string formatting that logging methods do. `old` means using % +# formatting, `new` is for `{}` formatting. +logging-format-style=old + +# Logging modules to check that the string format arguments are in logging +# function parameter format. +logging-modules=logging + + +[MISCELLANEOUS] + +# List of note tags to take in consideration, separated by a comma. +notes=FIXME, + XXX, + TODO + +# Regular expression of note tags to take in consideration. +#notes-rgx= + + +[SIMILARITIES] + +# Comments are removed from the similarity computation +ignore-comments=yes + +# Docstrings are removed from the similarity computation +ignore-docstrings=yes + +# Imports are removed from the similarity computation +ignore-imports=no + +# Signatures are removed from the similarity computation +ignore-signatures=no + +# Minimum lines number of a similarity. +min-similarity-lines=4 + + +[SPELLING] + +# Limits count of emitted suggestions for spelling mistakes. +max-spelling-suggestions=4 + +# Spelling dictionary name. Available dictionaries: none. To make it work, +# install the 'python-enchant' package. +spelling-dict= + +# List of comma separated words that should be considered directives if they +# appear and the beginning of a comment and should not be checked. +spelling-ignore-comment-directives=fmt: on,fmt: off,noqa:,noqa,nosec,isort:skip,mypy: + +# List of comma separated words that should not be checked. +spelling-ignore-words= + +# A path to a file that contains the private dictionary; one word per line. +spelling-private-dict-file= + +# Tells whether to store unknown words to the private dictionary (see the +# --spelling-private-dict-file option) instead of raising a message. +spelling-store-unknown-words=no + + +[STRING] + +# This flag controls whether inconsistent-quotes generates a warning when the +# character used as a quote delimiter is used inconsistently within a module. +check-quote-consistency=no + +# This flag controls whether the implicit-str-concat should generate a warning +# on implicit string concatenation in sequences defined over several lines. +check-str-concat-over-line-jumps=no + + +[TYPECHECK] + +# List of decorators that produce context managers, such as +# contextlib.contextmanager. Add to this list to register other decorators that +# produce valid context managers. +contextmanager-decorators=contextlib.contextmanager + +# List of members which are set dynamically and missed by pylint inference +# system, and so shouldn't trigger E1101 when accessed. Python regular +# expressions are accepted. +generated-members= + +# Tells whether missing members accessed in mixin class should be ignored. A +# class is considered mixin if its name matches the mixin-class-rgx option. +ignore-mixin-members=yes + +# Tells whether to warn about missing members when the owner of the attribute +# is inferred to be None. +ignore-none=yes + +# This flag controls whether pylint should warn about no-member and similar +# checks whenever an opaque object is returned when inferring. The inference +# can return multiple potential results while evaluating a Python object, but +# some branches might not be evaluated, which results in partial inference. In +# that case, it might be useful to still emit no-member and other checks for +# the rest of the inferred objects. +ignore-on-opaque-inference=yes + +# List of class names for which member attributes should not be checked (useful +# for classes with dynamically set attributes). This supports the use of +# qualified names. +ignored-classes=optparse.Values,thread._local,_thread._local + +# List of module names for which member attributes should not be checked +# (useful for modules/projects where namespaces are manipulated during runtime +# and thus existing member attributes cannot be deduced by static analysis). It +# supports qualified module names, as well as Unix pattern matching. +ignored-modules= + +# Show a hint with possible names when a member name was not found. The aspect +# of finding the hint is based on edit distance. +missing-member-hint=yes + +# The minimum edit distance a name should have in order to be considered a +# similar match for a missing member name. +missing-member-hint-distance=1 + +# The total number of similar names that should be taken in consideration when +# showing a hint for a missing member. +missing-member-max-choices=1 + +# Regex pattern to define which classes are considered mixins ignore-mixin- +# members is set to 'yes' +mixin-class-rgx=.*[Mm]ixin + +# List of decorators that change the signature of a decorated function. +signature-mutators= + + +[VARIABLES] + +# List of additional names supposed to be defined in builtins. Remember that +# you should avoid defining new builtins when possible. +additional-builtins= + +# Tells whether unused global variables should be treated as a violation. +allow-global-unused-variables=yes + +# List of names allowed to shadow builtins +allowed-redefined-builtins= + +# List of strings which can identify a callback function by name. A callback +# name must start or end with one of those strings. +callbacks=cb_, + _cb + +# A regular expression matching the name of dummy variables (i.e. expected to +# not be used). +dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_ + +# Argument names that match this expression will be ignored. Default to name +# with leading underscore. +ignored-argument-names=_.*|^ignored_|^unused_ + +# Tells whether we should check for unused import in __init__ files. +init-import=no + +# List of qualified module names which can have objects that can redefine +# builtins. +redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io + + +[CLASSES] + +# Warn about protected attribute access inside special methods +check-protected-access-in-special-methods=no + +# List of method names used to declare (i.e. assign) instance attributes. +defining-attr-methods=__init__, + __new__, + setUp, + __post_init__ + +# List of member names, which should be excluded from the protected access +# warning. +exclude-protected=_asdict, + _fields, + _replace, + _source, + _make + +# List of valid names for the first argument in a class method. +valid-classmethod-first-arg=cls + +# List of valid names for the first argument in a metaclass class method. +valid-metaclass-classmethod-first-arg=cls + + +[DESIGN] + +# List of regular expressions of class ancestor names to ignore when counting +# public methods (see R0903) +exclude-too-few-public-methods= + +# List of qualified class names to ignore when counting class parents (see +# R0901) +ignored-parents= + +# Maximum number of arguments for function / method. +max-args=5 + +# Maximum number of attributes for a class (see R0902). +max-attributes=7 + +# Maximum number of boolean expressions in an if statement (see R0916). +max-bool-expr=5 + +# Maximum number of branch for function / method body. +max-branches=12 + +# Maximum number of locals for function / method body. +max-locals=15 + +# Maximum number of parents for a class (see R0901). +max-parents=7 + +# Maximum number of public methods for a class (see R0904). +max-public-methods=20 + +# Maximum number of return / yield for function / method body. +max-returns=6 + +# Maximum number of statements in function / method body. +max-statements=50 + +# Minimum number of public methods for a class (see R0903). +min-public-methods=2 + + +[IMPORTS] + +# List of modules that can be imported at any level, not just the top level +# one. +allow-any-import-level= + +# Allow wildcard imports from modules that define __all__. +allow-wildcard-with-all=no + +# Analyse import fallback blocks. This can be used to support both Python 2 and +# 3 compatible code, which means that the block might have code that exists +# only in one or another interpreter, leading to false positives when analysed. +analyse-fallback-blocks=no + +# Deprecated modules which should not be used, separated by a comma. +deprecated-modules= + +# Output a graph (.gv or any supported image format) of external dependencies +# to the given file (report RP0402 must not be disabled). +ext-import-graph= + +# Output a graph (.gv or any supported image format) of all (i.e. internal and +# external) dependencies to the given file (report RP0402 must not be +# disabled). +import-graph= + +# Output a graph (.gv or any supported image format) of internal dependencies +# to the given file (report RP0402 must not be disabled). +int-import-graph= + +# Force import order to recognize a module as part of the standard +# compatibility libraries. +known-standard-library= + +# Force import order to recognize a module as part of a third party library. +known-third-party=enchant + +# Couples of modules and preferred modules, separated by a comma. +preferred-modules= + + +[EXCEPTIONS] + +# Exceptions that will emit a warning when being caught. Defaults to +# "BaseException, Exception". +overgeneral-exceptions=BaseException, + Exception From 4c1d5e57e7c06172e3a102bc7227111347d7d15a Mon Sep 17 00:00:00 2001 From: MichaelChan20 Date: Fri, 3 May 2024 13:30:06 +0200 Subject: [PATCH 02/17] Changed tensorflow-io version to support windows --- phishing-detection/poetry.lock | 330 +++++++++++++++++++----------- phishing-detection/pyproject.toml | 5 +- 2 files changed, 210 insertions(+), 125 deletions(-) diff --git a/phishing-detection/poetry.lock b/phishing-detection/poetry.lock index d6dfefc..15e0f7e 100644 --- a/phishing-detection/poetry.lock +++ b/phishing-detection/poetry.lock @@ -118,6 +118,17 @@ types-python-dateutil = ">=2.8.10" doc = ["doc8", "sphinx (>=7.0.0)", "sphinx-autobuild", "sphinx-autodoc-typehints", "sphinx_rtd_theme (>=1.3.0)"] test = ["dateparser (==1.*)", "pre-commit", "pytest", "pytest-cov", "pytest-mock", "pytz (==2021.1)", "simplejson (==3.*)"] +[[package]] +name = "astroid" +version = "3.1.0" +description = "An abstract syntax tree for Python with inference support." +optional = false +python-versions = ">=3.8.0" +files = [ + {file = "astroid-3.1.0-py3-none-any.whl", hash = "sha256:951798f922990137ac090c53af473db7ab4e70c770e6d7fae0cec59f74411819"}, + {file = "astroid-3.1.0.tar.gz", hash = "sha256:ac248253bfa4bd924a0de213707e7ebeeb3138abeb48d798784ead1e56d419d4"}, +] + [[package]] name = "asttokens" version = "2.4.1" @@ -567,6 +578,21 @@ files = [ {file = "defusedxml-0.7.1.tar.gz", hash = "sha256:1bb3032db185915b62d7c6209c5a8792be6a32ab2fedacc84e01b52c51aa3e69"}, ] +[[package]] +name = "dill" +version = "0.3.8" +description = "serialize all of Python" +optional = false +python-versions = ">=3.8" +files = [ + {file = "dill-0.3.8-py3-none-any.whl", hash = "sha256:c36ca9ffb54365bdd2f8eb3eff7d2a21237f8452b57ace88b1ac615b7e815bd7"}, + {file = "dill-0.3.8.tar.gz", hash = "sha256:3ebe3c479ad625c4553aca177444d89b486b1d84982eeacded644afc0cf797ca"}, +] + +[package.extras] +graph = ["objgraph (>=1.7.2)"] +profile = ["gprof2dot (>=2022.7.29)"] + [[package]] name = "executing" version = "2.0.1" @@ -684,13 +710,13 @@ files = [ [[package]] name = "gast" -version = "0.5.4" +version = "0.4.0" description = "Python AST that abstracts the underlying Python version" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ - {file = "gast-0.5.4-py3-none-any.whl", hash = "sha256:6fc4fa5fa10b72fb8aab4ae58bcb023058386e67b6fa2e3e34cec5c769360316"}, - {file = "gast-0.5.4.tar.gz", hash = "sha256:9c270fe5f4b130969b54174de7db4e764b09b4f7f67ccfc32480e29f78348d97"}, + {file = "gast-0.4.0-py3-none-any.whl", hash = "sha256:b7adcdd5adbebf1adf17378da5ba3f543684dbec47b1cda1f3997e573cd542c4"}, + {file = "gast-0.4.0.tar.gz", hash = "sha256:40feb7b8b8434785585ab224d1568b857edb18297e5a3047f1ba012bc83b42c1"}, ] [[package]] @@ -971,6 +997,20 @@ files = [ [package.dependencies] arrow = ">=0.15.0" +[[package]] +name = "isort" +version = "5.13.2" +description = "A Python utility / library to sort Python imports." +optional = false +python-versions = ">=3.8.0" +files = [ + {file = "isort-5.13.2-py3-none-any.whl", hash = "sha256:8ca5e72a8d85860d5a3fa69b8745237f2939afe12dbf656afbcb47fe72d947a6"}, + {file = "isort-5.13.2.tar.gz", hash = "sha256:48fdfcb9face5d58a4f6dde2e72a1fb8dcaf8ab26f95ab49fab84c2ddefb0109"}, +] + +[package.extras] +colors = ["colorama (>=0.4.6)"] + [[package]] name = "jedi" version = "0.19.1" @@ -1009,13 +1049,13 @@ i18n = ["Babel (>=2.7)"] [[package]] name = "joblib" -version = "1.4.0" +version = "1.4.2" description = "Lightweight pipelining with Python functions" optional = false python-versions = ">=3.8" files = [ - {file = "joblib-1.4.0-py3-none-any.whl", hash = "sha256:42942470d4062537be4d54c83511186da1fc14ba354961a2114da91efa9a4ed7"}, - {file = "joblib-1.4.0.tar.gz", hash = "sha256:1eb0dc091919cd384490de890cb5dfd538410a6d4b3b54eef09fb8c50b409b1c"}, + {file = "joblib-1.4.2-py3-none-any.whl", hash = "sha256:06d478d5674cbc267e7496a410ee875abd68e4340feff4490bcb7afb88060ae6"}, + {file = "joblib-1.4.2.tar.gz", hash = "sha256:2382c5816b2636fbd20a09e0f4e9dad4736765fdfb7dca582943b9c1366b3f0e"}, ] [[package]] @@ -1344,13 +1384,13 @@ files = [ [[package]] name = "keras" -version = "3.2.1" +version = "3.3.3" description = "Multi-backend Keras." optional = false python-versions = ">=3.9" files = [ - {file = "keras-3.2.1-py3-none-any.whl", hash = "sha256:0be1e89b041e697be562d8422ecb958ee5481acfc089913200926c561d258a03"}, - {file = "keras-3.2.1.tar.gz", hash = "sha256:966abbf0dfc1f9725f6293fb2a04ec83f56cd2a800990b38d1a03041255214a7"}, + {file = "keras-3.3.3-py3-none-any.whl", hash = "sha256:260df9ef71c6b89eb6816ce1c60f139c38ccdddd16f24e7005d2be127cdef8e4"}, + {file = "keras-3.3.3.tar.gz", hash = "sha256:f2fdffc8434fd77045cf8fb21816dbaa2308d5f76974ca924b2f60b40433b1a0"}, ] [package.dependencies] @@ -1663,6 +1703,17 @@ files = [ [package.dependencies] traitlets = "*" +[[package]] +name = "mccabe" +version = "0.7.0" +description = "McCabe checker, plugin for flake8" +optional = false +python-versions = ">=3.6" +files = [ + {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"}, + {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"}, +] + [[package]] name = "mdurl" version = "0.1.2" @@ -1712,10 +1763,7 @@ files = [ ] [package.dependencies] -numpy = [ - {version = ">=1.23.3", markers = "python_version >= \"3.11\" and python_version < \"3.12\""}, - {version = ">=1.26.0", markers = "python_version >= \"3.12\""}, -] +numpy = {version = ">=1.23.3", markers = "python_version >= \"3.11\""} [package.extras] dev = ["absl-py", "pyink", "pylint (>=2.6.0)", "pytest", "pytest-xdist"] @@ -2046,10 +2094,7 @@ files = [ ] [package.dependencies] -numpy = [ - {version = ">=1.23.2", markers = "python_version == \"3.11\""}, - {version = ">=1.26.0", markers = "python_version >= \"3.12\""}, -] +numpy = {version = ">=1.23.2", markers = "python_version == \"3.11\""} python-dateutil = ">=2.8.2" pytz = ">=2020.1" tzdata = ">=2022.7" @@ -2348,6 +2393,30 @@ files = [ plugins = ["importlib-metadata"] windows-terminal = ["colorama (>=0.4.6)"] +[[package]] +name = "pylint" +version = "3.1.0" +description = "python code static checker" +optional = false +python-versions = ">=3.8.0" +files = [ + {file = "pylint-3.1.0-py3-none-any.whl", hash = "sha256:507a5b60953874766d8a366e8e8c7af63e058b26345cfcb5f91f89d987fd6b74"}, + {file = "pylint-3.1.0.tar.gz", hash = "sha256:6a69beb4a6f63debebaab0a3477ecd0f559aa726af4954fc948c51f7a2549e23"}, +] + +[package.dependencies] +astroid = ">=3.1.0,<=3.2.0-dev0" +colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} +dill = {version = ">=0.3.6", markers = "python_version >= \"3.11\""} +isort = ">=4.2.5,<5.13.0 || >5.13.0,<6" +mccabe = ">=0.6,<0.8" +platformdirs = ">=2.2.0" +tomlkit = ">=0.10.1" + +[package.extras] +spelling = ["pyenchant (>=3.2,<4.0)"] +testutils = ["gitpython (>3)"] + [[package]] name = "pyparsing" version = "3.1.2" @@ -3087,10 +3156,7 @@ h5py = ">=3.10.0" keras = ">=3.0.0" libclang = ">=13.0.0" ml-dtypes = ">=0.3.1,<0.4.0" -numpy = [ - {version = ">=1.23.5,<2.0.0", markers = "python_version <= \"3.11\""}, - {version = ">=1.26.0,<2.0.0", markers = "python_version >= \"3.12\""}, -] +numpy = {version = ">=1.23.5,<2.0.0", markers = "python_version <= \"3.11\""} opt-einsum = ">=2.3.2" packaging = "*" protobuf = ">=3.20.3,<4.21.0 || >4.21.0,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<5.0.0dev" @@ -3108,35 +3174,38 @@ and-cuda = ["nvidia-cublas-cu12 (==12.3.4.1)", "nvidia-cuda-cupti-cu12 (==12.3.1 [[package]] name = "tensorflow-io-gcs-filesystem" -version = "0.37.0" +version = "0.31.0" description = "TensorFlow IO" optional = false -python-versions = "<3.12,>=3.7" -files = [ - {file = "tensorflow_io_gcs_filesystem-0.37.0-cp310-cp310-macosx_10_14_x86_64.whl", hash = "sha256:82cc4d8e26fb143fc814ac8ab95fede83363a315f5b62f8ae68312f1aca1cc6e"}, - {file = "tensorflow_io_gcs_filesystem-0.37.0-cp310-cp310-macosx_12_0_arm64.whl", hash = "sha256:677d6d7c84a94a3b27ea5d16633ea09adadef09c2630480e8e94209558828b02"}, - {file = "tensorflow_io_gcs_filesystem-0.37.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e5d1ac4d2010e8cdf259918ba1500c942b51b7ed2e549f55b404c1fb52f695d"}, - {file = "tensorflow_io_gcs_filesystem-0.37.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0e2901bc4a91158fa0a10d37594c8a5efb1445dd5a041b1b5b90f782a5d1b15e"}, - {file = "tensorflow_io_gcs_filesystem-0.37.0-cp311-cp311-macosx_10_14_x86_64.whl", hash = "sha256:eab6e4c1daf7ddbfef608cd8e2102861021678dfb3f6a7fb3f613db9d6992919"}, - {file = "tensorflow_io_gcs_filesystem-0.37.0-cp311-cp311-macosx_12_0_arm64.whl", hash = "sha256:4ec3c0d0a9d3676a2e74198e3dff66d74c7c34f974257f2176236d0703b31a0e"}, - {file = "tensorflow_io_gcs_filesystem-0.37.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:af0f79400656bb88bf326d2b8e63aef49c07a0ce8c14c3e2589a62e765d8c21f"}, - {file = "tensorflow_io_gcs_filesystem-0.37.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:13bc337f2c2db63a39c81c8fd0ececc0c3d5fcf4ce229dfed0b0085a23dd60e9"}, - {file = "tensorflow_io_gcs_filesystem-0.37.0-cp312-cp312-macosx_10_14_x86_64.whl", hash = "sha256:57e7af9c81e79bf8fb552985dc8972ac90437d34bd4c1c9019a92a07eb12bc98"}, - {file = "tensorflow_io_gcs_filesystem-0.37.0-cp312-cp312-macosx_12_0_arm64.whl", hash = "sha256:48a8e7aec651bea8db410f6426c6446a56d16a5ab32201a70d8d684c113137b7"}, - {file = "tensorflow_io_gcs_filesystem-0.37.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:71ccf64a137efcb2be2627225b4e48110cbf34da39b23c5cc688fe803f2510f1"}, - {file = "tensorflow_io_gcs_filesystem-0.37.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:03d5598b8007551f4e1391bf85a83a1865e3fa0789beef15a200efaa06a23fb5"}, - {file = "tensorflow_io_gcs_filesystem-0.37.0-cp39-cp39-macosx_10_14_x86_64.whl", hash = "sha256:8d3ad5f30b6dbe09baefdb80e9aa7ff3869c772928b865f8ffc8402be7675a43"}, - {file = "tensorflow_io_gcs_filesystem-0.37.0-cp39-cp39-macosx_12_0_arm64.whl", hash = "sha256:95bb229e968fca943806c6ac04e81dc4966fc4a36ab83efaa061a4ecb3ea5e85"}, - {file = "tensorflow_io_gcs_filesystem-0.37.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8385f4fe447812bd8e2e11ef523cf02765319100e5d9e4a9b5a876d4440c900c"}, - {file = "tensorflow_io_gcs_filesystem-0.37.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:500ec871a8d59cf78992b7fd4750d86ea3d35e231fb0bea7a7eabcf73abfceeb"}, -] - -[package.extras] -tensorflow = ["tensorflow (>=2.16.0,<2.17.0)"] -tensorflow-aarch64 = ["tensorflow-aarch64 (>=2.16.0,<2.17.0)"] -tensorflow-cpu = ["tensorflow-cpu (>=2.16.0,<2.17.0)"] -tensorflow-gpu = ["tensorflow-gpu (>=2.16.0,<2.17.0)"] -tensorflow-rocm = ["tensorflow-rocm (>=2.16.0,<2.17.0)"] +python-versions = ">=3.7, <3.12" +files = [ + {file = "tensorflow_io_gcs_filesystem-0.31.0-cp310-cp310-macosx_10_14_x86_64.whl", hash = "sha256:a71421f8d75a093b6aac65b4c8c8d2f768c3ca6215307cf8c16192e62d992bcf"}, + {file = "tensorflow_io_gcs_filesystem-0.31.0-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:359134ecbd3bf938bb0cf65be4526106c30da461b2e2ce05446a229ed35f6832"}, + {file = "tensorflow_io_gcs_filesystem-0.31.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b658b33567552f155af2ed848130f787bfda29381fa78cd905d5ee8254364f3c"}, + {file = "tensorflow_io_gcs_filesystem-0.31.0-cp310-cp310-win_amd64.whl", hash = "sha256:961353b38c76471fa296bb7d883322c66b91415e7d47087236a6706db3ab2758"}, + {file = "tensorflow_io_gcs_filesystem-0.31.0-cp311-cp311-macosx_10_14_x86_64.whl", hash = "sha256:8909c4344b0e96aa356230ab460ffafe5900c33c1aaced65fafae71d177a1966"}, + {file = "tensorflow_io_gcs_filesystem-0.31.0-cp311-cp311-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:e417faf8755aafe52d8f8c6b5ae5bae6e4fae8326ee3acd5e9181b83bbfbae87"}, + {file = "tensorflow_io_gcs_filesystem-0.31.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:37c40e3c4ee1f8dda3b545deea6b8839192c82037d8021db9f589908034ad975"}, + {file = "tensorflow_io_gcs_filesystem-0.31.0-cp311-cp311-win_amd64.whl", hash = "sha256:4bb37d23f21c434687b11059cb7ffd094d52a7813368915ba1b7057e3c16e414"}, + {file = "tensorflow_io_gcs_filesystem-0.31.0-cp37-cp37m-macosx_10_14_x86_64.whl", hash = "sha256:a7e8d4bd0a25de7637e562997c011294d7ea595a76f315427a5dd522d56e9d49"}, + {file = "tensorflow_io_gcs_filesystem-0.31.0-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:fbcfb4aa2eaa9a3038d2487e570ff93feb1dbe51c3a4663d7d9ab9f9a9f9a9d8"}, + {file = "tensorflow_io_gcs_filesystem-0.31.0-cp37-cp37m-win_amd64.whl", hash = "sha256:e3933059b1c53e062075de2e355ec136b655da5883c3c26736c45dfeb1901945"}, + {file = "tensorflow_io_gcs_filesystem-0.31.0-cp38-cp38-macosx_10_14_x86_64.whl", hash = "sha256:f0adfbcd264262797d429311843733da2d5c1ffb119fbfa6339269b6c0414113"}, + {file = "tensorflow_io_gcs_filesystem-0.31.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:20e3ee5df01f2bd81d37fc715816c329b7533ccca967c47946eb458a5b7a7280"}, + {file = "tensorflow_io_gcs_filesystem-0.31.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bd628609b77aee0e385eadf1628222486f19b8f1d81b5f0a344f2470204df116"}, + {file = "tensorflow_io_gcs_filesystem-0.31.0-cp38-cp38-win_amd64.whl", hash = "sha256:b4ebb30ad7ce5f3769e3d959ea99bd95d80a44099bcf94da6042f9755ac6e850"}, + {file = "tensorflow_io_gcs_filesystem-0.31.0-cp39-cp39-macosx_10_14_x86_64.whl", hash = "sha256:68b89ef9f63f297de1cd9d545bc45dddc7d8fe12bcda4266279b244e8cf3b7c0"}, + {file = "tensorflow_io_gcs_filesystem-0.31.0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:e6d8cc7b14ade870168b9704ee44f9c55b468b9a00ed40e12d20fffd321193b5"}, + {file = "tensorflow_io_gcs_filesystem-0.31.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:97ebb9a8001a38f615aa1f90d2e998b7bd6eddae7aafc92897833610b039401b"}, + {file = "tensorflow_io_gcs_filesystem-0.31.0-cp39-cp39-win_amd64.whl", hash = "sha256:cb7459c15608fe42973a78e4d3ad7ac79cfc7adae1ccb1b1846db3165fbc081a"}, +] + +[package.extras] +tensorflow = ["tensorflow (>=2.11.0,<2.12.0)"] +tensorflow-aarch64 = ["tensorflow-aarch64 (>=2.11.0,<2.12.0)"] +tensorflow-cpu = ["tensorflow-cpu (>=2.11.0,<2.12.0)"] +tensorflow-gpu = ["tensorflow-gpu (>=2.11.0,<2.12.0)"] +tensorflow-rocm = ["tensorflow-rocm (>=2.11.0,<2.12.0)"] [[package]] name = "termcolor" @@ -3202,6 +3271,17 @@ webencodings = ">=0.4" doc = ["sphinx", "sphinx_rtd_theme"] test = ["pytest", "ruff"] +[[package]] +name = "tomlkit" +version = "0.12.4" +description = "Style preserving TOML library" +optional = false +python-versions = ">=3.7" +files = [ + {file = "tomlkit-0.12.4-py3-none-any.whl", hash = "sha256:5cd82d48a3dd89dee1f9d64420aa20ae65cfbd00668d6f094d7578a78efbb77b"}, + {file = "tomlkit-0.12.4.tar.gz", hash = "sha256:7ca1cfc12232806517a8515047ba66a19369e71edf2439d0f5824f91032b6cc3"}, +] + [[package]] name = "tornado" version = "6.4" @@ -3398,84 +3478,88 @@ files = [ [[package]] name = "wrapt" -version = "1.16.0" +version = "1.14.1" description = "Module for decorators, wrappers and monkey patching." optional = false -python-versions = ">=3.6" -files = [ - {file = "wrapt-1.16.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ffa565331890b90056c01db69c0fe634a776f8019c143a5ae265f9c6bc4bd6d4"}, - {file = "wrapt-1.16.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e4fdb9275308292e880dcbeb12546df7f3e0f96c6b41197e0cf37d2826359020"}, - {file = "wrapt-1.16.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bb2dee3874a500de01c93d5c71415fcaef1d858370d405824783e7a8ef5db440"}, - {file = "wrapt-1.16.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2a88e6010048489cda82b1326889ec075a8c856c2e6a256072b28eaee3ccf487"}, - {file = "wrapt-1.16.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ac83a914ebaf589b69f7d0a1277602ff494e21f4c2f743313414378f8f50a4cf"}, - {file = "wrapt-1.16.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:73aa7d98215d39b8455f103de64391cb79dfcad601701a3aa0dddacf74911d72"}, - {file = "wrapt-1.16.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:807cc8543a477ab7422f1120a217054f958a66ef7314f76dd9e77d3f02cdccd0"}, - {file = "wrapt-1.16.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:bf5703fdeb350e36885f2875d853ce13172ae281c56e509f4e6eca049bdfb136"}, - {file = "wrapt-1.16.0-cp310-cp310-win32.whl", hash = "sha256:f6b2d0c6703c988d334f297aa5df18c45e97b0af3679bb75059e0e0bd8b1069d"}, - {file = "wrapt-1.16.0-cp310-cp310-win_amd64.whl", hash = "sha256:decbfa2f618fa8ed81c95ee18a387ff973143c656ef800c9f24fb7e9c16054e2"}, - {file = "wrapt-1.16.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1a5db485fe2de4403f13fafdc231b0dbae5eca4359232d2efc79025527375b09"}, - {file = "wrapt-1.16.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:75ea7d0ee2a15733684badb16de6794894ed9c55aa5e9903260922f0482e687d"}, - {file = "wrapt-1.16.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a452f9ca3e3267cd4d0fcf2edd0d035b1934ac2bd7e0e57ac91ad6b95c0c6389"}, - {file = "wrapt-1.16.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:43aa59eadec7890d9958748db829df269f0368521ba6dc68cc172d5d03ed8060"}, - {file = "wrapt-1.16.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:72554a23c78a8e7aa02abbd699d129eead8b147a23c56e08d08dfc29cfdddca1"}, - {file = "wrapt-1.16.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:d2efee35b4b0a347e0d99d28e884dfd82797852d62fcd7ebdeee26f3ceb72cf3"}, - {file = "wrapt-1.16.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:6dcfcffe73710be01d90cae08c3e548d90932d37b39ef83969ae135d36ef3956"}, - {file = "wrapt-1.16.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:eb6e651000a19c96f452c85132811d25e9264d836951022d6e81df2fff38337d"}, - {file = "wrapt-1.16.0-cp311-cp311-win32.whl", hash = "sha256:66027d667efe95cc4fa945af59f92c5a02c6f5bb6012bff9e60542c74c75c362"}, - {file = "wrapt-1.16.0-cp311-cp311-win_amd64.whl", hash = "sha256:aefbc4cb0a54f91af643660a0a150ce2c090d3652cf4052a5397fb2de549cd89"}, - {file = "wrapt-1.16.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:5eb404d89131ec9b4f748fa5cfb5346802e5ee8836f57d516576e61f304f3b7b"}, - {file = "wrapt-1.16.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:9090c9e676d5236a6948330e83cb89969f433b1943a558968f659ead07cb3b36"}, - {file = "wrapt-1.16.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:94265b00870aa407bd0cbcfd536f17ecde43b94fb8d228560a1e9d3041462d73"}, - {file = "wrapt-1.16.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f2058f813d4f2b5e3a9eb2eb3faf8f1d99b81c3e51aeda4b168406443e8ba809"}, - {file = "wrapt-1.16.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:98b5e1f498a8ca1858a1cdbffb023bfd954da4e3fa2c0cb5853d40014557248b"}, - {file = "wrapt-1.16.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:14d7dc606219cdd7405133c713f2c218d4252f2a469003f8c46bb92d5d095d81"}, - {file = "wrapt-1.16.0-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:49aac49dc4782cb04f58986e81ea0b4768e4ff197b57324dcbd7699c5dfb40b9"}, - {file = "wrapt-1.16.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:418abb18146475c310d7a6dc71143d6f7adec5b004ac9ce08dc7a34e2babdc5c"}, - {file = "wrapt-1.16.0-cp312-cp312-win32.whl", hash = "sha256:685f568fa5e627e93f3b52fda002c7ed2fa1800b50ce51f6ed1d572d8ab3e7fc"}, - {file = "wrapt-1.16.0-cp312-cp312-win_amd64.whl", hash = "sha256:dcdba5c86e368442528f7060039eda390cc4091bfd1dca41e8046af7c910dda8"}, - {file = "wrapt-1.16.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:d462f28826f4657968ae51d2181a074dfe03c200d6131690b7d65d55b0f360f8"}, - {file = "wrapt-1.16.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a33a747400b94b6d6b8a165e4480264a64a78c8a4c734b62136062e9a248dd39"}, - {file = "wrapt-1.16.0-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b3646eefa23daeba62643a58aac816945cadc0afaf21800a1421eeba5f6cfb9c"}, - {file = "wrapt-1.16.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ebf019be5c09d400cf7b024aa52b1f3aeebeff51550d007e92c3c1c4afc2a40"}, - {file = "wrapt-1.16.0-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:0d2691979e93d06a95a26257adb7bfd0c93818e89b1406f5a28f36e0d8c1e1fc"}, - {file = "wrapt-1.16.0-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:1acd723ee2a8826f3d53910255643e33673e1d11db84ce5880675954183ec47e"}, - {file = "wrapt-1.16.0-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:bc57efac2da352a51cc4658878a68d2b1b67dbe9d33c36cb826ca449d80a8465"}, - {file = "wrapt-1.16.0-cp36-cp36m-win32.whl", hash = "sha256:da4813f751142436b075ed7aa012a8778aa43a99f7b36afe9b742d3ed8bdc95e"}, - {file = "wrapt-1.16.0-cp36-cp36m-win_amd64.whl", hash = "sha256:6f6eac2360f2d543cc875a0e5efd413b6cbd483cb3ad7ebf888884a6e0d2e966"}, - {file = "wrapt-1.16.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:a0ea261ce52b5952bf669684a251a66df239ec6d441ccb59ec7afa882265d593"}, - {file = "wrapt-1.16.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7bd2d7ff69a2cac767fbf7a2b206add2e9a210e57947dd7ce03e25d03d2de292"}, - {file = "wrapt-1.16.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9159485323798c8dc530a224bd3ffcf76659319ccc7bbd52e01e73bd0241a0c5"}, - {file = "wrapt-1.16.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a86373cf37cd7764f2201b76496aba58a52e76dedfaa698ef9e9688bfd9e41cf"}, - {file = "wrapt-1.16.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:73870c364c11f03ed072dda68ff7aea6d2a3a5c3fe250d917a429c7432e15228"}, - {file = "wrapt-1.16.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:b935ae30c6e7400022b50f8d359c03ed233d45b725cfdd299462f41ee5ffba6f"}, - {file = "wrapt-1.16.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:db98ad84a55eb09b3c32a96c576476777e87c520a34e2519d3e59c44710c002c"}, - {file = "wrapt-1.16.0-cp37-cp37m-win32.whl", hash = "sha256:9153ed35fc5e4fa3b2fe97bddaa7cbec0ed22412b85bcdaf54aeba92ea37428c"}, - {file = "wrapt-1.16.0-cp37-cp37m-win_amd64.whl", hash = "sha256:66dfbaa7cfa3eb707bbfcd46dab2bc6207b005cbc9caa2199bcbc81d95071a00"}, - {file = "wrapt-1.16.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1dd50a2696ff89f57bd8847647a1c363b687d3d796dc30d4dd4a9d1689a706f0"}, - {file = "wrapt-1.16.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:44a2754372e32ab315734c6c73b24351d06e77ffff6ae27d2ecf14cf3d229202"}, - {file = "wrapt-1.16.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e9723528b9f787dc59168369e42ae1c3b0d3fadb2f1a71de14531d321ee05b0"}, - {file = "wrapt-1.16.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:dbed418ba5c3dce92619656802cc5355cb679e58d0d89b50f116e4a9d5a9603e"}, - {file = "wrapt-1.16.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:941988b89b4fd6b41c3f0bfb20e92bd23746579736b7343283297c4c8cbae68f"}, - {file = "wrapt-1.16.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:6a42cd0cfa8ffc1915aef79cb4284f6383d8a3e9dcca70c445dcfdd639d51267"}, - {file = "wrapt-1.16.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:1ca9b6085e4f866bd584fb135a041bfc32cab916e69f714a7d1d397f8c4891ca"}, - {file = "wrapt-1.16.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:d5e49454f19ef621089e204f862388d29e6e8d8b162efce05208913dde5b9ad6"}, - {file = "wrapt-1.16.0-cp38-cp38-win32.whl", hash = "sha256:c31f72b1b6624c9d863fc095da460802f43a7c6868c5dda140f51da24fd47d7b"}, - {file = "wrapt-1.16.0-cp38-cp38-win_amd64.whl", hash = "sha256:490b0ee15c1a55be9c1bd8609b8cecd60e325f0575fc98f50058eae366e01f41"}, - {file = "wrapt-1.16.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9b201ae332c3637a42f02d1045e1d0cccfdc41f1f2f801dafbaa7e9b4797bfc2"}, - {file = "wrapt-1.16.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:2076fad65c6736184e77d7d4729b63a6d1ae0b70da4868adeec40989858eb3fb"}, - {file = "wrapt-1.16.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c5cd603b575ebceca7da5a3a251e69561bec509e0b46e4993e1cac402b7247b8"}, - {file = "wrapt-1.16.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b47cfad9e9bbbed2339081f4e346c93ecd7ab504299403320bf85f7f85c7d46c"}, - {file = "wrapt-1.16.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f8212564d49c50eb4565e502814f694e240c55551a5f1bc841d4fcaabb0a9b8a"}, - {file = "wrapt-1.16.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:5f15814a33e42b04e3de432e573aa557f9f0f56458745c2074952f564c50e664"}, - {file = "wrapt-1.16.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:db2e408d983b0e61e238cf579c09ef7020560441906ca990fe8412153e3b291f"}, - {file = "wrapt-1.16.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:edfad1d29c73f9b863ebe7082ae9321374ccb10879eeabc84ba3b69f2579d537"}, - {file = "wrapt-1.16.0-cp39-cp39-win32.whl", hash = "sha256:ed867c42c268f876097248e05b6117a65bcd1e63b779e916fe2e33cd6fd0d3c3"}, - {file = "wrapt-1.16.0-cp39-cp39-win_amd64.whl", hash = "sha256:eb1b046be06b0fce7249f1d025cd359b4b80fc1c3e24ad9eca33e0dcdb2e4a35"}, - {file = "wrapt-1.16.0-py3-none-any.whl", hash = "sha256:6906c4100a8fcbf2fa735f6059214bb13b97f75b1a61777fcf6432121ef12ef1"}, - {file = "wrapt-1.16.0.tar.gz", hash = "sha256:5f370f952971e7d17c7d1ead40e49f32345a7f7a5373571ef44d800d06b1899d"}, +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" +files = [ + {file = "wrapt-1.14.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:1b376b3f4896e7930f1f772ac4b064ac12598d1c38d04907e696cc4d794b43d3"}, + {file = "wrapt-1.14.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:903500616422a40a98a5a3c4ff4ed9d0066f3b4c951fa286018ecdf0750194ef"}, + {file = "wrapt-1.14.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:5a9a0d155deafd9448baff28c08e150d9b24ff010e899311ddd63c45c2445e28"}, + {file = "wrapt-1.14.1-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:ddaea91abf8b0d13443f6dac52e89051a5063c7d014710dcb4d4abb2ff811a59"}, + {file = "wrapt-1.14.1-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:36f582d0c6bc99d5f39cd3ac2a9062e57f3cf606ade29a0a0d6b323462f4dd87"}, + {file = "wrapt-1.14.1-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:7ef58fb89674095bfc57c4069e95d7a31cfdc0939e2a579882ac7d55aadfd2a1"}, + {file = "wrapt-1.14.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:e2f83e18fe2f4c9e7db597e988f72712c0c3676d337d8b101f6758107c42425b"}, + {file = "wrapt-1.14.1-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:ee2b1b1769f6707a8a445162ea16dddf74285c3964f605877a20e38545c3c462"}, + {file = "wrapt-1.14.1-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:833b58d5d0b7e5b9832869f039203389ac7cbf01765639c7309fd50ef619e0b1"}, + {file = "wrapt-1.14.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:80bb5c256f1415f747011dc3604b59bc1f91c6e7150bd7db03b19170ee06b320"}, + {file = "wrapt-1.14.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:07f7a7d0f388028b2df1d916e94bbb40624c59b48ecc6cbc232546706fac74c2"}, + {file = "wrapt-1.14.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:02b41b633c6261feff8ddd8d11c711df6842aba629fdd3da10249a53211a72c4"}, + {file = "wrapt-1.14.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2fe803deacd09a233e4762a1adcea5db5d31e6be577a43352936179d14d90069"}, + {file = "wrapt-1.14.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:257fd78c513e0fb5cdbe058c27a0624c9884e735bbd131935fd49e9fe719d310"}, + {file = "wrapt-1.14.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:4fcc4649dc762cddacd193e6b55bc02edca674067f5f98166d7713b193932b7f"}, + {file = "wrapt-1.14.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:11871514607b15cfeb87c547a49bca19fde402f32e2b1c24a632506c0a756656"}, + {file = "wrapt-1.14.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:8ad85f7f4e20964db4daadcab70b47ab05c7c1cf2a7c1e51087bfaa83831854c"}, + {file = "wrapt-1.14.1-cp310-cp310-win32.whl", hash = "sha256:a9a52172be0b5aae932bef82a79ec0a0ce87288c7d132946d645eba03f0ad8a8"}, + {file = "wrapt-1.14.1-cp310-cp310-win_amd64.whl", hash = "sha256:6d323e1554b3d22cfc03cd3243b5bb815a51f5249fdcbb86fda4bf62bab9e164"}, + {file = "wrapt-1.14.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ecee4132c6cd2ce5308e21672015ddfed1ff975ad0ac8d27168ea82e71413f55"}, + {file = "wrapt-1.14.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2020f391008ef874c6d9e208b24f28e31bcb85ccff4f335f15a3251d222b92d9"}, + {file = "wrapt-1.14.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2feecf86e1f7a86517cab34ae6c2f081fd2d0dac860cb0c0ded96d799d20b335"}, + {file = "wrapt-1.14.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:240b1686f38ae665d1b15475966fe0472f78e71b1b4903c143a842659c8e4cb9"}, + {file = "wrapt-1.14.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a9008dad07d71f68487c91e96579c8567c98ca4c3881b9b113bc7b33e9fd78b8"}, + {file = "wrapt-1.14.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:6447e9f3ba72f8e2b985a1da758767698efa72723d5b59accefd716e9e8272bf"}, + {file = "wrapt-1.14.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:acae32e13a4153809db37405f5eba5bac5fbe2e2ba61ab227926a22901051c0a"}, + {file = "wrapt-1.14.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:49ef582b7a1152ae2766557f0550a9fcbf7bbd76f43fbdc94dd3bf07cc7168be"}, + {file = "wrapt-1.14.1-cp311-cp311-win32.whl", hash = "sha256:358fe87cc899c6bb0ddc185bf3dbfa4ba646f05b1b0b9b5a27c2cb92c2cea204"}, + {file = "wrapt-1.14.1-cp311-cp311-win_amd64.whl", hash = "sha256:26046cd03936ae745a502abf44dac702a5e6880b2b01c29aea8ddf3353b68224"}, + {file = "wrapt-1.14.1-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:43ca3bbbe97af00f49efb06e352eae40434ca9d915906f77def219b88e85d907"}, + {file = "wrapt-1.14.1-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:6b1a564e6cb69922c7fe3a678b9f9a3c54e72b469875aa8018f18b4d1dd1adf3"}, + {file = "wrapt-1.14.1-cp35-cp35m-manylinux2010_i686.whl", hash = "sha256:00b6d4ea20a906c0ca56d84f93065b398ab74b927a7a3dbd470f6fc503f95dc3"}, + {file = "wrapt-1.14.1-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:a85d2b46be66a71bedde836d9e41859879cc54a2a04fad1191eb50c2066f6e9d"}, + {file = "wrapt-1.14.1-cp35-cp35m-win32.whl", hash = "sha256:dbcda74c67263139358f4d188ae5faae95c30929281bc6866d00573783c422b7"}, + {file = "wrapt-1.14.1-cp35-cp35m-win_amd64.whl", hash = "sha256:b21bb4c09ffabfa0e85e3a6b623e19b80e7acd709b9f91452b8297ace2a8ab00"}, + {file = "wrapt-1.14.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:9e0fd32e0148dd5dea6af5fee42beb949098564cc23211a88d799e434255a1f4"}, + {file = "wrapt-1.14.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9736af4641846491aedb3c3f56b9bc5568d92b0692303b5a305301a95dfd38b1"}, + {file = "wrapt-1.14.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5b02d65b9ccf0ef6c34cba6cf5bf2aab1bb2f49c6090bafeecc9cd81ad4ea1c1"}, + {file = "wrapt-1.14.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:21ac0156c4b089b330b7666db40feee30a5d52634cc4560e1905d6529a3897ff"}, + {file = "wrapt-1.14.1-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:9f3e6f9e05148ff90002b884fbc2a86bd303ae847e472f44ecc06c2cd2fcdb2d"}, + {file = "wrapt-1.14.1-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:6e743de5e9c3d1b7185870f480587b75b1cb604832e380d64f9504a0535912d1"}, + {file = "wrapt-1.14.1-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:d79d7d5dc8a32b7093e81e97dad755127ff77bcc899e845f41bf71747af0c569"}, + {file = "wrapt-1.14.1-cp36-cp36m-win32.whl", hash = "sha256:81b19725065dcb43df02b37e03278c011a09e49757287dca60c5aecdd5a0b8ed"}, + {file = "wrapt-1.14.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b014c23646a467558be7da3d6b9fa409b2c567d2110599b7cf9a0c5992b3b471"}, + {file = "wrapt-1.14.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:88bd7b6bd70a5b6803c1abf6bca012f7ed963e58c68d76ee20b9d751c74a3248"}, + {file = "wrapt-1.14.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b5901a312f4d14c59918c221323068fad0540e34324925c8475263841dbdfe68"}, + {file = "wrapt-1.14.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d77c85fedff92cf788face9bfa3ebaa364448ebb1d765302e9af11bf449ca36d"}, + {file = "wrapt-1.14.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8d649d616e5c6a678b26d15ece345354f7c2286acd6db868e65fcc5ff7c24a77"}, + {file = "wrapt-1.14.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:7d2872609603cb35ca513d7404a94d6d608fc13211563571117046c9d2bcc3d7"}, + {file = "wrapt-1.14.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:ee6acae74a2b91865910eef5e7de37dc6895ad96fa23603d1d27ea69df545015"}, + {file = "wrapt-1.14.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:2b39d38039a1fdad98c87279b48bc5dce2c0ca0d73483b12cb72aa9609278e8a"}, + {file = "wrapt-1.14.1-cp37-cp37m-win32.whl", hash = "sha256:60db23fa423575eeb65ea430cee741acb7c26a1365d103f7b0f6ec412b893853"}, + {file = "wrapt-1.14.1-cp37-cp37m-win_amd64.whl", hash = "sha256:709fe01086a55cf79d20f741f39325018f4df051ef39fe921b1ebe780a66184c"}, + {file = "wrapt-1.14.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8c0ce1e99116d5ab21355d8ebe53d9460366704ea38ae4d9f6933188f327b456"}, + {file = "wrapt-1.14.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:e3fb1677c720409d5f671e39bac6c9e0e422584e5f518bfd50aa4cbbea02433f"}, + {file = "wrapt-1.14.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:642c2e7a804fcf18c222e1060df25fc210b9c58db7c91416fb055897fc27e8cc"}, + {file = "wrapt-1.14.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7b7c050ae976e286906dd3f26009e117eb000fb2cf3533398c5ad9ccc86867b1"}, + {file = "wrapt-1.14.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ef3f72c9666bba2bab70d2a8b79f2c6d2c1a42a7f7e2b0ec83bb2f9e383950af"}, + {file = "wrapt-1.14.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:01c205616a89d09827986bc4e859bcabd64f5a0662a7fe95e0d359424e0e071b"}, + {file = "wrapt-1.14.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:5a0f54ce2c092aaf439813735584b9537cad479575a09892b8352fea5e988dc0"}, + {file = "wrapt-1.14.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:2cf71233a0ed05ccdabe209c606fe0bac7379fdcf687f39b944420d2a09fdb57"}, + {file = "wrapt-1.14.1-cp38-cp38-win32.whl", hash = "sha256:aa31fdcc33fef9eb2552cbcbfee7773d5a6792c137b359e82879c101e98584c5"}, + {file = "wrapt-1.14.1-cp38-cp38-win_amd64.whl", hash = "sha256:d1967f46ea8f2db647c786e78d8cc7e4313dbd1b0aca360592d8027b8508e24d"}, + {file = "wrapt-1.14.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3232822c7d98d23895ccc443bbdf57c7412c5a65996c30442ebe6ed3df335383"}, + {file = "wrapt-1.14.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:988635d122aaf2bdcef9e795435662bcd65b02f4f4c1ae37fbee7401c440b3a7"}, + {file = "wrapt-1.14.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9cca3c2cdadb362116235fdbd411735de4328c61425b0aa9f872fd76d02c4e86"}, + {file = "wrapt-1.14.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d52a25136894c63de15a35bc0bdc5adb4b0e173b9c0d07a2be9d3ca64a332735"}, + {file = "wrapt-1.14.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:40e7bc81c9e2b2734ea4bc1aceb8a8f0ceaac7c5299bc5d69e37c44d9081d43b"}, + {file = "wrapt-1.14.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b9b7a708dd92306328117d8c4b62e2194d00c365f18eff11a9b53c6f923b01e3"}, + {file = "wrapt-1.14.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:6a9a25751acb379b466ff6be78a315e2b439d4c94c1e99cb7266d40a537995d3"}, + {file = "wrapt-1.14.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:34aa51c45f28ba7f12accd624225e2b1e5a3a45206aa191f6f9aac931d9d56fe"}, + {file = "wrapt-1.14.1-cp39-cp39-win32.whl", hash = "sha256:dee0ce50c6a2dd9056c20db781e9c1cfd33e77d2d569f5d1d9321c641bb903d5"}, + {file = "wrapt-1.14.1-cp39-cp39-win_amd64.whl", hash = "sha256:dee60e1de1898bde3b238f18340eec6148986da0455d8ba7848d50470a7a32fb"}, + {file = "wrapt-1.14.1.tar.gz", hash = "sha256:380a85cf89e0e69b7cfbe2ea9f765f004ff419f34194018a6827ac0e3edfed4d"}, ] [metadata] lock-version = "2.0" -python-versions = "^3.11" -content-hash = "05f1ed92dabad2813b0d722cfb895469a2b8f967415783ac414bfac01a548b50" +python-versions = ">=3.11,<3.12" +content-hash = "092f6b93baf0ed3d7779c123334469e391dbb9307c8e7e30e6e4e579a2506676" diff --git a/phishing-detection/pyproject.toml b/phishing-detection/pyproject.toml index 6f9f021..b4337cf 100644 --- a/phishing-detection/pyproject.toml +++ b/phishing-detection/pyproject.toml @@ -6,9 +6,10 @@ authors = ["Jan "] readme = "README.md" [tool.poetry.dependencies] -python = "^3.11" -keras = "3.2.1" +python = ">=3.11,<3.12" +keras = "3.3.3" matplotlib = "3.8.4" +tensorflow-io-gcs-filesystem = "0.31.0" tensorflow = "2.16.1" scikit-learn = "1.2.2" numpy = "1.26.4" From 70c67a5612c4afa7e04795eed2c7a230b533662e Mon Sep 17 00:00:00 2001 From: MichaelChan20 Date: Fri, 3 May 2024 18:46:20 +0200 Subject: [PATCH 03/17] Changed all keras imports to use tf_keras and fixed dependencies --- .../phishing_detection/model_definition.py | 4 ++-- .../phishing_detection/preprocess.py | 11 +++++----- phishing-detection/phishing_detection/run.py | 15 ++++++++----- .../phishing_detection/train.py | 4 ++-- phishing-detection/poetry.lock | 22 +++++++++---------- phishing-detection/pyproject.toml | 3 ++- 6 files changed, 31 insertions(+), 28 deletions(-) diff --git a/phishing-detection/phishing_detection/model_definition.py b/phishing-detection/phishing_detection/model_definition.py index 6067f95..75a6658 100644 --- a/phishing-detection/phishing_detection/model_definition.py +++ b/phishing-detection/phishing_detection/model_definition.py @@ -1,5 +1,5 @@ -from keras.models import Sequential, Model -from keras.layers import Embedding, Conv1D, MaxPooling1D, Flatten, Dense, Dropout +from keras._tf_keras.keras.models import Sequential, Model +from keras._tf_keras.keras.layers import Embedding, Conv1D, MaxPooling1D, Flatten, Dense, Dropout def build_model(char_index: dict, params: dict) -> Model: diff --git a/phishing-detection/phishing_detection/preprocess.py b/phishing-detection/phishing_detection/preprocess.py index ccebe5b..53a8ecf 100644 --- a/phishing-detection/phishing_detection/preprocess.py +++ b/phishing-detection/phishing_detection/preprocess.py @@ -1,12 +1,12 @@ from sklearn.preprocessing import LabelEncoder -from tensorflow.keras.preprocessing.text import Tokenizer +from keras._tf_keras.keras.preprocessing.sequence import Tokenizer import numpy as np import pandas as pd -from tensorflow.keras.preprocessing.sequence import pad_sequences +from keras._tf_keras.keras.preprocessing.sequence import pad_sequences import matplotlib.pyplot as plt -from keras.models import Sequential -from keras.layers import Dense, Dropout, Embedding, Conv1D, MaxPooling1D, Flatten -from keras.preprocessing.sequence import pad_sequences +from keras._tf_keras.keras.models import Sequential +from keras._tf_keras.keras.layers import Dense, Dropout, Embedding, Conv1D, MaxPooling1D, Flatten +from keras._tf_keras.keras.preprocessing.sequence import pad_sequences from sklearn.preprocessing import LabelEncoder from sklearn.metrics import classification_report, confusion_matrix @@ -36,7 +36,6 @@ def preprocess_data(raw_X_train: list[str], raw_y_train: list[str], raw_X_val: l X_train = pad_sequences(tokenizer.texts_to_sequences(raw_X_train), maxlen=sequence_length) X_val = pad_sequences(tokenizer.texts_to_sequences(raw_X_val), maxlen=sequence_length) X_test = pad_sequences(tokenizer.texts_to_sequences(raw_X_test), maxlen=sequence_length) - encoder = LabelEncoder() y_train = encoder.fit_transform(raw_y_train) diff --git a/phishing-detection/phishing_detection/run.py b/phishing-detection/phishing_detection/run.py index db05af6..ef38923 100644 --- a/phishing-detection/phishing_detection/run.py +++ b/phishing-detection/phishing_detection/run.py @@ -1,18 +1,20 @@ import os +import yaml from phishing_detection.train import train from phishing_detection.get_data import load_data from phishing_detection.model_definition import build_model from phishing_detection.predict import evaluate_results, plot_confusion_matrix, predict_classes from phishing_detection.preprocess import preprocess_data -import yaml + def run(params: dict) -> None: # Load data X_train, y_train, X_val, y_val, X_test, y_test = load_data() - + # Preprocess data - X_train, y_train, X_val, y_val, X_test, y_test, char_index = preprocess_data(X_train, y_train, X_val, y_val, X_test, y_test) + X_train, y_train, X_val, y_val, X_test, y_test, char_index = preprocess_data( + X_train, y_train, X_val, y_val, X_test, y_test) # Create model model = build_model(char_index, params) @@ -26,7 +28,8 @@ def run(params: dict) -> None: # plot confusion matrix fig = plot_confusion_matrix(evaluation_results['confusion_matrix']) # TODO save fig? - + if __name__ == "__main__": - params = yaml.safe_load(open(os.path.join("phishing-detection", "phishing_detection", "params.yaml"))) - run(params) + parameters = yaml.safe_load( + open(os.path.join("phishing-detection", "phishing_detection", "params.yaml"))) + run(parameters) diff --git a/phishing-detection/phishing_detection/train.py b/phishing-detection/phishing_detection/train.py index 714f118..95d5037 100644 --- a/phishing-detection/phishing_detection/train.py +++ b/phishing-detection/phishing_detection/train.py @@ -1,5 +1,5 @@ -from keras import Model -from keras.callbacks import History +from keras._tf_keras.keras import Model +from keras._tf_keras.keras.callbacks import History import numpy as np def train(model: Model, X_train: np.array, y_train: np.array, X_val: np.array, y_val: np.array, params: dict) -> History: diff --git a/phishing-detection/poetry.lock b/phishing-detection/poetry.lock index 15e0f7e..f675a07 100644 --- a/phishing-detection/poetry.lock +++ b/phishing-detection/poetry.lock @@ -927,13 +927,13 @@ test = ["flaky", "ipyparallel", "pre-commit", "pytest (>=7.0)", "pytest-asyncio [[package]] name = "ipython" -version = "8.24.0" +version = "8.23.0" description = "IPython: Productive Interactive Computing" optional = false python-versions = ">=3.10" files = [ - {file = "ipython-8.24.0-py3-none-any.whl", hash = "sha256:d7bf2f6c4314984e3e02393213bab8703cf163ede39672ce5918c51fe253a2a3"}, - {file = "ipython-8.24.0.tar.gz", hash = "sha256:010db3f8a728a578bb641fdd06c063b9fb8e96a9464c63aec6310fbcb5e80501"}, + {file = "ipython-8.23.0-py3-none-any.whl", hash = "sha256:07232af52a5ba146dc3372c7bf52a0f890a23edf38d77caef8d53f9cdc2584c1"}, + {file = "ipython-8.23.0.tar.gz", hash = "sha256:7468edaf4f6de3e1b912e57f66c241e6fd3c7099f2ec2136e239e142e800274d"}, ] [package.dependencies] @@ -946,7 +946,7 @@ prompt-toolkit = ">=3.0.41,<3.1.0" pygments = ">=2.4.0" stack-data = "*" traitlets = ">=5.13.0" -typing-extensions = {version = ">=4.6", markers = "python_version < \"3.12\""} +typing-extensions = {version = "*", markers = "python_version < \"3.12\""} [package.extras] all = ["ipython[black,doc,kernel,matplotlib,nbconvert,nbformat,notebook,parallel,qtconsole]", "ipython[test,test-extra]"] @@ -959,7 +959,7 @@ nbformat = ["nbformat"] notebook = ["ipywidgets", "notebook"] parallel = ["ipyparallel"] qtconsole = ["qtconsole"] -test = ["pickleshare", "pytest", "pytest-asyncio (<0.22)", "testpath"] +test = ["pickleshare", "pytest (<8)", "pytest-asyncio (<0.22)", "testpath"] test-extra = ["curio", "ipython[test]", "matplotlib (!=3.2.0)", "nbformat", "numpy (>=1.23)", "pandas", "trio"] [[package]] @@ -3330,13 +3330,13 @@ files = [ [[package]] name = "typing-extensions" -version = "4.11.0" -description = "Backported and Experimental Type Hints for Python 3.8+" +version = "4.5.0" +description = "Backported and Experimental Type Hints for Python 3.7+" optional = false -python-versions = ">=3.8" +python-versions = ">=3.7" files = [ - {file = "typing_extensions-4.11.0-py3-none-any.whl", hash = "sha256:c1f94d72897edaf4ce775bb7558d5b79d8126906a14ea5ed1635921406c0387a"}, - {file = "typing_extensions-4.11.0.tar.gz", hash = "sha256:83f085bd5ca59c80295fc2a82ab5dac679cbe02b9f33f7d83af68e241bea51b0"}, + {file = "typing_extensions-4.5.0-py3-none-any.whl", hash = "sha256:fb33085c39dd998ac16d1431ebc293a8b3eedd00fd4a32de0ff79002c19511b4"}, + {file = "typing_extensions-4.5.0.tar.gz", hash = "sha256:5cb5f4a79139d699607b3ef622a1dedafa84e115ab0024e0d9c044a9479ca7cb"}, ] [[package]] @@ -3562,4 +3562,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = ">=3.11,<3.12" -content-hash = "092f6b93baf0ed3d7779c123334469e391dbb9307c8e7e30e6e4e579a2506676" +content-hash = "93885694645d43494c8ada2af52fdd556b4b0e2f1561a43e49d24923df6c7076" diff --git a/phishing-detection/pyproject.toml b/phishing-detection/pyproject.toml index 7fbabda..94c7152 100644 --- a/phishing-detection/pyproject.toml +++ b/phishing-detection/pyproject.toml @@ -2,7 +2,7 @@ name = "phishing-detection" version = "0.1.0" description = "" -authors = ["Jan ", "Shayan Ramezani "] +authors = ["Jan "] readme = "README.md" [tool.poetry.dependencies] @@ -16,6 +16,7 @@ numpy = "1.26.4" pandas = "2.2.2" seaborn ="0.13.2" jupyter = "1.0.0" +pylint = "^3.1.0" [build-system] requires = ["poetry-core"] From 709521470c0ab7e937b3f6262d1f8b39eeb60f7f Mon Sep 17 00:00:00 2001 From: MichaelChan20 Date: Fri, 3 May 2024 18:48:33 +0200 Subject: [PATCH 04/17] Added pylint config & regex for matrix naming --- phishing-detection/pylintrc | 587 ++++++++++++++++++++++++++++++++++++ 1 file changed, 587 insertions(+) create mode 100644 phishing-detection/pylintrc diff --git a/phishing-detection/pylintrc b/phishing-detection/pylintrc new file mode 100644 index 0000000..ffd958b --- /dev/null +++ b/phishing-detection/pylintrc @@ -0,0 +1,587 @@ +[MASTER] + +# A comma-separated list of package or module names from where C extensions may +# be loaded. Extensions are loading into the active Python interpreter and may +# run arbitrary code. +extension-pkg-allow-list= + +# A comma-separated list of package or module names from where C extensions may +# be loaded. Extensions are loading into the active Python interpreter and may +# run arbitrary code. (This is an alternative name to extension-pkg-allow-list +# for backward compatibility.) +extension-pkg-whitelist= + +# Return non-zero exit code if any of these messages/categories are detected, +# even if score is above --fail-under value. Syntax same as enable. Messages +# specified are enabled, while categories only check already-enabled messages. +fail-on= + +# Specify a score threshold to be exceeded before program exits with error. +fail-under=10.0 + +# Files or directories to be skipped. They should be base names, not paths. +ignore=CVS + +# Add files or directories matching the regex patterns to the ignore-list. The +# regex matches against paths and can be in Posix or Windows format. +ignore-paths= + +# Files or directories matching the regex patterns are skipped. The regex +# matches against base names, not paths. The default value ignores emacs file +# locks +ignore-patterns=^\.# + +# Python code to execute, usually for sys.path manipulation such as +# pygtk.require(). +#init-hook= + +# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the +# number of processors available to use. +jobs=1 + +# Control the amount of potential inferred values when inferring a single +# object. This can help the performance when dealing with large functions or +# complex, nested conditions. +limit-inference-results=100 + +# List of plugins (as comma separated values of python module names) to load, +# usually to register additional checkers. +load-plugins= + +# Pickle collected data for later comparisons. +persistent=yes + +# Minimum Python version to use for version dependent checks. Will default to +# the version used to run pylint. +py-version=3.11 + +# Discover python modules and packages in the file system subtree. +recursive=no + +# When enabled, pylint would attempt to guess common misconfiguration and emit +# user-friendly hints instead of false-positive error messages. +suggestion-mode=yes + +# Allow loading of arbitrary C extensions. Extensions are imported into the +# active Python interpreter and may run arbitrary code. +unsafe-load-any-extension=no + + +[MESSAGES CONTROL] + +# Only show warnings with the listed confidence levels. Leave empty to show +# all. Valid levels: HIGH, CONTROL_FLOW, INFERENCE, INFERENCE_FAILURE, +# UNDEFINED. +confidence= + +# Disable the message, report, category or checker with the given id(s). You +# can either give multiple identifiers separated by comma (,) or put this +# option multiple times (only on the command line, not in the configuration +# file where it should appear only once). You can also use "--disable=all" to +# disable everything first and then re-enable specific checks. For example, if +# you want to run only the similarities checker, you can use "--disable=all +# --enable=similarities". If you want to run only the classes checker, but have +# no Warning level messages displayed, use "--disable=all --enable=classes +# --disable=W". +disable=raw-checker-failed, + bad-inline-option, + locally-disabled, + file-ignored, + suppressed-message, + useless-suppression, + deprecated-pragma, + use-symbolic-message-instead + +# Enable the message, report, category or checker with the given id(s). You can +# either give multiple identifier separated by comma (,) or put this option +# multiple time (only on the command line, not in the configuration file where +# it should appear only once). See also the "--disable" option for examples. +enable=c-extension-no-member + + +[REPORTS] + +# Python expression which should return a score less than or equal to 10. You +# have access to the variables 'fatal', 'error', 'warning', 'refactor', +# 'convention', and 'info' which contain the number of messages in each +# category, as well as 'statement' which is the total number of statements +# analyzed. This score is used by the global evaluation report (RP0004). +evaluation=max(0, 0 if fatal else 10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)) + +# Template used to display messages. This is a python new-style format string +# used to format the message information. See doc for all details. +#msg-template= + +# Set the output format. Available formats are text, parseable, colorized, json +# and msvs (visual studio). You can also give a reporter class, e.g. +# mypackage.mymodule.MyReporterClass. +output-format=text + +# Tells whether to display a full report or only the messages. +reports=no + +# Activate the evaluation score. +score=yes + + +[REFACTORING] + +# Maximum number of nested blocks for function / method body +max-nested-blocks=5 + +# Complete name of functions that never returns. When checking for +# inconsistent-return-statements if a never returning function is called then +# it will be considered as an explicit return statement and no message will be +# printed. +never-returning-functions=sys.exit,argparse.parse_error + + +[BASIC] + +# Naming style matching correct argument names. +argument-naming-style=snake_case + +# Regular expression matching correct argument names. Overrides argument- +# naming-style. If left empty, argument names will be checked with the set +# naming style. +#argument-rgx= + +# Naming style matching correct attribute names. +attr-naming-style=snake_case + +# Regular expression matching correct attribute names. Overrides attr-naming- +# style. If left empty, attribute names will be checked with the set naming +# style. +#attr-rgx= + +# Bad variable names which should always be refused, separated by a comma. +bad-names=foo, + bar, + baz, + toto, + tutu, + tata + +# Bad variable names regexes, separated by a comma. If names match any regex, +# they will always be refused +bad-names-rgxs= + +# Naming style matching correct class attribute names. +class-attribute-naming-style=any + +# Regular expression matching correct class attribute names. Overrides class- +# attribute-naming-style. If left empty, class attribute names will be checked +# with the set naming style. +#class-attribute-rgx= + +# Naming style matching correct class constant names. +class-const-naming-style=UPPER_CASE + +# Regular expression matching correct class constant names. Overrides class- +# const-naming-style. If left empty, class constant names will be checked with +# the set naming style. +#class-const-rgx= + +# Naming style matching correct class names. +class-naming-style=PascalCase + +# Regular expression matching correct class names. Overrides class-naming- +# style. If left empty, class names will be checked with the set naming style. +#class-rgx= + +# Naming style matching correct constant names. +const-naming-style=UPPER_CASE + +# Regular expression matching correct constant names. Overrides const-naming- +# style. If left empty, constant names will be checked with the set naming +# style. +#const-rgx= + +# Minimum line length for functions/classes that require docstrings, shorter +# ones are exempt. +docstring-min-length=-1 + +# Naming style matching correct function names. +function-naming-style=snake_case + +# Regular expression matching correct function names. Overrides function- +# naming-style. If left empty, function names will be checked with the set +# naming style. +#function-rgx= + +# Good variable names which should always be accepted, separated by a comma. +good-names=i, + j, + k, + ex, + Run, + X_train, + X_test, + _ + +# Good variable names regexes, separated by a comma. If names match any regex, +# they will always be accepted +good-names-rgxs= ^[A-Z]$, ^[A-Z]_[a-z0-9]+(?:_[a-z0-9]+)*(??$ + +# Number of spaces of indent required inside a hanging or continued line. +indent-after-paren=4 + +# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 +# tab). +indent-string=' ' + +# Maximum number of characters on a single line. +max-line-length=100 + +# Maximum number of lines in a module. +max-module-lines=1000 + +# Allow the body of a class to be on the same line as the declaration if body +# contains single statement. +single-line-class-stmt=no + +# Allow the body of an if to be on the same line as the test if there is no +# else. +single-line-if-stmt=no + + +[LOGGING] + +# The type of string formatting that logging methods do. `old` means using % +# formatting, `new` is for `{}` formatting. +logging-format-style=old + +# Logging modules to check that the string format arguments are in logging +# function parameter format. +logging-modules=logging + + +[MISCELLANEOUS] + +# List of note tags to take in consideration, separated by a comma. +notes=FIXME, + XXX, + TODO + +# Regular expression of note tags to take in consideration. +#notes-rgx= + + +[SIMILARITIES] + +# Comments are removed from the similarity computation +ignore-comments=yes + +# Docstrings are removed from the similarity computation +ignore-docstrings=yes + +# Imports are removed from the similarity computation +ignore-imports=no + +# Signatures are removed from the similarity computation +ignore-signatures=no + +# Minimum lines number of a similarity. +min-similarity-lines=4 + + +[SPELLING] + +# Limits count of emitted suggestions for spelling mistakes. +max-spelling-suggestions=4 + +# Spelling dictionary name. Available dictionaries: none. To make it work, +# install the 'python-enchant' package. +spelling-dict= + +# List of comma separated words that should be considered directives if they +# appear and the beginning of a comment and should not be checked. +spelling-ignore-comment-directives=fmt: on,fmt: off,noqa:,noqa,nosec,isort:skip,mypy: + +# List of comma separated words that should not be checked. +spelling-ignore-words= + +# A path to a file that contains the private dictionary; one word per line. +spelling-private-dict-file= + +# Tells whether to store unknown words to the private dictionary (see the +# --spelling-private-dict-file option) instead of raising a message. +spelling-store-unknown-words=no + + +[STRING] + +# This flag controls whether inconsistent-quotes generates a warning when the +# character used as a quote delimiter is used inconsistently within a module. +check-quote-consistency=no + +# This flag controls whether the implicit-str-concat should generate a warning +# on implicit string concatenation in sequences defined over several lines. +check-str-concat-over-line-jumps=no + + +[TYPECHECK] + +# List of decorators that produce context managers, such as +# contextlib.contextmanager. Add to this list to register other decorators that +# produce valid context managers. +contextmanager-decorators=contextlib.contextmanager + +# List of members which are set dynamically and missed by pylint inference +# system, and so shouldn't trigger E1101 when accessed. Python regular +# expressions are accepted. +generated-members= + +# Tells whether missing members accessed in mixin class should be ignored. A +# class is considered mixin if its name matches the mixin-class-rgx option. +ignore-mixin-members=yes + +# Tells whether to warn about missing members when the owner of the attribute +# is inferred to be None. +ignore-none=yes + +# This flag controls whether pylint should warn about no-member and similar +# checks whenever an opaque object is returned when inferring. The inference +# can return multiple potential results while evaluating a Python object, but +# some branches might not be evaluated, which results in partial inference. In +# that case, it might be useful to still emit no-member and other checks for +# the rest of the inferred objects. +ignore-on-opaque-inference=yes + +# List of class names for which member attributes should not be checked (useful +# for classes with dynamically set attributes). This supports the use of +# qualified names. +ignored-classes=optparse.Values,thread._local,_thread._local + +# List of module names for which member attributes should not be checked +# (useful for modules/projects where namespaces are manipulated during runtime +# and thus existing member attributes cannot be deduced by static analysis). It +# supports qualified module names, as well as Unix pattern matching. +ignored-modules= + +# Show a hint with possible names when a member name was not found. The aspect +# of finding the hint is based on edit distance. +missing-member-hint=yes + +# The minimum edit distance a name should have in order to be considered a +# similar match for a missing member name. +missing-member-hint-distance=1 + +# The total number of similar names that should be taken in consideration when +# showing a hint for a missing member. +missing-member-max-choices=1 + +# Regex pattern to define which classes are considered mixins ignore-mixin- +# members is set to 'yes' +mixin-class-rgx=.*[Mm]ixin + +# List of decorators that change the signature of a decorated function. +signature-mutators= + + +[VARIABLES] + +# List of additional names supposed to be defined in builtins. Remember that +# you should avoid defining new builtins when possible. +additional-builtins= + +# Tells whether unused global variables should be treated as a violation. +allow-global-unused-variables=yes + +# List of names allowed to shadow builtins +allowed-redefined-builtins= + +# List of strings which can identify a callback function by name. A callback +# name must start or end with one of those strings. +callbacks=cb_, + _cb + +# A regular expression matching the name of dummy variables (i.e. expected to +# not be used). +dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_ + +# Argument names that match this expression will be ignored. Default to name +# with leading underscore. +ignored-argument-names=_.*|^ignored_|^unused_ + +# Tells whether we should check for unused import in __init__ files. +init-import=no + +# List of qualified module names which can have objects that can redefine +# builtins. +redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io + + +[CLASSES] + +# Warn about protected attribute access inside special methods +check-protected-access-in-special-methods=no + +# List of method names used to declare (i.e. assign) instance attributes. +defining-attr-methods=__init__, + __new__, + setUp, + __post_init__ + +# List of member names, which should be excluded from the protected access +# warning. +exclude-protected=_asdict, + _fields, + _replace, + _source, + _make + +# List of valid names for the first argument in a class method. +valid-classmethod-first-arg=cls + +# List of valid names for the first argument in a metaclass class method. +valid-metaclass-classmethod-first-arg=cls + + +[DESIGN] + +# List of regular expressions of class ancestor names to ignore when counting +# public methods (see R0903) +exclude-too-few-public-methods= + +# List of qualified class names to ignore when counting class parents (see +# R0901) +ignored-parents= + +# Maximum number of arguments for function / method. +max-args=5 + +# Maximum number of attributes for a class (see R0902). +max-attributes=7 + +# Maximum number of boolean expressions in an if statement (see R0916). +max-bool-expr=5 + +# Maximum number of branch for function / method body. +max-branches=12 + +# Maximum number of locals for function / method body. +max-locals=15 + +# Maximum number of parents for a class (see R0901). +max-parents=7 + +# Maximum number of public methods for a class (see R0904). +max-public-methods=20 + +# Maximum number of return / yield for function / method body. +max-returns=6 + +# Maximum number of statements in function / method body. +max-statements=50 + +# Minimum number of public methods for a class (see R0903). +min-public-methods=2 + + +[IMPORTS] + +# List of modules that can be imported at any level, not just the top level +# one. +allow-any-import-level= + +# Allow wildcard imports from modules that define __all__. +allow-wildcard-with-all=no + +# Analyse import fallback blocks. This can be used to support both Python 2 and +# 3 compatible code, which means that the block might have code that exists +# only in one or another interpreter, leading to false positives when analysed. +analyse-fallback-blocks=no + +# Deprecated modules which should not be used, separated by a comma. +deprecated-modules= + +# Output a graph (.gv or any supported image format) of external dependencies +# to the given file (report RP0402 must not be disabled). +ext-import-graph= + +# Output a graph (.gv or any supported image format) of all (i.e. internal and +# external) dependencies to the given file (report RP0402 must not be +# disabled). +import-graph= + +# Output a graph (.gv or any supported image format) of internal dependencies +# to the given file (report RP0402 must not be disabled). +int-import-graph= + +# Force import order to recognize a module as part of the standard +# compatibility libraries. +known-standard-library= + +# Force import order to recognize a module as part of a third party library. +known-third-party=enchant + +# Couples of modules and preferred modules, separated by a comma. +preferred-modules= + + +[EXCEPTIONS] + +# Exceptions that will emit a warning when being caught. Defaults to +# "BaseException, Exception". +overgeneral-exceptions=BaseException, + Exception From 3836d8cfa9d6aad8fd50b9646b3c791ccfd0276c Mon Sep 17 00:00:00 2001 From: MichaelChan20 Date: Fri, 3 May 2024 19:04:23 +0200 Subject: [PATCH 05/17] Removed outer pylint config The correct linter config can be found in phishing-detection folder, as it should be ran through the poetry shell. --- pylintrc | 587 ------------------------------------------------------- 1 file changed, 587 deletions(-) delete mode 100644 pylintrc diff --git a/pylintrc b/pylintrc deleted file mode 100644 index 310e98f..0000000 --- a/pylintrc +++ /dev/null @@ -1,587 +0,0 @@ -[MASTER] - -# A comma-separated list of package or module names from where C extensions may -# be loaded. Extensions are loading into the active Python interpreter and may -# run arbitrary code. -extension-pkg-allow-list= - -# A comma-separated list of package or module names from where C extensions may -# be loaded. Extensions are loading into the active Python interpreter and may -# run arbitrary code. (This is an alternative name to extension-pkg-allow-list -# for backward compatibility.) -extension-pkg-whitelist= - -# Return non-zero exit code if any of these messages/categories are detected, -# even if score is above --fail-under value. Syntax same as enable. Messages -# specified are enabled, while categories only check already-enabled messages. -fail-on= - -# Specify a score threshold to be exceeded before program exits with error. -fail-under=10.0 - -# Files or directories to be skipped. They should be base names, not paths. -ignore=CVS - -# Add files or directories matching the regex patterns to the ignore-list. The -# regex matches against paths and can be in Posix or Windows format. -ignore-paths= - -# Files or directories matching the regex patterns are skipped. The regex -# matches against base names, not paths. The default value ignores emacs file -# locks -ignore-patterns=^\.# - -# Python code to execute, usually for sys.path manipulation such as -# pygtk.require(). -#init-hook= - -# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the -# number of processors available to use. -jobs=1 - -# Control the amount of potential inferred values when inferring a single -# object. This can help the performance when dealing with large functions or -# complex, nested conditions. -limit-inference-results=100 - -# List of plugins (as comma separated values of python module names) to load, -# usually to register additional checkers. -load-plugins= - -# Pickle collected data for later comparisons. -persistent=yes - -# Minimum Python version to use for version dependent checks. Will default to -# the version used to run pylint. -py-version=3.11 - -# Discover python modules and packages in the file system subtree. -recursive=no - -# When enabled, pylint would attempt to guess common misconfiguration and emit -# user-friendly hints instead of false-positive error messages. -suggestion-mode=yes - -# Allow loading of arbitrary C extensions. Extensions are imported into the -# active Python interpreter and may run arbitrary code. -unsafe-load-any-extension=no - - -[MESSAGES CONTROL] - -# Only show warnings with the listed confidence levels. Leave empty to show -# all. Valid levels: HIGH, CONTROL_FLOW, INFERENCE, INFERENCE_FAILURE, -# UNDEFINED. -confidence= - -# Disable the message, report, category or checker with the given id(s). You -# can either give multiple identifiers separated by comma (,) or put this -# option multiple times (only on the command line, not in the configuration -# file where it should appear only once). You can also use "--disable=all" to -# disable everything first and then re-enable specific checks. For example, if -# you want to run only the similarities checker, you can use "--disable=all -# --enable=similarities". If you want to run only the classes checker, but have -# no Warning level messages displayed, use "--disable=all --enable=classes -# --disable=W". -disable=raw-checker-failed, - bad-inline-option, - locally-disabled, - file-ignored, - suppressed-message, - useless-suppression, - deprecated-pragma, - use-symbolic-message-instead - -# Enable the message, report, category or checker with the given id(s). You can -# either give multiple identifier separated by comma (,) or put this option -# multiple time (only on the command line, not in the configuration file where -# it should appear only once). See also the "--disable" option for examples. -enable=c-extension-no-member - - -[REPORTS] - -# Python expression which should return a score less than or equal to 10. You -# have access to the variables 'fatal', 'error', 'warning', 'refactor', -# 'convention', and 'info' which contain the number of messages in each -# category, as well as 'statement' which is the total number of statements -# analyzed. This score is used by the global evaluation report (RP0004). -evaluation=max(0, 0 if fatal else 10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)) - -# Template used to display messages. This is a python new-style format string -# used to format the message information. See doc for all details. -#msg-template= - -# Set the output format. Available formats are text, parseable, colorized, json -# and msvs (visual studio). You can also give a reporter class, e.g. -# mypackage.mymodule.MyReporterClass. -output-format=text - -# Tells whether to display a full report or only the messages. -reports=no - -# Activate the evaluation score. -score=yes - - -[REFACTORING] - -# Maximum number of nested blocks for function / method body -max-nested-blocks=5 - -# Complete name of functions that never returns. When checking for -# inconsistent-return-statements if a never returning function is called then -# it will be considered as an explicit return statement and no message will be -# printed. -never-returning-functions=sys.exit,argparse.parse_error - - -[BASIC] - -# Naming style matching correct argument names. -argument-naming-style=snake_case - -# Regular expression matching correct argument names. Overrides argument- -# naming-style. If left empty, argument names will be checked with the set -# naming style. -#argument-rgx= - -# Naming style matching correct attribute names. -attr-naming-style=snake_case - -# Regular expression matching correct attribute names. Overrides attr-naming- -# style. If left empty, attribute names will be checked with the set naming -# style. -#attr-rgx= - -# Bad variable names which should always be refused, separated by a comma. -bad-names=foo, - bar, - baz, - toto, - tutu, - tata - -# Bad variable names regexes, separated by a comma. If names match any regex, -# they will always be refused -bad-names-rgxs= - -# Naming style matching correct class attribute names. -class-attribute-naming-style=any - -# Regular expression matching correct class attribute names. Overrides class- -# attribute-naming-style. If left empty, class attribute names will be checked -# with the set naming style. -#class-attribute-rgx= - -# Naming style matching correct class constant names. -class-const-naming-style=UPPER_CASE - -# Regular expression matching correct class constant names. Overrides class- -# const-naming-style. If left empty, class constant names will be checked with -# the set naming style. -#class-const-rgx= - -# Naming style matching correct class names. -class-naming-style=PascalCase - -# Regular expression matching correct class names. Overrides class-naming- -# style. If left empty, class names will be checked with the set naming style. -#class-rgx= - -# Naming style matching correct constant names. -const-naming-style=UPPER_CASE - -# Regular expression matching correct constant names. Overrides const-naming- -# style. If left empty, constant names will be checked with the set naming -# style. -#const-rgx= - -# Minimum line length for functions/classes that require docstrings, shorter -# ones are exempt. -docstring-min-length=-1 - -# Naming style matching correct function names. -function-naming-style=snake_case - -# Regular expression matching correct function names. Overrides function- -# naming-style. If left empty, function names will be checked with the set -# naming style. -#function-rgx= - -# Good variable names which should always be accepted, separated by a comma. -good-names=i, - j, - k, - ex, - Run, - X_train, - X_test, - _ - -# Good variable names regexes, separated by a comma. If names match any regex, -# they will always be accepted -good-names-rgxs= - -# Include a hint for the correct naming format with invalid-name. -include-naming-hint=no - -# Naming style matching correct inline iteration names. -inlinevar-naming-style=any - -# Regular expression matching correct inline iteration names. Overrides -# inlinevar-naming-style. If left empty, inline iteration names will be checked -# with the set naming style. -#inlinevar-rgx= - -# Naming style matching correct method names. -method-naming-style=snake_case - -# Regular expression matching correct method names. Overrides method-naming- -# style. If left empty, method names will be checked with the set naming style. -#method-rgx= - -# Naming style matching correct module names. -module-naming-style=snake_case - -# Regular expression matching correct module names. Overrides module-naming- -# style. If left empty, module names will be checked with the set naming style. -#module-rgx= - -# Colon-delimited sets of names that determine each other's naming style when -# the name regexes allow several styles. -name-group= - -# Regular expression which should only match function or class names that do -# not require a docstring. -no-docstring-rgx=^_ - -# List of decorators that produce properties, such as abc.abstractproperty. Add -# to this list to register other decorators that produce valid properties. -# These decorators are taken in consideration only for invalid-name. -property-classes=abc.abstractproperty - -# Regular expression matching correct type variable names. If left empty, type -# variable names will be checked with the set naming style. -#typevar-rgx= - -# Naming style matching correct variable names. -variable-naming-style=snake_case - -# Regular expression matching correct variable names. Overrides variable- -# naming-style. If left empty, variable names will be checked with the set -# naming style. -#variable-rgx= - - -[FORMAT] - -# Expected format of line ending, e.g. empty (any line ending), LF or CRLF. -expected-line-ending-format= - -# Regexp for a line that is allowed to be longer than the limit. -ignore-long-lines=^\s*(# )??$ - -# Number of spaces of indent required inside a hanging or continued line. -indent-after-paren=4 - -# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 -# tab). -indent-string=' ' - -# Maximum number of characters on a single line. -max-line-length=100 - -# Maximum number of lines in a module. -max-module-lines=1000 - -# Allow the body of a class to be on the same line as the declaration if body -# contains single statement. -single-line-class-stmt=no - -# Allow the body of an if to be on the same line as the test if there is no -# else. -single-line-if-stmt=no - - -[LOGGING] - -# The type of string formatting that logging methods do. `old` means using % -# formatting, `new` is for `{}` formatting. -logging-format-style=old - -# Logging modules to check that the string format arguments are in logging -# function parameter format. -logging-modules=logging - - -[MISCELLANEOUS] - -# List of note tags to take in consideration, separated by a comma. -notes=FIXME, - XXX, - TODO - -# Regular expression of note tags to take in consideration. -#notes-rgx= - - -[SIMILARITIES] - -# Comments are removed from the similarity computation -ignore-comments=yes - -# Docstrings are removed from the similarity computation -ignore-docstrings=yes - -# Imports are removed from the similarity computation -ignore-imports=no - -# Signatures are removed from the similarity computation -ignore-signatures=no - -# Minimum lines number of a similarity. -min-similarity-lines=4 - - -[SPELLING] - -# Limits count of emitted suggestions for spelling mistakes. -max-spelling-suggestions=4 - -# Spelling dictionary name. Available dictionaries: none. To make it work, -# install the 'python-enchant' package. -spelling-dict= - -# List of comma separated words that should be considered directives if they -# appear and the beginning of a comment and should not be checked. -spelling-ignore-comment-directives=fmt: on,fmt: off,noqa:,noqa,nosec,isort:skip,mypy: - -# List of comma separated words that should not be checked. -spelling-ignore-words= - -# A path to a file that contains the private dictionary; one word per line. -spelling-private-dict-file= - -# Tells whether to store unknown words to the private dictionary (see the -# --spelling-private-dict-file option) instead of raising a message. -spelling-store-unknown-words=no - - -[STRING] - -# This flag controls whether inconsistent-quotes generates a warning when the -# character used as a quote delimiter is used inconsistently within a module. -check-quote-consistency=no - -# This flag controls whether the implicit-str-concat should generate a warning -# on implicit string concatenation in sequences defined over several lines. -check-str-concat-over-line-jumps=no - - -[TYPECHECK] - -# List of decorators that produce context managers, such as -# contextlib.contextmanager. Add to this list to register other decorators that -# produce valid context managers. -contextmanager-decorators=contextlib.contextmanager - -# List of members which are set dynamically and missed by pylint inference -# system, and so shouldn't trigger E1101 when accessed. Python regular -# expressions are accepted. -generated-members= - -# Tells whether missing members accessed in mixin class should be ignored. A -# class is considered mixin if its name matches the mixin-class-rgx option. -ignore-mixin-members=yes - -# Tells whether to warn about missing members when the owner of the attribute -# is inferred to be None. -ignore-none=yes - -# This flag controls whether pylint should warn about no-member and similar -# checks whenever an opaque object is returned when inferring. The inference -# can return multiple potential results while evaluating a Python object, but -# some branches might not be evaluated, which results in partial inference. In -# that case, it might be useful to still emit no-member and other checks for -# the rest of the inferred objects. -ignore-on-opaque-inference=yes - -# List of class names for which member attributes should not be checked (useful -# for classes with dynamically set attributes). This supports the use of -# qualified names. -ignored-classes=optparse.Values,thread._local,_thread._local - -# List of module names for which member attributes should not be checked -# (useful for modules/projects where namespaces are manipulated during runtime -# and thus existing member attributes cannot be deduced by static analysis). It -# supports qualified module names, as well as Unix pattern matching. -ignored-modules= - -# Show a hint with possible names when a member name was not found. The aspect -# of finding the hint is based on edit distance. -missing-member-hint=yes - -# The minimum edit distance a name should have in order to be considered a -# similar match for a missing member name. -missing-member-hint-distance=1 - -# The total number of similar names that should be taken in consideration when -# showing a hint for a missing member. -missing-member-max-choices=1 - -# Regex pattern to define which classes are considered mixins ignore-mixin- -# members is set to 'yes' -mixin-class-rgx=.*[Mm]ixin - -# List of decorators that change the signature of a decorated function. -signature-mutators= - - -[VARIABLES] - -# List of additional names supposed to be defined in builtins. Remember that -# you should avoid defining new builtins when possible. -additional-builtins= - -# Tells whether unused global variables should be treated as a violation. -allow-global-unused-variables=yes - -# List of names allowed to shadow builtins -allowed-redefined-builtins= - -# List of strings which can identify a callback function by name. A callback -# name must start or end with one of those strings. -callbacks=cb_, - _cb - -# A regular expression matching the name of dummy variables (i.e. expected to -# not be used). -dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_ - -# Argument names that match this expression will be ignored. Default to name -# with leading underscore. -ignored-argument-names=_.*|^ignored_|^unused_ - -# Tells whether we should check for unused import in __init__ files. -init-import=no - -# List of qualified module names which can have objects that can redefine -# builtins. -redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io - - -[CLASSES] - -# Warn about protected attribute access inside special methods -check-protected-access-in-special-methods=no - -# List of method names used to declare (i.e. assign) instance attributes. -defining-attr-methods=__init__, - __new__, - setUp, - __post_init__ - -# List of member names, which should be excluded from the protected access -# warning. -exclude-protected=_asdict, - _fields, - _replace, - _source, - _make - -# List of valid names for the first argument in a class method. -valid-classmethod-first-arg=cls - -# List of valid names for the first argument in a metaclass class method. -valid-metaclass-classmethod-first-arg=cls - - -[DESIGN] - -# List of regular expressions of class ancestor names to ignore when counting -# public methods (see R0903) -exclude-too-few-public-methods= - -# List of qualified class names to ignore when counting class parents (see -# R0901) -ignored-parents= - -# Maximum number of arguments for function / method. -max-args=5 - -# Maximum number of attributes for a class (see R0902). -max-attributes=7 - -# Maximum number of boolean expressions in an if statement (see R0916). -max-bool-expr=5 - -# Maximum number of branch for function / method body. -max-branches=12 - -# Maximum number of locals for function / method body. -max-locals=15 - -# Maximum number of parents for a class (see R0901). -max-parents=7 - -# Maximum number of public methods for a class (see R0904). -max-public-methods=20 - -# Maximum number of return / yield for function / method body. -max-returns=6 - -# Maximum number of statements in function / method body. -max-statements=50 - -# Minimum number of public methods for a class (see R0903). -min-public-methods=2 - - -[IMPORTS] - -# List of modules that can be imported at any level, not just the top level -# one. -allow-any-import-level= - -# Allow wildcard imports from modules that define __all__. -allow-wildcard-with-all=no - -# Analyse import fallback blocks. This can be used to support both Python 2 and -# 3 compatible code, which means that the block might have code that exists -# only in one or another interpreter, leading to false positives when analysed. -analyse-fallback-blocks=no - -# Deprecated modules which should not be used, separated by a comma. -deprecated-modules= - -# Output a graph (.gv or any supported image format) of external dependencies -# to the given file (report RP0402 must not be disabled). -ext-import-graph= - -# Output a graph (.gv or any supported image format) of all (i.e. internal and -# external) dependencies to the given file (report RP0402 must not be -# disabled). -import-graph= - -# Output a graph (.gv or any supported image format) of internal dependencies -# to the given file (report RP0402 must not be disabled). -int-import-graph= - -# Force import order to recognize a module as part of the standard -# compatibility libraries. -known-standard-library= - -# Force import order to recognize a module as part of a third party library. -known-third-party=enchant - -# Couples of modules and preferred modules, separated by a comma. -preferred-modules= - - -[EXCEPTIONS] - -# Exceptions that will emit a warning when being caught. Defaults to -# "BaseException, Exception". -overgeneral-exceptions=BaseException, - Exception From 3b2991175304632dfd50f47cb3df2266c0dc1f7c Mon Sep 17 00:00:00 2001 From: MichaelChan20 Date: Sat, 4 May 2024 02:03:00 +0200 Subject: [PATCH 06/17] Fixed import and some code smells --- .../phishing_detection/get_data.py | 2 +- .../phishing_detection/model_definition.py | 4 +- .../phishing_detection/preprocess.py | 24 ++++++----- phishing-detection/phishing_detection/run.py | 43 ++++++++++++++++++- .../phishing_detection/train.py | 2 +- 5 files changed, 58 insertions(+), 17 deletions(-) diff --git a/phishing-detection/phishing_detection/get_data.py b/phishing-detection/phishing_detection/get_data.py index e9764aa..e3b5e6a 100644 --- a/phishing-detection/phishing_detection/get_data.py +++ b/phishing-detection/phishing_detection/get_data.py @@ -20,4 +20,4 @@ def load_data(): raw_X_val=[line.split("\t")[1] for line in val] raw_y_val=[line.split("\t")[0] for line in val] - return raw_X_train, raw_y_train, raw_X_val, raw_y_val, raw_X_test, raw_y_test \ No newline at end of file + return raw_X_train, raw_y_train, raw_X_val, raw_y_val, raw_X_test, raw_y_test diff --git a/phishing-detection/phishing_detection/model_definition.py b/phishing-detection/phishing_detection/model_definition.py index 75a6658..4b9f7c7 100644 --- a/phishing-detection/phishing_detection/model_definition.py +++ b/phishing-detection/phishing_detection/model_definition.py @@ -15,7 +15,7 @@ def build_model(char_index: dict, params: dict) -> Model: """ voc_size = len(char_index.keys()) - print("voc_size: {}".format(voc_size)) # TODO remove if not needed for anything + #print("voc_size: {}".format(voc_size)) # TODO remove if not needed for anything, if needed use fstring instead dropout_rate = 0.2 # This can be parameterized in `params` if varying dropout rates are needed. model = Sequential() @@ -50,4 +50,4 @@ def build_model(char_index: dict, params: dict) -> Model: model.add(Dense(len(params['categories'])-1, activation='sigmoid')) - return model \ No newline at end of file + return model diff --git a/phishing-detection/phishing_detection/preprocess.py b/phishing-detection/phishing_detection/preprocess.py index 53a8ecf..d9940a1 100644 --- a/phishing-detection/phishing_detection/preprocess.py +++ b/phishing-detection/phishing_detection/preprocess.py @@ -1,16 +1,18 @@ from sklearn.preprocessing import LabelEncoder -from keras._tf_keras.keras.preprocessing.sequence import Tokenizer -import numpy as np -import pandas as pd -from keras._tf_keras.keras.preprocessing.sequence import pad_sequences -import matplotlib.pyplot as plt -from keras._tf_keras.keras.models import Sequential -from keras._tf_keras.keras.layers import Dense, Dropout, Embedding, Conv1D, MaxPooling1D, Flatten +#from sklearn.metrics import classification_report, confusion_matrix +from keras._tf_keras.keras.preprocessing.text import Tokenizer from keras._tf_keras.keras.preprocessing.sequence import pad_sequences -from sklearn.preprocessing import LabelEncoder -from sklearn.metrics import classification_report, confusion_matrix +#from keras._tf_keras.keras.models import Sequential +#from keras._tf_keras.keras.layers import Dense, Dropout, Embedding, Conv1D, MaxPooling1D, Flatten +import numpy as np +#import pandas as pd +#import matplotlib.pyplot as plt + -def preprocess_data(raw_X_train: list[str], raw_y_train: list[str], raw_X_val: list[str], raw_y_val: list[str], raw_X_test: list[str], raw_y_test: list[str], sequence_length: int = 200) -> tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray, np.ndarray, np.ndarray, dict[str, int]]: +def preprocess_data(raw_X_train: list[str], raw_y_train: list[str], + raw_X_val: list[str], raw_y_val: list[str], + raw_X_test: list[str], raw_y_test: list[str], sequence_length: int = 200 + ) -> tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray, np.ndarray, np.ndarray, dict[str, int]]: """ Preprocess the data for training the model. @@ -42,4 +44,4 @@ def preprocess_data(raw_X_train: list[str], raw_y_train: list[str], raw_X_val: l y_val = encoder.transform(raw_y_val) y_test = encoder.transform(raw_y_test) - return X_train, y_train, X_val, y_val, X_test, y_test, char_index \ No newline at end of file + return X_train, y_train, X_val, y_val, X_test, y_test, char_index diff --git a/phishing-detection/phishing_detection/run.py b/phishing-detection/phishing_detection/run.py index ef38923..0ee6d7c 100644 --- a/phishing-detection/phishing_detection/run.py +++ b/phishing-detection/phishing_detection/run.py @@ -1,3 +1,29 @@ +""" +phishing_detection_script.py + +This script performs phishing detection using a machine learning model. It loads data, +preprocesses it, builds a model, trains the model, evaluates its performance, and plots +a confusion matrix. + +Dependencies: + - os + - yaml + - phishing_detection.train.train + - phishing_detection.get_data.load_data + - phishing_detection.model_definition.build_model + - phishing_detection.predict.evaluate_results + - phishing_detection.predict.plot_confusion_matrix + - phishing_detection.predict.predict_classes + - phishing_detection.preprocess.preprocess_data + +Usage: + Ensure that the parameters are specified in the 'params.yaml' file located in the + 'phishing-detection/phishing_detection' directory. Then run this script. + +Example: + python phishing_detection_script.py +""" + import os import yaml from phishing_detection.train import train @@ -9,6 +35,19 @@ def run(params: dict) -> None: + """ + Runs the model. + + Parameters: + params (dict): A dictionary containing parameters for the model training and evaluation. + + Returns: + None + + Example: + params = yaml.safe_load(path) + run(params) + """ # Load data X_train, y_train, X_val, y_val, X_test, y_test = load_data() @@ -20,14 +59,14 @@ def run(params: dict) -> None: model = build_model(char_index, params) # Train model - hist = train(model, X_train, y_train, X_val, y_val, params) + train(model, X_train, y_train, X_val, y_val, params) # Evaluate model prediction = predict_classes(model, X_test) evaluation_results = evaluate_results(y_test, prediction) # plot confusion matrix - fig = plot_confusion_matrix(evaluation_results['confusion_matrix']) # TODO save fig? + plot_confusion_matrix(evaluation_results['confusion_matrix']) # TODO save fig? if __name__ == "__main__": parameters = yaml.safe_load( diff --git a/phishing-detection/phishing_detection/train.py b/phishing-detection/phishing_detection/train.py index 95d5037..bebc8c3 100644 --- a/phishing-detection/phishing_detection/train.py +++ b/phishing-detection/phishing_detection/train.py @@ -28,4 +28,4 @@ def train(model: Model, X_train: np.array, y_train: np.array, X_val: np.array, y validation_data=(X_val, y_val) ) - return hist \ No newline at end of file + return hist From fd9cdf1c2b4ec13d933bda8bd96f3fa77dadfa0a Mon Sep 17 00:00:00 2001 From: MichaelChan20 Date: Sun, 5 May 2024 20:10:42 +0200 Subject: [PATCH 07/17] Fixed pylint errors and added bandit SA tool. --- phishing-detection/.bandit | 2 + .../phishing_detection/get_data.py | 5 + .../phishing_detection/model_definition.py | 4 + .../phishing_detection/predict.py | 13 +- .../phishing_detection/preprocess.py | 8 +- phishing-detection/phishing_detection/run.py | 22 +- .../phishing_detection/train.py | 10 +- phishing-detection/poetry.lock | 252 ++++++++++-------- phishing-detection/pylintrc | 8 +- phishing-detection/pyproject.toml | 3 +- 10 files changed, 194 insertions(+), 133 deletions(-) create mode 100644 phishing-detection/.bandit diff --git a/phishing-detection/.bandit b/phishing-detection/.bandit new file mode 100644 index 0000000..dec7b46 --- /dev/null +++ b/phishing-detection/.bandit @@ -0,0 +1,2 @@ +[bandit] +skips = B106 \ No newline at end of file diff --git a/phishing-detection/phishing_detection/get_data.py b/phishing-detection/phishing_detection/get_data.py index e3b5e6a..a41ba32 100644 --- a/phishing-detection/phishing_detection/get_data.py +++ b/phishing-detection/phishing_detection/get_data.py @@ -1,3 +1,8 @@ +""" +Provides functions to load the data. + +""" + def load_data(): """ Load train, test, and validation phishing data. diff --git a/phishing-detection/phishing_detection/model_definition.py b/phishing-detection/phishing_detection/model_definition.py index 4b9f7c7..1fe8f5f 100644 --- a/phishing-detection/phishing_detection/model_definition.py +++ b/phishing-detection/phishing_detection/model_definition.py @@ -1,3 +1,7 @@ +""" +Provides functions to create the model. + +""" from keras._tf_keras.keras.models import Sequential, Model from keras._tf_keras.keras.layers import Embedding, Conv1D, MaxPooling1D, Flatten, Dense, Dropout diff --git a/phishing-detection/phishing_detection/predict.py b/phishing-detection/phishing_detection/predict.py index 560769d..2fefd11 100644 --- a/phishing-detection/phishing_detection/predict.py +++ b/phishing-detection/phishing_detection/predict.py @@ -1,3 +1,7 @@ +""" +Provides functions to peform predictions. + +""" from keras import Model from matplotlib import pyplot as plt import numpy as np @@ -21,14 +25,14 @@ def predict_classes(model: Model, x_test: np.ndarray, threshold: float = 0.5) -> print(y_pred) # TODO remove? # Convert predicted probabilities to binary labels y_pred_binary = (np.array(y_pred) > threshold).astype(int) - + return y_pred_binary def evaluate_results(y_test: np.ndarray, y_pred_binary: np.ndarray) -> dict: """ - Evaluate the results of a binary classification task. This function prints the classification report, confusion - matrix, and accuracy score. In + Evaluate the results of a binary classification task. + This function prints the classification report, confusion matrix, and accuracy score. Args: y_test: True binary labels. @@ -53,7 +57,8 @@ def evaluate_results(y_test: np.ndarray, y_pred_binary: np.ndarray) -> dict: accuracy = accuracy_score(y_test, y_pred_binary) print('Accuracy:', accuracy) - return {'classification_report': report, 'confusion_matrix': confusion_mat, 'accuracy': accuracy} + return {'classification_report': report, 'confusion_matrix': confusion_mat, + 'accuracy': accuracy} def plot_confusion_matrix(confusion_mat: np.ndarray) -> plt.Figure: diff --git a/phishing-detection/phishing_detection/preprocess.py b/phishing-detection/phishing_detection/preprocess.py index d9940a1..beda4a4 100644 --- a/phishing-detection/phishing_detection/preprocess.py +++ b/phishing-detection/phishing_detection/preprocess.py @@ -1,3 +1,8 @@ +""" +Provides functions to preprocess data. + +""" + from sklearn.preprocessing import LabelEncoder #from sklearn.metrics import classification_report, confusion_matrix from keras._tf_keras.keras.preprocessing.text import Tokenizer @@ -12,7 +17,8 @@ def preprocess_data(raw_X_train: list[str], raw_y_train: list[str], raw_X_val: list[str], raw_y_val: list[str], raw_X_test: list[str], raw_y_test: list[str], sequence_length: int = 200 - ) -> tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray, np.ndarray, np.ndarray, dict[str, int]]: + ) -> tuple[np.ndarray, np.ndarray, np.ndarray, + np.ndarray, np.ndarray, np.ndarray, dict[str, int]]: """ Preprocess the data for training the model. diff --git a/phishing-detection/phishing_detection/run.py b/phishing-detection/phishing_detection/run.py index 0ee6d7c..9eabf50 100644 --- a/phishing-detection/phishing_detection/run.py +++ b/phishing-detection/phishing_detection/run.py @@ -1,27 +1,14 @@ """ -phishing_detection_script.py - This script performs phishing detection using a machine learning model. It loads data, preprocesses it, builds a model, trains the model, evaluates its performance, and plots a confusion matrix. -Dependencies: - - os - - yaml - - phishing_detection.train.train - - phishing_detection.get_data.load_data - - phishing_detection.model_definition.build_model - - phishing_detection.predict.evaluate_results - - phishing_detection.predict.plot_confusion_matrix - - phishing_detection.predict.predict_classes - - phishing_detection.preprocess.preprocess_data - Usage: Ensure that the parameters are specified in the 'params.yaml' file located in the 'phishing-detection/phishing_detection' directory. Then run this script. Example: - python phishing_detection_script.py + python phishing-detection/phishing_detection/run.py """ import os @@ -36,7 +23,7 @@ def run(params: dict) -> None: """ - Runs the model. + Runs the model with the given parameters. Parameters: params (dict): A dictionary containing parameters for the model training and evaluation. @@ -69,6 +56,7 @@ def run(params: dict) -> None: plot_confusion_matrix(evaluation_results['confusion_matrix']) # TODO save fig? if __name__ == "__main__": - parameters = yaml.safe_load( - open(os.path.join("phishing-detection", "phishing_detection", "params.yaml"))) + path = os.path.join("phishing-detection", "phishing_detection", "params.yaml") + with open(path , encoding="UTF-8") as file: + parameters = yaml.safe_load(file) run(parameters) diff --git a/phishing-detection/phishing_detection/train.py b/phishing-detection/phishing_detection/train.py index bebc8c3..00bd04a 100644 --- a/phishing-detection/phishing_detection/train.py +++ b/phishing-detection/phishing_detection/train.py @@ -1,8 +1,14 @@ +""" +Provides functions for training a model. + +""" + from keras._tf_keras.keras import Model from keras._tf_keras.keras.callbacks import History import numpy as np -def train(model: Model, X_train: np.array, y_train: np.array, X_val: np.array, y_val: np.array, params: dict) -> History: +def train(model: Model, X_train: np.array, y_train: np.array, + X_val: np.array, y_val: np.array, params: dict) -> History: """ Train the model. @@ -27,5 +33,5 @@ def train(model: Model, X_train: np.array, y_train: np.array, X_val: np.array, y shuffle=True, validation_data=(X_val, y_val) ) - + return hist diff --git a/phishing-detection/poetry.lock b/phishing-detection/poetry.lock index f675a07..62a3aee 100644 --- a/phishing-detection/poetry.lock +++ b/phishing-detection/poetry.lock @@ -194,18 +194,42 @@ tests-no-zope = ["attrs[tests-mypy]", "cloudpickle", "hypothesis", "pympler", "p [[package]] name = "babel" -version = "2.14.0" +version = "2.15.0" description = "Internationalization utilities" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "Babel-2.14.0-py3-none-any.whl", hash = "sha256:efb1a25b7118e67ce3a259bed20545c29cb68be8ad2c784c83689981b7a57287"}, - {file = "Babel-2.14.0.tar.gz", hash = "sha256:6919867db036398ba21eb5c7a0f6b28ab8cbc3ae7a73a44ebe34ae74a4e7d363"}, + {file = "Babel-2.15.0-py3-none-any.whl", hash = "sha256:08706bdad8d0a3413266ab61bd6c34d0c28d6e1e7badf40a2cebe67644e2e1fb"}, + {file = "babel-2.15.0.tar.gz", hash = "sha256:8daf0e265d05768bc6c7a314cf1321e9a123afc328cc635c18622a2f30a04413"}, ] [package.extras] dev = ["freezegun (>=1.0,<2.0)", "pytest (>=6.0)", "pytest-cov"] +[[package]] +name = "bandit" +version = "1.7.8" +description = "Security oriented static analyser for python code." +optional = false +python-versions = ">=3.8" +files = [ + {file = "bandit-1.7.8-py3-none-any.whl", hash = "sha256:509f7af645bc0cd8fd4587abc1a038fc795636671ee8204d502b933aee44f381"}, + {file = "bandit-1.7.8.tar.gz", hash = "sha256:36de50f720856ab24a24dbaa5fee2c66050ed97c1477e0a1159deab1775eab6b"}, +] + +[package.dependencies] +colorama = {version = ">=0.3.9", markers = "platform_system == \"Windows\""} +PyYAML = ">=5.3.1" +rich = "*" +stevedore = ">=1.20.0" + +[package.extras] +baseline = ["GitPython (>=3.1.30)"] +sarif = ["jschema-to-python (>=1.2.3)", "sarif-om (>=1.0.4)"] +test = ["beautifulsoup4 (>=4.8.0)", "coverage (>=4.5.4)", "fixtures (>=3.0.0)", "flake8 (>=4.0.0)", "pylint (==1.9.4)", "stestr (>=2.5.0)", "testscenarios (>=0.5.0)", "testtools (>=2.3.0)"] +toml = ["tomli (>=1.1.0)"] +yaml = ["PyYAML"] + [[package]] name = "beautifulsoup4" version = "4.12.3" @@ -710,13 +734,13 @@ files = [ [[package]] name = "gast" -version = "0.4.0" +version = "0.5.4" description = "Python AST that abstracts the underlying Python version" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ - {file = "gast-0.4.0-py3-none-any.whl", hash = "sha256:b7adcdd5adbebf1adf17378da5ba3f543684dbec47b1cda1f3997e573cd542c4"}, - {file = "gast-0.4.0.tar.gz", hash = "sha256:40feb7b8b8434785585ab224d1568b857edb18297e5a3047f1ba012bc83b42c1"}, + {file = "gast-0.5.4-py3-none-any.whl", hash = "sha256:6fc4fa5fa10b72fb8aab4ae58bcb023058386e67b6fa2e3e34cec5c769360316"}, + {file = "gast-0.5.4.tar.gz", hash = "sha256:9c270fe5f4b130969b54174de7db4e764b09b4f7f67ccfc32480e29f78348d97"}, ] [[package]] @@ -927,13 +951,13 @@ test = ["flaky", "ipyparallel", "pre-commit", "pytest (>=7.0)", "pytest-asyncio [[package]] name = "ipython" -version = "8.23.0" +version = "8.24.0" description = "IPython: Productive Interactive Computing" optional = false python-versions = ">=3.10" files = [ - {file = "ipython-8.23.0-py3-none-any.whl", hash = "sha256:07232af52a5ba146dc3372c7bf52a0f890a23edf38d77caef8d53f9cdc2584c1"}, - {file = "ipython-8.23.0.tar.gz", hash = "sha256:7468edaf4f6de3e1b912e57f66c241e6fd3c7099f2ec2136e239e142e800274d"}, + {file = "ipython-8.24.0-py3-none-any.whl", hash = "sha256:d7bf2f6c4314984e3e02393213bab8703cf163ede39672ce5918c51fe253a2a3"}, + {file = "ipython-8.24.0.tar.gz", hash = "sha256:010db3f8a728a578bb641fdd06c063b9fb8e96a9464c63aec6310fbcb5e80501"}, ] [package.dependencies] @@ -946,7 +970,7 @@ prompt-toolkit = ">=3.0.41,<3.1.0" pygments = ">=2.4.0" stack-data = "*" traitlets = ">=5.13.0" -typing-extensions = {version = "*", markers = "python_version < \"3.12\""} +typing-extensions = {version = ">=4.6", markers = "python_version < \"3.12\""} [package.extras] all = ["ipython[black,doc,kernel,matplotlib,nbconvert,nbformat,notebook,parallel,qtconsole]", "ipython[test,test-extra]"] @@ -959,7 +983,7 @@ nbformat = ["nbformat"] notebook = ["ipywidgets", "notebook"] parallel = ["ipyparallel"] qtconsole = ["qtconsole"] -test = ["pickleshare", "pytest (<8)", "pytest-asyncio (<0.22)", "testpath"] +test = ["pickleshare", "pytest", "pytest-asyncio (<0.22)", "testpath"] test-extra = ["curio", "ipython[test]", "matplotlib (!=3.2.0)", "nbformat", "numpy (>=1.23)", "pandas", "trio"] [[package]] @@ -2150,6 +2174,17 @@ files = [ qa = ["flake8 (==5.0.4)", "mypy (==0.971)", "types-setuptools (==67.2.0.1)"] testing = ["docopt", "pytest"] +[[package]] +name = "pbr" +version = "6.0.0" +description = "Python Build Reasonableness" +optional = false +python-versions = ">=2.6" +files = [ + {file = "pbr-6.0.0-py2.py3-none-any.whl", hash = "sha256:4a7317d5e3b17a3dccb6a8cfe67dab65b20551404c52c8ed41279fa4f0cb4cda"}, + {file = "pbr-6.0.0.tar.gz", hash = "sha256:d1377122a5a00e2f940ee482999518efe16d745d423a670c27773dfbc3c9a7d9"}, +] + [[package]] name = "pexpect" version = "4.9.0" @@ -2380,17 +2415,16 @@ files = [ [[package]] name = "pygments" -version = "2.17.2" +version = "2.18.0" description = "Pygments is a syntax highlighting package written in Python." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "pygments-2.17.2-py3-none-any.whl", hash = "sha256:b27c2826c47d0f3219f29554824c30c5e8945175d888647acd804ddd04af846c"}, - {file = "pygments-2.17.2.tar.gz", hash = "sha256:da46cec9fd2de5be3a8a784f434e4c4ab670b4ff54d605c4c2717e9d49c4c367"}, + {file = "pygments-2.18.0-py3-none-any.whl", hash = "sha256:b8e6aca0523f3ab76fee51799c488e38782ac06eafcf95e7ba832985c8e7b13a"}, + {file = "pygments-2.18.0.tar.gz", hash = "sha256:786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199"}, ] [package.extras] -plugins = ["importlib-metadata"] windows-terminal = ["colorama (>=0.4.6)"] [[package]] @@ -2667,13 +2701,13 @@ cffi = {version = "*", markers = "implementation_name == \"pypy\""} [[package]] name = "qtconsole" -version = "5.5.1" +version = "5.5.2" description = "Jupyter Qt console" optional = false -python-versions = ">= 3.8" +python-versions = ">=3.8" files = [ - {file = "qtconsole-5.5.1-py3-none-any.whl", hash = "sha256:8c75fa3e9b4ed884880ff7cea90a1b67451219279ec33deaee1d59e3df1a5d2b"}, - {file = "qtconsole-5.5.1.tar.gz", hash = "sha256:a0e806c6951db9490628e4df80caec9669b65149c7ba40f9bf033c025a5b56bc"}, + {file = "qtconsole-5.5.2-py3-none-any.whl", hash = "sha256:42d745f3d05d36240244a04e1e1ec2a86d5d9b6edb16dbdef582ccb629e87e0b"}, + {file = "qtconsole-5.5.2.tar.gz", hash = "sha256:6b5fb11274b297463706af84dcbbd5c92273b1f619e6d25d08874b0a88516989"}, ] [package.dependencies] @@ -3083,6 +3117,20 @@ pure-eval = "*" [package.extras] tests = ["cython", "littleutils", "pygments", "pytest", "typeguard"] +[[package]] +name = "stevedore" +version = "5.2.0" +description = "Manage dynamic plugins for Python applications" +optional = false +python-versions = ">=3.8" +files = [ + {file = "stevedore-5.2.0-py3-none-any.whl", hash = "sha256:1c15d95766ca0569cad14cb6272d4d31dae66b011a929d7c18219c176ea1b5c9"}, + {file = "stevedore-5.2.0.tar.gz", hash = "sha256:46b93ca40e1114cea93d738a6c1e365396981bb6bb78c27045b7587c9473544d"}, +] + +[package.dependencies] +pbr = ">=2.0.0,<2.1.0 || >2.1.0" + [[package]] name = "tensorboard" version = "2.16.2" @@ -3330,13 +3378,13 @@ files = [ [[package]] name = "typing-extensions" -version = "4.5.0" -description = "Backported and Experimental Type Hints for Python 3.7+" +version = "4.11.0" +description = "Backported and Experimental Type Hints for Python 3.8+" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "typing_extensions-4.5.0-py3-none-any.whl", hash = "sha256:fb33085c39dd998ac16d1431ebc293a8b3eedd00fd4a32de0ff79002c19511b4"}, - {file = "typing_extensions-4.5.0.tar.gz", hash = "sha256:5cb5f4a79139d699607b3ef622a1dedafa84e115ab0024e0d9c044a9479ca7cb"}, + {file = "typing_extensions-4.11.0-py3-none-any.whl", hash = "sha256:c1f94d72897edaf4ce775bb7558d5b79d8126906a14ea5ed1635921406c0387a"}, + {file = "typing_extensions-4.11.0.tar.gz", hash = "sha256:83f085bd5ca59c80295fc2a82ab5dac679cbe02b9f33f7d83af68e241bea51b0"}, ] [[package]] @@ -3478,88 +3526,84 @@ files = [ [[package]] name = "wrapt" -version = "1.14.1" +version = "1.16.0" description = "Module for decorators, wrappers and monkey patching." optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" -files = [ - {file = "wrapt-1.14.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:1b376b3f4896e7930f1f772ac4b064ac12598d1c38d04907e696cc4d794b43d3"}, - {file = "wrapt-1.14.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:903500616422a40a98a5a3c4ff4ed9d0066f3b4c951fa286018ecdf0750194ef"}, - {file = "wrapt-1.14.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:5a9a0d155deafd9448baff28c08e150d9b24ff010e899311ddd63c45c2445e28"}, - {file = "wrapt-1.14.1-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:ddaea91abf8b0d13443f6dac52e89051a5063c7d014710dcb4d4abb2ff811a59"}, - {file = "wrapt-1.14.1-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:36f582d0c6bc99d5f39cd3ac2a9062e57f3cf606ade29a0a0d6b323462f4dd87"}, - {file = "wrapt-1.14.1-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:7ef58fb89674095bfc57c4069e95d7a31cfdc0939e2a579882ac7d55aadfd2a1"}, - {file = "wrapt-1.14.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:e2f83e18fe2f4c9e7db597e988f72712c0c3676d337d8b101f6758107c42425b"}, - {file = "wrapt-1.14.1-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:ee2b1b1769f6707a8a445162ea16dddf74285c3964f605877a20e38545c3c462"}, - {file = "wrapt-1.14.1-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:833b58d5d0b7e5b9832869f039203389ac7cbf01765639c7309fd50ef619e0b1"}, - {file = "wrapt-1.14.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:80bb5c256f1415f747011dc3604b59bc1f91c6e7150bd7db03b19170ee06b320"}, - {file = "wrapt-1.14.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:07f7a7d0f388028b2df1d916e94bbb40624c59b48ecc6cbc232546706fac74c2"}, - {file = "wrapt-1.14.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:02b41b633c6261feff8ddd8d11c711df6842aba629fdd3da10249a53211a72c4"}, - {file = "wrapt-1.14.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2fe803deacd09a233e4762a1adcea5db5d31e6be577a43352936179d14d90069"}, - {file = "wrapt-1.14.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:257fd78c513e0fb5cdbe058c27a0624c9884e735bbd131935fd49e9fe719d310"}, - {file = "wrapt-1.14.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:4fcc4649dc762cddacd193e6b55bc02edca674067f5f98166d7713b193932b7f"}, - {file = "wrapt-1.14.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:11871514607b15cfeb87c547a49bca19fde402f32e2b1c24a632506c0a756656"}, - {file = "wrapt-1.14.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:8ad85f7f4e20964db4daadcab70b47ab05c7c1cf2a7c1e51087bfaa83831854c"}, - {file = "wrapt-1.14.1-cp310-cp310-win32.whl", hash = "sha256:a9a52172be0b5aae932bef82a79ec0a0ce87288c7d132946d645eba03f0ad8a8"}, - {file = "wrapt-1.14.1-cp310-cp310-win_amd64.whl", hash = "sha256:6d323e1554b3d22cfc03cd3243b5bb815a51f5249fdcbb86fda4bf62bab9e164"}, - {file = "wrapt-1.14.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ecee4132c6cd2ce5308e21672015ddfed1ff975ad0ac8d27168ea82e71413f55"}, - {file = "wrapt-1.14.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2020f391008ef874c6d9e208b24f28e31bcb85ccff4f335f15a3251d222b92d9"}, - {file = "wrapt-1.14.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2feecf86e1f7a86517cab34ae6c2f081fd2d0dac860cb0c0ded96d799d20b335"}, - {file = "wrapt-1.14.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:240b1686f38ae665d1b15475966fe0472f78e71b1b4903c143a842659c8e4cb9"}, - {file = "wrapt-1.14.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a9008dad07d71f68487c91e96579c8567c98ca4c3881b9b113bc7b33e9fd78b8"}, - {file = "wrapt-1.14.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:6447e9f3ba72f8e2b985a1da758767698efa72723d5b59accefd716e9e8272bf"}, - {file = "wrapt-1.14.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:acae32e13a4153809db37405f5eba5bac5fbe2e2ba61ab227926a22901051c0a"}, - {file = "wrapt-1.14.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:49ef582b7a1152ae2766557f0550a9fcbf7bbd76f43fbdc94dd3bf07cc7168be"}, - {file = "wrapt-1.14.1-cp311-cp311-win32.whl", hash = "sha256:358fe87cc899c6bb0ddc185bf3dbfa4ba646f05b1b0b9b5a27c2cb92c2cea204"}, - {file = "wrapt-1.14.1-cp311-cp311-win_amd64.whl", hash = "sha256:26046cd03936ae745a502abf44dac702a5e6880b2b01c29aea8ddf3353b68224"}, - {file = "wrapt-1.14.1-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:43ca3bbbe97af00f49efb06e352eae40434ca9d915906f77def219b88e85d907"}, - {file = "wrapt-1.14.1-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:6b1a564e6cb69922c7fe3a678b9f9a3c54e72b469875aa8018f18b4d1dd1adf3"}, - {file = "wrapt-1.14.1-cp35-cp35m-manylinux2010_i686.whl", hash = "sha256:00b6d4ea20a906c0ca56d84f93065b398ab74b927a7a3dbd470f6fc503f95dc3"}, - {file = "wrapt-1.14.1-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:a85d2b46be66a71bedde836d9e41859879cc54a2a04fad1191eb50c2066f6e9d"}, - {file = "wrapt-1.14.1-cp35-cp35m-win32.whl", hash = "sha256:dbcda74c67263139358f4d188ae5faae95c30929281bc6866d00573783c422b7"}, - {file = "wrapt-1.14.1-cp35-cp35m-win_amd64.whl", hash = "sha256:b21bb4c09ffabfa0e85e3a6b623e19b80e7acd709b9f91452b8297ace2a8ab00"}, - {file = "wrapt-1.14.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:9e0fd32e0148dd5dea6af5fee42beb949098564cc23211a88d799e434255a1f4"}, - {file = "wrapt-1.14.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9736af4641846491aedb3c3f56b9bc5568d92b0692303b5a305301a95dfd38b1"}, - {file = "wrapt-1.14.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5b02d65b9ccf0ef6c34cba6cf5bf2aab1bb2f49c6090bafeecc9cd81ad4ea1c1"}, - {file = "wrapt-1.14.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:21ac0156c4b089b330b7666db40feee30a5d52634cc4560e1905d6529a3897ff"}, - {file = "wrapt-1.14.1-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:9f3e6f9e05148ff90002b884fbc2a86bd303ae847e472f44ecc06c2cd2fcdb2d"}, - {file = "wrapt-1.14.1-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:6e743de5e9c3d1b7185870f480587b75b1cb604832e380d64f9504a0535912d1"}, - {file = "wrapt-1.14.1-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:d79d7d5dc8a32b7093e81e97dad755127ff77bcc899e845f41bf71747af0c569"}, - {file = "wrapt-1.14.1-cp36-cp36m-win32.whl", hash = "sha256:81b19725065dcb43df02b37e03278c011a09e49757287dca60c5aecdd5a0b8ed"}, - {file = "wrapt-1.14.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b014c23646a467558be7da3d6b9fa409b2c567d2110599b7cf9a0c5992b3b471"}, - {file = "wrapt-1.14.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:88bd7b6bd70a5b6803c1abf6bca012f7ed963e58c68d76ee20b9d751c74a3248"}, - {file = "wrapt-1.14.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b5901a312f4d14c59918c221323068fad0540e34324925c8475263841dbdfe68"}, - {file = "wrapt-1.14.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d77c85fedff92cf788face9bfa3ebaa364448ebb1d765302e9af11bf449ca36d"}, - {file = "wrapt-1.14.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8d649d616e5c6a678b26d15ece345354f7c2286acd6db868e65fcc5ff7c24a77"}, - {file = "wrapt-1.14.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:7d2872609603cb35ca513d7404a94d6d608fc13211563571117046c9d2bcc3d7"}, - {file = "wrapt-1.14.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:ee6acae74a2b91865910eef5e7de37dc6895ad96fa23603d1d27ea69df545015"}, - {file = "wrapt-1.14.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:2b39d38039a1fdad98c87279b48bc5dce2c0ca0d73483b12cb72aa9609278e8a"}, - {file = "wrapt-1.14.1-cp37-cp37m-win32.whl", hash = "sha256:60db23fa423575eeb65ea430cee741acb7c26a1365d103f7b0f6ec412b893853"}, - {file = "wrapt-1.14.1-cp37-cp37m-win_amd64.whl", hash = "sha256:709fe01086a55cf79d20f741f39325018f4df051ef39fe921b1ebe780a66184c"}, - {file = "wrapt-1.14.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8c0ce1e99116d5ab21355d8ebe53d9460366704ea38ae4d9f6933188f327b456"}, - {file = "wrapt-1.14.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:e3fb1677c720409d5f671e39bac6c9e0e422584e5f518bfd50aa4cbbea02433f"}, - {file = "wrapt-1.14.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:642c2e7a804fcf18c222e1060df25fc210b9c58db7c91416fb055897fc27e8cc"}, - {file = "wrapt-1.14.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7b7c050ae976e286906dd3f26009e117eb000fb2cf3533398c5ad9ccc86867b1"}, - {file = "wrapt-1.14.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ef3f72c9666bba2bab70d2a8b79f2c6d2c1a42a7f7e2b0ec83bb2f9e383950af"}, - {file = "wrapt-1.14.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:01c205616a89d09827986bc4e859bcabd64f5a0662a7fe95e0d359424e0e071b"}, - {file = "wrapt-1.14.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:5a0f54ce2c092aaf439813735584b9537cad479575a09892b8352fea5e988dc0"}, - {file = "wrapt-1.14.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:2cf71233a0ed05ccdabe209c606fe0bac7379fdcf687f39b944420d2a09fdb57"}, - {file = "wrapt-1.14.1-cp38-cp38-win32.whl", hash = "sha256:aa31fdcc33fef9eb2552cbcbfee7773d5a6792c137b359e82879c101e98584c5"}, - {file = "wrapt-1.14.1-cp38-cp38-win_amd64.whl", hash = "sha256:d1967f46ea8f2db647c786e78d8cc7e4313dbd1b0aca360592d8027b8508e24d"}, - {file = "wrapt-1.14.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3232822c7d98d23895ccc443bbdf57c7412c5a65996c30442ebe6ed3df335383"}, - {file = "wrapt-1.14.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:988635d122aaf2bdcef9e795435662bcd65b02f4f4c1ae37fbee7401c440b3a7"}, - {file = "wrapt-1.14.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9cca3c2cdadb362116235fdbd411735de4328c61425b0aa9f872fd76d02c4e86"}, - {file = "wrapt-1.14.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d52a25136894c63de15a35bc0bdc5adb4b0e173b9c0d07a2be9d3ca64a332735"}, - {file = "wrapt-1.14.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:40e7bc81c9e2b2734ea4bc1aceb8a8f0ceaac7c5299bc5d69e37c44d9081d43b"}, - {file = "wrapt-1.14.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b9b7a708dd92306328117d8c4b62e2194d00c365f18eff11a9b53c6f923b01e3"}, - {file = "wrapt-1.14.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:6a9a25751acb379b466ff6be78a315e2b439d4c94c1e99cb7266d40a537995d3"}, - {file = "wrapt-1.14.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:34aa51c45f28ba7f12accd624225e2b1e5a3a45206aa191f6f9aac931d9d56fe"}, - {file = "wrapt-1.14.1-cp39-cp39-win32.whl", hash = "sha256:dee0ce50c6a2dd9056c20db781e9c1cfd33e77d2d569f5d1d9321c641bb903d5"}, - {file = "wrapt-1.14.1-cp39-cp39-win_amd64.whl", hash = "sha256:dee60e1de1898bde3b238f18340eec6148986da0455d8ba7848d50470a7a32fb"}, - {file = "wrapt-1.14.1.tar.gz", hash = "sha256:380a85cf89e0e69b7cfbe2ea9f765f004ff419f34194018a6827ac0e3edfed4d"}, +python-versions = ">=3.6" +files = [ + {file = "wrapt-1.16.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ffa565331890b90056c01db69c0fe634a776f8019c143a5ae265f9c6bc4bd6d4"}, + {file = "wrapt-1.16.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e4fdb9275308292e880dcbeb12546df7f3e0f96c6b41197e0cf37d2826359020"}, + {file = "wrapt-1.16.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bb2dee3874a500de01c93d5c71415fcaef1d858370d405824783e7a8ef5db440"}, + {file = "wrapt-1.16.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2a88e6010048489cda82b1326889ec075a8c856c2e6a256072b28eaee3ccf487"}, + {file = "wrapt-1.16.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ac83a914ebaf589b69f7d0a1277602ff494e21f4c2f743313414378f8f50a4cf"}, + {file = "wrapt-1.16.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:73aa7d98215d39b8455f103de64391cb79dfcad601701a3aa0dddacf74911d72"}, + {file = "wrapt-1.16.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:807cc8543a477ab7422f1120a217054f958a66ef7314f76dd9e77d3f02cdccd0"}, + {file = "wrapt-1.16.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:bf5703fdeb350e36885f2875d853ce13172ae281c56e509f4e6eca049bdfb136"}, + {file = "wrapt-1.16.0-cp310-cp310-win32.whl", hash = "sha256:f6b2d0c6703c988d334f297aa5df18c45e97b0af3679bb75059e0e0bd8b1069d"}, + {file = "wrapt-1.16.0-cp310-cp310-win_amd64.whl", hash = "sha256:decbfa2f618fa8ed81c95ee18a387ff973143c656ef800c9f24fb7e9c16054e2"}, + {file = "wrapt-1.16.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1a5db485fe2de4403f13fafdc231b0dbae5eca4359232d2efc79025527375b09"}, + {file = "wrapt-1.16.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:75ea7d0ee2a15733684badb16de6794894ed9c55aa5e9903260922f0482e687d"}, + {file = "wrapt-1.16.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a452f9ca3e3267cd4d0fcf2edd0d035b1934ac2bd7e0e57ac91ad6b95c0c6389"}, + {file = "wrapt-1.16.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:43aa59eadec7890d9958748db829df269f0368521ba6dc68cc172d5d03ed8060"}, + {file = "wrapt-1.16.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:72554a23c78a8e7aa02abbd699d129eead8b147a23c56e08d08dfc29cfdddca1"}, + {file = "wrapt-1.16.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:d2efee35b4b0a347e0d99d28e884dfd82797852d62fcd7ebdeee26f3ceb72cf3"}, + {file = "wrapt-1.16.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:6dcfcffe73710be01d90cae08c3e548d90932d37b39ef83969ae135d36ef3956"}, + {file = "wrapt-1.16.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:eb6e651000a19c96f452c85132811d25e9264d836951022d6e81df2fff38337d"}, + {file = "wrapt-1.16.0-cp311-cp311-win32.whl", hash = "sha256:66027d667efe95cc4fa945af59f92c5a02c6f5bb6012bff9e60542c74c75c362"}, + {file = "wrapt-1.16.0-cp311-cp311-win_amd64.whl", hash = "sha256:aefbc4cb0a54f91af643660a0a150ce2c090d3652cf4052a5397fb2de549cd89"}, + {file = "wrapt-1.16.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:5eb404d89131ec9b4f748fa5cfb5346802e5ee8836f57d516576e61f304f3b7b"}, + {file = "wrapt-1.16.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:9090c9e676d5236a6948330e83cb89969f433b1943a558968f659ead07cb3b36"}, + {file = "wrapt-1.16.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:94265b00870aa407bd0cbcfd536f17ecde43b94fb8d228560a1e9d3041462d73"}, + {file = "wrapt-1.16.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f2058f813d4f2b5e3a9eb2eb3faf8f1d99b81c3e51aeda4b168406443e8ba809"}, + {file = "wrapt-1.16.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:98b5e1f498a8ca1858a1cdbffb023bfd954da4e3fa2c0cb5853d40014557248b"}, + {file = "wrapt-1.16.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:14d7dc606219cdd7405133c713f2c218d4252f2a469003f8c46bb92d5d095d81"}, + {file = "wrapt-1.16.0-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:49aac49dc4782cb04f58986e81ea0b4768e4ff197b57324dcbd7699c5dfb40b9"}, + {file = "wrapt-1.16.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:418abb18146475c310d7a6dc71143d6f7adec5b004ac9ce08dc7a34e2babdc5c"}, + {file = "wrapt-1.16.0-cp312-cp312-win32.whl", hash = "sha256:685f568fa5e627e93f3b52fda002c7ed2fa1800b50ce51f6ed1d572d8ab3e7fc"}, + {file = "wrapt-1.16.0-cp312-cp312-win_amd64.whl", hash = "sha256:dcdba5c86e368442528f7060039eda390cc4091bfd1dca41e8046af7c910dda8"}, + {file = "wrapt-1.16.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:d462f28826f4657968ae51d2181a074dfe03c200d6131690b7d65d55b0f360f8"}, + {file = "wrapt-1.16.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a33a747400b94b6d6b8a165e4480264a64a78c8a4c734b62136062e9a248dd39"}, + {file = "wrapt-1.16.0-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b3646eefa23daeba62643a58aac816945cadc0afaf21800a1421eeba5f6cfb9c"}, + {file = "wrapt-1.16.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ebf019be5c09d400cf7b024aa52b1f3aeebeff51550d007e92c3c1c4afc2a40"}, + {file = "wrapt-1.16.0-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:0d2691979e93d06a95a26257adb7bfd0c93818e89b1406f5a28f36e0d8c1e1fc"}, + {file = "wrapt-1.16.0-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:1acd723ee2a8826f3d53910255643e33673e1d11db84ce5880675954183ec47e"}, + {file = "wrapt-1.16.0-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:bc57efac2da352a51cc4658878a68d2b1b67dbe9d33c36cb826ca449d80a8465"}, + {file = "wrapt-1.16.0-cp36-cp36m-win32.whl", hash = "sha256:da4813f751142436b075ed7aa012a8778aa43a99f7b36afe9b742d3ed8bdc95e"}, + {file = "wrapt-1.16.0-cp36-cp36m-win_amd64.whl", hash = "sha256:6f6eac2360f2d543cc875a0e5efd413b6cbd483cb3ad7ebf888884a6e0d2e966"}, + {file = "wrapt-1.16.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:a0ea261ce52b5952bf669684a251a66df239ec6d441ccb59ec7afa882265d593"}, + {file = "wrapt-1.16.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7bd2d7ff69a2cac767fbf7a2b206add2e9a210e57947dd7ce03e25d03d2de292"}, + {file = "wrapt-1.16.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9159485323798c8dc530a224bd3ffcf76659319ccc7bbd52e01e73bd0241a0c5"}, + {file = "wrapt-1.16.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a86373cf37cd7764f2201b76496aba58a52e76dedfaa698ef9e9688bfd9e41cf"}, + {file = "wrapt-1.16.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:73870c364c11f03ed072dda68ff7aea6d2a3a5c3fe250d917a429c7432e15228"}, + {file = "wrapt-1.16.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:b935ae30c6e7400022b50f8d359c03ed233d45b725cfdd299462f41ee5ffba6f"}, + {file = "wrapt-1.16.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:db98ad84a55eb09b3c32a96c576476777e87c520a34e2519d3e59c44710c002c"}, + {file = "wrapt-1.16.0-cp37-cp37m-win32.whl", hash = "sha256:9153ed35fc5e4fa3b2fe97bddaa7cbec0ed22412b85bcdaf54aeba92ea37428c"}, + {file = "wrapt-1.16.0-cp37-cp37m-win_amd64.whl", hash = "sha256:66dfbaa7cfa3eb707bbfcd46dab2bc6207b005cbc9caa2199bcbc81d95071a00"}, + {file = "wrapt-1.16.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1dd50a2696ff89f57bd8847647a1c363b687d3d796dc30d4dd4a9d1689a706f0"}, + {file = "wrapt-1.16.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:44a2754372e32ab315734c6c73b24351d06e77ffff6ae27d2ecf14cf3d229202"}, + {file = "wrapt-1.16.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e9723528b9f787dc59168369e42ae1c3b0d3fadb2f1a71de14531d321ee05b0"}, + {file = "wrapt-1.16.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:dbed418ba5c3dce92619656802cc5355cb679e58d0d89b50f116e4a9d5a9603e"}, + {file = "wrapt-1.16.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:941988b89b4fd6b41c3f0bfb20e92bd23746579736b7343283297c4c8cbae68f"}, + {file = "wrapt-1.16.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:6a42cd0cfa8ffc1915aef79cb4284f6383d8a3e9dcca70c445dcfdd639d51267"}, + {file = "wrapt-1.16.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:1ca9b6085e4f866bd584fb135a041bfc32cab916e69f714a7d1d397f8c4891ca"}, + {file = "wrapt-1.16.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:d5e49454f19ef621089e204f862388d29e6e8d8b162efce05208913dde5b9ad6"}, + {file = "wrapt-1.16.0-cp38-cp38-win32.whl", hash = "sha256:c31f72b1b6624c9d863fc095da460802f43a7c6868c5dda140f51da24fd47d7b"}, + {file = "wrapt-1.16.0-cp38-cp38-win_amd64.whl", hash = "sha256:490b0ee15c1a55be9c1bd8609b8cecd60e325f0575fc98f50058eae366e01f41"}, + {file = "wrapt-1.16.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9b201ae332c3637a42f02d1045e1d0cccfdc41f1f2f801dafbaa7e9b4797bfc2"}, + {file = "wrapt-1.16.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:2076fad65c6736184e77d7d4729b63a6d1ae0b70da4868adeec40989858eb3fb"}, + {file = "wrapt-1.16.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c5cd603b575ebceca7da5a3a251e69561bec509e0b46e4993e1cac402b7247b8"}, + {file = "wrapt-1.16.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b47cfad9e9bbbed2339081f4e346c93ecd7ab504299403320bf85f7f85c7d46c"}, + {file = "wrapt-1.16.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f8212564d49c50eb4565e502814f694e240c55551a5f1bc841d4fcaabb0a9b8a"}, + {file = "wrapt-1.16.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:5f15814a33e42b04e3de432e573aa557f9f0f56458745c2074952f564c50e664"}, + {file = "wrapt-1.16.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:db2e408d983b0e61e238cf579c09ef7020560441906ca990fe8412153e3b291f"}, + {file = "wrapt-1.16.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:edfad1d29c73f9b863ebe7082ae9321374ccb10879eeabc84ba3b69f2579d537"}, + {file = "wrapt-1.16.0-cp39-cp39-win32.whl", hash = "sha256:ed867c42c268f876097248e05b6117a65bcd1e63b779e916fe2e33cd6fd0d3c3"}, + {file = "wrapt-1.16.0-cp39-cp39-win_amd64.whl", hash = "sha256:eb1b046be06b0fce7249f1d025cd359b4b80fc1c3e24ad9eca33e0dcdb2e4a35"}, + {file = "wrapt-1.16.0-py3-none-any.whl", hash = "sha256:6906c4100a8fcbf2fa735f6059214bb13b97f75b1a61777fcf6432121ef12ef1"}, + {file = "wrapt-1.16.0.tar.gz", hash = "sha256:5f370f952971e7d17c7d1ead40e49f32345a7f7a5373571ef44d800d06b1899d"}, ] [metadata] lock-version = "2.0" python-versions = ">=3.11,<3.12" -content-hash = "93885694645d43494c8ada2af52fdd556b4b0e2f1561a43e49d24923df6c7076" +content-hash = "d5d1fb15a94b534fdb4833bf45463e71667baf7b68b84ead8682de63be5764d5" diff --git a/phishing-detection/pylintrc b/phishing-detection/pylintrc index ffd958b..a1d2678 100644 --- a/phishing-detection/pylintrc +++ b/phishing-detection/pylintrc @@ -508,7 +508,7 @@ exclude-too-few-public-methods= ignored-parents= # Maximum number of arguments for function / method. -max-args=5 +max-args=10 # Maximum number of attributes for a class (see R0902). max-attributes=7 @@ -520,7 +520,7 @@ max-bool-expr=5 max-branches=12 # Maximum number of locals for function / method body. -max-locals=15 +max-locals=20 # Maximum number of parents for a class (see R0901). max-parents=7 @@ -583,5 +583,5 @@ preferred-modules= # Exceptions that will emit a warning when being caught. Defaults to # "BaseException, Exception". -overgeneral-exceptions=BaseException, - Exception +overgeneral-exceptions=builtins.BaseException, + builtins.Exception diff --git a/phishing-detection/pyproject.toml b/phishing-detection/pyproject.toml index 94c7152..1419950 100644 --- a/phishing-detection/pyproject.toml +++ b/phishing-detection/pyproject.toml @@ -16,7 +16,8 @@ numpy = "1.26.4" pandas = "2.2.2" seaborn ="0.13.2" jupyter = "1.0.0" -pylint = "^3.1.0" +pylint = "3.1.0" +bandit = "1.7.8" [build-system] requires = ["poetry-core"] From 626bad6de2fdfc15a1ad6e5da5d744c83c4f7207 Mon Sep 17 00:00:00 2001 From: MichaelChan20 Date: Mon, 6 May 2024 00:13:46 +0200 Subject: [PATCH 08/17] Fixed checkstyle issues and pylint configuration. TODO warnings are now suppressed in pylint (for now) --- README.md | 10 ++++-- .../phishing_detection/get_data.py | 27 ++++++++++----- .../phishing_detection/model_definition.py | 21 ++++++++---- .../phishing_detection/predict.py | 23 ++++++++----- .../phishing_detection/preprocess.py | 17 ++++++---- phishing-detection/phishing_detection/run.py | 12 ++++--- .../phishing_detection/train.py | 34 +++++++++++-------- .../phishing_detection/utils.py | 16 +++++---- phishing-detection/pylintrc | 4 +-- 9 files changed, 104 insertions(+), 60 deletions(-) diff --git a/README.md b/README.md index 2b2b585..8c927f5 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,12 @@ In this assignment we will be transferring a small kaggle model to a professiona - poetry for dependency management. ### How to run -To run this codee you need to have poetry installed. You can install the packages by running the following command: +To run this codee you need to have poetry installed. You can install the packages by running the following commands: - ```poetry install``` -- ```dvc pull``` \ No newline at end of file +- ```poetry shell``` +To retrieve the data and run the pipeline: +- ```dvc pull``` +- ```dvc repro``` +To run the code quality metrics: +- ```pylint ./phishing_detection``` +- ```bandit ./``` \ No newline at end of file diff --git a/phishing-detection/phishing_detection/get_data.py b/phishing-detection/phishing_detection/get_data.py index 725e6ba..b24ec0c 100644 --- a/phishing-detection/phishing_detection/get_data.py +++ b/phishing-detection/phishing_detection/get_data.py @@ -13,22 +13,31 @@ def load_data(path): """ # TODO handle error if it doesn't exist. Maybe not needed if dvc is used - train = [line.strip() for line in open(f"{path}/train.txt", "r").readlines()[1:]] - raw_X_train = [line.split("\t")[1] for line in train] - raw_y_train = [line.split("\t")[0] for line in train] + with open(f"{path}/train.txt", "r", encoding="UTF-8") as file: + train = [line.strip() for line in file.readlines()[1:]] + raw_X_train = [line.split("\t")[1] for line in train] + raw_y_train = [line.split("\t")[0] for line in train] - test = [line.strip() for line in open(f"{path}/test.txt", "r").readlines()] - raw_X_test = [line.split("\t")[1] for line in test] - raw_y_test = [line.split("\t")[0] for line in test] + with open(f"{path}/test.txt", "r", encoding="UTF-8") as file: + test = [line.strip() for line in file.readlines()[1:]] + raw_X_test = [line.split("\t")[1] for line in test] + raw_y_test = [line.split("\t")[0] for line in test] - val=[line.strip() for line in open(f"{path}/val.txt", "r").readlines()] - raw_X_val=[line.split("\t")[1] for line in val] - raw_y_val=[line.split("\t")[0] for line in val] + with open(f"{path}/val.txt", "r", encoding="UTF-8") as file: + val = [line.strip() for line in file.readlines()[1:]] + raw_X_val = [line.split("\t")[1] for line in val] + raw_y_val = [line.split("\t")[0] for line in val] return raw_X_train, raw_y_train, raw_X_val, raw_y_val, raw_X_test, raw_y_test def main(): + """ + Load and save data to file. + + Returns: + None + """ path = sys.argv[1] raw_X_train, raw_y_train, raw_X_val, raw_y_val, raw_X_test, raw_y_test = load_data(path) diff --git a/phishing-detection/phishing_detection/model_definition.py b/phishing-detection/phishing_detection/model_definition.py index 760a6a5..76ba618 100644 --- a/phishing-detection/phishing_detection/model_definition.py +++ b/phishing-detection/phishing_detection/model_definition.py @@ -2,13 +2,12 @@ Provides functions to create the model. """ -from keras._tf_keras.keras.models import Sequential, Model -from keras._tf_keras.keras.layers import Embedding, Conv1D, MaxPooling1D, Flatten, Dense, Dropout -import yaml -import sys -import numpy as np import os +import sys import utils +import yaml +from keras._tf_keras.keras.models import Sequential, Model +from keras._tf_keras.keras.layers import Embedding, Conv1D, MaxPooling1D, Flatten, Dense, Dropout def build_model(char_index: dict, params: dict) -> Model: """ Build a model for the phishing detection task @@ -22,7 +21,7 @@ def build_model(char_index: dict, params: dict) -> Model: """ voc_size = len(char_index.keys()) - #print("voc_size: {}".format(voc_size)) # TODO remove if not needed for anything, if needed use fstring instead + #print("voc_size: {}".format(voc_size)) # TODO remove if not needed for anything. dropout_rate = 0.2 # This can be parameterized in `params` if varying dropout rates are needed. model = Sequential() @@ -60,8 +59,16 @@ def build_model(char_index: dict, params: dict) -> Model: return model def main(): + """ + Define model and save to path. + + Returns: + None + """ path = sys.argv[1] - params = yaml.safe_load(open(os.path.join("phishing-detection", "phishing_detection", "params.yaml"))) + paramspath = os.path.join("phishing-detection", "phishing_detection", "params.yaml") + with open(paramspath, encoding="UTF-8") as file: + params = yaml.safe_load(file) char_index = utils.load_json(f"{path}/preprocess/char_index.json") model = build_model(char_index, params) diff --git a/phishing-detection/phishing_detection/predict.py b/phishing-detection/phishing_detection/predict.py index 1606785..adc74f7 100644 --- a/phishing-detection/phishing_detection/predict.py +++ b/phishing-detection/phishing_detection/predict.py @@ -2,14 +2,14 @@ Provides functions to peform predictions. """ -from keras import Model -from matplotlib import pyplot as plt +import sys import numpy as np -from sklearn.metrics import classification_report, confusion_matrix,accuracy_score import seaborn as sns import utils +from keras import Model from keras._tf_keras.keras.models import load_model -import sys +from matplotlib import pyplot as plt +from sklearn.metrics import classification_report, confusion_matrix,accuracy_score def predict_classes(model: Model, x_test: np.ndarray, threshold: float = 0.5) -> np.ndarray: """ Predict class labels for samples in x_test. @@ -23,7 +23,7 @@ def predict_classes(model: Model, x_test: np.ndarray, threshold: float = 0.5) -> Predicted binary labels for the samples in x_test. """ y_pred = model.predict(x_test, batch_size=1000) - print(y_pred) # TODO remove? + # Convert predicted probabilities to binary labels y_pred_binary = (np.array(y_pred) > threshold).astype(int) @@ -42,7 +42,7 @@ def evaluate_results(y_test: np.ndarray, y_pred_binary: np.ndarray) -> dict: Returns: A dictionary containing the classification report, confusion matrix, and accuracy score. """ - # TODO do we want to print these here or in the run somewhere? + y_test=y_test.reshape(-1,1) # Calculate classification report @@ -82,8 +82,13 @@ def plot_confusion_matrix(confusion_mat: np.ndarray) -> plt.Figure: def main(): - path = sys.argv[1] + """ + Evaluate model and save plots + Returns: + None + """ + path = sys.argv[1] # Load data from npy files X_test = np.load(f"{path}/preprocess/X_test.npy") y_test = np.load(f"{path}/preprocess/y_test.npy") @@ -92,10 +97,10 @@ def main(): prediction = predict_classes(model, X_test) evaluation_results = evaluate_results(y_test, prediction) utils.save_data_as_text(evaluation_results, f"{path}/results/results.txt") - + fig = plot_confusion_matrix(evaluation_results['confusion_matrix']) fig.savefig(f"{path}/results/confusion_matrix.pdf") if __name__ == "__main__": - main() \ No newline at end of file + main() diff --git a/phishing-detection/phishing_detection/preprocess.py b/phishing-detection/phishing_detection/preprocess.py index 872b27c..4a25c57 100644 --- a/phishing-detection/phishing_detection/preprocess.py +++ b/phishing-detection/phishing_detection/preprocess.py @@ -2,18 +2,17 @@ Provides functions to preprocess data. """ - +import sys +import utils +import numpy as np +#import pandas as pd +#import matplotlib.pyplot as plt from sklearn.preprocessing import LabelEncoder #from sklearn.metrics import classification_report, confusion_matrix from keras._tf_keras.keras.preprocessing.text import Tokenizer from keras._tf_keras.keras.preprocessing.sequence import pad_sequences #from keras._tf_keras.keras.models import Sequential #from keras._tf_keras.keras.layers import Dense, Dropout, Embedding, Conv1D, MaxPooling1D, Flatten -import numpy as np -#import pandas as pd -#import matplotlib.pyplot as plt -import sys -import utils def preprocess_data(raw_X_train: list[str], raw_y_train: list[str], @@ -55,6 +54,12 @@ def preprocess_data(raw_X_train: list[str], raw_y_train: list[str], return X_train, y_train, X_val, y_val, X_test, y_test, char_index def main(): + """ + Preprocess data and save result to file. + + Returns: + None + """ path = sys.argv[1] # Load data from text files diff --git a/phishing-detection/phishing_detection/run.py b/phishing-detection/phishing_detection/run.py index 62c9b9e..8b51a8c 100644 --- a/phishing-detection/phishing_detection/run.py +++ b/phishing-detection/phishing_detection/run.py @@ -21,12 +21,14 @@ -def run(params: dict) -> None: + +def run(params: dict, paramspath) -> None: """ Runs the model with the given parameters. Parameters: params (dict): A dictionary containing parameters for the model training and evaluation. + path (String): Path to parammeter file Returns: None @@ -36,7 +38,7 @@ def run(params: dict) -> None: run(params) """ # Load data - X_train, y_train, X_val, y_val, X_test, y_test = load_data() + X_train, y_train, X_val, y_val, X_test, y_test = load_data(paramspath) # Preprocess data X_train, y_train, X_val, y_val, X_test, y_test, char_index = preprocess_data( @@ -53,10 +55,10 @@ def run(params: dict) -> None: evaluation_results = evaluate_results(y_test, prediction) # plot confusion matrix - plot_confusion_matrix(evaluation_results['confusion_matrix']) # TODO save fig? + plot_confusion_matrix(evaluation_results['confusion_matrix']) #save fig? if __name__ == "__main__": path = os.path.join("phishing-detection", "phishing_detection", "params.yaml") - with open(path , encoding="UTF-8") as file: + with open(path ,encoding="UTF-8" ) as file: parameters = yaml.safe_load(file) - run(parameters) + run(parameters, path) diff --git a/phishing-detection/phishing_detection/train.py b/phishing-detection/phishing_detection/train.py index 477182d..25614d6 100644 --- a/phishing-detection/phishing_detection/train.py +++ b/phishing-detection/phishing_detection/train.py @@ -2,15 +2,13 @@ Provides functions for training a model. """ - -from keras._tf_keras.keras import Model -from keras._tf_keras.keras.models import load_model -from keras._tf_keras.keras.callbacks import History - -import numpy as np import sys import os import yaml +import numpy as np + +from keras._tf_keras.keras import Model +from keras._tf_keras.keras.models import load_model def train(model: Model, X_train: np.array, y_train: np.array, X_val: np.array, y_val: np.array, params: dict) -> Model: @@ -32,23 +30,31 @@ def train(model: Model, X_train: np.array, y_train: np.array, model.compile(loss=params['loss_function'], optimizer=params['optimizer'], metrics=['accuracy']) - hist = model.fit(X_train, y_train, - batch_size=params['batch_train'], - epochs=params['epoch'], - shuffle=True, - validation_data=(X_val, y_val) - ) - + model.fit(X_train, y_train, + batch_size=params['batch_train'], + epochs=params['epoch'], + shuffle=True, + validation_data=(X_val, y_val) + ) + return model def main(): + """ + Train and save model. + + Returns: + None + """ path = sys.argv[1] X_train = np.load(f"{path}/preprocess/X_train.npy") y_train = np.load(f"{path}/preprocess/y_train.npy") X_val = np.load(f"{path}/preprocess/X_val.npy") y_val = np.load(f"{path}/preprocess/y_val.npy") - params = yaml.safe_load(open(os.path.join("phishing-detection", "phishing_detection", "params.yaml"))) + path = os.path.join("phishing-detection", "phishing_detection", "params.yaml") + with open(path ,encoding="UTF-8" ) as file: + params = yaml.safe_load(file) model = load_model(f"{path}/model/initial_model.keras") trained_model = train(model, X_train, y_train, X_val, y_val, params) diff --git a/phishing-detection/phishing_detection/utils.py b/phishing-detection/phishing_detection/utils.py index 5c5e3fc..fba8378 100644 --- a/phishing-detection/phishing_detection/utils.py +++ b/phishing-detection/phishing_detection/utils.py @@ -1,3 +1,7 @@ +""" +Provides functions to save and load data. + +""" import json @@ -9,9 +13,9 @@ def save_data_as_text(data, file_path): data (List[str]): Data to be saved. file_path (str): Path to the output text file. """ - with open(file_path, "w") as file: + with open(file_path, "w", encoding="UTF-8") as file: for item in data: - file.write("%s\n" % item) + file.write(f"{item}\n") def load_data_from_text(file_path): @@ -24,7 +28,7 @@ def load_data_from_text(file_path): Returns: List[str]: Data loaded from the text file. """ - with open(file_path, "r") as file: + with open(file_path, "r", encoding="UTF-8") as file: data = [line.strip() for line in file.readlines()] return data @@ -38,7 +42,7 @@ def save_json(char_index, file_path): char_index (dict): Dictionary containing character-to-index mapping. file_path (str): Path to the output JSON file. """ - with open(file_path, 'w') as f: + with open(file_path, 'w', encoding="UTF-8") as f: json.dump(char_index, f) def load_json(file_path): @@ -51,5 +55,5 @@ def load_json(file_path): Returns: dict: Loaded char_index dictionary. """ - with open(file_path, 'r') as f: - return json.load(f) \ No newline at end of file + with open(file_path, 'r', encoding="UTF-8") as f: + return json.load(f) diff --git a/phishing-detection/pylintrc b/phishing-detection/pylintrc index a1d2678..597569a 100644 --- a/phishing-detection/pylintrc +++ b/phishing-detection/pylintrc @@ -33,7 +33,7 @@ ignore-patterns=^\.# # Python code to execute, usually for sys.path manipulation such as # pygtk.require(). -#init-hook= +init-hook='import sys; sys.path.append("./phishing_detection")' # Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the # number of processors available to use. @@ -320,7 +320,7 @@ logging-modules=logging # List of note tags to take in consideration, separated by a comma. notes=FIXME, XXX, - TODO + # Regular expression of note tags to take in consideration. #notes-rgx= From c24a9790775d30e736320de0d6c9b429d9a55d04 Mon Sep 17 00:00:00 2001 From: MichaelChan20 Date: Mon, 6 May 2024 00:17:02 +0200 Subject: [PATCH 09/17] Updated lock file --- phishing-detection/poetry.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phishing-detection/poetry.lock b/phishing-detection/poetry.lock index e686040..7404d7d 100644 --- a/phishing-detection/poetry.lock +++ b/phishing-detection/poetry.lock @@ -5547,4 +5547,4 @@ test = ["zope.testing"] [metadata] lock-version = "2.0" python-versions = "~3.11" -content-hash = "54e1721a937b0076ab6a5c6f7ce7344df27d6a645e95461ab2ae0c043e8fecb6" +content-hash = "4eba8d789a57166a35fb584b85cc30032c4b672fef82a3f8448ae12567b672cb" From f424f90c42c27c66eb9902c31e7fa86fcfa0029e Mon Sep 17 00:00:00 2001 From: MichaelChan20 Date: Mon, 6 May 2024 00:25:56 +0200 Subject: [PATCH 10/17] fixed path error --- dvc.lock | 56 +++++++++---------- .../phishing_detection/train.py | 4 +- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/dvc.lock b/dvc.lock index e97d580..806eac6 100644 --- a/dvc.lock +++ b/dvc.lock @@ -17,93 +17,93 @@ stages: size: 46258330 - path: phishing-detection\phishing_detection\get_data.py hash: md5 - md5: 072e08c955f4fdd33550445716ffa925 - size: 1591 + md5: bdf8f521e5c27faa0d177946a2ceac54 + size: 1848 outs: - path: data/raw/X_test.txt hash: md5 - md5: 3fea8da6e4997dd0ede997235a10ca51 - size: 29407820 + md5: 1563282b483d43739f43f425200044c5 + size: 29407738 - path: data/raw/X_train.txt hash: md5 md5: e30e89161e21482d56537c6d0889db94 size: 84396770 - path: data/raw/X_val.txt hash: md5 - md5: 53d02f5e8a3a4de5fbb99be60fffea4f - size: 41567062 + md5: 7d004257a712e5265a5bd985aee42979 + size: 41567033 - path: data/raw/y_test.txt hash: md5 - md5: f04d1da8fd322e8e8d7b40ca2cff6cd9 - size: 4045462 + md5: 2e3c9d7f5cfbbbaa9ab11e95747c6b88 + size: 4045450 - path: data/raw/y_train.txt hash: md5 md5: a2628fb8ca50c89fe1250772b8a50206 size: 11616282 - path: data/raw/y_val.txt hash: md5 - md5: b63122d1f1df50d4e75507b729ab6c03 - size: 5721428 + md5: 3c330979d7cb08758fcd9d6feaf6aa04 + size: 5721418 preprocess: cmd: python .\phishing-detection\phishing_detection\preprocess.py data deps: - path: data/raw/X_test.txt hash: md5 - md5: 3fea8da6e4997dd0ede997235a10ca51 - size: 29407820 + md5: 1563282b483d43739f43f425200044c5 + size: 29407738 - path: data/raw/X_train.txt hash: md5 md5: e30e89161e21482d56537c6d0889db94 size: 84396770 - path: data/raw/X_val.txt hash: md5 - md5: 53d02f5e8a3a4de5fbb99be60fffea4f - size: 41567062 + md5: 7d004257a712e5265a5bd985aee42979 + size: 41567033 - path: data/raw/y_test.txt hash: md5 - md5: f04d1da8fd322e8e8d7b40ca2cff6cd9 - size: 4045462 + md5: 2e3c9d7f5cfbbbaa9ab11e95747c6b88 + size: 4045450 - path: data/raw/y_train.txt hash: md5 md5: a2628fb8ca50c89fe1250772b8a50206 size: 11616282 - path: data/raw/y_val.txt hash: md5 - md5: b63122d1f1df50d4e75507b729ab6c03 - size: 5721428 + md5: 3c330979d7cb08758fcd9d6feaf6aa04 + size: 5721418 - path: phishing-detection\phishing_detection\preprocess.py hash: md5 - md5: a1482b809ccb620b7ade0a252751d718 - size: 3398 + md5: 755b39e473c43e878554eb91c365223b + size: 3490 outs: - path: data/preprocess/X_test.npy hash: md5 - md5: 93675aba9e6e2c9b80277481652f0f7d - size: 291359328 + md5: 23fa98d19a833016d86142c36cecda27 + size: 291358528 - path: data/preprocess/X_train.npy hash: md5 md5: d81af1c35a77cdeac4d8ccee76cc939e size: 836619328 - path: data/preprocess/X_val.npy hash: md5 - md5: 6cf90ab489d52d04b2b739d1648378c9 - size: 412064128 + md5: 22128e9681506e90a2b437d45da5f8cf + size: 412063328 - path: data/preprocess/char_index.json hash: md5 md5: fe87b0a484b3b60b50fd58cd538aaaae size: 639 - path: data/preprocess/y_test.npy hash: md5 - md5: f75fc025e787c7c33a7a8c50d3b901d0 - size: 1456924 + md5: 311ff57eefa708370ff251eabff39a65 + size: 1456920 - path: data/preprocess/y_train.npy hash: md5 md5: 9b660634af0db95a6e2932208bc73b91 size: 8366320 - path: data/preprocess/y_val.npy hash: md5 - md5: b2b6fd1c6458b139988973e159e5fff1 - size: 2060448 + md5: 1d5fa5d29393e97dbba3a5cd32813e14 + size: 2060444 train: cmd: - python .\phishing-detection\phishing_detection\model_definition.py data diff --git a/phishing-detection/phishing_detection/train.py b/phishing-detection/phishing_detection/train.py index 25614d6..37d4c24 100644 --- a/phishing-detection/phishing_detection/train.py +++ b/phishing-detection/phishing_detection/train.py @@ -52,8 +52,8 @@ def main(): y_train = np.load(f"{path}/preprocess/y_train.npy") X_val = np.load(f"{path}/preprocess/X_val.npy") y_val = np.load(f"{path}/preprocess/y_val.npy") - path = os.path.join("phishing-detection", "phishing_detection", "params.yaml") - with open(path ,encoding="UTF-8" ) as file: + parampath = os.path.join("phishing-detection", "phishing_detection", "params.yaml") + with open(parampath ,encoding="UTF-8" ) as file: params = yaml.safe_load(file) model = load_model(f"{path}/model/initial_model.keras") From 4846ced690cd3deb53dfe5ef11f71a3711a5ee5b Mon Sep 17 00:00:00 2001 From: MichaelChan20 Date: Mon, 6 May 2024 13:58:37 +0200 Subject: [PATCH 11/17] New lock file --- dvc.lock | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/dvc.lock b/dvc.lock index 806eac6..5bc902f 100644 --- a/dvc.lock +++ b/dvc.lock @@ -115,8 +115,8 @@ stages: size: 836619328 - path: data/preprocess/X_val.npy hash: md5 - md5: 6cf90ab489d52d04b2b739d1648378c9 - size: 412064128 + md5: 22128e9681506e90a2b437d45da5f8cf + size: 412063328 - path: data/preprocess/char_index.json hash: md5 md5: fe87b0a484b3b60b50fd58cd538aaaae @@ -127,49 +127,49 @@ stages: size: 8366320 - path: data/preprocess/y_val.npy hash: md5 - md5: b2b6fd1c6458b139988973e159e5fff1 - size: 2060448 + md5: 1d5fa5d29393e97dbba3a5cd32813e14 + size: 2060444 - path: phishing-detection\phishing_detection\model_definition.py hash: md5 - md5: 5f1eb17860a8ddaf0c73d88fa63c3bc9 - size: 2282 + md5: a9147652d192df0b0c96b81a17835a28 + size: 2391 - path: phishing-detection\phishing_detection\train.py hash: md5 - md5: a58d4faa6e63d1f67d404fb67002a4b9 - size: 1764 + md5: de203b5cebd4d6fb83cd5dd841f5e822 + size: 1827 outs: - path: data/model/initial_model.keras hash: md5 - md5: 1dc1a89a99cf1a05c40a9dcacf2942b2 + md5: 255cd6f4714465b48042fd4307213a5f size: 49737 - path: data/model/trained_model.keras hash: md5 - md5: c2250fe20648bf0ad32ddb3aa482bb28 + md5: cea8f013980cb2b9f982c56c10d9f773 size: 5472435 test: cmd: python .\phishing-detection\phishing_detection\predict.py data deps: - path: data/model/trained_model.keras hash: md5 - md5: c2250fe20648bf0ad32ddb3aa482bb28 + md5: cea8f013980cb2b9f982c56c10d9f773 size: 5472435 - path: data/preprocess/X_test.npy hash: md5 - md5: 93675aba9e6e2c9b80277481652f0f7d - size: 291359328 + md5: 23fa98d19a833016d86142c36cecda27 + size: 291358528 - path: data/preprocess/y_test.npy hash: md5 - md5: f75fc025e787c7c33a7a8c50d3b901d0 - size: 1456924 + md5: 311ff57eefa708370ff251eabff39a65 + size: 1456920 - path: phishing-detection\phishing_detection\predict.py hash: md5 - md5: 6ee09097ab8a15787e0a93acdf0c59c5 - size: 3169 + md5: 4ccca662abbfa46adaf5d758052f70db + size: 3148 outs: - path: data/results/confusion_matrix.pdf hash: md5 - md5: 33d2208721a0b31a9b37792c4f3c158e - size: 14171 + md5: d43d5e73ad588cc473fd448e1561e4a2 + size: 13645 - path: data/results/results.txt hash: md5 md5: 4c24ed3cfccea4b4e08cc753e8a82f51 From 7cd4da8c8eac2223974724b1f950c48458470c1c Mon Sep 17 00:00:00 2001 From: MichaelChan20 <99957782+MichaelChan20@users.noreply.github.com> Date: Mon, 6 May 2024 14:54:57 +0200 Subject: [PATCH 12/17] Update README.md Fixed bandit command --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8c927f5..ad77270 100644 --- a/README.md +++ b/README.md @@ -13,4 +13,4 @@ To retrieve the data and run the pipeline: - ```dvc repro``` To run the code quality metrics: - ```pylint ./phishing_detection``` -- ```bandit ./``` \ No newline at end of file +- ```bandit ./ -r``` From deb05992419848995c6a0c90d863bebbe2b68198 Mon Sep 17 00:00:00 2001 From: Jan Date: Mon, 6 May 2024 16:05:53 +0200 Subject: [PATCH 13/17] Updated dvc lock file --- dvc.lock | 72 ++++++++++++++++++++++++++++---------------------------- dvc.yaml | 20 ++++++++-------- 2 files changed, 46 insertions(+), 46 deletions(-) diff --git a/dvc.lock b/dvc.lock index 806eac6..13696d6 100644 --- a/dvc.lock +++ b/dvc.lock @@ -1,7 +1,7 @@ schema: '2.0' stages: prepare: - cmd: python .\phishing-detection\phishing_detection\get_data.py data + cmd: python ./phishing-detection/phishing_detection/get_data.py data deps: - path: data/test.txt hash: md5 @@ -15,66 +15,66 @@ stages: hash: md5 md5: 7b1e28b1e91582c6f36e85517c3cc6ee size: 46258330 - - path: phishing-detection\phishing_detection\get_data.py + - path: phishing-detection/phishing_detection/get_data.py hash: md5 - md5: bdf8f521e5c27faa0d177946a2ceac54 - size: 1848 + md5: 19dd7b6be5f5d4155d3a186e400f328c + size: 1796 outs: - path: data/raw/X_test.txt hash: md5 - md5: 1563282b483d43739f43f425200044c5 - size: 29407738 + md5: 609e75fbf12e4f1ac9bdc1e40bf8c028 + size: 29043540 - path: data/raw/X_train.txt hash: md5 - md5: e30e89161e21482d56537c6d0889db94 - size: 84396770 + md5: 761b3fe3977c171bc5451c08d217f9cb + size: 83350996 - path: data/raw/X_val.txt hash: md5 - md5: 7d004257a712e5265a5bd985aee42979 - size: 41567033 + md5: c74e4e1c602207a00f9a7d0b6f5cd612 + size: 41051954 - path: data/raw/y_test.txt hash: md5 - md5: 2e3c9d7f5cfbbbaa9ab11e95747c6b88 - size: 4045450 + md5: ee87127d4d350f71855f7645118a14e2 + size: 3681252 - path: data/raw/y_train.txt hash: md5 - md5: a2628fb8ca50c89fe1250772b8a50206 - size: 11616282 + md5: a1baa255faeadb22c2b820464989699e + size: 10570508 - path: data/raw/y_val.txt hash: md5 - md5: 3c330979d7cb08758fcd9d6feaf6aa04 - size: 5721418 + md5: e1b4662a77e310d40d02a627f0a5e26c + size: 5206339 preprocess: - cmd: python .\phishing-detection\phishing_detection\preprocess.py data + cmd: python ./phishing-detection/phishing_detection/preprocess.py data deps: - path: data/raw/X_test.txt hash: md5 - md5: 1563282b483d43739f43f425200044c5 - size: 29407738 + md5: 609e75fbf12e4f1ac9bdc1e40bf8c028 + size: 29043540 - path: data/raw/X_train.txt hash: md5 - md5: e30e89161e21482d56537c6d0889db94 - size: 84396770 + md5: 761b3fe3977c171bc5451c08d217f9cb + size: 83350996 - path: data/raw/X_val.txt hash: md5 - md5: 7d004257a712e5265a5bd985aee42979 - size: 41567033 + md5: c74e4e1c602207a00f9a7d0b6f5cd612 + size: 41051954 - path: data/raw/y_test.txt hash: md5 - md5: 2e3c9d7f5cfbbbaa9ab11e95747c6b88 - size: 4045450 + md5: ee87127d4d350f71855f7645118a14e2 + size: 3681252 - path: data/raw/y_train.txt hash: md5 - md5: a2628fb8ca50c89fe1250772b8a50206 - size: 11616282 + md5: a1baa255faeadb22c2b820464989699e + size: 10570508 - path: data/raw/y_val.txt hash: md5 - md5: 3c330979d7cb08758fcd9d6feaf6aa04 - size: 5721418 - - path: phishing-detection\phishing_detection\preprocess.py + md5: e1b4662a77e310d40d02a627f0a5e26c + size: 5206339 + - path: phishing-detection/phishing_detection/preprocess.py hash: md5 - md5: 755b39e473c43e878554eb91c365223b - size: 3490 + md5: 79ff87419fae0f3e0b6a8a2bd80f5891 + size: 3403 outs: - path: data/preprocess/X_test.npy hash: md5 @@ -94,16 +94,16 @@ stages: size: 639 - path: data/preprocess/y_test.npy hash: md5 - md5: 311ff57eefa708370ff251eabff39a65 - size: 1456920 + md5: 86612dc0b79d11ee7dcf2d30c62811eb + size: 2913712 - path: data/preprocess/y_train.npy hash: md5 md5: 9b660634af0db95a6e2932208bc73b91 size: 8366320 - path: data/preprocess/y_val.npy hash: md5 - md5: 1d5fa5d29393e97dbba3a5cd32813e14 - size: 2060444 + md5: 7d7c949969abb0303ea9373bf519cc84 + size: 4120760 train: cmd: - python .\phishing-detection\phishing_detection\model_definition.py data diff --git a/dvc.yaml b/dvc.yaml index b28989b..9958839 100644 --- a/dvc.yaml +++ b/dvc.yaml @@ -1,8 +1,8 @@ stages: prepare: - cmd: python .\phishing-detection\phishing_detection\get_data.py data + cmd: python ./phishing-detection/phishing_detection/get_data.py data deps: - - phishing-detection\phishing_detection\get_data.py + - phishing-detection/phishing_detection/get_data.py - data/train.txt - data/test.txt - data/val.txt @@ -14,9 +14,9 @@ stages: - data/raw/X_test.txt - data/raw/y_test.txt preprocess: - cmd : python .\phishing-detection\phishing_detection\preprocess.py data + cmd : python ./phishing-detection/phishing_detection/preprocess.py data deps: - - phishing-detection\phishing_detection\preprocess.py + - phishing-detection/phishing_detection/preprocess.py - data/raw/X_train.txt - data/raw/y_train.txt - data/raw/X_val.txt @@ -33,11 +33,11 @@ stages: - data/preprocess/char_index.json train: cmd: - - python .\phishing-detection\phishing_detection\model_definition.py data - - python .\phishing-detection\phishing_detection\train.py data + - python ./phishing-detection/phishing_detection/model_definition.py data + - python ./phishing-detection/phishing_detection/train.py data deps: - - phishing-detection\phishing_detection\model_definition.py - - phishing-detection\phishing_detection\train.py + - phishing-detection/phishing_detection/model_definition.py + - phishing-detection/phishing_detection/train.py - data/preprocess/X_train.npy - data/preprocess/y_train.npy - data/preprocess/X_val.npy @@ -47,9 +47,9 @@ stages: - data/model/initial_model.keras - data/model/trained_model.keras test: - cmd: python .\phishing-detection\phishing_detection\predict.py data + cmd: python ./phishing-detection/phishing_detection/predict.py data deps: - - phishing-detection\phishing_detection\predict.py + - phishing-detection/phishing_detection/predict.py - data/model/trained_model.keras - data/preprocess/X_test.npy - data/preprocess/y_test.npy From 8d2593333ee24f6af0bad01b3b466b8e3db9a276 Mon Sep 17 00:00:00 2001 From: Jan Date: Mon, 6 May 2024 16:52:20 +0200 Subject: [PATCH 14/17] added cloud sources for dvc files --- .dvc/config | 1 + data/test.txt.dvc | 4 +++ data/train.txt.dvc | 4 +++ data/val.txt.dvc | 4 +++ dvc.lock | 77 +++++++++++++++++++++++++++++++++++++--------- 5 files changed, 75 insertions(+), 15 deletions(-) diff --git a/.dvc/config b/.dvc/config index ebea054..8c16b50 100644 --- a/.dvc/config +++ b/.dvc/config @@ -2,5 +2,6 @@ remote = s3-read ['remote "aws"'] url = s3://dvc-remla/dvc + version_aware = true ['remote "s3-read"'] url = https://dvc-remla.s3.amazonaws.com/dvc diff --git a/data/test.txt.dvc b/data/test.txt.dvc index d8d0ed4..c5bf7c1 100644 --- a/data/test.txt.dvc +++ b/data/test.txt.dvc @@ -3,3 +3,7 @@ outs: size: 32724891 hash: md5 path: test.txt + cloud: + aws: + etag: a1cab28ad8554fd9269d31e5708469d0 + version_id: 'null' diff --git a/data/train.txt.dvc b/data/train.txt.dvc index e7f0ead..de4e71b 100644 --- a/data/train.txt.dvc +++ b/data/train.txt.dvc @@ -3,3 +3,7 @@ outs: size: 93921671 hash: md5 path: train.txt + cloud: + aws: + etag: 13fd241a41370119612d5b00b0433009 + version_id: 'null' diff --git a/data/val.txt.dvc b/data/val.txt.dvc index 43bfbea..c27956d 100644 --- a/data/val.txt.dvc +++ b/data/val.txt.dvc @@ -3,3 +3,7 @@ outs: size: 46258330 hash: md5 path: val.txt + cloud: + aws: + etag: 7b1e28b1e91582c6f36e85517c3cc6ee + version_id: 'null' diff --git a/dvc.lock b/dvc.lock index e0d5639..5333154 100644 --- a/dvc.lock +++ b/dvc.lock @@ -24,26 +24,50 @@ stages: hash: md5 md5: 609e75fbf12e4f1ac9bdc1e40bf8c028 size: 29043540 + cloud: + aws: + etag: 609e75fbf12e4f1ac9bdc1e40bf8c028 + version_id: 'null' - path: data/raw/X_train.txt hash: md5 md5: 761b3fe3977c171bc5451c08d217f9cb size: 83350996 + cloud: + aws: + etag: 761b3fe3977c171bc5451c08d217f9cb + version_id: 'null' - path: data/raw/X_val.txt hash: md5 md5: c74e4e1c602207a00f9a7d0b6f5cd612 size: 41051954 + cloud: + aws: + etag: c74e4e1c602207a00f9a7d0b6f5cd612 + version_id: 'null' - path: data/raw/y_test.txt hash: md5 md5: ee87127d4d350f71855f7645118a14e2 size: 3681252 + cloud: + aws: + etag: ee87127d4d350f71855f7645118a14e2 + version_id: 'null' - path: data/raw/y_train.txt hash: md5 md5: a1baa255faeadb22c2b820464989699e size: 10570508 + cloud: + aws: + etag: a1baa255faeadb22c2b820464989699e + version_id: 'null' - path: data/raw/y_val.txt hash: md5 md5: e1b4662a77e310d40d02a627f0a5e26c size: 5206339 + cloud: + aws: + etag: e1b4662a77e310d40d02a627f0a5e26c + version_id: 'null' preprocess: cmd: python ./phishing-detection/phishing_detection/preprocess.py data deps: @@ -80,34 +104,62 @@ stages: hash: md5 md5: 23fa98d19a833016d86142c36cecda27 size: 291358528 + cloud: + aws: + etag: 421dedecdf7fecc1b1125f6fbd5ad28e-6 + version_id: 'null' - path: data/preprocess/X_train.npy hash: md5 md5: d81af1c35a77cdeac4d8ccee76cc939e size: 836619328 + cloud: + aws: + etag: 745db7209662781c75018ec2bbe59b67-16 + version_id: 'null' - path: data/preprocess/X_val.npy hash: md5 md5: 22128e9681506e90a2b437d45da5f8cf size: 412063328 + cloud: + aws: + etag: 876339ed4410440941887103644018ee-8 + version_id: 'null' - path: data/preprocess/char_index.json hash: md5 md5: fe87b0a484b3b60b50fd58cd538aaaae size: 639 + cloud: + aws: + etag: fe87b0a484b3b60b50fd58cd538aaaae + version_id: 'null' - path: data/preprocess/y_test.npy hash: md5 md5: 86612dc0b79d11ee7dcf2d30c62811eb size: 2913712 + cloud: + aws: + etag: 86612dc0b79d11ee7dcf2d30c62811eb + version_id: 'null' - path: data/preprocess/y_train.npy hash: md5 md5: 9b660634af0db95a6e2932208bc73b91 size: 8366320 + cloud: + aws: + etag: 9b660634af0db95a6e2932208bc73b91 + version_id: 'null' - path: data/preprocess/y_val.npy hash: md5 md5: 7d7c949969abb0303ea9373bf519cc84 size: 4120760 + cloud: + aws: + etag: 7d7c949969abb0303ea9373bf519cc84 + version_id: 'null' train: cmd: - - python .\phishing-detection\phishing_detection\model_definition.py data - - python .\phishing-detection\phishing_detection\train.py data + - python ./phishing-detection/phishing_detection/model_definition.py data + - python ./phishing-detection/phishing_detection/train.py data deps: - path: data/preprocess/X_train.npy hash: md5 @@ -129,14 +181,8 @@ stages: hash: md5 md5: 1d5fa5d29393e97dbba3a5cd32813e14 size: 2060444 - - path: phishing-detection\phishing_detection\model_definition.py - hash: md5 - md5: a9147652d192df0b0c96b81a17835a28 - size: 2391 - - path: phishing-detection\phishing_detection\train.py - hash: md5 - md5: de203b5cebd4d6fb83cd5dd841f5e822 - size: 1827 + - path: phishing-detection/phishing_detection/model_definition.py + - path: phishing-detection/phishing_detection/train.py outs: - path: data/model/initial_model.keras hash: md5 @@ -147,7 +193,7 @@ stages: md5: cea8f013980cb2b9f982c56c10d9f773 size: 5472435 test: - cmd: python .\phishing-detection\phishing_detection\predict.py data + cmd: python ./phishing-detection/phishing_detection/predict.py data deps: - path: data/model/trained_model.keras hash: md5 @@ -161,10 +207,7 @@ stages: hash: md5 md5: 311ff57eefa708370ff251eabff39a65 size: 1456920 - - path: phishing-detection\phishing_detection\predict.py - hash: md5 - md5: 4ccca662abbfa46adaf5d758052f70db - size: 3148 + - path: phishing-detection/phishing_detection/predict.py outs: - path: data/results/confusion_matrix.pdf hash: md5 @@ -174,3 +217,7 @@ stages: hash: md5 md5: 4c24ed3cfccea4b4e08cc753e8a82f51 size: 51 + cloud: + aws: + etag: 4c24ed3cfccea4b4e08cc753e8a82f51 + version_id: 'null' From 965cb86585783c769bb54ee3aa5af3fd2fd95126 Mon Sep 17 00:00:00 2001 From: Jan Date: Mon, 6 May 2024 17:31:46 +0200 Subject: [PATCH 15/17] update lock file after rerunning experiments --- dvc.lock | 47 ++++++++++++++++++++++++++++++++++------------- 1 file changed, 34 insertions(+), 13 deletions(-) diff --git a/dvc.lock b/dvc.lock index 5333154..70dc34c 100644 --- a/dvc.lock +++ b/dvc.lock @@ -179,25 +179,39 @@ stages: size: 8366320 - path: data/preprocess/y_val.npy hash: md5 - md5: 1d5fa5d29393e97dbba3a5cd32813e14 - size: 2060444 + md5: 7d7c949969abb0303ea9373bf519cc84 + size: 4120760 - path: phishing-detection/phishing_detection/model_definition.py + hash: md5 + md5: 55bf2a3bd2121357e99e4692aafa8e80 + size: 2313 - path: phishing-detection/phishing_detection/train.py + hash: md5 + md5: 75a82a9d73ab0673dadbec5dc5594977 + size: 1762 outs: - path: data/model/initial_model.keras hash: md5 - md5: 255cd6f4714465b48042fd4307213a5f + md5: 55fa8ca50eb9cbd41efeeb61517fd987 size: 49737 + cloud: + aws: + etag: 55fa8ca50eb9cbd41efeeb61517fd987 + version_id: fuk3nIlB7oWebpJr1wIei0B_9ECHeI.6 - path: data/model/trained_model.keras hash: md5 - md5: cea8f013980cb2b9f982c56c10d9f773 + md5: e44426bfc609504d8c358536c515327c size: 5472435 + cloud: + aws: + etag: e44426bfc609504d8c358536c515327c + version_id: M4_Pdr8fKEXMEierQD5QaSLLkQU7_pGV test: cmd: python ./phishing-detection/phishing_detection/predict.py data deps: - path: data/model/trained_model.keras hash: md5 - md5: cea8f013980cb2b9f982c56c10d9f773 + md5: e44426bfc609504d8c358536c515327c size: 5472435 - path: data/preprocess/X_test.npy hash: md5 @@ -205,19 +219,26 @@ stages: size: 291358528 - path: data/preprocess/y_test.npy hash: md5 - md5: 311ff57eefa708370ff251eabff39a65 - size: 1456920 + md5: 86612dc0b79d11ee7dcf2d30c62811eb + size: 2913712 - path: phishing-detection/phishing_detection/predict.py + hash: md5 + md5: 54883bf00811d49bb1f989fe9684b83d + size: 3042 outs: - path: data/results/confusion_matrix.pdf hash: md5 - md5: d43d5e73ad588cc473fd448e1561e4a2 - size: 13645 + md5: 6576b0f2b5717eeed323ebd9dd7887bb + size: 14154 + cloud: + aws: + etag: 6576b0f2b5717eeed323ebd9dd7887bb + version_id: 7v9CKf_3JPL6zB_tWkfAfCPbLnjpdtr1 - path: data/results/results.txt hash: md5 - md5: 4c24ed3cfccea4b4e08cc753e8a82f51 - size: 51 + md5: de64d03317a4972caba7a78ee865c322 + size: 48 cloud: aws: - etag: 4c24ed3cfccea4b4e08cc753e8a82f51 - version_id: 'null' + etag: de64d03317a4972caba7a78ee865c322 + version_id: Swnt.qKIFFgg133CmEJ3FoTbrOB79Gkt From 4c6fb327cc44cf1a5fe9e48a218d677660b2d80d Mon Sep 17 00:00:00 2001 From: Remi Lejeune Date: Mon, 6 May 2024 18:59:12 +0200 Subject: [PATCH 16/17] Switch remote to gdrive --- .dvc/config | 4 +++- phishing-detection/pyproject.toml | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.dvc/config b/.dvc/config index 8c16b50..587157e 100644 --- a/.dvc/config +++ b/.dvc/config @@ -1,7 +1,9 @@ [core] - remote = s3-read + remote = gdrive ['remote "aws"'] url = s3://dvc-remla/dvc version_aware = true ['remote "s3-read"'] url = https://dvc-remla.s3.amazonaws.com/dvc +['remote "gdrive"'] + url = gdrive://13Kk88ZJAhU16WcaSnSiHBtWO4CcrURVL diff --git a/phishing-detection/pyproject.toml b/phishing-detection/pyproject.toml index 05cbdea..d014db1 100644 --- a/phishing-detection/pyproject.toml +++ b/phishing-detection/pyproject.toml @@ -21,6 +21,7 @@ pylint = "3.1.0" bandit = "1.7.8" dvc = "3.50.1" dvc-s3 = "3.2.0" +dvc-gdrive = "3.0.1" [build-system] requires = ["poetry-core"] From 9fd9a9e2d0f3e76b528b2b51422e8fa1df71590c Mon Sep 17 00:00:00 2001 From: Remi Lejeune Date: Mon, 6 May 2024 19:49:56 +0200 Subject: [PATCH 17/17] Update dvc.lock --- dvc.lock | 146 +++++++++++++++++++------------------------------------ 1 file changed, 49 insertions(+), 97 deletions(-) diff --git a/dvc.lock b/dvc.lock index 70dc34c..3ff72d1 100644 --- a/dvc.lock +++ b/dvc.lock @@ -17,88 +17,64 @@ stages: size: 46258330 - path: phishing-detection/phishing_detection/get_data.py hash: md5 - md5: 19dd7b6be5f5d4155d3a186e400f328c - size: 1796 + md5: bdf8f521e5c27faa0d177946a2ceac54 + size: 1848 outs: - path: data/raw/X_test.txt hash: md5 - md5: 609e75fbf12e4f1ac9bdc1e40bf8c028 - size: 29043540 - cloud: - aws: - etag: 609e75fbf12e4f1ac9bdc1e40bf8c028 - version_id: 'null' + md5: 1563282b483d43739f43f425200044c5 + size: 29407738 - path: data/raw/X_train.txt hash: md5 - md5: 761b3fe3977c171bc5451c08d217f9cb - size: 83350996 - cloud: - aws: - etag: 761b3fe3977c171bc5451c08d217f9cb - version_id: 'null' + md5: e30e89161e21482d56537c6d0889db94 + size: 84396770 - path: data/raw/X_val.txt hash: md5 - md5: c74e4e1c602207a00f9a7d0b6f5cd612 - size: 41051954 - cloud: - aws: - etag: c74e4e1c602207a00f9a7d0b6f5cd612 - version_id: 'null' + md5: 7d004257a712e5265a5bd985aee42979 + size: 41567033 - path: data/raw/y_test.txt hash: md5 - md5: ee87127d4d350f71855f7645118a14e2 - size: 3681252 - cloud: - aws: - etag: ee87127d4d350f71855f7645118a14e2 - version_id: 'null' + md5: 2e3c9d7f5cfbbbaa9ab11e95747c6b88 + size: 4045450 - path: data/raw/y_train.txt hash: md5 - md5: a1baa255faeadb22c2b820464989699e - size: 10570508 - cloud: - aws: - etag: a1baa255faeadb22c2b820464989699e - version_id: 'null' + md5: a2628fb8ca50c89fe1250772b8a50206 + size: 11616282 - path: data/raw/y_val.txt hash: md5 - md5: e1b4662a77e310d40d02a627f0a5e26c - size: 5206339 - cloud: - aws: - etag: e1b4662a77e310d40d02a627f0a5e26c - version_id: 'null' + md5: 3c330979d7cb08758fcd9d6feaf6aa04 + size: 5721418 preprocess: cmd: python ./phishing-detection/phishing_detection/preprocess.py data deps: - path: data/raw/X_test.txt hash: md5 - md5: 609e75fbf12e4f1ac9bdc1e40bf8c028 - size: 29043540 + md5: 1563282b483d43739f43f425200044c5 + size: 29407738 - path: data/raw/X_train.txt hash: md5 - md5: 761b3fe3977c171bc5451c08d217f9cb - size: 83350996 + md5: e30e89161e21482d56537c6d0889db94 + size: 84396770 - path: data/raw/X_val.txt hash: md5 - md5: c74e4e1c602207a00f9a7d0b6f5cd612 - size: 41051954 + md5: 7d004257a712e5265a5bd985aee42979 + size: 41567033 - path: data/raw/y_test.txt hash: md5 - md5: ee87127d4d350f71855f7645118a14e2 - size: 3681252 + md5: 2e3c9d7f5cfbbbaa9ab11e95747c6b88 + size: 4045450 - path: data/raw/y_train.txt hash: md5 - md5: a1baa255faeadb22c2b820464989699e - size: 10570508 + md5: a2628fb8ca50c89fe1250772b8a50206 + size: 11616282 - path: data/raw/y_val.txt hash: md5 - md5: e1b4662a77e310d40d02a627f0a5e26c - size: 5206339 + md5: 3c330979d7cb08758fcd9d6feaf6aa04 + size: 5721418 - path: phishing-detection/phishing_detection/preprocess.py hash: md5 - md5: 79ff87419fae0f3e0b6a8a2bd80f5891 - size: 3403 + md5: 755b39e473c43e878554eb91c365223b + size: 3490 outs: - path: data/preprocess/X_test.npy hash: md5 @@ -134,12 +110,8 @@ stages: version_id: 'null' - path: data/preprocess/y_test.npy hash: md5 - md5: 86612dc0b79d11ee7dcf2d30c62811eb - size: 2913712 - cloud: - aws: - etag: 86612dc0b79d11ee7dcf2d30c62811eb - version_id: 'null' + md5: 311ff57eefa708370ff251eabff39a65 + size: 1456920 - path: data/preprocess/y_train.npy hash: md5 md5: 9b660634af0db95a6e2932208bc73b91 @@ -150,12 +122,8 @@ stages: version_id: 'null' - path: data/preprocess/y_val.npy hash: md5 - md5: 7d7c949969abb0303ea9373bf519cc84 - size: 4120760 - cloud: - aws: - etag: 7d7c949969abb0303ea9373bf519cc84 - version_id: 'null' + md5: 1d5fa5d29393e97dbba3a5cd32813e14 + size: 2060444 train: cmd: - python ./phishing-detection/phishing_detection/model_definition.py data @@ -179,39 +147,31 @@ stages: size: 8366320 - path: data/preprocess/y_val.npy hash: md5 - md5: 7d7c949969abb0303ea9373bf519cc84 - size: 4120760 + md5: 1d5fa5d29393e97dbba3a5cd32813e14 + size: 2060444 - path: phishing-detection/phishing_detection/model_definition.py hash: md5 - md5: 55bf2a3bd2121357e99e4692aafa8e80 - size: 2313 + md5: a9147652d192df0b0c96b81a17835a28 + size: 2391 - path: phishing-detection/phishing_detection/train.py hash: md5 - md5: 75a82a9d73ab0673dadbec5dc5594977 - size: 1762 + md5: de203b5cebd4d6fb83cd5dd841f5e822 + size: 1827 outs: - path: data/model/initial_model.keras hash: md5 - md5: 55fa8ca50eb9cbd41efeeb61517fd987 + md5: 8309bed8a584bb33e377a1183c811a21 size: 49737 - cloud: - aws: - etag: 55fa8ca50eb9cbd41efeeb61517fd987 - version_id: fuk3nIlB7oWebpJr1wIei0B_9ECHeI.6 - path: data/model/trained_model.keras hash: md5 - md5: e44426bfc609504d8c358536c515327c + md5: 2b91e95957947219e7cf6edf3b1493e3 size: 5472435 - cloud: - aws: - etag: e44426bfc609504d8c358536c515327c - version_id: M4_Pdr8fKEXMEierQD5QaSLLkQU7_pGV test: cmd: python ./phishing-detection/phishing_detection/predict.py data deps: - path: data/model/trained_model.keras hash: md5 - md5: e44426bfc609504d8c358536c515327c + md5: 2b91e95957947219e7cf6edf3b1493e3 size: 5472435 - path: data/preprocess/X_test.npy hash: md5 @@ -219,26 +179,18 @@ stages: size: 291358528 - path: data/preprocess/y_test.npy hash: md5 - md5: 86612dc0b79d11ee7dcf2d30c62811eb - size: 2913712 + md5: 311ff57eefa708370ff251eabff39a65 + size: 1456920 - path: phishing-detection/phishing_detection/predict.py hash: md5 - md5: 54883bf00811d49bb1f989fe9684b83d - size: 3042 + md5: 4ccca662abbfa46adaf5d758052f70db + size: 3148 outs: - path: data/results/confusion_matrix.pdf hash: md5 - md5: 6576b0f2b5717eeed323ebd9dd7887bb - size: 14154 - cloud: - aws: - etag: 6576b0f2b5717eeed323ebd9dd7887bb - version_id: 7v9CKf_3JPL6zB_tWkfAfCPbLnjpdtr1 + md5: 814e380c2f919555d2990c700f3d4537 + size: 13666 - path: data/results/results.txt hash: md5 - md5: de64d03317a4972caba7a78ee865c322 - size: 48 - cloud: - aws: - etag: de64d03317a4972caba7a78ee865c322 - version_id: Swnt.qKIFFgg133CmEJ3FoTbrOB79Gkt + md5: 4c24ed3cfccea4b4e08cc753e8a82f51 + size: 51