Remove setting defaults in the controller

Pull request checklist

Pull request type
Resolves issue 3136 in scale-core

Please check the type of change your PR introduces:

[x] Bugfix
[ ] Feature Enhancement
[ ] Test Automation
[ ] Code Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] Community Operator listing
[ ] Other (please describe):

What is the current behavior?

The controller sets default values in unused fields.
What is the new behavior?

The controller will not set default values in unused fields.
How risky is this change?

[ ] Small, isolated change
[x] Medium, requires regression testing
[ ] Large, requires functional and regression testing

/hold until we verify the problem still exists

The issue this PR was trying to address seems to be resolved. Closing PR


Include LICENSE file in sdist

Most distributions require that license files
to be included in sources tarballs.
Currently doing the Fedora/RDO package.

Codecov Report

Merging #654 into master will decrease coverage by -0.76%.
The diff coverage is n/a.

@@            Coverage Diff            @@
##           master    #654      +/-   ##
=========================================
- Coverage   85.56%   84.8%   -0.76%
=========================================
  Files          27      27
  Lines        3290    3290
  Branches      516     516
=========================================
- Hits         2815    2790      -25
- Misses        336     352      +16
- Partials      139     148       +9

Impacted Files
Coverage Δ

pykafka/topic.py
75.55% <ø> (-4.45%)
:x:

pykafka/broker.py
90.78% <ø> (-2.64%)
:x:

pykafka/simpleconsumer.py
84.57% <ø> (-2.49%)
:x:

pykafka/balancedconsumer.py
89.81% <ø> (-1.86%)
:x:

pykafka/cluster.py
72.12% <ø> (-0.45%)
:x:

pykafka/managedbalancedconsumer.py
76.92% <ø> (ø)
:white_check_mark:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e3621a6...29b1634. Read the comment docs.


@misk/common externals issue & Loader Tab Links

Why

Console error where Blueprint library couldn't be found anymore
Want a way in Loader tab to test links between tabs in React Router

@terrilldent No testing yet but I agree it would be greatly helpful. Should also be part of the Travis CI.


Create sitemap.xml

Unless I'm missing something, hugo can generate a sitemap with the theme providing any templates. I see no need for this.


Some tweaks to the Getting Started docs

I'd like to get around to some more comprehensive documentation contributions, but thought I'd start with some very low hanging fruit / minor tweaks to the getting started page:

I removed the pattern autodiff(mode, f, activity, args...) and replaced it with autodiff(mode, f, args...) since telling it the activity mode is no longer needed
Before delving into various things, I just made it clear that we expect rosenbrock(1.0, 2.0) == 100.0 and the derivative w.r.t. x should be -400.0 and the derivative w.r.t. y should be 200.0. This should hopefully help users orient themselves a bit quicker when they're trying to interpret the (perhaps confusing) outputs of the various autodiff calls.
I mentioned what we mean by 'primal' since this isn't necessarily a word everyone who took a calculus course knows

so telling it the activity is still helpful. Enzyme does its best job to deduce the return activity, but if something is unstable (e.g. like in https://github.com/EnzymeAD/Enzyme.jl/issues/2194) it may fail. In the case of the issue I presume marking the return activity as Active explicitly would allow the type unstable case to succeed.
That said, that doesn't mean we need to introduce the more complex version at the start

:warning: Please install the  to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 30.31%. Comparing base (037dfed) to head (d856c12).
Report is 286 commits behind head on main.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2195       +/-   ##
===========================================
- Coverage   67.50%   30.31%   -37.19%
===========================================
  Files          31        2       -29
  Lines       12668      188    -12480
===========================================
- Hits         8552       57     -8495
+ Misses       4116      131     -3985

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


No provider for Ng2FrameworkFactory

Hi,
We are running into the following error: "No provider for Ng2FrameworkFactory". I am using this in combination with the ng2-admin dashboard.
This is my module.ts
@NgModule({
imports: [
CommonModule,
routing,
NgaModule,
FormsModule,
AgGridModule
],
declarations: [
InstanceManager
],
providers: [
InstanceManagerDataService
]
})
And this is my component file
@Component({
selector: 'instancemgr',
styles: [require('./instancemanager.scss')],
template: require('./instancemanager.html')
})
export class InstanceManager implements OnInit{
data: Array;
private gridOptions: GridOptions = {};
constructor(private _instanceManaagerDataService: InstanceManagerDataService) {
this.data = _instanceManaagerDataService.data;
}
ngOnInit() {
this.gridOptions.rowData = this.data();
this.gridOptions.columnDefs = this.createColumnDefs();
}
private createColumnDefs() {
return [
{ headerName: "Name", field: "name", width: 100},
{ headerName: "Server", field: "server", width: 100},
{ headerName: "Server IP", field: "serverip", width: 100}
]
}
}

Please refer to the documentation on how to use ag-Grid with ng2: https://www.ag-grid.com/best-angular-2-data-grid/
You need to import
AgGridModule.withComponents(
[..optional components...]
)

How should we define the "AgGridModule" when there is no optional components? If we use "AgGridModule" without "withComponents" option, i am getting the error ". No provider for Ng2FrameworkFactory" as mentioned above in this thread. When we use the below definition, i am getting the error "EXCEPTION: No component factory found for [object Object]".
AgGridModule.withComponents([])
What is the right way to define "AgGidModule" when there is no optional components involved?

Just supple it as an empty array as you've done above:

If you're getting an error with this then you have a different problem

Found the issue after reading the below blog,
https://www.ag-grid.com/ag-grid-angular2-support-v7/
I am using the "cellRendererFramework" with inline html string and the "moduleImport" statement and its no longer supported in "Ag-Grid" V7.  It works well in V6.x.x.
cellRendererFramework: {
template: '{{params.value }}',
moduleImports: [RouterModule]
}
I am changing the inline code to the component as below. Can you please let me know how to do the "moduleImport" on the cell renderer component level?
import { Component } from '@angular/core';
import { RouterModule } from '@angular/router';

@Component({
    template: '{{params.value }}',
   //  moduleImports: [RouterModule]

})
export class CellRendererComponent { }

I made it work now. Here is my cell renderer component now,
import { Component } from '@angular/core';
import { RouterModule } from '@angular/router';
import { AgRendererComponent } from 'ag-grid-ng2/main';

@Component({
    template: '{{params.value }}'

})
export class CellRendererComponent implements AgRendererComponent {
    params: any;
    agInit(params: any): void {
        this.params = params;
      }
}

This worked for me:
import {Component, OnDestroy} from '@angular/core';
import { ICellRendererAngularComp } from 'ag-grid-angular/main';
@Component({
selector: 'cell',
template: '{{params.value }}'
})
export class CellRendererComponent implements ICellRendererAngularComp, OnDestroy {
private params: any;
agInit(params: any): void {
    this.params = params;
}

ngOnDestroy() {
    console.log(`Destroying SquareComponent`);
}

refresh(): boolean {
    return false;
}

}


Showcase Submission for ml5/5-knn-classification/2-train-the-model

Thank you Sahand Babali for your contribution! A member of the Coding Train team will review it shortly.

Interactive K-Nearest Neighbors Demo
Sahand Babali

This is wonderful! I've been wanting to do something like this as a coding challenge for a while!


Display field's function with moved to the Field class for using it…

… in each form field.

Thanks!


ln: XXX/current/source: cannot overwrite directory, windows, git bash

OS: windows server 2016
SHELL: git-bash
In windows using git-bash , when run ln -sfn source current, will throw error:

https://github.com/Unitech/pm2-deploy/blob/master/deploy#L225
UPDATED:
I add run "rm -rf $path/current" before line 225 to solve this problem

Alternative workaround:
pre-deploy: delete pm2 app, delete current folder
// ecosystem.config.js
module.exports = {
  "deploy": {
    "production": {
      "user": "xxxxxx",
      "host": ["xxxxxx"],
      "ref": "xxxxxx",
      "repo": "xxxxx",
      "path": "C:/test",
      "pre-deploy": "pm2 delete ecosystem.config.js && rm -rf C:/test/current",
      "post-deploy": "npm install && pm2 startOrRestart ecosystem.config.js"
    }
  }
}


Change default channel to string.

In order to avoid needing to explicitly convert it to string for logging.
This is instead of https://github.com/bringg/node-arnavmq/pull/59

After discussing it, decided to change the default channel to be a string instead.
See https://github.com/bringg/node-arnavmq/pull/60


following plugin docs can easily lead to using both proxy and plugin

Several users have ended up creating containers using both the weave proxy and and specifying --net=weave. This is rarely (ever?) a good idea.
The plugin docs talk about running weave launch "the usual way", which could easily lead folks to thinking they should follow our introductory example, including the eval $(weave env) bit.
As a minimum we should amend the plugin docs, perhaps with a prominent note warning against eval $(weave env) or otherwise using the proxy.
But we should also consider whether using both the proxy and plugin is in fact a legitimate use case. If not we should either refuse to do it and log a suitable error, or prefer one over the other.
If we do the latter, which should be preferred? It is actually tricky for both the proxy and plugin to detect the other. The proxy won't know for sure which networks are weave networks. And the plugin doesn't even know what container it is dealing with, since docker won't tell it.
I suppose the proxy could ignore all containers created with a network other than default, bridge, none or unset.

I have tweaked the docs.

I've followed the docs today. Everything is straightforward, but one thing...
I used weave setup and weave launch on docker 1.10 host.
After that I got tree containers running:
IMAGE                        COMMAND                  NAMES
weaveworks/plugin:1.4.4      "/home/weave/plugin"     weaveplugin
weaveworks/weaveexec:1.4.4   "/home/weave/weavepro"   weaveproxy
weaveworks/weave:1.4.4       "/home/weave/weaver -"   weave

Do I really need weaveproxy in my setup?
I don't use eval $(weave env), only --net=weave and dns-args things.
There is a hint in documentation to use alternative way to start wave plugin:
$ weave launch-router
$ weave launch-plugin

Is it actually the preferred way in case of plugin setup?

There is no harm in having the proxy running.


Orphaned model state is lost after reload with backups in some cases

Testing #161487
When I delete a file from disk, I can see in VSCode that the file has been deleted.

But when i restart VSCode, the file no longer appears as deleted.

We actually do store the fact that the file was deleted on disk as part of the backup:
https://github.com/microsoft/vscode/blob/96dda01dafdf4badf360d8dcc3c7eaf448fae7f9/src/vs/workbench/services/textfile/common/textFileEditorModel.ts#L218
So things will work fine if you:

open a file
make edits
delete the file outside of VSCode
make more edits
quit and restart

Here however I assume first some edits are made and then the file is deleted and then quit and restart. Since no further edits were made, we do not make another backup.
Will see if a fix is possible but may also decide to leave it as is. There is no functionality loss or data loss here, just the decoration is missing.

We closed this issue because we don't plan to address it in the foreseeable future. If you disagree and feel that this issue is crucial: we are happy to listen and to reconsider.
If you wonder what we are up to, please see our roadmap and issue reporting guidelines.
Thanks for your understanding, and happy coding!


Update CODEOWNERS

Change @garethtdavies to @jtonello
Change-type: patch
Signed-off-by: John Tonello<EMAIL_ADDRESS>

@jtonello You need to add the commit headers to get the CI to pass


Internal error. Looks like something went wrong on our end when request to fulfill with fulfillmentCreateV2

I am getting this issue.
{
  "errors": [
    {
      "message": "Internal error. Looks like something went wrong on our end.\nRequest ID: 4b0d5450-2611-455b-bbce-2eacd6981b1d (include this in support requests).",
    }
  ]
}

Anyone can help me to fix it?

Please only open one issue https://github.com/Shopify/shopify_api/issues/691

@yu-coder Facing the same issue. Scopes are correct and API version is 07-2020, but API is saying internal error. This is my error:
message: 'Internal error. Looks like something went wrong on our end.\n' +         'Request ID: a332d589-cace-4f57-89be-ecbc9a104ff0 (include this in support requests).'
Is fulfillmentCreateV2 production ready yet? fulfillmentCreate is showing deprecated but seems to be working for now.


Update citation file with JOSS paper

Proposed change

Update CITATION.cff because the JOSS paper has just been published.
Type of change

[ ] Example (a notebook demonstrating how to use ZOSPy for a specific application)
[ ] Bugfix (non-breaking change which fixes an issue)
[ ] New analysis (a wrapper around an OpticStudio analysis)
[ ] New feature (other than an analysis)
[ ] Breaking change (fix/feature causing existing functionality to break)
[ ] Code quality improvements to existing code or addition of tests
[ ] Documentation (improvement of either the docstrings or the documentation website)

Additional information

Python version: ...
OpticStudio version: ...

Related issues

Checklist

[ ] I have followed the contribution guidelines
[ ] The code has been linted, formatted and tested locally using tox.
[ ] Local tests pass. Please fix any problems before opening a PR. If this is not possible, specify what doesn't work and why you can't fix it.
[ ] I added new tests for any features contributed, or updated existing tests.
[ ] I updated CHANGELOG.md with my changes (except for refactorings and changes in the documentation).

If you contributed an analysis:

[ ] I did not use AttrDicts for the analysis result data (please use dataclasses instead).

If you contributed an example:

[ ] I contributed my example as a Jupyter notebook.

Wouldn't you also want to remove doi: 10.5281/zenodo.10805414 from the citation file?

Wouldn't you also want to remove doi: 10.5281/zenodo.10805414 from the citation file?

This is the citation file recommended by JOSS, so they recommend to include the Zenodo DOI

This is the citation file recommended by JOSS, so they recommend to include the Zenodo DOI

Hmm, I understand it from their point of view (referencing to the version they evaluated), but for general referencing to ZOSPy I would consider it undesirable as 1) the Zenodo DOI is linked to single version of ZOSPy 2) if people want to directly refer to the code, I would find a reference to the GitHub repository more appropriate

I suppose you mean the Zenodo DOI in the badge; that badge automatically links to the latest Zenodo entry. The DOI in the badge is thus automatically updated.


Adding Multiple Attendees to an existing event

I noticed that the add_attendee() method takes in one single email address, is there anyway in which i can invite multiple attendees by passing a list of their emails?

There's no such method. So
event = ...
attendees =<EMAIL_ADDRESS><EMAIL_ADDRESS>
for a in attendees:
    event.add_attendee(a)

I'll think about adding a method to add multiple attendees at once.
Thanks for the submission!

just as i thought, thanks for the reply. welldone

Let's leave it open until I add this in the next version.


3D sparse matrices

To do faster operations, I required 3d sparse matrices this project.
I patched an original CSR and COO for 3d indices and found out that batch operations on 3d matrices are twice as faster as compared to reshaped 2d CSR matrices.
With these results, I am thinking to refer 2d matrices and add support for  3d matrices (or more). Is there any possibility of adding it directly to scipy sparse??
Will add some results over large sparse in few hours.

Thank you @kdhingra307 !
Actually we are trying to deprecate numpy.matrix class from the repositories and you might like to use the new tools provided by sparse library https://github.com/pydata/sparse . So I'm a bit undecided whether updating the matrix format just to rewrite it in the future is worth of your effort.
Let's wait what others have to say.

@ilayn I am thinking of adding another sparse matrices module, that will support n-dimensional indices.
I have used pydata/sparse and few others too. They are pure python, so slow and also support only COO in multi-dimensional.
@ilayn I dnt think sparse matrices (csr/coo) uses numpy.matrix at all.

The scipy sparse matrices use numpy.matrix for dense matrix
representation, and their semantics is compatible with numpy.matrix but
not with numpy.array. Even though this causes problems for writing code
that can operate on both dense/sparse and blocks using
__array_ufunc__, it cannot be changed due to backward compatibility,
and addressing it requires anyway introducing new sparse array classes.
Speed issues with pydata/sparse are something that hopefully will be
solved at some point in future.

From a meta perspective, it would seem likely that maximal progress is
achieved if everyone works together on a single project.
As said, numpy.matrix issue blocks incremental evolution of
scipy.sparse to the direction you'd like to go --- at minimum you'd
need to introduce new classes csr_array, coo_array, ... to address the
semantics issues. At that point, you can ask whether it would make
sense to focus on an existing project that already tries to do this.

I expect that @hameerabbasi would be happy to get help making the pydata/sparse package faster and more featureful. It's a relatively new project and I'm sure there's a lot of low-hanging performance to be found.

By the way pure Python doesn't mean slow necessarily. Things have to be measured extensively, sometimes not having an translation overhead makes all the difference. I also think you can jump on board with pydata project and make it even faster much . SciPy is trying to become the customer of these data structures rather than owning them.

@kdhingra307 Right now our project is a bit below SciPy's structures in terms of features and performance, but we're trying to improve. We'd really like to have help.

Also see #14822

@kdhingra307 I would be quite curious to hear your thoughts on how easily we can expand the existing scipy.sparse to handle 3D.

@stefanv I implemented it for n-d and should be present in the fork. I did it by defining an array for the index.


e2e: Don't deploy cert-manager on OCP

What type of PR is this?
/kind cleanup

What this PR does / why we need it:
tl;dr I'm trying to run our e2e tests on openshift continuously (a fork of main)
We provision certificates on OCP with OCP-specific service annotations
instead of cert-manager. Deploying cert-manager on OCP is thus not
needed and because newer versions of OCP ship a cert-manager-operator
itself, it might even be harmful.
Which issue(s) this PR fixes:
None

Does this PR have test?
N/A

Special notes for your reviewer:
N/A
Does this PR introduce a user-facing change?

NONE

Just rebased atop Casmin's patches that fix CI.

/retest

/test pull-security-profiles-operator-test-e2e

/test pull-security-profiles-operator-test-e2e


Add support for the Opening Explorer category

Add support for all endpoints in the Opening Explorer category.

Support for the Opening Explorer category was implemented in #2.


chat: refs aren't properly cleared

Whether it's an image or reference of some type, the chat input seems to hold on to it even after send. After sending when visiting other chats you'll see the same attachment sitting there.

Also not able to repro this one. Tried with both groups and talk, with both image attachments and refs, on both desktop and mobile.

Saw this today but now I can't reproduce it

Have seen this too, intermittently.

Will try in earnest to reproduce this.


Pull update

What this PR does / why we need it:
Which issue (if any) this PR fixes:
Fixes #
Any other useful info:

Sorry, i made a mistake, this was for my personal branch. You can delete this request.


Server Messages May Contain raw HTML for Non-managerial Users

Issue:

Source:
https://github.com/kayteh/roleypoly/blob/762e76dfb3a2cfaad155da72f50d2934ab6d35ff/UI/src/components/role-picker/index.js#L76-L81
Observations
I'm no React dev but I think this could be solved by implementing dangerouslySetInnerHTML in the render block.

Good catch, and you're perfectly right in your assumption.


API: Get release by tags endpoint

Get a release based on a tag name (for which a release exists).
Based on:
https://developer.github.com/v3/repos/releases/#get-a-release-by-tag-name
This is a useful feature for deploy scripts.
Note I'm new to gitea and go in general, so please review carefully.

some tests missing
-> https://github.com/go-gitea/gitea/blob/master/integrations/api_releases_test.go
just add 2 api calls: (Get Existing Release, Get Not Existing Release)
and check result :)

Codecov Report

Merging #12932 into master will increase coverage by 0.00%.
The diff coverage is 23.07%.

@@           Coverage Diff           @@
##           master   #12932   +/-   ##
=======================================
  Coverage   43.07%   43.07%
=======================================
  Files         658      659    +1
  Lines       72454    72468   +14
=======================================
+ Hits        31211    31219    +8
- Misses      36186    36191    +5
- Partials     5057     5058    +1

Impacted Files
Coverage Δ

routers/api/v1/repo/release_tags.go
0.00% <0.00%> (ø)

routers/api/v1/api.go
79.20% <100.00%> (+0.09%)
:arrow_up:

modules/indexer/stats/db.go
43.47% <0.00%> (-17.40%)
:arrow_down:

modules/indexer/stats/queue.go
64.70% <0.00%> (-11.77%)
:arrow_down:

modules/git/utils.go
73.77% <0.00%> (-3.28%)
:arrow_down:

modules/git/repo.go
46.19% <0.00%> (-0.51%)
:arrow_down:

modules/auth/repo_form.go
42.34% <0.00%> (ø)

routers/repo/migrate.go
45.29% <0.00%> (+0.47%)
:arrow_up:

services/pull/pull.go
41.27% <0.00%> (+0.49%)
:arrow_up:

... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f215e01...2b5aaa2. Read the comment docs.

some tests missing
-> https://github.com/go-gitea/gitea/blob/master/integrations/api_releases_test.go
just add 2 api calls: (Get Existing Release, Get Not Existing Release)
and check result :)
Existing Releases it tests: https://github.com/go-gitea/gitea/blob/master/models/fixtures/release.yml

Thanks for the pointer, I was looking for the tests. I will add them.

You need to commit result of make generate-swagger again :)

@johanvdw It's feature freeze, so we have to wait for 1.13.0 RC1

meh if it's ready - it's ready. I'm happy to merge into 1.13 given it's self-contained.


Add demonstration to documentation

Adding a demonstration section to the documentation allows for potential users to see the program in action before deciding wether or not to set it up.

Demonstration added with #10


Question: guideline no.16

Hi, I've seen the Coding Guideline published on C# digest this week.
Thanks for summarizing all of these in a place open to community :+1:.
Guideline no.16 looks amazing!
With the release of C# 9, We can now let the constructor do the initialization automatically:
public class PersonManager
{
    public PersonManager(ILogger<PersonManager> _logger,
		        SomeConfiguration _config)
    {
    }
}

Could you share the docs (source) for that piece of documentation please ? I'd like to study a bit more the possibilities around this optimization because I've tried it with my actual VS 2019, v16.8.5 but it doesn't work yet.

No docs because Primary Constructors never made it to C# 9. Was (re)planned for C# 10 but even that had been removed recently.
See https://github.com/dotnet/csharplang/issues/2691

Many thanks @dealdiane for source!


CameraXBasic - How to config aspect ratio is 1:1

I want to preview and take picture with aspect ratio is 1:1. How to do that?
Thanks.

if you look to the class of camerax you know the options of aspect ratio is 4_3 and 16_9
but if make the size is customized you can get the aspect ratio wanted
use setTargetResolution in imageAnalysis and make the size like this Size(widthOfScreen,widthOfScreen)


Exploring more idiomatic COM interface projections

This branch provides a .from() method for each interface that makes it easier to cast from one interface to another without dealing with IIDs.
It doesn't break WinRT, but the semantics of .from() are somewhat different. Need to resolve this before merging.

I'm struggling to reconcile this with the WinRT work. I reread #481, and I'm a bit confused, so I'd love to get your advice, @halildurmus!
This PR enables any COM (or WinRT) object to cast to another interface, for example:
  // fileOpenDialog is an instance of IFileOpenDialog; the COM object also implements IModalWindow.
  final modalWindow = IModalWindow.from(fileOpenDialog);

The .from() method here takes a single parameter of IUnknown (i.e. all COM and WinRT objects), and under the covers calls QueryInterface to find the relevant interface.
Ideally we'd gradually eradicate the need for package users to use Pointer<COMObject> directly: that would be masked away, and wherever that appears, we'd replace it with IUnknown, which is a container for the former. In doing so, we'd be able to have IUnknown implement Finalizer so that the underlying pointer could automatically be garbage collected.
Conversely, your WinRT named constructor takes a Pointer<COMObject> that it presumes to be already the correct interface. Should we rename that to .fromRawPointer(), do you think? My head is hurting from trying to think this through...

Ideally we'd gradually eradicate the need for package users to use Pointer<COMObject> directly: that would be masked away, and wherever that appears, we'd replace it with IUnknown, which is a container for the former.

I think we'd use IInspectable for WinRT types right?

In doing so, we'd be able to have IUnknown implement Finalizer so that the underlying pointer could automatically be garbage collected.

I'm so excited about this!

Conversely, your WinRT named constructor takes a Pointer<COMObject> that it presumes to be already the correct interface. Should we rename that to .fromRawPointer(), do you think? My head is hurting from trying to think this through...

Yeah, I think that renaming it to .fromRawPointer() makes sense.
EDIT: I've pushed some changes to this branch (hope it's okay :)).
First, I moved the .from factory constructors to the top because I think it makes more sense. Then, I renamed all WinRT named constructors to .fromRawPointer(). After that, I modified the WinRT generation script to generate the .from for WinRT interfaces. And finally, I modified the implements mappers to use the .from.
For example, instead of generating this:
  // ICalendar methods
  late final _iCalendar = ICalendar.fromRawPointer(toInterface(IID_ICalendar));
  ...

Now, we generate this which is much cleaner:
  // ICalendar methods
  late final _iCalendar = ICalendar.from(this);
  ...

Sure.


Support including multiple alias files without overwriting

Code of Conduct

[X] I agree to follow this project's Code of Conduct

What would you like to see changed/added?
Before I get into it let me just say I love this tool and I think it has a lot of potential to help me wrangle my dotfiles and system configs. Thank you for building it!
Problem
I have a ton of aliases in my dotfiles and I'd like to use aliae to help me manage them across shells and systems. BUT, cramming them all into a single .aliae.yaml file is both extremely verbose and a bit difficult to maintain. I'd like the ability to logically group them across different files or lists to make them easier to find and maintain. At first glance, aliae's include/_dir functionality seems to be the perfect solve, but in practice it doesn't function they way I'd expect.
In short, I'd like to create an aliae setup that resembles something like the following:
.aliae.yaml
aliases/
  nav.yaml
  git.yaml
  go.yaml
  ...

Where .aliae.yaml looks like:
aliae: !include_dir "./aliases"

# generic aliases
alias:
  - name: vim
    value: nvim

env:
  ...

And each of the files under aliases/ contains a list of aliases to include, for example nav.yaml:
alias:
  - name: ...
    value: cd ../..
  - name: apps
    value: cd ~/Applications

As a side note, I've found that the example in the docs isn't entirely correct, as the alias: tag needs to be present at the top of the included file in order for it be included correctly.

Today, the setup I've described above doesn't work. aliae does appear to properly read each of the included files, but does not concatenate their contents into a main list of aliases. Instead, the last alias: list read is the only one sourced. In the example above, that would be the one in .aliae.yaml since it is after the include statement. If .aliae.yaml didn't include its own list, the only one sourced would be nav.yaml since it is last alphanumerically in the aliases directory. This effectively renders to purpose of being able to import from other files useless.
Proposal
My ask is that all of the included alias lists are either all independently sourced or concatenated into a main list that is sourced all at once. Obviously there might need to be a check for duplicate names, but that problem is not unique to this approach.
I'd expect the env/script segments to work the same way, though I haven't tested them out myself.
Thanks for the consideration!

@boldandbrad this is a really good idea! I'm going to give aliae some love next week as I've been so busy with oh-my-posh the past months.

Awesome!! 🙌
To go even further, might be cool to be able to apply an if directive to the include so that you can conditionally include a whole file or directory instead of applying duplicateif conditions to a bunch of records that all rely on the same condition.
This could be done by either applying the if to the include or by putting a global if at the top of the included file or alias: list. Not sure which approach is more flexible.

As a side note, I've found that the example in the docs isn't entirely correct, as the alias: tag needs to be present at the top of the included file in order for it be included correctly.

@boldandbrad this doesn't seem to be true anymore, but I did have to rework this due to a breaking change in the yaml parser.

Can't wait to try this out. Thank you so much!


Foreground notification fix on android

Blank notification on foreground only, you can receive notification but it is not working in foreground, only on background.
Thanks to this: https://github.com/wix/react-native-notifications/issues/525#issuecomment-656585578

I believe this was already fixed by a recent PR and merged but not released yet.
Try npm/yarn install react-native-notifications@snapshot. See https://www.npmjs.com/package/react-native-notifications?activeTab=versions

I believe this was already fixed by a recent PR and merged but not released yet.
Try npm/yarn install react-native-notifications@snapshot. See https://www.npmjs.com/package/react-native-notifications?activeTab=versions

I am getting this error when I am using the latest snapshot of the library.

Might be caused by https://github.com/wix/react-native-notifications/pull/634
I'm personally using "react-native-notifications": "3.2.2-snapshot.145", and it seems to work for foreground notifications as well.

Might be caused by #634
I'm personally using "react-native-notifications": "3.2.2-snapshot.145", and it seems to work for foreground notifications as well.

still not working for me

Can we approve this? Or at least have an option to enable foreground notifications on Android?

I'm not sure it's the right approach to enable foreground notifications for everyone. Some applications, and the Wix app is among them, listens to registerNotificationReceivedForeground and handles the notification presentation in JS.
Created this task for the next release.


Changing our name

We received some feedback that the Boost name conflicts with a well known set of C++ libraries, an issue that we could not have possibly forseen before releasing.
So, let's try to decide on a path going forward, possible options:
👍 Leave Boost
❤ Ostara - "West Germanic spring goddess"
😄 Ajari - Punjabi word for Shepherd
🎉 Sprynter - Derived from Sprinter
🚀 Tefiti - Goddess from Moana
👀 Other suggestions

Lenz old Germanic for spring 🤷♂

Ostara it is!


PromptIfEmpty enhancement proposal

In my opinion we have to add smth like KeepAsking property in PromptIfEmpty hook so if I`ll just hit Enter and the value for ArgumentValue will be empty string It will re-prompt me to enter new value. Implementation should be straight forward by just adding do-while(context.ArgumentValue == string.Empty && KeepAsking) construction on BeforePopulateProperty method. And do the same for ArgRequired validator due ArgRequiredConditionalHook declared as internal.

In dev branch, but only for PromptIfEmpty.


Variable Explorer functional test 'Variable explorer - Loading (native)' is flakey.

Fails sometimes on the nightly builds.
Fails consistently on Windows.

I resolved with #7878


api: validator selection on create

Signed-off-by: Leonardo Rossi<EMAIL_ADDRESS>

Closing PR because it's been stale for a long time.


Cosmos DB: SessionContainer

Add SessionContainer to help with accounts with Session Consistency.
https://github.com/Azure/azure-cosmos-dotnet-v3/blob/master/Microsoft.Azure.Cosmos/src/SessionContainer.cs

Notes: Time 1-2 weeks | T-shirt S | add session token to the header response. session cache. same session reads and writes. in memory cache.


Projects require an initial build.

This might be related to the debug.yaml not being present so we have no idea how the Swift PM will build the project. There are two options:

Deal with it and require projects to be built once, including new files... not a great thing long term
Come up with our own logic on how this should be built up. Better, but more costly.

A build is now forced... the long term solution is to generate the debug.yaml file ourselves.


Q: Is there a roadmap.

I am working on a large project consuming multiple cloud provider's cost data in gigabytes, daily - the client is BMW.
We are now looking to see if we can normalise the naming between the providers, and of course, after some base research stumbled upon the FOCUS project.
I just requested access to the focus.finops community.
I would love to speak to anyone about this project and how we might integrate FOCUS into our project, or, potentially even contribute in some way.
Thanks,
John

Yes we are working on building out the roadmap here https://github.com/orgs/finopsfoundation/projects/2/views/1 Watch this space over the next 2 weeks. :)
We will reach out about a sync with you regarding your project.


bfloat16 support

Currently I get

Gradient+optimizer bit data type combination not supported: grad torch.bfloat16, optimizer torch.uint8

Thank you! This is an important feature that needs to be implemented. Currently, it's a bit of a mess with all those different CUDA versions and bf support. The problem is that only specific combinations of CUDA + GPUs support bf16, and the library needs to be restructured to be able to be compiled for all of those cases. It causes a bit of a combinatorial explosion in libraries that need to be compiled, which makes it difficult to maintain the library.
If anyone wants to give it a shot, I am happy to work on this if you create a PR.

@TimDettmers sorry for bothering you!
Is there any update for this enhancement?
really need bf16 weight + bf16 amp + 8bit optimizer for training some big model...

Strange, I thought I implemented this. I will check this and update if necessary. Thanks for reporting that it is still not working.

This has been addressed in 0.39.1 and should work now.


Allow an issue to appear in multiple sections

The release notes sections are not always mutually exclusive and it is possible an issue can belong to more than one section.
For example, in Spring Security, we call out any issues that break passivity in a "Non-passive" section.
These issues are also enhancements or bugs and we would like them to be listed under "New Features" or "Bug Fixes" as well.

I am happy to submit a PR if this feature request is approved.

I think this is an enhancement that we could support. Maybe it should be configurable in case someone wants to avoid duplication across sections.

Closing in favour of #37.


Checksum error with aws/aws-cli

$ aws version
INFO[0000] download and unarchive the package            aqua_version=2.17.1 env=darwin/arm64 exe_name=aws package_name=aws/aws-cli package_version=2.13.35 program=aqua registry=standard
FATA[0001] aqua failed                                   actual_checksum=36D16A6156150B3940CD7E750FBD7B9C529EE93C8E0EB594283F19A197DE5C42 aqua_version=2.17.1 env=darwin/arm64 error="install the package: checksum is invalid" exe_name=aws expected_checksum=C42812A6F061D931BB21DC12FE9399E8EDD680DA22704CAA2F4836C538C06621 package_name=aws/aws-cli package_version=2.13.35 program=aqua

Thank you for your report.
I could produce the issue.
I'll look into.

I could reproduce the issue with aqua v2.17.1, v2.16.4, v2.15.0.

I tried with another laptop, then expected_checksum was changed.
It's interesting.
$ aws --version
INFO[0000] download and unarchive the package            aqua_version=2.17.1 env=darwin/arm64 exe_name=aws package_name=aws/aws-cli package_version=2.13.35 program=aqua registry=standard
Downloading aws/aws-cli 2.13.35 100% |██████████████████████████████████████████████████████████████| (38/38 MB, 47 MB/s)
FATA[0000] aqua failed                                   actual_checksum=36D16A6156150B3940CD7E750FBD7B9C529EE93C8E0EB594283F19A197DE5C42 aqua_version=2.17.1 env=darwin/arm64 error="install the package: checksum is invalid" exe_name=aws expected_checksum=A7A2B00B0157A49969AAAD48CBB0F6C03FA86F2427228FA2E43E38B2CECDE1F1 package_name=aws/aws-cli package_version=2.13.35 program=aqua

I tried other packages 1xyz/pryrite (package type is github_release) and GoogleCloudPlatform/cloud-sql-proxy (package type is http), but I couldn't reproduce the issue.
So maybe this is an issue specific to aws/aws-cli and almost all packages are unrelated.
I'll try to change how to calculate the checksum of expected_checksum same with actual_checksum.

As a workaround, please modify aqua-checksum.json manually.
{
  "checksums": [
    {
      "id": "http/awscli.amazonaws.com/AWSCLIV2-2.13.35.pkg",
      "checksum": "36D16A6156150B3940CD7E750FBD7B9C529EE93C8E0EB594283F19A197DE5C42", // Please change the checksum to the correct value
      "algorithm": "sha256"
    },
    {
      "id": "http/storage.googleapis.com/cloud-sql-connectors/cloud-sql-proxy/v2.7.2/cloud-sql-proxy.darwin.arm64",
      "checksum": "D39342A3D724B860EE9840A9DA5F737CFB8C5FC113BF776038D9A7346D5B262D",
      "algorithm": "sha256"
    },
    {
      "id": "registries/github_content/github.com/aquaproj/aqua-registry/v4.86.0/registry.yaml",
      "checksum": "9EB5B05029E7821116C7C50F2998261ABDCDFDDE7857C0EBF5FF084497CAD7D4",
      "algorithm": "sha256"
    }
  ]
}


Adding tf_laser_transform to documentation index for distro

I'd like tf_laser_transform to be indexed and documented on ros.org.

Please respect the alphabetical order. I am not sure the naming is good though: it is not as generic as the name suggests.

I agree with @vrabaud  I think that tinkerforge_laser_transform would be a better name. It doesn't actually use tf, except for a few datatypes.
Also there's a unrelated change in base.yaml which should be submitted separately.


Migrate to Gradle

Maven is too 2000s, it's time to go for Gradle.

I would like to work on this issue

@mauricioaniche some more things: we would also need to update all the images and pipelines. Then, also check the test infrastructure. Furthermore, we would need to decide if we want the Kotlin or Groovy flavour (I think Kotlin is nicer, but Groovy works well). Also, I thought we were ditching the Maven plugin, does it make sense to make a Gradle one? Lastly, we also need to update the documentation on how to run Andy. This may conflict with the open issues on updating documentation for students.

There's a nice migration guide by Gradle. I think it'd be super helpful to take advantage of build scans, though I'm not sure if they can sufficiently visualize our organized chaos.
The Gradle equivalent of shading is shadow. There are transformers available for some of the things we have in ourandy POM, but I'm not sure if all of them exist. It may be required to create a custom transformer/port a Maven one.
When you run gradle init, the conversion explodes all of the assignments, so we'll end up with a lot of modules defined at the root level settings.gradle.kts. Though I think it's the same with the Maven setup right now.

@mauricioaniche it is a tough one but should be a pleasant challenge.

I have already seen the Gradle migration guide. Simple gradle init is good start. However as @Arraying mentioned a lot of modules are defined at root level. In current maven configuration the all the assignments are defined in assignments module.


[Logs] Cleaning code from debug logs

This commit:

removes redundant debug logs
changes some valuable debug logs into LOGI level
changes some logs to LOGW level

This commit is a part of https://github.com/flutter-tizen/engine/issues/101
Further changes will be delivered in next PRs.

Don't we need to implement the verbose_logging switch first? Otherwise the INFO logs will be printed out to the console by default.

@swift-kim at first I didn't understand that the implementation is missing. Please check if my latest commit meets your expectations.

@pkosko Yes, I was expecting that kind of thing as a prerequisite. Thank you for understanding. You may just rename prio_min_ to min_priority to follow the general naming rules (no trailing underscore, minimum abbreviation).

Dear reviewers, I've added last commit https://github.com/flutter-tizen/engine/pull/108/commits/d3d5ab94637f868f24dd6c11474e277ce84f9ab8 which removes all remaining LOGD usages. This commit makes that whole scope of issue #101 is covered by this PR.


Generating svg icons path is not show in font

Some of the icons do not show the white path. Without difference in export.
For example, some paths have fill="white" and this is not present.

found solution


Implement a notification banner to show up on login

Closes https://github.com/ethyca/fidesplus/issues/676
Code Changes

[x] Adds a NotificationBanner component
[x] Adds state to redux for whether or not to show the banner
[x] Tweaks to HomeLayout similar to https://github.com/ethyca/fides/pull/2812/files

Steps to Confirm

[ ] You should see the notification banner when you start the app
[ ] Exit out of it
[ ] Click around and make sure it doesn't come back
[ ] Log out of the app
[ ] Log back in and you should see the banner again

Pre-Merge Checklist

[ ] All CI Pipelines Succeeded
Documentation:

[ ] documentation complete, PR opened in fidesdocs
[ ] documentation issue created in fidesdocs

[ ] Issue Requirements are Met
[ ] Relevant Follow-Up Issues Created
[x] Update CHANGELOG.md

Description Of Changes
I wasn't sure if we wanted to add a check against the fides version here? Or how we determine when we will remove this banner.
https://user-images.githubusercontent.com/24641006/225382627-95f2e99e-57dc-4e4c-862d-18ef985b7868.mov

Just pushed one more change to make the banner only viewable to viewers. will update the steps to confirm


Can this be updated to latest? (4.2)

If so that would be awesome!

I have found that mongo now has its own container for ARMv8 which can be used on the Raspberry Pi 4. here is the link to said docker container on the dokcer hub: https://hub.docker.com/r/arm64v8/mongo/


Feature:  SSL/TLS Support

Any plans to add support for SSL/TLS?

Yes! @compressed is working on it, I believe. Unfortunately I caused https://github.com/tikue/tarpc/pull/7 to bitrot, but hopefully it'll be ready soon!

👍

Yup. I should have a new PR this week!

Thanks.  Does it support mutual SSL where client can be verified using SSL CN?


[Feature Request] Add / Commands

Is your feature request related to a problem? Please describe.
no
What is your ideal solution to the problem?

Discord wants bots to move to / commands

How would this feature be used?
/play would how the usage of the command
Additional Info
No response
Checklist

[X] I have checked the documentation to make sure this feature doesn't already exist
[X] I have searched for similar feature requests
[X] I have confirmed that my requests is not on the list of things that will not be added
[X] I am running the latest version of the bot:

Duplicate of #664


⚠ AsianCinema has degraded performance

In c3c2590, AsianCinema ($ACM) experienced degraded performance:

HTTP code: 525
Response time: 20758 ms

Resolved: AsianCinema performance has improved in 3511899 after 31 minutes.


Include more fields specified in the Invenio documentation

https://inveniordm.docs.cern.ch/reference/metadata/#overview

Where to find these docs @HLWeil ?

https://inveniordm.docs.cern.ch/reference/metadata/#overview
The link was part of the issue #2 but seems like it got lost in milestoneination 😄


Fix tpm import in test_tpm.py

This fixes a problem with running the test through the
"coverage run". Currently, it fails due to the following error:
AttributeError: module 'keylime' has no attribute 'tpm'
Signed-off-by: Karel Srot<EMAIL_ADDRESS>

@mpeters The current script is broken as this import won't work when running the test as a standalone script, i.e.
python3 test_tpm.py
This is what coverage script does as it runs each test individually.
https://github.com/keylime/keylime/blob/master/test/run_tests.sh#L199
OTOH, for non-coverage scenario tests are run altogether via green which is IMHO what makes a difference as the required import is most likely done by some of the former tests.
https://github.com/keylime/keylime/blob/master/test/run_tests.sh#L218


Added Various Strings

fopen Injection String
Unix Shell Shock String
SSH Escape Sequence

Your change request includes some backup files (filenames ending with ~) which shouldn't be part of a git repository.

I will edit the request.


Can All_gather of collective_ops be used in deep learning model building and reverse optimization of the model

System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow):YES
OS Platform and Distribution (e.g., Linux Ubuntu 16.04):Linux CentOS 7.6.1810
Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:
TensorFlow installed from (source or binary):binary
TensorFlow version (use command below):1.15.4
Python version:3.6.8
Bazel version (if compiling from source):None
GCC/Compiler version (if compiling from source):None
CUDA/cuDNN version:None
GPU model and memory:None

Describe the current behavior
I want to implement a data exchange function between workers,So I use Send/Recv of collective_ops while building a model.But errors occured when computing gradients.

No gradient defined for operation 'CollectiveGather_1' (op type: CollectiveGather)

Describe the expected behavior
Normal training.
Code to reproduce the issue
 import tensorflow as tf
 from tensorflow.python.ops import collective_ops
 FLAGS = tf.app.flags.FLAGS
 worker_replicas=2
 def shuffle(tensor):
    batch_size = tf.shape(tensor)[0]
    rank = FLAGS.task_index
    with tf.device('/cpu:0'):
        all_idx = tf.range(worker_replicas * batch_size)
        shuffle_idx = tf.random.shuffle(all_idx)
        if FLAGS.task_index == 0:
            index_broadcast = collective_ops.broadcast_send(shuffle_idx, shape=shuffle_idx.shape,
                                                            dtype=shuffle_idx.dtype,
                                                            group_size=worker_replicas, group_key=3, instance_key=100)
        else:
            index_broadcast = collective_ops.broadcast_recv(shape=shuffle_idx.shape, dtype=shuffle_idx.dtype,
                                                            group_size=worker_replicas, group_key=3, instance_key=100)
        my_idxs = tf.slice(index_broadcast, [rank * batch_size], [batch_size])
        all_tensor = collective_ops.all_gather(
            tensor, worker_replicas, worker_replicas, worker_replicas)

    return tf.gather(all_tensor, my_idxs), shuffle_idx

Other info / logs
I insert the code snippet while model building,it shuffles tensors between workers,but the log as follows.
File "/home/shangyw/git_rep/test_model/deploy/model_deploy.py", line 435, in _optimize_clone
    clone_grad = optimizer.compute_gradients(sum_loss, **kwargs)
  File "/home/shangyw/virtualenv/p3_tf115/lib/python3.6/site-packages/tensorflow_core/python/training/optimizer.py", line 512, in compute_gradients
    colocate_gradients_with_ops=colocate_gradients_with_ops)
  File "/home/shangyw/virtualenv/p3_tf115/lib/python3.6/site-packages/tensorflow_core/python/ops/gradients_impl.py", line 158, in gradients
    unconnected_gradients)
  File "/home/shangyw/virtualenv/p3_tf115/lib/python3.6/site-packages/tensorflow_core/python/ops/gradients_util.py", line 637, in _GradientsHelper
    (op.name, op.type))
2021-12-22 11:04:07,317 - DEBUG - No gradient defined for operation 'CollectiveGather_1' (op type: CollectiveGather)

@upwindflys ,
We see that you are using tf version 1.15, 1.x is not actively supported, please update to v2.7 and let us know if you are using same issue.

@tilakrayal Thank you for your reply.But there is no avaliable 2.7.x tf version, so I tried tf version 2.6,the same error occured.
(p3_tf2) root@147tf$ pip install tensorflow-gpu==2.7
ERROR: Could not find a version that satisfies the requirement tensorflow-gpu==2.7 (from versions: 0.12.1, 1.0.0, 1.0.1, 1.1.0, 1.2.0, 1.2.1, 1.3.0, 1.4.0, 1.4.1, 1.5.0, 1.5.1, 1.6.0, 1.7.0, 1.7.1, 1.8.0, 1.9.0, 1.10.0, 1.10.1, 1.11.0, 1.12.0, 1.12.2, 1.12.3, 1.13.1, 1.13.2, 1.14.0, 1.15.0, 1.15.2, 1.15.3, 1.15.4, 1.15.5, 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.3.4, 2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.4.4, 2.5.0, 2.5.1, 2.5.2, 2.6.0, 2.6.1, 2.6.2)
ERROR: No matching distribution found for tensorflow-gpu==2.7

Traceback (most recent call last):
  File "all_gather_gradient.py", line 98, in <module>
    start_process()
  File "all_gather_gradient.py", line 94, in start_process
    process_fn(worker_hosts,INDEX)
  File "all_gather_gradient.py", line 63, in process_fn
    grad = tf.gradients(loss,params)
  File "/home/shangyw/virtualenv/p3_tf2/lib/python3.6/site-packages/tensorflow/python/ops/gradients_impl.py", line 172, in gradients
    unconnected_gradients)
  File "/home/shangyw/virtualenv/p3_tf2/lib/python3.6/site-packages/tensorflow/python/ops/gradients_util.py", line 636, in _GradientsHelper
    (op.name, op.type))
LookupError: No gradient defined for operation 'worker0/CollectiveGather' (op type: CollectiveGather)

@tilakrayal
I tried the tf version 2.7.0 by using docker image tensorflow/tensorflow:2.7.0-gpu. But the same error occured.
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/tensorflow/python/ops/gradients_util.py", line 598, in _GradientsHelper
    grad_fn = ops.get_gradient_function(op)
  File "/usr/local/lib/python3.8/dist-packages/tensorflow/python/framework/ops.py", line 2788, in get_gradient_function
    return gradient_registry.lookup(op_type)
  File "/usr/local/lib/python3.8/dist-packages/tensorflow/python/framework/registry.py", line 99, in lookup
    raise LookupError(
LookupError: gradient registry has no entry for: CollectiveGather

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "all_gather_gradient.py", line 98, in <module>
    start_process()
  File "all_gather_gradient.py", line 94, in start_process
    process_fn(worker_hosts,INDEX)
  File "all_gather_gradient.py", line 63, in process_fn
    grad = tf.gradients(loss,params)
  File "/usr/local/lib/python3.8/dist-packages/tensorflow/python/ops/gradients_impl.py", line 169, in gradients
    return gradients_util._GradientsHelper(
  File "/usr/local/lib/python3.8/dist-packages/tensorflow/python/ops/gradients_util.py", line 626, in _GradientsHelper
    raise LookupError(
LookupError: No gradient defined for operation'worker0/CollectiveGather' (op type: CollectiveGather). In general every operation must have an associated<EMAIL_ADDRESS>for correct autodiff, which this op is lacking. If you want to pretend this operation is a constant in your program, you may insert `tf.stop_gradient`. This can be useful to silence the error in cases where you know gradients are not needed, e.g. the forward pass of tf.custom_gradient. Please see more details in https://www.tensorflow.org/api_docs/python/tf/custom_gradient.

@upwindflys ,
While trying to execute the given code i was facing different error.Please find the gist of it here and provide the latest code to reproduce the issue.Thanks!

@tilakrayal Hi,
Code to reproduce the issue.
"""File all_gather.py"""

import numpy as np
import sys
NUM_PROCESSES = 2
NUM_TOWERS = 1

INDEX = int(sys.argv[1])
print ('Index: {}'.format(INDEX))
def process_fn(worker_hosts, task_index):
    """allgather process"""

    import time
    import tensorflow.compat.v1 as tf
    tf.disable_v2_behavior()
    from tensorflow.python.ops import collective_ops

    cluster_spec = tf.train.ClusterSpec({'worker': worker_hosts})

    # unconfigured collective_group_leader make each worker the leader
    # '/replica:0' is necessary in the configuration.
    config = tf.ConfigProto(device_count={'CPU': NUM_TOWERS})
    config.experimental.collective_group_leader = '/job:worker/replica:0/task:0'
    server = tf.train.Server(cluster_spec, config=config,
                             job_name='worker', task_index=task_index)
    with tf.Graph().as_default():
        # create weight
        all_weights = list()
        for worker_index in range(NUM_PROCESSES):
            worker_weights = list()
            with tf.variable_scope('worker{}'.format(worker_index)):
                for tower_index in range(NUM_TOWERS):
                    device = '/job:worker/replica:0/task:{}/device:CPU:{}'.format(
                        worker_index, tower_index)
                    with tf.device(device):
                        x_data = np.array([1,2])
                        y_data = x_data*0.1+0.3
                        weight = tf.get_variable(
                            'weight{}'.format(tower_index), shape=[1])
                        worker_weights.append(weight)
                        all_idx = tf.range(2)
                        shuffle_idx = tf.random.shuffle(all_idx)
                        if task_index == 0:
                            tensor = collective_ops.broadcast_send(shuffle_idx, shape=shuffle_idx.shape,
                                                                   dtype=shuffle_idx.dtype, group_size=NUM_PROCESSES,
                                                                   group_key=3, instance_key=100)
                        else:
                            tensor = collective_ops.broadcast_recv(shape=shuffle_idx.shape, dtype=shuffle_idx.dtype,
                                                                   group_size=NUM_PROCESSES, group_key=3,
                                                                   instance_key=100)
                        my_idxs = tf.slice(tensor, [INDEX * 1], [1])
                        inter_reduced = collective_ops.all_gather(
                            weight, NUM_PROCESSES, NUM_PROCESSES, NUM_PROCESSES)
                        dst = tf.gather(inter_reduced, my_idxs, axis=0)
                        biases = tf.Variable(tf.zeros([1]))
                        y = dst*x_data+biases
                        loss = tf.reduce_mean(tf.square(y-y_data
                                                        ))
                        params = [weight,biases]
                        grad = tf.gradients(loss,params)
                        grads_param = zip(grad,params)
                        optimizer = tf.train.GradientDescentOptimizer(0.01)
                        train_op = optimizer.apply_gradients(grads_param)

            all_weights.append(worker_weights)

        inter_reduced = None

        session_creator = tf.train.ChiefSessionCreator(
            master=server.target)
        with tf.train.MonitoredSession(session_creator=session_creator) \
                as mon_sess:
            result_all = mon_sess.run(all_weights)
            print('task {} sense {}'.format(task_index, result_all))
            result_inter,my_idxs_np,result_slice,_ = mon_sess.run([inter_reduced,my_idxs,dst,tensor])
            print('task {} \n inter_reduce {} \n my_idxs {} idx {} \n slice_tensor {}'.format(task_index, result_inter,my_idxs_np, _, result_slice))
            mon_sess.run(train_op)
            time.sleep(1)

def start_process():
    """start process"""
    port = 60000
    host_fmt = 'localhost:{}'
    worker_hosts = list()
    for process_index in range(NUM_PROCESSES):
        worker_hosts.append(host_fmt.format(port + process_index))
    process_fn(worker_hosts,INDEX)

if __name__ == '__main__':
    start_process()

Command
woker0: python all_gather.py 0    worker1: python all_gather.py 1

@upwindflys,
I was facing different error while trying to execute the code.Please find the gist of it here.

@tilakrayal I modified the code receiving external incoming variables.
Code to reproduce the issue.
"""Illustrate AllGather"""
import multiprocessing as mp

MP_METHOD = 'fork'  # 'fork' (UNIX), 'spawn' (WINDOWS);
import numpy as np
NUM_PROCESSES = 2
NUM_TOWERS = 1

def process_fn(worker_hosts, task_index):
    """allgather process"""

    import time
    import tensorflow.compat.v1 as tf
    tf.disable_v2_behavior()
    from tensorflow.python.ops import collective_ops

    cluster_spec = tf.train.ClusterSpec({'worker': worker_hosts})

    # unconfigured collective_group_leader make each worker the leader
    # '/replica:0' is necessary in the configuration.
    config = tf.ConfigProto(device_count={'CPU': NUM_TOWERS})
    config.experimental.collective_group_leader = '/job:worker/replica:0/task:0'
    server = tf.train.Server(cluster_spec, config=config,
                             job_name='worker', task_index=task_index)
    with tf.Graph().as_default():
        # create weight
        all_weights = list()
        # for worker_index in range(NUM_PROCESSES):
        worker_weights = list()
        with tf.variable_scope('worker{}'.format(task_index)):
            for tower_index in range(NUM_TOWERS):
                device = '/job:worker/replica:0/task:{}/device:CPU:{}'.format(
                    task_index, tower_index)
                with tf.device(device):
                    x_data = np.array([1,2])
                    y_data = x_data*0.1+0.3
                    weight = tf.get_variable(
                        'weight{}'.format(tower_index), shape=[1])

                    worker_weights.append(weight)
                    all_idx = tf.range(2)
                    shuffle_idx = tf.random.shuffle(all_idx)
                    if task_index == 0:
                        tensor = collective_ops.broadcast_send(shuffle_idx, shape=shuffle_idx.shape,
                                                               dtype=shuffle_idx.dtype, group_size=NUM_PROCESSES,
                                                               group_key=3, instance_key=100)
                    else:
                        tensor = collective_ops.broadcast_recv(shape=shuffle_idx.shape, dtype=shuffle_idx.dtype,
                                                               group_size=NUM_PROCESSES, group_key=3,
                                                               instance_key=100)
                    my_idxs = tf.slice(tensor, [task_index * 1], [1])
                    inter_reduced = collective_ops.all_gather(
                        weight, NUM_PROCESSES, NUM_PROCESSES, NUM_PROCESSES)
                    dst = tf.gather(inter_reduced, my_idxs, axis=0)

                    biases = tf.Variable(tf.zeros([1]))
                    y = dst*x_data+biases
                    # y = weight * x_data + biases
                    loss = tf.reduce_mean(tf.square(y-y_data
                                                    ))
                    params = [weight,biases]
                    grad = tf.gradients(loss,params)
                    grads_param = zip(grad,params)
                    optimizer = tf.train.GradientDescentOptimizer(0.01)
                    train_op = optimizer.apply_gradients(grads_param)

        all_weights = worker_weights
        inter_reduced = None

        session_creator = tf.train.ChiefSessionCreator(
            master=server.target)
        with tf.train.MonitoredSession(session_creator=session_creator) \
                as mon_sess:
            result_all = mon_sess.run(all_weights)
            print('task {} sense {}'.format(task_index, result_all))
            result_inter,my_idxs_np,result_slice,_ = mon_sess.run([inter_reduced,my_idxs,dst,tensor])
            print('task {} \n inter_reduce {} \n my_idxs {} idx {} \n slice_tensor {}'.format(task_index, result_inter,my_idxs_np, _, result_slice))
            mon_sess.run(train_op)
            time.sleep(1)

def start_process():
    """start process"""

    port = 60000
    host_fmt = 'localhost:{}'
    worker_hosts = list()
    for process_index in range(NUM_PROCESSES):
        worker_hosts.append(host_fmt.format(port + process_index))
    mp_ctx = mp.get_context(MP_METHOD)
    processes = list()
    for process_index in range(NUM_PROCESSES):
        process = mp_ctx.Process(target=process_fn,
                                 args=(worker_hosts, process_index,))
        processes.append(process)
        process.start()
    for process in processes:
        process.join()

if __name__ == '__main__':
    start_process()

@sachinprasadhs ,
I was able to reproduce the issue in tf v2.5, v2.7 and nightly.Please find the gist of it here.

I could not find the source for collective_ops which is registered under gradient function(@ops.RegisterGradient).
Meanwhile you can check this to implement the gradient in python for the custom ops.

I have the same problem. Could you please solve this problem? You don't provide gradient functions for these collective_ops operations, which makes TensorFlow looks like a work-in-progress. A lot of my friends have switched to Pytorch and it looks like I have to do the same.

Hi,
Thank you for opening this issue. Since this issue has been open for a long time, the code/debug information for this issue may not be relevant with the current state of the code base.
The Tensorflow team is constantly improving the framework by fixing bugs and adding new features. We suggest you try the latest TensorFlow version with the latest compatible hardware configuration which could potentially resolve the issue. If you are still facing the issue, please create a new GitHub issue with your latest findings, with all the debugging information which could help us investigate.
Please follow the release notes to stay up to date with the latest developments which are happening in the Tensorflow space.


cannot build

log file : Chromium 53.0.2785 (Ubuntu 0.0.0): Executed 0 of 0 SUCCESS (0 secs / 0 secs)
ium 53.0.2785 (Ubuntu 0.0.0): Executed 0 of 0 ERROR (0.015 secs / 0 secs)
npm ERR! Linux 4.4.0-51-generic
npm ERR! argv "/home/travis/.nvm/versions/node/v5.12.0/bin/node" "/home/travis/.nvm/versions/node/v5.12.0/bin/npm" "run" "test-once"
npm ERR! node v5.12.0
npm ERR! npm  v3.8.6
npm ERR! code ELIFECYCLE
npm ERR<EMAIL_ADDRESS>test-once: tsc && karma start karma.conf.js --single-run
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>test-once script 'tsc && karma start karma.conf.js --single-run'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the angular-quickstart package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     tsc && karma start karma.conf.js --single-run
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls angular-quickstart
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR!     /home/travis/build/DhiaEddineSaidi/QuickstartAngular/npm-debug.log

hey bro
i found the solution
go packge.json and replace this code of lines
"scripts": {
"start": "concurrently "npm run tsc:w" "npm run lite" ",
"lite": "lite-server",
"postinstall": "typings install",
"tsc": "tsc",
"tsc:w": "tsc -w",
"typings": "typings"
},

@faisalsaghir7  "start": "concurrently "npm run tsc:w" "npm run lite" ",
npm ERR! Unexpected token 'p' at 6:30
npm ERR!     "start": "concurrently "npm run tsc:w" "npm run lite" ",
npm ERR!                              ^

This repository is now deprecated. The Angular Quickstart project was a nice starting point for creating Angular applications. Now we recommend using the Angular CLI to create new Angular projects.
Starting from 1 November 2017, all the Angular documentation, at angular.io, is based on the Angular CLI.
Let's get started


Remove webpush and vapid

This PR removes VAPID and Webpush code from the project.
When this PR is merged, the following should be done:

[ ] Remove VAPID environment variables from backend.yml in ansible-config
[ ] Remove VAPID secrets from password store for each environment

Questions:

[x] Should the notiifcations app be removed as a part of this PR? Is it related to the webpush stuff?

I missed the py-webpush package - I assume that also needs to be removed.
I'll open a new PR that removes it.


if an AlograndClient connects to algod in devmode don't cache params

Problem
By default the AlgorandClient will cache SuggestedParams. Given the short default validity window this can result in transactions being sent outside the lastValid if multiple transactions are sent within a short period of time.
Solution
If the algod the client is connecting to is in devmode don't cache the suggestedParams
Proposal
When the suggestedParams are retrieved for the first time, also check if the network is in devmode
Pros and Cons
This allows us to keep the suggestedParams in the txns themselves the same while fixing the problem for devmode.
Dependencies
N/A

Makes sense to me!


⚠ ClamAV has degraded performance

In 1ce418e, ClamAV (https://spamassassin.apache.org/) experienced degraded performance:

HTTP code: 200
Response time: 72 ms

Resolved: ClamAV performance has improved in 7a9aae5.


I don't understand the advanced options and don't know where to look for information

Hey, first: thanks for this tool, I'm having a ton of fun with it! But I would like to have more control over the settings to fine-tune them, and for that I need to understand what they do first.
I mean these ones:
  --fast-pyr            Set to use fast pyramids
  --pyr-scale PYR_SCALE
                        Specify pyramid scale factor, (default: 0.5)
  --levels LEVELS       Specify number of pyramid layers, (default: 3)
  --winsize WINSIZE     Specify averaging window size, (default: 25)
  --iters ITERS         Specify number of iterations at each pyramid level,
                        (default: 3)
  --poly-n {5,7}        Specify size of pixel neighborhood, (default: 5)
  --poly-s POLY_S       Specify standard deviation to smooth derivatives,
                        (default: 1.1)
  -ff {box,gaussian}, --flow-filter {box,gaussian}
                        Specify which filter to use for optical flow
                        estimation, (default: box)

Now, I completely understand that the command line is not the best place to explain the fine details of a motion interpolation algorithm, but even after discovering in the docs that the interpolation algorithm is by Farneback, searching the internet is not helping much.
Pyramids of what? Scale does what? Window size for what? Blending? Looking for where the pixel moved to?
Actually, as I typed this I finally found a blogpost that gives some ideas what these parameters do. And even the it has to be inferred:

Result is computer in flowUmat which has same size as inputs but format is CV_32FC2
0.4- image pyramid or simple image scale
1 is number of pyramid layers. 1 mean that flow is calculated only from previous image.
12 is win size.. Flow is computed over the window larger value is more robust to the noise.
2 mean number of iteration of algorithm
8 is polynomial degree expansion recommended value are 5 - 7
1.2 standard deviation used to smooth used derivatives recommended values from 1.1 - 1,5

It would be nice if there was a bit more explanation in the butterflow docs (or alternatively, a link to a another page describing the algorithm) that helps understand what these parameters mean and what kind of effects they have.

I took a 1 minute clip and ran it through with a bunch of different options, and compared some 25-30 different clips to figure out what these changes do. The biggest difference is switching the method from Box to Gaussian.
Increasing Pyramid layers helps ALOT for live-acation footage or drone footage with long shots with not many quick cuts.
I still don't understand how the standard deviation works. Can't see much of a difference in my clip between 1.1 and 1.5 in the drone footage.
I still haven't found a way to remove audio sync issues though.


Direct Drawing to TTY to enable sixel support

Expose underlying TTY and locking mechanism to enable an implementer to directly write to the TTY (if the screen is a terminfo based screen). These two features allow for drawing of sixels on the screen, and locking the cells that are drawn on top of. The locking mechanism enables an implementer to lock tcell's access to drawing to a region of cells. Locks are not transferred during a resize.
Expose the pixel size of the window via EventResize and via a call to tty.WindowSize(). Both methods allow implementers access to the underlying window size in cells and pixels. A helper function is included on the WindowSize struct to calculate the pixel size of a single cell. Pixel sizes are required to calculate the cell size of an image so that an appropriate lock can be obtained.
Add a demo of displaying a sixel (the tcell logo). The demo must be run from the root directory in order for the path to the logo to resolve properly. I didn't add a dependency for go-sixel to the library since it's only needed for the demo: this will require users of the demo to perform a 'go get github.com/mattn/go-sixel' prior to running the demo.
Reference issue: #435
Supercedes PR #436

This force push was to prevent the demo from running on terminals which don't support sixel graphics

The windows new Terminal already seems to support sixels so we could use that, but on the plain Command window, we can also support this simply by drawing over the console window with win32 drawing functions like this. It should also work with bitmap blitting functions for better performance than SetPixel.
https://stackoverflow.com/questions/38322397/how-to-display-an-image-using-c-right-in-console-window

Only that comment needs to be fixed. Otherwise this is ready to go.

I just updated it, thanks!


feat(SQL): Cover special SQL authentication bypass cases

I added rule 942540 to cover a much more simple (and thus harder to detect) authentication bypass payload: email=admin%40juice-sh.op';.
Unlike the other SQL rules, this one triggers at PL1 due to unique ease of use in real-life situations. Though I believe I was able to solve this in a way that does not create false-positives. The test-cases demonstrate this. The rule and regular expressions are already documented in the relevant files.

Very elegant rule. However small patterns always make me afraid of false positives, but I could not find anything realistic. For instance, 's-Gravenhage"; would be a false positive, but that is really far-fetched.
I've added a t:replaceComments to prevent bypasses using comments.
I think this is good to go for paranoia level 1! 🤞

Thanks for the merge! Though I should add that, in any sensical format, it would more likely be represented as: "'s-Gravenhage";, which does not match :)


Pod CPU usage in %

How to get Pod CPU usage in %. Also please provide REST API for kubectl top pods

All of the metrics should be consumed from Prometheus, currently.
/close


chore(release): 0.5.0

Minor release due to rename

can you edit the cliff.toml file to have the links to s2-rust-sdk instead of s2-cli

updated!


fix(segmentation):  Various fixes for segmentation mode and other

Context

Changes & Results
Use the active viewport's tool group id when adding a segment.
Small fix for exception when saving a segment.
Some doc updates for google cloud healthcare.
Removed the circle tool from TMTV mode.

Testing
A. Attempt to save a segmentation. No exception should be thrown.
B. In MPR mode, add a segmentation, then add a segment. It should work.
C. In TMTV mode, no circle tool should be present.

Checklist
PR

[x] My Pull Request title is descriptive, accurate and follows the
semantic-release format and guidelines.

Code

[x] My code has been well-documented (function documentation, inline comments,
etc.)

Public Documentation Updates

[x] The documentation page has been updated as necessary for any public API
additions or removals.

Tested Environment

[x] OS: Windows 11
[x] Node version: 18.16.1
[x] Browser: Chrome 117.0.5938.150

Fixes: #3702


Roll Flutter Engine from 6e0804f8aff3 to f906c8e9d8de (1 revision)

https://github.com/flutter/engine/compare/6e0804f8aff3...f906c8e9d8de
2023-08-13<EMAIL_ADDRESS>Roll Skia from 52eef2a16dfe to 9bb236d03e63 (1 revision) (flutter/engine#44667)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC chinmaygarde@google.com,rmistry<EMAIL_ADDRESS>on the revert to ensure that a human
is aware of the problem.
To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose
To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Commit queue failed; closing this roll.


Can't copy data when using Azurite

Which version of the AzCopy was used?
10.3.3
Which platform are you using? (ex: Windows, Mac, Linux)
Linux
What command did you run?
azcopy copy http://azurite:10000/devstoreaccount1/sample/Cont_20190213/0000574133.jpg
azcopy copy http://localhost:10000/devstoreaccount1/sample/Cont_20190213/0000574133.jpg
What problem was encountered?
We use Azurite as our local storage. A sidecar container wants to download data by invoking azcopy. But it always show failed to parse user input due to error: the inferred source/destination combination is currently not supported. Please post an issue on Github if support for this scenario is desired.
How can we reproduce the problem in the simplest way?

Run azurite by docker
Prepare some fake data and generate data url through AzureStorageExplorer
Run a ubuntu:16.04 container which should on the same docker network with azurite container
Install azcopy
Execute command

Have you found a mitigation/solution?
No

This looks like an issue that we are fixing here: https://github.com/Azure/azure-storage-azcopy/pull/743
The fix should be released in version 10.4.  (And to answer the obvious question, sorry, we don't pre-announce release dates).

Hi there! This should be fixed in 10.4. Enjoy!

BTW You will need to use the from-to parameter when using Azurite. AzCopy will tell you that when you run it, if you forget.
Here are some examples of how to use it:
azcopy copy /data/foo http://azurite:10000/devstoreaccount1/sample/foo --from-to LocalBlob
azcopy copy http://azurite:10000/devstoreaccount1/sample/foo /data/foo --from-to BlobLocal


[altair] change encoding of participation to integer rather than bytes

it would appear the consensus view on representation of participation flags is int rather than bytes, so our rest api /debug/state result needs to update to output the data in the expected format.

participation flags is apparently list of uint8


Add Surface x Reeses Puffs by Dimrain47

Song Name
Surface x Reeses Puffs
Artist Name
Dimrain47
Source
Youtube
Youtube Link
1tBRUOfpV10
Direct File Link
No response
Song ID
63082
Start Offset [ms]
0
Extra
Created from Auto Nong.
Created for level: 27229834
Downloaded: Yes

Yes, please proceed.
On Mon, Oct 21, 2024, 5:37 AM github-actions[bot] @.***>
wrote:

This submission is stale because it has been open for 14 days with no
activity. If it is still relevant, please leave a comment and we will
reopen it.
—
Reply to this email directly, view it on GitHub
https://github.com/FlafyDev/auto-nong-indexes/issues/4769#issuecomment-2425438125,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/BL3YRY6TH7DFMUFKZE7KZNTZ4RSGBAVCNFSM6AAAAABPOLDKYWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMRVGQZTQMJSGU
.
You are receiving this because you authored the thread.Message ID:
@.***>

Pls accept


Unstated vs Unstated-Next

Unstated-Next use React Hooks directly while Unstated create a Container class act like React Component but they are not equal. So you can call function of Container using after "new" outside React and then do the dependency injection back. But this cannot be done in Unstated-Next.
https://github.com/zeit/next.js/blob/master/examples/with-unstated/pages/_app.js
With Unstated, you can see the api could be persist (resetStore, initStore, as well as custom actions if exists) among server-side and client-side. But this also cannot be done with Unstated-Next.
If Unstated-Next aims to be a replacement of Unstated, this should be an issue.
If Unstated-Next is a state management library using React-Hook and have a rule that the state must live in React, then Unstated-Next does not aims to replace Unstated, the README should be updated to clarify the differences and this issue could be closed.
I think both libraries should be exist. Just like Context API + Hooks Combo cannot completely replace Redux.

Seriously, what purpose does an <App/> component serve other than making your components implicitly dependent on a global environment?
Imagine a world where your index.js file looks like this:
import React from "react"
import { render } from "react-dom"
import { Routes } from "./components/Routes"

render(<Routes/>, document.getElementById("root"))

Nothing to setup, nothing to initialize, no global application wrapper. Then inside your <Routes/> component you just have:
import React from "react"
import { Router } from "@reach/router"

let Home = React.lazy(() => import("./Home"))
let About = React.lazy(() => import("./About"))

export function Routes() {
  return (
    <Router>
      <Home path="/"/>
      <About path="/about"/>
    </Router>
  )
}

Still no global wrapper, still no initialized state, just a mapping of routes to components.
But why would we want to do that?
Well, for one there's no implicit dependencies on some global app state, or the way that the app is initialized. Without even seeing the <Home/> or <About/> components, we know that they can be rendered anywhere... in any React app... anywhere in the component tree.
These components create, subscribe, and persist any state that they depend on. They make sure to fetch any resources they need, they setup their entire environment themselves, they found ways of caching and persisting data that doesn't depend on the application being setup in a particular way.
These components are super easy to test, all you have to do is render them with props and make assertions about them. Your unit tests are much more effective, in fact they feel like integration tests, because the unit you're working with is so self-contained. You can feel much more confident in your tests because external factors won't so easily break these components.
When you work on components like this, you can think about just that component. You don't have to worry about the application that is wrapped around it. You're not climbing back up the tree worrying about other components, or reducers, or whatever. You can focus.
Even further, what if every child component was also built like this? Self-contained systems all the way down. So no matter where you were in your codebase, you could think about just one component at a time. Every component in your app can be moved around to any other part of your app and you don't even have to think about it.
Oh and did I mention that this makes code splitting so easy that you can do it to any component in your entire app in seconds?
This is the better way to write React code. This is what scales really well. This is what is super maintainable long term. Everything that doesn't work like this should smell to you.
But how do we get there? How do we make it so that components are self-contained systems? Especially when we have state that needs to be shared across those components?
Well we can start by splitting up the idea of a global "store" for all of our app's state. We need to be able to grab just the state we need when we need it. So instead of having one "store" we have many "containers".
We should also take this as an opportunity to consider the kinds of state that we have in our app. Which are vaguely these sorts of things:

UI State (selected tab, modal open/closed, etc)
Navigation State (current route, route values, etc)
Serializable UI (Form) State (forms, drag and drop, etc)
Remote Data State (HTTP APIs, Websockets, etc)

Each of these have very different implications.

Some are persisted, some disappear as soon as the component is removed.
Some we want to share state globally, some want to be re-initiated for every component instance.
Some need to track user interactions, some are synced to the server.
Some depend on browser/device state, some

However, when you have the same kind of state, it tends to work in the same exact way as it does everywhere else. For example, once you've written one form, every other form is going to be pretty similar structure wise; Once you've subscribed to a websocket in one place, every other websocket is going to be pretty similar.
This means that each of these kinds of states are great candidates for generic libraries that deal with them specifically, and have carefully designed APIs to solve the problems for that kind of state generically.
For example:

Navigation State -> @reach/router / react-router
Form State -> (react-)final-form / react-jeff
Websockets -> example
etc

Problem after problem, we can tackle our state management in pieces such that we have libraries that are carefully designed to solve the problem really well. Making full use of React along the way is part of it.
Once we've solved enough of these problems in a generic way, you start noticing that there's very little state left over. Once you've got solutions for requesting data from the server, for handling your forms, components for all your UI state, etc-- you've covered almost everything.
It's at that point that building UIs becomes a matter of just linking things together and moving things around. React Components, Context, and now Hooks are the three things you need to move those things around.
Going back to my original example:
import React from "react"
import { render } from "react-dom"
import { Router } from "@reach/router"

let Home = React.lazy(() => import("./Home"))
let About = React.lazy(() => import("./About"))

function Routes() {
  return (
    <Router>
      <Home path="/"/>
      <About path="/about"/>
    </Router>
  )
}

render(<Routes/>, document.getElementById("root"))

Of course, sometimes there are things that need to be shared between your entire app. Sometimes you will put context providers above your <Routes/>. But you should be aware of each one, and you should know exactly why it needs to be there.
function Routes() {
  return (
    <Intl.Provider>
      <Theme.Provider>
        <Router>
          <Home path="/"/>
          <About path="/about"/>
        </Router>
      </Theme.Provider>
    </Intl.Provider>
  )
}

Even further, you should always keep these things within a component, and be careful how you do. Because you should be able to move them down the component tree later on if you decide.

PR # 2: Add Dashboard
Note: I also moved the <Theme.Provider/> into the <Dashboard/> component because it's the only place we're ever going to use it.
  function Routes() {
    return (
      <Intl.Provider>
-       <Theme.Provider>
          <Router>
            <Home path="/"/>
            <About path="/about"/>
+           <Dashboard path="/dashboard"/>
          </Router>
-       </Theme.Provider>
      </Intl.Provider>
    )
  }

I just want to close by saying that React is really great at this stuff if you actually try to leverage it.
I think Redux sent the community down a path that was more comfortable for people who were coming from an MVC world and were scared of the number of responsibilities we were giving "components" in React. I think Redux stunted the community in that way.
I would challenge the idea that Redux scales well, I've seen it used on codebases with millions of lines of code, and it was a regular source of confusion for developers at all levels.
React on its own, used without heavy handed abstractions, scales quite beautifully, and you should try making better use of it.

I'm going to close this issue, because I don't think there is a way of exposing state/logic back out of React without compromising what I've outlined above. I would encourage you not to write the library off on that basis and to explore how you can better use React.

Thanks for the reply. I like the way how React hooks did.
Let's say we would like to integrate with Next.js, the getInitialProps is not part of React.js, it is not possible to use the same container among server side and client side right now, what we could do instead is pre-caclulate the initial state and prevent use it on server side.
I know it is not the responsibility of this library, but this could be done before with unstated.
I understand what you say and actually this is only true if everthing is React. For example, having a store sharing between legacy jquery component and React Component.
Sometimes we may still want store living outside any React component like what redux do, but I am not saying we should put all the things like that.
Just want you to clarify the difference between unstated and unstated-next (especially what can/cant do before and what can/cant do now).
the next.js with-unstated example is still using the way that server will create a container itself, thats could introduce a misconception container could be used outside React Component. However, with unstated-next, we cannot.


Error on installing the package

I was trying to install vue3-notion to the existing vue3 project but the following error message appeared when I was trying to add it using yarn:
Describe the bug
yarn add vue3-notion
yarn add v1.22.19
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
error An unexpected error occurred: "expected hoisted manifest for \"vue3-notion#vue#@vue/server-renderer#@vue/compiler-ssr\"".

Desktop (please complete the following information):

MacOs

I search on web but no solution found, anyone faced this issue as well?
Thank you guys in advance.

Seems like an issue with yarn. perhaps try this solution here?

Seems like an issue with yarn. perhaps try this solution here?

Ok thank you!


Add Black code style formatter

Closes #13

Adds Black code formatter – https://black.readthedocs.io/en/stable/
Applied the formatting to the project
Updated flake8 config to be compatible with Black – https://black.readthedocs.io/en/stable/compatible_configs.html#flake8
Adds Black check to the CI pipeline – Note that this does not automatically format any code. Code should be formatted on the user side either manually or by running black src/ to apply the suggestions automatically

Adds Black check to the CI pipeline – Note that this does not automatically format any code. Code should be formatted on the user side either manually or by running black src/ to apply the suggestions automatically

Maybe we can try to add commit hooks, but I don't know if there's something for Python like for Javascript https://github.com/typicode/husky

Looks good!

Adds Black check to the CI pipeline – Note that this does not automatically format any code. Code should be formatted on the user side either manually or by running black src/ to apply the suggestions automatically

Maybe we can try to add commit hooks, but I don't know if there's something for Python like for Javascript https://github.com/typicode/husky , maybe https://pre-commit.com/

I'll add an optional pre-commit hook. Created an issue here #19


Swift 4.2 support

Coverage decreased (-96.1%) to 0.0% when pulling 01fb87575e15e181ce977ae62644ba03fae0ab68 on swift-4-2 into 35fe549d50b09736f614c4e0d3fb17950ec5d31b on master.


Fix: unsubscribe should use Pubsub.unsubscribe()

Thank you for reviewing.

:green_heart: :blue_heart: :purple_heart: :yellow_heart: :heart: