Extract weight matrix

Is it possible to extract the weight matrix from a network?

Sure. The method model.save_weights() will do it for you and store the weights to hdf5.
If you want to do it manually, you'd do something like:
for layer in model.layers:
    weights = layer.get_weights() # list of numpy arrays

Thanks! Are the bias included here?

I cant quite figure out the format of the weights returned....even with
a simple model with 0 hidden layers, I get back a large number of
weights. I also see that activation parameters have weights associated
with them....
Wondering if this format is documented or is going through the code the
only way? Biases are here to?
I am running this simple model on the otto dataset:
print("Building model...")
model = Sequential()
model.add(Dense(dims, 10, init='glorot_uniform'))
model.add(PReLU((10,)))
model.add(BatchNormalization((10,)))
model.add(Dropout(0.5))
model.add(Dense(10, nb_classes, init='glorot_uniform'))
model.add(Activation('softmax'))
model.compile(loss='categorical_crossentropy', optimizer="adam")
print("Training model...")
model.fit(train_X, train_y, nb_epoch=1, batch_size=250, validation_sp
And then this
for layer in model.layers:
g=layer.get_config()
h=layer.get_weights()
print (g)
print (h)
And the output is....

{'output_dim': 10, 'init': 'glorot_uniform', 'activation': 'linear',
'name': 'Dense', 'input_dim': 94}
[array([[ -7.99849009e-02,  -2.45893497e-02,   4.69488823e-02,
6.59520472e-04,   5.47647455e-02,  -5.37778421e-02,
-6.25924897e-02,  -8.44473401e-02,  -8.43347936e-02,
-1.41206931e-02],
[ -7.28297196e-03,  -6.94909196e-02,   5.09896591e-02,
1.07518776e-01,  -1.40819659e-01,   1.28122287e-03,
-7.18242022e-02,  -7.47769234e-02,  -5.61066325e-04,
5.22953511e-02],
[  4.48867873e-02,  -5.98358224e-02,  -3.34403798e-02,
-6.98303095e-02,   1.42869021e-02,   9.69443043e-03,
-5.72198990e-02,   1.26906643e-01,   1.44663706e-01,
-1.05488360e-01],
[ -4.94764224e-03,  -6.72982314e-02,   1.98947019e-02,
-2.34841952e-04,   8.15450053e-02,   9.93956783e-02,
5.33930437e-02,   9.88775421e-02,   2.62561318e-03,
-1.37490951e-01],
[ -9.69757727e-02,  -1.93766233e-02,  -2.67758527e-02,
1.24528297e-03,  -4.38467242e-02,  -3.73318840e-02,
-3.62683822e-02,   3.58399029e-02,  -2.16549907e-03,
6.28375524e-02],
[  2.30916925e-02,  -5.03360711e-02,  -3.48193628e-03,
-1.11732154e-02,  -2.15673704e-02,  -5.69503631e-02,
9.87205698e-03,  -2.12394581e-02,   3.23201450e-02,
8.15617402e-02],
[ -1.22399136e-01,  -1.53275598e-03,  -2.49756349e-02,
2.55169260e-02,   6.42912644e-02,  -8.35097613e-02,
-1.16564598e-01,   5.86628949e-02,  -3.66701814e-02,
7.93936586e-02],
[ -8.18904005e-03,   9.61438433e-02,   1.05611869e-01,
-5.29767001e-02,   1.30970726e-01,  -1.05098848e-01,
-5.67985073e-02,   8.96001608e-02,  -4.06112779e-03,
7.38853071e-02],
[ -1.10601817e-01,   4.01777134e-02,  -1.04958505e-01,
-1.86499188e-01,  -2.37804665e-02,  -3.76688537e-02,
-1.45232209e-01,  -6.36418185e-02,  -7.63368207e-02,
-1.17734138e-01],
[ -2.40944892e-02,  -1.99559485e-02,  -3.10534144e-02,
2.51051600e-02,  -3.66193065e-02,  -6.94967520e-02,
4.28971762e-02,  -4.68141541e-02,   2.08197228e-02,
4.14676310e-02],
[  1.85548637e-01,  -2.00046197e-01,  -1.74210642e-01,
9.19546529e-02,   2.09622917e-01,   1.66180606e-01,
2.18369084e-01,   1.06692421e-01,   2.23854503e-02,
-1.63984764e-01],
[ -2.25432936e-02,   1.21225411e-02,  -1.77713444e-02,
2.49248395e-02,  -9.09446976e-02,  -2.12943360e-02,
-5.79632667e-02,  -7.98705389e-02,   1.45603023e-02,
-3.29101095e-02],
[  1.06982420e-02,   8.10667692e-03,  -7.40422225e-03,
8.73337501e-02,  -4.70680094e-02,  -6.96424801e-04,
-3.52869543e-02,  -5.75422152e-02,  -2.50050629e-03,
5.30206962e-02],
[ -1.05554822e-01,   1.05913849e-01,  -1.99050840e-01,
-1.09049315e-01,  -2.13796040e-01,  -2.46177639e-01,
3.93859830e-02,  -1.60071728e-01,  -2.43849880e-01,
-9.01017306e-02],
[ -2.66245883e-02,   1.02689584e-01,  -1.13140709e-01,
-2.50536214e-01,  -1.36009340e-01,  -9.52662533e-02,
1.40512889e-02,  -2.11842101e-01,  -2.26055642e-01,
-1.35109722e-01],
[ -7.53730907e-03,  -1.64213430e-03,  -6.63893471e-02,
-7.66609176e-02,  -3.59994294e-02,  -9.46264700e-02,
2.58486499e-02,   2.08334686e-03,  -8.75103806e-02,
-1.10772615e-02],
[  1.52794017e-02,   7.91648709e-03,   1.07050460e-01,
-3.69858265e-02,   5.07007745e-02,  -5.97656110e-02,
-3.49382162e-02,   1.55669800e-01,   1.03023857e-02,
-4.40477760e-02],
[  4.07815059e-03,   2.83262161e-02,  -1.48807663e-03,
9.73448516e-02,   3.56439926e-03,  -1.23538034e-02,
9.76411415e-02,   2.06518137e-02,   6.17017622e-02,
-8.53835248e-02],
[ -8.09946660e-02,   2.61380996e-02,   2.63300387e-02,
9.93539858e-02,  -1.10327820e-01,   4.95747644e-02,
-3.89292545e-02,  -1.14508714e-02,   3.19129217e-02,
1.23465986e-01],
[  3.59885269e-03,   2.76080271e-03,  -2.78764395e-02,
4.24239723e-02,   1.53515202e-03,  -2.69810376e-02,
1.63534000e-02,   5.40332907e-02,   1.14591409e-01,
3.83767457e-02],
[  2.84191996e-03,  -6.19442984e-02,  -8.03084884e-03,
-1.51138132e-02,   4.29634390e-02,   3.55585086e-02,
-3.89301471e-02,  -3.44196220e-02,  -1.92320194e-02,
-6.95947810e-02],
[  8.89051092e-03,  -3.63276576e-02,   3.77512802e-02,
-8.61697928e-02,   4.37051203e-02,   1.25958620e-01,
1.27073221e-02,   1.74475895e-02,   3.51703513e-02,
1.76466516e-02],
[  7.71217281e-02,   1.81580258e-02,   2.90213940e-02,
4.13172177e-02,   8.94682418e-02,  -5.88464358e-03,
-8.54934082e-02,  -6.62388395e-03,   6.46094670e-03,
-1.88742827e-02],
[ -2.91908240e-02,  -2.65753849e-02,   1.52980919e-02,
6.58449558e-02,  -7.86922291e-02,   4.58466034e-02,
-3.39622131e-02,   8.56353043e-02,  -3.02583216e-02,
1.06242259e-01],
[ -3.46668468e-02,   5.48445800e-02,  -9.99637775e-02,
-1.40776997e-01,  -2.33112086e-01,  -1.12747490e-01,
-3.38637078e-03,  -2.72000452e-01,  -2.43135959e-01,
1.40148791e-02],
[  4.55380939e-02,  -2.05104710e-01,  -1.23208875e-01,
7.37236719e-02,   3.40874932e-02,   1.38913292e-01,
2.39351600e-01,  -1.87328804e-02,   7.01187834e-02,
-5.02784378e-02],
[ -1.56907260e-02,  -6.93088723e-02,  -1.32831942e-01,
1.40660959e-02,   7.01844406e-02,   6.88994173e-02,
1.09614443e-01,   5.21141313e-03,   2.66728291e-02,
-2.12535714e-01],
[  8.63241877e-03,  -2.00266780e-01,   4.21728732e-03,
-2.71931798e-04,  -3.74458866e-02,  -1.02733646e-02,
1.26404038e-02,   4.53453957e-02,  -5.47819209e-03,
-1.78313855e-01],
[ -3.40579999e-02,   3.68030410e-02,   2.78233896e-02,
-6.87630905e-02,   5.79211738e-02,   3.53004862e-02,
2.97676136e-02,  -2.83821290e-03,  -6.19672378e-02,
4.38129833e-02],
[ -1.29424714e-01,  -5.27272972e-02,   6.69243394e-02,
1.19757129e-01,   3.84862554e-02,   9.18853869e-02,
-4.82323177e-02,   1.87875149e-02,   4.63434479e-02,
5.18075847e-02],
[ -4.84346313e-02,  -7.05440572e-03,  -1.17486716e-01,
-3.78191092e-02,  -1.63198220e-02,   6.35379808e-02,
-2.28866377e-02,  -4.73959864e-02,   6.47443882e-02,
1.71767526e-02],
[  7.92322710e-02,  -3.99799449e-03,  -2.68663861e-02,
2.16343925e-02,   7.08523118e-02,   9.40224531e-03,
-2.73172165e-02,   3.90645337e-02,   1.43386517e-02,
-3.28124923e-02],
[ -7.49563779e-02,   8.96276663e-03,  -3.00325036e-02,
-9.26680367e-02,  -1.68292320e-01,  -1.46136493e-01,
-2.32867781e-02,  -1.37576449e-01,  -1.08664407e-01,
-3.03448062e-02],
[ -1.58937859e-01,   1.24359548e-01,   1.72723048e-01,
-7.16377564e-02,   8.15923267e-02,  -9.26028128e-02,
-3.52089676e-02,  -1.71921631e-01,   1.19313224e-01,
5.04153287e-02],
[  5.87777373e-03,  -9.82951252e-02,  -1.44826277e-01,
2.87068172e-03,   5.77770075e-02,   3.83663771e-02,
-7.79279419e-02,   5.30456023e-02,  -4.32744374e-02,
-8.80488631e-02],
[ -9.51507092e-02,   2.48270494e-02,   1.85502184e-01,
-6.15492334e-02,   1.18012058e-01,  -3.35554541e-02,
1.92680772e-03,   1.25766050e-03,  -1.33313640e-01,
3.44885089e-02],
[ -8.23068727e-02,   6.00759323e-03,   3.07414607e-02,
3.78444659e-02,   1.59902793e-02,   1.32360708e-02,
-5.58786321e-02,  -8.98881639e-03,   9.11022060e-02,
1.27618163e-01],
[ -8.39977134e-02,  -2.19334460e-02,   2.93163173e-02,
-9.67890487e-03,  -1.45040381e-01,  -1.11580661e-02,
-5.45275977e-02,   3.19171362e-02,   6.28167381e-02,
5.43802318e-02],
[ -3.19924245e-02,   9.04734505e-02,  -8.88122521e-03,
-6.81262022e-02,   3.81438529e-02,  -1.10441657e-01,
-2.75602345e-02,   4.45400922e-02,   1.65449719e-01,
-4.30487717e-03],
[ -8.83774422e-02,   7.58000898e-02,  -1.84174130e-01,
-8.53399835e-02,  -1.66059125e-01,  -1.49298746e-01,
2.59884981e-02,  -1.58198291e-01,  -1.70953601e-01,
-2.42574980e-02],
[  3.76959883e-02,   3.19914391e-02,   8.79207932e-02,
3.22329258e-02,  -4.57678893e-03,   6.73169597e-02,
3.67542760e-03,  -1.08364242e-02,  -7.73627399e-03,
1.05920958e-01],
[  2.22782407e-01,  -1.80813558e-01,  -5.38938983e-02,
-1.37104372e-01,   1.53482621e-01,   1.41474566e-01,
6.76793766e-02,   9.57258689e-02,   1.20902074e-01,
-8.28063868e-02],
[  1.45137965e-02,   4.45537228e-02,  -2.40643314e-01,
-5.28557398e-02,  -9.96888936e-02,   3.65267589e-02,
3.64279623e-02,  -8.18503052e-02,  -2.02683058e-01,
-1.82493162e-01],
[  8.98117186e-02,  -3.25222791e-02,   4.78793257e-03,
-3.44254824e-02,  -9.32265642e-02,  -3.37535001e-02,
-2.59333102e-02,  -3.14748988e-02,   1.50924621e-02,
-3.88573589e-02],
[  9.16648589e-02,  -9.07544921e-03,   1.15557421e-02,
-6.69898791e-02,   6.43994728e-02,  -1.03488028e-01,
-8.25832880e-02,   1.04004400e-01,  -1.32508566e-02,
-2.85507593e-02],
[  1.18606710e-01,  -1.62804455e-01,  -8.94677872e-02,
9.15753083e-02,  -2.46587921e-02,   7.59351306e-02,
6.87165226e-02,  -4.79627016e-02,  -3.69506298e-02,
-1.07193629e-01],
[  1.17239054e-02,  -2.67437157e-02,  -7.68840391e-04,
8.10397970e-02,  -1.99904474e-02,   5.51565844e-02,
5.58673400e-04,   3.17302125e-02,   1.11154388e-01,
1.07863925e-01],
[ -1.04641810e-01,   2.78747603e-02,  -1.45182739e-03,
-1.53233877e-01,  -6.29874225e-02,  -1.29592620e-01,
-1.51859556e-01,  -4.14495814e-02,  -8.45453923e-02,
-1.15042618e-01],
[ -2.20509269e-02,  -1.47940439e-01,  -4.76452491e-02,
-2.20822576e-02,  -2.04331960e-03,   4.55278328e-02,
7.08764808e-02,  -1.73128630e-02,   1.93976654e-02,
-2.61378301e-02],
[  7.04435092e-02,   2.91919488e-03,   4.20234866e-02,
-7.55152665e-02,  -4.63803985e-02,  -1.07999505e-01,
-8.16274725e-02,   4.19000215e-02,   7.89168322e-02,
-3.86468662e-04],
[  5.83150997e-03,  -1.60543542e-01,  -1.42290587e-02,
-6.85734380e-03,   8.61183085e-03,  -4.91538703e-02,
3.61739483e-03,   3.47957593e-02,  -9.38960015e-03,
1.87941107e-02],
[  3.86580568e-02,  -6.17538775e-02,  -3.52311159e-02,
-6.14824396e-03,   3.28743091e-02,   2.30341515e-02,
4.17623711e-02,   3.78719485e-02,   6.40326123e-02,
-1.25724117e-01],
[ -2.69466654e-02,   8.76149869e-02,   8.43603169e-02,
-2.43710820e-02,  -7.43506410e-03,  -5.92964338e-03,
1.19778728e-02,   1.49802507e-02,  -1.24118188e-01,
1.19810388e-01],
[  1.43340287e-02,  -8.91459774e-02,   3.11272246e-02,
1.25600087e-01,   7.31098870e-02,  -9.06883544e-03,
3.69710535e-03,  -5.08471161e-02,   7.35172675e-02,
-1.54848409e-01],
[  4.85676467e-02,  -3.05382790e-02,   3.27869005e-02,
6.41000141e-02,   7.11917729e-02,   1.18288425e-01,
6.83290253e-03,   9.93292852e-02,  -3.07955208e-03,
-1.28590112e-02],
[ -3.03334700e-02,   1.08860071e-02,   8.97625740e-02,
-4.83023573e-02,  -3.12615198e-02,  -8.61628871e-02,
-1.04541486e-02,   1.33751888e-01,   8.89201773e-02,
-1.06815586e-01],
[  1.64302198e-01,  -1.73583248e-01,  -1.29705113e-01,
1.15130432e-01,   5.06143426e-02,   1.38332743e-01,
8.68229188e-02,   2.03039990e-02,   9.97073441e-03,
-1.84693280e-01],
[  1.39708295e-02,  -1.20358859e-01,   2.09749290e-02,
1.59206874e-01,  -1.31967745e-01,   9.07331382e-04,
-2.98483952e-02,  -2.11940084e-02,   5.57213581e-02,
1.17593488e-01],
[  1.95239811e-02,   2.48040812e-02,   1.13217120e-01,
-1.32227109e-01,   4.16574397e-02,   4.98457202e-02,
-3.24562114e-02,  -6.51531123e-02,  -7.33154552e-02,
-3.98947626e-02],
[  2.66432299e-01,  -2.97074213e-01,  -5.99969370e-02,
-5.87481183e-02,   1.60074011e-01,   1.30176286e-01,
2.77686796e-01,   1.31290317e-01,   1.22633535e-01,
-1.09230713e-01],
[  2.00969073e-02,  -1.84964992e-01,  -5.83985571e-03,
-7.41362658e-02,   1.38365878e-02,   1.06839467e-01,
-2.74847583e-02,  -1.92903743e-02,  -5.20260714e-03,
2.50301918e-04],
[ -6.17150407e-02,   8.06537180e-02,   7.02343393e-02,
-5.42272016e-02,   9.97773977e-03,  -1.98928364e-01,
-2.17237932e-01,  -6.73968443e-03,  -1.97736271e-01,
5.00901130e-02],
[ -1.66149509e-02,  -2.62200709e-03,  -2.08381446e-02,
2.57409840e-02,  -2.42515149e-02,  -3.21673100e-02,
1.49380691e-02,  -2.72776353e-02,  -8.78237320e-02,
1.68875553e-02],
[ -5.57623273e-02,   3.65157464e-02,  -1.13528556e-01,
9.79066670e-03,  -5.63900992e-02,  -3.71015632e-02,
-1.53407485e-04,  -1.72846924e-01,  -1.09153670e-01,
-3.32763024e-02],
[  5.97840241e-03,   4.14377038e-02,   4.48701934e-03,
-6.99469980e-02,   4.48644760e-02,   1.05679300e-01,
-6.51186109e-02,   9.74034880e-03,   2.48868577e-02,
-3.36158742e-02],
[  1.20077827e-02,  -2.03385970e-02,  -2.75987445e-03,
-1.16149630e-02,   1.06375004e-01,   5.39069232e-02,
-8.91773269e-02,   2.75564667e-03,   4.46157051e-02,
5.58006479e-02],
[ -1.16916048e-02,   4.60958859e-02,  -2.17421025e-02,
-1.86881864e-01,   4.66562070e-02,   4.02356717e-02,
-1.15677821e-01,   4.66245330e-02,  -3.02338327e-02,
1.65767924e-03],
[ -6.92209031e-02,  -5.00074868e-02,   3.97814441e-02,
2.01908782e-01,  -1.24789202e-01,   1.66400945e-01,
-1.04113481e-01,   2.69553450e-02,   4.85165628e-02,
1.82033767e-01],
[ -1.28536858e-01,  -3.02310722e-03,   8.69889310e-02,
8.70096528e-02,  -4.53932410e-02,   1.66790953e-01,
-1.28925981e-01,  -1.83845627e-02,   2.31594216e-02,
1.55204566e-01],
[ -6.96121049e-02,   5.98652894e-02,  -4.84150225e-03,
1.57034354e-02,   3.75668782e-02,  -1.64650619e-02,
-1.70003480e-02,   1.68722860e-03,  -1.58515948e-02,
-4.94031462e-02],
[ -6.33468947e-02,  -8.75024885e-03,   5.29224644e-03,
1.02262168e-01,  -1.58498505e-02,   5.67770925e-02,
-5.12286565e-02,   7.78941169e-02,   9.62220805e-02,
1.12947449e-01],
[ -1.71659989e-01,   1.16973947e-01,  -1.05326386e-01,
-1.66891420e-01,  -1.01974213e-01,  -6.23915854e-02,
2.04867068e-02,  -2.09272962e-01,  -4.98385084e-02,
6.39348977e-02],
[ -2.33088886e-02,   4.77167627e-04,   5.12577177e-03,
8.72510224e-02,  -6.98289790e-02,  -3.83786347e-02,
-1.61912813e-01,   9.99245590e-03,   6.40901957e-03,
1.06622519e-03],
[ -3.22696147e-03,   7.50338364e-04,  -4.13295523e-02,
1.11532490e-02,   2.13605470e-03,   7.01725919e-02,
6.56769972e-02,  -1.22168268e-02,  -3.98609596e-02,
4.02942635e-02],
[ -6.30274025e-02,  -8.49640888e-02,   1.38809509e-02,
2.04496514e-01,  -1.47865061e-01,   1.14922183e-01,
-1.48793624e-01,   5.45763123e-02,   4.44691877e-02,
1.79254325e-01],
[ -3.70425750e-02,  -2.35610560e-02,  -4.93268816e-03,
1.31040411e-02,   2.73776025e-02,   1.15118941e-01,
-1.38940692e-01,   3.52187024e-02,   1.86298744e-02,
1.01562678e-01],
[  1.76901211e-03,   7.25849291e-02,   4.30484675e-02,
-5.29386234e-02,   8.85783359e-02,  -2.10795505e-03,
-1.75977381e-02,  -6.26338776e-02,   1.10745137e-02,
-3.01402319e-02],
[ -6.51010148e-03,   4.46026348e-03,   3.29594028e-02,
7.42153750e-02,   4.51823405e-02,   2.38861625e-02,
-1.51084355e-01,   2.58145276e-02,   9.78499330e-02,
1.13541447e-02],
[ -1.70992478e-02,  -4.46845213e-02,   6.57091110e-02,
-7.22719951e-02,   1.38301387e-01,   3.39854928e-02,
-2.71362382e-03,   5.89179971e-02,   3.98174930e-02,
-2.14658967e-02],
[  1.47533650e-01,  -1.04364285e-01,  -8.94515699e-02,
6.64953902e-02,   2.39417285e-02,  -2.14146403e-02,
6.62148791e-02,  -1.08153465e-02,   5.16891148e-02,
-7.39043785e-02],
[  2.40624194e-03,   5.38938896e-02,   3.42756790e-02,
4.45555846e-02,   1.21189843e-01,  -4.61384428e-02,
4.66344444e-02,   2.32483197e-02,   1.73072110e-02,
-5.31442668e-02],
[  4.43278059e-02,  -1.25351815e-01,   3.30721381e-03,
-4.40161903e-02,   4.02718580e-02,  -2.78869336e-02,
5.86890902e-02,   7.31859328e-02,   2.70040392e-02,
1.43055350e-02],
[ -7.64451720e-02,   2.79163924e-02,  -4.95644115e-02,
1.40135399e-04,  -3.44646526e-02,  -5.21001244e-02,
-1.36563861e-02,  -3.01335168e-02,  -2.14250554e-02,
3.37404738e-02],
[  5.63956295e-03,   1.31333839e-02,   1.86413210e-02,
3.75087111e-02,   1.14190531e-01,  -1.23009164e-02,
5.04972589e-02,  -1.08671571e-02,  -1.72429908e-02,
6.35628664e-03],
[ -7.81176131e-02,   1.22820378e-02,  -4.88642529e-02,
-1.68663757e-02,  -4.93644076e-02,  -8.76378246e-03,
6.76276358e-02,  -2.72725790e-02,  -1.12157596e-01,
6.67786778e-02],
[ -1.35052643e-01,   6.17655018e-02,  -9.91510117e-02,
-1.36961912e-01,  -9.93016461e-02,  -2.23026506e-01,
5.43391763e-02,  -7.92043386e-02,  -4.64242573e-02,
-1.31950335e-01],
[  9.02050417e-02,   4.89889014e-02,  -3.76353176e-02,
-8.21240609e-02,   5.91559984e-02,  -2.88601734e-02,
-2.75170553e-02,   4.00444237e-02,   1.02223471e-01,
-8.85973866e-03],
[ -2.79819946e-02,   1.57770779e-02,  -1.74634653e-01,
-1.50595889e-01,  -1.98462406e-01,  -1.58971182e-01,
5.48719855e-02,  -1.66760843e-01,  -2.75554553e-01,
2.64535338e-02],
[ -8.80281079e-02,  -1.79294346e-02,   7.08099011e-02,
1.95550220e-02,  -9.05946128e-02,   5.07943950e-02,
-2.29652551e-02,  -4.74400823e-02,  -2.48743014e-02,
-3.02452203e-02],
[ -1.41639591e-01,  -1.14204327e-02,   6.37410597e-03,
3.71080625e-02,  -2.52950025e-01,   9.53980112e-02,
-1.04131975e-01,   1.33543914e-02,   5.09378104e-02,
1.09227010e-01],
[ -1.41634459e-02,   7.14195268e-02,   6.84697215e-02,
-9.43577039e-02,   5.96288760e-03,  -1.19336735e-01,
-3.07758752e-02,  -5.98731421e-02,  -9.55384648e-03,
3.84556520e-04],
[ -2.50815619e-02,   4.53682164e-02,   5.46400441e-02,
-2.23102338e-02,   1.17296376e-01,   5.90221088e-02,
-1.21542180e-02,   8.26175342e-03,   6.07650355e-02,
-3.03832471e-02],
[  9.42653504e-02,  -7.87588973e-02,  -6.33857297e-02,
5.43245905e-02,   2.31799575e-02,   1.10878154e-01,
4.02822240e-02,   1.89821951e-02,   6.25729673e-02,
-4.26672129e-02],
[ -2.05037699e-02,   1.29917332e-01,  -1.01022859e-01,
-9.12096671e-02,   9.67299134e-02,   4.83183980e-02,
-2.53932230e-02,  -5.23461370e-02,   9.16840297e-02,
5.16286812e-02]]), array([ 0.13384319,  0.21280285,
0.12673509,  0.0481298 ,  0.15588539,
0.16365858,  0.16476655,  0.21108415,  0.17096487, 0.1085302 ])]
{'name': 'PReLU', 'input_shape': (10,)}
[array([ 0.0933486 ,  0.21287123,  0.00783342,  0.01653181, 0.17309322,
0.16339809,  0.17657923,  0.16427643,  0.15932031, 0.1788937 ])]
{'epsilon': 1e-06, 'mode': 0, 'name': 'BatchNormalization',
'input_shape': (10,)}
[array([-0.24547945, -0.21909049,  0.24213387,  0.2301027 , -0.2308098 ,
-0.26039818,  0.25852819, -0.2666662 , -0.23721958,
-0.21551781]), array([-0.18698727,  0.18234116, -0.19378199,
0.14785786,  0.20994197,
-0.17636872, -0.0286329 ,  0.19325841,  0.15674127, 0.18424748])]
{'p': 0.5, 'name': 'Dropout'}
[]
{'output_dim': 9, 'init': 'glorot_uniform', 'activation': 'linear',
'name': 'Dense', 'input_dim': 10}
[array([[ 0.09531779,  0.08962424,  0.2058567 , -0.01249131, 0.30507946,
-0.53983095, -0.06707083,  0.19728828,  0.20076663],
[-0.32254363, -0.42794729, -0.25050942, -0.33067779, -0.41560606,
0.44383431, -0.41416482,  0.06048449, -0.41940528],
[ 0.44522338, -0.32401378, -0.47518886,  0.18116826, 0.37900766,
-0.25756208,  0.19068314,  0.20710987,  0.54537   ],
[-0.31705924, -0.24385525, -0.42045825, -0.06039081, -0.23035229,
0.13377106, -0.34439084,  0.50066419, -0.29471258],
[-0.46195437,  0.32470544,  0.23317512, -0.03074575, -0.03195262,
-0.12666796, -0.0689242 ,  0.29082389, -0.03790227],
[ 0.08793353,  0.23260939, -0.02797571,  0.08840966, 0.26917765,
-0.42360304,  0.53772368, -0.30116916,  0.14197116],
[-0.02250078, -0.25081609, -0.09740926,  0.40152244, -0.22063047,
0.26022703, -0.34145828, -0.53870416, -0.48703162],
[-0.45320813,  0.50861172,  0.19536802,  0.07115475, 0.16693423,
-0.20375885, -0.26160637, -0.09466415,  0.0106583 ],
[-0.03785352,  0.45134675,  0.46924738,  0.003416  , -0.3582257 ,
-0.38137255, -0.47833458, -0.37664575,  0.31648622],
[-0.20752858,  0.18646851,  0.23139626, -0.32362606, -0.12266297,
0.43289664, -0.07509048, -0.52767154, -0.15752394]]),
array([-0.16717777,  0.16997226,  0.05989215, -0.16888715, -0.16850433,
0.16732873, -0.16105396,  0.09626825, -0.12726908])]
{'activation': 'softmax', 'name': 'Activation'}
[]

PReLU and BatchNormalization do, of course, have weights. They are learnable layers.
Also the model above has one "hidden layer" of size 10 (but reasoning in terms of hidden layers can be confusing, better think in terms of operations). You are doing one projection from the initial space to a space of size 10, then a second projection from that space to a space of size nb_classes.

I use the following function to print out dumped weight file from keras.
from __future__ import print_function

import h5py

def print_structure(weight_file_path):
    """
    Prints out the structure of HDF5 file.

    Args:
      weight_file_path (str) : Path to the file to analyze
    """
    f = h5py.File(weight_file_path)
    try:
        if len(f.attrs.items()):
            print("{} contains: ".format(weight_file_path))
            print("Root attributes:")
        for key, value in f.attrs.items():
            print("  {}: {}".format(key, value))

        if len(f.items())==0:
            return

        for layer, g in f.items():
            print("  {}".format(layer))
            print("    Attributes:")
            for key, value in g.attrs.items():
                print("      {}: {}".format(key, value))

            print("    Dataset:")
            for p_name in g.keys():
                param = g[p_name]
                print("      {}: {}".format(p_name, param.shape))
    finally:
        f.close()

and output is something like this
(This is from my model and does not represent from your model.)
  layer_0
    Attributes:
      nb_params: 2
      subsample: [1 1]
      init: glorot_uniform
      nb_filter: 32
      name: Convolution2D
      activation: linear
      border_mode: full
      nb_col: 3
      stack_size: 3
      nb_row: 3
    Dataset:
      param_0: (32, 3, 3, 3)
      param_1: (32,)
  layer_1
    Attributes:
      nb_params: 0
      activation: relu
      name: Activation
    Dataset:
  layer_2
    Attributes:
      nb_params: 2
      subsample: [1 1]
      init: glorot_uniform
      nb_filter: 32
      name: Convolution2D
      activation: linear
      border_mode: valid
      nb_col: 3
      stack_size: 32
      nb_row: 3
    Dataset:
      param_0: (32, 32, 3, 3)
      param_1: (32,)
  layer_3
    Attributes:
      nb_params: 0
      activation: relu
      name: Activation
    Dataset:
  layer_4
    Attributes:
      nb_params: 0
      name: MaxPooling2D
      ignore_border: True
      poolsize: [2 2]
    Dataset:

So I can tell that layer_0 has Convolution2D and weight is stored at ‘param_0’ attribute and its shape is (32, 3, 3, 3), which means there are 32 filters, with 3 channels, 3pixel height 3pixel width, and bias is stored at ‘param_1’ and its shape (32,), one for each filter.
To access them, use model.layers[0].params[0] for weight and model.layers[0].params[1] for bias

@mthrok thank you - this is really helpful!

@mthrok It's extremely helpful. Thank you very much!

Instead of storing weights i want to store features. How to do this?

@mthrok  I tried your function, it report
print("      {}: {}".format(p_name, param.shape))
AttributeError: 'Group' object has no attribute 'shape'
However, when I tried print("      {}: {}".format(p_name, param.shape)) independently, it's able to work. Do you have any idea about that?

Has anything changed with Keras 2.x? it isn't working for me

Changing from param.shape to param on the line which failed seems to work in eliminating the AttributeError ronzilllia mentions.

Some modification to mthrok's answer to slove the issue "AttributeError: 'Group' object has no attribute 'shape'"
from __future__ import print_function

import h5py

def print_structure(weight_file_path):
    """
    Prints out the structure of HDF5 file.

    Args:
      weight_file_path (str) : Path to the file to analyze
    """
    f = h5py.File(weight_file_path)
    try:
        if len(f.attrs.items()):
            print("{} contains: ".format(weight_file_path))
            print("Root attributes:")
        for key, value in f.attrs.items():
            print("  {}: {}".format(key, value))

        if len(f.items())==0:
            return

        for layer, g in f.items():
            print("  {}".format(layer))
            print("    Attributes:")
            for key, value in g.attrs.items():
                print("      {}: {}".format(key, value))

            print("    Dataset:")
            for p_name in g.keys():
                param = g[p_name]
                subkeys = param.keys()
                for k_name in param.keys():
                    print("      {}/{}: {}".format(p_name, k_name, param.get(k_name)[:]))
    finally:
        f.close()

Then it will prints something like below:
Root attributes:
  layer_names: ['dense_2']
  backend: tensorflow
  keras_version: 2.0.8
  dense_2
    Attributes:
      weight_names: ['dense_2/kernel:0' 'dense_2/bias:0']
    Dataset:
      dense_2/bias:0: [ 2.00016475]
      dense_2/kernel:0: [[ 2.99988198]]

Printing weights using get_weights gives correct output, But Of I do a weights.shape, it always gives me a 2-dimesional shape, which is wrong .. what should I do to correct this

anyone have something written that can throw each layer in as columns of a spreadsheet? I can only see a small number of weights with this... my network is pretty big. I don't see any zeroes in the printout, but I want to make sure my leakyRelu layers actually aren't getting any (or at least many) neurons zeroed out.

i have the weightof model  which is trained with matlab the file called weights.mat i want to load this weights in keras how i can do that ??
i think in keras there are only h5 file who can load it i don't know how i can load

see my initial attempt to extract layer parameters into a csv file.  I needed to see the magnitude of the layer weights and this was a way to view them.
https://github.com/kristpapadopoulos/keras_tools/blob/master/extract_parameters.py

@kristpapadopoulos I tried using ur code and I am getting this error:
Parameter File: checkpoints/weights_multi_fb_20180513_2.best.hdf5
Extracting Model Parameters to CSV File...
Traceback (most recent call last):
File "print_weights.py", line 54, in
weights[layer].extend(param[k_name].value[:].flatten().tolist())
AttributeError: 'Group' object has no attribute 'value'
Do you have any idea?

If you're just looking to print the weights, I would suggest just using the h5dump utility:
https://support.hdfgroup.org/HDF5/doc/RM/Tools.html#Tools-Dump

I just encountered the same problem. I solved it by using model.save_weights("path") instead of model.save("path").

@S601327412 It might be caused by the Layer wrapper. If you create a model with a Layer Wrapper, there will be a nested group in your h5 structure which isn't consistent to mthrok's code.

Hello,
Sorry for my very bad english
I work to create a little package of deep learning for my calculator.
I have just implemented the predict function.
I would like to train my model with keras, and after, give the coefficients to my function.
My function take in input, a list of coefficient (w1, w2, w3, ..., wn)
How can I have just a list of all coefficient, in a model without convolution.
Thank you very much for your reply

Hi @mactul.   Perhaps using something like the "get_weights()" function at the end of this code block might be what you are looking for:
from keras.models import Sequential
from keras.layers import Dense, Activation
# For a single-input model with 2 classes (binary classification):

model = Sequential()
model.add(Dense(8, activation='relu', input_dim=10))
model.add(Dense(1, activation='sigmoid'))
model.compile(optimizer='rmsprop',
              loss='binary_crossentropy',
              metrics=['accuracy'])

# Generate dummy data
import numpy as np
data = np.random.random((1000, 10))
labels = np.random.randint(2, size=(1000, 1))

# Train the model, iterating on the data in batches of 32 samples
model.fit(data, labels, epochs=10, batch_size=32)

# print out the weight coefficients
print(model.get_weights())

I hope this helps.
Thanks.

I have tryed your method, it's work good, but how can I translate this array in a list ?
I want to have coefficient of neuronal's input, and there place in the network
w1-
-w4
w2-         -w6
-w5
w3-
[w1, w2, w3, w4, w5, w6]
sorry, I'm not very explicit.

Hi @mactul.  Below I created a simplified version with explicit details of the weights.  I did a prediction using the model.predict in Keras and also a direct calculation using the weights and biases.
This simplified model has 4 inputs into 2 nodes, then into one output node:
                                            x1    x2   x3    x4  (input)

   w11   w12   w13  w14   bias              w21   w22   w23  w24  bias     (layer 1)

                                          w21     w22      bias       (layer 2)

I hope this helps.
Thanks.
# Simplified version
#
from keras.models import Sequential
from keras.layers import Dense, Activation
# For a single-input model with 2 classes (binary classification):

model = Sequential()
model.add(Dense(2, activation='linear', input_dim=4))
model.add(Dense(1, activation='linear'))
model.compile(optimizer='rmsprop',
              loss='binary_crossentropy',
              metrics=['accuracy'])

# Generate dummy data
import numpy as np
data = np.random.random((1000, 4))  # input is 1000 examples x 4 features
labels = np.random.randint(2, size=(1000, 1)) # output(label) is 1000 examples x 1

# Train the model, iterating on the data in batches of 32 samples
model.fit(data, labels, epochs=10, batch_size=32)
model.summary()
print()

# print out the weight coefficients of first layer
kernel_1, bias_1 = model.layers[0].get_weights()
print('kernel_1:')
print(kernel_1)
print('bias_1:')
print(bias_1)
print()
# print out the weight coefficients of second output layer
kernel_2, bias_2 = model.layers[1].get_weights()
print('kernel_2:')
print(kernel_2)
print('bias:_2')
print(bias_2)
print()

#predict with keras.model.predict
x_test = np.array([1, 1.5, -4 ,3])
x_test=np.expand_dims(x_test, axis = 0)
print('test input:')
print(x_test)
print('model.predict:')
print(model.predict(x_test))

#predict with direct calculation using manual summations
print()
node_1_sum = \
    x_test[0,0]*kernel_1[0,0]+ \
    x_test[0,1]*kernel_1[1,0]+ \
    x_test[0,2]*kernel_1[2,0]+ \
    x_test[0,3]*kernel_1[3,0]+ bias_1[0]

print('node_1_sum:')
print(node_1_sum)

node_2_sum = \
    x_test[0,0]*kernel_1[0,1]+ \
    x_test[0,1]*kernel_1[1,1]+ \
    x_test[0,2]*kernel_1[2,1]+ \
    x_test[0,3]*kernel_1[3,1]+ bias_1[1]

print('node_2_sum:')
print(node_2_sum)

#output layer

output_layer = node_1_sum*kernel_2[0] + node_2_sum*kernel_2[1] + bias_2[0]

print('final result of network using manual calculations = ', output_layer)

@td2014 hi ,I want to get weights from two model and  average them.Then put the averaged weights in a new model.Three models hava same structure. How can I  implement this? Wish you can help me ,thank you.

Hi @AmberrrLiu .  I don't know for sure, but you might want to take a look at the first section of this page:  https://keras.io/models/about-keras-models/  .  It mentions get_weights, set_weights, save_weights, and load_weights function.  It might be possible to get the weights from each of your models, do the averaging using python/numpy, set the weights in the new model.  You can also save and reload if that works for you.
I hope this helps.

Thank you.set_weights function works well.

For tensorflow, don't use tf.layers.dense, since it only returns the result of dense layer. Instead use tf.layers.Dense:
layer = tf.layers.Dense(units=units)
dummy_net = tf.zeros([0, net.get_shapes()[1]], dtype=tf.float)
layer.apply(dummy_net)
kernel, bias = layer.weights

From here on you can use kernel/bias anyway you like.


Currency and fxrate issues

SELECT t.id, t."createdAt", t.type, "OrderId", "ExpenseId", pm.service, amount, t.currency, h.slug as host, "hostCurrency", "hostCurrencyFxRate", "amountInHostCurrency", t.description
FROM "Transactions" t
LEFT JOIN "Collectives" h ON h.id=t."HostCollectiveId"
LEFT JOIN "PaymentMethods" pm ON pm.id=t."PaymentMethodId"
WHERE "amountInHostCurrency" = round("amount" * "hostCurrencyFxRate")
  AND "hostCurrencyFxRate" != 1
  AND t."deletedAt" IS NULL
ORDER BY id ASC

returns 252 (Feb 2016 - June 2018, only Paypal transactions to reimburse expenses), while
SELECT t.id, t."createdAt", t.type, "OrderId", "ExpenseId", pm.service, amount, t.currency, h.slug as host, "hostCurrency", "hostCurrencyFxRate", "amountInHostCurrency", t.description
FROM "Transactions" t
LEFT JOIN "Collectives" h ON h.id=t."HostCollectiveId"
LEFT JOIN "PaymentMethods" pm ON pm.id=t."PaymentMethodId"
WHERE "amountInHostCurrency" = round("amount" / "hostCurrencyFxRate")
  AND "hostCurrencyFxRate" != 1
  AND t."deletedAt" IS NULL
ORDER BY id ASC

returns 687 (Feb 2016 - July 2018, with only 16 with PayPal from 2016-2017).
We should consolidate everything. hostCurrencyFxRate is supposed to be the rate to convert from the currency of the collective to the currency of the host; therefore
amount * hostCurrencyFxRate  = amountInHostCurrency

See https://github.com/opencollective/opencollective-api/blob/e9a5acd109fb96594c9362a6b8c2dc694f0511e0/server/lib/transactions.js#L104
But the data suggests the opposite:
amountInHostCurrency * hostCurrencyFxRate = amount

This query fixes the wrong hostCurrencyFxRate to make sure it's always from the currency of the collective to the currency of the host:
UPDATE "Transactions" set "hostCurrencyFxRate" = 1/"hostCurrencyFxRate"
WHERE "amountInHostCurrency" = round("amount" / "hostCurrencyFxRate")
  AND "hostCurrencyFxRate" != 1
  AND "deletedAt" IS NULL

After running this query, the second query above returns 0 results.


this.async is not a function issue with webpack

Hi Kisenka,
After getting your updates from the callback issue I'm getting the below error.
<<< start of error >>>
loader option has been deprecated - replace with "use"
{localfilepath}/node_modules/svg-sprite-loader/lib/loader.js:18
const done = this.async();
^
TypeError: this.async is not a function
<<< end of error >>>
Could you please advise on a fix? Thanks.

@girwin575 please provide webpack version

@kisenka  3.7.1

@girwin575 couldn't reproduce, could you please create a git repo with reproducible error?

Having the same issue.
Using "webpack": "^3.6.0"

any ideas how to solve this?

@mascardoso yeah I'm having the same issue. What version of node are you using?

@girwin575 node v8.7.0

Also probably good to know but I have in place an SSR app. I get this error when I try to add sprite-svg-loader to my .babelrc

@girwin575 it will be better if you edit this issue and fill the template (and don't remove it next time). Also I can help you much faster if you create a git repo where I can reproduce an error.

@kisenka I'll fill out that issue template now as a comment, with regards to a repo I'm working on one with the same issue as I can't publish what I currently have.

@girwin575 ok, let's start from details about your environment, I need only this information from issue template

Node.js version: 7.10.1
webpack version: 3.7.1
svg-sprite-loader version: 3.3.1
OS type & version: OS X El Capitan - 10.11.6

If it also helps @kisenka:

Node.js version: 8.7.0
webpack version: 3.6.0
svg-sprite-loader version: 3.3.1
OS type & version: OS Sierra - 10.12.6

@mascardoso

I get this error when I try to add sprite-svg-loader to my .babelrc

What does it mean try to add sprite-svg-loader to my .babelrc? sprite loader configuration should be defined in webpack config

@girwin575 still cannot reproduce with node 7.10.1 & webpack 3.7.1. I need demo repo with package.json, webpack config & minimal piece of your code. You don't need to share whole project :)

@kisenka the reason I add in babelrc it's because this is a SSR application. Does it make sense?

Ok @kisenka I'll get one together. Thanks!

@mascardoso please provide an .babelrc example with svg-sprite-loader config

{
  "presets": ["es2015", "es2016", "es2017", "react"],
  "plugins": [
    "svg-sprite-loader",
    ["css-modules-transform", {
          "generateScopedName": "[local]___[hash:base64:5]",
          "extensions": [".scss"],
          "rootDir": "./front"
    }],
    "dynamic-import-node",
    "syntax-dynamic-import",
    "transform-async-to-bluebird",
    ["transform-runtime", {
      "polyfill": true,
      "regenerator": true
    }],
    "transform-object-rest-spread",
    "ramda"
  ]
}

@mascardoso svg-sprite-loader is not a babel plugin, it's a webpack loader. Please follow the configuration readme section to setup it properly.

@kisenka this is probably a different topic for me then... but if I use only webpack config and SSR I get the following error when importing an svg: "ReferenceError: React is not defined",. There's also a ticket here

Hi @kisenka here is the repo https://github.com/girwin575/testrepo
Node.js version: 7.10.1
webpack version: 3.7.1
svg-sprite-loader version: 3.3.1
OS type & version: OS X El Capitan - 10.11.6
I hope this helps?

@girwin575 you're trying to import loader instead of plugin here:
const SpriteLoaderPlugin = require('svg-sprite-loader');

should be
const SpriteLoaderPlugin = require('svg-sprite-loader/plugin');

Thanks @kisenka whilst you have the repo may I ask the fact I have
    module: {         rules: [             {                 test: /\.svg$/,                 loader: 'svg-sprite-loader',                 include: path.resolve(svgDir),                  options: {                     extract: true,                     spriteFilename: 'flags-sprite.svg'                 }             }         ]     },
Does that mean I should have a local copy of my flags-sprite.svg in my repo now? As I can't see it.

@girwin575 you can't see it because you have no svg imports in your code. Add import shareId from './assets/share.svg'; in app.js.
Also you have an error in webpack.config.js#2, leading slash should be removed in /src/assets:
+ const svgDir = path.resolve(__dirname, 'src/assets');

Fantastic, thanks for the help @kisenka


[MINOR] Improve RollbackToInstantTimeProcedure

Change Logs
improve RollbackToInstantTimeProcedure
Impact
NA
Risk level (write none, low medium or high below)
none
Documentation Update
NA
Contributor's checklist

[ ] Read through contributor's guide
[ ] Change Logs and Impact were stated clearly
[ ] Adequate tests were added if applicable
[ ] CI passed

Can we elaborate a little what are we try to improve here?

Can we elaborate a little what are we try to improve here?

updated


Indeterminate checkbox?

Is there a built-in way to create a checkbox that can be indeterminate? I'm currently assuming that I'd have to make a component for this.

As a side note, does Ractive expose a 'keypathIsTruthy' function...something that works exactly the same as the templating engine? Right now the component file for doing this is pretty darn simple, but I want to make sure the behavior is as close to standard as possible.

I think it depends on context. A block {{#if foo}} has rules like [] is false. Here's the checkbox logic.

For now I've just got this component:
<input type="checkbox" on-change="update()" />
<script>
    var el;
    component.exports = {
        onrender: function() {
            el = this.find('input');

            this.observe('value', function (newVal) {
                if (newVal == null) {
                    el.indeterminate = true;
                }
                else {
                    el.checked = newVal;
                }
            });
        },
        update: function () {
            this.set('value', el.checked);
        }
    };
</script>

It seems to be working.

One way would be to not use two-way binding, since that's what's initialising the value: http://jsfiddle.net/rich_harris/pnnwfqn2/
A couple of things to be aware of with your code example above - by declaring el outside the component methods, you'd run into problems if you had any additional instances because they'd all share the reference. I often have things like this.input = this.find('input') inside my onrender function, so that I can have per-instance references.
Also, there's already a Ractive.prototype.update method - methods are overridable by design, just be aware that it might confuse anyone else who uses the component!
Apologies if both those are obvious and that was just a simplified example :)

No the shared el was just the result of writing it too quickly. I only needed one, so I wouldn't have caught it either. Thanks.
The update error was just a "still new to Ractive" bug.  Thanks for the instruction and the demo of turning two-way off. Never even occurred to me.


Fix typo and delete unnecessary space

Github -> GitHub

@changeworld : Thanks for your contribution! The author, @spelluru, has been notified to review your proposed change.


feat(elasticache/serverless): Add endpoint and reader_endpoint connec…

…tionDetails

Description of your changes

Adds connection details for ServerlessCache instances.
Fixes #1568
I have:

[x] Read and followed Crossplane's contribution process.
[ ] Run make reviewable to ensure this PR is ready for review.
[ ] Added backport release-x.y labels to auto-backport this PR if necessary.

How has this code been tested

/test-examples="examples/elasticache/v1beta1/serverlesscache.yaml"

Here are some references to make help make sure that I got this correct:

Terraform attribute reference: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/elasticache_serverless_cache#endpoint-block

Implementation inspired by the almost identical memorydb config: https://github.com/crossplane-contrib/provider-upjet-aws/blob/main/config/memorydb/config.go#L18-L33

Close, but not quite:
Name:         platform-valkey-redis
Namespace:    platform
Labels:       <none>
Annotations:  <none>

Type:  connection.crossplane.io/v1alpha1

Data
====
endpoint_0_address:         64 bytes
reader_endpoint_0_address:  64 bytes

I'm guessing that the type is not quite right on the port.

@turkenf - this is ready for review 🎉


Fix manual code processing in Python matter_testing_support

Problem

Leading zeroes in manual pairing code were lost due to a conversion bug, which prevented proper usage
Found during plugfest

This PR changes

Avoids a round trip that removed leading zeroes and fixes the conversion to be lossless while retaining structural validation.
Allows spaces in passcode.

Testing done

Executed TC_DeviceBasicComposition with a --manual-code having leading zeroes, against chip-lighting-app.
Regression tests of TC_*.py

LGTM


Issue trying it out locally

Hey Great job open sourcing this, it is really cool!
I have got an issue trying this locally, added some env variables to help running everything and changed the database url and everything however, my sole issue here is I get I go to http://localhost:4000/admin, I get
Unhandled Runtime Error
Error: An error occurred when loading Admin Metadata

Here is a screenshot that shows the error, tried visiting keystone github repo but had no chance solving this issue.
Have you ever faced this issue? or could you help me out try to figure out what is going on ? Thanks in advance and again great work!

Hi @mstfash glad you can find the project useful!
You will need to access the admin UI through the port that the nextjs site is running on (default http://localhost:3000/admin you need to have both the frontend and keystone running at the same time, this is because the Admin UI uses the Graphql API served from the Frontend next app.


Choose the object-storage

Investigate and decide

Plasma
Redis
DAOS
Tarantool
Minio
?

Link to AB#7

I can't tell what this is about. Closing as stale.


Ugrade backend question

I have some trident backends for which I would like to introduce new attributes to limit the size of the volumes that are generated. The parameters in question are the following: limitAggregateUsage and limitVolumeSize. Could there be any impact or disruption as far as the pods present?
I guess not, but would like to confirm.
Thanks

Hello, @mmcalcagni.  No, those parameters are applied only when provisioning new volumes.

Closing this issue as answered.


dotnet repos without a package

This page:
https://docs.github.com/en/packages/guides/configuring-dotnet-cli-for-use-with-github-packages
is helpful if the repo owner has created a GitHub package. However not all projects do that, example:
https://github.com/BackInBash/DeezerAPI
so how would one install from a GitHub repo that has not created a package?

Here is what I came up with. First download the Zip file from GitHub and extract. Then navigate to the directory containing Something.csproj. Then run:
dotnet pack -o ..

Then navigate out of this package, and run:
dotnet new console -o myApp

Finally, run:
dotnet add package Something -s ..

https://docs.microsoft.com/nuget/quickstart/create-and-publish-a-package-using-the-dotnet-cli

Thanks for opening an issue @89z! I'll triage this for the team to take a look 👀

Hello @89z ! Thanks very much for reaching out.
I can see how this information would be useful in some contexts. However, the documentation page in question is specifically about GitHub Packages and because of this we believe that including your suggested information would distract from the intended use for the page. It would also not be properly searchable if we kept this information in this page. For these reasons, this isn't a change that we would accept. If you find a better place for this information, please do open a new issue.
In the future, please fill out the issue template. This helps us triage issues more efficiently which allows us to get back to people faster, merge PRs more rapidly, and spend less time on the overhead of keeping things neat and tidy.
Thanks very much for your passion and interest in improving the GitHub Documentation!


bump k8s deps to 0.26 and bump generated code to include 1.26

Release note:
bump k8s deps to 0.26

In CI, when we use the latest go-boringcrypto compiler (currently Go 1.18), this PR fails to compile. The error is:
#17 28.37 # k8s.io/component-base/metrics
#17 28.37 /go/pkg/mod/k8s.io/component-base@v0.26.0/metrics/registry.go:35:29: undefined: atomic.Bool
#17 28.37 note: module requires Go 1.19

It seems that this k8s package is using a new atomic.Bool type that only exists in Go 1.19: https://github.com/kubernetes/kubernetes/blob/v1.26.0/staging/src/k8s.io/component-base/metrics/registry.go#L35

Updated the tips build to use Go 1.19 in this PR to avoid the issue mentioned above.

I created #1376 to capture removing psets in favor of k8s.io/apimachinery/pkg/util/sets (amongst other things)


fix: logo url

In my environment, the logo was not displayed correctly.
Therefore, the URL has been corrected.
Before:

After:

Thank you @tamago324 !
I think the issues with the domain are now resolved so it should load properly now. Appreciate the fix though.

So there was a problem with Neovim's domain!
I just checked, and it's showing up no problem!
Thank you very much!


How do I troubleshoot routes?

I have a problem where calls to an URL sometimes hang. Nothing gets logged in the access log and the scriptblock in the route never gets executed. I Post this as a Question since I don't know if it is my fault or not.
In the log below, ContextID 6333d327-1874-1d7f-2e4a-df70f7698335 is a successful call and ContextID 7d73d055-4d3d-6013-e368-ae9f8b4f6e80 is where it failed
[Verbose]: [ContextId: 6333d327-1874-1d7f-2e4a-df70f7698335] Received request
[Verbose]: [ContextId: 6333d327-1874-1d7f-2e4a-df70f7698335] Sending response
[Verbose]: [ContextId: 6333d327-1874-1d7f-2e4a-df70f7698335] Response sent
[Verbose]: [ContextId: 6333d327-1874-1d7f-2e4a-df70f7698335] Request disposed
[Verbose]: [ContextId: 6333d327-1874-1d7f-2e4a-df70f7698335] Response disposed
[Verbose]: [ContextId: 7d73d055-4d3d-6013-e368-ae9f8b4f6e80] Received request
[Verbose]: [ContextId: 7d73d055-4d3d-6013-e368-ae9f8b4f6e80] Sending response
[Verbose]: [ContextId: 7d73d055-4d3d-6013-e368-ae9f8b4f6e80] Response sent
[Verbose]: [ContextId: 7d73d055-4d3d-6013-e368-ae9f8b4f6e80] Response disposed
[Verbose]: [ContextId: 7d73d055-4d3d-6013-e368-ae9f8b4f6e80] Socket listening
[Verbose]: [ContextId: 7d73d055-4d3d-6013-e368-ae9f8b4f6e80] Sending response
[Verbose]: [ContextId: 7d73d055-4d3d-6013-e368-ae9f8b4f6e80] Response sent
[Verbose]: [ContextId: 7d73d055-4d3d-6013-e368-ae9f8b4f6e80] Request disposed
[Verbose]: [ContextId: 7d73d055-4d3d-6013-e368-ae9f8b4f6e80] Response disposed

How would I continue troubleshooting? Why would two different calls to the same route log so differently?
/Peter

Hi @grtswt,
how many threads are you running? Might be that your existing threads are busy while the new call comes in.

I'm using four threads. And I think in this case that only one was busy at this time.
Lets say that I use invoke-restmethod to call the URL. If the error occurs, then invoke-restmethod hangs forever.
Nothing gets logged and the routes scriptblock is not called.
If I press CTRL-C and break invoke-restmethod, then the scriptblock is called and the call is logged to the access_log.
It is as if Pode is still waiting for the request to finish sending.

That would explain why it goes back into "socket listening", it's still waiting for IRM to send all the data - or it thinks there's still more data.
What version of Pode, Powershell, and OS are you on? Are you using HTTP or HTTPS? Would you be able to give an example of the script that triggers this behaviour, plus the IRM call?
I have seen this before, and it was on Mac and HTTPS calls when the SSL Protocol was wrong.

I'm using
Pode 2.9.0
Windows server 2019
pwsh 7.3.9
APIServer

import-module Pode
#Import-Module -Name Pode.Kestrel
Import-Module -Name PSHTML
#Import-Module ActiveDirectory

$sysRoot = (get-item $PSScriptRoot).FullName

write-host "Starting"

#Start-PodeServer -ListenerType Kestrel -Threads 2 -Verbose  -RootPath "..\SystemConfig" {
Start-PodeServer -Threads 4 -RootPath $sysRoot {

    Add-PodeEndpoint -Address localhost -Port 8080 -Protocol Https -SelfSigned

    New-PodeLoggingMethod -File -Name 'access_log' -Path $sysroot |Enable-PodeRequestLogging
    New-PodeLoggingMethod -Terminal | Enable-PodeErrorLogging -Levels '*'

    New-PodeAuthScheme -Basic | Add-PodeAuthUserFile -Name 'Login'  -Sessionless

    $CurrentThreads = [System.Collections.Concurrent.ConcurrentDictionary[int32,string]]::new()

    Add-PodeRoute -Method get -Path "/threads" -ContentType "text/html" -ArgumentList @($CurrentThreads) -ScriptBlock {
        param (
            [System.Collections.Concurrent.ConcurrentDictionary[int32,string]]
            $CurrentThreads
        )
        $str = "[{0}] Thread {1} This thread" -f [datetime]::now.tostring("yyyy-MM-dd HH:mm:ss.fff"),[System.Threading.Thread]::CurrentThread.ManagedThreadId,$webevent.path
        $adder = $updater = { return Write-Output $str -NoEnumerate }
        $CurrentThreads.AddOrUpdate([System.Threading.Thread]::CurrentThread.ManagedThreadId, $adder, $updater)

        $html = html {
            head {
                Title "Current threads"
                style "table, th, td {border: 1px solid black; border-collapse: collapse;}"
            }
            body {
                H1 "Current threads and their action"
                table {
                    Thead { tr {th "TID";th "Action"} }
                    Tbody {
                        foreach ($t in $CurrentThreads.GetEnumerator()) {
                            tr {td $t.key;td $t.Value}
                        }
                    }
                }
            }
        }

        $str = "[{0}] Thread {1} sleeping" -f [datetime]::now.tostring("yyyy-MM-dd HH:mm:ss.fff"),[System.Threading.Thread]::CurrentThread.ManagedThreadId
        $adder = $updater = { return Write-Output $str -NoEnumerate }
        $CurrentThreads.AddOrUpdate([System.Threading.Thread]::CurrentThread.ManagedThreadId, $adder, $updater)

        Write-PodeHtmlResponse -Value $html -StatusCode 200
    }

    add-poderoute -Path "/test" -Method Get -Authentication 'Login' -argumentlist @($CurrentThreads) -ScriptBlock {
        param([System.Collections.Concurrent.ConcurrentDictionary[int32,string]]$CurrentThreads)
        $str = "[{0}] Thread {1} executing {2}" -f [datetime]::now.tostring("yyyy-MM-dd HH:mm:ss.fff"),[System.Threading.Thread]::CurrentThread.ManagedThreadId,$webevent.path
        $adder = $updater = { return Write-Output $str -NoEnumerate }
        $CurrentThreads.AddOrUpdate([System.Threading.Thread]::CurrentThread.ManagedThreadId, $adder, $updater)

        #Just log the request
        write-podehost ("{0} received {1}(PID={2};TID={3})" -f [datetime]::now.ToString("HH:mm:ss.fff"),$webevent.query["call"],$PID,[System.Threading.Thread]::CurrentThread.ManagedThreadId)
        Write-PodeTextResponse -Value ("Received call {0}" -f $webevent.query["call"]) -ContentType "text/plain" -StatusCode 200

        # Do nothing else
        $str = "[{0}] Thread {1} sleeping" -f [datetime]::now.tostring("yyyy-MM-dd HH:mm:ss.fff"),[System.Threading.Thread]::CurrentThread.ManagedThreadId
        $adder = $updater = { return Write-Output $str -NoEnumerate }
        $CurrentThreads.AddOrUpdate([System.Threading.Thread]::CurrentThread.ManagedThreadId, $adder, $updater)
    } |out-null
}

Query loop:
[string]$userName = 'test'
[string]$userPassword = 'test'

# Convert to SecureString
[securestring]$secStringPassword = ConvertTo-SecureString $userPassword -AsPlainText -Force
[pscredential]$cred = New-Object System.Management.Automation.PSCredential ($userName, $secStringPassword)

$url = "https://<IP_ADDRESS>:8080/test?call={0}"

ForEach($i in 1..10000) {
    "Calling $i"
    Invoke-RestMethod -Uri ($url -f $i) -Method get -Credential $cred -ResponseHeadersVariable rh -SkipCertificateCheck
    "Call {0} finished, ContextID: {1}" -f $i, ($rh.'X-Pode-ContextId' -join " ")
}

I tested the above in two different windows and the query loop hung on:
4578 finished ContextID: 33a866ae-e8f2-8738-df87-b56e00cb5aee
Calling 4579
Received call 4579
4579 finished ContextID: bec4df88-8490-9da8-0f7b-e2b76536e542
Calling 4580

That means that irm had not finished.
in the apiserver window the following was showing:
[Verbose]: [ContextId: 33a866ae-e8f2-8738-df87-b56e00cb5aee] Received request
14:46:14.277 received 4578(PID=14640;TID=47)
[Verbose]: [ContextId: 33a866ae-e8f2-8738-df87-b56e00cb5aee] Sending response
[Verbose]: [ContextId: 33a866ae-e8f2-8738-df87-b56e00cb5aee] Response sent
[Verbose]: [ContextId: 33a866ae-e8f2-8738-df87-b56e00cb5aee] Request disposed
[Verbose]: [ContextId: 33a866ae-e8f2-8738-df87-b56e00cb5aee] Response disposed
[Verbose]: [ContextId: b17212e9-1c1c-cfaf-825a-d28f7046494b] Received request
[Verbose]: [ContextId: b17212e9-1c1c-cfaf-825a-d28f7046494b] Sending response
[Verbose]: [ContextId: b17212e9-1c1c-cfaf-825a-d28f7046494b] Response sent
[Verbose]: [ContextId: b17212e9-1c1c-cfaf-825a-d28f7046494b] Request disposed
[Verbose]: [ContextId: b17212e9-1c1c-cfaf-825a-d28f7046494b] Response disposed
[Verbose]: [ContextId: bec4df88-8490-9da8-0f7b-e2b76536e542] Received request
14:46:14.323 received 4579(PID=14640;TID=48)
[Verbose]: [ContextId: bec4df88-8490-9da8-0f7b-e2b76536e542] Sending response
[Verbose]: [ContextId: bec4df88-8490-9da8-0f7b-e2b76536e542] Response sent
[Verbose]: [ContextId: bec4df88-8490-9da8-0f7b-e2b76536e542] Request disposed
[Verbose]: [ContextId: bec4df88-8490-9da8-0f7b-e2b76536e542] Response disposed
[Verbose]: [ContextId: 77e5e9f8-7256-0b39-07ef-d4805ee345cd] Received request
[Verbose]: [ContextId: 77e5e9f8-7256-0b39-07ef-d4805ee345cd] Sending response
[Verbose]: [ContextId: 77e5e9f8-7256-0b39-07ef-d4805ee345cd] Response sent
[Verbose]: [ContextId: 77e5e9f8-7256-0b39-07ef-d4805ee345cd] Request disposed
[Verbose]: [ContextId: 77e5e9f8-7256-0b39-07ef-d4805ee345cd] Response disposed
--- CTRL-C ---
[Verbose]: [ContextId: ad1db8ba-e909-457d-6401-0f8208ec4c6a] Received request
14:59:32.706 received 4580(PID=14640;TID=47)
[Verbose]: [ContextId: ad1db8ba-e909-457d-6401-0f8208ec4c6a] Sending response
[Verbose]: [ContextId: ad1db8ba-e909-457d-6401-0f8208ec4c6a] Request disposed
[Verbose]: [ContextId: ad1db8ba-e909-457d-6401-0f8208ec4c6a] Response disposed

It had stopped on the CTRL-C. When I pressed CTRL-C in the query loop window, the rows below CTRL-C appeared in the server window.

Thanks!
I am able to reproduce the hanging with the above. Just to make sure, what happens if you drop HTTPS? Ie:
Add-PodeEndpoint -Address localhost -Port 8080 -Protocol Http

When I do this, I can't get it to hang any more. Is this the same for you as well? If so, I'll have to do some debugging around where the request stream is being read in 🤔


I want to use this datepicker with veevalidate, it would be nice if this feature will be added

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.

You can use it, either with composition API, useField or use provided Field component in dp-input slot

I'm trying to use veevalidate 4 with this component. Value binding is working well but about text-input i don't know how can i do.
Here is my code:
<Datepicker
            v-model="date"
            :clearable="false"
            dark
            :enable-time-picker="false"
            :format="format"
            range
            text-input
          >
            <template #dp-input="{ value }">
              <Field
                id="date"
                class="mt-1 w-full rounded-md bg-page-foreground p-2 ring-primary-accent transition-all duration-200 focus:ring-1 dark:bg-dark-foreground"
                :class="!errors.date ? 'ring-primary-accent' : 'ring-red-500'"
                :label="$t('labels.date')"
                :model-value="value"
                name="date"
                :rules="{
                  required: true,
                  regex:
                    /^([0-9]{1,2})\/([0-9]{1,2})\/([0-9]{4}) - ([0-9]{1,2})\/([0-9]{1,2})\/([0-9]{4})$/,
                }"
                type="text"
                validate-on-input
              />
            </template>
          </Datepicker>

Maybe i can use onInput but how?

@YusufcanY Yes, this slot exposes onInput, you just pass native input event as a parameter and call a function, for example @input="onInput($event)"

Is there a way to use Vee-Validate with having to re-define the entire in the slot?


Updates to latests versions, notably Spring Boot 2.1.9 and Armeria 0.94

google's mirror doesn't seem to be up to date https://maven-central.storage-download.googleapis.com/repos/central/data/

reverted spring boot 2.1.9. we can do that next time


Clip and Scale fitmodes do the same

Why the fitmodes Clip and Scale get the same result??

same

Hi @DrewKiino , @Casporro , do you have a sample image I can take a look with?

I was about to report a bug with .clip, but its probably the same issue raised here
If I have an image that is 800x1100  and I tell Toucan to clip it to 1200x1200, I was expecting to get an image that was 872x1200 (the maximum dimension is 1200), but I actually get an image thats 1200x1650 (the minimum dimension is 122)
I fixed this in resizeImage with the following
public static func resizeImage(_ image: UIImage, size: CGSize, fitMode: FitMode = .clip) -> UIImage {

    ...
    let scaleRatio = fitMode == .clip ? min(heightRatio, widthRatio) : max(heightRatio, widthRatio)
    ...
}

Actually, the FitMode enum could be named to better to mirror UIImageView.contentMode
.crop is should stay as .crop
But
.scale is .scaleToFill
.clip is currently .scaleAspectFill  but I think it should be .scaleAspectFit
Maybe you should have both

Proposed a PR using @fraserscottmorrison solution which works great for solving clipping ratio.


build error: do_overlays()

I am attempting to build the raspberrypi4-64 MACHINE on an Ubuntu 22.04 machine. Tried to run both the 'barys' and 'balena_build.sh' scripts, and they're both failing at the same place (see error message below):
ERROR: linux-raspberrypi-1_5.15.92+gitAUTOINC+e1b976ee4f_14b35093ca-r0 do_compile: Error executing a python function in exec_func_python() autogenerated:
The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_func_python() autogenerated', lineno: 2, function:
0001:
*** 0002:do_overlays(d)
0003:
File: '/work/build/../layers/meta-balena-raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend', lineno: 24, function: do_overlays
0020:        overlays.append(re.sub(r'-overlay.dts','.dtbo',overlay).split('dts/')[-1])
0021:    for dtbo in overlays:
0022:        d.setVar('KERNEL_DEVICETREE', d.getVar('KERNEL_DEVICETREE', True) + ' ' + dtbo)
0023:
*** 0024:    f = open(d.getVar('DEPLOY_DIR_IMAGE') + '/overlays.txt', "w")
0025:    f.write(d.getVar('KERNEL_DEVICETREE', True))
0026:    f.close
0027:}
0028:
Exception: FileNotFoundError: [Errno 2] No such file or directory: '/work/build/tmp/deploy/images/raspberrypi4-64/overlays.txt'
Should I be on another branch (or a different commit/tag). I am especially interested in using kirkstone compatible layers (and this repo seems to be the most up to date).
Thanks,
Sidd

Quick update: I was able to get past this error by making the directory in question:
mkdir -p /work/build/tmp/deploy/images/raspberrypi4-64/
and restarting the build. Obviously not a permanent fix, but maybe something to help diagnose the issue ?

hi @delhiryder I am using Ubuntu 22.04.2 LTS (Jammy Jellyfish) natively and the current master branch of the balena-raspberrypi repository builds without issues.
Could you please try to bitbake -c cleanall virtual/kernel and try again?

Can't reproduce.

I've run into this on a clean build as well:
ERROR: linux-raspberrypi-1_5.15.92+gitAUTOINC+e1b976ee4f_14b35093ca-r0 do_compile: Error executing a python function in exec_func_python() autogenerated:

The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_func_python() autogenerated', lineno: 2, function: <module>
     0001:
 *** 0002:do_overlays(d)
     0003:
File: '/home/majorz/balena-raspberrypi/build/../layers/meta-balena-raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend', lineno: 24, function: do_overlays
     0020:        overlays.append(re.sub(r'-overlay.dts','.dtbo',overlay).split('dts/')[-1])
     0021:    for dtbo in overlays:
     0022:        d.setVar('KERNEL_DEVICETREE', d.getVar('KERNEL_DEVICETREE', True) + ' ' + dtbo)
     0023:
 *** 0024:    f = open(d.getVar('DEPLOY_DIR_IMAGE') + '/overlays.txt', "w")
     0025:    f.write(d.getVar('KERNEL_DEVICETREE', True))
     0026:    f.close
     0027:}
     0028:
Exception: FileNotFoundError: [Errno 2] No such file or directory: '/home/majorz/balena-raspberrypi/build/tmp/deploy/images/raspberrypicm4-ioboard/overlays.txt'

ERROR: Logfile of failure stored in: /home/majorz/balena-raspberrypi/build/tmp/work/raspberrypicm4_ioboard-poky-linux/linux-raspberrypi/1_5.15.92+gitAUTOINC+e1b976ee4f_14b35093ca-r0/temp/log.do_compile.907269
ERROR: Task (/home/majorz/balena-raspberrypi/build/../layers/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_5.15.bb:do_compile) failed with exit code '1'

Should be fixed by https://github.com/balena-os/balena-raspberrypi/pull/1105


Unwrap ProgressFinish

This changes default behavior - now a progress bar without an explicitly set on_finish will call finish, when previously it would call finish_and_clear (src/style.rs:103). Also, on_finish won't be reset every time finish_with_style is called.

Thanks for the PR -- can you explain why you think these changes represent an improvement?
And also, would you mind going over your other open PRs to see if they are still relevant/useful?

I'm working on #192, probably will update today, and #132 will be obsolete once I finish another PR, no eta on it though. #256 I have currently postponed and will do some refactoring before returning to it.

I agree about changing the default finish behavior but didn't want to change ProgressFinish::default without feedback. Changed it now to keep the same behavior.
I find it surprising that on_finish is reset after finish_with_style. I think this is the expected behavior from an end user perspective.


Request for Initial Release to Indicate Available Versions

Hello,
I noticed that there are no releases published in this repository yet. Releasing a version would help users easily identify and access the available versions, especially for those not tracking the repository's commit history. Could you please publish a release to clearly indicate the latest stable version for users? This would make it much easier to integrate the project into other workflows.
Thank you!

Added https://github.com/RevenantX/LiteEntitySystem/releases/tag/1.0.0


No more redundant comments

When go through the EntityFrameworkCode source code, I just want to figure out what's the use case for some class,or function ,and try to dive in and get more details, but frequently encounter like this comment :
"  This API supports the Entity Framework Core infrastructure and is not intended to be used
directly from your code. This API may change or be removed in future releases."
Why not save the space, fill with more intrinsic details?

@symphony2014 API documentation takes time to write and maintain. We do this for public API where many people will benefit from it. For internal APIs where the primary consumption is people reading the source code we prefer instead to let the code do the talking.
That is not too say it wouldn't be useful to document at least some of these APIs, but its a lot lower priority than many other things we could be working on, so in reality it is very unlikely to happen.


Accudraw and simulate motion

Fix issue with simulating a motion event not using the current unadjusted cursor location.
Change release tags for AccuDraw methods to enable/disable for session.
Added new AccuDrawHintBuilder method to force processing of hints.
Change for Internal api usage

@mergifyio backport release/4.11.x

@tcobbs-bentley Any idea on the iOS test failures?

@tcobbs-bentley Any idea on the iOS test failures?

I'm not sure; investigating.

@bbastings @aruniverse Now that the latest published addon uses mobile Node 22, I'm able to reproduce these test failures locally, which strongly implies that there is something wrong with the Node 22 addon. I expect that fixing this will take me quite some time, so I recommend submitting a separate PR to disable the iOS Simulator backend unit tests yaml step. I can do that, or someone else can.

@bbastings @aruniverse Now that the latest published addon uses mobile Node 22, I'm able to reproduce these test failures locally, which strongly implies that there is something wrong with the Node 22 addon. I expect that fixing this will take me quite some time, so I recommend submitting a separate PR to disable the iOS Simulator backend unit tests yaml step. I can do that, or someone else can.

Please do it.

@bbastings The PR to disable the iOS Simulator core backend tests merged, so I updated this PR from master, which should fix the problem.


Update F&Q.html - footer added in F&Q page

Related Issue
None
Fixes:  #1311
Description
The footer is now on the FAQ page. As a result, the page have a consistent footer section like the other pages.

Type of PR

[x] Bug fix
[x] Feature enhancement
[ ] Documentation update
[ ] Other (specify): _______________

Screenshots / videos (if applicable)
Before

After

Checklist:

[x] I have made this change from my own.
[ ] I have taken help from some online resources.
[x] My code follows the style guidelines of this project.
[x] I have performed a self-review of my own code.
[x] I have commented my code, particularly in hard-to-understand areas.
[ ] I have made corresponding changes to the documentation.
[x] My changes generate no new warnings.
[x] I have tested the changes thoroughly before submitting this pull request.
[x] I have provided relevant issue numbers and screenshots after making the changes.

@pc-daukiya

This is showing in preview.Please see the conflicts . Resolve the conflicts .

@pc-daukiya Are you working on it

@PriyaGhosal no

I completed this already

@pc-daukiya Please see the conflicts

@pc-daukiya Please see the conflicts . Resolve the conflicts . Ensure you pull all the latest changes before pushing your feature/bug fixes to the main branch. After resolving the conflicts, please open a new PR for review.
Thank you!


Allows token-syncer to update previously soft-deleted tokens

Changes proposed in this PR

avoid clearing out existing token metadata for soft-deleted tokens

Why are we making these changes?
We would like the token syncer to be able to sync tokens.

Can we explain why this was a problem?  On the surface, it seems it might be correct that we would not stick soft-deleted tokens in the previous metadata.

You're right, it seems correct that a soft-deleted token should not show up in the previous metadata. I've changed the syncer to handle updating soft-deleted tokens.

Ready for review.


Add note about segment.ms to log cleaner docs

We were bitten by missing the essential segment.ms configuration option when using log compaction. Add a note about that to the "Configuring The Log Cleaner" section of the documentation.

Sorry, my editor removed some redundant whitespace from some lines.

@hachikuji Thanks for the feedback, I've made some changes based on it.

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-test-coverage/275/

@hachikuji Is it a problem that the default build step failed? I'm not adding tests since this is just a change to the docs.


Nerd Font 3 Issue

Nvy: v0.3.5
NeoVim: 0.9 (also occurs with 0.10-dev)

With the upgrade to Nerd Fonts 3, I am facing issues with the material design symbols.
Other symbols are working fine, it seems to be related with the material design category (educated guess as of now):
May be related to one of their breaking changes: https://github.com/ryanoasis/nerd-fonts/issues/365.
For example with nf-md-close_circle_outline (0xf015a) [1], Nvy is not displaying it correctly.
If the text gets selected, the symbol gets rendered correctly.
As soon as the visual mode is exited, the symbol is again not displayed properly.

The symbol itself works fine with Windows Terminal, nvim-qt and Neovide.
[1] https://www.nerdfonts.com/cheat-sheet

I've tried to debug this and have come to the same conclusion that the spec says:
The right cell of a double-width char will be represented as the empty string. Double-width chars never use repeat.
However this right cell is never sent, we never receive the empty string.
As a general note, Nvy was not written with unicode characters in mind so it has some pretty naive handling of these surrogate pairs and unicode characters. Maybe at some point a larger rewrite is warranted with this in mind, however for most purposes it seems that this simple handling is enough. I suspect nvim-qt and Neovide detect and handle these unicode characters without the help of the second empty string being sent from neovim.

This should be fixed by #97. I tested with nf-md-close_circle_outline in a couple of Nerd Fonts, and everything looked good.

Closed via #97


Add example for OrderedSet subtract.

Add an example for subtract().

Awesome, thanks!

@leebyron Doesn't look like this went live. Is there a syntax error I missed?
https://facebook.github.io/immutable-js/docs/#/OrderedSet/subtract


OnceCell for Jwks fetching

Also fixed default_features deprecation warning on chrono dep.

Hey @x04, thanks for the contribution, but we've intentionally chosen to not use tokio in this project since it locks anyone who might use the project into the same async runtime. The current code is agnostic of the underlying async backend being used, which means it's compatible with tokio, async-std, and any other runtime people may choose to use.
The current solution should be sufficient and work with any runtime, but if you have a use case where it's not working well for you, we'd love to hear about it and brainstorm a way to make this better.

@logan-stytch you use reqwest which "requires" tokio, unless you use the tokio1 compatibility feature of async-std. Also I used tokio with only the sync feature enabled, which is entirely compatible async-std regardless of the tokio1 feature, unlike the reqwest dependency. I have created an example to show this.
use tokio::sync::OnceCell;

static ONCE: OnceCell<u32> = OnceCell::const_new();

#[async_std::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // this will work regardless of `tokio1` feature
    let cell: OnceCell<i32> = OnceCell::new();
    let cell_value = cell.get_or_init(|| async { 1234 }).await;
    println!("{}", *cell_value);

    // comment this to not crash when `tokio1` feature is not enabled
    let resp = reqwest::get("https://httpbin.org/get").await?;
    assert!(resp.status().is_success());

    Ok(())
}

[package]
name = "reqwest-proof"
version = "0.1.0"
edition = "2021"

[dependencies]
async-std = { version = "1", features = ["tokio1", "attributes"] }
tokio = { version = "1", features = ["sync"], default-features = false }
reqwest = "0.12"

If you disable the tokio1 feature on async-std this will crash on the httpbin fetch. However the OnceCell still works.

@x04, interesting, and thanks for the example. I had thought that our usage of reqwest only needed tokio when using the default-tls feature, but perhaps that was incorrect. I apologize for the misunderstanding. Let me reopen this PR.

@x04 - sorry for the delay in review here. If you wouldn't mind, could you bump the version in Cargo.toml to 6.2.0? This PR looks good. We appreciate your contribution!


Fix HTTPS functional tests on macOS

HTTPS tests were using a self-signed certificate that had something weird about it that didn't work on Mac. Now I'm just using the other self-signed certificate in the repo and that works.
HttpClientSlim was copied from Kestrel because HttpClient doesn't work on Mac with self-signed certs after switching to Apple's own security libs. cc @stephentoub @bartonjs
I should move HttpClientSlim to https://github.com/aspnet/Testing but for now this unblocks the CI.

@mikeharder Oops. Done.

Please file an issue to move HttpClientSlim to a central location to eliminate duplicate code.


Monitoring V2 Grafana has no storage

What kind of request is this (question/bug/enhancement/feature request):
Bug
Steps to reproduce (least amount of steps as possible):
Install rancher-monitoring with selected storage for grafana using Statefulset template.
Result:
No volume will be used for grafana.
Other details that may be helpful:
When you switch to edit the yaml before install, you can see, that the setting persistence.enabled: true is missing for grafana. Manually adding this will create the volume, but also it will not show to be selected in the rancher form when you try to upgrade.
Environment information

Rancher version (rancher/rancher/rancher/server image tag or shown bottom left in the UI):
v2.5.1/k8s 1.19.3
Installation option (single install/HA):
Single install

Cluster information

Cluster type (Hosted/Infrastructure Provider/Custom/Imported):
Machine type (cloud/VM/metal) and specifications (CPU/memory):
Kubernetes version (use kubectl version):

Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.2", GitCommit:"52c56ce7a8272c798dbc29846288d7cd9fbae032", GitTreeState:"clean", BuildDate:"2020-04-16T11:56:40Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.3", GitCommit:"1e11e4a2108024935ecfcb2912226cedeafd99df", GitTreeState:"clean", BuildDate:"2020-10-14T12:41:49Z", GoVersion:"go1.15.2", Compiler:"gc", Platform:"linux/amd64"}

Docker version (use docker version):

Nodes have version from 17.9.1, 18.9.0 and 19.3.5
Rancher server is docker version 17.03.2-ce

This should be a UI bug.
I hit the same error when installing Monitoring v2 in v2.5-61a8a3691063108bc775c8e4e6f6db971541c253-head

install Longhorn

install Monitoring v2 9.4.201

When installing monitoring v2, enable the persistent storage for Grafana

If we install it now, the persistent volume will NOT be created and used, which is because enabled: true is missing in the body of the PUT request. This can also be proved by viewing the installed rancher-monitoring app as YAML file

adding the missing enabled: true  part (by editing the YAML when installing or upgrading the app) solves the problem, but also brings another problem which is tacked here: https://github.com/rancher/rancher/issues/29639


Add pack-refs steps

Problem
For a large repository, and given some particular workflow, there are many refs(branches / tags) that user will have to deal with.
Too many unpacked-refs will lead to slowness in git for-each-ref, which is often used in developers' shell completions script. This, in turn, led to a sluggish User Experience when user want to checkout a branch/tag.
Proposal
Implement pack-refs steps in the background where git pack-refs --all is called routinely. This would help clean up loose refs, save the inodes and speed up for-each-ref call overall.

For me it speeds up fetch too

@sluongng @shalupov: Thank you for creating and commenting here. I'm finally getting around to putting this into core Git instead of Scalar. See https://github.com/gitgitgadget/git/pull/871 for more details. Thanks!


cleanup and cloud ready

I just deployed this into 'the cloud', using Docker.
You would probably want to remove .idea folder. Further refactoring and cleanups required.
Also, I see you have multiprocessing branch. I think it would be better to do asyncio, if you upgrade the project to Python 3.5, you can get async/await which is pretty sweet.

This is how it looks like:
https://gyazo.com/d93d1df54156c259783190d007cfe96e

Would like to see this cleaned up. A dockerized deployment to AWS would be awesome.


[T3A5][W14-A1]Abel Lim

Ready for review

Good job in extracting the task of formatting in general


Add PDF resize feature

@richard-llmnn I wasn't sure whether the reset button should reset to the original resolution or just reset the input fields to the values it was last resized to. What do you think?

@mlaadd
In my opinion the reset button should reset the values to the original resolution (as it is currently)
There are some bugs still available / strange behavior:

No unit it given for width and height (cm, mm, px, inch, ppi, dpi, ...)
If you select for example 'A4, then change one of the values and then reselect A4, the A4 width and height is not inserted!

Is it possible the scale down a pdf and later scale it up to its original width/height without quality loss?

I rebased the changes from master into this branch.

I fixed all the issues you mentioned.

Is it possible the scale down a pdf and later scale it up to its original width/height without quality loss?

That's default behaviour actually because it keeps everything at original resolution and just adjusts the "physical" size so to speak.


Implement a proof-of-concept setuptools plugin

This PR implements a simple setuptools plugin that adds a subcommand which can be invoked as
$ python setup.py pyproject

It will print out a very basic pyproject.toml file incorporating some pieces of information gathered by setuptools.

Had a look at the multiple-authors thing, seems it's a bit of an afterthought… apparently flit does handle this situation, but the original Python packaging system does not.
Ahh well, not a big worry anyway. :-)

Yeah, we'll figure it out.
FWIW I vaguely remember from working on a different package that PyPI has some problem with listing multiple people in the author field, that's why I didn't do it in my initial PR. I forget the details though. I guess we'll deal with that when we come to it. (Hopefully at some point they will add a way to pull the newer-format author metadata from pyproject.toml, which does allow multiple authors)


Clean Code

清理部分Code，对于不需要被继承的一般类加上final属性，修正部分注释，删除多余的空行，长switch更换，更换AvaritiaShader当中使用RenderStateShard的protected的字段为RenderStateShardAccess的private字段，增加RenderStateShardAccess内部类。
Clean up part of the Code, add final attributes to general classes that do not need to be inherited, correct some comments, delete redundant blank lines, replace long switches, replace the protected fields of RenderStateShard in AvaritiaShader with private fields of RenderStateShardAccess, and add the RenderStateShardAccess internal class .

Checks / 检查

[X] I confirm that I have searched for existing issues / pull requests before requesting to avoid duplicate requesting./我确认在报告之前我已经搜索了现有的问题或者拉取请求，以避免重复报告。
[X] I confirm that I noted that if I don't follow the instructions, the issue may be closed directly./我确认我已经检查，如果我不按照说明进行操作，该问题可能会被直接关闭。

Related Issues

Description

TO

TO

@cnlimiter

冲突了

冲突啦~


Make the instructions clearer

This page is very confusing. Can it be made more digestible? Each step should refer to an old project or a new project.
For instance:

From a source project clone the repo
Create a new empty repo in a destination project
Clone it to your local file system
update origin of the cloned project to a new repo
merge
push with/without history

cd destRepo
git checkout master
git remote add r1remote **url-of-srcRepo**
git fetch r1remote
git merge r1remote/master --allow-unrelated-histories
git push
git remote rm r1remote

Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: 795dbe37-ed87-714d-e5f1-4b85d6b0ed7a
Version Independent ID: 977de330-22d6-aa67-28b6-fe107c9a21b2
Content: Move Git repositories between projects - Azure Repos
Content Source: docs/repos/git/move-git-repos-between-team-projects.md
Product: devops
Technology: devops-code-git
GitHub Login: @vijayma
Microsoft Alias: vijayma

@polyakov-v -- thank you for your feedback and suggestion.  Please consider these resources:

Azure DevOps Services
Azure DevOps on Stack Overflow

@vijayma -- please look into this issue.


Interpolate simulation state at render time

This commit follows the suggestion from:
https://www.gafferongames.com/post/fix_your_timestep/
The problem is that the simulation is stepped with a fixed time step, as it
should be to maintain simulation stability. However, the time step of each game
loop may vary based on external factors to the physics engine. For example, if
the timestep is 1/60 but the game loop iterates at a faster rate, then the
physics simulation will appear to advance faster than real-time.
The idea for the solution is that the renderer / game loop 'produces' time, and
the simulation consumes it. As such, a new resource has been added to keep
track of the amount of time produced and consumed. It represents how far ahead
of the simulation the rendering is.
The step_world_system has been modified to add Time.delta_seconds to the
SimulationToRenderTime resource, and then if there is more than a time step of
time to simulate, we loop through stepping the simulation and subtracting the
simulation time step from the resource until there is less than a time step of
time remaining to simulate.
As noted in the article, if this was all we did then the motion of objects due
to physics would look jittery. We have to interpolate the positions and
orientations of simulated objects between each simulation step. The
sync_transform_system has been modified to lerp and slerp the position and rotation of
each body based on its previous and current simulation position and rotation.

All good, thanks!


Add basic performance test

Which Issue(s) this Pull Request Resolves

Related to #527 , #504
Release Note

NONE

Notes for Reviewers

Next steps are to publish the JSON results generated and to automate the execution into a job.

I introduced major changes, please review again

We are introducing a new language into the code base?  Is it necessary? We are now increasing the number of things potential contributors must know to contribute to KubeArchive.

We are introducing a new language into the code base?

Yes

Is it necessary?

Not at all, probably we can do something similar with Go based tools/scripts. Do you want me to look into changing the implementation and tools to Go?

I changed the implementation for metrics and stats to golang, locust is the last thing that needs Python to work. I will raise the issue Greg mentions in the next community meeting.

We decided its OK to assume to have Locust with a locustfile as the engine for performance tests. We will keep surrounding scripts as Golang to avoid using too many languages.


support for  8096 snapdragon flight

Hello all,
I wonder if there is any plan of the support for snapdragon flight with 820 chip, i.e. 8096 platform?
I see some code in the cmake files, but not sure if it is available.
Thank you very much.

Yes, we're working on it.


WEM<=>WAV breaks for alternate WEM format

Certain WEM formatting breaks the reader due to the reader expecting a set of unchanged values. The reader needs to be updated to dynamically adapt.
(Reported on behalf of user RaYRoD TV#7679)

Upd. Audio might be compressed?
Format flag is 0xFFFF instead of 0xFFFE so that could mean something. Need to investigate further.

Update: This also seems to break (audio) => WEM conversion for No Man's Sky. Repacking WEMs not for use in BNK packing (If the WEM is going into a BNK it's fine) will cause the audio files in question to be unplayable in No Man's Sky. This may transfer to other games too.

Status Update: WEM=>WAV has been fixed for this new format. The only thing left to do is convert WAV=>WEM (specifically for this format that was being difficult)

I've reduced the severity of this and will no longer be trying to resolve this problem due to the sheer diversity of WEM formats available and the lack of documentation on them.


Cant get Krita keyboard shortcut to respond to Txt2Img etc

Have tried using different combinations but no joy

Closing if theres no further issue


Merge alpha into dev

This merge of the alpha branch into dev brings a breaking change for backwards compatibility:
You cannot revert from this without losing a paired pod!
PR #277 "Port over pump loss fix via https://github.com/LoopKit/Loop/pull/1702" changes the storage of pump connection details from "UserDefaults" to binary plist files stored in the documents directory of the app. This is ported from Loop, and is an attempt to avoid a bug where the connection to a paired pod could be lost unexpectedly.
After having connected a pod with this version of the app, it is not possible to transfer the pod to an older version of the app, the connection to pod will be lost. It should be possible to recover by rebuilding a version that includes https://github.com/nightscout/Trio/commit/8a682e3f210651493629d49fa2724258f81eb0f5, this should bring the connected pod back.

Merged alpha into dev locally to test on a phone (iPhone 13 mini, iOS 17.5.1)

Builds ok ✅
Runs ok during brief testing with NS CGM and sim pump ✅
No uncommitted changes ✅

Merging with two approvals.


Only test part , and no trainval datasets inside ?

Much like the ImageNet validation set, there is currently only one publicly available set with labels. Perhaps in the future there will be a trainval set.


[JS] Repackage Genkit NPM packages

Describe the bug
genkit-cli should become the CLI. genkit should become the meta package for all Genkit framework packages (currently genkit-ai). npx create-genkit should become an alias for genkit init.

I've opened a PR to rename @genkit-ai scope to @genkit. Do we really want to rename genkit to genkit-cli?
To me at least, npm install -g genkit seems nicer than npm install -g genkit-cli

nvm, i see why it is useful to switch to -cli

duplicate https://github.com/firebase/genkit/issues/390


Add support for non breaking spaces

Hi
I've changed the way words are split in Text elements so that it respects non breaking spaces.
I feel like this should be the default way of handling this, so that's why I'm submitting this pull requests :-)
Thanks for your consideration
Thijs

Hi
This sounds very strange, I have a build of this at https://github.com/CatLabInteractive/EaselJS/tree/catlab-build and I'm already using this in our project at beta.quizwitz.com, so not sure why it wouldn't work? What is the error you are seeing?
Thanks
Thijs

Sorry, you are correct, it is not working at the moment. I'll see if I can fix it.

Sorry about this, it wasn't properly tested and I incorrectly copied the regular expression from https://developer.mozilla.org/nl/docs/Web/JavaScript/Guide/Regular_Expressions. Now it should be correct.

This was put in place without the Merge... not sure why but it was there when I looked.


MapInfoBox and event handling

I'd like to add an event handler to the MapInfoBox.  It looks like I would do that through the MapInfoBoxOptions.Actions.  However, the MapInfoBoxAction defines the EventHandler property as a string.  Am I missing something?  Is there another way to register for events?

I was able to determine what I was doing wrong.  I know understand that I need to register for a MapPushPin events using MapEvents.AddHandler(pin, "click", mapPinClickEventHandler);  And it's in that handler that I can display the MapInfoBox.

Having an issue with the event args but it's not related to the MapInfoBox so I'm going to close this issue and open a new one.


fix sorting partition columns

Hi.
I encountered the same problem... https://github.com/cequel/cequel/issues/272

@tarhashi, if you rebase against master the specs should pass. I'd be delighted to have this functionality once the tests are green.

Merged. Thanks for the fix.


Set up Coveralls

Hmm I'm down for testing, but I don't think our code base will be too big.
I think adding tests before the November 2018 milestone will slow us down.

We don't have to add tests immediately.


Enable Dlpar tests on PHYP systems

The patch will enable dlpar tests on PowerVM boxes

Add, Remove and move the PCI and SRIOV cards

Signed-off-by: Hariharan T.S<EMAIL_ADDRESS>

@harihare Thanks, you have implemented all the changes requested, as already discussed few more things

take none when the second lpar is not given. [p1]
Pre check if the given adapter is available or not [p1]
fix uninitialized output variable in dlpar_move [p1]
fix test suite to run hmc, phb,pci suite [p1]
Option to give mulitple pcids [p2]

@abdhaleegit As discussed I have fixed all the following issues

take none when the second lpar is not given. [p1]
Pre check if the given adapter is available or not [p1]
fix uninitialized output variable in dlpar_move [p1]
fix test suite to run hmc, phb,pci suite [p1]

Command to run the entire suite.
./op-test --run-suite DlparIO-suite -c  ./../../opconfig/ltcden11lp11.conf
tail log :
Ran 3 tests in 167.792s
OK
2021-08-18 07:48:07,245:op-test::INFO:Exit with Result errors="0" and failures="0"
2021-08-18 07:48:07,246:op-test.common.OpTestUtil:cleanup:INFO:OpTestSystem Starting to Gather ESEL's
2021-08-18 07:48:07,247:op-test.common.OpTestUtil:dump_versions:INFO:Log Location: /home/harihare/data/2021-opal/working/op-test/test-reports/test-run-20210818074328/debug
2021-08-18 07:48:07,247:op-test.common.OpTestUtil:dump_versions:INFO:
OpTestSystem Firmware Versions Tested
(if flashed things like skiboot.lid, may not be accurate)
Firmware Versions Unavailable

20210818074328.log
20210818021328570313.main.log
20210818021328570805.debug.log

The above execution is with out dlpar_move operation, Move operation is failed it may be a bug in HMC
hscroot@ltchmcv5:~> lshwres -r io -m ltcden11 --rsubtype slot --filter                    lpar_names=ltcden11-lp11-DLPAR -F lpar_id
11
hscroot@ltchmcv5:~> lshwres -r io -m ltcden11 --rsubtype slot --filter                    lpar_names=ltcden11-lp10-LPM -F lpar_id
No results were found.
hscroot@ltchmcv5:~> echo $?
0
for lp11, it return the lpar_id
where as for lp10 it is not returning the lpar_id, even the return code is 0, due to which the failure is also not addressed.

@harihare Thanks Hari, The test works fine for me

Sample Conf file
[op-test]
bmc_type=FSP_PHYP
bmc_ip=xxxxxx-fsp1.xxx.xxxxxx.xxx.xxx
bmc_username=dev
bmc_password=xxxxxx
host_ip=x.xx.xxx.xxx
host_user=root
host_password=xxxxxxxx
hmc_ip=x.xx.xxx.xxx
hmc_username=hscroot
hmc_password=xxxxxx
system_name=xxxxxxxx
lpar_name=xxxxxxxxxxxxxxxxxxx
#target_lpar_name=xxxxxxxxxxxxxxxxxxxx
lpar_prof=default_profile
host_cmd_timeout=36000
machine_state=OS
pci_device=0154:80:00.0
sriov=no
num_of_dlpar=1


is this typo ? STRATEGIES.NO_REFIX

https://github.com/nuxt-community/nuxt-i18n/blob/0fae93785dd41972e5d4eed4f6f453ba45015702/src/plugins/routing.js#L44

This question is available on Nuxt community (#c303)

Indeed. Thanks.


what is the key difference between Fastlane and xcode?

New Issue Checklist

[ ] Updated fastlane to the latest version
[ ] I have read the Contribution Guidelines

Issue Description
Complete output when running fastlane, including the stack trace and command used

You can use: --capture_output as the last commandline argument to get that collected for you

[INSERT OUTPUT HERE]
Environment
Please run fastlane env and copy the output below. This will help us help you :+1:
If you used --capture_output option please remove this block - as it is already included there.
[INSERT OUTPUT HERE]

iOS is operating system, fastlane is a tool for automation of application build and distribution.

My bad. question has been updated.

Xcode is an integrated development environment for macOS containing a suite of software development tools, fastlane is a tool for automation of application building and distribution that is using Xcode.

Thanks for answering @samratBasra, I'll close the issue for now 👍


windows dokanclean: Use registry breadcrumb

This is the change that will prevent us from uninstalling someone else's Dokan.
Also added a logger object.
@maxtaco @oconnor663

The c/i failures on OSX are fixed in master, I think a rebase will fix them.

Is there any good way to write some tests for this/

Made a pass through

RE: testing - that is what the -l switch is for, more or less. I don't think it's a good idea to write to that part of the registry as a routine test.


Refactor names

Follow https://github.com/go-gitea/gitea/pull/31381#pullrequestreview-2123549783
This PR only does "renaming":

Route should be Router (and chi router is also called "router")
Params should be PathParam (to distingush it from URL query param, and to match FormString)
Use lower case for private functions to avoid exposing or abusing

Likely needs a breaking label as it affects custom go templates. BTW I wouldn't call out such changes too prominently in the changelog as only a very small number of users even use custom go templates.

No, it isn't breaking. No template is changed.

I could help to resolve conflicts, just ping me if needed.

Likely needs a breaking label as it affects custom go templates. BTW I wouldn't call out such changes too prominently in the changelog as only a very small number of users even use custom go templates.

Technically, we don't consider breaking templates to be breaking as otherwise any PR modifying any template would be breaking

Likely needs a breaking label as it affects custom go templates. BTW I wouldn't call out such changes too prominently in the changelog as only a very small number of users even use custom go templates.

Technically, we don't consider breaking templates to be breaking as otherwise any PR modifying any template would be breaking

I meant renaming template helper functions and these were considered breaking in the past. But I misread the PR, it does not change any of them.


smarter template downloader

Overview
TL;DR
For embark new --template <name>, if <name> is unqualified (like typescript), embark calculates a <major>.<minor> branch name from its own version number. So these would be equivalent if the embark being used is version 3.2.2.
embark new --template typescript
embark new --template typescript#3.2

For testing purposes, I created a 3.2 branch on the typescript template (branched off the template's develop branch)
Notes
Qualified template names (such as git urls or shortcuts like --template embark-framework/embark-typescript-template) are not modified. Also, an unqualified name that specifies a commitish isn't modified, e.g. --template typescript#develop.
Before this PR lands in a published version of embark, we will need to make sure all of our templates have the expected branches/tags starting from that version. Whenever we publish a new minor version of embark, we will need to repeat the chore.
We will need to take care that patch releases of embark don't introduce changes that will result in broken templates for any embark versions in that minor release series. Likewise, updates to a minor version template branch should work for any matching embark version.
Questions
If a download fails because the auto-calculated branch doesn't exist, should another download be attempted for the template's default branch?
Cool Spaceship Picture

@jrainville I've made revisions such that for unqualified template names a download of the master branch is automatically attempted if a download of a <major>.<minor> branch fails. A message is printed before the 2nd download atttempt: 'Retrying with the master branch...'.


Avoid unnecessary binding of fused functions

Fused methods use __get__ to bind them to a class instance. However, there's no need to do the full binding process when just looking up a class attribute.
The main consequence is that for:
class C:
    def f(self, FusedType x):
        pass

C.f is C.f now returns True. This saves a bit of computation and also makes them pickleable by name (provided they're not in a closure or anything like that...)

Seems reasonable at first sight, but this intersection of language features has a high risk of low test coverage. We should make sure that fused classmethods are properly tested in the common usage patterns of classmethods in general.

I've added a few more tests to check my assumptions about how fused classmethods bind. Their general use seems to be tested fairly robustly in tests/run/fused_def.pyx so I think at least the common usage patterns are tested.

Thanks