From 8f90efc02f76395ff3e11ce4a29a07511b69601a Mon Sep 17 00:00:00 2001 From: Iliadis Fivos Date: Mon, 17 Jun 2024 13:29:40 +0300 Subject: [PATCH 1/4] Update requirements.txt Added "six" package --- google/cpu-memory/chameleon/requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/google/cpu-memory/chameleon/requirements.txt b/google/cpu-memory/chameleon/requirements.txt index 50309a3..2ed71a7 100644 --- a/google/cpu-memory/chameleon/requirements.txt +++ b/google/cpu-memory/chameleon/requirements.txt @@ -1 +1,2 @@ -chameleon \ No newline at end of file +chameleon +six From de078c9e51d4f89d78f38caba0b8aa290377da50 Mon Sep 17 00:00:00 2001 From: Iliadis Fivos Date: Mon, 17 Jun 2024 13:31:35 +0300 Subject: [PATCH 2/4] linpack - asscalar Removed "asscalar" import --- google/cpu-memory/linpack/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/google/cpu-memory/linpack/main.py b/google/cpu-memory/linpack/main.py index 8454a5c..8030487 100644 --- a/google/cpu-memory/linpack/main.py +++ b/google/cpu-memory/linpack/main.py @@ -1,4 +1,4 @@ -from numpy import matrix, array, linalg, random, amax, asscalar +from numpy import matrix, array, linalg, random, amax from time import time def linpack(N): @@ -35,4 +35,4 @@ def function_handler(request): N = request_json['N'] result = linpack(N) print(result) - return "latency : " + str(result['latency']) + " mflops : " + str(result['mflops']) \ No newline at end of file + return "latency : " + str(result['latency']) + " mflops : " + str(result['mflops']) From 7a8b34223e44b6c66851d2b16ae7d6ce88bdc7f7 Mon Sep 17 00:00:00 2001 From: Iliadis Fivos Date: Mon, 17 Jun 2024 13:32:15 +0300 Subject: [PATCH 3/4] chameleon - removed line Removed redundant line --- google/cpu-memory/chameleon/main.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/google/cpu-memory/chameleon/main.py b/google/cpu-memory/chameleon/main.py index 2575daf..4a19298 100644 --- a/google/cpu-memory/chameleon/main.py +++ b/google/cpu-memory/chameleon/main.py @@ -21,8 +21,6 @@ def function_handler(request): num_of_rows = request_json['num_of_rows'] num_of_cols = request_json['num_of_cols'] - message = generate(length_of_message) - # 128-bit key (16 bytes) KEY = b'\xa1\xf6%\x8c\x87}_\xcd\x89dHE8\xbf\xc9,' From be706966ed8470560b725b393b7e95d27bd77686 Mon Sep 17 00:00:00 2001 From: Iliadis Fivos Date: Mon, 17 Jun 2024 13:33:40 +0300 Subject: [PATCH 4/4] gzip_compression - open permissions Changed permissions on opening file --- google/disk/gzip_compression/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google/disk/gzip_compression/main.py b/google/disk/gzip_compression/main.py index 7ea4ca0..2341cee 100644 --- a/google/disk/gzip_compression/main.py +++ b/google/disk/gzip_compression/main.py @@ -13,7 +13,7 @@ def function_handler(request): f.write(os.urandom(file_size * 1024 * 1024)) disk_latency = time() - start - with open(file_write_path) as f: + with open(file_write_path, 'rb') as f: start = time() with gzip.open('/tmp/result.gz', 'wb') as gz: gz.writelines(f)