Skip to content

Instantly share code, notes, and snippets.

View scuddalo's full-sized avatar

Santoash Rajaram scuddalo

View GitHub Profile
```from sklearn.metrics.pairwise import cosine_similarity
from sklearn.preprocessing import StandardScaler, OneHotEncoder
import numpy as np
# Placeholder functions to generate embeddings and scale features
def get_text_embedding(text):
return np.random.rand(1, 300) # Placeholder for NLP model embedding
def scale_numerical_feature(value, feature_name):
# Placeholder for feature scaling, using a dictionary to simulate different scalers for different features

Keybase proof

I hereby claim:

  • I am scuddalo on github.
  • I am santoash (https://keybase.io/santoash) on keybase.
  • I have a public key ASApZ0DHl_3mDBTq5j1X9lYPq9FRq14H1XZf4RXVPDsO7wo

To claim this, I am signing this object:

### Keybase proof
I hereby claim:
* I am scuddalo on github.
* I am santoash (https://keybase.io/santoash) on keybase.
* I have a public key ASApZ0DHl_3mDBTq5j1X9lYPq9FRq14H1XZf4RXVPDsO7wo
To claim this, I am signing this object:
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
alter table aiclaims.di_prediction add column claim_version_id UUID references aiclaims.di_claim_version (claim_version_id) deferrable initially deferred;
CREATE OR REPLACE FUNCTION update_prediction_claim_version()
RETURNS VOID AS $$
DECLARE
rec RECORD;
BEGIN
FOR rec IN SELECT
DISTINCT c1.claim_version_id,
c0.claim_number
steps:
timeDelta:
stepType: timeDelta
cateogry: transformation
input:
- name: datasetId
type: Dataset
- name: columnOne
type: Column
# this refers the dataset this column is associated with
from dask import dataframe
from configs.config import Config
import dask.dataframe as dd
from dask.distributed import Client
import dateparser
class DataFormatStep:
def __init__(self, client: Client):
{
"customerNumber": "510052",
"effectiveDate": "2018-05-11",
"countryCd": "US",
"riskStateCd": "FL",
"pricingTierCd": "Standard",
"insured": {
"corporateName": "Flowers",
"priorYearRevenue": 1,
"sicCode": "11112",
2018-04-01T21:46:37.472-0700 [default-akka.actor.default-dispatcher-4] INFO a.s.s.Logging - [createQuote] [json sent to the partner: {"customerNumber":"510036","effectiveDate":"1970-01-01","countryCd":"US","riskStateCd":"CA","pricingTier":"Standard","insured":{"corporateName":"Mannar and Company","priorYearRevenue":200000,"businessStartedDate":"1970-01-01","numberOfEmployees":4,"address":{"addressLine1":"1 sansome st","addressLine2":"","addressLine3":"","city":"San Francisco","county":"SFO","postalCode":"95012","stateProvCd":"CA","countryCd":"US"}},"contacts":[{"firstName":"Santoash1234","lastName":"Rajaram","middleName":"","genderCd":"female","dateOfBirth":"1970-01-01","email":"1234@email.com","phone":null,"preferredInd":true}],"riskLocations":[{"seqNo":0,"companyLocation":"San Francisco","address":{"addressLine1":"1 sansome st","addressLine2":"","addressLine3":"","city":"San Francisco","county":"SFO","postalCode":"95012","stateProvCd":"CA","countryCd":"US"}},{"seqNo":1,"companyLocation":"Alameda","address"
implicit val handler: LogHandler = {
val sqlLogger = LoggerFactory.getLogger(getClass.getName)
LogHandler {
case Success(s, a, e1, e2) =>
sqlLogger.info(s"""Successful Statement Execution:
| ${s.lines.dropWhile(_.trim.isEmpty).mkString("\n ")}
|
| arguments = [${a.mkString(", ")}]
| elapsed = ${e1.toMillis} ms exec + ${e2.toMillis} ms processing (${(e1 + e2).toMillis} ms total)
""".stripMargin)