IndexError: list index out of range

I am running the following code:
from catboost.datasets import *
train_df, _ = catboost.datasets.amazon()
ix = 100
X_train = train_df.drop('ACTION', axis=1)[:ix]
y_train = train_df.ACTION[:ix]
X_val = train_df.drop('ACTION', axis=1)[ix:ix+20]
y_val = train_df.ACTION[ix:ix+20]
model = CatBoostClassifier(iterations=100, learning_rate=0.5, random_seed=12)
model.fit(X_train, y_train, eval_set=(X_val, y_val), verbose=False, plot=False)
shap.TreeExplainer(model)

I get the following error:
---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-2-6d52aef09dc8> in <module>
      8 model = CatBoostClassifier(iterations=100, learning_rate=0.5, random_seed=12)
      9 model.fit(X_train, y_train, eval_set=(X_val, y_val), verbose=False, plot=False)
---> 10 shap.TreeExplainer(model)

~/prb/anaconda3/lib/python3.6/site-packages/shap/explainers/tree.py in __init__(self, model, data, model_output, feature_dependence)
     94         self.feature_dependence = feature_dependence
     95         self.expected_value = None
---> 96         self.model = TreeEnsemble(model, self.data, self.data_missing)
     97
     98         assert feature_dependence in feature_dependence_codes, "Invalid feature_dependence option!"

~/prb/anaconda3/lib/python3.6/site-packages/shap/explainers/tree.py in __init__(self, model, data, data_missing)
    594             self.dtype = np.float32
    595             cb_loader = CatBoostTreeModelLoader(model)
--> 596             self.trees = cb_loader.get_trees(data=data, data_missing=data_missing)
    597             self.tree_output = "log_odds"
    598             self.objective = "binary_crossentropy"

~/prb/anaconda3/lib/python3.6/site-packages/shap/explainers/tree.py in get_trees(self, data, data_missing)
   1120
   1121             # load the per-tree params
-> 1122             depth = len(self.loaded_cb_model['oblivious_trees'][tree_index]['splits'])
   1123
   1124             # load the nodes

IndexError: list index out of range

This error was spotted with Catboost version 0.15.2, I upgraded to the latest version (0.16.4 as of today), but the error persists.
I have Shap version: '0.29.3'

I managed to find a solution to the error encountered. Apparently, num_trees is no longer the iterations number, i.e. the line:
self.num_trees = self.loaded_cb_model['model_info']['params']['boosting_options']['iterations']

causes the problem. For example, if you set the parameter iterations to 100 during model training, and the model training finishes with tree_count_ of 20, then the above line causes the error when accessing the 21st tree in oblivious_trees in the loop from the get_trees method.
Changing the above line to:
self.num_trees = len(self.loaded_cb_model['oblivious_trees'])
solved my issue.
I suppose this is not the "right" way to do it, but it works like a charm as a "temporary" fix.

Reopening issue for the pull request.

Hi! Could this be merged?

Hi! Could this be merged?

it's in my pull request #749

Yes, I already cloned your fix, thanks for that!
I was wondering whether it could be merged and included in a release

Doesn't work for me.  Shap v'0.31.0', Catboost v'0.18'

@Garve check out my pull request's #749 code, or just git clone the repo from my account.

@ibuda  This doesn't work either. I clone your repo and checkout to ef593f5 and installed but still doesn't work. Here is the reproduce code:
import shap
import catboost

from catboost import Pool
from sklearn.datasets import load_boston, load_iris
from sklearn.utils import shuffle

iris_dataset = load_iris()
x = pd.DataFrame(
    iris_dataset.data,
    columns=iris_dataset.feature_names
)
y = iris_dataset.target

x, y = shuffle(x, y)

train_set = Pool(
    data=x.iloc[:100],
    label=y[:100],
)
valid_set = Pool(
    data=x.iloc[100:100+50],
    label=y[100:100+50],
)

model = catboost.CatBoostClassifier(
    iterations=1000,
    eval_metric="MultiClass",
)

model = model.fit(
    train_set,
    eval_set=[valid_set],
    verbose=True,
    early_stopping_rounds=5,
    use_best_model=False,
)

explainer = shap.TreeExplainer(model)

The error is not about index out of range  but:
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-1-58e69af00e9b> in <module>
     38 )
     39
---> 40 explainer = shap.TreeExplainer(model)

~/miniconda3/lib/python3.7/site-packages/shap-0.29.3.dev0-py3.7-macosx-10.7-x86_64.egg/shap/explainers/tree.py in __init__(self, model, data, model_output, feature_dependence)
    100         self.feature_dependence = feature_dependence
    101         self.expected_value = None
--> 102         self.model = TreeEnsemble(model, self.data, self.data_missing)
    103
    104         assert feature_dependence in feature_dependence_codes, "Invalid feature_dependence option!"

~/miniconda3/lib/python3.7/site-packages/shap-0.29.3.dev0-py3.7-macosx-10.7-x86_64.egg/shap/explainers/tree.py in __init__(self, model, data, data_missing)
    663             for i in range(ntrees):
    664                 l = len(self.trees[i].features)
--> 665                 self.children_left[i,:l] = self.trees[i].children_left
    666                 self.children_right[i,:l] = self.trees[i].children_right
    667                 self.children_default[i,:l] = self.trees[i].children_default

ValueError: could not broadcast input array from shape (383) into shape (255)

My catboost version: 0.20.2

Hi @rightx2, you're right, the error you're getting has nothing to do with the problem presented in this issue. However, I've seen something similar to the error you're getting.
There is a way to bypass this by getting the shap_values directly from Catboost model. Some tweaking must be applied on the way:
shap_values = model.get_feature_importance(train_set, type=catboost.EFstrType.ShapValues)
shap_values_transposed = shap_values.transpose(1, 0, 2)
shap.summary_plot(list(shap_values_transposed[:,:,:-1]))

@ibuda merged! (sorry for the unreasonable delay, this issue was in a batch I missed following up on)

@slundberg I hope to speak from the entire community, we can only imagine how busy your schedule is, and would like to thank you for a great product you've given us! Happy new coming year!

@slundberg Thanks for your response, but I still get this "list index out of range" error with catboost-0.20.2 and shap-0.34.0.
Any intention of another update to try and solve this?

Hi @yoavweg. I mentioned this in #979. Apparently this merge did not get into the current package but will be included in the next one.

Up to my knowledge, this issue is fixed, closing.

I still have  problem with "IndexError: list index out of range" by running of this  line with shap-0.34.0 :
explainer = shap.DeepExplainer(model, padded_docs_train)
Here is the full error message:
IndexError                                Traceback (most recent call last)
 in ()
1 import shap
2
----> 3 explainer = shap.DeepExplainer(model, padded_docs_train)
4
5 num_explanations = 25
/home/olya/env/lib64/python3.7/site-packages/shap/explainers/deep/init.py in init(self, model, data, session, learning_phase_flags)
78
79         if framework == 'tensorflow':
---> 80             self.explainer = TFDeepExplainer(model, data, session, learning_phase_flags)
81         elif framework == 'pytorch':
82             self.explainer = PyTorchDeepExplainer(model, data)
/home/olya/env/lib64/python3.7/site-packages/shap/explainers/deep/deep_tf.py in init(self, model, data, session, learning_phase_flags)
79         if str(type(model)).endswith("keras.engine.sequential.Sequential'>"):
80             self.model_inputs = model.inputs
---> 81             self.model_output = model.layers[-1].output
82         elif str(type(model)).endswith("keras.models.Sequential'>"):
83             self.model_inputs = model.inputs
IndexError: list index out of range
Do you have any idea, why I'm getting this error or  how could I solve this problem ?

The error we were getting was related to catboost tree explainer, yours is related to deep explainer, and it seems that the layers[-1] causes the error, i.e. there are no layers in your NN.
I would suggest/ask you to provide a minimalistic code to reproduce the error. Thank you.

e = Embedding(vocab_size, 300, weights=[embedding_matrix], input_length=max_words, trainable=False)
define model
model = Sequential()
model.add(e)
model.add(Bidirectional(LSTM(32, dropout=0.5)))
model.add(Dense(5, activation='sigmoid'))
compile the model
model.compile(optimizer='adam',
#loss='sparse_categorical_crossentropy',
loss='binary_crossentropy',
metrics=['accuracy'])
summarize the model
print(model.summary())
fit the model
model.fit(padded_docs_train, y_train, epochs=10, verbose=0)
evaluate the model
loss, accuracy = model.evaluate(padded_docs_test, y_test, verbose=0)
print('Accuracy: %f' % (accuracy*100))

@okunahe I would suggest you open a new issue since this one refers to a different framework.
Also, when you do that, please provide a reproducible code. I could not use the one you mentioned above to reproduce the error. I will try to help you once you do that. Thank you.

I am still facing the error ' list index out of range' . when using SHAP tree explainer for CATBOOST model. Is it really fixed?
1349         self.leaf_child_cnt = []
1350         for i in range(self.num_trees):
-> 1351
1352             # load the per-tree params
1353             self.num_roots[i] = self.read('i')
IndexError: list index out of range

@ArpitSisodia there is something wrong with the issue you are reporting, as looking at the source code of the error you specified, the line 1352 refers to class XGBTreeModelLoader(object): but not to Catboost.
Please provide some code which we could run to  reproduce the error you are getting.

@ibuda thanks for your dedication. I found the same error using shap and catboost version 0.34.0 and 0.21, respectively.
Minimum example:
import shap
import catboost
import pandas as pd
from catboost import Pool
from sklearn.datasets import load_boston, load_iris
from sklearn.utils import shuffle
iris_dataset = load_iris()
x = pd.DataFrame(
iris_dataset.data,
columns=iris_dataset.feature_names
)
y = iris_dataset.target
x, y = shuffle(x, y)
train_set = Pool(
data=x.iloc[:100],
label=y[:100],
)
valid_set = Pool(
data=x.iloc[100:100+50],
label=y[100:100+50],
)
model = catboost.CatBoostClassifier(
iterations=1000,
eval_metric="MultiClass",
)
model = model.fit(
train_set,
eval_set=[valid_set],
verbose=True,
early_stopping_rounds=5,
use_best_model=False,
)
explainer = shap.TreeExplainer(model)
Error message:

IndexError                                Traceback (most recent call last)
C:/Users/Oncase/mpd/data_analysis/metricas_classificacao.py in
----> 1 explainer = shap.TreeExplainer(classifier1)
2 #shap_values = explainer.shap_values(train1)
3 #shap.summary_plot(shap_values, X1_train)
4
5 #classifier1.get_feature_importance(train1, type='ShapValues')
~\AppData\Local\Continuum\anaconda3\lib\site-packages\shap\explainers\tree.py in init(self, model, data, model_output, feature_perturbation, **deprecated_options)
110         self.feature_perturbation = feature_perturbation
111         self.expected_value = None
--> 112         self.model = TreeEnsemble(model, self.data, self.data_missing)
113
114         if feature_perturbation not in feature_perturbation_codes:
~\AppData\Local\Continuum\anaconda3\lib\site-packages\shap\explainers\tree.py in init(self, model, data, data_missing)
738             self.input_dtype = np.float32
739             cb_loader = CatBoostTreeModelLoader(model)
--> 740             self.trees = cb_loader.get_trees(data=data, data_missing=data_missing)
741             self.tree_output = "log_odds"
742             self.objective = "binary_crossentropy"
~\AppData\Local\Continuum\anaconda3\lib\site-packages\shap\explainers\tree.py in get_trees(self, data, data_missing)
1354
1355             # load the per-tree params
-> 1356             depth = len(self.loaded_cb_model['oblivious_trees'][tree_index]['splits'])
1357
1358             # load the nodes
IndexError: list index out of range

Thanks @ibuda and @wagnerjorge , using the example I was able to find and fix the issue :)


Merge helper 1.20.1 with fork

for some reason this is the only way to merge

okay nvm i don't have write perms


Anomaly Detector

Updated Anomaly detector diagram with recommended naming convention

@evetsydrah - agreed, can you tweak that image some?

@evetsydrah Steve Chow FTE - agreed, can you tweak that image some?

I think this comment was meant for a different pull request - https://github.com/MicrosoftDocs/architecture-center/pull/2672. I'll post it there.
@doodlemania2 Have you had a chance to look at this PR?

@doodlemania2 @ChandreshAwasthi The SVG file in this PR doesn't look right in GitHub Preview either:

@ChandreshAwasthi Can you see if you can fix it? Thanks.

Is there a tool you use to convert images to SVG? I tried an online tool and thats what it returned

The SVG looks okay, maybe just see if you can crop it some??

@ktoliver you helped convert png to svg on my previous PR. I appreciate your help in converting this one to SVG with appropriate cropping as I am not sure how to do that.

@ktoliver Kristine Toliver (Aquent LLC) Vendor you helped convert png to svg on my previous PR. I appreciate your help in converting this one to SVG with appropriate cropping as I am not sure how to do that.

Hi @ChandreshAwasthi Oh? I don't recall... I don't know much about working with SVG files. Perhaps the PM/content team has some guidelines or standards, because it uses SVG files widely in the content?
I looked at some SVG files in the repo, and some have transparent backgrounds, and others have white backgrounds. I don't want to step on any standards that might be in place, but it seems like you'd want a file that is intended to be downloaded to have a non-transparent background, and you'd want it to be larger than what appears in the article, if the idea is to have an image that is easier for the user to study for guidance in their own situation.
You could look in the Microsoft-internal contributor guide (I didn't see much there), or you could contact the Docs support channel in Teams. I'd probably do the latter.

@ktoliver Kristine Toliver (Aquent LLC) Vendor you helped convert png to svg on my previous PR. I appreciate your help in converting this one to SVG with appropriate cropping as I am not sure how to do that.

Hi @ChandreshAwasthi Perhaps the PM/content team has some guidelines or standards, because it uses SVG files widely in the content? I don't have any direct experience, although I know there are many options for file conversion.
I looked at some SVG files in the repo, and some have transparent backgrounds, and others have white backgrounds. You'd want to follow any standards that might be in place for the content, but it seems like you'd want a file that will be downloaded to have a non-transparent background, and you'd want it to be larger than what appears in the article.
You also might contact the Docs support channel on Teams.

We have a new team in house that is working on the diagrams and making sure they are all up to snuff. Let's #sign-off for now and we'll come back around and make that image gooder (my favorite fake word)

@doodlemania2: I'm sorry - only the author of this article, @, can sign off on your changes. But we do have an exception process - if you are on the Microsoft content or product team for this product area, you can ask the PR review team to review and merge it by sending mail to the techdocprs alias.


add @Security decorator using passport

Examples and tests using passport-jwt

Coverage increased (+0.4%) to 83.333% when pulling f22dd860f3bf8fbff1e788a8cd7c8b9cc192a80e on d0whc3r:feature/security_passport into edbdd2577ed8150f38eb8290fd23bd7f2fb1e283 on thiagobustamante:master.

Is this being merged?

Also interested: is it being merged?

Yes it was merged. Documentation is in README
https://github.com/thiagobustamante/typescript-rest#security-decorator
You could check for tests for more detailed implementation.
I don't know if it is published to npm...

No it is not published to npm, you need to import source code from github if you want to use @Security decorator

You're right, it was merged!
I'm going to use it :) Thank you @d0whc3r

Anyone able to comment on when a new version might be published to include this change?

@d0whc3r using this code, how would you go about setting session to false on each of the endpoints so that passport doesn't complain about being unable to serialize/deserialize the user?

Figured it out - will make a PR to config that


fix: do not switch to workdir before running ansible

When running Ansible, Python can create its own cache which can clash with the cache created during user's action in the sandbox. Namely creating such directory can easily result in broken permissions, since during the time of the creation of the image, it is being done with the highest permissions of root.
Therefore move the permission-fix and also switch of the work directory after the Ansible is run.
Related to cockpit-project/cockpit-machines#1350

merging manually…

interesting, if this is really a solution, we should report this as a bug to ansible

I doubt it's an Ansible bug, the issue is mainly ~/.cache that gets created during the image build, and it is created by pip… I wouldn't be surprised if it's because of the override of $USER and $HOME at the beginning… Probably would've been better to set those overrides all the way at the end to prevent this :thinking: I'll try to experiment with that a bit.


[BEAM-11796] Fix website build

Attempt to fix failures in https://ci-beam.apache.org/job/beam_PostCommit_Website_Publish/ by 'git stash' then 'git checkout asf-site' before grgit checkout of asf-site branch.

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Choose reviewer(s) and mention them in a comment (R: @username).
[ ] Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
[ ] Update CHANGES.md with noteworthy changes.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

GitHub Actions Tests Status (on master branch)

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

Run Website Publish

Run Website Publish

I guess there's no way to test a Website publish without committing this ?

In a separate pull request I added a trigger phrase to the website publish job, then ran the seed job, then triggered it, allowing it to be tested in https://ci-beam.apache.org/job/beam_PostCommit_Website_Publish_PR/

Nice. Thanks.
Updates are live now: https://beam.apache.org/blog/beam-2.28.0/


location

hi mbro
love this Notify but is it possible to relocate it top center of the screen as underneath bank, cash money and job hud, please

Hey, yes of course you can locatie where you want them in the css. What does your hud looks like? Do they need to be a bit more further down?

HiYes I hoping we can locate it top-center I possible away from all the r as my hud has both top left and right items onThanks in advanceJoeSent from my iPadThis email, including any attachments, is confidential. If you have received this email in error, please let me know and then delete it - do not read, use, or distribute it or its contents. This email does not designate an information system for the purposes of the Contract and Commercial Law Act 2017.On Sep 29, 2023, at 9:02 AM, v42 @.***> wrote:
Hey, yes of course you can locatie where you want them in the css. What does your hud looks like? Do they need to be a bit more further down?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>


Fix tests when mcrypt extension is not loaded

Mcrypt is only marked as suggested so tests should pass with extension not loaded.

If mcrypt isn't loaded, this falls back to null. Would it be better to also support openssl? Or is this irrelevant with Zend\Crypt?

@sarciszewski This is now irrelevant. I need to clean up obsolete tests, which I'll try to do tonight or tomorrow.

Leaving this thread open until that is done.


Use musl libc instead of Holy Build Box to build precompiled portable binaries

Use musl libc instead of Holy Build Box to build precompiled portable binaries. Like this, glibc is linked statically, so no need to compile on a very old linux distro for compatibility issues. Further, the requirements to run the binary goes to zero, as there is no need for the user to have OpenMP 4.0+ or GCC 4.9 installed to run the binary. musl libc is well known and used in Rust to create precompiled binaries, so we can trust it.

Solved in https://github.com/rmcolq/pandora/pull/268/commits/77cf03322666c9a9f2f72dc887fff852a0e75482


Suggestion: python_requires=">= 3.6.9" in setup.py for use on Colab

Good evening,
I wanted to use your randtest package on Google Colab, which currently offers Python 3.6.9 , so I had to do the following workaround to get it installed:
cd /tmp
git clone https://github.com/estripling/randtest
cd /tmp/randtest
sed -i 's/>= 3.7/>= 3.6.9/' setup.py
make install

After the installation succeeded, it worked ok.
It would be helpful to operate the change:
python_requires=">= 3.6.9"
in setup.py of this repo , so that Colab users can install it directly via:
pip install git+https://github.com/estripling/randtest
Thank you!
Best regards,
Camelia

Hi Camelia,
Thank you for trying out randtest.  I updated the functionality accordingly. It should now work without the workaround.
Regards,
E. Stripling


Containerised SSR rendering for CM

Is your feature request related to a problem? Please describe.
The "problem" is that I'm looking for a way to treat Sitecore as a service that other applications can consume via the JSS APIs (content service, dictionary & graphql).
The current JSS implementation gets close to this if you use a SSR proxy. You only need to import the media & items in to the sitecore instance (it is a CMS after all!) and the react application files can be deployed to a docker container for example.
Where this currently falls down is that to enable the Experience Editor, you need to deploy your react app files to the CM server (or App Service etc)
Describe the solution you'd like
I'd like to replicate the SSR proxy model for rendering markup needed by the experience editor. I've had a poke around in the JSS.ViewEngine assemblies and can see that the rendered html is currently transmitted from the node process to Sitecore over HTTP but the managing of the pool of node processes is currently tightly coupled to the INodeServices implementation.
I think it would make sense to re-use the existing INodeInstance implementation but host it in a .Net Core application that can be containerised.

We like this idea 👍

Did this feature make the SC9.2/JSS12 release that dropped a few days ago? There doesn't seem to be any new documentation just yet

The feature was not included in 9.2

Any update on the ETA? Is it waiting on a JSS release or a SC release?
After it was demoed at SUGCON-EU we thought it was a done deal - was there technical issues or is the marketing team trying to come up with a good name for it? :)

@piratebriggs with Sitecore 9.1.1 and 9.2, the Sitecore server-side bits for JSS rendering host are ready to be used but client side is missing (as you know). Until the JSS team has more time and is able to finalize the client-side bits, I created a gist to demonstrate a "basic" rendering host setup:
https://gist.github.com/aweber1/39d1e9e07fb19aac9bc9b94feb87bb0f

HTTP Rendering Engine feature has been merged to the dev branch. It still requires some improvements and cleaning (+ additional testing) but the basic functionality is already working fine.
We are planning to include this in next release of NPM packages but I can't give a date right now.


BarChart axis labels do not work

Sample JSFiddle
Problem: BarChart components don't display axis labels.
Steps to reproduce:
Create a <BarChart> component with xAxisLabel and yAxisLabel props.
var barData = [{label: 'A', value: 5}, {label: 'B', value: 6}, {label: 'C', value: 2}, {label: 'D', value: 11}, {label: 'E', value: 2}, {label: 'F', value: 7}];

var Hello = React.createClass({
    render: function() {
        return (
                <BarChart
                  data={barData}
                  width={500}
                  height={300}
                  title='Bar Chart'
                  yAxisLabel="y axis"
                  xAxisLabel="x axis"
                />
        );
    }
});
React.render(<Hello />, document.body);

Expected result: a <BarChart> should be rendered with both X and Y axis labels visible.
Actual result: a <BarChart> is rendered without any axis labels visible.

It looks like the [x|y]AxisLabel and [x|y]AxisLabelOffset props aren't being passed to the <XAxis> and <YAxis> components inside BarChart, as they are inside LineChart.
I tried adding in those props to BarChart…

… which causes the labels to render, but the offsets are messed up.

Also note in the Sample JSFiddle that the rendering of two charts is a bit messed up. In the example, the top LineChart is rendering over the <hr> in between it and the bottom BarChart.

Thanks for the well described issue @grahamb. Your description makes debugging faster. Turn out we just forgot to include mixin in BarChart.jsx to render x,y axes label.


ISPN-6879 Calculate (and expose) minimum number of nodes for data in

Infinispan

Added min num nodes to Stats classes

https://issues.jboss.org/browse/ISPN-6879

We want this exposed in the server DMR too:
https://github.com/infinispan/infinispan/blob/0446879eac18d68134e1f0c32062f361f3e75576/server/integration/infinispan/src/main/java/org/jboss/as/clustering/infinispan/subsystem/ClusteredCacheMetricsHandler.java#L52

Sure @tristantarrant. I can add it there as well. Sorry I was talking with @slaskawi and was more hopeful that we wouldn't be using DMR anymore :)

For what @slaskawi needs, JMX is sufficient, but we still need to think about wider use-cases. In particular the console obtains information through the DMR

Updated with DMR changes. Let me squash before merge if it is alright though.

[domain@localhost:9990 /] cd /host=master/server=server-one/subsystem=datagrid-infinispan/cache-container=clustered/distributed-cache=default
[domain@localhost:9990 distributed-cache=default] ls
{"WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => "WFLYCTL0158: Operation handler failed: java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key datagrid-infinispan.clustered-cache.clusterwide-minimum-required-nodes"}}

Yeah it was a copy pasta issue :(
https://github.com/infinispan/infinispan/pull/5626/files#diff-49a1065a2df11ed0b87768bb20af3300R250

Fixed:

Running org.jboss.as.clustering.infinispan.subsystem.SubsystemParsingTestCase
Tests run: 70, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 10.914 sec - in
org.jboss.as.clustering.infinispan.subsystem.SubsystemParsingTestCase
Results :
Tests run: 70, Failures: 0, Errors: 0, Skipped: 0

Hmm, pasta! 🍝

I loves me some pasta too :)


[v4, discussion] nav dropdown structure

Currently there is no documentation for dropdown in navbar, however, there is this example http://www.quackit.com/html/html_editors/scratchpad/?example=/bootstrap/bootstrap_4/tutorial/bootstrap_4_navbars_dropdown_menus
It works good and same way I have rewritten old bs3 code for bs4 but now dropdown is in front of navbar and overlaps at top. I need to render dropdown behind navbar and z-index is not working and I can't figure out why. dropdown already have z-index 2 and nav - z-index 3.
However, looking on old bs3 example https://getbootstrap.com/examples/navbar/ navbar have no top/bottom padding and it is easier to position dropdown. In old examples there is also .navbar-nav > li > .dropdown-menu nested selector which removes top right/left border-radius etc. I could agree that this option probably would not fit bs4 class structure but navbar is a component and it can have it's own dropdowns.
How do you plan to structure dropdown in navbar and what about navbar padding?
Also I haven't found any examples how to make old bs3 responsive navbar with hamburger like in the same example https://getbootstrap.com/examples/navbar/ Is it currently possible?

v4's navbars overall are still a work-in-progress. See #18467.

Also I haven't found any examples how to make old bs3 responsive navbar with hamburger

There is http://v4-alpha.getbootstrap.com/components/navbar/#collapsible-content , although making the items stack like in v3 hasn't been implemented yet; see #17250.


Introduce ServiceAnyRef

Unlike ServiceRef, it takes no generic argument. This will be used when the user want to erase trait.
This will replace all import_service() and export_service(), and hide HandleToExchange from user.

I found that it's impossible. HandleToExchange can be relayed freely without any side effects during de/serialization.


[Code Addition Request]: Deep learning models

Pull Request for PyVerse 💡
Requesting to submit a pull request to the PyVerse repository.

Issue Title
Please enter the title of the issue related to your pull request.
[Code Addition Request]: Deep learning models

[X] I have provided the issue title.

Info about the Related Issue
What's the goal of the project?
PyVerse is an open-source collection of diverse Python projects, tools, and scripts, ranging from beginner to advanced, across various domains like machine learning, web development, and automation.

[X] I have described the aim of the project.

Name
Please mention your name.
Yash K. Saini

[X] I have provided my name.

GitHub ID
Please mention your GitHub ID.
yashksaini-coder

[X] I have provided my GitHub ID.

Email ID
Please mention your email ID for further communication.
<EMAIL_ADDRESS>
[X] I have provided my email ID.

Identify Yourself
Mention in which program you are contributing (e.g., WoB, GSSOC, SSOC, SWOC).
GSSoC-Ext

[X] I have mentioned my participant role.

Closes
Enter the issue number that will be closed through this PR.
Closes: #816

[X] I have provided the issue number.

Describe the Add-ons or Changes You've Made
Give a clear description of what you have added or modified.
This pull request primarily focuses on adding comprehensive documentation and necessary dependencies for the Fraud Transactions Prediction Neural Network project. The changes include a detailed README file and a requirements.txt file listing the needed Python libraries.
Documentation Enhancements:

Deep_Learning/Fraud Transactions Prediction NN/README.md: Added a detailed README file that includes an overview of the project, technologies used, dataset description, installation instructions, usage guidelines, and steps for data exploration, model training, evaluation, and interpretation.

Dependency Management:

Deep_Learning/Fraud Transactions Prediction NN/requirements.txt: Added a list of required Python libraries for the project, including scikit-learn, pandas, matplotlib, seaborn, numpy, scipy, statsmodels, imblearn, shap, tensorflow, missingno, xgboost, lightgbm, keras, and joblib.

[X] I have described my changes.

Type of Change
Select the type of change:

[X] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[X] Code style update (formatting, local variables)
[X] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

How Has This Been Tested?
Describe how your changes have been tested.
Describe your testing process here.

[X] I have described my testing process.

Checklist
Please confirm the following:

[X] My code follows the guidelines of this project.
[X] I have performed a self-review of my own code.
[X] I have commented my code, particularly wherever it was hard to understand.
[X] I have made corresponding changes to the documentation.
[X] My changes generate no new warnings.
[X] I have added things that prove my fix is effective or that my feature works.
[X] Any dependent changes have been merged and published in downstream modules.

@UTSAVS26 can you review this PR, and add proper labels to it.


[Freebiesbug] -> [UI Graphics]

Freebiesbug
Hand-picked resources for web designer and developers, constantly updated.
Link: https://freebiesbug.com
Checklist:

[ ] I have performed a self-review of submitted resource and its follows the guidelines of the project.

Closing in favor of #705


Error in mnist_example.py about the Qiskit

Hi Hanrui,
I am running the mnist_example.py and I am having the following error when running on Qiskit simulator and real Quantum Computers (before line 211 in mnist_example.py is good, but after line 211 run into errors). I am using the latest version of the code. Any clue why this happens?
[2023-03-27 23:21:22.055] Job failed because 'Number of input circuits does not match number of input parameter bind dictionaries', rerun now.

Thanks for your help!
Caitao

Hi Caitao,
Thanks a lot for the feedback! This is because a bug in Qiskit parameterization. We have find a workaround to not use the qiskit parameter binding.
Please have a look at the updated mnist_example.py. Right now it uses the operations recorded in the qdev to convert tq model to qiskit. And it expands the encoder part to create fixed gate circuit so no binding is needed.
Please let me know for any questions!
Attached the result i just ran:
[2023-03-29 02:55:06.882] Only use the front 75 images as TEST set.
Epoch 1:
0.005 0.5862550139427185
valid set accuracy: 0.8157676348547718
valid set loss: 0.5728925466537476
Epoch 2:
0.00250.5613003373146057
valid set accuracy: 0.8149377593360996
valid set loss: 0.5511690974235535
test set accuracy: 0.6533333333333333
test set loss: 0.626448392868042

Test with Qiskit Simulator
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 75/75 [00:04<00:00, 18.24it/s]
Job Status: job has successfully run
Job Status: job has successfully run
Job Status: job has successfully run
Job Status: job has successfully run
Job Status: job has successfully run
test set accuracy: 0.6666666666666666
test set loss: 0.6252803337740171

Test on Real Quantum Computer ibmq_lima
ibmqfactory.load_account:WARNING:2023-03-29 02:55:33,169: Credentials are already in use. The existing account in the session will be replaced.
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 75/75 [00:05<00:00, 12.69it/s]
Job Status: job has successfully run
test set accuracy: 0.6
test set loss: 0.6596525936855245

Hi Hanrui,
Thanks for the update. I updated to the newest version, but I am still getting errors. The error occurs in line 101 of mnist_example.py: Trying to compose with another QuantumCircuit which has more 'in' edges.
  File "/home/caitao/Project/torchquantum/examples/simple_mnist/mnist_example.py", line 101, in forward
    assembled_circs = qiskit_assemble_circs(
  File "/home/caitao/anaconda3/lib/python3.8/site-packages/torchquantum/plugins/qiskit_plugin.py", line 40, in qiskit_assemble_circs
    circ = encoder.compose(fixed_layer).compose(measurement)
  File "/home/caitao/anaconda3/lib/python3.8/site-packages/qiskit/circuit/quantumcircuit.py", line 922, in compose
    raise CircuitError(
qiskit.circuit.exceptions.CircuitError: "Trying to compose with another QuantumCircuit which has more 'in' edges."

Don't understand what it means. Could you please help?
Thanks,
Caitao

Hi Caitao,
This is because in when compose the circuit, encoders and fixed_layer don't have classical registers while measurement has. This can work for old versions of qiskit. I have modified the function to explicitly add classical registers to encoders and fixed_layer before compose in the latest version. Please try it out.

Hi Hanrui,
It works now! But I have to copy the function qiskit_assemble_circs(encoders, fixed_layer, measurement)  to mnist_example.py. If not copied, the code will call the old function in the package tq.plugins, which is not updated yet.
Thanks a lot,
Caitao

Hi Caitao,
Great! I think the reason for that is the torchquantum is installed with pip or the --editable is not used when install from source.
Could you try to uninstall the current torchquantum and install with the follow way:
git clone https://github.com/mit-han-lab/torchquantum.git
cd torchquantum
pip install --editable .

In this case, the import will be locating the files in the torchquantum folder so when you update the code in tq, it can be used instantly.
Let me know if you have any questions!

Hi Hanrui,
All issues are solved. Thank you for your help!
Caitao

Great! my pleasure


Authentication firewalls aren't respecting the access_control rules

For the following firewall:
    api:
      pattern:   ^/api
      stateless: true
      guard:
        authenticators:
          - lexik_jwt_authentication.jwt_token_authenticator

This has no effect (still asks for authentication):
  access_control:
    - { path: '^/api/invoice/download/',        roles: IS_AUTHENTICATED_ANONYMOUSLY }

You should add anonymous: true to firewall config

That's it. Sorry and thank you.


OpenFL 6.1.0 asset alpha problem from swf

have tested OpenFL 6.1.0 and discovers that asset's alpha from swf does't works properly, tested in HTML5 target
package;

import openfl.display.Sprite;
import openfl.Assets;

class Main extends Sprite {

	public function new () {

		super ();

		var cube= Assets.getMovieClip ("cubeIU:UICube");
		addChild (cube);

	}
}

cubeIU.zip

Thanks! We'll try and look into it

Awesome to hear this is resolved :smile:
http://community.openfl.org/t/assets-displayobject-alpha-bug-from-swf-in-openfl-6-1-0/9504


Remove _all_of files and imports

Fix #119

The _allOf references are left in openapi.yaml because it would be too much trouble to rearrange the spec. One solution could be to use named OpenAPI schema, but that's just cosmetic and would actually complicate the split specification. This solution would also not remove these extra _allOf schemas that are never used on their own.

The _allOf references are left in openapi.yaml because it would be too much trouble to rearrange the spec. One solution could be to use named OpenAPI schema, but that's just cosmetic and would actually complicate the split specification. This solution would also not remove these extra _allOf schemas that are never used on their own.


[ASCII-2336] Build the Default source tree once config is Ready for usage

What does this PR do?
Build the default source of the config model by inserting all keys from BindEnv, SetKnown and SetDefault. Insert values from SetDefault during this process. Once the config is built, these three methods should not be called again.
Motivation
Removing our dependency on viper.
Describe how to test/QA your changes
Run with envvar DD_CONF_NODETREEMODEL=enable. Config will be built, but the agent won't sucessfully run, as this feature is a work in progress.
Possible Drawbacks / Trade-offs
Additional Notes

Pushed some commits that handle the additional error tracking and rename of SetReady to BuildSchema. I think the other comments will require larger changes which will come in a future PR.

/merge


Ubuntu 20.04 apt update - Temporary failure resolving

Version
Microsoft Windows [version 10.0.19044.1348]
WSL Version

[X] WSL 2
[ ] WSL 1

Kernel Version
4.19.128
Distro Version
Ubuntu 20.04
Other Software
No response
Repro Steps
After installing the ubuntu distribution, I can do sudo apt udate and it gives me.
Get:1 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Get:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
Fetched 214 kB in 17s (12.8 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done

I then added the podman repository in /etc/apt/sources.list : deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04/ /
Now the update gives me
Err:1 http://archive.ubuntu.com/ubuntu focal InRelease
  Temporary failure resolving 'archive.ubuntu.com'
Err:2 http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04  InRelease
  Temporary failure resolving 'download.opensuse.org'
Err:3 http://security.ubuntu.com/ubuntu focal-security InRelease
  Temporary failure resolving 'security.ubuntu.com'
Err:4 http://archive.ubuntu.com/ubuntu focal-updates InRelease
  Temporary failure resolving 'archive.ubuntu.com'
Get:5 http://archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
Fetched 101 kB in 33s (3050 B/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done

Yet
PING download.opensuse.org (<IP_ADDRESS>) 56(84) bytes of data.
64 bytes from download.opensuse.org (<IP_ADDRESS>): icmp_seq=1 ttl=58 time=31.9 ms
64 bytes from download.opensuse.org (<IP_ADDRESS>): icmp_seq=2 ttl=58 time=31.6 ms

If I try with opensuse ip, it's working
Get:1 http://<IP_ADDRESS>/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04  InRelease [1642 B]
Get:2 http://<IP_ADDRESS>/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04  Packages [12.6 kB]
Hit:3 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:4 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Get:5 http://archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
Get:6 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Fetched 229 kB in 18s (12.7 kB/s)
Reading package lists... Done

It seems that it is always working with that 'trick' except, time to time, the same error on one/multiple ubuntu repositories.
I'm working on a corporate laptop behind a proxy and using a vpn.
I never managed to have opensuse repository working with it's name yet a ping is working.  For other coworkers, it's working.
So ... what could be the problem ?
I don't think it has something to do with network/proxy/internet...
But what ?  Something with my laptop ?  Something wrong with wsl2 ?
Expected Behavior
See above
Actual Behavior
See above
Diagnostic Logs
No response

From the output it looks like DNS is failing.
Does putting this:
nameserver <IP_ADDRESS>

in /etc/resolv.conf help ?

With
nameserver <IP_ADDRESS>
Err:1 http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04  InRelease
  Could not resolve 'download.opensuse.org'
Err:2 http://archive.ubuntu.com/ubuntu focal InRelease
  Could not resolve 'archive.ubuntu.com'
Err:3 http://security.ubuntu.com/ubuntu focal-security InRelease
  Could not resolve 'security.ubuntu.com'
Err:4 http://archive.ubuntu.com/ubuntu focal-updates InRelease
  Could not resolve 'archive.ubuntu.com'
Err:5 http://archive.ubuntu.com/ubuntu focal-backports InRelease
  Could not resolve 'archive.ubuntu.com'
Reading package lists... Done

and
ping: download.opensuse.org: Name or service not known
I'm not sure it is a dns problem.  In the apt update with download.opensuse.org I can see Get:5 http://archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
The other 4 ones are failing but that one is working.
 Done

The opensuse has nerver worked but the the ubuntu ones it depends.  Some are working but not always the same.
And I also noticed that even with the opensuse ip, sometimes, one ubuntu is failing.
I don't understand what's happening and how to 'debug' it.

/dupe #8365


Undefined symbols for architecture arm64

Hello, again. I'm following emission in my project. When I tried to archive a release build, an Undefined symbols for architecture arm64 error occurs. Something like this:
Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_RCTRootView", referenced from:
      objc-class-ref in libPegasus.a(PEGComponentViewController.o)
  "_OBJC_CLASS_$_RCTBundleURLProvider", referenced from:
      objc-class-ref in libPegasus.a(Pegasus.o)
  "_OBJC_CLASS_$_RCTBridge", referenced from:
      objc-class-ref in libPegasus.a(Pegasus.o)
  "_OBJC_CLASS_$_RCTConvert", referenced from:

After a little investigation, I found this issue. However, most of the solutions are for pure "react native" apps which were created by RN CLI.
I'm afraid that you may come across this issue, too. Any ideas?

😢 My fault. I wrote the following line in my Podfile.
pod 'React/RCTWebSocket', :configuration => 'Debug'

It breaks the release build. Don't know why though. Removing this line fix the issue. So I'll close the issue.  I know eigen turn off React Native's debug mode. It won't happen in your project. Sorry to bother you.


parentidentifier missing in dockerized pycsw-db

This field is empty, which causes (local) jobs to fail (no filepaths returned by query as all queries specify a collection_id)
@sophieherrmann

This was fixed time ago.


New release

Wondering when the next release will be, thanks!

@nox Could you add the cargo-publish github group as a crate owner? 1.1.5 is ready to be published but I don't have permission.

@jdm I added cargo-publish, but the thing that landed after 1.1.4 is a new feature, so please release 1.2.0 instead.

Done!


Controlling failing builds

I think failing a build might be a task Gulp should handle directly. Currently plugins can throw errors, but this is not really clear as it log a full stack trace an error information while most of this really isn't necessary. The plugin just need the build to fail.
Also, be throwing errors, plugins stop the complete process. This may not always be the best behavior as we'll miss all the other relevant information our other build task could provide.
For example, Gulp-JSHint run linting on each task. Once all files have passed through, it log the reports. If any linting fails, it could just notify the Gulp process (Gulp.failBuild() or anything).
This way, the process continue and other tasks can be runned; like the unit tests and such.
Once all the streams are done, Gulp either exit 0 with success, or then exit 1 logging all tasks who've failed, e.g.
Gulp: Build failed (0/3)
  jshint: Linting errors
  mocha: Tests error
  uglifyjs: Unexpected error

Maybe Gulp could even allow two options for plugins. A minor fail (fail the build, but continu process) and a major fail (fail the build, and stop the current stream process).

So, what is the proper 4.0.0 code to markAsFailed on error?

@techtonik just don't do that part....


"Cannot talk to OWM API, check API key." With a known good API key

What happened?
I've just installed the integration, configured it but don't calculates the daily and hourly run time.
Looking for the logs says that it can't talk to OWM but the API key is good (tested on nodered on the same server).
I'll also take a look in the code if I can find something.
How to reproduce
Install/invoking run time calculations
Relevant log output
2023-09-05 12:08:40.053 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration thermal_comfort which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-09-05 12:08:40.054 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration smart_irrigation which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-09-05 12:08:40.055 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration waste_collection_schedule which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-09-05 12:08:40.056 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-09-05 12:08:40.394 WARNING (MainThread) [homeassistant.components.lovelace] Lovelace is running in storage mode. Define resources via user interface
2023-09-05 12:08:47.110 WARNING (SyncWorker_4) [custom_components.smart_irrigation.OWMClient] Cannot talk to OWM API, check API key.
2023-09-05 12:08:54.601 WARNING (MainThread) [homeassistant.config_entries] Config entry '43048' for luftdaten integration not ready yet: Unable to retrieve data from Sensor.Community; Retrying in background
2023-09-05 12:08:56.764 ERROR (MainThread) [homeassistant.components.sensor] Error adding entities for domain sensor with platform smart_irrigation
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 455, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 731, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 845, in add_to_platform_finish
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 585, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 649, in _async_write_ha_state
    state = self._stringify_state(available)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 591, in _stringify_state
    if (state := self.state) is None:
  File "/config/custom_components/smart_irrigation/sensor.py", line 557, in state
    self._state = self.update_state()
  File "/config/custom_components/smart_irrigation/sensor.py", line 366, in update_state
    data = self.coordinator.data["daily"][0]
TypeError: 'NoneType' object is not subscriptable
2023-09-05 12:08:56.777 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up smart_irrigation platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 312, in _async_setup_platform
    await asyncio.gather(*pending)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 455, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 731, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 845, in add_to_platform_finish
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 585, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 649, in _async_write_ha_state
    state = self._stringify_state(available)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 591, in _stringify_state
    if (state := self.state) is None:
  File "/config/custom_components/smart_irrigation/sensor.py", line 557, in state
    self._state = self.update_state()
  File "/config/custom_components/smart_irrigation/sensor.py", line 366, in update_state
    data = self.coordinator.data["daily"][0]
TypeError: 'NoneType' object is not subscriptable

Which version are you running?
v0.0.82
Diagnostics file

[X] I have attached a diagnostics file

Additional information
config_entry-smart_irrigation-a3d130c174f09bc9002481f3f1bbb388.json.txt

After checking the code I saw that the One Call 3.0 API is utilized, so enabling the subscription resolved the issue.

@gatonero please make sure this in the docs

It's in the doc, but it's unclear. I made a PR (#238) with a propose to make it clearer. I also added a little instruction if someone is scared about the paid api.


Adding "Patterns/Anti-patterns" from official Angular repo ??

Granted this styleguide here starts to be seen as a "GOTO" for architecturing Angular apps (at least it is to me), many might actually not read the few official (so to speak) patterns you will find in official Angular repo
https://github.com/angular/angular.js/wiki/Best-Practices
https://github.com/angular/angular.js/wiki/Anti-Patterns
They are short anyway...
What do you think?

We shouldLink to them at least. Let me look me over and talk to angular folks.
Thanks. Good idea.
John Papa
On Wed, Jul 15, 2015 at 2:44 AM -0700, "fabm22"<EMAIL_ADDRESS>wrote:
Granted this styleguide here starts to be seen as "GOTO" for architecturing Angular apps (at least it is to me), many might actually not read the few official (so to speak) patterns you will find in officail repo
https://github.com/angular/angular.js/wiki/Best-Practices
https://github.com/angular/angular.js/wiki/Anti-Patterns
They are short anyway...
What do you think?
—
Reply to this email directly or view it on GitHub.

I looked them over and did not see anything to grab that was a style we did not already list. But if you feel differently, please make a PR.
Closing


CP-12425: Serialization of GraphML  element as child  node

From unknown CodePlex user on Wednesday, 21 January 2009 12:22:01
The GraphML schema allows user-defined data to be specified at the graph-level (a sibling of the edge and node list), as follows.

<key ... />

<key ... />

Could this be supported in QuickGraph without too much refactoring?

Form unknown CodePlex user on Wednesday, 21 January 2009 12:25:06
I'm not sure offhand what the best model would be for a user to provide this data for serialization and then retrieve it during deserialization.  Deriving a from an existing graph data type, and providing properties with XmlAttribute might work, or exposing a hook into the serializer might work too.

Form unknown CodePlex user on Wednesday, 21 January 2009 21:16:03
Resolved with changeset 30493.


fedimintd dev list-versions subcommand

The server-side work for #4584.
Creates an optional subcommand dev for fedimintd, similar to fedimint-cli.
Adds a single subcommand to dev: list-versions.This dumps all API and database versions and exits early.
Adds two subcommands to dev: list-api-versions and list-db-versions. These dump API and database versions respectively and exit early.
e.g.
FM_BITCOIN_RPC_KIND="bitcoind" FM_BITCOIN_RPC_URL="http://localhost:5002" fedimintd dev list-versions

And here's a sample of the output
{
  "core_api_versions": [
    {
      "major": 0,
      "minor": 2
    }
  ],
  "modules": [
    {
      "kind": "ln",
      "api_versions": [
        {
          "major": 0,
          "minor": 1
        }
      ],
      "database_version": 0
    },
    {
      "kind": "meta",
      "api_versions": [
        {
          "major": 0,
          "minor": 0
        }
      ],
      "database_version": 0
    },
    {
      "kind": "mint",
      "api_versions": [
        {
          "major": 0,
          "minor": 0
        }
      ],
      "database_version": 0
    },
    {
      "kind": "wallet",
      "api_versions": [
        {
          "major": 0,
          "minor": 0
        }
      ],
      "database_version": 0
    }
  ]
}

Unfortunately, the FM_BITCOIN_RPC_KIND and FM_BITCOIN_RPC_URL environment variables still need to be provided because otherwise fedimintd throws an error in Fedimintd::new.
It seems weird that they aren't part of the explicit CLI options but rather grabbed from the environment later:
https://github.com/fedimint/fedimint/blob/11c24a949840b317d52f85e282c1d43cabb2bafe/fedimintd/src/fedimintd.rs#L182
I did consider refactoring this into the ServerOpts struct (clap already supports reading from environment variables), but this doesn't resolve the issue that they are still required fields.
Basically I'd love to be able to do fedimint dev list-versions without any additional args (cli or env-vars), but wasn't sure how to get there. And I thought I'd rather get some feedback on what I've done before proceeding.

Try to keep the format match the existing:
fedimint devimint> fedimint-cli discover-version
{
  "versions": {
    "core": {
      "major": 0,
      "minor": 2
    },
    "modules": {
      "0": {
        "major": 0,
        "minor": 1
      },
      "1": {
        "major": 0,
        "minor": 0
      },
      "2": {
        "major": 0,
        "minor": 0
      },
      "3": {
        "major": 0,
        "minor": 0
      }
    }
  }
}

in particular: modules should be a map (keyed on the kind like you do already, not an id, since we talk about static-support, not the config).
I'm guessing two sub-commands, one for db, the other for api will be the easiest to use for the consuming scripts.

Unfortunately, the FM_BITCOIN_RPC_KIND and FM_BITCOIN_RPC_URL environment variables still need to be provided

The pattern we use in fedimint-cli for same problem is making such fields Option, private, and add a pub $name(&self) -> Result<$type> getter that returns a descriptive error ("$name needs to be provided"). This way we only error out if the field is really needed.

Unfortunately, the FM_BITCOIN_RPC_KIND and FM_BITCOIN_RPC_URL environment variables still need to be provided

The pattern we use in fedimint-cli for same problem is making such fields Option, private, and add a pub $name(&self) -> Result<$type> getter that returns a descriptive error ("$name needs to be provided"). This way we only error out if the field is really needed.

I considered this, but the problem is that the fields are required in Fedimintd::new, so they are needed early on in the initialization process.
https://github.com/fedimint/fedimint/blob/96b93f011815a22d1c022e4751167c2e87302834/fedimintd/src/fedimintd.rs#L183
Would sensible default values make sense here? e.g. FM_BITCOIN_RPC_KIND defaults to "bitcoind" and FM_BITCOIN_RPC_URL defaults to "http://localhost:8332"

This is how the output looks for each subcommand:
$ FM_BITCOIN_RPC_KIND="bitcoind" FM_BITCOIN_RPC_URL="http://localhost:8332" cargo run --quiet --bin fedimintd -- dev list-api-versions
{
  "core": [
    {
      "major": 0,
      "minor": 2
    }
  ],
  "modules": {
    "ln": [
      {
        "major": 0,
        "minor": 1
      }
    ],
    "meta": [
      {
        "major": 0,
        "minor": 0
      }
    ],
    "mint": [
      {
        "major": 0,
        "minor": 0
      }
    ],
    "wallet": [
      {
        "major": 0,
        "minor": 0
      }
    ]
  }
}

$ FM_BITCOIN_RPC_KIND="bitcoind" FM_BITCOIN_RPC_URL="http://localhost:8332" cargo run --quiet --bin fedimintd -- dev list-db-versions
{
  "modules": {
    "ln": 0,
    "meta": 0,
    "mint": 0,
    "wallet": 0
  }
}


Unable to resolve module react-native/Libraries/Renderer/shims/ReactNative ...

Whenever I try to run the RNApp on ios after npm installing I get this error.
Steps to reproduce:
clone repository
cd into meteor app
npm install && meteor
cd into RNApp
npm install && react-native run-ios
Full error:
Unable to resolve module react-native/Libraries/Renderer/shims/ReactNative from /Users/nick/Desktop/react-native-meteor-boilerplate/RNApp/node_modules/react-native-meteor/src/Data.js: Module does not exist in the module map or in these directories:
/Users/nick/Desktop/react-native-meteor-boilerplate/RNApp/node_modules/react-native/Libraries/Renderer/shims

Getting the same error

FWIW, I believe I resolved this by upgrading react native to the newest version using react-native-git-upgrade

Yes. It was a dependency issue. Couldn't get it fixed just by upgrading RN to newest though.
I actually fixed it by using yarn instead of npm!

@nicholaspsmith could you explain further how you used yarn to fix it? I did a 'yarn install' and am still having this same issue.

I gotta go through and update this! Glad you got it working. Did you have to change anything other than doing yarn install instead of npm install?

Delete package.json.lock
delete node modules rm -rf node_modules
then yarn install
Also make sure you are following the compatibility notes:

Since RN 0.26.0 you have to use ws or wss protocol to connect to your meteor server. http is not working on Android.
It is recommended to always use the latest version of react-native-meteor compatible with your RN version.
For RN 0.45.x use version 1.0.6 of 'react-native-meteor'
For RN pre 0.45.x you can use version 1.0.3 in case or problems.
For RN > 0.45 you can use 1.1.x

@nicholaspsmith Unfortunately that doesn't fix it for me. I've tried it on multiple machines.

I feel your pain. Also make sure to clear watchman watches watchman watch-del-all
reset packager cache npm start -- --reset-cache
And just keep deleting node modules and trying different versions.
If you wanted to post a link to your package.json I could compare it to mine.


Added BigStyle (BicPictureStyle and BigTextStyle)

I've added BigStyle options to Android Notifications as I did in Fuse.PushNotifications.
I've created four variables that are sent from backend:

bigTitle
bigBody
notificationStyle (It can be bigpicturestyle or bigtextstyle)
featured_image (URL of the Image that you want to use)

I couldn't compile until I added "Android/ImageDownloaderTask.java:Java:android" to Firebase.Notifications.Android.unoproj.
How can I view the bigpicturestyle or bigtextstyle notification? I received the same way I did without modify the app.
How do I have to structure my notification. this is the way I have structured my notification:
`{
"data": {
"notification": {
"alert": {
"icon": "assets/thing.png",
"bigTitle": "notification title",
"bigBody": "the body of the notification",
"featured_image ": "http://mydomain.com/image.png",
"notificationStyle": "BigTextStyle"
}
	},
	"message": "Push notification message",
	"notificationtype": "noticia",
	"noticia" : {
		"id": "68"
	}

},

"to" : "d6MCUaxl41U:........_guDVvbIFi"

}`

@oscarcge Hello, I've forgotten to push Firebase.Notifications.Android.unoproj. I've update this pull request with all the last things I've done. You've got an error in your JSON:
body: JSON.stringify({
                registration_ids: [regID],
                data: {
                    title: 'Well would ya look at that!',
                    body: 'Hello from some other app',
                    whatever: 'anything you like'
                }
            })

You can write data or notification inside body. But the structure you wrote is for Fuse.PushNotifications. Another thing, Title and Body properties are obligatory. bigTitle, bigBody, featuredImage (I've changed featured_image to featuredImage, every name in the same style) and notificationStyle are all optionals.
bigTitle and bigBody are the title and body that appears when you dropdown the notification with your fingers.
Last thing, notificationStyle can be "bigtextstyle" or "bigpicturestyle", all lower case to avoid error with the capitalize letters.

Hi Clebal, now it's working!!!!!
The problem was the structure of the data as you mentioned.
This is my new structure:
{
"registration_ids": ["regID"],
"data": {
"title": "Well would ya look at that!",
"body": "Hello from some other app",
"bigTitle": "Big title notification title",
"bigBody": "Big body text from some other app.",
"featuredImage": http://mydomain.com/image.png",
"notificationStyle": "bigpicturestyle"
}
}
Can i subscribe users to topics with Fuse.Firebase? if yes, how can i do that?
Thank you for taking your time to help me, i really appreciate it :)

@oscarcge I don't know if I understood you, but I'll try to answer your question. If you mean that you want to send notifications to a specific group of user that are subscribed to a topic, in your backend you should manage differents regID arrays that contains the  subscribed user's ID. If you have Topic1 and Topic2, you should save two arrays regIDTopic1 and regIDTopic2, when a user suscribes to the topic, you should send the ID to the backend and save it in the specific array, and when you send the notifications, in registration_ids, you should put the specific array which contains the subscribed  users' ID to that topic.

@Clebal that's the way I was thinking implement it, I thought there were another way. Thanks for reply.

Hi @Clebal, it's me again :)
Is there a way to put icons in the notification like twitter do with specific actions with this library. check the example below.

Hello @oscarcge, that is a custom notifications, it means that it's not a native option that Android offers, it's made using a custom view to create the notification. For that, you've to add java code. I've never made something like that in Fuse, I think it's possible but I can't help you more.
https://developer.android.com/guide/topics/ui/notifiers/notifications.html#CustomNotification

@Clebal Thanks again for the help, this is the information I was looking for.

I want to merge this, can you confirm it is still working @jesusmartinoza?


Fix theme inline script

📑 Description

There is a scenario when users take CSP (Content Security Policy) into consideration and 'unsafe-inline' is usually not included in 'default-src' and 'script-src' for safety. For example, they configure CSP in svelte.config.js:
const config = {
	kit: {
		csp: {
			mode: 'auto',
			directives: {
				'default-src': ['self'],
				'script-src': ['self'],
				'style-src': ['self', 'unsafe-inline'],
			}
		}
	}
};

Then an error will appear in the console because the <DarkMode> component directly insert the inline script in the <head>:

We can move the script into the onMount code block and frameworks like SvelteKit will automatically add a hash or a nonce onto the script.

✅ Checks

[x] My pull request adheres to the code style of this project
[ ] My code requires changes to the documentation
[ ] I have updated the documentation as required
[ ] I have checked the page with https://validator.unl.edu/
[x] All the tests have passed
[x] My pull request is based on the latest commit (not the npm version).

<!--

Sync fork from GitHub dropdown and update your local branch.

```sh
git pull origin main
git checkout your-branch
git rebase main
npm run test
git push
```

Then create a PR from your GitHub repo.

Or if you are using the command line:

```sh
git checkout main
git fetch upstream // I'm assuming you set the upstream
git merge upstream/main
```

Then change to your branch:

```sh
git checkout my-new-feature
git merge main
```

If you may need to resolve merge conficts if your local branch had unique commits.

Now you are ready to submit your PR.

It’s a good idea to sync from time to
time, so you aren’t left too far behind the parent branch.

--

Flowbite-Svelte is a UI library and I think each users are responsible for the configuration.
https://kit.svelte.dev/docs/configuration

Flowbite-Svelte is a UI library and I think each users are responsible for the configuration. https://kit.svelte.dev/docs/configuration

I get it but that's basically asking SvelteKit users to forfeit security for dark mode.
I'm currently using my own solution since I'm not going to downgrade security for a convenience
but I think it'd be at least nice to write a warning in the docs for SvelteKit + strict CSP users.
Again, I understand implementing a solution for a meta-framework may be out of scope for a UI library, but a warning would be nice :)


How to translate with pretrained model

I'd like to run English - Spanish translation. I followed transformers guide and as I understand I need a custom pipeline for inference.
Are there any resources which might help with that?

Hello!
I think your question is more suitable to Transformers repository: https://github.com/huggingface/transformers
Also keep in mind that for translation you would need a Encoder-Decoder like architecture, while BERT itself is just an encoder. The following link maybe helpful: https://medium.com/huggingface/encoder-decoders-in-transformers-a-hybrid-pre-trained-architecture-for-seq2seq-af4d7bf14bb8
Good luck!


Adds access key based auth (Issue # 7)

Add an access key in the config file, and pass it as GET parameter to
authenticate. Returns 401 if bad auth.

Signed-off-by: Sourya Vatsyayan<EMAIL_ADDRESS>

Closes PR #10


Fix grammar for the verb 'tends'

"One tends to (do something)", rather than "one tend to (do something)"

Thanks


Improved pvp

Added sounds and particles to pvp. Also added different types of hits, like critical and extra knockback.

Looks goo then.
Thanks @Alvsch


update document of sumologic-fluentd

What this PR does / why we need it:
Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #
Special notes for your reviewer:

/lgtm

/assign @mattfarina

My changes won't cause the test fail. It's because the chart needs sumologic.collectorUrl
helm install --name my-release \
    --set sumologic.collectorUrl=YOUR-URL-HERE stable/sumologic-fluentd

/lgtm


Support updating packages in the LibraryManagerRestore msbuild task.

I'd like to include a script in a common package used by several web applications. I was able to accomplish this with libman and a razor class library but to improve upon that I was hoping that when the package was built it would update the library to it's latest published version. I could add this by installing/calling the global tool "libman update @sentry/browser" prior to building, but it would seem like a good fit for the LibraryManagerRestore build task. Is that possible?
Thanks!

Using the build task, I think it would work if you installed using the latest version, e.g. @sentry/browser@latest in the libman.json file.  Each time you build, it should check for the latest version of the library and install it.
Obviously, this makes your build indeterministic since the result will depend on the state of the world at the time you build.


Fix incorrect check logic for state_forget_sig gate

State_forget_sig does not have Split operation as an input.
Instead it has Add operation and Add has a Split.
Signed-off-by: Jiyoung Yun<EMAIL_ADDRESS>Related issue : #21473

I signed it!

@jyoungyun could you add a test perhaps? That would make it easier to make sure it's right.

Nagging Reviewer @aselle: You have been added as a reviewer to this pull request. Please add your review or reassign. It has been 14 days with no activity and the awaiting review label has been applied.

@drpngx I added new patch for verifying my changes using python script. You can test this python script below commands.
$ python lstm_test.py --toco [toco location] --use_frozen_graph

When I tested this python script using original toco, it failed to find LstmCell:
tensorflow/contrib/lite/testing$ python lstm_test.py --toco [Original TOCO]/tensorflow/bazel-bin/tensorflow/contrib/lite/toco/toco --use_frozen_graph
========================
Not found 'LstmCell'
========================

But when I used this PR, the result was like below:
tensorflow/contrib/lite/testing$ python lstm_test.py --toco [applied this PR]/bazel-bin/tensorflow/contrib/lite/toco/toco --use_frozen_graph
========================
Found 'LstmCell'
========================

Also you can save the Graphviz dot or tflite file if you use --save_dot or --save_tflite.
Please take a look and leave comments.

Using original toco:
Number of all operator types: 7
	CONCATENATION                         :    2 	 (instrs: 0)
	FULLY_CONNECTED                       :    2 	 (instrs: 1,629,729,558,528)
	SPLIT                                 :    2 	 (instrs: ???)
	LOGISTIC                              :    5 	 (instrs: ???)
	TANH                                  :    4 	 (instrs: ???)
	MUL                                   :    5 	 (instrs: ???)
	ADD                                   :    2 	 (instrs: ???)
Number of all operators                       :   22 	 (total instrs: 1,629,729,558,528)

Using this PR:
Number of all operator types: 7
	CONCATENATION                         :    1 	 (instrs: 0)
	FULLY_CONNECTED                       :    1 	 (instrs: 814,864,779,264)
	SPLIT                                 :    1 	 (instrs: ???)
	LOGISTIC                              :    2 	 (instrs: ???)
	TANH                                  :    2 	 (instrs: ???)
	MUL                                   :    2 	 (instrs: ???)
	LSTM                                  :    1 	 (instrs: ???)
Number of all operators                       :   10 	 (total instrs: 814,864,779,264)

@drpngx Could you review this PR? Thanks in advance.

@aselle could you take another look?

Nagging Reviewer @aselle: You have been added as a reviewer to this pull request. Please add your review or reassign. It has been 14 days with no activity and the awaiting review label has been applied.

Nagging Reviewer @aselle: You have been added as a reviewer to this pull request. Please add your review or reassign. It has been 29 days with no activity and the awaiting review label has been applied.

Nagging Reviewer @aselle: You have been added as a reviewer to this pull request. Please add your review or reassign. It has been 44 days with no activity and the awaiting review label has been applied.

Nagging Reviewer @aselle: You have been added as a reviewer to this pull request. Please add your review or reassign. It has been 59 days with no activity and the awaiting review label has been applied.

Nagging Reviewer @aselle: You have been added as a reviewer to this pull request. Please add your review or reassign. It has been 74 days with no activity and the awaiting review label has been applied.

Nagging Reviewer @aselle: You have been added as a reviewer to this pull request. Please add your review or reassign. It has been 89 days with no activity and the awaiting review label has been applied.

Nagging Reviewer @aselle: You have been added as a reviewer to this pull request. Please add your review or reassign. It has been 15 days with no activity and the awaiting review label has been applied.

Nagging Reviewer @aselle: You have been added as a reviewer to this pull request. Please add your review or reassign. It has been 30 days with no activity and the awaiting review label has been applied.

Nagging Reviewer @aselle: You have been added as a reviewer to this pull request. Please add your review or reassign. It has been 45 days with no activity and the awaiting review label has been applied.

Nagging Reviewer @aselle: You have been added as a reviewer to this pull request. Please add your review or reassign. It has been 60 days with no activity and the awaiting review label has been applied.

Nagging Reviewer @aselle: You have been added as a reviewer to this pull request. Please add your review or reassign. It has been 75 days with no activity and the awaiting review label has been applied.

Nagging Reviewer @aselle: You have been added as a reviewer to this pull request. Please add your review or reassign. It has been 89 days with no activity and the awaiting review label has been applied.

Nagging Reviewer @aselle: You have been added as a reviewer to this pull request. Please add your review or reassign. It has been 104 days with no activity and the awaiting review label has been applied.

@achowdhery @rthadur Do you have a plan to review this PR?

Nagging Reviewer @achowdhery: You have been added as a reviewer to this pull request. Please add your review or reassign. It has been 14 days with no activity and the awaiting review label has been applied.

Could you please add another reviewer? I won't likely have time to do this
in the near future
On Wed, May 29, 2019, 9:28 AM Alfred Sorten Wolf<EMAIL_ADDRESS>wrote:

Nagging Reviewer @achowdhery https://github.com/achowdhery: You have
been added as a reviewer to this pull request. Please add your review or
reassign. It has been 14 days with no activity and the awaiting review
label has been applied.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/tensorflow/tensorflow/pull/21474?email_source=notifications&email_token=AE75E3PWGADOZILHO6SQ5R3PX2AHLA5CNFSM4FOOPBCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWPJXDA#issuecomment-496933772,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AE75E3JH4IJU6KSQRIHTK2TPX2AHLANCNFSM4FOOPBCA
.

I have successfully converted to LSTM op without this patch by using BasicRNNCell.

Sure thing. I will make a change soon.
On Fri, 28 Jun 2019 at 15:37 Yu-Cheng Ling<EMAIL_ADDRESS>wrote:

@miaout17 requested changes on this pull request.
I haven't noticed this pull request until now.
@jyoungyun https://github.com/jyoungyun Sorry for the long review
process.
If you're still pursuing this pull request, could you rebase the change
into tensorflow/lite/ (all the code was moved out of contrib/)
In tensorflow/contrib/lite/testing/lstm_test.py
https://github.com/tensorflow/tensorflow/pull/21474#discussion_r298466793
:

@@ -0,0 +1,274 @@
+import argparse

Instead of adding a whole new file, could you add the test case into the
existing generated examples test?
https://github.com/tensorflow/tensorflow/blob/e0d9dfd54b0f2f4a2a6637268aa176d1701ee8e9/tensorflow/lite/testing/generate_examples_lib.py#L3320
The test is runnable by
bazel test //tensorflow/lite/testing:zip_test_lstm

In tensorflow/contrib/lite/testing/lstm_test.py
https://github.com/tensorflow/tensorflow/pull/21474#discussion_r298467367
:

   input_tensors = [(input_tensor.name.split(":")[0],

                     input_tensor.get_shape(), input_tensor.dtype)

                    for input_tensor in inputs]

   output_tensors = [normalize_output_name(out.name) for out in outputs]

   graph_def = freeze_graph(

       sess,

       tf.global_variables() + inputs + outputs) if FLAGS.use_frozen_graph else sess.graph_def

   model_binary = toco_convert(

       graph_def.SerializeToString(), input_tensors, output_tensors)

   # Check if `LstmCell` is contained

   print("========================")

   if 'label=\"LstmCell\"' in model_binary.decode('utf-8'):

     print("Found 'LstmCell'")

   else:

It's not always safe to decode the model to UTF8.
Doesn't the generated example test cover this?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/tensorflow/tensorflow/pull/21474?email_source=notifications&email_token=ABXDSS4LSMWKYOM5MZAJAULP4WWRFA5CNFSM4FOOPBCKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB46CWIY#pullrequestreview-255601443,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABXDSSZMNXVBXWKCRFGSFD3P4WWRFANCNFSM4FOOPBCA
.

Can one of the admins verify this patch?

Hey guys, it's best if someone else reviews this. It seems that it's fine
in principle. @yifeif do you want to take a crack at it?
On Tue, Aug 20, 2019 at 6:30 AM Mellanox Build Bot<EMAIL_ADDRESS>wrote:

Can one of the admins verify this patch?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/tensorflow/tensorflow/pull/21474?email_source=notifications&email_token=AE75E3MTTGJ3BX56DFZPSC3QFPWXNA5CNFSM4FOOPBCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4WIELQ#issuecomment-523010606,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AE75E3MR2RJGSFTHJQGFVCTQFPWXNANCNFSM4FOOPBCA
.

@drpngx I think we're waiting for the author to address the comments.

I'm going to go ahead and close this PR, because it seems to have stalled. If you're still interested in pursing this (and responding to my comments), please feel free to reopen!


Dreamview can't load the map

Hi，Mais：
I have test the project with Apollo 7.0.0. But when I run the commend: python carla_cyber_bridge/run_bridge.py, Dreamview can't load the map, just like this:

And then I stop the Dreamview and restart the Dreamview. I meet the error: failed to start Dreamview.

Just to add, everything before was all good.


Validation isn't performed yet

The usernames and names aren't validated for junk values and special characters.

Assuming that video titles, filenames, and descriptions can include special characters, this should be fixed in the next commit.


fixes #110 avoid race condition when clearing/using assets cache

We're still not entirely sure if it's working or not :) but we're doing our best to test it.

We tried to test it further, and it seems like things are improving when we're applying this change to the released version of Propshaft, but things get odd with the new master version for some reason.
It was already tricky to reproduce so we're a bit stumped.

Hello @gingerlime. Did you guys do any further on this?

I’m no longer working on the codebase so won’t be able to contribute much further with this particular issue unfortunately.


Problem with setting FIREBASE_APP after migrating to FCM v1

Hello folks!
I followed the docs about migrating from legacy GCM/FCM to FCM v1 and, when i do the send test notification, it raises a error 500 and this in the log:
django.core.exceptions.ImproperlyConfigured: Platform FCM, app App-Android does not support the setting: FIREBASE_APP.
Looks like the FIREBASE_APP setting is not supported, what's wrong here?
Thank you in advance!
Enviroment
Python 3.11
Django 4.1.11
Django-Push-Notifications: 3.0.2
Firebase-admin 6.4.0
PS: There's a syntax error in de FCM docs, in the part of

# Import the firebase service
from firebase_admin import auth

# Initialize the default app
default_app = firebase_admin.initialize_app()

you should import firebase admin for using it.

# Import the firebase service
import firebase_admin

# Initialize the default app
default_app = firebase_admin.initialize_app()

3.0.2 is still the old version without "new" FCM v1 API.
Good catch with the doc, thank you :) i'll fix it on the weekend (together with https://github.com/jazzband/django-push-notifications/pull/702#discussion_r1489160018).

Oh, I have migrated ahead of time xD
Thank you, waiting for new version then :)

When is the next release scheduled?


Ruleforge.AddRule errors on rulesetCheck (v0.0.2)

Issue
When using the RuleForge class to add a new rule, an error is thrown. Specifically, the AddRule function in that class throws an error with the message "Ruleset could not be found for this RuleForge (was it removed?)". However, the ruleset was not removed and should have been found.
The function calls a private function rulesetCheck() and this has an incorrect expression in the if statement (this.lastRulesetIndex > -1 should be this.lastRulesetIndex <= -1). As such, the function will error every time the AddRule function is called within RuleForge.
Steps to reproduce

Create a new instance of RuleForge
Call NewRuleset, passing the ruleset name.
Call AddRule, passing the rule name.
Observe that an error is thrown with the message "Ruleset could not be found for this RuleForge (was it removed?)"

Expected behavior
The AddRule function should add a new rule to the ruleset without throwing an error.
Actual behavior
The AddRule function throws an error with the message "Ruleset could not be found for this RuleForge (was it removed?)".
Environment

Operating system: [e.g. Windows 11]
Browser: Edge 111.0.1661.54, Chrome 111.0.5563.147
Library version: 0.0.2

Fix added, ready for v0.0.3.


improve view and add some logic

subsequently, u will need to add a load more comments button to load more comments, ngl if u were to do pagination as it is (like using mat paginator and those fun stuff) u will vomit

like i've said the comments from the backend are paginated, i.e. u will not get all the data at once. apparently, @GnohChengYi is also solving the same problem, u guys may discuss the approach with each other, i think what he did is quite good.

i think u intend the number attached to the anonymous to be in increasing positive integers right, but once i approve the comments in the wrong order, here's the output i got, maybe u want to have a look on that?


feat: node connection state

This is a feature request
Problem
It is problematic for novice people to check if browser node is connected to Waku network
Proposed Solutions
Enable users to easily check online/offline status and maybe other things. Good reference could be current browser behavior.
console.log('Initially ' + (window.navigator.onLine ? 'on' : 'off') + 'line');

window.addEventListener('online', () => console.log('Became online'));
window.addEventListener('offline', () => console.log('Became offline'));

We may want both. I can imagine scenarios where it's more convenient to poll the network status as versus receiving it as an event, and vice-versa.

Is ConnectionManager the right place for this functionality?
Here's what I'm thinking of adding:
  private online: boolean = false;

  public isConnected(): boolean {
    return this.online;
  }

  private toggleOnline(): void {
    if (!this.online) {
      this.online = true;
      this.dispatchEvent(new Event("waku:online"));
    }
  }

  private toggleOffline(): void {
    if (this.libp2p.getPeers().length == 0) {
      this.online = false;
      this.dispatchEvent(new Event("waku:offline"));
    }
  }

toggleOnline would be called at the end of the existing handler for peer:connected, and toggleOffline would be called at the end of the existing handler for peer:disconnected
This assumes that having a single peer is enough to be considered "online". In the future we may change it if need be (e.g. if node is setup to use autosharding, it should be connected to at least one peer for each shard to be considered online)
What I'm not sure about is a clean way to pass an event listener for the newly dispatched events (waku:online and waku:offline) from WakuNode to the ConnectionManager.

Is ConnectionManager the right place for this functionality?

I think for functionality but exposed it should be on the root level as we'd like to have it on the surface.
Overall to me it seems as good approach, I would also use these events.
@danisharora099 what do you think?

I changed the way toggleOffline determines if there are any peers connected, because the array returned by this.libp2p.getPeers() was not updating after peer:disconnected events were dispatched. I added a function to KeepAliveManager that determines if there any connections if any relay or ping timers are present: https://github.com/waku-org/js-waku/pull/1719/files#diff-47f53ecbbc63fddf37d939149e70131b808afe18c0ce785c9033e1f1cf5f18c0R114

ConnectionMnaager seems like the right place to include this. While I see no direct harm with using KeepAliveManager and the pings to gauge connectivity, I'd use libp2p.getConnections() instead.

@danisharora099 I tried using that function but it always returned an array of length 0 after two peer:connect events were dispatched in the test. Maybe the way I'm setting up the preconditions in the test doesn't match production conditions? Is there something that needs to happen besides dispatching a peer:connect event for the connection to be added to the array returned by libp2p.getConnections()? Here's the test: https://github.com/waku-org/js-waku/blob/2e34b07a2effd56cdeace395c6b3510653d10b44/packages/tests/tests/connection_manager.spec.ts#L200

Weekly Update

achieved: modified ConnectionManager to track connection state. exposed through read function and new event
next: resolve any remaining feedback

ConnectionMnaager seems like the right place to include this. While I see no direct harm with using KeepAliveManager and the pings to gauge connectivity, I'd use libp2p.getConnections() instead.

@danisharora099 I tried using that function but it always returned an array of length 0 after two peer:connect events were dispatched in the test. Maybe the way I'm setting up the preconditions in the test doesn't match production conditions? Is there something that needs to happen besides dispatching a peer:connect event for the connection to be added to the array returned by libp2p.getConnections()? Here's the test:
https://github.com/waku-org/js-waku/blob/2e34b07a2effd56cdeace395c6b3510653d10b44/packages/tests/tests/connection_manager.spec.ts#L200

This could be better tested by actually running one nwaku node and dialing it from the js waku node being tested. This should establish an actual connection and it will appear under libp2p.getConnections()
To disconnect, use this function https://github.com/libp2p/js-libp2p/blob/13a870cbef326a3a3b3c55b886c2109feaa2b628/packages/libp2p/src/libp2p.ts#L301

this issue is resolved