woche12 > master: code py - thirdparty imports für mathe+plots

This commit is contained in:
RD 2022-06-30 05:42:54 +02:00
parent a7c7179edb
commit 1e934dc3ef
2 changed files with 26 additions and 0 deletions

View File

@ -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
View 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',
];