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
"""Coding challenge: Serial numbers | Chris Brozdowski, January 28th 2023 | |
Goal: Create N serial numbers given N and a list of valid characters for each position | |
in the resulting serial. | |
Assumptions: | |
1. Each item in the list will be a string. | |
2. If a provided string is empty, there are no valid characters for this position. | |
Output should exclude this position. | |
3. If N exceeds the number of unique serials, only report unique serials. |
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 copy | |
import itertools | |
import operator | |
import os | |
import pickle | |
from collections import namedtuple | |
import matplotlib | |
import matplotlib.pyplot as plt | |
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
"""V1""" | |
from functools import reduce | |
from typing import List, Union | |
import numpy as np | |
import spikeinterface as si | |
from spikeinterface.core.job_tools import ChunkRecordingExecutor, ensure_n_jobs | |
from spyglass.common.common_interval import ( | |
_union_concat, |