|
633 | 633 | { |
634 | 634 | "data": { |
635 | 635 | "text/plain": [ |
636 | | - "'pip 21.2.4 from /Users/hamel/opt/anaconda3/lib/python3.9/site-packages/pip (python 3.9)'" |
| 636 | + "'pip 22.2 from /Users/jhoward/mambaforge/lib/python3.9/site-packages/pip (python 3.9)'" |
637 | 637 | ] |
638 | 638 | }, |
639 | 639 | "execution_count": null, |
|
1024 | 1024 | { |
1025 | 1025 | "data": { |
1026 | 1026 | "text/plain": [ |
1027 | | - "Path('/home/jhoward/git/fastcore/fastcore')" |
| 1027 | + "Path('/Users/jhoward/git/fastcore/fastcore')" |
1028 | 1028 | ] |
1029 | 1029 | }, |
1030 | 1030 | "execution_count": null, |
|
1091 | 1091 | { |
1092 | 1092 | "data": { |
1093 | 1093 | "text/plain": [ |
1094 | | - "Path('05_transform.ipynb')" |
| 1094 | + "Path('parallel_test.py')" |
1095 | 1095 | ] |
1096 | 1096 | }, |
1097 | 1097 | "execution_count": null, |
|
1125 | 1125 | { |
1126 | 1126 | "data": { |
1127 | 1127 | "text/plain": [ |
1128 | | - "(Path('../fastcore/all.py'), Path('05_transform.ipynb'))" |
| 1128 | + "(Path('../fastcore/shutil.py'), Path('_parallel_win.ipynb'))" |
1129 | 1129 | ] |
1130 | 1130 | }, |
1131 | 1131 | "execution_count": null, |
|
1268 | 1268 | { |
1269 | 1269 | "data": { |
1270 | 1270 | "text/markdown": [ |
1271 | | - "<h4 id=\"ReindexCollection\" class=\"doc_header\"><code>class</code> <code>ReindexCollection</code><a href=\"\" class=\"source_link\" style=\"float:right\">[source]</a></h4>\n", |
| 1271 | + "---\n", |
1272 | 1272 | "\n", |
1273 | | - "> <code>ReindexCollection</code>(**`coll`**, **`idxs`**=*`None`*, **`cache`**=*`None`*, **`tfm`**=*`noop`*) :: [`GetAttr`](/basics.html#GetAttr)\n", |
| 1273 | + "### ReindexCollection\n", |
| 1274 | + "\n", |
| 1275 | + "> ReindexCollection (coll, idxs=None, cache=None,\n", |
| 1276 | + "> tfm=<functionnoopat0x106121940>)\n", |
1274 | 1277 | "\n", |
1275 | 1278 | "Reindexes collection `coll` with indices `idxs` and optional LRU cache of size `cache`" |
1276 | 1279 | ], |
1277 | 1280 | "text/plain": [ |
1278 | | - "<IPython.core.display.Markdown object>" |
| 1281 | + "<nbdev.showdoc.BasicMarkdownRenderer>" |
1279 | 1282 | ] |
1280 | 1283 | }, |
| 1284 | + "execution_count": null, |
1281 | 1285 | "metadata": {}, |
1282 | | - "output_type": "display_data" |
| 1286 | + "output_type": "execute_result" |
1283 | 1287 | } |
1284 | 1288 | ], |
1285 | 1289 | "source": [ |
|
1338 | 1342 | { |
1339 | 1343 | "data": { |
1340 | 1344 | "text/markdown": [ |
1341 | | - "<h6 id=\"ReindexCollection.reindex\" class=\"doc_header\"><code>ReindexCollection.reindex</code><a href=\"__main__.py#L14\" class=\"source_link\" style=\"float:right\">[source]</a></h6>\n", |
| 1345 | + "---\n", |
1342 | 1346 | "\n", |
1343 | | - "> <code>ReindexCollection.reindex</code>(**`idxs`**)\n", |
| 1347 | + "#### ReindexCollection.reindex\n", |
| 1348 | + "\n", |
| 1349 | + "> ReindexCollection.reindex (idxs)\n", |
1344 | 1350 | "\n", |
1345 | 1351 | "Replace `self.idxs` with idxs" |
1346 | 1352 | ], |
1347 | 1353 | "text/plain": [ |
1348 | | - "<IPython.core.display.Markdown object>" |
| 1354 | + "<nbdev.showdoc.BasicMarkdownRenderer>" |
1349 | 1355 | ] |
1350 | 1356 | }, |
| 1357 | + "execution_count": null, |
1351 | 1358 | "metadata": {}, |
1352 | | - "output_type": "display_data" |
| 1359 | + "output_type": "execute_result" |
1353 | 1360 | } |
1354 | 1361 | ], |
1355 | 1362 | "source": [ |
|
1425 | 1432 | { |
1426 | 1433 | "data": { |
1427 | 1434 | "text/markdown": [ |
1428 | | - "<h5 id=\"ReindexCollection.cache_clear\" class=\"doc_header\"><code>ReindexCollection.cache_clear</code><a href=\"__main__.py#L18\" class=\"source_link\" style=\"float:right\">[source]</a></h5>\n", |
| 1435 | + "---\n", |
| 1436 | + "\n", |
| 1437 | + "#### ReindexCollection.cache_clear\n", |
1429 | 1438 | "\n", |
1430 | | - "> <code>ReindexCollection.cache_clear</code>()\n", |
| 1439 | + "> ReindexCollection.cache_clear ()\n", |
1431 | 1440 | "\n", |
1432 | 1441 | "Clear LRU cache" |
1433 | 1442 | ], |
1434 | 1443 | "text/plain": [ |
1435 | | - "<IPython.core.display.Markdown object>" |
| 1444 | + "<nbdev.showdoc.BasicMarkdownRenderer>" |
1436 | 1445 | ] |
1437 | 1446 | }, |
| 1447 | + "execution_count": null, |
1438 | 1448 | "metadata": {}, |
1439 | | - "output_type": "display_data" |
| 1449 | + "output_type": "execute_result" |
1440 | 1450 | } |
1441 | 1451 | ], |
1442 | 1452 | "source": [ |
|
1477 | 1487 | { |
1478 | 1488 | "data": { |
1479 | 1489 | "text/markdown": [ |
1480 | | - "<h5 id=\"ReindexCollection.shuffle\" class=\"doc_header\"><code>ReindexCollection.shuffle</code><a href=\"__main__.py#L15\" class=\"source_link\" style=\"float:right\">[source]</a></h5>\n", |
| 1490 | + "---\n", |
| 1491 | + "\n", |
| 1492 | + "#### ReindexCollection.shuffle\n", |
1481 | 1493 | "\n", |
1482 | | - "> <code>ReindexCollection.shuffle</code>()\n", |
| 1494 | + "> ReindexCollection.shuffle ()\n", |
1483 | 1495 | "\n", |
1484 | 1496 | "Randomly shuffle indices" |
1485 | 1497 | ], |
1486 | 1498 | "text/plain": [ |
1487 | | - "<IPython.core.display.Markdown object>" |
| 1499 | + "<nbdev.showdoc.BasicMarkdownRenderer>" |
1488 | 1500 | ] |
1489 | 1501 | }, |
| 1502 | + "execution_count": null, |
1490 | 1503 | "metadata": {}, |
1491 | | - "output_type": "display_data" |
| 1504 | + "output_type": "execute_result" |
1492 | 1505 | } |
1493 | 1506 | ], |
1494 | 1507 | "source": [ |
|
1510 | 1523 | { |
1511 | 1524 | "data": { |
1512 | 1525 | "text/plain": [ |
1513 | | - "['h', 'b', 'e', 'g', 'a', 'd', 'f', 'c']" |
| 1526 | + "['f', 'g', 'c', 'd', 'h', 'b', 'e', 'a']" |
1514 | 1527 | ] |
1515 | 1528 | }, |
1516 | 1529 | "execution_count": null, |
|
1614 | 1627 | { |
1615 | 1628 | "data": { |
1616 | 1629 | "text/plain": [ |
1617 | | - "'https://github.com/fastai/fastcore/tree/master/fastcore/test.py#L34'" |
| 1630 | + "'https://github.com/fastai/fastcore/tree/master/fastcore/test.py#L35'" |
1618 | 1631 | ] |
1619 | 1632 | }, |
1620 | 1633 | "execution_count": null, |
|
1923 | 1936 | { |
1924 | 1937 | "data": { |
1925 | 1938 | "text/markdown": [ |
1926 | | - "<h4 id=\"EventTimer\" class=\"doc_header\"><code>class</code> <code>EventTimer</code><a href=\"\" class=\"source_link\" style=\"float:right\">[source]</a></h4>\n", |
| 1939 | + "---\n", |
| 1940 | + "\n", |
| 1941 | + "### EventTimer\n", |
1927 | 1942 | "\n", |
1928 | | - "> <code>EventTimer</code>(**`store`**=*`5`*, **`span`**=*`60`*)\n", |
| 1943 | + "> EventTimer (store=5, span=60)\n", |
1929 | 1944 | "\n", |
1930 | 1945 | "An event timer with history of `store` items of time `span`" |
1931 | 1946 | ], |
1932 | 1947 | "text/plain": [ |
1933 | | - "<IPython.core.display.Markdown object>" |
| 1948 | + "<nbdev.showdoc.BasicMarkdownRenderer>" |
1934 | 1949 | ] |
1935 | 1950 | }, |
| 1951 | + "execution_count": null, |
1936 | 1952 | "metadata": {}, |
1937 | | - "output_type": "display_data" |
| 1953 | + "output_type": "execute_result" |
1938 | 1954 | } |
1939 | 1955 | ], |
1940 | 1956 | "source": [ |
|
1957 | 1973 | "name": "stdout", |
1958 | 1974 | "output_type": "stream", |
1959 | 1975 | "text": [ |
1960 | | - "Num Events: 7, Freq/sec: 315.8\n", |
1961 | | - "Most recent: ▇▁▁▂▅ 423.6 331.5 332.6 361.3 399.7\n" |
| 1976 | + "Num Events: 5, Freq/sec: 262.4\n", |
| 1977 | + "Most recent: ▇▃▁▃▆ 378.3 298.9 195.8 278.2 346.5\n" |
1962 | 1978 | ] |
1963 | 1979 | } |
1964 | 1980 | ], |
|
2035 | 2051 | { |
2036 | 2052 | "data": { |
2037 | 2053 | "text/markdown": [ |
2038 | | - "<h4 id=\"PartialFormatter\" class=\"doc_header\"><code>class</code> <code>PartialFormatter</code><a href=\"\" class=\"source_link\" style=\"float:right\">[source]</a></h4>\n", |
| 2054 | + "---\n", |
2039 | 2055 | "\n", |
2040 | | - "> <code>PartialFormatter</code>() :: `Formatter`\n", |
| 2056 | + "### PartialFormatter\n", |
| 2057 | + "\n", |
| 2058 | + "> PartialFormatter ()\n", |
2041 | 2059 | "\n", |
2042 | 2060 | "A `string.Formatter` that doesn't error on missing fields, and tracks missing fields and unused args" |
2043 | 2061 | ], |
2044 | 2062 | "text/plain": [ |
2045 | | - "<IPython.core.display.Markdown object>" |
| 2063 | + "<nbdev.showdoc.BasicMarkdownRenderer>" |
2046 | 2064 | ] |
2047 | 2065 | }, |
| 2066 | + "execution_count": null, |
2048 | 2067 | "metadata": {}, |
2049 | | - "output_type": "display_data" |
| 2068 | + "output_type": "execute_result" |
2050 | 2069 | } |
2051 | 2070 | ], |
2052 | 2071 | "source": [ |
|
2238 | 2257 | { |
2239 | 2258 | "data": { |
2240 | 2259 | "text/markdown": [ |
2241 | | - "<h4 id=\"ContextManagers\" class=\"doc_header\"><code>class</code> <code>ContextManagers</code><a href=\"\" class=\"source_link\" style=\"float:right\">[source]</a></h4>\n", |
| 2260 | + "---\n", |
2242 | 2261 | "\n", |
2243 | | - "> <code>ContextManagers</code>(**`mgrs`**) :: [`GetAttr`](/basics.html#GetAttr)\n", |
| 2262 | + "### ContextManagers\n", |
| 2263 | + "\n", |
| 2264 | + "> ContextManagers (mgrs)\n", |
2244 | 2265 | "\n", |
2245 | 2266 | "Wrapper for `contextlib.ExitStack` which enters a collection of context managers" |
2246 | 2267 | ], |
2247 | 2268 | "text/plain": [ |
2248 | | - "<IPython.core.display.Markdown object>" |
| 2269 | + "<nbdev.showdoc.BasicMarkdownRenderer>" |
2249 | 2270 | ] |
2250 | 2271 | }, |
| 2272 | + "execution_count": null, |
2251 | 2273 | "metadata": {}, |
2252 | | - "output_type": "display_data" |
| 2274 | + "output_type": "execute_result" |
2253 | 2275 | } |
2254 | 2276 | ], |
2255 | 2277 | "source": [ |
|
2270 | 2292 | " return L(x[i] for i in sorted(range_of(x), key=lambda o: o+n*(1+random.random()*pct)))" |
2271 | 2293 | ] |
2272 | 2294 | }, |
| 2295 | + { |
| 2296 | + "cell_type": "code", |
| 2297 | + "execution_count": null, |
| 2298 | + "metadata": {}, |
| 2299 | + "outputs": [], |
| 2300 | + "source": [ |
| 2301 | + "#|export\n", |
| 2302 | + "def console_help(\n", |
| 2303 | + " libname:str): # name of library for console script listing\n", |
| 2304 | + " \"Show help for all console scripts from `libname`\"\n", |
| 2305 | + " from pkg_resources import iter_entry_points as ep\n", |
| 2306 | + " for e in ep('console_scripts'): \n", |
| 2307 | + " if e.module_name.startswith(libname+'.'): \n", |
| 2308 | + " nm = f'\\033[1m\\033[94m{e.name}\\033[0m'\n", |
| 2309 | + " print(f'{nm:45}{e.load().__doc__}')" |
| 2310 | + ] |
| 2311 | + }, |
2273 | 2312 | { |
2274 | 2313 | "cell_type": "markdown", |
2275 | 2314 | "metadata": {}, |
|
2281 | 2320 | "cell_type": "code", |
2282 | 2321 | "execution_count": null, |
2283 | 2322 | "metadata": {}, |
2284 | | - "outputs": [ |
2285 | | - { |
2286 | | - "name": "stdout", |
2287 | | - "output_type": "stream", |
2288 | | - "text": [ |
2289 | | - "Converted 00_test.ipynb.\n", |
2290 | | - "Converted 01_basics.ipynb.\n", |
2291 | | - "Converted 02_foundation.ipynb.\n", |
2292 | | - "Converted 03_xtras.ipynb.\n", |
2293 | | - "Converted 03a_parallel.ipynb.\n", |
2294 | | - "Converted 03b_net.ipynb.\n", |
2295 | | - "Converted 04_dispatch.ipynb.\n", |
2296 | | - "Converted 05_transform.ipynb.\n", |
2297 | | - "Converted 06_docments.ipynb.\n", |
2298 | | - "Converted 07_meta.ipynb.\n", |
2299 | | - "Converted 08_script.ipynb.\n", |
2300 | | - "Converted index.ipynb.\n", |
2301 | | - "Converted parallel_win.ipynb.\n" |
2302 | | - ] |
2303 | | - } |
2304 | | - ], |
| 2323 | + "outputs": [], |
2305 | 2324 | "source": [ |
2306 | 2325 | "#|hide\n", |
2307 | | - "#|eval: false\n", |
2308 | 2326 | "from nbdev import nbdev_export\n", |
2309 | 2327 | "nbdev_export()" |
2310 | 2328 | ] |
|
0 commit comments