sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: electron
Issue: [Bug]: Docs and TS typings for setPermissionRequestHandler are out of date
Labels: documentation :notebook:,bug :beetle:,platform/all,status/confirmed,13-x-y

### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/master/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a feature request that matches the one I want to file, without success.

### Electron Version

13.1.1

### What operating system are you using?

macOS

### Operating System Version

Not relevant

### What arch are you using?

x64

### Last Known Working Electron version

_No response_

### Expected Behavior

Correct typings and complete docs for the `setPermissionRequestHandler` API and the permissions it handles.

### Actual Behavior

The list of permissions for in the [API's documentation](https://github.com/electron/electron/blob/81795744cf82a57b129f8a1fe113a9b64f61ffb2/docs/api/session.md#sessetpermissionrequesthandlerhandler) don't include all the possible permission types.

Likewise, the Typescript typings for the API are missing some.

The full list of permission types seems to be here:
https://github.com/electron/electron/blob/44491b023ac2653538b7ac36bb73f3085a938666/shell/common/gin_converters/content_converter.cc#L142

### Testcase Gist URL

_No response_

### Additional Information

_No response_
Repository: pytorch
Issue: Jitted function cannot be pickled
Labels: oncall: jit,good first issue,OSS contribution wanted

## 🚀 Feature
Support to pickle a jitted function (or at least throw a `TypeError` when using protocol 0 and 1).

## Motivation

Trying to pickle a jitted function either raises `TypeError: cannot pickle 'torch._C.ScriptFunction' object` when `protocol>1` or far worse when using `protocol=0` or `protocol=1` python 3.9.5 dies with:
```
terminate called after throwing an instance of 'std::runtime_error'
  what():  instance allocation failed: new instance has no pybind11-registered base types
Aborted (core dumped)
```

Example:
```py
import pickle

import torch

@torch.jit.script
def fun(x: torch.Tensor) -> torch.Tensor:
    return x

pickle.dumps(fun, protocol=0)

```
## Pitch
Implement pickle support for all pickle protocols (or raise a `TypeError` when used with `protocl<2`).

## Additional context
I encountered this when using a jitted function with dask https://github.com/dask/dask/issues/7861
Repository: pytorch
Issue: [feature request] Do zero-padding in high-frequency modes in `ifft`
Labels: triaged,enhancement,module: fft

## 🚀 Feature
Do the zero-padding in [`torch.fft.ifft`](https://pytorch.org/docs/stable/generated/torch.fft.ifft.html) and `s` in [`torch.fft.ifft2`](https://pytorch.org/docs/stable/generated/torch.fft.ifft2.html#torch.fft.ifft2) and [`torch.fft.ifftn`]( https://pytorch.org/docs/stable/generated/torch.fft.ifftn.html) in the center of the frequency vector which is equivalent to zero padding this sequence left and right after applying `torch.fft.fftshift`. This will add high frequency modes with zero amplitude without disturbing the low frequency modes.

## Motivation
The `n` parameter in [`torch.fft.ifft`](https://pytorch.org/docs/stable/generated/torch.fft.ifft.html) and `s` in [`torch.fft.ifft2`](https://pytorch.org/docs/stable/generated/torch.fft.ifft2.html#torch.fft.ifft2) and [`torch.fft.ifftn`]( https://pytorch.org/docs/stable/generated/torch.fft.ifftn.html) are counter intuitive: After transforming a sequence via `torch.fft.fft` the result in Fourier space is a sequence of complex numbers `[a, b1, c1, d1, ..., d2, c2, b1]` where the pairs `b{1,2}`, `c{1,2}`, ... correspond to the (co)sine amplitudes of the discrete Fourier series, ordered by the respective frequencies. Padding zeros to the end of this sequence screws the mapping `b1 <-> b2`, `c1 <-> c2` etc.

## Alternatives
Create a new function which does the zero-padding for a tensor which can then be fed into `torch.fft.ifft` (`torch.fft.ifft{2,n}`) w/o using the `n` (`s`) argument. Since I cannot think of a scenario where one actually wants to append the frequency vector with zeros you might want to consider to add a warning to the documentation regarding the usage of `n` and `s`.
Repository: PowerToys
Issue: Optional Sleep/Shutdown at Awake period end
Labels: Idea-Enhancement,Product-Awake

### Description of the new feature / enhancement

I would like to be able to define optional sleep/shutdown behaviour at the end of the awake period. A combo box (or sub-menu from system tray) would allow the selection of actions similar to the "Shut down or sign out" menu options in Windows, with a default setting of "Allow Windows to decide" (or something like that). I.e., the options would be (at least):

- Default Windows behaviour (Default)
- Sign out
- Sleep
- Shut Down
- Restart

Ideally, more specific actions useful to power users, like those available with Sysinternals [`PsShutdown`](https://docs.microsoft.com/en-us/sysinternals/downloads/psshutdown), would be available, but at least those options would be great.

#12081 could also be solved with this by distinguishing between Sleep and Hybrid sleep options.

### Scenario when this would be used?

When I set a long process running which has a well-defined timespan and exit state, I can be specific about what state I would like the computer to be in at the end of it. I can also ensure that important or time-sensitive processes are completed before a large windows update is applied (by selecting 'Restart' as the end behaviour).

I could achieve something similar by running, for example, `shutdown /s /t 7200` or `PsShutdown -s -t 7200` for a two hour wait time, but I have to remember to set this to the correct length in seconds to match the Awake period, and also switch contexts to do so.

### Supporting information

- [Windows `shutdown` documentation](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/shutdown)
- [Sysinternals `PsShutdown` documentation](https://docs.microsoft.com/en-us/sysinternals/downloads/psshutdown)
Repository: pytorch
Issue: [feature request] Low pass filtering of FFT results
Labels: triaged,enhancement,module: fft

## 🚀 Feature
Low pass filtering of FFT results.

## Motivation
DFTs come in handy for filtering noise by truncating high frequency modes. More precisely, elements in the center of the result of a DFT can be set to zero which corresponds to setting the amplitudes of the high frequency (co)sines of the Fourier series to zero. Currently, this is a bit messy to do in particular for the N dimensional Discrete Fourier Transform.

## Pitch
A new function that takes the (complex) output of an FFT and removes the high frequency modes. The modes could either be set to zero or removed from the tensor (the latter thus shrinks the respective dimensions of the input tensor).

## Alternatives
Rather than crafting a new function this feature could be added to the various `torch.fft.fftX` functions. Changing the meaning of the parameters `n` and `s` of the inverse transform could help to do a proper filtering in Fourier space by transform + low pass filtering + inverse transform if the high frequency modes are truncated rather than set to zero, cf.: https://github.com/pytorch/pytorch/issues/61211
Repository: deno
Issue: Add `./tools/wpt.ts roll` utility
Labels: build,tests

This utility would do the following:

- Checkout the latest upstream `epochs/daily` branch in the WPT submodule
- Update the manifest
- Gather the list of all the test files that were added since our last `epochs/daily` checkout that are not yet in our expectations (for the subfolders we already run tests for). This should be printed to the terminal so the user can determine what files to add to the expectations.
- Run `./tools/wpt.ts update` filtered to all the files that would be run by `./tools/wpt.ts run` already (all files tracked in expectations.json)
Repository: electron
Issue: [Docs]: Expand documentation for app.setAsDefaultProtocolClient()
Labels: documentation :notebook:,stale-exempt

### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/master/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a feature request that matches the one I want to file, without success.

### Problem Description

Hello

I have a small problem. I can't find on the documentation how to make me get the
setAsDefaultProtocolClient()

Example: I do electron://**settings**

I want it to open the LoadURL('https://mysite.ext/**SETTINGS**);

### Proposed Solution

Add feature into the documentation.

### Alternatives Considered

N/A

### Additional Information

N/A
Repository: deno
Issue: Implement `PerformanceObserver`
Labels: feat,web

Spec: https://w3c.github.io/performance-timeline/#the-performanceobserver-interface

Initially only the `mark` and `measure` entry types would be supported.
Repository: godot
Issue: C# tasks changing sprite texture results in nonexistent signal 'changed'
Labels: bug,topic:dotnet

### Godot version

3.3.2-stable

### System information

Windows 10, GLES 3, NVIDIA GeForce GTX 1660 Ti

### Issue description

I threaded the node creation and destruction process using C# tasks and call_deferred / queue_free so it should be thread safe.

Then I regularly run a task on those same nodes, so I can update them. The updating process needs to change a texture so I create a GDScript with preloaded texture and a function to set the correct texture:
```
extends Sprite


var images = [
	preload("res://Images/StructuresScetch/Trees/Oak/Oak1.png"),
	preload("res://Images/StructuresScetch/Trees/Oak/Oak2.png"),
	preload("res://Images/StructuresScetch/Trees/Oak/Oak3.png"),
	preload("res://Images/StructuresScetch/Trees/Oak/Oak4.png"),
	preload("res://Images/StructuresScetch/Trees/Oak/Oak5.png")
	]

func setImage(var k):
	if(k<images.size()):
		texture = images[k]
	pass
```

Everything seems good, sometimes it runs 5 minutes, 15 minutes or even an hour until at some point the game crashes with what seems to be an infinite loop of errors.
![image](https://user-images.githubusercontent.com/31007551/124355297-a45bd000-dc10-11eb-89e3-5ccc728f4595.png)



### Steps to reproduce

Create a bunch of nodes using a thread and use CallDeferred to add_child those nodes to a 'parent node'.

Then change the textures in another Thread using GetChildren on the 'parent node'.

If the second task is started before the end of the first one you should get an error message: 
ERROR: Disconnecting nonexistent signal 'changed', slot: xxxx:_texture_changed.
   At: core/object.cpp:1576

But the project will still run correctly until last step which is to try to delete the concerned node: either with a QueueFree on a Thread / or just by stopping the game. Then you will see an infinite of times the exact same error with exact same xxxx value.

The Minimal reproduction project is really well explained and straight forward I believe.

A workaround is to add a mutex to the creation process so you don't try to change the texture until everything is up and ready. But in my "real case" it is not possible to do this unfortunately.


Note that I have tried to use some CallDeferred and SetDeferred to change the structure in a ThreadSafe way but it had no effect.

### Minimal reproduction project

As I said, pretty straight forward, explained in a label on main scene.
You can raise NUMBER_OF_NODES on Generator.cs if you don't have the error.

[SignalChanged_Error.zip](https://github.com/godotengine/godot/files/6759116/SignalChanged_Error.zip)

I am here to help and experiment more !
Repository: deno
Issue: Support WebSocket over H2
Labels: feat,web

Requires upstream support from tungstenite: https://github.com/snapview/tungstenite-rs/issues/206

Spec: https://datatracker.ietf.org/doc/html/rfc8441
Repository: pytorch
Issue: Unable to add a scalar to an MKLDNN tensor
Labels: oncall: jit,module: mkldnn,module: intel

## 🐛 Bug

I expected to be able to add a scalar to a tensor (mkldnn in this case) but it fails.


## To Reproduce

```Python
x=torch.randn(1,3,128,128).to_mkldnn()
y=x+1
RuntimeError: itensor_from_mkldnn expects MKL-DNN tensor input
```

## Expected behavior

It should add the scalar.

## Environment

 - PyTorch Version (e.g., 1.0): 1.10-dev
 - OS (e.g., Linux): Windows
 - How you installed PyTorch (`conda`, `pip`, source): pip
 - Build command you used (if compiling from source): N/A
 - Python version: 3.8
 - CUDA/cuDNN version: N/A
 - GPU models and configuration: N/A
 - Any other relevant information: Nightly

## Additional context


cc @gujinghui @PenghuiCheng @XiaobingSuper @jianyuh @VitalyFedyunin @gmagogsfm
Repository: flutter
Issue: Cupertino alerts dialogs background color is not correct
Labels: framework,f: cupertino,has reproducible steps,found in release: 2.2,team-design,triaged-design

Hello, when using the Cupertino alerts dialogs on web application its become this way

![image](https://i.ibb.co/Wp6qqjr/211438909-518467235867631-382585805963580310-n.png)

while it's should look like this 


![image](https://flutter.dev/images/widget-catalog/cupertino-alert-dialog.png)


Thank you
Repository: godot
Issue: Vulkan: Disallow choosing the Occlusion Culling Buffer debug draw mode when occlusion culling is disabled in the Project Settings
Labels: enhancement,topic:editor,topic:3d

### Godot version

v4.0.dev.custom_build [cb4e42155]

### System information

manjaro Gnome 21, AMD R7 200 series, Intel i3 3.0 GHZ,8GB RAM

### Issue description

When click at:
![image](https://user-images.githubusercontent.com/58845030/124386057-c60b9480-dcae-11eb-8f68-f2559743d550.png)

it doesnt show black&white scene which the user can see the occlusion culling buffer!

### Steps to reproduce

N/a

### Minimal reproduction project

N/a
Repository: pytorch
Issue: The syncbatchnorm can not  be employed in the MODEL that the gradients including in the loss function
Labels: oncall: distributed,module: autograd,triaged,module: derivatives,module: norms and normalization

I need to train a model which the gradients of the output with respective to the input including in the cost function.  When the model was trained using DDP in pytorch. It will report the error 
```
    loss.backward()
  File "/share/home/bjiangch/group-zyl/.conda/envs/Pytorch-181/lib/python3.8/site-packages/torch/tensor.py", line 245, in backward
    loss.backward()
  File "/share/home/bjiangch/group-zyl/.conda/envs/Pytorch-181/lib/python3.8/site-packages/torch/tensor.py", line 245, in backward
    torch.autograd.backward(self, gradient, retain_graph, create_graph, inputs=inputs)
  File "/share/home/bjiangch/group-zyl/.conda/envs/Pytorch-181/lib/python3.8/site-packages/torch/autograd/__init__.py", line 145, in backward
    torch.autograd.backward(self, gradient, retain_graph, create_graph, inputs=inputs)
  File "/share/home/bjiangch/group-zyl/.conda/envs/Pytorch-181/lib/python3.8/site-packages/torch/autograd/__init__.py", line 145, in backward
    Variable._execution_engine.run_backward(
RuntimeError: derivative for batch_norm_backward_elemt is not implemented
    Variable._execution_engine.run_backward(
RuntimeError: derivative for batch_norm_backward_elemt is not implemented
```
It seems that we can not include the gradients in the cost function with the DDP. Because when I cut off the gradients in cost function. The training is fine. 

cc @ezyang @albanD @zou3519 @gqchen @pearu @nikitaved @soulitzer @Lezcano @Varal7 @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @aazzolini @osalpekar @jiayisuse @agolynski @SciPioneer @H-Huang @mrzzd @cbalioglu @gcramer23
Repository: youtube-dl
Issue: mp3
Labels: question

youtube-dl --audio-format mp3 <url>  is supposed to download it as mp3, and not, as it does, mp4,  right?
Repository: pytorch
Issue: optimize_for_inference does not handle MKLDNN for BatchNorm1d
Labels: high priority,oncall: jit,triaged

## 🐛 Bug

The process to convert frozen ops to MKLDNN has checks for Linear and Conv dimensions but none for BatchNorm.

See: https://github.com/pytorch/pytorch/blob/b162d95e461a5ea22f6840bf492a5dbb2ebbd151/torch/csrc/jit/passes/frozen_ops_to_mkldnn.cpp#L946

## To Reproduce

1. Model that has BatchNorm1d
2. torch.jit.optimize_for_inference(model)
3. RuntimeError: mkldnn_batch_norm: currently mkldnn inference only support 2d and 3d batchnorm

## Expected behavior

Does not convert the op

## Environment

 - PyTorch Version (e.g., 1.0): 1.10
 - OS (e.g., Linux): Windows
 - How you installed PyTorch (`conda`, `pip`, source): pip
 - Build command you used (if compiling from source): N/A
 - Python version: 3.8
 - CUDA/cuDNN version: N/A
 - GPU models and configuration: N/A
 - Any other relevant information:

## Additional context
Repository: TypeScript
Issue: Incorrect widening (constraint fallback?) during inference when union with `undefined` appears in constraint
Labels: Bug

# Bug Report

### 🔎 Search Terms

`union`, `type inference`, `imprecise union generic type`, `generic type`.

### 🕗 Version & Regression Information

This is reproducible on all versions of the playground.

### ⏯ Playground Link

[Playground link with relevant code](https://www.typescriptlang.org/play?ts=4.3.4#code/KYDwDg9gTgLgBASwHY2FAZgQwMbDgZQgFtgYALZAcwB4BYAKDjgCU5RUkATAZwaaYA+cAN59+4gNoBpREjgBydBAjy4Q+QCNMUVeq0AveQF0A-AC4RY8eKjm4AVyQBrJBADuSANxXrTMHccXdy8fcQBfb0ZrMJ8hR05gdGRgTjgAXgcuROTOBgA+ERj6BmwIJG54CAtCEnIqamE4JSqROCgLAEZPODALACY4CLgtdtbRgGZBwYKM4QiGBgTsABttPHRHbBgEMrhuYlIKJBoAWTYQDh44ABVzy+4CA7rj6mR0NBYCkzgnYABPCDoFhwCxIYAANzQABobndgFwHjVDlQ8gAKMS-P4WE5QsT7WpHSgWa4MACU2Mii2AKzWTU2212+ORxwAQvZKJQUtQzux4VdbryEY8CfU3h9mF8fv9AcDQRDobDBVckc9KGiMf9sbiokzVcSyRYJCcjJT6KVyvBXFAiJhluk9k9CajFMp5DCIKTIgB6L1wSgQGAWABEzSDDB95zA1NQnGDoYWZrKFWG7M5qQyusJbI5KWdzTdcA93t9-sDcAkIeUQbUcCDIyDRnDvtAUa2KUNlYgDYTEYAEu55VA4G4EOQ4AADTAPc0Vccw8h4UpQKDRuAwP5RxAPFcwexQMGcAB0JST8HZyz+9szVGzabzrrgU7gM5g7s9Tb9AY7ocb9AjLejdty07BsgA)

### 💻 Code

```ts
export interface Something<
  R extends
    | {
        [K in 'foo' | 'bar' | 'baz']?: {
          r?: unknown;
          p?: unknown;
        };
      }
    | undefined = undefined
> {}

const o: Something<{ foo: { r: 1; p: 2 }; bar: { r: 3 } }> = {};

declare function something<M extends T extends Something<infer R> ? keyof R : never, T extends Something>(
  key: M,
  something: T
): M;

declare function somethingBugged<M extends T extends Something<infer R> ? keyof R : never, T extends Something>(
  key: M,
  something: T
): [M];

const normal = something('foo', o);
// got: "foo"
// expected: "foo"

const bugged = somethingBugged('foo', o);
// got: ["foo" | "bar"]
// expected: ["foo"]

// However with `as const`, the correct type is returned.
const ugly = somethingBugged('foo' as const, o);
// got: ["foo"]
// expected: ["foo"]
```

### 🙁 Actual behavior
The type loses its precision and is the union instead of the exact type.

### 🙂 Expected behavior
The type is exact.

------
What is strange is that the generic type `M` loses precision (`"foo" -> "foo" | "bar"`) with the `somethingBugged` function which returns a tuple of `M` (and it does the same thing with any other "wrapper", such as an object).
Whereas with the `something` function there is no problem. Both functions are identical.
Repository: PowerToys
Issue: Image Resizer and format
Labels: Idea-Enhancement,Product-Image Resizer

### Description of the new feature / enhancement

Hi,

My suggestion today is with the "Image resizer". Love everything in it. would just add the possibility to change the format too.
Would change the name to Image format and Resize

Thank you to all the team for the great work

Kind regards,
Mike

### Scenario when this would be used?

I for example received images from people to put in an app that only accepts not only to have a specific size, but only accept GIF.  I which I could do both steps at the same time.  Right now I have to use 2 extensions.

Since you already have the emergency encoding, that would be easy just to add selectbox which by default is set to be "Stay the Same Encoding" then, we could have the list of other types you can do.  Not much programming to do. Just add a select box.

:-)

### Supporting information

n/a
Repository: rust
Issue: refactor queries that don't accept inference variables to use canonicalization
Labels: C-cleanup,E-mentor,T-compiler,T-types

In https://github.com/rust-lang/rust/pull/86866 we found various queries that were ICEing when used with inference variables. https://github.com/rust-lang/rust/pull/86866 worked around these ICEs via simple checks or imprecision, but these queries likely out to be rewritten to use canonicalization or other less hacky techniques.

Discussion with @arora-aman in [this Zulip topic](https://zulip-archive.rust-lang.org/189812tcompilerwgrfc2229/89385migrationbug.html), starting [about here](https://zulip-archive.rust-lang.org/189812tcompilerwgrfc2229/89385migrationbug.html#244834346). 

<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_ASSIGN_START -->

<!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":"vincenzopalazzo"}$$TRIAGEBOT_ASSIGN_DATA_END -->

<!-- TRIAGEBOT_ASSIGN_END -->
<!-- TRIAGEBOT_END -->
Repository: neovim
Issue: do not show [Process exited] in finished terminals
Labels: enhancement,terminal

The `[Process exited]` prompt is extremely handy when running non-interactive commands like `make` or `make test`, as it lets you examine the output before the window disappears.

However, for running interactive applications like `lazygit` or `htop`, it is just an additional keystroke you need to press to close the window.

I have this keybinding set up to launch `lazygit` in a new tab:

```vim
" Open lazygit in a new tab
if has("nvim")
    nnoremap <Leader>g :tabnew<CR>:terminal lazygit<CR>i
endif
```

When I'm done I press `q`, which exits `lazygit`. But then I have to press another key to close the window. This isn't a huge deal of course, but it does irk me since it's a completely unnecessary keypress. I will never need to examine the terminal output after `lazygit` exits, so it would feel a lot nicer if I could simply press `q` and go right back to the file I was editing.

The same is true when I just want to open a quick terminal to examine something in the command line. When I press <kbd>Ctrl</kbd><kbd>d</kbd> to exit the terminal, it feels unnecessary to have to press another key to close the window.

I would love an option when opening a new terminal to not prompt for a keypress after the command exits.

Maybe:

```vim
:terminal <noprompt> lazygit
```

---

I tried hacking together a workaround using `TermClose`, but it seems that event fires before the prompt is displayed, so I'm not sure if it can work:

```
autocmd TermClose term://*lazygit <CR>
```

![image](https://user-images.githubusercontent.com/597206/124392950-676b0880-dcf8-11eb-812f-32c6b59d1551.png)
Repository: PowerToys
Issue: Windows Explorer Position on launch
Labels: Issue-Bug,Product-FancyZones,Priority-3

### Microsoft PowerToys version

0.41.4

### Running as admin

- [X] Yes

### Area(s) with issue?

FancyZones

### Steps to reproduce

I place Windows Explorer in a zone, close it and re-open it.  It does not go back to the zone I left it in.  All settings has been setup correctly because all other software remembers their positions and zones...

### ✔️ Expected Behavior

Windows Explorer is supposed to open in its Zone

### ❌ Actual Behavior

Windows Explorer opens outside any zone available

### Other Software

_No response_