sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: Mention accessor/data_ptr for raw memory access in Libtorch index API document and discuss performance implications
Labels: module: performance,module: cpp,triaged

*Edit*: @t-vi: Per the discussion, this is more a doc improvement opportunity.

## 🐛 Bug
I have a Libtorch project that has some execution speed issues. I have spent half a day to debug it. It turns out that using index API repetitively is much less efficient compared to using an accessor.

Here is the doc on index API:
https://pytorch.org/cppdocs/notes/tensor_indexing.html

Basically, the job is to read lots of tensors and copy their value into a data object in memory:

  for (int i = 0; i < tensor.size(0); i++)
    for (int j = 0; j < tensor.size(1); j++)
      for (int k = 0; k < tensor.size(2); k++)
      {
        data->setData(i, j, k, tensor.index({i, j, k}).item<float>())
      }
I benchmarked the above operation, it takes 3600ms.

Then I modified above using accessor API:

auto tensorAccessor = tensor.accessor<float, 3>();
for (int i = 0; i < tensor.size(0); i++)
for (int j = 0; j < tensor.size(1); j++)
for (int k = 0; k < tensor.size(2); k++)
{
data->setData(i, j, k, tensorAccessor[0][i][j][k])
}

The same operation takes only 900ms.

BTW, tensor is on the CPU device side.

So accessor API is way more efficient compared to index (4X performance gain).
## Environment
 - PyTorch Version: 1.6
 - OS: mac os
 - How you installed PyTorch (`conda`, `pip`, source): directly downloaded libtorch distributed version.
 - Build command you used (if compiling from source):
 - Python version: N/A libtorch project.
 - CUDA/cuDNN version: N/A
 - GPU models and configuration: N/A on CPU device.
 - Any other relevant information:


cc @yf225 @glaringlee @VitalyFedyunin @ngimel
Repository: youtube-dl
Issue: Please support concertgebouw.videodock.com
Labels: site-support-request

<!--

######################################################################
  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:
- First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2020.09.20. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
- Make sure that all provided video/audio/playlist URLs (if any) are alive and playable in a browser.
- Make sure that site you are requesting is not dedicated to copyright infringement, see https://yt-dl.org/copyright-infringement. youtube-dl does not support such sites. In order for site support request to be accepted all provided example URLs should not violate any copyrights.
- Search the bugtracker for similar site support requests: http://yt-dl.org/search-issues. DO NOT post duplicates.
- Finally, put x into all relevant boxes (like this [x])
-->

- [x] I'm reporting a new site support request
- [x] I've verified that I'm running youtube-dl version **2020.09.20**
- [x] I've checked that all provided URLs are alive and playable in a browser
- [x] I've checked that none of provided URLs violate any copyrights
- [x] I've searched the bugtracker for similar site support requests including closed ones


## Example URLs

<!--
Provide all kinds of example URLs support for which should be included. Replace following example URLs by yours.
-->

- Single video: https://concertgebouw.videodock.com/view/94
- Single video: http://concertgebouw.videodock.com/view/61

## Description

<!--
Provide any additional information.
If work on your issue requires account credentials please provide them or explain how one can obtain them.
-->

Site posts free concerts.  No credentials required.
Repository: node
Issue: HTTP/2 ServerResponse.destroy() has the same effect as ServerResponse.end()
Labels: http2

* **Version**: 14.11.0
* **Platform**: `Linux solus 5.6.19-158.current #1 SMP PREEMPT Sun Jul 26 14:17:01 UTC 2020 x86_64 GNU/Linux`
* **Subsystem**: http2

### What steps will reproduce the bug?

```js
const http = require('http2');

const server = http.createServer((request, response) => {
    response.write('a');
    
    setTimeout(() => {
		// Does the same as response.end()
        response.destroy();
    }, 100);
});

// HTTP/2
server.listen(() => {
    const session = http.connect(`http://localhost:${server.address().port}`);
    const stream = session.request();
    stream.resume();
    stream.end();

    stream.once('aborted', () => {
        console.log('stream aborted');
    });
    
    stream.once('end', () => {
        console.log('stream end');
        
        session.close();
        server.close();
    });
    
    stream.once('error', () => {
        console.log('stream error');
    });
});

// HTTP/1.1:
// server.listen(() => {
    // const request = http.get(`http://localhost:${server.address().port}`, response => {
	// 	console.log('got response');
	// 	response.resume();

    //     response.once('aborted', () => {
    //         console.log('aborted');
    //         server.close();
	// 	});

	// 	response.once('end', () => {
	// 		console.log('response end');
	// 	});

	// 	response.once('close', () => {
	// 		console.log('response close');
	// 	});
    // });
// });
```

Note: it works as expected when the method is e.g. POST and `stream.end()` is not called.

### How often does it reproduce? Is there a required condition?

Always.

### What is the expected behavior?

`aborted` or an `error` event.

### What do you see instead?

`end` event is emitted.
Repository: deno
Issue: WebSocket Cookies
Labels: cli,suggestion

Since Deno 1.4, there's the Browser's WebSocket api in Deno which is now the preferred way of using WebSockets. 
Now in Browsers, it's possible for a site to set cookies which are sent (if valid) with the WebSocket request. In Deno, there's no way of setting these cookies (as there's no "cookie store"), so one has to use the `std/ws` module which isn't designed for clients. It would be appreciated to have some kind of way to set cookies with the request. I know this isn't straight forward as for example adding a constructor field would break the standard and purpose of implementing the api.
Repository: node
Issue: It's possible to push data to a Readable in mid-destroy state
Labels: stream

* **Version**: 15.4.0, 14.11.0
* **Platform**: `Linux solus 5.6.19-158.current #1 SMP PREEMPT Sun Jul 26 14:17:01 UTC 2020 x86_64 GNU/Linux`
* **Subsystem**: stream

### What steps will reproduce the bug?

```js
const {Readable} = require('stream');

class X extends Readable {
    constructor() {
        super();
    }
    
    _destroy() {}
}

const x = new X();

x.resume();
x.once('end', () => {
    console.log('end has been emitted');
});

x.push('asdf');
x.destroy();
x.push(null);
```

### How often does it reproduce? Is there a required condition?

Always.

### What is the expected behavior?

```
```

### What do you see instead?

```
end has been emitted
```
Repository: electron
Issue: window.focus from webapp does not trigger the focus event of the BrowserWindow
Labels: bug :beetle:,status/confirmed,component/BrowserWindow,9-x-y,10-x-y,has-repro-gist,11-x-y,12-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 for an issue that matches the one I want to file, without success.

### Issue Details

* **Electron Version:** 10.1.2, 9.0.4, ... 4.0.4
* **Operating System:** Windows 10 (v 1909)

### Expected Behavior
When I open a window in the webapp that's in my `BrowserWindow`, I expect that calling `win.focus()` focuses the `BrowserWindow`

### Actual Behavior
`w.focus()` doesn't do anything and doesn't emit the `focus` event

### To Reproduce
This is basically [this](https://github.com/electron/electron/issues/18513) issue which was closed. The part of the issue about `win.close()` not working appears to have been fixed, so I'm opening a new issue for the focus issue.

1. Start the app below
2. click "open window"
3. click "focus window"
4. observe that the window doesn't get focused

If you run the jsfiddle in Chrome, the focus button will put focus in the window.

Notice the "focus" event of the window doesn't fire.

```
(async () => {
  const {app, BrowserWindow, inAppPurchase} = require('electron');
  await app.whenReady();
  const mainWindow = new BrowserWindow({webPreferences: {nativeWindowOpen: true}});
  await mainWindow.loadURL("https://jsfiddle.net/ishats/0shxqkpw/2/");

  app.on("browser-window-created", (e, win) => {
    win.on("focus", () => {
      console.log("doesn't get hit");
    });
  });
})();

```
Repository: flutter
Issue: [web][a11y] issues with screenreaders (Narrator and Ocra)
Labels: a: accessibility,platform-web,P2,team-web,triaged-web

Due to the error happening using the [tab key](https://github.com/flutter/flutter/issues/52106) when screen reader is on, the screen readers which uses `tab` as the main navigator key (such as Narrator), a11y does not work (unless the user explicitly changes the modifier keys).
Repository: TypeScript
Issue: DashCase and CamelCase intrinsic string types, or similar
Labels: Suggestion,In Discussion

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker.

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the FAQ, especially the "Common Feature Requests" section: https://github.com/Microsoft/TypeScript/wiki/FAQ

-->

## Search Terms

dashcase snakecase

## Suggestion

It would be great to also have `DashCase` and `CamelCase` and similar!

## Use Cases

 It is common in DOM libs to map from JS camelCase properties to DOM dash-case attributes (f.e. `el.fooBar = 123` and `<el foo-bar="123">`), or CapitalizedClass names to dash-case custom element names (f.e. `class FooBar extends HTMLElement` and `<foo-bar>`).

## Examples

```ts
type T1 = Dashcase<'fooBar' | 'BarBaz'> // 'foo-bar' | 'bar-baz'
type T2 = Camelcase<'foo-bar' | 'bar-baz'> // 'fooBar' | 'barBaz'
```

Or similar.

## Checklist

My suggestion meets these guidelines:

* [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [x] This could be implemented without emitting different JS based on the types of the expressions
* [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
Repository: vscode
Issue: Support tab completion / custom key handlers in QuickPick
Labels: feature-request,quick-pick

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->

In https://github.com/jit-y/vscode-advanced-open-file, we create a QuickPick with a full file path that live-updates as you type with files matching the path. I'd like to add tab-completion so that, when you hit tab with the dialog open, it autocompletes the path if there's only one option visible, and if there are multiple matches, autocompletes up to the common prefix between them.

API-wise, it'd be nice to be able to register a keydown event handler or something for when the text input is focused so that we can read whether the user hit Tab and decide how to respond.

Currently, tab switches focus to the list of choices, which seems redundant to me since the choice list responds to input even without focus (arrow keys and enter still work). This might be an accessibility thing, though? 

Thank you!
Repository: node
Issue: Dynamic import fails in DevTools inspector (invalid host defined options)
Labels: inspector

<!--
Thank you for reporting an issue.

This issue tracker is for bugs and issues found within Node.js core.
If you require more general support please file an issue on our help
repo. https://github.com/nodejs/help


Please fill in as much of the template below as you're able.

Version: output of `node -v`
Platform: output of `uname -a` (UNIX), or version and 32 or 64-bit (Windows)
Subsystem: if known, please specify affected core module name
-->

* **Version**: 14.10.1
* **Platform**: linux
* **Subsystem**: 

### What steps will reproduce the bug?

<!--
Enter details about your bug, preferably a simple code snippet that can be
run using `node` directly without installing third-party dependencies.
-->

On a regular (client-side) DevTools panel console and from REPL, i can use `import("./index.js").then(console.log)` no problem. 
When i try to do the same in an instance of chrome's node inspector connected to localhost:9229 though, i get 
```
TypeError: Invalid host defined options
    at <anonymous>:1:1
```

### How often does it reproduce? Is there a required condition?

everytime, while running a node process with --inspect flag
(`node --inspect`)

### What is the expected behavior?

<!--
If possible please provide textual output instead of screenshots.
-->

importing the module present on the execution path. 

### What do you see instead?

"invalid host defined options" error

<!--
If possible please provide textual output instead of screenshots.
-->

### Additional information

<!--
Tell us anything else you think we should know.
-->

error referenced but solved indirectly in https://github.com/webpack/webpack-cli/issues/1274 and https://github.com/facebook/create-react-app/issues/2271
Repository: flutter
Issue: Failed to attach to the observatory, Connection closed before full header was received
Labels: c: crash,platform-ios,tool,t: xcode,e: OS-version specific,P2,team-ios,triaged-ios

## Steps to Reproduce

<!-- Please tell us exactly how to reproduce the problem you are running into. -->

1. `flutter create test_ios14`
2. `flutter run`
3. blank screen

## Logs
first run
```
Running Xcode build...
 └─Compiling, linking and signing...                        25.7s
Xcode build done.                                           58.8s
Failed to attach to the observatory.
Try accepting the local network permissions popup, or enable "Settings > Privacy > Local Network" for your app.
For more information, see https://flutter.dev/docs/development/ios-14#debugging-flutter
```

after set Local Network permission enabled.
```
Running Xcode build...
 └─Compiling, linking and signing...                        14.1s
Xcode build done.                                           25.8s
Failed to attach to the observatory.
Try accepting the local network permissions popup, or enable "Settings > Privacy > Local Network" for your app.
For more information, see https://flutter.dev/docs/development/ios-14#debugging-flutter
Installing and launching...                                        33.7s
```

```
[✓] Flutter (Channel master, 1.22.0-10.0.pre.309, on Mac OS X 10.15.6 19G2021 x86_64, locale zh-Hant-TW)
    • Flutter version 1.22.0-10.0.pre.309 at /Users/liaojianxun/flutter
    • Framework revision 78e54dd46b (61 minutes ago), 2020-09-22 17:50:27 -0700
    • Engine revision c62d665299
    • Dart version 2.10.0 (build 2.10.0-156.0.dev)


[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/liaojianxun/Library/Android/sdk
    • Platform android-30, build-tools 30.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.0, Build version 12A7209
    • CocoaPods version 1.9.3

[✓] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 49.0.2
    • Dart plugin version 193.7547
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] VS Code (version 1.49.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.14.1
```
Repository: youtube-dl
Issue: Trying to grab all audio track, all subtitles, and 1920x1080 tracks (some videos have 2 video tracks)
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.
-->

I am trying to grab a copy of all 1920x1080 video tracks/ all audio tracks / all subtitle tracks from a m3u8 playlist file and put it into one file container (doesn't matter if mkv or mp4). I have tried so many variations of the text in the code examples as well as faq sections to try to accomplish this - but I am not getting youtube-dl to download this properly. The most I could do is grab the 1920x1080 video track and English audio track. Could anyone shed some incite on what to do?

---

The m3u8 file text (heavily redacted):

[original_manifest.txt](https://github.com/ytdl-org/youtube-dl/files/5265964/original_manifest.txt)

---

My code (or one example of it):

"C:\youtube-dl 1\youtube-dl.exe" "http://127.0.0.1:8887/original_manifest" -o "C:\youtube-dl 1\" -F best/aac-French/aac-Spanish --merge-output-format mp4

---

Output from -F command

[generic] original_manifest: Requesting header
WARNING: Falling back on generic information extractor.
[generic] original_manifest: Downloading webpage
[generic] original_manifest: Downloading m3u8 information
[info] Available formats for original_manifest:
format code  extension  resolution note
aac-French   mp4        audio only [fr]
aac-Spanish  mp4        audio only [es]
210          mp4        256x144     210k , avc1.4d000c, 15.0fps, mp4a.40.5
410          mp4        416x234     410k , avc1.4d000d, 30.0fps, mp4a.40.5
744          mp4        640x360     744k , avc1.4d001e, 30.0fps, mp4a.40.5
1645         mp4        960x540    1645k , avc1.4d001f, 30.0fps, mp4a.40.5
2572         mp4        1280x720   2572k , avc1.64001f, 30.0fps, mp4a.40.5
3687         mp4        1920x1080  3687k , avc1.640028, 30.0fps, mp4a.40.5 (best)

---


Anyone have a clue how to save all subtitles/videos at 1920x1080/all audio tracks? If possible, please include a code snippet Thanks for any help!
Repository: godot
Issue: Assets will not be imported when added to a project after switching from another project that also contains them
Labels: bug,topic:editor

**Godot version:**
3.2.3

**OS/device including version:**
Windows 10 2004

**Issue description:**
After switching between projects with Quit to Project List, if an asset was in the previous project and is then added to the current project, it won't be imported.

**Steps to reproduce:**
Install [this plugin](https://godotengine.org/asset-library/asset/728) from the Asset Library (or any plugin that preloads an image file) and enable it.
Quit to Project List (do not close Godot) and start a new project.
Install the plugin again and attempt to enable it.

**Minimal reproduction project:**
![image](https://user-images.githubusercontent.com/5272529/93976311-6a36d700-fd3e-11ea-845c-e9f38bfd7cdd.png)
https://godotengine.org/asset-library/asset/728
(By no means is this 'minimal' but it is a very convenient way to test)
Repository: create-react-app
Issue: disable react/react-in-jsx-scope in eslint-config-react-app
Labels: issue: proposal,needs triage


related pr: https://github.com/facebook/create-react-app/pull/9645
Repository: rust
Issue: Refactor handling of statics
Labels: C-cleanup,T-compiler,A-MIR

Our current handling of statics is suboptimal: a use of a static `STATIC` is desugared to `*{const-ptr-to-static}`, which is nice because it means we do not need any special case in the MIR for statics, but causes problems when statics *need* to be treated differently. One example of such special treatment is [const checking and promotion](https://github.com/rust-lang/rust/issues/74840#issuecomment-676155841), because consts are not allowed to access statics.

Another issue is that to ensure correct safety checking of static accesses, the `static_ptr_ty` function needs to carefully use raw pointers or references, and the unsafety checker needs to backtranslate that information into proper error messages. A different way to say this is that unsafety checking is another case where statics need special treatment.

And possibly there are more cases where statics need special treatment? it would be great to get an exhaustive list of that, or at least as exhaustive as we can make it, to take that all into account for our design decisions.

All that said, places used to have special treatment in the MIR and @oli-obk worked hard to move away from that to the current situation. Before considering how to resolve the above problems, I'd like to better understand the issues with the old approach that were solved by moving to the current approach.
Repository: pytorch
Issue: JIT doesn't support rfloordiv with scalars correctly
Labels: oncall: jit,days,TSUsability,TSRootCause:PyTorchParityGap

```
def _wrapped_rfloordiv_scalar(a):
  return 5 // a

scripted = torch.jit.script(_wrapped_rfloordiv_scalar)
scripted(torch.tensor(5.))
: RuntimeError: Cannot input a tensor of type Float as an integral argument
```

Note that this works in eager mode:

```
5 // torch.tensor(5.)
: tensor(1.)
```

cc @gmagogsfm