Skip to content

Instantly share code, notes, and snippets.


S R C sroycode

  • Vnaad Technologies LLP
  • Bangalore, India
View GitHub Profile
sroycode / item.txt
Created April 16, 2020 19:37
Testing DuckDB Scripts
View item.txt
2001|1||electronics|Electronics Something Four|DDDDDD|green|M11
2002|2||electronics|Electronics Something Five|PPPP|yellow|F22
2003|3||electronics|Electronics Something Six|AAAAA|orange|U33
2004|4||electronics|Electronics Something Seven|BBBBB|red|M11
2005|5||electronics|Electronics Something Eight|CCCC|violet|F22
2006|6||electronics|Electronics Something Nine|DDDDDD|indigo|U33
2007|7||electronics|Electronics Something Ten|PPPP|blue|M11
2008|8||electronics|Electronics Something One|AAAAA|green|F22
2009|9||electronics|Electronics Something Two|BBBBB|yellow|U33
2010|10||electronics|Electronics Something Three|CCCC|orange|M11
sroycode /
Created June 25, 2018 10:45
DL Distance
static inline int levenshtein_dist(const int depth, const char p, const char c, const unsigned char* term, const int term_len,
const int* irow, const int* jrow, int* krow)
int row_min = std::numeric_limits<int>::max();
const int columns = term_len+1;
krow[0] = jrow[0] + 1;
// Calculate levenshtein distance incrementally (j => column, b => term):