Skip to content

Instantly share code, notes, and snippets.

View kozo2's full-sized avatar

Kozo Nishida kozo2

View GitHub Profile
@heronshoes
heronshoes / rdatasets-datasets.md
Last active December 4, 2022 16:31
Dataset preview of package 'datasets' of 'Rdatasets' in red-datasets

Package 'datasets'

[1/84] ability.cov

Ability and Intelligence Tests

  • name: Rdatasets: datasets: ability.cov
  • licenses: GPL-3
RedAmber::DataFrame : 6 x 8 Vectors
Vectors : 8 numeric
@egonw
egonw / smi_inchikeys.groovy
Created September 4, 2021 10:54
Convert a file with SMILES to InChIKeys
@Grab(group='org.openscience.cdk', module='cdk-bundle', version='2.5')
// Copyright (C) 2021 Egon Willighagen <0000-0001-7542-0286@orcid.org>
//
// MIT license
//
// If you use this script, please cite the CDK 2.0 article:
// https://jcheminf.biomedcentral.com/articles/10.1186/s13321-017-0220-4
import org.openscience.cdk.interfaces.*;
@cannin
cannin / causalpath_total_protein_example_large_nodes.format
Last active January 16, 2024 06:37
Description of CausalPath .format files
# COLUMNS: For entries "all-nodes and color": obj_type all-nodes obj_subtype color
# COLUMNS: For entries "all-nodes and bordercolor": obj_type all-nodes obj_subtype color
# COLUMNS: For entries "node and color": obj_type node_label obj_subtype color
# COLUMNS: For entries "node and rppasite": obj_type node_label obj_subtype subtype_info|subtype_label|subtype_bkgrd_color|subtype_border_color
# COLUMNS: For entries "node and tooltip": obj_type node_label obj_subtype tooltip_information_onmousehover
# NOTE: "subtype_info" is also tooltip information for onmousehover for individual rppasite
node all-nodes color 255 255 255
node all-nodes bordercolor 50 50 50
node FOXA1 color 40 80 255
node FOXA1 tooltip FOXA1, -24.349700502698532
@kokitsuyuzaki
kokitsuyuzaki / conda_docker.md
Created December 1, 2020 01:20
Anacondaか、Dockerか

この記事はWorkflow Advent Calendar 2020の二日目の記事です。

自分は最近Snakemakeでワークフローを書いている。それまではシェルスクリプト → make → Rakeという風に、色々なやり方でワークフローを書いてきてたが、環境構築・再現性や分散処理の対応がしやすいSnakemakeに現在のところは落ち着いている。Snakemakeでコードの再現性に関わる技術はAnacondaとDocker(Singularity)である。ここでは、両方の技術は一長一短であり、両技術共に痒いところに手が届かない状況があるという話しをする。なお、自分はデータ解析を生業としており、データを前処理、解析、可視化しては、使うパッケージを適宜加えたり、減らしたりする探索的データ解析(EDA)の過程でSnakemakeを使っているため、事前に処理が決まっていて、あとはワークフロー化するだけの人とは状況がかなり違っている可能性があるので注意されたし。

Anacondaのメリット

Snakemake内でのAnacondaの使い方は簡単で、Snakemakeを実行する上で必要なSnakefileの中で、実行するruleにcondaタグを追加する。condaタグの中では、conda環境を構築する上で必要な共有ライブラリやらR,Pythonのパッケージやらを記述する。 https://snakemake.readthedocs.io/en/stable/snakefiles/deployment.html#integrated-package-management

あとは、snakemakeコマンドを実行する際に、--use-condaオプションを加えるだけで良い。

#CODE
#Generate root password
import random, string
password = ''.join(random.choice(string.ascii_letters + string.digits) for i in range(20))
#Download ngrok
! wget -q -c -nc https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
! unzip -qq -n ngrok-stable-linux-amd64.zip
#Setup sshd
@ahmedengu
ahmedengu / colab_xface_vnc.ipynb
Last active October 8, 2022 16:53
Use google colab as a remote machine with the help of ngrok, vnc server and xface desktop you can change the configurations and desktop environment as you please it's just a start
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mtei
mtei / helix_keyboard_build_tool_memo.md
Last active August 24, 2023 08:19
キーボード自作、特に Helix キーボードキットの製作に最低必要な工具のメモ
@tatsuya6502
tatsuya6502 / rust-cross-sparc64-linux-different-ld-versions.log
Last active July 14, 2017 01:10
Rust cross compile - Linux x86_64 -> Linux Sparc64 (gcc 5.4.0)
/home/tatsuya% docker run -it ubuntu:trusty
root@1ce8acf4991d:/# cd
root@1ce8acf4991d:~# uname -a
Linux 1ce8acf4991d 4.11.9-1-ARCH #1 SMP PREEMPT Wed Jul 5 18:23:08 CEST 2017 x86_64 x86_64 x86_64 GNU/Linux
root@1ce8acf4991d:~# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.5 LTS"
@ytbilly3636
ytbilly3636 / chainer-som.py
Created May 17, 2017 07:27
ChainerでSOM?
# -*- coding: utf-8 -*-
import cv2
import numpy as np
import chainer
import chainer.links as L
from chainer import Chain, Variable
from chainer import datasets
class SOM(Chain):
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.