diff --git a/README.md b/README.md
index 961f183..1370c10 100644
--- a/README.md
+++ b/README.md
@@ -601,9 +601,11 @@ Stop the instance, the type of the instance to match the desired RAM and start t
What is AWS WAF? Give an example of how it can used and describe what resources or services you can use it with
What AWS VPN is used for?
What is the difference between Site-to-Site VPN and Client VPN?
The default signal is SIGTERM (15). This signal kills process gracefully which means it allows it to save current diff --git a/coding/python/binary_search.py b/coding/python/binary_search.py index cd9601c..0efe132 100644 --- a/coding/python/binary_search.py +++ b/coding/python/binary_search.py @@ -2,9 +2,10 @@ import random -rand_num_li = sorted([random.randint(1, 50) for iter in range(10)]) +rand_num_li = sorted([random.randint(1, 50) for _ in range(10)]) target = random.randint(1, 50) + def binary_search(li, le, ri, target): if le <= ri: mid = ri + le // 2 diff --git a/scripts/main.py b/scripts/main.py new file mode 100644 index 0000000..5f969fb --- /dev/null +++ b/scripts/main.py @@ -0,0 +1,91 @@ +import pathlib + +p = pathlib.Path(__file__).parent.parent.joinpath('README.md') + +with open(p, 'rb') as f: + file_list = [line.rstrip() for line in f.readlines()] + +details_final_count = 0 +details_count = 0 +print(len(file_list)) +for q in file_list: + if b'' in q: + details_count += 1 + if b'' in q: + details_final_count += 1 +print(details_count, details_final_count) + +# TODO Checkear que tenemos mismo numero de details tabs, aunque esto no asegura al 100% que esta bien formateado. +# Una vez que tenemos un número par, podemos más o menos estar seguros de que la cosa va bien, y hacer ya entonces +# el checkeo de las demás tags. +# Problema: No obtenemos el lugar de donde esta mal el details, entonces; hacerlo. +# IDEA: comprobar que despues de un detail va un /detail y mas o menos supongo que podremos acotar, hacer pruebas. + + +def get_question_list(f): + + questions_list = [] + temp = [] + after_summary_tag = False + + for line in f: + if line.startswith(b''): + temp.append(line) + after_summary_tag = True + + elif after_summary_tag and line != b'' and b'' not in line: + temp.append(line) + + elif after_summary_tag and b'