海外旅行: 銀行に旅行を伝えておく

海外旅行を事前に銀行に伝えておくと、transactionに支障が出にくい。

 

'travel notice'でgoogle検索すると、公式twitterが出てきた。いわく、PNC bankの場合、Debit cardでログインして下記のようにタブをたどると、旅行を登録できる。

go to Cust Serv tab>Debit Card Serv>Debit/ATM Card Serv & Resources>Notify Us of Travel (bottom right)

 

2019/07/21 追記
To submit a request to place a travel notice, click on the Customer Service tab. Beneath the Manage Accounts section, click on the Debit Card Services link. From the Debit/ATM Card page, click on the Debit/ATM Card Services & Resources link. Under the Debit/ATM Card Maintenance section, click on the Notify Us of Travel link.

gala インストール

$ pip install astro-gala
Collecting astro-gala
Downloading astro-gala-0.1.3.tar.gz (1.1MB)
100% |████████████████████████████████| 1.1MB 229kB/s
Requirement already satisfied (use --upgrade to upgrade): astropy in /usr/local/anaconda/lib/python2.7/site-packages (from astro-gala)
Requirement already satisfied (use --upgrade to upgrade): pyyaml in /usr/local/anaconda/lib/python2.7/site-packages (from astro-gala)
Requirement already satisfied (use --upgrade to upgrade): scipy in /usr/local/anaconda/lib/python2.7/site-packages (from astro-gala)
Requirement already satisfied (use --upgrade to upgrade): numpy>=1.6.0 in /usr/local/anaconda/lib/python2.7/site-packages (from astropy->astro-gala)
Building wheels for collected packages: astro-gala
Running setup.py bdist_wheel for astro-gala
Stored in directory: /Users/kh_____i/Library/Caches/pip/wheels/f4/39/c5/76d9c26914a01fa4f90bf1e94cbb5940148fa87f4df201e6c1
Successfully built astro-gala
Installing collected packages: astro-gala
Successfully installed astro-gala-0.1.3
You are using pip version 7.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

sshでログインしてシェルを変更する

<目的>

大学のパソコンにsshで入ったのちに、bashに切り替える。
そして、".bash_profile" の中でPATHが定義されているanacondaを使えるようにする。

 

(1)ログイン時のシェルを調べる

% echo $SHELL
/bin/tcsh

=== tcshであることがわかる。


(2)利用できるシェルの種類を調べる

% cat /etc/shells
# List of acceptable shells for chpass(1).
# Ftpd will not allow users to connect who are not using
# one of these shells.

/bin/bash
/bin/csh
/bin/ksh
/bin/sh
/bin/tcsh
/bin/zsh


(3)bashに切り替える

% bash
bash-3.2$


(4)そのままの状態でPYTHONPATHを調べる

bash-3.2$ echo $PYTHONPATH
[何も表示されない]


(5).bash_profileを読み込ませる


bash-3.2$ source .bash_profile
bash-3.2$ echo $PYTHONPATH
:/usr/local/anaconda/lib/python2.7/site-packages/

 

 

mac Pro 初期設定 Anaconda emcee corner PyGaia GSL

(1) Anaconda インストール
https://www.continuum.io/downloads

- Download the graphical installer
- Double-click the downloaded .pkg file and follow the instructions

これで全部完了。

(2) emcee

[事前準備]
[terminal]

デフォルト:
/bin/tcsh
を以下に変更:
/bin/bash


[.bashprofile]
.bash_profile に以下の行を付け加える:
_____
# Added by [my name] when managing the Python modules that can not be accessed.
export PYTHONPATH=$PYTHONPATH:/usr/local/anaconda/lib/python2.7/site-packages/
_____

[emcee]

$ git clone https://github.com/dfm/emcee.git
$ cd emcee
$ python setup.py install
. . .
Installed /Users/kh______/anaconda/lib/python2.7/site-packages/emcee-2.2.1-py2.7.egg
Processing dependencies for emcee==2.2.1
Searching for numpy==1.11.1
Best match: numpy 1.11.1
Adding numpy 1.11.1 to easy-install.pth file

Using /Users/kh______/anaconda/lib/python2.7/site-packages
Finished processing dependencies for emcee==2.2.1
ko__i:emcee kh______$ python -c 'import emcee'
Vendor: Continuum Analytics, Inc.
Package: mkl
Message: trial mode expires in 30 days
Vendor: Continuum Analytics, Inc.
Package: mkl
Message: trial mode expires in 30 days

と最後によくわからないメッセージが出るが気にしないでおく。


(3)corner.py


http://corner.readthedocs.io/en/latest/install.html#dependencies

$ git clone https://github.com/dfm/corner.py.git
$ cd corner.py
$ python setup.py install

テスト
$ nosetests corner
をしてみると、

. . .
======================================================================
FAIL: corner.tests.test_corner.test_tight.test
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/anaconda/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/usr/local/anaconda/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 51, in failer
result = f(*args, **kwargs)
File "/usr/local/anaconda/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 196, in do_test
'(RMS %(rms).3f)'%err)
ImageComparisonFailure: images not close: /Users/kh______/corner.py/result_images/test_corner/tight.png vs. /Users/kh______/corner.py/result_images/test_corner/tight-expected.png (RMS 42.126)

======================================================================
FAIL: corner.tests.test_corner.test_titles1.test
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/anaconda/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/usr/local/anaconda/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 51, in failer
result = f(*args, **kwargs)
File "/usr/local/anaconda/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 196, in do_test
'(RMS %(rms).3f)'%err)
ImageComparisonFailure: images not close: /Users/kh______/corner.py/result_images/test_corner/titles1.png vs. /Users/kh______/corner.py/result_images/test_corner/titles1-expected.png (RMS 13.492)

----------------------------------------------------------------------
Ran 36 tests in 19.327s

FAILED (failures=2)
. . .
などと言われるが、目で図を確認するとexpectedな図とほとんど完全に一致しているので問題はない模様。


(4) PyGaia

$ git clone https://github.com/agabrown/PyGaia.git

$ python setup.py install
. . .
zip_safe flag not set; analyzing archive contents...
creating dist
creating 'dist/PyGaia-1.1-py2.7.egg' and adding 'build/bdist.macosx-10.6-x86_64/egg' to it
removing 'build/bdist.macosx-10.6-x86_64/egg' (and everything under it)
Processing PyGaia-1.1-py2.7.egg
Copying PyGaia-1.1-py2.7.egg to /Users/kh______/anaconda/lib/python2.7/site-packages
Adding PyGaia 1.1 to easy-install.pth file

Installed /Users/kh______/anaconda/lib/python2.7/site-packages/PyGaia-1.1-py2.7.egg
Processing dependencies for PyGaia==1.1
Searching for scipy==0.18.1
Best match: scipy 0.18.1
Adding scipy 0.18.1 to easy-install.pth file

Using /Users/kh______/anaconda/lib/python2.7/site-packages
Searching for numpy==1.11.1
Best match: numpy 1.11.1
Adding numpy 1.11.1 to easy-install.pth file

Using /Users/kh______/anaconda/lib/python2.7/site-packages
Finished processing dependencies for PyGaia==1.1
. . .

どうやらversion 1.1らしい。


(5) GSLインストール

sudo が使えないためインストールできず。

download GSL-2.2.1
>>> linear fitting with large amount of data is now available!

$ cd gsl-2.2.1
$ ./configure
$ make
---ここまで---
$ sudo make install #sudo できず!!!

と思ったら、大学の初期設定でgslがインストールされていることが判明。
gcc -o bessel bessel.c -lgsl -lgslcblas -lm -L/opt/local/lib
のようにしてコンパイルが可能だった。これを
gcc -o bessel bessel.c -lgsl -lgslcblas -lm
のように簡略化するため、
".bash_profile"に下記のように加筆する。
# Added by [my name] when trying to set the gcc options (19 November 2016)
export LIBRARY_PATH=/opt/local/lib:$LIBRARY_PATH

----
gslに関する重要事項:

https://www.gnu.org/software/gsl/manual/html_node/Linking-programs-with-the-library.html#Linking-programs-with-the-library

The library is installed as a single file, libgsl.a.
とある。丹念に探すと、
Ko__i/opt/local/lib/libgsl.a
を発見。最初のKo__iは自分の大学のマシン名であるらしい。