Suppose that a main script of [cci]main.py[/cci] (or a corresponding [cci]Jupyter Notebook[/cci]) exists in the directory of [cci]myproject[/cci], and its subdirectory [cci]sub[/cci] contains modules of [cci]mod_a.py[/cci] (a function of [cci]func_a ()[/cci] included) and [cci]mod_b.py[/cci] (a function of [cci]func_b()[/cci] included) where [cci]main.py[/cci] imports the module [cci]mod_a[/cci] and the module [cci]mod_a[/cci] imports the module [cci]mod_b[/cci]. First, creating an empty file [cci]__init__.py[/cci] in the directory [cci]sub[/cci] so that [cci]sub[/cci] is recognized as a package as shown below: [cc] myproject/ main.py sub/ __init__.py mod_a.py (func_a()) mod_b.py (func_b()) [/cc] The sub-directory, [cci]sub[/cci], containing two modules, becomes a package when [cci]__init__.py[/cci] is included. Import [cci]mod_a.py[/cci] in [cci]main.py[/cci] The following is how to import the module [cci]mod_a.py[/cci] […]
Updated on September 23, 2020:There seems a bug in bokeh 2.2.1, in which png files do not contain whole of the graphic area when exporting to png from html. To avoid this error, use bokeh 1.4.0, which can be insalled with conda install -c pyviz bokeh==1.4.0 in a new conda virtual environment This article is targeted for Windows 10. Although Matplotlib is a conventional plotting tool in Python, Bokeh is a relatively new package that makes it easy to create interactive plots. Unfortunately, the image output for pasting into PowerPoint or Word is low resolution by default, and it is necessary to enhance the resolution by setting the value of […]
I have been involved in the long-term perspective committee meeting of Shimizu Port in Shizuoka Prefecture considering the future in the next 20 to 30 years. We had a trip to Shimizu Port on September 18th. The port is attractive not only the function as a port logistics, but also abundant green landscape, world heritage site of Miho-No-Matsubara associated with Mt. Fuji, fishery, energy, industry. Although the port is small, the port must attracts people because of these multiple functions.
Register GitLab Firstly, register GitLab and create a project. No contents are required at this moment as this project will be cloned to Windows directory. Install Git for Windows Download Git for Windows from this site and install it. Default settings are recommended except Adjusting your PATH environment where Use Git from Git Bash only is recommended to choose for safety. Initial setting for Git Open Git Bash and set as follows. Here, Hidemaru Editor is chosen. user.name and user.email should be those registered in GitLab. Quotation marks are also required. $ git config –global core.editor \'/C/Program Files (x86)/Hidemaru/Hidemaru.exe\' //fu8 $ git config –global user.name Your Name $ git config […]
As part of the Can Tho University capacity building project supported by JICA, I took a business trip to Can Tho University in Vietnam on the itinerary from September 4 to 8, 2018. The outbound route was 9/4 JL 079 HND/SGN 01:25/05:15, and the return route was 9/7 JL070 SGN/HND 23:25/06:55+1. From Tan Son Nhat International Airport in Ho Chi Minh City to Can Tho City, it takes approximately 3 hours to 4 hours by car. The time has been shortened considerably since the Can Tho bridge was constructed. The hotel I stayed at was Ninh Kieu 2 (designated by JICA), and the exchange rate was 100 JPY = 20,000+ […]