Last active
December 20, 2019 19:10
-
-
Save juliensimon/bf403673ab3c4a691f86cb1f0ac70cad to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
edge_list = [] | |
for e in g.E().toList(): | |
edge_list.append((e.inV.id, e.outV.id)) | |
print(edge_list) | |
[('0', '8'), ('1', '17'), ('24', '31'), ('13', '33'), ('0', '1'), ('2', '8'), ('0', '19'), | |
('25', '31'), ('14', '33'), ('0', '2'), ('2', '9'), ('1', '19'), ('28', '31'), ('15', '33'), | |
('1', '2'), ('0', '10'), ('0', '21'), ('2', '32'), ('18', '33'), ('0', '3'), ('4', '10'), | |
('1', '21'), ('8', '32'), ('19', '33'), ('1', '3'), ('5', '10'), ('23', '25'), ('14', '32'), | |
('20', '33'), ('2', '3'), ('0', '11'), ('24', '25'), ('15', '32'), ('22', '33'), ('0', '4'), | |
('0', '12'), ('2', '27'), ('18', '32'), ('23', '33'), ('0', '5'), ('3', '12'), ('23', '27'), | |
('20', '32'), ('26', '33'), ('0', '6'), ('0', '13'), ('24', '27'), ('22', '32'), ('27', '33'), | |
('4', '6'), ('1', '13'), ('2', '28'), ('23', '32'), ('28', '33'), ('5', '6'), ('2', '13'), | |
('23', '29'), ('29', '32'), ('29', '33'), ('0', '7'), ('3', '13'), ('26', '29'), ('30', '32'), | |
('30', '33'), ('1', '7'), ('5', '16'), ('1', '30'), ('31', '32'), ('31', '33'), ('2', '7'), | |
('6', '16'), ('8', '30'), ('8', '33'), ('32', '33'), ('3', '7'), ('0', '17'), ('0', '31'), | |
('9', '33')] | |
import pickle | |
with open('edge_list.pickle', 'wb') as f: | |
pickle.dump(edge_list, f) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment