From cf5c8ef7fab0d0010e991d0f69ea09cc2c767d63 Mon Sep 17 00:00:00 2001 From: trevorhuang1 Date: Wed, 3 Apr 2024 16:57:04 -0700 Subject: [PATCH] algo-rhythmic --- ...24-03-05-DS-python-pandas-df_titanic.ipynb | 43 +- .../2024-03-12-CSP-MCQ-2020-missed.ipynb | 80 + _notebooks/2024-03-25-inflation.ipynb | 153 ++ _notebooks/files/us_cpi.csv | 1304 +++++++++++++++++ ...05-DS-python-pandas-df_titanic_IPYNB_2_.md | 30 +- ...2024-03-12-CSP-MCQ-2020-missed_IPYNB_2_.md | 59 + _posts/2024-03-25-inflation_IPYNB_2_.md | 4 + _posts/2024-04-03-algorhymic.md | 69 + 8 files changed, 1732 insertions(+), 10 deletions(-) create mode 100644 _notebooks/2024-03-25-inflation.ipynb create mode 100644 _notebooks/files/us_cpi.csv create mode 100644 _posts/2024-03-25-inflation_IPYNB_2_.md create mode 100644 _posts/2024-04-03-algorhymic.md diff --git a/_notebooks/2024-03-05-DS-python-pandas-df_titanic.ipynb b/_notebooks/2024-03-05-DS-python-pandas-df_titanic.ipynb index 7919ff4..e5ebdeb 100644 --- a/_notebooks/2024-03-05-DS-python-pandas-df_titanic.ipynb +++ b/_notebooks/2024-03-05-DS-python-pandas-df_titanic.ipynb @@ -69,14 +69,43 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Defaulting to user installation because normal site-packages is not writeable\n", + "Requirement already satisfied: seaborn in /home/trevor/.local/lib/python3.10/site-packages (0.13.2)\n", + "Requirement already satisfied: matplotlib!=3.6.1,>=3.4 in /usr/lib/python3/dist-packages (from seaborn) (3.5.1)\n", + "Requirement already satisfied: numpy!=1.24.0,>=1.20 in /home/trevor/.local/lib/python3.10/site-packages (from seaborn) (1.26.4)\n", + "Requirement already satisfied: pandas>=1.2 in /home/trevor/.local/lib/python3.10/site-packages (from seaborn) (2.2.1)\n", + "Requirement already satisfied: pytz>=2020.1 in /usr/lib/python3/dist-packages (from pandas>=1.2->seaborn) (2022.1)\n", + "Requirement already satisfied: tzdata>=2022.7 in /home/trevor/.local/lib/python3.10/site-packages (from pandas>=1.2->seaborn) (2024.1)\n", + "Requirement already satisfied: python-dateutil>=2.8.2 in /home/trevor/.local/lib/python3.10/site-packages (from pandas>=1.2->seaborn) (2.9.0.post0)\n", + "Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil>=2.8.2->pandas>=1.2->seaborn) (1.16.0)\n", + "Defaulting to user installation because normal site-packages is not writeable\n", + "Requirement already satisfied: pandas in /home/trevor/.local/lib/python3.10/site-packages (2.2.1)\n", + "Requirement already satisfied: tzdata>=2022.7 in /home/trevor/.local/lib/python3.10/site-packages (from pandas) (2024.1)\n", + "Requirement already satisfied: pytz>=2020.1 in /usr/lib/python3/dist-packages (from pandas) (2022.1)\n", + "Requirement already satisfied: numpy<2,>=1.22.4 in /home/trevor/.local/lib/python3.10/site-packages (from pandas) (1.26.4)\n", + "Requirement already satisfied: python-dateutil>=2.8.2 in /home/trevor/.local/lib/python3.10/site-packages (from pandas) (2.9.0.post0)\n", + "Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil>=2.8.2->pandas) (1.16.0)\n", + "Defaulting to user installation because normal site-packages is not writeable\n", + "Requirement already satisfied: scikit-learn in /home/trevor/.local/lib/python3.10/site-packages (1.4.1.post1)\n", + "Requirement already satisfied: scipy>=1.6.0 in /usr/lib/python3/dist-packages (from scikit-learn) (1.8.0)\n", + "Requirement already satisfied: threadpoolctl>=2.0.0 in /home/trevor/.local/lib/python3.10/site-packages (from scikit-learn) (3.3.0)\n", + "Requirement already satisfied: numpy<2.0,>=1.19.5 in /home/trevor/.local/lib/python3.10/site-packages (from scikit-learn) (1.26.4)\n", + "Requirement already satisfied: joblib>=1.2.0 in /home/trevor/.local/lib/python3.10/site-packages (from scikit-learn) (1.3.2)\n" + ] + } + ], "source": [ "# Uncomment the following lines to install the required packages\n", - "# !pip install seaborn\n", - "# !pip install pandas\n", - "# !pip install scikit-learn" + "!pip install seaborn\n", + "!pip install pandas\n", + "!pip install scikit-learn" ] }, { @@ -90,7 +119,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 2, "metadata": {}, "outputs": [ { @@ -358,7 +387,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 3, "metadata": {}, "outputs": [ { diff --git a/_notebooks/2024-03-12-CSP-MCQ-2020-missed.ipynb b/_notebooks/2024-03-12-CSP-MCQ-2020-missed.ipynb index d54c2a1..f740262 100644 --- a/_notebooks/2024-03-12-CSP-MCQ-2020-missed.ipynb +++ b/_notebooks/2024-03-12-CSP-MCQ-2020-missed.ipynb @@ -985,6 +985,86 @@ "animal = animal + \"antelope\"[4:8]\n", "print(animal)\n" ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Element 12 is found at index 5\n" + ] + } + ], + "source": [ + "def binary_search(arr, target):\n", + " low = 0\n", + " high = len(arr) - 1\n", + "\n", + " while low <= high:\n", + " mid = (low + high) // 2\n", + " if arr[mid] == target:\n", + " return mid\n", + " elif arr[mid] < target:\n", + " low = mid + 1\n", + " else:\n", + " high = mid - 1\n", + "\n", + " return -1 # Target not found\n", + "\n", + "# Example usage\n", + "arr = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]\n", + "target = 12\n", + "result = binary_search(arr, target)\n", + "if result != -1:\n", + " print(f\"Element {target} is found at index {result}\")\n", + "else:\n", + " print(f\"Element {target} is not found in the array\")\n" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound': 0.0}\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "[nltk_data] Downloading package vader_lexicon to\n", + "[nltk_data] /home/trevor/nltk_data...\n", + "[nltk_data] Package vader_lexicon is already up-to-date!\n" + ] + } + ], + "source": [ + "import nltk\n", + "from nltk.sentiment import SentimentIntensityAnalyzer\n", + "\n", + "# Download the vader_lexicon\n", + "nltk.download('vader_lexicon')\n", + "\n", + "# Initialize the VADER sentiment intensity analyzer\n", + "sia = SentimentIntensityAnalyzer()\n", + "\n", + "# Provide a string to analyze\n", + "text = \"\"\n", + "\n", + "# Get the sentiment scores\n", + "sentiment = sia.polarity_scores(text)\n", + "\n", + "print(sentiment)" + ] } ], "metadata": { diff --git a/_notebooks/2024-03-25-inflation.ipynb b/_notebooks/2024-03-25-inflation.ipynb new file mode 100644 index 0000000..106918d --- /dev/null +++ b/_notebooks/2024-03-25-inflation.ipynb @@ -0,0 +1,153 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [], + "source": [ + "from sklearn.tree import DecisionTreeClassifier, export_text\n", + "from sklearn.linear_model import LogisticRegression\n", + "from sklearn.metrics import accuracy_score\n", + "from sklearn.model_selection import train_test_split\n", + "from sklearn.preprocessing import OneHotEncoder\n", + "import pandas as pd\n", + "import seaborn as sns\n", + "import numpy as np\n", + "import pdb\n", + "import ast\n", + "\n", + "# Define the TitanicRegression global variable\n", + "inflation_regression = None\n", + "\n", + "# Define the TitanicRegression class\n", + "class InflationRegression:\n", + " def __init__(self):\n", + " self.dt = None\n", + " self.logreg = None\n", + " self.X_train = None\n", + " self.X_test = None\n", + " self.y_train = None\n", + " self.y_test = None\n", + " self.encoder = None\n", + " self.initInflation() # Call initTitanic in the constructor\n", + "\n", + "\n", + " def initInflation(self):\n", + " cpi_data = pd.read_csv('files/us_cpi.csv')\n", + " self.td = cpi_data\n", + " self.td.dropna(inplace=True) # drop rows with at least one missing value, after dropping unuseful columns\n", + "\n", + " # Encode categorical variables\n", + " self.encoder = OneHotEncoder(handle_unknown='ignore')\n", + " self.encoder.fit(self.td[['embarked']])\n", + " self.onehot = self.encoder.transform(self.td[['embarked']]).toarray()\n", + " cols = ['embarked_' + val for val in self.encoder.categories_[0]]\n", + " self.td[cols] = pd.DataFrame(self.onehot)\n", + " self.td.dropna(inplace=True)\n", + " print(self.td)\n", + " # clean data\n", + " \n", + "\n", + "\n", + "\n", + " def runDecisionTree(self):\n", + " X = self.td.drop('survived', axis=1) # all except 'survived'\n", + " y = self.td['survived'] # only 'survived'\n", + " self.X_train, X_test, self.y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=42)\n", + " dt = DecisionTreeClassifier()\n", + " dt.fit(self.X_train, self.y_train)\n", + " self.dt = dt\n", + " print(export_text(dt, feature_names=X.columns.tolist()))\n", + "\n", + " # more code here\n", + "\n", + " def runLogisticRegression(self, X, y):\n", + " # more code here\n", + " self.X_train, self.X_test, self.y_train, self.y_test = train_test_split(X, y, test_size=0.3, random_state=42)\n", + " self.logreg = LogisticRegression()\n", + " self.logreg.fit(self.X_train, self.y_train)\n", + " \n", + " def predictSurvival(self, passenger):\n", + " X = self.td.drop('survived', axis=1) # all except 'survived'\n", + " y = self.td['survived'] # only 'survived'\n", + " self.X_train, X_test, self.y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=42)\n", + " \n", + " self.logreg = LogisticRegression()\n", + " self.logreg.fit(self.X_train, self.y_train)\n", + " \n", + " passenger = list(passenger.values())\n", + " \n", + " passenger = pd.DataFrame({\n", + " 'name': [passenger[0]],\n", + " 'pclass': [passenger[1]],\n", + " 'sex': [passenger[2]],\n", + " 'age': [passenger[3]],\n", + " 'sibsp': [passenger[4]],\n", + " 'parch': [passenger[5]],\n", + " 'fare': [passenger[6]],\n", + " 'embarked': [passenger[7]],\n", + " 'alone': [passenger[8]]\n", + " })\n", + " \n", + " passenger['sex'] = passenger['sex'].apply(lambda x: 1 if x == 'male' else 0)\n", + " passenger['alone'] = passenger['alone'].apply(lambda x: 1 if x == True else 0)\n", + " onehot = self.encoder.transform(passenger[['embarked']])\n", + " cols = ['embarked_' + val for val in self.encoder.categories_[0]]\n", + " print(passenger)\n", + " passenger[cols] = pd.DataFrame(onehot.toarray(), index=passenger.index)\n", + " passenger.drop(['name'], axis=1, inplace=True)\n", + " passenger.drop(['embarked'], axis=1, inplace=True)\n", + " \n", + " print(passenger)\n", + " # passenger_list = list(passenger[\"passenger\"].values())\n", + "\n", + " # passenger = np.asarray(passenger_list).reshape(1, -1)\n", + " # #preprocessing\n", + " \n", + " aliveProb = np.squeeze(self.logreg.predict_proba(passenger))\n", + " print(aliveProb)\n", + " aliveProb.tolist()\n", + " deathProb = aliveProb[0]\n", + " aliveProb = aliveProb[1]\n", + " \n", + " return 'Survival probability: {:.2%}'.format(aliveProb),('Death probability: {:.2%}'.format(deathProb)) \n", + "\n", + "\n", + "def initInflation():\n", + " global titanic_regression\n", + " titanic_regression = TitanicRegression()\n", + " titanic_regression.initTitanic()\n", + " X = titanic_regression.td.drop('survived', axis=1)\n", + " y = titanic_regression.td['survived']\n", + " titanic_regression.runLogisticRegression(X, y) #s # Pass X and y to runLogisticRegression\n", + "\n", + "\n", + "# From API\n", + "\n", + "# Sample usage without API" + ] + } + ], + "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.10.12" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/_notebooks/files/us_cpi.csv b/_notebooks/files/us_cpi.csv new file mode 100644 index 0000000..5a79aa9 --- /dev/null +++ b/_notebooks/files/us_cpi.csv @@ -0,0 +1,1304 @@ +Yearmon,CPI +01-01-1913,9.8 +01-02-1913,9.8 +01-03-1913,9.8 +01-04-1913,9.8 +01-05-1913,9.7 +01-06-1913,9.8 +01-07-1913,9.9 +01-08-1913,9.9 +01-09-1913,10 +01-10-1913,10 +01-11-1913,10.1 +01-12-1913,10 +01-01-1914,10 +01-02-1914,9.9 +01-03-1914,9.9 +01-04-1914,9.8 +01-05-1914,9.9 +01-06-1914,9.9 +01-07-1914,10 +01-08-1914,10.2 +01-09-1914,10.2 +01-10-1914,10.1 +01-11-1914,10.2 +01-12-1914,10.1 +01-01-1915,10.1 +01-02-1915,10 +01-03-1915,9.9 +01-04-1915,10 +01-05-1915,10.1 +01-06-1915,10.1 +01-07-1915,10.1 +01-08-1915,10.1 +01-09-1915,10.1 +01-10-1915,10.2 +01-11-1915,10.3 +01-12-1915,10.3 +01-01-1916,10.4 +01-02-1916,10.4 +01-03-1916,10.5 +01-04-1916,10.6 +01-05-1916,10.7 +01-06-1916,10.8 +01-07-1916,10.8 +01-08-1916,10.9 +01-09-1916,11.1 +01-10-1916,11.3 +01-11-1916,11.5 +01-12-1916,11.6 +01-01-1917,11.7 +01-02-1917,12 +01-03-1917,12 +01-04-1917,12.6 +01-05-1917,12.8 +01-06-1917,13 +01-07-1917,12.8 +01-08-1917,13 +01-09-1917,13.3 +01-10-1917,13.5 +01-11-1917,13.5 +01-12-1917,13.7 +01-01-1918,14 +01-02-1918,14.1 +01-03-1918,14 +01-04-1918,14.2 +01-05-1918,14.5 +01-06-1918,14.7 +01-07-1918,15.1 +01-08-1918,15.4 +01-09-1918,15.7 +01-10-1918,16 +01-11-1918,16.3 +01-12-1918,16.5 +01-01-1919,16.5 +01-02-1919,16.2 +01-03-1919,16.4 +01-04-1919,16.7 +01-05-1919,16.9 +01-06-1919,16.9 +01-07-1919,17.4 +01-08-1919,17.7 +01-09-1919,17.8 +01-10-1919,18.1 +01-11-1919,18.5 +01-12-1919,18.9 +01-01-1920,19.3 +01-02-1920,19.5 +01-03-1920,19.7 +01-04-1920,20.3 +01-05-1920,20.6 +01-06-1920,20.9 +01-07-1920,20.8 +01-08-1920,20.3 +01-09-1920,20 +01-10-1920,19.9 +01-11-1920,19.8 +01-12-1920,19.4 +01-01-1921,19 +01-02-1921,18.4 +01-03-1921,18.3 +01-04-1921,18.1 +01-05-1921,17.7 +01-06-1921,17.6 +01-07-1921,17.7 +01-08-1921,17.7 +01-09-1921,17.5 +01-10-1921,17.5 +01-11-1921,17.4 +01-12-1921,17.3 +01-01-1922,16.9 +01-02-1922,16.9 +01-03-1922,16.7 +01-04-1922,16.7 +01-05-1922,16.7 +01-06-1922,16.7 +01-07-1922,16.8 +01-08-1922,16.6 +01-09-1922,16.6 +01-10-1922,16.7 +01-11-1922,16.8 +01-12-1922,16.9 +01-01-1923,16.8 +01-02-1923,16.8 +01-03-1923,16.8 +01-04-1923,16.9 +01-05-1923,16.9 +01-06-1923,17 +01-07-1923,17.2 +01-08-1923,17.1 +01-09-1923,17.2 +01-10-1923,17.3 +01-11-1923,17.3 +01-12-1923,17.3 +01-01-1924,17.3 +01-02-1924,17.2 +01-03-1924,17.1 +01-04-1924,17 +01-05-1924,17 +01-06-1924,17 +01-07-1924,17.1 +01-08-1924,17 +01-09-1924,17.1 +01-10-1924,17.2 +01-11-1924,17.2 +01-12-1924,17.3 +01-01-1925,17.3 +01-02-1925,17.2 +01-03-1925,17.3 +01-04-1925,17.2 +01-05-1925,17.3 +01-06-1925,17.5 +01-07-1925,17.7 +01-08-1925,17.7 +01-09-1925,17.7 +01-10-1925,17.7 +01-11-1925,18 +01-12-1925,17.9 +01-01-1926,17.9 +01-02-1926,17.9 +01-03-1926,17.8 +01-04-1926,17.9 +01-05-1926,17.8 +01-06-1926,17.7 +01-07-1926,17.5 +01-08-1926,17.4 +01-09-1926,17.5 +01-10-1926,17.6 +01-11-1926,17.7 +01-12-1926,17.7 +01-01-1927,17.5 +01-02-1927,17.4 +01-03-1927,17.3 +01-04-1927,17.3 +01-05-1927,17.4 +01-06-1927,17.6 +01-07-1927,17.3 +01-08-1927,17.2 +01-09-1927,17.3 +01-10-1927,17.4 +01-11-1927,17.3 +01-12-1927,17.3 +01-01-1928,17.3 +01-02-1928,17.1 +01-03-1928,17.1 +01-04-1928,17.1 +01-05-1928,17.2 +01-06-1928,17.1 +01-07-1928,17.1 +01-08-1928,17.1 +01-09-1928,17.3 +01-10-1928,17.2 +01-11-1928,17.2 +01-12-1928,17.1 +01-01-1929,17.1 +01-02-1929,17.1 +01-03-1929,17 +01-04-1929,16.9 +01-05-1929,17 +01-06-1929,17.1 +01-07-1929,17.3 +01-08-1929,17.3 +01-09-1929,17.3 +01-10-1929,17.3 +01-11-1929,17.3 +01-12-1929,17.2 +01-01-1930,17.1 +01-02-1930,17 +01-03-1930,16.9 +01-04-1930,17 +01-05-1930,16.9 +01-06-1930,16.8 +01-07-1930,16.6 +01-08-1930,16.5 +01-09-1930,16.6 +01-10-1930,16.5 +01-11-1930,16.4 +01-12-1930,16.1 +01-01-1931,15.9 +01-02-1931,15.7 +01-03-1931,15.6 +01-04-1931,15.5 +01-05-1931,15.3 +01-06-1931,15.1 +01-07-1931,15.1 +01-08-1931,15.1 +01-09-1931,15 +01-10-1931,14.9 +01-11-1931,14.7 +01-12-1931,14.6 +01-01-1932,14.3 +01-02-1932,14.1 +01-03-1932,14 +01-04-1932,13.9 +01-05-1932,13.7 +01-06-1932,13.6 +01-07-1932,13.6 +01-08-1932,13.5 +01-09-1932,13.4 +01-10-1932,13.3 +01-11-1932,13.2 +01-12-1932,13.1 +01-01-1933,12.9 +01-02-1933,12.7 +01-03-1933,12.6 +01-04-1933,12.6 +01-05-1933,12.6 +01-06-1933,12.7 +01-07-1933,13.1 +01-08-1933,13.2 +01-09-1933,13.2 +01-10-1933,13.2 +01-11-1933,13.2 +01-12-1933,13.2 +01-01-1934,13.2 +01-02-1934,13.3 +01-03-1934,13.3 +01-04-1934,13.3 +01-05-1934,13.3 +01-06-1934,13.4 +01-07-1934,13.4 +01-08-1934,13.4 +01-09-1934,13.6 +01-10-1934,13.5 +01-11-1934,13.5 +01-12-1934,13.4 +01-01-1935,13.6 +01-02-1935,13.7 +01-03-1935,13.7 +01-04-1935,13.8 +01-05-1935,13.8 +01-06-1935,13.7 +01-07-1935,13.7 +01-08-1935,13.7 +01-09-1935,13.7 +01-10-1935,13.7 +01-11-1935,13.8 +01-12-1935,13.8 +01-01-1936,13.8 +01-02-1936,13.8 +01-03-1936,13.7 +01-04-1936,13.7 +01-05-1936,13.7 +01-06-1936,13.8 +01-07-1936,13.9 +01-08-1936,14 +01-09-1936,14 +01-10-1936,14 +01-11-1936,14 +01-12-1936,14 +01-01-1937,14.1 +01-02-1937,14.1 +01-03-1937,14.2 +01-04-1937,14.3 +01-05-1937,14.4 +01-06-1937,14.4 +01-07-1937,14.5 +01-08-1937,14.5 +01-09-1937,14.6 +01-10-1937,14.6 +01-11-1937,14.5 +01-12-1937,14.4 +01-01-1938,14.2 +01-02-1938,14.1 +01-03-1938,14.1 +01-04-1938,14.2 +01-05-1938,14.1 +01-06-1938,14.1 +01-07-1938,14.1 +01-08-1938,14.1 +01-09-1938,14.1 +01-10-1938,14 +01-11-1938,14 +01-12-1938,14 +01-01-1939,14 +01-02-1939,13.9 +01-03-1939,13.9 +01-04-1939,13.8 +01-05-1939,13.8 +01-06-1939,13.8 +01-07-1939,13.8 +01-08-1939,13.8 +01-09-1939,14.1 +01-10-1939,14 +01-11-1939,14 +01-12-1939,14 +01-01-1940,13.9 +01-02-1940,14 +01-03-1940,14 +01-04-1940,14 +01-05-1940,14 +01-06-1940,14.1 +01-07-1940,14 +01-08-1940,14 +01-09-1940,14 +01-10-1940,14 +01-11-1940,14 +01-12-1940,14.1 +01-01-1941,14.1 +01-02-1941,14.1 +01-03-1941,14.2 +01-04-1941,14.3 +01-05-1941,14.4 +01-06-1941,14.7 +01-07-1941,14.7 +01-08-1941,14.9 +01-09-1941,15.1 +01-10-1941,15.3 +01-11-1941,15.4 +01-12-1941,15.5 +01-01-1942,15.7 +01-02-1942,15.8 +01-03-1942,16 +01-04-1942,16.1 +01-05-1942,16.3 +01-06-1942,16.3 +01-07-1942,16.4 +01-08-1942,16.5 +01-09-1942,16.5 +01-10-1942,16.7 +01-11-1942,16.8 +01-12-1942,16.9 +01-01-1943,16.9 +01-02-1943,16.9 +01-03-1943,17.2 +01-04-1943,17.4 +01-05-1943,17.5 +01-06-1943,17.5 +01-07-1943,17.4 +01-08-1943,17.3 +01-09-1943,17.4 +01-10-1943,17.4 +01-11-1943,17.4 +01-12-1943,17.4 +01-01-1944,17.4 +01-02-1944,17.4 +01-03-1944,17.4 +01-04-1944,17.5 +01-05-1944,17.5 +01-06-1944,17.6 +01-07-1944,17.7 +01-08-1944,17.7 +01-09-1944,17.7 +01-10-1944,17.7 +01-11-1944,17.7 +01-12-1944,17.8 +01-01-1945,17.8 +01-02-1945,17.8 +01-03-1945,17.8 +01-04-1945,17.8 +01-05-1945,17.9 +01-06-1945,18.1 +01-07-1945,18.1 +01-08-1945,18.1 +01-09-1945,18.1 +01-10-1945,18.1 +01-11-1945,18.1 +01-12-1945,18.2 +01-01-1946,18.2 +01-02-1946,18.1 +01-03-1946,18.3 +01-04-1946,18.4 +01-05-1946,18.5 +01-06-1946,18.7 +01-07-1946,19.8 +01-08-1946,20.2 +01-09-1946,20.4 +01-10-1946,20.8 +01-11-1946,21.3 +01-12-1946,21.5 +01-01-1947,21.5 +01-02-1947,21.5 +01-03-1947,21.9 +01-04-1947,21.9 +01-05-1947,21.9 +01-06-1947,22 +01-07-1947,22.2 +01-08-1947,22.5 +01-09-1947,23 +01-10-1947,23 +01-11-1947,23.1 +01-12-1947,23.4 +01-01-1948,23.7 +01-02-1948,23.5 +01-03-1948,23.4 +01-04-1948,23.8 +01-05-1948,23.9 +01-06-1948,24.1 +01-07-1948,24.4 +01-08-1948,24.5 +01-09-1948,24.5 +01-10-1948,24.4 +01-11-1948,24.2 +01-12-1948,24.1 +01-01-1949,24 +01-02-1949,23.8 +01-03-1949,23.8 +01-04-1949,23.9 +01-05-1949,23.8 +01-06-1949,23.9 +01-07-1949,23.7 +01-08-1949,23.8 +01-09-1949,23.9 +01-10-1949,23.7 +01-11-1949,23.8 +01-12-1949,23.6 +01-01-1950,23.5 +01-02-1950,23.5 +01-03-1950,23.6 +01-04-1950,23.6 +01-05-1950,23.7 +01-06-1950,23.8 +01-07-1950,24.1 +01-08-1950,24.3 +01-09-1950,24.4 +01-10-1950,24.6 +01-11-1950,24.7 +01-12-1950,25 +01-01-1951,25.4 +01-02-1951,25.7 +01-03-1951,25.8 +01-04-1951,25.8 +01-05-1951,25.9 +01-06-1951,25.9 +01-07-1951,25.9 +01-08-1951,25.9 +01-09-1951,26.1 +01-10-1951,26.2 +01-11-1951,26.4 +01-12-1951,26.5 +01-01-1952,26.5 +01-02-1952,26.3 +01-03-1952,26.3 +01-04-1952,26.4 +01-05-1952,26.4 +01-06-1952,26.5 +01-07-1952,26.7 +01-08-1952,26.7 +01-09-1952,26.7 +01-10-1952,26.7 +01-11-1952,26.7 +01-12-1952,26.7 +01-01-1953,26.6 +01-02-1953,26.5 +01-03-1953,26.6 +01-04-1953,26.6 +01-05-1953,26.7 +01-06-1953,26.8 +01-07-1953,26.8 +01-08-1953,26.9 +01-09-1953,26.9 +01-10-1953,27 +01-11-1953,26.9 +01-12-1953,26.9 +01-01-1954,26.9 +01-02-1954,26.9 +01-03-1954,26.9 +01-04-1954,26.8 +01-05-1954,26.9 +01-06-1954,26.9 +01-07-1954,26.9 +01-08-1954,26.9 +01-09-1954,26.8 +01-10-1954,26.8 +01-11-1954,26.8 +01-12-1954,26.7 +01-01-1955,26.7 +01-02-1955,26.7 +01-03-1955,26.7 +01-04-1955,26.7 +01-05-1955,26.7 +01-06-1955,26.7 +01-07-1955,26.8 +01-08-1955,26.8 +01-09-1955,26.9 +01-10-1955,26.9 +01-11-1955,26.9 +01-12-1955,26.8 +01-01-1956,26.8 +01-02-1956,26.8 +01-03-1956,26.8 +01-04-1956,26.9 +01-05-1956,27 +01-06-1956,27.2 +01-07-1956,27.4 +01-08-1956,27.3 +01-09-1956,27.4 +01-10-1956,27.5 +01-11-1956,27.5 +01-12-1956,27.6 +01-01-1957,27.6 +01-02-1957,27.7 +01-03-1957,27.8 +01-04-1957,27.9 +01-05-1957,28 +01-06-1957,28.1 +01-07-1957,28.3 +01-08-1957,28.3 +01-09-1957,28.3 +01-10-1957,28.3 +01-11-1957,28.4 +01-12-1957,28.4 +01-01-1958,28.6 +01-02-1958,28.6 +01-03-1958,28.8 +01-04-1958,28.9 +01-05-1958,28.9 +01-06-1958,28.9 +01-07-1958,29 +01-08-1958,28.9 +01-09-1958,28.9 +01-10-1958,28.9 +01-11-1958,29 +01-12-1958,28.9 +01-01-1959,29 +01-02-1959,28.9 +01-03-1959,28.9 +01-04-1959,29 +01-05-1959,29 +01-06-1959,29.1 +01-07-1959,29.2 +01-08-1959,29.2 +01-09-1959,29.3 +01-10-1959,29.4 +01-11-1959,29.4 +01-12-1959,29.4 +01-01-1960,29.3 +01-02-1960,29.4 +01-03-1960,29.4 +01-04-1960,29.5 +01-05-1960,29.5 +01-06-1960,29.6 +01-07-1960,29.6 +01-08-1960,29.6 +01-09-1960,29.6 +01-10-1960,29.8 +01-11-1960,29.8 +01-12-1960,29.8 +01-01-1961,29.8 +01-02-1961,29.8 +01-03-1961,29.8 +01-04-1961,29.8 +01-05-1961,29.8 +01-06-1961,29.8 +01-07-1961,30 +01-08-1961,29.9 +01-09-1961,30 +01-10-1961,30 +01-11-1961,30 +01-12-1961,30 +01-01-1962,30 +01-02-1962,30.1 +01-03-1962,30.1 +01-04-1962,30.2 +01-05-1962,30.2 +01-06-1962,30.2 +01-07-1962,30.3 +01-08-1962,30.3 +01-09-1962,30.4 +01-10-1962,30.4 +01-11-1962,30.4 +01-12-1962,30.4 +01-01-1963,30.4 +01-02-1963,30.4 +01-03-1963,30.5 +01-04-1963,30.5 +01-05-1963,30.5 +01-06-1963,30.6 +01-07-1963,30.7 +01-08-1963,30.7 +01-09-1963,30.7 +01-10-1963,30.8 +01-11-1963,30.8 +01-12-1963,30.9 +01-01-1964,30.9 +01-02-1964,30.9 +01-03-1964,30.9 +01-04-1964,30.9 +01-05-1964,30.9 +01-06-1964,31 +01-07-1964,31.1 +01-08-1964,31 +01-09-1964,31.1 +01-10-1964,31.1 +01-11-1964,31.2 +01-12-1964,31.2 +01-01-1965,31.2 +01-02-1965,31.2 +01-03-1965,31.3 +01-04-1965,31.4 +01-05-1965,31.4 +01-06-1965,31.6 +01-07-1965,31.6 +01-08-1965,31.6 +01-09-1965,31.6 +01-10-1965,31.7 +01-11-1965,31.7 +01-12-1965,31.8 +01-01-1966,31.8 +01-02-1966,32 +01-03-1966,32.1 +01-04-1966,32.3 +01-05-1966,32.3 +01-06-1966,32.4 +01-07-1966,32.5 +01-08-1966,32.7 +01-09-1966,32.7 +01-10-1966,32.9 +01-11-1966,32.9 +01-12-1966,32.9 +01-01-1967,32.9 +01-02-1967,32.9 +01-03-1967,33 +01-04-1967,33.1 +01-05-1967,33.2 +01-06-1967,33.3 +01-07-1967,33.4 +01-08-1967,33.5 +01-09-1967,33.6 +01-10-1967,33.7 +01-11-1967,33.8 +01-12-1967,33.9 +01-01-1968,34.1 +01-02-1968,34.2 +01-03-1968,34.3 +01-04-1968,34.4 +01-05-1968,34.5 +01-06-1968,34.7 +01-07-1968,34.9 +01-08-1968,35 +01-09-1968,35.1 +01-10-1968,35.3 +01-11-1968,35.4 +01-12-1968,35.5 +01-01-1969,35.6 +01-02-1969,35.8 +01-03-1969,36.1 +01-04-1969,36.3 +01-05-1969,36.4 +01-06-1969,36.6 +01-07-1969,36.8 +01-08-1969,37 +01-09-1969,37.1 +01-10-1969,37.3 +01-11-1969,37.5 +01-12-1969,37.7 +01-01-1970,37.8 +01-02-1970,38 +01-03-1970,38.2 +01-04-1970,38.5 +01-05-1970,38.6 +01-06-1970,38.8 +01-07-1970,39 +01-08-1970,39 +01-09-1970,39.2 +01-10-1970,39.4 +01-11-1970,39.6 +01-12-1970,39.8 +01-01-1971,39.8 +01-02-1971,39.9 +01-03-1971,40 +01-04-1971,40.1 +01-05-1971,40.3 +01-06-1971,40.6 +01-07-1971,40.7 +01-08-1971,40.8 +01-09-1971,40.8 +01-10-1971,40.9 +01-11-1971,40.9 +01-12-1971,41.1 +01-01-1972,41.1 +01-02-1972,41.3 +01-03-1972,41.4 +01-04-1972,41.5 +01-05-1972,41.6 +01-06-1972,41.7 +01-07-1972,41.9 +01-08-1972,42 +01-09-1972,42.1 +01-10-1972,42.3 +01-11-1972,42.4 +01-12-1972,42.5 +01-01-1973,42.6 +01-02-1973,42.9 +01-03-1973,43.3 +01-04-1973,43.6 +01-05-1973,43.9 +01-06-1973,44.2 +01-07-1973,44.3 +01-08-1973,45.1 +01-09-1973,45.2 +01-10-1973,45.6 +01-11-1973,45.9 +01-12-1973,46.2 +01-01-1974,46.6 +01-02-1974,47.2 +01-03-1974,47.8 +01-04-1974,48 +01-05-1974,48.6 +01-06-1974,49 +01-07-1974,49.4 +01-08-1974,50 +01-09-1974,50.6 +01-10-1974,51.1 +01-11-1974,51.5 +01-12-1974,51.9 +01-01-1975,52.1 +01-02-1975,52.5 +01-03-1975,52.7 +01-04-1975,52.9 +01-05-1975,53.2 +01-06-1975,53.6 +01-07-1975,54.2 +01-08-1975,54.3 +01-09-1975,54.6 +01-10-1975,54.9 +01-11-1975,55.3 +01-12-1975,55.5 +01-01-1976,55.6 +01-02-1976,55.8 +01-03-1976,55.9 +01-04-1976,56.1 +01-05-1976,56.5 +01-06-1976,56.8 +01-07-1976,57.1 +01-08-1976,57.4 +01-09-1976,57.6 +01-10-1976,57.9 +01-11-1976,58 +01-12-1976,58.2 +01-01-1977,58.5 +01-02-1977,59.1 +01-03-1977,59.5 +01-04-1977,60 +01-05-1977,60.3 +01-06-1977,60.7 +01-07-1977,61 +01-08-1977,61.2 +01-09-1977,61.4 +01-10-1977,61.6 +01-11-1977,61.9 +01-12-1977,62.1 +01-01-1978,62.5 +01-02-1978,62.9 +01-03-1978,63.4 +01-04-1978,63.9 +01-05-1978,64.5 +01-06-1978,65.2 +01-07-1978,65.7 +01-08-1978,66 +01-09-1978,66.5 +01-10-1978,67.1 +01-11-1978,67.4 +01-12-1978,67.7 +01-01-1979,68.3 +01-02-1979,69.1 +01-03-1979,69.8 +01-04-1979,70.6 +01-05-1979,71.5 +01-06-1979,72.3 +01-07-1979,73.1 +01-08-1979,73.8 +01-09-1979,74.6 +01-10-1979,75.2 +01-11-1979,75.9 +01-12-1979,76.7 +01-01-1980,77.8 +01-02-1980,78.9 +01-03-1980,80.1 +01-04-1980,81 +01-05-1980,81.8 +01-06-1980,82.7 +01-07-1980,82.7 +01-08-1980,83.3 +01-09-1980,84 +01-10-1980,84.8 +01-11-1980,85.5 +01-12-1980,86.3 +01-01-1981,87 +01-02-1981,87.9 +01-03-1981,88.5 +01-04-1981,89.1 +01-05-1981,89.8 +01-06-1981,90.6 +01-07-1981,91.6 +01-08-1981,92.3 +01-09-1981,93.2 +01-10-1981,93.4 +01-11-1981,93.7 +01-12-1981,94 +01-01-1982,94.3 +01-02-1982,94.6 +01-03-1982,94.5 +01-04-1982,94.9 +01-05-1982,95.8 +01-06-1982,97 +01-07-1982,97.5 +01-08-1982,97.7 +01-09-1982,97.9 +01-10-1982,98.2 +01-11-1982,98 +01-12-1982,97.6 +01-01-1983,97.8 +01-02-1983,97.9 +01-03-1983,97.9 +01-04-1983,98.6 +01-05-1983,99.2 +01-06-1983,99.5 +01-07-1983,99.9 +01-08-1983,100.2 +01-09-1983,100.7 +01-10-1983,101 +01-11-1983,101.2 +01-12-1983,101.3 +01-01-1984,101.9 +01-02-1984,102.4 +01-03-1984,102.6 +01-04-1984,103.1 +01-05-1984,103.4 +01-06-1984,103.7 +01-07-1984,104.1 +01-08-1984,104.5 +01-09-1984,105 +01-10-1984,105.3 +01-11-1984,105.3 +01-12-1984,105.3 +01-01-1985,105.5 +01-02-1985,106 +01-03-1985,106.4 +01-04-1985,106.9 +01-05-1985,107.3 +01-06-1985,107.6 +01-07-1985,107.8 +01-08-1985,108 +01-09-1985,108.3 +01-10-1985,108.7 +01-11-1985,109 +01-12-1985,109.3 +01-01-1986,109.6 +01-02-1986,109.3 +01-03-1986,108.8 +01-04-1986,108.6 +01-05-1986,108.9 +01-06-1986,109.5 +01-07-1986,109.5 +01-08-1986,109.7 +01-09-1986,110.2 +01-10-1986,110.3 +01-11-1986,110.4 +01-12-1986,110.5 +01-01-1987,111.2 +01-02-1987,111.6 +01-03-1987,112.1 +01-04-1987,112.7 +01-05-1987,113.1 +01-06-1987,113.5 +01-07-1987,113.8 +01-08-1987,114.4 +01-09-1987,115 +01-10-1987,115.3 +01-11-1987,115.4 +01-12-1987,115.4 +01-01-1988,115.7 +01-02-1988,116 +01-03-1988,116.5 +01-04-1988,117.1 +01-05-1988,117.5 +01-06-1988,118 +01-07-1988,118.5 +01-08-1988,119 +01-09-1988,119.8 +01-10-1988,120.2 +01-11-1988,120.3 +01-12-1988,120.5 +01-01-1989,121.1 +01-02-1989,121.6 +01-03-1989,122.3 +01-04-1989,123.1 +01-05-1989,123.8 +01-06-1989,124.1 +01-07-1989,124.4 +01-08-1989,124.6 +01-09-1989,125 +01-10-1989,125.6 +01-11-1989,125.9 +01-12-1989,126.1 +01-01-1990,127.4 +01-02-1990,128 +01-03-1990,128.7 +01-04-1990,128.9 +01-05-1990,129.2 +01-06-1990,129.9 +01-07-1990,130.4 +01-08-1990,131.6 +01-09-1990,132.7 +01-10-1990,133.5 +01-11-1990,133.8 +01-12-1990,133.8 +01-01-1991,134.6 +01-02-1991,134.8 +01-03-1991,135 +01-04-1991,135.2 +01-05-1991,135.6 +01-06-1991,136 +01-07-1991,136.2 +01-08-1991,136.6 +01-09-1991,137.2 +01-10-1991,137.4 +01-11-1991,137.8 +01-12-1991,137.9 +01-01-1992,138.1 +01-02-1992,138.6 +01-03-1992,139.3 +01-04-1992,139.5 +01-05-1992,139.7 +01-06-1992,140.2 +01-07-1992,140.5 +01-08-1992,140.9 +01-09-1992,141.3 +01-10-1992,141.8 +01-11-1992,142 +01-12-1992,141.9 +01-01-1993,142.6 +01-02-1993,143.1 +01-03-1993,143.6 +01-04-1993,144 +01-05-1993,144.2 +01-06-1993,144.4 +01-07-1993,144.4 +01-08-1993,144.8 +01-09-1993,145.1 +01-10-1993,145.7 +01-11-1993,145.8 +01-12-1993,145.8 +01-01-1994,146.2 +01-02-1994,146.7 +01-03-1994,147.2 +01-04-1994,147.4 +01-05-1994,147.5 +01-06-1994,148 +01-07-1994,148.4 +01-08-1994,149 +01-09-1994,149.4 +01-10-1994,149.5 +01-11-1994,149.7 +01-12-1994,149.7 +01-01-1995,150.3 +01-02-1995,150.9 +01-03-1995,151.4 +01-04-1995,151.9 +01-05-1995,152.2 +01-06-1995,152.5 +01-07-1995,152.5 +01-08-1995,152.9 +01-09-1995,153.2 +01-10-1995,153.7 +01-11-1995,153.6 +01-12-1995,153.5 +01-01-1996,154.4 +01-02-1996,154.9 +01-03-1996,155.7 +01-04-1996,156.3 +01-05-1996,156.6 +01-06-1996,156.7 +01-07-1996,157 +01-08-1996,157.3 +01-09-1996,157.8 +01-10-1996,158.3 +01-11-1996,158.6 +01-12-1996,158.6 +01-01-1997,159.1 +01-02-1997,159.6 +01-03-1997,160 +01-04-1997,160.2 +01-05-1997,160.1 +01-06-1997,160.3 +01-07-1997,160.5 +01-08-1997,160.8 +01-09-1997,161.2 +01-10-1997,161.6 +01-11-1997,161.5 +01-12-1997,161.3 +01-01-1998,161.6 +01-02-1998,161.9 +01-03-1998,162.2 +01-04-1998,162.5 +01-05-1998,162.8 +01-06-1998,163 +01-07-1998,163.2 +01-08-1998,163.4 +01-09-1998,163.6 +01-10-1998,164 +01-11-1998,164 +01-12-1998,163.9 +01-01-1999,164.3 +01-02-1999,164.5 +01-03-1999,165 +01-04-1999,166.2 +01-05-1999,166.2 +01-06-1999,166.2 +01-07-1999,166.7 +01-08-1999,167.1 +01-09-1999,167.9 +01-10-1999,168.2 +01-11-1999,168.3 +01-12-1999,168.3 +01-01-2000,168.8 +01-02-2000,169.8 +01-03-2000,171.2 +01-04-2000,171.3 +01-05-2000,171.5 +01-06-2000,172.4 +01-07-2000,172.8 +01-08-2000,172.8 +01-09-2000,173.7 +01-10-2000,174 +01-11-2000,174.1 +01-12-2000,174 +01-01-2001,175.1 +01-02-2001,175.8 +01-03-2001,176.2 +01-04-2001,176.9 +01-05-2001,177.7 +01-06-2001,178 +01-07-2001,177.5 +01-08-2001,177.5 +01-09-2001,178.3 +01-10-2001,177.7 +01-11-2001,177.4 +01-12-2001,176.7 +01-01-2002,177.1 +01-02-2002,177.8 +01-03-2002,178.8 +01-04-2002,179.8 +01-05-2002,179.8 +01-06-2002,179.9 +01-07-2002,180.1 +01-08-2002,180.7 +01-09-2002,181 +01-10-2002,181.3 +01-11-2002,181.3 +01-12-2002,180.9 +01-01-2003,181.7 +01-02-2003,183.1 +01-03-2003,184.2 +01-04-2003,183.8 +01-05-2003,183.5 +01-06-2003,183.7 +01-07-2003,183.9 +01-08-2003,184.6 +01-09-2003,185.2 +01-10-2003,185 +01-11-2003,184.5 +01-12-2003,184.3 +01-01-2004,185.2 +01-02-2004,186.2 +01-03-2004,187.4 +01-04-2004,188 +01-05-2004,189.1 +01-06-2004,189.7 +01-07-2004,189.4 +01-08-2004,189.5 +01-09-2004,189.9 +01-10-2004,190.9 +01-11-2004,191 +01-12-2004,190.3 +01-01-2005,190.7 +01-02-2005,191.8 +01-03-2005,193.3 +01-04-2005,194.6 +01-05-2005,194.4 +01-06-2005,194.5 +01-07-2005,195.4 +01-08-2005,196.4 +01-09-2005,198.8 +01-10-2005,199.2 +01-11-2005,197.6 +01-12-2005,196.8 +01-01-2006,198.3 +01-02-2006,198.7 +01-03-2006,199.8 +01-04-2006,201.5 +01-05-2006,202.5 +01-06-2006,202.9 +01-07-2006,203.5 +01-08-2006,203.9 +01-09-2006,202.9 +01-10-2006,201.8 +01-11-2006,201.5 +01-12-2006,201.8 +01-01-2007,202.416 +01-02-2007,203.499 +01-03-2007,205.352 +01-04-2007,206.686 +01-05-2007,207.949 +01-06-2007,208.352 +01-07-2007,208.299 +01-08-2007,207.917 +01-09-2007,208.49 +01-10-2007,208.936 +01-11-2007,210.177 +01-12-2007,210.036 +01-01-2008,211.08 +01-02-2008,211.693 +01-03-2008,213.528 +01-04-2008,214.823 +01-05-2008,216.632 +01-06-2008,218.815 +01-07-2008,219.964 +01-08-2008,219.086 +01-09-2008,218.783 +01-10-2008,216.573 +01-11-2008,212.425 +01-12-2008,210.228 +01-01-2009,211.143 +01-02-2009,212.193 +01-03-2009,212.709 +01-04-2009,213.24 +01-05-2009,213.856 +01-06-2009,215.693 +01-07-2009,215.351 +01-08-2009,215.834 +01-09-2009,215.969 +01-10-2009,216.177 +01-11-2009,216.33 +01-12-2009,215.949 +01-01-2010,216.687 +01-02-2010,216.741 +01-03-2010,217.631 +01-04-2010,218.009 +01-05-2010,218.178 +01-06-2010,217.965 +01-07-2010,218.011 +01-08-2010,218.312 +01-09-2010,218.439 +01-10-2010,218.711 +01-11-2010,218.803 +01-12-2010,219.179 +01-01-2011,220.223 +01-02-2011,221.309 +01-03-2011,223.467 +01-04-2011,224.906 +01-05-2011,225.964 +01-06-2011,225.722 +01-07-2011,225.922 +01-08-2011,226.545 +01-09-2011,226.889 +01-10-2011,226.421 +01-11-2011,226.23 +01-12-2011,225.672 +01-01-2012,226.665 +01-02-2012,227.663 +01-03-2012,229.392 +01-04-2012,230.085 +01-05-2012,229.815 +01-06-2012,229.478 +01-07-2012,229.104 +01-08-2012,230.379 +01-09-2012,231.407 +01-10-2012,231.317 +01-11-2012,230.221 +01-12-2012,229.601 +01-01-2013,230.28 +01-02-2013,232.166 +01-03-2013,232.773 +01-04-2013,232.531 +01-05-2013,232.945 +01-06-2013,233.504 +01-07-2013,233.596 +01-08-2013,233.877 +01-09-2013,234.149 +01-10-2013,233.546 +01-11-2013,233.069 +01-12-2013,233.049 +01-01-2014,233.916 +01-02-2014,234.781 +01-03-2014,236.293 +01-04-2014,237.072 +01-05-2014,237.9 +01-06-2014,238.343 +01-07-2014,238.25 +01-08-2014,237.852 +01-09-2014,238.031 +01-10-2014,237.433 +01-11-2014,236.151 +01-12-2014,234.812 +01-01-2015,233.707 +01-02-2015,234.722 +01-03-2015,236.119 +01-04-2015,236.599 +01-05-2015,237.805 +01-06-2015,238.638 +01-07-2015,238.654 +01-08-2015,238.316 +01-09-2015,237.945 +01-10-2015,237.838 +01-11-2015,237.336 +01-12-2015,236.525 +01-01-2016,236.916 +01-02-2016,237.111 +01-03-2016,238.132 +01-04-2016,239.261 +01-05-2016,240.229 +01-06-2016,241.018 +01-07-2016,240.628 +01-08-2016,240.849 +01-09-2016,241.428 +01-10-2016,241.729 +01-11-2016,241.353 +01-12-2016,241.432 +01-01-2017,242.839 +01-02-2017,243.603 +01-03-2017,243.801 +01-04-2017,244.524 +01-05-2017,244.733 +01-06-2017,244.955 +01-07-2017,244.786 +01-08-2017,245.519 +01-09-2017,246.819 +01-10-2017,246.663 +01-11-2017,246.669 +01-12-2017,246.524 +01-01-2018,247.867 +01-02-2018,248.991 +01-03-2018,249.554 +01-04-2018,250.546 +01-05-2018,251.588 +01-06-2018,251.989 +01-07-2018,252.006 +01-08-2018,252.146 +01-09-2018,252.439 +01-10-2018,252.885 +01-11-2018,252.038 +01-12-2018,251.233 +01-01-2019,251.712 +01-02-2019,252.776 +01-03-2019,254.202 +01-04-2019,255.548 +01-05-2019,256.092 +01-06-2019,256.143 +01-07-2019,256.571 +01-08-2019,256.558 +01-09-2019,256.759 +01-10-2019,257.346 +01-11-2019,257.208 +01-12-2019,256.974 +01-01-2020,257.971 +01-02-2020,258.678 +01-03-2020,258.115 +01-04-2020,256.389 +01-05-2020,256.394 +01-06-2020,257.797 +01-07-2020,259.101 +01-08-2020,259.918 +01-09-2020,260.28 +01-10-2020,260.388 +01-11-2020,260.229 +01-12-2020,260.474 +01-01-2021,261.582 +01-02-2021,263.014 +01-03-2021,264.877 +01-04-2021,267.054 +01-05-2021,269.195 +01-06-2021,271.696 +01-07-2021,273.003 \ No newline at end of file diff --git a/_posts/2024-03-05-DS-python-pandas-df_titanic_IPYNB_2_.md b/_posts/2024-03-05-DS-python-pandas-df_titanic_IPYNB_2_.md index 57da75e..8067620 100644 --- a/_posts/2024-03-05-DS-python-pandas-df_titanic_IPYNB_2_.md +++ b/_posts/2024-03-05-DS-python-pandas-df_titanic_IPYNB_2_.md @@ -52,11 +52,35 @@ Using the Titanic dataset will require importing data. ```python # Uncomment the following lines to install the required packages -# !pip install seaborn -# !pip install pandas -# !pip install scikit-learn +!pip install seaborn +!pip install pandas +!pip install scikit-learn ``` + Defaulting to user installation because normal site-packages is not writeable + Requirement already satisfied: seaborn in /home/trevor/.local/lib/python3.10/site-packages (0.13.2) + Requirement already satisfied: matplotlib!=3.6.1,>=3.4 in /usr/lib/python3/dist-packages (from seaborn) (3.5.1) + Requirement already satisfied: numpy!=1.24.0,>=1.20 in /home/trevor/.local/lib/python3.10/site-packages (from seaborn) (1.26.4) + Requirement already satisfied: pandas>=1.2 in /home/trevor/.local/lib/python3.10/site-packages (from seaborn) (2.2.1) + Requirement already satisfied: pytz>=2020.1 in /usr/lib/python3/dist-packages (from pandas>=1.2->seaborn) (2022.1) + Requirement already satisfied: tzdata>=2022.7 in /home/trevor/.local/lib/python3.10/site-packages (from pandas>=1.2->seaborn) (2024.1) + Requirement already satisfied: python-dateutil>=2.8.2 in /home/trevor/.local/lib/python3.10/site-packages (from pandas>=1.2->seaborn) (2.9.0.post0) + Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil>=2.8.2->pandas>=1.2->seaborn) (1.16.0) + Defaulting to user installation because normal site-packages is not writeable + Requirement already satisfied: pandas in /home/trevor/.local/lib/python3.10/site-packages (2.2.1) + Requirement already satisfied: tzdata>=2022.7 in /home/trevor/.local/lib/python3.10/site-packages (from pandas) (2024.1) + Requirement already satisfied: pytz>=2020.1 in /usr/lib/python3/dist-packages (from pandas) (2022.1) + Requirement already satisfied: numpy<2,>=1.22.4 in /home/trevor/.local/lib/python3.10/site-packages (from pandas) (1.26.4) + Requirement already satisfied: python-dateutil>=2.8.2 in /home/trevor/.local/lib/python3.10/site-packages (from pandas) (2.9.0.post0) + Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil>=2.8.2->pandas) (1.16.0) + Defaulting to user installation because normal site-packages is not writeable + Requirement already satisfied: scikit-learn in /home/trevor/.local/lib/python3.10/site-packages (1.4.1.post1) + Requirement already satisfied: scipy>=1.6.0 in /usr/lib/python3/dist-packages (from scikit-learn) (1.8.0) + Requirement already satisfied: threadpoolctl>=2.0.0 in /home/trevor/.local/lib/python3.10/site-packages (from scikit-learn) (3.3.0) + Requirement already satisfied: numpy<2.0,>=1.19.5 in /home/trevor/.local/lib/python3.10/site-packages (from scikit-learn) (1.26.4) + Requirement already satisfied: joblib>=1.2.0 in /home/trevor/.local/lib/python3.10/site-packages (from scikit-learn) (1.3.2) + + ### Titanic Data > Look at a sample of data. diff --git a/_posts/2024-03-12-CSP-MCQ-2020-missed_IPYNB_2_.md b/_posts/2024-03-12-CSP-MCQ-2020-missed_IPYNB_2_.md index 0b90465..5d0dd2a 100644 --- a/_posts/2024-03-12-CSP-MCQ-2020-missed_IPYNB_2_.md +++ b/_posts/2024-03-12-CSP-MCQ-2020-missed_IPYNB_2_.md @@ -739,3 +739,62 @@ print(animal) jackalope jackalope + + +```python +def binary_search(arr, target): + low = 0 + high = len(arr) - 1 + + while low <= high: + mid = (low + high) // 2 + if arr[mid] == target: + return mid + elif arr[mid] < target: + low = mid + 1 + else: + high = mid - 1 + + return -1 # Target not found + +# Example usage +arr = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20] +target = 12 +result = binary_search(arr, target) +if result != -1: + print(f"Element {target} is found at index {result}") +else: + print(f"Element {target} is not found in the array") + +``` + + Element 12 is found at index 5 + + + +```python +import nltk +from nltk.sentiment import SentimentIntensityAnalyzer + +# Download the vader_lexicon +nltk.download('vader_lexicon') + +# Initialize the VADER sentiment intensity analyzer +sia = SentimentIntensityAnalyzer() + +# Provide a string to analyze +text = "" + +# Get the sentiment scores +sentiment = sia.polarity_scores(text) + +print(sentiment) +``` + + {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound': 0.0} + + + [nltk_data] Downloading package vader_lexicon to + [nltk_data] /home/trevor/nltk_data... + [nltk_data] Package vader_lexicon is already up-to-date! + diff --git a/_posts/2024-03-25-inflation_IPYNB_2_.md b/_posts/2024-03-25-inflation_IPYNB_2_.md new file mode 100644 index 0000000..7390094 --- /dev/null +++ b/_posts/2024-03-25-inflation_IPYNB_2_.md @@ -0,0 +1,4 @@ +--- + +--- + diff --git a/_posts/2024-04-03-algorhymic.md b/_posts/2024-04-03-algorhymic.md new file mode 100644 index 0000000..ed6f01f --- /dev/null +++ b/_posts/2024-04-03-algorhymic.md @@ -0,0 +1,69 @@ +--- +comments: True +layout: post +title: 2024 Algo- rhythmic +description: The blog for the algorhymic performance by CSA and CSP students +type: tangibles +courses: {'compsci': {'week': 28}} +--- + +## Types of sorting +- Insertion sort +- Quick sort +- Bubble sort +- Merge sort +- Selection sort + +## Insertion sort +- Compare element to elements checked before and inserts to correct position accordingly +- One of the most simple algorithms, but definitely not the fastest +- Sorted subarray once a section has been put in order +- Worst case scenerio O(n^2) time complexity +- Best case scenerio O(1) if already fully sorted +- Comments: creative performance with a clear way of showing how the +list of people is being sorted by pool noodle size +![Image](https://files.catbox.moe/vth1en.webp) + +## Quick sort +- Takes one element (pivot) and compares it to all the other elements and splits into 2 subarrays + - 2 subarrays --> one less than the pivot and one greater + - Repeated and done recursively +- O(logN) time complexity --> efficient sorting +- Comments: members were enthusiastic, but it wasn't as clear as it could be with the orange juice sorting (could use numbers). Good use of music to set a tone +![Image](https://files.catbox.moe/nucu0m.webp) + +## Bubble sort +- Element compares itself to the next in the list and moves if needed +- Might need to soft a second time to fully sort +- Best case: O(n) +- Worst case: O(n^2) +- Comments: Very easy to notice the sorting because of the labeled numbers on the hearts. Had a theme throughout the entire time and was easy to understand. +- No image I forgot 😭 + +## Merge sort +- Time complexity: O(N*logN) +- Split into several subarrays to sort independently, then merge one by one afterwards +- For example, split until sets of 2, sort the sets of 2, and finally begin to merge at the end +- Comments: I could see the numbers well and they simplified a more complex algorithmn. +- No image I forgot 😭 + +## Selection sort +- Move through the list and find the minimum value is selected from the list and moved to the beginning + - The first part of the list is already sorted, so then a new minimum can be found and shifted over to the left again +- Time complexity: O(N^2) +- Comments: Funny and well done. It was hard to see the numbers but I could still see numbers shifting +![Image](https://files.catbox.moe/6ba1xt.webp) + +## Conclusion +- Algo-rhythmic was a fun learning experience where I was able to visualize various sorting algorithms which I have used before + - My favorite algo-rhythm was the bubble sort which was super easy to understand +- This event also gave me a bit of insight into how fun CSA will be +- I would like to appreciate all of the CSP/CSA students who put themselves out there and made such a fun event! + + \ No newline at end of file