Json

Challenge http://www.freecodecamp.com/challenges/waypoint-comment-your-javascript-code has an issue. Please describe how to reproduce it, and include links to screenshots if possible.

Please describe the bug or we will not know what to help with.

closing as stale. Please feel free to reopen if issue still persists.


How can I get hidden layer representation of the given data?

After training I want to extract the hidden layer representation of the given data instead of the final probabilities. How can I do it with Keras?

One simple way to do it is to use the weights of your model to build a new model that's truncated at the layer you want to read. Then you can run the ._predict(X_batch) method to get the activations for a batch of inputs.
Example:
# this is your initial model
model = Sequential()
model.add(Dense(20, 64, init='uniform'))
model.add(Activation('tanh'))
model.add(Dense(64, 1, init='uniform'))
model.add(Activation('softmax'))

# we train it
model.compile(loss='mse', optimizer='sgd')
model.fit(X_train, y_train, nb_epoch=20, batch_size=16)

# we build a new model with the activations of the old model
# this model is truncated after the first layer
model2 = Sequential()
model2.add(Dense(20, 64, weights=model.layers[0].get_weights()))
model2.add(Activation('tanh'))

activations = model2._predict(X_batch)

Note: I haven't tested it.

Thanks... :)

I've been trying to adapt the custom theano function part for the graph model for the past 5 hours with no luck. It seems I can't access the input layer without getting
Exception: The Graph container can only be used as a layer                 when it has exactly one input and one output.

Any suggestions how the intermediate representations can be accessed for graphs?

Hi,
I try to use activations = model2._predict(X_batch), but it seems there is no _predict function, is this a bug? Thanks.
File "/usr/local/lib/python2.7/dist-packages/Keras-0.1.2-py2.7.egg/keras/models.py", line 469, in predict
return self._predict_loop(self._predict, X, batch_size, verbose)[0]
AttributeError: 'Sequential' object has no attribute '_predict'

You need to compile your model first.
On 2 September 2015 at 12:17, xypan1232<EMAIL_ADDRESS>wrote:

Hi,
I try to use activations = model2._predict(X_batch), but it seems there is
no _predict function, is this a bug? Thanks.
File
"/usr/local/lib/python2.7/dist-packages/Keras-0.1.2-py2.7.egg/keras/models.py",
line 469, in predict
return self._predict_loop(self._predict, X, batch_size, verbose)[0]
AttributeError: 'Sequential' object has no attribute '_predict'
—
Reply to this email directly or view it on GitHub
https://github.com/fchollet/keras/issues/41#issuecomment-137218101.

I create the theano function to get the activations, that's easy. A function to get activations from any model at any layer can very easily be defined:
def get_activations(model, layer, X_batch):
    get_activations = theano.function([model.layers[0].input], model.layers[layer].get_output(train=False), allow_input_downcast=True)
    activations = get_activations(X_batch) # same result as above
    return activations

but it seems like there is no attribute called 'output' of any layers so I guess it is the 'get_output()' method that is supposed to be used. That works for me at least.

@damaha I am trying to get the weights of the hidden layers in a graph model. I used the function you have defined above. I got an error saying -- AttributeError: 'Graph' object has no attribute 'layers'
get_output() does not give the required output when using a graph model. Can you please share a code snippet of your implementation?
@fchollet Can you also please help. I am looking to save the weights so that I can create the image after the convolutions. I used model.save_weights to save a hdf5 file. But I am unable to convert that into a numpy array and save it as an image.

graph layers are called nodes

I have a CNN model where I do the softmax across channels (Ive made a costum activation function and pass it to convolutional2D to do this). Then I add a flatten() node to the graph and pass it to the pre-defined cross entropy loss function. To make this model fully convolutional i need to get the outputs before the flatten() node. So I define a function like the above but of course for graph. And since now the model is convolutional i should be able to give a larger input size than what I trained on.  I get the following error , do you have any idea how to fix it?
ValueError: Dimension 2 in Rebroadcast's input was supposed to be 1 (got 11 instead)
Apply node that caused the error: Rebroadcast{?,?,1,1}(GpuDimShuffle{1,0,2,3}.0)
Toposort index: 44
Inputs types: [CudaNdarrayType(float32, 4D)]
Inputs shapes: [(288, 5, 11, 21)]
Inputs strides: [(231, 66528, 21, 1)]
Inputs values: ['not shown']
Outputs clients: [[GpuElemwise{Add}[(0, 0)](Rebroadcast{?,?,1,1}.0, GpuDimShuffle{x,0,x,x}.0)]]

@damaha your function have some problem when I use a Merge layer as the first Layer of model, How could I solve it?

I see, I should pass the variable to the origin Sequence before it merged.

I have a Graph model and tried to get the output of the hidden layers using the method from the Keras FAQ
(feature1, feature2, feature3) = self.feature_to_nparray(feature)
feature1= np.array([feature1])
feature2= np.array([feature2])
feature3= np.array([feature3])
data = {'f1': feature1, 'f2': feature2, 'f3': feature3}
get_h1_output = theano.function([self.model.inputs[i].input for i in self.model.input_order],
                           self.model.nodes['h1'].get_output(train=False),
                           on_unused_input='ignore', allow_input_downcast=True)
get_softmax_output = theano.function([self.model.inputs[i].input for i in self.model.input_order],
                                    self.model.nodes['softmax'].get_output(train=False),
                                    on_unused_input='ignore', allow_input_downcast=True)
h1_output = get_h1_output(data)
softmax_output = get_softmax_output(data)

But I got the following error:
...
  File "C:\Anaconda\lib\site-packages\theano-0.7.0-py2.7.egg\theano\compile\function_module.py", line 786, in __call__
    allow_downcast=s.allow_downcast)
  File "C:\Anaconda\lib\site-packages\theano-0.7.0-py2.7.egg\theano\tensor\type.py", line 116, in filter
    data = theano._asarray(data, dtype=self.dtype)
  File "C:\Anaconda\lib\site-packages\theano-0.7.0-py2.7.egg\theano\misc\safe_asarray.py", line 33, in _asarray
    rval = numpy.asarray(a, dtype=dtype, order=order)
  File "C:\Anaconda\lib\site-packages\numpy\core\numeric.py", line 462, in asarray
    return array(a, dtype, copy=False, order=order)
TypeError: ('Bad input argument to theano function with name "Classifier.py:117"  at index 0(0-based)', 'float() argument must be a string or a number')

What does this error mean? Is there something wrong with the getting intermediate layer output code?
Thanks!

@xypan1232
I got the same for Keras 1.0.

AttributeError: 'Sequential' object has no attribute '_predict'

Changing to predict fixed it for me.

Hi all,
I'm wondering if there are any easy ways to access the internal states of LSTM, i.e. the c, for all the time steps of each input sequence? I can get the h by setting return_sequences=True, and I know h = o * self.activation(c). But I can not figure out an easy way to access the c.
Thanks!

Small changes have happened in Keras 1.0 and the function I posted earlier should be changed to this:
from keras import backend as K
def get_activations(model, layer, X_batch):
    get_activations = K.function([model.layers[0].input, K.learning_phase()], model.layers[layer].output)
    activations = get_activations([X_batch,0])
    return activations

layer being an integer index.
With the new functional API to define graph structured models you should be able to use the same function (above) in any defined model as long as you know the index of the layer you want hidden activations extracted from.

Got an error running the previous code.  Had to modify it so that output is also a list:
from keras import backend as K
def get_activations(model, layer, X_batch):
    get_activations = K.function([model.layers[0].input, K.learning_phase()], [model.layers[layer].output,])
    activations = get_activations([X_batch,0])
    return activations

In addition to setting up a test point at every layer I want to inspect, I have to run the batch through each test point separately?
Is there not a way to run one batch and get data from every test point?

I just ran into a situation where I was using the Functional API similar to the one described in http://keras.io/getting-started/faq/#how-can-i-visualize-the-output-of-an-intermediate-layer. Unfortunately, I did not have access to the inputs and encoded variables anymore, so that the proposed solution
encoder = Model(input=inputs, output=encoded)
X_encoded = encoder.predict(X)

was not possible. My situation was similar to this:
def get_model():
    inputs = Input(shape=(784,), name='input')
    encoded = Dense(32, activation='relu', name='encoded')(inputs)
    decoded = Dense(784)(encoded)
    model = Model(input=inputs, output=decoded)

def get_encoded(model, X):
    # Want to get encoder output here

model = get_model()
get_encoded(model, X)

Note that I manually named the relevant layers.
I was hoping a simple
input_layer = model.get_layer('input')
encoded_layer = model.get_layer('encoded')
encoder = Model(input=input_layer, output=encoded_layer)

would work, however since those are layers and not tensors an exception is thrown (https://github.com/fchollet/keras/blob/master/keras/engine/topology.py#L1545-L1549).
After digging up the source of Layer.__call__ (https://github.com/fchollet/keras/blob/master/keras/engine/topology.py#L489-L500) my workaround was
input_layer = model.get_layer('input')
encoded_layer = model.get_layer('encoded')

input_tensor = input_layer.inbound_nodes[-1].output_tensors[0]
encoded_tensor = encoded_layer.inbound_nodes[-1].output_tensors[0]

encoder = Model(input=input_tensor, output=encoded_layer)

This of course will break if the __call__ logic changes, but it might be useful anyway. Also I was wondering whether it would make sense ti make the Model constructor more forgiving allow passing layers. Thoughts?

@damaha @artemyk
When I run this code for a 3 Layer CNN ..it was working perfectly
but for a 4 Layer CNN it show some error like core dump error...what may be the reason
from keras import backend as K
def get_activations(model, layer, X_batch):
get_activations = K.function([model.layers[0].input, K.learning_phase()], model.layers[layer].output)
activations = get_activations([X_batch,0])
return activations

It seems like this is an ongoing issue (I'm the 15th person to comment in this thread over the course of a year, and the same question was asked in #53, #89, #113, and #621). Would it make sense to add a get_activations function to the package that users can call like get_weights?

@davharris  It is great if there is a get_weights function.
I still have some problems with this question. I want to get the output of a merge layer.
The network defined is as follows:
merged = Merge([sigle_model0, sigle_model1, sigle_model2,
                sigle_model3, sigle_model4, sigle_model5,
                sigle_model6, sigle_model7, sigle_model8],
                mode='concat')
model = Sequential()
model.add(merged)
model.add(Dropout(0.5))
model.add(Dense(nb_classes, activation='softmax'))

Then I used the function introduced above by damaha and artemyk.
from keras import backend as K
def get_activations(model, layer, X_batch):
    get_activations = K.function([model.layers[0].input, K.learning_phase()],
                                   [model.layers[layer].output,])
    activations = get_activations([X_batch,0])
    return activations

To get the value of the layer in the test set
activations=get_activations(model, 2, [test0, test1, test2, test3, test4, test5, test6, test7, test8])
The error I got is: "TypeError: Invalid input syntax:[convolution2d_input_1, convolution2d_input_2, convolution2d_input_3, convolution2d_input_4, convolution2d_input_5, convolution2d_input_6, convolution2d_input_7, convolution2d_input_8, convolution2d_input_9] (check documentation or use an In instance)".
There was no error in the input data, because I could get the predection by
prediction = model.predict([test0, test1, test2, test3, test4, test5, test6, test7, test8])
Hope someone could help. Thanks.

hi @havaeimo  ,I use the graph model.
like this,

model = graph()
model.add_input(name='input0',input_shape=())
model.add_node(Convolution2D(),name='c1',input='input0')
.......

And i want to see the output of the c1,Then

getFeatureMap = theano.function(model.inputs['input0'].input,model.nodes['c1'].get_output(train=False),
allow_input_downcast=True)
But it show me that
TypeError: list indices must be integers, not str
Do you give me some advices? Thanks.

hi @magic282 ,Do you solve your question? There is some wrong with my code.

model = graph()
model.add_input(name='input0',input_shape=())
model.add_node(Convolution2D(),name='c1',input='input0')
.......

And i want to see the output of the c1,Then

getFeatureMap = theano.function(model.inputs['input0'].input,model.nodes['c1'].get_output(train=False),
allow_input_downcast=True)
But it show me that
TypeError: list indices must be integers, not str

@alyato  sorry I am using other tools now.

@damaha ,i use the graph model.

model = graph()
model.add_input(name='input0',input_shape=())
model.add_node(Convolution2D(),name='c1',input='input0')
.......

And i want to see the output of the c1,Then

getFeatureMap = theano.function(model.inputs['input0'].input,model.nodes['c1'].get_output(train=False),
allow_input_downcast=True)
But it show me that
TypeError: list indices must be integers, not str

hi @lemuriandezapada ,I use the graph model.
like this,

model = graph()
model.add_input(name='input0',input_shape=())
model.add_node(Convolution2D(),name='c1',input='input0')
.......

And i want to see the output of the c1,Then

getFeatureMap = theano.function(model.inputs['input0'].input,model.nodes['c1'].get_output(train=False),
allow_input_downcast=True)
But it show me that
TypeError: list indices must be integers, not str
Do you give me some advices? Thanks.

I also needed this. I am honestly quite surprised that there is no straight forward method of getting the response of layers for a specific input. Is there any plan on adding this to the API?

@Paethon ,Does your version of keras is 1.0.3 or latest?

hi @fchollet  ,I use the graph model.
like this, refer to #41

model = graph()
model.add_input(name='input0',input_shape=())
model.add_node(Convolution2D(),name='c1',input='input0')
.......

And i want to see the output of the c1,Then

getFeatureMap = theano.function(model.inputs['input0'].input,model.nodes['c1'].get_output(train=False),
allow_input_downcast=True)
But it show me that
TypeError: list indices must be integers, not str
Do you give me some advices? Thanks.

Hi @alyato
The error you get suggest you're indexing a list with a string. That is not possible in python. Instead of,
theano.function(model.inputs['input0'].input,model.nodes['c1'].get_output(train=False),
allow_input_downcast=True)

You should write,
theano.function(model.inputs[index_of_layer_input0].input,model.nodes[index_of_layer_c1].get_output(train=False),
allow_input_downcast=True)

in your case I believe index_of_layer_input0 = 0, index_of_layer_c1=1, but please check this yourself. You can use model.get_cofig() and look at the layer indicies.
If you read my comment earlier in this thread I also explicitly states this.

layerbeing an integer index.

In the config dictionary under the layer item, layers properties (here among names) are given in a python list. It is this list index you need to find when you want to extract layer activations in the future.

@damaha Thanks for your reply.
I rewite my code.

theano.function(model.inputs[0].input,model.nodes[1].get_output(train=False),
allow_input_downcast=True)

Then it show me that:

AttributeError: 'TensorVariable' object has no attribute 'input'

so i change it,

theano.function(model.inputs[0].get_input,model.nodes[1].get_output(train=False),
allow_input_downcast=True)

it show me ,

AttributeError: 'TensorVariable' object has no attribute 'get_input'

Thanks.

@alyato
I was a bit quick in copying you code before and not checking if it made sense. From Keras >1.0.0 layers doesn't have a method called get_output(). In my second comment in this thread I also state this and rewrite the proposed get_activations() function that has been proposed. Instead you need to use the attribute layers[index].ouput
Another thing is wrong in your code. Keras 1.0.3 doesn't even have a model type named graph(), it has Graph() which is imported from a module named .legacy.models, I highly recommend that you DO NOT use this! Instead use the new functional API which has a nice introduction here https://keras.io/getting-started/functional-api-guide/
This is how you do DAG models in keras now. In your simple toy case above you could also use Sequential models.
Here is example code that works with the functional API and Keras 1.1.0 (Should work in any version > 1.0.0):
import numpy as np
from keras.layers import Input, Dense, Convolution2D, Flatten
from keras.models import Model
import keras.backend as K

def get_activations(model, layer, X_batch):
    get_activations = K.function([model.layers[0].input, K.learning_phase()], model.layers[layer].output)
    activations = get_activations([X_batch,0])
    return activations

inputs = Input(shape=(1,28,28))

x = Convolution2D(64,3,3)(inputs)
x = Flatten()(x)
predictions = Dense(10, activation='softmax')(x)

model = Model(input=inputs, output=predictions)
model.compile(optimizer='rmsprop',
              loss='categorical_crossentropy',
              metrics=['accuracy'])

X = np.ones((10,1,28,28))
my_featuremaps = get_activations(model, 1, X)

@damaha ,Thank you for your patience. I now learn to use the latest version and the new functional API is so cool,but it show me  another issue which i post it #4280.
I'm using the 1.0.3 before,using the Graph model.
i just want to extract the feature_map and input the svm by Graph model.

@damaha i got it. Thanks again.

@alyato it's the index of a needed layer in model.layers, so smth like dict(enumerate(model.layers)).

@fractalvision ，Thanks.But i also don't understand.Do you explain what you say in detail.

@fchollet @damaha when the model is fully-convolutional nets and has merge layer, when the input image size is not equal to the training patch size, I can not get the merge layer activations.
for example the model is:
when the input size is 6464, I can get any layer activations using the function you refer.
when the input size is 576720, I can get the first , second and third layer activations. But I can not get the fouth layer(merge layer) activation. The error is as follows
Traceback (most recent call last):
File "conv_filter_visualization2.py", line 39, in
img_output = get_activations(model, layer, input_img_data)
File "conv_filter_visualization2.py", line 13, in get_activations
activations = get_activations([X_batch,0])
File "/usr/local/lib/python2.7/dist-packages/keras/backend/theano_backend.py", line 792, in call
return self.function(*inputs)
File "/usr/local/lib/python2.7/dist-packages/theano/compile/function_module.py", line 871, in call
storage_map=getattr(self.fn, 'storage_map', None))
File "/usr/local/lib/python2.7/dist-packages/theano/gof/link.py", line 314, in raise_with_op
reraise(exc_type, exc_value, exc_trace)
File "/usr/local/lib/python2.7/dist-packages/theano/compile/function_module.py", line 859, in call
outputs = self.fn()
ValueError: GpuElemwise. Input dimension mis-match. Input 1 (indices start at 0) has shape[2] == 64, but the output's size on that axis is 576.
Apply node that caused the error: GpuElemwise{Composite{(i0 + tanh((i1 + i2)))}}[(0, 0)](GpuElemwise{Composite{tanh((i0 + i1))}}[(0, 0)].0, GpuDnnConvGradI{algo='none', inplace=True}.0, GpuReshape{4}.0)
Toposort index: 63
Inputs types: [CudaNdarrayType(float32, 4D), CudaNdarrayType(float32, 4D), CudaNdarrayType(float32, (True, False, True, True))]
Inputs shapes: [(1, 64, 576, 720), (1, 64, 64, 64), (1, 64, 1, 1)]
Inputs strides: [(0, 414720, 720, 1), (0, 4096, 64, 1), (0, 1, 0, 0)]
Inputs values: ['not shown', 'not shown', 'not shown']
Outputs clients: [[GpuContiguous(GpuElemwise{Composite{(i0 + tanh((i1 + i2)))}}[(0, 0)].0)]]
HINT: Re-running with most Theano optimization disabled could give you a back-trace of when this node was created. This can be done with by setting the Theano flag 'optimizer=fast_compile'. If that does not work, Theano optimizations can be disabled with 'optimizer=None'.
HINT: Use the Theano flag 'exception_verbosity=high' for a debugprint and storage map footprint of this apply node.

How do the modify the output of a hidden layer before passing it to the next layer, like division or multiplication ??

More generally you can visualise the output/activations of every layer of your model. I wrote an example with MNIST to show how here:
https://github.com/philipperemy/keras-visualize-activations
So far it's the less painful I've seen.

The code posted here by @damaha and @artemyk work great for most layers, but I'm working with RNNs and would like to get the activations of each cell for each datapoint in the input sequence.
It seems like the code only returns the final output after the whole sequence was processed.
Any ideas?

@cpury you should be able to use this trick:
Suppose your sequence is [0, 2, 3, 5, 6].
You are able to extract the activations after the whole sequence is processed, right?
Input your sequence: [0] -> get the activations (just after RNN)
Input your sequence: [0, 2] -> get the activations (just after RNN)
Input your sequence: [0, 2, 3] -> get the activations (just after RNN)
Input your sequence: [0, 2, 3, 5] -> get the activations (just after RNN)
Input your sequence: [0, 2, 3, ,5, 6] -> get the activations (just after RNN)
It should work nicely but it will require O(n) computation if your sequence is of length n.
If you want something O(1), drop Keras and go straight Tensorflow!
Hope it helps

Hi, I am using Functional API for a basic classifier
Inp = Input( shape=(1,969), name='Input' )
x = Dense(units=512, activation='sigmoid', name='Hidden')(x)
x = Dense(units=20, activation='softmax', name='Output')(x)
model = Model(Inp, x)

After training, i would like to extract the "Hidden" layer BEFORE applying the sigmoid activation.
How to i do that ?
I know for a fact that to extract the layer AFTER applying sigmoid activation will be as follows:
        Inp = model.input
        Outp = model.get_layer('Hidden').output
        curr_layer_model = Model(Inp, Outp)
        bottle_feature = curr_layer_model.predict(x)

But how do i extract BEFORE the sigmoid activation?
Thanks

from keras import backend as K
def get_activations(model, layer, X_batch):
get_activations = K.function([model.layers[0].input, K.learning_phase()], model.layers[layer].output)
activations = get_activations([X_batch,0])
print(activations)
return activations
my_featuremaps = get_activations(cnn, 1, ([X_train[:10], 0])[0])
np.savetxt('featuremap.txt', my_featuremaps)
The above code is generating the below error with TensorFlow as backend
TypeError: outputs of a TensorFlow backend function should be a list or tuple.
Actually, this works fins with theano as backend

@damaha  hello, sorry, I want to know what's the 'predictions' stands for what. Can I see it as the output of what I want? thanks.

I am using this code to get representation after model.add(Dense(hidden_dims)) this statement. Since, I am using sigmoid function values at every layer, why am I getting negative values?
@damaha @artemyk @fchollet
from __future__ import print_function

from keras.preprocessing import sequence
from keras.models import Sequential, Model
from keras.layers import Dense, Dropout, Activation
from keras.layers import Embedding
from keras.layers import Conv1D, GlobalMaxPooling1D
from keras.datasets import imdb
from keras import backend as K
import numpy as np
# set parameters:
max_features = 500
maxlen = 40
batch_size = 32
embedding_dims = 50
filters = 250
kernel_size = 3
hidden_dims = 20
epochs = 2
print('Loading data...')
(x_train, y_train), (x_test, y_test) = imdb.load_data(num_words=max_features)
print(len(x_train), 'train sequences')
print(len(x_test), 'test sequences')

print('Pad sequences (samples x time)')
x_train = sequence.pad_sequences(x_train, maxlen=maxlen)
x_test = sequence.pad_sequences(x_test, maxlen=maxlen)
print('x_train shape:', x_train.shape)
print('x_test shape:', x_test.shape)
print('Build model...')
model = Sequential()
model.add(Embedding(max_features, embedding_dims, input_length=maxlen))
model.add(Dropout(0.2))
model.add(Conv1D(filters, kernel_size, padding='valid', activation='relu', strides=1))
model.add(GlobalMaxPooling1D())
model.add(Dense(hidden_dims))
model.add(Dropout(0.2))
model.add(Activation('sigmoid'))
model.add(Dense(1))
model.add(Activation('sigmoid'))

model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy'])
model.fit(x_train, y_train, batch_size=batch_size, epochs=epochs,
validation_data=(x_test, y_test))
model.compile(loss='binary_crossentropy', optimizer='adam',   metrics=['accuracy'])
model.fit(x_train, y_train, batch_size=batch_size, epochs=1, validation_data=(x_test, y_test))
def get_activations(model, layer, X_batch):
    get_activations = K.function([model.layers[0].input, K.learning_phase()], [model.layers[layer].output,])
    activations = get_activations([X_batch,0])
    return activations
X_train=np.array(get_activations(model=model,layer=4, X_batch=x_train)[0], dtype=np.float32)
print(X_train)

I have a network in Keras and my last layer is a fully connected layer with activation = softmax. I extracted the weights from the softmax (as suggested in the posts above) and multiplied them by 0 and 1 (I am trying to restrict the predictions).
How can I pass the modified softmax weights matrix to the model? Is there a way compile and fit a Keras model with updated weights?
I know about the function set_weights(), but my problem is that set_weights() expects input of shape (hidden_layers, vocab_size), while my new weights have size (len(X_train), vocab_size). Can anybody know how to do this?
This is my model:
def get_activations(model, layer, X_batch):
get_activations = K.function([model.layers[0].input, K.learning_phase()], [model.layers[layer].output,])
activations = get_activations([X_batch,0])
return activations
model = Sequential()
model.add(Embedding(vocab_size, embedding_size, input_length=55, weights=[pretrained_weights]))
model.add(Bidirectional(LSTM(units=embedding_size)))
print(model.add(Dense(vocab_size, activation='softmax')))
softmax_weights = np.array(get_activations(model, 3, X_train)[0], dtype=np.float32)
modified_softmax_weights = np.multiply(softmax_weights, weights_array)
#weights array is a binary array containing 0 and 1, according to the index of the element I would like to set to 0)

Hello, I am trying to get the hidden layer representation of the given data using the above solutions
from keras import backend as K def get_activations(model, layer, X_batch):     get_activations = K.function([model.layers[0].input, K.learning_phase()], [model.layers[layer].output,])     activations = get_activations([X_batch,0])     return activations
However, my model has 3 inputs, do you know how I should modify this function?
Thank you in advance

@alyato
I was a bit quick in copying you code before and not checking if it made sense. From Keras >1.0.0 layers doesn't have a method called get_output(). In my second comment in this thread I also state this and rewrite the proposed get_activations() function that has been proposed. Instead you need to use the attribute layers[index].ouput
Another thing is wrong in your code. Keras 1.0.3 doesn't even have a model type named graph(), it has Graph() which is imported from a module named .legacy.models, I highly recommend that you DO NOT use this! Instead use the new functional API which has a nice introduction here https://keras.io/getting-started/functional-api-guide/
This is how you do DAG models in keras now. In your simple toy case above you could also use Sequential models.
Here is example code that works with the functional API and Keras 1.1.0 (Should work in any version > 1.0.0):
import numpy as np
from keras.layers import Input, Dense, Convolution2D, Flatten
from keras.models import Model
import keras.backend as K

def get_activations(model, layer, X_batch):
    get_activations = K.function([model.layers[0].input, K.learning_phase()], model.layers[layer].output)
    activations = get_activations([X_batch,0])
    return activations

inputs = Input(shape=(1,28,28))

x = Convolution2D(64,3,3)(inputs)
x = Flatten()(x)
predictions = Dense(10, activation='softmax')(x)

model = Model(input=inputs, output=predictions)
model.compile(optimizer='rmsprop',
              loss='categorical_crossentropy',
              metrics=['accuracy'])

X = np.ones((10,1,28,28))
my_featuremaps = get_activations(model, 1, X)

How can we implement DAG-RNN in keras

Could someone help me solve the following problem?

Environment: Keras==1.1.0 Theano==1.0.2 numpy==1.15.1 scipy==1.3.0

I created a fine tuning and frozen all layers except layer [2] because I want to get the activation values only from layer [2].
Network summary before freezing:

Layer (type)                    |  Output Shape      |    Param #  |    Connected to

dense_1 (Dense)                  (None,<PHONE_NUMBER>     dense_input_1[0][0]

dropout_1 (Dropout)              (None, 512)           0           dense_1[0][0]
dense_1[0][0]

dense_2 (Dense)                  (None, 32)            16416       dropout_1[0][0]
dropout_1[1][0]

dropout_2 (Dropout)              (None, 32)            0           dense_2[0][0]
dense_2[1][0]

dense_3 (Dense)                  (None, 1)             33          dropout_2[0][0]
dropout_2[1][0]

Total params: 2114113

Freezing layers:
for layer in model.layers[0:]:
------ layer.trainable = False
model.layers[2].trainable = True
Network summary after freezing:

`Layer (type)                    |  Output Shape      |    Param #  |    Connected to

dense_1 (Dense)                  (None, 512)           0           dense_input_1[0][0]

dropout_1 (Dropout)              (None, 512)           0           dense_1[0][0]

dense_2 (Dense)                  (None, 32)            16416       dropout_1[1][0]

dropout_2 (Dropout)              (None, 32)            0           dense_2[1][0]

dense_3 (Dense)                  (None, 1)             0           dropout_2[1][0]

Total params: 16416`

To print layer output [2]:

OutFunc = keras.backend.function([model2.input], [model2.layers[2].get_output_at(0)])
out_val = OutFunc([inputs])[0]
print(out_val)

Returns the following output error:

MissingInputError                         Traceback (most recent call last)
 in
1 #OutFunc = keras.backend.function([model2.input], [model2.layers[0].output])
----> 2 OutFunc = keras.backend.function([model2.input], [model2.layers[2].get_output_at(0)])
3
4
5 out_val = OutFunc([inputs])[0]

~/anaconda3/lib/python3.7/site-packages/keras/backend/theano_backend.py in function(inputs, outputs, updates, **kwargs)
725     return T.clip(x, min_value, max_value)
726
--> 727
728 def equal(x, y):
729     return T.eq(x, y)

~/anaconda3/lib/python3.7/site-packages/keras/backend/theano_backend.py in init(self, inputs, outputs, updates, **kwargs)
711
712 def pow(x, a):
--> 713     return T.pow(x, a)
714
715

~/anaconda3/lib/python3.7/site-packages/theano/compile/function.py in function(inputs, outputs, mode, updates, givens, no_default_updates, accept_inplace, name, rebuild_strict, allow_input_downcast, profile, on_unused_input)
315                    on_unused_input=on_unused_input,
316                    profile=profile,
--> 317                    output_keys=output_keys)
318     return fn

~/anaconda3/lib/python3.7/site-packages/theano/compile/pfunc.py in pfunc(params, outputs, mode, updates, givens, no_default_updates, accept_inplace, name, rebuild_strict, allow_input_downcast, profile, on_unused_input, output_keys)
484                          accept_inplace=accept_inplace, name=name,
485                          profile=profile, on_unused_input=on_unused_input,
--> 486                          output_keys=output_keys)
487
488

~/anaconda3/lib/python3.7/site-packages/theano/compile/function_module.py in orig_function(inputs, outputs, mode, accept_inplace, name, profile, on_unused_input, output_keys)
1837                   on_unused_input=on_unused_input,
1838                   output_keys=output_keys,
-> 1839                   name=name)
1840         with theano.change_flags(compute_test_value="off"):
1841             fn = m.create(defaults)

~/anaconda3/lib/python3.7/site-packages/theano/compile/function_module.py in init(self, inputs, outputs, mode, accept_inplace, function_builder, profile, on_unused_input, fgraph, output_keys, name)
1485             # OUTPUT VARIABLES)
1486             fgraph, additional_outputs = std_fgraph(inputs, outputs,
-> 1487                                                     accept_inplace)
1488             fgraph.profile = profile
1489         else:

~/anaconda3/lib/python3.7/site-packages/theano/compile/function_module.py in std_fgraph(input_specs, output_specs, accept_inplace)
179
180     fgraph = gof.fg.FunctionGraph(orig_inputs, orig_outputs,
--> 181                                   update_mapping=update_mapping)
182
183     for node in fgraph.apply_nodes:

~/anaconda3/lib/python3.7/site-packages/theano/gof/fg.py in init(self, inputs, outputs, features, clone, update_mapping)
173
174         for output in outputs:
--> 175             self.import_r(output, reason="init")
176         for i, output in enumerate(outputs):
177             output.clients.append(('output', i))

~/anaconda3/lib/python3.7/site-packages/theano/gof/fg.py in import_r(self, variable, reason)
344         # Imports the owners of the variables
345         if variable.owner and variable.owner not in self.apply_nodes:
--> 346                 self.import(variable.owner, reason=reason)
347         elif (variable.owner is None and
348                 not isinstance(variable, graph.Constant) and

~/anaconda3/lib/python3.7/site-packages/theano/gof/fg.py in import(self, apply_node, check, reason)
389                                      "for more information on this error."
390                                      % (node.inputs.index(r), str(node)))
--> 391                         raise MissingInputError(error_msg, variable=r)
392
393         for node in new_nodes:

MissingInputError: Input 0 of the graph (indices start from 0), used to compute InplaceDimShuffle{x,x}(keras_learning_phase), was not provided and not given a value. Use the Theano flag exception_verbosity='high', for more information on this error.

Backtrace when that variable is created:

File "", line 219, in _call_with_frames_removed
File "/home/jayne/anaconda3/lib/python3.7/site-packages/keras/backend/init.py", line 61, in
from .theano_backend import *
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "/home/jayne/anaconda3/lib/python3.7/site-packages/keras/backend/theano_backend.py", line 23, in
_LEARNING_PHASE = T.scalar(dtype='uint8', name='keras_learning_phase')  # 0 = test, 1 = train


List of typo's

Dear authors,
Thank you for the Parallel C++ book. I enjoy reading it.
I think I found some typos in the book. I have not finished reading it completely, but here is the list I made so far. Page numbers are in PDF reader pages, not in book pages. I am not a native English speaker so I may be completely wrong with my suggestions.
Kind regards,
Kor

7: However, with the C++ 17 and C++ 20 → Remove "the"
7: features of the C++ 17 and C++ 20 → Remove "the"
7: container and algorithms → "containers"
16: run the examples in within → Remove "in"
20: compile the codeIn Line → Add ". "
20: is build using → "built"
25: the proposal recommend the → "recommends"
29: showed the components, we will → Remove ","
29: a list or any of → "of"
29: With the C++ standard the iterator → "C++ 20"
31: In Line 7 the values are read → Text is out of sync with examples
34: How the even/odd cases are handled in the code (lines 16-21) seem not in line with the even/odd cases in formula 3.3
35: an randomly chosen → "a"
37: The array ... are very similar → "The arrays"
39: by cppstd::end() → "std::end()" (markup error I guess)
40: Listing, line 22 → Variable "index" is not used (updated).
40: the variable index is incremented → Out of sync with the listing
47: the generate images → "generated"
47: the generating of the images → "generation"
47: amount of iterations → "number of"
47: MAX_ITER=- → "MAX_ITER -"
48: kernels.hpp → kernel.hpp
50: Mandelbrot ans Julia → "and"
53: Overheads work required → "Overheads of work"
55: therefore many → Remove "therefore"
55: Examples for this → "of this"
58: to the HPX → Remove "the"
62: due unbalanced → "due to unbalanced"
63: track data dependency → "a data dependency"
63: Footnotes → Slashes are missing
67: A portion ... were extended → "is extended"
69: library is  [80] → Remove one space
69: Listing, line 29 → Are a header and namespace missing? Where does the PLL parallel_for come from?
78: hope too do → "do"
78: cannot speed up → "cannot be sped up"
80: but it the → Remove "it"
83: Parallelism Computer Architectures → "Parallel"
84: is the instructions → "are"
88: once all  threads finished → Remove space
90: Figure 8.2 ... shows the performance ... → Is this the correct figure? Text and figure seem out of sync
93: Line 10 → "Compute" (capital)
94: ... vector and store ... instead → "but"
94: partial some → "sum"

Stopped at 69: Listing, line 29 → Are a header and namespace missing? Where does the PLL parallel_for come from? and will proceed soon.

@kordejong Thanks for the list of issues. I fixed all typos and will look into the code next week.

34: How the even/odd cases are handled in the code (lines 16-21) seem not in line with the even/odd cases in formula 3.3

That is correct and I updated the example and the book.

@kordejong I added your suggestions here https://hpxbook.stellar-group.org/addendum/2024/08/15/addendum.html


Storing values containing a $ character in them results in truncation of value when retrieved

Store a value by executing something like:
credstash -t TABLE_NAME put keyname "Test$Test"
When retrieving the value, only "Test" is returned.  Anything from the $ onwards (including the $ char) is dropped.
credstash: v1.13.2
python --version: Python 2.7.10
(Darwin Kernel Version 16.6.0)

The issue is caused by your PUT command, and running it in bash / most terminals.
"Test$Test" converts to "Test${Test}", so it looks up the value of Test which is probably nothing, thus it stores only "Test"
In terminals like Bash, you can disable variable interpolation in strings by using '  instead of ".
eg,
credstash -t TABLE_NAME put keyname 'Test$Test'

Thanks, that worked.


perhaps a name change

pynacl is already a project, does almost the same thing as python libnacl.
perhaps pytweetnacl or something.

@steverweber, what do you think about pure_pynacl?  Is it too awkward?  I would like to do more than just the tweetnacl redux.  Also related: https://github.com/mdempsky/dnscurve/tree/master/slownacl.

looks good to me.

cool


Enable browser test

Description:
finally.. :sweat:
This PR enables browser-based test on CI server, as well as allow run test locally via test_browser command.
Testing pipelines are changes into manual processes of creating test suite for browser and using mocha's browser test page reports its results into sauce labs, so now saucelab test queue will correctly display test results such as this

Why NOT karma? (or testem, mochify, anything else?)
Major reason is custom mocha interface RxJS test uses. Including karma (karma-mocha , https://github.com/karma-runner/karma-mocha/issues/84), there isn't workable test runner to execute test including custom interfaces yet. Karma's upcoming custom context (https://github.com/karma-runner/karma/issues/488) seems promising way to solve this in further, not certain at this moment.
Related issue (if exists):
closes #1549
Note
There are failing browser tests, seems having compatibility issues with test fixture setups. Plan to track it down once this PR's accepted.

I'll check in once @blesh approves since this is somewhat debatable approach. /cc @staltz also for visibility.

With latest PR updates, now browser test shows lovely green again (test results comes from my forked repo)

Looks good, great job. And using Webpack for this was creative, wouldn't have crossed my mind.


Don't call stop() if MediaRecorder state isn't inactive

Fixes #252
I've added some extra checks around when we call .stop() on a MediaRecorder, since it will error if the state is already inactive.
I guess some browsers don't send the error and Android must.

my android device is away for a day, will test this once it's back


Unit tests support multi-os and higher versions of jdk

When I run unit tests, there are two fails:

Greetings!
Thank you for your contribution, especially the fix of the Regex is great.


cmd/compile: unnecessary bounds check for position len/2

What version of Go are you using (go version)?
go version go1.11 windows/amd64
What operating system and processor architecture are you using (go env)?
set GOARCH=amd64
set GOBIN=
set GOCACHE=...
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=...
set GOPROXY=
set GORACE=
set GOROOT=C:\Go
set GOTMPDIR=
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=... -gno-record-gcc-switches
What did you do?
I compiled the following function: https://play.golang.org/p/lsceWu1WsWk
What did you expect to see?
I didn't expect to see bounds checking in the code, because len(slice)/2 is always a valid position in the slice.
What did you see instead?
The compiler generated bounds checking code.

Oops. Just realized that the slice could have len == 0, which means that len/2 == 0 and it should indeed panic.


404 error

Hello everyone,
first of all thank you so much for this pretty easy package.
I am uploading csv file to ckan using this package but i am getting the below error:

Client error: POST http://my-domain/api/action/resource_create resulted in a 404 NOT FOUND response: {"help": "http://my-domain/api/3/action/help_show?name=resource_create", "success": false, "error": {"message": "Not (truncated...)

below is my code which i used to upload the csv file:
`         $keyword = $request->input('keywords');
	$description = $request->input('description');

	$file = $request->file('file');

	$file->move('storage/uploads/',$file->getClientOriginalName());

	$data = [
	'upload' => fopen(storage_path('app/public/uploads/'.$file->getClientOriginalName()), 'r'),
	'package_id' => 'ckan-api-test-338',
	'name' => $keyword,
	'format' => 'CSV',
	'description' => $description,
	];
	\CkanApi::resource()->create($data);`

my file is uploading to the server but when i am uploading it to ckan then i am getting the above error.
your help would really be appreciated.
thank you

hello,
have you found any solution for it?

if this is a package issue then i would really appreciate it if you can inform me about it. I am using this package specifically in my project and your cooperation would be really appreciated.
Regards

@Naveedali1234 hello, let me confirm, going to work on that.

Yes I have been tested it, it seems to work properly, the api version is the number 3, you can remove it from .env file.
What was happening, your ckan-api-test-123 does not exists, that's why it throws an 404 error, is not because the ckan api, is because the package id does not exists (ckan problem).
What I did was following your example:
	$data = [
	   'upload' => fopen(storage_path('app/public/test.png'), 'r'),
	   'package_id' => 'package-test',
	   'name' => 'key 123',
	   'format' => 'png',
	   'description' => 'Lorem ipsum description',
	];
	return CkanApi::resource()->create($data);

And you can see (before it get deleted from the ckan example)
https://demo.ckan.org/es/dataset/package-test
So you have to create your package and get the id before upload the content.

so it means i should have create a package manually from the ckan dashboard and then i will upload a resource into that package, right?

No, you can create the package trhough the API, the workflow should be this.
myPackage = create package ....
resource = create my resource with myPackage.id

Going to close this issue, I just tested this and this is the output https://demo.ckan.org/dataset/ckan-api-test-2
The code is described below:
<?php

use Illuminate\Http\Request;

use CkanApi;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::get("/", function(Request $request) {

	$packageId = "ckan-api-test-2";

	// First we need to create a package (dataset)
	$package =  CkanApi::dataset()->create([
		'name' => $packageId,
		'title' => $packageId,
		'private' => 'False',
	]);

	// Then we can attach resources to it.
	$data = [
		'upload' => fopen(storage_path('app/public/test.png'), 'r'),
		'package_id' => $packageId,
		'name' => 'key 123',
		'format' => 'image/png',
		'description' => 'Lorem ipsum description',
	];

	$resource = CkanApi::resource()->create($data);

	return ['package' => $package, 'resource' => $resource];
});


When starting buddy node in peertest, choose a good OS-agnostic default for IPC path

Right now, I did the lazy thing and put it in a linux-y path, in /tmp. This hack was introduced in #206

closing this since we're not supporting windows os


Allow empty strings in plugin and custom attributes

🦟 Bug fix
Fixes #725
Summary
Currently errors are generated when adding an attribute containing an empty string to a <plugin> block or as a custom attribute. This adds failing tests in https://github.com/gazebosim/sdformat/commit/0637c210053ae3d1b98e9be55b30f9b3f1e3516f to confirm the bug and fixes the errors in https://github.com/gazebosim/sdformat/commit/e55a9e1a251b650ac0588e0e2b7323f0ca900961 by setting _required == 0 when calling Element::AddAttribute.
Checklist

[X] Signed all commits for DCO
[X] Added tests
[ ] Updated documentation (as needed)
[ ] Updated migration guide (as needed)
[ ] Consider updating Python bindings (if the library has them)
[X] codecheck passed (See contributing)
[X] All tests passed (See test coverage)
[X] While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

Looks good, but can you check the output of ToString() to make sure the custom attribute is included? I seem to recall that was a problem.

ok, thanks for bringing that up. I updated ElementPrivate::PrintAttributes in https://github.com/gazebosim/sdformat/pull/1407/commits/a4f811f7fae269b77a8c35f16324340ce5f1f214 to always print custom attributes
Empty attributes in the <plugin/> element won't be printed by ToString unless they are in a custom xml namespace, as I've noticed with the following test patch:
diff --git a/test/integration/plugin_attribute.cc b/test/integration/plugin_attribute.cc
index 7f4f9f4c..b66c9da1 100644
--- a/test/integration/plugin_attribute.cc
+++ b/test/integration/plugin_attribute.cc
@@ -65,4 +65,9 @@ TEST(PluginAttribute, ParseAttributes)
     EXPECT_EQ(value->Get<std::string>(""),
               std::string("value"));
   }
+  {
+    auto pluginToString = plugin->ToString("");
+    EXPECT_NE(std::string::npos, pluginToString.find("empty_attribute=''"))
+      << pluginToString;
+  }
 }

I don't have a good idea for how to fix it, so I'd prefer to open an issue documenting that behavior and potentially close it as won't fix

LGTM! Opening an issue to document the behavior in <plugin> sounds good.

opened a new issue: https://github.com/gazebosim/sdformat/issues/1421


[Core] az logout: Remove service principal access tokens from token cache

Related command
az logout
Description
Adopt https://github.com/AzureAD/microsoft-authentication-library-for-python/pull/666
Testing Guide
az login --service-principal --username xxx --password xxx --tenant xxx
az logout

az login --service-principal --username xxx --password xxx --tenant xxx
az logout --username xxx

Core

There is one edge case caused by the "subscription ID as primary key" issue (https://github.com/Azure/azure-cli/issues/15005). If sp1 and sp2 have access to the same subscription, after running az login for sp1, running az login for sp2 will overwrite the subscription-tenant-user login context of sp1, making CLI lose track of sp1 in its profile.
To solve that, the user must either

Remember sp1's client ID and use it in az login --username {sp1_client_id}
Run az account clear which purges the whole token cache

The same happens to user accounts too.


new more ideas for your mod

trigger events
This idea is a description of a rare event in Minecraft, where a mob called Entity 303 causes various actions to occur in the game world, such as objects moving, blocks being broken, and signs being placed. The event would also include the construction of a pyramid

Guards will now spawn 10 seconds to start the world in a pyramid structure more to you or teleport to you or This idea involves adding guards that would spawn 10 seconds after the start of a world and would either move towards the player or teleport to their location. The guards would be located in a pyramid structure and would add an element of challenge and security.

Add Herobrine mob all herobrine does is build troll faces all over the map and if you encounter him while he's doing that and kill him
Do add an possibly 0.1% chance for an anomaly to appear in game stuff move and put the signs down and someone building house

great idea Inside the pyramid they will build a pyramid structure of stone and gold. This is a rare occurrence in the game world. 0.2 chance for it happen

This idea is an explanation for an anomaly in Minecraft called Entity 303 that performs various actions in the game world, such as moving objects. Placing building blocks and plates This process involves creating pyramidal structures of rocks and stones as well as creating random crosses. at 0.2 chance for it happen


Current line number in the editor is not visible

Was just testing your theme and like it so far.
But I saw that the selected line number was not visible.

I found that the last update (17.4) add a highlight feature so maybe it's related
https://learn.microsoft.com/en-us/visualstudio/releases/2022/release-notes#summary-of-whats-new-in-this-release-of-visual-studio-2022-version-174

Yeah, that seems like it. I'm still in 17.3 and the number is clear.
Thank you for reporting it and will look into it soon.


I have a problem on Centos 7

At first install, i can connect server well and surf websites. But after server restart it connect to vpn server but cant reach any website what can i do ? is it a firewall problem or gateway ? i dont know exactly what can i do ?
Each server restart I reinstall openvpn to work with it.
additional
im using TCP port
Server VMware VDS

Ater restarting the server, run the following commands:
firewall-cmd --add-port=$port/$protocol
firewall-cmd --zone=trusted --add-source=<IP_ADDRESS>/24
firewall-cmd --direct --add-rule ipv4 nat POSTROUTING 0 -s <IP_ADDRESS>/24 ! -d <IP_ADDRESS>/24 -j SNAT --to $ip

Replace the following variables:
$port = the port you selected during setup
$protocol = tcp
$ip = IP address of the server
Does it start working again after that? If so, you have a firewall conflict which is removing or superseding the rules set by the installer.

When I try run the command shell gives me this message
FirewallD is not running
Also in my VDS Centos Webpanel installed too. Problem is the CWP ?

Your server has FirewallD disabled, which is usually enabled by default in CentOS.
You can try running:
systemctl start openvpn-iptables.service
Other than that, you are running a custom configuration so you are on your own.


Update peserta-universitas.md

Incomplete.
Checklist:
:heavy_check_mark: Registration form
:heavy_check_mark: Project Euler Baby Steps
:x: GitHub Pages containing Project Euler username
:heavy_check_mark: 50 :star: GitHub repository contribution
:heavy_check_mark: bahasa Indonesia Wikipedia userpage mentioning Besut Kode Universitas
:x: bahasa Indonesia Wikipedia content edit
:heavy_check_mark: StackOverflow account with at least one badge
:heavy_check_mark: Besut Kode markdown Pull Request
Please mention your Project Euler username on your site somewhere I can see it, and do at least one bahasa Indonesia Wikipedia content edit.
Also note that this PR has a merge conflict, as another participant has their PR merged after you forked this repo. Please resolve this issue or submit a new pull request, after re-reading http://wikimedia-id.github.io/besutkode/university-modules-id.html and completing the tasks.
If you need help, ask on the Telegram chat group "Besut Kode Universitas".


💄 Make tables consistently full width

Fix panic in string repeat

#69
#68  👈
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @RTLS and the rest of your teammates on  Graphite


(doc): Update version

Codecov Report

Merging #185 (eadf5b6) into release-1.2.0 (ce9f974) will not change coverage.
The diff coverage is n/a.

@@               Coverage Diff                @@
##             release-1.2.0     #185   +/-   ##
================================================
  Coverage            25.09%   25.09%
  Complexity             233      233
================================================
  Files                   65       65
  Lines                 4360     4360
  Branches               330      330
================================================
  Hits                  1094     1094
  Misses                3163     3163
  Partials               103      103

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ce9f974...eadf5b6. Read the comment docs.


Align our k8s clusters onto 1.27

Description
Just a reminder to keep up to date with our infrastructure.
code base updated see https://github.com/catenax-ng/cloud-infra/pull/8
AC

[ ] stable environment fits to our current k8s version

Info from @Siegfriedk

We need to start the next upgrade of our k8s clusters (besides stable)

Upgrade your AKS cluster to a supported Kubernetes version
You’re receiving this notice because you currently use Azure Kubernetes Service (AKS).
Azure Kubernetes Service is retiring v1.25.x on 2 January 2024. We’ve detected that one or more AKS clusters in your subscription(s) are using Kubernetes v1.25 or lower.  To stay within supported versions and service-level agreements (SLA) you have up to 30 days after the version is removed to upgrade. To avoid ever falling out of support and to keep up with Kubernetes versions we recommend turning on auto-upgrade.
Required action
Please upgrade your clusters to 1.25 or higher by 2 January 2024.
•	To keep up to date with all AKS releases, subscribe the AKS Releases page.
•	To know when the next versions will be introduced or retired check the Kubernetes release calendar for AKS.

renewed automation secret

PR for https://github.com/catenax-ng/cloud-infra/pull/9

[x] dev
[x] int
[x] stable
[x] core

Shouldn't we also upgrade stable if 1.25.x will retire on 2 January 2024?

@almadigabor good point, guess depends on alignment to communication for stable i guess...

@almadigabor urgh its already out of support version, good catch. We should do that soon / as soon as AKS deprecates it latest when we do the next release and the current will move onto stable

generated a new issue for the disscussion to upgrade stable.

done exept the version discussion for stable.

So maybe here we should align with release management and find a window when stable can be upgraded. Probably before the deployment starts for release 23.12 components.

will close this one because of new issue to upgrade stable
https://github.com/eclipse-tractusx/sig-infra/issues/352


Fixes #7563: Services security update

What's this PR do?
Updates Services; downgrades PHP-FPM references to PHP 7.0.
How should this be reviewed?
👀
🔥
Please double-check my php7.0-fpm references, thanks!
Any background context you want to provide?
https://www.drupal.org/sa-contrib-2019-026
Relevant tickets
Fixes #7563
Checklist

[ ] Documentation added for new features/changed endpoints.
[ ] Tested on staging.
[ ] Pinged a PM if this is a larger PR that would benefit from some additional testing love
[ ] Post a message in #phoenix if this includes something that causes a rebuild!

Now with 100% more PHP 7.0


Disable automatic sync of stale bot config

It's because I use this script to add the files and it will look for the markers in the comment.