From 5ea350c42527e1efe4b7516fd9d59335b3d66540 Mon Sep 17 00:00:00 2001 From: br0kenpixel <23280129+br0kenpixel@users.noreply.github.com> Date: Wed, 26 Feb 2025 09:21:08 +0100 Subject: [PATCH] =?UTF-8?q?pr=C3=ADprava=20na=20cviko=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{cviko1_2-chatbot.ipynb => chatbot.ipynb} | 0 notebook/cviko1_1.html | 13460 ---------------- notebook/cviko1_2-chatbot.html | 13175 --------------- 3 files changed, 26635 deletions(-) rename notebook/{cviko1_2-chatbot.ipynb => chatbot.ipynb} (100%) delete mode 100644 notebook/cviko1_1.html delete mode 100644 notebook/cviko1_2-chatbot.html diff --git a/notebook/cviko1_2-chatbot.ipynb b/notebook/chatbot.ipynb similarity index 100% rename from notebook/cviko1_2-chatbot.ipynb rename to notebook/chatbot.ipynb diff --git a/notebook/cviko1_1.html b/notebook/cviko1_1.html deleted file mode 100644 index 776bbf4..0000000 --- a/notebook/cviko1_1.html +++ /dev/null @@ -1,13460 +0,0 @@ -None - - - - -cviko1_1 - - - - - - - - - -
-
-
-
-
-
In [9]:
-
-
-
text = "Some not interesting text input"
-
-
-
-
-
-
-
-
In [10]:
-
-
-
words = text.split(" ")
-
-
-
-
-
-
-
-
In [11]:
-
-
-
words
-
-
-
-
-
-
-
-
Out[11]:
-
-
['Some', 'not', 'interesting', 'text', 'input']
-
-
-
-
-
-
-
-
In [12]:
-
-
-
for word in words:
-    print(word)
-
-
-
-
-
-
-
-
-
-
Some
-not
-interesting
-text
-input
-
-
-
-
-
-
-
-
-
In [13]:
-
-
-
"The lazy fox jumps over the lazy dog".split("the")
-
-
-
-
-
-
-
-
Out[13]:
-
-
['The lazy fox jumps over ', ' lazy dog']
-
-
-
-
-
-
-
-
In [14]:
-
-
-
len("Hello")
-
-
-
-
-
-
-
-
Out[14]:
-
-
5
-
-
-
-
-
-
-
-
In [15]:
-
-
-
len(words)
-
-
-
-
-
-
-
-
Out[15]:
-
-
5
-
-
-
-
-
-
-
-
In [16]:
-
-
-
len(words[0])
-
-
-
-
-
-
-
-
Out[16]:
-
-
4
-
-
-
-
-
-
-
-
In [18]:
-
-
-
"text" in words
-
-
-
-
-
-
-
-
Out[18]:
-
-
True
-
-
-
-
-
-
-
-
In [19]:
-
-
-
text.count("text")
-
-
-
-
-
-
-
-
Out[19]:
-
-
1
-
-
-
-
-
-
-
-
In [20]:
-
-
-
long_words = [word for word in words if len(word) > 4]
-
-
-
-
-
-
-
-
In [21]:
-
-
-
long_words
-
-
-
-
-
-
-
-
Out[21]:
-
-
['interesting', 'input']
-
-
-
-
-
-
-
-
In [22]:
-
-
-
"Hello".title()
-
-
-
-
-
-
-
-
Out[22]:
-
-
'Hello'
-
-
-
-
-
-
-
-
In [23]:
-
-
-
capitals = [word for word in words if word.istitle()]
-
-
-
-
-
-
-
-
In [24]:
-
-
-
capitals
-
-
-
-
-
-
-
-
Out[24]:
-
-
['Some']
-
-
-
-
-
-
-
-
In [25]:
-
-
-
"Adam".upper()
-
-
-
-
-
-
-
-
Out[25]:
-
-
'ADAM'
-
-
-
-
-
-
-
-
In [26]:
-
-
-
"Adam".lower()
-
-
-
-
-
-
-
-
Out[26]:
-
-
'adam'
-
-
-
-
-
-
-
-
In [31]:
-
-
-
text = "Lorem Ipsum has been the industry's standard dummy text ever since the 1500s , when an unknown printer took a galley of type and scrambled it to make a type specimen book ."
-
-
-
-
-
-
-
-
In [33]:
-
-
-
len(set(text.split(" ")))
-
-
-
-
-
-
-
-
Out[33]:
-
-
30
-
-
-
-
-
-
-
-
In [ ]:
-
-
-
 
-
-
-
-
-
-
-
-
- - diff --git a/notebook/cviko1_2-chatbot.html b/notebook/cviko1_2-chatbot.html deleted file mode 100644 index 43c4626..0000000 --- a/notebook/cviko1_2-chatbot.html +++ /dev/null @@ -1,13175 +0,0 @@ -None - - - - -cviko1_2-chatbot - - - - - - - - - -
-
-
-
-
-
In [10]:
-
-
-
import random
-
-no_responses = [
-    "I can't answer that.",
-    "I don't know, sorry.",
-    "I can't understand you.",
-    "Can you elaborate, please?"
-]
-
-responses = {
-    "What's the weather like today?": [
-        "It's sunny!",
-        "It seems sunny today.",
-        "Sunny."
-    ],
-    "What is your name?": [
-        "My name is AI-CHATBOT.",
-        "It's AI-CHATBOT.",
-    ],
-    "What's your favorite color?": [
-        "It's yellow.",
-        "Yellow."
-    ],
-    "What color is the sky?": [
-        "The sky is blue.",
-        "It's blue."
-    ],
-    "Can you talk?": [
-        "No.",
-        "Nope.",
-        "I can't do that."
-    ]
-}
-
-while True:
-    message = input("> ")
-
-    if message == "bye":
-        print("< Bye")
-        break
-    
-    if message in responses.keys():
-        print("<", random.choice(responses[message]))
-    else:
-        print("<", random.choice(no_responses))
-
-
-
-
-
-
-
-
-
-
< My name is AI-CHATBOT.
-< I can't do that.
-< Nope.
-< The sky is blue.
-< Bye
-
-
-
-
-
-
-
-
-
In [ ]:
-
-
-
 
-
-
-
-
-
-
-
-
- -