Upload tmpl_code/tc_tp4_1791579464_00003.jsonl with huggingface_hub
Browse files
tmpl_code/tc_tp4_1791579464_00003.jsonl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"tid": "6f8d18fad3", "cat": "wordproblem", "code": "def make(rng, original=False):\n if original:\n total = 1200\n rate_a = 40\n rate_b = 60\n head = 15\n done = rate_a * head\n remaining = total - done\n combined = rate_a + rate_b\n ans = remaining // combined\n question = (\n \"Two edge servers are tasked with processing a batch of 1,200 images. \"\n \"Server A processes 40 images per minute, and Server B processes 60 images per minute. \"\n \"If Server A starts 15 minutes before Server B, how many minutes after Server B begins \"\n \"operation will the batch be completely processed?\"\n )\n lines = [\n f\"Server A processes {rate_a} images per minute for {head} minutes before Server B starts.\",\n f\"Images processed by Server A before Server B starts: {rate_a} * {head} = {done}.\",\n f\"Remaining images in the batch: {total} - {done} = {remaining}.\",\n f\"Combined processing rate of Server A and Server B: {rate_a} + {rate_b} = {combined} images per minute.\",\n f\"Time required to process the remaining images after Server B starts: {remaining} / {combined} = {ans} minutes.\",\n ]\n return question, lines, str(ans)\n\n pairs = [\n (\"edge servers\", \"images\"),\n (\"printers\", \"documents\"),\n (\"scanners\", \"documents\"),\n (\"renderers\", \"frames\"),\n (\"encoders\", \"packets\"),\n (\"processors\", \"files\"),\n ]\n names = [\"Alpha\", \"Beta\", \"Gamma\", \"Delta\", \"North\", \"South\", \"Red\", \"Blue\"]\n templates = [\n \"Two {role} are tasked with processing a batch of {total} {obj}. {name1} processes {rate1} {obj} per minute, and {name2} processes {rate2} {obj} per minute. If {name1} starts {head} minutes before {name2}, how many minutes after {name2} begins operation will the batch be completely processed?\",\n \"A batch of {total} {obj} must be processed by two {role}. {name1} handles {rate1} {obj} per minute while {name2} handles {rate2} {obj} per minute. {name1} begins {head} minutes earlier. How many minutes after {name2} starts will the entire batch be finished?\",\n \"Two {role} share a batch of {total} {obj}. {name1} works at {rate1} {obj} per minute and {name2} at {rate2} {obj} per minute. If {name1} gets a {head}-minute head start, how many minutes after {name2} starts are all {obj} processed?\",\n ]\n\n for _ in range(1000):\n role, obj = rng.choice(pairs)\n name1, name2 = rng.sample(names, 2)\n rate1 = rng.randint(30, 90)\n rate2 = rng.randint(30, 90)\n if rate1 == rate2:\n continue\n head = rng.randint(2, 10)\n ans = rng.randint(3, 12)\n total = rate1 * head + ans * (rate1 + rate2)\n if total < 300 or total > 3500:\n continue\n done = rate1 * head\n remaining = total - done\n combined = rate1 + rate2\n if done >= total or remaining % combined != 0:\n continue\n break\n else:\n return None\n\n question = rng.choice(templates).format(\n total=f\"{total:,}\",\n obj=obj,\n role=role,\n name1=name1,\n name2=name2,\n rate1=rate1,\n rate2=rate2,\n head=head,\n )\n lines = [\n f\"{name1} processes {rate1} {obj} per minute for {head} minutes before {name2} starts.\",\n f\"{obj.title()} processed by {name1} before {name2} starts: {rate1} * {head} = {done}.\",\n f\"Remaining {obj} in the batch: {total} - {done} = {remaining}.\",\n f\"Combined rate of {name1} and {name2}: {rate1} + {rate2} = {combined} {obj} per minute.\",\n f\"Time to finish the remaining {obj} after {name2} starts: {remaining} / {combined} = {ans} minutes.\",\n ]\n return question, lines, str(ans)\n"}
|
| 2 |
+
{"tid": "04600d9d67", "cat": "probability", "code": "def make(rng, original=False):\n if original:\n a, b = 5, 4\n total = a * b\n question = (\"In a hypothetical concert scenario, there are 5 unique lighting effects \"\n \"and 4 unique sound settings. A stage manager needs to configure the show \"\n \"by selecting exactly one lighting effect and exactly one sound setting. \"\n \"If the selection of lighting and sound settings are independent events, \"\n \"how many distinct configurations can be created?\")\n lines = [\n f\"There are {a} choices for the lighting effect.\",\n f\"There are {b} choices for the sound setting.\",\n \"The selections are independent.\",\n \"The total number of distinct configurations is the product of the number of choices for each category.\",\n f\"{a} * {b} = {total}\",\n ]\n return question, lines, str(total)\n\n categories = [\n (\"color palettes\", \"color palette\"),\n (\"stage props\", \"stage prop\"),\n (\"costume styles\", \"costume style\"),\n (\"instrument sounds\", \"instrument sound\"),\n (\"backdrop designs\", \"backdrop design\"),\n (\"dance formations\", \"dance formation\"),\n (\"camera angles\", \"camera angle\"),\n (\"microphone presets\", \"microphone preset\"),\n (\"stage positions\", \"stage position\"),\n (\"tempo choices\", \"tempo choice\"),\n (\"visual overlays\", \"visual overlay\"),\n (\"entrance cues\", \"entrance cue\"),\n ]\n scenarios = [\"theater production\", \"live show\", \"stage performance\", \"recital\", \"festival show\"]\n roles = [\"A show director\", \"A concert producer\", \"A live event coordinator\", \"A theater technician\", \"A production manager\"]\n templates = [\n \"In a hypothetical {scenario}, there are {a} unique {c1p} and {b} unique {c2p}. {role} needs to configure the show by selecting exactly one {c1s} and exactly one {c2s}. If the selection of {c1p} and {c2p} are independent events, how many distinct configurations can be created?\",\n \"A hypothetical {scenario} has {a} unique {c1p} and {b} unique {c2p}. {role} must choose exactly one {c1s} and exactly one {c2s}. Assuming the two selections are independent, how many distinct configurations are possible?\",\n \"For a hypothetical {scenario}, {a} unique {c1p} and {b} unique {c2p} are available. {role} selects exactly one {c1s} and exactly one {c2s}. If the choices are independent, how many distinct configurations can be made?\",\n ]\n\n counts = [3, 6, 7, 8, 9]\n a = rng.choice(counts)\n b = rng.choice([x for x in counts if x != a])\n c1, c2 = rng.sample(categories, 2)\n scenario = rng.choice(scenarios)\n role = rng.choice(roles)\n total = a * b\n\n question = rng.choice(templates).format(\n scenario=scenario,\n role=role,\n a=a,\n b=b,\n c1p=c1[0],\n c1s=c1[1],\n c2p=c2[0],\n c2s=c2[1],\n )\n\n lines = [\n f\"There are {a} choices for the {c1[1]}.\",\n f\"There are {b} choices for the {c2[1]}.\",\n \"The selections are independent.\",\n \"The total number of distinct configurations is the product of the number of choices for each category.\",\n f\"{a} * {b} = {total}\",\n ]\n return question, lines, str(total)\n"}
|
| 3 |
+
{"tid": "5d3ab9ab5f", "cat": "finance", "code": "def make(rng, original=False):\n if original:\n question = (\"A company reports earnings per share (EPS) of \u00a32.50 and a current stock price of \u00a350.00. \"\n \"Calculate the Price-to-Earnings (P/E) ratio for this company, rounding to two decimal places.\")\n price_cents = 5000\n eps_cents = 250\n pe_cents = (price_cents * 100) // eps_cents\n lines = [\n \"P/E ratio = stock price / earnings per share\",\n f\"P/E ratio = {price_cents // 100}.{price_cents % 100:02d} / {eps_cents // 100}.{eps_cents % 100:02d}\",\n f\"P/E ratio = {pe_cents // 100}.{pe_cents % 100:02d}\",\n ]\n return question, lines, f\"{pe_cents // 100}.{pe_cents % 100:02d}\"\n\n def gcd(a, b):\n while b:\n a, b = b, a % b\n return a\n\n names = [\"Alpha\", \"Beta\", \"Gamma\", \"Delta\", \"Omega\", \"Nova\", \"Apex\", \"Vista\", \"Orbit\", \"Pinnacle\"]\n suffixes = [\"Corp\", \"Inc\", \"Ltd\", \"Group\", \"Co\"]\n currencies = [\"\u00a3\", \"$\", \"\u20ac\"]\n\n for _ in range(50):\n ratio_cents = rng.randint(500, 5000)\n step = 100 // gcd(ratio_cents, 100)\n start = ((100 + step - 1) // step) * step\n eps_cents = rng.randrange(start, 1001, step)\n price_cents = (eps_cents * ratio_cents) // 100\n\n if price_cents < 100 or price_cents > 50000:\n continue\n if price_cents == 5000 and eps_cents == 250:\n continue\n\n pe_cents = (price_cents * 100) // eps_cents\n if pe_cents != ratio_cents:\n continue\n\n name = rng.choice(names) + \" \" + rng.choice(suffixes)\n cur = rng.choice(currencies)\n\n eps_s = f\"{eps_cents // 100}.{eps_cents % 100:02d}\"\n price_s = f\"{price_cents // 100}.{price_cents % 100:02d}\"\n pe_s = f\"{pe_cents // 100}.{pe_cents % 100:02d}\"\n\n templates = [\n f\"{name} reports earnings per share (EPS) of {cur}{eps_s} and a current stock price of {cur}{price_s}. Calculate the Price-to-Earnings (P/E) ratio for this company, rounding to two decimal places.\",\n f\"A company, {name}, has a current stock price of {cur}{price_s} and earnings per share of {cur}{eps_s}. Calculate its Price-to-Earnings (P/E) ratio, rounding to two decimal places.\",\n f\"{name} has a share price of {cur}{price_s} and reports EPS of {cur}{eps_s}. What is the P/E ratio? Round your answer to two decimal places.\",\n f\"The share price of {name} is {cur}{price_s} and its earnings per share is {cur}{eps_s}. Find the Price-to-Earnings (P/E) ratio, rounded to two decimal places.\",\n ]\n question = rng.choice(templates)\n\n lines = [\n \"P/E ratio = stock price / earnings per share\",\n f\"P/E ratio = {cur}{price_s} / {cur}{eps_s}\",\n f\"P/E ratio = {pe_s}\",\n ]\n return question, lines, pe_s\n\n return None\n"}
|