[fix] Require erb in lua_script_reader

Codecov Report

Merging #47 into master will increase coverage by 0.29%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master      #47      +/-   ##
==========================================
+ Coverage   95.60%   95.89%   +0.29%
==========================================
  Files          23       23
  Lines         842      829      -13
==========================================
- Hits          805      795      -10
+ Misses         37       34       -3

Impacted Files
Coverage Δ

lib/redcord/lua_script_reader.rb
100.00% <100.00%> (ø)

lib/redcord/logger.rb
92.85% <0.00%> (-0.25%)
:arrow_down:

lib/redcord/attribute.rb
100.00% <0.00%> (ø)

lib/redcord/server_scripts.rb
100.00% <0.00%> (ø)

lib/redcord/redis_connection.rb
100.00% <0.00%> (ø)

lib/redcord/relation.rb
96.29% <0.00%> (+1.55%)
:arrow_up:

lib/redcord/actions.rb
95.50% <0.00%> (+2.09%)
:arrow_up:

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 14522af...c3681b9. Read the comment docs.


candlestick pattern detection

API for the following candlesticks:

Hammer/ Inverse hammer
Bullish/bearish engulfing
Morning/Evening  star
Shooting star/Hanging man
Doji

Refer: https://www.ig.com/en/trading-strategies/16-candlestick-patterns-every-trader-should-know-180615


3D model with roughness under 0.05, does not work on iPhone 7

[ ] Review the documentation: https://docs.viromedia.com/
[ ] Search for existing issues: https://github.com/viromedia/viro
[ ] Use the latest ViroReact release: https://docs.viromedia.com/docs/releases

Environment
Please provide the following information about your environment:

Development OS: Mac

Device OS & Version: iOS version

Version: ViroReact 2.15.0

Device(s): iPhone 7

Description
Using 2.15.0, the roughness under 0.05 still does not work on iPhone 7. When roughness factor <= 0.05 or if the value in a roughness texture <= 0.05, the material still appears all black (and also breaks the depth buffer actually, as it always appear on top of everything).
It may be worth noting that while using the gradient texture makes the material appear fully black on the edge where the values are under 0.05, a fully black roughness texture successfully makes the material fully glossy even on iPhone 7.

I've been trying to get my hands on more iOS models to check the status, but so far, I can only report:

iPhone 7 (iOS 12 & 13): not working
iPhone 8 (iOS 12): working

Any chance this has been fixed in 2.16.0 @dam00n ?

Yes, this should be fixed in 2.16.0. Let us know if you still have issues. Thanks!


Detecting changes in transformers

This issue was originally filed by @olostan

'pub serve' detects changes of the files that are transformed, but if you're developing transformer (barback), changes in transformer code is not detected.
So the only way is to stop 'pub serve' and re-run it again.
Would be nice if 'pub serve' will also watch for changes in translators that were used (in current project if watch for all files is hard) and re-run transforms upon change.

This issue has been moved to dart-lang/pub#1281.


Use the relation widget to select a file of any type by filename

Is your feature request related to a problem? Please describe.

If I have a directory of templates, I want to be able to select one by name. There is no need to process the file contents, I just want to see the names, select one, and have that filename be the value output by the relation widget.
Describe the solution you'd like

The relation widget can list files and allow me to search by name.

cc/ @cmaxw

This is available now via templating:
- label: "Templates"
  name: "template"
  widget: "relation"
  collection: "templates"
  searchFields: ["{{filename}}}"]
  valueField: "{{filename}}.{{extension}}"
  displayFields: ["{{filename}}.{{extension}}"]

Cool!

Please comment if not working as expected

Templating works for me.


Support Task Flow (Dependency)

Hi,
I think flightplan is cool, but it seems that no direct way to run multiple tasks that have dependency between them.
For example, I have a "build" task and "deploy" task, the "deploy" task must be run after the "build" task. If I can define dependencies between tasks just like Grunt/Gulp/Shipit, this issue will be resolved elegantly.
I found https://github.com/orchestrator/orchestrator is a great library to do this thing and it has already used by Gulp/Shipit, should be reliable enough.

Will look into this in the near future. Thanks for your feedback.

I'm closing this in favor of #66. Please continue the discussion there.


Not able to view the widget

Environment data

VS Code version: XXX
Jupyter Extension version (available under the Extensions sidebar): XXX
Python Extension version (available under the Extensions sidebar): XXX
OS (Windows | Mac | Linux distro) and version: XXX
Python and/or Anaconda version: XXX
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): XXX
Jupyter server running: Local | Remote | N/A

Expected behaviour
XXX
Actual behaviour
XXX
Steps to reproduce:
[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]

XXX

Logs

Output for Jupyter in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Jupyter)

XXX

Hi @anantgupta04
Could you please provide some additional details on the issue you are experiencing?
Helpful information includes the environment info, steps to reproduce, expected behavior vs. actual behavior, pictures or screen recordings when applicable. (https://www.screentogif.com)


Feat flexovl elster flex 1542

FLEX-1542

All is well.

This pull request makes the build fail.

This pull request makes the build fail.

All is well.


Tensorflow 2 Integer Labels

From the docs, it says if I want to use labels without one_hot encoding in advance, I should use SparseCategoricalCrossentropy. And the result is strange.
System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): Yes
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10 1903 18362.418
Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:
TensorFlow installed from (source or binary): binary
TensorFlow version (use command below): v2.0.0-rc2-26-g64c3d382ca 2.0.0
Python version: Python 3.7.3 (default, Mar 27 2019, 17:13:21) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc.
Bazel version (if compiling from source):
GCC/Compiler version (if compiling from source):
CUDA/cuDNN version: cudart64_100.dll
GPU model and memory:

Describe the current behavior
the model won't compile
using from_logits=False, reporting TypeError: Expected int32, got 1e-07 of type 'float' instead.
using from_logits=True, get TypeError: Value passed to parameter 'features' has DataType int32 not in list of allowed values: float16, bfloat16, float32, float64
Traceback (most recent call last):
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_core\python\framework\tensor_util.py", line 324, in _AssertCompatible
    fn(values)
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_core\python\framework\tensor_util.py", line 263, in inner
    _ = [_check_failed(v) for v in nest.flatten(values)
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_core\python\framework\tensor_util.py", line 264, in <listcomp>
    if not isinstance(v, expected_types)]
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_core\python\framework\tensor_util.py", line 248, in _check_failed
    raise ValueError(v)
ValueError: 1e-07

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:/Users/user/OneDrive/UH/cvxtest/main2.py", line 84, in <module>
    metrics=[
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_core\python\training\tracking\base.py", line 457, in _method_wrapper
    result = method(self, *args, **kwargs)
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_core\python\keras\engine\training.py", line 373, in compile
    self._compile_weights_loss_and_weighted_metrics()
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_core\python\training\tracking\base.py", line 457, in _method_wrapper
    result = method(self, *args, **kwargs)
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_core\python\keras\engine\training.py", line 1653, in _compile_weights_loss_and_weighted_metrics
    self.total_loss = self._prepare_total_loss(masks)
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_core\python\keras\engine\training.py", line 1713, in _prepare_total_loss
    per_sample_losses = loss_fn.call(y_true, y_pred)
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_core\python\keras\losses.py", line 221, in call
    return self.fn(y_true, y_pred, **self._fn_kwargs)
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_core\python\keras\losses.py", line 978, in sparse_categorical_crossentropy
    y_true, y_pred, from_logits=from_logits, axis=axis)
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_core\python\keras\backend.py", line 4504, in sparse_categorical_crossentropy
    epsilon_ = _constant_to_tensor(epsilon(), output.dtype.base_dtype)
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_core\python\keras\backend.py", line 673, in _constant_to_tensor
    return constant_op.constant(x, dtype=dtype)
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_core\python\framework\constant_op.py", line 227, in constant
    allow_broadcast=True)
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_core\python\framework\constant_op.py", line 265, in _constant_impl
    allow_broadcast=allow_broadcast))
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_core\python\framework\tensor_util.py", line 449, in make_tensor_proto
    _AssertCompatible(values, dtype)
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_core\python\framework\tensor_util.py", line 331, in _AssertCompatible
    (dtype.name, repr(mismatch), type(mismatch).__name__))
TypeError: Expected int32, got 1e-07 of type 'float' instead.

Traceback (most recent call last):
  File "C:/Users/user/OneDrive/UH/cvxtest/main2.py", line 84, in <module>
    metrics=[
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_core\python\training\tracking\base.py", line 457, in _method_wrapper
    result = method(self, *args, **kwargs)
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_core\python\keras\engine\training.py", line 373, in compile
    self._compile_weights_loss_and_weighted_metrics()
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_core\python\training\tracking\base.py", line 457, in _method_wrapper
    result = method(self, *args, **kwargs)
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_core\python\keras\engine\training.py", line 1653, in _compile_weights_loss_and_weighted_metrics
    self.total_loss = self._prepare_total_loss(masks)
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_core\python\keras\engine\training.py", line 1713, in _prepare_total_loss
    per_sample_losses = loss_fn.call(y_true, y_pred)
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_core\python\keras\losses.py", line 221, in call
    return self.fn(y_true, y_pred, **self._fn_kwargs)
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_core\python\keras\losses.py", line 978, in sparse_categorical_crossentropy
    y_true, y_pred, from_logits=from_logits, axis=axis)
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_core\python\keras\backend.py", line 4546, in sparse_categorical_crossentropy
    labels=target, logits=output)
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_core\python\ops\nn_ops.py", line 3477, in sparse_softmax_cross_entropy_with_logits_v2
    labels=labels, logits=logits, name=name)
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_core\python\ops\nn_ops.py", line 3397, in sparse_softmax_cross_entropy_with_logits
    precise_logits, labels, name=name)
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_core\python\ops\gen_nn_ops.py", line 11842, in sparse_softmax_cross_entropy_with_logits
    labels=labels, name=name)
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_core\python\framework\op_def_library.py", line 631, in _apply_op_helper
    param_name=input_name)
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_core\python\framework\op_def_library.py", line 60, in _SatisfiesTypeConstraint
    ", ".join(dtypes.as_dtype(x).name for x in allowed_list)))
TypeError: Value passed to parameter 'features' has DataType int32 not in list of allowed values: float16, bfloat16, float32, float64

Describe the expected behavior
Compile and run. It is a pretty simple model after all.
Code to reproduce the issue
Provide a reproducible test case that is the bare minimum necessary to generate the problem.
import numpy as np
import tensorflow as tf

from keras.datasets import fashion_mnist

tf.random.set_seed(1)
np.random.seed(1)

if __name__ == '__main__':
    (train_X, train_Y), (test_X, test_Y) = fashion_mnist.load_data()

    train_X = train_X.reshape(-1, 28, 28, 1)
    test_X = test_X.reshape(-1, 28, 28, 1)

    train_X = train_X.astype('float32')
    test_X = test_X.astype('float32')
    train_X = train_X / 255
    test_X = test_X / 255

    train_L = len(train_X)
    test_L = len(test_X)

    print(train_Y[0], type(train_Y[0]))

    x_input = tf.keras.Input(dtype=tf.dtypes.float32, shape=[28, 28, 1])
    y_input = tf.keras.Input(dtype=tf.dtypes.int32, shape=[1])

    x = tf.keras.layers.Flatten()(x_input)
    y_target = tf.one_hot(y_input, 10)
    y_logits = tf.keras.layers.Dense(10)(x)
    y_probability = tf.keras.layers.Softmax()(y_logits)
    y_output = tf.math.argmax(
        input=y_probability,
        axis=1,
        output_type=tf.dtypes.int32
    )

    model = tf.keras.Model(inputs=[x_input, y_input], outputs=y_output)

    model.compile(
        optimizer=tf.keras.optimizers.SGD(learning_rate=1e-3),
        loss=tf.keras.losses.SparseCategoricalCrossentropy(from_logits=False),

        metrics=[
            # 'accuracy'
            #tf.keras.metrics.Accuracy()
        ]
    )

    # Trains for 5 epochs
    model.fit(x=train_X, y=train_Y, batch_size=32, epochs=5)

Other info / logs
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.

it seems there is inconsistency between docs.
from https://www.tensorflow.org/api_docs/python/tf/keras/losses/CategoricalCrossentropy

Use this crossentropy loss function when there are two or more label classes. We expect labels to be provided in a one_hot representation. If you want to provide labels as integers, please use SparseCategoricalCrossentropy loss. There should be # classes floating point values per feature.

However, from https://www.tensorflow.org/api_docs/python/tf/keras/losses/SparseCategoricalCrossentropy#init

Use this crossentropy loss function when there are two or more label classes. We expect labels to be provided as integers. If you want to provide labels using one-hot representation, please use CategoricalCrossentropy loss. There should be # classes floating point values per feature for y_pred and a single floating point value per feature for y_true.
In the snippet below, there is a single floating point value per example for y_true and # classes floating pointing values per example for y_pred. The shape of y_true is [batch_size] and the shape of y_pred is [batch_size, num_classes].

The latter being said that where should always be # classes features for the input of SparseCategoricalCrossentropy.call , whether it is in the form of probability distribution or logits.
And here comes another question, if this is the case, how could I pass only integers as labels without the need one-hot encoding them first?

Hey @ziruizhuang I went through the issue and the gist that @gadagashwini  provided, It looked like casting the type of y_output to float32 solves the problem. And another thing that I noticed, the value being shown is really really small, around 1e-07, so I can roughly guess there's some issue with the sparse_categorical_entropy kernel and it can't handle non-float data, may be trying to figure out the floating point alternative of the interger inputs, it breaks, because of some floating point error. Not sure if that's a bug, or a feature.
@vbardiovskyg @srjoglekar246 can you confirm?

@captain-pool Thanks for the suggestion. I tried to cast it to float32 but I got another error and it seems that it is related to the shape of the tensors.
    (train_X, train_Y), (test_X, test_Y) = fashion_mnist.load_data()

    train_X = train_X.reshape(-1, 28, 28, 1)
    test_X = test_X.reshape(-1, 28, 28, 1)

    train_X = train_X.astype('float32')
    test_X = test_X.astype('float32')
    train_X = train_X / 255
    test_X = test_X / 255

    train_L = len(train_X)
    test_L = len(test_X)

    x_input = tf.keras.Input(dtype=tf.dtypes.float32, shape=[28, 28, 1])

    x = tf.keras.layers.Flatten()(x_input)
    y_logits = tf.keras.layers.Dense(10)(x)
    y_probability = tf.keras.layers.Softmax()(y_logits)
    y_output = tf.math.argmax(
        input=y_probability,
        axis=1,
        output_type=tf.dtypes.int32
    )
    y_output = tf.dtypes.cast(y_output, tf.float32)

    model = tf.keras.Model(inputs=x_input, outputs=y_output)

    model.compile(
        optimizer=tf.keras.optimizers.SGD(learning_rate=1e-3),
        loss=tf.keras.losses.SparseCategoricalCrossentropy(from_logits=False),

        metrics=[
            # 'accuracy'
            tf.keras.metrics.Accuracy()
        ]
    )

    # Trains for 5 epochs
    model.fit(x=train_X, y=train_Y, batch_size=32, epochs=5)

Traceback (most recent call last):
  File "C:/Users/user/OneDrive/UH/cvxtest/test3.py", line 56, in <module>
    model.fit(x=train_X, y=train_Y, batch_size=32, epochs=5)
  File "C:\Users\user\Miniconda3\envs\tf2\lib\site-packages\tensorflow_core\python\keras\engine\training.py", line 728, in fit
    use_multiprocessing=use_multiprocessing)
  File "C:\Users\user\Miniconda3\envs\tf2\lib\site-packages\tensorflow_core\python\keras\engine\training_v2.py", line 324, in fit
    total_epochs=epochs)
  File "C:\Users\user\Miniconda3\envs\tf2\lib\site-packages\tensorflow_core\python\keras\engine\training_v2.py", line 123, in run_one_epoch
    batch_outs = execution_function(iterator)
  File "C:\Users\user\Miniconda3\envs\tf2\lib\site-packages\tensorflow_core\python\keras\engine\training_v2_utils.py", line 86, in execution_function
    distributed_function(input_fn))
  File "C:\Users\user\Miniconda3\envs\tf2\lib\site-packages\tensorflow_core\python\eager\def_function.py", line 457, in __call__
    result = self._call(*args, **kwds)
  File "C:\Users\user\Miniconda3\envs\tf2\lib\site-packages\tensorflow_core\python\eager\def_function.py", line 503, in _call
    self._initialize(args, kwds, add_initializers_to=initializer_map)
  File "C:\Users\user\Miniconda3\envs\tf2\lib\site-packages\tensorflow_core\python\eager\def_function.py", line 408, in _initialize
    *args, **kwds))
  File "C:\Users\user\Miniconda3\envs\tf2\lib\site-packages\tensorflow_core\python\eager\function.py", line 1848, in _get_concrete_function_internal_garbage_collected
    graph_function, _, _ = self._maybe_define_function(args, kwargs)
  File "C:\Users\user\Miniconda3\envs\tf2\lib\site-packages\tensorflow_core\python\eager\function.py", line 2150, in _maybe_define_function
    graph_function = self._create_graph_function(args, kwargs)
  File "C:\Users\user\Miniconda3\envs\tf2\lib\site-packages\tensorflow_core\python\eager\function.py", line 2041, in _create_graph_function
    capture_by_value=self._capture_by_value),
  File "C:\Users\user\Miniconda3\envs\tf2\lib\site-packages\tensorflow_core\python\framework\func_graph.py", line 915, in func_graph_from_py_func
    func_outputs = python_func(*func_args, **func_kwargs)
  File "C:\Users\user\Miniconda3\envs\tf2\lib\site-packages\tensorflow_core\python\eager\def_function.py", line 358, in wrapped_fn
    return weak_wrapped_fn().__wrapped__(*args, **kwds)
  File "C:\Users\user\Miniconda3\envs\tf2\lib\site-packages\tensorflow_core\python\keras\engine\training_v2_utils.py", line 73, in distributed_function
    per_replica_function, args=(model, x, y, sample_weights))
  File "C:\Users\user\Miniconda3\envs\tf2\lib\site-packages\tensorflow_core\python\distribute\distribute_lib.py", line 760, in experimental_run_v2
    return self._extended.call_for_each_replica(fn, args=args, kwargs=kwargs)
  File "C:\Users\user\Miniconda3\envs\tf2\lib\site-packages\tensorflow_core\python\distribute\distribute_lib.py", line 1787, in call_for_each_replica
    return self._call_for_each_replica(fn, args, kwargs)
  File "C:\Users\user\Miniconda3\envs\tf2\lib\site-packages\tensorflow_core\python\distribute\distribute_lib.py", line 2132, in _call_for_each_replica
    return fn(*args, **kwargs)
  File "C:\Users\user\Miniconda3\envs\tf2\lib\site-packages\tensorflow_core\python\autograph\impl\api.py", line 292, in wrapper
    return func(*args, **kwargs)
  File "C:\Users\user\Miniconda3\envs\tf2\lib\site-packages\tensorflow_core\python\keras\engine\training_v2_utils.py", line 264, in train_on_batch
    output_loss_metrics=model._output_loss_metrics)
  File "C:\Users\user\Miniconda3\envs\tf2\lib\site-packages\tensorflow_core\python\keras\engine\training_eager.py", line 311, in train_on_batch
    output_loss_metrics=output_loss_metrics))
  File "C:\Users\user\Miniconda3\envs\tf2\lib\site-packages\tensorflow_core\python\keras\engine\training_eager.py", line 252, in _process_single_batch
    training=training))
  File "C:\Users\user\Miniconda3\envs\tf2\lib\site-packages\tensorflow_core\python\keras\engine\training_eager.py", line 166, in _model_loss
    per_sample_losses = loss_fn.call(targets[i], outs[i])
  File "C:\Users\user\Miniconda3\envs\tf2\lib\site-packages\tensorflow_core\python\keras\losses.py", line 221, in call
    return self.fn(y_true, y_pred, **self._fn_kwargs)
  File "C:\Users\user\Miniconda3\envs\tf2\lib\site-packages\tensorflow_core\python\keras\losses.py", line 978, in sparse_categorical_crossentropy
    y_true, y_pred, from_logits=from_logits, axis=axis)
  File "C:\Users\user\Miniconda3\envs\tf2\lib\site-packages\tensorflow_core\python\keras\backend.py", line 4546, in sparse_categorical_crossentropy
    labels=target, logits=output)
  File "C:\Users\user\Miniconda3\envs\tf2\lib\site-packages\tensorflow_core\python\ops\nn_ops.py", line 3477, in sparse_softmax_cross_entropy_with_logits_v2
    labels=labels, logits=logits, name=name)
  File "C:\Users\user\Miniconda3\envs\tf2\lib\site-packages\tensorflow_core\python\ops\nn_ops.py", line 3393, in sparse_softmax_cross_entropy_with_logits
    logits.get_shape()))
ValueError: Shape mismatch: The shape of labels (received (32,)) should equal the shape of logits except for the last dimension (received (1, 32)).

Hello, how did you finally solve this issue?

Hi @kenseii ,
I choose to use low level API instead.
for your reference, the code works fine both using CategoricalCrossentropy and SparseCategoricalCrossentropy
import numpy as np
import tensorflow as tf

from mnist import train_images, test_images, train_labels, test_labels

tf.random.set_seed(1)
np.random.seed(1)

LOSS_TYPES = {
    'CE': tf.keras.losses.CategoricalCrossentropy(),
    'SCE': tf.keras.losses.SparseCategoricalCrossentropy()
}
LOSS_TYPE1 = 'CE'
LOSS_TYPE2 = LOSS_TYPES[LOSS_TYPE1]

DTYPES = {
    'float16': tf.float16,
    'float32': tf.float32,
    'float64': tf.float64
}

DTYPE1 = 'float32'
DTYPE2 = DTYPES[DTYPE1]

tf.keras.backend.set_floatx(DTYPE1)

EPOCHS = 50
NCLASS = 10
BATCH_SIZE = 256

class MNISTModel(tf.keras.Model):
    loss_object = LOSS_TYPE2

    optimizer = tf.keras.optimizers.Adam(learning_rate=1e-3)

    train_loss = tf.keras.metrics.Mean(name='train_loss')
    validate_loss = tf.keras.metrics.Mean(name='train_loss')
    test_loss = tf.keras.metrics.Mean(name='test_loss')

    train_acc = tf.keras.metrics.SparseCategoricalAccuracy(name='train_acc')
    validate_acc = tf.keras.metrics.SparseCategoricalAccuracy(name='train_acc')
    test_acc = tf.keras.metrics.SparseCategoricalAccuracy(name='test_acc')

    n_class = None

    def __init__(self, n_class):
        super(MNISTModel, self).__init__()
        self.n_class = n_class

        self.d0 = tf.keras.layers.Conv2D(16, [3, 3], 1, 'same', activation='relu')
        self.d1 = tf.keras.layers.Conv2D(16, [3, 3], 1, 'same', activation='relu')
        self.d2 = tf.keras.layers.Conv2D(16, [3, 3], 1, 'same', activation='relu')
        self.d3 = tf.keras.layers.Conv2D(16, [3, 3], 1, 'same', activation='relu')

        self.p0 = tf.keras.layers.MaxPooling2D((2, 2))
        self.p1 = tf.keras.layers.MaxPooling2D((2, 2))
        self.p2 = tf.keras.layers.MaxPooling2D((2, 2))
        self.p3 = tf.keras.layers.MaxPooling2D((2, 2))

        self.d_prior = tf.keras.layers.Dense(64, activation='relu')
        self.d_out = tf.keras.layers.Dense(self.n_class, activation='softmax')

    @tf.function
    def call(self, x, training):
        x = tf.dtypes.cast(
            tf.reshape(x, [-1, 28, 28, 1]),
            dtype=DTYPE2
        )

        x = self.d0(x)
        x = self.p0(x)

        x = self.d1(x)
        x = self.p1(x)

        x = self.d2(x)
        x = self.p2(x)

        x = self.d3(x)
        x = self.p3(x)

        x = tf.keras.layers.Flatten()(x)

        x = self.d_prior(x)
        x = self.d_out(x)
        return x

    @tf.function
    def train_step(self, x, y):
        with tf.GradientTape() as tape:
            predictions = self.call(x, training=True)

            if LOSS_TYPE1 == 'CE':
                y_one_hot = tf.one_hot(y, self.n_class)
                loss = self.loss_object(y_one_hot, predictions)
            elif LOSS_TYPE1 == 'SCE':
                loss = self.loss_object(y, predictions)

            # print('loss', loss)
        gradients = tape.gradient(loss, self.trainable_variables)
        # print([gvs.shape for gvs in gradients])

        # gradients = [
        #     tf.where(
        #         tf.math.is_nan(grad),
        #         tf.zeros_like(grad),
        #         grad
        #     )
        #     for grad in gradients
        # ]

        # print('gradients', gradients)
        self.optimizer.apply_gradients(zip(gradients, self.trainable_variables))
        self.train_loss(loss)
        self.train_acc.update_state(y, predictions)
        return loss

    @tf.function
    def test_step(self, x, y):
        predictions = self.call(x, training=False)
        if LOSS_TYPE1 == 'CE':
            y_one_hot = tf.one_hot(y, self.n_class)
            t_loss = self.loss_object(y_one_hot, predictions)
        elif LOSS_TYPE1 == 'SCE':
            t_loss = self.loss_object(y, predictions)
        # t_loss = tf.reduce_sum(t_loss) * (1. / BATCH_SIZE)
        self.test_loss(t_loss)
        self.test_acc.update_state(y, predictions)

    @tf.function
    def validate_step(self, x, y):
        predictions = self.call(x, training=False)
        if LOSS_TYPE1 == 'CE':
            y_one_hot = tf.one_hot(y, self.n_class)
            v_loss = self.loss_object(y_one_hot, predictions)
        elif LOSS_TYPE1 == 'CE':
            v_loss = self.loss_object(y, predictions)
        # t_loss = tf.reduce_sum(t_loss) * (1. / BATCH_SIZE)
        self.validate_loss(v_loss)
        self.validate_acc.update_state(y, predictions)

if __name__ == '__main__':
    x_train = train_images()
    y_train = train_labels()

    x_test = test_images()
    y_test = test_labels()

    print(np.shape(y_train))

    model = MNISTModel(NCLASS)

    train_ds = tf.data.Dataset.from_tensor_slices(
        (x_train, y_train)
    ).shuffle(10000).batch(BATCH_SIZE)

    test_ds = tf.data.Dataset.from_tensor_slices(
        (x_test, y_test)
    ).batch(BATCH_SIZE)

    for epoch in range(EPOCHS):
        for x, y in train_ds:
            model.train_step(x, y)

        for x, y in test_ds:
            model.test_step(x, y)

        template = 'Epoch {}, Train Loss: {}, Test Loss: {}, Train Acc: {}, Test Acc: {}'

        epoch_str = template.format(
            epoch + 1,
            model.train_loss.result(),
            model.test_loss.result(),
            model.train_acc.result(),
            model.test_acc.result()
        )
        print(epoch_str)

        # Reset the metrics for the next epoch
        model.train_loss.reset_states()
        model.test_loss.reset_states()
        model.train_acc.reset_states()
        model.test_acc.reset_states()

@ziruizhuang Sorry for the late reply. I have updated some parts of your code such as removing y_input, one_hot etc. Now the code works as expected. Here is the gist for your reference. These modifications are good for loss=tf.keras.losses.SparseCategoricalCrossentropy() but you can do similar things for loss=tf.keras.losses.CategoricalCrossentropy(). Thanks!
I am closing this issue as it was resolved. Please feel free to open a new issue related to this work. Thanks!

@jvishnuvardhan Thank you for the gist. Now I see how to make it work using SparseCategoricalCrossentropy loss and keras model.
Still, a little more discussion on this topic. Is it a designed behavior that a keras model always produce floating point output? I mean it would be more straightforward using the following two sets of configuration:

Config 1

train_y/test_y are one_hot/probability vector (float), and y_output is probability vector (float)
use CategoricalCrossentropy

Config 2

train_y/test_y are integers, and y_output is integer as well
use SparseCategoricalCrossentropy

Basically, if a model learns to produce integers, it produces integers; and if a model learns to produce floats, it produces floats.
However, the current behavior is

Config 3

train_y/test_y are integers, and y_output is probability vector (float)
use SparseCategoricalCrossentropy

That is to say, the model learns to produce integers, but it produces floats instead.
And the exception thrown out is confusing if we ever try with Config 2. it says
TypeError: Expected int64, got 1e-07 of type 'float' instead.
which intuitively means something in the code should be int64 but we gave a really small float instead? In that sense, we should debug and find if something else should be cast to int64 in our code, which is the quite opposite of the reality.

@ziruizhuang Model generally output probabilities in classification. Please check a tutorial on TF website. If you want to predict classes, you can do
predictions = model.predict_classes(x_train)
or
y_pred = model.predict(x_train)
predictions = tf.argmax(y_pred,axis=1)

Please post further questions in Stackoverflow. We will answer there. We want to keep this GitHub repository to address mainly bug/performance issues. Thanks!


Chapter 9 - LAMP infra - PHP not running

I'm not familiar enough to debug PHP but as best as I can tell my code matches the examples in the book and here yet the page seems to break in the PHP code. It almost seems like PHP isn't even enabled.

I was able to fix this by restarting apache at the end of the www playbook.
- name: Restart Apache
      service: name=httpd state=restarted


Text notes, saving them into text file, loading from file

Can you please provide more details?

Looks like all parts are already done - closing this multi-issue for now.
If something requires changes - reopen it, or create new issue


Update the KIND_IMAGE environment variable

Signed-off-by: Swati Sehgal<EMAIL_ADDRESS>

Changes not needed.


When I use the pretrained model, should I use the x = (x - 0.45) / 0.225 as input?

When I use the ImageNet pretrained model on other datasets, should I do something like this:
def forward(self, img):
        img = (img - 0.45) / 0.225
        x = self.mod1(img)

instead of directly :
def forward(self, img):
        x = self.mod1(img)

Need help! X_X

I get it.. It is transforming the inputs for the network according to the mean and std of the KITTI dataset

I get it.. It is transforming the inputs for the network according to the mean and std of the KITTI dataset


TypeError: 'NoneType' object is not subscriptable

Hi, do you have solution for this iissue?
import pyktok as pyk
pyk.specify_browser("firefox")
pyk.save_tiktok("https://www.tiktok.com/@vantoan___/video/7294298719665622305?is_from_webapp=1&sender_device=pc",
True,
'video_data.csv',
browser_name = "firefox")

I ran your code and it worked fine for me. Maybe upgrade your Python to 3.10? That's what I'm using.

Have you ever opened TikTok on Firefox? If not, maybe you don't have the necessary cookies?

Yes, I was going to suggest trying another browser on your system, again ensuring you've opened TikTok on it at least once.

I'm also empiercing the same issue I'm running on python 3.10. tried it on all 3 browsers i.e. chrome, Firefox and Edge

Do you have a TT account and is the browser on or off when you run the program? Also please list your OS and version.

Have you ever opened TikTok on Firefox? If not, maybe you don't have the necessary cookies?

yes, i have opened link Tiktok on firefox and chrome

Do you have a TT account and is the browser on or off when you run the program? Also please list your OS and version.

yes i have, I tried it both with TT account or without sign in my TT account and I open the browser when run the code.
I'm using Ubuntu 20.04.6 LTS.

OK, please try the following troubleshooting steps:

Open a TT video in your browser while logged in to your account.
View the page's source.
Attempt to find the following string within the source: SIGI_STATE
Report back here whether you found it.

Also please try the code using pyk.specify_browser("chrome") rather than pyk.specify_browser("firefox") if you haven't already. Please report whether it returns the same error or a different one.

I found the problem.
"SIGI_STATE" is not in my video page source., either in  firefox and chrome, and i tried this in my OS windows also.
my video page's source uses "UNIVERSAL_DATA_FOR_REHYDRATION, ", I don't know why it's different from yours.
The structure and key names on the video page source had also changed, so I couldn't use the existing code.
alternatively, I need to make some change to the code.
##similar in pyktok code
def get_tiktok_json(video_url,browser_name=None):
    if 'cookies' not in globals() and browser_name is None:
        raise BrowserNotSpecifiedError
    global cookies
    if browser_name is not None:
        cookies = getattr(browser_cookie3,browser_name)(domain_name='www.tiktok.com')
    tt = requests.get(video_url,
                      headers=headers,
                      cookies=cookies,
                      timeout=20)
    # retain any new cookies that got set in this request
    cookies = tt.cookies
    soup = BeautifulSoup(tt.text, "html.parser")
    tt_script = soup.find('script', attrs={'id':"SIGI_STATE"})
    try:
        tt_json = json.loads(tt_script.string)
    except AttributeError:
        print("The function encountered a downstream error and did not deliver any data, which happens periodically for various reasons. Please try again later.")
        return
    return tt_json

##alternative  get_tiktok_json
def alt_get_tiktok_json(video_url,browser_name=None):
    if 'cookies' not in globals() and browser_name is None:
        raise BrowserNotSpecifiedError
    global cookies
    if browser_name is not None:
        cookies = getattr(browser_cookie3,browser_name)(domain_name='www.tiktok.com')
    tt = requests.get(video_url,
                      headers=headers,
                      cookies=cookies,
                      timeout=20)
    # retain any new cookies that got set in this request
    cookies = tt.cookies
    soup = BeautifulSoup(tt.text, "html.parser")
    tt_script = soup.find('script', attrs={'id':"__UNIVERSAL_DATA_FOR_REHYDRATION__"})
    try:
        tt_json = json.loads(tt_script.string)
    except AttributeError:
        print("The function encountered a downstream error and did not deliver any data, which happens periodically for various reasons. Please try again later.")
        return
    return tt_json

##save_tiktok adding condition
def save_tiktok(video_url,
                save_video=True,
                metadata_fn='',
                browser_name=None):
    if 'cookies' not in globals() and browser_name is None:
        raise BrowserNotSpecifiedError
    if save_video == False and metadata_fn == '':
        print('Since save_video and metadata_fn are both False/blank, the program did nothing.')
        return

    tt_json = get_tiktok_json(video_url,browser_name)

##check if tt_json not None by using get_tiktok_json
    if tt_json is not None:
        video_id = list(tt_json['ItemModule'].keys())[0]

        if save_video == True:
            regex_url = re.findall(url_regex, video_url)[0]
            if 'imagePost' in tt_json['ItemModule'][video_id]:
                slidecount = 1
                for slide in tt_json['ItemModule'][video_id]['imagePost']['images']:
                    video_fn = regex_url.replace('/', '_') + '_slide_' + str(slidecount) + '.jpeg'
                    tt_video_url = slide['imageURL']['urlList'][0]
                    headers['referer'] = 'https://www.tiktok.com/'
                    # include cookies with the video request
                    tt_video = requests.get(tt_video_url, allow_redirects=True, headers=headers, cookies=cookies)
                    with open(video_fn, 'wb') as fn:
                        fn.write(tt_video.content)
                    slidecount += 1
            else:
                regex_url = re.findall(url_regex, video_url)[0]
                video_fn = regex_url.replace('/', '_') + '.mp4'
                tt_video_url = tt_json['ItemModule'][video_id]['video']['downloadAddr']
                headers['referer'] = 'https://www.tiktok.com/'
                # include cookies with the video request
                tt_video = requests.get(tt_video_url, allow_redirects=True, headers=headers, cookies=cookies)
            with open(video_fn, 'wb') as fn:
                fn.write(tt_video.content)
            print("Saved video\n", tt_video_url, "\nto\n", os.getcwd())

        if metadata_fn != '':
            data_slot = tt_json['ItemModule'][video_id]
            data_row = generate_data_row(data_slot)
            try:
                user_id = list(tt_json['UserModule']['users'].keys())[0]
                data_row.loc[0,"author_verified"] = tt_json['UserModule']['users'][user_id]['verified']
            except Exception:
                pass
            if os.path.exists(metadata_fn):
                metadata = pd.read_csv(metadata_fn,keep_default_na=False)
                combined_data = pd.concat([metadata,data_row])
            else:
                combined_data = data_row
            combined_data.to_csv(metadata_fn,index=False)
            print("Saved metadata for video\n",video_url,"\nto\n",os.getcwd())

##This is using alt_get_tiktok_json
    else:
        tt_json = alt_get_tiktok_json(video_url,browser_name)
        regex_url = re.findall(url_regex, video_url)[0]
        video_fn = regex_url.replace('/', '_') + '.mp4'
        tt_video_url = tt_json["__DEFAULT_SCOPE__"]['webapp.video-detail']['itemInfo']['itemStruct']['video']['downloadAddr']
        headers['referer'] = 'https://www.tiktok.com/'
        # include cookies with the video request
        tt_video = requests.get(tt_video_url, allow_redirects=True, headers=headers, cookies=cookies)
        with open(video_fn, 'wb') as fn:
            fn.write(tt_video.content)

        if metadata_fn != '':
            data_slot = tt_json["__DEFAULT_SCOPE__"]['webapp.video-detail']['itemInfo']['itemStruct']
            data_row = generate_data_row(data_slot)
            try:
                user_id = list(tt_json['UserModule']['users'].keys())[0]
                data_row.loc[0,"author_verified"] = tt_json["__DEFAULT_SCOPE__"]['webapp.video-detail']['itemInfo']['itemStruct']['author']
            except Exception:
                pass
            if os.path.exists(metadata_fn):
                metadata = pd.read_csv(metadata_fn,keep_default_na=False)
                combined_data = pd.concat([metadata,data_row])
            else:
                combined_data = data_row
            combined_data.to_csv(metadata_fn,index=False)
            print("Saved metadata for video\n",video_url,"\nto\n",os.getcwd())

Glad you found a solution. If you have time, may I suggest adding a pull request so I can update Pyktok? If not, I'll do it when time permits. I will of course credit you on the main page. Anyone else seeing this can also feel free to copy the code and do a PR.
Can I also ask what country you live in? I'm guessing the difference in the script IDs might have something to do with that.

@BillyBSig, does this actually work with the data in __UNIVERSAL_DATA_FOR_REHYDRATION__:
video_id = list(tt_json['ItemModule'].keys())[0]
tt_json['ItemModule'][video_id]['video']['downloadAddr']`.

I always get both IDs, but only the data in SIGI_STATE is actually useful (I observed this in several countries in Europe).

Glad you found a solution. If you have time, may I suggest adding a pull request so I can update Pyktok? If not, I'll do it when time permits. I will of course credit you on the main page. Anyone else seeing this can also feel free to copy the code and do a PR.

Sure, I have added a new pull request, thanks for your time to review it

Can I also ask what country you live in? I'm guessing the difference in the script IDs might have something to do with that.

I'm living in Indonesia,
yes I guess so, maybe some regions have different scripts

@BillyBSig, does this actually work with the data in __UNIVERSAL_DATA_FOR_REHYDRATION__:
video_id = list(tt_json['ItemModule'].keys())[0]
tt_json['ItemModule'][video_id]['video']['downloadAddr']`.

unfortunately no, data in __UNIVERSAL_DATA_FOR_REHYDRATION__ has different structure, and there is no ItemModule in it.

I always get both IDs, but only the data in SIGI_STATE is actually useful (I observed this in several countries in Europe).

Last month i tried with SIGI_STATE and everything worked fine, but suddenly the script changed to __UNIVERSAL_DATA_FOR_REHYDRATION__. Maybe there are differences script in some regions.

Merged in the PR implementing the fix for this.


chore: Property filter custom form footer

Description
This PR changes the way custom forms are rendered in the property filter. Now, the form footer is rendered to the dropdown footer which makes it sticky in case the custom form is large.
How has this been tested?

New unit test
Screenshot tests
Dry-run

Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness

Changes include appropriate documentation updates.
Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
Changes do not include unsupported browser features, see CONTRIBUTING.md.
Changes were manually tested for accessibility, see accessibility guidelines.

Security

If the code handles URLs: all URLs are validated through the checkSafeUrl function.

Testing

Changes are covered with new/existing unit tests?
Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Is there a page in the deployment link to test this?

Is there a page in the deployment link to test this?

Yes, this one: /property-filter/split-panel-app-layout-integration
There are a few custom properties, including "Stopped" and "Launch date"


Lumen, queue and one more question

Hi,

Could you provide example for Lumen setup?
Do you have an idea how could we integrate Queue feature using this wrapper to postpone subscribing?
I see you are including entire mailchimp library, do we have all functions available from the library?

thanks

To add Queue mailchimp needs to merge my PR, https://bitbucket.org/mailchimp/mailchimp-api-php/pull-requests/22/restructure-the-code-this-is-so-the-curl/diff#comment-28513883

I changed the code and deployed without them merging it.

Awesome, could you provide maybe a gist with code example how you used to create a job, I could also manually merge this changes? I already use mail::queue so table exist, but not sure I know how to add other jobs like this one :)

https://gist.github.com/dewwwald/b5ba9802d87af9801c7f45d663a86eae

Awesome, really appreciate the help, thanks!

Ok, I managed to implement this in Lumen 5.2, I had to make small changes in setup to get this work, not sure if @skovmand is open for PR to give an example how to implement in lumen.
@dewwwald thanks again, jobs are working as expected, I hope Mailchimp merge your update soon!

If you send a PR with an example for Lumen, I'd be happy to merge it into README.md.
I don't know Lumen myself, and I have to admin I have no plans of learning it.

Thanks @skovmand I made PR, and I had to made small change to service, please check and let me know if any issue you have.
davor


update e2e test to use ServiceAccountName

Please consider my note in #863 to prevent this next time.

That's a good idea. Also, I didn't see your PR when I opened this one, that's my fault.


[Missing] Profile picture privacy

https://telegram.org/blog/unsend-privacy-emoji

Support for managing visibility of the user's profile photo was added in TDLib 1.5.0 via new privacy settings userPrivacySettingShowProfilePhoto. See Change Log for the full list of changes.


Do we still need "Pattern (regular expression) feature" section?  It

Pattern (regular expression) feature

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

ID: c975bacb-0bee-7bb7-0d22-1296e79364b4
Version Independent ID: 57f07a89-94d6-74ef-1ba3-846e590ac838
Content: Phrase lists to enhance entity detection - Azure Cognitive Services
Content Source: articles/cognitive-services/LUIS/luis-how-to-add-features.md
Service: cognitive-services
GitHub Login: @diberry
Microsoft Alias: diberry

@managedcoder Hi Russ, this has already been fixed. It should be published in tomorrow morning's AM publish. #in-progress

Sorry!  Was not finished before I hit the return key by mistake... This deprecation warning is confusing since Patterns are legit as are Regular Expressions Entities.  Perhaps this section is no longer needed and may be actually causing more confusion than clarity.

@managedcoder The text is removed from the doc now. #sign-off

@managedcoder
We will now proceed to close this thread. If there are further questions regarding this matter, please respond here and @YutongTie-MSFT and we will gladly continue the discussion.


[Feature]: API Client can filter apps by space

Background
As a client of the CF API Shim
I want to filter apps by space
So that I can see the list of apps in the current space
Acceptance Criteria
GIVEN the spaces space1, space2 and space3 exist
AND the apps app1 and app2 exist in space1
AND the apps app3 and app4 exist in space2
AND the apps app5 and app6 exist in space3
WHEN I GET /v3/apps?space_guids=<guid-of-space-1>,<guid-of-space3>
THEN I see that only app1, app2, app5 and app6 are part of the response

Work completed in https://github.com/cloudfoundry/cf-k8s-controllers/issues/266


Making a network with a new dataset

In BNN-PYNQ/bnn/src/training/lfc.py it says that changing the file will likely result in not fitting on the PYNQ overlay. Is it possible to change the units, layers, and shape without having to worry? I am currently running it with changes but am unsure if it will not work later on.

There are 2 available overlays, each one implementing a neural network (LFC and CNV). If you want to use one of the available overlays, you need to train the network using one of the available topology.
If you want to change the network topology during training, you will need to adjust the network topology in the HLS description accordingly and regenerate a new overlay.


Forever loading on SplashScreen on OffDebug Variant

Summary:
The Splash Screen Keeps on Loading on OffDebug Variant
Steps to reproduce:
1 choose offDebug as your build variant
2 Build and run the variant on 7.1 Android
3 Splash Screen with LoadToast is showing indeterminately.

Expected behavior:
The App should run fine on android 7.1
Observed behavior:
I checked further and got that it Leads to GetJson Asynktask to execute and get the json value.
Afterwards it runs the preexecute and Doinbackground Perfectly but gets stucked on PostExecute.

Device and Android version:
Android 7.1
Yes, I would like to work on this issue

Yes i would like to Work on this issue.

It is caused inside that getAllergence call And inside that call it calls the Overridden method onFailure
Here is the proof:

on printing the stacktrace of the throwable t  i got this
02-18 05:32:02.130 24333-24333/openfoodfacts.github.scrachx.openfood W/System.err: java.net.SocketException: Network is unreachable
02-18 05:32:02.131 24333-24333/openfoodfacts.github.scrachx.openfood W/System.err:     at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:334)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:196)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:178)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:356)
        at java.net.Socket.connect(Socket.java:586)
        at okhttp3.internal.platform.AndroidPlatform.connectSocket(AndroidPlatform.java:69)
        at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:238)
        at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:158)
        at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:256)
        at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:134)
        at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:113)
        at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
        at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
02-18 05:32:02.132 24333-24333/openfoodfacts.github.scrachx.openfood W/System.err:     at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
        at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:125)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
        at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:200)
        at okhttp3.RealCall$AsyncCall.execute(RealCall.java:147)
        at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
        at java.lang.Thread.run(Thread.java:760)

If anybody got a clue on why is it happening in getAllergance method. Don't keep it to yourself :smile:

Hi @sachincool, I've been able to reproduce the issue, just as you mention, using a 7.0 image. The java.net.PlainSocketImpl.socketConnect(Native Method) warning made my thing something weird is going on. The URL getAllergens() is trying to retrieve can be accessed without errors outside the app (using a browser with it own TLS certificate stack, independent from the system, like chrome). Moreover, you cannot sign in, or get any asset from the OFF server.
I captured the traffic with wireshark:

As you can see, the TLS connection is failing during the handshake; and this is the very reason OFF is failing in this version.
I found some articles mentioning the issue and how to solve it:

https://stackoverflow.com/questions/39133437/sslhandshakeexception-handshake-failed-on-android-n-7-0#42047877
https://issuetracker.google.com/issues/37122132
https://community.letsencrypt.org/t/warning-android-7-0-clients-not-browsers-can-only-use-curve-prime256v1/23212

It requires a bit of work on the server side: nginx's config file (or the TLS terminator OFF is currently using) to allow prime256v1 elliptic curve as fallback to make Android 7.0 devices to finish the TLS handshake, hence being able to retrieve assets from OFF server.

Wow !! @policorn  I never thought i would see Wireshark and Android in the same room :open_mouth:
I'll get on the links you provided Thankyou So much for the help.  :heart_eyes:

You can see this file to resolve this issue : https://github.com/itchix/TestMVPAndroid/blob/88cf30e65756301464fc63c78ebe6ec47bdea4d8/app/src/main/java/com/scrachx/foodfacts/checker/utils/OkHttpUtil.java
I use it to bypass the bug on Android 7.0

Hi @itchix, could we only force this weak cipher suite for Android 7.0 so the other Android versions can negotiate a stronger one if they support them?

https://github.com/openfoodfacts/openfoodfacts-androidapp/blob/master/app/src/main/java/openfoodfacts/github/scrachx/openfood/network/OpenFoodAPIClient.java#L84
You can verify the android.os.Build.VERSION_CODES and pass the good httpClient

Hi @sachincool, please implement the fix with @itchix's suggestions - Thanks!


Add arbitrary static attribute name/values to refinery telemetry

When running more than 1 refinery cluster there is no way to differentiate the telemetry from each cluster.
Allow the refinery operator to configure attribute name/values that will be added to all metrics and logs emitted by Refinery.

See this thread in the "discuss-refinery" channel  of the "Honeycomb Pollinators" Slack workspace for a similar request.

Fixed by #621


feat: add @capacitor-mlkit/selfie-segmentation package

Pull request checklist
Please check if your PR fulfills the following requirements:

[ ] The changes have been tested successfully.
[ ] A changeset has been created (npm run changeset).

@robingenz I have just noticed when testing the implementation, that without the enableRawSizeMask, the app will crash because it has to return too many data points. If I enable the raw mask size, it returns 64KB of data points (256 x 256) which works.
But I wonder how this is helpful for segmenting the selfie picture. Looking at the samples from Google, they apply the segmentation mask to the input image and return the segmented picture. This might be more useful for this package, what do you think?

@trancee Yes, you're right. Do you already have an idea how best to implement it?
My suggestion would be the following:
/**
 * @since 5.2.0
 */
export interface ProcessImageOptions {
  /**
   * The local path to the image file.
   *
   * @since 5.2.0
   */
  path: string;
}

/**
 * @since 5.2.0
 * @see https://developers.google.com/android/reference/com/google/mlkit/vision/segmentation/SegmentationMask
 */
export interface ProcessImageResult {
  /**
   * Returns a mask that indicates the foreground and background segmentation.
   *
   * @since 5.2.0
   */
  mask: number[];
  /**
   * Returns the width of the mask.
   *
   * @since 5.2.0
   */
  width: number;
  /**
   * Returns the height of the mask.
   *
   * @since 5.2.0
   */
  height: number;
  /**
   * The path to the generated foreground image file.
   *
   * @since 5.2.0
   */
  foregroundImagePath: string;
  /**
   * The path to the generated background image file.
   *
   * @since 5.2.0
   */
  backgroundImagePath: string;
}

mask would always be the rawSizeMask and the images could be saved in the tmp folder and the filenames could be {filename}-foreground.{extension} and {filename}-background.{extension}.
What do you think?

mask would always be the rawSizeMask and the images could be saved in the tmp folder and the filenames could be {filename}-foreground.{extension} and {filename}-background.{extension}.
What do you think?

Yes, I think that's a good idea. I will try to implement it this way.

@trancee Is this PR ready for merge?

@trancee Is this PR ready for merge?

I will update the iOS implementation first, then it should be ready.

@trancee Can we merge that as well?

@trancee Can we merge that as well?

Yes, I am done with the implementation. Good to merge!

@trancee Thank you again for your contributions! 😉


NetlifyCMS for non Netlify hosting website.

How to use NetlifyCMS with a web site on AWS S3? In NetlifyCMS docs all the examples are for the site on Netlify. How about S3, what are the steps of setting the identity, etc? Google search doesn't give any specifics...
Regards,
Victor.

The short answer is "its complicated". Netlify CMS works wherever you want it to, you just need to write your own code to connect to the services you prefer. Netlify is used because its super easy, anything else I would consider an advanced use case (Eg. a preference to use S3). I'm also coming up dry for Netlify CMS/S3 tutorials on Google.

I'm trying to get NetlifyCMS working with Amplify.
I was under the impression that it wouldn't be hard to get NetlifyCMS working with other hosting providers.
A little disappointing, as I was really keen to work with NetlifyCMS.

While not being a complete tutorial I think one can use this repo as a reference.
The interesting bits are:

Authentication: backend, serverless.yml, cms dynamic config and post deploy script
Preview links: bucket per preview, ci and static cms config
Hosting: S3 and CloudFront and custom certificate

Closing this. Please re-open if you have anymore questions

I came across this issue while looking for hosting Netlify CMS on AWS rather than Netlify. I realized there weren’t many tutorials or examples to do that. In case others land on this issue and are wondering the same as me, I wrote a series of blog posts about this during my internship at Pulumi. Please checkout this post. It’s part two of a 2-part series and specifically shows deploying a server that can do the OAuth authorization flow with GitHub etc.

This is great thanks. Very important resource we were missing.
I assume you're good with this PR https://github.com/netlify/netlify-cms/pull/4319/files (asking since it's not from your GitHub profile while still coming from a pulumi employee).

@erezrokah glad to hear it! I opened the PR on @zephyrz73's behalf just so I can respond to any PR comments not knowing the turnaround time for PR reviews for examples. :)

@erezrokah Yeah, @praneetloke will help me out about the rest of the work needed for submitting my code as part of https://www.netlifycms.org/docs/examples/  because of the sad fact that tomorrow will be the end of my internship. @praneetloke is my mentor for the internship and helped me a lot during development.


Fixed a typo in README.md

Fixed a typo in README.md on the "Deploy to Google Cloud Platform" section:
ERROR: (gcloud.compute) Invalid choice: 'zone'.
Maybe you meant:
  gcloud compute zones list
  gcloud config list
  gcloud compute zones describe

I'll review this once the CLA has been signed. Thanks for the fix.

Closing, https://github.com/GoogleCloudPlatform/open-match/pull/248/files addresses this.


Hackage version depends on old base (>=4.2 && <4.6)

Can't install because of this, I will try checking out the github project and installing that. Is there a release planned?

I am no longer maintaining this, and no releases are planned. I will merge any pull requests, though.


Hiding semaphores from the compiler.

This changes the runtime to use !hal.fence for all async signaling and hides that fences are backed by semaphores in the runtime module. Future changes may remove semaphores entirely from the public runtime API but this change is independent.

(gpu test failure is unrelated flake)


N/A instead of date and time in both current archive reports

There seems to be a small error in archive, which exists already in the original Neoground repo.
On current year and current month reports ONLY, always N/A is shown below the site title instead of current date and time.
All other archive reports are correct.

Known issue. Not sure why this happens.
Here's my workaround on my site:
in header.inc:
$station.location

#if $active_nav is 'archive'

#else
$current.dateTime

If you have a better solution, feel free to submit a Pull Request.

I like your aproach @W0CHP
the date field does not make sense on archive page because it is already shown

I'll fix this

Please not merge yet, there is still a bug on the month and year pages... I'll work on it

Changes are merged, issue can be closed


Crash when graph get's resized to zero height

I Just placed a graph inside my layout and my layout is collapsible and resizes its content. If I place your graph inside it it crashes (when it gets resized to 0, because it tries to call coerceIn with an empty or range).
It's probably a rare use case, but the graph should at least not crash if it gets resized to a zero height...  My suggestion is to use 0 in such a case instead of coerceIn which in case of the exception I see below would be the correct y value if the graph is to small to draw anything on the y axis anyway... Or alternatively skip the drawing at all...
Version:
compose-m3:1.6.4
Code
val chartEntryModel = entryModelOf(4f, 12f, 8f, 16f, 20f, 5f, 34f, 72f, 15f, 4f, 12f, 8f, 16f, 20f, 5f, 34f, 72f, 15f)
Chart(
	modifier = Modifier
		.fillMaxWidth()
		.height(100.dp)
		.padding(8.dp),
	chart = lineChart(),
	model = chartEntryModel,
	startAxis = startAxis(),
	bottomAxis = bottomAxis()
)

Stacktrace
java.lang.IllegalArgumentException: Cannot coerce value to an empty range: maximum -30.5 is less than minimum 27.5.
	at kotlin.ranges.RangesKt___RangesKt.coerceIn(_Ranges.kt:1441)
	at com.patrykandpatrick.vico.core.chart.line.LineChart$drawChart$1$1$1.invoke(LineChart.kt:340)
	at com.patrykandpatrick.vico.core.chart.line.LineChart$drawChart$1$1$1.invoke(LineChart.kt:301)
	at com.patrykandpatrick.vico.core.chart.line.LineChart.forEachPointWithinBoundsIndexed(LineChart.kt:469)
	at com.patrykandpatrick.vico.core.chart.line.LineChart.drawChart(LineChart.kt:301)
	at com.patrykandpatrick.vico.core.chart.BaseChart.drawChartInternal(BaseChart.kt:133)
	at com.patrykandpatrick.vico.core.chart.BaseChart.drawScrollableContent(BaseChart.kt:92)
	at com.patrykandpatrick.vico.core.chart.BaseChart.drawScrollableContent(BaseChart.kt:37)
	at com.patrykandpatrick.vico.compose.chart.ChartsKt$ChartImpl$6.invoke(Charts.kt:382)
	at com.patrykandpatrick.vico.compose.chart.ChartsKt$ChartImpl$6.invoke(Charts.kt:335)
	at androidx.compose.ui.draw.DrawBackgroundModifier.draw(DrawModifier.kt:114)
	...

Thanks for the bug report! We’ll look into it.

Also causing crashes for me. Trying to use AnimatedVisibility() with the composable chart and they don't seem to get along

Vico 1.6.5, which is now rolling out, resolves this issue. Thanks again for the report!


401 for push action, and OK for PR action

i have successful Action when it triggered from PR https://github.com/bomzheg/Shvatka/actions/runs/11900528289/job/33161572256
Run<EMAIL_ADDRESS>  with:
    auth: ***
    gistID: 99469cb5f8a18784c1f03d[2](https://github.com/bomzheg/Shvatka/actions/runs/11900528289/job/33161572256#step:8:2)29a799427
    filename: bage.json
    label: Coverage Report
    message: 7[3](https://github.com/bomzheg/Shvatka/actions/runs/11900528289/job/33161572256#step:8:3)%
    color: yellow
    namedLogo: python
    host: https://api.github.com/gists/
    forceUpdate: false
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.11.10/x6[4](https://github.com/bomzheg/Shvatka/actions/runs/11900528289/job/33161572256#step:8:4)
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.11.10/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.10/x[6](https://github.com/bomzheg/Shvatka/actions/runs/11900528289/job/33161572256#step:8:6)4
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.10/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.[10](https://github.com/bomzheg/Shvatka/actions/runs/11900528289/job/33161572256#step:8:10)/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.[11](https://github.com/bomzheg/Shvatka/actions/runs/11900528289/job/33161572256#step:8:11).10/x64/lib
Content did not change, not updating gist at bage.json.

but the same action from push to master got 401 https://github.com/bomzheg/Shvatka/actions/runs/11900568388/job/33162074399
Run<EMAIL_ADDRESS>  with:
    gistID: 99469cb5f8a18784c1f03d[2](https://github.com/bomzheg/Shvatka/actions/runs/11900568388/job/33162074399#step:8:2)29a799427
    filename: bage.json
    label: Coverage Report
    message: 7[3](https://github.com/bomzheg/Shvatka/actions/runs/11900568388/job/33162074399#step:8:3)%
    color: yellow
    namedLogo: python
    host: https://api.github.com/gists/
    forceUpdate: false
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.11.10/x6[4](https://github.com/bomzheg/Shvatka/actions/runs/11900568388/job/33162074399#step:8:4)
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.11.10/x[6](https://github.com/bomzheg/Shvatka/actions/runs/11900568388/job/33162074399#step:8:6)4/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.[10](https://github.com/bomzheg/Shvatka/actions/runs/11900568388/job/33162074399#step:8:10)/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.[11](https://github.com/bomzheg/Shvatka/actions/runs/11900568388/job/33162074399#step:8:11).10/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.10/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.11.10/x64/lib
Error: Failed to get gist: 401 Unauthorized

the first have auth property, and the second doesn't.
my config is:
      - name: Create the Badge
        uses<EMAIL_ADDRESS>        with:
          auth: ${{ secrets.BAGE_GIST }}
          gistID: 99469cb5f8a18784c1f03d229a799427
          filename: bage.json
          label: Coverage Report
          message: ${{ steps.coverageComment.outputs.coverage }}
          color: ${{ steps.coverageComment.outputs.color }}
          namedLogo: python

Can you help me?

Hi there! Looks like you forgot auth: ${{ secrets.BAGE_GIST }} in your second attempt.

@Schneegans thank you for answer!
here is my github action config. There is only one schneegans/dynamic-badges-action usage.
https://github.com/bomzheg/Shvatka/blob/master/.github/workflows/test.yml#L80
same action for PR and for push works different way. I don't understand how it's possible

Well, I do not want to debug your workflow here, but I think that there's some issue related to how you call this workflow. It seems it is executed on pull requests only. However, it is reused by another workflow which is called on pushing a commit.
The documentation talks about how to pass secrets to a reusable workflow, so maybe something is required here...

Ok, I think this is not a bug of your action, so, it will be right to close this issue, thank you for your help!


zsh: segmentation fault (core dumped)  ./fairy-wallet-0.10.0-x86_64.AppImage

~/Downloads
❯ ./fairy-wallet-0.10.0-x86_64.AppImage
zsh: segmentation fault (core dumped)  ./fairy-wallet-0.10.0-x86_64.AppImage

~/Downloads
❯ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.10
DISTRIB_CODENAME=cosmic
DISTRIB_DESCRIPTION="Ubuntu 18.10"

~/Downloads
❯ uname -a
Linux eros 4.18.0-10-generic #11-Ubuntu SMP Thu Oct 11 15:13:55 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

ERROR: apport (pid 9633) Wed Nov 14 13:54:32 2018: called for pid 9614, signal 11, core limit<PHONE_NUMBER>3709551615, dump mode 1
ERROR: apport (pid 9633) Wed Nov 14 13:54:32 2018: ignoring implausibly big core limit, treating as unlimited
ERROR: apport (pid 9633) Wed Nov 14 13:54:32 2018: Unhandled exception:
Traceback (most recent call last):
  File "/usr/share/apport/apport", line 483, in <module>
    exe_mtime = os.stat('/proc/%s/exe' % pid).st_mtime
PermissionError: [Errno 13] Permission denied: '/proc/9614/exe'

~/Downloads
❯ ll fairy-wallet-0.10.0-x86_64.AppImage
53M -rwxrwxr-x 1 user user 53M Nov 14 13:44 fairy-wallet-0.10.0-x86_64.AppImage*

I have got the same problem on the version 0.10 but I only get 'segmentation fault'.

hmm, thanks but how to fix it?


Don't link stdc++ when using bundled libbrotli

The bundled libbrotli doesn't appear to require c++ support.

Closing this as stale, if this is still important please reopen and rebase the branch.


Does Obfuscar support incremental obfuscation?

We are using coverage tools that builds a mapping between covered code and executed tests. The benefit is that for a particular code change, we can then decide which tests need to be executed. Thanks to the mapping, only the tests that executed the modified code (during previous runs) will be executed.
To do so, we need the obfuscation to remain stable over time: for inst. we need the obfuscation of method Foo to remain the same over time, otherwise the mapping we are relying on becomes useless. The best way would be that the coverage tool should support the mapping file... but it doesn't.
We used Crypto Obfuscator and its  Cryptographic Renaming scheme for this. Incremental obfuscation ensures that existing classes, methods, etc are given the same obfuscated name every time assemblies are obfuscated. Any new classes, methods, etc are given obfuscated names different from already taken obfuscated names. Problem is that Crypto doesn't seem to be maintained any longer and is not compatible with .Net Core/Standard.
I checked Obfuscar code and also did some experiments, looks like supporting a Cryptographic Renaming-like behavior seems simple to implement: by adding an object key parameter (that would receive the methodKey, propertyKey... values from the callers) to the UniqueName methods, we could do an MD5 checksum of this object as the name. That would be returned instead of the A, B... naming generation (which changes as soon as you insert members over time. I checked using MD5(xxxKey.ToString()) and it does the job.
Is this something you already had in mind? What do you think?

We are checking internally if the Cryptographic Renaming is really required and also doing further tests with Obfuscar. If still needed, I'll post a pull request.


Override spec.yml vars with layer specific ones when evaluating change blocks

Implemented with https://github.com/phR0ze/cyberlinux/commit/c0a615b54e8a6a8311ed60307e26dc527ff8541d


kfx conversion not working

whenever i try to convert to kfx the output is always epub

It's meant to create an ePub for kfx conversion in Calibre.


clientv3/namespace: fix incorrect watching prefix-end

using "abc" will watch the wrong range when WithPrefix() specified.

lgtm. Thanks!


Possible way to integrate support for Intel Iris Xe gpus?

I have a lot of school lectures that I need to make notes of, and using this plugin to transcribe the words would make doing so much easier. However, I only have access to my Intel laptop for computation, and I assume that if I could use the onboard Iris Xe GPU, the transcription rate would increase significantly. I did find the following resource for packages to install to enable support. Still, I don't know how to reformulate the options on transcribe.py to enable it to work (I assume, though it is windows specific, that it could work on my Linux machine): https://stackoverflow.com/questions/76796848/how-to-enable-intel-iris-xe-gpu-for-tensorflowkeras-on-windows

The correct place to open this issue is in https://github.com/OpenNMT/CTranslate2


Implement CASE for inner and outer expressions

Implemented for outer expressions.  Won't implement for inner expressions


update depreciated function usage.

Awesome thanks, will do a test run with this and merge tomorrow!


Use Symbol for syntactic elements?

From the documentation I see you do:
u = addVariable!(diffusion_system, "u");

Shouldn't u really be a symbol here? It would make everything more amenable to metaprogramming.

I'm not following... but I don't have much experience with Symbols.  Are you suggesting the return type of addVariable! be a Symbol?  Or are you suggesting that the name for the variable (the "u" here) be changed to be a Symbol?
u (on the LHS) here is a Variable... it holds quite a lot of state.  I can't see how it could be a Symbol.
But, like I say: I'm probably just not following because of my lack of expertise.

BTW: I definitely appreciate the feedback!  Still a lot to learn!

u = addVariable!(diffusion_system, :u)

Symbols are "instantiations of Julia syntax", so if one was to metaprogram with a variable u, one would work with its symbol. Also, Symbols have O(1) comparison as opposed to strings (probably doesn't matter in this context). So usually in Julia when you're naming things symbols are used because they are then easier to work with in other ways. Things like IDs or choices of methods are usually done via types or symbols for this reason. Seeing a string here is rather odd if one isn't looking to "index on the string" (str[1:5]).

Gotcha - thanks for the explanation!  It sounds reasonable to switch it.


Web support

Please, add web support with web workers api

Hi @promops 👋
Thanks for opening an issue!
Unfortunately, I don't think this is possible. Isolates are not available for Dart on the web.


How to get nuScenes test data results? (not v1.0-trainval)

@chenshi3 Thank you very much for your work!
I want to use my own model to get the prediction result in Nuscenes test dataset and save it, then submit it to Nuscenes official website, would you know how to do it? Looking forward to your reply!

@sshaoshuai

zbaishancha

Please refer to this.


Set default GitHub OAuth Client ID and Secret

Pending approval from GitHub support if we can make these public.
By doing so, we'd be able to enable anyone forking the repository to run the tests; else they'd need to have access to an OAuth Client ID and Secret of their own with callback URL to http://localhost:8080/katapult/api/github/callback for local testing

We cannot do this.  Opened #44 as a workaround.

More context: Heard back from GitHub and they told us this opens us up to unbounded rate access on their APIs.  With a localhost callback this isn't a security issue for us, but it is a concern for them and would have to spend effort in shutting down the app, etc.


rhoas login should ask user if they want to remove context

Description
Login as different user/org will cause context to be invalid.

Asking to switch context file when logging in as a different user is what we want here.


custom items are confusing

hi
I am looking at this page, and i am very confused on how to do this. is it like:
{
    "format_version": 1,
    "items": {
        "minecraft:black_stained_glass_pane": [
            {
                "name": "item_1"
                "custom_model_data": "123456"
                "name": "item_2"
                "custom_model_data": "987654"
            }
        ]
    }
}

or
{
    "format_version": 1,
    "items": {
        "minecraft:black_stained_glass_pane": [
            {
                "name": "item_1" {
                                "custom_model_data": "123456"
                }
                "name": "item_2" {
                                "custom_model_data": "987654"
                }
            }
        ]
    }
}

or something completely different?
I would like some more information. maybe some examples, or a zip with an editable preset (the geyser json + the bedrock pack)
thanks!

I'd recommend to ask that in the GeyserMC discord (discord.gg/GeyserMC), there's a dedicated channel to resource pack questions. But yea, wiki ain't easy to read, but that's due to the complexity of the feature.


Base removed + fixed Bannerlord and ManAtArms

Resolves #163.

		// Token: 0x17000835 RID: 2101
		// (get) Token: 0x06001ADE RID: 6878 RVA: 0x00069815 File Offset: 0x00067A15
		public override bool IsTown
		{
			get
			{
				return !this._isCastle;
			}
		}

		// Token: 0x17000836 RID: 2102
		// (get) Token: 0x06001ADF RID: 6879 RVA: 0x00069820 File Offset: 0x00067A20
		public override bool IsCastle
		{
			get
			{
				return this._isCastle;
			}
		}

IsCastle works, IsTown does not.

Swapped it around and tested for !IsVillage instead, and after testing it works as expected.


docker-compose setcap error

Hello,
Running the docker-compose deployment, I'm getting the following error both as root and non-root. Please help me resolve this issue.
ls
cfg  data  docker-compose.yml
docker-compose up
Creating network "deploy_data" with driver "bridge"
Creating volume "deploy_grafanadata" with default driver
Creating station1_agt ...
Creating station1_exporter ... error
Creating central_grafana   ...
Creating station1_agt      ... done
Creating central_grafana   ... done
/proc/sys/net/ipv4/ip_unprivileged_port_start: no such file or directory: unknown
ERROR: for station1_exporter  Cannot start service station1_exporter: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: write sysctl key net.ipv4.ip_unprivileged_port_start: open /proc/sys/net/ipv4/ip_unprivileged_port_start: no such file or directory: unknown
ERROR: Encountered errors while bringing up the project.

@danfoxley This need to run as root or you need to give the container all the necessary privileges.


Provide appearing/disappearing edit button on select

This is the alternative to #747 which I have basically copied without fully understanding #718.
Is this better? It certainly requires a much more sophisticated mechanism...
This would close #746

You can use the same solution as you did with hover using pure CSS that would look something like this:
.checkListItem mwc-icon-button {
    display: none;
}

.checkListItem:focus mwc-icon-button {
   display: inline-block;
}

Btw I think it is worth trying to put the edit button into the meta slot as with the subscriber editor. That would require to put the checkbox of the list item to the left which is possible. I think we need to add this to the filtered-list but is a quick fix.
To be honerst with you I think the hover version is better. More intuitive and working better with check-list-item's

To be honerst with you I think the hover version is better. More intuitive and working better with check-list-item's

Thanks. Deal!

You can use the same solution as you did with hover

Ha. I think I used focussed rather than focus. That was my mistake.

Btw I think it is worth trying to put the edit button into the meta slot as with the subscriber editor. That would require to put the checkbox of the list item to the left which is possible. I think we need to add this to the filtered-list but is a quick fix.

I'm not sure this is possible with a graphic on a checklist. I think when left is set, that overrides the graphic.


Scrum 1695

It may need some tidying but the test work and it should be enough for UI code to come.

@ianlongden says it's ok to close this


feat(server): add bottle server module

Includes code for eventlet and tornado adapters
with customizations.
xtornado: enables xheaders always.
xeventlet: supports SSL for testing and additional
tuning parameters.

server.py has 23% test coverage.
Name                    Stmts   Miss  Cover   Missing
-----------------------------------------------------
simpl                       5      0   100%
simpl.__about__            11      0   100%
simpl.config              347     43    88%   259, 264-265, 330-333, 339, 376-378, 390, 396, 425, 429, 433, 437, 444, 487, 510-511, 568, 593-597, 632, 636-637, 648, 661, 811-816, 835-842, 860-864, 867
simpl.exceptions           35      8    77%   42, 72, 78-83, 108
simpl.git                 299     10    97%   139, 199-200, 281, 333, 431, 541, 729-730, 732
simpl.incubator             1      0   100%
simpl.incubator.dicts     147      7    95%   49, 68, 147-148, 155, 248, 261
simpl.log                  49     32    35%   87-94, 104-111, 124-133, 140-153, 165, 169, 174, 177
simpl.middleware            0      0   100%
simpl.middleware.cors      43      3    93%   34-35, 106
simpl.rest                 82      3    96%   39, 54, 192
simpl.secrets              12      5    58%   32-36
simpl.server               70     54    23%   38-40, 44-51, 83-109, 113-135, 139, 150-156
simpl.threadlocal          35      2    94%   84, 113
simpl.utils                 0      0   100%
simpl.utils.shell          26      1    96%   69
-----------------------------------------------------
TOTAL                    1162    168    86%
----------------------------------------------------------------------

@larsbutler WRT test coverage, I started down the route of copying over tests from https://github.com/bottlepy/bottle. Before I go down that route, is that an acceptable approach?
FWIW, it calls out to subprocesses to accomplish the testing so it won't impact coverage stats. I don't know if test coverage is the metric we want to strive for in this case.

@larsbutler I added integration tests for the Tornado and Eventlet server adapters. Because they fork, they don't show up as covered. I also added tests for the Eventlet log writer.


Add event for right-clicking on a cell

https://vuejs.org/v2/guide/events.html#Mouse-Button-Modifiers
for example: This is very useful for the context menu for actions above the value of cells.

It would speed thing up if you can help sending in a PR for this.


[BUG] cython 3.0.0b1 stdlib.pxd qsort extern import breaks

Describe the bug
in stdlib.pxd, we have
cdef extern from "<stdlib.h>" nogil:
    void qsort (void *array, size_t count, size_t size,
                int (*compare)(const void *, const void *))

in sklearn here: https://github.com/scikit-learn/scikit-learn/blob/e6b46675318950fd5138aaf29ba76f6ce2fd91b8/sklearn/tree/_splitter.pyx#L1091, this comparator is later pass to qsort here: https://github.com/scikit-learn/scikit-learn/blob/e6b46675318950fd5138aaf29ba76f6ce2fd91b8/sklearn/tree/_splitter.pyx#L1188
this gives error msg:
Cannot assign type 'int (const void *, const void *) except? -1 nogil' to 'int (*)(const void *, const void *) noexcept nogil'
in the new cython 3.0.0b1 release.
I fixed it by doing the following:
ctypedef int (*qsortComparator_t)(const void*, const void*)

cdef extern from "<stdlib.h>" nogil:
    void qsort (void *array, size_t count, size_t size, qsortComparator_t comp)

...instead of importing from stdlib.pxd.
Since stdlib.pxd is native to Cython, maybe we could fix that so that downstream users don't have to custom extern import it?
Code to reproduce the behaviour:
# example code

Expected behaviour
No response
Environment
OS: Linux
Python version 3.8.3
Cython version 3.0.0b1
Additional context
No response

Thanks for the report. Not sure I understand exactly what's gone wrong on first glance (it's to do with cdef functions being except by default, but don't know what's happening beyond that yet) but we'll definitely want to fix it

I tried to do replicate the issue but I am not able to:
from libc.stdlib cimport qsort

cdef void deleteme(void *array, size_t count, size_t size):
    qsort(array, count, size, compare_SIZE_t)

cdef int compare_SIZE_t(const void* a, const void* b) noexcept nogil:
    return <int>((<int*>a)[0] - (<int*>b)[0])

This compiles successfully.

I'm also not able to reproduce the issue on my side. @mlguruz, are you sure that you tried it with the comparison function that had https://github.com/scikit-learn/scikit-learn/commit/dfe9e2e118bd40fa4cd3fce7e007bc7bf51c9033 applied?

I'm also not able to reproduce the issue on my side. @mlguruz, are you sure that you tried it with the comparison function that had scikit-learn/scikit-learn@dfe9e2e applied?

@scoder you're right - I wasn't using the sklearn's latest main branch.
To make sure - I tested again using the main branch and default qsort from stdlib.pxd, and running below:
# cdef int compare_SIZE_t(const void* a, const void* b) nogil:                          # <- this fails
cdef int compare_SIZE_t(const void* a, const void* b) noexcept nogil:             # <- this works
    """Comparison function for sort."""
    return <int>((<SIZE_t*>a)[0] - (<SIZE_t*>b)[0])

Removing noexcept will trigger the compiling failure. Adding noexcept will compile fine.
Is this the expected behavior?

Is this the expected behavior?

Yes. Cython 3 changed the handling of exception in functions: https://cython.readthedocs.io/en/latest/src/userguide/migrating_to_cy30.html#arithmetic-special-methods

Is this the expected behavior?

Yes. Cython 3 changed the handling of exception in functions: https://cython.readthedocs.io/en/latest/src/userguide/migrating_to_cy30.html#arithmetic-special-methods

Thank you - this makes sense.
Seems like I should add the legacy_implicit_noexcept to a few places to make it backward compatible.
Other than that, please feel free to close this ticket.
Thanks again!


Set confirmation date to be within number of lead days

APVU confirms the lead days range should be inclusive of
the current day(if its a working day at the prison).
For example, if a prison has a lead time of 3 days and a visitor
booked on a Tuesday then they should except a response within 3
days, the latest reply date being the Thursday.

That's not what the majority of prisons have agreed. At least, that's not what's been happening for the last 12 months and that's not what's in the documentation.
If you got ahead with this change, you need to notify each prison in advance and also update the README.
Alternatively you could set the lead_days configurations for the APVU establishments.

@dan-palmer As @matharden says, the requirements for this are slightly different than I think you were told. Let's talk about it this morning.

This is no longer necessary, thanks to #253. Closing.


GitHub Actions Tests Status (on master branch)

See CI.md for more information about GitHub Actions CI.


Use the go-syslog fork directly rather than with a replace directive

Description of Changes
Please check that the PR fulfills these requirements

[ ] Tests for the changes have been added (for bug fixes / features)
[ ] Docs have been added / updated (for bug fixes / features)
[ ] Add a changelog entry (for non-trivial bug fixes / features)
[ ] CI passes

Log Files
Logs / Second
CPU Average (%)
Memory Average (MB)

1
1000
4.0000844
25.228718

1
5000
9.41393
42.01199

1
10000
15.052085
53.14736

1
50000
65.65637
193.34726

1
100000
127.11933
325.44693

10
100
5.345065
28.63847

10
500
11.36232
41.75862

10
1000
18.345253
52.19181

10
5000
71.12162
196.21417

10
10000
136.17738
356.12946


Registry credential should be passed to check-operator step when running via ci pipeline

Bug Description
If partner use a private container registry to save the bundle image and bundle image index, credential  has been added to the cluster as a secret. But when the tool running "preflight check operator $(params.bundle_image) ", the image could not be pulled with the error "Error: failed to pull remote container: GET https://quay.io/v2/mayurwaghmode111/power-cloud-native-postgresql/manifests/1.12.0: UNAUTHORIZED: access to the requested resource is not authorized;"
Version and Command Invocation
preflight check operator $(params.bundle_image)
Expected Result
The  image could be pulled
Actual Result
The image could not be pulled. Partner need to set the repository as public to move ahead
Additional Context
operator-ci-pipeline-run-fb6hn.log

Hi @jinhli when running from DCI, we solve this problem in the following way:

Share a volume with docker config.json
Provide DOCKER_CONFIG env var

Here is the command:
podman run
-it
--rm
--pull=always
--privileged
-e PFLT_JUNIT=true
-e PFLT_ARTIFACTS=/artifacts
-e PFLT_LOGFILE=/artifacts/preflight.log
-e PFLT_LOGLEVEL=trace
-e DOCKER_CONFIG=/opt              <-- config.json is in /opt of the container
-e KUBECONFIG=/kubeconfig
-e PFLT_INDEXIMAGE={{ OO_INDEX }}  <-- index image
-e PFLT_NAMESPACE={{ preflight_namespace }}
-e PFLT_SERVICEACCOUNT=default
-v {{ preflight_tmp_dir.path }}/kubeconfig:/kubeconfig
-v {{ preflight_operator_artifacts.path }}:/artifacts
-v {{ preflight_tmp_dir.path }}/config.json:/opt/config.json     <-- to share the volume with docker config
quay.io/opdev/preflight:1.1.0-alpha2
check operator
{{ operator.bundle_image }}  <-- bundle image

I'm going to post what I posted in google chat here below:
I'm really confused, is the partner running the ci-pipeline or are then running preflight as a binary on their own with their own process? It seems like the former, but this issue and messages in slack make it seem like the latter. If its the ci-pipeline they should follow these instructions https://github.com/redhat-openshift-ecosystem/certification-releases/blob/main/4.9/ga/ci-pipeline.md
and the pipeline builds the bundle image / index image /etc.

Hi @jinhli,
in addition to what @acornett21 said, the attached pipeline log shows the image being used for the Preflight Task is image: "quay.io/redhat-isv/preflight-test@sha256:265692cf4506b79535226e04a4fc505ce2dc1add8891e77b0df5358982f7a672
Can you please try switching the Preflight Task yaml to quay.io/opdev/preflight:1.1.0-alpha2 (or its sha) instead ?

@itroyano They are testing a bundle, so the image they are using that's in the task is fine for operator check.

@acornett21, sorry to make you confused.
The issue I submitted here is for ci-pipeline.  If partner uses the external private registry  to save the bundle image and bundle image index built by  CI Pipeline, They  need to create the secret which includes the credential of registry.
But the pipeline process could not make the repository in the external private registry public, when running**"step-check-operator"** with "preflight check operator $(params.bundle_image)", it failed without authorization.
In my opinion, we already have the credential, why not we use this credential to pull the bundle image instead asking partner to make the repository public ?
I am not sure whether here is the right place to put this issue, if it is not right here, could you let me know where I can submit it?

@jinhli This makes sense now. In the CI pipeline task for preflight I do not see a DOCKERCONFIG paramater being set. In the hosted pipeline this is done by another task called preflight-trigger it seems CI needs some mechanism to set DOCKERCONFIG for the preflight task


Try out cosmos fix

The fix earlier caused test failure. This fix does not.

@bterlson, @jeremymeng Turns out all other PRs are indeed unblocked.
@ShivangiReja's were failing as her branch didnt have the fix from master branch.
Do we still need this PR?

Will check tomorrow. I've seen failures in several builds of the cosmos test pipeline https://dev.azure.com/azure-sdk/public/_build?definitionId=215&_a=summary.
I was wondering why her PR would trigger the cosmos test build pipeline.  It make sense now.  The earlier fix address the compilation failure which blocks all PRs. The cosmos test pipeline only blocks PRs that touch files under sdk/cosmosdb/cosmos.  Sometimes merging/rebasing could trigger it.

Yep, I had to update package.json in the Cosmos library so PR https://github.com/Azure/azure-sdk-for-js/pull/3324 triggers it and blocks my merge.

Correction: That build isn't blocking my PR as it's not part of a required CI run, so it's not actually blocking me :)

Tests still failing no likely something else.  Closing


7-zip variable wrong

You using $DriverPackageCompressedContent but above that the variable is $DriverPackageCompressedFile. You might of forgot to combine location and zip file into one variable to be used.

@ericvanboven You're right. $DriverPackageCompressedContent is never defined and must have been missed during rename action.
@NickolajA I suggest to use PSScriptAnalyzer to identify these issues. Helped me spot many self-created issues many times! ☺

Fixed in 4.0.1 that was just committed.

#14 I spoke too soon...

The issue still exists in the Legacy script in the latest revision released. @NickolajA @merlinfrombelgium


Fix and improve CSS

From https://github.com/Richard87/releaser/pull/25#issuecomment-335414172

Thanks, that look perfect :+1:


Escape database names on the default table select query with database-name chars

Escape database names on the default select query with database-name
Working on Mysql 5.7 on my local env,
Currently my project has weird database names with _ and -  these types of chars.
Using omniDB,
When trying to click on a table belonging to a database that kind of special name,
it shows the following

Even if i enter the correct password i can't select my table unless i edit the select sql
and add these chars ` db-name ` around the schema/database name.
This along with the fact that i have to confirm every time i close a tab,
effectively doubleing the number of actions required as user to do simple tasks.
( i saw Ticket under UI improvments, totaly agree on it )
Can't use omniDB right now with these small bugs.
Aside from that, I really like the product.
Would love to see it growing in the future and implementing all the feedback from the users.

Thanks for opening this issue @SimplicitysStrength. We'll fix the bug.
Additionally, we are focusing in the user interface for the next release, so
expect improvements there.
Rafael.

Hello @rafaelthca @wind39
i just scrolled through my open issues and found this is still open.
Are you guys still maintaining this project ?  In case you lack time to implement the fix for this bug,
i would be interested in trying to submit a PR for this issue, if there's anyone to review it


FUN.md broke when RecordObj changed to HashedRecordObj

The breakage occurred sometime on or before version 1.6
This is a proposed fix for issue #1632
Note: the proposed commit is signed using Level 11 (yes!)
Summary
Switch the jq command to use the HashedRecordObj value
Release Note
Update the instructions for fetching the sig and cert in the FUN.md file.

@MitchellJThomas please sign the DCO, thanks for this update!

@MitchellJThomas please sign the DCO, thanks for this update!

You are welcome.

Seems I kinda goofed with the git rebase HEAD~3 --signoff as it added in commit 9fb9a3448dc5d0fd6bb65790af43d0241dc7f9e1. (embarasing)

Codecov Report

Merging #1633 (e7b21cc) into main (d0aa73b) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #1633   +/-   ##
=======================================
  Coverage   27.97%   27.97%
=======================================
  Files         137      137
  Lines        7820     7820
=======================================
  Hits         2188     2188
  Misses       5403     5403
  Partials      229      229

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 d0aa73b...e7b21cc. Read the comment docs.

Theres a weird e2e flake that looks to be an internal github error, but this is a doc only change so I'm not going to retry it.