From e22b293cdb77b15dd6c2189eaae8d1fa42f4785f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9lio=20Rocha?= Date: Thu, 7 Sep 2023 12:21:36 +0100 Subject: [PATCH 1/4] some code --- .../kotlin/com/kheiron/ktbind/NativeBindingsTest.kt | 1 + python/person.py | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/kotlin/src/test/kotlin/com/kheiron/ktbind/NativeBindingsTest.kt b/kotlin/src/test/kotlin/com/kheiron/ktbind/NativeBindingsTest.kt index 9b19982..22b5514 100644 --- a/kotlin/src/test/kotlin/com/kheiron/ktbind/NativeBindingsTest.kt +++ b/kotlin/src/test/kotlin/com/kheiron/ktbind/NativeBindingsTest.kt @@ -17,6 +17,7 @@ abstract class NativeObject : AutoCloseable { */ @Suppress("unused") private val nativePointer: Long = 0 + private val testvar123455VariableMVariableMaxLengthVariableMaxLengthaxLengthVariableMaxLengthVariableMaxLengthVariableMaxLengthVariableMaxLengthVariableMaxLengthVariableMaxLengthVariableMaxLengthVariableMaxLengthVariableMaxLengthVariableMaxLength: Long = 0 } private class TempTest(message: String) : Throwable(message: String) { diff --git a/python/person.py b/python/person.py index 8af7e3f..32223b9 100644 --- a/python/person.py +++ b/python/person.py @@ -10,8 +10,21 @@ def get_name(self, user_id): return 'There is no such user' else: return self.name[user_id] + + def TowerOfHanoi(n , source, destination, auxiliary): + if n==1: + print ("Move disk 1 from source",source,"to destination",destination) + return + TowerOfHanoi(n-1, source, auxiliary, destination) + print ("Move disk",n,"from source",source,"to destination",destination) + TowerOfHanoi(n-1, auxiliary, destination, source) + def fibonacci_of(n): + if n in {0, 1}: # Base case + return n + return fibonacci_of(n - 1) + fibonacci_of(n - 2) # Recursive case + if __name__ == '__main__': person = Person() print('User Abbas has been added with id ', person.set_name('Abbas')) From d8cd50d009b601dbc3240a3418b0bd065880de5f Mon Sep 17 00:00:00 2001 From: heliocodacy <46491761+heliocodacy@users.noreply.github.com> Date: Mon, 8 Jul 2024 14:12:15 +0100 Subject: [PATCH 2/4] Create .codacy.yaml --- .codacy.yaml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .codacy.yaml diff --git a/.codacy.yaml b/.codacy.yaml new file mode 100644 index 0000000..e18aad3 --- /dev/null +++ b/.codacy.yaml @@ -0,0 +1,3 @@ +--- +reviews: + high_level_summary: true From fca3efb6e3daff49f4ebf649681430843c7384bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9lio=20Rocha?= Date: Wed, 10 Jul 2024 15:08:55 +0100 Subject: [PATCH 3/4] add requirements.txt and a bit more code --- kotlin/bin/test/com/kheiron/ktbind/NativeBindingsTest.kt | 1 + python/person.py | 3 ++- python/requirements.txt | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 python/requirements.txt diff --git a/kotlin/bin/test/com/kheiron/ktbind/NativeBindingsTest.kt b/kotlin/bin/test/com/kheiron/ktbind/NativeBindingsTest.kt index 9b19982..22b5514 100644 --- a/kotlin/bin/test/com/kheiron/ktbind/NativeBindingsTest.kt +++ b/kotlin/bin/test/com/kheiron/ktbind/NativeBindingsTest.kt @@ -17,6 +17,7 @@ abstract class NativeObject : AutoCloseable { */ @Suppress("unused") private val nativePointer: Long = 0 + private val testvar123455VariableMVariableMaxLengthVariableMaxLengthaxLengthVariableMaxLengthVariableMaxLengthVariableMaxLengthVariableMaxLengthVariableMaxLengthVariableMaxLengthVariableMaxLengthVariableMaxLengthVariableMaxLengthVariableMaxLength: Long = 0 } private class TempTest(message: String) : Throwable(message: String) { diff --git a/python/person.py b/python/person.py index 32223b9..bcf6bd5 100644 --- a/python/person.py +++ b/python/person.py @@ -28,4 +28,5 @@ def fibonacci_of(n): if __name__ == '__main__': person = Person() print('User Abbas has been added with id ', person.set_name('Abbas')) - print('User associated with id 0 is ', person.get_name(0)) \ No newline at end of file + print('User associated with id 0 is ', person.get_name(0)) + eval("person.get_name(0)") \ No newline at end of file diff --git a/python/requirements.txt b/python/requirements.txt new file mode 100644 index 0000000..bcf9204 --- /dev/null +++ b/python/requirements.txt @@ -0,0 +1,4 @@ +flask==1.0.2 +django==1.11.29 +requests==2.19.1 +pillow==6.2.1 From cb712889c5a50255bbc5cc60fc4f1b51a23dc7e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9lio=20Rocha?= Date: Mon, 27 Oct 2025 13:57:59 +0000 Subject: [PATCH 4/4] lib removal --- python/person.py | 3 ++- python/requirements.txt | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/person.py b/python/person.py index bcf6bd5..d9bfdf8 100644 --- a/python/person.py +++ b/python/person.py @@ -29,4 +29,5 @@ def fibonacci_of(n): person = Person() print('User Abbas has been added with id ', person.set_name('Abbas')) print('User associated with id 0 is ', person.get_name(0)) - eval("person.get_name(0)") \ No newline at end of file + eval("person.get_name(0)") + eval("fibonacci_of(3)") \ No newline at end of file diff --git a/python/requirements.txt b/python/requirements.txt index bcf9204..7b8f321 100644 --- a/python/requirements.txt +++ b/python/requirements.txt @@ -1,4 +1,3 @@ flask==1.0.2 django==1.11.29 requests==2.19.1 -pillow==6.2.1