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 dataclasses import dataclass | |
from pprint import pprint | |
from typing import List | |
import networkx as nx | |
import pandas as pd | |
import plac | |
import pywikibot | |
import requests | |
from pyvis.network import Network |
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 unittest | |
from typing import Tuple, Set, Callable | |
Location = Tuple[int, int] | |
Universe = Set[Location] | |
def tick(old_universe: Universe) -> Universe: | |
new_universe = apply_rules(old_universe) | |
return { |
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 unittest | |
class Universe: | |
def __init__(self, livingCells): | |
self.livingCells = livingCells | |
def tick(self): | |
stayed_alive = { |
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 unittest | |
class Universe: | |
def __init__(self, livingCells): | |
self.livingCells = livingCells | |
def tick(self): | |
self.livingCells = { |