Skip to content

Instantly share code, notes, and snippets.

@mzsima
mzsima / readme.md
Last active May 25, 2020 14:59
環状木

image

snapshot

code jupyter notebook

import matplotlib.pyplot as plt
import networkx as nx

try:
 import pygraphviz
@mzsima
mzsima / readme.md
Created May 24, 2020 15:19
[networkX]グリッドeven/odd

image

snapshot

code jupyter notebook

import matplotlib.pyplot as plt
import networkx as nx

G = nx.grid_2d_graph(5, 5) 
pos = nx.spring_layout(G, k=0.3)
@mzsima
mzsima / readme.md
Created May 23, 2020 15:15
5x5 grid

image

snapshot

code jupyter notebook

import matplotlib.pyplot as plt
import networkx as nx

G = nx.grid_2d_graph(5, 5) 
nx.draw(G)
@mzsima
mzsima / readme.md
Last active May 22, 2020 14:01
[networkX] ただの三角

image

snapshot

code jupyter notebook

%matplotlib inline
import matplotlib.pyplot as plt
import networkx as nx
G = nx.Graph()
@mzsima
mzsima / readme.md
Last active May 21, 2020 15:01
CO2

image

snapshot

code gremlin

schema.vertexLabel("Atom").ifNotExists().partitionBy("id", Text).property("name", Text).create();
schema.edgeLabel('bond').ifNotExists().from('Atom').to('Atom').create()
  
  
O1 = g.addV("Atom").property("id", "O1").property("name", "O").next();
@mzsima
mzsima / readme.md
Last active May 20, 2020 16:47
Cのコードはドミソ

image

snapshot

code gremlin

schema.vertexLabel("Key").ifNotExists().partitionBy("name", Text).create();
schema.vertexLabel("Code").ifNotExists().partitionBy("name", Text).create();
schema.edgeLabel('hit').ifNotExists().from('Code').to('Key').create()
  
 
@mzsima
mzsima / readme.md
Created May 19, 2020 14:40
太郎がパーで二郎がグー

image

snapshot

code gremlin

schema.vertexLabel("People").
       ifNotExists().
       partitionBy("name", Text).
       create();
       
@mzsima
mzsima / readme.md
Created May 18, 2020 14:47
働くという漢字のつくり

image

snapshot

code gremlin

schema.vertexLabel("Kanji").
       ifNotExists().
       partitionBy("name", Text).
 create();
@mzsima
mzsima / readme.md
Last active May 15, 2020 13:19
ピッチャーが投げて、キャッチャーが捕る

image

snapshot

gremlin code

schema.vertexLabel("Player").
       ifNotExists().
       partitionBy("name", Text).
       property("position", Text).
 create();
@mzsima
mzsima / readme.md
Created May 14, 2020 14:44
太郎は京都にでかける

image

snapshot

gremlin code

schema.vertexLabel("Customer").
       ifNotExists().
       partitionBy("name", Text).
       create();