JSON endpoint for project is 404 if only yanked releases are available

From https://github.com/pypa/warehouse/issues/3709#issuecomment-754973958, it appears that the JSON API for a project is 404 if the only releases available are yanked releases.
E.g. https://pypi.org/pypi/django-twilio2/json should probably look like https://pypi.org/pypi/django-twilio2/0.9.0/json instead of being 404.

@di Do you know if anyone is working on this? I'm interested in taking a crack at it. I'm working through the getting-started and submitting-patches guides, just didn't want to duplicate any efforts.

It does not appear that anyone is working on this at the moment!

Sweet. I have a hopefully quick followup question about this. In the case where all non-prerelease versions of a package are yanked, but there are prerelease versions available that are not yanked, should this endpoint default to a yanked version or a prerelease version?

Sweet! I have a hopefully quick followup question about this. In the case where all non-prerelease versions of a package are yanked, but there are prerelease versions available that are not yanked, should this endpoint default to a yanked version or a prerelease version?

I think we should return a yanked release only if there are no other non-yanked releases available.

Thanks for all of the swift responses, I believe this is all finalized and ready for review.


[GLUTEN-1472] refine clickhouse memory audit

this PR is first step of https://github.com/oap-project/gluten/issues/1472

retest this please

test this please

Run Gluten Clickhouse CI


Fixes 41

Changes the dependency on "immutable" from a peer dependency to a regular dependency

@laaglu closing this since it is rendered OBE by https://github.com/bringking/react-web-animation/pull/43


90070BB44EEF.dmp

Which version of PhantomJS are you using? Tip: run phantomjs --version.

What steps will reproduce the problem?

Which operating system are you using?

Did you use binary PhantomJS or did you compile it from source?

Please provide any additional information below.

❓

@xhlwill wow. @Edrauda is this some automated posting of issue or a typo?


Releasing the next version (1.3.3?)

I can see that the last release is quite old, and given that recently there were a few changes (e.g. #75) it would be convenient to have a new version.

@lguminski Sorry for releasing v1.3.3 only now, we had new features merged together in the recent week and delayed to release the new version now.
Generally if features are merged into the master branch, you can specify the commit record during installation if you want to use the new features first, see this: How to point Go module dependency in go.mod to a latest commit in a repo?

@lryong I did that, but it's more convenient to have an official release. Thank you!


Make the group simulation not have to clone the environment.

Currently because of mutability issues, we need to clone the working environment to separate the immutable reads from the mutable writes. This is not really ideal since the data doesn't need to be cloned.
I have a notion that we can use some time locked values with a zero counter to get around this.

This is done! Waiting to close when we merge structural_sim back into main

While this has been resolved, the current solution is a bit of a hack and should be revisited and revised once #549 is complete.

Reopening given the completion of #549

Closing as this was fixed in #582


feat: Implement expiryStrategy

Description
Per discussion in #226, this implements an expiryStrategy config option and deprecates recordIfExpired (without a breaking change) . It supports the existing flows and adds the new error state, which throws when the strategy is set to error and an expired recording is about to be used in replay mode.
We are still implementing tests, but would love input on the approach.
Motivation and Context
See #226 for detailed info.
Types of Changes

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist

[ ] I have added tests to cover my changes. - Tests in progress, the it blocks are included for now, let us know if they would be in line with the overall testing strategy for the repo.
[x] My change requires a change to the documentation.
[x] I have updated the documentation accordingly.
[x] My code follows the code style of this project.
[x] My commits and the title of this PR follow the Conventional Commits Specification.
[x] I have read the contributing guidelines.

@jasonmit @offirgolan do y'all have a way of iterating on a single test (it block) with testem? I didn't see one in the CONTRIBUTING guide, and testem is new to all of us.

You can run a single test by using it.only on the test and then running yarn test -l Chrome or yarn test:ci -l Chrome. To run the test in node, substitute -l Chrome with -l Node.
I'll make sure to add that to the Contributing guide as you're not the first to ask 😄

Ok, so this is quite close now. Writing the tests for this has been pretty harrowing, but it's worth it.

I had to disable the tests for puppeteer and XHR for the thrown error because they always fail.
When I skip XHR on that test, I somehow have polluted the test running to the point that two XHR Integration tests fail (which we see in the failed tests on CI).

@fastfrwrd I'm gonna look into the XHR & Puppeteer issues and try to figure out why they might be failing.

So the reason as to why that test was failing on some adapters and not others is because each adapter has a different way of handling errors. The XHR adapter for instance does the following:
https://github.com/Netflix/pollyjs/blob/de66b42b8384d7dabba59783c59408dc0053690b/packages/%40pollyjs/adapter-xhr/src/index.js#L61-L66
The solution is to get the error from the error event which will guarantee that the error was emitted since we have a top level error handler.
This test should pass across all adapters:
it('throws on expired recording if expiryStrategy is "error"', async function() {
  const { server } = this.polly;
  let error;

  this.polly.configure({ expiryStrategy: 'error' });
  server.any().on('error', (req, e) => (error = e));

  try {
    await testExpiration.call(this);
  } catch (e) {
    // noop
  }

  expect(error).to.exist;
  expect(error.message).to.match(
    /Recording for the following request has expired/
  );
});

OK!! The tests are done and the comments are addressed, I believe. Let me know if there are any other things we should take a look at! Thank you SO MUCH for your help on the tests @offirgolan!

Released with v2.6.0 🎉


fix: Update comment count of a page on comment deletion

This PR fixes the bug of comment count not being updated when a comment of a page is deleted, even when you reload the page.
This means that there still remains a bug of comment count not being updated automatically after you click "Delete" button in the modal. Since comment counts are rendered using a template (pug?), it is a bit tricky to reflect the change without reloading the page. Hence, I will tackle this issue in another PR.

Thank you for your PR.
Could you please describe condition of how to reproduce of the bug, and expected behavior fixed by this PR?
You can make a new issue, or add comment to this PR.
Regards.

@ryu-sato #288

@hitochan777
I have confirmed that #288 was reproduced and this PR fix it.
Thank you for your contribution with your beautiful code.

This means that there still remains a bug of comment count not being updated automatically after you click "Delete" button in the modal. Since comment counts are rendered using a template (pug?), it is a bit tricky to reflect the change without reloading the page. Hence, I will tackle this issue in another PR.

I think it is difficult.
Crowi (and crowi-plus) is a system that mixed jQuery and React components. There is no smart way to solve it, you know. I think users do not mind to reload.


Add a mechanism for testing whether feature is present

Sometimes a particular property/operator is only available on some browsers. The generator will generate the field/methods regardless and the downstream consumer is left to try and feature detect in some other way. The simplest approach may be to just generate a @JsOverlay boolean supportsMyFeature() method that will allow caller to detect whether a feature is supported.
It would be too costly to generate supports*() methods for every feature so maybe the generator could load the canisue database and only generate supports*() methods if they are not supported compared to a particular base line (IE11?).
See also #29 because these features could be combined and driven by the same data.

We already think to add this kind of support and I need to think more about that. The canisue json file seems very helpful for that.
But this kind of feature will not be implemented directly in jsinterop-generator as it's only make sense for Elemental2. So I'm thinking maybe adding a kind of plugin system for jsinterop-generator where the plugin would be able to transform the java model before generating the code.

Ooer - that does sound like an interesting idea. One thing I have been contemplating lately is somehow injecting other sources of metadata into the generation pipeline. In particular I was thinking about ways of how we could read WebIDL and use that to enhance or replace the externs used as input to Elemental2.
The advantage of that is that we could read WebIDL from either specs, Chrome and/of Firefox and generate a relatively maintenance free, accurate API for interacting with the browsers. There would still be some work due to differences between browsers (i.e. Chromes ApplicationCache == Firefoxes OfflineResourceList ) and some work on partitioning different parts of the API.
This would mean that we could throw away integer_entities.txt and name_mappings.txt and that a lot of current edge cases would just be fixed. We could also inline constants into java code rather than using externs to access them. We could also more accurately model browser APIs as there is several constructs in specs that are not representable in closure type system. (i.e. overloaded operations that return different types). It would also mean that some edge cases would disappear due to names of types in Closure not aligning with names used by browsers. To get this working we would also need to generate closure externs from WebIDL but that is not infeasible.
Anyhoo - something to consider when thinking about this. I don't know if the above is feasible with current architecture and I am not yet at work to eyeball the code. But I guess what I am asking that if you were to add plugins that could run at various stages. I would love to be able to write a plugin that ran on the MetaData model AST as well as plugins that ran on the Java model ;)

jsinterop generator could generate the support calls while externally it could be provided by elemental2 for which APIs to generate it for.
Being said that, in jsinterop-base we can probably just add the nestedHas utility (in analogy to nestedGet) so you can do
Js.global().nestedHas("my.new.feature")
and elemental2 will put a nicer looking helper on Global so user code will look like:
DomGlobal.hasFeature("my.new.feature")
I think this will be good enough.

The advantage of that is that we could read WebIDL from either specs, Chrome and/of Firefox and generate a relatively maintenance free, accurate API for interacting with the browsers

The initial version of the jsinterop-generator was using WebIDL as input instead of extern files and we gave up.
IIRC, it was mainly because:

the type defintion in WebIdl does not contains enough information for generating good java code (absence of Parametrized type for example).
With J2CL you need to provide extern files otherwise the closure compiler will complain. If you use WebIdl as sources your generator needs now to generate those extern files and you start to get in trouble because the generated extern file are different that the one used by the closure compiler.

This would mean that we could throw away integer_entities.txt and name_mappings.txt

The initial version of  integer_entities.txt has been generated from WebIdl. We could do the same with name_mappings.txt

We could also inline constants into java code rather than using externs to access them.

But then you are starting to generate code for them. With J2CL + closure-compiler, after compilation you don't have specific code for accessing the constant (other than the referring directly to the name of the constant).

...snip...

DomGlobal.hasFeature("my.new.feature")

That is certainly a better place than where we are now and would probably work in most cases.

The initial version of the jsinterop-generator was using WebIDL as input instead of extern files and we gave up.

Interesting.

the type defintion in WebIdl does not contains enough information for generating good java code (absence of Parametrized type for example).

Interesting. I had not though about this for browser APIs. Handling elemental-core would be doable ... but the browser APIs would need a custom pass. Hmmm  I guess it is much like that tool that generates the typescript definitions of the browser from WebIDL. Although this does add a lot more infrastructure requirements to the project

With J2CL you need to provide extern files otherwise the closure compiler will complain. If you use WebIdl as sources your generator needs now to generate those extern files and you start to get in trouble because the generated extern file are different that the one used by the closure compiler.

Yes - you would need to use a custom env and bring in the right externs but this I don't see as too much of an issue ... at least external to google. Part of the reason I was contemplating WebIDL was because it is taking a lot of effort to get closures externs to match the spec. Not so much because writing the code is hard but because I suspect a lot of google internal code relies on the existing definitions ;)

The initial version of integer_entities.txt has been generated from WebIdl. We could do the same with name_mappings.txt

Yep. Or just use a process like read from closure externs first, then WebIDL second and thrdly use overrides if no other case covered.

We could also inline constants into java code rather than using externs to access them.

But then you are starting to generate code for them. With J2CL + closure-compiler, after compilation you don't have specific code for accessing the constant (other than the referring directly to the name of the constant).

I am not sure I understand. What I want to do (and what we have patched the tool to do locally) is to represent WebSocket.OPEN as public static final int OPEN = 1 rather than using it via looking up the browser. When done across a whole range of constants this can reduce the output code size a bit ... at least for smaller projects.


fix incorrect pack while using cuda, desc_act and grouping

In auto_gptq/modeling/_utils.py:pack_model, argument desc_act is missing when calling make_quant.
While using cuda, desc_act and grouping at the same time, pack_model and make_quant will have different implementation of QuantLinear, which results in empty qlayers.

I think this is fixed in #43 as well.


CIP-1694 | Move Acknowledgements into optional section

We had a request on Discord (@klntsky) which was well received: to move "workshop participants" (and maybe sometimes lists of minor co-authors) to the ends of CIP documents as per the optional sections legitimised in https://github.com/cardano-foundation/CIPs/pull/730.
This is also mandated by SEO principles like "source ordering" which is still an issue for properly indexing big documents with lots of names or code at the beginning.
Also CIP-0001 / CIP-9999 are updated to clear the way for similar Acknowledgements sections to be added in future CIPs / CPSs.  CIP-1694 is the one with the widest audience so let's clear this one first & then I/we can submit one more PR to update all others to follow suit: after confirming this first change is well received by the community.
@Ryun1 @Crypto2099 you've been managing some CIP relevant workshops so maybe we can also assemble a list of other documents to update in this PR discussion thread.  Another clue would be greping for the <details> tag to create the "accordion" sections.
@Hornan7 note this also updates the French version, but the commit hash is the same since the material isn't being re-translated.
p.s. since this has long been associated with the Ledger Team perhaps @lehins @WhatisRT you would also confirm this particular change to CIP-1694 itself.
p.p.s. the "shortest common substring" algorithm used by diff doesn't always produce a straightforward result for moving one single large block of text elsewhere in a file.  The only change submitted in https://github.com/cardano-foundation/CIPs/pull/763/commits/73c03910294b8e7f0aa128c1dac947367dc84121 is to move the entire #### Acknowledgements section from near the beginning (before the Motivation) to near the end (before the Copyright).

(updated CIP-1694 in English)
(updated CIP-1694 in French)
(updated CIP-0001)
(updated CIP-9999)

Looks good, especially with the added reference to the Acknowledgements section.

I'll make sure the French version is updated within 3 days of the merge.

@Ryun1 @Crypto2099 adding Last Check for next meeting since this has author & community approval & I believe just needs to be double checked by the editors.

epilogue: pinging other devs on Discord (in this post) to see which other proposals we might want to do this with (cc @Ryun1 @Crypto2099 @klntsky).


Test issue

When I try to test (in a very minimal environment) gopass-hibp, it fails due to a missing folder that is required by a gopass test file.
I think the test should either create the files that it needs or handle properly the fact that the files do not exists.
+ go-rpm-integration check -i github.com/gopasspw/gopass-hibp -b /builddir/build/BUILD/gopass-hibp-1.15.0/_build/bin -s /builddir/build/BUILD/gopass-hibp-1.15.0/_build -V 1.15.0-1.fc38 -p /builddir/build/BUILDROOT/gopass-hibp-1.15.0-1.fc38.x86_64 -g /usr/share/gocode -r '.*example.*' -d github.com/gopasspw/gopass-hibp/pkg/hibp/api
Testing    in: /builddir/build/BUILD/gopass-hibp-1.15.0/_build/src
         PATH: /builddir/build/BUILD/gopass-hibp-1.15.0/_build/bin:/builddir/.local/bin:/builddir/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin
       GOPATH: /builddir/build/BUILD/gopass-hibp-1.15.0/_build:/usr/share/gocode
  GO111MODULE: off
      command: go test -buildmode pie -compiler gc -ldflags " -X github.com/gopasspw/gopass-hibp/version=1.15.0 -extldflags '-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes '"
      testing: github.com/gopasspw/gopass-hibp
github.com/gopasspw/gopass-hibp
FAIL	github.com/gopasspw/gopass-hibp [setup failed]
# github.com/gopasspw/gopass-hibp
/usr/share/gocode/src/github.com/gopasspw/gopass/tests/can/can.go:12:12: pattern gnupg/*: no matching files found

Same issue happens with gopass-jsonapi, but not gopass itself

I think this must be realated to your limited test environment.
In a normal setting (e.g. our GitHub builders) this seems to work just fine.
This package is using embed.FS to embed the test data into the package: https://github.com/gopasspw/gopass/blob/master/tests/can/can.go#L12
I don't know what go-rpm-integration check but maybe it's missing the required source files?

Which required source files should be present to ensure that it works?
As for go-rpm-integration it's a script (https://pagure.io/go-rpm-macros/blob/35bd72648fe6cfa372f886b5692936ffb5b4389a/f/bin/go-rpm-integration) and in this case it should basically run go test.

Yes, exactly tests/can/gnupg needs to be present during build time.

I think that is exactly the problem:
<mock-chroot> sh-5.2# go-rpm-integration check -i github.com/gopasspw/gopass-jsonapi -b /builddir/build/BUILD/gopass-jsonapi-1.15.0/_build/bin -s /builddir/build/BUILD/gopass-jsonapi-1.15.0/_build -V 1.15.0-1.fc38 -p /builddir/build/BUILDROOT/gopass-jsonapi-1.15.0-1.fc38.x86_64 -g /usr/share/gocode -r '.*example.*'
Testing    in: /builddir/build/BUILD/gopass-jsonapi-1.15.0/_build/src
         PATH: /builddir/build/BUILD/gopass-jsonapi-1.15.0/_build/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin
       GOPATH: /builddir/build/BUILD/gopass-jsonapi-1.15.0/_build:/usr/share/gocode
  GO111MODULE: off
      command: go test  -ldflags "-extldflags ''"
      testing: github.com/gopasspw/gopass-jsonapi
github.com/gopasspw/gopass-jsonapi
# github.com/gopasspw/gopass-jsonapi
/usr/share/gocode/src/github.com/gopasspw/gopass/tests/can/can.go:12:12: pattern gnupg/*: no matching files found
FAIL	github.com/gopasspw/gopass-jsonapi [setup failed]
<mock-chroot> sh-5.2# ls /usr/share/gocode/src/github.com/gopasspw/gopass/tests/can/
can.go  can_test.go
<mock-chroot> sh-5.2#

I then only need to understand why they are not there (and why the process worked with 1.12). I guess that for some reasons I'm not properly packaging those files in the gopass package!

I managed to find the issue!
I've now specified those files which are now properly shipped (https://src.fedoraproject.org/rpms/gopass/c/3cb55f7065e1eae1e6e2545d491497fb57e6d14e?branch=rawhide). It seems like there is another test error, but it seems completely unrelated to the stated issue :-)

You are very welcome. And thanks a lot for your work on maintaining this package. If there is anything we can do to make this easier, please let us know.


Upgrade to Vala 0.48 and fix CI

Nuvola got stuck with Vala <IP_ADDRESS>-39ef8. We should upgrade to the latest stable Vala 0.48 and fix CI builds.

Nuvola CDK
valalint
diorite
valacef - see tiliado/valacef#18
nuvolaruntime

All Nuvola flatpaks are now built with Vala 0.48.5.


InferenceEngine problem with data parrallel [BUG]

Hi, I try to use deepspeed.init_inference() with data parrallel.
But, I find the tensors are brodcasted in the forward pass of InferenceEngine.

It is confused for me and I need some help to know more in depth.
Thanks!

In addition, how to set the mpu args in deepspeed.init_inference ?

Hi @SihengLi99
Inference-engine is designed to only support tensor-slicing model-parallelism. We are in the process of adding more parallelism to it. Regarding the mpu, if you don't have such object you can pass it as None and the engine will create a model-parallel group to partition the model for you.
Hope this helps answer your question.
Thanks,
Reza

Closing the issue due to staleness. Please open if this is still an issue.
Thanks,
Reza


NPM publish

It could be useful to publish to npm directly using this package. It could be a new builder.

We'll have to handle:

[ ] Prompting the user for OTP
[ ] Using tokens in env vars for the CI (another issue)?

https://github.com/bikecoders/ngx-deploy-npm is interesting but it doesn't work with nx as it checks for configurations in angular.json.
It's probably easier to fix it than to reinvent it.
We can then extend our ng-add schematic to install ngx-deploy-npm and configure it for publishable libraries.

https://github.com/bikecoders/ngx-deploy-npm is interesting but it doesn't work with nx as it checks for configurations in angular.json.
It's probably easier to fix it than to reinvent it.
We can then extend our ng-add schematic to install ngx-deploy-npm and configure it for publishable libraries.

Closing this issue to regroup the discussions here #167.


Add possibility to keep current scroll position in the Turbolinks.visit API

On certain occasions some might need to keep current scroll position.
In my case I call Turbolinks.visit(location.href) to reload the content of the current page -- this is an improvised replacement for location.reload().
Problem is, that if you want to reload the current page content for, say, new elements created by AJAX form submission, the page will scroll back to top, yet you want to keep the scroll position.
Partial replacements is a way to do this, but requires specific Rails code on the backend to just render that partial and then you're getting even more tied to the front-end.
So, I've added an extra option to keep the scroll position.
When invoking Turbolinks manually:
Turbolinks.visit(path, { keepScrollPosition: true });

Or by marking the element with the data-turbolinks-keep-scroll attribute:
Change the page and keep current scroll position.

Edited: 2015-05-04

I believe this will be more important with the new Turbolinks 3 partial changes.  Right now with partial changes the page scrolls to the top which is not what you really want happening.
Right now I'm doing this.  Which was posted in one of the other issues about scrolling.
$(document).on "page:change", ->
  window.prevPageYOffset = window.pageYOffset
  window.prevPageXOffset = window.pageXOffset

$(document).on "page:load", ->
  window.scrollTo window.prevPageXOffset, window.prevPageYOffset

Right now when the partial changes the page scrolls to the top.

@drewhamlett This shouldn't happen with Turbolinks.replace / render :action, change: :key. Can you post the code that you're using?

I must be missing something, because I'm using the redirect to in this case.  I have a section on a page that gets updated, but the page requires a bunch of other data to re render that page, not specific the section that gets updated.  If I just use render I have to duplicate a lot of code to fetch all the other pieces of the page.
Unless I'm doing something wrong?

@drewhamlett Oops, I forgot that Turbolinks.visit / redirect_to can also do partial replacements. Expect a PR / fix soon.

Rewrote the patch to conform to the latest Turbolinks code and updated the PR description.

@tzvetkoff I'm working on a similar PR with tests for some of the edge cases and a fix for the problem @drewhamlett described. Will keep you updated.

:+1:  Thanks guys, very useful. Page refreshing will look like on SPA :)

Turbolinks.visit(url, scroll: false) has been merged into master (#528). I will PR data-turbolinks-scroll=false and update the docs this week-end.
Thanks all for pushing this forward.

Thanks @Thibaut and everyone!


Save session to database

I want to log in with multiple accounts in the program, but I don't want to save multiple session files, so what should I do? Can I save the session to the database?

WTelegram.Client constructor takes an optional sessionStore parameter to allow storing sessions somewhere else than files. Use it to pass a custom Stream-derived class that will read (initial of Length+Read) and store (subsequent Writes) session data to database.
You can find an example for such custom session store in Examples/Program_Heroku.cs


Systemd v243.4

closes #74207
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
[x] Built on NixOS
[x] Tested via nixos/tests/timezone.nix

cc @flokli

Accompanying systemd PR: https://github.com/NixOS/systemd/pull/34

You want master or should it be staging?

Good catch, thanks.

What was wrong with https://github.com/NixOS/nixpkgs/pull/74207 in the first place?

#74207 broke the timezones-imperative test.


Version 0.9: Enketo reports "invalid date" for a calculated date working in Collect

I have a text field which is filled in calculation by:  format-date-time(once(now()),   '%H:%M:%S
This works fine in ODK Collect, giving date in German Format ( 20.07.2020).
In Enketo Preview (version as of today), and "invalid date" is display - other fields are ok at first sight.

Thanks! While we now package Enketo with Central, it’s still being developed as a separate project. As I wrote a bit about at https://github.com/getodk/central/issues/151#issuecomment-664481338, sharing issues through the forum will take the triage burden off of you so you can focus on the problem you’re experiencing and its impact on your work.


Customizing daterange picker

Hi again Samir,
is it possible to make 'Start Date' and 'End Date' buttons to jump between them?
Thx!

Yes it is possible to jump between them, but I  have to changes.  I will test it and if it works without creating any problem i will commit it

Great!
is it also possible when cancelling custom range to return to main menu?
Thx in advance!


Fix nginx default.key permission

Solved issue:

https://github.com/laradock/laradock/issues/2285

with solution:

https://github.com/laradock/laradock/issues/2285#issuecomment-616225902

please, check this PR


Add memcached as supported cache type

This adds memcached just the same as redis is supported.
I don't have an example that uses this right now, so tests are likely irrelevant.

Manually tested this and it seems fine.


Updates to S2 notebook

Proposed changes
Made a few minor changes to the S2 notebook:

Fixed image and tags that weren't rendering properly
Added a section on S2 NRT
Rewrote some bits to account for both Definitive and NRT products

Checklist (replace [ ] with [x] to check off)

[x] Notebook created using the DEA-notebooks template
[x] Remove any unused Python packages from Load packages
[x] Remove any unused/empty code cells
[x] Remove any guidance cells (e.g. General advice)
[x] Ensure that all code cells follow the PEP8 standard for code. The jupyterlab_code_formatter tool can be used to format code cells to a consistent style: select each code cell, then click Edit and then one of the Apply X Formatter options (YAPF or Black are recommended).
[x] Include relevant tags in the final notebook cell (refer to the DEA Tags Index, and re-use tags if possible)
[x] Clear all outputs, run notebook from start to finish, and save the notebook in the state where all cells have been sequentially evaluated
[x] Test notebook on both the NCI and DEA Sandbox (flag if not working as part of PR and ask for help to solve if needed)
[x] If applicable, update the Notebook currently compatible with the NCI|DEA Sandbox environment only line below the notebook title to reflect the environments the notebook is compatible with

Hmm, something weird still seems to be happening with the tags...

Fixed! (the raw cell had lost its restructured text formatting)


Incorrect link to Super Scaffold in Getting Started docs

Point 2 in https://bullettrain.co/docs/getting-started links to
https://github.com/bullet-train-co/bullet_train-base/blob/main/docs/super-scaffolding
but I believe it should instead be:
https://github.com/bullet-train-co/bullet_train-base/blob/main/docs/super-scaffolding.md
Strangely, the link seems correct on GitHub (https://github.com/bullet-train-co/bullet_train-base/blob/main/docs/getting-started.md).

Actually I expect it should link to https://bullettrain.co/docs/super-scaffolding rather than GitHub?

@andyw8 The links work fine when navigating on GitHub, but it looks like the way GitHub processes the link when accessing from an outside source is different.
For example, the links will change like this:
Via GitHub → https://github.com/bullet-train-co/bullet_train-base/blob/main/docs/super-scaffolding.md
Via outside source → https://github.com/bullet-train-co/bullet_train-base/tree/main/docs/super-scaffolding
Since the directory super-scaffolding shows up first under /docs, I'm assuming that it's picking up on that first and processing the link as a tree (directory) and doesn't reach our file super-scaffolding.md.
Here's some info about how GitHub will automatically change a link's structure. Specifically this part:

In your example, Podfile is a file containing source code. Hence, it is a blob object. However, git is smart and realizes this fact. Hence, when you click the link, it changes the tree in the link to blob.

I'm not sure why it's not picking up on .md as a file, but it's also going to the directory instead of the file for me too when trying to access locally or via bullettrain.co.
@andrewculver any thoughts? We could try changing the file name or directory, or just keep the text and remove the link.

Fixed in https://github.com/bullet-train-co/bullet_train-base/pull/11/commits/32f10742bad5cea4bccb5d8b3b9c251a8019ff01 .


improve performance of mbleven

Short circuit early if the strings are identical or the number of edits is low.
See https://github.com/fujimotos/polyleven/issues/4 for more details.
Reviewers: please double-check and test this code carefully. This is the first time I've written in C. I'm also unsure how to run the tests so I've not run them.

Short circuit early if the strings are identical or the number of edits is low.

So I pulled @Nick-Mazuk's patch this evening and run the basic regression
test against it. Basically everything was green:
test_ascii (__main__.TestPattern) ... ok
test_ascii_with_k (__main__.TestPattern) ... ok
test_long (__main__.TestPattern) ... ok
test_special (__main__.TestPattern) ... ok
test_unicode (__main__.TestPattern) ... ok
test_unicode_with_k (__main__.TestPattern) ... ok

Reviewers: please double-check and test this code carefully. This is the first time I've written in C. I'm also unsure how to run the tests so I've not run them.

I will test more on this patch this weekend (I want to test it with
more exotic cases). Please wait for me.

Merged via 28d90d501a675d83550a8d59a12827856e9ed07d

Merged via 28d90d501a675d83550a8d59a12827856e9ed07d

@Nick-Mazuk OK. I can confirm that your patch is correct.
I merged your improvement into master in 28d90d5, and also
added you as the author to LICENSE.txt:
https://github.com/fujimotos/polyleven/blob/master/LICENSE
Feel free to ask me if anything is unclear (Note: I can also list
your email in LICENSE.txt if you have one; I couldn't find out
your mail address in your Git commit)

THanks @fujimotos! It's fine with me that my email isn't in LICENSE.txt as I'd prefer to keep it private.


crash in line 484  In class PhotosViewController version 2.7.1

Same with me:
function signature specialization <Arg[0] = Owned To Guaranteed, Arg[1] = Owned To Guaranteed, Arg[2] = Owned To Guaranteed> of closure #1 () -> () in BSImagePicker.PhotosViewController.photoLibraryDidChange(__ObjC.PHChange) -> () (PhotosViewController.swift:484)

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of items in section 1. The number of items contained in an existing section after the update (13) must be equal to the number of items contained in that section before the update (13), plus or minus the number of items inserted or deleted from that section (1 inserted, 0 deleted) and plus or minus the number of items moved into or out of that section (0 moved in, 0 moved out).'

the same

NSInternalInconsistencyException: Invalid update: invalid number of items in section 1. The number of items contained in an existing section after the update (776) must be equal to the number of items contained in that section before the update (772), plus or minus the number of items in

Adding a "me too" comment if for nothing else hoping that it raises the priority of this bug.
It happens when adding or deleting a photo - for example a screenshot taken of the app.

Created a PR with a fix: https://github.com/mikaoj/BSImagePicker/pull/182


src/AMQPMessage.cpp

There is an error during compilation of the file at line 48. The signature of the function is:
char * AMQPMessage::getMessage(uint32_t* length)
On line 48, the return statement is:
return '\0'
which is a char. And it does not agree with the return type.
I would like to suggest to change it to:
return NULL;
or
return (char *) '\0';

你用的什么编译器
What compiler do you use?

NULL == '\0' == 0

gnu g++ 7.2 on Ubuntu 16.04.
Please see error below:
change the return to NULL or (char*) '\0' will solve the compilation error.
g++  -Wall -I/usr/local/include -L/usr/local/lib -Iinclude/  -c -o
src/AMQP.o src/AMQP.cpp
g++  -Wall -I/usr/local/include -L/usr/local/lib -Iinclude/  -c -o
src/AMQPBase.o src/AMQPBase.cpp
g++  -Wall -I/usr/local/include -L/usr/local/lib -Iinclude/  -c -o
src/AMQPException.o src/AMQPException.cpp
g++  -Wall -I/usr/local/include -L/usr/local/lib -Iinclude/  -c -o
src/AMQPMessage.o src/AMQPMessage.cpp
src/AMQPMessage.cpp: In member function 'char*
AMQPMessage::getMessage(uint32_t*)':
src/AMQPMessage.cpp:48:9: error: invalid conversion from 'char' to 'char*'
[-fpermissive]
return '\0';
^~~~
: recipe for target 'src/AMQPMessage.o' failed
make: *** [src/AMQPMessage.o] Error 1
root@be9977d2b8d2:/opt/amqpcpp# g++
g++: fatal error: no input files
compilation terminated.
root@be9977d2b8d2:/opt/amqpcpp# g++
g++: fatal error: no input files
compilation terminated.
root@be9977d2b8d2:/opt/amqpcpp# g++ -h
g++: error: missing argument to '-h'
g++: fatal error: no input files
compilation terminated.
root@be9977d2b8d2:/opt/amqpcpp# g++ --version
g++ (Ubuntu 7.2.0-1ubuntu1~16.04) 7.2.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
On Mon, Nov 20, 2017 at 7:52 PM, WKR<EMAIL_ADDRESS>wrote:

NULL == '\0' == 0
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/akalend/amqpcpp/issues/72#issuecomment-345909122, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AYb9kmiDPMFkeA7iLWGtg9l4PMM0Cufoks5s4kkOgaJpZM4Qk6KF
.

--
Chi Ho
Principal Software Engineer
Roche Sequencing Solution
4155 Hopyard Road Suite 200, Pleasanton, CA 94588
Office: +1<PHONE_NUMBER>
Mobile: +1<PHONE_NUMBER>
Fax: +1<PHONE_NUMBER>
Email<EMAIL_ADDRESS>

Sorry,
The cut and paste mess up the error message. Here it is again.
g++  -Wall -I/usr/local/include -L/usr/local/lib -Iinclude/  -c -o
src/AMQP.o src/AMQP.cpp
g++  -Wall -I/usr/local/include -L/usr/local/lib -Iinclude/  -c -o
src/AMQPBase.o src/AMQPBase.cpp
g++  -Wall -I/usr/local/include -L/usr/local/lib -Iinclude/  -c -o
src/AMQPException.o src/AMQPException.cpp
g++  -Wall -I/usr/local/include -L/usr/local/lib -Iinclude/  -c -o
src/AMQPMessage.o src/AMQPMessage.cpp
src/AMQPMessage.cpp: In member function 'char*
AMQPMessage::getMessage(uint32_t*)':
src/AMQPMessage.cpp:48:9: error: invalid conversion from 'char' to 'char*'
[-fpermissive]
return '\0';
^~~~
: recipe for target 'src/AMQPMessage.o' failed
make: *** [src/AMQPMessage.o] Error 1
Yes, to your point. Although
NULL == '\0' = 0. However, for type checking compiler, the return type has
to match the signature. That is the reason why I suggest to use the system
definition of "NULL" or type cast the return to "char *"
Chi
On Mon, Nov 20, 2017 at 7:52 PM, WKR<EMAIL_ADDRESS>wrote:

NULL == '\0' == 0
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/akalend/amqpcpp/issues/72#issuecomment-345909122, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AYb9kmiDPMFkeA7iLWGtg9l4PMM0Cufoks5s4kkOgaJpZM4Qk6KF
.

--
Chi Ho
Principal Software Engineer
Roche Sequencing Solution
4155 Hopyard Road Suite 200, Pleasanton, CA 94588
Office: +1<PHONE_NUMBER>
Mobile: +1<PHONE_NUMBER>
Fax: +1<PHONE_NUMBER>
Email<EMAIL_ADDRESS>

Different compiler restrictions are not the same.
You can modify the code to adapt to different compilers.
By the way, where are you from?

Yes, I could modify the code to make it work. However, since I am pulling the git directly from within the Docker Container and do the build within, it would be nice that the fix can be done at the source instead of having a custom script to modify the source.

你这代码不严谨啊，不能怪人家编译器,一个是char,一个是char*

There is an error during compilation of the file at line 48. The signature of the function is:
char * AMQPMessage::getMessage(uint32_t* length)
On line 48, the return statement is:
return '\0'
which is a char. And it does not agree with the return type.
I would like to suggest to change it to:
return NULL;
or
return (char *) '\0';

I have this same issue on Ubuntu 18.04.2 LTS using g++ (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0 and the following change to line 48 resolved the compilation error:
return (char *) '\0';
Thanks


Feature/lite 29730 migrate to esm and from webpack to vite

Use ES Modules instead of CommonJs
Replace webpack build with vite build
replace testing library from jest to vitest
upgrade storybook 8 and add support to work with vite

IMPROVEMENTS in the future:

bringing back svg mock to not load all icons for tests (didn't find way to replace by vitest config how vite deals with icons)
storybook initial loading time is surprisingly long :(

IMPROVEMENTS in the future:
bringing back svg mock to not load all icons for tests (didn't find way to replace by vitest config how vite deals with icons)
storybook initial loading time is surprisingly long :(

Could you add these improvements as new subtasks in the UI Toolkit JIRA US?


Please review first chapter

It is stated that a yammer enterprise license is needed for an external user who belongs to an Office 365 Tenant.
The OSTs say on page 27 Yammer
For Office 365 Services that include Yammer, External Users invited to Yammer via external network functionality do not need User SLs
Further it is stated that users that do not not (two nots) belong to an Office 365 tenant need a school and work account. Can you please explain what a school and work account is that is not an Office 365 account?
The only way I know is an Azure oder Intune Account.

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

ID: 7b3a2463-a8f4-3ba7-0524-37fc75fa783d
Version Independent ID: 14374d2a-eb47-d2e5-fbc3-be6ee56e14b5
Content: Add external messaging participants to your Yammer conversations
Content Source: yammer/work-with-external-users/add-external-participants.md
Service: yammer
GitHub Login: @IrenePasternack
Microsoft Alias: v-irpast

@mwe-microsoft  - Thank you for submitting feedback.
I will get this issue over to the O365ITPro writing team for investigation.
Thank you for reporting and making the docs better. Much appreciated.
I made a note to request the team to update this when the work is complete.

@TeresaFG-writer - Can you please share your insights on this issue?
Thank you.

Thank you for forwarding. I made some changes and they are pending.

@mwe-microsoft - From our understanding, the issue has been resolved based on this merged commit https://github.com/MicrosoftDocs/OfficeDocs-O365ITPro/commit/3aa303300867dfd9a2a44a6f9a607641df7aa4a9. If you feel it hasn't been resolved, please re-open this issue.
Thank you for your contribution to make the docs better! Much appreciated!


Kafka 0.8 Version support

Does this library support node 0.8? It would be really helpful if it does.

It doesn't.
It is tested only with 0.10 and 4.4

Thanks for the information. Could you provide an example where we do not require to init producer again and again and we can use producer to send messages continuously.

Please check producer retries option. The producer will retry to send messages configured amount of times with configured delay between attempts. Then it will reject to send these messages but the next call to send will do all the same attempts.

Thanks. I have checked producer retries option. However I am facing one more issue. Below is snippet of  my code:
`var Kafka = require('no-kafka');
var producer = new Kafka.Producer({
connectionString : "localhost:9092,localhost:9093"
});
var promise = producer.init();
var logEvent = function(message) {
return promise.then(function(){
producer.send({
topic: 'kafka-test-topic',
partition: 10,
message: {
value: message
}
}).then(function(result) {
console.log("Message sent");
}).catch(function(err) {
console.log('promise rejection', err);
});
})
};
module.exports = {
logEvent : logEvent
};`
When I am sending message to a topic or partition that does not exist on broker, it still does not sends exception. Every time I am receiving message sent. What's the issue with the code?

You need to check the result objet returned from send call. It contains a map of results (offset or error) for each topic/partition pair.

Thanks buddy. Appreciate quick responses and help


[9T8E] Pipeline reproduction (SPM deriv)

Softwares
SPM12 (7219)
Input data
derivatives (fMRIprep)
Additional context
Neurovault collection link: https://neurovault.org/collections/4870/
Pre-registration link: https://osf.io/54w2n
Softwares used: SPM12 (7219)
Number of participants: 106
Exclusion: sub-003 and sub-107
List of tasks
Please tick the boxes below once the corresponding task is finished. :+1:

[x] :ok_hand: A maintainer of the project approved the issue, by assigning a :checkered_flag:status: ready for dev label to it.
[x] :deciduous_tree: Create a branch on your fork to start the reproduction.
[x] :sunrise: Create a file team_{team_id}.py inside the narps_open/pipelines/ directory. You can use a file inside narps_open/pipelines/templates file as a template if needed.
[ ] :brain: Write the code for the pipeline, using Nipype and the file architecture described in docs/pipelines.md.
[ ] :blue_book: Make sure your code is documented enough.
[ ] :snake: Make sure your code is explicit and conforms with PEP8.
[ ] :microscope: Create tests for your pipeline. You can use files in tests/pipelines/test_team_* as examples.
[ ] :microscope: Make sure your code passes all the tests you created (see docs/testing.md).
[ ] :inbox_tray: create a pull request from your code.

Hi, Jumping in with the idea to contribute with a batch of the individual analysis

I am adding @ebannier as assignee (just for the time of the hackathon). So that we can more easily which pipelines are open for contributions in see this view: https://github.com/orgs/Inria-Empenn/projects/1/views/1

We can do this without SnPM up to the production of the statistic map and then decide if we threshold using parametric statistics (as usual, in departure from what was done by the team here) or if we install SnPM to get the thresholded map using non-parametric computation of p-values.


Add externalBuiltins option or make them external by default.

This is a proposal in response to https://twitter.com/SavePointSam/status/975146310855622656
At the moment if someone wants to bundle everything but keep builtins as external dependencies, they have to do something like this:
import resolve from 'rollup-plugin-node-resolve';

export default ({
  input: 'src/index.js',
  plugins: [resolve()],
  external: ['path', 'fs', ...],
  output: {
    file: 'build/server.js',
    format: 'cjs'
  }
})

i.e. they have to list all builtins manually in their externals list (and adapt this manually in the future). My feeling is that rollup-plugin-node-resolve already has the necessary dependencies to trivially implement an option externalBuiltins to do that for the user, i.e. the example could become
import resolve from 'rollup-plugin-node-resolve';

export default ({
  input: 'src/index.js',
  plugins: [resolve({externalBuiltins: true})],
  output: {
    file: 'build/server.js',
    format: 'cjs'
  }
})

Would like some feedback before preparing a PR (maybe this is already possible in some way?)
cc @keithamus, @guybedford

Hm, please correct me if I'm wrong - maybe I'm not understanding the problem - but rollup-plugin-node-resolve doesn't actually resolve builtins. See https://github.com/rollup/rollup-plugin-node-resolve/blob/7846a19da76e84f81f349162e6cf281550f6a67d/src/index.js#L172-L173
In fact with a small repo using your first config, I get the following output:
$ rollup -c rollup.config.js
src/index.js → build/server.js...
(!) Unresolved dependencies
https://github.com/rollup/rollup/wiki/Troubleshooting#treating-module-as-external-dependency
fs (imported by index.js)
created build.js in 15ms

$ cat build/server.js
'use strict';
var fs = require('fs');
console.log(fs.readFile('x'));

Yes, but it gives you a warning for each builtin that user's have to silence by filling the external field. My suggestion is to add a switch to silence these warnings all at once. So the implementation could just become
if ( ~builtins.indexOf( resolved ) ) {
 	fulfil( externalBuiltins ? false : null );

making use of the fact the false is interpreted as "mark as external and do not further try to resolve this via other plugins". But it is also important to not make things more confusing.

Adding an option just to silence a warning seems - to me - that it does not really meet the complexity-benefit-tradeoff; as you've demonstrated it certainly would be a simple change to implement but another option to document and more complexity inherited by people consuming the plugin. We could instead look to document how to acheive this without changes to this code:
import resolve from 'rollup-plugin-node-resolve';
import builtins from 'builtin-modules'
export default ({
  input: 'src/index.js',
  plugins: [resolve()],
  externals: builtins,
  output: {
    file: 'build/server.js',
    format: 'cjs'
  }
})

Yes, the alternative would be to add this example to the documentation.

This is definitely useful, great suggestion!
Could also be worth considering if this should be a more generic node: true build option as well.

Also interested in this

Any updates?

@mmomtchev @franhaselden @mecurc please take a look at https://github.com/rollup/rollup-plugin-node-resolve/issues/146#issuecomment-374163293; providing builtins to the externals option sufficiently silences these warnings.


CU-86drpndam - Refactor example_tests/test_wrapped_neo.py to use BoaConstructor

Summary or solution description
Rewrote examples_tests/test_wrapped_neo.py file so the tests are more efficient do test the WrappedNeo example contract using BoaTestCase

Task linked: CU-86drpndam Refactor example_tests/test_wrapped_neo.py to use BoaConstructor

coverage: 91.954%. remained the same
when pulling b326d208646ad0114f33b8a2171b07cb59afba8c on CU-86drpndam
into 095a31775feafdb80420653da138b3425af8c44f on development.


Support ActiveNode modules which can be included into classes

A usecase in discussed here (see comments): http://stackoverflow.com/questions/28838112/multiple-types-for-each-record-in-neo4j-rb/28854860?noredirect=1#comment46030873_28854860

I’m wanting to create a relationship that’s polymorphic in both directions and, ideally, accessible through a ruby accessor. Something like:
(:Magazine)-[:mentions]->(:Celebrity)
(:Celebrity)-[:mentions]->(:HolidayDestination)
and be able to access it like 'Celebrity.find(1234).mentions’
Having the inverse accessor HolidayDestination.find(7).mentioned_by would also be useful
I plan to do this with Modules and include as necessary. I would also like the module to label the classes as :Mentions and :Mentionable or something like that. An inheritance hierarchy doesn't allow for this case. Maybe something ActiveNode#self.AddLabel would allow the module to add a label from Module#self.included(klass)?

Hey @mmmmmrob, that's interesting. Sorry for the slow response here, I've been on vacation and Brian's been moving.
I think that all we're missing to allow this is, like you said, a way to additional labels to existing classes. At the moment, self.mapped_label_name= will replace, which is no good. I have some thoughts about how this can be implemented that I'm going to play with now, we'll see if it gets us there.

+1 for allowing multiple non hierarchically related labels.
Another use case I have is to assign tags to different nodes (these could be colors, or hash tags or topic string tags) and they can apply to many different types of nodes

Sorry for the delay, just getting back from vacation.
You can definitely have modules which provided shared functionality (including properties/associations/validations/etc...), but you're saying you'd want a label to go along with that?  Could you give an example?

Hi Brian, thanks for the response, I may have misunderstood this thread. I'm simply want to add more Labels to an exist node (that already has a Label). I think I can just do that with .add_label(), right?

Yeah, you can use add_label to add a new label.  Just keep in mind that that may affect how that node is loaded in the future (which is maybe what you want).  For example if you have a Person model and an Author model which inherits from Person, then adding an Author label to a Person node will cause it to be loaded as an Author node in the future (though, the node won't change class when you do that.  Perhaps that's something that we should look into).
Probably that's what you want, but it's good to keep in mind.  You might look at this spec to see how different labels combinations for a node are loaded as different models:
https://github.com/neo4jrb/neo4j/blob/master/spec/e2e/node_wrapping_spec.rb
This issue is about the idea that you might have, for example, a Person model which includes a Commentable module (which has been set up in a certain way) and that the module would also mean that Person nodes also get a Commentable label.  That example is a bit odd, and the currently open question is if anybody has a good example of when including modules and having them affect labels ever makes sense.


Update to node 20

It seems update to node16 has already gone by.
Github is already recommending to update to node 20

Wow nice catch 👍


Detect wrong video IDs for youtube and correct them

Before submitting a pull request make sure you have:

[x] At least skimmed through adding new extractor tutorial and youtube-dl coding conventions sections
[x] Searched the bugtracker for similar pull requests
[x] Checked the code with flake8

In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:

[x] I am the original author of this code and I am willing to release it under Unlicense
[ ] I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

[ ] Bug fix
[x] Improvement
[ ] New extractor
[ ] New feature

Description of your pull request and other information
Youtube video ids are the result of a base 64 encoding.
For example DJztXj2GPfk is the result of encoding 0c 9c ed 5e 3d 86 3d f9
But due to padding video id DJztXj2GPfl will decode into this same binary value.
Due to this, youtube-dl will download both DJztXj2GPfk and DJztXj2GPfl, it will result in the same file.
So why would we need this change? This does not work for all youtube APIs, for example it doesn't work for age gated content. Does work for 6QFwo57WKwg but does not work for 6QFwo57WKwh. The 6QFwo57WKwh id gives an age gated error, while this is irrelevant, it's the id that is wrong.

You should not make any assumptions about id. Youtube redirects to the page with correct id that must be taken instead of this.

The assumption is correct and it saves a bunch of time and requests.

The assumption may be correct now, but there is no guarantee that it will remain correct in the future. There is little harm in downloading a duplicate file, especially given that this seems to be an extremely unusual edge case. However, there would be harm in failing to download two separate videos because we made a bad assumption about YouTube's IDs.
Do these wrongly-padded video IDs actually appear in the wild? Is this issue affecting any users?

You are right.

Do these wrongly-padded video IDs actually appear in the wild?

No.

Is this issue affecting any users?

No.


[QRF-299] Fix - Search results month filter is filtering on the wron month

Nice! Could you update this code in other themes as well?

@oleg-semyonov should I do this manually or there is a way to do it smarter? :)

should I do this manually or there is a way to do it smarter? :)

Unfortunately not, for now it’s all manual changes :/


Can it support over scroll while fling list to the end?

if I drag list, it can be over scroll.
if I fling list, it can not.
so, how can it support ?

if I drag list, it can be over scroll.
if I fling list, it can not.
so, how can it support ?

It is useful!


Model-heterogenous methods

For knowledge-distillation based methods that allow heterogenous client models such as FedKD , FML, and FedProto, does this code base support the functionality to run experiments where clients have different local model architectures?

This codebase does not naturally support heterogeneous models. Please refer to our HtFL project, which is built on this codebase.
We have already mentioned this in the README file. :-)

apologies for missing that, thank you!


SetUnsafe like IsExpiredUnsafe

ttlcache is really a great thing. We save the state in intervals and on exit of the application in a yaml file.
We reload the state of the cache values on restart of the application.
What we miss is a function SetUnsafe which can be used without mutex locking. So it would be much faster on bulk reload.
There is a set function but this is only locally and cannot be used globally.

This might be a good feature. We've got two options here:

Add SetBulk() which would insert/update multiple items. (Still unclear: should we return multiple items as a result?)
Add a WithInitialData() option that would be used when creating a cache.

I presume the first option would work better in your situation?

For me both are good options.
For SetBulk just return an error or nil is sufficient for me. Maybe others see this differently
Because this will be used mainly on startup a WithInitialData option also is a good variant.
In the wild it will be rarely needed that a bulk update is needed after a start I guess. But who knows?


Fixed race condition when updating member's last_seen_at timestamp

ref https://linear.app/tryghost/issue/ENG-1240/race-condition-when-updating-members-last-seen-at-timestamp

So far, have managed to fix the race condition, but may have broken a few other things — cleaning things up and adding tests now.


[feat] events are now sorted in desc order

Sorted User's pending requests. This we cant sort like the other two right? Has to be done in java?


Missing "ACCEPTING_PREDICTIONS" tournament state

The internal deserialization of a tournament which is accepting bracket prediction fails because the corresponding TournamentState is missing:
try {
	challonge.getTournament("f3m4rmna");
} catch(Exception e) {
	e.printStackTrace();
}

Catches the following exception:
Exception in thread "main" java.lang.IllegalArgumentException: No enum constant at.stefangeyer.challonge.model.enumeration.TournamentState.ACCEPTING_PREDICTIONS
	at java.lang.Enum.valueOf(Enum.java:238)
	at at.stefangeyer.challonge.model.enumeration.TournamentState.valueOf(TournamentState.java:3)
	at at.stefangeyer.challonge.serializer.gson.adapter.TournamentAdapter.deserialize(TournamentAdapter.java:78)
	at at.stefangeyer.challonge.serializer.gson.adapter.TournamentAdapter.deserialize(TournamentAdapter.java:22)
	at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:69)
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:131)
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:222)
	at com.google.gson.Gson.fromJson(Gson.java:927)
	at com.google.gson.Gson.fromJson(Gson.java:892)
	at com.google.gson.Gson.fromJson(Gson.java:841)
	at at.stefangeyer.challonge.serializer.gson.GsonSerializer.deserialize(GsonSerializer.java:63)
	at at.stefangeyer.challonge.rest.retrofit.converter.RetrofitResponseBodyConverter.convert(RetrofitResponseBodyConverter.java:24)
	at at.stefangeyer.challonge.rest.retrofit.converter.RetrofitResponseBodyConverter.convert(RetrofitResponseBodyConverter.java:10)
	at retrofit2.OkHttpCall.parseResponse(OkHttpCall.java:223)
	at retrofit2.OkHttpCall.execute(OkHttpCall.java:186)
	at at.stefangeyer.challonge.rest.retrofit.RetrofitTournamentRestClient.getTournament(RetrofitTournamentRestClient.java:62)
	at at.stefangeyer.challonge.service.implementation.SimpleTournamentService.getTournament(SimpleTournamentService.java:49)
	at at.stefangeyer.challonge.Challonge.getTournament(Challonge.java:71)
	at at.stefangeyer.challonge.Challonge.getTournament(Challonge.java:75)
	at challonge_test.Main.main(Main.java:18)

The bug you encountered should be fixed. The fix will be available with the next release. I created a snapshot build for now available on maven central under 3.0.0-SNAPSHOT. Just a heads up: the project sructure has changed a bit as of now. I will update the code example when the new version is ready but it shouldnt be too hard to figure out anyway. If you have any questions feel free to ask.

Should the snapshot already be online? My build.gradle says it "Could not resolve: at.stefangeyer.challonge:core:3.0.0-SNAPSHOT" and I can't find it on https://mvnrepository.com either.

Sorry, i meant the OSSRH snapshot repository. Since its a snapshot only, it will obviously not be available on maven central. Available here.

Thanks, everything seems to work now.


Api changes

Summary of changes

UI cleanup (page x of y, formatting, etc.)
changes to controller (optional pretty formatting of response, etc.)
specify display field via conf

is this ready to be merged?

Thanks!


array getitem with another array and broadcasting

An example
>>> x = np.arange(12).reshape(4, 3)
>>> y = np.array([1, 1, 2, 3])
>>> dx = da.from_array(x, chunks=2)
>>> dy = da.from_array(y, chunks=2)
>>> x[y == 1]  # NumPy
array([[0, 1, 2],
       [3, 4, 5]])
In [43]: dx[dy == 1]

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-43-9a0439f73673> in <module>()
----> 1 dx[dy == 1]

/Users/taugspurger/Envs/dask-dev/lib/python3.6/site-packages/dask/dask/array/core.py in __getitem__(self, index)
   1196         # Slicing
   1197         if isinstance(index, Array):
-> 1198             return slice_with_dask_array(self, index)
   1199
   1200         if not isinstance(index, tuple):

/Users/taugspurger/Envs/dask-dev/lib/python3.6/site-packages/dask/dask/array/core.py in slice_with_dask_array(x, index)
   3868
   3869 def slice_with_dask_array(x, index):
-> 3870     y = elemwise(getitem, x, index, dtype=x.dtype)
   3871
   3872     name = 'getitem-' + tokenize(x, index)

/Users/taugspurger/Envs/dask-dev/lib/python3.6/site-packages/dask/dask/array/core.py in elemwise(op, *args, **kwargs)
   2624     shapes = [getattr(arg, 'shape', ()) for arg in args]
   2625     shapes = [s if isinstance(s, Iterable) else () for s in shapes]
-> 2626     out_ndim = len(broadcast_shapes(*shapes))   # Raises ValueError if dimensions mismatch
   2627     expr_inds = tuple(range(out_ndim))[::-1]
   2628

/Users/taugspurger/Envs/dask-dev/lib/python3.6/site-packages/dask/dask/array/core.py in broadcast_shapes(*shapes)
   2597         if any(i != -1 and i != 1 and i != dim and not np.isnan(i) for i in sizes):
   2598             raise ValueError("operands could not be broadcast together with "
-> 2599                              "shapes {0}".format(' '.join(map(str, shapes))))
   2600         out.append(dim)
   2601     return tuple(reversed(out))

ValueError: operands could not be broadcast together with shapes (4, 3) (4,)

A solution is for the user to manually reshape to y to a 2-d array, with length 1 on the second dimension. Then the broadcasting lines up. I think we want to follow NumPy here (if possible?)

Doing the broadcasting automatically makes sense to me.

I'll put together a fix then.

On Jun 5, 2017, at 11:24, Matthew Rocklin<EMAIL_ADDRESS>wrote:
Doing the broadcasting automatically makes sense to me.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@mrocklin would you (or anyone else familiar with the slicing / atop code) take a look at https://github.com/dask/dask/compare/master...TomAugspurger:array-slice-array and let me know if I'm starting down the wrong track? (apologies for the messy WIP code).

When I look at the result of the elemwise call everything seems fine.  I checked this by using result.visualize('dask.pdf') and result.compute() within a pdb call.
However when I look at the full output graph and keys I see that there is a mismatch
(Pdb) c
{'array-original-2d68ac816440984399abba3b570ca725': array([[ 0,  1,  2],
       [ 3,  4,  5],
       [ 6,  7,  8],
       [ 9, 10, 11]]),
 'array-original-ad8f775f40e1a6878c20aeda11eb6432': array([1, 1, 2, 3]),
 ('array-2d68ac816440984399abba3b570ca725', 0, 0): (<function getarray at 0x7f84682cb510>,
                                                    'array-original-2d68ac816440984399abba3b570ca725',
                                                    (slice(0, 2, None),
                                                     slice(0, 2, None))),
 ('array-2d68ac816440984399abba3b570ca725', 0, 1): (<function getarray at 0x7f84682cb510>,
                                                    'array-original-2d68ac816440984399abba3b570ca725',
                                                    (slice(0, 2, None),
                                                     slice(2, 3, None))),
 ('array-2d68ac816440984399abba3b570ca725', 1, 0): (<function getarray at 0x7f84682cb510>,
                                                    'array-original-2d68ac816440984399abba3b570ca725',
                                                    (slice(2, 4, None),
                                                     slice(0, 2, None))),
 ('array-2d68ac816440984399abba3b570ca725', 1, 1): (<function getarray at 0x7f84682cb510>,
                                                    'array-original-2d68ac816440984399abba3b570ca725',
                                                    (slice(2, 4, None),
                                                     slice(2, 3, None))),
 ('array-ad8f775f40e1a6878c20aeda11eb6432', 0): (<function getarray at 0x7f84682cb510>,
                                                 'array-original-ad8f775f40e1a6878c20aeda11eb6432',
                                                 (slice(0, 2, None),)),
 ('array-ad8f775f40e1a6878c20aeda11eb6432', 1): (<function getarray at 0x7f84682cb510>,
                                                 'array-original-ad8f775f40e1a6878c20aeda11eb6432',
                                                 (slice(2, 4, None),)),
 ('eq-7f02bb319ba45387432c1112e13587e1', 0): (<function apply at 0x7f8469dcc400>,
                                              <function partial_by_order at 0x7f8464398e18>,
                                              [('array-ad8f775f40e1a6878c20aeda11eb6432',
                                                0)],
                                              {'function': <built-in function eq>,
                                               'other': [(1, 1)]}),
 ('eq-7f02bb319ba45387432c1112e13587e1', 1): (<function apply at 0x7f8469dcc400>,
                                              <function partial_by_order at 0x7f8464398e18>,
                                              [('array-ad8f775f40e1a6878c20aeda11eb6432',
                                                1)],
                                              {'function': <built-in function eq>,
                                               'other': [(1, 1)]}),
 ('getitem-3e4c700d35ba80a7fbb3387f1ea0c076', 0): ('getitem-a3ae0bd91a3873b743f1663f57fc66be',
                                                   0,
                                                   0),
 ('getitem-3e4c700d35ba80a7fbb3387f1ea0c076', 1): ('getitem-a3ae0bd91a3873b743f1663f57fc66be',
                                                   0,
                                                   1),
 ('getitem-3e4c700d35ba80a7fbb3387f1ea0c076', 2): ('getitem-a3ae0bd91a3873b743f1663f57fc66be',
                                                   1,
                                                   0),
 ('getitem-3e4c700d35ba80a7fbb3387f1ea0c076', 3): ('getitem-a3ae0bd91a3873b743f1663f57fc66be',
                                                   1,
                                                   1),
 ('getitem-a3ae0bd91a3873b743f1663f57fc66be', 0, 0): (<built-in function getitem>,
                                                      ('array-2d68ac816440984399abba3b570ca725',
                                                       0,
                                                       0),
                                                      ('eq-7f02bb319ba45387432c1112e13587e1',
                                                       0)),
 ('getitem-a3ae0bd91a3873b743f1663f57fc66be', 0, 1): (<built-in function getitem>,
                                                      ('array-2d68ac816440984399abba3b570ca725',
                                                       0,
                                                       1),
                                                      ('eq-7f02bb319ba45387432c1112e13587e1',
                                                       0)),
 ('getitem-a3ae0bd91a3873b743f1663f57fc66be', 1, 0): (<built-in function getitem>,
                                                      ('array-2d68ac816440984399abba3b570ca725',
                                                       1,
                                                       0),
                                                      ('eq-7f02bb319ba45387432c1112e13587e1',
                                                       1)),
 ('getitem-a3ae0bd91a3873b743f1663f57fc66be', 1, 1): (<built-in function getitem>,
                                                      ('array-2d68ac816440984399abba3b570ca725',
                                                       1,
                                                       1),
                                                      ('eq-7f02bb319ba45387432c1112e13587e1',
                                                       1))}
(Pdb) pp (dx[dy == 1])._keys()

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> PDB set_trace (IO-capturing turned off) >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> /home/mrocklin/workspace/dask/dask/array/core.py(2673)elemwise()
-> return result
(Pdb) c
[[('getitem-3e4c700d35ba80a7fbb3387f1ea0c076', 0, 0),
  ('getitem-3e4c700d35ba80a7fbb3387f1ea0c076', 0, 1)],
 [('getitem-3e4c700d35ba80a7fbb3387f1ea0c076', 1, 0),
  ('getitem-3e4c700d35ba80a7fbb3387f1ea0c076', 1, 1)],
 [('getitem-3e4c700d35ba80a7fbb3387f1ea0c076', 2, 0),
  ('getitem-3e4c700d35ba80a7fbb3387f1ea0c076', 2, 1)],
 [('getitem-3e4c700d35ba80a7fbb3387f1ea0c076', 3, 0),
  ('getitem-3e4c700d35ba80a7fbb3387f1ea0c076', 3, 1)]]
(Pdb)

The getitem-3e4 keys have two indexes in our keys but only one index in the graph.   Looking at this code we see that slice_with_dask_array linearizes the keys.  This made sense in the case we had before but no longer makes sense here.
def slice_with_dask_array(x, index):
    y = elemwise(getitem, x, index, dtype=x.dtype)

    name = 'getitem-' + tokenize(x, index)

    dsk = {(name, i): k
           for i, k in enumerate(core.flatten(y._keys()))} # <<--- I suspect that this is the issue
    if _is_boolean_mask(x, index):
        chunks = ((np.nan,) * y.npartitions,) + x.chunks[1:]
    else:
        chunks = ((np.nan,) * y.npartitions,)

    return Array(sharedict.merge(y.dask, (name, dsk)), name, chunks, x.dtype)

Great, thanks for the pointer. I'll go there next.

@mrocklin one more request for guidance if you don't mind :)
https://github.com/dask/dask/compare/master...TomAugspurger:array-slice-array is working correctly with dx[mask] where mask is a 1-d boolean mask. We should be able to support dx[mask] for any dimension mask (<= dx.ndim).
def test_slice_array_mask_higher():
    x = np.arange(30).reshape(2, 3, 5)
    dx = da.from_array(x, chunks=5)
    m = x.sum(2) % 10 == 0
    dm = dx.sum(2) % 10 == 0  # `dm` is a 2-d boolean array, matching len on first dim
    assert_eq(dx[dm], x[m])

Constructs the DAG (correctly I think) but fails on executation with
    def _execute_task(arg, cache, dsk=None):
        if isinstance(arg, list):
            return [_execute_task(a, cache) for a in arg]
        elif istask(arg):
            func, args = arg[0], arg[1:]
            args2 = [_execute_task(a, cache) for a in args]
>           return func(*args2)
E           TypeError: list indices must be integers or slices, not list

dask/local.py:271: TypeError
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> entering PDB >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
[31] > /Users/taugspurger/Envs/dask-dev/lib/python3.6/site-packages/dask/dask/local.py(271)_execute_task()
-> return func(*args2)
(Pdb++) pp args2
[[array([[[ 0,  1,  2,  3,  4],
        [ 5,  6,  7,  8,  9],
        [10, 11, 12, 13, 14]],

       [[15, 16, 17, 18, 19],
        [20, 21, 22, 23, 24],
        [25, 26, 27, 28, 29]]])],
 [array([[ True, False,  True],
       [False,  True, False]], dtype=bool)]]

So the is that args2[0] and args2[1] are length 1 lists, rather than ndarrays. In the 1-d case, these lists are unpacked down to just the arrays (I think, may be wrong about this), possibly in concatenate3.
My question: does it sound like the issue is with the constructed DAG, or is there something I need to do on the compute side to make this work? Actually, typing this up has given my some ideas of where to look (based on the visualization). Going to check out rechunking stage next.

OK, so atop handles contractions (when some of the input indices are not present in the output) by giving the function a list of chunks as an input.  That is what is happening in our case.
(Pdb) pp atop_args
[dask.array<array, shape=(2, 3, 5), dtype=int64, chunksize=(2, 3, 5)>,
 (2, 1, 0),
 dask.array<eq, shape=(2, 3), dtype=bool, chunksize=(2, 3)>,
 (2, 1)]
(Pdb) pp expr_inds
(1, 0)

Perhaps you want to have expr_inds be the full index set?  You might do a bit of atop work in this way and then collapse dimensions afterwards?

I see, thanks.

Another way to think of this is that atop simultaneously handles broadcasting and reductions.  In your case you probably just want broadcasting, in which case you'll want the output index set to be full.  You might want to do some sort of axis shuffling afterwards (I'm not clear on array[array] semantics).

So the example raised in the OP appears to be solved at least in 0.16.0. Though admittedly the fix may have come earlier, but I don't recall which PR. This is the result from running the OP example below.
In [1]: import numpy
   ...: import numpy as np
   ...:
   ...: import dask
   ...: import dask.array
   ...: import dask.array as da
   ...:

In [2]: x = np.arange(12).reshape(4, 3)

In [3]: y = np.array([1, 1, 2, 3])

In [4]: dx = da.from_array(x, chunks=2)

In [5]: dy = da.from_array(y, chunks=2)

In [6]: x[y == 1]
Out[6]:
array([[0, 1, 2],
       [3, 4, 5]])

In [7]: dx[dy == 1]
Out[7]: dask.array<getitem_variadic, shape=(nan, 3), dtype=int64, chunksize=(nan, 2)>

In [8]: dx[dy == 1].compute()
Out[8]:
array([[0, 1, 2],
       [3, 4, 5]])

Were there other things we were trying to solve here or was that it?

I think that was it.


Slots class holding a reference to the original version

I have a class hierarchy implemented with slots enabled, like this:
import attr
@attr.s(slots=True)
class BaseClass(object):
    foo = attr.ib(default='foo')

@attr.s(slots=True)
class SubClass(BaseClass):
    bar = attr.ib(default='bar')

This works fine until I wanted to introspect the class hierarchy:
BaseClass.__subclasses__()  # returns [<class '__main__.SubClass'>, <class '__main__.SubClass'>]

One of these is the original class, and the other is the new one created and returned by attr.s. This behavior manifests on both Python 3 and Python 2 (3.7.0 and 2.7.14, to be specific).
My understanding was that classes kept weak references to their subclasses to allow the __subclasses__ method to work, and I know that attrs creates and returns a new class when slots=True, but it's not clear to me why the old class stays around. I don't see any obvious place where a strong reference to it is held.
I guessed that there might be a reference cycle somewhere, so I tried adding a call to gc.collect() and checking gc.garbage, but that turned out to be incorrect.
Because I didn't see that the reference-counting mentioned in this comment was ever addressed, I also guessed that this might be a leak due to the __class__ closure cell fixup. I decided that this isn't the cause, either, because Python 2 does not have the __class__ closure cell.

When replacing the class in slots=True attrs has to make sure that the class hierarchy remains intact, therefore the returned class is a subclass of the original one. Does that answer your question?

That would answer the question, but I'm not convinced that it's true...
Python 3.6.6 (default, Jun 27 2018, 13:11:40)
[GCC 8.1.1 20180531] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import attr
>>> @attr.s(slots=True)
... class Foo: pass
...
>>> class Bar(Foo): pass
...
>>> AttrsBar = attr.s(slots=True)(Bar)
>>> issubclass(AttrsBar, Bar)
False

Hm that might be due to how we create the class (by calling type() IIRC). Because OTOH:
>>> import attr

>>> class C: pass

>>> C2 = attr.s(slots=True)(C)

>>> C2.__mro__
(<class '__main__.C'>, <class 'object'>)

So the class is definitely there, it’s just that Python subclass machinery doesn’t know about it.

I think you're being misled by the fact that the class generated by attrs still thinks its name is C despite being bound to C2:
>>> import attr
>>> class C: pass
...
>>> C2 = attr.s(slots=True)(C)
>>> C2
<class '__main__.C'>
>>> C2.__mro__[0] is C
False
>>> C2.__mro__[0] is C2
True

When the class is created, it's using the original classes bases as the new bases, and I didn't see anywhere that the bases get modified...

Ah you’re right, turns out we’re more elaborate than I remembered:
https://github.com/python-attrs/attrs/blob/35f7745ac22dab8ccfd82d7728623e9fdd5b76eb/src/attr/_make.py#L533
So I guess if we have a leak, _ClassBuilder._create_slots_class() would be the place to look? Have you tried something like https://mg.pov.lt/objgraph/?

Ah, no I hadn't thought of that...

I think that means the correct fix is to add __weakref__ to the exception list here: https://github.com/python-attrs/attrs/blob/35f7745ac22dab8ccfd82d7728623e9fdd5b76eb/src/attr/_make.py#L493-L497
With that:
>>> import attr
>>> @attr.s(slots=True)
... class C: pass
...
>>> @attr.s(slots=True)
... class C2(C): pass
...
>>> import gc
>>> gc.collect()
11
>>> C.__subclasses__()
[<class '__main__.C2'>]

The original class is left as a cyclic isolate when attr.s returns. I think that's as far as the attrs project needs to go to fix this; I'll call gc.collect() from my application. I'll write a test and open a PR today or tomorrow.

Thanks both of you for investigating and solving that issue.
I checked the Python garbage collector docs and can hopefully clarify this topic a bit more.
First some basics about the Python garbage collector:

Python uses reference counting for all objects. Whenever a reference count reaches 0, the item is immediately freed (no need for garbage collection).
Cyclic references, where "islands of objects" point to each other (so they have 1+ references), but nothing outside points to them, will only be freed during a gc.collect() run.
Python periodically runs gc.collect() automatically on its own (the interval can be changed via the gc library). It's on by default and most people don't need to worry about it.

Now the specific thing that's happening in attrs:

When attrs makes dict-based classes (slots=False), it simply dynamically adds methods to the existing class in Python's memory.
But when attrs makes a slots-based class instead, it has to clone the class and rewrite it as a __slots__ class, since slots cannot be modified/added to a class after it has already been created (by Python when it interprets your source code). To do this, attrs "deletes" your original class (the one you wrote in your source code) and dynamically creates the new slots-based variant with the same methods, same parents, a __slots__ property, the attrs-injected methods, etc etc.
Now the issue... All Python classes have a .__subclasses__ property which is a list of all immediate subclasses that have inherited from that class.
When Python interpreted the original source code, it added the basic non-dict class to the __subclasses__ of its parent class. Then attrs came in, deleted that class, and Python therefore added the new __slots__ based class to the parent's __subclasses__.
As a result, the parent class .__subclasses__ property contains weak references to both classes, the original (deleted class) and the new attrs-slots class.
Because the original __dict__ based class (that attrs deleted) still has "1+ references" thanks to the parent's __subclasses__ property still linking to it, there are two side effects: The original class technically still exists in memory, and the original class is visible whenever observing class.__subclasses__ of the parent class.
But because __subclasses__ is a WEAK reference, it's allowed to be garbage collected.
So the next time Python runs gc.collect() automatically (or if the user triggers it manually), Python will analyze the old ("deleted") class that attrs deleted, then it will see that the only remaining reference to it is a weak reference from the parent's __subclasses__, and will free it from memory.

I think this only matters of your attrs-classes are inheriting from any base classes. If so, the parent classes will have the "removed" original class in its __subclasses__, which won't matter to most people. It will get automatically cleaned up after a while when Python runs its own GC periodically. And most people don't look at __subclasses__, so its inclusion of the weak ref to the original deleted class doesn't matter to most people.
I think none of this applies if your @attrs class doesn't have any base classes, by the way? If it's not inheriting from anything, there wouldn't be any parents to carry __subclasses__, right? Maybe attrs sets the original (deleted) class as the parent when it clones? But I doubt it. And even if it did, the original deleted class would not be accessible via code anymore in that case, and would get garbage collected too.
I hope this clarifies some things. Please correct if I've misunderstood anything. :)

Well, I made a small test which seems to confirm that attrs does NOT make the "copied" class a subclass of the deleted class. It's only a subclass of the original parent.
Here's the test that confirmed this, as far as I can tell:
import attrs

class A:
    pass

@attrs.define(slots=True)
class B(A):
    pass

print("Object ID of A (parent class):", id(A))
print("Object ID of B (created by attrs):", id(B))

print("\nBefore garbage collection:")

print("\nSuperclasses of B:", B.__bases__)
for x in B.__bases__:
    print("- Class:", x, id(x))
print("Subclasses of A:", A.__subclasses__())
for x in A.__subclasses__():
    print("- Class:", x, id(x))

import gc
gc.collect()
print("\nAfter garbage collection:")

print("\nSuperclasses of B:", B.__bases__)
for x in B.__bases__:
    print("- Class:", x, id(x))
print("Subclasses of A:", A.__subclasses__())
for x in A.__subclasses__():
    print("- Class:", x, id(x))

Result:
Object ID of A (parent class): 39084480
Object ID of B (created by attrs): 39149184

Before garbage collection:

Superclasses of B: (<class '__main__.A'>,)
- Class: <class '__main__.A'> 39084480
Subclasses of A: [<class '__main__.B'>, <class '__main__.B'>]
- Class: <class '__main__.B'> 39086240
- Class: <class '__main__.B'> 39149184

After garbage collection:

Superclasses of B: (<class '__main__.A'>,)
- Class: <class '__main__.A'> 39084480
Subclasses of A: [<class '__main__.B'>]
- Class: <class '__main__.B'> 39149184

So as far as I can see, B (the class-copy created by attrs) only has one superclass, the A class. It's not a child of the deleted version of B.
And we can also see that the only thing changed by forcing garbage collection manually, is that the A class list of subclasses gets cleaned up.
It's looking good. I'm basically doing this test to try to make sense of the "warning" in the attrs documentation which talked about downsides of copied slots classes, and to help others in the future make sense of this.
It doesn't seem like there's any actual downsides to attrs "cloning classes", apart from a temporary weak reference lingering in the original superclass, which only happens if your class inherits from anything. But I've never even heard of any coded or libraries that care what's in the __subclasses__ property of the parent class, so in practically all codebases, the weak reference can safely sit there in __subclasses__ and will get automatically garbage collected later.
That's how I interpret things:

Don't worry about it whatsoever. Don't manually bother calling gc.collect(). It's only an issue in the extremely rare case that you somehow have a library, introspection etc which cares about looking at the __subclasses__ of the parent, but I've never seen such code being used for anything except introspection libraries.

I think this is almost right. The flaw I see in your understanding is that the original class is not kept alive by the weak reference from the parent's __subclasses__; the point of a weak reference is that it doesn't keep the referenced object alive. The class stays alive immediately because of the (three) reference cycles the class participates in. The bug was that the special __weakref__ object, which references the original class, was incorrectly copied to the new class, keeping it alive even after a full garbage collection was run.
All classes have a parent class; if you don't specify one, object is implied.
A more detailed explanation of the line you didn't understand. Here it is again, for reference:
https://github.com/python-attrs/attrs/blob/35f7745ac22dab8ccfd82d7728623e9fdd5b76eb/src/attr/_make.py#L533
Calling type with one argument returns the type of the thing. Calling it on a class usually returns type, but it can return another class when metaclasses are in play. So type(self._cls) gets the metaclass of the original class if there is one, otherwise it's just type. Then, that is called with the three-argument form that creates a new class, which you would normally never have to do by hand. cd is the __dict__ of the new class (not to be confused with the __dict__ of an instance of the class); it's created by copying the __dict__ of the original class, except for a few special attributes that are created anew by type, and with __slots__ defined based on the declared attributes.
The class generated by attrs isn't a subclass of the original class, that's correct.
Thinking about the warning: I originally ran into this because of a pattern in my code where I walked the inheritance tree in order to find all possible classes that might be needed when deserializing data from a database. It might be a good idea to expand the warning to explicitly mention another consequence: any custom metaclass will be invoked twice for the class. Depending on what the metaclass does, that might be fine or it might create a problem.

The flaw I see in your understanding is that the original class is not kept alive by the weak reference from the parent's __subclasses__; the point of a weak reference is that it doesn't keep the referenced object alive.

Nono, it's kept alive. The weak reference means that the original class reference counter is still 1+. It's therefore not immediately freed when the class is "deleted" by attrs. It still has a reference (the weak reference), so the counter hasn't reached 0 yet.
Then, whenever Python's garbage collector runs, it detects that the ref count >= 1 is actually just weak reference(s) and finally frees the memory.
It's very much alive until then, but not reachable by any meaningful code, except code that looks at parent_class.__subclasses__().

Calling type with one argument returns the type of the thing.

Oh yeah, thanks for explaining that. My brain is tired today, and I totally forgot that type(a_class) returns type, not a_class. :) I thought it returned a_class, and that's why I was wondering if the new class actually inherits from the "deleted" original. Happy to hear that it's not inheriting from the deleted class.
Really grateful that you helped cleared that up. Thank you.
I also appreciate the warning about metaclasses being invoked twice (once for the original and once for the copy). That's a good warning. So anyone writing metaclasses has to be aware of that fact. I think it would be good to add that warning to the attrs documentation @hynek, at https://www.attrs.org/en/stable/glossary.html#term-slotted-classes
Thank you both. I'm ready to move all my classes over to attrs slots now and save a bunch of memory (compared to dict). Feels good! :)


jittery coronal and sagittal views

While viewing the lessons and examples, when viewing sagittal or coronal there are these noise or static that appear close to the bounding box. What exactly causes this?

Thanks for reporting!
That is the bug in the interpolation process.
In the shaders, we access voxel with negative indices during interpolation and as a result get those artifacts.
Will look into it ASAP

I found a fix - will test it a bit more and push it:
// in shaders.interpolatiion.trilinear
vec3 lower_bound = vec3(floor(currentVoxel.x), floor(currentVoxel.y), floor(currentVoxel.z));
if(lower_bound.x < 0.){
  lower_bound.x = 0.;
}
if(lower_bound.y < 0.){
  lower_bound.y = 0.;
}
if(lower_bound.z < 0.){
  lower_bound.z = 0.;
}

The updated example is now live at: https://fnndsc.github.io/ami/#xtk_lesson13
Please re-open if something still doesn't look right!

It works just lovely! No need to reopen it. Thanks a bunch, Nicolas.

You're welcome @SevenSinS02 ! Do not hesitate to open issue if something looks wrong or if you are looking for specific features!


Is there a example about how to use FileBrowsersWidget?

Is there a example about how to use FileBrowsersWidget?

No, it's rather experimental at the moment ...


Error creating team: «new row violates row-level security policy for table "accounts"»

After generating a boilerplate project and setting up supabase to run locally, I get the following error when trying to create a team for a newly-created user:

If I understand correctly, this new user should be a primary account and therefore should be able to create a team according to the security policies.
I'm also struggling to figure out how to debug postgres issues when running locally. Tailing the logs doesn't really reveal much about why a security policy is failing. Any tips you have here would be greatly appreciated. Thanks!

Just to add detail to this, I'm also getting failing tests, and I'm not sure why:
/tmp/supabase/tests/database/1-basejump-schema-tests.sql .......
# Failed test 5
#     (test result was NULL)|Basejump config should have personal accounts enabled
# Failed test 6
#     (test result was NULL)|Basejump config should have team accounts enabled
# Failed test 7: "Basejump config should have account billing disabled"
#     (test result was NULL)
# Failed test 8: "Basejump config should have stripe as the billing provider"
#     (test result was NULL)
# Failed test 9
#     (test result was NULL)|Basejump config should have a default trial period
# Failed test 19
#     (test result was NULL)|Basejump is_set should be accessible to authenticated users
# Failed test 22: "authenticated users should have access to Basejump config"
# Looks like you failed 7 tests of 22
Failed 7/22 subtests
/tmp/supabase/tests/database/10-account-roles.sql ..............
Dubious, test returned 3 (wstat 768, 0x300)
Failed 17/17 subtests
/tmp/supabase/tests/database/2-personal-accounts.sql ...........
# Failed test 2: "Inserting a user should create a personal account when personal accounts are enabled"
#         have: NULL
#         want: (1009e39a-fa61-4aab-a762-e7b1f3b014f3,t)
# Failed test 3: "Inserting a user should also add an account_user for the created account"
#         have: NULL
#         want: (1009e39a-fa61-4aab-a762-e7b1f3b014f3,,owner)
# Failed test 4: "Primary owner should be able to get their own role"
#         have: NULL
#         want: ("{""account_role"": ""owner"", ""is_primary_owner"": true, ""is_personal_account"": true}")
# Failed test 5: "threw You do not have permission to update this field"
#       caught: no exception
#       wanted: an exception
# Failed test 6: "Should not be able to delete the primary_owner_user_id from the account_user table"
#         have: NULL
#         want: (1009e39a-fa61-4aab-a762-e7b1f3b014f3)
# Failed test 9: "threw You do not have permission to update this field"
#       caught: no exception
#       wanted: an exception
# Failed test 10: "Owner can update their team name"
#     Results differ beginning at row 1:
#         have: NULL
#         want: (test)
# Looks like you failed 7 tests of 15
Failed 7/15 subtests
/tmp/supabase/tests/database/3-personal-accounts-disabled.sql .. ok
/tmp/supabase/tests/database/4-team-accounts.sql ...............
Dubious, test returned 3 (wstat 768, 0x300)
Failed 29/30 subtests
/tmp/supabase/tests/database/5-team-accounts-disabled.sql ...... ok
/tmp/supabase/tests/database/6-invitations.sql .................
Dubious, test returned 3 (wstat 768, 0x300)
Failed 28/28 subtests
/tmp/supabase/tests/database/7-inviting-team-member.sql ........
Dubious, test returned 3 (wstat 768, 0x300)
Failed 8/8 subtests
/tmp/supabase/tests/database/8-inviting-team-owner.sql .........
Dubious, test returned 3 (wstat 768, 0x300)
Failed 9/9 subtests
/tmp/supabase/tests/database/9-profiles.sql ....................
Dubious, test returned 3 (wstat 768, 0x300)
Failed 2/6 subtests

Test Summary Report
-------------------
/tmp/supabase/tests/database/1-basejump-schema-tests.sql     (Wstat: 0 Tests: 22 Failed: 7)
  Failed tests:  5-9, 19, 22
/tmp/supabase/tests/database/10-account-roles.sql            (Wstat: 768 Tests: 0 Failed: 0)
  Non-zero exit status: 3
  Parse errors: Bad plan.  You planned 17 tests but ran 0.
/tmp/supabase/tests/database/2-personal-accounts.sql         (Wstat: 0 Tests: 15 Failed: 7)
  Failed tests:  2-6, 9-10
/tmp/supabase/tests/database/4-team-accounts.sql             (Wstat: 768 Tests: 1 Failed: 0)
  Non-zero exit status: 3
  Parse errors: Bad plan.  You planned 30 tests but ran 1.
/tmp/supabase/tests/database/6-invitations.sql               (Wstat: 768 Tests: 0 Failed: 0)
  Non-zero exit status: 3
  Parse errors: Bad plan.  You planned 28 tests but ran 0.
/tmp/supabase/tests/database/7-inviting-team-member.sql      (Wstat: 768 Tests: 0 Failed: 0)
  Non-zero exit status: 3
  Parse errors: Bad plan.  You planned 8 tests but ran 0.
/tmp/supabase/tests/database/8-inviting-team-owner.sql       (Wstat: 768 Tests: 0 Failed: 0)
  Non-zero exit status: 3
  Parse errors: Bad plan.  You planned 9 tests but ran 0.
/tmp/supabase/tests/database/9-profiles.sql                  (Wstat: 768 Tests: 4 Failed: 0)
  Non-zero exit status: 3
  Parse errors: Bad plan.  You planned 6 tests but ran 4.
Files=10, Tests=44,  0 wallclock secs ( 0.02 usr  0.01 sys +  0.13 cusr  0.10 csys =  0.26 CPU)
Result: FAIL
Error: error executing command
Try rerunning the command with --debug to troubleshoot the error.

When I first set up the project, all the tests passed. I've since reset the local database but keep getting these issues.

The reset seems to work, although I do get an "Error restoring main".
∴ supabase start
Error restoring main: branch was not dumped.
Applying migration<PHONE_NUMBER>0001_utility_functions.sql...
Applying migration<PHONE_NUMBER>0002_accounts.sql...
Applying migration<PHONE_NUMBER>0003_billing_setup.sql...
Applying migration<PHONE_NUMBER>0010_profiles.sql...
Applying migration<PHONE_NUMBER>0011_invitations.sql...
Seeding data supabase/seed.sql...
Started supabase local development setup.

         API URL: http://localhost:54321
          DB URL: postgresql://postgres:postgres@localhost:54322/postgres
      Studio URL: http://localhost:54323
    Inbucket URL: http://localhost:54324
      JWT secret: super-secret-jwt-token-with-at-least-32-characters-long
        anon key: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0
service_role key: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImV4cCI6MTk4MzgxMjk5Nn0.EGIM96RAZx35lJzdJsyH-qQwv8Hdp7fsn3W0YpN81IU

I've learned that this error came from deleting supabase/config.toml and running supabase init again. Doing that deleted the seed file and caused these errors to occur. After restoring the seed, everything's passing. Sorry for the false alarm!

For some reason I get the same error when I deployed my project after local development


Add an option to change extension gallery URL (fixed #21839)

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: nirnir93 sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.

@nirnir93 good work good idea thanks for this.

We have been thinking about this as well. However, it requires us to specify in detail the protocol the gallery endpoint has to speak which in turn means that this becomes stable API. We are not yet comfortable with that level of commitment when it comes to the extension gallery.
We'll add the capability as soon as we can commit to a stable gallery API.
Since we won't merge the PR any time soon, I close it.  Thanks understanding!

@kieferrm the extension api is not as complex it has not much needed endpints list, search, download i think there are not much relevant updates to that api possible :)

any way this issue is a part of https://github.com/microsoft/vscode/issues/81310


fix scheduler queue deadlock

Fixes a rare server deadlock issue in the scheduler/queue. The deadlock happens when a runner asks for a stage and then immediately aborts (cancels the context). If the server successfully fetched a list of stages from the DB during that short time (registering a worker and canceling the context), it will try to give the runner a stage - while locked under a global queue mutex. And the runner side will try to remove itself from the list of runners while trying to obtain the lock on the same mutex.
Steps to test:

go test -race github.com/drone/drone/scheduler/queue

closing in favour of #3330


update readpdf

Status
Ready/In Progress/In Hold (Reason for hold)
Related Content Pull Request
Related PR: link to the PR at demisto/content
Related Issues
Related: link to the issue
Description
A few sentences describing the overall goals of the pull request's commits.

The added package "PyCryptodome" exists already in the Native docker image