-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pythonrc
More file actions
37 lines (33 loc) · 700 Bytes
/
.pythonrc
File metadata and controls
37 lines (33 loc) · 700 Bytes
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
# calc
from decimal import Decimal
from decimal import Decimal as D
from fractions import Fraction
from fractions import Fraction as F
from math import *
from builtins import pow # I prefer built-in pow to math.pow in REPL.
# utils
from itertools import *
from functools import partial, reduce
# calc
try:
import numpy as np
except ModuleNotFoundError:
pass
try:
import sympy as sp
except ModuleNotFoundError:
pass
try:
from pint import UnitRegistry
except ModuleNotFoundError:
pass
else:
ureg = UnitRegistry()
# style
try:
from rich import pretty, traceback
except ModuleNotFoundError:
pass
else:
pretty.install()
traceback.install(show_locals=False)