<s> """<STR_LIT>""" <EOL> import collections <EOL> import raco . scheme as scheme <EOL> import raco . myrial . myrial_test as myrial_test <EOL> from raco import types <EOL> class KmeansTest ( myrial_test . MyrialTestCase ) : <EOL> points = [ ( <NUM_LIT:1> , <NUM_LIT:1.0> , <NUM_LIT:1.0> ) , ( <NUM_LIT:2> , <NUM_LIT> , <NUM_LIT> ) , ( <NUM_LIT:3> , <NUM_LIT> , <NUM_LIT> ) , ( <NUM_LIT:4> , <NUM_LIT> , <NUM_LIT> ) , <EOL> ( <NUM_LIT:5> , <NUM_LIT> , <NUM_LIT> ) , ( <NUM_LIT:6> , <NUM_LIT> , <NUM_LIT> ) , ( <NUM_LIT:7> , <NUM_LIT> , <NUM_LIT> ) , <EOL> ( <NUM_LIT:8> , <NUM_LIT> , <NUM_LIT> ) , ( <NUM_LIT:9> , <NUM_LIT> , <NUM_LIT> ) ] <EOL> points_table = collections . Counter ( points ) <EOL> points_schema = scheme . Scheme ( [ ( '<STR_LIT:id>' , types . LONG_TYPE ) , <EOL> ( '<STR_LIT:x>' , types . DOUBLE_TYPE ) , <EOL> ( '<STR_LIT:y>' , types . DOUBLE_TYPE ) ] ) <EOL> points_key = "<STR_LIT>" <EOL> def setUp ( self ) : <EOL> super ( KmeansTest , self ) . setUp ( ) <EOL> self . db . ingest ( KmeansTest . points_key , <EOL> KmeansTest . points_table , <EOL> KmeansTest . points_schema ) <EOL> def test_kmeans ( self ) : <EOL> with open ( '<STR_LIT>' ) as fh : <EOL> query = fh . read ( ) <EOL> self . execute_query ( query , skip_json = True ) </s>
