koutch commited on
Commit
f6d6467
·
1 Parent(s): 007405f

Upload 13 files

Browse files
README.md CHANGED
@@ -22,13 +22,13 @@ dataset_info:
22
  dtype: int32
23
  splits:
24
  - name: train
25
- num_bytes: 4411899
26
  num_examples: 7486
27
  - name: test
28
- num_bytes: 7737271
29
  num_examples: 14259
30
- download_size: 15755966
31
- dataset_size: 12149170
32
  - config_name: singapore_data
33
  features:
34
  - name: submission_id
@@ -112,13 +112,13 @@ dataset_info:
112
  dtype: string
113
  splits:
114
  - name: train
115
- num_bytes: 18982
116
  num_examples: 36
117
  - name: test
118
- num_bytes: 17402
119
  num_examples: 35
120
- download_size: 41871
121
- dataset_size: 36384
122
  - config_name: singapore_metadata
123
  features:
124
  - name: assignment_id
@@ -137,6 +137,46 @@ dataset_info:
137
  num_examples: 5
138
  download_size: 6139
139
  dataset_size: 5577
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
140
  ---
141
 
142
  # Dataset Card for intro_prog
 
22
  dtype: int32
23
  splits:
24
  - name: train
25
+ num_bytes: 4412068
26
  num_examples: 7486
27
  - name: test
28
+ num_bytes: 7737585
29
  num_examples: 14259
30
+ download_size: 15756562
31
+ dataset_size: 12149653
32
  - config_name: singapore_data
33
  features:
34
  - name: submission_id
 
112
  dtype: string
113
  splits:
114
  - name: train
115
+ num_bytes: 18983
116
  num_examples: 36
117
  - name: test
118
+ num_bytes: 17403
119
  num_examples: 35
120
+ download_size: 41873
121
+ dataset_size: 36386
122
  - config_name: singapore_metadata
123
  features:
124
  - name: assignment_id
 
137
  num_examples: 5
138
  download_size: 6139
139
  dataset_size: 5577
140
+ - config_name: newcaledonia_metadata
141
+ features:
142
+ - name: assignment_id
143
+ dtype: string
144
+ - name: func_name
145
+ dtype: string
146
+ - name: reference_solution
147
+ dtype: string
148
+ - name: description
149
+ dtype: string
150
+ - name: test
151
+ dtype: string
152
+ splits:
153
+ - name: train
154
+ num_bytes: 9053
155
+ num_examples: 9
156
+ download_size: 9760
157
+ dataset_size: 9053
158
+ - config_name: newcaledonia_data
159
+ features:
160
+ - name: submission_id
161
+ dtype: int32
162
+ - name: func_code
163
+ dtype: string
164
+ - name: assignment_id
165
+ dtype: string
166
+ - name: func_name
167
+ dtype: string
168
+ - name: description
169
+ dtype: string
170
+ - name: test
171
+ dtype: string
172
+ - name: correct
173
+ dtype: bool
174
+ splits:
175
+ - name: train
176
+ num_bytes: 932024
177
+ num_examples: 1201
178
+ download_size: 1198518
179
+ dataset_size: 932024
180
  ---
181
 
182
  # Dataset Card for intro_prog
data/dublin_data_test.jsonl CHANGED
The diff for this file is too large to render. See raw diff
 
data/dublin_data_train.jsonl CHANGED
The diff for this file is too large to render. See raw diff
 
data/dublin_metadata_test.jsonl CHANGED
@@ -27,7 +27,7 @@
27
  {"assignment_id":"append2list","func_name":"append2list","reference_solution":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2\n\n","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]"}
28
  {"assignment_id":"search_iter","func_name":"search","reference_solution":"def search(str,letter):\n '''returns True if letter is in str, False if it is not there'''\n i = 0\n while i < len(str):\n if letter == str[i]:\n return True\n i = i + 1\n return False\n\n","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True"}
29
  {"assignment_id":"index_iter","func_name":"index","reference_solution":"def index(str,letter):\n '''returns the position of letter in str, -1 if it is not there'''\n i = 0\n while i < len(str):\n if letter == str[i]:\n return i\n i = i + 1\n return -1\n\n\n","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0"}
30
- {"assignment_id":"fibonacci_iter","func_name":"fibonacci","reference_solution":"def fibonacci(n):\n '''returns the value of the fibonacci series at position n'''\n if n == 0:\n return 0\n if n == 1:\n return 1\n else:\n fibN_2 = 0\n fibN_1 = 1\n i = 2\n while i <=n:\n fibN = fibN_2 + fibN_1\n fibN_2 = fibN_1\n fibN_1 = fibN\n i = i + 1\n return fibN\n\n","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657"}
31
  {"assignment_id":"search_recur","func_name":"search","reference_solution":"def search(str,letter):\n '''returns True if letter is in str, False otherwise'''\n if str == \"\":\n return False\n elif str[0] == letter:\n return True\n else:\n #keep looking\n return search(str[1:],letter)\n \n\n","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True"}
32
  {"assignment_id":"index_recur","func_name":"index","reference_solution":"def index(str,letter,pos):\n '''returns the position of letter in str, -1 if it is not there'''\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str,letter,pos+1)\n\n\n","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2"}
33
  {"assignment_id":"fibonacci_recur","func_name":"fibonacci","reference_solution":"def fibonacci(n):\n '''returns the value of the fibonacci series at position n'''\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n-1) + fibonacci(n-2)\n\n","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657"}
 
27
  {"assignment_id":"append2list","func_name":"append2list","reference_solution":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2\n\n","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]"}
28
  {"assignment_id":"search_iter","func_name":"search","reference_solution":"def search(str,letter):\n '''returns True if letter is in str, False if it is not there'''\n i = 0\n while i < len(str):\n if letter == str[i]:\n return True\n i = i + 1\n return False\n\n","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True"}
29
  {"assignment_id":"index_iter","func_name":"index","reference_solution":"def index(str,letter):\n '''returns the position of letter in str, -1 if it is not there'''\n i = 0\n while i < len(str):\n if letter == str[i]:\n return i\n i = i + 1\n return -1\n\n\n","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0"}
30
+ {"assignment_id":"fibonacci_iter","func_name":"fibonacci","reference_solution":"def fibonacci(n):\n '''returns the value of the fibonacci series at position n'''\n if n == 0:\n return 0\n if n == 1:\n return 1\n else:\n fibN_2 = 0\n fibN_1 = 1\n i = 2\n while i <=n:\n fibN = fibN_2 + fibN_1\n fibN_2 = fibN_1\n fibN_1 = fibN\n i = i + 1\n return fibN\n\n","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(1)==1 and fibonacci(41)==165580141 and fibonacci(3)==2 and fibonacci(91)==4660046610375530309"}
31
  {"assignment_id":"search_recur","func_name":"search","reference_solution":"def search(str,letter):\n '''returns True if letter is in str, False otherwise'''\n if str == \"\":\n return False\n elif str[0] == letter:\n return True\n else:\n #keep looking\n return search(str[1:],letter)\n \n\n","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True"}
32
  {"assignment_id":"index_recur","func_name":"index","reference_solution":"def index(str,letter,pos):\n '''returns the position of letter in str, -1 if it is not there'''\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str,letter,pos+1)\n\n\n","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2"}
33
  {"assignment_id":"fibonacci_recur","func_name":"fibonacci","reference_solution":"def fibonacci(n):\n '''returns the value of the fibonacci series at position n'''\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n-1) + fibonacci(n-2)\n\n","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657"}
data/dublin_metadata_train.jsonl CHANGED
@@ -30,7 +30,7 @@
30
  {"assignment_id":"append2list","func_name":"append2list","reference_solution":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2\n\n","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]"}
31
  {"assignment_id":"search_iter","func_name":"search","reference_solution":"def search(str,letter):\n '''returns True if letter is in str, False if it is not there'''\n i = 0\n while i < len(str):\n if letter == str[i]:\n return True\n i = i + 1\n return False\n\n","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True"}
32
  {"assignment_id":"index_iter","func_name":"index","reference_solution":"def index(str,letter):\n '''returns the position of letter in str, -1 if it is not there'''\n i = 0\n while i < len(str):\n if letter == str[i]:\n return i\n i = i + 1\n return -1\n\n\n","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0"}
33
- {"assignment_id":"fibonacci_iter","func_name":"fibonacci","reference_solution":"def fibonacci(n):\n '''returns the value of the fibonacci series at position n'''\n if n == 0:\n return 0\n if n == 1:\n return 1\n else:\n fibN_2 = 0\n fibN_1 = 1\n i = 2\n while i <=n:\n fibN = fibN_2 + fibN_1\n fibN_2 = fibN_1\n fibN_1 = fibN\n i = i + 1\n return fibN\n\n","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657"}
34
  {"assignment_id":"search_recur","func_name":"search","reference_solution":"def search(str,letter):\n '''returns True if letter is in str, False otherwise'''\n if str == \"\":\n return False\n elif str[0] == letter:\n return True\n else:\n #keep looking\n return search(str[1:],letter)\n \n\n","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True"}
35
  {"assignment_id":"index_recur","func_name":"index","reference_solution":"def index(str,letter,pos):\n '''returns the position of letter in str, -1 if it is not there'''\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str,letter,pos+1)\n\n\n","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2"}
36
  {"assignment_id":"fibonacci_recur","func_name":"fibonacci","reference_solution":"def fibonacci(n):\n '''returns the value of the fibonacci series at position n'''\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n-1) + fibonacci(n-2)\n\n","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657"}
 
30
  {"assignment_id":"append2list","func_name":"append2list","reference_solution":"def append2list(l1, l2=None):\n if l2 == None:\n l2 = []\n for i in l1:\n l2.append(i)\n return l2\n\n","description":"Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.","test":"assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]"}
31
  {"assignment_id":"search_iter","func_name":"search","reference_solution":"def search(str,letter):\n '''returns True if letter is in str, False if it is not there'''\n i = 0\n while i < len(str):\n if letter == str[i]:\n return True\n i = i + 1\n return False\n\n","description":"Iteratively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True"}
32
  {"assignment_id":"index_iter","func_name":"index","reference_solution":"def index(str,letter):\n '''returns the position of letter in str, -1 if it is not there'''\n i = 0\n while i < len(str):\n if letter == str[i]:\n return i\n i = i + 1\n return -1\n\n\n","description":"Iteratively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0')==-1 and index('0','0')==0 and index('11','1')==0"}
33
+ {"assignment_id":"fibonacci_iter","func_name":"fibonacci","reference_solution":"def fibonacci(n):\n '''returns the value of the fibonacci series at position n'''\n if n == 0:\n return 0\n if n == 1:\n return 1\n else:\n fibN_2 = 0\n fibN_1 = 1\n i = 2\n while i <=n:\n fibN = fibN_2 + fibN_1\n fibN_2 = fibN_1\n fibN_1 = fibN\n i = i + 1\n return fibN\n\n","description":"Iteratively compute the value of the fibonacci series at position n.","test":"assert fibonacci(1)==1 and fibonacci(41)==165580141 and fibonacci(3)==2 and fibonacci(91)==4660046610375530309"}
34
  {"assignment_id":"search_recur","func_name":"search","reference_solution":"def search(str,letter):\n '''returns True if letter is in str, False otherwise'''\n if str == \"\":\n return False\n elif str[0] == letter:\n return True\n else:\n #keep looking\n return search(str[1:],letter)\n \n\n","description":"Recursively search for a letter in a string","test":"assert search('','0')==False and search('0','0')==True and search('ERFE0Rfsef','0')==True and search('ERFERfsef0','0')==True and search('','a')==False and search('cbzeycuzbvyzuvb','a')==False and search('cbsducsvdbcyts','c')==True and search('dbzeducvbzy','y')==True and search('xqvsgxcutvy','u')==True"}
35
  {"assignment_id":"index_recur","func_name":"index","reference_solution":"def index(str,letter,pos):\n '''returns the position of letter in str, -1 if it is not there'''\n if pos == len(str):\n return -1\n elif str[pos] == letter:\n return pos\n else:\n return index(str,letter,pos+1)\n\n\n","description":"Recursively search for the position of letter in str, return -1 if it is not there.","test":"assert index('','0',0)==-1 and index('0','0',0)==0 and index('a','8',0)==-1 and index('tV2','2',0)==2"}
36
  {"assignment_id":"fibonacci_recur","func_name":"fibonacci","reference_solution":"def fibonacci(n):\n '''returns the value of the fibonacci series at position n'''\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n-1) + fibonacci(n-2)\n\n","description":"Recursively compute the value of the fibonacci series at position n.","test":"assert fibonacci(0)==0 and fibonacci(1)==1 and fibonacci(2)==1 and fibonacci(10)==55 and fibonacci(23)==28657"}
data/newcaledonia_data_train.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
data/newcaledonia_metadata_train.jsonl ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {"assignment_id":"mean","func_name":"moyenne","reference_solution":"def moyenne(liste):\n\tif len(liste)==0:\n\t\tres=None\n\telse:\n\t\tres=0\n\t\tfor elem in liste:\n\t\t\tres+=elem\n\t\tres=res\/len(liste)\n\treturn res\n","description":"Return the mean of a list of numbers.","test":"assert moyenne([5, 15])==10.0 and moyenne([-6, -4, -2, 0])==-3.0 and moyenne([])==None and moyenne([])==None and moyenne([12, 1, 25, 7])==11.25 and moyenne([-3, 7, 18, -12])==2.5 and moyenne([-12, -1, -25, -7])==-11.25"}
2
+ {"assignment_id":"minimum","func_name":"minimum","reference_solution":"def minimum(liste):\n if len(liste)==0:\n return None\n res=liste[0]\n for i in range(1,len(liste)):\n if liste[i]<res:\n res=liste[i]\n return res\n","description":"Return the minimum element in a list of numbers.","test":"assert minimum([12, 1, 25, 7])==1 and minimum([-3, 7, 18, -12])==-12 and minimum([-12, -1, -25, -7])==-25 and minimum([])==None and minimum([])==None"}
3
+ {"assignment_id":"maximum","func_name":"maximum","reference_solution":"def maximum(liste):\n if len(liste)==0:\n return None\n res=liste[0]\n for i in range(1,len(liste)):\n if liste[i]>res:\n res=liste[i]\n return res\n","description":"Return the maximum element in a list of numbers.","test":"assert maximum([12, 1, 25, 7])==25 and maximum([-3, 7, 18, -12])==18 and maximum([-12, -1, -25, -7])==-1 and maximum([])==None and maximum([])==None"}
4
+ {"assignment_id":"sum","func_name":"somme","reference_solution":"def somme(liste):\n res=0\n for elem in liste:\n\t res=res+elem\n return res\n","description":"Return the sum of the elements in a list.","test":"assert somme([12, 1, 25, 7])==45 and somme([-3, 7, 18, -12])==10 and somme([-12, -1, -25, -7])==-45 and somme([])==0"}
5
+ {"assignment_id":"decreasing_list","func_name":"listeDecroissante","reference_solution":"def listeDecroissante(scores):#exo2\n \"\"\"renvoie True si la liste est tri\u00e9e dans l'ordre d\u00e9croissant (False sinon)\"\"\"\n ok=True\n i=0\n while i<len(scores)-1 and ok:\n if scores[i]<scores[i+1]:\n ok=False\n i+=1\n return ok\n","description":"Check whether a list is sorted in descending order.","test":"assert listeDecroissante([352100, 325410, 312785, 220199, 127853])==True and listeDecroissante([352100, 325410, 312785, 127853, 220199])==False and listeDecroissante([])==True and listeDecroissante([0, 2])==False and listeDecroissante([0])==True and listeDecroissante([-100, -50, 0])==False and listeDecroissante([-100, -200, -300])==True"}
6
+ {"assignment_id":"is_palindrome","func_name":"motPalindrome","reference_solution":"def motPalindrome(mot):\n ok=True\n i=0\n while i<len(mot)\/\/2 and ok:\n if mot[i]!=mot[-1-i]:\n ok=False\n i+=1\n return ok\n","description":"Check whether a word is a palindrome.","test":"assert motPalindrome('radar')==True and motPalindrome('')==True and motPalindrome('python')==False and motPalindrome('anna')==True and motPalindrome('abcdefghhgfedcba')==True and motPalindrome('abcdefghhgfedcbb')==False and motPalindrome('abcdefghigfedcba')==False"}
7
+ {"assignment_id":"symetrical_list","func_name":"listeSymetrique","reference_solution":"def listeSymetrique(l):\n res=True\n i=0\n while i<len(l)\/\/2 and res:\n if l[i]!=l[-(i+1)]:\n res=False\n i+=1\n return res\n","description":"Check whether a list is symmetrical.","test":"assert listeSymetrique([1, 2, 3, 2, 1])==True and listeSymetrique([1, 2, 3, 1])==False and listeSymetrique([])==True and listeSymetrique([8, 1, 4, 198, 7, -65, 90, -2, 90, -65, 7, 198, 4, 1, 8])==True and listeSymetrique([8, 1, 4, 198, 7, -65, 90, -2, -2, 90, -65, 7, 198, 4, 1, 8])==True and listeSymetrique([8, 3, -2, 1, 8])==False and listeSymetrique([8, 3, -2, -2, 1, 8])==False"}
8
+ {"assignment_id":"sum_even_numbers","func_name":"sommeNbPairs","reference_solution":"def sommeNbPairs(liste):\n res=0\n for x in liste:\n if x%2==0:\n res+=x\n return res\n","description":"Return the sum of the even numbers in a list.","test":"assert sommeNbPairs([12, 13, 6, 5, 7])==18 and sommeNbPairs([])==0 and sommeNbPairs([13, 15, -3, 711])==0 and sommeNbPairs([1224, -728])==496 and sommeNbPairs([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999])==249500"}
9
+ {"assignment_id":"sum_n_first_even","func_name":"sommeNPremiersEntiersPairs","reference_solution":"def sommeNPremiersEntiersPairs(n):\n res=0\n for x in range(1,n+1):\n\t if x%2==0:\n\t\t res+=x\n return res\n","description":"Returns the sum of the n first even numbers.","test":"assert sommeNPremiersEntiersPairs(1)==0 and sommeNPremiersEntiersPairs(3)==2 and sommeNPremiersEntiersPairs(5)==6 and sommeNPremiersEntiersPairs(-2)==0 and sommeNPremiersEntiersPairs(0)==0 and sommeNPremiersEntiersPairs(10)==30 and sommeNPremiersEntiersPairs(124)==3906 and sommeNPremiersEntiersPairs(-5)==0"}
intro_prog.py CHANGED
@@ -104,6 +104,15 @@ _SINGAPORE_URLS = {
104
  }
105
  }
106
 
 
 
 
 
 
 
 
 
 
107
  _URLS = {
108
  "dublin": _DUBLIN_URLS,
109
  "singapore": _SINGAPORE_URLS
@@ -134,8 +143,11 @@ class IntroProg(datasets.GeneratorBasedBuilder):
134
 
135
  sources = ["dublin", "singapore"]
136
 
 
 
 
137
  BUILDER_CONFIGS = []
138
- for (task, description), source in product(tasks, sources):
139
  BUILDER_CONFIGS.append(
140
  IntroProgConfig(
141
  name=f"{source}_{task}",
 
104
  }
105
  }
106
 
107
+ NEW_CALEDONIA_URLS = {
108
+ "metadata": {
109
+ "train": "./data/newcaledonia_metadata_train.jsonl",
110
+ },
111
+ "data": {
112
+ "train": f"./data/newcaledonia_data_train.jsonl",
113
+ },
114
+ }
115
+
116
  _URLS = {
117
  "dublin": _DUBLIN_URLS,
118
  "singapore": _SINGAPORE_URLS
 
143
 
144
  sources = ["dublin", "singapore"]
145
 
146
+ configurations = list(product(tasks, sources))
147
+ configurations.append((tasks[0], "newcaledonia"))
148
+
149
  BUILDER_CONFIGS = []
150
+ for (task, description), source in configurations:
151
  BUILDER_CONFIGS.append(
152
  IntroProgConfig(
153
  name=f"{source}_{task}",