This file contains 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
"""Example of adaptive Lasso to produce event sparser solutions | |
Adaptive lasso consists in computing many Lasso with feature | |
reweighting. It's also known as iterated L1. | |
""" | |
# Authors: Alexandre Gramfort <firstname.lastname@inria.fr> | |
# | |
# License: BSD (3-clause) | |
import numpy as np |
This file contains 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
# Note that this script attempts to delete directories (Folders) called 'temp' and 'dateutil' | |
# within Pythonista as part of installation. It will also overwrite files in directories | |
# named 'github' and 'githubista'. If you are using Pythonista 1.3 or above please check | |
# that you have not created any Folders with these names before running this script as | |
# any files inside them will be irretrievably lost. | |
import os | |
import urllib2 | |
import tarfile | |
import shutil | |
import traceback |
This file contains 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
def draw_graph3(networkx_graph,notebook=True,output_filename='graph.html',show_buttons=True,only_physics_buttons=False): | |
""" | |
This function accepts a networkx graph object, | |
converts it to a pyvis network object preserving its node and edge attributes, | |
and both returns and saves a dynamic network visualization. | |
Valid node attributes include: | |
"size", "value", "title", "x", "y", "label", "color". | |
(For more info: https://pyvis.readthedocs.io/en/latest/documentation.html#pyvis.network.Network.add_node) |