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
""" | |
A PyYAML loader that annotates position in source code. | |
The loader is based on `SafeConstructor`, i.e., the behaviour of | |
`yaml.safe_load`, but in addition: | |
- Every dict/list/unicode is replaced with dict_node/list_node/unicode_node, | |
which subclasses dict/list/unicode to add the attributes `start_mark` | |
and `end_mark`. (See the yaml.error module for the `Mark` class.) |
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 pickle import Pickler, load | |
try: | |
from pickle import PickleBuffer | |
except ImportError: | |
PickleBuffer = None | |
import copyreg | |
import os | |
import numpy as np | |
import time |