Add Dataset::maybe_batch for faster database write

[X] I agree to follow the project's code of conduct.
[X] I added an entry to CHANGES.md if knowledge of this change could be valuable to users.

Superseeds #584

@lnicola Sorry for the new pull request. This should be ready now.

Come to think of it, the API I'd really want looks like:
// this will keep track of how many written/updated features there were
let mut tx = ds.batching_transaction(BATCH_SIZE)?;
for row in df {
    let feature = write_feature(&tx, row)?;
}
tx.commit()?;

But I guess that's probably too opinionated.

@lnicola let me put the response to https://github.com/georust/gdal/pull/584#issuecomment-2504727397 here:
The main reason I prefer the closure based API instead of the guard object based API is that the former makes it much clearer to handle error cases.
With

let mut tx = ds.batching_transaction(BATCH_SIZE)?;
for row in df {
    write_feature(&tx, row)?;
}
tx.commit()?;

you can easily end up in a situation where write_feature returns an error and ? bubbles up that error or write_feature just panics. Now you are in a situation where you have a still open transaction that needs to be closed. The common way to do that is to implement a destructor that will close the transaction. This has the rather large problem that you now have no way to communicate to the user if the rollback was actually successful or not as the rollback runs outside their control. In my experience that's the way you end up with dangling transactions in long running applications, which is something that's really hard to debug.

@weiznich I think there might have been misunderstanding about the function of the maybe_transaction. Your suggestion is something that should be implemented instead of the normal Transaction that we have. So we'd call the closure and then act based on it failed or not. But that will probably be a different pull request + breaking changes.
I want to clarify the added function is for speeding up the db writing when it can (using transaction), the reason we are not forcing a transaction is that we don't want the rollback feature for uniformity between database that succeeded on transaction process and those that do not, either way we should write to the database.
So the algorithm is:

Try to start transaction
write to database
if transaction was successful, close it
return the error of the database write

Step 3 is there so that there wouldn't be dangling transaction even if database write fails. But since we don't want rollback, we don't need to check for error/success of writing to database.
And there is no rollback on step 3 or 4, is because if the database didn't support transaction at all, then we couldn't do it anyway. So we can only commit the database for uniformity. Commit failing is a critical error, so maybe we should add more documentation explaining how that will break the uniformity.
@lnicola Yeah, the batch size part seems like something more advanced than needed for now. It might be nice if we could have the ones not supporting transactions also use the batch size somehow. But without that, I think the closure itself is sufficient... unless there is a limit (that people are likely to hit) to the number of transaction you can have without commit.

On the subject of naming, I think I like something with Batch more. The transaction is an implementation detail, and it may or may not exist. But the whole point of this feature is making batching easier.
Regarding the implementation:

I'm not convinced we should call RollbackTransaction after a failed commit, but I've asked on the GDAL mailing list
if CommitTransaction fails and we call RollbackTransaction, even if it fails, I think we should return the original error (that we got on commit)

I agree on the implementation points.
About the name, do you think it's ok to name it batch_operation or something, but without the batch_size parameter? If we are adding the parameter, it'd be nice if there was a way to make it work on non-transaction as well, but I guess that might be hard/not possible.

Same issue with memory leak here. I'm away from keyboard for next 2 hrs so can't squash commits. Please squash commits if you merge.

I'm not convinced we should call RollbackTransaction after a failed commit, but I've asked on the GDAL mailing list

Okay, it looks like we should roll back. Even says that rollback is required in Postgres, which doesn't match my testing (a failing commit seems to abort the transaction), but should be safe enough. Executing rollback outside a transaction warns, but I don't know if GDAL will make some noise about that warning (we'll have to test).

Hmm... We could roll back when a transaction commit fails, but that would break the uniformity. I think we might still have to send error, maybe we need to make it respond with Result<Result<_>> one for transaction commit and another for closure call.
Something like:

GPKG -> transaction on -> closure call (res) -> commit (res2) -> return res2.map(|| res)
JSON -> transaction fail -> closure call (res) -> return Ok(res)

That way lib user can know when transaction was attempted and failed, vs when it wasn't and failed.

Sorry if the previous comment was confusing,
What I mean is suppose we have something like this:
ds.maybe_batch(|d| {
  d.do_sth(....) // succeeds
  d.do_sth_else(...) // fails
})

Now, if we have JSON dataset, then it'll already have changes from first task, but not the second task. We can't rollback it.
But if we have GPKG, my current implementation will commit even when the closure has error, which means it'll have changes from first task but not the second.
Basically having uniformity on both dataset. And if start transaction fails in database that supports it, we are fine, we'll just assume it doesn't and continue. So I don't think there is a need to propagate that error.
But if we rollback when the function fails, then the two cases will have different things in the database.
That's why I was talking about not rolling back. But when the closure runs successfully, but the commit fails, is a situation where once again we will have different results from both side, but we can't help that, but wanting to distinguish it from closure failing, I was talking about maybe returning Result<Result<_>> so the user can handle both case accordingly.

But if we have GPKG, my current implementation will commit even when the closure has error, which means it'll have changes from first task but not the second.

I would expect it to roll back here. I see these as a "best-effort transaction". It will get committed at the end because it doesn't make sense otherwise, if one operation fails, then we try to rollback if possible, otherwise tough luck.
Generally, you can't commit after a failed operation:
postgres=# begin;
BEGIN
Time: 0,126 ms
postgres=# insert into foo values(1);
INSERT 0 1
Time: 0,493 ms
postgres=# insert into foo values(1);
ERROR:  23505: duplicate key value violates unique constraint "foo_uq_id"
DETAIL:  Key (id)=(1) already exists.
SCHEMA NAME:  public
TABLE NAME:  foo
CONSTRAINT NAME:  foo_uq_id
LOCATION:  _bt_check_unique, nbtinsert.c:666
Time: 0,436 ms
postgres=# commit;
ROLLBACK
Time: 0,078 ms
postgres=# select count(*) from foo;
 count
-------
     0
(1 row)

Time: 4,055 ms

See above: even though I ran commit, it was a rollback. So you can't commit after an error.

Moving this from #585

If the driver supports transactions (like GPKG) and StartTransaction fails, I think it's fine to propagate that error to the user. It means something is really wrong and we can't do much about it.

I don't know if there is a case where GPKG will fail to start transaction, but you can still normally write to the dataset. But if there is, then the current implementation will write normally. But if we propagate that error, then we'll error out when we don't need to.
Again, I don't know if that can ever happen. So if you think that's not something we should think about, then I can change this function to propagate the all transaction related errors, and the error from closure.
We can use the Dataset::has_capability here, but I think start transaction also checks for that capability internally, so just assuming it doesn't support on failure seems reasonable to me.

Ooo, thank you for that example. I'll update the code to include rollback in case the closure fails, and propagate that. Should I wait until #585  is merged so that I don't have to rebase again?

But if we propagate that error, then we'll error out when we don't need to.

Really, if starting a transaction is supported, but fails, that's a really bad sign, we should give up.

We can use the Dataset::has_capability here, but I think start transaction also checks for that capability internally, so just assuming it doesn't support on failure seems reasonable to me.

I guess it's not what you're saying, but we should check like this instead:

If starting the transaction fails, will return OGRERR_FAILURE. Datasources which do not support transactions will always return OGRERR_UNSUPPORTED_OPERATION.

Should I wait until https://github.com/georust/gdal/pull/585 is merged so that I don't have to rebase again?

I'll merge #585 soon (I have two more nits, sorry for not noticing earlier), but given OGRERR_UNSUPPORTED_OPERATION I don't think it's actually required here.

This will be what I'll commit once it's merged.
    /// Optionally start a transaction before running `func` for performance
    ///
    /// This uses transaction if the dataset supports it, otherwise it
    /// runs the `func` function as it is on the dataset. If the
    /// closure results in error, and it is a transaction, it is
    /// rolled back.
    pub fn maybe_batch(&mut self, func: impl Fn(&Dataset) -> Result<()>) -> Result<()> {
        let force = 0; // since this is for speed
        let rv = unsafe { gdal_sys::GDALDatasetStartTransaction(self.c_dataset(), force) };
        if rv == OGRErr::OGRERR_UNSUPPORTED_OPERATION {
            func(self)
        } else if rv == OGRErr::OGRERR_NONE {
            let res = func(self);
            if res.is_ok() {
                let rv = unsafe { gdal_sys::GDALDatasetCommitTransaction(self.c_dataset()) };
                if rv != OGRErr::OGRERR_NONE {
                    Err(GdalError::OgrError {
                        err: rv,
                        method_name: "GDALDatasetCommitTransaction",
                    })
                } else {
                    res
                }
            } else {
                let rv = unsafe { gdal_sys::GDALDatasetRollbackTransaction(self.c_dataset()) };
                if rv != OGRErr::OGRERR_NONE {
                    Err(GdalError::OgrError {
                        err: rv,
                        method_name: "GDALDatasetRollbackTransaction",
                    })
                } else {
                    res
                }
            }
        } else {
            // transaction supported but failed
            Err(GdalError::OgrError {
                err: rv,
                method_name: "GDALDatasetStartTransaction",
            })
        }
    }

If func fails, I think we should propagate that error, since it occurred before the rollback.

I made 3 branches in the conditional: transaction not supported, supported and success and supported and failure.
It propagates function fail error in all cases except transaction supported but failed because we don't call the function at all in that case

Thanks for your work on this. I'll be going now, but I'll try to finish #589 tomorrow, then look some more into this.

you can easily end up in a situation where write_feature returns an error and ? bubbles up that error or write_feature just panics. Now you are in a situation where you have a still open transaction that needs to be closed. The common way to do that is to implement a destructor that will close the transaction.

Rollback on drop is what I would expect, yes.

This has the rather large problem that you now have no way to communicate to the user if the rollback was actually successful or not as the rollback runs outside their control.

Indeed, that's a little unfortunate. I think it's similar to how files get closed on drop and you can't be sure if the cached data reached the disk. Even close might fail.
On the other hand, we're looking at an API that's "best-effort transactional".  That's why I prefer a name like run_in_batch instead of maybe_transaction.

In my experience that's the way you end up with dangling transactions in long running applications, which is something that's really hard to debug.

I don't follow. I know why dangling transactions are bad, and how keeping the transaction alive for a long time can lead to that. But a failed rollback is not something you'll see very often. They're usually a network error, which the database will detect and handle correctly. If the rollback itself fails, then the database is borked, and will probably require a manual recovery process. You can't really miss that.
But I can see this as a good argument for introducing one or two Error variants, for:

failed rollbacks
failed rollbacks after the user code reported another failure

Which touches on another potential limitation of this API: the callback must return a our error type, unless we choose to box it.

@lnicola First of all I missed that this is "best-effort transactional" API and not something that needs to ensure this. This relaxes the requirements a bit.

I don't follow. I know why dangling transactions are bad, and how keeping the transaction alive for a long time can lead to that. But a failed rollback is not something you'll see very often. They're usually a network error, which the database will detect and handle correctly. If the rollback itself fails, then the database is borked, and will probably require a manual recovery process. You can't really miss that.

That's mostly correct for synchronous rust. For async rust things become more complex…
End the end the relevant difference in this case is just that you can communicate the rollback error more easily.

Do you think returning Result<Result<_>>  instead of Result<_> would be good idea for this? We can assign one for rollback error and other for commit error + closure error.

The second commit is for the test utility, so I think it's fine to not squash, right?

Instead of variants. Do you think returning Result<Result<>> instead of Result<> would be a good idea for this? We can assign one for rollback error and other for commit error + closure error.

That just makes my head hurt, sorry :upside_down_face:.

No problems. Just suggesting it because we don't have to make another data structure, but yeah readability is not nice. :D

I renamed it to maybe_batch. Do you want it to be maybe_run_in_batch?

r? @jdroenner since this isn't a very clean API.

Ok. Renamed, and added the suggestions. I also redid the commits to make it easier to merge, just in case.

Not really sure what i can add to the discussion. I guess it is a good thing to make it easier to use transactions.
I really like to know what is the use-case for this method?. Are there cases where you do not know if you work with Postgres or Json-files?

Use case: For any user facing applications/API.
Think of a simple application that takes a vector file, does something and writes a vector file. Now we want to give user freedom of writing to any vector file format. While using transaction to speed up the writing process if it supports it. That way user can choose GeoJSON or such if required, but can also choose GPKG and get the benefit of faster write to file.

Are there cases where you do not know if you work with Postgres or Json-files?

Imagine you're writing an ogr2ogr or gdal_polygonize clone. The user can pick any output format, but you still want to do some "optimistic" batching if possible.

func manipulates the &Dataset (which is self), right? Shouldn't the Fn take &mut then?
I'm not really a fan of the design with the closure. In my opinion we could add a type like DatasetTransaction that wraps a dataset. It could implement a trait that Dataset also implements. Then you could do whatever you want in a transaction on the DatasetTransaction object and return the dataset when you are done. If transactions are not supported you can still use the dataset.  This way users still have to handle if transactions are not supported but that might be a good thing.

Shouldn't the Fn take &mut then?

It should. And it probably should be FnMut since we're here.

I'm not really a fan of the design with the closure.

I'm not either, but it's not a bad design (certainly not as bad as quick-xml, ahem).

In my opinion we could add a type like DatasetTransaction that wraps a dataset. It could implement a trait that Dataset also implements.

I think we have that today, but you still need to put your code in a closure (untested):
let do = move |ds: &mut Dataset| -> Result<()> {
    let layer = ds.layer(0)?;
    let feature = ...;
    feature.create(&layer);
};

if let Ok(tx) = dataset.start_transaction {
    do(&mut tx)?;
    tx.commit()?;
} else {
    do(&mut dataset)?;
}

which is what I proposed in https://github.com/georust/gdal/issues/582#issuecomment-2449058740. I don't remember if it actually works or not, but it's not very nice.

I think we have that today, but you still need to put your code in a closure (untested):

That pattern doesn't work because dataset is borrowed as mut on start_transaction and cannot be borrowed again in the else block. Had to use a flag and check that flag to call dataset that doesn't support transaction. That was why #585 was added to make it easier to extract a flag without doing a mut borrow of dataset.
But yeah, we do have Transaction that implements everything Dataset does. This one is optionally a transaction (when supported), we tried the struct API earlier (#584) and decided on using a closure later for cleaner code, and less fight with borrow checker.

Yeah, I suspected this was the case. It works with if let in the 2024 edition, but that's even more annoying to write.

Made the closure FnMut.


Add new phenomena calculation: occultations of bright stars by the Moon

Stars brighter than ~5-6 mags should be filtered by ecliptical latitude (not more than +-6 degrees) and checked for the possible occultation.

See:
XZ star catalog: http://cdsarc.u-strasbg.fr/cgi-bin/Cat?I/201
ZC star catalog http://www.stjarnhimlen.se/zc/
"Stars thar are within 6d 40' of the ecliptic (a region hereafter
called "the Zodiac"), which is as far as the Moon's limb can ever get
as seen from anywhere on the Earth's surface, leaving some margin for
stellar proper motions and change in the obliquity of the ecliptic
over the course of three centuries."


The Hack Strikes Back logo

vectorize

This is amazing.
Can you make "hack" capitalized too?

This logo has been added to the hackEDU dropbox

Can you submit a pull request for it?


Test

Preconditions

[X] Requirements fulfilled
[X] The known issues did not answer my question
[X] The question has not been asked in the past or the answer does not satisfy me
[X] There is currently no other opened issue that matches my question
[X] I cannot find any answer to my question in GitHub discussions

Current Situation
nothing
Logs
[I] Platform: Finished initializing platform: Apple TV Enhanced
nothing [D]

Configuration
{}

Operating System
Mac Os
Operating System: Bits
32-bit
Operating System: Distribution
Mac OS X
Operating System: Distribution Version
X
Docker
yes
Docker Image
homebridge/homebridge
Docker Image Tag
2024-06-20
Homebridge Version
1.8.0
Homebridge Config UI Version
v4.54.2
Homebridge Storage Path
/var/lib/homebridge/
Homebridge Apple TV Enhanced Version
1.4.0
Node Version
v20.14.0
NPM Version
10.0.0
Python Version
3.11.6
PIP Version
11.0
HDMI Hops
yes
Audio Output
no
Same Subnet
yes
Additional Context
No response

/check

/check


Unable to used fine tuned model.

It appears that you should be able to pass in a model ID to openAI API to use a specified fine tuned model:
https://platform.openai.com/docs/api-reference/completions
however:
      this.Model = (string) (model ?? OpenAI.Models.Model.GPT3_5_Turbo);       if (!this.Model.Contains("turbo") && !this.Model.Contains("gpt-4"))         throw new ArgumentException(this.Model + " is not supported", nameof (model));
seems like you must have it named in a particular way. further,
in the createfinetunejobrequest class:
'      this.Model = model ?? "curie";'
I believe model should not be defaulted to null. It should be a required parameter - to name the model for the fine tune request.

This works for me: https://github.com/SyncfusionSuccinctlyE-Books/OpenAI-Succinctly/blob/main/Pages/FineTuningExample.razor
           var api = new OpenAIClient(new OpenAIAuthentication(ApiKey, Organization));

            var objModel = await api.ModelsEndpoint.GetModelDetailsAsync(CompletionModel);

            List<string> StopSequence = new List<string>() { "->", "." };

            var result = await api.CompletionsEndpoint.CreateCompletionAsync(
                CompletionPrompt, maxTokens: 100, echo: false,
                temperature: 0.1, stopSequences: StopSequence, model: objModel);

            foreach (var completion in result.Completions)
            {
                CompletionResponse += completion.Text;
            }

however:
this.Model = (string) (model ?? OpenAI.Models.Model.GPT3_5_Turbo); if (!this.Model.Contains("turbo") && !this.Model.Contains("gpt-4")) throw new ArgumentException(this.Model + " is not supported", nameof (model));
seems like you must have it named in a particular way.

I don't believe you can use fine-tune models for chat anyway. The example you provided above is from the chat end point.

In either case, I'll add a unit test to make sure that fine tune models can be used for the regular completions endpoint just a verify that this is working as expected

Confirmed this is working as expected.

however:
this.Model = (string) (model ?? OpenAI.Models.Model.GPT3_5_Turbo); if (!this.Model.Contains("turbo") && !this.Model.Contains("gpt-4")) throw new ArgumentException(this.Model + " is not supported", nameof (model));
seems like you must have it named in a particular way.

[I don't believe you can use fine-tuned models for chat anyway]

This is what the problem was. I missed this. thank you for the help!


runtime(graphql): contribute vim-graphql core

Contribute the core of my vim-graphql project (ftplugin, indent, syntax) to the Vim project. This replaces the basic ftplugin support that was already in the runtime with a more complete set of filetype settings. I can assume maintainership for all of these files.
I'll continue to maintain the higher-level embedded filetype support separately (in vim-graphql) for now, because it's fairly complex, but we can consider integrating that code directly into vim later.

This contains MIT-licensed code from https://github.com/jparise/vim-graphql that was marked with my own copyright statement. Please let me know if I should declare that in some way in the contributed files. I see that done in a variety of ways across the current runtime files.

Thanks. I think it is fine to include your MIT licensed work with Vim. However, since Vim uses the Vim license (mostly, there are other runtime files that may use different licenses), you may need to either approve here to distribute your work under the Vim license, or should add a license statement to your work (e.g. in a comment) for each of your runtime files please.

thanks!


adding KMeans PyTorch Implementation to cfa model

Description

Provide an implementation to the KMeans clustering algorithm through the PyTorch framework

Fixes # (956)

Changes

[x] Bug fix (non-breaking change which fixes an issue)
[ ] Refactor (non-breaking change which refactors the code base)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

Checklist

[x] My code follows the pre-commit style and check guidelines of this project.
[x] I have performed a self-review of my code
[x] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing tests pass locally with my changes
[ ] I have added a summary of my changes to the CHANGELOG (not for minor changes, docs and tests).

Dear Samet,
thank you for putting such effort into review and feedback,
of course, all of your requested changes are possible and I will start working on them and commit changes ASAP, I will also provide you with the full code/notebook I used for comparison between the two implementations.
in the meantime, I potentially looking to address some other TO-DO issues either were the other two issues in cfa model or issues in other models as well, if that's possible and eligible of course.
Thank you.

Dear @samet-akcay,
please forgive me for the late reply, due to several engagements in the last few days,
here is my full approach to comparing the Kmeans Sklean and PyTorch implementations through silhouette score, which is a metric used to calculate the goodness of a clustering technique. Its value ranges from -1 to 1.
It contains the modifications you asked for, this is a preview, I will commit the changes as required and I may add a running notebook with the following comparison code, if it's not necessary, I will delete it.
Thank you
# Import necessary libraries
import torch
from sklearn.datasets import make_blobs
from sklearn.cluster import KMeans
import numpy as np
from sklearn.metrics import silhouette_score
##sklearn KMeans is imported lately so it's class not be confused with pytorch class

class KMeans:
    def __init__(self, n_clusters: int, max_iter:int = 10):

        """
        Initializes the KMeans object.

        Parameters:
            n_clusters: The number of clusters to create.
            max_iter: The maximum number of iterations to run the algorithm for.
        """
        self.n_clusters = n_clusters
        self.max_iter = max_iter

    def fit(self, X):
        """
        Runs the k-means algorithm on input data X.

        Parameters:
            X: A tensor of shape (N, D) containing the input data.
            N is the number of data points
            D is the dimensionality of the data points.
        """
        N, D = X.shape

        # Initialize centroids randomly from the data points
        centroid_indices = torch.randint(0, N, (self.n_clusters,))
        self.cluster_centers_ = X[centroid_indices]

        # Run the k-means algorithm for max_iter iterations
        for i in range(self.max_iter):
            # Compute the distance between each data point and each centroid
            distances = torch.cdist(X, self.cluster_centers_)

            # Assign each data point to the closest centroid
            self.labels_ = torch.argmin(distances, dim=1)

            # Update the centroids to be the mean of the data points assigned to them
            for j in range(self.n_clusters):
                mask = self.labels_ == j
                if mask.any():
                    self.cluster_centers_[j] = X[mask].mean(dim=0)

        #thise line returns labels and centoids of the results,
        return self.labels_, self.cluster_centers_

    def predict(self, X):
        """
        Assigns each data point in X to its closest centroid.

        Parameters:
            X: A tensor of shape (N, D) containing the input data.

        Returns:
            A tensor of shape (N,) containing the index of the closest centroid for each data point.
        """
        distances = torch.cdist(X, self.cluster_centers_)
        return torch.argmin(distances, dim=1)

# Generate sample data
X, _ = make_blobs(n_samples=1000, centers=5, n_features=10, random_state=42)

X_torch = torch.tensor(X, dtype=torch.float32)

# Set parameters
n_clusters = 3
max_iter = 3000

# Run KMeans using Torch implementation
kmeans_torch = KMeans(n_clusters=n_clusters, max_iter=max_iter)
kmeans_torch.fit(X_torch)

from sklearn.cluster import KMeans
# Run KMeans using scikit-learn implementation
kmeans_sklearn = KMeans(n_clusters=n_clusters, max_iter=max_iter)
kmeans_sklearn.fit(X)

sklearn_labels = kmeans_sklearn.labels_
pytorch_labels = kmeans_torch.labels_

sklearn_centers = kmeans_sklearn.cluster_centers_
pytorch_centers = kmeans_torch.cluster_centers_

# Check that the results are the same
print("Scikit-learn centroids:\n", sklearn_centers)
print("Torch centroids:\n", pytorch_centers)

print("Scikit-learn labels:\n", sklearn_labels)
print("Torch labels:\n", pytorch_labels)

import numpy as np
from sklearn.metrics import silhouette_score

# Calculate the silhouette score
silhouette_sklearn = silhouette_score(X, sklearn_labels)

# Calculate the silhouette score
silhouette_torch = silhouette_score(X_torch, pytorch_labels)

# Print the comparison results
print(f"Silhouette score for Sklearn: {silhouette_sklearn}")
print(f"Silhouette score for Pytorch: {silhouette_torch}")

@samet-akcay, I wanted to ask if this to-do task, TODO: Replace this with the new torchfx feature extractor has already been done, because I am willing to continue with the rest of them in the same CFA implementation.
As far as I know, create_feature_extractor () is the new fx feature extractor.

@samet-akcay, if it's already been done, I may contribute to this task, # TODO: Automatically infer the number of dims.

@samet-akcay, I wanted to ask if this to-do task, TODO: Replace this with the new torchfx feature extractor has already been done? because I am willing to continue with the rest of them in the same CFA implementation.
As far as I know, create_feature_extractor() is the new fx feature extractor.

@ashwinvaidya17, can you help here to show how @aadhamm can utilize the new feature extractor for the cfa model

@samet-akcay, I wanted to ask if this to-do task, TODO: Replace this with the new torchfx feature extractor has already been done? because I am willing to continue with the rest of them in the same CFA implementation.
As far as I know, create_feature_extractor() is the new fx feature extractor.

You can have a look here to see how it is done. You can adapt your code to call this class. https://github.com/openvinotoolkit/anomalib/blob/4fe6c7457354f18d95f64fc4f81775836628c9ba/src/anomalib/models/csflow/torch_model.py#L475-L476
If you still have any questions then feel free to ask

@ashwinvaidya17 Thank you for your detailed review, I will work on all the required changes and update you as soon as possible and yes, you are right, there are variables that could be reduced as it will work best for codacy tests.

@samet-akcay @ashwinvaidya17 Hello everyone, I have made the required changes and addressed issues by codacy.
If you could take a look and give me your feedback I will appreciate it a lot.
Thank you.

@samet-akcay @ashwinvaidya17 Hello, everyone i have done the required changes and all the checks have passed, if you could take a look and see if it is ready to merge or not yet.
Thank you.


Remove delr/delc from dataset

I propose to remove delr and delc from the dataset entirely. Logic to determine delr/delc will be a separate function that can be called when necessary. Delr and delc are easy to compute from x and y, plus the extent.
The advantage of this change is that caching becomes cleaner (since we don't need to keep track of delr/delc if they are used in the computations for obtaining datasets). It also simplifies code because we don't have to check whether delr/delc are present in either the attributes or data variables.

[x] Fix all TODOS related to this, marked with TODO: * delr/delc *

Addressed by #346


[SMALLFIX] [branch-1.3] Improve error message and docs

for adding alluxio client jar in HADOOP classpath.

@apc999 @calvinjia

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/11651/Failed Tests: 1org.alluxio:alluxio-tests: 1alluxio.security.ClusterInitializationTest.startCluster
Test FAILed.

Merged build finished. Test FAILed.

Jenkins, test this please

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/11652/
Test PASSed.

Merged build finished. Test PASSed.


Sidebar doesn't work

I use this code in my registered loginListener to create a sidebar:
Sidebar sidebar = new Sidebar(Component.text("aaa"));
sidebar.createLine(new Sidebar.ScoreboardLine("some_line_0", Component.text("test"), 0));
sidebar.updateLineScore("some_line_0", 1);
sidebar.addViewer(player);
But it doesnt show up to player. (Yes the player object is valid)

If you set the sidebar before Player#isActive() returns true it won't work.
Not sure if this is intended/unavoidable or if it's a bug.

The player is not yet in the world when PlayerLoginEvent is fired, so the required scoreboard packets are not going to be received. Try using PlayerSpawnEvent instead, that should work.

Thanks both methods work thanks :)


Ignore raining gold on trash mobs late-game

Probably anything past level 1500 (or 10 railgun + 10 mouse button + 20 elemental damage levels) isn't worth switching to the raining gold lane unless Max Elemental Damage is also active.  Prioritizing quick group levels by focusing on users' elemental spec will yield far more gold on bosses than anything one could gather from trash lane gold clicks.

Nix the level thing.  Maybe wait 10 hours instead.

I vote for a level thing

No longer necessary.


switch to standard relay creation for kafka usage

Also fixes relays usage in kafka scenario in develop

Is there any documentation to adjust?

no, it's a transparent change for the user


Local scopes not detected

Larastan Version: 0.6.4
--level used: default

Description
Local scopes using Spatie model states package fail.
Call to an undefined method Illuminate\Database\Eloquent\Collection<App\Models\User>::reported()
Here's how the scope is defined within the User model:
public function scopeReported($query)
{
    return $query->whereState('status', Reported::class);
}

The scope is referenced in this way:
$reported_users = $thread->users->reported()->count();

where the thread model hasMany users

Are you sure that code actually works?
The error looks correct. You should use $thread->users()->reported()->count()

I tried with and without brackets (users() and users). I'll investigate further. Thanks

If you still have issues please try the new release https://github.com/nunomaduro/larastan/releases/tag/v0.6.7 And after that if you still have issues please open a new issue.


AttributeError: module 'numpy' has no attribute 'bool'.

when run sample testing command:
python remove_anything.py
--input_img ./example/remove-anything/dog.jpg
--coords_type key_in
--point_coords 200 450
--point_labels 1
--dilate_kernel_size 15
--output_dir ./results
--sam_model_type "vit_h"
--sam_ckpt ./pretrained_models/sam_vit_h_4b8939.pth
--lama_config ./lama/configs/prediction/default.yaml
--lama_ckpt ./pretrained_models/big-lama
encountered the error message below and aborted, does someonen know how to resolve ?
AttributeError: module 'numpy' has no attribute 'bool'.
np.bool was a deprecated alias for the builtin bool. To avoid this error in existing code, use bool by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.bool_ here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

According to your numpy version, can you use np.bool_ to replace np.bool?

Downgrade the numpy version. use Numpy 1.20 work fine with me.
pip install numpy==1.22


Create codeql.yml

Could you explain what this is and why we would want it?

Looks like a spam account TBH. Reported.


Support for fault injection

For the purposes of resilience testing, the sidecar needs to be able to inject faults into the outbound API calls made by a microservice. Abort, delay and mangle are the three fault primitives that are needed. These primitives kick in before the load balancing stage.
Can these be implemented as TCP/HTTP filters (netfilter style)?
At minimum 2 types of faults are needed to construct elaborate failure scenarios across the application: (abort HTTP requests by returning with different error codes/terminate TCP connection, delay HTTP requests by specified duration). Fault injection should be scoped to a particular subset of requests (e.g., ones with a specific HTTP header or a particular cluster).
[as a wish list, being able to slow down a TCP pipe bandwidth would be cool].

This is on the roadmap. Would also love to see this happen.

Closing this out we can open new issues for specific feature requests that come up.


Game crashes since updating to 9.0.1

Describe the bug
Since I updated to version 9.0.1 when entering the portal for the vault the game freezes then either takes a very long time to start or the game crashes. When I do get into the vault it laggy and randomy crashes with a out of memory error.
Desktop (please complete the following information):
OS & version [e.g. Windows 10, 1822]:
Windows 11
MSFT Build of OpenJDK Version:
The output from java --version
1.18.2
To Reproduce:
Steps to reproduce the behavior:

Try to enter vault
If game doesn't crash play till crash.

Expected behavior
A clear and concise description of what you expected to happen.
Game shouldn't crash
Screenshots, Logs etc
If applicable, add screenshots, logs to help explain your problem.

Additional context
Add any other context about the problem here.
No but except for the crashing I'm loving the new update.

Never mind. Think I found the issue. The allocated memory in Curseforge reset after the update. I turned it back to 8192 and seems to be fine now. Sorry

I did recently updated to _<IP_ADDRESS>a and since then, every time I try to launch, I recieve an Exit-Code 1 with this crash-report attached:
hs_err_pid10304.log
I suppose there is a problem with the runtime.
OS: Win 10 64 bit
Mc Version: 1.19.4

Curseforge is a mod. Please refer to their forum.


SAK-31692 - Upgrade Sakai to Spring 4.2 (4.2.7 currently available)

LGTM

Build failure looks related.

Thanks Matthew, looks like there's this one test that's still using a deprecated class I missed, I'll update it.

Okay, two tests, but it's all passing locally now, lets see what travis thinks!

Right on. Thanks @jonespm


Added AWS_MIN/AWS_MAX

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

I believe clang-tidy might even warn when using such code. The commit message doesn't provide any justification so let me ask the question: why is it desirable to have such macros introduced?

Actually, nevermind, discussed with team offline.


Error when running compel-demo-sdxl.py example

I've attempted to run the compel-demo-sdxl.py script, but after the pipeline components are all loaded it fails with this traceback:
Traceback (most recent call last):
  File "/home/yegor/git/compel/compel-demo-sdxl.py", line 56, in <module>
    images = run_and_batched()
  File "/home/yegor/git/compel/compel-demo-sdxl.py", line 43, in run_and_batched
    embeds, pooled = compel([pp, np])
  File "/home/yegor/git/compel/venv/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "/home/yegor/git/compel/venv/lib/python3.10/site-packages/compel/compel.py", line 141, in __call__
    cond_tensor = self.pad_conditioning_tensors_to_same_length(conditionings=cond_tensor)
  File "/home/yegor/git/compel/venv/lib/python3.10/site-packages/compel/compel.py", line 260, in pad_conditioning_tensors_to_same_length
    return type(self)._pad_conditioning_tensors_to_same_length(conditionings, emptystring_conditioning=emptystring_conditioning)
  File "/home/yegor/git/compel/venv/lib/python3.10/site-packages/compel/compel.py", line 227, in _pad_conditioning_tensors_to_same_length
    raise ValueError(f"All conditioning tensors must have the same batch size ({c0_shape[0]}) and number of embeddings per token ({c0_shape[1]})")
ValueError: All conditioning tensors must have the same batch size (1) and number of embeddings per token (77)```

Please ignore, was using pip3 install version of compel instead of compel cloned from the git repo.


Exception while using template-strings in a decorator

Bug Report or Feature Request (mark with an x)
- [x] bug report -> please search issues before submitting
- [ ] feature request

Versions.

Angular CLI: 1.5.0
Node: 6.11.0
OS: darwin x64
Angular: 5.0.1
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

@angular/cli: 1.5.0
@angular-devkit/build-optimizer: 0.0.32
@angular-devkit/core: 0.0.20
@angular-devkit/schematics: 0.0.35
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.8.0
@schematics/angular: 0.1.2
typescript: 2.6.1
webpack: 3.8.1

Repro steps.

This is a follow-up from here.
Using template-strings to define a templateUrl and styleUrls.
A valid example would be, to have an variable which contains a value that can be consumed as  part of the templateUrl and the styleUrls together.
By doing this, while running ng serve an exception occure that the requested resources can not be found.
In the exception can also the RAW template-strings be found, and not the finally constructed.
You can find a example repos here: https://github.com/thomassittig/angular5-string-interpolation-error.
Minimal reproduction steps:

create a blank new out of the box angular 5 project
go to the app/app.component.ts
create a variable called name with the value app
change the styleUrls to [./${name}.component.css]
re-run the app with ng serve

Full Example:
import { Component } from '@angular/core';

const name = 'app';

@Component({
  selector: 'app-root',
  templateUrl: `./${name}.component.html`,
  styleUrls: [`./${name}.component.css`]
})
export class AppComponent {
  title = 'app';
}

The log given by the failure.

Desired functionality.

All is fine and the constructed string-values are accepted and the resources can be found
Mention any other details that might be useful.

Small update: this issue still occures in the current, freshly released, 1.6 version.

I'm sorry but this is something we will not support. Those paths need to be statically analyzable, and while that is possible in your very simple example we can't ensure it will for more complex scenarios.

@filipesilva understandable. but it was working before the v1.5 release. And so in my simple mind you ensured that this worked before. or was it a simple coincidence?

I have no idea how it worked before 1.5 really. @hansl was this supported in the old plugin? (we changed compilation pipelines between 1.4 and 1.5).


[TS] Input accessibility + designer open sample dialog fixes

Related Issue

Fixes https://github.com/microsoft/AdaptiveCards/issues/4238
Fixes https://github.com/microsoft/AdaptiveCards/issues/4236
Fixes https://github.com/microsoft/AdaptiveCards/issues/4230
Fixes https://github.com/microsoft/AdaptiveCards/issues/4244

Description
With this PR:

Input.ChoiceSet in multiselect or expanded mode

Correctly focused after failing validation
Labels and error correctly read by narrator

Input.Toggle

Correctly focused after failing validation
Labels and error correctly read by narrator

Input.Number

min and max are now correctly handled even when set to 0

Designer

Open sample dialog will now open several times in a row even when one of the samples in the catalogue fails to load

How Verified
Verified manually in adaptivecards-designer-app
Microsoft Reviewers: Open in CodeFlow

"@babel/runtime-corejs3": {

Curious - what's this dependency change about again?

Refers to: source/nodejs/package-lock.json:353 in defc206. [](commit_id = defc2065b5bebf5d02dfb18f9f3aefa8ca3628a7, deletion_comment = False)

            this._renderedInputControlElement.setAttribute("aria-labelledby", labelIds.join(" "));

Just to confirm for explicit labels for the input elements, we prefer to use aria-labelledby tags and not the converse (ie aria-label defined on the actual label element itself) correct?

Refers to: source/nodejs/adaptivecards/src/card-elements.ts:2373 in defc206. [](commit_id = defc2065b5bebf5d02dfb18f9f3aefa8ca3628a7, deletion_comment = False)


[FluentSystemIcon] Adding a new lib with all FluentUI icons

FluentSystemIcon
This new component will replace the FluentIcon (in the next PR), to have the possibility to use the FluentUI.Icons lib. Same for FluentEmoji component

A new solution src\Icons\FluentUI.Icons.sln contains these new projects.

<FluentSystemIcon Icon="@(Icons.Regular.Size24.Save)" />
<FluentSystemIcon<EMAIL_ADDRESS>Color="Color.Custom" CustomColor="red" Width="12px;" />
<FluentSystemIcon Value="@(Icon.FromImageUrl("/Blazor.png"))" />

<FluentSystemEmoji Emoji="@(Emojis.PeopleBody.Color.Default.Artist)" />

I updated the Solution with sub-folder and 2 new projects: the FluentUI.Icons lib and the Icons Generator (see below).

FluentUI Icons & Emoji's Generator
How to generate FluentUI Icons classes
This application generates FluentUI Icons from SVG images
from the official website https://github.com/microsoft/fluentui-system-icons
To generate the icons, you need:

Download SVG images in a local folder (ex. C:\Temp) from the official NPM repo, using this command.
npm install @fluentui/svg-icons

a) Compile the project and run the FluentUIIconsGenerator.exe application,
passing the Assets path to this local folder containing the SVG images as a parameter.
```cmd
FluentUIIconsGenerator.exe --Assets=C:\Temp\Icons --Target=./Samples --Library=Icon
```

b) Or run the project, passing parameters to the Properties/launchSettings.json file:
```json
{
   "profiles": {
 	"Microsoft.Fast.Components.FluentUI.IconsGenerator": {
 	  "commandName": "Project",
 	  "commandLineArgs": "--Assets=C:/Temp/Icons --Target=./Samples --Library=Icon"
 	}
   }
 }
```

All generated C# files are located in the Target folder, or in the current folder if this attribute has not been defined.

How to generate FluentUI Emoji classes

Download the repository.
git clone https://github.com/microsoft/fluentui-emoji

a) Compile the project and run the FluentUIIconsGenerator.exe application,
passing the Assets path to this local folder containing the SVG images as a parameter.
```cmd
FluentUIIconsGenerator.exe --Assets=C:\Temp\Emojis --Target=./Samples --Library=Emoji
```

b) Or run the project, passing parameters to the Properties/launchSettings.json file:
```json
{
   "profiles": {
 	"Microsoft.Fast.Components.FluentUI.IconsGenerator": {
 	  "commandName": "Project",
 	  "commandLineArgs": "--Assets=C:/Temp/Icons --Target=./Samples --Library=Emoji"
 	}
   }
 }
```

Help
Run the application with the --help parameter to see all available parameters.
> FluentUIIconsGenerator.exe --help

  FluentIconsGenerator --folder:<Icons_Folder_Directory>

  --Assets    | -a   The root directory containing all SVG icons,
                     downloaded from https://github.com/microsoft/fluentui-system-icons.
                     If not specified, the current working directory will be used.

  --Library   | -l   The type of library to generate: icon or emoji.
                     If not specified, "icon" will be used.

  --Namespace | -ns  The namespace used for generated classes.
                     If not specified, "Microsoft.Fast.Components.FluentUI" will be used.

  --Names     | -n   The list of icon names to generate, separated by coma.
                     Example of icons: accessibility_32_filled,add_circle_20_filled
                     Example of emojis: accordion_flat,ambulance_high_contrast
                     By default: all icons

  --Sizes     | -s   The list of icon sizes to generate, separated by coma.
                     Example: 12,24. By default: all sizes
                     (Not available for emoji library)

  --Target    | -t   The target directory where C# classes will be created.
                     If not specified, the current working directory will be used.

  --Help      | -h   Display this documentation.

Yes. Maybe the ReadMe files must be more detailed.
It's not possible to install the Emoji or Icon lib without the Core lib. The reference us already there and I'm using the Icon/Emoji class defined in the Core lib.

Is there an issue number of this that explains the problem + proposed solution?


Update the streamup.com plugin

If the stream is down, the stream url gives a 404. How should I handle the error?

I second this request, my grandma down in Alabama uses it to watch Japanese tv

Thanks!


Trim EditText input.

Summary:
If the user mistypes a linefeed or a whitespaces by the end of the text input,
no acronym is found. Thus these extra characteres should be removed.

Thanks Joao!
Doug


Car Image Bug

Much better but I still have some without image.
Is it a blank one or a pb in the DB?

Much better but I still have some without image.
Is it a blank one or a pb in the DB?

Much better but I still have some without image.
Is it a blank one or a pb in the DB?

I think it's a problem in the DB since I have it resolved in my local machine with the same cars:

Much better but I still have some without image.
Is it a blank one or a pb in the DB?

I think it's a problem in the DB since I have it resolved in my local machine with the same cars:

Have you imported the latest prod DB content?
We can test in the QA also, no problem.

Have you imported the latest prod DB content?
We can test in the QA also, no problem.

Have you imported the latest prod DB content?
We can test in the QA also, no problem.

Sorry my bad!
I had not synchronized your backend's PR due to a repo filtering in ZenHub.
It works indeed perfectly!

No problem,
Great :)

Have you imported the latest prod DB content?
We can test in the QA also, no problem.

Sorry my bad!
I had not synchronized your backend's PR due to a repo filtering in ZenHub.
It works indeed perfectly!

No problem,
Great :)

While checking this functionality I came across this. It seems weird to me that there are pictures in the Pictures tab but no picture in the main tab. Is this normal ?

While checking this functionality I came across this. It seems weird to me that there are pictures in the Pictures tab but no picture in the main tab. Is this normal ?

While checking this functionality I came across this. It seems weird to me that there are pictures in the Pictures tab but no picture in the main tab. Is this normal ?

It's fixed in this issue.

While checking this functionality I came across this. It seems weird to me that there are pictures in the Pictures tab but no picture in the main tab. Is this normal ?

It's fixed in this issue.

@mahdibenromdhane
Well the problem still seems to exist on the test tenant at least.

@mahdibenromdhane
Well the problem still seems to exist on the test tenant at least.

@mahdibenromdhane
Well the problem still seems to exist on the test tenant at least.

Because it's in Pending for QA deployment

@mahdibenromdhane
Well the problem still seems to exist on the test tenant at least.

Because it's in Pending for QA deployment

@mahdibenromdhane
Yes sorry, I was seeing the issue in the QA column, my bad.
So anyway, concerning this issue, it is tested and works as intended.
I'll close this one

@mahdibenromdhane
Yes sorry, I was seeing the issue in the QA column, my bad.
So anyway, concerning this issue, it is tested and works as intended.
I'll close this one


Do not publish flow-typed directory to npm

After installing snapshot-diff webstorm gone crazy and things that jest functions belongs to snapshot-diff

Oops. Thank you!


bbgm Females

Hello, i don't know if you know who i am, but my name on reddit is u/sscZERO and Goose #3235 on discord. I have been talking to dumbmatter about the possible future of adding in females to bbgm. And i asked who i could talk to about the faces, and he directed me here. Please lmk what you can do, and if you have a discord, please do dm me on there, as i am not very active on github.

Hey @sscZEROlive, this is pretty intriguing to me, and I'm going to do some thinking on this over the next few days. I understand it would require a good amount of effort to implement both here and in bball-gm, but could be cool to have the faces produced.
Would love any further brainstorming from you or others on the topic.
Just general thoughts:

Need typical female hair. In recent facesjs updates some folks added long hair, which is a great start
What other types of hair exist?  Maybe slimmer?

 I just want to say... if somebody gives me a PR to make decent female faces, I will add an option in all my games to have women's leagues.

Thinking about this again. I'm thinking there will need to be a few changes to the codebase which I'll start brainstorming below, and start in a branch off of a fork I made.

Need to have gender passed in to the generate() function

Perhaps if no gender provided, default to male
I might need help from someone smarter than me to break down proper verbiage... gender vs sex, male vs female vs other, not sure yet.

If female, generate with the following conditions:

Always blank out facial hair & "shave" attributes
Maybe exclude body shape body2 & body3? A little bit bulkier, but that may not be mutually exclusive
Exclude some of the sharper jaw lines? Like head3
Should we narrow down to some of the smaller eyebrows?
Only allow some hair types

cornrows
emo?
longHair
afro
shortBangs
could short2 be viewed as someone having the hair pulled back into a pony tail? Might need to adjust it slightly

Add some hair types, but don't need to have a ton initially:

Basic pigtails
Shoulder-length hair, slightly longer than 'longHair'

@dumbmatter with some of these constraints, I might want your thoughts on how to best implement. A few further thoughts:

The getID() function is elegant and 'dumb' right now (in a good way!), such that every element is just as likely to be chosen as another
This is an issue for ladies, as there are a few hairstyles and other than may be male-only attributes
We can add logic to getID, where we swap body/hair/etc ids if female vs male. This would work, but would complicate getID as we would need to pass in additional info to the function, rather than just type
OR, we add logic to the inline generate functions, like seen here. Could also work, but would push some of these ternary operators into high complexity
Last idea, and this is a somewhat major divergence in current generate() architecture, is to keep some sort of index/lookup of different svg options, and allow to narrow down to a smaller set based on attributes like gender (or maybe age too?)

This could be a dictionary of attribute types (eyes/body/hair/etc), which you can then filter by gender, and then maybe even keep probability as well. But that could be added later on too
Downside here is that this index/dictionary would need to be kept up to date anytime a new svg is added
Would also slow down performance a tad

We'll need to get some people's opinions on the outcome. For instance, if a user sees the picture below, will they automatically think "oh yeah this is a women's league"?

I just discovered the svgs-index.ts file, that simplifies some of this :)

I am back to the forum! I was thinking, what if we kept the current avatar style but we change the shape of the body and the different options to be more feminine?

Thinking about this again. I'm thinking there will need to be a few changes to the codebase which I'll start brainstorming below, and start in a branch off of a fork I made.

Need to have gender passed in to the generate() function

Perhaps if no gender provided, default to male
I might need help from someone smarter than me to break down proper verbiage... gender vs sex, male vs female vs other, not sure yet.

If female, generate with the following conditions:

Always blank out facial hair & "shave" attributes

Maybe exclude body shape body2 & body3? A little bit bulkier, but that may not be mutually exclusive

Exclude some of the sharper jaw lines? Like head3

Should we narrow down to some of the smaller eyebrows?

Only allow some hair types

cornrows
emo?
longHair
afro
shortBangs
could short2 be viewed as someone having the hair pulled back into a pony tail? Might need to adjust it slightly

Add some hair types, but don't need to have a ton initially:

Basic pigtails
Shoulder-length hair, slightly longer than 'longHair'

@dumbmatter with some of these constraints, I might want your thoughts on how to best implement. A few further thoughts:

The getID() function is elegant and 'dumb' right now (in a good way!), such that every element is just as likely to be chosen as another

This is an issue for ladies, as there are a few hairstyles and other than may be male-only attributes

We can add logic to getID, where we swap body/hair/etc ids if female vs male. This would work, but would complicate getID as we would need to pass in additional info to the function, rather than just type

OR, we add logic to the inline generate functions, like seen here. Could also work, but would push some of these ternary operators into high complexity

Last idea, and this is a somewhat major divergence in current generate() architecture, is to keep some sort of index/lookup of different svg options, and allow to narrow down to a smaller set based on attributes like gender (or maybe age too?)

This could be a dictionary of attribute types (eyes/body/hair/etc), which you can then filter by gender, and then maybe even keep probability as well. But that could be added later on too
Downside here is that this index/dictionary would need to be kept up to date anytime a new svg is added
Would also slow down performance a tad

We'll need to get some people's opinions on the outcome. For instance, if a user sees the picture below, will they automatically think "oh yeah this is a women's league"?

This is absolutely brilliant my guy!

I've tried re-visiting this a number of times, but I'm not artistically talented enough to make it happen. If anyone is interested in giving it a shot, I'd be happy to chat through some of my previously commented brainstorming!

Very neat Library but I don't think converting males to females is the way to go. There needs to be two separate forks dedicated to gender then combined back into one master library. Then maybe introduce a plugin system that let's you create custom genders. This is frankly a hugely critical feature to make this library useful to anything outside of a very narrow use case.


Validation failure of space-delimited string of Scopes

I'm running into the following "Predicate failed" error, while attempting to validate / decode a Scope of "email profile" included in the client credentials grant access token returned from my identity service. I'm also getting the same error when attempting to define the same scope when instantiating the SttpOauth2ClientCredentialsFutureBackend

I believe the error is being thrown from here:
https://github.com/ocadotechnology/sttp-oauth2/blob/63fe2b0d0a0328a7bfd884a8dff1eb7d7186e438/oauth2/src/main/scala/com/ocadotechnology/sttp/oauth2/common.scala#L25-L30
According to the OAuth 2.0 spec a space-delimited, case-sensitive string is a valid value.
Is there possibly an issue with the validation?
I'm using 0.11 of your library. Thanks.

Hi, thank you for reporting the issue. I can confirm it looks like our model doesn't accept scope with spaces. The original intention was to use Scope as a representation of singe entry. When client requests scopes we'd use scopes: Set[Scope] and provide those separately.
I guess that since some systems use strings with multiple entries, and others would return a list of strings, we can change the regex to allow spaces. This should just be a matter of adjusting the scopeRegex.

@CharlesMThomas fixed in https://github.com/ocadotechnology/sttp-oauth2/releases/tag/v0.11.1


Require credentials by default

The spec(?)/cnab-go(?) changed at the last minute to make credentials optional. This is super confusing IMO and I think we should consider flipping this in Porter to having them be required by default, or do something to warn people.
Otherwise this is what happens:

Jeremy gives Carolyn a bundle that requires credentials.
Carolyn starts making the credentials by exporting env vars. She gets distracted and stops in the middle.
She runs the bundle and doesn't specify --cred, or she does specify but only half of the creds are defined.
THERE IS NO WARNING. The bundle just fails in odd places with unexpected errors because the bundle was written assuming credentials would be there, and they aren't.
Carolyn is confused because she thought she defined creds but nothing in Porter is warning her because "TADA! According to the spec, they are optional now".

Everyone intended for them to be required. Their mere presence looks like they are really needed, but sneakily they are optional.
I think they should be required by default, and if an author wants them optional, they should need to say that explicitly in the credential definition. We should also think about how to warn about missing optional credentials, so people at least realize that they could have supplied something and didn't.

The following changes need to be made:

Add a custom UnmarshalYAML function for CredentialDefinition and set required to true.
See this comment for advice and sample code on how to accomplish this with the yaml encoder.
Add a test to manifest_test.go

Hello @carolynvs , I want to give this a shot

@AGMETEOR Go for it! 👍 If you run into trouble, feel free to open a draft pull request with your progress and ask questions there.

Closed by https://github.com/deislabs/porter/pull/657 👏 @AGMETEOR


Avoid use of InStream and AtomicInteger  for loops

Actually, there are a couple of things I need to check

It should be fine

@gavinking This should be an improvement because now we don't need the AtomicInteger nor the InStream.

(Should clarify that with trampoline it's not literally a longer chain, but I'm supposing it still has some sort of cost compared to filtering out the noops upfront.)

I've just realized that I can pass the filter as a function, this way the call chain won't get affected. I will have another look at this tomorrow.

I think I have a nicer solution now and I will send a new PR shortly.
Thanks a lot for the feedback!


feat: Integrate sessions into MFA

What kind of change does this PR introduce?
Introduces the 1FA requirement but not the corresponding modifications to generateAccessToken which will allow user to bypass it.

Closing as we're changing our recovery code implementation and not adding a /login route


Autocomplete for user/role assigning

Background:
https://trello.com/c/eWwxVWZP/98-autocomplete-for-user-role-assigning
Solution:

Added select2 to the project. In this way, we get searchable dropdowns and consistency across diffrent browsers in look and feel.

 Autocomplete for user/role assigning


How can I generate 5-frame snippet from full trajectory data?

Hello,
Can you share the exact way to get 5-frame snippet data from full trajectory to evaluate the method? (quarternion computation and/or quaternion to rotation matrix ..)

you can get the data for KITTI here, images and ground truth :
http://www.cvlibs.net/datasets/kitti/eval_odometry.php
Once you get it, you must run the data code, with option 'kitti_odom'
Finally, you can follow instructions at the end of the README.md :
python test_kitti_pose.py --test_seq [sequence_id] --dataset_dir /path/to/KITTI/odometry/set/ --output_dir /path/to/output/directory/ --ckpt_file /path/to/pre-trained/model/file/
to generate predictions and then
python kitti_eval/eval_pose.py --gtruth_dir=/directory/of/groundtruth/trajectory/files/ --pred_dir=/path/to/output/directory/
to evaluate them
If you wonder where quaternion to matrix is done, it's here

Thank you for your kind response.
What I was curious about is actually how to generate pose snippets from full trajectory.
As you mentioned in README.md, I downloaded pose evaluation data from following script ;
./kitti_eval/download_kitti_pose_eval_data.sh
After that, some ground poses are downloaded like
09_full.txt, 10_full.txt, and corresponding snippet data from 000000.txt to 001586.txt (for 09)
I wonder how to generate those files to evaluate this method for entire KITTI and/or other odometry data.

you generate the pose predictions with the code test_kitti_pose.py
you evaluate them with kitti_eval/eval_pose.py
Downloading the predictions is just bypassing the first code (test_kitti_pose.py), but you can run it with your own trained network.

How do you do the same for the output of ORB-SLAM? Since ORB-SLAM only outputs the Keyframes, how is the snippet selected and associated?


[Semantics] Parse the AST into a semantically valid structure

Code coverage low score! Will add testing soon too


SWIFT : Truthy for Array/Strings and Dictionaries

Currently the truthiness of string, arrays and dictionaries in the swift lib are bound to the content as you see here:
case let .String(string):
return !string.isEmpty
case let .Array(array):
return !array.isEmpty
case .Dictionary(dictionary):
return !dictionary!.isEmpty
In the case of empty/null its false. What is the correct behavior? Should it be false across all implementations only in the case of null, or in the case of null and empty, or in case of empty truthy?
E.g. for "!": [] or "!":{}

Agree that an empty array should be falsy: see Pull Request #18
Let's discuss about truthiness of “empty” objects {}.


Use OrdinaryDiffEqRosenbrock.jl

This should make precompile times faster and everything more lightweight.

Downgrade fails on Julia v1.10 due to some Aqua.jl issues. Just switching to Julia v1.11.


Refactor spo web roleassignment add to use util instead of calling other command, Closes #5310

Closes #5310

Thanks for another awesome PR 💪👍. You are on 🔥 also today. We will review it ASAP, but please be patient 🙏, I think the amount of open PRs supposed us a bit and we all do have other activities besides reviewing

setting to draft due to the following observations
I will provide more guidance how we should proceed with this PR in near future


[EPIC] LBP 2.0

[ ] LBP Homepage or dashboard
[ ] Details page for specific LBP
[ ] Buy modal for participating in LBP

To be implemented by omniflix team


[PAGE] Create initial Cyborg Guide page

Create initial Cyborg Guide page based on this wireframe.
Concerns

the vertical line is not well aligned and responsive (help here would be appreciated <3 )
haven't implemented a scroll animation through levels

Merging this PR. Added a card to the Trello board to address the issues: https://trello.com/c/wtwbrGDV/216-page-improve-cyborg-journey-page


[BUG] The XML file of Thermostat User Interface Configuration Cluster has errors

Reproduction steps
check the xml file : https://github.com/project-chip/connectedhomeip/blob/v<IP_ADDRESS>/src/app/zap-templates/zcl/data-model/chip/thermostat-user-interface-configuration-cluster.xml

0x0000 attribute has default error

The specifications (1.0 and 1.2) describe as below

The data type of the parameter in 0x0002 Attribute is wrong

The specifications (1.0 and 1.2) describe as below

Bug prevalence
each time
GitHub hash of the SDK that was being used
561d23d0db215a99705ff0696e73853c8edf11b2
Platform
other
Platform Version(s)
v<IP_ADDRESS> and v1.0.0
Anything else?
No response

but the data type of ScheduleProgrammingVisibilityEnum will be ignored ?

@Agatha2333 I'm not sure what you are asking here.  What will be ignored by what entity?


Custom transport socket failure reasons

The error messages returned by BoringSSL are often fairly vague, making it hard to debug TLS issues. For specific deployments it would likely be possible for operators to be able to better describe the failure.
For example, if given access to the TLS context (CA/local cert used), the peer cert and the BoringSSL failure string, a few lines of code might be sufficient to provide a better error message, e.g. something like  "staging peer cert cannot be used with production CA".
I imagine this could be implemented as a list of error details providers that could be configured as part of the tls context, allowing for statically registered implementations.
cc @lizan

Sounds reasonable, we have a couple of verification callback, so we can extract more information from there.


Config for homebridge-rainbird
"name": "RainBird",
    "devices": [
        {
            "ipaddress":
            "password":
            "external": false,
            "showRainSensor": true,
            "showValveSensor": true,
            "showProgramASwitch": true,
            "showProgramBSwitch": true,
            "showStopIrrigationSwitch": true,
            "showZoneValve": true,
            "includeZones": "1,2,3,4,5,6,7,8,9",
            "showDelayIrrigationSwitch": true,
            "syncTime": true,
            "refreshRate": 120,
            "logging": "standard"
        }
    ],
    "platform": "RainBird"
}

Screenshots
No response
Device & Model
EMS-TM2
Node.js Version
v18.18.8
NPM Version
v10.8.2
Homebridge Version
v1.8.3
Homebridge Rainbird Plugin Version
v2.0.3
Homebridge Config UI X Plugin Version
v4.56.4
Operating System
macOS

Can you try the latest beta:

Click here to find out how to install Beta

I have the same problem. Installed the plugin last week running from my MacBook with no issues. Transferred the server to my Raspberry Pi this week and can't get it going - all my other plugins works fine.
It pulls the bridge into Homekit with no issues, but none of the accessories are pulled in. Also not into the Homebridge accessories page.
Would love to use this if I can figure out how to get it going again.

I have the same problem. Installed the plugin last week running from my MacBook with no issues. Transferred the server to my Raspberry Pi this week and can't get it going - all my other plugins works fine.
It pulls the bridge into Homekit with no issues, but none of the accessories are pulled in. Also not into the Homebridge accessories page.
Would love to use this if I can figure out how to get it going again.

Please open your own issue as this is probably not the same issue you are having.

I have the same problem. Installed the plugin last week running from my MacBook with no issues. Transferred the server to my Raspberry Pi this week and can't get it going - all my other plugins works fine.
It pulls the bridge into Homekit with no issues, but none of the accessories are pulled in. Also not into the Homebridge accessories page.
Would love to use this if I can figure out how to get it going again.

Please open your own issue as this is probably not the same issue you are having.

Ok sure - but got mine resolved in the end.


BLD: Allow disabling network requiring tests

Reference issue

What does this implement/fix?
Allow disabling tests that require internet connection. Useful for distributions such as Nix and Guix that disallow network access during builds.
Additional information

cc @AnirudhDagar I think

I am linking the tracking issue here: #16983

Apologies for the late reply; I was offline last week. Acknowledging that I've read the discussion, will get back this week.

For situations where build-time network access is unavailable, we added a utility script _download_all .py in https://github.com/scipy/scipy/pull/17163. Before build, in such a case, one may run this stand-alone python script to cache all the pooch datasets and then at build time, everything is network independent.
Something like the following:
git clone ...
git submodule update ...
# Download dataset files
python _download_all.py

...continue the build process

I think we need to make its usage and purpose a bit more visible somewhere in the docs (IIRC, earlier, it was probably left out because it is a developer-only thing, now I feel we need to mention this process).

As its maintainer, and maintainer of the library driving the most of the development of this plugin, I'm happy to help with the incorporation of pytest-remotedata, or happy to answer questions/concerns about it.

This looks quite good @bsipocz. I think we can make use of pytest-remotedata in cases where one requires running the complete SciPy test suite offline, and will probably be able to skip tests given if there is no network connection. This was on the todo list of scipy.datasets.
It would mean one more dependency for build/test time, but it looks quite lightweight to me.
In the case of SciPy, the default nature should be running the tests marked with remote-data and not skipping them (since pooch caches the dataset files, and internet is required just for the first-time caching), so that would mean enabling that option all the time. Someone who'd want to skip such tests can then toggle that off.

Is this urgent for 1.11? Otherwise it looks like it might miss the cut-off...

If this won't get merged, here on NixOS we'd have to apply this patch, or simply disable the network tests unconditionally also via a patch, like we do now. Not such a big deal TBH. We'd also have to apply https://github.com/scipy/scipy/pull/18167 on our end as well.

For situations where build-time network access is unavailable, we added a utility script _download_all .py in #17163. Before build, in such a case, one may run this stand-alone python script to cache all the pooch datasets and then at build time, everything is network independent. Something like the following:
git clone ...
git submodule update ...
# Download dataset files
python _download_all.py

...continue the build process

@doronbehar is this not helpful to avoid network access during the SciPy package build for nixOS? We introduced _download_all.py script for precisely this purpose. There won't be any build time internet access requirements after running the above script.

@doronbehar is this not helpful to avoid network access during the SciPy package build for nixOS? We introduced _download_all.py script for precisely this purpose.

Yes it is sort of helpful for us, though it will require further maintenance overhead where the benefit is not that significant. If things will stay as they are, I think we'll prefer to keep disabling those tests via a patch of our own, though perhaps other maintainers of scipy at Nixpkgs will prefer differently. Even before this issue popped, we didn't run all the tests anyway, but we run something similar to this:
python -c "import scipy; scipy.test('fast', verbose=10, parallel=$NIX_BUILD_CORES)"

Perhaps the we can modify this scipy.test function to skip the discussed tests when 'fast' is used?

+1 for a wrapper

There's also the idea to make scipy.test('fast') not trigger the tests that require remote data - this will be the option NixOS will prefer the most. Also being able to exclude these tests via another argument to scipy.test will be a good option.

I think any of those options would be fine for the status quo. However, the plan is to move much more test data out of the default build/binaries. E.g., scipy/special/tests/data/ alone is 15 MB on disk. In conda-forge there's now a separate scipy-tests package that reduced the package size by 30%. So if and when we do that, none of the wrapper/pytest-remotedata/omit-from-fast really works.
So I think the python _download_all.py step @AnirudhDagar sketched above will get more important, and is a reasonable pre-condition for running the test suite at that point.

OK I think that I've found a reasonable way for NixOS to run _download_all.py and not introducing extra maintenance overhead. However, our build system requires that this data will not be stored in a cache such as ~/.cache/scipy, but somewhere in the source directory. Is it possible to tell scipy.test where these files are stored?

Great. The script already takes a path argument:
$ mkdir tmpdata
$ python scipy/datasets/_download_all.py tmpdata
Downloading data from 'https://raw.githubusercontent.com/scipy/dataset-ascent/main/ascent.dat' to file '/Users/rgommers/code/scipy/tmpdata/ascent.dat'.
... <etc>

But I guess what is missing is to make scipy.datasets aware of that new location. Right now the docs say "After downloading the dataset once, the files are saved in the system cache directory under 'scipy-data'", and there is no global state to keep track of a non-default path for that. @AnirudhDagar am I missing it, or do we need to add this?

For situations where build-time network access is unavailable, we added a utility script _download_all .py in https://github.com/scipy/scipy/pull/17163.

I think we need to make its usage and purpose a bit more visible somewhere in the docs (IIRC, earlier, it was probably left out because it is a developer-only thing, now I feel we need to mention this process)

I can further improve this part, making it more visible in the docs.
We already have How dataset retrieval and storage works which briefly mentions the same but might need a few edits explicitly mentioning the use of the script:

In environments with constrained network connectivity for various security reasons or on systems without continuous internet connections, one may manually load the cache of the datasets by placing the contents of the dataset repo in the above-mentioned cache directory to avoid fetching dataset errors without the internet connectivity.

@doronbehar _download_all.py has an argument to specify the path for downloading cache. I can explore if we can also use this custom downloaded path for running the tests or for some other constraint in general for storing cache. Here's the LOC that will be changed, currently hardcoded: https://github.com/scipy/scipy/blob/d5d54d1cf2dd0285a3e0cb7b2b171e5e27e50979/scipy/datasets/_fetchers.py#L14
The first thing that comes to my mind is using an env variable to read the dataset cache dir if it is set, or else fall back to the default. How does this sound?

But I guess what is missing is to make scipy.datasets aware of that new location. Right now the docs say "After downloading the dataset once, the files are saved in the system cache directory under 'scipy-data'", and there is no global state to keep track of a non-default path for that. @AnirudhDagar am I missing it, or do we need to add this?

@rgommers exactly, this should be added regardless, i feel.

The first thing that comes to my mind is using an env variable to read the dataset cache dir if it is set, or else fall back to the default. How does this sound?

Sounds good to me.

To keep track of a non-default cache path permanently (across different python sessions), we'd have to write the path in some temp file (like '/tmp/.scipy_cache_dir' or maybe in the scipy root dir like './.scipy_cache_dir').
With env var route, we'd have to ask the user to add this env var in their shell rc file if needed permanently.

I think we may need a public datasets.cache_dir object, where the default path can be read and set, and if you call download_all() it stores a new permanent default path.

Note that _download_all.py needs to be a standalone script which can be run without scipy as a dependency. Hence we should avoid a public datasets.cache_dir object use in _download_all.py script.
I've raised a draft PR #18518 to share the basic idea (may still have some rough edges, need to test and add more tests), and will refine the names/documentation for the same later.

@tylerjereddy tests should be run always, IIUC, I think what Ralf meant was that when we have more datasets added/migrated, skipping of tests would not be an option since the scope will be larger.
You can probably go through the approach shared in #18518, that is no skipping of tests, but adding more flexibility to _download_all.py and in general the user has power to define the cache path.

skipping of tests would not be an option since the scope will be larger.

You mean because the fact that the test suite passes becomes a false signal because so many tests were skipped? I'm not sure we can satisfy both sides on that debate. If we're ultimately going to keep all test sources in the project, and just keep moving larger data assets externally, and we'd prefer to just error out when those assets are missing, then I'm certainly on board with that, it is less work to explicitly mark N tests and less risk of false positive on the test suite status.
If what's happening is that you're just giving the package managers some way to work around the test suite failing in the absence of the network connection by caching data somewhere else maybe that makes more sense, and I'd say we should just close this then as "won't fix," since disabling tests silently is a bad idea.

I've raised a draft PR #18518 to share the basic idea (may still have some rough edges, need to test and add more tests), and will refine the names/documentation for the same later.

The restriction we ran into with skimage was that some users were only allowed to write to certain locations on the file system. As such, we could not create cache files, or a "pointer file" like the one proposed in your PR. The remaining option was to respect an environment variable, so that now, when you set SKIMAGE_DATADIR (it gets passed as env to pooch.create), you can run skimage.data.download_all() to populate that directory prior to running the test suite.

some users were only allowed to write to certain locations on the file system.

Yes @stefanv, that was my concern as well, hence asked the same question in the PR description. I was inclined towards the ENV_VARIABLE option. Both the approaches have their pros/cons. But it seems env var is slightly more fool proof and more flexible in terms of user permissions. Otherwise for users with limited permissions, we can give them an option to choose the tmp file write location through env var? That would a kind of a hybrid between the two.

If what's happening is that you're just giving the package managers some way to work around the test suite failing in the absence of the network connection by caching data somewhere else maybe that makes more sense, and I'd say we should just close this then as "won't fix," since disabling tests silently is a bad idea.

This is exactly what I meant, you may look at #18518 to verify this. Disabling certain tests is NOT the way to go since in the future we'll have more datasets externally hosted and that would need more tests disabled which will be hard to handle and chaotic.

skipping of tests would not be an option since the scope will be larger.

You mean because the fact that the test suite passes becomes a false signal because so many tests were skipped? I'm not sure we can satisfy both sides on that debate. If we're ultimately going to keep all test sources in the project, and just keep moving larger data assets externally, and we'd prefer to just error out when those assets are missing, then I'm certainly on board with that, it is less work to explicitly mark N tests and less risk of false positive on the test suite status

Exactly, that is what I meant. It is not acceptable if there is functionality not covered at all by tests when data sources are missing. Hence, downloading the data sources then becomes a hard precondition for running scipy.test('fast').

You can always make it mandatory to pass remote data tests in CI, even if those tests are somewhat separated. Once I figured out my local build/testrun issues I'll open a draft pr to show how this would look like with the remote data plugin. Of course it doesn't address the question of where should be that data stored and how to download.

I think any of those options would be fine for the status quo. However, the plan is to move much more test data out of the default build/binaries. E.g., scipy/special/tests/data/ alone is 15 MB on disk. In conda-forge there's now a separate scipy-tests package that reduced the package size by 30%.

BTW another option would be to indeed track those data files, but with Git LFS.

Quoting my self:

OK I think that I've found a reasonable way for NixOS to run _download_all.py and not introducing extra maintenance overhead.

I'll try to expand on what does extra maintenance overhead mean:
When Nix builds a package, it needs to know prior the build the sha256 of every tarball / directory downloaded from the internet - this is the best way we found that ensures our builds are as reproducible and as pure as possible. Hence, downloading additional data files for the build naturally requires additional output hashes - which I consider as an extra maintenance overhead.
Unfortunately, I didn't manage to download the test data without introducing additional maintenance overhead (I encountered obscure Nix specific issues), but I did manage to download the test data separately using an additional hash, and actually run these tests using that data by using XDG_CACHE_DIR (thanks to pooch using platformdirs).
Perhaps in the meantime the possible usage of XDG_CACHE_DIR can be documented.
If you'll indeed decide to eventually move more and more test data to a different repository, we will absorb this maintenance overhead and not complain. In that case, using XDG_CACHE_DIR should IMO be the default way to manage this cache (in response to https://github.com/scipy/scipy/pull/18518).

This is a long and somewhat-tricky discussion that probably won't get resolved in the next few days before branching for 1.12.0. Although I'll bump the milestone yet again, I'll note that SciPy 1.13.0 may come out earlier than the usual scheduling to support NumPy 2.0.0, so there could be another opportunity here in less than the usual 6 months if things start moving forward.

I removed the milestone here - this hasn't seen interest in a while


Improve Button Styles for Consistency and Aesthetics

I've noticed that several buttons on the website, specifically the "Eraser," "Uppercase," "Lowercase," and "Bold" buttons, currently have inconsistent and unappealing border colors. The random colors do not align with the overall design and user experience of the site.
### Proposed Changes:
Standardize the border colors for these buttons to match the website's theme.
Ensure that the colors enhance readability and aesthetics.
Consider using a color palette that complements the existing design.
This improvement would enhance the visual coherence of the website and provide a more polished look.
I would like to request this issue be assigned to me under Hacktoberfest and GSSOC.
@sanjay-kv and @vishanurag assign it to me.

Thank you!

mark it as label under GSSOC and hacktiberfest


Allow FnMut for validate

This allows mutable closures for validation, allowing stateful
validators.
This breaks BC. Input::interact*() now take &mut self instead of &self.
However, this shall not break most usres,
since (I think) users usually use Input in chained syntax
or call one of the &mut methods (like with_prompt) separately,
which would require a let mut anyway.

Can you please add an example?

What example would you like? This just widens the type accepted by validate_with. It doesn't add any features.

We do not have an example with validate in examples folder. Since you added the abitlity for stateful validators, I was asking you to please create an example with a stateful validator.

I appended this to the existing validator example.

Everything looks good. Can you please add an entry to changelog and I can merge this.

Updated. Also bumped minor version since it's a BC break.


Add Koan About Classes

The original ruby koans had a great koan about classes. What would that look like for C#?

Hi, I would like to make a PR for this. Would you mind?

Sounds good to me. Thanks @NikiforovAll !


feat: update Gradle builder to accomodate for e2e test

Add two public download actions
Add option for specifying a path to the Gradle project

I found these changes to be necessary to run the Gradle e2e test.

@laurentsimon @ianlewis please have a look.

Ug, forgot to submit my review comments from 2 days ago...


Add Polish language

i added polish language according to your instructions.
i am aware that the dictionary file is 10 times larger than other dictionaries, but the Polish language has a lot of declensions and I do not know if it is possible to "trim" it somehow. This is also my first pull request on github, please be understanding :)

Thank you for your contribution. It is a great dictionary, but indeed, 60 Mb is an overkill.
I was thinking of breaking the dictionaries into a list of word roots, prefixes and suffixes, hoping to make it possible to use much more complete dictionaries. Or even using a Trie for that matter. I guess this would be a great starting point for experiments. :slightly_smiling_face:
So let's hold on with this PR until we find a better solution.

I believe that polish grammar is quite similar to ukrainian/bulgarian/russian

Not at all... :slightly_smiling_face: Bulgarian has no declensions and I still feel I am missing words every now and then. I suppose the optimum would be at around 350k words.
Ukrainian grammar resembles Polish and the dictionnary may be ok-ish, but Russian probably feels quite incomplete. I think less than 200k is fine for a language like English, where words do not change much. I do use it and I am speaking from personal experience.
I don't mind adding one of the Google dictionaries, but you will probably find yourselves adding new words all the time. Of course, I may be wrong. I'm fine with testing this option, if you want to. I would appreciate your feedback, too. Or, if you could find another word list of, say, 350k-500k words, we can go for that.
But we can not use this dictionary now, it is too big. Some lower spec phones may crash trying to load it.
Either way, as I said in my previous comment, I want to find a way of improving the dictionary storage mechanism and expanding the dictionaries for better experience.

if you could find another word list of, say, 350k-500k words, we can go for that.

This one looks good https://mirrors.tuna.tsinghua.edu.cn/ctan/systems/windows/winedt/dict/pl.zip, 500k words. What do you guys think ?

if you could find another word list of, say, 350k-500k words, we can go for that.

This one looks good https://mirrors.tuna.tsinghua.edu.cn/ctan/systems/windows/winedt/dict/pl.zip, 450k words. What do you think ? Just has fancy windows cp1250 encoding that needs to be converted to utf-8

It should be OK. And the encoding is fine, I may even keep it to save some disk space.

if you could find another word list of, say, 350k-500k words, we can go for that.

This one looks good https://mirrors.tuna.tsinghua.edu.cn/ctan/systems/windows/winedt/dict/pl.zip, 450k words. What do you think ? Just has fancy windows cp1250 encoding that needs to be converted to utf-8

It should be OK. And the encoding is fine, I may even keep it to save some disk space.

This dictionary looks OK also for me. Should I make a new pull request or somehow modify this one?

I'm not a contributor of this project, just want to have good T9 keyboard on my phone :) How about adding word frequencies from openboard ?

I'm not a contributor of this project, just want to have good T9 keyboard on my phone :) How about adding word frequencies from openboard ?

This is a must in order to have good experience. If you have nodejs installed, you could use scripts/inject-dictionary-frequencies.js for that. If not, I will do so before merging.

I've noticed some suposingly nonsense words, such as: "Md", "np", "xi", "xv", "iii", "xxx" and so on.
I would appreciate someone who speaks the language to review clean up the two- and three-letter words. Otherwise, I'll just remove anything that looks weird.

Hey @sspanak, I tried out that dictionary and it's kind of wonky. It has some really strange words and is missing a lot of basic ones. I'm going to work on fixing it up or finding a better one, but it might take me a bit since I don't have much spare time lately.

So, I've cleaned up the dictionary and tried it out by typing a couple of sample sentences from Wikipedia. It is mostly fine, even though I found one word was missing. I suppose the experience is good enough, so I will merge the PR.
I suppose the optimal word count for Polish would be around 800k-1M words. @rjolina, @mikep-dev, @samurex, if you could find such a dictionary, feel free to open a new pull request.

Thank you guys for your cooperation! Can't wait for the release with my native language 🥰


Update README_Dynamic-UpdateSource.md

Updated Readme title

Hi @calebfinley, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. Real humans will now evaluate your PR.

TTYL, MSBOT;


Feat: Adding SearchParamsSummary component

Summary: AdaptableBadge had to be added for this move to be possible; this is just a temporary fix and should eventually live inside @kiwicom/universal-components (it's very similar to current implementation of FilterButton there for instance, so refactor is necessary).
I left the stories file for posterity; we might want to add some Storybook-like capacity to the component library specific to margarita.

I was just thinking that maybe I should merge into a feature branch that would have everything done in it regarding the move + upgrading the library with a working version. WDYT?

I was just thinking that maybe I should merge into a feature branch that would have everything done in it regarding the move + upgrading the library with a working version. WDYT?

TBH: I don't have a strong opinion on this, It OK but on the end, you probably must solve a lot of conflicts when you want to merge it into the master branch.

We should probably just unify folders naming and structure.

I will do that in a separate PR.
People should use these moved components at their own risks! 😈 (until the situation is more stable)


adding missing packages for simulator.qmd

The dependencies are already set up for installation in pr_actions.yml on the main branch. And {simChef} is pre-installed on the Docker container.

However, we should update action website.yml to use container v0.2 instead of v0.1.

Sorry I missed the existence of pr_actions.yml and the fact that simChef was already in container.
I updated website.yml to use container v0.2.
Wouldn't it be clearer to have all additional packages specified in the website.yml ?
Or to update the container image to add them at image build ?

You are right in principle.
The reasons of the current setup is that everyone can add packages to pr_actions.yml and therefore make sure that corresponding .qmds do not fail to compile while I think that the docker container has to be rebuilt by a single person (@MarieEtienne I think) each time a new package is required.
The case of non-CRAN packages is subtle because token configuration in the GitHub action does not behave well, making the run of remotes::install_github() fail. We therefore add those directly into the container.

I modified the GHA scripts to install all required dependencies. @Polarolouis, do you want to merge that once the checks are done?

Thank you @astamm, I just resolved a conflict and once the checks have passed I'll merge into main. :smile:


x/crypto ssh.KeyboardInteractiveChallenge error message is incorrect

What version of Go are you using (go version)?

$ go version

go version go1.15.1 linux/amd64

Does this issue reproduce with the latest release?
I haven't checked, but the error message is the same on the master branch.
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/acoyle/.cache/go-build"
GOENV="/home/acoyle/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/acoyle/go/pkg/mod"
GOOS="linux"
GOPATH="/home/acoyle/go"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build040277230=/tmp/go-build -gno-record-gcc-switches"

What did you do?
When using the ssh.KeyboardInteractiveChallenge authentication method, I returned answers []string that was larger in size than the the input questions []string. I then passed this config to ssh.Dial.
What did you expect to see?
ssh.Dial should fail with an error message saying too many answers were provided for the questions asked by the challenge.
What did you see instead?
ssh.Dial failed with the error message ssh: not enough answers from keyboard-interactive callback.

This seems like it should be pretty trivial to change, and I'd be happy to submit a PR. The contribution guide said it was best to submit an issue first so I filed this as well.

Yes, filing an issue and discussing it first is very helpful, thanks.
CC @FiloSottile per owners.


Performance improvements

Hello,
Nice work on this extension (Xcode had this feature for a long time and since I migrated to Xamarin and Visual Studio for Mac I missed it) - so it's a really nice addition - thank you.
I was wondering if the performance can be improved as I'm noticing a 3-4 seconds delay until the results are displayed.
Thanks,
Cosmin

Hi Cosmin,
The filter is a bit slow to process, therefore there is a 2 second delay before it actually starts filtering the tree. In addition it caches the projects.
For now I don't see any low hanging fruit to improve the performance and neither does it disable the developer from using it.
Thanks for your feedback though.
Regards.