Skip to content

Instantly share code, notes, and snippets.

from pinotdb import connect
import pandas as pd
import streamlit as st
import numpy as np
import altair as alt
import plotly.express as px
st.title('SpaceX Launch Statistics')
st.markdown("Perform exploratory data analysis on SpaceX launch data set with Apache Pinot")
import psycopg2
import pandas.io.sql as sqlio
import pandas as pd
import dash
from dash import dcc
from dash import html
import plotly.express as px
app = dash.Dash(__name__)
asyncapi: '2.0.0'
info:
title: Metrics Service
version: 1.0.0
description: This service is in charge of providing health data for a computer cluster
servers:
production:
url: 'ws://localhost:8080'
protocol: ws
channels:
curl -H 'Content-Type: application/json' debezium:8083/connectors --data '
{
"name": "shipments-connector",
"config": {
"connector.class": "io.debezium.connector.postgresql.PostgresConnector",
"plugin.name": "pgoutput",
"database.hostname": "postgres",
"database.port": "5432",
"database.user": "postgresuser",
"database.password": "postgrespw",
version: "3.7"
services:
postgres:
image: debezium/postgres:13
ports:
- 5432:5432
healthcheck:
test: "pg_isready -U postgresuser -d shipment_db"
interval: 2s
timeout: 20s
{
"tableName": "steps",
"tableType": "REALTIME",
"segmentsConfig": {
"timeColumnName": "loggedAt",
"timeType": "MILLISECONDS",
"schemaName": "steps",
"replicasPerPartition": "1"
},
"tenants": {},
{
"schemaName": "steps",
"dimensionFieldSpecs": [
{
"name": "userId",
"dataType": "INT"
},
{
"name": "userName",
"dataType": "STRING"
package com.edu.samples;
import com.edu.samples.messagelog.MessageLog;
import com.edu.samples.serde.OrderEvent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import javax.transaction.Transactional;
package com.edu.samples.messagelog;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.time.Instant;
@Entity
@Table(name = "consumed_messages")
public class ConsumedMessage {
@App:name("CreditLimitReaching")
@App:description("Description of the plan")
@Store(type="rdbms",
jdbc.url="jdbc:mysql://localhost:3306/foobank?useSSL=false",
username="root",
password="*****" ,
jdbc.driver.name="com.mysql.jdbc.Driver")
@PrimaryKey("id")