Skip to content

Instantly share code, notes, and snippets.

@jarrodmillman
jarrodmillman / test.yml
Last active January 17, 2021 05:26
GitHub Actions steps for installing Graphviz using Powershell on Windows 10
<. . .>
- name: Download graphviz source
run: |
Invoke-WebRequest `
-Uri "https://gitlab.com/graphviz/graphviz/-/package_files/6105690/download" `
-OutFile "C:\Temp\graphviz-install-2.44.2_dev.20210115.1523-win64.exe"
- name: Install exe
run: |
import time
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import networkx as nx
def time_strongly_connected_components(count):
dg = nx.DiGraph()
import networkx as nx
import matplotlib.pyplot as plt
G = nx.Graph()
G.add_edge(1, 2)
G.add_edge(1, 3)
G.add_edge(1, 5)
G.add_edge(2, 3)
G.add_edge(3, 4)
G.add_edge(4, 5)
@jarrodmillman
jarrodmillman / canonical_url.py
Last active November 7, 2019 08:30
Add canonical url to html documentation for old networkx releases
import os
import requests
base = (
' <link rel="canonical" href="https://networkx.github.io/documentation/stable/'
)
url_base = "https://networkx.github.io/documentation/stable/"
versions = [
"networkx-1.9",
@jarrodmillman
jarrodmillman / tidy-Rdm-permuter.py
Created June 4, 2015 02:02
Python 3 script to tidy format for vignettes in https://github.com/statlab/permuter
# Python 3 script to tidy format for vignettes in
# https://github.com/statlab/permuter
from fileinput import FileInput
import subprocess
from rpy2.robjects import r as R
files = ('autofluorescence.Rmd',
'botulinum.Rmd',