Skip to content

Instantly share code, notes, and snippets.

View kozo2's full-sized avatar

Kozo Nishida kozo2

View GitHub Profile
import dash
import dash_cytoscape
import dash_html_components as html
import json
# Load Data
with open('eco01100.json', 'r') as f:
elements = json.loads(f.read())
#print(elements)

foo

hoge

bar

@kozo2
kozo2 / Dockerfile
Created January 5, 2019 07:37
Dockerfile for cy jupyter
RUN apt install -y python3-pip
RUN python3 -m pip install -U pip
RUN python3 -m pip install jupyter
# docker exec -it cy sh -c 'jupyter-notebook --ip 0.0.0.0 --no-browser'
@kozo2
kozo2 / Dockerfile
Created January 5, 2019 06:19
Dockerfile for cytoscape
RUN echo 'deb https://cloud.r-project.org/bin/linux/ubuntu xenial-cran35/' >> /etc/apt/sources.list
RUN apt-get install -y apt-transport-https
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
RUN apt-get update
RUN apt-get install -y r-base psmisc
RUN wget https://download2.rstudio.org/rstudio-server-1.1.463-amd64.deb
RUN dpkg -i rstudio-server-1.1.463-amd64.deb
RUN rstudio-server verify-installation
ms4gage = NULL
for (i in mset_SMPDB_format_KEGG){
pathname = i[[2]]
x = list(i[[3]])
names(x) = pathname
ms4gage = append(ms4gage, x)
}
@kozo2
kozo2 / app.py
Created December 15, 2018 17:17
import dash
import dash_html_components as html
import dash_core_components as dcc
import plotly.graph_objs as go
import pandas
rrna_operons = ("rrsA-ileT-alaT-rrlA-rrfA", "rrsB-gltT-rrlB-rrfB", "rrsC-gltU-rrlC-rrfC", "rrsD-ileU-alaU-rrlD-rrfD-thrV-rrfF", "rrsE-gltV-rrlE-rrfE", "rrsG-gltW-rrlG-rrfG", "rrsH-ileV-alaV-rrlH-rrfH")
colors = ['rgb(67,67,67)', 'rgb(115,115,115)', 'rgb(49,130,189)', 'rgb(189,189,189)', 'rgb(67,67,67)', 'rgb(115,115,115)', 'rgb(49,130,189)']
df = pandas.read_parquet('2018-11-26-0-04_pa.parquet', engine='pyarrow')
@kozo2
kozo2 / append.R
Created December 13, 2018 16:34
list appending Gist for MSEAp
> hoge = NULL
> a=list(1,2)
> hoge=append(hoge, list(a))
> b=list(2,3)
> hoge=append(hoge, list(b))
> hoge
[[1]]
[[1]][[1]]
[1] 1
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kozo2
kozo2 / brewnote.yml
Created December 12, 2018 02:48
ecell4-wheels note
- git clone --single-branch --depth 1 git://github.com/ecell/ecell4
- cp /usr/local/opt/hdf5\@1.8/include/* /usr/local/include/
- cp /usr/local/opt/hdf5\@1.8/lib/* /usr/local/lib/
@kozo2
kozo2 / Dockerfile
Created December 10, 2018 07:46
Dockerfile for IRuby
FROM ruby
USER root
RUN apt-get update && apt-get install -y make libtool libffi-dev libzmq3-dev libczmq-dev python3 wget && \
wget https://bootstrap.pypa.io/get-pip.py && python3 get-pip.py && \
python3 -m pip install notebook && \
gem install cztop && gem install iruby && iruby register --force
# and run