-
Notifications
You must be signed in to change notification settings - Fork 6
/
.pythonrc
40 lines (29 loc) · 908 Bytes
/
.pythonrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#
# ~/.pythonrc
# Author: Dustin Tran <dustintran.com>
#
# Default modules.
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import edward as ed
import matplotlib.pyplot as plt
import numpy as np
import os
import six
import tensorflow as tf
from edward.models import *
# Add auto-completion and store history file of Python interpreter commands.
import atexit
import readline
import rlcompleter
history_path = os.path.expanduser("~/.pyhistory")
def save_history(history_path=history_path):
import readline
readline.write_history_file(history_path)
if os.path.exists(history_path):
readline.read_history_file(history_path)
atexit.register(save_history)
del atexit, readline, rlcompleter, save_history, history_path
# python -c 'import time; start=time.time(); import edward as ed; print(time.time() - start)'
# vim: filetype=python