Skip to content

Instantly share code, notes, and snippets.

View kraftaa's full-sized avatar

Maria Dubyaga kraftaa

View GitHub Profile
@kraftaa
kraftaa / replace_transform.sh
Created May 25, 2025 21:00
DBT dry-run workarounds
#!/bin/bash
# Usage: ./replace_transform.sh input.sql
input_file="$1"
filename="${input_file##*/}"
output_file="./tmp/limit_check/${filename%.sql}_limit_0.sql"
# Check input
use super::prelude::*;
use std::collections::HashMap;
use project_schemas::tables::{
orders::dsl as orders_dsl, users::dsl as users_dsl
currencies::dsl as currencies_dsl, taxes::dsl as taxes,
};
#[derive(ParquetRecordWriter)]
struct CombinedOrderRecord {
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
name, age, city, email, gender, postal
Leroy Ramos,49,Vitozehi,holwi@oj.hu,Female,H6M 4M4
Theodore Hubbard,64,Udliem,juba@du.bq,Female,K2U 2B2
Samuel Reyes,39,Zefekrev,nup@lidacda.bg,Male,V1O 9L2
Gary Silva,50,Miwmave,iledavkad@puwvajbi.ee,Male,N8I 0O4
Lucinda Jenkins,58,Fevhisha,evrat@ka.yt,Female,A1X 2X1
Beulah Anderson,63,Lakuuf,welasce@efruduj.lb,Male,G9W 5L8
Dustin Jennings,37,Gephier,red@em.ci,Male,R9O 7I1
Winnie Rowe,24,Rafidu,sipi@al.bv,Female,J4A 2G2
Christian Newman,64,Mabwahjo,ela@wasva.fo,Female,J4E 9T2
Dan 34 2548 Lovin it!
Maria 55 5054 Good, delicious food
Carlos 22 4352 I am "pleased", but could be better
Stephany 34 6542 I want bigger steaks!!!!!
def get_best_squad_n(formation, nationality, measurement = 'Overall'):
FIFA18_copy = FIFA18.copy()
FIFA18_copy = FIFA18_copy[FIFA18_copy['Nationality'] == nationality]
store = []
for i in formation:
store.append([
FIFA18_copy.loc[[FIFA18_copy[FIFA18_copy['Position'].str.contains(i)][measurement].idxmax()]]['Position'].to_string(index = False),
FIFA18_copy.loc[[FIFA18_copy[FIFA18_copy['Position'].str.contains(i)][measurement].idxmax()]]['Name'].to_string(index = False),
FIFA18_copy[FIFA18_copy['Position'].str.contains(i)][measurement].max(),
import torch
infersent = torch.load('InferSent/encoder/infersent.allnli.pickle', map_location=lambda storage, loc: storage)
infersent.set_glove_path("InferSent/dataset/GloVe/glove.840B.300d.txt")
infersent.build_vocab(sentences, tokenize=True)
dict_embeddings = {}
for i in range(len(sentences)):
print(i)