答案 0 :(得分:8)
您可以使用def obtainingparams(self, df, tau_1, tau_2, residuals):
print('Calculate the yields Matrix and matrix_of_params in this part')
params = np.linalg.lstsq(matrix_of_params,yields)
residuals = np.sqrt(((yields - matrix_of_params.dot(params))**2).sum())
tau_1 = tau_1 + 0.2
tau_2 = tau_2 + 0.2
#Checkin how many times the function has been called via a decorator not included in this code
while self.obtainingparams(self, df, tau_1, tau_2, residuals).called < 5:
self.obtainingparams(self, df, tau_1, tau_2, residuals)
元素
:pseudo
&#13;
.medal {
width: 100px;
height: 120px;
}
.ribbon {
width: 80px;
height: 70px;
margin: 0 auto;
position: relative;
}
.ribbon:before,
.ribbon:after {
content: '';
position: absolute;
width: 35px;
height: 100%;
top: 0;
}
.ribbon:before {
right: 0;
background: #30110E;
transform: skew(-28deg);
}
.ribbon:after {
background: #EF7E76;
transform: skew(28deg);
}
.coin {
border: 1px solid #CA5D3E;
border-radius: 50%;
background: #F0CD73;
width: 70px;
height: 70px;
position: relative;
margin: -15px auto 0 auto;
box-shadow: 0px 0px 3px 0px #989898;
}
.coin:after {
content: '';
position: absolute;
transform: translate(-50%, -50%);
top: 50%;
left: 50%;
width: 35px;
height: 35px;
border-radius: inherit;
box-shadow: 0 0 0 9px #D9B867;
}
&#13;
答案 1 :(得分:1)
这可以帮助您开始:codepen上的原始
.outer {
margin: 150px auto;
position: relative;
width: 75px;
height: 100px;
text-align: center;
}
.outer .circle {
position: absolute;
top: 0;
width: 15px;
background-color: #fbc56f;
height: 30px;
border-radius: 0 30px 30px 0px;
-webkit-transform: rotate(-35deg);
z-index: 2;
}
.outer .circle:after {
content: "";
position: absolute;
left: -15px;
top: 0;
width: 15px;
background-color: #fab84a;
height: 30px;
border-radius: 0 30px 30px 0px;
-webkit-transform: rotate(180deg);
z-index: 2;
}
.outer .ribbon {
width: 15px;
height: 60px;
background-color: #9bdbf6;
position: absolute;
top: -45px;
left: -23px;
z-index: 1;
-webkit-transform: rotate(-35deg);
border-right: 1px solid white;
}
.outer .ribbon:after {
content: "";
width: 15px;
height: 60px;
top: 18px;
left: 25px;
background-color: #9bdbf6;
position: absolute;
-webkit-transform: rotate(70deg);
}
.outer .ribbon:before {
content: "";
position: absolute;
top: 0;
right: 0;
height: 64px;
width: 1px;
background-color: white;
z-index: 3;
}
&#13;
<div class="outer">
<div class="circle"></div>
<div class="ribbon"></div>
</div>
&#13;