text stringlengths 1 93.6k |
|---|
print(cf.orange("Which relationship should you and ReBot take?"))
|
relationship = input(
|
cf.orange(
|
"Option: 1. Husband and Wife\t2. Parent and Child\t3. Co-workers\t"
|
"4. Classmates\t5. Student and Teacher\t6. Patient and Doctor\t"
|
"7. Employee and Boss\t8. Athlete and Coach\t9. Neighbors\t10. Mentee and Mentor: "))
|
role = input(cf.orange("Specifically What is your role? "))
|
if ' and ' in relationship:
|
rel = relationship.strip().split(' and ')
|
rel.remove(role)
|
self.speaker = [role, rel[0]]
|
else:
|
self.speaker = [f'{relationship} A', f'{relationship} B']
|
print(cf.blue(f"You are the {self.speaker[0]}!"))
|
self.sequence = "<relationship> {}".format(relationship)
|
session_count = 1
|
event_history = []
|
time_history = []
|
while True:
|
if session_count > 1:
|
session_event = self.summary()
|
print(cf.green(session_event))
|
self.reset_history()
|
event_history.append(session_event)
|
print(cf.blue(f"Input the time interval between the previous session and the next session: "))
|
time_interval = input(
|
cf.blue("Option: 1. A few hours after\t2. A few days after\t"
|
"3. A few weeks after\t4. A few months after\t5. A couple of years after: "))
|
time_history.append(time_interval)
|
self.sequence = "{} <{}> {}".format(self.sequence, time_interval, session_event)
|
self.chat()
|
session_count = session_count + 1
|
continue_chat = get_valid_input(cf.purple("Start a new session with new event? [Y/N]: "), "Y")
|
if continue_chat in ["N", "n"]:
|
break
|
print(cf.blue("Ending the chat with ReBot..."))
|
def chat(self):
|
print(cf.green(
|
"Chat with ReBot! Input [NEXT] to switch to the next session and [END] to end the this session."))
|
while True:
|
user_input = input("You: ")
|
if user_input == "[NEXT]" or user_input == "[END]":
|
break
|
user_input = "<{}> {} <{}>".format(self.speaker[0], user_input, self.speaker[1])
|
response = self.generate(user_input)
|
if response == "[END]":
|
break
|
print(cf.blue("ReBot: " + response))
|
def main():
|
rebot = ReBot()
|
rebot.run()
|
if __name__ == '__main__':
|
main()
|
# <FILESEP>
|
#!/usr/bin/env python
|
# -*- coding: utf-8 -*-
|
"""
|
Do-nothing script for making a release
|
This idea comes from here:
|
https://blog.danslimmon.com/2019/07/15/do-nothing-scripting-the-key-to-gradual-automation/
|
Author: Gertjan van den Burg
|
Date: 2019-07-23
|
"""
|
import os
|
import sys
|
import tempfile
|
import webbrowser
|
import colorama
|
URLS = {
|
"CI": "https://github.com/GjjvdBurg/labella.py/actions",
|
}
|
def colored(msg, color=None, style=None):
|
colors = {
|
"red": colorama.Fore.RED,
|
"green": colorama.Fore.GREEN,
|
"cyan": colorama.Fore.CYAN,
|
"yellow": colorama.Fore.YELLOW,
|
"magenta": colorama.Fore.MAGENTA,
|
None: "",
|
}
|
styles = {
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.