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
grep -o -E '^\+.*(\) ->|[^\W0-9\)]\w*:) [^\W0-9]\w*' <DIFF FILE> | wc -l |
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
from typing import List, Mapping, Union | |
JNumber = Union[int, float] | |
JSON = Union[JNumber, str, bool, None, Mapping[str, 'JSON'], List['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
import argparse | |
import csv | |
from random import shuffle | |
parser = argparse.ArgumentParser(description='Randomly splits a CSV\'s rows into two sets') | |
parser.add_argument('input_path', help='input path of CSV to be split') | |
parser.add_argument('portion', type=float, help='portion of CSV for the first output') | |
args = parser.parse_args() |
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
from mpi4py import MPI | |
comm = MPI.COMM_WORLD # All our nodes in this cluster | |
rank = comm.Get_rank() # Our node's "ID" | |
if rank == 0: # If we're the root/base node, we'll be the one distributing the data | |
data = [1,2,3,4,5] | |
else: | |
data = [] |
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
Socket { | |
nsp: | |
Namespace { | |
name: '/', | |
server: | |
Server { | |
nsps: { '/': [Circular] }, | |
_path: '/socket.io', | |
_serveClient: true, | |
_adapter: [Function: Adapter], |