Skip to content

Commit

Permalink
fixes #15
Browse files Browse the repository at this point in the history
  • Loading branch information
ncoop57 committed Dec 24, 2024
1 parent 204708c commit aa5682a
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 59 deletions.
112 changes: 58 additions & 54 deletions nbs/00_core.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -414,33 +414,23 @@
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"> ********************************************************************************\n",
"\n",
"!!\n",
" <span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">self.initialize_options</span><span style=\"font-weight: bold\">()</span>\n",
"installing to build/bdist.macosx-<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">14.0</span>-arm64/wheel\n",
"running install\n",
"running install_lib\n",
"creating build/bdist.macosx-<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">14.0</span>-arm64/wheel\n",
"creating build/bdist.macosx-<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">14.0</span>-arm64/wheel/shell_sage\n",
"copying build/lib/shell_sage/config.py -&gt; build/bdist.macosx-<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">14.0</span>-arm64/wheel/.<span style=\"color: #800080; text-decoration-color: #800080\">/</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff\">shell_sage</span>\n",
"copying build/lib/shell_sage/_modidx.py -&gt; build/bdist.macosx-<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">14.0</span>-arm64/wheel/.<span style=\"color: #800080; text-decoration-color: #800080\">/</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff\">shell_sage</span>\n",
"copying build/lib/she\n",
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">%20and%20trying%20to%20create%20their%20own%20complete%20list%20of%20location%20IDs.%0A%0AThere%27s%<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">20j</span>ust%20one%20\n",
"problem%3A%20by%20holding%<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2</span>\n",
"0the%20two%20lists%20up%20side%20by%20side%<span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">20</span><span style=\"font-weight: bold\">(</span>your%20puzzle%20input<span style=\"font-weight: bold\">)</span>%2C%20it%20quickly%20becomes%20clear%20that%20t\n",
"he%20lists%20aren%27t%20ver\n",
"y%20similar.%20Maybe%20you%20can%20help%20The%20Historians%20reconcile%20their%20lists%3F%0A%0AFor%20example%3A%0A%\n",
"0A%<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">60</span>%<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">60</span>%<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">60</span>%0A3%<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">20</span>%<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">20</span>%<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">204</span>%<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span>\n",
"A4%<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">20</span>%<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">20</span>%<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">203</span>%0A2%<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">20</span>%<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">20</span>%<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">205</span>%0A1%<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">20</span>%<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">20</span>%<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">203</span>%0A3%<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">20</span>%<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">20</span>%<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">209</span>%0A3%<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">20</span>%<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">20</span>%<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">203</span>%0A%<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">60</span>%<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">60</span>%<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">60</span>%0A\n",
"</pre>\n"
],
"text/plain": [
" ********************************************************************************\n",
"\n",
"!!\n",
" \u001b[1;35mself.initialize_options\u001b[0m\u001b[1m(\u001b[0m\u001b[1m)\u001b[0m\n",
"installing to build/bdist.macosx-\u001b[1;36m14.0\u001b[0m-arm64/wheel\n",
"running install\n",
"running install_lib\n",
"creating build/bdist.macosx-\u001b[1;36m14.0\u001b[0m-arm64/wheel\n",
"creating build/bdist.macosx-\u001b[1;36m14.0\u001b[0m-arm64/wheel/shell_sage\n",
"copying build/lib/shell_sage/config.py -> build/bdist.macosx-\u001b[1;36m14.0\u001b[0m-arm64/wheel/.\u001b[35m/\u001b[0m\u001b[95mshell_sage\u001b[0m\n",
"copying build/lib/shell_sage/_modidx.py -> build/bdist.macosx-\u001b[1;36m14.0\u001b[0m-arm64/wheel/.\u001b[35m/\u001b[0m\u001b[95mshell_sage\u001b[0m\n",
"copying build/lib/she\n"
"%20and%20trying%20to%20create%20their%20own%20complete%20list%20of%20location%20IDs.%0A%0AThere%27s%\u001b[1;36m20j\u001b[0must%20one%20\n",
"problem%3A%20by%20holding%\u001b[1;36m2\u001b[0m\n",
"0the%20two%20lists%20up%20side%20by%20side%\u001b[1;35m20\u001b[0m\u001b[1m(\u001b[0myour%20puzzle%20input\u001b[1m)\u001b[0m%2C%20it%20quickly%20becomes%20clear%20that%20t\n",
"he%20lists%20aren%27t%20ver\n",
"y%20similar.%20Maybe%20you%20can%20help%20The%20Historians%20reconcile%20their%20lists%3F%0A%0AFor%20example%3A%0A%\n",
"0A%\u001b[1;36m60\u001b[0m%\u001b[1;36m60\u001b[0m%\u001b[1;36m60\u001b[0m%0A3%\u001b[1;36m20\u001b[0m%\u001b[1;36m20\u001b[0m%\u001b[1;36m204\u001b[0m%\u001b[1;36m0\u001b[0m\n",
"A4%\u001b[1;36m20\u001b[0m%\u001b[1;36m20\u001b[0m%\u001b[1;36m203\u001b[0m%0A2%\u001b[1;36m20\u001b[0m%\u001b[1;36m20\u001b[0m%\u001b[1;36m205\u001b[0m%0A1%\u001b[1;36m20\u001b[0m%\u001b[1;36m20\u001b[0m%\u001b[1;36m203\u001b[0m%0A3%\u001b[1;36m20\u001b[0m%\u001b[1;36m20\u001b[0m%\u001b[1;36m209\u001b[0m%0A3%\u001b[1;36m20\u001b[0m%\u001b[1;36m20\u001b[0m%\u001b[1;36m203\u001b[0m%0A%\u001b[1;36m60\u001b[0m%\u001b[1;36m60\u001b[0m%\u001b[1;36m60\u001b[0m%0A\n"
]
},
"metadata": {},
Expand Down Expand Up @@ -475,33 +465,47 @@
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">pane</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #808000; text-decoration-color: #808000\">id</span><span style=\"color: #000000; text-decoration-color: #000000\">=%</span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1</span><span style=\"color: #000000; text-decoration-color: #000000\"> active&gt; ********************************************************************************</span>\n",
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">pane</span><span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #808000; text-decoration-color: #808000\">id</span><span style=\"color: #000000; text-decoration-color: #000000\">=%</span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1</span><span style=\"color: #000000; text-decoration-color: #000000\"> &gt;IPython </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">8.30</span><span style=\"color: #000000; text-decoration-color: #000000\">.</span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0</span><span style=\"color: #000000; text-decoration-color: #000000\"> -- An enhanced Interactive Python. Type </span><span style=\"color: #008000; text-decoration-color: #008000\">'?'</span><span style=\"color: #000000; text-decoration-color: #000000\"> for help</span>\n",
"<span style=\"color: #000000; text-decoration-color: #000000\">.</span>\n",
"<span style=\"color: #000000; text-decoration-color: #000000\">&lt;IPython.core.display.Javascript object</span><span style=\"font-weight: bold\">&gt;</span>\n",
"\n",
"In <span style=\"font-weight: bold\">[</span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1</span><span style=\"font-weight: bold\">]</span>: import aimagic\n",
"\n",
"In <span style=\"font-weight: bold\">[</span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2</span><span style=\"font-weight: bold\">]</span>:\n",
"\n",
"<span style=\"color: #000000; text-decoration-color: #000000\">!!</span>\n",
"<span style=\"color: #000000; text-decoration-color: #000000\"> </span><span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">self.initialize_options</span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">()</span>\n",
"<span style=\"color: #000000; text-decoration-color: #000000\">installing to build/bdist.macosx-</span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">14.0</span><span style=\"color: #000000; text-decoration-color: #000000\">-arm64/wheel</span>\n",
"<span style=\"color: #000000; text-decoration-color: #000000\">running install</span>\n",
"<span style=\"color: #000000; text-decoration-color: #000000\">running install_lib</span>\n",
"<span style=\"color: #000000; text-decoration-color: #000000\">creating build/bdist.macosx-</span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">14.0</span><span style=\"color: #000000; text-decoration-color: #000000\">-arm64/wheel</span>\n",
"<span style=\"color: #000000; text-decoration-color: #000000\">creating build/bdist.macosx-</span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">14.0</span><span style=\"color: #000000; text-decoration-color: #000000\">-arm64/wheel/shell_sage</span>\n",
"<span style=\"color: #000000; text-decoration-color: #000000\">copying build/lib/shell_sage/config.py -&gt; build/bdist.macosx-</span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">14.0</span><span style=\"color: #000000; text-decoration-color: #000000\">-arm64/wheel/.</span><span style=\"color: #800080; text-decoration-color: #800080\">/</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff\">shell_sage</span>\n",
"<span style=\"color: #000000; text-decoration-color: #000000\">copying build/lib/shell_sage/_modidx.py -</span><span style=\"font-weight: bold\">&gt;</span> build/bdist.macosx-<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">14.0</span>-arm64/wheel/.<span style=\"color: #800080; text-decoration-color: #800080\">/</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff\">shell_sage</span>\n",
"co\n",
"\n",
"Do you really want to exit <span style=\"font-weight: bold\">(</span><span style=\"color: #800080; text-decoration-color: #800080\">/</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff\">n</span><span style=\"font-weight: bold\">)</span>? y\n",
"<span style=\"font-weight: bold\">(</span>uv<span style=\"font-weight: bold\">)</span> Nathans-MacBook-Air:git nathan$ clear\n",
"<span style=\"font-weight: bold\">(</span>uv<span style=\"font-weight: bold\">)</span> Nathans-MacBook-Air:git nathan$ ls\n",
"ContextKit msglm\n",
"README.md nate-research\n",
"aimagic nb2fasthtml\n",
"answerdotai nbdev\n",
"apswutils pips.txt\n",
"claudette plash\n",
"clone.sh playwrightn\n",
"</pre>\n"
],
"text/plain": [
"\u001b[1m<\u001b[0m\u001b[1;95mpane\u001b[0m\u001b[39m \u001b[0m\u001b[33mid\u001b[0m\u001b[39m=%\u001b[0m\u001b[1;36m1\u001b[0m\u001b[39m active> ********************************************************************************\u001b[0m\n",
"\u001b[1m<\u001b[0m\u001b[1;95mpane\u001b[0m\u001b[39m \u001b[0m\u001b[33mid\u001b[0m\u001b[39m=%\u001b[0m\u001b[1;36m1\u001b[0m\u001b[39m >IPython \u001b[0m\u001b[1;36m8.30\u001b[0m\u001b[39m.\u001b[0m\u001b[1;36m0\u001b[0m\u001b[39m -- An enhanced Interactive Python. Type \u001b[0m\u001b[32m'?'\u001b[0m\u001b[39m for help\u001b[0m\n",
"\u001b[39m.\u001b[0m\n",
"\u001b[39m<IPython.core.display.Javascript object\u001b[0m\u001b[1m>\u001b[0m\n",
"\n",
"In \u001b[1m[\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1m]\u001b[0m: import aimagic\n",
"\n",
"In \u001b[1m[\u001b[0m\u001b[1;36m2\u001b[0m\u001b[1m]\u001b[0m:\n",
"\n",
"\n",
"\u001b[39m!!\u001b[0m\n",
"\u001b[39m \u001b[0m\u001b[1;35mself.initialize_options\u001b[0m\u001b[1;39m(\u001b[0m\u001b[1;39m)\u001b[0m\n",
"\u001b[39minstalling to build/bdist.macosx-\u001b[0m\u001b[1;36m14.0\u001b[0m\u001b[39m-arm64/wheel\u001b[0m\n",
"\u001b[39mrunning install\u001b[0m\n",
"\u001b[39mrunning install_lib\u001b[0m\n",
"\u001b[39mcreating build/bdist.macosx-\u001b[0m\u001b[1;36m14.0\u001b[0m\u001b[39m-arm64/wheel\u001b[0m\n",
"\u001b[39mcreating build/bdist.macosx-\u001b[0m\u001b[1;36m14.0\u001b[0m\u001b[39m-arm64/wheel/shell_sage\u001b[0m\n",
"\u001b[39mcopying build/lib/shell_sage/config.py -> build/bdist.macosx-\u001b[0m\u001b[1;36m14.0\u001b[0m\u001b[39m-arm64/wheel/.\u001b[0m\u001b[35m/\u001b[0m\u001b[95mshell_sage\u001b[0m\n",
"\u001b[39mcopying build/lib/shell_sage/_modidx.py -\u001b[0m\u001b[1m>\u001b[0m build/bdist.macosx-\u001b[1;36m14.0\u001b[0m-arm64/wheel/.\u001b[35m/\u001b[0m\u001b[95mshell_sage\u001b[0m\n",
"co\n"
"Do you really want to exit \u001b[1m(\u001b[0m\u001b[35m/\u001b[0m\u001b[95mn\u001b[0m\u001b[1m)\u001b[0m? y\n",
"\u001b[1m(\u001b[0muv\u001b[1m)\u001b[0m Nathans-MacBook-Air:git nathan$ clear\n",
"\u001b[1m(\u001b[0muv\u001b[1m)\u001b[0m Nathans-MacBook-Air:git nathan$ ls\n",
"ContextKit msglm\n",
"README.md nate-research\n",
"aimagic nb2fasthtml\n",
"answerdotai nbdev\n",
"apswutils pips.txt\n",
"claudette plash\n",
"clone.sh playwrightn\n"
]
},
"metadata": {},
Expand Down Expand Up @@ -681,27 +685,27 @@
{
"data": {
"text/markdown": [
"**Hello! I'm ShellSage, your friendly command-line teaching assistant.**\n",
"**Hello!**\n",
"\n",
"I'll help you master shell commands and system administration skills. Whether you're a beginner or just need a refresher, I'm here to provide clear explanations, examples, and guidance.\n",
"I'm ShellSage, your friendly command-line teaching assistant. I'll help you learn and master shell commands, system administration, and more. **I exist solely to assist and educate**, so feel free to ask me anything, from basic queries to complex problem-solving.\n",
"\n",
"What can I assist you with today? Do you have a specific question or problem you'd like help with?\n",
"What's on your mind? Do you have a specific question or topic you'd like to explore?\n",
"\n",
"<details>\n",
"\n",
"- id: chatcmpl-368\n",
"- choices: [Choice(finish_reason='stop', index=0, logprobs=None, message=ChatCompletionMessage(content=\"**Hello! I'm ShellSage, your friendly command-line teaching assistant.**\\n\\nI'll help you master shell commands and system administration skills. Whether you're a beginner or just need a refresher, I'm here to provide clear explanations, examples, and guidance.\\n\\nWhat can I assist you with today? Do you have a specific question or problem you'd like help with?\", refusal=None, role='assistant', audio=None, function_call=None, tool_calls=None))]\n",
"- created: 1734630256\n",
"- id: chatcmpl-727\n",
"- choices: [Choice(finish_reason='stop', index=0, logprobs=None, message=ChatCompletionMessage(content=\"**Hello!**\\n\\nI'm ShellSage, your friendly command-line teaching assistant. I'll help you learn and master shell commands, system administration, and more. **I exist solely to assist and educate**, so feel free to ask me anything, from basic queries to complex problem-solving.\\n\\nWhat's on your mind? Do you have a specific question or topic you'd like to explore?\", refusal=None, role='assistant', audio=None, function_call=None, tool_calls=None))]\n",
"- created: 1735058853\n",
"- model: llama3.2\n",
"- object: chat.completion\n",
"- service_tier: None\n",
"- system_fingerprint: fp_ollama\n",
"- usage: CompletionUsage(completion_tokens=77, prompt_tokens=344, total_tokens=421, completion_tokens_details=None, prompt_tokens_details=None)\n",
"- usage: CompletionUsage(completion_tokens=79, prompt_tokens=344, total_tokens=423, completion_tokens_details=None, prompt_tokens_details=None)\n",
"\n",
"</details>"
],
"text/plain": [
"ChatCompletion(id='chatcmpl-368', choices=[Choice(finish_reason='stop', index=0, logprobs=None, message=ChatCompletionMessage(content=\"**Hello! I'm ShellSage, your friendly command-line teaching assistant.**\\n\\nI'll help you master shell commands and system administration skills. Whether you're a beginner or just need a refresher, I'm here to provide clear explanations, examples, and guidance.\\n\\nWhat can I assist you with today? Do you have a specific question or problem you'd like help with?\", refusal=None, role='assistant', audio=None, function_call=None, tool_calls=None))], created=1734630256, model='llama3.2', object='chat.completion', service_tier=None, system_fingerprint='fp_ollama', usage=In: 344; Out: 77; Total: 421)"
"ChatCompletion(id='chatcmpl-727', choices=[Choice(finish_reason='stop', index=0, logprobs=None, message=ChatCompletionMessage(content=\"**Hello!**\\n\\nI'm ShellSage, your friendly command-line teaching assistant. I'll help you learn and master shell commands, system administration, and more. **I exist solely to assist and educate**, so feel free to ask me anything, from basic queries to complex problem-solving.\\n\\nWhat's on your mind? Do you have a specific question or topic you'd like to explore?\", refusal=None, role='assistant', audio=None, function_call=None, tool_calls=None))], created=1735058853, model='llama3.2', object='chat.completion', service_tier=None, system_fingerprint='fp_ollama', usage=In: 344; Out: 79; Total: 423)"
]
},
"execution_count": null,
Expand Down
Loading

0 comments on commit aa5682a

Please sign in to comment.