Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View ogawa's full-sized avatar
💭
I may be slow to respond.

Hirotaka Ogawa ogawa

💭
I may be slow to respond.
View GitHub Profile
@ogawa
ogawa / gist:7edc208b9dc547240bfd85deead371ca
Created March 31, 2020 03:09
Parabricks installer patch
diff --git a/installer.py b/installer.py
index e3c723e..3ec86ff 100755
--- a/installer.py
+++ b/installer.py
@@ -167,8 +167,8 @@ def check_singularity():
run_and_return(["singularity", "--version"], "singularity --version failed. Please check installation of singularity.")
cmd_proc = subprocess.Popen(["singularity", "--version"], stdout = subprocess.PIPE, universal_newlines=True)
singularity_version = cmd_proc.stdout.readline().split('.')
- if "singularity version " in singularity_version[0]:
- if os.getuid() != 0:

Horovodテスト

インタラクティブノード上か、qrshでログインした計算ノード上で以下のように環境を構築しておきます。

$ module load python/3.6/3.6.5
$ module load cuda/9.0/9.0.176.4
$ module load cudnn/7.4/7.4.2
$ module load openmpi/2.1.5
$ python3 -m venv horovod

OpenSSHを用いたインタラクティブノードへのログイン

概要

以下ではアクセスサーバ (as.abci.ai) へのポートフォワーディングによるトンネルを作った上で、別ターミナルでSSHトンネルを用いてインタラクティブノードにアクセスする方法を説明しています。

しかし、OpenSSHを用いるともっと簡便にインタラクティブノードにアクセスできます。このメモではその方法を説明します。

ABCIでのJupyter notebook利用

概要

このメモでは、ABCIでのJupyter notebookの利用方法について説明します。

以下の説明はmacOSを対象とします。macOSでは、デフォルトでOpenSSH 7.3以降がインストールされています。また、ABCI上でのPython環境の作り方などの説明は省略します。

開始手順

ABCIでのリモートデスクトップ利用

概要

このメモでは、ABCIでのリモートデスクトップの利用方法について説明します。

以下の説明はmacOSを対象とします。macOSでは、デフォルトでOpenSSH 7.3以降がインストールされ、FinderにVNCクライアントが統合されています。

前準備

@ogawa
ogawa / sendEmailOnFormSubmit.gs
Created February 19, 2014 07:53
Google Appsでフォームでの投稿をメールで通知するスクリプト
// email address(es) for notification
var NOTIFY_RECIPIENT = 'admin@example.com';
var ADMIN_RECIPIENT = NOTIFY_RECIPIENT;
function sendEmailOnFormSubmit(e) {
var body = '';
var footer = '';
try {
var range = SpreadsheetApp.getActiveSheet().getDataRange();
diff --git a/FiscalYearlyArchives/fiscal_yearly_archives.pl b/FiscalYearlyArchives/fiscal_yearly_archives.pl
index 4c57e36..fedac03 100644
--- a/FiscalYearlyArchives/fiscal_yearly_archives.pl
+++ b/FiscalYearlyArchives/fiscal_yearly_archives.pl
@@ -57,7 +57,7 @@ sub archive_fiscal_year {
my $tag = $ctx->stash('tag');
return $ctx->error(MT->translate("You used an [_1] tag without a date context set up.", "MT$tag"))
unless defined $ts;
- ts2fiscal($ts);
+ ts2fiscal($ts) + 1;
@ogawa
ogawa / jubatus.rb
Last active December 13, 2015 17:48
require 'formula'
class ZooKeeperLib < Requirement
def initialize
@zk = Formula.factory('zookeeper')
end
def fatal?
true
end
-- Eject and Sleep
-- ejectableなディスクをアンマウントしてスリープ
-- アンマウント状態で実行するとマウント
set diskNames to {"HD-PATU3", "Time Machine"}
tell application "Finder"
set disksToEject to {}
repeat with diskName in diskNames
if disk diskName exists then
set aDisk to (disk diskName)
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import csv
from icalendar import Calendar, Event
from datetime import datetime
ical = Calendar()
ical.add('version', '2.0')