##// END OF EJS Templates
update example notebooks
Jason Grout -
Show More
@@ -967,7 +967,7 b''
967 967 "metadata": {},
968 968 "output_type": "display_data",
969 969 "text": [
970 "<IPython.core.display.Javascript at 0x2281b10>"
970 "<IPython.core.display.Javascript at 0x1100ddd50>"
971 971 ]
972 972 }
973 973 ],
@@ -998,7 +998,19 b''
998 998 ],
999 999 "language": "python",
1000 1000 "metadata": {},
1001 "outputs": [],
1001 "outputs": [
1002 {
1003 "ename": "KeyError",
1004 "evalue": "'modal'",
1005 "output_type": "pyerr",
1006 "traceback": [
1007 "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[0;31mKeyError\u001b[0m Traceback (most recent call last)",
1008 "\u001b[0;32m<ipython-input-11-3d50cedcbcf3>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 4\u001b[0m floating_container.set_css({\n\u001b[1;32m 5\u001b[0m \u001b[0;34m'width'\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'420px'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 6\u001b[0;31m 'height': '350px'}, selector='modal')\n\u001b[0m\u001b[1;32m 7\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 8\u001b[0m \u001b[0mG\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mEventfulGraph\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
1009 "\u001b[0;32m/Users/grout/projects/ipython-upstream/IPython/html/widgets/widget.pyc\u001b[0m in \u001b[0;36mset_css\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 355\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0misinstance\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdict\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 356\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mvalue\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32min\u001b[0m \u001b[0margs\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mitems\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 357\u001b[0;31m \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_css\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mselector\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mvalue\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_css\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mselector\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 358\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_css\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mselector\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mvalue\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 359\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msend_state\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'_css'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
1010 "\u001b[0;31mKeyError\u001b[0m: 'modal'"
1011 ]
1012 }
1013 ],
1002 1014 "prompt_number": 11
1003 1015 },
1004 1016 {
@@ -1063,7 +1075,152 b''
1063 1075 ],
1064 1076 "language": "python",
1065 1077 "metadata": {},
1066 "outputs": [],
1078 "outputs": [
1079 {
1080 "output_type": "stream",
1081 "stream": "stdout",
1082 "text": [
1083 "node set (1, {'stroke': 'black'})\n",
1084 "node set (1, {'stroke': 'black', 'fill': 'red'})\n",
1085 "node set (2, {'stroke': 'black'})"
1086 ]
1087 },
1088 {
1089 "output_type": "stream",
1090 "stream": "stdout",
1091 "text": [
1092 "\n",
1093 "node set (2, {'stroke': 'black', 'fill': 'gold'})\n",
1094 "node set (3, {'stroke': 'black'})"
1095 ]
1096 },
1097 {
1098 "output_type": "stream",
1099 "stream": "stdout",
1100 "text": [
1101 "\n",
1102 "node set (3, {'stroke': 'black', 'fill': 'green'})\n",
1103 "adj set (1, {2: {'distance': 200, 'stroke': 'lime'}, 3: {'stroke': 'lime'}, 'goodbye': {'stroke': 'lime'}})"
1104 ]
1105 },
1106 {
1107 "output_type": "stream",
1108 "stream": "stdout",
1109 "text": [
1110 "\n",
1111 "adj set (1, {2: {'distance': 200, 'stroke': '#aaa'}, 3: {'stroke': 'lime'}, 'goodbye': {'stroke': 'lime'}})\n",
1112 "adj set (1, {2: {'distance': 200, 'stroke': '#aaa', 'strokewidth': '1px'}, 3: {'stroke': 'lime'}, 'goodbye': {'stroke': 'lime'}})\n",
1113 "adj set (1, {2: {'distance': 200, 'stroke': '#aaa', 'strokewidth': '1px', 'strength': 0.5}, 3: {'stroke': 'lime'}, 'goodbye': {'stroke': 'lime'}})\n",
1114 "adj set (1, {2: {'distance': 200, 'stroke': '#aaa', 'strokewidth': '1px', 'strength': 0.5}, 3: {'stroke': 'lime'}, 'goodbye': {'stroke': 'lime'}})\n",
1115 "adj set (2, {1: {'distance': 200, 'stroke': '#aaa', 'strokewidth': '1px', 'strength': 0.5}})\n",
1116 "adj set (1, {2: {'distance': 200, 'stroke': '#aaa', 'strokewidth': '1px', 'strength': 0.5}, 3: {'distance': 200, 'stroke': 'lime'}, 'goodbye': {'stroke': 'lime'}})\n",
1117 "adj set (1, {2: {'distance': 200, 'stroke': '#aaa', 'strokewidth': '1px', 'strength': 0.5}, 3: {'distance': 200, 'stroke': '#aaa'}, 'goodbye': {'stroke': 'lime'}})\n",
1118 "adj set (1, {2: {'distance': 200, 'stroke': '#aaa', 'strokewidth': '1px', 'strength': 0.5}, 3: {'distance': 200, 'stroke': '#aaa', 'strokewidth': '1px'}, 'goodbye': {'stroke': 'lime'}})\n",
1119 "adj set (1, {2: {'distance': 200, 'stroke': '#aaa', 'strokewidth': '1px', 'strength': 0.5}, 3: {'distance': 200, 'stroke': '#aaa', 'strokewidth': '1px', 'strength': 0.5}, 'goodbye': {'stroke': 'lime'}})\n",
1120 "adj set (1, {2: {'distance': 200, 'stroke': '#aaa', 'strokewidth': '1px', 'strength': 0.5}, 3: {'distance': 200, 'stroke': '#aaa', 'strokewidth': '1px', 'strength': 0.5}, 'goodbye': {'stroke': 'lime'}})\n",
1121 "adj set (3, {1: {'distance': 200, 'stroke': '#aaa', 'strokewidth': '1px', 'strength': 0.5}})\n",
1122 "adj set (2, {1: {'distance': 200, 'stroke': '#aaa', 'strokewidth': '1px', 'strength': 0.5}, 3: {'distance': 200, 'stroke': '#aaa', 'strokewidth': '1px', 'strength': 0.5}})\n",
1123 "adj set (3, {1: {'distance': 200, 'stroke': '#aaa', 'strokewidth': '1px', 'strength': 0.5}, 2: {'distance': 200, 'stroke': '#aaa', 'strokewidth': '1px', 'strength': 0.5}})\n",
1124 "adj set (1, {2: {'distance': 20, 'stroke': '#aaa', 'strokewidth': '1px', 'strength': 0.5}, 3: {'distance': 200, 'stroke': '#aaa', 'strokewidth': '1px', 'strength': 0.5}, 'goodbye': {'stroke': 'lime'}})"
1125 ]
1126 },
1127 {
1128 "output_type": "stream",
1129 "stream": "stdout",
1130 "text": [
1131 "\n",
1132 "adj set (1, {2: {'distance': 20, 'stroke': '#aaa', 'strokewidth': '1px', 'strength': 0.5}, 3: {'distance': 20, 'stroke': '#aaa', 'strokewidth': '1px', 'strength': 0.5}, 'goodbye': {'stroke': 'lime'}})"
1133 ]
1134 },
1135 {
1136 "output_type": "stream",
1137 "stream": "stdout",
1138 "text": [
1139 "\n",
1140 "adj set (2, {1: {'distance': 20, 'stroke': '#aaa', 'strokewidth': '1px', 'strength': 0.5}, 3: {'distance': 20, 'stroke': '#aaa', 'strokewidth': '1px', 'strength': 0.5}})"
1141 ]
1142 },
1143 {
1144 "output_type": "stream",
1145 "stream": "stdout",
1146 "text": [
1147 "\n",
1148 "node set (1, {'stroke': 'black', 'r': 16, 'fill': 'red'})"
1149 ]
1150 },
1151 {
1152 "output_type": "stream",
1153 "stream": "stdout",
1154 "text": [
1155 "\n",
1156 "node set (1, {'stroke': 'black', 'r': 8, 'fill': 'red'})"
1157 ]
1158 },
1159 {
1160 "output_type": "stream",
1161 "stream": "stdout",
1162 "text": [
1163 "\n",
1164 "node set (2, {'stroke': 'black', 'r': 16, 'fill': 'gold'})\n",
1165 "node set (2, {'stroke': 'black', 'r': 8, 'fill': 'gold'})"
1166 ]
1167 },
1168 {
1169 "output_type": "stream",
1170 "stream": "stdout",
1171 "text": [
1172 "\n",
1173 "node set (3, {'stroke': 'black', 'r': 16, 'fill': 'green'})\n",
1174 "node set (3, {'stroke': 'black', 'r': 8, 'fill': 'green'})"
1175 ]
1176 },
1177 {
1178 "output_type": "stream",
1179 "stream": "stdout",
1180 "text": [
1181 "\n",
1182 "node set (1, {'stroke': 'black', 'r': 8, 'fill': 'purple'})\n",
1183 "node set (1, {'stroke': 'black', 'r': 8, 'fill': 'red'})"
1184 ]
1185 },
1186 {
1187 "output_type": "stream",
1188 "stream": "stdout",
1189 "text": [
1190 "\n",
1191 "node set (2, {'stroke': 'black', 'r': 8, 'fill': 'purple'})\n",
1192 "node set (2, {'stroke': 'black', 'r': 8, 'fill': 'gold'})"
1193 ]
1194 },
1195 {
1196 "output_type": "stream",
1197 "stream": "stdout",
1198 "text": [
1199 "\n",
1200 "node set (3, {'stroke': 'black', 'r': 8, 'fill': 'purple'})\n",
1201 "node set (3, {'stroke': 'black', 'r': 8, 'fill': 'green'})"
1202 ]
1203 },
1204 {
1205 "output_type": "stream",
1206 "stream": "stdout",
1207 "text": [
1208 "\n",
1209 "node del 1"
1210 ]
1211 },
1212 {
1213 "output_type": "stream",
1214 "stream": "stdout",
1215 "text": [
1216 "\n",
1217 "node del 2\n",
1218 "node del 3\n",
1219 "node del hello\n",
1220 "node del goodbye\n"
1221 ]
1222 }
1223 ],
1067 1224 "prompt_number": 12
1068 1225 },
1069 1226 {
@@ -1185,7 +1342,19 b''
1185 1342 ],
1186 1343 "language": "python",
1187 1344 "metadata": {},
1188 "outputs": [],
1345 "outputs": [
1346 {
1347 "ename": "TypeError",
1348 "evalue": "isinstance() arg 2 must be a class, type, or tuple of classes and types",
1349 "output_type": "pyerr",
1350 "traceback": [
1351 "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)",
1352 "\u001b[0;32m<ipython-input-15-140cce028c66>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 12\u001b[0m \u001b[0mspeed\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mwidgets\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mFloatRangeWidget\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mparent\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mbox\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmin\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m0.0\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmax\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m0.5\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mvalue\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m0.4\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstep\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m0.01\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 13\u001b[0m \u001b[0mdisplay\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mbox\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 14\u001b[0;31m \u001b[0mbox\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0madd_class\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'well well-small'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 15\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 16\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mhandle_caclulate\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
1353 "\u001b[0;32m/Users/grout/projects/ipython-upstream/IPython/html/widgets/widget.pyc\u001b[0m in \u001b[0;36madd_class\u001b[0;34m(self, class_names, selector)\u001b[0m\n\u001b[1;32m 392\u001b[0m \"\"\"\n\u001b[1;32m 393\u001b[0m \u001b[0mclass_list\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mclass_names\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 394\u001b[0;31m \u001b[0;32mif\u001b[0m \u001b[0misinstance\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlist\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mclass_list\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 395\u001b[0m \u001b[0mclass_list\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m' '\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mjoin\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mclass_list\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 396\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
1354 "\u001b[0;31mTypeError\u001b[0m: isinstance() arg 2 must be a class, type, or tuple of classes and types"
1355 ]
1356 }
1357 ],
1189 1358 "prompt_number": 15
1190 1359 },
1191 1360 {
@@ -1215,7 +1384,18 b''
1215 1384 ],
1216 1385 "language": "python",
1217 1386 "metadata": {},
1218 "outputs": [],
1387 "outputs": [
1388 {
1389 "ename": "ImportError",
1390 "evalue": "No module named twitter",
1391 "output_type": "pyerr",
1392 "traceback": [
1393 "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[0;31mImportError\u001b[0m Traceback (most recent call last)",
1394 "\u001b[0;32m<ipython-input-16-2573b52a5cbe>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mtwitter\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mtime\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdatetime\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mmath\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0mtwitter_timestamp_format\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"%a %b %d %X +0000 %Y\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
1395 "\u001b[0;31mImportError\u001b[0m: No module named twitter"
1396 ]
1397 }
1398 ],
1219 1399 "prompt_number": 16
1220 1400 },
1221 1401 {
@@ -1234,7 +1414,18 b''
1234 1414 ],
1235 1415 "language": "python",
1236 1416 "metadata": {},
1237 "outputs": [],
1417 "outputs": [
1418 {
1419 "ename": "NameError",
1420 "evalue": "name 'OAuth' is not defined",
1421 "output_type": "pyerr",
1422 "traceback": [
1423 "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
1424 "\u001b[0;32m<ipython-input-17-404c6c972436>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;31m# Sign on to twitter.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m auth = OAuth(\n\u001b[0m\u001b[1;32m 3\u001b[0m \u001b[0mconsumer_key\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'iQvYfTfuD86fgVWGjPY0UA'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0mconsumer_secret\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'C3jjP6vzYzTYoHV4s5NYPGuRkpT5SulKRKTkRmYg'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0mtoken\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'2218195843-cOPQa0D1Yk3JbvjvsCa0tIYzBOEWxINekmGcEql'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
1425 "\u001b[0;31mNameError\u001b[0m: name 'OAuth' is not defined"
1426 ]
1427 }
1428 ],
1238 1429 "prompt_number": 17
1239 1430 },
1240 1431 {
@@ -1329,7 +1520,19 b''
1329 1520 ],
1330 1521 "language": "python",
1331 1522 "metadata": {},
1332 "outputs": [],
1523 "outputs": [
1524 {
1525 "ename": "KeyError",
1526 "evalue": "'modal'",
1527 "output_type": "pyerr",
1528 "traceback": [
1529 "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[0;31mKeyError\u001b[0m Traceback (most recent call last)",
1530 "\u001b[0;32m<ipython-input-18-51ebdd7c9d2e>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 6\u001b[0m floating_container.set_css({\n\u001b[1;32m 7\u001b[0m \u001b[0;34m'width'\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'620px'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 8\u001b[0;31m 'height': '450px'}, selector='modal')\n\u001b[0m\u001b[1;32m 9\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 10\u001b[0m \u001b[0mgraph\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mEventfulGraph\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
1531 "\u001b[0;32m/Users/grout/projects/ipython-upstream/IPython/html/widgets/widget.pyc\u001b[0m in \u001b[0;36mset_css\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 355\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0misinstance\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdict\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 356\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mvalue\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32min\u001b[0m \u001b[0margs\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mitems\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 357\u001b[0;31m \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_css\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mselector\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mvalue\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_css\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mselector\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 358\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_css\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mselector\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mvalue\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 359\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msend_state\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'_css'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
1532 "\u001b[0;31mKeyError\u001b[0m: 'modal'"
1533 ]
1534 }
1535 ],
1333 1536 "prompt_number": 18
1334 1537 },
1335 1538 {
@@ -1342,14 +1545,34 b''
1342 1545 "metadata": {},
1343 1546 "outputs": [
1344 1547 {
1345 "output_type": "stream",
1346 "stream": "stdout",
1347 "text": [
1348 "Service stopped\n"
1548 "ename": "NameError",
1549 "evalue": "name 'watch_tweets' is not defined",
1550 "output_type": "pyerr",
1551 "traceback": [
1552 "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
1553 "\u001b[0;32m<ipython-input-19-f7b582ac8226>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mwatch_tweets\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mscreen_name\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m\"justinbieber\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
1554 "\u001b[0;31mNameError\u001b[0m: name 'watch_tweets' is not defined"
1349 1555 ]
1350 1556 }
1351 1557 ],
1352 1558 "prompt_number": 19
1559 },
1560 {
1561 "cell_type": "code",
1562 "collapsed": false,
1563 "input": [],
1564 "language": "python",
1565 "metadata": {},
1566 "outputs": [],
1567 "prompt_number": 19
1568 },
1569 {
1570 "cell_type": "code",
1571 "collapsed": false,
1572 "input": [],
1573 "language": "python",
1574 "metadata": {},
1575 "outputs": []
1353 1576 }
1354 1577 ],
1355 1578 "metadata": {}
@@ -81,12 +81,13 b''
81 81 "['BoolWidget',\n",
82 82 " 'ButtonWidget',\n",
83 83 " 'ContainerWidget',\n",
84 " 'DOMWidget',\n",
84 85 " 'FloatRangeWidget',\n",
85 86 " 'FloatWidget',\n",
86 87 " 'ImageWidget',\n",
87 88 " 'IntRangeWidget',\n",
88 89 " 'IntWidget',\n",
89 " 'MulticontainerWidget',\n",
90 " 'SelectionContainerWidget',\n",
90 91 " 'SelectionWidget',\n",
91 92 " 'StringWidget',\n",
92 93 " 'Widget']"
@@ -143,13 +144,13 b''
143 144 {
144 145 "metadata": {},
145 146 "output_type": "pyout",
146 "prompt_number": 13,
147 "prompt_number": 10,
147 148 "text": [
148 "42.7"
149 "50.6"
149 150 ]
150 151 }
151 152 ],
152 "prompt_number": 13
153 "prompt_number": 10
153 154 },
154 155 {
155 156 "cell_type": "markdown",
@@ -172,22 +173,22 b''
172 173 {
173 174 "metadata": {},
174 175 "output_type": "pyout",
175 "prompt_number": 14,
176 "prompt_number": 11,
176 177 "text": [
177 "['visible',\n",
178 " '_css',\n",
179 " 'default_view_name',\n",
180 " 'value',\n",
178 "['value',\n",
181 179 " 'step',\n",
182 180 " 'max',\n",
183 181 " 'min',\n",
184 182 " 'disabled',\n",
185 183 " 'orientation',\n",
186 " 'description']"
184 " 'description',\n",
185 " 'visible',\n",
186 " '_css',\n",
187 " 'view_name']"
187 188 ]
188 189 }
189 190 ],
190 "prompt_number": 14
191 "prompt_number": 11
191 192 },
192 193 {
193 194 "cell_type": "markdown",
@@ -205,7 +206,7 b''
205 206 "language": "python",
206 207 "metadata": {},
207 208 "outputs": [],
208 "prompt_number": 15
209 "prompt_number": 12
209 210 },
210 211 {
211 212 "cell_type": "markdown",
@@ -226,13 +227,13 b''
226 227 {
227 228 "metadata": {},
228 229 "output_type": "pyout",
229 "prompt_number": 16,
230 "prompt_number": 13,
230 231 "text": [
231 232 "25.0"
232 233 ]
233 234 }
234 235 ],
235 "prompt_number": 16
236 "prompt_number": 13
236 237 },
237 238 {
238 239 "cell_type": "markdown",
@@ -251,7 +252,7 b''
251 252 "language": "python",
252 253 "metadata": {},
253 254 "outputs": [],
254 "prompt_number": 17
255 "prompt_number": 14
255 256 },
256 257 {
257 258 "cell_type": "code",
@@ -265,13 +266,13 b''
265 266 {
266 267 "metadata": {},
267 268 "output_type": "pyout",
268 "prompt_number": 18,
269 "prompt_number": 15,
269 270 "text": [
270 "u'Nothing Selected'"
271 "u'Item B'"
271 272 ]
272 273 }
273 274 ],
274 "prompt_number": 18
275 "prompt_number": 15
275 276 },
276 277 {
277 278 "cell_type": "heading",
@@ -25,7 +25,7 b''
25 25 "language": "python",
26 26 "metadata": {},
27 27 "outputs": [],
28 "prompt_number": 2
28 "prompt_number": 1
29 29 },
30 30 {
31 31 "cell_type": "heading",
@@ -82,7 +82,7 b''
82 82 ]
83 83 }
84 84 ],
85 "prompt_number": 3
85 "prompt_number": 2
86 86 },
87 87 {
88 88 "cell_type": "markdown",
@@ -117,13 +117,6 b''
117 117 "output_type": "stream",
118 118 "stream": "stdout",
119 119 "text": [
120 "1\n"
121 ]
122 },
123 {
124 "output_type": "stream",
125 "stream": "stdout",
126 "text": [
127 120 "2\n"
128 121 ]
129 122 },
@@ -131,20 +124,6 b''
131 124 "output_type": "stream",
132 125 "stream": "stdout",
133 126 "text": [
134 "3\n"
135 ]
136 },
137 {
138 "output_type": "stream",
139 "stream": "stdout",
140 "text": [
141 "4\n"
142 ]
143 },
144 {
145 "output_type": "stream",
146 "stream": "stdout",
147 "text": [
148 127 "5\n"
149 128 ]
150 129 },
@@ -152,263 +131,249 b''
152 131 "output_type": "stream",
153 132 "stream": "stdout",
154 133 "text": [
155 "6\n"
156 ]
157 },
158 {
159 "output_type": "stream",
160 "stream": "stdout",
161 "text": [
162 "7\n"
163 ]
164 },
165 {
166 "output_type": "stream",
167 "stream": "stdout",
168 "text": [
169 "8\n"
134 "10\n"
170 135 ]
171 136 },
172 137 {
173 138 "output_type": "stream",
174 139 "stream": "stdout",
175 140 "text": [
176 "9\n"
141 "11\n"
177 142 ]
178 143 },
179 144 {
180 145 "output_type": "stream",
181 146 "stream": "stdout",
182 147 "text": [
183 "10\n"
148 "13\n"
184 149 ]
185 150 },
186 151 {
187 152 "output_type": "stream",
188 153 "stream": "stdout",
189 154 "text": [
190 "11\n"
155 "14\n"
191 156 ]
192 157 },
193 158 {
194 159 "output_type": "stream",
195 160 "stream": "stdout",
196 161 "text": [
197 "12\n"
162 "16\n"
198 163 ]
199 164 },
200 165 {
201 166 "output_type": "stream",
202 167 "stream": "stdout",
203 168 "text": [
204 "13\n"
169 "18\n"
205 170 ]
206 171 },
207 172 {
208 173 "output_type": "stream",
209 174 "stream": "stdout",
210 175 "text": [
211 "14\n"
176 "20\n"
212 177 ]
213 178 },
214 179 {
215 180 "output_type": "stream",
216 181 "stream": "stdout",
217 182 "text": [
218 "15\n"
183 "22\n"
219 184 ]
220 185 },
221 186 {
222 187 "output_type": "stream",
223 188 "stream": "stdout",
224 189 "text": [
225 "16\n"
190 "24\n"
226 191 ]
227 192 },
228 193 {
229 194 "output_type": "stream",
230 195 "stream": "stdout",
231 196 "text": [
232 "17\n"
197 "26\n"
233 198 ]
234 199 },
235 200 {
236 201 "output_type": "stream",
237 202 "stream": "stdout",
238 203 "text": [
239 "18\n"
204 "29\n"
240 205 ]
241 206 },
242 207 {
243 208 "output_type": "stream",
244 209 "stream": "stdout",
245 210 "text": [
246 "20\n"
211 "30\n"
247 212 ]
248 213 },
249 214 {
250 215 "output_type": "stream",
251 216 "stream": "stdout",
252 217 "text": [
253 "19\n"
218 "33\n"
254 219 ]
255 220 },
256 221 {
257 222 "output_type": "stream",
258 223 "stream": "stdout",
259 224 "text": [
260 "18\n"
225 "36\n"
261 226 ]
262 227 },
263 228 {
264 229 "output_type": "stream",
265 230 "stream": "stdout",
266 231 "text": [
267 "17\n"
232 "38\n"
268 233 ]
269 234 },
270 235 {
271 236 "output_type": "stream",
272 237 "stream": "stdout",
273 238 "text": [
274 "16\n"
239 "42\n"
275 240 ]
276 241 },
277 242 {
278 243 "output_type": "stream",
279 244 "stream": "stdout",
280 245 "text": [
281 "12\n"
246 "45\n"
282 247 ]
283 248 },
284 249 {
285 250 "output_type": "stream",
286 251 "stream": "stdout",
287 252 "text": [
288 "10\n"
253 "46\n"
289 254 ]
290 255 },
291 256 {
292 257 "output_type": "stream",
293 258 "stream": "stdout",
294 259 "text": [
295 "8\n"
260 "48\n"
296 261 ]
297 262 },
298 263 {
299 264 "output_type": "stream",
300 265 "stream": "stdout",
301 266 "text": [
302 "6\n"
267 "50\n"
303 268 ]
304 269 },
305 270 {
306 271 "output_type": "stream",
307 272 "stream": "stdout",
308 273 "text": [
309 "4\n"
274 "51\n"
310 275 ]
311 276 },
312 277 {
313 278 "output_type": "stream",
314 279 "stream": "stdout",
315 280 "text": [
316 "3\n"
281 "52\n"
317 282 ]
318 283 },
319 284 {
320 285 "output_type": "stream",
321 286 "stream": "stdout",
322 287 "text": [
323 "2\n"
288 "53\n"
324 289 ]
325 290 },
326 291 {
327 292 "output_type": "stream",
328 293 "stream": "stdout",
329 294 "text": [
330 "1\n"
295 "54\n"
331 296 ]
332 297 },
333 298 {
334 299 "output_type": "stream",
335 300 "stream": "stdout",
336 301 "text": [
337 "4\n"
302 "52\n"
338 303 ]
339 304 },
340 305 {
341 306 "output_type": "stream",
342 307 "stream": "stdout",
343 308 "text": [
344 "10\n"
309 "50\n"
345 310 ]
346 311 },
347 312 {
348 313 "output_type": "stream",
349 314 "stream": "stdout",
350 315 "text": [
351 "18\n"
316 "48\n"
352 317 ]
353 318 },
354 319 {
355 320 "output_type": "stream",
356 321 "stream": "stdout",
357 322 "text": [
358 "39\n"
323 "44\n"
359 324 ]
360 325 },
361 326 {
362 327 "output_type": "stream",
363 328 "stream": "stdout",
364 329 "text": [
365 "60\n"
330 "41\n"
366 331 ]
367 332 },
368 333 {
369 334 "output_type": "stream",
370 335 "stream": "stdout",
371 336 "text": [
372 "68\n"
337 "34\n"
373 338 ]
374 339 },
375 340 {
376 341 "output_type": "stream",
377 342 "stream": "stdout",
378 343 "text": [
379 "75\n"
344 "30\n"
380 345 ]
381 346 },
382 347 {
383 348 "output_type": "stream",
384 349 "stream": "stdout",
385 350 "text": [
386 "79\n"
351 "28\n"
387 352 ]
388 353 },
389 354 {
390 355 "output_type": "stream",
391 356 "stream": "stdout",
392 357 "text": [
393 "82\n"
358 "26\n"
394 359 ]
395 360 },
396 361 {
397 362 "output_type": "stream",
398 363 "stream": "stdout",
399 364 "text": [
400 "85\n"
365 "25\n"
401 366 ]
402 367 },
403 368 {
404 369 "output_type": "stream",
405 370 "stream": "stdout",
406 371 "text": [
407 "86\n"
372 "24\n"
408 373 ]
409 374 }
410 375 ],
411 "prompt_number": 5
376 "prompt_number": 3
412 377 },
413 378 {
414 379 "cell_type": "heading",
@@ -460,7 +425,7 b''
460 425 ]
461 426 }
462 427 ],
463 "prompt_number": 6
428 "prompt_number": 4
464 429 },
465 430 {
466 431 "cell_type": "markdown",
@@ -490,116 +455,95 b''
490 455 "output_type": "stream",
491 456 "stream": "stdout",
492 457 "text": [
493 "85\n"
494 ]
495 },
496 {
497 "output_type": "stream",
498 "stream": "stdout",
499 "text": [
500 "84\n"
501 ]
502 },
503 {
504 "output_type": "stream",
505 "stream": "stdout",
506 "text": [
507 "81\n"
508 ]
509 },
510 {
511 "output_type": "stream",
512 "stream": "stdout",
513 "text": [
514 "79\n"
458 "23\n"
515 459 ]
516 460 },
517 461 {
518 462 "output_type": "stream",
519 463 "stream": "stdout",
520 464 "text": [
521 "73\n"
465 "24\n"
522 466 ]
523 467 },
524 468 {
525 469 "output_type": "stream",
526 470 "stream": "stdout",
527 471 "text": [
528 "70\n"
472 "28\n"
529 473 ]
530 474 },
531 475 {
532 476 "output_type": "stream",
533 477 "stream": "stdout",
534 478 "text": [
535 "67\n"
479 "30\n"
536 480 ]
537 481 },
538 482 {
539 483 "output_type": "stream",
540 484 "stream": "stdout",
541 485 "text": [
542 "59\n"
486 "37\n"
543 487 ]
544 488 },
545 489 {
546 490 "output_type": "stream",
547 491 "stream": "stdout",
548 492 "text": [
549 "56\n"
493 "39\n"
550 494 ]
551 495 },
552 496 {
553 497 "output_type": "stream",
554 498 "stream": "stdout",
555 499 "text": [
556 "53\n"
500 "41\n"
557 501 ]
558 502 },
559 503 {
560 504 "output_type": "stream",
561 505 "stream": "stdout",
562 506 "text": [
563 "51\n"
507 "44\n"
564 508 ]
565 509 },
566 510 {
567 511 "output_type": "stream",
568 512 "stream": "stdout",
569 513 "text": [
570 "49\n"
514 "46\n"
571 515 ]
572 516 },
573 517 {
574 518 "output_type": "stream",
575 519 "stream": "stdout",
576 520 "text": [
577 "47\n"
521 "48\n"
578 522 ]
579 523 },
580 524 {
581 525 "output_type": "stream",
582 526 "stream": "stdout",
583 527 "text": [
584 "45\n"
528 "50\n"
585 529 ]
586 530 },
587 531 {
588 532 "output_type": "stream",
589 533 "stream": "stdout",
590 534 "text": [
591 "44\n"
535 "51\n"
592 536 ]
593 537 },
594 538 {
595 539 "output_type": "stream",
596 540 "stream": "stdout",
597 541 "text": [
598 "42\n"
542 "53\n"
599 543 ]
600 544 }
601 545 ],
602 "prompt_number": 7
546 "prompt_number": 5
603 547 },
604 548 {
605 549 "cell_type": "code",
@@ -622,15 +566,7 b''
622 566 "stream": "stdout",
623 567 "text": [
624 568 "Button clicked.\n",
625 "43\n"
626 ]
627 },
628 {
629 "output_type": "stream",
630 "stream": "stdout",
631 "text": [
632 "Button clicked.\n",
633 "44\n"
569 "54\n"
634 570 ]
635 571 },
636 572 {
@@ -638,7 +574,7 b''
638 574 "stream": "stdout",
639 575 "text": [
640 576 "Button clicked.\n",
641 "45\n"
577 "55\n"
642 578 ]
643 579 },
644 580 {
@@ -646,35 +582,11 b''
646 582 "stream": "stdout",
647 583 "text": [
648 584 "Button clicked.\n",
649 "46\n"
650 ]
651 },
652 {
653 "output_type": "stream",
654 "stream": "stdout",
655 "text": [
656 "Button clicked.\n",
657 "47\n"
658 ]
659 },
660 {
661 "output_type": "stream",
662 "stream": "stdout",
663 "text": [
664 "Button clicked.\n",
665 "48\n"
666 ]
667 },
668 {
669 "output_type": "stream",
670 "stream": "stdout",
671 "text": [
672 "Button clicked.\n",
673 "49\n"
585 "56\n"
674 586 ]
675 587 }
676 588 ],
677 "prompt_number": 8
589 "prompt_number": 6
678 590 },
679 591 {
680 592 "cell_type": "markdown",
@@ -733,7 +645,7 b''
733 645 "language": "python",
734 646 "metadata": {},
735 647 "outputs": [],
736 "prompt_number": 9
648 "prompt_number": 7
737 649 },
738 650 {
739 651 "cell_type": "code",
General Comments 0
You need to be logged in to leave comments. Login now