Created
June 27, 2017 01:04
-
-
Save ahmaurya/ce692e723de6db88eac37f2f46ac5941 to your computer and use it in GitHub Desktop.
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
# set up logging | |
logging.basicConfig(level=logging.INFO, | |
format='%(asctime)s %(name)s %(levelname)s %(message)s', | |
datefmt='%Y-%m-%d %H:%M:%S', | |
filename='log.txt', | |
filemode='w') | |
self.logger = logging.getLogger('LogDisplayName') | |
# setting timezone for correct reading of string datetimestamps | |
os.environ['TZ'] = 'GMT' | |
time.tzset() | |
# for correctly printing numpy arrays, not useful anywhere anymore | |
np.set_printoptions(threshold=np.inf) | |
np.seterr(divide='ignore', invalid='ignore') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment