text:
Unable to Slice Out A Single Token From All Instances

Hi there, I would like to slice out the SHAP value for a single token from all instances for analysis, like what is shown in the documentation:

However, I am unable to do the same thing for my SHAP values. My SHAP values has a shape of (4, None, 665), which means 4 instances, and each instance has different tokens thus the second is None, 665 labels. I tried the following ways to the all SHAP values for the token 'mix':
shap_values[:, 'mix', 365]
shap_values[:, :, 365][:, 'mix']
shap_values[0][:, 365]['mix']

The first two gives error IndexError: too many indices for array, the third gives error IndexError: tuple index out of range. Could anyone tell me the right way to do it? Thanks!

Yes, it shows the following error message:

if you call type(shap_values) is the output a shap.Explanation object, or are you looking at an actual array of shap values?

It's a shap.Explanation object

Can you try the following and post the outputs:
shap_values.values.shape
shap_values.data.shape
shap_values.feature_names.shape
shap_values.base_values.shape

I am only able to get the shapes for values and base_values:
values.shape: (4, )
base_values.shape: (4, 665)
feature_names.shape: AttributeError: 'list' object has no attribute 'shape'
data.shape: AttributeError: 'tuple' object has no attribute 'shape'

Thanks for checking! As I mentioned in the original post, I infer 4 instances, that is 4 rows of data. I think the reason why .values are of shape (4, ) is because every row has different tokens and thus different number of values, so numpy cannot use a single value to represent the second dimension. Here are the shapes if I select the individual rows:

Here is the actual values:

I am passing a string to the model. My model is a NLP classification model and it takes a string and output a classification. So it's not exactly tuple but similar. The .data object is a tuple of numpy array:

I see, and you can generate other plots with this Explanation object?
The error you're getting seems related to the .output_names parameter of the explanation object. Can you see if this parameter is defined by calling:
shap_values.output_names

Yes, I can generate text plot, waterfall plot, bar plot without an issue.
shap_values.output_names is defined and contains a list of all the outputs:

Hmm. Looking at the particular section of the code that fails here, it looks like it's trying to generate a new Explanation object along a passed index, by iterating over every item in the explanation object.
Since you pass it a string index, it executes the loop that starts on line 340 of _explanation.py. It grabs the dimension of the output_names parameter of the subslice that it is currently looking at (lines 443-447). It finds that len(output_names_dims) ==1. I'm not sure what that means in this context.
From there, it executes this strange line:
t = np.argwhere(np.array(self.output_names) == t)[0][0]
where t is the current indexed slice of the Explanation object that it is iterating over (as far as I can see).
Since it tries to to run a np.argwhere operation over t and grab the [0][0] indices of that array, I think the issue is simply that this operation is not built to deal with arrays that are not 2D. Your explanation object is a 3D array.
Basically, the only thing, I believe, you can do here, is actually modify the source code in this line to add an if-condition here that checks the dimensionality of the explanation object and if that dimensionality is 3 runs this line instead:
``t = np.argwhere(np.array(self.output_names) == t)[0][0][0]`
No guarantee that that will fix it, but it's a possibility.
If you want to do this, you can set up a fresh python environment. Fetch the repository, make your modifications. And then while in the repository, you can call: pip install -e .
This will install the local version of the package as your SHAP version. Then you can try if that works. And if it does, heck, you can make a PR :)
If not, then I probably misread the error.

I see. Guess I need to dive more into the source code then. Thanks for your help!
By the way, do you know why in the documentation (https://shap.readthedocs.io/en/latest/example_notebooks/api_examples/plots/text.html) the slicing works? It's also supposed to be a 3D array since the explainer is run on multiple samples of text...

The example shouldn't be a 3D array, since they slice it like a 2D array:
shap.plots.bar(shap_values[:,"but"])
Unless this is actually possible with a 3D explanation object, in that case you should be able to just call:
shap.plots.bar(shap_values[:, 'mix'])

I see. I just have one last question if you don't mind. My intuition is that in the documentation example, since it's sentiment analysis, probably it selects just one label. I tried this method as well by selecting just one label: shap_values[:, :, 365], and it shrinks down to a 2D array (named test). However, when I try to slice this 2D array with test[:, 'mix'], it says IndexError: too many indices for array. Theoretically if it's an 2D array the code should work right, why it doesn't work in this case?

Full error message:

shap_values[:, :, 365]
what you've done here is you've sliced out all the values for the feature at index 365.
So if you then call test[:, 'mix'], you're trying to slice it along a dimension that no longer exists.
Did you try shap.plots.bar(shap_values[:, 'mix']) jsut to be sure?

Just to clarify, when I do shap_values[:, :, 365], I sliced out all the values for the label at index 365, not the feature. I have 665 labels here. It's a multi-label classification.
Here is what happened when trying shap_values[:, 'mix], same error as above:

I see, this changes things quite a bit. The shap values I'm used to working with are sorted along these dimensions: [rows:features], which is why I suggested the steps I suggested.
Where are the actual features in your object?

The actual features are word tokens, and I converted them using TFIDF before feeding into my NLP model

Yes, what I am asking is whether you know along which dimensions your features (i.e. the shap values for those features) are represented in your explanation object.
Since you are trying to slice the object using a feature ('mix') as an index, it's a relevant question along which dimension your features are represented

Oh sorry I misunderstood your question. Let's say my shap_values has a dimension of (4, None, 665), the second dimension (which has None) represents the dimension of shap values for individual tokens. '4' represents the number of rows, 665 represents the number of labels. Does this answer your question?

Sort of, I'm not sure I understand how a dimension of None can represent values for individual tokens.
Essentially, the problem is this: You are trying to re-arrange the object along an index representing a feature ('mix'), so you need to put that index in the right dimension (the dimension where that index can actually be found). It would seem that dimension is the 2nd dimension, but the shape of that dimension is None, which makes no sense to me

The reason why the second dimension is None, I believe, is because each row has different number of tokens, and thus different number of shap values, as shown in the following image. Therefore, it is impossible to represent the second dimension using a single value. I also have an intuition that this is where the error comes from, but I am confused why it worked in the SHAP document, where it also runs on multiple number of rows of text data, and must also have different number of tokens for each row...

Hmm, If I were you I would run the example from the documentation and inspect that explanation object. It might give you some insight as to what's going on.
Are you using a custom predict function that takes in text and outputs logits like they do (and are you passing it to the explainer)?
def f(x):
    tv = torch.tensor([tokenizer.encode(v, padding='max_length', max_length=500, truncation=True) for v in x]).cuda()
    outputs = model(tv)[0].detach().cpu().numpy()
    scores = (np.exp(outputs).T / np.exp(outputs).sum(-1)).T
    val = sp.special.logit(scores[:,1]) # use one vs rest logit units
    return val

I think the shape of your object is preventing shap from correctly slicing it along the index you're specifying. Since the documentation example is analogous task, you should run it and compare the objects it outputs vs yours.

Yes I have a custom predict function similar to the one in the example. I'll try running it and see if I could get the right thing. Thanks a lot!

I led you on a wrong path in the beginning, so it's the least I can do. Hope it works out

Haha no worries, it is a confusing thing

when can you solve this error???

Hello @slundberg , currently this error is still a problem and even the example itself in the notebook does not work with the latest version of the package. The error happens in slicer's __getitem__ when tracked represents "values", because the tracked.max_dim parameter is smaller than len(slicer_index) and that subsequently results in the error. I believe this is due to how _explanation's __getitem__ handles creating the new_values and new_data objects. The resulting data and values (in the case of the notebook example) are just 1d arrays ['but'] and [-0.0713973339875198] respectively, and these dimensions are smaller than original values and data had. I don't know how to go about fixing this problem though. I would appreciate your help with this! It would be great to have such feature for further analysis of texts by presence of tokens.

authors: KuanWeiBeCool adamhrin remo-help waikoreaweatherpjt

repo: slundberg/shap


text:
OmniAnomaly is unsupervised learning method?

As I have read the paper. The OmniAnomaly is an unsupervised learning method, however, your Server Machine dataset has labels?

Please answer me...

Hi TrinhDinhPhuc,
Sorry for being late. The test-label in the Server Machine Dataset is used for the test of the anomaly detection experiment, and the interpretation-label is for the interpretation experiments (see section 4.5). Note that we use them only for testing and not for training.

Thank you for making it clearer!

source: gharchive/issue

authors: NiuChH TrinhDinhPhuc

repo: smallcowbaby/OmniAnomaly

license: MIT

license_type: permissive

license_source: github-api


text:
Add method result to Database which execute sql query and return resu…

…lt o sql query.
Close #74

@rultor merge

@rultor merge

@rultor hello

@rultor hello

source: gharchive/pull-request

repo: smallcreep/cucumber-seeds

license: mit

license_source: bigquery


text:
🛑 [DONATION] AmbisCamp Moodle (tunnel) is down

In cde92bf, [DONATION] AmbisCamp Moodle (tunnel) (https://ambiscamp-cbt.sman3palu.sch.id) was down:

HTTP code: 502
Response time: 955 ms

Resolved: [DONATION] AmbisCamp Moodle (tunnel) is back up in 75b7c67 after 7 minutes.

repo: smantriplw/uptime-services


text:
Scroll Bar Bug during Pre-Loader

fix #882

@karelmolina Could you please get assigned to a particular issue before raising the PR so that the other mentees are aware that you working on this.

authors: karelmolina smaranjitghose


text:
Reconcile package name with repo name

I think it'd be good to rename the repo to smart-health-card-decoder or the package to shc-decoder. @ljoy913 does this make sense, and do you have a preference?

I does make sense; I prefer the longer 'smart-health-card-decoder' name.

Done! GitHub should keep the old repository name working for links/git-configs that already exist.

repo: smart-on-fhir/shc-decoder


text:
Navabar on mobile

Test and fix navbar on mobile
NOTE: the branch needs to be merged into a new branch called "redesign" otherwise it will break the live site!
AC:

[x] Change the colour of the "hamburger icon" and the "x" icon when using mobile
[x] Make sure the navbar works correctly on the homepage
[x] Make sure the navbar works correctly on blog layout (more precisely that the sticky part of it is NOT applied on mobile)
[x] Maker sure the navbar works correctly on the default layout

#275 closes this as the major changes which had to do with menu and close icon was changed here as requested then.

I believe this issue can be closed!


text:
Ignore failed json unmarshalling in log message checking

Anytime someone uses %+v to format logs in the default go fmt way this would fail

Codecov Report

Merging #617 (16030c8) into main (347dc9a) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #617   +/-   ##
=======================================
  Coverage   33.05%   33.05%
=======================================
  Files           6        6
  Lines         357      357
=======================================
  Hits          118      118
  Misses        229      229
  Partials       10       10

authors: codecov-commenter tateexon


text:
CLA on Amoy

https://documentation-git-fork-thedriftofwords-aut-c97e08-chainlinklabs.vercel.app/chainlink-automation/overview/automation-release-notes
https://documentation-git-fork-thedriftofwords-aut-c97e08-chainlinklabs.vercel.app/chainlink-automation/overview/supported-networks#amoy-testnet

Also, could we use https://amoy.polygonscan.com/ as the explorer?

Yes I have that in #1904

https://automation.chain.link/polygon-amoy is live

repo: smartcontractkit/documentation


text:
Use :exception for protect_from_forgery

Why: To better protect the admin interface.

Coverage remained the same at 97.536% when pulling a32d344140d1c119784086c007f3a353e6d187ea on fix-hakiri-warning into 61d7264a2b83a4c8e5708bf9e66955098a851e0e on master.

Coverage remained the same at 97.536% when pulling a32d344140d1c119784086c007f3a353e6d187ea on fix-hakiri-warning into 61d7264a2b83a4c8e5708bf9e66955098a851e0e on master.

authors: coveralls monfresh

repo: smcgov/ohana-api-smc


text:
Convenience methods for common use cases

I've been using PureLayout/UIView+AutoLayout for a long time now, and it's fantastic. Two of the most common use cases I've found to be simply pinning all edges to the superview edges and pinning exclusively to opposite edges. The first case is somewhat handled with iOS 8's layoutMargins, but still requires some additional configuration and is unavailable on iOS 7.
I've written a few additional methods, mostly pertaining to the pinning of edges along an axis. I'd love to see them incorporated in the project.
https://gist.github.com/pfleiner/ff11d7fa5c0d796366a1

Hi Paul,
Thanks for these suggestions! It's great to see suggestions for new API based on real world use cases (a while back in #12 there was a similar example).
Anyways, for your suggested additions, I completely understand the use cases for all of them.
The general guideline I have followed is that each new method on the public API should do one of the following:

Solve a completely new use case
Simplify an existing use case that requires 3 or more lines of code
Provide a version of an existing method but with more/less parameters

These aren't hard and fast rules, but the general idea is to be fairly judicious about expanding the public API to avoid making it unwieldy and overly complicated.
In this case, I am in agreement that the method autoPinEdgesToSuperviewEdges would be useful. This falls under the last bullet point above. Typically this is done with the current API by just calling [view autoPinEdgesToSuperviewEdgesWithInsets:UIEdgeInsetsZero]. But I think it does make sense to expose this variant that defaults to zero insets.
As far as the other 3 methods you proposed, each of those is responsible for reducing 2 lines of code into 1. While I agree that they are useful, I don't think they provide enough value on their own to justify increasing the public API surface. (The reason that this API exists is because it just barely crosses the threshold of the second bullet.)
What do you think?

I would definitely appreciate not typing UI/ALEdgeInsetsZero quite so much!
Ah, ok, I wasn't aware of the 3 line guideline. In that case, I've found that almost every time I'm pinning a subview to two edges on an axis, I'm also aligning the axes as well. Not sure how broad of a use case that is, but I've found myself using it time and time again.

The 3-line guideline is just something I have personally adhered to...it's not a published rule or anything.
And the methods you shared only pin 2 edges, they aren't also aligning -- did you mean to suggest something like a one-line call that does all of this?
[view1 autoPinEdgeToSuperviewEdge:ALEdgeLeading];
[view1 autoPinEdgeToSuperviewEdge:ALEdgeTrailing];
[view1 autoAlignAxisToSuperviewAxis:ALAxisVertical];

If so, that last constraint is actually not necessary. The horizontal layout is fully specified by just the first 2 constraints.

I meant aligning the subview to the same axis to which it's edges are being pinned:
[view1 autoPinEdgeToSuperviewEdge:ALEdgeLeading];
[view1 autoPinEdgeToSuperviewEdge:ALEdgeTrailing];
[view1 autoAlignAxisToSuperviewAxis:ALAxisHorizontal];

could be reduced to
[view1 autoAlignAndPinEdgesToSuperviewEdgesOnAxis:ALAxisHorizontal];

or
[view1 autoPinEdgesToSuperviewEdgesOnAxis:ALAxisHorizontal alignment:YES];

Just typing these methods out, however, they seem pretty specific, and including any additional parameters would be a pain. Plus there's the matter of returning the array of constraints in an intuitive order. I'm not necessarily lobbying for this exactly, I guess I'm mainly interested hearing how you'd approach it.

Oh, I see what you mean. Yeah, I don't think that this is common or general enough for a new API. I do think that this is a perfectly reasonable extension to use in your own code though, if you do find it coming up!

Thanks again for the suggestions!!

authors: pfleiner smileyborg

repo: smileyborg/PureLayout


text:
aptly publish crashes on corrupt deb file

I'm using aptly to maintain local mirror(s) of several apt repositories. The workflow is as follows:  update mirror, create timestamped snapshot, publish snapshot.
The aptly publish snapshot crashes and leaves ./public directory in inconsistent state when mirror contains corrupt deb file. The public/dists directory is created but empty. The public/pool contain packages aptly processed before crash. Aptly itself does not consider snapshot published.
I have looked into documentation and did not find a way to either automatically verify deb package correctness or filter out single package/version combination from snapshot or publish to work around the issue (external repo and its content is out of my control).
I can see several ways to solve this issue. All of them assume that we would rather have incomplete, but functional apt repository mirror than no mirror at all:

aptly mirror update can check for corrupt packages and does not mirror them
aptly snapshot create ... can check for corrupt packages and not include them
aptly publish ... can check for corrupt packages and not publish them

Should automated approach be undesirable, manual check of package(s) integrity and purging them from mirror would help here. That way I would be able to update mirror and purge corrupted packages before snapshoting and publishing.
The error I get on corrupted package:
You can run 'aptly publish snapshot mesosphere-jessie_2016-09-13T0838' to publish snapshot as Debian repository.
Loading packages...
Generating metadata files and linking package files...
panic: unable to read .tar archive from /srv/aptly/pool/1e/69/marathon_0.15.7-1.0.501.debian81_amd64.deb: unexpected EOF [recovered]
        panic: unable to read .tar archive from /srv/aptly/pool/1e/69/marathon_0.15.7-1.0.501.debian81_amd64.deb: unexpected EOF

goroutine 1 [running]:
panic(0xbc7cc0, 0xc82000e750)
        /usr/lib/go/src/runtime/panic.go:464 +0x3e6
github.com/smira/aptly/cmd.Run.func1(0xc82046dee8)
        /build/aptly-0.9.7/src/github.com/smira/aptly/cmd/run.go:16 +0x7f
panic(0xbc7cc0, 0xc82000e750)
        /usr/lib/go/src/runtime/panic.go:426 +0x4e9
github.com/smira/aptly/deb.(*Package).CalculateContents(0xc820af8f00, 0x7f9415280080, 0xc8200103c0, 0x0, 0x0, 0x0)
        /build/aptly-0.9.7/src/github.com/smira/aptly/deb/package.go:427 +0x1b3
github.com/smira/aptly/deb.(*PackageCollection).loadContents(0xc820010460, 0xc820af8f00, 0x7f9415280080, 0xc8200103c0, 0x0, 0x0, 0x0)
        /build/aptly-0.9.7/src/github.com/smira/aptly/deb/package_collection.go:183 +0x37b
github.com/smira/aptly/deb.(*Package).Contents(0xc820af8f00, 0x7f9415280080, 0xc8200103c0, 0x0, 0x0, 0x0)
        /build/aptly-0.9.7/src/github.com/smira/aptly/deb/package.go:410 +0x75
github.com/smira/aptly/deb.(*ContentsIndex).Push(0xc82043e1e8, 0xc820af8f00, 0x7f9415280080, 0xc8200103c0)
        /build/aptly-0.9.7/src/github.com/smira/aptly/deb/contents.go:26 +0x4a
github.com/smira/aptly/deb.(*PublishedRepo).Publish.func1(0xc820af8f00, 0x0, 0x0)
        /build/aptly-0.9.7/src/github.com/smira/aptly/deb/publish.go:568 +0x8c6
github.com/smira/aptly/deb.(*PackageList).ForEachIndexed(0xc8200139c0, 0xc82046d4d8, 0x0, 0x0)
        /build/aptly-0.9.7/src/github.com/smira/aptly/deb/list.go:169 +0xed
github.com/smira/aptly/deb.(*PublishedRepo).Publish(0xc82019a680, 0x7f9415280080, 0xc8200103c0, 0x7f9415280138, 0xc820135a20, 0xc820206240, 0x7f9415280028, 0xc820202ea0, 0x7f94152800c8, 0xc8200db290, ...)
        /build/aptly-0.9.7/src/github.com/smira/aptly/deb/publish.go:593 +0x113c
github.com/smira/aptly/cmd.aptlyPublishSnapshotOrRepo(0xc8201bcb40, 0xc8201bbce0, 0x1, 0x2, 0x0, 0x0)
        /build/aptly-0.9.7/src/github.com/smira/aptly/cmd/publish_snapshot.go:145 +0x14fe
github.com/smira/commander.(*Command).Dispatch(0xc8201bcb40, 0xc8201bbce0, 0x2, 0x2, 0x0, 0x0)
        /build/aptly-0.9.7/src/github.com/smira/aptly/_vendor/src/github.com/smira/commander/commands.go:305 +0x647
github.com/smira/commander.(*Command).Dispatch(0xc8201bcea0, 0xc8201bbcd0, 0x3, 0x3, 0x0, 0x0)
        /build/aptly-0.9.7/src/github.com/smira/aptly/_vendor/src/github.com/smira/commander/commands.go:283 +0x1f0
github.com/smira/commander.(*Command).Dispatch(0xc8201bd680, 0xc8201bbcc0, 0x4, 0x4, 0x0, 0x0)
        /build/aptly-0.9.7/src/github.com/smira/aptly/_vendor/src/github.com/smira/commander/commands.go:283 +0x1f0
github.com/smira/aptly/cmd.Run(0xc8201bd680, 0xc82009e010, 0x4, 0x4, 0xdbb901, 0x0)
        /build/aptly-0.9.7/src/github.com/smira/aptly/cmd/run.go:40 +0x19a
main.main()
        /build/aptly-0.9.7/src/github.com/smira/aptly/main.go:9 +0x73

Same issue seen mirroring the raspian repository (I've seen this reported on Google Groups also).
aptly version: 0.9.7
adminx@server1:~$ aptly publish snapshot rasp_snapshot
Loading packages...
Generating metadata files and linking package files...
panic: unable to ungzip data.tar.gz from /home/adminx/.aptly/pool/b6/f1/linux-source-3.10_3.10.11-1+rpi7_all.deb: gzip: invalid header [recovered]
panic: unable to ungzip data.tar.gz from /home/adminx/.aptly/pool/b6/f1/linux-source-3.10_3.10.11-1+rpi7_all.deb: gzip: invalid header
goroutine 1 [running]:
panic(0xbc7cc0, 0xc8524cf6a0)
/usr/lib/go/src/runtime/panic.go:464 +0x3e6
github.com/smira/aptly/cmd.Run.func1(0xc821117f18)
/build/aptly-0.9.7/src/github.com/smira/aptly/cmd/run.go:16 +0x7f
panic(0xbc7cc0, 0xc8524cf6a0)
/usr/lib/go/src/runtime/panic.go:426 +0x4e9
github.com/smira/aptly/deb.(*Package).CalculateContents(0xc823183980, 0x7f3c7c688c70, 0xc8201968a0, 0x0, 0x0, 0x0)
/build/aptly-0.9.7/src/github.com/smira/aptly/deb/package.go:427 +0x1b3
github.com/smira/aptly/deb.(*PackageCollection).loadContents(0xc820196be0, 0xc823183980, 0x7f3c7c688c70, 0xc8201968a0, 0x0, 0x0, 0x0)
/build/aptly-0.9.7/src/github.com/smira/aptly/deb/package_collection.go:183 +0x37b
github.com/smira/aptly/deb.(*Package).Contents(0xc823183980, 0x7f3c7c688c70, 0xc8201968a0, 0x0, 0x0, 0x0)
/build/aptly-0.9.7/src/github.com/smira/aptly/deb/package.go:410 +0x75
github.com/smira/aptly/deb.(*ContentsIndex).Push(0xc821c35b30, 0xc823183980, 0x7f3c7c688c70, 0xc8201968a0)
/build/aptly-0.9.7/src/github.com/smira/aptly/deb/contents.go:26 +0x4a
github.com/smira/aptly/deb.(*PublishedRepo).Publish.func1(0xc823183980, 0x0, 0x0)
/build/aptly-0.9.7/src/github.com/smira/aptly/deb/publish.go:568 +0x8c6
github.com/smira/aptly/deb.(*PackageList).ForEachIndexed(0xc821b36000, 0xc821117508, 0x0, 0x0)
/build/aptly-0.9.7/src/github.com/smira/aptly/deb/list.go:169 +0xed
github.com/smira/aptly/deb.(*PublishedRepo).Publish(0xc8201cd380, 0x7f3c7c688c70, 0xc8201968a0, 0x7f3c7c688d28, 0xc8201d4000, 0xc820234340, 0x7f3c7c688c18, 0xc82062b080, 0x7f3c7c688cb8, 0xc8203d6300, ...)
/build/aptly-0.9.7/src/github.com/smira/aptly/deb/publish.go:593 +0x113c
github.com/smira/aptly/cmd.aptlyPublishSnapshotOrRepo(0xc8201fd9e0, 0xc8201c6860, 0x1, 0x2, 0x0, 0x0)
/build/aptly-0.9.7/src/github.com/smira/aptly/cmd/publish_snapshot.go:145 +0x14fe
github.com/smira/commander.(*Command).Dispatch(0xc8201fd9e0, 0xc8201c6860, 0x1, 0x2, 0x0, 0x0)
/build/aptly-0.9.7/src/github.com/smira/aptly/_vendor/src/github.com/smira/commander/commands.go:305 +0x647
github.com/smira/commander.(*Command).Dispatch(0xc8201fdd40, 0xc8201c6850, 0x2, 0x3, 0x0, 0x0)
/build/aptly-0.9.7/src/github.com/smira/aptly/_vendor/src/github.com/smira/commander/commands.go:283 +0x1f0
github.com/smira/commander.(*Command).Dispatch(0xc8201c85a0, 0xc8201c6840, 0x3, 0x4, 0x0, 0x0)
/build/aptly-0.9.7/src/github.com/smira/aptly/_vendor/src/github.com/smira/commander/commands.go:283 +0x1f0
github.com/smira/aptly/cmd.Run(0xc8201c85a0, 0xc82000a210, 0x3, 0x3, 0xdbb901, 0x0)
/build/aptly-0.9.7/src/github.com/smira/aptly/cmd/run.go:40 +0x19a
main.main()
/build/aptly-0.9.7/src/github.com/smira/aptly/main.go:9 +0x73

thanks for the report, could you please give me link to the package which crashes aptly, so that I could reproduce it?

Found that package, problem is:
$ file data.tar.gz
data.tar.gz: POSIX tar archive (GNU)

Hi, just retured to work following the weekend. By the sounds of it you've enough info now but let me know if you need anything reproducing. Thanks.

I'm looking for workaround to help aptly handle broken packages. I'll post PR soon

aptly_0.9.8~dev+66+g4eef4f1 published to nightly

authors: mjramtech smira zdenekc

repo: smira/aptly


text:
Convert new-group-actions/gitlab-cicd-crash-course to GitHub Actions

Pipeline migrated from GitLab :tada:

migration

repo: smita-ss/gitlab-cicd-crash-course


text:
Add missing configuration/features to Smithy build plugin

The number and complexity of CLI arguments are getting out of hand. We already have an alternate interface into the code generation logic as a Smithy build plugin, which supports configuration via a smithy-build.json. It also supports standard Smithy features such as projections because it hooks into the full Smithy model building pipeline.
This task is to add the missing necessary configuration knobs to our smithy-build.json configuration handler so that we can migrate off the CLI.

Note the scope of this issue is only for CLI options that are relevant in --aws-sdk mode, since we only have the dafny-client-plugin plugin so far. Some options will only be needed for the dafny-library-plugin we have yet to create: https://github.com/smithy-lang/smithy-dafny/issues/153

Here is some more detail on the scope of this task vs. future ones.
One key difference between the CLI and the Smithy build plugin is how they use input and output. The CLI has options like --library-root pointing to the source code directory, and options like --output-java that allow it to write code anywhere on disk. The Smithy CLI/Gradle plugin only gives Smithy build plugins parsed/resolved/validated Smithy models as input, and expects output to only be written to a build directory like build/sources/dafny-client-plugin.
I believe the best way to bridge this gap is with an additional shared Gradle plugin that can be executed after invoking the smithy-gradle-plugin task to build a model. This plugin would provide the connection between the contents of a directory that the Smithy build plugin outputs like <project-root>/build/sources/dafny-client-plugin/runtimes/java/smithy-generated and where that code is checked in, i.e. <project-root>/runtimes/java/smithy-generated. The --patch-files-dir and --update-patch-files features of the CLI would also move to this plugin.
The plugin would have three different tasks (or at least modes of a single task):

assert-same - apply patch files, then assert that the two locations have the same content
update - apply patch files, then copy from the build directory on top of the checked-in directory
update-patch-files - don't apply patch file, update them to match the difference between the build directory and the checked-in copy

It looks like this is the only missing "feature" to make this work. For the record here is the analysis I did of the current set of CLI options:
CLI options that need new smithy-build.json equivalents

--patch-files-dir/--update-patch-files

Should be handled by post-processing

CLI options that already have smithy-build.json equivalents

--model

Maps to sources

--namespace

Maps roughly to service: the Smithy build plugin tells the code generation logic to generate for all shapes in the namespace of the identified service

--library-root

Always the plugin artifacts output directory (i.e. build/sources/dafny-client-codegen)

--dafny-version

Maps to plugins.dafny-client-codegen.dafnyVersion

--include-dafny

Maps to plugins.dafny-client-codegen.includeDafnyFile

--properties-file

Always set to <output directory>/project.properties

--output-dafny/java/dotnet/...

Target languages are selected via a plugins.dafny-client-codegen.targetLanguages list instead
Output locations are fixed for the Smithy build plugin, see above about post-processing

--aws-sdk

Implicitly always true for dafny-client-plugin

--java-aws-sdk-version

Intentionally not supported: defaults to V2, V1 not used

CLI options not yet relevant (because they will apply to dafny-library-codegen instead)

--dependent-model
--local-service-test

repo: smithy-lang/smithy-dafny


text:
Multi-protocol support

Smithy service shapes can be annotated with multiple protocol traits.
$version: "2"

namespace smithy.example

use aws.protocols#restJson1
use aws.protocols#awsJson1_1

@restJson1
@awsJson1_1
service MyService {
    version: "2023-09-12"
}

In theory this indicates that clients invoking operations of MyService can use any of the two restJson1, @awsJson1_1 protocols, and MyService should accept incoming requests in any of the two protocols.
However, the spec has no provisions on how to implement multi-protocol support, either for clients or for servers.
Currently smithy-rs server SDKs are generated such that they only support the first protocol the service shape is annotated with; the rest of the protocols are ignored.
Multi-protocol support is important for services that want to begin supporting a better protocol and migrate their existing clients to it. Without a period during which the service understands both protocols, the migration becomes challenging or even impossible.

Server-side
Implementation-wise, one possiblity is that when receiving a request, the server SDK iterates over a priority-ordered list of supported protocols and attempt to "claim" it: if claiming succeeds, the request is handed over to that protocol's router. If routing or any other step thereafter fails, the request is rejected: we do not attempt to process the request with the next protocol.
When tackling this issue I'd like the algorithm to be detailedly documented, and I'd like as much of it to be contributed to the Smithy specification so that other Smithy-based server SDK generators abide by the same rules. In particular, we should answer these questions:

In what order do servers claim a request for a protocol?

Perhaps this should not be publicly documented and left implementation-defined, so that users don't attempt to rely on it in some way. The order should be deterministic though.

How does each of our supported protocols attempt to claim a request? Ideally, this check should be, simple, inexpensive, and not modify the request or attempt to deserialize it.

For example, for the awsJson1_1 protocol, checking first the HTTP version against the http and eventStreamHttp properties and then checking for Content-Type equalling application/x-amz-json-1.1 should suffice to unambiguously (relative to all other currently documented AWS protocols) detect that the request is indeed meant to be processed by said protocol (one could additionally and inexpensively check for the URI being /, method being POST, and the presence of X-Amz-Target, so it's important that a decision is made and the concrete steps be documented, ideally in the spec). For other protocols, like restJson1, the checks to perform are less apparent.

Could Smithy help the user by failing at build time in not defining operations where a request could be claimed by multiple protocols i.e. "ambiguous requests"?
What does a server respond with if the request cannot be claimed by any annotated protocol? Most likely with a 404 and an UnknownOperationException, but serializing said exception is kinda unsolvable when you haven't agreed on a protocol.
What happens with operations that are only available in specific protocols, because they rely on features that are not available in all the annotated protocols (e.g. event streams)?

Client-side
Things are easier I think. A client should probably simply send a request picking the first protocol that the server would consider when processing one. So clients should always be code-generated with a single protocol and discard the rest?

I think it makes sense to add guidance to the specification around how to support multiple protocols simultaneously. We'll want to avoid getting too much into implementation detail, but I think we can do it.

authors: david-perez mtdowling

repo: smithy-lang/smithy


text:
How to preload chanks before going to page ?

Currently loading occurs after going to pages.

Could you be more concrete please?

@theKashey
My server.js
            jsx = extractor.collectChunks(<Provider store={ store }>
                <StaticRouter context={ context } location={ req.url }>
                    <JssProvider registry={sheets}>
                        <AppMain />
                    </JssProvider>
                </StaticRouter>
            </Provider>);

            ....
            const reactDom = async jsx => {
              const element = createElement(jsx);
              await ssrPrepass(element);

              return renderToString(element);
           };

I open the Google Chrome console, on the Network tab.
I'm starting to click on the links on the site.
I see in the console that the loading of chunks for the page occurs after going to the page.
How to fix it ?

@theKashey How to make preload by chunk being on the previous page?

this is the root idea around code-splitting - NOT load something initially, however:

use webpack magic comments to preload or prefetch chunks. See - https://www.smooth-code.com/open-source/loadable-components/docs/prefetching/
call .preload or .load on loadable, as you want to preload new chunk. So people do it on mouse hover.
you might find many other advises online
it's up to how to implement.

@theKashey After the transition, the page is faded, and then the content is displayed.
I try use  around  and react-ssr-prepass for ssr, but loading in fallback only works after the transition, and not before.

Well, there is no ssr after you sent your page to the browser, so don't try to find the answer there.
I would recommend starting from scratch. Remove all code-splitting first and then reintroduce it. Do you actually need it, if you don't understand it? Is it making the user experience better? Does it worth it?

@theKashey
My decision, in function load page.
    if (typeof window !== 'undefined') {
        if (action.route) {
            if (action.route.indexOf('/all') !== -1) {
               Component1.preload();
               Component2.preload();
               ....
            }
        }
    }

I have not yet figured out how to do this automatically.

You cannot do it automatically. However, you might "scan" your routing table (if it exists) and act depending on it.

@theKashey What is meant by the table routing table ? What page are the components on? Is it possible to compose it automatically, and not enter it each time manually ?

In short - no, it is not possible.
A bit longer version - of course, it possible, but you have to find your own way first.

authors: golubvladimir theKashey

repo: smooth-code/loadable-components


text:
fix(server): fix loading order of assets

Summary
Related: #235
Test plan
Before
<!-- links -->
<link rel="preload" as="style" href="/static/css/Home.ab6fee9e.chunk.css">
<link rel="preload" as="script" href="/static/js/Home.29540c57.chunk.js">
<link rel="preload" as="script" href="/static/js/Logo.aa3dfd51.chunk.js">
<link rel="preload" as="script" href="/static/js/Welcome.b8e5d508.chunk.js">
<link rel="preload" as="script" href="/static/js/Intro.a96fcb22.chunk.js">
<link rel="preload" as="script" href="/static/js/runtime~client.0a907542.js">
<link rel="preload" as="style" href="/static/css/9.24bf1742.chunk.css">
<link rel="preload" as="script" href="/static/js/9.47319bf4.chunk.js">
<link rel="preload" as="style" href="/static/css/client.9823d995.chunk.css">
<link rel="preload" as="script" href="/static/js/client.3ed3a225.chunk.js">

<!-- styles -->
<link rel="stylesheet" href="/static/css/Home.ab6fee9e.chunk.css">    <!-- page -->
<link rel="stylesheet" href="/static/css/9.24bf1742.chunk.css">       <!-- vendor -->
<link rel="stylesheet" href="/static/css/client.9823d995.chunk.css">  <!-- entry -->

<!-- scripts -->
<script id="__LOADABLE_REQUIRED_CHUNKS__" type="application/json">[2,4,6,3]</script>
<script async src="/static/js/Home.29540c57.chunk.js"></script>
<script async src="/static/js/Logo.aa3dfd51.chunk.js"></script>
<script async src="/static/js/Welcome.b8e5d508.chunk.js"></script>
<script async src="/static/js/Intro.a96fcb22.chunk.js"></script>
<script async src="/static/js/runtime~client.0a907542.js"></script> <!-- runtime -->
<script async src="/static/js/9.47319bf4.chunk.js"></script>        <!-- vendor -->
<script async src="/static/js/client.3ed3a225.chunk.js"></script>   <!-- entry -->

After
<!-- links -->
<link rel="preload" as="script" href="/static/js/runtime~client.0a907542.js">
<link rel="preload" as="style" href="/static/css/9.24bf1742.chunk.css">
<link rel="preload" as="script" href="/static/js/9.47319bf4.chunk.js">
<link rel="preload" as="style" href="/static/css/client.9823d995.chunk.css">
<link rel="preload" as="script" href="/static/js/client.3ed3a225.chunk.js">
<link rel="preload" as="style" href="/static/css/Home.ab6fee9e.chunk.css">
<link rel="preload" as="script" href="/static/js/Home.29540c57.chunk.js">
<link rel="preload" as="script" href="/static/js/Logo.aa3dfd51.chunk.js">
<link rel="preload" as="script" href="/static/js/Welcome.b8e5d508.chunk.js">
<link rel="preload" as="script" href="/static/js/Intro.a96fcb22.chunk.js">

<!-- styles -->
<link rel="stylesheet" href="/static/css/9.24bf1742.chunk.css">       <!-- vendor -->
<link rel="stylesheet" href="/static/css/client.9823d995.chunk.css">  <!-- entry -->
<link rel="stylesheet" href="/static/css/Home.ab6fee9e.chunk.css">    <!-- page -->

<!-- scripts -->
<script id="__LOADABLE_REQUIRED_CHUNKS__" type="application/json">[2,4,6,3]</script>
<script async src="/static/js/runtime~client.0a907542.js"></script> <!-- runtime -->
<script async src="/static/js/9.47319bf4.chunk.js"></script>        <!-- vendor -->
<script async src="/static/js/client.3ed3a225.chunk.js"></script>   <!-- entry -->
<script async src="/static/js/Home.29540c57.chunk.js"></script>
<script async src="/static/js/Logo.aa3dfd51.chunk.js"></script>
<script async src="/static/js/Welcome.b8e5d508.chunk.js"></script>
<script async src="/static/js/Intro.a96fcb22.chunk.js"></script>

Thanks!

authors: ambar neoziro


text:
Getting some errors with import even using a seperate environment

Traceback (most recent call last):
  File "/workspace/ComfyUI/nodes.py", line 1941, in load_custom_node
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/workspace/ComfyUI/custom_nodes/ComfyUI_Diffree/__init__.py", line 2, in <module>
    from .Diffree_node import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
  File "/workspace/ComfyUI/custom_nodes/ComfyUI_Diffree/Diffree_node.py", line 144, in <module>
    class CompVisDenoiser(K.external.CompVisDenoiser):
AttributeError: module 'k_diffusion' has no attribute 'external'

tried on local and runpod, both gave the same error

also tried installing only the stuff in no_need_requirements.txt
even the requirements.txt (did a quick 1 by 1 install too)

Building wheels for collected packages: k-diffusion
  Building editable for k-diffusion (pyproject.toml) ... done
  Created wheel for k-diffusion: filename=k_diffusion-0.0.16-0.editable-py3-none-any.whl size=5124 sha256=b4d4da1864a6ab710a935ec4e5932d33357856322b2f50f0417ec57dd3817ca8
  Stored in directory: /tmp/pip-ephem-wheel-cache-cg5jdrtq/wheels/6b/d0/20/1e13a6ce5c5aa5c9fdad772026f990620b12d542ad78de3ac9
Successfully built k-diffusion
Installing collected packages: wcwidth, resize-right, six, setproctitle, sentry-sdk, rpds-py, protobuf, platformdirs, numpy, lightning-utilities, lazy-loader, ftfy, tifffile, referencing, imageio, docker-pycreds, wandb, scikit-image, jsonschema-specifications, torchmetrics, torchdiffeq, taming-transformers, jsonschema, accelerate, pytorch-lightning, jsonmerge, clip-anytorch, clean-fid, k-diffusion

Traceback (most recent call last):
  File "/workspace/ComfyUI/nodes.py", line 1941, in load_custom_node
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/workspace/ComfyUI/custom_nodes/ComfyUI_Diffree/__init__.py", line 2, in <module>
    from .Diffree_node import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
  File "/workspace/ComfyUI/custom_nodes/ComfyUI_Diffree/Diffree_node.py", line 144, in <module>
    class CompVisDenoiser(K.external.CompVisDenoiser):
AttributeError: module 'k_diffusion' has no attribute 'external'

Cannot import /workspace/ComfyUI/custom_nodes/ComfyUI_Diffree module for custom nodes: module 'k_diffusion' has no attribute 'external'

some error on basically importing the k_diffusion too under 0.0.16 version

pip list

k-diffusion               0.0.16     /workspace/ComfyUI/virtualenv_name_V3/src/k-diffusion)

>>> import k_diffusion as K
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/workspace/ComfyUI/virtualenv_name_V3/src/k-diffusion/k_diffusion/__init__.py", line 1, in <module>
    from . import augmentation, config, evaluation, external, gns, layers, models, sampling, utils
  File "/workspace/ComfyUI/virtualenv_name_V3/src/k-diffusion/k_diffusion/evaluation.py", line 6, in <module>
    import clip
  File "/workspace/ComfyUI/virtualenv_name_V3/lib/python3.10/site-packages/clip/__init__.py", line 1, in <module>
    from .clip import *
  File "/workspace/ComfyUI/virtualenv_name_V3/lib/python3.10/site-packages/clip/clip.py", line 6, in <module>
    from pkg_resources import packaging
ImportError: cannot import name 'packaging' from 'pkg_resources' (/workspace/ComfyUI/virtualenv_name_V3/lib/python3.10/site-packages/pkg_resources/__init__.py)

I'll make some changes to the code later. Thank you for your feedback. k_diffusion is built-in to ComfyUI, and some people's environments may not be able to call it

I have added the k_diffusion library for easy use in portable ComfyUI. Please check the new version and readme

It worked on my end after using this requirements.txt
pytorch-lightning
torchdiffeq
dctorch
opencv-python
omegaconf==2.1.1
jsonmerge
clean-fid
-e git+https://github.com/crowsonkb/k-diffusion.git@v0.0.16#egg=k-diffusion
-e git+https://github.com/CompVis/taming-transformers.git@master#egg=taming-transformers

then Try Update in the comfyUI itself

authors: arvnoodle smthemex


text:
use finalCode and manualDiscountFinalCode if both are present

... and discounts are used

Die Beschreibung hilft mir leider nicht genau zu verstehen was die Änderung genau machen soll. Gibt es irgendwo ein Ticket oder eine genauere Beschreibung?

authors: gereons mrgrauel

repo: snabble/iOS-SDK


text:
Specification of default_resources in a profile cannot contain = signs

Snakemake version
7.26
Describe the bug
In the default_resources block in a profile, variables cannot contain = signs; this is, however, needed to specify slurm_extra (e.g., --mail-type=none). The reason is in https://github.com/snakemake/snakemake/blob/main/snakemake/resources.py#L23: the argument is split by the = sign; this leads to an error if the result contains more than 2 elements (which occurs when there is more than one = sign).
I could make it work by replacing
            return arg.split("=")

by
            return arg.split("=")[0], "=".join(arg.split("=")[1:])

which basically concatenates the rest of the value again.
Minimal example
Add the following to a profile file:
default_resources:
  - slurm_extra="--mail-type=none"

and then run snakemake using this profile.

Unfortunately, I currently don't have the time to open a PR, but I have created a branch: https://github.com/ohlmann/snakemake/tree/fix_default_resource

repo: snakemake/snakemake


text:
Mastodon backfeed produces duplicate replies

Hi! Thanks so much for this great tool, I've been using it for about a week now and I love it.
I wrote this post yesterday, and all the publishing and backfeeding for Twitter and Mastodon worked correctly!
Today I replied to the post from my own website, which shows up as a webmention without going through Bridgy. I then published the post, and Bridgy correctly posted the tweet and toot as replies of the original. So far, so good!
The issue is that on Mastodon Bridgy then backfed the reply toot to the original post, resulting in a duplicate (which I've since manually deleted). On Twitter, on the other hand, it correctly recognised that this reply was itself syndicated from my website, and didn't send a webmention for it.
Is this a config error on my side, an intentional behavioural difference, or a bug? I did notice that on Twitter the website had been crawled but on Mastodon it had not.
My bridgy pages:
https://brid.gy/mastodon/@joel@otter.garden
https://brid.gy/twitter/joelotter
Again, thanks so much for your work on this!

Probably yes; Bridgy doesn't de-dupe across silos. Here's some of our thinking on that so far, and how some people are doing it right now: https://indieweb.org/deduplication

Ah, of course there's a wiki entry! Thanks for this. I'll close this issue now - perhaps a line in the docs to just state that Bridgy makes no attempt to deduplicate would help prevent others making my same mistake :)

perhaps a line in the docs to just state that Bridgy makes no attempt to deduplicate would help prevent others making my same mistake :)

Yes! Great idea, I've added that at https://brid.gy/about#duplicates

authors: JoelOtter snarfed

repo: snarfed/bridgy


text:
What is sf2orm_****** in my database 0

Hi,
I'm trying Redis with two differents apps, so I configure one dsn on redis://localhost/1 and the other one on redis://localhost/2.
Then I still have some keys in ma database 0 :
 1) "sf2orm_toto_854ab9ccaaead01a46a74e2516630c8190d45614a98fef20932f9ef8131c4079[74745b840ffebd4963f1468f42d3dfbe][1]"
 2) "sf2orm_titi_62bc92310b7c2efe0f0784114343865a746253d1ce895561694501f38848e9dd[97772befd652aa4084f9224c886e5911][1]"
 3) "sf2orm_toto_854ab9ccaaead01a46a74e2516630c8190d45614a98fef20932f9ef8131c4079[b0427d4367346bf48117dab4de27a2f1][1]"
 4) "sf2orm_titi_854ab9ccaaead01a46a74e2516630c8190d45614a98fef20932f9ef8131c4079[68e39267767a22c16c8cab14d52f7348][1]"
 5) "sf2orm_toto_62bc92310b7c2efe0f0784114343865a746253d1ce895561694501f38848e9dd[27c737c04643b325b55437b918c1034a][1]"
 6) "sf2orm_titi_854ab9ccaaead01a46a74e2516630c8190d45614a98fef20932f9ef8131c4079[28fbce3d5530fd8c5e1dd62c5cf057dc][1]"
...

Where toto and titi are my entity_managers's name (also my dbname name).
What are these keys ? How can I configure this so toto will be on database 1 and titi in database 2 ?

up

I guess this comes from doctrine... I don't know your config but maybe you have enabled some redis features from doctrine which don't rely on this bundle.

Assuming there is no longer an issue here.

authors: CharlyPoppins curry684 snc

repo: snc/SncRedisBundle


text:
Autoconfigure RedisBaseCommand to add snc_redis.command tag

Autoconfigure instances of Snc\RedisBundle\Command\RedisBaseCommand to add snc_redis.command tag

Should we remove the tag snc_redis.command from redis.xml too?

I really do not know why the configuration that is retrieved from the redis.xml file is not update. But when I test my custom redis commands of my project it works well.
There would not be a particularity on the conf files ? I see on the Symfony project, the command tag is redefined.

FYI the entire tag will be obsolete if https://github.com/snc/SncRedisBundle/pull/533 is merged.

Thanks @maxhelias

I don't get why you're saying that command tag would be obsolete?
It's still needed to inject the service locator no?

I really do not know why the configuration that is retrieved from the redis.xml file is not update. But when I test my custom redis commands of my project it works well i see the tag and i don't see the tag on flushhdb command if i remove it on the config file.
There would not be a particularity on the conf files ? I see on the Symfony project, the command tag is redefined.

@maxhelias I tried and don't get that behavior either so :+1:

Any hint @nicolas-grekas ?

If we'd merged #533 it would be obsolete. But we didn't, because #533 was a bad idea.
So, it's not obsolete, this PR is a good idea, and it should be merged :slightly_smiling_face:

All clear now thanks!

authors: B-Galati maxhelias rpkamp


text:
How do we add custom themes?

Hi
awesome project, its been great to see the progress.
Quick ques: How do we add custom themes? I am wondering if there is a sci-fi theme available?
thanks

Currently custom themes are not supported.

authors: Roh-codeur snehilvj

repo: snehilvj/dash-mantine-components


text:
Syntax Error while creating a dataset in ubuntu

snips-nlu generate-dataset en intent_turnLightOn.txt intent_turnLightOff.txt intent_setTemperature.txt entity_room.txt > dataset.json
File "", line 1
snips-nlu generate-dataset en intent_turnLightOn.txt intent_turnLightOff.txt intent_setTemperature.txt entity_room.txt > dataset.json
^
SyntaxError: invalid syntax

I tried this code but every time I get this error.I tried in Python3.5 but the error is still the same.

Hi @pandeysudhanshu ,

snips-nlu generate-dataset en intent_turnLightOn.txt intent_turnLightOff.txt intent_setTemperature.txt entity_room.txt > dataset.json

This must be run from the command line in a terminal, it is not Python code. Before running that, you must install snips-nlu using pip install snips-nlu.
Best,
Adrien

authors: adrienball pandeysudhanshu

repo: snipsco/snips-nlu


text:
onload not fired on blocked scripts

The load event doesn’t seem to fire on blocked script tags created with document.createElement in Chrome.
Reproduction:
<!DOCTYPE html>
<html>
  <head>
    <script>
      window.YETT_BLACKLIST = [/jquery/];
    </script>
    <script src="https://unpkg.com/yett"></script>
    <script>
      let scriptEl = document.createElement('script');
      scriptEl.src = 'https://code.jquery.com/jquery-3.5.1.slim.min.js';
      scriptEl.onload = function () {
        console.log('Loaded');
        console.log(window.jQuery);
      };
      document.head.appendChild(scriptEl);
    </script>
  </head>
  <body>
    <button onclick="window.yett.unblock();">Unblock</button>
  </body>
</html>

I expect "Loaded" and the value of window.jQuery to show in the console, but nothing happens. Preferably it should fire after the script has been loaded and executed.

Ok, so the problem is that the script element node is cloned before it’s added to the backup list. cloneNode won’t clone event listeners, and from what I can tell there’s no way to clone with event listeners in JS. Is it necessary to store a clone of the element since it’s also removed from the DOM?
https://github.com/snipsco/yett/blob/c65c516dfcd3f1d61a8b883848e40073b1f658a4/src/observer.js#L17

Hi @jeanfredrik, thanks for reporting this!

Is it necessary to store a clone of the element since it’s also removed from the DOM?

Yes, for multiple reasons:

First, we are mutating the original DOM node by changing the type and adding a firefox-specific event listener.
Then, Firefox will not download an HTMLScriptElement that has been inserted more than once inside a document.

So it won't be possible to remove the cloneNode() function, but keeping the event listeners is just a matter of copying the right object properties to the new node.
I just released yett v0.1.13 containing the fix 📦 .

Thanks for the quick fix! Works great!

authors: elbywan jeanfredrik

repo: snipsco/yett


text:
Update CodedAttributeOptionRepositoryInterface.php

Add missing @param to docblock.
Fixes the following error on https://example.com/rest/all/schema?services=all
<message>
Notice: Undefined offset: 2 in /Users/lukerodgers/src/example/vendor/magento/framework/Reflection/TypeProcessor.php on line 752
</message>

https://github.com/snowio/magento2-attribute-option-code/releases/tag/v1.8.3


text:
Create a Tailwind CSS Guide

Tailwind CSS is a popular tool and we get many questions about how to use it effectively with Snowpack. The guide would include coverage of the different ways to use it, their pros and cons, and include a template/example.

Hi, I think this can be closed?
https://www.snowpack.dev/#tailwind-css
Does this fulfil your desire?

@Mozart409 still in progress, I'm going to be writing a full guide along the lines of the guides on this page https://www.snowpack.dev/guides
You can follow the progress of the docs in the main branch

repo: snowpackjs/snowpack


text:
Re-implement JsonLoader.fromResource to avoid Hadoop exceptions

Use:
libraryDependencies += "com.github.scala-incubator.io" %% "scala-io-file" % "0.4.2"

See scalax.io.Resource.fromClasspath

Use this rather than the dependency:
https://github.com/scala-incubator/scala-io/blob/master/core/src/main/scala/scalax/io/Resource.scala#L564

This has been de-scheduled for now. Changing AMI versions seemed to fix this.

repo: snowplow/iglu-scala-client


text:
Release/0.6.0

See also https://github.com/snowplow/snowplow-gtm-server-side-amplitude-tag/pull/40

Last force-pushed changes based on review:

Remove unnecessary g flags
Calculate mkVersionFree(entity) a single time rather than for every ref in refsList


text:
testsuite failing for Stackage Nightly

I am not sure why but the testsuite has started to fail for Stackage Nightly:
    Failures:

      test/main.hs:230:26:
      1) html block xss
           expected: "alert("evil")"
            but got: ""

      To rerun use: --match "/html/block xss/"

    Randomized with seed 1052063679

    Finished in 0.0591 seconds
    151 examples, 1 failure

See https://github.com/yesodweb/haskell-xss-sanitize/issues/24 for a similar issue. I'll release a new version of Markdown.

authors: juhp snoyberg

repo: snoyberg/markdown


text:
"Streamize" Task Execution within a TaskGroup

We execute Tasks of a TaskGroup in the same batch manner; process all input data of a Task at once, produce the outputs, then trigger the next Task.
We could reduce the memory used within a TaskGroup when the TaskGroup's output is written to a (local/remote) file.

Duplicated with #717.

authors: jeongyooneo jooykim

repo: snuspl/nemo


text:
Uses monotonic clock to calculate delays

In one of the weirder bugs I've ever debugged, users reported that when starting a Vagrant-configured VirtualBox-based virtual machine (VM) that was setup to start Exhibitor on boot, occasionally (but not always) Zookeeper would not start even though the Exhibitor process was running. There wasn't very much log output from Exhibitor. It seemed 'stuck'.
After a hunch that it might be a timing issue, I modified the upstart script used to start Exhibitor to save the output of the date command to a file.  When the buggy behavior was seen, the value printed by date would be 5 hours off. As most programmers who deal with time would also immediately recognize, I knew 5 hours was our current offset from UTC+0 (in America/New_York at the time). Timezone issues were immediately suspected.
After some digging, I discovered that Vagrant always configures VirtualBox to set the real-time clock (RTC) in UTC as a 'sane default', but our box provisioner (packer) has no such default and we did not configure packer at the time to set the --rtcuseutc flag. Without the --rtcuseutc flag, the real-time clock is set in local time. And Linux systems (or at least the distribution we are using) persist real-time clock settings to disk on shutdown and use them to populate the software clock on the next boot.
Here's the complete scenario I was able to work out:

Vagrant imports the base box into VirtualBox.
Vagrant configures VirtualBox to expose the real-time clock in UTC+0.
System boots.
System restores the software clock from the real-time clock, assuming it's in local time (since this is how it was originally provisioned with packer).  This means the software clock is ~5 hours off, because the RTC is actually in UTC.
Exhibitor starts, and calculates the time it should wait until to start Zookeeper as System.currentTimeMillis + delay. Crucially, System.currentTimeMillis uses the value from the software clock.
VirtualBox Guest Additions notices that the software clock is 5 hours off and resets it to the correct time. In our case, this set the software clock 5 hours into the past relative to where it was.
Exhibitor is now going to wait for 5 hours + the delay, because the return value of System.currentTimeMillis has also shifted 5 hours into the past, and the time to wait until was precomputed before the shift.

Users obviously rarely waited 5 hours for Zookeeper to start, instead reporting it as an Exhibitor bug. Restarting the Exhibitor process after boot would also correct the problem since the clock would have stabilized and the delays would be calculated accurately.
Occasionally VirtualBox Guest Additions would correct the time before Exhibitor calculated its delays, and Zookeeper would start normally in those cases.
It's important to use monotonic clocks when possible to calculate durations.  While this issue is relatively egregious and narrowly focused, durations that use wall-clock time (i.e, System.currentTimeMillis) also suffer skew due to leap seconds, large ntp corrections, etc. Monotonic clocks (i.e., Systems.nanoTime, at least on platforms that support it like Linux), do not suffer skew because of wall-clock time adjustments.
There are other places in Exhibitor that use System.currentTimeMillis to calculate durations, but I chose to focus on just this one area for now in order to gather feedback and keep the changeset small.

Closing and re-opening to trigger Travis build.

We should really replace all uses of System.currentTimeMillis for calculating duration with System.nanoTime.
Will create an issue for this.

authors: alindeman xiaochuanyu

repo: soabase/exhibitor


text:
Umdify

This pull requests builds on a previous (but unmerged) pull request (https://github.com/socib/Leaflet.TimeDimension/pull/125) and improves compatibility with different methods of packaging by wrapping it in slightly adjusted UMD-boilerplate code as suggested by the Leaflet documentation
With this leaflet pull request being merged it would allow for a problemless use in a modern ES6 workflow with es-modules with browserless unit-tests.
Note that it doesn't change behaviour when used in a front-end only setting, where a global L-variable is still available to plugins.

To clarify why this is useful, this now works:
import Leaflet from 'leaflet';
import 'leaflet-timedimension';

when 'leaflet' and 'leaflet-timedimension' have been added as dependencies through npm or yarn it leaves no, nor requires, a global nezasa var containing the ISO-date period parser (although it is still used).  window.L will still be set, but only because it is set by Leaflet (they added it back with 1.2.0 for backward compatibility). Internally, the style of this plugin could use modernization, as suggested in https://github.com/socib/Leaflet.TimeDimension/issues/124, but at least this pull request makes it work effortlessly in present day projects.

Thanks, looking forward to the new release :)


text:
Build fails on Ubuntu 17.10

I tried to follow the install instructions with cmake.
cmake runs successfully on Ubuntu 17.10 / g++ 6.3.0
$ cmake -DBOOST_ROOT:STRING=/home/steven/bin/boost_1_66_0 -DBOOST_LIBRARYDIR:STRING=/home/steven/bin/boost_1_66_0/stage/lib -DBOOST_VER:STRING=1.66.0 ./
-- not define build type, set to release
-- Boost version: 1.66.0
-- Found the following Boost libraries:
--   system
--   date_time
--   random
-- Configuring done
-- Generating done
-- Build files have been written to: /home/steven/dfprogram/lib/socket.io-client-cpp

However, when I execute make install, it aborts with an error message:
$ make install
[ 10%] Building CXX object CMakeFiles/sioclient.dir/src/sio_client.cpp.o
In file included from /home/steven/dfprogram/lib/socket.io-client-cpp/lib/websocketpp/websocketpp/transport/asio/endpoint.hpp:32:0,
                 from /home/steven/dfprogram/lib/socket.io-client-cpp/lib/websocketpp/websocketpp/config/asio_no_tls_client.hpp:32,
                 from /home/steven/dfprogram/lib/socket.io-client-cpp/src/internal/sio_client_impl.h:29,
                 from /home/steven/dfprogram/lib/socket.io-client-cpp/src/sio_client.cpp:8:
/home/steven/dfprogram/lib/socket.io-client-cpp/lib/websocketpp/websocketpp/transport/asio/connection.hpp: In member function ‘std::error_code websocketpp::transport::asio::connection<config>::init_asio(websocketpp::transport::asio::connection<config>::io_service_ptr)’:
/home/steven/dfprogram/lib/socket.io-client-cpp/lib/websocketpp/websocketpp/transport/asio/connection.hpp:426:38: error: no matching function for call to ‘make_shared(std::reference_wrapper<boost::asio::io_context>)’
                 lib::ref(*io_service));
                                      ^
In file included from /usr/include/c++/6/memory:82:0,
                 from /home/steven/dfprogram/lib/socket.io-client-cpp/src/sio_message.h:10,
                 from /home/steven/dfprogram/lib/socket.io-client-cpp/src/sio_client.h:11,
                 from /home/steven/dfprogram/lib/socket.io-client-cpp/src/sio_client.cpp:7:
/usr/include/c++/6/bits/shared_ptr.h:632:5: note: candidate: template<class _Tp, class ... _Args> std::shared_ptr<_Tp1> std::make_shared(_Args&& ...)
     make_shared(_Args&&... __args)
     ^~~~~~~~~~~

What am I doing wrong?

I have the same error on Linux Mint 18.3 (based on Ubuntu 16.04).

Updating the files of the websocketpp submodule to websocketpp/master solved the issue for me.

@syncu2
Nice, but can you explain what you did ? I'm not a developer and what you said doesn't make any sense for me. Thank you very much.

Following these instructions: https://github.com/socketio/socket.io-client-cpp/blob/master/INSTALL.md#with-cmake
after step 2 (git clone...), do the following:
cd socket.io-client-cpp/lib/websocketpp
git pull origin master
cd ../..

then proceed with step 3.

That helped me as well. Thanks very much :-)

I have this issue in openSUSE as well. Also solved by
cd socket.io-client-cpp/lib/websocketpp
git pull origin master

Thanks to @syncu2!  It is strange why git submodule reference to websocketpp still not updated to latest commit in master which works fine?

authors: Larnal akontsevich romancerny syncu2


text:
I can't connect to NodeJS server

Hello.
I cannot get this simple test work. I wrote the client in C++ and the server in NodeJS, both running on my computer. When I execute the client application, the console outputs this text...but the event 'key' is never fired on the server!
Client console output:

Error: No active session
[2019-11-21 17:30:11] [connect] Successful connection
[2019-11-21 17:30:11] [connect] WebSocket Connection 127.0.0.1:9876 v-2 "WebSocket++/0.8.1" /socket.io/?EIO=4&transport=websocket&t=1574353811 101

¿Anyone knows what am I doing wrong?
Thanks in advance.
C++ client
#include "pch.h"
#include <iostream>

#include <sio_client.h>

using namespace sio;
using namespace std;

int main()
{
	sio::client io;
	io.connect("http://127.0.0.1:9876");

	string command = "w";

	io.socket()->emit("key", command );

}

NodeJS server
'use strict';

const express     = require('express');
const app         = express();
const serverHttp  = require('http').Server(app);
const io = require('socket.io')(serverHttp);

const port = 9876;

io.on('connection', function (socket) {
    // Never fired :(
    socket.on('key', function (data) {
        console.log("key received!!!");
    });
});

serverHttp.listen(port, function() {
    console.log("init!!!");
});

I am also having the same issue. I wrote same sample client code. Do I have to write some listener to get it working ?

I am also having the same issue. I wrote same sample client code. Do I have to write some listener to get it working ?

I found the solution to this question. Someone helped me out in StackOverflow in my question.
it's just u have to use a sleep method or set_open_listener for it to work.
I am posting the StackOverflow thread here. I'm sure it helps.
https://stackoverflow.com/questions/59046232/node-js-server-and-c-client-socket-io-connection-not-able-to-emit-or-read-th

For clarification:  Basically, your C++ code is emitting before the connection is established.
It would be better to have this workflow:

Connect from C++ to Node.js
Have Node.js emit back to C++ that it is ready to receive.
Emit from C++ to Node.js

This way, you don't have to put an arbitrary sleep() function in your code, and the emit can happen as soon as possible.
-CP


text:
Optional parameters (opt) are overridden when initializing Emitter with {host, port} object.

Issue
When trying to initialize the Emitter with an {host, port} object and the key option, I noticed nothing was published as expected on Redis, by running the Redis monitor: the key used remains the same as the default one socket.io :
1615484908.414247 [0 127.0.0.1:58230] "publish" "socket.io#/waiting_lines#" "\x93\xa7emitter\x83\xa4type\x02\xa4data\x92\xa4list\x84\xa4data\x94\x8d\xa2id\xd9$1eb84855-3081-4067-90a5-6bb2cb5e20d6\xaacreated_at\xb82020-09-23T11:44:08.000Z\xaaupdated_at\xb82021-01-29T06:33:42.000Z
I have the following packages:
   "socket.io": "^2.3.0",     "socket.io-emitter": "^3.2.0",     "socket.io-redis": "^5.4.0",
I initialized the Emitter, as follows:
import ioEmitter, { SocketIOEmitter } from "socket.io-emitter";
const io = ioEmitter({host: '127.0.0.1', port: 6379 }, { key: "some-socket.io-key" });

What I've noticed in socket.io-emitter/index.js file, in the init function (adding some console.log for debug purposes):
/**
 * Socket.IO redis based emitter.
 *
 * @param {Object} redis client (optional)
 * @param {Object} options
 * @api public
 */

function init(redis, opts){
  console.log(` [SOCKET.IO-EMITTER] Options: `, opts);
  opts = opts || {};

  console.log(` [SOCKET.IO-EMITTER] Options (2): `, opts);

  if ('string' == typeof redis) {
    redis = client(redis);
  }

  if (redis && !redis.hset) {
    opts = redis;
    redis = null;
  }

  console.log(` [SOCKET.IO-EMITTER] Options (3): `, opts);

  if (!redis) {
    if (!opts.socket && !opts.host) throw new Error('Missing redis `host`');
    if (!opts.socket && !opts.port) throw new Error('Missing redis `port`');
    redis = opts.socket
      ? client(opts.socket)
      : client(opts.port, opts.host);
  }

  var prefix = opts.key || 'socket.io';
  console.log(` [SOCKET.IO-EMITTER] Prefix used: `, prefix);
  return new Emitter(redis, prefix, '/');
}

Here's what the console shown:
 [SOCKET.IO-EMITTER] Options:  { key: 'some-socket.io-key' }
 [SOCKET.IO-EMITTER] Options (2):  { key: 'some-socket.io-key' }
 [SOCKET.IO-EMITTER] Options (3):  { host: '127.0.0.1', port: 6379 }
 [SOCKET.IO-EMITTER] Prefix used:  socket.io
To conclude with:
Basically , I cannot config a custom key, as the opts object is overriden. I suppose this is not how it's supposed to work, right?
Workaround
To be able to get it working as expected, I had to do as follows:
    let redisOptions: SocketIORedisOptions = {
      host,
      port,
    };
    // Unable to set key prop in previous object as TypeScript
    // would throw an error saying 'key' does not exist in SocketIORedisOptions type
    redisOptions["key"] = "some-socket.io-key";
    const io = ioEmitter(redisOptions);

Yes, this is for this kind of problems that the redis client won't be created by the library anymore (https://github.com/socketio/socket.io-emitter/commit/a70db12877d901dd0f7085def0a91145b7c83163)
Before (socket.io-emitter@3):
const io = require("socket.io-emitter")({ host: "127.0.0.1", port: 6379 });

After (@socket.io/redis-emitter@4):
const { Emitter } = require("@socket.io/redis-emitter");
const { createClient } = require("redis");

const redisClient = createClient();
const io = new Emitter(redisClient);

authors: darrachequesne xprudhomme


text:
Is there a way to authenticate room connections using the socket.io-redis adapter?

I read online that the adapter can be used to authenticate rooms. Is that true? And it is possible with socket.io-redis?

Closing due to inactivity, please reopen if needed.

authors: darrachequesne tslater


text:
Silent Hill

tonyhax version: 1.2.3
Game name: Silent Hill (original game ntsc-j)
Game code: SLPM-87029
Console model: SCPH-5552 PAL
Executable hash: Idk
Triggered at: the game starts, but is all grey and black, after few seconds I get the message I can't play it. The console has instaled one modchip to play burned games, on my PSOne I can play the game.

The video being black and white is likely an issue with your television - in NTSC modes, PAL consoles output a slightly off colorburst frequency, which some TV sets can't properly decode: http://www.psxdev.net/forum/viewtopic.php?f=47&t=628
I will be looking at the antimodchip check though.

I give up on this one. The game is made from a myriad of different shims much like Spyro 3, and it's highly unlikely this can be patched from within tonyhax with its super basic patching mechanism, so closing as won't fix.

As a note, since v1.4 and thanks to the new approach used for patching antipiracy, this game should be also playable from tonyhax.

license: WTFPL


text:
Added a script to check the installed node version

This should solve #82 with this solution proposed in the issue comments.
A script has been added in the scripts folder to check the current node version against the one required in package.json and the script execution has been bound to the preinstall stage in the package file itself.
Unfortunately this adds a dependency from semver, but I guess there is no easier way to handle version comparison than adding an external dependency.

Note that i had to add "test": "mocha --recursive" to explicitly define the test suite runner script, since having a scripts property in package.json overrides the defaults.

Whops i didn't notice package.json already had a scripts section and I copypasted the stackoverflow solution without linting it...sorry :(
Should be ok now.

sweet! thanks for the quick fix

authors: Raibaz evykassirer

repo: socraticorg/mathsteps


text:
Being able to set warning/alert thresholds on failed rows

Being able to set warning/alert thresholds on failed rows. It would be convenient to set warning/alert levels for failed row queries as well.

SODA-1730

I just want to +1 this. Validating rules per row is one of our main use-cases and settings acceptance thresholds on these rules would be super useful.

authors: BeWe11 albinkjellin jmarien

repo: sodadata/soda-core


text:
Doing a search with profiles

Hello
I have many (~200 million) multiple sequence alignments in the form of FASTA files that I would like to use as queries against a target dataset of about 6 billion protein sequences in a PSI-BLAST fashion. It is my understanding that I can convert the FASTA file into Stockholm format and then create a profileDB and use the profileDB to search the dataset (after it has been converted with mmseqs createdb). I imagine it would be more efficient if it I combined the queries into a queryDB before doing the search, but I can't really figure out how to do this. Would I have to combine all the MSA's into a massive file Stockholm file before creating the queryDB?
Thanks

How do you have the msas currently stored? Do you have a single file for each of the  200million multiple sequence alignments?

Yes each alignment is in it's own file.

Wow thats a lot of single files. If all single files are in a folder then you could use ffindex_build (https://github.com/soedinglab/ffindex_soedinglab).
ffindex_build msa msa.tmp.index fastaDir
awk '{print NR"\t"$2"\t"$3}' msa.tmp.index > msa.index
awk 'BEGIN { printf("%c%c%c%c",11,0,0,0); exit; }' > msa.dbtype
mmseqs msa2profile msa profile

Alternative you can turn all of them into a single stockholm format and use convertmsa to turn it into a msa database.

authors: CuriousTim martin-steinegger


text:
Sorting out ET/behavioral alignment

Per Slack discussion in December 2024, need to sort out how to align the eyelink data with the Python behavioral data, as timing-related events (incl. messages to Eyelink and Python events) are slightly different in the new task version.

Noting that @JVon-Monteza said he is planning to (lightly) modify the experiment script to test the timing of Eyelink messages/events with respect to Python events (both at practice and at end of the study) to assess which has the tightest/closest timing and thus should be used for eye-tracking/behavioral data alignment.

repo: sokolhessnerlab/edi


text:
Change SLURM_VERSION to a number that works.

The original value fails to build.

docker-compose build --no-cache
mysql uses an image, skipping
postgres uses an image, skipping
Building slurmdbd
[+] Building 579.3s (38/46)
=> [internal] load build definition from Dockerfile.compile                                                                                0.0s
=> => transferring dockerfile: 45B                                                                                0.0s
=> [internal] load .dockerignore                                                                                0.0s
=> => transferring context: 2B                                                                                0.0s
=> [internal] load metadata for docker.io/library/ubuntu:22.04                                                                                0.7s
=> CACHED [ 1/42] FROM docker.io/library/ubuntu:22.04@sha256:4b1d0c4a2d2aaf63b37111f34eb9fa89fa1bf53dd6e4ca954d47caebca4005c2                                                                                0.0s
=> [internal] load build context                                                                                0.0s
=> => transferring context: 958B                                                                                0.0s
=> [ 2/42] COPY rstudio/create.R /tmp/create.R                                                                                0.0s
=> [ 3/42] RUN apt-get update -y &&  apt-get install -y gdebi-core curl wget &&  IFS=" "; for R_VERSION in 3.6.3 4.0.5 4.1.2 ;  do   curl -O https://cdn.rstudio.com/r/ubuntu-2204/pkgs/r-${R_VERSION}_1_amd64.deb  111.8s
=> [ 4/42] COPY rstudio/launcher.conf /etc/rstudio/launcher.conf                                                                                0.1s
=> [ 5/42] COPY rstudio/launcher.slurm.conf /etc/rstudio/launcher.slurm.conf                                                                                0.0s
=> [ 6/42] COPY rstudio/launcher.slurm.profiles.conf /etc/rstudio/launcher.slurm.profiles.conf                                                                                0.0s
=> [ 7/42] COPY rstudio/rserver.conf /etc/rstudio/rserver.conf                                                                                0.0s
=> [ 8/42] COPY rstudio/database.conf /etc/rstudio/database.conf                                                                                0.0s
=> [ 9/42] RUN chmod 0600 /etc/rstudio/database.conf                                                                                0.4s
=> [10/42] COPY rstudio/load-balancer /etc/rstudio/load-balancer                                                                                0.0s
=> [11/42] RUN apt-get update && apt-get install -y uuid &&  apt clean all &&  rm -rf /var/cache/apt                                                                                4.1s
=> [12/42] RUN echo uuid > /etc/rstudio/secure-cookie-key &&  chown rstudio-server:rstudio-server   /etc/rstudio/secure-cookie-key &&     chmod 0600 /etc/rstudio/secure-cookie-key                                 0.3s
=> [13/42] RUN openssl genpkey -algorithm RSA   -out /etc/rstudio/launcher.pem   -pkeyopt rsa_keygen_bits:2048 &&  chown rstudio-server:rstudio-server   /etc/rstudio/launcher.pem &&         chmod 0600 /etc/rstudi  0.4s
=> [14/42] RUN openssl rsa -in /etc/rstudio/launcher.pem   -pubout > /etc/rstudio/launcher.pub &&  chown rstudio-server:rstudio-server   /etc/rstudio/launcher.pub                                                    0.4s
=> [15/42] RUN curl -O https://cdn.rstudio.com/python/ubuntu-2204/pkgs/python-3.8.10_1_amd64.deb &&     apt-get update && gdebi -n python-3.8.10_1_amd64.deb && apt clean all &&     rm -rf /var/cache/apt && rm -f  42.7s
=> [16/42] RUN /opt/python/3.8.10/bin/jupyter-nbextension install --sys-prefix --py rsp_jupyter &&     /opt/python/3.8.10/bin/jupyter-nbextension enable --sys-prefix --py rsp_jupyter &&     /opt/python/3.8.10/bin  1.6s
=> [17/42] RUN curl -O https://cdn.rstudio.com/python/ubuntu-2204/pkgs/python-3.9.5_1_amd64.deb &&     apt-get update && gdebi -n python-3.9.5_1_amd64.deb && apt clean all &&     rm -rf /var/cache/apt && rm -f p  36.9s
=> [18/42] RUN /opt/python/3.9.5/bin/jupyter-nbextension install --sys-prefix --py rsp_jupyter &&     /opt/python/3.9.5/bin/jupyter-nbextension enable --sys-prefix --py rsp_jupyter &&     /opt/python/3.9.5/bin/ju  1.5s
=> [19/42] COPY rstudio/jupyter.conf /etc/rstudio/jupyter.conf                                                                                0.0s
=> [20/42] RUN rstudio-server install-vs-code /opt/code-server/                                                                                10.3s
=> [21/42] COPY rstudio/vscode.conf /etc/rstudio/vscode.conf                                                                                0.0s
=> [22/42] COPY rstudio/vscode-user-settings.json  /etc/rstudio/vscode-user-settings.json                                                                                0.0s
=> [23/42] RUN /bin/bash -c "set -x     && groupadd -r --gid=105 munge     && useradd -r -s /bin/bash -g munge --uid=105 munge"                                                                                0.3s
=> [24/42] RUN set -ex     && apt-get update     && apt-get -y install        wget        bzip2        perl        gcc-9        g++-9        gcc        g++        git        gnupg        make        munge         33.7s
=> [25/42] RUN set -ex     && apt-get update     && apt-get -y install libcgroup-dev     && apt clean all     && rm -rf /var/cache/apt                                                                                4.1s
=> [26/42] RUN mkdir -p /tmp/build && cd /tmp/build     && bash -c "git clone --depth 1 -b slurm-${SLURM_VERSION//./-} https://github.com/SchedMD/slurm.git"     && cd slurm     && bash -c "./configure --enable-  327.3s
=> [27/42] COPY slurm/slurm.conf /etc/slurm/slurm.conf                                                                                0.0s
=> [28/42] COPY slurm/slurmdbd.conf /etc/slurm/slurmdbd.conf                                                                                0.0s
=> [29/42] RUN echo "CgroupAutomount=yes \nCgroupPlugin=cgroup/v1 \nConstrainCores=yes \nConstrainRAMSpace=yes" > /etc/slurm/cgroup.conf                                                                              0.3s
=> [30/42] RUN chmod 0600 /etc/slurm/slurmdbd.conf                                                                                0.3s
=> [31/42] RUN chown 105:105 /etc/munge/munge.key                                                                                0.4s
=> [32/42] RUN mkdir -p /tmp/singularity                                                                                0.3s
=> [33/42] COPY singularity/spank/* /tmp/singularity/                                                                                0.0s
=> ERROR [34/42] RUN cd /tmp/singularity && make && make install #&& cd && rm -rf /tmp/singularity                                                                                0.6s

[34/42] RUN cd /tmp/singularity && make && make install #&& cd && rm -rf /tmp/singularity:
#38 0.244 g++ -std=c++17 -I /usr/include/slurm -O2 -Wall -Wextra -fpic -shared -static-libstdc++ -static-libgcc -o singularity-exec.so main.cpp
#38 0.496 main.cpp: In static member function 'static int singularity_exec::start_container(Buttocks, const ArgumentVector&)':
#38 0.496 main.cpp:445:13: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
#38 0.496   445 |             if (env)
#38 0.496       |             ^~
#38 0.496 main.cpp:447:15: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
#38 0.496   447 |               s_container_name = s_container_path+"/"+s_container_name;
#38 0.496       |               ^~~~~~~~~~~~~~~~
#38 0.503 main.cpp: At global scope:
#38 0.503 main.cpp:513:44: error: 'SLURM_VERSION_NUMBER' was not declared in this scope; did you mean 'S_SLURM_VERSION_MINOR'?
#38 0.503   513 |   extern const uint32_t plugin_version   = SLURM_VERSION_NUMBER;
#38 0.503       |                                            ^~~~~~~~~~~~~~~~~~~~
#38 0.503       |                                            S_SLURM_VERSION_MINOR
#38 0.594 make: *** [Makefile:11: singularity-exec.so] Error 1

executor failed running [/bin/sh -c cd /tmp/singularity && make && make install #&& cd && rm -rf /tmp/singularity]: exit code: 2
ERROR: Service 'slurmdbd' failed to build : Build failed

As discussed, the issue is caused by the inclusion of the SLURM Singularity integration in https://github.com/sol-eng/slurm-docker-cluster/commit/37e7ae73cd132f21703014b49d3d1c63cd882be0. I will accept and merge the PR now and create a separate issue https://github.com/sol-eng/slurm-docker-cluster/issues/3 to make the SLURM integration more flexible/compatible with older SLURM Versions as well.

repo: sol-eng/slurm-docker-cluster


text:
Add quotes around values with spaces #237

I'm not convinced this is the best way to solve this, but wanted to open the PR to get feedback. Three potential issues I can see:

I'm using a simple blacklist of space characters; should we instead whitelist characters which do not require quoting?
Do we need to also add logic for escaping values. For example, what should we do if one of the options itself contains a quote inside? I'm not familiar with the cabal format escaping rules here
Is it OK to apply this logic to all examples of WordList?

@snoyberg Hey, thanks for looking into this!  My main concern is that this would break existing package specifications, e.g.
ghc-options: -Wall -Werror

is currently valid, but won't be valid with this change.  Let's try to hash thing out in #237.

authors: snoyberg sol

repo: sol/hpack


text:
Add instruction helpers

Add helpers to create token instructions

@aeyakovenko fyi

repo: solana-labs/solana-program-library


text:
[WIP] SPL Token Lending

SPL Token Lending: an Aave-inspired token lending program
Reference Doc: https://docs.google.com/document/d/1wp70o3fehQfRqP2FcR-Ek5vCLpI0pO_ayu-NQd4WK74/edit
Implemented instructions:

[ ] InitPool
[x] InitReserve
[ ] InitObligation
[x] Deposit
[ ] Withdraw
[ ] Repay
[ ] Liquidate

Implemented states:

[ ] Pool
[x] Reserve
[ ] Obligation

Tag @bartosz-lipinski @joncinque
Can we implement the liqdation as a token-swap compatible pool?  Basically automatically offer the collateral for sale at the liquidation oracle price

great coincidence @aeyakovenko -- @bartosz-lipinski had the same idea, and the three of us had an initial discussion about it last week.  here's a proposed diagram of what that could look like: https://github.com/joncinque/solana-program-library/blob/lending-diagram/token-lending/spl-lending.svg

Curve implementation that uses serum as the oracle. So the swap is always at the spread + slippage

WVAP for the last hour?

that feels like a long time.. that means that prices need to be recorded continuously (let's say once every minute) for any markets that the lending protocol depends on, right? I feel like 5min is enough time for arbitrage bots to kick in and is short enough that users record prices for a few minutes to liquidate if they needed to take action

@jstarry VWAP for the last hour can be updated on every tick, so it's instant.

authors: aeyakovenko joncinque jstarry


text:
Update SLGT

Update SLGT tags
Original Pull Request: https://github.com/solana-labs/token-list/pull/19505
New Pull Request: https://github.com/solana-labs/token-list/pull/19652
Thanks

the new PR is closed, please reopen it

New pr: https://github.com/solana-labs/token-list/pull/19908
@keone

merged

authors: jdomingospt keone

repo: solana-labs/token-list


text:
first commit for $MILZ Millicoin

Please note: This repository is being rebuilt to accept the new volume of token additions and modifications. PR merges will be delayed.

I agree to not ping anybody on Discord/Twitter/email about this pull request. Instead I will inquire by posting a new comment in the pull request if needed.

PRs are reviewed in bulk and and can take up to two weeks to be merged.
This repository is managed using an auto merge action. Please ensure your PR has no deleted lines, and it will be merged.
Please provide the following information for your token.
Please include change to the src/tokens/solana.tokenlist.json file in the PR.
DON'T modify any other token on the list.
At minimum each entry should have

Token Address:
Token Name:
Token Symbol:
Logo: (logo should be uploaded under assets/mainnet//*.<png/svg>)
Link to the official homepage of token:
Coingecko ID if available (https://www.coingecko.com/api/documentations/v3#/coins/get_coins__id_):

Auto merge requirements
Your pull request will be automatically merged if the following conditions are met:

Your pull request only adds new tokens to the list. Any modification to existing
tokens will require manual review to prevent unwanted modifications.

Your pull request does not touch unrelated code. In particular, reformatting changes to unrelated
code will cause the auto merge to reject your PR.

Any asset files added correspond to the token address you are adding. Asset files
must be PNG, JPG or SVG files.

Your change is valid JSON and conforms to the schema. If your change failed validation,
read the error message carefully and update your PR accordingly.

No other tokens shares the same name, symbol or address.

For example, this change would be rejected due to unrelated changes:

The bot runs every 60 minutes and bulk-merges all open pull requests to prevent conflicts.
This means that you need to wait up to 60 minutes for your pull request to be merged or reprocessed.

I can help refer this zakimzf/profile#1
PS: if you don't need my help.. please ignore this!


text:
BoostCoin and NFT

Please note: This repository is being rebuilt to accept the new volume of token additions and modifications. PR merges will be delayed.

I agree to not ping anybody on Discord/Twitter/email about this pull request. Instead I will inquire by posting a new comment in the pull request if needed.

PRs are reviewed in bulk and and can take up to two weeks to be merged.
This repository is managed using an auto merge action. Please ensure your PR has no deleted lines, and it will be merged.
Please provide the following information for your token.
Please include change to the src/tokens/solana.tokenlist.json file in the PR.
DON'T modify any other token on the list.
At minimum each entry should have

Token Address:
Token Name:
Token Symbol:
Logo: (logo should be uploaded under assets/mainnet//*.<png/svg>)
Link to the official homepage of token:
Coingecko ID if available (https://www.coingecko.com/api/documentations/v3#/coins/get_coins__id_):

Auto merge requirements
Your pull request will be automatically merged if the following conditions are met:

Your pull request only adds new tokens to the list. Any modification to existing
tokens will require manual review to prevent unwanted modifications.

Your pull request does not touch unrelated code. In particular, reformatting changes to unrelated
code will cause the auto merge to reject your PR.

Any asset files added correspond to the token address you are adding. Asset files
must be PNG, JPG or SVG files.

Your change is valid JSON and conforms to the schema. If your change failed validation,
read the error message carefully and update your PR accordingly.

No other tokens shares the same name, symbol or address.

For example, this change would be rejected due to unrelated changes:

The bot runs every 60 minutes and bulk-merges all open pull requests to prevent conflicts.
This means that you need to wait up to 60 minutes for your pull request to be merged or reprocessed.

Trying to update a previously made Token, and add a new NFT.
https://github.com/abskurz/token-list


text:
Signing and transferring a transaction for a custom SPL token

Hi i'm looking for documentation or examples on this subject and have difficulty finding anything. How to transfer a custom SPL token with the wallet adapter?
I'm having trouble getting the singer for the Token object. Could you point me in the right direction?
Adding any examples to the readme in the future on how to do this would help me and others tremendously.
import { Token, TOKEN_PROGRAM_ID } from '@solana/spl-token'
import { Transaction, PublicKey } from '@solana/web3.js'

const SendTransaction: React.FC<Props> = ({ children }) => {
    const { connection } = useConnection()
    const { publicKey, sendTransaction } = useWallet()

    const onSendSPLTransaction = useCallback(
        async (toPubkey: string, amount: number) => {
            if (!toPubkey || !amount) return
            const toastId = toast.loading('Processing transaction...')

            try {
                if (!publicKey) throw new WalletNotConnectedError()
                const toPublicKey = new PublicKey(toPubkey)
                const mint = new PublicKey('Mint address')
                const payer = '????' // how to get this Signer
                const token = new Token(connection, mint, TOKEN_PROGRAM_ID, payer)
                const fromTokenAccount = await token.getOrCreateAssociatedAccountInfo(publicKey)
                const toTokenAccount = await token.getOrCreateAssociatedAccountInfo(toPublicKey)

                const transaction = new Transaction().add(
                    Token.createTransferInstruction(
                        TOKEN_PROGRAM_ID,
                        fromTokenAccount.address,
                        toTokenAccount.address,
                        publicKey,
                        [],
                        0
                    )
                )

                const signature = await sendTransaction(transaction, connection)

                const response = await connection.confirmTransaction(signature, 'processed')
                console.log('response', response)
                toast.success('Transaction sent', {
                    id: toastId,
                })
            } catch (error) {
                toast.error(`Transaction failed: ${error.message}`, {
                    id: toastId,
                })
            }
        },
        [publicKey, sendTransaction, connection]
    )

    return <>{children(onSendSPLTransaction)}</>
}

Ah, this isn't really an issue with wallet-adapter. It's a shortcoming of the Token class -- it doesn't really work with a wallet where you don't have the Keypair/Signer to pass around.
There is a TypeScript port of @spl-token which makes some of this easier, but it's still under review and hasn't been released on NPM yet: https://github.com/solana-labs/solana-program-library/pull/2539
I would recommend checking for the associated token account, and creating it yourself in an instruction to the transaction you sign with the wallet. These links from that open PR may help in understanding how to do this:
https://github.com/solana-labs/solana-program-library/blob/jsx/token-ts/token/ts/src/actions/getOrCreateAssociatedTokenAccount.ts
https://github.com/solana-labs/solana-program-library/blob/jsx/token-ts/token/ts/src/state/mint.ts#L114-L129
https://github.com/solana-labs/solana-program-library/blob/jsx/token-ts/token/ts/src/instructions/transfer.ts
I'm closing this since it's out of scope for this library, but I hope it helps.

Thanks so much for the answer, really helped me and i managed to get it working with some tweaking 💪💪

I am trying to burn the SPL tokens but getting a buffer error. How can I solve this issue?
Detail of this issue:
https://stackoverflow.com/questions/72432042/how-to-create-a-transaction-to-burn-spl-tokens-in-react-app

authors: block-dev1 jordansexton ricklancee

repo: solana-labs/wallet-adapter


text:
builder: Use posix error code

Replacing ENOTUNIQ with EEXIST. Since the previous statement is
returning EEXIST if there already is the node the same can be applied
for duplicated name.
Signed-off-by: Flavio Ceolin flavio.ceolin@intel.com

duplicated, https://github.com/solettaproject/soletta/pull/1332

repo: solettaproject/soletta


text:
Adding changes from solid-panes and solid-ui

Also making use of types generated by the projects

I'm assuming you tested these changes and that they worked :) Maybe we should deploy the latest mashlib prerelease to dev.inrupt.net to see whether that still works as well?

I have a couple more changes to do before everything is finished. I want to complete the migration to the new context object first at least, as deploying that to dev.inrupt.net and getting some people to test it would be valuable.

I want to complete the migration to the new context object first at least, as deploying that to dev.inrupt.net and getting some people to test it would be valuable.

I was thinking more of a sanity check that everything still builds and deploys correctly, to make it easier to track down if it doesn't. QA can happen later :)

authors: Vinnl megoth

repo: solid/mashlib