This file contains hidden or 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 confluent_kafka import Producer | |
class SimpleProducer: | |
def __init__(self, brokers: str): | |
config = {'bootstrap.servers': brokers, 'queue.buffering.max.ms': 1, | |
'message.send.max.retries': 5, 'retry.backoff.ms': 200, | |
'message.max.bytes': 104857600, | |
'default.topic.config': {'request.required.acks': 'all'}} |
This file contains hidden or 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 confluent_kafka import Consumer, KafkaError, OFFSET_BEGINNING | |
class SimpleConsumer: | |
def __init__(self, brokers: str, topic: str, consumer_group: str): | |
self.topic = topic | |
self.config = { | |
'bootstrap.servers': brokers, | |
'group.id': consumer_group, |
This file contains hidden or 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
#!./.venv/bin/python3 | |
from confluent_kafka import Consumer, KafkaException | |
import sys | |
import getopt | |
import json | |
import logging | |
from pprint import pformat | |
config = { |
This file contains hidden or 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
BASEDIR=$(shell basename $(PWD)) | |
PRJ_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))) | |
SSH_HOST=h4 | |
GROUP=ss1 | |
OFFSET=0 | |
KB= | |
ifeq '$(shell hostname -s)' 'hadoop-prod-04' | |
KB=@docker run -it -v "/home/driode01/kafka-area/":/stuff/ --network=host confluentinc/cp-kafka |
This file contains hidden or 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
BASEDIR=$(shell basename $(PWD)) | |
PRJ_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))) | |
SSH_HOST=h4 | |
GROUP=ss1 | |
OFFSET=0 | |
KB="" | |
ifeq '$(shell hostname -s)' 'hadoop-prod-04' | |
KB=@docker run -it -v "/home/driode01/kafka-area/":/stuff/ --network=host confluentinc/cp-kafka |
This file contains hidden or 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_DIR=./bin | |
L4J_ID=CVE-2021-44228 | |
# To make sure some binaries exists in path | |
BINARIES = curl sh python3 | |
K := $(foreach exec,$(BINARIES),\ | |
$(if $(shell which $(exec)),some string,$(error "No $(exec) in PATH"))) | |
define PARSE | |
import json |
This file contains hidden or 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_DIR=./bin | |
# To make sure some binaries exists in path | |
BINARIES = curl sh python3 | |
K := $(foreach exec,$(BINARIES),\ | |
$(if $(shell which $(exec)),some string,$(error "No $(exec) in PATH"))) | |
all: as_root deps root_grype.json output.txt | |
output.txt: ./parser.py |
This file contains hidden or 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
INFO Successfully compiled program. | |
Found multiple options, please choose one: | |
[1] /dev/cu.usbmodem101NTLE2B8162 (USB Controls) | |
[2] /dev/cu.usbserial-13410 (USB2.0-Ser!) | |
[3] /dev/cu.usbserial-ABSCDZBH (FT232R USB UART) | |
[4] Over The Air (sonoff_s31.local) | |
(number): 3 | |
esptool.py v3.2 | |
Serial port /dev/cu.usbserial-ABSCDZBH | |
Connecting.... |
This file contains hidden or 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
Hi, | |
This is actually populating a view in the DW, not sure what format it’s expecting. Question for Mike or Larry perhaps? I don’t think anything fails until Tableau tries to create the extract, so it’s not the DW getting angry about the format, it’s Tableau. | |
SQL below: | |
create or replace view vaccine_vw | |
(email, vax1, vax_dt1, vax_dt2, response_date, emplid, utln, last_name, first_name, pref_phone, tufts_email, person_type, campus, employee_home_dept_ld, school, academic_career, risk, deptid, supervisor_name, employee_jobtitle, hire_dt, type_of_entry, date_approved, vax_source) | |
as | |
with |
This file contains hidden or 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
# Connects the DW table names to qualtrics csv column names | |
links = { | |
"Q2_DOCUMENT_LINK": 'Q2_Id', | |
"Q2_DOCUMENT_NAME": 'Q2_Name', | |
"Q14_DOCUMENT_LINK": 'Q14_Id', | |
"Q14_DOCUMENT_NAME": 'Q14_Name', | |
"Q15_DOCUMENT_LINK": 'Q15_Id', | |
"Q15_DOCUMENT_NAME": 'Q15_Name', | |
"Q18_AFFILIATION": 'Q18_3', | |
"Q18_DISPLAY_EMAIL": 'Q18_2', |