「Library/工学/プログラミング・アルゴリズム/Python」の編集履歴(バックアップ)一覧はこちら
追加された行は緑色になります。
削除された行は赤色になります。
#navi(Library/工学/)
#contents
----
----
*Python:実践編
**禅
import thisと打つと、、
The Zen of Python, by Tim Peters
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
**標準出力
print("")
**標準入力?
name = input("お名前は?")
print("こんにちは %s" % (name))
~.pyと保存して、
python3 ~.pyと実行する。
**繰り返し
***for文
def main():
""" Function doc """
for i in range(1, 6):
print("%s" % i)
if __name__ == "__main__":
main()
**計算系モジュール
***import math
***import cmath
***from fractions import Fraction
***import numbers
***import decimal import Decimal
**科学技術計算系
***numpy
apt-get install python3-numpy
***scipy
apt-get install python3-scipy
***matplotlib
apt-get install python3-matplotlib
-csvを読み出してplotする例
-&ref(csv_plot.py)
-&ref(csv_3Dplot.py)
**Blender,,,3Dを取り扱う
-投稿サイト(Japan)
--https://blender.jp/
-配布サイト
--https://www.blender.org
-インストール
-apt-get install blender
**スパースモデリング...フランスInriaの公開コード
-http://spams-devel.gforge.inria.fr/downloads.html
*Python:理論編
**本
-本の評判(参考):http://programming-study.com/language/python-books/
***Perfect Python
-3.xと2.xで言語仕様が違うらしいな。
>
良さげな本。てかあんまり選択しなかった。グラフとか書けるんだあみたいな。
3.x対応らしい。
<
***初めてのPython 第3版
>
分厚い本。7章くらいで、やめた。
<
***Pythonライブラリ厳選レシピ
>
いろいろ参考になりそうなのが書いてありそう。
<
***IPython データサイエンスクックブック
>
おもしろそうな応用例が書かれている。
<
***Pythonによるデータ分析入門
**開発環境とか
-https://www.python.org/
-https://www.python.org/downloads/mac-osx/
***統合開発環境としてのGeany
-これがよさそうだと思う。Windowsでも使える。
-http://www.geany.org/
***Python2系と3系の共存
>
Ubuntu15.10では、最初から共存した状態だった。pythonと打つと2系が、python3と打つと3系が動作する。
Ubuntu12では、後入れで入れてた。
http://blog.yubais.net/21.html
<
**ライブラリ
***学術系ライブラリ,Scipy,Numpy,matplotlib,,,
-http://scipy.org/install.html
-macでのインストール
--http://penandpants.com/2012/02/24/install-python/
--https://joppot.info/2014/01/29/522
pipというツールでライブラリ管理を行っている。
easy_install pip
pip install numpy
pip install scipy
pip install matplotlib
pip install scikit-learn
***使い方
-http://www.turbare.net/transl/scipy-lecture-notes/intro/
-りんごがでている:matplotlib入門
--http://bicycle1885.hatenablog.com/entry/2014/02/14/023734
----
-簡単な例
import numpy as np
import matplotlib.pyplot as plt
x= np.arange(-3,3,0.1)
y=np.sin(x)
plt.plot(x,y)
imshow(x,y)
-matplotlibで3Dグラフを描画する
--http://d.hatena.ne.jp/white_wheels/20100327/p3
**リンク集
***Pythonを海洋(気候)物理学に使う。
-https://sites.google.com/site/drtorumiyama/python
***朱鷺の杜
-http://ibisforest.org/index.php?python
**プロジェクト
***東京scipy
-https://github.com/scipy-japan/tokyo-scipy
#navi(Library/工学/)
#contents
----
----
*Python:実践編
**禅
import thisと打つと、、
The Zen of Python, by Tim Peters
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
**標準出力
print("")
**標準入力?
name = input("お名前は?")
print("こんにちは %s" % (name))
~.pyと保存して、
python3 ~.pyと実行する。
**繰り返し
***for文
def main():
""" Function doc """
for i in range(1, 6):
print("%s" % i)
if __name__ == "__main__":
main()
**計算系モジュール
***import math
***import cmath
***from fractions import Fraction
***import numbers
***import decimal import Decimal
**科学技術計算系
***numpy
apt-get install python3-numpy
***scipy
apt-get install python3-scipy
***matplotlib
apt-get install python3-matplotlib
-csvを読み出してplotする例
-&ref(csv_plot.py)
-&ref(csv_3Dplot.py)
**Blender,,,3Dを取り扱う
-投稿サイト(Japan)
--https://blender.jp/
-配布サイト
--https://www.blender.org
-インストール
-apt-get install blender
**スパースモデリング...フランスInriaの公開コード
-http://spams-devel.gforge.inria.fr/downloads.html
*Python:理論編
**本
-本の評判(参考):http://programming-study.com/language/python-books/
***Perfect Python
-3.xと2.xで言語仕様が違うらしいな。
>
良さげな本。てかあんまり選択しなかった。グラフとか書けるんだあみたいな。
3.x対応らしい。
<
***初めてのPython 第3版
>
分厚い本。7章くらいで、やめた。
<
***Pythonライブラリ厳選レシピ
>
いろいろ参考になりそうなのが書いてありそう。
<
***IPython データサイエンスクックブック
>
おもしろそうな応用例が書かれている。
<
***Pythonによるデータ分析入門
***グラフプロット
-https://qiita.com/nkay/items/d1eb91e33b9d6469ef51
**開発環境とか
-https://www.python.org/
-https://www.python.org/downloads/mac-osx/
***統合開発環境としてのGeany
-これがよさそうだと思う。Windowsでも使える。
-http://www.geany.org/
***Python2系と3系の共存
>
Ubuntu15.10では、最初から共存した状態だった。pythonと打つと2系が、python3と打つと3系が動作する。
Ubuntu12では、後入れで入れてた。
http://blog.yubais.net/21.html
<
**ライブラリ
***学術系ライブラリ,Scipy,Numpy,matplotlib,,,
-http://scipy.org/install.html
-macでのインストール
--http://penandpants.com/2012/02/24/install-python/
--https://joppot.info/2014/01/29/522
pipというツールでライブラリ管理を行っている。
easy_install pip
pip install numpy
pip install scipy
pip install matplotlib
pip install scikit-learn
***使い方
-http://www.turbare.net/transl/scipy-lecture-notes/intro/
-りんごがでている:matplotlib入門
--http://bicycle1885.hatenablog.com/entry/2014/02/14/023734
----
-簡単な例
import numpy as np
import matplotlib.pyplot as plt
x= np.arange(-3,3,0.1)
y=np.sin(x)
plt.plot(x,y)
imshow(x,y)
-matplotlibで3Dグラフを描画する
--http://d.hatena.ne.jp/white_wheels/20100327/p3
**リンク集
***Pythonを海洋(気候)物理学に使う。
-https://sites.google.com/site/drtorumiyama/python
***朱鷺の杜
-http://ibisforest.org/index.php?python
**プロジェクト
***東京scipy
-https://github.com/scipy-japan/tokyo-scipy