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 collections import Counter | |
from collections import defaultdict | |
from itertools import accumulate | |
from itertools import product | |
from math import erfc | |
from math import floor | |
from math import log | |
from math import log2 | |
from math import sqrt | |
from typing import Iterator |
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
"""Store functionality for the CLI | |
Notes | |
----- | |
A store is an abstraction for a folder in the user's local data directory | |
which pertains to a specific dataset that comprises of RNG output. The store can | |
subsequently store test results and report markup for said results. | |
""" | |
import pickle | |
import shelve |
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 copy import copy | |
def berlekamp_massey(sequence: List[int]) -> int: | |
n = len(sequence) | |
error_locator = [0 for _ in range(n)] | |
error_locator[0] = 1 | |
error_locator_prev = copy(error_locator) |
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
1 | |
0 | |
1 | |
0 | |
1 | |
0 | |
1 | |
1 | |
1 | |
0 |
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
\title{Representing Scotland Yard with data structures, and using Computational Thinking to determine Mr X's location} | |
\author{Matthew Barber\\ | |
160056525} | |
\date{\today} | |
\documentclass{article} | |
\usepackage{tikz} | |
\usepackage{graphicx} | |
\usepackage{calc} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
(setq org-latex-listings 'minted | |
org-latex-packages-alist '(("" "minted")) | |
org-latex-pdf-process | |
'("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f" | |
"pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f")) |
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 pandas as pd | |
from rngtest.profiling import profile, multi_profile | |
def get_columns(df): | |
for col in df: | |
yield df[col] | |
@profile |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#!/usr/bin/env python2 | |
from collections import defaultdict | |
import Queue | |
DIRECTIONS = [(-1, 0), (0, 1), (1, 0), (0, -1)] | |
FREE, WALL = 0, 1 | |
class OutOfMapBoundaryError(Exception): | |
pass |