Skip to content

Instantly share code, notes, and snippets.

View mojaie's full-sized avatar
🐻
almost hibernated

Seiji Matsuoka mojaie

🐻
almost hibernated
View GitHub Profile
@mojaie
mojaie / .block
Last active April 8, 2018 14:15
Chemical structure similarity network (DrugBank5.0.5 FDA Approved)
license: mit
height: 600
@mojaie
mojaie / .block
Last active April 8, 2018 14:14
Drug dataset table (DrugBank5.0.5 FDA Approved)
license: mit
height: 650
@mojaie
mojaie / .block
Last active August 26, 2017 08:19
Drug dataset table
license: mit
height: 650
@mojaie
mojaie / .block
Last active August 25, 2017 06:39
Chemical structure similarity network 1
license: mit
@mojaie
mojaie / .block
Last active August 25, 2017 05:57
d3-force as a physics engine
license: mit
@mojaie
mojaie / gist:6396973
Created August 31, 2013 08:44
Example of xlsxwriter
# coding: UTF-8
from xlsxwriter.workbook import Workbook
data = [[1, 2, 3], [4, 5, 6], ["hoge", "fuga", "piyo"]]
workbook = Workbook("./test.xlsx")
worksheet = workbook.add_worksheet("sheet1")
format_ = workbook.add_format({"align": "center", "valign": "vcenter"})
@mojaie
mojaie / gist:6339057
Created August 26, 2013 08:04
Sample of Py4J Python script
import atexit
import platform
import subprocess
import time
from py4j.java_gateway import JavaGateway
class JavaConnection(object):
JAR_PATH = "./jar/testentrypoint.jar"
@mojaie
mojaie / gist:6339046
Created August 26, 2013 08:03
Sample of Py4J GatawayServer jarfile
import py4j.GatewayServer;
public class TestEntryPoint {
public String getString() {
return "hogehoge";
}
public static void main(String[] args) {
GatewayServer gatewayServer = new GatewayServer(new TestEntryPoint());
@mojaie
mojaie / gist:6265871
Created August 19, 2013 04:56
Example of rdkit molecule property
# coding: UTF-8
from rdkit import Chem
from rdkit.Chem import rdMolDescriptors
mol = Chem.MolFromSmiles('CCC(CC)O[C@@H]1C=C(C[C@@H]([C@H]1NC(=O)C)[NH3+])C(=O)OCC')
print "組成式:"
print rdMolDescriptors.CalcMolFormula(mol)
print "分子量(モル質量):"
@mojaie
mojaie / gist:6257249
Last active August 7, 2022 09:22
Example of PySide QTableWidget
# coding: UTF-8
import sys
from PySide import QtGui, QtCore
u""" サンプルデータ """
title = ["hoge", "fuga", "piyo"]
data = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]