Skip to content

Commit 4049452

Browse files
authored
Merge pull request #1 from TalSchuster/binder
Study notebook
2 parents 44f1d57 + d59eba1 commit 4049452

File tree

4 files changed

+760
-0
lines changed

4 files changed

+760
-0
lines changed

notebooks/Study.ipynb

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"metadata": {
7+
"deletable": false
8+
},
9+
"outputs": [],
10+
"source": [
11+
"# Please run this cell first.\n",
12+
"from study.study import next_puzzle, cur_puzzle, puzzle, give_up"
13+
]
14+
},
15+
{
16+
"cell_type": "markdown",
17+
"metadata": {},
18+
"source": [
19+
"# Instructions\n",
20+
"\n",
21+
"* This notebook is simulating the study used for the [Programming Puzzles](https://arxiv.org/abs/2106.05784) paper (with some modifications to run locally).\n",
22+
"* Visit our repository to explore the full dataset and contribute new puzzles: https://github.com/microsoft/PythonProgrammingPuzzles \n",
23+
"\n",
24+
"## Overview\n",
25+
"\n",
26+
"\n",
27+
"* The first 3 problems are \"practice\" and the time you take will not be used in the study. This is a good chance to see how the system works.\n",
28+
"* Puzzles are defined by `def puzzle(...)`. For each puzzle, you will try to find an input `x` which makes `puzzle(x)` return `True`.\n",
29+
"* Type `next_puzzle()` when you are ready to start the first problem or to advance to the next problem.\n",
30+
"* There is **no option to revisit a puzzle** and once you call `next_puzzle()` the clock starts ticking (you have up to 6 minutes per puzzle).\n",
31+
"* **If you get lost, call `cur_puzzle()`** to see the current puzzle you are on (and time bar).\n",
32+
"\n",
33+
"## Timing\n",
34+
"\n",
35+
"* You have up to 6 minutes for each puzzle.\n",
36+
"* If you do not solve a problem in **6 minutes**, move to the next puzzle by typing `next_puzzle()`.\n",
37+
"* If you would like to give up and skip to the next puzzle without waiting, you can call `give_up()`.\n",
38+
"\n",
39+
"\n",
40+
"## Possible issues and contact details\n",
41+
"\n",
42+
"* Remember to use `cur_puzzle()` if you lost the code of the current puzzle.\n",
43+
"\n",
44+
"\n",
45+
"## Summary of functions\n",
46+
"\n",
47+
"| Function \t| Description \t|\n",
48+
"|:----------------------\t|:------------------------------------------------------------------------------------------\t|\n",
49+
"|`next_puzzle()` \t| Start the next puzzle (call only when you are ready to start! no revisiting) \t|\n",
50+
"|`cur_puzzle()` \t| Present the current puzzle (useful if you got lost or accidentally overridden `puzzle()`) \t|\n",
51+
"|`puzzle(...)` \t| Submit a solution to the current puzzle \t|\n",
52+
"|`give_up()` \t| Give up and skip to the next puzzle *before* 6 minutes have passed. Please avoid this option if possible. |"
53+
]
54+
},
55+
{
56+
"cell_type": "code",
57+
"execution_count": null,
58+
"metadata": {},
59+
"outputs": [],
60+
"source": [
61+
"# The first 3 puzzles are warmup. Begin the warmup part by running this cell.\n",
62+
"\n",
63+
"next_puzzle()"
64+
]
65+
},
66+
{
67+
"cell_type": "code",
68+
"execution_count": null,
69+
"metadata": {},
70+
"outputs": [],
71+
"source": [
72+
"# Solve the first puzzle by running this cell.\n",
73+
"\n",
74+
"puzzle(\"world\")"
75+
]
76+
},
77+
{
78+
"cell_type": "code",
79+
"execution_count": null,
80+
"metadata": {},
81+
"outputs": [],
82+
"source": [
83+
"# when you are ready to continue, run this cell.\n",
84+
"\n",
85+
"next_puzzle()"
86+
]
87+
},
88+
{
89+
"cell_type": "code",
90+
"execution_count": null,
91+
"metadata": {},
92+
"outputs": [],
93+
"source": [
94+
"# You're on your own. Have fun.\n"
95+
]
96+
}
97+
],
98+
"metadata": {
99+
"kernelspec": {
100+
"display_name": "Python 3",
101+
"language": "python",
102+
"name": "python3"
103+
},
104+
"language_info": {
105+
"codemirror_mode": {
106+
"name": "ipython",
107+
"version": 3
108+
},
109+
"file_extension": ".py",
110+
"mimetype": "text/x-python",
111+
"name": "python",
112+
"nbconvert_exporter": "python",
113+
"pygments_lexer": "ipython3",
114+
"version": "3.8.8"
115+
}
116+
},
117+
"nbformat": 4,
118+
"nbformat_minor": 4
119+
}

notebooks/fireworks.gif

10.5 KB
Loading

0 commit comments

Comments
 (0)