Skip to content

Instantly share code, notes, and snippets.

View fmellomascarenhas's full-sized avatar

Felipe Mello fmellomascarenhas

  • Teva Pharmaceuticals
  • Philadelphia
View GitHub Profile
@fmellomascarenhas
fmellomascarenhas / BOOSTwithPython3
Created June 30, 2018 00:09 — forked from kenichi-shibata/BOOSTwithPython3
Compile BOOST with Python3 support
1. Check Python3 root
>>> import sys
>>> import os
>>> sys.executable
'/usr/local/bin/python3'
OR
$ which python3
/usr/local/bin/python3
@fmellomascarenhas
fmellomascarenhas / nx2gt.py
Created June 14, 2018 07:35 — forked from bbengfort/nx2gt.py
Convert a networkx to graph-tool graph
import networkx as nx
import graph_tool as gt
def get_prop_type(value, key=None):
"""
Performs typing and value conversion for the graph_tool PropertyMap class.
If a key is provided, it also ensures the key is in a format that can be