Skip to content

Commit

Permalink
0.540
Browse files Browse the repository at this point in the history
  • Loading branch information
sizhky committed Aug 24, 2024
1 parent a2cf6d4 commit 72e85c2
Show file tree
Hide file tree
Showing 98 changed files with 23,423 additions and 7,738 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,8 @@ dist: clean

clean:
rm -rf dist

profile-time:
kernprof -l torch_snippets/__module_timing__.py
mkdir -p debug
python -m line_profiler -tm "__module_timing__.py.lprof" | tee debug/profile_time.txt
Binary file added __module_timing__.py.lprof
Binary file not shown.
7 changes: 7 additions & 0 deletions _proc/AttrDict.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,13 @@
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.14"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
"state": {},
"version_major": 2,
"version_minor": 0
}
}
},
"nbformat": 4,
Expand Down
75 changes: 75 additions & 0 deletions _proc/adapters.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,74 @@
"show_doc(csvs_2_cvat)"
]
},
{
"cell_type": "code",
"execution_count": 8,
"has_sd": true,
"metadata": {},
"outputs": [
{
"data": {
"text/markdown": [
"---\n",
"\n",
"### yolo_2_df\n",
"\n",
"> yolo_2_df (yolo, h, w, id2class, class_column)"
],
"text/plain": [
"---\n",
"\n",
"### yolo_2_df\n",
"\n",
"> yolo_2_df (yolo, h, w, id2class, class_column)"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#| echo: false\n",
"#| output: asis\n",
"show_doc(yolo_2_df)"
]
},
{
"cell_type": "code",
"execution_count": 9,
"has_sd": true,
"metadata": {},
"outputs": [
{
"data": {
"text/markdown": [
"---\n",
"\n",
"### df_2_yolo\n",
"\n",
"> df_2_yolo (df, h, w, class2id, class_column)"
],
"text/plain": [
"---\n",
"\n",
"### df_2_yolo\n",
"\n",
"> df_2_yolo (df, h, w, class2id, class_column)"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#| echo: false\n",
"#| output: asis\n",
"show_doc(df_2_yolo)"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -399,6 +467,13 @@
"interpreter": {
"hash": "6b6ea07c3428539b6f2e73b58ccfbe441e6932da93cb0b63ea798c577834408a"
}
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
"state": {},
"version_major": 2,
"version_minor": 0
}
}
},
"nbformat": 4,
Expand Down
62 changes: 62 additions & 0 deletions _proc/bokeh_plotting.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"cells": [
{
"cell_type": "raw",
"metadata": {},
"source": [
"---\n",
"description: For rapid prototyping bokeh charts\n",
"output-file: bokeh_plotting.html\n",
"title: Bokeh Plots\n",
"\n",
"---\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"language": "python"
},
"outputs": [],
"source": [
"bplot = get_bplot()\n",
"bplot.line(np.arange(100), np.cumsum(np.random.uniform(size=100)))\n",
"bshow(bplot)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"language": "python"
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "mdm",
"language": "python",
"name": "mdm"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
"state": {},
"version_major": 2,
"version_minor": 0
}
}
},
"nbformat": 4,
"nbformat_minor": 4
}
18 changes: 8 additions & 10 deletions _proc/bounding_boxes.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,7 @@
"metadata": {
"language": "python"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[2;36m[08/23/24 18:12:57]\u001b[0m\u001b[2;36m \u001b[0m\u001b[2;31mWARNING \u001b[0m Unable to load torch and dependent libraries from torch-snippets. \u001b]8;id=185334;file:///Users/yeshwanth/Code/Personal/torch_snippets/torch_snippets/loader.py:108\u001b\\\u001b[2mloader.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=169396;file:///Users/yeshwanth/Code/Personal/torch_snippets/torch_snippets/loader.py:108#<module>:108\u001b\\\u001b[2m<module>:108\u001b[0m\u001b]8;;\u001b\\\n",
"\u001b[2;36m \u001b[0m Functionalities might be limited. pip install lovely-tensors in case there are torch related errors \u001b[2m \u001b[0m\n"
]
}
],
"outputs": [],
"source": [
"from torch_snippets import show, read, P, pd"
]
Expand Down Expand Up @@ -654,6 +645,13 @@
"interpreter": {
"hash": "0a92af74ccf65e106ae96852a45a9b0a5e11a3c414a16fc8bb2d134868e55bfd"
}
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
"state": {},
"version_major": 2,
"version_minor": 0
}
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit 72e85c2

Please sign in to comment.