Upload dataset_base.jsonl with huggingface_hub
Browse files- dataset_base.jsonl +61 -23
dataset_base.jsonl
CHANGED
|
@@ -1,27 +1,62 @@
|
|
| 1 |
{"id":"base_java_01","dataset_type":"base","language":"Java","task_category":"scaffolding",
|
| 2 |
-
"prompt_en":"
|
| 3 |
-
"prompt_nl":"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
"code_snippet_input":"",
|
| 5 |
-
"canonical_solution":"
|
| 6 |
-
"unit_test_setup":"import
|
| 7 |
-
"unit_test_assertion":"
|
| 8 |
}
|
| 9 |
-
{"id":"base_java_02","dataset_type":"base","language":"Java","task_category":"elem_func","prompt_en":"","prompt_nl":"","code_snippet_input":"","canonical_solution":"","unit_test_setup":"","unit_test_assertion":""}
|
| 10 |
{"id":"base_java_03","dataset_type":"base","language":"Java","task_category":"id_bug",
|
| 11 |
-
"prompt_en":"why am I getting a
|
| 12 |
-
"prompt_nl":"
|
| 13 |
-
"code_snippet_input":"","
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
{"id":"base_java_07","dataset_type":"base","language":"Java","task_category":"fix_bug","prompt_en":"","prompt_nl":"","code_snippet_input":"","canonical_solution":"","unit_test_setup":"","unit_test_assertion":""}
|
| 18 |
{"id":"base_java_08","dataset_type":"base","language":"Java","task_category":"fix_bug","prompt_en":"","prompt_nl":"","code_snippet_input":"","canonical_solution":"","unit_test_setup":"","unit_test_assertion":""}
|
| 19 |
{"id":"base_java_09","dataset_type":"base","language":"Java","task_category":"architecture","prompt_en":"","prompt_nl":"","code_snippet_input":"","canonical_solution":"","unit_test_setup":"","unit_test_assertion":""}
|
| 20 |
{"id":"base_java_10","dataset_type":"base","language":"Java","task_category":"refactoring",
|
| 21 |
-
"prompt_en":"
|
| 22 |
-
"prompt_nl":"
|
| 23 |
-
"code_snippet_input":"public static
|
| 24 |
-
"canonical_solution":"",
|
|
|
|
|
|
|
|
|
|
| 25 |
{"id":"base_java_11","dataset_type":"base","language":"Java","task_category":"refactoring","prompt_en":"","prompt_nl":"","code_snippet_input":"","canonical_solution":"","unit_test_setup":"","unit_test_assertion":""}
|
| 26 |
{"id":"base_java_12","dataset_type":"base","language":"Java","task_category":"refactoring","prompt_en":"","prompt_nl":"","code_snippet_input":"","canonical_solution":"","unit_test_setup":"","unit_test_assertion":""}
|
| 27 |
|
|
@@ -45,8 +80,8 @@
|
|
| 45 |
{"id":"base_python_09","dataset_type":"base","language":"Python","task_category":"fix_bug","prompt_en":"","prompt_nl":"","code_snippet_input":"","canonical_solution":"","unit_test_setup":"","unit_test_assertion":""}
|
| 46 |
{"id":"base_python_10","dataset_type":"base","language":"Python","task_category":"fix_bug","prompt_en":"","prompt_nl":"","code_snippet_input":"","canonical_solution":"","unit_test_setup":"","unit_test_assertion":""}
|
| 47 |
{"id":"base_python_11","dataset_type":"base","language":"Python","task_category":"architecture",
|
| 48 |
-
"prompt_en":"Write a DAL
|
| 49 |
-
"prompt_nl":"Schrijf een DAL
|
| 50 |
"code_snippet_input":"def display_menu(session):\n pizzas = get_pizzas(session)\n items = get_items(session)\n\n print(\"\\nMenu Items:\")\n print(\"----------\")\n print(\"ID | Name | Price\")\n print(\"----------\")\n\n def line_item(mi):\n print(f\"{mi.Item_ID} | {mi.Item_Name} .......... {mi.Item_Price}\")\n def line_pizza(pi):\n vegan_badge = \" (vegan)\" if bool(pi.Vegan_Pizza) else \"\"\n vegetarian_badge = \" (vegetarian)\" if bool(pi.Vegetarian_Pizza) else \"\"\n\n # Note: calculate_price is assumed to exist externally\n print(f\"{pi.Pizza_ID} | {pi.Pizza_Name}{vegan_badge}{vegetarian_badge}.......... \")\n\n print(\"Pizzas:\")\n for pi in pizzas:\n line_pizza(pi)\n print(\"----------\")\n\n print(\"Drinks:\")\n for mi in items[10:20]:\n line_item(mi)\n print(\"----------\")\n\n print(\"Desserts:\")\n for mi in items[20:30]:\n line_item(mi)\n\n continue_message(session)",
|
| 51 |
"canonical_solution":"def get_pizzas(session):\n query = \"SELECT Pizza_ID, Pizza_Name, Vegan_Pizza, Vegetarian_Pizza FROM Pizzas\"\n return session.execute(query).fetchall()\n\ndef get_items(session):\n query = \"SELECT Item_ID, Item_Name, Item_Price FROM Items\"\n return session.execute(query).fetchall()",
|
| 52 |
"unit_test_setup":"from unittest.mock import MagicMock\nsession = MagicMock()",
|
|
@@ -57,11 +92,14 @@
|
|
| 57 |
{"id":"base_python_14","dataset_type":"base","language":"Python","task_category":"refactoring","prompt_en":"","prompt_nl":"","code_snippet_input":"","canonical_solution":"","unit_test_setup":"","unit_test_assertion":""}
|
| 58 |
{"id":"base_python_15","dataset_type":"base","language":"Python","task_category":"refactoring","prompt_en":"","prompt_nl":"","code_snippet_input":"","canonical_solution":"","unit_test_setup":"","unit_test_assertion":""}
|
| 59 |
|
| 60 |
-
{"id":"base_sql_01","dataset_type":"base","language":"SQL","task_category":"queries",
|
| 61 |
-
"I am calculating and retrieving data for a tableau chart using an MSSQL query. Above the chart is AGG (average number of customer hours cost center), which is SUM([Direct Time In Hours])/[numberofclients].[Sum unique clients cost center]. Sum unique clients cost center is in Tableau with the following calculation: SUM({FIXED [Year], [Month], [Cost Center Name]: COUNTD([Client])}) This comes from the numberofclients table. Can you convert this to an MSSQL database query? If you are missing any calculations, please ask for them first before creating entire queries.",
|
| 62 |
-
"prompt_nl":"Ik ben bezig om een tableau grafiek de data te berekenen en op te halen doormiddel van een mssql query. boven de grafiek staat AGG(gemiddeld aantal klanturen kostenplaats) dat is SUM([Directe Tijd In Uren])/[numberofclients].[Sum unieke clienten kostenplaats]. Sum unieke clienten kostenplaats zit in tableau de volgende berekening: SUM({FIXED [Jaar], [Maand], [Kostenplaats Naam]: COUNTD([Client])}) dit komt uit de tabel numberofclients. kan je dit omzetten naar een mssql database query mocht je berekeningen missen, vraag deze dan eerst voordat je hele qeurys gaat maken.",
|
| 63 |
-
"code_snippet_input":"",
|
| 64 |
-
|
|
|
|
|
|
|
|
|
|
| 65 |
{"id":"base_sql_02","dataset_type":"base","language":"SQL","task_category":"queries",
|
| 66 |
"prompt_en":"write an update statement in MySQL to set a column value based on a join with another table. update the field valedictorian to true if and only if the student appears in the valedictorians table.",
|
| 67 |
"prompt_nl":"schrijf een update statement in MySQL om een kolomwaarde in te stellen op basis van een join met een andere tabel. werk het veld valedictorian bij naar true als en alleen als de student voorkomt in de tabel valedictorians.",
|
|
|
|
| 1 |
{"id":"base_java_01","dataset_type":"base","language":"Java","task_category":"scaffolding",
|
| 2 |
+
"prompt_en":"write a method createScaffold in java that creates a basic project structure for maven. Don't include imports",
|
| 3 |
+
"prompt_nl":"schrijf een method createScaffold in java die een basisprojectstructuur voor maven creëert. Voeg geen imports toe.",
|
| 4 |
+
"code_snippet_input":"import java.nio.file.*;\nimport java.io.IOException;\n\npublic static void createScaffold() throws IOException {\n // TODO: Create the directories here\n}",
|
| 5 |
+
"canonical_solution":"public static void createScaffold() throws IOException {\n Files.createDirectories(Paths.get(\"src/main/java/com/example/demo\"));\n Files.createDirectories(Paths.get(\"src/test/java/com/example/demo\"));\n}",
|
| 6 |
+
"unit_test_setup":"import org.junit.jupiter.api.Test;\nimport org.junit.jupiter.api.AfterEach;\nimport java.io.File;\nimport java.io.IOException;\nimport java.nio.file.*;\nimport java.util.Comparator;\nimport static org.junit.jupiter.api.Assertions.*;\n\npublic class ScaffoldTest {\n\n\n @AfterEach\n void tearDown() throws IOException {\n Path root = Paths.get(\"src\");\n if (Files.exists(root)) {\n Files.walk(root)\n .sorted(Comparator.reverseOrder())\n .map(Path::toFile)\n .forEach(File::delete);\n }\n }\n",
|
| 7 |
+
"unit_test_assertion":"@Test\n public void testDirectoryCreation() throws IOException {\n createScaffold();\n\nassertTrue(Files.exists(Paths.get(\"src/main/java/com/example/demo\")), \"Main directory should be created\");\n assertTrue(Files.exists(Paths.get(\"src/test/java/com/example/demo\")), \"Test directory should be created\");\n }\n}"
|
| 8 |
+
}
|
| 9 |
+
{"id":"base_java_02","dataset_type":"base","language":"Java","task_category":"elem_func",
|
| 10 |
+
"prompt_en":"make a staff class with constructor setters and getters with at least name, birthdate, gender, position, salary, hire date, and department. Don't include imports",
|
| 11 |
+
"prompt_nl":"maak een staff class met constructor setters en getters met ten minste name, birthdate, gender, position, salary, hire date en department. Voeg geen imports toe.",
|
| 12 |
"code_snippet_input":"",
|
| 13 |
+
"canonical_solution":"public class Staff {\n private String name;\n private java.time.LocalDate birthDate;\n private String gender;\n private String position;\n private double salary;\n private java.time.LocalDate hireDate;\n private String department;\n\n public Staff(String name, java.time.LocalDate birthDate, String gender, String position, double salary, java.time.LocalDate hireDate, String department) {\n this.name = name;\n this.birthDate = birthDate;\n this.gender = gender;\n this.position = position;\n this.salary = salary;\n this.hireDate = hireDate;\n this.department = department;\n }\n // ... Getters and Setters omitted for brevity in this view, but include them in real JSON ...\n}",
|
| 14 |
+
"unit_test_setup":"import org.junit.jupiter.api.BeforeEach;\nimport org.junit.jupiter.api.Test;\nimport java.time.LocalDate;\nimport java.time.Period;\nimport static org.junit.jupiter.api.Assertions.*;",
|
| 15 |
+
"unit_test_assertion":"\nclass StaffTest {\n private Staff staff;\n private final LocalDate birthDate = LocalDate.of(1990, 5, 20);\n private final LocalDate hireDate = LocalDate.of(2015, 1, 10);\n\n @BeforeEach\n void setUp() {\n staff = new Staff(\"Alice Johnson\", birthDate, \"Female\", \"Data Scientist\", 75000.00, hireDate, \"R&D\");\n }\n\n @Test\n void testConstructorAndGetters() {\n assertEquals(\"Alice Johnson\", staff.getName());\n }\n // ... other tests ...\n}"
|
| 16 |
}
|
|
|
|
| 17 |
{"id":"base_java_03","dataset_type":"base","language":"Java","task_category":"id_bug",
|
| 18 |
+
"prompt_en":"why am I getting a compilation error in this code? fix it and don't include imports",
|
| 19 |
+
"prompt_nl":"waarom krijg ik een compilatie error in deze code? Los het op en voeg geen imports toe.",
|
| 20 |
+
"code_snippet_input":"List<String> results = new ArrayList<>();\nint counter = 0;\nList<String> names = List.of(\"Alice\", \"Bob\", \"Charlie\");\n\nnames.forEach(name -> {\n counter++;\n results.add(counter + \": \" + name);\n});",
|
| 21 |
+
"canonical_solution":"List<String> results = new ArrayList<>();\nAtomicInteger counter = new AtomicInteger(0);\nList<String> names = List.of(\"Alice\", \"Bob\", \"Charlie\");\n\nnames.forEach(name -> {\n results.add(counter.incrementAndGet() + \": \" + name);\n});",
|
| 22 |
+
"unit_test_setup":"import org.junit.jupiter.api.Test;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.concurrent.atomic.AtomicInteger;\nimport static org.junit.jupiter.api.Assertions.*;\n\nclass LambdaTest {\n // We open the method here, but we do NOT define 'names' yet,\n // because the student's code snippet defines 'names'.\n private List<String> generateResults() {",
|
| 23 |
+
"unit_test_assertion":"return results;\n }\n\n @Test\n public void testCounterIncrements() {\n List<String> results = generateResults();\n\n assertEquals(3, results.size(), \"List should contain 3 elements\");\n assertTrue(results.get(0).startsWith(\"1:\"), \"First element must start with 1:\");\n assertTrue(results.get(1).startsWith(\"2:\"), \"Second element must start with 2:\");\n assertTrue(results.get(2).startsWith(\"3:\"), \"Third element must start with 3:\");\n }\n}"
|
| 24 |
+
}
|
| 25 |
+
{"id":"base_java_04","dataset_type":"base","language":"Java","task_category":"id_bug",
|
| 26 |
+
"prompt_en":"why am I getting a compilation error in this code? fix it and don't include imports",
|
| 27 |
+
"prompt_nl":"waarom krijg ik een compilatie error in deze code? Los het op en voeg geen imports toe.",
|
| 28 |
+
"code_snippet_input":"name clash: method(List<String>) has the same erasure as method(List<Integer>)\n\npublic void sort(List<String> data) {\nreturn \"Sorting strings\";\n}\npublic String sort(List<Integer> data) { \nreturn \"Sortig integers\";",
|
| 29 |
+
"canonical_solution":"public String sortStrings(List<String> data) {\nreturn \"Sorting strings\";\n}\npublic String sortIntegers(List<Integer> data) { \nreturn \"Sortig integers\";\n}\n}",
|
| 30 |
+
"unit_test_setup":"import org.junit.jupiter.api.Test;\nimport java.util.List;\nimport java.util.ArrayList;\nimport static org.junit.jupiter.api.Assertions.*;\n\npublic class Solution {\n",
|
| 31 |
+
"unit_test_assertion":"@Test\n public void testMethodsAreDistinct() {\n String result1 = sortStrings(new ArrayList<String>());\n String result2 = sortNumbers(new ArrayList<Integer>());\n \n assertEquals(\"Sorting strings\", result1);\n assertEquals(\"Sorting integers\", result2);\n }\n}"
|
| 32 |
+
}
|
| 33 |
+
{"id":"base_java_05","dataset_type":"base","language":"Java","task_category":"id_bug",
|
| 34 |
+
"prompt_en":"why am I getting a compilation error in this code? I want to use the process from printer. Output only the fixed class.",
|
| 35 |
+
"prompt_nl":"De volgende class compileert niet omdat beide interfaces dezelfde default methode definiëren. Herstel de compilatiefout in de 'OfficeMachine' class door de methode te overschrijven en expliciet de implementatie van 'Printer' te gebruiken. Geef ALLEEN de gecorrigeerde class.",
|
| 36 |
+
"code_snippet_input":" class OfficeMachine inherits unrelated defaults for process() from types Printer and Scanner\n\npublic class OfficeMachine implements Printer, Scanner {\n // The class body is empty, causing the ambiguity error\n}",
|
| 37 |
+
"canonical_solution":"public class OfficeMachine implements Printer, Scanner {\n @Override\n public String process() {\n return Printer.super.process();\n }\n}",
|
| 38 |
+
"unit_test_setup":"import org.junit.jupiter.api.Test;\nimport static org.junit.jupiter.api.Assertions.*;\ninterface Printer {\n default String process() { return \"Printing document...\"; }\n}\n\ninterface Scanner {\n default String process() { return \"Scanning document...\"; }\n}\n",
|
| 39 |
+
"unit_test_assertion":"\nclass DiamondProblemTest {\n @Test\n public void testConflictResolution() {\n OfficeMachine machine = new OfficeMachine();\nassertEquals(\"Printing document...\", machine.process(), \"Should return Printer's output\");\n }\n}"
|
| 40 |
+
}
|
| 41 |
+
{"id":"base_java_06","dataset_type":"base","language":"Java","task_category":"fix_bug",
|
| 42 |
+
"prompt_en":"why am i getting wrong results in this code? The method doesn't return a list of the transaction in the target currency. Fix the method and don't include imports",
|
| 43 |
+
"prompt_nl":"Waarom krijg ik verkeerde resultaten in deze code? De methode retourneert geen lijst met transacties in de doelvaluta. Corrigeer de methode en neem geen imports op.",
|
| 44 |
+
"code_snippet_input":"public class DataFilter {\npublic List<Transaction> filterByCurrency(List<Transaction> data, String targetCurrency) {\nList<Transaction> result = new ArrayList<>();\nfor (Transaction t : data) {\nif (t.getCurrency() == targetCurrency) {\nresult.add(t);\n}\n}\nreturn result;\n}",
|
| 45 |
+
"canonical_solution":"public class DataFilter {\npublic List<Transaction> filterByCurrency(List<Transaction> data, String targetCurrency) {\nList<Transaction> result = new ArrayList<>();\nfor (Transaction t : data) {\nif (targetCurrency.equals(t.getCurrency())) {\nresult.add(t);\n}\n}\nreturn result;\n}\n}",
|
| 46 |
+
"unit_test_setup":"import org.junit.jupiter.api.Test;\nimport java.util.List;\nimport java.util.ArrayList;\nimport static org.junit.jupiter.api.Assertions.*;\n\nclass Transaction {\n private String id;\n private String currency;\n public Transaction(String id, String currency) { this.id = id; this.currency = currency; }\n public String getCurrency() { return currency; }\n}\n",
|
| 47 |
+
"unit_test_assertion": "\nclass DataFilterTest {\n @Test\n public void testCurrencyFiltering() {\n DataFilter filter = new DataFilter();\n List<Transaction> dataset = new ArrayList<>();\n\n String dynamicUSD = new String(\"USD\");\n String dynamicEUR = new String(\"EUR\");\n \n dataset.add(new Transaction(\"tx1\", dynamicUSD));\n dataset.add(new Transaction(\"tx2\", dynamicEUR));\n dataset.add(new Transaction(\"tx3\", dynamicUSD));\n \n List<Transaction> result = filter.filterByCurrency(dataset, \"USD\");\n \n assertEquals(2, result.size(), \"Should find 2 USD transactions even if memory addresses differ\");\n }\n}"
|
| 48 |
+
}
|
| 49 |
{"id":"base_java_07","dataset_type":"base","language":"Java","task_category":"fix_bug","prompt_en":"","prompt_nl":"","code_snippet_input":"","canonical_solution":"","unit_test_setup":"","unit_test_assertion":""}
|
| 50 |
{"id":"base_java_08","dataset_type":"base","language":"Java","task_category":"fix_bug","prompt_en":"","prompt_nl":"","code_snippet_input":"","canonical_solution":"","unit_test_setup":"","unit_test_assertion":""}
|
| 51 |
{"id":"base_java_09","dataset_type":"base","language":"Java","task_category":"architecture","prompt_en":"","prompt_nl":"","code_snippet_input":"","canonical_solution":"","unit_test_setup":"","unit_test_assertion":""}
|
| 52 |
{"id":"base_java_10","dataset_type":"base","language":"Java","task_category":"refactoring",
|
| 53 |
+
"prompt_en":"transform this function so it uses datetime objects where the deadline is at the start of the day, while still being compatible with the inputs of the software",
|
| 54 |
+
"prompt_nl":"transformeer deze functie zodat deze datetime objecten gebruikt waarbij de deadline aan het begin van de dag ligt, terwijl deze nog steeds compatibel is met de inputs van de software.",
|
| 55 |
+
"code_snippet_input":"public static boolean isOverdue(LocalDate deadline) {\n LocalDate today = LocalDate.now();\n return today.isAfter(deadline);\n}",
|
| 56 |
+
"canonical_solution":"public static boolean isOverdue(LocalDate deadlineDate) {\n LocalDateTime currentDateTime = LocalDateTime.now();\n LocalDateTime deadlineTimestamp = deadlineDate.atStartOfDay();\n return currentDateTime.isAfter(deadlineTimestamp);\n}",
|
| 57 |
+
"unit_test_setup":"import java.time.LocalDate;\nimport java.time.LocalDateTime;\nimport org.junit.jupiter.api.Test;\nimport static org.junit.jupiter.api.Assertions.*;\n\npublic class DateTest {\n\n",
|
| 58 |
+
"unit_test_assertion":"@Test\n public void testYesterdayIsOverdue() {\nassertTrue(isOverdue(LocalDate.now().minusDays(1)), \"Yesterday should be overdue\");\n }\n\n @Test\n public void testTomorrowIsNotOverdue() {\n assertFalse(isOverdue(LocalDate.now().plusDays(1)), \"Tomorrow should not be overdue\");\n }\n\n @Test\n public void testTodayIsOverdue() {\nassertTrue(isOverdue(LocalDate.now()), \"Today (current time) should be considered after Today (start of day)\");\n }\n}"
|
| 59 |
+
}
|
| 60 |
{"id":"base_java_11","dataset_type":"base","language":"Java","task_category":"refactoring","prompt_en":"","prompt_nl":"","code_snippet_input":"","canonical_solution":"","unit_test_setup":"","unit_test_assertion":""}
|
| 61 |
{"id":"base_java_12","dataset_type":"base","language":"Java","task_category":"refactoring","prompt_en":"","prompt_nl":"","code_snippet_input":"","canonical_solution":"","unit_test_setup":"","unit_test_assertion":""}
|
| 62 |
|
|
|
|
| 80 |
{"id":"base_python_09","dataset_type":"base","language":"Python","task_category":"fix_bug","prompt_en":"","prompt_nl":"","code_snippet_input":"","canonical_solution":"","unit_test_setup":"","unit_test_assertion":""}
|
| 81 |
{"id":"base_python_10","dataset_type":"base","language":"Python","task_category":"fix_bug","prompt_en":"","prompt_nl":"","code_snippet_input":"","canonical_solution":"","unit_test_setup":"","unit_test_assertion":""}
|
| 82 |
{"id":"base_python_11","dataset_type":"base","language":"Python","task_category":"architecture",
|
| 83 |
+
"prompt_en":"Write a DAL to fetch the necessary data for the display_menu function from an MSSQL database. Implement the missing get_pizzas and get_items functions.",
|
| 84 |
+
"prompt_nl":"Schrijf een DAL om de benodigde gegevens voor de display_menu functie uit een MSSQL-database op te halen. Implementeer de ontbrekende get_pizzas en get_items functies.",
|
| 85 |
"code_snippet_input":"def display_menu(session):\n pizzas = get_pizzas(session)\n items = get_items(session)\n\n print(\"\\nMenu Items:\")\n print(\"----------\")\n print(\"ID | Name | Price\")\n print(\"----------\")\n\n def line_item(mi):\n print(f\"{mi.Item_ID} | {mi.Item_Name} .......... {mi.Item_Price}\")\n def line_pizza(pi):\n vegan_badge = \" (vegan)\" if bool(pi.Vegan_Pizza) else \"\"\n vegetarian_badge = \" (vegetarian)\" if bool(pi.Vegetarian_Pizza) else \"\"\n\n # Note: calculate_price is assumed to exist externally\n print(f\"{pi.Pizza_ID} | {pi.Pizza_Name}{vegan_badge}{vegetarian_badge}.......... \")\n\n print(\"Pizzas:\")\n for pi in pizzas:\n line_pizza(pi)\n print(\"----------\")\n\n print(\"Drinks:\")\n for mi in items[10:20]:\n line_item(mi)\n print(\"----------\")\n\n print(\"Desserts:\")\n for mi in items[20:30]:\n line_item(mi)\n\n continue_message(session)",
|
| 86 |
"canonical_solution":"def get_pizzas(session):\n query = \"SELECT Pizza_ID, Pizza_Name, Vegan_Pizza, Vegetarian_Pizza FROM Pizzas\"\n return session.execute(query).fetchall()\n\ndef get_items(session):\n query = \"SELECT Item_ID, Item_Name, Item_Price FROM Items\"\n return session.execute(query).fetchall()",
|
| 87 |
"unit_test_setup":"from unittest.mock import MagicMock\nsession = MagicMock()",
|
|
|
|
| 92 |
{"id":"base_python_14","dataset_type":"base","language":"Python","task_category":"refactoring","prompt_en":"","prompt_nl":"","code_snippet_input":"","canonical_solution":"","unit_test_setup":"","unit_test_assertion":""}
|
| 93 |
{"id":"base_python_15","dataset_type":"base","language":"Python","task_category":"refactoring","prompt_en":"","prompt_nl":"","code_snippet_input":"","canonical_solution":"","unit_test_setup":"","unit_test_assertion":""}
|
| 94 |
|
| 95 |
+
{"id":"base_sql_01","dataset_type":"base","language":"SQL","task_category":"queries",
|
| 96 |
+
"prompt_en":"I am calculating and retrieving data for a tableau chart using an MSSQL query. Above the chart is AGG (average number of customer hours cost center), which is SUM([Direct Time In Hours])/[numberofclients].[Sum unique clients cost center]. Sum unique clients cost center is in Tableau with the following calculation: SUM({FIXED [Year], [Month], [Cost Center Name]: COUNTD([Client])}) This comes from the numberofclients table. Can you convert this to an MSSQL database query? If you are missing any calculations, please ask for them first before creating entire queries.",
|
| 97 |
+
"prompt_nl":"Ik ben bezig om een tableau grafiek de data te berekenen en op te halen doormiddel van een mssql query. boven de grafiek staat AGG(gemiddeld aantal klanturen kostenplaats) dat is SUM([Directe Tijd In Uren])/[numberofclients].[Sum unieke clienten kostenplaats]. Sum unieke clienten kostenplaats zit in tableau de volgende berekening: SUM({FIXED [Jaar], [Maand], [Kostenplaats Naam]: COUNTD([Client])}) dit komt uit de tabel numberofclients. kan je dit omzetten naar een mssql database query mocht je berekeningen missen, vraag deze dan eerst voordat je hele qeurys gaat maken.",
|
| 98 |
+
"code_snippet_input":"",
|
| 99 |
+
"canonical_solution":"",
|
| 100 |
+
"unit_test_setup":"",
|
| 101 |
+
"unit_test_assertion":""
|
| 102 |
+
}
|
| 103 |
{"id":"base_sql_02","dataset_type":"base","language":"SQL","task_category":"queries",
|
| 104 |
"prompt_en":"write an update statement in MySQL to set a column value based on a join with another table. update the field valedictorian to true if and only if the student appears in the valedictorians table.",
|
| 105 |
"prompt_nl":"schrijf een update statement in MySQL om een kolomwaarde in te stellen op basis van een join met een andere tabel. werk het veld valedictorian bij naar true als en alleen als de student voorkomt in de tabel valedictorians.",
|