Model's allocation of node fails after conversion to TFLite

System information

OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Amazon Linux 2
TensorFlow installed from (source or binary): pip
TensorFlow version (or github SHA if from source): tf-nightly (2.5.0)

Command used to run the converter or code if you’re using the Python API
If possible, please share a link to Colab/Jupyter/any notebook.
  model_concrete_function = model.inference_decode.get_concrete_function()
  converter = tf.lite.TFLiteConverter.from_concrete_functions(
      [model_concrete_function]
  )
  converter.target_spec.supported_ops = [tf.lite.OpsSet.TFLITE_BUILTINS]

  if args.quantized:
      converter.optimizations = [tf.lite.Optimize.DEFAULT]
      output_file_name = os.path.join(args.outdir, 'model_quant.tflite')
  else:
      output_file_name = os.path.join(args.outdir, 'model.tflite')

  tflite_model = converter.convert()

The output from the converter invocation
2021-01-26 09:30:17.656931: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory
2021-01-26 09:30:17.656958: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
/home/dmmatwic/anaconda3/envs/tflite_x86/lib/python3.8/site-packages/tensorflow_addons/utils/ensure_tf_install.py:37: UserWarning: You are currently using a nightly version of TensorFlow (2.5.0-dev20210125).
TensorFlow Addons offers no support for the nightly versions of TensorFlow. Some things might work, some other might not.
If you encounter a bug, do not file an issue on GitHub.
warnings.warn(
2021-01-26 09:30:20.220470: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory
2021-01-26 09:30:20.220498: W tensorflow/stream_executor/cuda/cuda_driver.cc:326] failed call to cuInit: UNKNOWN ERROR (303)
2021-01-26 09:30:20.220517: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (dev-dsk-dmmatwic-1b-a5a0da5a.eu-west-1.amazon.com): /proc/driver/nvidia/version does not exist
2021-01-26 09:30:20.220718: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 AVX512F FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
WARNING:tensorflow:From /home/dmmatwic/anaconda3/envs/tflite_x86/lib/python3.8/site-packages/tensorflow/python/ops/array_ops.py:5039: calling gather (from tensorflow.python.ops.array_ops) with validate_indices is deprecated and will be removed in a future version.
Instructions for updating:
The validate_indices argument has no effect. Indices are always validated on CPU and never validated on GPU.
2021-01-26 09:30:22,167 (deprecation:528) WARNING: From /home/dmmatwic/anaconda3/envs/tflite_x86/lib/python3.8/site-packages/tensorflow/python/ops/array_ops.py:5039: calling gather (from tensorflow.python.ops.array_ops) with validate_indices is deprecated and will be removed in a future version.
Instructions for updating:
The validate_indices argument has no effect. Indices are always validated on CPU and never validated on GPU.
2021-01-26 09:30:22.977251: I tensorflow/core/grappler/devices.cc:69] Number of eligible GPUs (core count >= 8, compute capability >= 0.0): 0
2021-01-26 09:30:22.977359: I tensorflow/core/grappler/clusters/single_machine.cc:356] Starting new session
2021-01-26 09:30:22.995718: I tensorflow/core/platform/profile_utils/cpu_utils.cc:112] CPU Frequency:<PHONE_NUMBER> Hz
2021-01-26 09:30:23.040599: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:935] Optimization results for grappler item: graph_to_optimize
function_optimizer: Graph size after: 900 nodes (122), 1564 edges (136), time = 10.878ms.
function_optimizer: Graph size after: 900 nodes (0), 1564 edges (0), time = 9.301ms.
Optimization results for grappler item: while_body_3883
function_optimizer: function_optimizer did nothing. time = 0.006ms.
function_optimizer: function_optimizer did nothing. time = 0.002ms.
Optimization results for grappler item: while_body_4324
function_optimizer: function_optimizer did nothing. time = 0.004ms.
function_optimizer: function_optimizer did nothing. time = 0.001ms.
Optimization results for grappler item: while_cond_3882
function_optimizer: function_optimizer did nothing. time = 0.004ms.
function_optimizer: function_optimizer did nothing. time = 0.001ms.
Optimization results for grappler item: while_cond_4323
function_optimizer: function_optimizer did nothing. time = 0.003ms.
function_optimizer: function_optimizer did nothing. time = 0.001ms.
2021-01-26 09:30:24,125 (lite:659) INFO: Using new converter: If you encounter a problem please file a bug. You can opt-out by setting experimental_new_converter=False
2021-01-26 09:30:24.216881: W tensorflow/compiler/mlir/lite/python/tf_tfl_flatbuffer_helpers.cc:332] Ignored output_format.
2021-01-26 09:30:24.216915: W tensorflow/compiler/mlir/lite/python/tf_tfl_flatbuffer_helpers.cc:335] Ignored drop_control_dependency.
2021-01-26 09:30:24.305204: I tensorflow/compiler/mlir/tensorflow/utils/dump_mlir_util.cc:210] disabling MLIR crash reproducer, set env var MLIR_CRASH_REPRODUCER_DIRECTORY to enable.
2021-01-26 09:30:25.025058: I tensorflow/lite/tools/optimize/quantize_weights.cc:233] Skipping quantization of tensor arg5 because it has no allocated buffer.
2021-01-26 09:30:25.026738: I tensorflow/lite/tools/optimize/quantize_weights.cc:233] Skipping quantization of tensor arg5 because it has no allocated buffer.
2021-01-26 09:30:25,077 (convert_model:102) INFO: Model of size 10.273849 MBs saved to model_tflite/model_quant.tflite

Also, please include a link to the saved model or GraphDef
No link because it's internal company's model

Failure details
If the conversion is successful, but the generated model is wrong,
state what is wrong:
I get
ERROR: tensorflow/lite/kernels/kernel_util.cc:404 d1 == d2 || d1 == 1 || d2 == 1 was not true.
ERROR: Node number 3 (ADD) failed to prepare.

when running
TfLiteInterpreterAllocateTensors(interpreter)
in TFLite C++ API.
The conversion to tflite model runs fine.
The node looks like that in Netron

I'm not sure what exactly does this error mean. As far as I can see these conditions are met, with [1, 128] and [1, 128, 128] d1 is in fact equal to d2, while d1 and d2 also being 1? Unless I misunderstood how it works. This happens during tensors allocation, so I understand that this has nothing to do with input data shapes? Thanks :)

Is this tflite file generated by the same TF version used for the conversion?
The util checks whether the given shapes are broadcastable. [1, 128] and [1, 128, 128] are broadcastable also. This is an interesting.

Is this tflite file generated by the same TF version used for the conversion?
The util checks whether the given shapes are broadcastable. [1, 128] and [1, 128, 128] are broadcastable also. This is an interesting.

Hmm.. since the given shapes are valid, the error won't happen. I manually invoked the CalculateShapeForBroadcast method with the given shapes and it worked fine and returned the expected value, [1, 128, 128].
It is really hard to reproduce your problem at my side. Do you give the tensor inputs with the correct tensor shapes? Even though those shapes look fine, there is possibility to override the shape if the input shape is changed.

Hmm.. since the given shapes are valid, the error won't happen. I manually invoked the CalculateShapeForBroadcast method with the given shapes and it worked fine and returned the expected value, [1, 128, 128].
It is really hard to reproduce your problem at my side. Do you give the tensor inputs with the correct tensor shapes? Even though those shapes look fine, there is possibility to override the shape if the input shape is changed.

FYI, you can override tensor shapes for the inputs but the model structure may not accept them if it is an invalid one even at the original TF graph.

FYI, you can override tensor shapes for the inputs but the model structure may not accept them if it is an invalid one even at the original TF graph.

Hi @Jkeezuz I made a progress on better error messages on the broadcastable shape calculation errors. You can try the tomorrow version of the tf-nightly to get what the problematic shapes are. For example,
"Given shapes, [1, 2] and [1, 3], are not broadcastable."

Hi @Jkeezuz I made a progress on better error messages on the broadcastable shape calculation errors. You can try the tomorrow version of the tf-nightly to get what the problematic shapes are. For example,
"Given shapes, [1, 2] and [1, 3], are not broadcastable."

Hi, thanks alot! I'm using tf-nightly-gpu build installed with pip for conversion, and now I've downloaded tensorflow source code from nightly branch and built it with bazel
bazel build -c opt --cxxopt='-g’ --verbose_failures //tensorflow/lite/c:tensorflowlite_c
and used the binaries in my c++ program build for running inference, but I'm still seeing the old error with d1 and d2.

Hi, thanks alot! I'm using tf-nightly-gpu build installed with pip for conversion, and now I've downloaded tensorflow source code from nightly branch and built it with bazel
bazel build -c opt --cxxopt='-g’ --verbose_failures //tensorflow/lite/c:tensorflowlite_c
and used the binaries in my c++ program build for running inference, but I'm still seeing the old error with d1 and d2.

Hmm. Could you verify whether the downloaded source code has the change in https://github.com/tensorflow/tensorflow/commit/9ee7896d229278f582a3a381c6d22ec0559d9765 ?

Hmm. Could you verify whether the downloaded source code has the change in https://github.com/tensorflow/tensorflow/commit/9ee7896d229278f582a3a381c6d22ec0559d9765 ?

Yes, sorry, it was my fault, I was using old lib file for tensorflow, I actually get the right message now :)
Allocating tensors
ERROR: Given shapes, [1913, 128] and [1, 128, 128], are not broadcastable.
ERROR: Node number 3 (ADD) failed to prepare.

It's surprising because the model runs fine in python API inference and during training, without converting the model to tflite

Yes, sorry, it was my fault, I was using old lib file for tensorflow, I actually get the right message now :)
Allocating tensors
ERROR: Given shapes, [1913, 128] and [1, 128, 128], are not broadcastable.
ERROR: Node number 3 (ADD) failed to prepare.

It's surprising because the model runs fine in python API inference and during training, without converting the model to tflite

It looks like that the converted model only supports with the batch size, one. Could you make sure that the concreted function signature has the dynamic batch dimension instead of one. What was the input shape?

It looks like that the converted model only supports with the batch size, one. Could you make sure that the concreted function signature has the dynamic batch dimension instead of one. What was the input shape?

It would be great to share a minimal, reproducible step in a gist if possible since I can easily reproduce the problem.

It would be great to share a minimal, reproducible step in a gist if possible since I can easily reproduce the problem.

Hi, sorry for late reply, I was away for a while. It turned out that the problem was wrong input sizes specified (during conversion they were set to [1, None], but should've been [1, None, None], now everything works well and inference runs. Thanks for your help! :)


Certain extensions USRs aren't demangled properly

#14 improved demangling by trying to handle extension USRs (which have an s:e: prefix). More work is required though. In some cases, the USR for an extension can be of the form s:e:s:<type USR>s:<protocol USR>, whereby multiple USRs are joined with the same s:e: prefix. I've noticed this in one of my own index stores, and confirmed this behavior here: https://github.com/apple/swift/blob/3e3a98f80191821a63e76a7d7cc4b1371ff3e493/lib/AST/USRGeneration.cpp#L343
Not sure why this is done instead of writing a USR which leverages the Extension or ExtensionDescriptor node to create a taller tree around the extension, but regardless of how the USR is generated, I don't think libswiftDemangler handles this construction.
Seems like the path forward is to check for the s:e: prefix, then scan for each s:, and demangle each. But this would also require updating func demangle(symbol: String) to return [DemangledNode]?, or inventing a new kind of DemangledNode that can be the parent of each extension USR. Could also just use Extension and let it ride.

Interesting. Do you have an example one I can work with for this? (I might be able to find one in ours). I do worry that at some point we just shouldn't be trying to get 100% accurate as it's definitely documented that USRs should be treated as opaque identifiers, it just so happens to work like this 🙃

Your own protocolext repro on https://github.com/apple/swift/issues/64612 has examples in Module1.swift (s:e:s:7Module03FooVs:7Module03BarP)

oh yea thanks, that's an interesting one. it's also interesting because there are more useful usrs around that same place:
/*
          struct=Foo=s:7Module03FooV=reference, extendedBy
          extension.swiftExtensionOfStruct=Foo=s:e:s:7Module03FooVs:7Module03BarP=definition
          |    protocol=Bar=s:7Module03BarP=reference, baseOf
          v    v  */
extension Foo: Bar {}

which potentially covers some cases where we want to see what we're referencing. but i agree that we should add a new API that handles this if we want to. I think we should explicitly make it USR specific, and maybe even move the current handling there to make it less ambiguous


Disable default features for procfs

It required using chrono dependency with features that use old insecure time crate version.
Plus this change just makes less dependencies.

Cool, i missed this :/

thanks!


Potential fix for adapter restart loop

Within the raised and catched exception the data object is set to null without returning false. However in a later code segment, properties within the data object are read causing an exception that makes the adapter stop. In case the issue persists I see a restart loop for my adapter instance.

@mcm1957 I have mistakenly changed the file io-package.json inside this PR, which does not make sense for your repo. I changed the file in order to test the adapter in my local iobroker instance to verify whether the restart loop is gone.

OK, but if you fix is working create a new PR with the code change.

No worries, will do

THANS for your support

@mcm1957 See my changes within this PR


Consider performance implications of providers with empty versions

I've been doing some hacking around over the past few days and noticed that a lot of the providers have semver tags without releases attached.  If the latest tag does not have a release, it re-checks all tags for that provider which don't have versions mapped.
Example:
repository tags: v1.0, v2.0, v3.0
repository releases: v2.0
Since the v3.0 tag is the latest tag in the repo and does not have a corresponding release, it will always think it needs to scan to github repository for releases.  It will then query v1.0 and v3.0 every time the version bump is run.
On it's own, this is innocuous.  With thousands of providers and several orders of magnitude more versions, this becomes a problem.  I've got 11.6k providers locally and it takes ~40 minutes to run a full bump-versions.  This might be unrealistic for the number of providers we currently support and would be premature optimization.  If we are only going to support ~2k providers at the start, it would imply the full bump-versions runtime would be around the 5-10 minute mark.
Proposal
One potential suggestion is to cache a "last scanned" date for these versions.
{
   "versions": [
       {
          "version": "3.0.0",
          "targets": [],
          "last-scanned":<PHONE_NUMBER>
       }
       {
          "version": "2.0.0",
          "targets": [...],
          "last-scanned":<PHONE_NUMBER>
       }
       {
          "version": "1.0.0",
          "targets": [],
          "last-scanned":<PHONE_NUMBER>
       }
   ]
}

By default, these could be ignored unless either a flag is passed or a set amount of time has passed since it has last been re-scanned.  Some of these tags will never have versions.  Some of these tags will have releases created minutes to days after the fact.
It could even be made smarter to look in depth at the RSS feed and only frequently check for releases within a certain window.

It looks like I missed a check for filtering out providers that don't currently have any versions and the number is closer to 3.1k detected valid provider repositories.


Multiple images per person

Hello,
As far as I understand the package does not allow adding multiple images of the same person, the update function just replaces the embeeding.
Do you consider adding this feature? Or can you give me some suggestions/pitfalls to avoid/direction how should I implement it?

Try with check_similar=False.
ids, failed_indexes = db.add_many(
    imgs=imgs,
    names=names,
    check_similar=False
)

I have a folder of images containing multiple faces in each image so how can i extract only unique faces and save them in another folder using this facedb. i did this using deepface and results are not satisfactory but fast, i also tried with face-recognition library which gave me better results but took a lot of time. Here's want I wanted,
given a folder of images, we have to extract to faces in each image and check if that face is in unique_faces folder [db] if yes we have to skip it otherwise we have to add it as unique_face to the folder. I'm stuck at the moment i need both accuracy and performance. I think facedb will help me in accomplishing the above task. all i need is faster comparision of face data.

Try with check_similar=False.
ids, failed_indexes = db.add_many(
    imgs=imgs,
    names=names,
    check_similar=False
)

Well, it's not necessary what I need, but thank you anyway. I would like to create an "average" embeeding of a person based on all their pictures and then search for similarities between people based on the average embeedings.
Something like this: https://learn.deeplearning.ai/courses/building-applications-vector-databases/lesson/6/facial-similarity-search
I guess I would have to do it myself.

@shhossain I have a folder of images containing multiple faces in each image so how can i extract only unique faces and save them in another folder using this facedb. i did this using deepface and results are not satisfactory but fast, i also tried with face-recognition library which gave me better results but took a lot of time. Here's want I wanted, given a folder of images, we have to extract to faces in each image and check if that face is in unique_faces folder [db] if yes we have to skip it otherwise we have to add it as unique_face to the folder. I'm stuck at the moment i need both accuracy and performance. I think facedb will help me in accomplishing the above task. all i need is faster comparision of face data.

I copy paste your question to ChatGPT, here is the answer:
To achieve your goal of extracting unique faces from a folder of images and ensuring each face is only saved once, using the FaceDB library, you can follow this script. This script assumes that you have a setup for either face_recognition or DeepFace as described in the FaceDB documentation and that you are using a filesystem-based storage for simplicity.
Here is a Python script that will:

Load all images from a specified directory.
Extract faces from each image.
Check if each extracted face is already in a "unique_faces" folder/database.
If not already present, save the new unique face.

from facedb import FaceDB
from glob import glob
import os
from PIL import Image
import numpy as np
import cv2

# Initialize the FaceDB
db = FaceDB(path="unique_faces", module='face_recognition')  # Use 'module' parameter as per your choice

# Load images from folder
image_folder = 'path_to_images_folder'  # Update with your folder path
images = glob(os.path.join(image_folder, '*.jpg'))

def save_face(image_path, face_region, face_id):
    """Save extracted face to a file."""
    face_image = Image.fromarray(face_region)
    face_image.save(f"unique_faces/{face_id}.jpg")

def extract_and_save_unique_faces():
    for img_path in images:
        # Recognize and potentially extract faces
        results = db.recognize(img=img_path, include=['img', 'id'])

        if results:
            for result in results:
                face_id = result['id']
                face_img = result['img']  # This is a numpy array (image)

                # Check if the face is already in the database with a unique ID
                if not db.query(face_id=face_id):
                    # Save the new unique face
                    save_face(img_path, face_img, face_id)
                    # Add the new face to the database
                    db.add(name=f"face_{face_id}", img=f"unique_faces/{face_id}.jpg")
                else:
                    print(f"Face {face_id} already exists in the database.")
        else:
            print("No faces found in image:", img_path)

# Run the function
extract_and_save_unique_faces()

Explanation:

Initialization: The FaceDB is initialized with a path to store recognized face images. You can select the module (face_recognition or DeepFace) based on your accuracy and performance requirements.
Image Processing: For each image in your specified directory, the script uses db.recognize() to find faces and get their images and IDs.
Face Saving and Checking: If a face is recognized but not found in the database, it's saved in a separate folder and added to the database.
Optimization: By managing database queries efficiently and storing only new faces, this approach tries to balance between redundancy checks and performance.

This script is a starting point and may need to be adapted based on specific needs, such as handling different file types or more sophisticated error handling.

@shhossain I have a folder of images containing multiple faces in each image so how can i extract only unique faces and save them in another folder using this facedb. i did this using deepface and results are not satisfactory but fast, i also tried with face-recognition library which gave me better results but took a lot of time. Here's want I wanted, given a folder of images, we have to extract to faces in each image and check if that face is in unique_faces folder [db] if yes we have to skip it otherwise we have to add it as unique_face to the folder. I'm stuck at the moment i need both accuracy and performance. I think facedb will help me in accomplishing the above task. all i need is faster comparision of face data.

I copy paste your question to ChatGPT, here is the answer:
To achieve your goal of extracting unique faces from a folder of images and ensuring each face is only saved once, using the FaceDB library, you can follow this script. This script assumes that you have a setup for either face_recognition or DeepFace as described in the FaceDB documentation and that you are using a filesystem-based storage for simplicity.
Here is a Python script that will:
1. Load all images from a specified directory.

2. Extract faces from each image.

3. Check if each extracted face is already in a "unique_faces" folder/database.

4. If not already present, save the new unique face.

from facedb import FaceDB
from glob import glob
import os
from PIL import Image
import numpy as np
import cv2

# Initialize the FaceDB
db = FaceDB(path="unique_faces", module='face_recognition')  # Use 'module' parameter as per your choice

# Load images from folder
image_folder = 'path_to_images_folder'  # Update with your folder path
images = glob(os.path.join(image_folder, '*.jpg'))

def save_face(image_path, face_region, face_id):
    """Save extracted face to a file."""
    face_image = Image.fromarray(face_region)
    face_image.save(f"unique_faces/{face_id}.jpg")

def extract_and_save_unique_faces():
    for img_path in images:
        # Recognize and potentially extract faces
        results = db.recognize(img=img_path, include=['img', 'id'])

        if results:
            for result in results:
                face_id = result['id']
                face_img = result['img']  # This is a numpy array (image)

                # Check if the face is already in the database with a unique ID
                if not db.query(face_id=face_id):
                    # Save the new unique face
                    save_face(img_path, face_img, face_id)
                    # Add the new face to the database
                    db.add(name=f"face_{face_id}", img=f"unique_faces/{face_id}.jpg")
                else:
                    print(f"Face {face_id} already exists in the database.")
        else:
            print("No faces found in image:", img_path)

# Run the function
extract_and_save_unique_faces()

Explanation:
* **Initialization**: The FaceDB is initialized with a path to store recognized face images. You can select the module (`face_recognition` or `DeepFace`) based on your accuracy and performance requirements.

* **Image Processing**: For each image in your specified directory, the script uses `db.recognize()` to find faces and get their images and IDs.

* **Face Saving and Checking**: If a face is recognized but not found in the database, it's saved in a separate folder and added to the database.

* **Optimization**: By managing database queries efficiently and storing only new faces, this approach tries to balance between redundancy checks and performance.

This script is a starting point and may need to be adapted based on specific needs, such as handling different file types or more sophisticated error handling.

Thanks for the response, I actuaclly tried the above code, and the results are bad. I have a small folder of 8 images and each image is a group photo may be some are blurred in some images, but using the above code, I'm not even getting the faces detected. I got the output like this
No faces found in image: resized-images/20240403_151426.jpg
No faces found in image: resized-images/20240403_151410.jpg
No faces found in image: resized-images/20240403_151432.jpg
No faces found in image: resized-images/20240403_151405.jpg
No faces found in image: resized-images/20240403_151415.jpg

So I'll try to extract all the faces in another folder and then try to pass them to db by checking them. Yes it takes time not not that efficient but i think there isn't a way it seems. for face detection i'm using yolov8 or retina face both are giving me good results but the question is, how accurately the same face recognition library finds the embeddings of those faces as it is unable to detect faces itelf.

Try with check_similar=False.
ids, failed_indexes = db.add_many(
    imgs=imgs,
    names=names,
    check_similar=False
)

Well, it's not necessary what I need, but thank you anyway. I would like to create a similarity search based on all pictures of a person. Kind of create an "average" embeeding of a person based on all their pictures and then search for similarities between people based on the average embeedings. Something like this: https://learn.deeplearning.ai/courses/building-applications-vector-databases/lesson/6/facial-similarity-search
I guess I would have to compare all embeddings of person1 agains all embeddings of person2 and compute the average distance.

Oh, I see now! I misunderstood your issue.
For your use-case you can first extract only embeddings of a face with
db.embedding_func(img)

For getting average you can use numpy
same_person_all_embeddings = [[....],[...]]
average_embeddings = np.mean(same_person_all_embeddings , axis=0)

Now you can add the average embeddings normally and use recognize with top_k.
db.recognize(img, top_k=10) # will return 10 similar images just remove the first one

Try with check_similar=False.
ids, failed_indexes = db.add_many(
    imgs=imgs,
    names=names,
    check_similar=False
)

Well, it's not necessary what I need, but thank you anyway. I would like to create a similarity search based on all pictures of a person. Kind of create an "average" embeeding of a person based on all their pictures and then search for similarities between people based on the average embeedings. Something like this: https://learn.deeplearning.ai/courses/building-applications-vector-databases/lesson/6/facial-similarity-search
I guess I would have to compare all embeddings of person1 agains all embeddings of person2 and compute the average distance.

Oh, I see now! I misunderstood your issue.
For your use-case you can first extract only embeddings of a face with
db.embedding_func(img)

For getting average you can use numpy
same_person_all_embeddings = [[....],[...]]
average_embeddings = np.mean(same_person_all_embeddings , axis=0)

Now you can add the average embeddings normally and use recognize with top_k.
db.recognize(img, top_k=10) # will return 10 similar images just remove the first one

What is default model used for getting the embeddings from the face? Like Facenet, VGG-Face, GhostFaceNet,etc

@Ntchinda-Giscard for single image you can do this:
Suppose you want to add age or gender
db.add(name='Test 1',img=img,age=20,gender='Male', add_anything_key='add_anything_value')

For multiple image
db.add_many(names=['Test 1', 'Test 2'],imgs=[test1img,test2img],metadata=[{'age':20,'gender':'Male'},{'age':21,'gender':'Female'}])

Here is the the source code references: add, add_many

@Raghucharan16 default it uses Face Recognation Python Library Model


Relative paths in prompt loading

Resolve relative paths in prompt loading
Problem Statement
Currently, langchain.prompts.load_prompt requires that the path variables of configuration files are relative to the current working directory. This requirement has disadvantages when we want to use the same configuration files in different places of a project. Therefore, it seems to be more practical to define the path variables relative to the configuration file than to the current working directory.
For illustration, let's take the few_shot_prompt_example_prompt.json example from the docs:
{
    "_type": "few_shot",
    "input_variables": ["adjective"],
    "prefix": "Write antonyms for the following words.",
    "example_prompt_path": "example_prompt.json",
    "examples": "examples.json",
    "suffix": "Input: {adjective}\nOutput:"
}

With the current implementation, load_prompt("few_shot_prompt_example_prompt.json") will only work if the files example_prompt.json and examples.json lie in our current working directory:
CWD
few_shot_prompt_example_prompt.json
example_prompt.json
examples.json

That is, in the following scenario load_prompt("examples/few_shot_prompt_example_prompt.json") wouldn't work:
CWD
|-- examples
|   |-- few_shot_prompt_example_prompt.json
|   |-- example_prompt.json
|   |-- examples.json

Changes

Temporarily adding the parameter prompt_dir (the parent directory of the configuration file) to the config dict
Using this parameter to resolve relative paths when loading templates, example prompts and examples
Removing the parameter from the config dict before the initialization of the final prompt template
Changing the working directory of respective unit tests to test the capability of load_prompt to deal with relative path definitions

Remarks

There may be more elegant ways of dealing with this issue, but I haven't seen an option that wouldn't involve a major restructuring of the module. Any ideas?
While I think this a valuable change, it may break existing applications of some users

could you already achieve this with absolute paths?

could you already achieve this with absolute paths?

You mean by specifying absolute paths in the few_shot_prompt_example_prompt.json? If so, it would help if the code is only used on one platform, but portability would become a problem. But maybe I'm misunderstanding your comment.

To concretize my suggestion a little bit more:
If we assume the project structure from above:
CWD
|-- examples
|   |-- few_shot_prompt_example_prompt.json
|   |-- example_prompt.json
|   |-- examples.json

Currently, if I want to call load_prompt("examples/few_shot_prompt_example_prompt.json")from the working directory,  few_shot_prompt_example_prompt.json needs to take the following form:
{
    (...)
    "example_prompt_path": "examples/example_prompt.json",
    "examples": "examples/examples.json",
    (...)
}

From my perspective it would be more intuitive and practical if it needs to take the following form:
{
    (...)
    "example_prompt_path": "example_prompt.json",
    "examples": "examples.json",
    (...)
}

@mwinterde Hi , could you, please, resolve the merging issues and address the last comments (if needed)? After that, ping me and I push this PR for the review. Thanks!


Scale creation - Enumerate steps

inthar (11 13 17 29 32 34 46 87) — Yesterday at 8:50 PM

I would like a ScaleWorkshop feature that creates scales by specifiying step sizes directly and stacking them.
It will be helpful for higher-rank regular scale theorists like me, Scott and ground.

Scala allows you to create a new scale by stacking step sizes in order in which they are named.

"New value is:" → "Interval"
For example, using 9/8 28/27 9/8 64/63 9/8 28/27 9/8 64/63 9/8:

I want to be able to enumerate the steps in a specific order, which Scale Workshop currently doesn't allow you to do explicitly.

gwtunes — Today at 9:22 PM

hey, so idk if anyone's requested this or mentioned it here, or if there's already a way to do it, but it would be cool if you could stack intervals in :scaleworkshop:
like if I want 3 7/6s in a row in a tuning without having to pull out a calculator and figure out what that would be.
alongside other intervals, not a rank 2 temperament but stacks of different intervals

"Stack steps" in SW3 alpha.


set library paths for Server platform

Not sure if this is all that is needed, but I was able to change the webrtc*.tres files manually in the release and got this working with a Server build.

Sorry for the delay, this is good for now, merging.

Thanks!


Map \vagrant to a local network drive by default

In local testing, provisioning IIS resources with DSC works - in that IIS/DSC does not complain, however IIS is unable to properly read the resources off of the file system and therefore does not really work at all.
Provisioning a local network share and using that as the Physical Path in the Basic Settings is an annoying, but effective workaround. See http://stackoverflow.com/questions/22636106/iis-application-using-shared-folder-in-virtualbox-vm for more.
Tentative script to run in bootstrapping:
# Create network share
$Shares=[WMICLASS]"WIN32_Share"
If (!(GET-WMIOBJECT Win32_Share -filter "name='vagrant'")) {
                $Shares.Create("C:\\vagrant","vagrant",0)
}

Consider making this a configuration parameter which is enabled by default.

NOTE: Vagrant 1.7 supports local shares from/to Windows/Linux guests which may make this redundant. The solution would be to use network shares instead of the default VM shared folder.

Actually real-word experience tells me this isn't the best idea - prefer rsync to this solution. Closing.


Windows: Run 'crc daemon' as task for 'crc setup'

This PR is uses windows powershell to create crc daemon as task
and start it on demand for the current user. This doesn't need any
elevated privillages to run crc daemon for user context. It try to
perform following tasks

Check if there is already crcDaemon task

If present does it the latest one using version info

Install the task using predefined xml definition
Start the task which run the crc daemon in background.

There is a known issue with windows powershell when you start a task
in background using powershell.exe then for a second the windows pops
up and disappear, https://github.com/PowerShell/PowerShell/issues/3028
have more details around it but as of now this is only the way for
interactive user context otherwise the task will need the admin
privillages which we want to avoid.

Looks like this can be worked around though?

The workaround use vbs script which is detected as virus ( @anjannath told me) I don't find any other workaround which would work without installing any different tool.

Looks like this can be worked around though?

The workaround use vbs script which is detected as virus ( @anjannath told me) I don't find any other workaround which would work without installing any different tool.

Has it already been tried to have our own small helper non-console binary which would just run the appropriate powershell comnad? or would it also be detected as a virus?

Has it already been tried to have our own small helper non-console binary which would just run the appropriate powershell comnad? or would it also be detected as a virus?

@cfergeau own small helper you mean create a small go binary which run crc daemon  like we create for file embed?

Has it already been tried to have our own small helper non-console binary which would just run the appropriate powershell comnad? or would it also be detected as a virus?

@cfergeau own small helper you mean create a small go binary which run crc daemon like we create for file embed?

I think it's powershell.Execute("Register-ScheduledTask", ...) which causes the popup? I'm thinking of a non-console binary which would run this command for us, in the hope that it would allow us to hide the window.

I think it's powershell.Execute("Register-ScheduledTask", ...) which causes the popup? I'm thinking of a non-console binary which would run this command for us, in the hope that it would allow us to hide the window.

It is not the Register-ScheduledTask but the command which use to run the crc daemon using powershell.exe -WindowStyle Hidden -Command crc.exe daemon if you don't use the powershell.exe -WindowStyle Hidden and direct use crc.exe daemon then user will see a powershell window will pop up and stay there which execute crc.exe daemon using -WindowStyle Hidden is kind of a neat way to don't show that window but as discribed it in the issue it is because powershell.exe is console application and there is nothing exist as  a win32 host application.

`` but the command which use to run the crc daemon using powershell.exe -WindowStyle Hidden -Command crc.exe daemon if you don't use the powershell.exe -WindowStyle Hidden and direct use crc.exe daemon then user will see a powershell window will pop up and stay there which execute crc.exe daemon using -WindowStyle Hidden is kind of a neat way to don't show that window but as discribed it in the issue it is because powershell.exe is console application and there is nothing exist as a win32 host application.

Ah, so each time the daemon is started, a console window flashes on the screen. Have you tried what is suggested in https://stackoverflow.com/questions/23250505/how-do-i-create-an-executable-from-golang-that-doesnt-open-a-console-window-whe instead of using powershell.exe?

Yes, if I use this during build of crc binary then there is no terminal output for any of the commands not only for crc side. I created following test script to experiment with it but this is not what we can consumed directly. With other helper command which can execute crc daemon command . But this can be part of improvement, I can create a follow up issue for this and have this discussion moved there.
package main

import (
	"fmt"
	"time"
)

func main() {
	for i := 0; i < 120; i++ {
		fmt.Println("This is for testing purpose")
		time.Sleep(time.Second)
	}
}

> go build -ldflags -H=windowsgui -o wintest.exe main.go
PS C:\Users\prkumar\work\github\practise\test> .\wintest.exe
PS C:\Users\prkumar\work\github\practise\test>
PS C:\Users\prkumar\work\github\practise\test> Get-Process wintest

Handles  NPM(K)    PM(K)      WS(K)     CPU(s)     Id  SI ProcessName
-------  ------    -----      -----     ------     --  -- -----------
     82       8    12472       5232       0.03  54140   3 wintest

.\crc.exe setup
...
INFO Checking if daemon task is installed
INFO Installing the daemon task
INFO Checking if daemon task is running
INFO Running the daemon task
...

.\crc.exe start
INFO Checking if running in a shell with administrator rights
INFO Checking Windows 10 release
INFO Checking Windows edition
INFO Checking if Hyper-V is installed and operational
INFO Checking if crc-users group exists
INFO Checking if current user is in Hyper-V Admins group
INFO Checking if Hyper-V service is enabled
INFO Checking if the Hyper-V virtual switch exists
INFO Found Virtual Switch to use: Default Switch
INFO Checking if vsock is correctly configured
INFO Checking if daemon task is installed
INFO Checking if daemon task is running
INFO Checking admin helper service is running
INFO Loading bundle: crc_podman_hyperv_3.4.4_amd64...
INFO Creating CodeReady Containers VM for Podman 3.4.4...
INFO Generating new SSH Key pair...
INFO CodeReady Containers instance is running with IP <IP_ADDRESS>
INFO CodeReady Containers VM is running
INFO Updating authorized keys...
INFO Adding new bearer token for cockpit webconsole
podman runtime is now running.

Use the 'podman' command line interface:
  PS> & crc podman-env | Invoke-Expression
  PS> podman.exe COMMAND

@praveenkumar @anjannath should we modify the tray to check for this scheduled task and task accordingly if not running?
At the moment we rely on the daemon to be started from the tray... this might lead to a conflict.

Sure, but this begs a few questions:
* is it ok to merge this PR now, and possibly have the flashing window in the next release? Or do we hold this PR for a bit?

@cfergeau I think it should be OK to take this PR as of now with flashing window.

* if this PR goes in, and we eventually realize there is no alternative to the flashing window, do we revert this? or will we live with the flashing window?

@cfergeau No, because this flashing window is not something user even notice and if even they do we have it part of the known issue. we only improve it, revert only take place if there is an alternative to task manager which can run daemon in user context without Admin priviliages.

@cfergeau No, because this flashing window is not something user even notice and if even they do we have it part of the known issue.

Err, sorry, but I'd definitely notice, and find this ugly and unpolished from whatever application did this. Let's not make blanket statements regarding what users would or would not notice.

@cfergeau No, because this flashing window is not something user even notice and if even they do we have it part of the known issue.

Err, sorry, but I'd definitely notice, and find this ugly and unpolished from whatever application did this. Let's not make blanket statements regarding what users would or would not notice.

@cfergeau Wrong wording in the sentense. No was for the revert query. I am all up for making it hidden from the start but as of now we have to use this workaround.

/hold

/unhold

Tested the end to end flow (both from cli and tray) and its working as expected


task 447 made authorize to handle both string and list of string

Made authorize function in auth_middleware to handle both string and list of string

@ywkim312, The changes looks good. Could you please also update the CHANGELOG? I'll merge this PR after that.


Checkpoint feedback

This PR implements checkpoint feedback given on 23rd Jan, 2017 as highlighted in the Feedback-23-Jan-2017.md file

Coverage decreased (-0.07%) to 97.321% when pulling 616801f26234c9adc6f7127f267b2999c856ef6d on cp-feedback into 2c1f90417def6dd4ce4dc6752b2de04ead1547f4 on develop.

Coverage decreased (-0.07%) to 97.321% when pulling 7359a2b77bcdc180cfed9e3c5c798f90afc67e6f on cp-feedback into 2c1f90417def6dd4ce4dc6752b2de04ead1547f4 on develop.

Coverage increased (+0.8%) to 98.214% when pulling 33dcb2d2d098298bc3222d0df2967a21cd95b85a on cp-feedback into 2c1f90417def6dd4ce4dc6752b2de04ead1547f4 on develop.

Coverage increased (+0.8%) to 98.214% when pulling 33dcb2d2d098298bc3222d0df2967a21cd95b85a on cp-feedback into 2c1f90417def6dd4ce4dc6752b2de04ead1547f4 on develop.


german language file added

I translated the englisch language file to german. I hope this is fine. Best Manuel

Please follow this instructions to publish a language!
https://github.com/orionjs/examples/tree/master/language


RawPlayDataChannel is not supported during ServerSideConnectionEvent.Join

Affected Product(s)
SpongeVanilla
Version
spongevanilla-1.16.5-8.1.0-RC1175
Operating System
Linux
Java Version
<IP_ADDRESS>
Plugins/Mods
LibertyBans 1.1.0-SNAPSHOT, LuckPerms-Sponge 5.4.55.

Describe the bug
I'm using the bungeecord:main channel and attempting to send data during ServerSideConnectionEvent.Join. The channel returns that it is unsupported during this event.
However, RawPlayDataChannel is documented to support sending to clients during the play phase. Surely, is ServerSideConnectionEvent.Join not in the play phase?
Steps to reproduce:

Configure SpongeVanilla in proxy mode
Obtain bungeecord:main in ServerSideConnectionEvent.Join
Check if the client supports this channel

	@Listener(order = Order.EARLY)
	public void onJoin(ServerSideConnectionEvent.Join event) {
		ServerPlayer player = event.player();
		Game game = Sponge.game();
		RawPlayDataChannel channel = game.channelManager()
				.ofType(ResourceKey.of("bungeecord", "main"), RawDataChannel.class)
				.play();
		boolean supported = channel.isSupportedBy(player.connection());
		System.out.println("Supported: " + supported);
	}

Link to logs
N/A

Hello,
ServerSideConnectionEvent.Join is called during the server tick and the channel bungeecord:main is registered right after because it is in a task. So a fix is to execute your code in a task
@Listener(order = Order.EARLY)
public void onJoin(ServerSideConnectionEvent.Join event) {
   Task task = Task.builder().execute(() -> {
       ServerPlayer player = event.player();
       Game game = Sponge.game();
       RawPlayDataChannel channel = game.channelManager()
               .ofType(ResourceKey.of("bungeecord", "main"), RawDataChannel.class)
               .play();
       boolean supported = channel.isSupportedBy(player.connection());
       System.out.println("Supported: " + supported);
   }).plugin(this.plugin).build();
   Sponge.server().scheduler().submit(task);
}

It works on my side

That might work. However, that behavior isn't documented anywhere to my knowledge -- if anything, the documentation even suggests otherwise. It's quite surprising that the join event works slightly differently: the player is in the play phase at this point, after all.
Why doesn't Sponge register this channel before the join event? That would make API use more approachable and avoid creating this edge case relating to the join event.


use Microsoft.Build.Tasks.Core.dll

Stackoverflow says: https://stackoverflow.com/questions/46741633/jetbrains-rider-the-task-factory-codetaskfactory-could-not-be-loaded-from-th

Closing this as the issue was resolved by telling the IDE to build with msbuild instead of dotnet.
The change is valid though 🙌🏼 But it's affecting projects of the old DUI2 we're already moving away from, so I wouldn't be too precious of this right now.
As I understand this (made some test with this on ArcGIS last night) just changing the dll to use the Core one is not enough, because the version dotnet ships is different than the one from msbuild and requires the use of RoslynCodeTaskFactory instead of CodeTaskFactory class.
We'll do a full sweep of this when we get there, but most likely these older projects would be excluded from it.


Refs #21608 -- Fixed wrong cache key in cache session backend.

Bug introduced in commit https://github.com/django/django/commit/3389c5ea229884a1943873fe7e7ffc2800cefc22

merged in 5faf745999caa3d2588979ae1262cc28652c21a5, thanks!


ConformerManager: button to remove conformer

Users need to be able to remove individual conformers in the structure selection step, especially within the SmilesWidget.
It's not clear to me where in the UI hiearchy this button should live. The easiest would be the TrajectoryViewer, but I am not sure how to propagate the change up. Perhaps we can look at how the StructureEditor does it.
Note; Don't forget to recalculate Boltzmann weights!

Will be tricky, we do not support edits in TrajectoryDataViewer currently.

Putting out of the alpha version. The workaround is to download the conformers, modify them manually and then upload them again. (depends on #29 and #34)


Ability to use screen wrapper as decorator

Is your feature request related to a problem? Please describe.
I think it would be handy to have methods to use the screen without manually creating one or using Screen.wrapper(func). I designed my solution based on Pony's db_session decorator works, so you can also use it with the with statement.
Describe the solution you'd like
My solution is this class:
class screen_session():
    def __init__(self, func=lambda: None):
        self.func = func
    def __call__(self, *args, **kwargs):
        screen = Screen.open()
        kwargs["screen"] = screen
        output = self.func(*args, **kwargs)
        screen.close()
        return output
    def __enter__(self):
        self.screen = Screen.open()
        return self.screen
    def __exit__(self, type, value, traceback):
        self.screen.close()

You can use it a couple different ways, either as a decorator (screen=None is to prevent pylint errors):
@screen_session
def demo(screen=None):
    screen.print_at('Hello world!', 0, 0)
    screen.refresh()
    sleep(3)

demo()

Or the with statement:
def demo():
    with screen_session() as screen:
        screen.print_at('Hello world!', 0, 0)
        screen.refresh()
        sleep(3)

demo()

Additional context
I don't have a lot of experience with decorators, so I'm not sure if there's an easier way to inject variables into the method's scope without including it in the kwargs. I also tried using the regular Screen.wrapper as a decorator and couldn't get it to work.

That looks  great!
Would you like to submit a pull request for that (and maybe add a test that uses the decorator to prove that it works)?

I did have to play with it a little (with help from stackoverflow) to get the decorator to work with regular methods and class methods:
class screen_session():
    def __init__(self, func=lambda: None):
        update_wrapper(self, func)
        self.func = func
    def __get__(self, obj, objtype):
        return partial(self.__call__, obj)
    def __call__(self, *args, **kwargs):
        screen = Screen.open()
        kwargs["screen"] = screen
        output = self.func(*args, **kwargs)
        screen.close()
        return output
    def __enter__(self):
        self.screen = Screen.open()
        return self.screen
    def __exit__(self, type, value, traceback):
        self.screen.close()

With this change the original demos as well as the following work:
class MyScreen():
    @screen_session
    def demo1(self, screen=None):
        screen.print_at('Class Demo 1!', 0, 0)
        screen.refresh()
        sleep(3)

    def demo2(self, screen=None):
        with screen_session() as screen:
            screen.print_at('Class Demo 2!', 0, 0)
            screen.refresh()
            sleep(3)

m = MyScreen()
m.demo1()
m.demo2()

I also don't know how backwards compatible it is with python2, I personally don't ever use it (especially with support ending soon) ¯\_(ツ)_/¯

You can even use it like this:
@screen_session
class MyScreen():
    def __init__(self, screen=None):
        self.screen = screen
        self.demo()

    def demo(self):
        screen.print_at('Class Demo 1!', 0, 0)
        screen.refresh()
        sleep(3)

MyScreen()

But that seems to only work if you call the printing methods inside __init__, so you're probably just better off not using it as a decorator and using with or manually opening and closing the scene.
It would be nice to automatically open the screen when the class is instantiated and close the screen when the object is destroyed, but destructors aren't nice in python so I can't figure out how to get that working.

Yeah - I'm not so keen on that last option with the restrictions on what you can/can't do inside each method.
Testing is easy.  Just put your code to use the screen_session in test_screen.py and assert that the screen buffer contains the expected output.  You can use test_cjk_glyphs_overwrite() as a template for the basic idea.  Once you've got it working on your machine, push the branch to github and the Travis CI pipeline will test it on bother versions of Python for you.

Now added - much thanks!


Fix the JS error "EventSource is not defined" caused by some non-standard browsers

Background
Some browsers (like Pale Moon, Firefox<53) don't support EventSource in SharedWorkerGlobalScope. It's a bug https://stackoverflow.com/questions/25234493/server-sent-events-in-firefox-shared-web-workers .
Gitea's eventsource.sharedworker.js needs EventSource when doing "new Source(url)".
Before 1.17, even if JS error occurs, there is no prompt to end users, the code just didn't work.
Since 1.17, the UI will show JS errors, so if a users is using a such browser, they will see a JS error prompt. Thanks to our global JS error handler, we catch this problem now.
Solution
The simple solution is to check whether there is a EventSource class in global (the self, aka SharedWorkerGlobalScope). If no EventSource class, just post a message back to the caller, in case the caller would like to use a fallback method to do its work.
Although it's feasible to make the worker's caller to handle the 'no-event-source' message to use a fallback method, I think it's out of the scope of this PR, because in such case, the real-time polling just never worked before, it's not worth to do the fix for the browser's bugs.
Close #20572

This PR does not do fallback to the poller function.

This PR does not do fallback to the poller function.

Yup, described in the comment already

Although it's feasible to make the worker's caller to handle the 'no-event-source' message to use a fallback method, I think it's out of the scope of this PR, because in such case, the real-time polling just never worked before, it's not worth to do the fix for the browser's bugs.

If there is one more people like to add the fallback back, I can do it.

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@e56005f). Click here to learn what that means.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main   #20584   +/-   ##
=======================================
  Coverage        ?   46.82%
=======================================
  Files           ?      979
  Lines           ?   135821
  Branches        ?        0
=======================================
  Hits            ?    63593
  Misses          ?    64415
  Partials        ?     7813

Help us with your feedback. Take ten seconds to tell us how you rate us.

@zeripath the poller is back

Maybe it's valuable to backport to v1.17 when possible.

I would like to wait for feedbacks from users (https://github.com/go-gitea/gitea/issues/20572#issuecomment-1204621780) first.

The main branch has been confirmed by https://github.com/go-gitea/gitea/issues/20572#issuecomment-1204958859
The backport for 1.17 is in https://github.com/go-gitea/gitea/pull/20663

I just upgraded to 1.17.1 and this error doesn't seem to be fixed on Pale Moon.
JavaScript error: ReferenceError: EventSource is not defined (https://repo.palemoon.org/assets/js/eventsource.sharedworker.js @ 1:0). Open browser console to see more details.

Cache problem (I have read other comments, just put a comment for it here)

Cache issue will be solved with https://github.com/go-gitea/gitea/pull/20813.

Cache issue will be solved with #20813.

Awesome! It bit me because even a hard refresh didn't actually get me where I wanted to. Only a full browser cache purge did the trick (may even need a browser restart, depending on configuration!)


SpannedGridLayoutManager takes extra blank space when you scroll fast

first thanks for the great spannedgridlayoutmanager this save my day. however i encountered some issue when you scrolling too fast(i implemented pagination). it takes extra blank space. i can't figure out what's the main cause of this
here's the screenshot

hope someone already solve this problem.
Thanks.

first thanks for the great spannedgridlayoutmanager this save my day. however i encountered some issue when you scrolling too fast(i implemented pagination). it takes extra blank space. i can't figure out what's the main cause of this
here's the screenshot

hope someone already solve this problem.
Thanks.

did u find a solution?

Anyone solved this bug?

first thanks for the great spannedgridlayoutmanager this save my day. however i encountered some issue when you scrolling too fast(i implemented pagination). it takes extra blank space. i can't figure out what's the main cause of this
here's the screenshot

hope someone already solve this problem.
Thanks.

did u find a solution?

Anyone solved this bug?

i ended up of using linearlayoutmanager with different view types,
maybe you can try this library https://github.com/Arasthel/SpannedGridLayoutManager, i think this is more stable now.

Hi any update on the same?

I'm closing this because I cannot reproduce the issue with Plaid.


Fix Security Dependabot Warnings

What this PR does / why we need it

This fixes some dependabot security issues using a npm prune to remove old stale references.
Which issue(s) this PR fixes

NA
Describe testing done for PR

NA
Special notes for your reviewer

NA

Merging to address indirect npm security concerns.


Raise Faraday::Error::ConnectionFailed when connection fails

This addresses #497.

Thank you very much for your work @inglesp!


Adopt a Coordinated Vulnerability Disclosure policy

As recommended by the National Cyber Security Centre, we should adopt a CVD (formerly known as Responsible Disclosure) policy. This allows ethical hackers to report vulnerabilities without the risks of legal prosecution. The specific scope and terms can be decided upon by ourselves.
Adopting such a policy should only be done in consultation with the board.
--
Kurocon 2022-10-31: New link https://www.ncsc.nl/onderwerpen/cvd-beleid

Security.txt was added in https://github.com/Inter-Actief/amelie-private/commit/67ba1776d5bfa4e2e028803e1b758df8b02b48ad
CVD policy should still be written at some point, in conjunction with the board, but at least people know how and where to find us now.

Sent a proposal to the board

BTW: Once CVD is accepted, we should still:

[ ] Add link on website (footer)
[ ] Add Policy field in security.txt
[ ] Add SECURITY.md to code base (GitHub security advisory)

SECURITY.md added in https://github.com/Inter-Actief/amelie-private/commit/ef25118669ed70fd4eb4ebf3de969d51d9ff51a2


Occasional timing error installing clis

Not sure if it is a timing issue or a network hiccup. Either way, a file is created for the command but it is not executable.


Muliple plotting #9

Based on this issue: https://github.com/NatelEnergy/grafana-plotly-panel/issues/9
Need to be done:

[ ] Screenshots in readme
[x] Default name in TraceName field
[x] Move "traces" to a separate tab
[x] Links to CorpGlory DevTeam
[x] Feature in README
[ ] @time / @index for each query , example: B Series@time

discussed with @jonyrock on slack... I will merge, and we will fix remaining issues in a new pull request


Improve performance of image loading

Check whether there are ways that we can improve MagickImage performance or find a leaner alternative.

I don't know how to read the data of this image. Do you know which part of the loading should be improved? I might be able to help you with that.

This is still a valid concern with the MonoGame PNG libraries (which also at some point need to be removed from our codebase).

We switched back to System.Drawing, so performance is good again. Still need to fix loading of transparent pixels in libgdiplus for linux (see https://github.com/mono/libgdiplus/pull/43).


Supply Current Time

I maintain an app that uses a software supplied timestamp for all timestamp fields in the database, among them the deleted_at timestamp.
This patch would allow optionally passing in currentTime to Model.destroy as a Date or milliseconds since the epoch to overwrite the default new Date() behaviour.
The other two commits could be removed if you don't like them. I think one fixes a bug, though.

Noticed a mistake in the documentation I created, I'm using
const now = options.currentTime ? new Date(options.currentTime) : new Date()

not Date.now(). I assume Date is definitely going to work?
Suppling fixups for this and the rename in a second.
The date-in-the-future thing is something I think the library should not care about, but should be taken care of by user code.

Thanks! I don't now about your master and/or rebase policy, but will it's still the HEAD and unreleased, you could squash the fixups into 09f5623.

@bsiddiqui Do you know yet when you are going to release the next time?

@mborst sorry for the delay - new version released

thanks! :)


further clean-up of make_bcs package (./Raster) -- CLM4.5_veg_typs_fracs

@gmao-rreichle , This PR is my cleanup of CLM4.5_veg_typs_fracs, please take a look at it.

@weiyuan-jiang, thanks for creating this branch.  Overall, looks great.  I added a few inline comments which @biljanaorescanin and @gmao-jkolassa should be able to help address.

The above commits are to further clean-up any obsolete processing of CLM4.5 PFTs and to add some documentation for Catchment-CN. Specific changes are:
mk_GEOSldasRestarts.F90: Removed obsolete separate processing of CNCLM45 plant types and fractions in read_bcs_data and added comment at the top of the subroutine to document this.
mod_process_hres_data.F90: added comment at the top of the file to document rationale for removing ESA2CLM_45 subroutine.
create_README.csh: Added a paragraph to the explanation of how the CNCLM PFT distribution was created to explain that the decision was made to use the same distribution for both Catchment-CN models. Changed occurrences of 'CLM-Carbon' to 'Catchment-CN', since this is what was being referred to.
clsm_plots.pro: Changed occurrences of 'CLM-Carbon' to 'Catchment-CN' except in names of the plots that are created to keep consistency with already existing plots.
Please let me know if you would like me to change any of the above.

I didn't touch mk_GEOSldasRestarts.F90 because I think that would be an obsolete file.  The new addition CatchmentRst.F90, CatchmentCNRst.F90 and mk_catchANDcnRestarts.F90 are all we need in the future.  These three files simplify our mk catchment(cn) restarts process a lot.

@gmao-jkolassa, @weiyuan-jiang, @biljanaorescanin:
Thanks, @gmao-jkolassa, for the additional cleanup.   I added a couple of minor changes to the comments about discontinuing the production of the obsolete bcs file CLM4.5_veg_typs_fracs.  Please double-check for accuracy here: 1decec25f352df7b4306377d5594227e5013c7a1
Also, in commit<PHONE_NUMBER>6381c1ca1ed14bcd877b4bc6acba06 , I reverted (that is, un-did) the changes to mk_GEOSldasRestarts.F90 of commit 59356e93cfe29e2dc260efbb200bd4bf9dda5059  because we don't want to change the mk_restarts package in this PR (so as not to have to also test mk_restarts as part of the make_bcs PR).  These changes may still need to be added into the mk_restarts cleanup PR https://github.com/GEOS-ESM/GEOSgcm_GridComp/pull/571.
Finally, I changed the file names of the CatchmentCNCLM veg class plots.  I think it's better to have sensible file names and accept the slight complication that this creates when differencing make_bcs output before and after than to perpetuate incomprehensible file names.
The one remaining open question is what to do about the numbering of the steps in the mkCatchParam.F90 log output.  See https://github.com/GEOS-ESM/GEOSgcm_GridComp/pull/586#discussion_r870669456    @biljanaorescanin, do you have an opinion on this?
cc: @rdkoster

I didn't touch mk_GEOSldasRestarts.F90 because I think that would be an obsolete file.

See my previous comment https://github.com/GEOS-ESM/GEOSgcm_GridComp/pull/586#issuecomment-1126481483

Thanks @gmao-rreichle . I looked through your edits and it all looks good to me.
And I also understand about reverting the changes to mk_GEOSldasRestarts.F90. As @weiyuan-jiang indicated, this file may become obsolete anyway, so maybe a cleanup of that file is not necessary at all.

mk_GEOSldasRestarts.F90 [...] may become obsolete anyway, so maybe a cleanup of that file is not necessary at all.

Yes, @gmao-jkolassa, this file will definitely become obsolete eventually, so no need to edit.
One more thing: Across the src code here, sometimes we only refer to "CatchmentCN" (e.g., in the tabular info about veg classes).  Looking ahead, will "CatchmentCNCLM5" (or whatever it'll be called) still use the same veg classes as CatchmentCNCLM4x?  If not, maybe we should be more specific now that the info, tables, etc only apply to CatchmentCNCLM4x.  This can also be left for later, but it's important to have this sorted out when CatchmentCNCLM5 is merged.

@gmao-rreichle The newest version of CatchmentCN (CNCLM5) will have vegetation classes that are similar but not identical to the older versions of CatchmentCN. We agreed that for this new version of CatchmentCN we will try get rid of the "split"  PFTs we currently have and treat them as one PFT again. Note, that this is the plan for the first iteration of CNCLM5. We may well decide that we do need to reintroduce the split types. Also, if we ever decide to use the CLM crop module in CatchmentCN, we would have to introduce additional crop PFTs.
For the purpose of this PR, do you want me to go through the code and make information that only refers to CatchmentCN specific for each version of CatchmentCN?

For the purpose of this PR, do you want me to go through the code and make information that only refers to CatchmentCN specific for each version of CatchmentCN?

@gmao-jkolassa: It's up to you.  If you do it now, we won't forget later.  But it's not necessary to make these changes until CatchCNCLM5 is merged, and it may be easier to do it as part of the forthcoming CatchCNCLM5 PR, when it's clearer what the differences will be between CatchCNCLM4x and CatchCNCLM5.  Just let me know your preference. Thanks!

Ok, I'll do it when I create the CNCLM5 PR and I will make a note for myself to remember to do this.


Discovery of A Records

This page and logic seems to help users discover Subdomain Takeover using CNAME records. However, it's still possible to take over a subdomain with A Records as well. One can provision a public IP address from Azure and create an A Record to it, then later decommission the public IP address. Can we update the script/documentation to check against A Records as well?

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

ID: 647e9a22-fedf-a3d6-5bb3-54b635bdfba4
Version Independent ID: a35040bc-5e45-0514-fd49-e4b97813ed98
Content: Prevent subdomain takeovers with Azure DNS alias records and Azure App Service's custom domain verification
Content Source: articles/security/fundamentals/subdomain-takeover.md
Service: security
Sub-service: security-fundamentals
GitHub Login: @TerryLanfear
Microsoft Alias: terrylan

@cv-anthony
Thanks for your feedback! We will investigate and update as appropriate.

@cv-anthony
I'm going to assign this to the document author so they can take a look at it accordingly
@TerryLanfear
Can you please check and add your comments on this doc update request as applicable.

@cv-anthony, @ManoharLakkoju-MSFT - Thanks for forwarding. I'll look into this and reply back soon.

I would like to add, for extra detail, that I have written a similar script that I run daily that looks at Azure A-Records. Using this graph query:

resources | where type contains 'publicIPAddresses' and isnotempty(properties.ipAddress) | project properties.ipAddress

I then check that against all A-Records in our DNS that contain azure IP addresses. I use this endpoint to determine if the IP address is an Azure IP Address:
https://www.azurespeed.com/api/ipinfo?ipAddressOrUrl={ip-addr}
From there I am able to detect any dangling A-Records in Azure. This works quite well and I imagine it can be added to the Get-DanglingDnsRecords Powershell script.

@cv-anthony - Thanks for your dedication to our documentation. Unfortunately, at this time we have been unable to review your issue in a timely manner and we sincerely apologize for the delayed response. We are closing this issue for now, but if you feel that it's still a concern, please respond and let us know within two weeks. #please-close
UUF-Stale-Not Planned


Download for images is broken

On the documentation website the downloadlink for the images do no longer work:
https://goodrobots.github.io/maverick/current/#/?id=os-images

Have the same issue.
Needed Raspberry Pi lite image

The reason is because of broken SSL configuration for the download site. Not sure what it is, but if you wanna download anyway. Right Click on the link, and "Save Link As". Some browsers will provide a warning, but since the hash is provided next to the download you can confirm manually after download.

I tried to download manually, but just a small file that cannot be used.
Here is some of the information shown by the network page.
This domain was recently registered at Namecheap.com. Please check back later!
I wonder if the download link has expired?

This issue has not been resolved yet

Not able to download still. Seems like the link is removed. Tried right click-> save as, but no luck.

Anyone has the link or a old copy of the image for rpi?
Seems no help whatsoever, plz share image link if you have one. Thank you.

Any updates? Can any images be found anywhere? @fnoop

Does anyone have a link to the Raspberry PI version. I would love to help get this file hosted and provide some help. I know that certain people are using this and need it to be avalible. I'd really not like to have to bootstrap this myself if possible. Anyone?


Backups Strategy

User Story
We need a strategy of how we handle backups of the platform. Have a session on Backups
Value
So that we can be confident that we can restore the platform if there is an incident.
Questions / Assumptions
This ticket is to decide what we want to back up, and potentially how, the outcome should be an ADR and issues raised to complete the work needed.
Definition of done

[ ] Session on backups
[ ] ask users what they want
[ ] ADR created
[ ] new backup issues raised
[ ] another team member has reviewed

Reference
How to write good user stories

Is this handling backups ON the platform, as in RDS, EC2 volumes, amazon mq, other amazon offerings etc, or is it about how would we backup the entire platform, hence backups of the platform?

Meeting booked in for Friday

https://github.com/ministryofjustice/modernisation-platform/issues/2612
And
https://github.com/ministryofjustice/modernisation-platform/issues/2613

ADR - #1087


Forward-merge branch-23.10 to branch-23.12

Forward-merge triggered by push to branch-23.10 that creates a PR to keep branch-23.12 up-to-date. If this PR is unable to be immediately merged due to conflicts, it will remain open for the team to manually merge.

SUCCESS - forward-merge complete.


Use new Path APIs as soon as Fedora 39 is released

Basically revert https://github.com/gtk-rs/gtk4-rs/pull/1466/commits/549c13ac2f3bc512ac46deb54f77e704c7fb5c88

Path APIs? :P

I thought you meant this change in your PR https://github.com/gtk-rs/gtk4-rs/pull/1463
But I guess that was only a drive-by commit.


how do I change servers through the file or cmd?

You can see how to change the server here

thanks


Variadic assertions and custom messages

The standard bag of assertions tend to come come in the following form: a function that accepts a pre-determined or easily determinable at runtime number of arguments (such as throw), with a custom message as the last parameter. It's also what's documented:

If you want the failed assertion to include a custom message or reason you can always add this as last argument of the assertion function.

I wanted to keep the feel of the standard assertions in my plugins: they should feel apart of the ecosystem, rather than something foreign that happens to work. So for anything that could be variadic, I'm accepting an array as the first parameter.
There is one exception in the standard assertions that questions this assumption: either. It's the only true variadic in the standard library, and it's also the only assertion that doesn't accept a custom message.
(The other exception, a nit-pick, is eql, but it's not documented to accept the slice parameter, and it's correctable.)
I have a preference to not challenge user assumptions, and have all methods accept the custom message parameter, even if it requires more arrays. But I wanted your input on how I should proceed.

I personally find:
assume('foo').is.either('bar', 'foo', 'banana');

Easier to read and write than:
assume('foo').is.either(['foo, 'bar', 'baz]);

As the example above could also mean that it should be an array instead of one of the strings that are present in the array. Especially when you start doing deep equals of array using either:
assume(['foo']).is.deep.either([['bar'], ['foo'], 'bar']);
assume(['foo']).is.deep.either(['bar'], ['foo'], 'bar');

But I do understand you point and this API is less than ideal. And I don't really an other option forcing an array structure if we want all API methods to follow the same argument structure.
As for the somewhat "private" slice argument, it has been removed from the eql method now that I introduced a sliceStack option in #3.


jupyterlab-niryo-one  does not come out to choose

Hi,
I install:
pip install jupyterlab
pip install jupyterlab-blockly
pip install jupyterlab-niryo-one
blockly does appear within jupyterlab, but it does not appear when deploying default niryo-one
thanks you.

Thank you for opening this issue, and I apologize for the delayed reply!
The issue might have been caused by the version of JupyterLab, as they were not yet compatible with v4 at that point. A new release of jupyterlab-blockly was made v0.3.2, which supports v4, and the jupyterlab-niryo-one extension has also been updated - a new release will also be made for it this week.
As a side note, when installing the jupyterlab-niryo-one extension, the default toolbox that appears in jupyterlab-blockly is already present, along with all of its functionalities, so there is no need to install both extensions.
Please feel free to open up another issue with more details if the problem persists.


Add Dockerfile

Hi,
I'm sharing you the Dockerfile I created to test invoice2data.
Thank you for your great job!
Regards,

I'm neutral on this one. Would like to have the opinion of other contributors to see if this is something we want to add and maintain here.


Threads don't work.

Firefox has experimental support for threads but general support seems like it's still a long way off.
https://kripken.github.io/emscripten-site/docs/porting/pthreads.html

You probably know a lot more about this than I do, but have you read this?

Yeah, it's either pthreads in Firefox Nightly or WebWorkers. Neither of which are a very good solution right now.

Threads work in 0.11/


Add ping extension

Description

Screencast

Checklist

[x] I read the extension guidelines
[x] I read the documentation about publishing
[x] I ran npm run build and tested this distribution build in Raycast
[x] I checked that files in the assets folder are used by the extension itself
[x] I checked that assets used by the README are placed outside of the metadata folder

Anyway, thank you.


Cricket Shots Detection

I want to add a Cricket Shots Detection Project with Deep Learning methodologies , This Project will be a great addition to the repository.
The project focuses on classification of different cricket shots using various Deep Learning Algorithms.

Libraries and Frameworks used:

Pandas
Numpy
Matplotlib
Seaborn
Tensorflow
Keras
sklearn
glob
OpenCV

Deep Learning Algorithms used:

ResNet
DenseNet
InceptionNet
EfficientNet
@Niketkumardheeryan  Assign me this issue , this is regarding my College Project , will be very glad to contribute to the project.

@Niketkumardheeryan Have a look , Thank you for your time.

@Niketkumardheeryan It is not getting cloned because of this folder
"Quality Education SDG 04: Predictive Analysis", what to do I tried doing some fixes but still not able to clone the repo.

@Niketkumardheeryan It is not getting cloned because of this folder "Quality Education SDG 04: Predictive Analysis", what to do I tried doing some fixes but still not able to clone the repo. The folder has ":" in the name , and windows dont allow it and hence the clone is getting failed please can u fix this.

@Niketkumardheeryan have a look at here once


Impossible to signup!

Hey guys, tried to signup to vizor, filled the fields, it doesn't work, here's a screenshot of it, I'm using Chrome on Windows 8.1 :

@tbalouet thanks for reporting! looks like the reason is that your username is already taken, but the error message clearly doesn't get all the way to the UI :( ... that's already fixed in the develop branch, hopefully we can deploy that soon!
https://github.com/vizorvr/vizor/blob/develop/browser/scripts/account-controller.js#L108


Use match instead of if/else chain on normalize_unicode()

Hi! I just read your article about sorting words. Thank you for seriously supporting non-English languages. I've used a mixed English/Spanish wordlist approach for generating passwords in the past (🤫), and i could see using a tool like Tidy for such word-twiddling task in the future :)
Anyways, the normalized_unicode() snippet made me think "hey isn't that a good candidate for a match?". And so here's the patch for that hehe. I hope this bike-shedding-ish change doesn't bother you.
The code should be equivalent, just a bit terser.
Also removed the explicit turbofish type parameters to collect::<String>(), which are not necessary since Rust is able to infer those from the function return type.
I tested this locally running cargo test, which passed, and also corroborated some tests covered this by removing a branch of the match and checking that the tests indeed failed :)
Cheers!

Oh dang, that definitely calls for a match. I was probably adding them one by one and didn't think to go back and refactor. Thanks so much for the PR!


Single d deletes line under cursor (Neovim)

Pressing d once deletes the line under the cursor instead of dd.
To reproduce:
I'm using Neovim 0.2. and vimplug as the plugin manager
This is the init.vim (vimrc) required to reproduce the issue
call plug#begin()
    Plug 'xtal8/traces.vim'
call plug#end()

I have noticed a similar bug logged with deoplete
https://github.com/Shougo/deoplete.nvim/issues/460
Thanks :)

It's a problem with Neovim's timers. It can be reproduced with this snippet:
func! g:Foo(...)
  " do nothing
endfunc
call timer_start(40,function('g:Foo'),{'repeat':-1})

It's seems it's fixed in Neovim 0.2.1-dev. There's no other solution apart from increasing Neovim's requirements. Thank's for letting me know.

I updated Neovim version requirements. https://github.com/xtal8/traces.vim/commit/fab8e99ee87cb140b51d06ac5526aced7d063878


Fix issue of existence for policies under virtual servers

@caphrim007
Fixes: #805
What's this change do?
I commonized the logic to check for existence of a policy under a virtual to be used by other resources that need it. It is now in the mixins module.
Any background context?
This issue has been encountered before. Here, if we check for existence or attempt to load a missing policy from a virtual server's namespace, it will always succeed when using TMOS 11.6.0. Meaning that the GET call returns a 200 OK, whether the policy exists or not. We need to iterate of the collection of items from the container and check if the object we need exists by name.
Where should the reviewer start?
Start at the mixin and then move into the code chances in each resource.

@caphrim007: okay, I think this is ready for review. Thanks for your assistance!


Dashboard: Implement updated snackbar from design system

Summary
Formerly called "toasts" in dashboard and implemented to fill a need for error messaging, now that we have updated designs for a snackbar from Figma, this PR swaps out the old structure in the dashboard for those new ones.
Relevant Technical Choices
Clean up:

Since we were calling these toasts and stacking them in the dashboard and now we are formalizing our designs and calling them snackbars and limiting to displaying one message at a time, I did rename everything in the dashboard from toast to snackbar. That's the bulk of these updates.
Moved snackbar context for dashboard up to dashboard/app/snackbar
<DashboardSnackbar />, the view of the snackbar in the dashboard, is now imported and shown in the <Layout.Fixed /> portion of views. This preserves scrolling from the lower section of the view when a snackbar message is present and also prevents interference of the message with, say, a context menu button getting clicked.

Functionality:

Had to make a few updates to the design-system snackbar that I didn't see when testing just in storybook for that - namely, the z-index and fixed position should be on the message, particularly now that there's only 1 being displayed at a time.
Updated snackbarProvider.js to queue the messages one at a time and clear message queue when currentPath from router updates.

To-do

Since the designs for the snackbar only have a message, we should take a second look at the error messages used in the dashboard, they were all relying on having a title present. I have this pr open: #5305 to organize the static text for errors. I think a follow up to this would be beneficial.

User-facing changes
(In dashboard)

Snackbar messages should be updated to look like the new ones in figma: https://www.figma.com/file/bMhG3KyrJF8vIAODgmbeqT/Design-System?node-id=3398%3A83619
Only one message should ever show at once
Messages are not able to be early dismissed

Testing Instructions

Things that have snackbar messages on the dashboard:

Copy a story URL from a context menu
Any API error (I just block the domain after initial load and click around)

You can also see that only 1 message occurs at once by playing with the demo that's tied to context in storybook (dashboard/views/dashboardSnackbar)

Addresses #4967

I have one question about alignment, visually the snackbar on dashboard shows up in the center of the main content, not the center of the entire browser viewport. Is that correct?

I have one question about alignment, visually the snackbar on dashboard shows up in the center of the main content, not the center of the entire browser viewport. Is that correct?

So, earlier today I was thinking this is better centered to the main content - and tonight I realize I'm looking at it from the perspective of the old designs with the much more pronounced separation of menu and content. I looked up the snackbar demo of the dashboard in figma (here) and it is centered to the page.
I updated the PR to center it to the page. I had to do so with a global style to change the position according to the page size and if the wordPress menu is folded or not and if the left nav of the dashboard is taking up space.


Add category grouping option for autocomplete tag dropdown implementation

https://github.com/konveyor/tackle2-ui/pull/1295#issuecomment-1697653629
Address the new grouping option for tag categories. We want to be able to see associated categories that tags belong to in the dropdown as shown in the mockups.

@rszwajko - Did one of your recent changes cover this issue already?

The grouping feature for autocomplete has been added in #1799 but it's not enabled yet. However it should look the same as for the stakeholders here -> https://github.com/konveyor/tackle2-ui/blob/56e556f23d54b7ecb656e1345e63ddf65695c757/client/src/app/pages/assessment/components/assessment-stakeholders-form/assessment-stakeholders-form.tsx#L47


"target work item for Jira is not yet created in Azure DevOps/TFS"

Why doesn't it just create that issue first then? Does'nt it have all the info it needs to know that theres some parent issues that should be created first?

@VictorioBerra  Please try with the latest version of the tool, that should have fixed this issue.
Closing this issue for now. Feel free to contact us if still facing problems.

@madkoo We have pulled the latest version and that is still the issue. We encounter that very frequently. Any solution to it.


Dead link in Releases documentation

Describe the bug
The link to the https://github.com/microsoft/BotFramework-Composer/blob/main/releases/1.2.1.md is dead, there is no 1.2.1.md in the repo.

Version

Browser

[ ] Electron distribution
[x] Chrome
[x] Safari
[x] Firefox
[x] Edge

OS

[x] macOS
[x] Windows
[x] Ubuntu

To Reproduce
Steps to reproduce the behavior:

Go to 'https://github.com/microsoft/BotFramework-Composer/releases'
Click on '....'
Scroll down to '1.2.1 Release'
Click on the https://github.com/microsoft/BotFramework-Composer/blob/main/releases/1.2.1.md link

Expected behavior

Screenshots

Additional context

Yeah, it is a broken link.
I think you can read the following for your reference.
https://github.com/microsoft/BotFramework-Composer/blob/main/releases/1.2.0.md
https://docs.microsoft.com/en-us/composer/what-is-new

this has been fixed. thanks for reporting


Create GND.svg

Add  Ground Coin token logo.

📝 Description
Ground Coin token needs a logo.
❓ Context

Impacted projects: ``
Linked resource(s): ``

✅ Checklist

[ ] Test coverage
[ ] Atomic delivery
[ ] No breaking changes

📸 Demo

🚀 Expectations to reach
Please make sure you follow these Important Steps.
Pull Requests must pass the CI and be internally validated in order to be merged.

Hey @New-Grounds-NFT-Game,
Thank you for your contribution.
Could you add a changeset (by using pnpm changeset) please ?

@ledgerhq/live-common:test:  FAIL  src/__tests__/svg.ts
@ledgerhq/live-common:test:   ● svg icons valid
@ledgerhq/live-common:test:
@ledgerhq/live-common:test:     no width found in /home/runner/work/ledger-live/ledger-live/libs/ledger-live-common/src/data/icons/svg/GND.svg

sanity tests are not passing. Could you try to have the same guidelines as other icons we have in our svg folder? Thanks

I will do this as soon as posible
El 02/08/2022 17:39 CEST @greweb<EMAIL_ADDRESS>escribió:

@ledgerhq/live-common:test:  FAIL  src/tests/svg.ts
@ledgerhq/live-common:test:   ● svg icons valid
@ledgerhq/live-common:test:
@ledgerhq/live-common:test:     no width found in /home/runner/work/ledger-live/ledger-live/libs/ledger-live-common/src/data/icons/svg/GND.svg
sanity tests are not passing. Could you try to have the same guidelines as other icons we have in our svg folder? Thanks
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

Please reopen a new PR with the fixed logo. Thanks


Adds a try to run the validate in the produce method

The validation is done here, I think: https://docs.confluent.io/5.5.4/clients/confluent-kafka-python/index.html#schemaregistry-json-serializer


background-sync plugin cannot be used with CORS requests

Library Affected: workbox-background-sync
Browser & Platform: all browsers
Issue or Feature Request Description:
The background-sync plugin cannot be used with CORS requests due to the browsers initially sending an OPTIONS request to check the CORS headers.
If the OPTIONS request succeeds but the POST request fails (e.g. 500 error) then the POST request is successfully queued and everything works as expected.
However if we are offline when we first send the request through, the browser sends the OPTIONS request and gets the offline network error. In response the browser never attempts to send the POST request so it doesn't get queued to retry.
Ideally we need some way to store and replay a request chain rather than just a single request so in the instance of a CORS check we can queue the OPTIONS and then the POST request.
I'm not sure what the implementation of this would look like using axios or fetch once implemented.
As it stands the only way to use the background-sync plugin with a remote API is to setup a proxy (E.g. Apache Reverse Proxy or a node proxy) as a subfolder and request to that. However this means we can't for example deploy our PWA on any static file hosts e.g. github pages or an AWS S3 bucket since we cannot add a proxy there.

@jeffposnick This is in regards to our slack conversation where you requested I log a formal bug.

Thanks! CC: @philipwalton for visibility.

Any news on this?  Thanks...

No news on this one ? My colleague Yanis is crying over this issue right now

Hey all—apologies for the delay in addressing this.
I'm revisiting it now, and having a hard time even writing a test case that demonstrates the failure. If I do something simple like:
const request = new Request('http://localhost:8002', {
  method: 'PUT',
  mode: 'cors',
});

const fetchDidFail = ({request}) => console.log('failed: ', request.method),
const networkOnly = new NetworkOnly({plugins: [fetchDidFail]});

await networkOnly.handle({request});

and execute that while offline, then what I'm seeing in Chrome and Firefox is that the fetchDidFail callback does get called with the appropriate request value (i.e. corresponding to the original PUT), as opposed to be calling with the OPTIONS or something else that would cause the background sync queue to be confused.
So, taking a step back, does anyone have a small-ish reproduction of the issue, or could explain what they're doing differently in production vs. what that test code is doing?

I got your code to fail just fine as advertised @jeffposnick
I modified it slightly to use post, include a body and set content type.
const request = new Request('https://myRandomDomain.com/home/hello', {
	method: 'POST',
	mode: 'cors',
	headers: new Headers({'content-type': 'application/json'}),
	body: JSON.stringify({"name": "name"})
});

const fetchDidFail = ({request}) => console.log('failed: ', request.method);
const networkOnly = new workbox.strategies.NetworkOnly({plugins: [fetchDidFail]});

networkOnly.handle({request}).then(response => console.log("cool "+response.status));

If the server on "myRandomDomain.com" is running it all works fine and it prints "cool 200 (from the last line of code
However, if I stop the webserver running at myRandomDomain.com chrome gives me 2 errors, namely
Access to fetch at 'https://myRandomDomain.com/home/hello' from origin 'https://myDomainRunningMyApp.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
And
VM8 workbox-strategies.prod.js:1 Uncaught (in promise) no-response: no-response :: [{"url":"https://myRandomDomain.com/home/hello","error":{}}]
at Object.handle (https://storage.googleapis.com/workbox-cdn/releases/5.1.3/workbox-strategies.prod.js:1:2862)

@rickardliljeberg, my apologies—the sample I provided was missing {} around {fetchDidFail} (I've since updated it), so it wasn't properly registered as a plugin.
Here's a quick gist with what I just tried: https://gist.github.com/jeffposnick/9f46f36d3ccb39324e47f3433fe881a6
When I run that, I see the fetchDidFail callback invoked with request.method set to POST, and OPTIONS doesn't seem to come into play.

Hey All—I want to revisit this, as we last left things with me being unable to reproduce the issue, as fetchDidFail was being invoked with the underlying POST request, meaning that it should be re-queued by workbox-background-sync.
If someone could put together a sample along the lines of https://gist.github.com/jeffposnick/9f46f36d3ccb39324e47f3433fe881a6 where the POST request never makes it to the fetchDidFail, or just point me to a live reproduction of a real-world failure, we can definitely investigate further.
Failing that, I'm going to close this issue for now.


Add check for existence of system requirement command line tools

Check for the presence of all required executables as soon as possible (before artifacts are downloaded) in the tool and give a good error message.  flutter doctor makes sense but the validators may be run too late to catch git or zip exceptions.
https://flutter.dev/docs/get-started/install/windows#system-requirements

Windows PowerShell 5.0 or newer (this is pre-installed with Windows 10)
Git for Windows 2.x, with the Use Git from the Windows Command Prompt option.

https://flutter.dev/docs/get-started/install/macos#system-requirements

bash
curl
git 2.x
mkdir
rm
unzip
which
zip

https://flutter.dev/docs/get-started/install/linux#system-requirements
(above list + xz-utils)

See https://github.com/flutter/flutter/issues/52241

It might make sense to create an abstraction layer class for each system dependency we assume is installed, to uniformly handle them not existing.

May need to check some of them all the way up in https://github.com/flutter/flutter/blob/master/bin/flutter.
Also that list seems kind of random, why mkdir and rm but not echo or touch or the dozens of other system commands we use.

Can we go another direction entirely? How do we remove most/all of these dependencies?

I would love that.

Related https://github.com/flutter/flutter/issues/45278


Benchmarks

I get the following error just doing cargo build.
   Compiling rusty-wam v0.7.6 (file:///tmp/rusty-wam)
error[E0583]: file not found for module `parser`
  --> src/prolog/mod.rs:25:9
   |
25 | pub mod parser;
   |         ^^^^^^
   |
   = help: name the file either parser.rs or parser/mod.rs inside the directory "src/p
rolog"

error: aborting due to previous error

error: Could not compile `rusty-wam`.

Did you download the parser submodule when you cloned the REPL? It should be cloned with the --recursive flag, so that the parser submodule is downloaded, like this:
$> git clone http://github.com/mthom/rusty-wam --recursive

ah, I didn't notice that. Thanks.
BTW, why did you make the parser a submodule?

Good question, haha. No reason, really. I felt some guilt over copying the BinProlog parser source wholesome to get the parser I have, although it's also open source, and copying it is within the terms of its license.  I felt the need to call attention to that by publishing it as a separate git module, I guess?

Ahh I see. I would like to run some benchmarks on rusty-wam, can you suggest any common swi prolog/sicstus benchmarks?

@triska may have some suggestions for benchmark programs, he's the resident Prolog expert. I'm still a dilettante.

I see, I'll look around a little while I wait for Triska's answer. BTW, I have been reading his http://metalevel.at tutorials and they are the best I have found on using prolog properly.

Yeah, he definitely knows his stuff. I've had a lot of fun reading it.

Just found the sicstus benchmarks on their website, I'll try to use them with rusty-wam. https://sicstus.sics.se/performance.html

A few predicates used by the harness (like cputime) aren't supported yet, just so you're aware. There are ways around that in the shell, of course.

hmm. It can't read files yet right?  I'll try piping them through stdin

It can't read files directly yet, that's right.

hmm..I get a run of UnexpectedEOF when I pipe through stdin.....

I'll have a look at that tomorrow. It's getting late.

ok, thanks!

Just for a test, I tried this:
data([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23, 24,25,26,27,28,29,30]).
nreverse([], []).
nreverse([X|L0], L) :- nreverse(L0, L1), concatenate(L1, [X], L).
concatenate([], L, L).
concatenate([X|L1], L2, [X|L3]) :-	concatenate(L1, L2, L3).
?- data(D), nreverse(D,Out).

It fails with false...probably [H|T] is not implemented? I'll play around some more.

Was able to narrow down the problem:
The following succeds as it should:
prolog> c([], L, L).
prolog> ?- c([],[1,2,3],L).
true.
L = [1, 2, 3].

But the following fails:
prolog> c([], L, L).
prolog> c([X|L1], L2, [X|L3]) :-        c(L1, L2, L3).
prolog> ?- c([],[1,2,3],L).
false.

Thank you for the kind words!
The "van Roy" set of benchmarks indeed have long been an important reference point for comparing the performance of Prolog systems. They are also available for SWI-Prolog:
https://github.com/SWI-Prolog/bench
Neng-Fa Zhou, the author of B-Prolog, kindly maintains a comparison of different systems at:
http://www.picat-lang.org/bprolog/performance.htm
These benchmarks are definitely very useful to detect weak spots in your VM. Still, I recommend to not get carried away with optimizing for this particular set of benchmarks: There are much more important improvements such as:

JIT indexing can turn an O(N) lookup in traditional systems into an O(1) lookup
integer constraints can turn permutation sort from an O(N!) algorithm into a polynomial one
tabling can turn a program that does not terminate in traditional systems into a terminating one
attributed variables allow you to turn impure I/O into pure and efficient I/O (phrase_from_file/2)
etc.

None of these aspects is covered in any way by the benchmarks, and if you optimize your VM for this set, you may make it hard or error-prone to implement some of these features.

In order for multi-line inputs to work, they must be contained in braces: :{ / :} for inputs of a single predicate, :{{ \ :}} for multiple predicates, like so:
prolog> :{
c([], L, L).
c([X|L1], L2, [X|L3]) :- c(L1, L2, L3).
}:

With the previous attempt at inputting this predicate, you are in fact giving two distinct definitions of c/3, where the second overwrites the first. This is also what prevents piping a file in from the shell from working.
This convention is temporary until I can begin using rusty-wam from emacs.

@triska  Thank you so much for your answer, very useful! I encourage you to please write more at metalevel.at, I don't think there is anyone writing anything similar to your tutorials, which are so important to use prolog properly.
@mthom thanks for pointing out the ':{ :}' issue, I'll try with that


some tiny cleanups to the driver

I am trying to make this great driver cleaner. I think we can use a config verifier to check all the configs and enforce some optional security checks such as minimum password length (in the case db is not being managed by dev teams).

config setting is better to be checked once a user is calling WithUser.

Thanks!