Skip to content

Instantly share code, notes, and snippets.

View mmerce's full-sized avatar
💭
Maintaining BigML bindings

Mercè Martín-Prats mmerce

💭
Maintaining BigML bindings
View GitHub Profile
@mmerce
mmerce / movies.csv
Created June 20, 2022 11:49
Movies data
user_id gender age_range occupation zipcode movie_id title genres rating
1 Female Under 18 K-12 student 48067 1193 One Flew Over the Cuckoo's Nest (1975) Drama 5
1 Female Under 18 K-12 student 48067 661 James and the Giant Peach (1996) Animation$Children's$Musical 3
1 Female Under 18 K-12 student 48067 914 My Fair Lady (1964) Musical$Romance 3
1 Female Under 18 K-12 student 48067 3408 Erin Brockovich (2000) Drama 4
1 Female Under 18 K-12 student 48067 2355 Bug's Life, A (1998) Animation$Children's$Comedy 5
1 Female Under 18 K-12 student 48067 1197 Princess Bride, The (1987) Action$Adventure$Comedy$Romance 3
1 Female Under 18 K-12 student 48067 1287 Ben-Hur (1959) Action$Adventure$Drama 5
1 Female Under 18 K-12 student 48067 2804 Christmas Story, A (1983) Comedy$Drama 5
1 Female Under 18 K-12 student 48067 594 Snow White and the Seven Dwarfs (1937) Animation$Children's$Musical 4
@mmerce
mmerce / movies.csv
Last active March 15, 2021 13:35
Example of raw movies rating data
user_id gender age_range occupation zipcode movie_id title genres rating
1 Female Under 18 K-12 student 48067 1193 One Flew Over the Cuckoo's Nest (1975) Drama 5
1 Female Under 18 K-12 student 48067 661 James and the Giant Peach (1996) Animation$Children's$Musical 3
1 Female Under 18 K-12 student 48067 914 My Fair Lady (1964) Musical$Romance 3
1 Female Under 18 K-12 student 48067 3408 Erin Brockovich (2000) Drama 4
1 Female Under 18 K-12 student 48067 2355 Bug's Life, A (1998) Animation$Children's$Comedy 5
1 Female Under 18 K-12 student 48067 1197 Princess Bride, The (1987) Action$Adventure$Comedy$Romance 3
1 Female Under 18 K-12 student 48067 1287 Ben-Hur (1959) Action$Adventure$Drama 5
1 Female Under 18 K-12 student 48067 2804 Christmas Story, A (1983) Comedy$Drama 5
1 Female Under 18 K-12 student 48067 594 Snow White and the Seven Dwarfs (1937) Animation$Children's$Musical 4
@mmerce
mmerce / sum.json
Last active May 19, 2020 21:32
Basic example of WhizzML code for tests
{"inputs": [{"type": "number",
"name": "a",
"default": 1},
{"type": "number",
"name": "b",
"default": 1}],
"outputs": [{"type": "number",
"name": "sum"}]}
@mmerce
mmerce / sum.json
Created May 19, 2020 16:00
Basic example of WhizzML code for tests
{"inputs": [{"type": "numeric",
"name": "a"},
{"type": "numeric",
"name": "b"}],
"outputs": [{"type": "numeric",
"name": "sum"}]}
@mmerce
mmerce / execute_scripts_3.whizzml
Created April 24, 2019 21:44
WhizzML executes WhizzML
;; Creating and executing dependent scripts in a pipeline
;; script2 uses the output of an execution of script1 directly as input
;; and multiplies it by another input.
;; As one script uses the execution of the previous script, they will be executed
;; in a sequence
;; creating a first script that adds two numbers
(define script1 (create-script {"source_code" "(define sum (+ a b))"
"name" "Sum script"
"inputs" [{"type" "number" "name" "a"}
@mmerce
mmerce / execute_scripts_2.whizzml
Created April 24, 2019 21:43
WhizzML executes WhizzML
;; Creating and executing dependent scripts.
;; script2 uses the output of an execution of script1 to multiply it by a number
;; As one script uses the execution of the previous script, they will be executed
;; in a sequence
;; creating the first script to add two numbers
(define script1 (create-script {"source_code" "(define sum (+ a b))"
"name" "Sum script"
"inputs" [{"type" "number" "name" "a"}
{"type" "number" "name" "b"}]
@mmerce
mmerce / execute_scripts_1.whizzml
Last active April 24, 2019 21:46
WhizzML executes WhizzML
;; Creating two scripts to be run together in the same execution
;; The scripts share no data and are not related, so they can be executed in parallel
;; the parameter for the execution is a list of maps describing each script
;; and its inputs
;; creating the first script to add two numbers
(define script1 (create-script {"source_code" "(+ a b)"
"name" "Sum script"
"inputs" [{"type" "number" "name" "a"}
{"type" "number" "name" "b"}]}))
@mmerce
mmerce / pick_row_in_group.json
Last active January 25, 2019 21:22
Filtering a random row in a group
{
"name": "Pick random row in group",
"description": "Selects one of the rows (at random) from the ones grouped by a list of fields",
"inputs": [
{
"name": "dataset-id",
"type": "dataset-id",
"description": "The original dataset id to be filtered"
},
{
@mmerce
mmerce / batch_centroids.json
Last active November 7, 2018 22:26
Batch centroids distances to all centroids
{
"name": "Batch centroid distances",
"description": "It creates a dataset with the distances to all centroids in a cluster",
"inputs": [
{
"name": "cluster-id",
"type": "cluster-id",
"description": "Cluster"
},
{
@mmerce
mmerce / truncate_categories.json
Last active November 4, 2018 20:52
truncating categories in dataset fields
{
"name": "Truncating text fields to categories",
"description": "It creates a dataset with the selected first n categories in the fields provided",
"inputs": [
{
"name": "source-id",
"type": "source-id",
"description": "Data source"
},
{