- importing .py files from jupyter-notebooks and editting the py files, it's nice to code
%reload_ext autoreload
%autoreload 2
- to plot on jupyter-notebook, it's nice to code
| GSL - GNU Scientific Library - GNU Project - Free Software Foundation (FSF) | |
| ライブラリの使用方法についてはmanual | |
| http://www.gnu.org/software/gsl/manual/html_node/ | |
| を参照する. | |
| 以下の通りに, 最終的には動作確認することができた. | |
| 0. ダウンロード | |
| http://core.ring.gr.jp/pub/GNU/gsl/ | |
| バージョンの一番新しいものをとる. .sigは無視. |
| type currency_t = JPY | USD | EUR | AUD | GBP | |
| let to_int ccy = match ccy with | |
| | JPY -> 0 | |
| | USD -> 1 | |
| | EUR -> 2 | |
| | AUD -> 3 | |
| | GBP -> 4 | |
| let currencies = [|JPY;USD;EUR;AUD;GBP|] |
%reload_ext autoreload
%autoreload 2
# image_data.shape must be (a, b)
plt.imshow(image_data, cmap=matplotlib.cm.binary, interpolation="nearest")
plt.show()
binary color map: matplotlib.cm.binary
Useful sources
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
x = np.linspace(-np.pi, np.pi, 360) # linearly spaced numbers
y = np.linspace(-1,1,100) # linearly spaced numbers
xx, yy = np.meshgrid(x, y)
https://beta.atcoder.jp/contests/soundhound2018-summer-qual のB問題 https://beta.atcoder.jp/contests/soundhound2018-summer-qual/tasks/soundhound2018_summer_qual_b の誤答例.
次のコードのようにstringに変換してから標準出力するとWAとなった。
#include <iostream>
#include