sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: godot
Issue: "The selected resource does not match any type expected for this property" error with custom resource types
Labels: topic:editor

**Godot version:**
3.2.3


**OS/device including version:**
* macOS 10.15.7 
* Windows 10


**Issue description:**
When referencing custom resource types in other custom resource types and loading a resource file that was previously created based on that resource type the following error is displayed:

> The selected resource (Resource) does not match any type expected for this property (ChildResource).

The resource can be used, though.

**Steps to reproduce:**

* Create two custom types that extend the "Resource" type. In the second one ("parent") add a parameter that references the other ("child") (can be done using _get_property_list)
* Create a child resource by right clicking in the file system browser and selecting "Create Resource" and select the child resource's type
* Save that resource
* Create parent resource
* In the inspector for the referencing variable, select the previously created child resource

**Minimal reproduction project:**
[CustomResourceTest.zip](https://github.com/godotengine/godot/files/5787163/CustomResourceTest.zip)

In this project: Open the file "parent_test.tres" in the inspector and select the file "child_test.tres" for the parameter "child" to see the error.
Repository: rust
Issue: Confusing error messages regarding lifetime
Labels: A-diagnostics,A-lifetimes,T-compiler,C-bug,D-confusing,D-terse


I tried this code:

```rust
fn foo<'a>(v: &'a mut Vec<&'a str>, s: &'a str) {
    v.push(s);
}

fn main () {
    let mut v = Vec::new();
    let s = "abc";
    foo(&mut v, s);
    println!("{:?}", v);
}

```

I expected to see this happen: compiles or displays understandable error messages

Instead, this happened: 

```
error[E0502]: cannot borrow `v` as immutable because it is also borrowed as mutable
 --> src/main.rs:9:22
  |
8 |     foo(&mut v, s);
  |         ------ mutable borrow occurs here
9 |     println!("{:?}", v);
  |                      ^
  |                      |
  |                      immutable borrow occurs here
  |                      mutable borrow later used here

```
Repository: pytorch
Issue: torch.cross is divergent from np.cross
Labels: triaged,module: numpy,module: deprecation

PyTorch's [torch.cross](https://pytorch.org/docs/master/generated/torch.cross.html?highlight=cross#torch.cross) has the  signature:

```
torch.cross(input, other, dim=None, *, out=None) → Tensor
```

And its documentation notes that "If dim is not given, it defaults to the first dimension found with the size 3. Note that this might be unexpected."

Numpy's [np.cross](https://numpy.org/doc/stable/reference/generated/numpy.cross.html) has the signature:

```
numpy.cross(a, b, axisa=-1, axisb=-1, axisc=-1, axis=None)
```

It does not "search" for a dimension of size 3, and will allow dimensions of size 2 or 3 to be used in its computation.

np.cross is a top 200 NumPy function according to a static analysis of NumPy function usage (see [here](https://github.com/Quansight-Labs/python-api-inspect/blob/master/data/csv/numpy-summary.csv)). Within Facebook there are hundreds of uses of either PyTorch's or NumPy's cross function, too.

cc @ezyang @gchanan @zou3519 @bdhirsh @jbschlosser @mruberry @rgommers @heitorschueroff
Repository: pytorch
Issue: torch.equal is divergent from np.equal
Labels: triaged,module: numpy,module: deprecation,module: testing

PyTorch's [torch.equal](https://pytorch.org/docs/master/generated/torch.equal.html?highlight=equal#torch.equal) tests if two tensors have the same size and elements, while NumPy's [np.equal](https://numpy.org/doc/stable/reference/generated/numpy.equal.html?highlight=equal#numpy.equal) tests for elementwise equality.

NumPy's np.equal is a top 300 NumPy function. PyTorch's torch.equal is used hundreds of times within Facebook, often in test suites. Deprecating torch.equal will likely require improving torch.testing.


cc @mruberry @rgommers @heitorschueroff
Repository: pytorch
Issue: torch.transpose is divergent from np.transpose
Labels: triaged,module: numpy,module: deprecation

PyTorch's [torch.transpose](https://pytorch.org/docs/master/generated/torch.transpose.html?highlight=transpose#torch.transpose) swaps two dimensions in a tensor, while NumPy's [np.transpose](https://numpy.org/doc/stable/reference/generated/numpy.transpose.html?highlight=transpose) permutes the dimensions of its input, like PyTorch's [torch.Tensor.permute](https://pytorch.org/docs/master/tensors.html?highlight=permute#torch.Tensor.permute) does.

The NumPy community [seems uninterested in offering a "permute" alias for np.transpose](https://github.com/numpy/numpy/issues/17085).

Numpy's np.transpose is [a top 100 NumPy function](https://github.com/Quansight-Labs/python-api-inspect/blob/master/data/csv/numpy-summary.csv#L1434), and torch.transpose is also popular with thousands of uses within Facebook. 

cc @mruberry @rgommers @heitorschueroff
Repository: excalidraw
Issue: Importing scene replaces current scene
Labels: discussion,UX/UI

I dragged a file form another save to my window and that replaced all my previous drawings.
Is there a UI I am missing or is that the intended behavior?
Repository: pytorch
Issue: torch.meshgrid is divergent from np.meshgrid
Labels: triaged,module: numpy,module: deprecation

PyTorch's [torch.meshgrid](https://pytorch.org/docs/master/generated/torch.meshgrid.html?highlight=meshgrid#torch.meshgrid) is divergent from NumPy's [np.meshgrid](https://numpy.org/doc/stable/reference/generated/numpy.meshgrid.html?highlight=meshgrid#numpy.meshgrid). The documentation for these functions is very hard to parse, so I am not sure if this is a bug or not.

Snippet demonstrating the divergence:

```
nx, ny = (3, 2)
x = np.linspace(0, 1, nx)
y = np.linspace(0, 1, ny)
xv, yv = np.meshgrid(x, y)
xv
: array(
  [[0. , 0.5, 1. ], 
   [0. , 0.5, 1. ]])

xv, yv = torch.meshgrid(torch.from_numpy(x), torch.from_numpy(y))
xv
: tensor(
  [[0.0000, 0.0000],
   [0.5000, 0.5000],
   [1.0000, 1.0000]], dtype=torch.float64)
```

NumPy's np.meshgrid is [a top 100 NumPy function](https://github.com/Quansight-Labs/python-api-inspect/blob/master/data/csv/numpy-summary.csv). PyTorch's meshgrid is used hundreds of times within Facebook.


cc @mruberry @rgommers @heitorschueroff
Repository: PowerToys
Issue: [Run][Plugin] Rename projects/binaries to follow the required schema
Labels: Help Wanted,Area-Setup/Install,Area-Quality,Priority-2,Area-Build,Run-Plugin,Tracker

**WARNING: this needs to be coordinated with the localization team to avoid problems see  https://github.com/microsoft/PowerToys/pull/9196 and 
https://github.com/microsoft/PowerToys/pull/9210**


PT Run plugins should follow the same naming convention as the `Service` and `System` plugins.
See https://github.com/microsoft/PowerToys/pull/8974 for reference.

This task affects:
 - Visual Studio projects' names
 - Binaries' names
 - folders' hierarchy
 - projects' namespaces

Given this work impacts several projects, we should open individual PRs for each plugin:
 - [x] Calculator
 - [ ] Folder
 - [ ] Indexer
 - [ ] Shell
 - [ ] Uri
 - [ ] WindowWalker
Repository: opencv
Issue: Mertens merge (Photo module)
Labels: category: documentation,category: photo,RFC,pr: Discussion Required

For the merge Mertens the documentation indicates:

"The resulting image doesn't require tonemapping and can be converted to 8-bit image by multiplying by 255, but it's recommended to apply gamma correction and/or linear tonemapping."

This is not true because the algorithm does not guarantee that the resulting values are in the interval 0-1.
There can be negative values or values greater than 1
So just multiplying by 255 and clip (as most tutorials do !) does not give a good result.
It is essential to normalize the result :
image = cv.normalize(image, None, 0., 1., cv.NORM_MINMAX)
or
linearTonemap = cv.createTonemap(1.2) #Normalize with Gamma 1.2
image = linearTonemap.process(image)
The difference on the result image is noticeable

It should either be normalized in MertensMerge or specified in the doc.
I don't know which is the best solution. ?

I think this applies to all versions and systems.

Dominique Galland
Repository: storybook
Issue: Add an ability to disable action callback individually
Labels: feature request,addon: actions

**Is your feature request related to a problem? Please describe**

The global actions `argTypesRegex` simplifies greatly the addon usage. But for some components, we need more flexibility to disable/override action for a particular property.

We have a component that changes behavior based on property existence. This property is injected by default by the actions addon regex. We don't want it for this one property but still, we want the other properties to be handled by the addon actions.

We are on version 6.1.11.

**Describe the solution you'd like**

Global config:
```
actions: { argTypesRegex: '^on[A-Z].*' },
```

Configure it in the meta:
```tsx
const meta: Meta = {
    component: MyComponent,
    title: 'Components/MyComponent',
    argTypes: {
        onPropertyIWantToSkip: {
            // on of below
            action: false,
            action: {
                disable: true
            }
        }
    },
    decorators: [fieldDecorator],
};
```

Then in a story, I can enable it back when I want to present this case:
```
SpecialStory.argTypes = {
    onPropertyIWantToSkip: { action: 'onPropertyIWantToSkip' },
};
```

**Describe alternatives you've considered**

1. Setting the default to `undefined` for this property and using `action` from addon actions and passing new value to `args` but it is deprecated
2. 
```tsx
const meta: Meta = {
    // actions: { argTypesRegex: '(?!^onPropertyIWantToSkip)^on[A-Z].*' },
    parameters: {
        actions: {
            argTypesRegex: '(?!^onAddNew)(?!^onLoadValues)^on[A-Z].*',
        },
    },
};
```
~~Unfortunately, it doesn't work... To be honest, I don't understand why.~~ Ok I figure it out 😅  I added it in the wrong place. Anyways, writing a new regex each time is not a convenient way to do this.

**Are you able to assist to bring the feature to reality?**
yes, I can...
Repository: pytorch
Issue: Add MultiScheduler
Labels: module: optimizer,triaged,enhancement

## 🚀 Feature
I would like to have a MultiScheduler that allows me to use multiple schedulers after each other, with the same optimizer.

## Motivation
It is not uncommon to have a learning rate schedule that looks like the following example:
- First have a burn in learning rate for 1000-2000 batches (eg. quadratic or exponential curve)
- Step down learning rate at steps 10.000 and 25.000.

You could implement all of this in a LambdaLR, but it would be a lot easier to combine a ``ExponentialLR`` and ``MultiStepLR``, running one after the other.

## Pitch
Implement a new LR-Scheduler, which I would call ``MultiScheduler`` (If anyone has a better name, I'm open to suggestions).
It receives a List of **N** schedulers, as well as a list **N-1** epoch numbers.
The scheduler can then automatically switch between different schedulers, depending on the `self.last_epoch` number.

I actually implemented such a scheduler in my own library and used it for quite a while now (ever since v0.4 IIRC), but I feel it deserves its place in the main PyTorch code base and am thus willing to make a PR that adds it!
However, unlike the current implementation, which takes a list of ``(epoch, scheduler)`` tuples, I think it would be cleaner take 2 separate lists.

## Alternatives
I do not think there are any viable alternatives to this problem, except for coding everything in a `LambdaLR` scheduler, which is far from ideal.

## Additional context
I don't know if there is any code in the PyTorch codebase that requires schedulers to have a ``self.optimizer`` variable, but as this scheduler combines multiple schedulers does not have such a variable.
However, I do use the base `_LRScheduler` class as a base and thus implement methods such as ``self.get_last_lr()``.
If that variable is still important, I guess we could create a property that looks up the ``self.optimizer`` based on the current ``self.last_epoch`` variable, which is exactly how ``self.get_last_lr()`` works


Let me know if you guys think it is a worthy addition to PyTorch, and I'll get started on my PR ! :construction_worker: 
Kind Regards,
0phoff


cc @vincentqb
Repository: youtube-dl
Issue: Using cookies slows down youtube's ban ip
Labels: question

<!--

######################################################################
  WARNING!
  IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE
######################################################################

-->


## Checklist

<!--
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl:
- Look through the README (http://yt-dl.org/readme) and FAQ (http://yt-dl.org/faq) for similar questions
- Search the bugtracker for similar questions: http://yt-dl.org/search-issues
- Finally, put x into all relevant boxes (like this [x])
-->

- [X] I'm asking a question
- [X] I've looked through the README and FAQ for similar questions
- [X] I've searched the bugtracker for similar questions including closed ones


## Question

<!--
Ask your question in an arbitrary form. Please make sure it's worded well enough to be understood, see https://github.com/ytdl-org/youtube-dl#is-the-description-of-the-issue-itself-sufficient.
-->

Hi, using cookies slows down youtube's ban ip ?

Thanks.
Repository: tensorflow
Issue: tensorflow/c/eager/c_api_test fails to find GPU implementation of MatMulOp
Labels: stat:awaiting tensorflower,type:bug,comp:eager,TF 2.4

**System information**
- Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): CentOS7
- TensorFlow installed from (source or binary): source
- TensorFlow version (use command below): 2.4.0
- Python version: 3.7.4
- Bazel version (if compiling from source): 3.7.1
- GCC/Compiler version (if compiling from source): 8.3.0
- CUDA/cuDNN version: 10.1/7.6.4.38
- GPU model and memory: GTX1080TI

**Describe the current behavior**

The 4 tests `CAPI.TensorHandleSilentCopy*` from `tensorflow/c/eager/c_api_test` fail each with 

```
tensorflow/c/eager/c_api_test.cc:442: Failure
Expected equality of these values:
  TF_GetCode(status.get())
    Which is: 3
  TF_OK
    Which is: 0
Could not satisfy device specification '/job:localhost/replica:0/task:0/device:GPU:0'. enable_soft_placement=0. Supported device types [CPU]. All available devices [/job:localhost/replica:0/task:0/device:GPU:
0, /job:localhost/replica:0/task:0/device:CPU:0].
```

Reason seems to be that `MatMulOp` is not found for GPU which is odd as seemingly everything else works.

**Standalone code to reproduce the issue**

`/tmp/ebbuild/TensorFlow/2.4.0/fosscuda-2019b-Python-3.7.4/tmp004t3B-bazel-tf/7277201245461b79db55d0e3e6d95f77/execroot/org_tensorflow/bazel-out/k8-opt/bin/tensorflow/c/eager/c_api_test_gpu --gtest_filter=*TensorHandleSilentCopy*`

**Other info / logs** 

For some reason this test works on our POWER9 nodes which have otherwise the exact same environment (same software versions etc), but use V100s
Repository: flutter
Issue: Firebase test lab recipe should make it clearer which file(s) failed when it scans the logcat
Labels: a: tests,team,team-infra,P3,triaged-infra

https://flutter.googlesource.com/recipes/+/refs/heads/master/recipes/firebaselab/firebaselab.py#67 is only getting one logcat file, whereas we're running tests on multiple devices.

We should validate all logcat files.

The validation logic is really just making sure Flutter did not issue some non-fatal warning. Even without this scan, the test will still fail if the Flutter test crashes the process.

/cc @godofredoc
Repository: go
Issue: go/printer: inconsistently requires ParenExpr
Labels: NeedsFix

go/printer is inconsistent in handling the absence of ParenExpr. First, let me show an example that automatically inserts required parentheses, despite no ParenExpr existing in the AST:

	// (- a (- b c))
	&ast.BinaryExpr{
		X:  &ast.Ident{Name: "a"},
		Op: token.SUB,
		Y: &ast.BinaryExpr{
			X:  &ast.Ident{Name: "b"},
			Op: token.SUB,
			Y:  &ast.Ident{Name: "c"},
		},
	}

prints as

	a - (b - c)

despite the lack of a ParenExpr. I posit that this is correct behavior.

Now, consider this example:

	&ast.IfStmt{
		Cond: &ast.BinaryExpr{
			X:  &ast.Ident{Name: "a"},
			Op: token.EQL,
			Y: &ast.CompositeLit{
				Type: &ast.Ident{Name: "b"},
			},
		},
		Body: &ast.BlockStmt{},
	}

prints as

	if a == b{} {
	}

that is, it doesn't insert the necessary parentheses to make the printed form syntactically valid.

I am of the opinion that the second example should produce correct output, inserting parentheses as necessary. go/printer already has code that strips an existing ParenExpr if it is not required (i.e. it turns `if (b)` into `if b`), but leaves it intact otherwise. It should similarly be possible to _insert_ missing parentheses, based on the same logic.

Users of gofmt can also run into this issue: the rewrite rule `(a) -> a`, which is documented as stripping unnecessary parentheses, incorrectly strips parentheses of the `if (x == T{})` form.

IMHO, an AST should not require explicit parentheses to be valid, and go/printer should take care of turning a valid AST into valid code. I'd like to go over go/printer and fix all instances of this problem, thus making ParenExpr optional.

/cc @griesemer for his expert opinion
Repository: rust
Issue: Linker errors when cross-compiling from Xcode on Big Sur
Labels: O-macos,A-cross,C-bug

Hi all, invoking `cargo build` from Xcode on Big Sur currently fails when a crate needs to link against a system library from a build script, unless `SDKROOT` has been [explicitly set to the path of the macOS SDK](https://github.com/irh/rust-big-sur-test/blob/e4fdc1fa73c32ad9b54cce077367fe4f45e3f207/xcode/rust-build-script.sh#L2). Test project [here](https://github.com/irh/rust-big-sur-test/tree/5b23ad719c477c31c6121ef7d6f3e8093569b513).

When invoking `cargo build` from an Xcode build script, `SDKROOT` is set for the platform that's being built. #64254 made it so that `SDKROOT` gets un-set if the target platform doesn't match the host platform. This seems reasonable to me, but then I don't understand why there's now a difference in behaviour between Xcode and non-Xcode builds. 

I logged a similiar [issue](https://github.com/TimNN/cargo-lipo/issues/41) for `cargo-lipo`, which has a different workaround of instead setting `LIBRARY_PATH`.
Repository: vscode
Issue: Unexpected editor.selection in onDidChangeActiveTextEditor callback
Labels: feature-request,api,editor-core

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->
<!-- Also please test using the latest insiders build to make sure your issue has not already been fixed: https://code.visualstudio.com/insiders/ -->

<!-- Use Help > Report Issue to prefill these. -->
- VSCode Version: 1.52.1
- OS Version: Linux 5.4.86 NixOS x86_64 GNU/Linux

In the `window.onDidChangeActiveTextEditor` callback, when switching between files in the same editor window (Ctrl-p):
The `editor.selection` is always at line 0, character 0 even if the had been previously opened. It then directly changes to its previous position (e.g. line 18, or whatever the user had previously selected).
I would expect that "restored" position to be always, directly, and reliably be available in the event callback.

Steps to Reproduce:

1. Create a new extension
   (I used the [decorator sample](https://github.com/microsoft/vscode-extension-samples/tree/master/decorator-sample) to reproduce this, because it has `"activationEvents": ["*"]`)
2. Add this code to the `activate` function:

```typescript
    vscode.window.onDidChangeActiveTextEditor(editor => {
        console.log('change active editor: ', editor?.selection.start.line)
        setTimeout(() => {
            console.log('after timeout:', editor?.selection.start.line)
        }, 1)
    }, null, context.subscriptions);

    vscode.window.onDidChangeTextEditorSelection(event => {
        console.log('change selection:', event.textEditor.selection.start.line)
    }, null, context.subscriptions);
```
3. Debug the extension
4. Open two files and select any line (18 in my case)
5. Observe the log while doing the following actions:

a) When switching between two files in the same editor (e.g. Ctrl-p Ctrl-p): 
```
change active editor:  0
change selection: 18
after timeout: 18
```

b) When switching between two visible split editors:
```
change active editor:  18
after timeout: 18
```

c) When opening a third previously unopened file:
```
change active editor:  0
after timeout: 0
```

## Expected behavior

The correct `editor.selection` is set prior to the `onDidChangeActiveTexteEditor` event handling. 
I expect case a) to also output
```
change active editor:  18
after timeout: 18
```
The selection after the timeout should always be identical to the one initially reported.

## Workaround

This currently seems to work for my use case: Always use `setTimeout(..., 1)` in the `onDidChangeActiveTexteEditor` callback to ensure, that the selection is corrected before accessing it.

<!-- Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes
Repository: vscode
Issue: Git - Improve missing Git user/name behavior
Labels: help wanted,feature-request,git

@CoreTechnologyAG @GuilhermeAbacherli 
I know how to resolve it, the reason why I opened this issue is because i think it can be done better.
@eamodio could you take a Look at our suggestions?
They are as following:
Suggestion 1:  Make an option in the settings to enable/disable auto-detect
Suggestion 2: Make it a Warning instead of an error (Like git does as well)
Suggestion 3: Give us the option to set user.name and user.email directly from VS Code (By @mrwensveen and @abby-d )

_Originally posted by @michvllni in https://github.com/microsoft/vscode/issues/112294#issuecomment-747276997_