Skip to content

Instantly share code, notes, and snippets.

Created September 29, 2020 02:08
What would you like to do?
def main():
TCP_IP = "localhost"
TCP_PORT = 9009
conn = None
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((TCP_IP, TCP_PORT))
print("Waiting for TCP connection...")
conn, addr = s.accept()
print("Connected... Starting getting tweets.")
resp = get_tweets()
send_tweets_to_spark(resp, conn)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment