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
// this function createes a firebase menu | |
function onOpen() { | |
SpreadsheetApp.getUi().createMenu('🔥 Firebase Menu').addItem('Export to firestore', 'main').addToUi(); | |
} | |
function main(){ | |
// get the name of the current spreadsheet | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var sheetName = sheet.getName(); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 kafka import KafkaConsumer | |
consumer = KafkaConsumer( | |
'tutorial',bootstrap_servers=['localhost:9092'], | |
value_deserializer=lambda x: loads(x.decode('utf-8'))) | |
for message in consumer: | |
print(message) |
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 json import dumps | |
from kafka import KafkaProducer | |
# covert data to json and encode it to utf-8 | |
producer = KafkaProducer(bootstrap_servers=['localhost:9092'],value_serializer=lambda x:dumps(x).encode('utf-8')) | |
for e in range(5): | |
data = {'number': e} | |
producer.send('tutorial', value=data) |
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
# This code is from https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html | |
version: '2.2' | |
services: | |
es01: | |
image: docker.elastic.co/elasticsearch/elasticsearch:7.15.2 | |
container_name: es01 | |
environment: | |
- node.name=es01 | |
- cluster.name=es-docker-cluster | |
- discovery.seed_hosts=es02,es03 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder