diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fc8cb636979e..60c1d6d119d0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,10 +9,11 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-python@v4 with: - python-version: 3.11 + python-version: 3.12 + allow-prereleases: true - uses: actions/cache@v3 with: path: ~/.cache/pip diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml index e71ac8a4e933..496f1460e074 100644 --- a/.github/workflows/ruff.yml +++ b/.github/workflows/ruff.yml @@ -11,6 +11,6 @@ jobs: ruff: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: pip install --user ruff - run: ruff --output-format=github . diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 809b841d0ea3..9e132d9ed447 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -33,7 +33,7 @@ repos: - tomli - repo: https://github.com/tox-dev/pyproject-fmt - rev: "1.1.0" + rev: "1.2.0" hooks: - id: pyproject-fmt diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4a1bb652738f..7a67ce33cd62 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -73,7 +73,7 @@ pre-commit run --all-files --show-diff-on-failure We want your work to be readable by others; therefore, we encourage you to note the following: -- Please write in Python 3.11+. For instance: `print()` is a function in Python 3 so `print "Hello"` will *not* work but `print("Hello")` will. +- Please write in Python 3.12+. For instance: `print()` is a function in Python 3 so `print "Hello"` will *not* work but `print("Hello")` will. - Please focus hard on the naming of functions, classes, and variables. Help your reader by using __descriptive names__ that can help you to remove redundant comments. - Single letter variable names are *old school* so please avoid them unless their life only spans a few lines. - Expand acronyms because `gcd()` is hard to understand but `greatest_common_divisor()` is not. diff --git a/DIRECTORY.md b/DIRECTORY.md index 7d3ceee144be..8d8a63f54018 100644 --- a/DIRECTORY.md +++ b/DIRECTORY.md @@ -133,7 +133,6 @@ * [Run Length Encoding](compression/run_length_encoding.py) ## Computer Vision - * [Cnn Classification](computer_vision/cnn_classification.py) * [Flip Augmentation](computer_vision/flip_augmentation.py) * [Haralick Descriptors](computer_vision/haralick_descriptors.py) * [Harris Corner](computer_vision/harris_corner.py) @@ -233,6 +232,7 @@ * [Merge Two Lists](data_structures/linked_list/merge_two_lists.py) * [Middle Element Of Linked List](data_structures/linked_list/middle_element_of_linked_list.py) * [Print Reverse](data_structures/linked_list/print_reverse.py) + * [Reverse K Group](data_structures/linked_list/reverse_k_group.py) * [Rotate To The Right](data_structures/linked_list/rotate_to_the_right.py) * [Singly Linked List](data_structures/linked_list/singly_linked_list.py) * [Skip List](data_structures/linked_list/skip_list.py) @@ -320,7 +320,6 @@ * [Floyd Warshall](dynamic_programming/floyd_warshall.py) * [Integer Partition](dynamic_programming/integer_partition.py) * [Iterating Through Submasks](dynamic_programming/iterating_through_submasks.py) - * [K Means Clustering Tensorflow](dynamic_programming/k_means_clustering_tensorflow.py) * [Knapsack](dynamic_programming/knapsack.py) * [Longest Common Subsequence](dynamic_programming/longest_common_subsequence.py) * [Longest Common Substring](dynamic_programming/longest_common_substring.py) @@ -383,9 +382,6 @@ * [Mandelbrot](fractals/mandelbrot.py) * [Sierpinski Triangle](fractals/sierpinski_triangle.py) -## Fuzzy Logic - * [Fuzzy Operations](fuzzy_logic/fuzzy_operations.py) - ## Genetic Algorithm * [Basic String](genetic_algorithm/basic_string.py) @@ -516,8 +512,6 @@ * Local Weighted Learning * [Local Weighted Learning](machine_learning/local_weighted_learning/local_weighted_learning.py) * [Logistic Regression](machine_learning/logistic_regression.py) - * Lstm - * [Lstm Prediction](machine_learning/lstm/lstm_prediction.py) * [Mfcc](machine_learning/mfcc.py) * [Multilayer Perceptron Classifier](machine_learning/multilayer_perceptron_classifier.py) * [Polynomial Regression](machine_learning/polynomial_regression.py) @@ -1070,17 +1064,7 @@ * [Sol1](project_euler/problem_800/sol1.py) ## Quantum - * [Bb84](quantum/bb84.py) - * [Deutsch Jozsa](quantum/deutsch_jozsa.py) - * [Half Adder](quantum/half_adder.py) - * [Not Gate](quantum/not_gate.py) * [Q Fourier Transform](quantum/q_fourier_transform.py) - * [Q Full Adder](quantum/q_full_adder.py) - * [Quantum Entanglement](quantum/quantum_entanglement.py) - * [Quantum Teleportation](quantum/quantum_teleportation.py) - * [Ripple Adder Classic](quantum/ripple_adder_classic.py) - * [Single Qubit Measure](quantum/single_qubit_measure.py) - * [Superdense Coding](quantum/superdense_coding.py) ## Scheduling * [First Come First Served](scheduling/first_come_first_served.py) diff --git a/computer_vision/cnn_classification.py b/computer_vision/cnn_classification.py.DISABLED similarity index 100% rename from computer_vision/cnn_classification.py rename to computer_vision/cnn_classification.py.DISABLED diff --git a/dynamic_programming/k_means_clustering_tensorflow.py b/dynamic_programming/k_means_clustering_tensorflow.py.DISABLED similarity index 100% rename from dynamic_programming/k_means_clustering_tensorflow.py rename to dynamic_programming/k_means_clustering_tensorflow.py.DISABLED diff --git a/fuzzy_logic/fuzzy_operations.py b/fuzzy_logic/fuzzy_operations.py.DISABLED similarity index 100% rename from fuzzy_logic/fuzzy_operations.py rename to fuzzy_logic/fuzzy_operations.py.DISABLED diff --git a/machine_learning/lstm/lstm_prediction.py b/machine_learning/lstm/lstm_prediction.py.DISABLED similarity index 100% rename from machine_learning/lstm/lstm_prediction.py rename to machine_learning/lstm/lstm_prediction.py.DISABLED diff --git a/quantum/bb84.py b/quantum/bb84.py.DISABLED similarity index 100% rename from quantum/bb84.py rename to quantum/bb84.py.DISABLED diff --git a/quantum/deutsch_jozsa.py b/quantum/deutsch_jozsa.py.DISABLED old mode 100755 new mode 100644 similarity index 99% rename from quantum/deutsch_jozsa.py rename to quantum/deutsch_jozsa.py.DISABLED index 95c3e65b5edf..5c8a379debfc --- a/quantum/deutsch_jozsa.py +++ b/quantum/deutsch_jozsa.py.DISABLED @@ -1,3 +1,4 @@ +# DISABLED!! #!/usr/bin/env python3 """ Deutsch-Jozsa Algorithm is one of the first examples of a quantum diff --git a/quantum/half_adder.py b/quantum/half_adder.py.DISABLED old mode 100755 new mode 100644 similarity index 99% rename from quantum/half_adder.py rename to quantum/half_adder.py.DISABLED index 21a57ddcf2dd..800d563ec76f --- a/quantum/half_adder.py +++ b/quantum/half_adder.py.DISABLED @@ -1,3 +1,4 @@ +# DISABLED!! #!/usr/bin/env python3 """ Build a half-adder quantum circuit that takes two bits as input, diff --git a/quantum/not_gate.py b/quantum/not_gate.py.DISABLED similarity index 100% rename from quantum/not_gate.py rename to quantum/not_gate.py.DISABLED diff --git a/quantum/q_full_adder.py b/quantum/q_full_adder.py.DISABLED similarity index 100% rename from quantum/q_full_adder.py rename to quantum/q_full_adder.py.DISABLED diff --git a/quantum/quantum_entanglement.py b/quantum/quantum_entanglement.py.DISABLED similarity index 100% rename from quantum/quantum_entanglement.py rename to quantum/quantum_entanglement.py.DISABLED diff --git a/quantum/quantum_teleportation.py b/quantum/quantum_teleportation.py.DISABLED similarity index 100% rename from quantum/quantum_teleportation.py rename to quantum/quantum_teleportation.py.DISABLED diff --git a/quantum/ripple_adder_classic.py b/quantum/ripple_adder_classic.py.DISABLED similarity index 100% rename from quantum/ripple_adder_classic.py rename to quantum/ripple_adder_classic.py.DISABLED diff --git a/quantum/single_qubit_measure.py b/quantum/single_qubit_measure.py.DISABLED similarity index 100% rename from quantum/single_qubit_measure.py rename to quantum/single_qubit_measure.py.DISABLED diff --git a/quantum/superdense_coding.py b/quantum/superdense_coding.py.DISABLED similarity index 100% rename from quantum/superdense_coding.py rename to quantum/superdense_coding.py.DISABLED diff --git a/requirements.txt b/requirements.txt index 1128e9d66820..25dba6f5a250 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,15 +9,15 @@ opencv-python pandas pillow projectq -qiskit -qiskit-aer +qiskit ; python_version < '3.12' +qiskit-aer ; python_version < '3.12' requests rich scikit-fuzzy scikit-learn statsmodels sympy -tensorflow +tensorflow ; python_version < '3.12' texttable tweepy xgboost