

def 				_UpperCAmelCase							(	a__ = "mytext.txt"     ,  a__ = False):

			'''simple docstring'''



			import socket

			a_	:	Optional[int]          =   1_2_3_1_2  # Reserve a port for your service.
			a_	:	Tuple          =   socket.socket()  # Create a socket object
			a_	:	List[str]          =   socket.gethostname()  # Get local machine name
			sock.bind((host, port))  # Bind to the port
			sock.listen(5)  # Now wait for client connection.

			print("""Server listening....""")

			while True:
						a_       ,				a_	:	str          =   sock.accept()  # Establish connection with client.
						print(f'''Got connection from {addr}''')
						a_	:	Union[str, Any]          =   conn.recv(1_0_2_4)
						print(f'''Server received: {data = }''')

						with open(a__     ,  """rb""") as in_file:
									a_	:	List[str]          =   in_file.read(1_0_2_4)
									while data:
												conn.send(a__)
												print(f'''Sent {data!r}''')
												a_	:	int          =   in_file.read(1_0_2_4)

						print("""Done sending""")
						conn.close()
						if testing:  # Allow the test to complete
									break

			sock.shutdown(1)
			sock.close()


if __name__ == "__main__":
	send_file()





import json

import requests

from .fetch_github_info import AUTHENTICATED_USER_ENDPOINT, fetch_github_info


def 				_UpperCAmelCase							(	a__):

			'''simple docstring'''



			class 					A__:
									"""simple docstring"""






									def __init__(						self     ,			_lowercase						)    ->   None:
												assert isinstance(_lowercase     ,			(bytes, str)						)
												a_	:	List[Any]          =   content





									def  UpperCamelCase__				(						self						)    ->   Optional[Any]:
												return json.loads(self.content						)

			def mock_response(*a__     ,  **a__):
						assert args[0] == AUTHENTICATED_USER_ENDPOINT
						assert "Authorization" in kwargs["headers"]
						assert kwargs["headers"]["Authorization"].startswith("""token """)
						assert "Accept" in kwargs["headers"]
						return FakeResponse(B"""{\"login\":\"test\",\"id\":1}""")

			monkeypatch.setattr(a__     ,  """get"""     ,  a__)
			a_	:	Tuple          =   fetch_github_info("""token""")
			assert result["login"] == "test"
			assert result["id"] == 1


