[Jupyter] Connect Jupyter notebook via SSH Tunnel
One can install Jupyter notebook on an AWS EC2 instance via the following command 1 pip install jupyterlab And then start it via the command 1 jupyter-lab --no-browser However, to access it from a client computer may need some tweaking in both AWS EC2 instance and the SSh connection. AWS EC2 setting Make sure the EC2 instance’s inbound port in security groups include the jupyter server’s port, normally 8888 SSH setting use the following command or alike connect to the EC2 instance
2023-05-23   schedule 1 min 17 s  
Setup bash in MacOS
I have used Bash in my career for many years and it is so convenient for data analysis. In MacOS, however, the default shell is zsh. To make use of bash in MacOS, one need the following steps: Install the latest version of bash One can use brew (the MacOS package manager) to install the latest bash. This will install bash to /usr/local/bin/bash. 1 brew install bash Change the default shell to /usr/local/bin/bash To change the default shell in MacOS, one need run the following command:
2023-05-22   schedule 1 min 16 s  
Disclaimer
The information provided on fortune9.netlify.app is for general informational purposes only. The website owners and authors do not make any warranties about the completeness, reliability, and accuracy of this information. Any action you take upon the information you find on this website is strictly at your own risk, and the owners and authors will not be liable for any losses and/or damages in connection with the use of our website.
2023-04-29   schedule 1 min 22 s  
About
This is Zhenguo Zhang’s blog site created using the blogdown package. The theme was forked from @AmazingRise/hugo-theme-diary Thank the authors of these great tools. About myself Name Zhenguo Zhang Email zhangz.sci@gmail.com Interest Statistics Programming Disease diagnosis and treatment Molecular evolution God
2023-03-10   schedule 11 s  
[Tips] Adding google calendar using endpoint in Thunderbird
I have used Thunderbird as my daily email and calendar tools for decades for its expandable features via addons. But sometimes, it suffers bugs, just like recently, it stops synchronization with google calender after I updated to version 102.8.0. This bug triggers me to explore potential solutions, and it leads to today’s topic – adding google calendar via endpoint. Three methods to add google calendar When one wants to add google calendar to Thunderbird, the popup window shows three methods:
2023-03-01   schedule 1 min 5 s  
[Git] Git hooks - Part 1
Introduction Git hooks allows one to customize git operations automatically, such as checking the code before commit, notify others when committed, or test the code before pushing. Basically, hooks can be any executable files put under the folder .git/hooks, and named according to the trigger event, such as .git/hooks/pre-commit (triggered when a commit is being generated). The executables can be written in bash, perl, python, R, or anything that can be executed.
2023-02-14   schedule 1 min 3 s  
[Github] Gist is essentially git repo
Gists are usually single pages, for users to show information such as manual, tutotials, etc. Actually, they are git repos, too, so one can clone and push to it. To do so, one need to go to a gist page, for example: https://gist.github.com/fortune9/85cb4f128ee5537c4a8cfdf6f2497e84. And then choose “Clone via HTTPS” from the dropdown menu at the top right of the page (as shown in the below figure), and copy the URL after the selection.
2023-02-14   schedule 40 s  
[R] Need import S3 functions for a package to use
When developing an R package, it has been suggested to just put the dependent packages in Description file under Imports section. However, I recently found that for S3 methods exported by a package, one need to import such functions explicitly in order to use them in the developed package. One example is the unique() function from the package data.table. This function can’t be called via data.table::unique(), because it is a S3 method.
2023-01-20   schedule 36 s  
[Thunderbird] Error: User is authenticated but not connected
Issue In last few days, my thunderbird striked: it frequently popped two error messages: “The service outlook.office365.com is disconnected” and “User is authenticated but not connected”. Research After searching the website for a few days, I came to an solution, which was found here. Solution Go to Settings -> Config Editor, and then search network.dns.disableIPv6 and click the toggle switch on the right to make it ‘true’. Finally close and reopen Thurderbird, and the problem should be resolved.
2023-01-02   schedule 22 s  
[AWS] How to use an IAM role via AWS CLI
There are situations that one may have multiple AWS accounts (or IAM roles) and need switch among them sometimes. This is doable via the AWS website by clicking the username button at the top-right and then click switch role. How to do this in the command line? To switch IAM roles via AWS CLI, one can do the following: Edit the file ~/.aws/credentials The file ~/.aws/credentials stores the AWS credentials. It may include multiple profiles, in the following format:
2022-05-26   schedule 1 min 48 s