Python (Anaconda ) Anaconda 2 3 Python Python IDLE Python NumPy 6

Similar documents
Python ( ) Anaconda 2 3 Python Python IDLE Python NumPy 6 5 matpl

1 matplotlib matplotlib Python matplotlib numpy matplotlib Installing A 2 pyplot matplotlib 1 matplotlib.pyplot matplotlib.pyplot plt import import nu

Visual Python, Numpy, Matplotlib

Visual Python, Numpy, Matplotlib

Anaconda x86_64 版バージョン の インストールとパッケージの追加 最終更新 : 2018 年 2 月 10 日 URL: Anaconda は,Py

たのしいプログラミング Pythonではじめよう!

ユレシス社アプリケ-ション

GNU Emacs GNU Emacs

背景

2 I I / 61

Python Speed Learning

2.2 Sage I 11 factor Sage Sage exit quit 1 sage : exit 2 Exiting Sage ( CPU time 0m0.06s, Wall time 2m8.71 s). 2.2 Sage Python Sage 1. Sage.sage 2. sa

nakao

4 (TA:, ) 2018 (Ver2.2) Python Python anaconda hello world

X Window System X X &

untitled

untitled

Q&A目次.PDF

Cleaner XL 1.5 クイックインストールガイド

Ipython Notebook の紹介

JNOD32OPE_1.book

programmingII2019-v01

Python による科学技術計算の概要

MRS-series File Manager

Python Speed Learning

quattro.PDF

Python を用いた人工衛星 (MODIS) データの解析手引書 担当 : 植山雅仁 1. 新規プロジェクトの立ち上げと準備 Jupyter Notebook を立ち上げる Hello World! という文字が表示されるプログラムを実行する >> print('hello World!') [C

MAP2496.PDF

Copyright 2008 QSR International Pty Ltd. ABN All rights reserved. NVivo QSR ( ) QSR International Pty Ltd. Microsoft.NET SQL Server W

Rによる計量分析:データ解析と可視化 - 第2回 セットアップ

Configuring_01

13 Student Software TI-Nspire CX CAS TI Web TI-Nspire CX CAS Student Software ( ) 1 Student Software 37 Student Software Nspire Nspire Nspir

Microsoft Word - GPM_read_program_guide_forPython_V5.1.docx

TeraTerm Pro V.2.32の利用法

Python (2) 1 (random number) MVP[1] MCNP[2] Python 1. π Python Python (random number generator) ( ) (pseudorandom number) Lehmer (l

Microsoft Word - PrivateAccess_UM.docx

HP ThinUpdateを使用したWESシンクライアントイメージリストア手順書

8-7th

チュートリアル XP Embedded 入門編

Rの基本操作


2 3

LSM5Pascal Ver 3.2 GFP 4D Image VisArt Carl Zeiss Co.,Ltd.

Android Studioセットアップガイド


フリーセルプロの使い方

Nios II 簡易チュートリアル

SHOBI_Portal_Manual

情報活用資料

ドライバインストールガイド

1 I EViews View Proc Freeze

<4D F736F F D B B83578B6594BB2D834A836F815B82D082C88C60202E646F63>

GENESYS2005_Instal_Guide.PDF

HD でブロードキャストするための Adobe Media Live Encoder のインストールおよび設定方法 Adobe Media Live Encoder のダウンロード : 手順 1 へ行く 画面下にある Downlo

Introduction Purpose This training course demonstrates the use of the High-performance Embedded Workshop (HEW), a key tool for developing software for

TDR測定ガイド Ver1.PDF

大学等における社会人の受け入れ状況調査


untitled

untitled

OK (S) vncviewer UNIX EDS vncviewer : VNC server: eds.efc.sec.eng.shizuoka.ac.jp:51 OK 2

H8.6 P

さいたま国際マラソン2015_フルマラソンの部.indd

RT-PCR プロトコール.PDF

C-720 Ultra Zoom 取扱説明書

VoltAge21 02

help gem gem gem my help

: Shift-Return evaluate 2.3 Sage? Shift-Return abs 2 abs? 2: abs 3: fac

EQUIUM EQUIUM S5010 1

スタートアップガイド_応用編

本機をお使いの方へ

Transcription:

Python (Anaconda ) 2017. 05. 30. 1 1 2 Anaconda 2 3 Python 3 3.1 Python.......................... 3 3.2 IDLE Python....................... 5 4 NumPy 6 5 matplotlib 7 5.1.................................. 7 5.2.................................. 7 5.3...................... 9 6 Scipy 11 7 scikit-learn 12 8 URL 13 1 Python 1 ( ) (numpy, matplotlib, scipy, scikit-learn ) Anaconda python2.7 64bit PC 64bit 32bit 1 Python( ): http://www.python.jp/ 1

2 Anaconda Anaconda 2 1. Anadonda https://www.continuum.io/downloads Windows Python 2.7 64bit NO THANKS 2. (400MB ) 3. ( ) Anaconda2-x.x.x-Windows_x86_64.exe ( x 4. Setup Next, I Agree( ), Next(Just Me ) 5. ( ) Destination Folder( ) C:\Anaconda2 ( or 2 ) C 6. Advanced Options 2 Install 7. Completed Next, Finish 8. Anaconda2 (64-bit) Anaconda IPython Jupyter Spyder 2 Anaconda python windows 2

3 Python Python OS 3.1 Python PC Windows python python Python C:\Anaconda2 python python python 1: Python Enter >>> print "Hello" Hello Python 2: Enter 3

>>> exit() Enter 4

3.2 IDLE Python IDLE PC Windows idle idle Python C:\Anaconda2\Script python idle IDLE python 3: IDLE File New File Python sample 1.py print "Hello" File Save Save as 4: Run Run Module IDLE Hello 5: 5

4 NumPy NumPy 3 IDLE Python (Sec. 3.2 ) π >>> import numpy >>> numpy.pi 6: 3 NumPy( ):http://www.numpy.org/ 6

5 matplotlib 5.1 matplotlib 4 IDLE Python (Sec. 3.2 ) File New File Python sample test.py import numpy as np import matplotlib.pyplot as plt x=np.arange(-3,3,0.1) y= np.sin(x) plt.plot(x,y) plt.show() Run Run Module 7: ( ) 5.2 Python sample 2.py from pylab import * subplot(111, axisbg= darkslategray ) #subplot(111, axisbg #ababab ) t = arange(0.0, 2.0, 0.01) s = sin(2*pi*t) plot(t, s, y ) xlabel( time (s), color= r ) ylabel( voltage (mv), color= 0.5 ) # grayscale color title( About as silly as it gets, folks, color= #afeeee ) show() 4 matplotlib( ) http://matplotlib.org/ 7

[1] sample_2.py sample 2.py Run Run Module 8: 5 5 http://matplotlib.org/gallery.html 8

5.3 ( ) 1 1.1 2 1.2 3 1.6 1 x 2 y [1] plot_graph_data.txt import matplotlib.pyplot as plt x=[] y=[] fp = open( plot_graph_data.txt, r ) for i, line in enumerate(fp): data=line.split() x.append(data[0]) y.append(data[1]) plt.plot(x,y, ro ) # red circle plt.title( My graph ) plt.xlabel( time (s) ) plt.ylabel( hight (m) ) plt.text(1.2, 1.2, Hello Hello, rotation=45) plt.xlim(0.0, 4.0) plt.ylim(0.0, 2.0) plt.show() [1] plot_graph.py 9: 9

plt.title( My graph ) 10

6 Scipy Scipy 6 IDLE Python (Sec. 3.2 ) π >>> import scipy >>> scipy.pi 10: 6 Scipy.org( ): http://www.scipy.org/ 11

7 scikit-learn ( ) scikit-learn 7 IDLE Python (Sec. 3.2 ) >>> import sklearn scikit-learn [1] sample 4.py ( ) import numpy as np import matplotlib.pyplot as plt from sklearn.linear_model import LinearRegression # create samples sample_size = 30 err_sigma = 0.1 x = np.random.rand(sample_size, 1) err = err_sigma * np.random.randn(sample_size, 1) y = 3 * x + 1 + err # train a linear regression model regr = LinearRegression () regr.fit(x, y) # make predictions xt = np.linspace (0.0, 1.0, num = 1000).reshape((1000, 1)) yt = regr.predict (xt) # plot samples and regression result plt.plot(x, y, o ) plt.plot(xt, yt) plt.show() scikit-learn 11: 7 scikit learn( ): http://scikit-learn.org 12

8 URL python URL 1. PythonWeb IT http://www.pythonweb.jp/tutorial/ 2. Python http://docs.python.jp/2/tutorial/index.html math http://docs.python.jp/2/library/math.html#module-math 3. Python http://www.tohoho-web.com/python/index.html 4. Python http://www.geocities.jp/m_hiroi/light/python01.html 5. Python : 4 ( ) http://www.slideshare.net/yuichi110/python-introduction-42659983 6. Python Scientific Lecture Notes http://turbare.net/transl/scipy-lecture-notes/index.html [1] http://www.damp.tottori-u.ac.jp/~hoshi/ex.html 13