woche12 > master: code py - thirdparty imports für mathe+plots
This commit is contained in:
parent
a7c7179edb
commit
1e934dc3ef
4
code/python/src/thirdparty/maths.py
vendored
4
code/python/src/thirdparty/maths.py
vendored
@ -8,6 +8,8 @@
|
|||||||
from fractions import Fraction;
|
from fractions import Fraction;
|
||||||
import math;
|
import math;
|
||||||
import numpy as np;
|
import numpy as np;
|
||||||
|
from numpy.random import binomial as random_binomial;
|
||||||
|
random_binary = lambda p: (random_binomial(1, p) == 1);
|
||||||
import pandas as pd;
|
import pandas as pd;
|
||||||
import random;
|
import random;
|
||||||
from random import uniform;
|
from random import uniform;
|
||||||
@ -22,6 +24,8 @@ __all__ = [
|
|||||||
'Fraction',
|
'Fraction',
|
||||||
'math',
|
'math',
|
||||||
'np',
|
'np',
|
||||||
|
'random_binomial',
|
||||||
|
'random_binary',
|
||||||
'pd',
|
'pd',
|
||||||
'random',
|
'random',
|
||||||
'uniform',
|
'uniform',
|
||||||
|
22
code/python/src/thirdparty/plots.py
vendored
Normal file
22
code/python/src/thirdparty/plots.py
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
# IMPORTS
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
from matplotlib import pyplot as mplt;
|
||||||
|
from matplotlib import animation as mplt_animation;
|
||||||
|
from matplotlib import colors as mplt_colours;
|
||||||
|
from matplotlib import patches as mplt_patches;
|
||||||
|
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
# EXPORTS
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
'mplt',
|
||||||
|
'mplt_colours',
|
||||||
|
'mplt_patches',
|
||||||
|
'mplt_animation',
|
||||||
|
];
|
Loading…
Reference in New Issue
Block a user