2021年4月26日月曜日

キルシェンハイン Kirschenhain, 桜の森

 ウィーンのドナウインゼルの北東に桜の木がたくさん植えてあるキルシェンハインという場所があり、そろそろ満開になりそうだったので行ってきました。まだ木が若いので少し迫力にはかけますが、春の気配を感じるには十分でした。

https://goo.gl/maps/4fJwEzJJn8LTLhb89





2021年4月22日木曜日

"lto1: error: ‘-fcf-protection=full’ is not supported for this target" on GCC-10

Probably someone has updated the DGX station system, and g++-10 compiler complains as 

lto1: error: ‘-fcf-protection=full’ is not supported for this target.

To prevent this I needed to give the linker options as;

LD= g++-10 -fopenacc -foffload="-fcf-protection=none -fno-stack-protector"


2021年4月14日水曜日

Colour scheme for scientific computing visualization

 Looks nice, and the author provides Python codes (and some other languages).

I also have a kind of colour blindness (red and green). It would be nice to have this.

https://ai.googleblog.com/2019/08/turbo-improved-rainbow-colormap-for.html

2021年4月13日火曜日

Delete Linux from Dual Boot Environment

I have not known that GPT boot loaders can be deleted in BIOS setting.
So, if you want to delete dual boot Linux, you just need to delete the bootloader and remove the Linux partitions (and expand the Windows partition). 


https://itsfoss.com/uninstall-ubuntu-linux-windows-dual-boot/

Data transfer from Oracle To PostgreSQL via Pandas

 I needed to transfer data from Oracle to PostgreSQL, which are on different machines.
This time, I used Pandas and Pickle on Python 2.7.

Reading from Oracle:

import pickle
import cx_Oracle
import pandas as pd

def main():

conn = cx_Oracle.connect("ID/PW@DB")
tables = ["a","b"]
data = {}
for iTab in tables:
query = "select * from " + iTab
curDF = pd.read_sql(query, con=conn)
data[iTab] = curDF

conn.close()
with open("data.dat","wb") as f:
pickle.dump(data,f)

Writing to PostgreSQL:
(Note1, table name, schema and column names should be in lower case. Otherwise, you will find or need strange double quotation marks.
Note2, you should give chunksize. Otherwise, the python instance will eat up all the memory.
Note3, you need to set up schemas, but tables will be automatically created)

import pickle
import pandas as pd
from sqlalchemy import create_engine

def main():

with open("data.dat","rb") as f:
arrData = pickle.load(f)

engine = create_engine('postgresql://ID:PW@localhost:5432/server')

for iTab in arrData:
print(iTab)
arrData[iTab].to_sql(iTab.lower(), engine,schema="schema".lower(),chunksize=100)

2021年4月1日木曜日

客員共同研究員/Visiting Researcher @東大/The University of Tokyo

As of today, I work for/with Prof. Hiroshi Okuda at the University of Tokyo as a visiting researcher.
Hope that I can bridge the Japanese academia and CTBTO.
Well, it is obviously at no cost. So, if you feel you want to support my research, please feel free to donate with my wishlist on Amazon :)

今日付けで東大 新領域創成科学 奥田研究室の客員共同研究員になりました。
大したことはできませんが、少しでも世の中の役に立てると良いと思っています。