Skip to content

Instantly share code, notes, and snippets.

View joc32's full-sized avatar
🌴
On vacation

Jozef Cibicek joc32

🌴
On vacation
View GitHub Profile
!pip install stellargraph
import stellargraph as sg
from stellargraph.data import EdgeSplitter
G = nx.read_gpickle('usair.gpickle')
edge_splitter_test = EdgeSplitter(G)
G_test, edge_ids_test, edge_labels_test = edge_splitter_test.train_test_split(
p=0.1, method="global", keep_connected=True)
import random
import time
chars = []
for i in range(32, 127):
chars.append(chr(i))
def randomString():
"""Generate a random string of fixed length """
return ''.join(random.choice(chars) for i in range(28))