from ex7.Client0 import Client from Client import Client1 from Seq1 import Seq PRACTICE = 2 EXERCISE = 7 print(f"-----| Practice {PRACTICE}, Exercise {EXERCISE} |------") IP = "127.0.0.1" PORT = 8080 c = Client(IP, PORT) PRACTICE = 2 EXERCISE = 6 print(f"-----| Practice {PRACTICE}, Exercise {EXERCISE} |------") c1 = Client1(IP, 8081) s = Seq() s.read_fasta("P2/Sequences/PRAT1.txt") print(f"Gene FRAT1: {s}") count = 0 i = 0 while i < len(s.strbases) and count < 10: print(f"Fragment {count + 1} : {s.strbases[i:i + 10]}") count += 1 i += 1 if count % 2 != 0: print(c.talk(f"Fragment {count} : {s.strbases[i:i + 10]}")) elif count % 2 == 0: print(c1.talk(f"Fragment {count} : {s.strbases[i:i + 10]}")) else: break
from ex7.Client0 import Client from Seq1 import Seq PRACTICE = 2 EXERCISE = 6 print(f"-----| Practice {PRACTICE}, Exercise {EXERCISE} |------") IP = "127.0.0.1" PORT = 8080 c = Client(IP, PORT) s = Seq() s.read_fasta("P2/Sequences/PRAT1.txt") print(f"Gene FRAT1: {s}") count = 0 for i in range(0, len(s.strbases), 10): print(f"Fragment {count + 1} : {s.strbases[i:i+10]}") print(c.talk(s.strbases[i:i + 10])) count += 1 if count == 5: break
from ex7.Client0 import Client from termcolor import colored PRACTICE = 2 EXERCISE = 3 print(f"-----| Practice {PRACTICE}, Exercise {EXERCISE} |------") IP = "127.0.0.1" PORT = 8080 c = Client(IP, PORT) response = c.talk(colored("This is something random", "yellow", )) print("Response: " + response)
from ex7.Client0 import Client from pathlib import Path PRACTICE = 2 EXERCISE = 5 print(f"-----| Practice {PRACTICE}, Exercise {EXERCISE} |------") IP = "127.0.0.1" PORT = 8080 c = Client(IP, PORT) print(c.talk(Path("P2/Sequences/U5.txt").read_text()))