from client0 import Client from Seq1 import Seq print("Practice 2, Exercise 5") #Parameters IP = "192.168.0.29" PORT = 8080 FOLDER = "../Session-04/" filename = FOLDER + 'U5.txt' s = Seq() s.read_fasta(filename) #Create a client object c = Client(IP, PORT) c.debug_talk("Sending the U5 Gene to the server..") c.debug_talk(s)
from client0 import Client from Seq1 import Seq PRACTICE = 2 EXERCISE = 1 print(f"-----| Practice {2}, Exercise {6} |------") IP = "127.0.0.1" PORT = 12000 c = Client(IP, PORT) s = Seq() s.read_fasta('../Session-04/FRAT1.txt') i = 0 count = 0 while i < len(s.str_bases) and count < 5: fragment = s.str_bases[i:i + 10] count += 1 i += 10 fragment_text = "Fragment " + str(count) + ":" + fragment print(fragment_text) print(c.debug_talk(fragment_text))
from client0 import Client PRACTICE = 2 EXERCISE = 4 print(f"-----| Practice {PRACTICE}, Exercise {EXERCISE} |------") IP = "127.0.0.1" PORT = 8080 c = Client(IP, PORT) print(c) c.debug_talk("Message 1---") c.debug_talk("Message 2: Testing !!!")
from client0 import Client # Parameters of the server to talk to PORT = 8080 IP = "192.168.0.29" # Repeat five times for i in range(5): # Create a client object client = Client(IP, PORT) # Send a message to the server client.debug_talk(f"Message {i}")
from client0 import Client from Seq1 import Seq PRACTICE = 2 EXERCISE = 5 print(f"-----| Practice {PRACTICE}, Exercise {EXERCISE} |------") IP = "127.0.0.1" PORT = 8080 c = Client(IP, PORT) print(c) FOLDER = "../Session-04/" GENE = "U5" EXT = ".txt" s = Seq().read_fasta(FOLDER + GENE + EXT) c.debug_talk(f"Sending {GENE} Gene to the server...") c.debug_talk(str(s))
from client0 import Client from pathlib import Path PRACTICE = 2 EXERCISE = 1 print(f"-----| Practice {2}, Exercise {5} |------") IP = "127.0.0.1" PORT = 12000 c = Client(IP, PORT) print(c.debug_talk("Sending the U5 Gene to the server...")) print() print(c.debug_talk(Path("U5.txt").read_text()))
from client0 import Client import termcolor PRACTICE = 2 EXERCISE = 3 print("-----| Practice {PRACTICE} Exercise {EXERCISE} |-----") PORT = 6123 IP = "127.0.0.1" c= Client(IP, PORT) print(c.debug_talk("Hello"))