Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
272 changes: 272 additions & 0 deletions HikariMiwa/Hikari_Miwa_python_challenge (1).ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,272 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 14,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#課題1\n",
"\n",
"li = list(range(1,11))\n",
"li"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"[2, 4, 6, 8, 10]"
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#課題2\n",
"#1~10の偶数のみのリスト作成\n",
"en = list(range(2,11,2))\n",
"en"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"{0: 'a', 1: 'b', 2: 'c', 3: 'd', 4: 'e', 5: 'f'}"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#課題3\n",
"#リストから辞書型に変換する\n",
"def list_to_dic(key_list, val_list):\n",
" return dict(zip(key_list, val_list))\n",
" \n",
"lis = [\"a\",\"b\",\"c\",\"d\",\"e\",\"f\"]\n",
"nl = list(range(0,6))\n",
"\n",
"list_to_dic(nl,lis) \n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" 山田, 24歳.sex: 男性.Height: 170cm.Weight: 60kg.\n",
"2\n"
]
}
],
"source": [
"#課題3\n",
"#Humanクラスの作成\n",
"class Human:\n",
" \n",
" count = 0\n",
" \n",
" \n",
" \n",
" \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",
" Human.count += 1\n",
" \n",
" def age_plus(self,age):\n",
" self.age += 1\n",
" \n",
" @classmethod\n",
" def count_instance(self):\n",
" return self.count\n",
" \n",
" \n",
"\n",
" \n",
" \n",
"a =Human(\"山田\", 23, \"男性\",170.3 ,60.2)\n",
"b = Human(\"高橋\", 23, \"女性\",165.2 ,46.2)\n",
"\n",
"a.age_plus(a.age)\n",
"\n",
"\n",
"print(\" %s, %d歳.sex: %s.Height: %dcm.Weight: %dkg.\" % (a.name, a.age,a.sex,a.height,a.weight))\n",
"print(Human.count_instance())"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": []
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"#課題5\n",
"import numpy as np\n",
"x = np.arange(9).reshape((3, 3))\n",
"y =np.arange(6).reshape((3, 2))"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"array([[10, 13],\n",
" [28, 40],\n",
" [46, 67]])"
]
},
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"np.dot(x,y)"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"#課題6\n",
"x = np.arange(3)\n",
"data = [1,4,5,7]\n",
"y = np.array(data)"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"array([ 1. , 0.54030231, -0.41614684])"
]
},
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"np.cos(x)\n"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"array([ 0.54030231, -0.65364362, 0.28366219, 0.75390225])"
]
},
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"np.cos(y)"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"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.0"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
16 changes: 16 additions & 0 deletions HikariMiwa/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
名前   
美和 瑛  

大学名   
東京大学   

専攻   
経済学部経営学科   

今までの開発経験     
swiftでiosアプリの開発を大学2年からやってます。またfintechに去年の冬興味を持ち始め
現在進行形でpythonで機械学習を学んでいます。   

中期的な目標
fintechに関わりのあるテキストマイニング、音声認識、データマイニングなどを自分で理解し実装できるようになりたいです。
文系だから技術がわからないという時代は終わりだと感じているため積極的に学びたいです。