iam-git / WellMet (public) (License: MIT) (since 2021-08-31) (hash sha1)
WellMet is pure Python framework for spatial structural reliability analysis. Or, more specifically, for "failure probability estimation and detection of failure surfaces by adaptive sequential decomposition of the design domain".
List of commits:
Subject Hash Author Date (UTC)
candybox: reworked 07551958091f48d8f7eb62d27468c2abad030a33 Олёш 2020-08-01 17:24:33
IS_stat: defaultdict replaced by the own one, ISSI.add_single_event_data method added 131e8c23d8f164ae92b838451fc9976a888bffeb Олёш 2020-08-01 00:46:53
IS_stat: IS_like() and ISSI.delete_event_data() methods added a9b4514c9a802797bc15f518b3aeef61f4e3f24e Олёш 2020-07-31 19:58:21
blackbox: MinEnergyCensoredSampling at very begining a924d5d2991f624932d2f0165078e930bda65c58 Олёш 2020-07-31 01:04:09
estimation: --dtto-- 3816060e9da61b99593b7887ec66d6b0a8b239b9 Олёш 2020-07-28 11:27:22
estimation: nejde cell sampling pořadně zlepšit 824d5a2cf7bd10c0fec4b152549d61873cb897dc Олёш 2020-07-28 08:50:45
estimation: playing with cell sampling 78a8dc9a52993876b8a7991590590990efd98812 Олёш 2020-07-28 01:52:35
qt_plot: draw failure boundary by 1000 points d8737247d6cbdb52cc1b1a3d0935edd60234b515 Олёш 2020-07-27 10:38:57
estimation: Voronoi_2_point estimation node_pf_coloring fixed 35fc3d622fe9d5cfa519f1484862108b4003688b Олёш 2020-07-27 10:35:06
candybox: pandas index mess fix, __getattr__ will return numpyed array 10e7c39a69bd105780924319bbafb58602251a9d Олёш 2020-07-27 10:31:43
qt_plot: SimplexEstimationWidget: nodes size increased, VoronoiGraph: redraw item added 8176d66545bfcfa6ee4ea64cbdf3ffd9bbf5ca11 Олёш 2020-07-24 07:01:13
qt_plot: grafy aspoň něco kreslí c2c628d6edf48eb607e44902fa14022c97832cb1 Олёш 2020-07-22 14:40:30
qt_plot: с тех виӝетů на пока хватит 55ee0ccf1d72d6515a66b673c809b9548a2b1ecb Олёш 2020-07-22 09:01:26
qt_plot: WIP 65694b44be8b8f1da9d5c385d37964e65c3824e7 Олёш 2020-07-22 07:21:30
qt_plot: WIP 185d6b48000c43da723ea27055fa5d9540ae2a2a Олёш 2020-07-21 21:45:00
qt_plot: WIP 72bd348eeb85a1ee52d38978a37369e412e959f5 Олёш 2020-07-21 13:24:26
qt_plot: WIP 52ef45375a5851c74111b33223eab093c1e563c2 Олёш 2020-07-20 15:10:06
estimation: simplex_estimation fix. Less wrong) 6fe77618a0654cf107f48f6441738670355dc0a7 Олёш 2020-07-20 06:25:41
qt_plot: WIP ebbad200e0692e667b828a4c2bcc70229fa797e6 Олёш 2020-07-19 11:20:05
estimation: fixes on simplex_estimation, but it still lies. 8877269530c69b57fd24ed67a4b76a350ebf5da1 Олёш 2020-07-19 11:18:39
Commit 07551958091f48d8f7eb62d27468c2abad030a33 - candybox: reworked
Author: Олёш
Author date (UTC): 2020-08-01 17:24
Committer name: Олёш
Committer date (UTC): 2020-08-01 17:24
Parent(s): 131e8c23d8f164ae92b838451fc9976a888bffeb
Signer:
Signing key:
Signing status: N
Tree: cf7d5e2bf0faaff3c61677c282a44d8ae148967d
File Lines added Lines deleted
candybox.py 61 7
File candybox.py changed (mode: 100644) (index fa8f8fa..5da968a)
... ... try:
20 20 except ImportError: except ImportError:
21 21 print("CandyBox: error of import Pandas. CandyBox will work in Pandas-free mode") print("CandyBox: error of import Pandas. CandyBox will work in Pandas-free mode")
22 22
23
23 import numpy as np
24 24
25 25 class CandyBox: class CandyBox:
26 26
 
... ... class CandyBox:
43 43
44 44 try: try:
45 45 cb.df = pd.DataFrame(kwargs) cb.df = pd.DataFrame(kwargs)
46 # chcem jednoduché numpy-like chovaní
47 cb.df.reset_index(inplace=True)
46 48 except NameError: # if there is no "pandas as pd" except NameError: # if there is no "pandas as pd"
47 49 cb.kwargs = kwargs cb.kwargs = kwargs
48 50 if cb.consistency_check(): if cb.consistency_check():
 
... ... class CandyBox:
77 79 def __call__(cb, *args, **kwargs): def __call__(cb, *args, **kwargs):
78 80 # Houston, we've got a problem... # Houston, we've got a problem...
79 81 # call meaning is different for underlaying f_models and upper Boxes # call meaning is different for underlaying f_models and upper Boxes
80 # but SampleBox will call in asssumption of f_model under
82 # but SampleBox expect f_model under
81 83 return cb.sampling_plan(*args, **kwargs) return cb.sampling_plan(*args, **kwargs)
82 84
83 85
 
... ... class CandyBox:
91 93 # pravděpodobně když se nám vrátí serie, tak bude interpretována jako sloup # pravděpodobně když se nám vrátí serie, tak bude interpretována jako sloup
92 94 # fakt mi nic spolehlivějšího nenapadá # fakt mi nic spolehlivějšího nenapadá
93 95 df = pd.DataFrame(df).T df = pd.DataFrame(df).T
96
97 # chcem jednoduché numpy-like chovaní
98 df.reset_index(inplace=True)
94 99 return CandyBox(cb.sampling_plan[slice], df=df) return CandyBox(cb.sampling_plan[slice], df=df)
95 100 # if not # if not
96 101 else: else:
 
... ... class CandyBox:
100 105 sliced_dict[key] = cb.kwargs[key][slice] sliced_dict[key] = cb.kwargs[key][slice]
101 106 return CandyBox(cb.sampling_plan[slice], **sliced_dict) return CandyBox(cb.sampling_plan[slice], **sliced_dict)
102 107
108 def __setattr__(cb, key, value):
109 # to je vše co má samotný CandyBox
110 # žádný další majetek u něho nepozoruji
111 if key in ('sampling_plan', 'df', 'kwargs'):
112 cb.__dict__[key] = value
113 elif len(cb) == len(value):
114 # if pandas
115 if 'df' in cb.__dict__:
116 # df je na svědomi pandas
117 cb.df[key] = value
118 # if not
119 else:
120 cb.kwargs[key] = value
121 else:
122 raise ValueError("Sample and given values hasn't the same length. Zkrátka, do sebe nepatří")
103 123
104 124
105 125 def __getattr__(cb, attr): def __getattr__(cb, attr):
 
... ... class CandyBox:
124 144 # zkusím převést na numpy, protože # zkusím převést na numpy, protože
125 145 # Pandasovy indexy jen zlobí # Pandasovy indexy jen zlobí
126 146 # a stejně nikdo je nepouživá a na ně nespolehá # a stejně nikdo je nepouživá a na ně nespolehá
147 # další kód by neměl furt řešit, co ta bombonjera má uvnitř
148 # i když je to škoda, že nepujde měnit jednotlivé hodnoty
127 149 return cb.df[attr].to_numpy() return cb.df[attr].to_numpy()
150
151 # zkusím nepřevadět na numpy, protože chcu mäť možnost hodnoty měnit
152 # pri slajsech resetuju indexy, takže musí to být v pohodě
153 # doufám, že tím нищего не поломаju
154 # šecko se tím zkazilo a je taky otázkou
155 # zda je to vhodně když se furt robej slajsy
156 # nechám to na uživatelském kódu
157 #return cb.df[attr]
128 158 else: # implicitně pandas hodí KeyError, kterej nechcem else: # implicitně pandas hodí KeyError, kterej nechcem
129 159 raise AttributeError raise AttributeError
130 160
 
... ... class CandyBox:
175 205 # zjednodušený join # zjednodušený join
176 206 sample_len = len(cb.sampling_plan) sample_len = len(cb.sampling_plan)
177 207 for key in cb.kwargs: for key in cb.kwargs:
208 # ani nebudu kontrolovat
209 #if isinstance(key, np.ndarray):
210
178 211 if key in input.kwargs: if key in input.kwargs:
179 cb.kwargs[key] = (*cb.kwargs[key], *input.kwargs[key])
212 cb.kwargs[key] = np.append(cb.kwargs[key], input.kwargs[key])
180 213 else: else:
181 214 fill_len = sample_len - len(cb.kwargs[key]) fill_len = sample_len - len(cb.kwargs[key])
182 215 full = (None for __ in range(fill_len)) full = (None for __ in range(fill_len))
183 cb.kwargs[key] = (*cb.kwargs[key], *full)
216 cb.kwargs[key] = np.append(cb.kwargs[key], (*full,))
184 217
185 218
186 219 else: # nesladký vstup else: # nesladký vstup
 
... ... class CandyBox:
195 228 for key in cb.kwargs: for key in cb.kwargs:
196 229 fill_len = sample_len - len(cb.kwargs[key]) fill_len = sample_len - len(cb.kwargs[key])
197 230 full = (None for __ in range(fill_len)) full = (None for __ in range(fill_len))
198 cb.kwargs[key] = (*cb.kwargs[key], *full)
231 cb.kwargs[key] = np.append(cb.kwargs[key], (*full,))
199 232
200 233
201 # we'll see, if .new_sample will be needed
202 #def new_sample(cb, input): pass
234 # we'll see, if .new_sample will be needed
235 # year, we need it
236 # мыным выль сэмпл кулэ!
237 def new_sample(cb, input):
238 # čo to je za vstup?
239 if hasattr(input, 'sampling_plan'): #sweety_input:
240 # if pandas
241 if hasattr(input, 'df'):
242 return CandyBox(cb.sampling_plan.new_sample(input.sampling_plan), df=input.df)
243
244 # if there is no pandas DataFrame
245 # we suppose there is dictionary in input.kwargs
246 else:
247 return CandyBox(cb.sampling_plan.new_sample(input.sampling_plan), **input.kwargs)
248
249 # nesladký vstup
250 else:
251 return cb.sampling_plan.new_sample(input)
252
253
254
255
256
203 257
204 258 def consistency_check(cb): def consistency_check(cb):
205 259 # řvat na celé město nebudeme # řvat na celé město nebudeme
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/iam-git/WellMet

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/iam-git/WellMet

Clone this repository using git:
git clone git://git.rocketgit.com/user/iam-git/WellMet

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main