From 7a70b3ba2da01b47c37d38e8bf2dd034f0075d45 Mon Sep 17 00:00:00 2001
From: Book Danny <duanbiao2000@gmail.com>
Date: Tue, 8 Oct 2024 18:44:43 +0800
Subject: [PATCH] init

---
 data_structures/binary_tree/avl_tree.py   |  8 +++---
 web_programming/project1a.html            | 34 +++++++++++++++++++++++
 web_programming/test_fetch_github_info.py |  6 ++++
 3 files changed, 44 insertions(+), 4 deletions(-)
 create mode 100644 web_programming/project1a.html

diff --git a/data_structures/binary_tree/avl_tree.py b/data_structures/binary_tree/avl_tree.py
index 4c1fb17afe86..e833f54a0da0 100644
--- a/data_structures/binary_tree/avl_tree.py
+++ b/data_structures/binary_tree/avl_tree.py
@@ -36,7 +36,7 @@ def count(self) -> int:
     def print_queue(self) -> None:
         print(self.data)
         print("**************")
-        print(self.data[self.head : self.tail])
+        print(self.data[self.head: self.tail])
 
 
 class MyNode:
@@ -152,12 +152,12 @@ def insert_node(node: MyNode | None, data: Any) -> MyNode | None:
     if data < node.get_data():
         node.set_left(insert_node(node.get_left(), data))
         if (
-            get_height(node.get_left()) - get_height(node.get_right()) == 2
+                get_height(node.get_left()) - get_height(node.get_right()) == 2
         ):  # an unbalance detected
             left_child = node.get_left()
             assert left_child is not None
             if (
-                data < left_child.get_data()
+                    data < left_child.get_data()
             ):  # new node is the left child of the left child
                 node = right_rotation(node)
             else:
@@ -289,7 +289,7 @@ def del_node(self, data: Any) -> None:
         self.root = del_node(self.root, data)
 
     def __str__(
-        self,
+            self,
     ) -> str:  # a level traversale, gives a more intuitive look on the tree
         output = ""
         q = MyQueue()
diff --git a/web_programming/project1a.html b/web_programming/project1a.html
new file mode 100644
index 000000000000..2373f955c8b1
--- /dev/null
+++ b/web_programming/project1a.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head><meta http-equiv="content-type" content="text/html; charset=utf-8"><meta name="viewport" content="initial-scale=1"><title>https://www.google.com/search?q=hello%20world</title></head>
+<body style="font-family: arial, sans-serif; background-color: #fff; color: #000; padding:20px; font-size:18px; overscroll-behavior:contain;" onload="e=document.getElementById('captcha');if(e){e.focus();} if(solveSimpleChallenge) {solveSimpleChallenge(,);}">
+<div style="max-width:400px;">
+<hr noshade size="1" style="color:#ccc; background-color:#ccc;"><br>
+<form id="captcha-form" action="index" method="post">
+<noscript>
+<div style="font-size:13px;">
+  In order to continue, please enable javascript on your web browser.
+</div>
+</noscript>
+<script src="https://www.google.com/recaptcha/api.js" async defer></script>
+<script>var submitCallback = function(response) {document.getElementById('captcha-form').submit();};</script>
+<div id="recaptcha" class="g-recaptcha" data-sitekey="6LfwuyUTAAAAAOAmoS0fdqijC2PbbdH4kjq62Y1b" data-callback="submitCallback" data-s="fc9Tdr_pvWm3EKXNNSPz0kXDxQq4guaEiYcU3Lc1b94Pu5j5nQE5UpUwhrT_Efyjs4peMw2FuDWKut4kKHD1cA4tg_rx1anudco36DcyAbS-ILESUVDCj7cYXH40MNIVzaM875cOlpibVXNxZlIgjowQlbNq9xD6GDf8f2oF30QIAp6Z4UQNNpSOdqJ4sqC0uonyOgqOUyqtqDeKkaENCgQDKxWrppuudpwIPUlE3wptxNhIfdZIhdJekUHDmam9_NgU2_sfSLuqwRTfAuHEePKYEdPkA5U"></div>
+
+<input type='hidden' name='q' value='EhAqCbrBdsAamAAAAAABvgBmGO6TlLgGIjBl-H1B_TJsOCWYU7A-cQdi7GiBk4vWC7_oQ3JmK6TDL7jPvJCvA9c_KUYQrFSlVBgyAXJaAUM'><input type="hidden" name="continue" value="https://www.google.com/search?q=hello%20world">
+</form>
+<hr noshade size="1" style="color:#ccc; background-color:#ccc;">
+
+<div style="font-size:13px;">
+<b>About this page</b><br><br>
+
+Our systems have detected unusual traffic from your computer network.  This page checks to see if it&#39;s really you sending the requests, and not a robot.  <a href="#" onclick="document.getElementById('infoDiv').style.display='block';">Why did this happen?</a><br><br>
+
+<div id="infoDiv" style="display:none; background-color:#eee; padding:10px; margin:0 0 15px 0; line-height:1.4em;">
+This page appears when Google automatically detects requests coming from your computer network which appear to be in violation of the <a href="//www.google.com/policies/terms/">Terms of Service</a>. The block will expire shortly after those requests stop.  In the meantime, solving the above CAPTCHA will let you continue to use our services.<br><br>This traffic may have been sent by malicious software, a browser plug-in, or a script that sends automated requests.  If you share your network connection, ask your administrator for help &mdash; a different computer using the same IP address may be responsible.  <a href="//support.google.com/websearch/answer/86640">Learn more</a><br><br>Sometimes you may be asked to solve the CAPTCHA if you are using advanced terms that robots are known to use, or sending requests very quickly.
+</div>
+
+IP address: 2a09:bac1:76c0:1a98::1be:66<br>Time: 2024-10-08T10:31:11Z<br>URL: https://www.google.com/search?q=hello%20world<br>
+</div>
+</div>
+</body>
+</html>
diff --git a/web_programming/test_fetch_github_info.py b/web_programming/test_fetch_github_info.py
index 2da97c782df7..04572f1c6cba 100644
--- a/web_programming/test_fetch_github_info.py
+++ b/web_programming/test_fetch_github_info.py
@@ -12,6 +12,12 @@ def __init__(self, content) -> None:
             self.content = content
 
         def json(self):
+            """
+            将响应内容解析为JSON格式
+
+            Returns:
+                dict: 返回解析后的JSON数据
+            """
             return json.loads(self.content)
 
     def mock_response(*args, **kwargs):
