Skip to content

Commit

Permalink
🐋
Browse files Browse the repository at this point in the history
  • Loading branch information
chengjun committed Nov 10, 2023
1 parent fcdf207 commit 31f7fec
Show file tree
Hide file tree
Showing 33 changed files with 30,494 additions and 1,645 deletions.
494 changes: 494 additions & 0 deletions .ipynb_checkpoints/0-chatgpt-checkpoint.ipynb

Large diffs are not rendered by default.

238 changes: 238 additions & 0 deletions .ipynb_checkpoints/0-iching-checkpoint.ipynb

Large diffs are not rendered by default.

207 changes: 182 additions & 25 deletions .ipynb_checkpoints/03-beginning-python-checkpoint.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
"source": [
"# The 1st Chapter\n",
"\n",
"Beginning Python "
"### Beginning Python "
]
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 12,
"id": "2eb40c93",
"metadata": {
"slideshow": {
Expand All @@ -30,53 +30,53 @@
"text": [
"Requirement already satisfied: RISE in /opt/anaconda3/lib/python3.9/site-packages (5.7.1)\n",
"Requirement already satisfied: notebook>=6.0 in /opt/anaconda3/lib/python3.9/site-packages (from RISE) (6.4.5)\n",
"Requirement already satisfied: pyzmq>=17 in /opt/anaconda3/lib/python3.9/site-packages (from notebook>=6.0->RISE) (22.2.1)\n",
"Requirement already satisfied: tornado>=6.1 in /opt/anaconda3/lib/python3.9/site-packages (from notebook>=6.0->RISE) (6.1)\n",
"Requirement already satisfied: nbformat in /opt/anaconda3/lib/python3.9/site-packages (from notebook>=6.0->RISE) (5.1.3)\n",
"Requirement already satisfied: ipython-genutils in /opt/anaconda3/lib/python3.9/site-packages (from notebook>=6.0->RISE) (0.2.0)\n",
"Requirement already satisfied: prometheus-client in /opt/anaconda3/lib/python3.9/site-packages (from notebook>=6.0->RISE) (0.11.0)\n",
"Requirement already satisfied: ipykernel in /opt/anaconda3/lib/python3.9/site-packages (from notebook>=6.0->RISE) (6.4.1)\n",
"Requirement already satisfied: argon2-cffi in /opt/anaconda3/lib/python3.9/site-packages (from notebook>=6.0->RISE) (20.1.0)\n",
"Requirement already satisfied: nbformat in /opt/anaconda3/lib/python3.9/site-packages (from notebook>=6.0->RISE) (5.1.3)\n",
"Requirement already satisfied: jupyter-core>=4.6.1 in /opt/anaconda3/lib/python3.9/site-packages (from notebook>=6.0->RISE) (4.8.1)\n",
"Requirement already satisfied: terminado>=0.8.3 in /opt/anaconda3/lib/python3.9/site-packages (from notebook>=6.0->RISE) (0.9.4)\n",
"Requirement already satisfied: traitlets>=4.2.1 in /opt/anaconda3/lib/python3.9/site-packages (from notebook>=6.0->RISE) (5.1.0)\n",
"Requirement already satisfied: ipython-genutils in /opt/anaconda3/lib/python3.9/site-packages (from notebook>=6.0->RISE) (0.2.0)\n",
"Requirement already satisfied: jupyter-client>=5.3.4 in /opt/anaconda3/lib/python3.9/site-packages (from notebook>=6.0->RISE) (6.1.12)\n",
"Requirement already satisfied: nbconvert in /opt/anaconda3/lib/python3.9/site-packages (from notebook>=6.0->RISE) (6.1.0)\n",
"Requirement already satisfied: jupyter-core>=4.6.1 in /opt/anaconda3/lib/python3.9/site-packages (from notebook>=6.0->RISE) (4.8.1)\n",
"Requirement already satisfied: jinja2 in /opt/anaconda3/lib/python3.9/site-packages (from notebook>=6.0->RISE) (2.11.3)\n",
"Requirement already satisfied: Send2Trash>=1.5.0 in /opt/anaconda3/lib/python3.9/site-packages (from notebook>=6.0->RISE) (1.8.0)\n",
"Requirement already satisfied: ipykernel in /opt/anaconda3/lib/python3.9/site-packages (from notebook>=6.0->RISE) (6.4.1)\n",
"Requirement already satisfied: pyzmq>=17 in /opt/anaconda3/lib/python3.9/site-packages (from notebook>=6.0->RISE) (22.2.1)\n",
"Requirement already satisfied: jupyter-client>=5.3.4 in /opt/anaconda3/lib/python3.9/site-packages (from notebook>=6.0->RISE) (6.1.12)\n",
"Requirement already satisfied: traitlets>=4.2.1 in /opt/anaconda3/lib/python3.9/site-packages (from notebook>=6.0->RISE) (5.1.0)\n",
"Requirement already satisfied: tornado>=6.1 in /opt/anaconda3/lib/python3.9/site-packages (from notebook>=6.0->RISE) (6.1)\n",
"Requirement already satisfied: jinja2 in /opt/anaconda3/lib/python3.9/site-packages (from notebook>=6.0->RISE) (2.11.3)\n",
"Requirement already satisfied: python-dateutil>=2.1 in /opt/anaconda3/lib/python3.9/site-packages (from jupyter-client>=5.3.4->notebook>=6.0->RISE) (2.8.2)\n",
"Requirement already satisfied: six>=1.5 in /opt/anaconda3/lib/python3.9/site-packages (from python-dateutil>=2.1->jupyter-client>=5.3.4->notebook>=6.0->RISE) (1.16.0)\n",
"Requirement already satisfied: ptyprocess in /opt/anaconda3/lib/python3.9/site-packages (from terminado>=0.8.3->notebook>=6.0->RISE) (0.7.0)\n",
"Requirement already satisfied: cffi>=1.0.0 in /opt/anaconda3/lib/python3.9/site-packages (from argon2-cffi->notebook>=6.0->RISE) (1.14.6)\n",
"Requirement already satisfied: pycparser in /opt/anaconda3/lib/python3.9/site-packages (from cffi>=1.0.0->argon2-cffi->notebook>=6.0->RISE) (2.20)\n",
"Requirement already satisfied: appnope in /opt/anaconda3/lib/python3.9/site-packages (from ipykernel->notebook>=6.0->RISE) (0.1.2)\n",
"Requirement already satisfied: debugpy<2.0,>=1.0.0 in /opt/anaconda3/lib/python3.9/site-packages (from ipykernel->notebook>=6.0->RISE) (1.4.1)\n",
"Requirement already satisfied: ipython<8.0,>=7.23.1 in /opt/anaconda3/lib/python3.9/site-packages (from ipykernel->notebook>=6.0->RISE) (7.29.0)\n",
"Requirement already satisfied: appnope in /opt/anaconda3/lib/python3.9/site-packages (from ipykernel->notebook>=6.0->RISE) (0.1.2)\n",
"Requirement already satisfied: matplotlib-inline<0.2.0,>=0.1.0 in /opt/anaconda3/lib/python3.9/site-packages (from ipykernel->notebook>=6.0->RISE) (0.1.2)\n",
"Requirement already satisfied: decorator in /opt/anaconda3/lib/python3.9/site-packages (from ipython<8.0,>=7.23.1->ipykernel->notebook>=6.0->RISE) (5.1.0)\n",
"Requirement already satisfied: jedi>=0.16 in /opt/anaconda3/lib/python3.9/site-packages (from ipython<8.0,>=7.23.1->ipykernel->notebook>=6.0->RISE) (0.18.0)\n",
"Requirement already satisfied: pexpect>4.3 in /opt/anaconda3/lib/python3.9/site-packages (from ipython<8.0,>=7.23.1->ipykernel->notebook>=6.0->RISE) (4.8.0)\n",
"Requirement already satisfied: backcall in /opt/anaconda3/lib/python3.9/site-packages (from ipython<8.0,>=7.23.1->ipykernel->notebook>=6.0->RISE) (0.2.0)\n",
"Requirement already satisfied: pickleshare in /opt/anaconda3/lib/python3.9/site-packages (from ipython<8.0,>=7.23.1->ipykernel->notebook>=6.0->RISE) (0.7.5)\n",
"Requirement already satisfied: prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0 in /opt/anaconda3/lib/python3.9/site-packages (from ipython<8.0,>=7.23.1->ipykernel->notebook>=6.0->RISE) (3.0.20)\n",
"Requirement already satisfied: pexpect>4.3 in /opt/anaconda3/lib/python3.9/site-packages (from ipython<8.0,>=7.23.1->ipykernel->notebook>=6.0->RISE) (4.8.0)\n",
"Requirement already satisfied: setuptools>=18.5 in /opt/anaconda3/lib/python3.9/site-packages (from ipython<8.0,>=7.23.1->ipykernel->notebook>=6.0->RISE) (58.0.4)\n",
"Requirement already satisfied: pygments in /opt/anaconda3/lib/python3.9/site-packages (from ipython<8.0,>=7.23.1->ipykernel->notebook>=6.0->RISE) (2.10.0)\n",
"Requirement already satisfied: setuptools>=18.5 in /opt/anaconda3/lib/python3.9/site-packages (from ipython<8.0,>=7.23.1->ipykernel->notebook>=6.0->RISE) (58.0.4)\n",
"Requirement already satisfied: decorator in /opt/anaconda3/lib/python3.9/site-packages (from ipython<8.0,>=7.23.1->ipykernel->notebook>=6.0->RISE) (5.1.0)\n",
"Requirement already satisfied: pickleshare in /opt/anaconda3/lib/python3.9/site-packages (from ipython<8.0,>=7.23.1->ipykernel->notebook>=6.0->RISE) (0.7.5)\n",
"Requirement already satisfied: parso<0.9.0,>=0.8.0 in /opt/anaconda3/lib/python3.9/site-packages (from jedi>=0.16->ipython<8.0,>=7.23.1->ipykernel->notebook>=6.0->RISE) (0.8.2)\n",
"Requirement already satisfied: wcwidth in /opt/anaconda3/lib/python3.9/site-packages (from prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0->ipython<8.0,>=7.23.1->ipykernel->notebook>=6.0->RISE) (0.2.5)\n",
"Requirement already satisfied: MarkupSafe>=0.23 in /opt/anaconda3/lib/python3.9/site-packages (from jinja2->notebook>=6.0->RISE) (1.1.1)\n",
"Requirement already satisfied: nbclient<0.6.0,>=0.5.0 in /opt/anaconda3/lib/python3.9/site-packages (from nbconvert->notebook>=6.0->RISE) (0.5.3)\n",
"Requirement already satisfied: bleach in /opt/anaconda3/lib/python3.9/site-packages (from nbconvert->notebook>=6.0->RISE) (4.0.0)\n",
"Requirement already satisfied: defusedxml in /opt/anaconda3/lib/python3.9/site-packages (from nbconvert->notebook>=6.0->RISE) (0.7.1)\n",
"Requirement already satisfied: jupyterlab-pygments in /opt/anaconda3/lib/python3.9/site-packages (from nbconvert->notebook>=6.0->RISE) (0.1.2)\n",
"Requirement already satisfied: pandocfilters>=1.4.1 in /opt/anaconda3/lib/python3.9/site-packages (from nbconvert->notebook>=6.0->RISE) (1.4.3)\n",
"Requirement already satisfied: defusedxml in /opt/anaconda3/lib/python3.9/site-packages (from nbconvert->notebook>=6.0->RISE) (0.7.1)\n",
"Requirement already satisfied: bleach in /opt/anaconda3/lib/python3.9/site-packages (from nbconvert->notebook>=6.0->RISE) (4.0.0)\n",
"Requirement already satisfied: mistune<2,>=0.8.1 in /opt/anaconda3/lib/python3.9/site-packages (from nbconvert->notebook>=6.0->RISE) (0.8.4)\n",
"Requirement already satisfied: entrypoints>=0.2.2 in /opt/anaconda3/lib/python3.9/site-packages (from nbconvert->notebook>=6.0->RISE) (0.3)\n",
"Requirement already satisfied: nbclient<0.6.0,>=0.5.0 in /opt/anaconda3/lib/python3.9/site-packages (from nbconvert->notebook>=6.0->RISE) (0.5.3)\n",
"Requirement already satisfied: testpath in /opt/anaconda3/lib/python3.9/site-packages (from nbconvert->notebook>=6.0->RISE) (0.5.0)\n",
"Requirement already satisfied: mistune<2,>=0.8.1 in /opt/anaconda3/lib/python3.9/site-packages (from nbconvert->notebook>=6.0->RISE) (0.8.4)\n",
"Requirement already satisfied: nest-asyncio in /opt/anaconda3/lib/python3.9/site-packages (from nbclient<0.6.0,>=0.5.0->nbconvert->notebook>=6.0->RISE) (1.5.1)\n",
"Requirement already satisfied: async-generator in /opt/anaconda3/lib/python3.9/site-packages (from nbclient<0.6.0,>=0.5.0->nbconvert->notebook>=6.0->RISE) (1.10)\n",
"Requirement already satisfied: jsonschema!=2.5.0,>=2.4 in /opt/anaconda3/lib/python3.9/site-packages (from nbformat->notebook>=6.0->RISE) (3.2.0)\n",
"Requirement already satisfied: pyrsistent>=0.14.0 in /opt/anaconda3/lib/python3.9/site-packages (from jsonschema!=2.5.0,>=2.4->nbformat->notebook>=6.0->RISE) (0.18.0)\n",
"Requirement already satisfied: attrs>=17.4.0 in /opt/anaconda3/lib/python3.9/site-packages (from jsonschema!=2.5.0,>=2.4->nbformat->notebook>=6.0->RISE) (21.2.0)\n",
"Requirement already satisfied: pyrsistent>=0.14.0 in /opt/anaconda3/lib/python3.9/site-packages (from jsonschema!=2.5.0,>=2.4->nbformat->notebook>=6.0->RISE) (0.18.0)\n",
"Requirement already satisfied: webencodings in /opt/anaconda3/lib/python3.9/site-packages (from bleach->nbconvert->notebook>=6.0->RISE) (0.5.1)\n",
"Requirement already satisfied: packaging in /opt/anaconda3/lib/python3.9/site-packages (from bleach->nbconvert->notebook>=6.0->RISE) (21.0)\n",
"Requirement already satisfied: pyparsing>=2.0.2 in /opt/anaconda3/lib/python3.9/site-packages (from packaging->bleach->nbconvert->notebook>=6.0->RISE) (3.0.4)\n",
Expand All @@ -102,7 +102,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 13,
"id": "8c346ffc",
"metadata": {
"slideshow": {
Expand Down Expand Up @@ -161,7 +161,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 14,
"id": "7c7b9601",
"metadata": {
"slideshow": {
Expand All @@ -175,7 +175,7 @@
"4"
]
},
"execution_count": 1,
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -236,9 +236,166 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"id": "398ff5be",
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"outputs": [],
"source": [
"from __future__ import division"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "8e04fe67",
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Help on _Feature in module __future__ object:\n",
"\n",
"class _Feature(builtins.object)\n",
" | _Feature(optionalRelease, mandatoryRelease, compiler_flag)\n",
" | \n",
" | Methods defined here:\n",
" | \n",
" | __init__(self, optionalRelease, mandatoryRelease, compiler_flag)\n",
" | Initialize self. See help(type(self)) for accurate signature.\n",
" | \n",
" | __repr__(self)\n",
" | Return repr(self).\n",
" | \n",
" | getMandatoryRelease(self)\n",
" | Return release in which this feature will become mandatory.\n",
" | \n",
" | This is a 5-tuple, of the same form as sys.version_info, or, if\n",
" | the feature was dropped, is None.\n",
" | \n",
" | getOptionalRelease(self)\n",
" | Return first release in which this feature was recognized.\n",
" | \n",
" | This is a 5-tuple, of the same form as sys.version_info.\n",
" | \n",
" | ----------------------------------------------------------------------\n",
" | Data descriptors defined here:\n",
" | \n",
" | __dict__\n",
" | dictionary for instance variables (if defined)\n",
" | \n",
" | __weakref__\n",
" | list of weak references to the object (if defined)\n",
"\n"
]
}
],
"source": [
"help(division)"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "3c79d7ba",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"not on the hour\n"
]
}
],
"source": [
"time = 122\n",
"if time % 60 == 0:\n",
" print('on the hour.')\n",
"else:\n",
" print('not on the hour')"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "82aa10cb",
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"outputs": [],
"source": [
"from turtle import *"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "58bc5b07",
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"31.415926\n"
]
}
],
"source": [
"pi = 3.1415926\n",
"radius = 5\n",
"print(2*pi*radius)"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "596d3154",
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"outputs": [
{
"data": {
"text/plain": [
"\"Let's go!\""
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"\"Let's go!\""
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "fe900eee",
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"outputs": [],
"source": []
}
Expand Down
Loading

0 comments on commit 31f7fec

Please sign in to comment.