Skip to content

Instantly share code, notes, and snippets.

View polinabee's full-sized avatar

Polina Berenstein polinabee

  • lvmh
  • paris
View GitHub Profile
@dobl1
dobl1 / help.md
Last active December 6, 2023 15:46
Apidays 2023 - Workshop

Kafka broker URL

pkc-1wvvj.westeurope.azure.confluent.cloud:9092

SASL JAAS Config

org.apache.kafka.common.security.plain.PlainLoginModule required username='WXNMBJESF6TZ52IE' password='opQ9U5RRJNqNtk4mCbAcUWG4C5mez0RpQxixBqfQ0AnBQ8mXVAVMR+b4oGskPY3q';

Topic

apidays

Curl command to open an SSE connection

@polinabee
polinabee / length_of_stay.ipynb
Created December 18, 2020 14:38
Hospital length of stay: data exploration and prediction model
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@polinabee
polinabee / kmeans-implementation.ipynb
Last active December 18, 2020 14:19
K-Means clustering algorithm from scratch
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import pandas as pd
import numpy as np
import datetime
from sklearn import preprocessing
import category_encoders as ce
from sklearn.impute import IterativeImputer
from sklearn.linear_model import BayesianRidge
@polinabee
polinabee / df_to_postgres.py
Last active March 9, 2021 07:58
Pandas Dataframe to PostgreSQL Quick Conversion
import os
import psycopg2
from psycopg2.extras import execute_batch
import pandas as pd
def get_tuples(d):
datadict = d.to_dict('records')
return [tuple(d.values()) for d in datadict]