瀏覽代碼

resolving version issues

Tamas 2 周之前
父節點
當前提交
3b3056c916
共有 4 個文件被更改,包括 83 次插入623 次删除
  1. 35 5
      bin/bonds.ipynb
  2. 48 514
      bin/lilla.ipynb
  3. 0 95
      dataProcess.ipynb
  4. 0 9
      prg01.py

+ 35 - 5
bin/bonds.ipynb

@@ -109,9 +109,17 @@
     "\n"
    ]
   },
+  {
+   "cell_type": "markdown",
+   "id": "87cc3862-3d54-488c-a125-6db028fa777b",
+   "metadata": {},
+   "source": [
+    "## Amortizing Exercise"
+   ]
+  },
   {
    "cell_type": "raw",
-   "id": "ca78ef5f-b510-4046-9e25-b25774acc50f",
+   "id": "fbe9e927-870b-4e19-88a8-dd7975238610",
    "metadata": {},
    "source": [
     "non-amortizing\n",
@@ -153,16 +161,38 @@
     "2\n",
     "\n",
     "lastBalance(1) \n",
-    "-20\n",
-    "\n",
+    "-20"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 10,
+   "id": "b1adb876-0acb-439f-a32c-5b20d87c0e02",
+   "metadata": {},
+   "outputs": [
+    {
+     "data": {
+      "text/plain": [
+       "'2024-01'"
+      ]
+     },
+     "execution_count": 10,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "import datetime\n",
     "\n",
-    "\n"
+    "now = datetime.datetime.now()\n",
+    "m = f'0{now.month}'[-2:]\n",
+    "f'{now.year}-{m}'"
    ]
   },
   {
    "cell_type": "code",
    "execution_count": null,
-   "id": "b1adb876-0acb-439f-a32c-5b20d87c0e02",
+   "id": "1126d35c-7bf7-4d90-89d2-0d626f4a230f",
    "metadata": {},
    "outputs": [],
    "source": []

File diff suppressed because it is too large
+ 48 - 514
bin/lilla.ipynb


+ 0 - 95
dataProcess.ipynb

@@ -1,95 +0,0 @@
-{
- "cells": [
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "## Imports"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 3,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "import pandas as pd\n",
-    "import numpy as np"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "## Generate data for linear regression\n",
-    "\n"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 34,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "d = \"c:/git/python/data/\"\n",
-    "N = 100\n",
-    "n = list(range(1,N+1))\n",
-    "a = 2.3\n",
-    "b = 4.1\n",
-    "names = []\n",
-    "for i in n:\n",
-    "    names.append( \"name\" + str(i))\n",
-    "\n",
-    "x = np.random.rand(N)\n",
-    "y = a*x + b + np.random.normal(0, 0.3, N)\n",
-    "data = {'name': names, 'x':x, 'y':y}\n",
-    "\n",
-    "df = pd.DataFrame(data)"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 36,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "df.to_csv(d + \"data.csv\")"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "## Load data and run linear regression"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": []
-  }
- ],
- "metadata": {
-  "kernelspec": {
-   "display_name": "Python 3",
-   "language": "python",
-   "name": "python3"
-  },
-  "language_info": {
-   "codemirror_mode": {
-    "name": "ipython",
-    "version": 3
-   },
-   "file_extension": ".py",
-   "mimetype": "text/x-python",
-   "name": "python",
-   "nbconvert_exporter": "python",
-   "pygments_lexer": "ipython3",
-   "version": "3.9.0"
-  }
- },
- "nbformat": 4,
- "nbformat_minor": 4
-}

+ 0 - 9
prg01.py

@@ -1,9 +0,0 @@
-print("Hello, Judit!")
-
-a=[]
-s=0
-for i in range (0,100):
-    a.append(2*i^2-5*i+3)
-    print (i,a[i])
-    s   += a[i]
-print(s)