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 count_ipynb_loc(ipynb_file): | |
with open(ipynb_file) as file: | |
content = json.load(file) | |
cells = content['cells'] | |
loc = sum(len(c['source']) for c in cells if c['cell_type'] == 'code') | |
return loc |
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
person_1000205 | person_1000322 | person_1000414 | person_1000701 | person_1000835 | person_1000866 | person_1001146 | person_1001525 | person_1001934 | person_1002609 | person_1002682 | person_1002751 | person_1002975 | person_1003224 | person_1003247 | person_1003259 | person_1003338 | person_1003473 | person_1003618 | person_1003801 | person_1003821 | person_1003840 | person_1003913 | person_1003966 | person_1004017 | person_1004395 | person_1004424 | person_1004689 | person_1004882 | person_1005592 | person_1005610 | person_1005920 | person_1005967 | person_1005970 | person_1006073 | person_1006166 | person_1006322 | person_1006497 | person_1006514 | person_1006692 | person_1006773 | person_1006805 | person_1010049 | person_1010050 | person_1010055 | person_1010056 | person_1010077 | person_1010103 | person_1010110 | person_1010111 | person_1010186 | person_1010211 | person_1010334 | person_1010465 | person_1010674 | person_1011530 | person_1012974 | person_1013003 | person_1013030 | person_1013478 | person_1013508 | person_1013984 | person_1014288 | person_1014443 | person_1014453 | person_1014468 | person_1014491 | person_1014545 | per |
---|
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
import argparse | |
import json | |
from tqdm.auto import tqdm | |
from agithub.GitHub import GitHub | |
def get_pulls(client, owner, repository): | |
pulls = [] | |
status, pulls = client.repos[owner][repository].pulls.get(state='all') | |
if status != 200: |
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
\documentclass{standalone} | |
\usepackage{amsmath,amssymb} | |
\usepackage{charter} | |
\usepackage[charter]{mathdesign} | |
%\font\nullfont=cmr10 | |
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
\documentclass{minimal} | |
\usepackage{tikz} | |
\usepackage{tikz-network} | |
\usetikzlibrary{calc, backgrounds, positioning} | |
\input{tikz-hypergraph} | |
\usepackage{xcolor} |
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
import argparse | |
import os | |
import requests | |
from urllib3.util.retry import Retry | |
from requests.adapters import HTTPAdapter | |
from tqdm import tqdm | |
from tqdm.utils import CallbackIOWrapper | |
HEADERS = {'Content-Type': 'application/json'} |
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
\documentclass{minimal} | |
\usepackage{tikz} | |
\usetikzlibrary{backgrounds, positioning} | |
\usepackage{xcolor} | |
\definecolor{ACMYellow}{RGB}{255, 214, 0} | |
\definecolor{ACMOrange}{RGB}{252, 146, 0} | |
\definecolor{ACMRed}{RGB}{253, 27, 20} |
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
import timeit | |
import random | |
import networkx as nx | |
# from https://networkx.org/documentation/stable/_modules/networkx/algorithms/components/connected.html#connected_components | |
def _plain_bfs(G, source): | |
"""A fast BFS node generator""" | |
G_adj = G.adj | |
seen = set() | |
nextlevel = {source} |
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
\begin{figure}[!htp] \centering | |
\begin{tikzpicture} | |
\def \radius {3cm} | |
\def \margin {10} % margin in angles, depends on the radius | |
\def \n {6} | |
\draw[color=white, name path=c] (0:\radius) arc (0:360:\radius); | |
\node[draw, rounded corners, fill=white, name path=realitynode] at ({360/\n * 2}:\radius) (reality) {Reality of interest}; |
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
import networkx as nx | |
def diffuse_information(G: nx.MultiGraph, seed: list, case='best_case'): | |
informed_nodes = {n: None for n in seed} | |
needs_update = True | |
while needs_update: | |
needs_update = False | |
for u, v, dt in G.edges(nbunch=informed_nodes, data='diffusion_time'): | |
if u in informed_nodes: |