This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from time import sleep | |
from kafka import KafkaProducer | |
def generate_logs(topic_name, log_count): | |
producer = KafkaProducer( | |
bootstrap_servers=['localhost:9092'], | |
) | |
data = b'''{ | |
"Beat_name": "kafkabeat_automation", | |
"protocol": "Logrhythm", | |
"sub-protocol": "Globallogic", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/python3 | |
import math | |
import os | |
import random | |
import re | |
import sys | |
# Complete the solve function below. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import sys | |
import time | |
targetArray = ["H",'e','l',"l","o"," ", "W", "o", "r","l","d" ] | |
stringArray = ["","","","","","","","","","",""] | |
i=0 | |
count = 0 | |
while i < len(targetArray): | |
if stringArray[i] != targetArray[i]: |