diff --git a/ishiokariku/README.md b/ishiokariku/README.md new file mode 100644 index 0000000..efa206a --- /dev/null +++ b/ishiokariku/README.md @@ -0,0 +1,27 @@ +<名前> +石岡 陸 +Ishioka Riku + +<大学名> +東京大学 + +<専攻> +未定(東京大学は学部2年の夏に専攻が決まる)。 +現在は学部1年(新2年)教養学部。 + +<今までの開発経験> +今年度(2018-2019)の4月にPythonでプログラミングの勉強を始める。 +集団での開発経験はほとんどなし。 + +個人(一部複数人)で趣味程度にやったことは以下↓ +・3人でRuby on Railsを使ってWebサービスのプロトタイプを作成 +・PythonでWebスクレイピング(BeautifulSoup4) +・RubyでWebスクレイピング(Nokogiri) +・Unityで2DのiPhoneアプリ開発(と言ってもチュートリアル程度) +・バーチャルユーチューバーの配信システム構築(ボイスチェンジャー含む) + (これもチュートリアルを真似ただけだが配信まで行った) + +機械学習関係は始めたばかりで、最近TensorFlowの最初のチュートリアルをやった。 + +<中期的な目標> +具体的な中期的目標を立てられるくらいまで機械学習などの勉強をする。 diff --git a/ishiokariku/ishiokariku.ipynb b/ishiokariku/ishiokariku.ipynb new file mode 100644 index 0000000..8a3d9ca --- /dev/null +++ b/ishiokariku/ishiokariku.ipynb @@ -0,0 +1,213 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n" + ] + } + ], + "source": [ + "#課題1\n", + "\n", + "numbers = [i for i in range(1,11)] #1〜10のリスト\n", + "\n", + "print(numbers)" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[2, 4, 6, 8, 10]\n" + ] + } + ], + "source": [ + "#課題2\n", + "\n", + "evenNumbers = [2*i for i in range(1, 6)] #1〜10の偶数のリスト\n", + "\n", + "print(evenNumbers)" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{0: 'a', 1: 'b', 2: 'c', 3: 'd', 4: 'e', 5: 'f'}\n" + ] + } + ], + "source": [ + "#課題3\n", + "givenList = [\"a\",\"b\",\"c\",\"d\",\"e\",\"f\"]\n", + "\n", + "indexList = [i for i in range(6)] #0〜5のリスト\n", + "answerDict = dict(zip(indexList, givenList))\n", + "\n", + "print(answerDict)" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Humanクラスのインスタンスの数: 0\n", + "--インスタンスを2つ作成--\n", + "Humanクラスのインスタンスの数: 2 \n", + "\n", + "山田の年齢: 23\n", + "--山田の年齢をインクリメント--\n", + "山田の年齢: 24\n" + ] + } + ], + "source": [ + "#課題4\n", + "\n", + "class Human():\n", + " count = 0\n", + " \n", + " def __init__(self, name, age, sex, height, weight):\n", + " self.name = name\n", + " self.age = age\n", + " self.sex = sex\n", + " self.height = height\n", + " self.weight = weight\n", + " \n", + " Human.count += 1\n", + " \n", + " def aging(self):\n", + " #年齢をインクリメント\n", + " self.age += 1\n", + " \n", + " @classmethod\n", + " def numberOfHumans(cls):\n", + " #今までに作成したインスタンスの数を返す\n", + " #問題文の意図がこれで合っているのか少し不安ですが......。\n", + " return Human.count\n", + "\n", + " \n", + "print(\"Humanクラスのインスタンスの数:\",Human.numberOfHumans())\n", + "human1 = Human(\"山田\", 23, \"男\", 170.3, 60.2)\n", + "human2 = Human(\"高橋\", 30, \"女\", 165.2, 46.2)\n", + "print(\"--インスタンスを2つ作成--\")\n", + "print(\"Humanクラスのインスタンスの数:\",Human.numberOfHumans(), \"\\n\")\n", + "\n", + "\n", + "print(\"山田の年齢:\",human1.age)\n", + "human1.aging()\n", + "print(\"--山田の年齢をインクリメント--\")\n", + "print(\"山田の年齢:\", human1.age)" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[[19 22]\n", + " [43 50]]\n" + ] + } + ], + "source": [ + "#課題5\n", + "\n", + "import numpy as np\n", + "\n", + "matrix1 = np.array([[1, 2], [3, 4]])\n", + "matrix2 = np.array([[5, 6], [7, 8]])\n", + "\n", + "answer = np.dot(matrix1, matrix2)\n", + "\n", + "print(answer)" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.7071067811865475\n" + ] + } + ], + "source": [ + "#課題6\n", + "#2つのベクトルの\"なす角\"のcosという理解で解きます\n", + "\n", + "import numpy as np\n", + "from numpy import linalg as LA\n", + "\n", + "vector1 = np.array([2, -1])\n", + "vector2 = np.array([3, 1])\n", + "\n", + "innerProduct = np.inner(vector1, vector2) #内積\n", + "normProduct = LA.norm(vector1)*LA.norm(vector2) #ノルムの積\n", + "\n", + "cos = innerProduct/normProduct #余弦定理より\n", + "\n", + "print(cos)" + ] + }, + { + "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.6.1" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +}