sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: [nnc] Add more optimization for conditional stmts in loopnest transformations
Labels: NNC

## 🚀 Feature
<!-- A clear and concise description of the feature proposal -->
1. reorderAxis:
  it unnecessarily sinks the condition-checks. One example:
  stmt before reorder:
  ```
for (int n = 0; n < 64; n++) {
    for (int c_outer = 0; c_outer < 5; c_outer++) {
      for (int c_inner = 0; c_inner < 16; c_inner++) {
        if (c_inner + 16 * c_outer<72 ? 1 : 0) {
          for (int h_outer = 0; h_outer < 4; h_outer++) {
            for (int h_inner = 0; h_inner < 16; h_inner++) {
              if (h_inner + 16 * h_outer<56 ? 1 : 0) {
                for (int w_outer = 0; w_outer < 4; w_outer++) {
                  for (int w_inner = 0; w_inner < 16; w_inner++) {
                    if (w_inner + 16 * w_outer<56 ? 1 : 0) {
                      B[n, c_inner + 16 * c_outer, h_inner + 16 * h_outer, w_inner + 16 * w_outer] = A[n, c_inner + 16 * c_outer, h_inner + 16 * h_outer, w_inner + 16 * w_outer];
  ```   
  stmt after `reorder(c_inner, w_inner)`
  ```
for (int n = 0; n < 64; n++) {
    for (int c_outer = 0; c_outer < 5; c_outer++) {
      for (int w_inner = 0; w_inner < 16; w_inner++) {
        for (int h_outer = 0; h_outer < 4; h_outer++) {
          for (int h_inner = 0; h_inner < 16; h_inner++) {
            for (int w_outer = 0; w_outer < 4; w_outer++) {
              for (int c_inner = 0; c_inner < 16; c_inner++) {
                if (c_inner + 16 * c_outer<72 ? 1 : 0) {
                  if (h_inner + 16 * h_outer<56 ? 1 : 0) {
                    if (w_inner + 16 * w_outer<56 ? 1 : 0) {
                      B[n, c_inner + 16 * c_outer, h_inner + 16 * h_outer, w_inner + 16 * w_outer] = A[n, c_inner + 16 * c_outer, h_inner + 16 * h_outer, w_inner + 16 * w_outer];
  ```

2. sliceTail/sliceHead
  After a slicing transformation, some condition checks can be optimized away. An example,
  stmt before slice_tail
  ```
for (int n = 0; n < 64; n++) {
    for (int c_outer = 0; c_outer < 5; c_outer++) {
      for (int c_inner = 0; c_inner < 16; c_inner++) {
        if (c_inner + 16 * c_outer<72 ? 1 : 0) {
          B[n, c_inner + 16 * c_outer] = A[n, c_inner + 16 * c_outer];
  ```
stmt after slice_tail
```
for (int n = 0; n < 64; n++) {
    for (int c_outer = 0; c_outer < 4; c_outer++) {
      for (int c_inner = 0; c_inner < 16; c_inner++) {
        if (c_inner + 16 * c_outer<72 ? 1 : 0) {
          B[n, c_inner + 16 * c_outer] = A[n, c_inner + 16 * c_outer];

for (int c_inner = 0; c_inner < 16; c_inner++) {
    if (c_inner + 64<72 ? 1 : 0) {
       B[n, c_inner + 64] = A[n, c_inner + 64];
``` 
## Motivation

<!-- Please outline the motivation for the proposal. Is your feature request related to a problem? e.g., I'm always frustrated when [...]. If this is related to another GitHub issue, please link here too -->

These optimizations are necessary to produce simpler and faster loopnest stmts.
Repository: storybook
Issue: Addon-docs: Auto-generated tables for Typescript interfaces
Labels: feature request,addon: docs,block: argstable

Currently, we auto-generate ArgsTables for components based on their Typescript signatures.

It would be useful to automatically create ArgsTable-style documentation for ANY typescript interface.

Something like:

```
<InterfaceTable of={MyInterface} />
```
Repository: rust
Issue: Tracking Issue for dir_entry_ext2
Labels: T-libs-api,C-tracking-issue,A-io

<!--
Thank you for creating a tracking issue!

Tracking issues are for tracking a feature from implementation to stabilization.

Make sure to include the relevant RFC for the feature if it has one.

If the new feature is small, it may be fine to skip the RFC process. In that
case, you can use use `issue = "none"` in your initial implementation PR. The
reviewer will ask you to open a tracking issue if they agree your feature can be
added without an RFC.
-->

Feature gate: `#![feature(dir_entry_ext2)]`

This is a tracking issue for a new method on `std::fs::DirEntry` on UNIX platforms via a new sealed variant of the `std::os::unix::fs::DirEntryExt` trait.

### Public API

<!--
For most library features, it'd be useful to include a summarized version of the public API.
(E.g. just the public function signatures without their doc comments or implementation.)
-->

```rust
#[unstable(feature = "dir_entry_ext2")]
pub trait DirEntryExt2: Sealed {
    fn file_name_ref(&self) -> &OsStr;
}
```

### Steps / History

<!--
For larger features, more steps might be involved.
If the feature is changed later, please add those PRs here as well.
-->

- [x] Implementation: #83581
- [ ] Final commenting period (FCP)
- [ ] Stabilization PR

<!--
Once the feature has gone through a few release cycles and there are no
unresolved questions left, the feature might be ready for stabilization.

If this feature didn't go through the RFC process, a final commenting period
(FCP) is always needed before stabilization. This works as follows:

A library team member can kick off the stabilization process, at which point
the rfcbot will ask all the team members to verify they agree with
stabilization. Once enough members agree and there are no concerns, the final
commenting period begins: this issue will be marked as such and will be listed
in the next This Week in Rust newsletter. If no blocking concerns are raised in
that period of 10 days, a stabilzation PR can be opened by anyone.
-->

### Unresolved Questions

<!--
Include any open questions that need to be answered before the feature can be
stabilised. If multiple (unrelated) big questions come up, it can be a good idea
to open a separate issue for each, to make it easier to keep track of the
discussions.

It's useful to link any relevant discussions and conclusions (whether on GitHub,
Zulip, or the internals forum) here.
-->

- [ ] What is an appropriate name for this new trait?
Repository: node
Issue: New label suggestion: `primordials`
Labels: discuss,meta

In view of growing importance of Primordials and introduction of a guide related for the same,
Should we introduce new label to track all Primordials related PRs? 

Ref: #38635
Repository: node
Issue: Report failing test `test-crypto-dh-leak` on macOS Big Sur (Apple M1)
Labels: test

`test-crypto-dh-leak` test fails everytime on my computer. Haven't made any changes related to the test in my code locally.
Command used: `make test-only`
<!--
Thank you for reporting a flaky test.

Flaky tests are tests that fail occasionally in the Node.js CI, but not
consistently enough to block PRs from landing, or that are failing in CI jobs or
test modes that are not run for every PR.

Please fill in as much of the template below as you're able.

Test: The test that is flaky - e.g. `test-fs-stat-bigint`
Platform: The platform the test is flaky on - e.g. `macos` or `linux`
Console Output: A pasted console output from a failed CI job showing the whole
failure of the test
Build Links: Links to builds affected by the flaky test

If any investigation has been done, please include any information found, such
as how consistently the test fails, whether the failure could be reproduced
locally, when the test started failing, or anything else you think is relevant.
-->

* **Test**: test-crypto-dh-leak
* **Platform**: macOS Bigsur (Apple M1)
* **Console Output:**
```
=== release test-crypto-dh-leak ===                                           
Path: parallel/test-crypto-dh-leak
node:assert:412
    throw err;
    ^

AssertionError [ERR_ASSERTION]: before=116604928 after=137986048
    at Object.<anonymous> (/Users/marsonya/OpenSource/nodejs/node/test/parallel/test-crypto-dh-leak.js:29:1)
    at Module._compile (node:internal/modules/cjs/loader:1109:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
    at Module.load (node:internal/modules/cjs/loader:989:32)
    at Function.Module._load (node:internal/modules/cjs/loader:829:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
    at node:internal/main/run_main_module:17:47 {
  generatedMessage: false,
  code: 'ERR_ASSERTION',
  actual: false,
  expected: true,
  operator: '=='
}
```
* **Build Links**: Test is failing on Locally
Repository: youtube-dl
Issue: Make the ETA a moving average to increase stability
Labels: 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 2021.05.16. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
- Search the bugtracker for similar feature 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 feature request
- [x] I've verified that I'm running youtube-dl version **2021.05.16**
- [x] I've searched the bugtracker for similar feature requests including closed ones


## Description

<!--
Provide an explanation of your issue in an arbitrary form. Please make sure the description is worded well enough to be understood, see https://github.com/ytdl-org/youtube-dl#is-the-description-of-the-issue-itself-sufficient. Provide any additional information, suggested solution and as much context and examples as possible.
-->

When I was downloading a long video (https://www.youtube.com/watch?v=u2Fxce8N2w8), the ETA would wildly jump between 30m to 2h every time it updated (as my download speed changed). But this is hardly informative of what the actual overall completion time would be.

What you should do is take a weighted average a.k.a. exponential smoothing (e.g. average_eta = 0.95\*average_eta + 0.05\*current_eta) for the ETA you display, so that it's much more stable and informative, while still being dynamic. Most good progress bars do this (e.g. https://github.com/tqdm/tqdm).

Is it too hard to implement this as the default behavior? I think it'd be very worthwhile.
Repository: rust
Issue: Implementing `From` for associated type results in confusing error
Labels: A-diagnostics,A-associated-items,D-confusing,T-types,A-coherence

Disclaimer: I am not sure if this an actual bug or rather a diagnostic issue.

The following simplified code

```rust
use std::str::FromStr;

type BoolErr = <bool as FromStr>::Err;

struct Error(BoolErr);

impl From<BoolErr> for Error {
    fn from(err: BoolErr) -> Self {
        Self(err)
    }
}
```

[Playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=ff922cb6871756c87786ff85a02c4d52)

Produces the following incorrect/confusing error message on both stable and nigthly:

```
error[E0119]: conflicting implementations of trait `std::convert::From<Error>` for type `Error`:
 --> src/lib.rs:7:1
  |
7 | impl From<BoolErr> for Error {
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: conflicting implementation in crate `core`:
          - impl<T> From<T> for T;
```

I encountered this issue when I wanted to wrap the result returned by `str::parse` for a type from crate A which uses an error type from another crate B, which I did not want to depend on and import directly. I am aware that using an associated type here has implications for backwards compatibility, but in this case this is actually desirable I think, since I only want to forward the result into my custom error type, even if the concrete error type in crate A/B changes.
Repository: pytorch
Issue: A Null pointer dereference bug
Labels: oncall: jit

In the file `torch/csrc/jit/runtime/static/ops.cpp`, we have the following [code](https://github.com/pytorch/pytorch/blob/a6b9268f3103655b2f3572863fa949304058bb2d/torch/csrc/jit/runtime/static/ops.cpp#L1585-#L1586):

```
if (!packed_weight) {
          packed_weight->apply_out(
              input, output_scale, output_zero_point, out_t);
```

The conditional check should be changed into `if (packed_weight)`.



cc @gmagogsfm
Repository: youtube-dl
Issue: extractor:ID number not working with Twitter
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])
-->

- [ ] I'm asking a question
- [ ] I've looked through the README and FAQ for similar questions
- [ ] 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.
-->

WRITE QUESTION HERE
Repository: frp
Issue: UDP Real IP
Labels: proposal

**The solution you want**
Send a real ip to server behind NAT.

**How to implement this function**
[Cloudflare's implementation](https://developers.cloudflare.com/spectrum/proxy-protocol)

**Application scenarios of this function**
This feature would be awesome for applications that use UDP and need real ip address of client.
Repository: youtube-dl
Issue: webtv.senato.it
Labels: site-support-request

## Checklist

- [X] I'm reporting a new site support request
- [X] I've verified that I'm running youtube-dl version **2021.05.16**
- [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


- Single video: https://webtv.senato.it/Leg18/webtv_aula?seduta_assemblea=21401
- Single video: https://webtv.senato.it/Leg18/webtv_aula_hq?seduta_assemblea=21401

## Description

The video is segmented and loaded via JavaScript using jwplayer. Look for the `script` tag with id `video_playlist`. It contains a line like this: `playlist: "https://prd-senato.spectar.tv/canale/assemblea/legislatura/18/seduta/329/formato/flvplayer/quality/hq"`. There is an XML file containing a playlist with multiple videos, in different formats.
Repository: go
Issue: os/signal: Reset doesn't reset ignored signals
Labels: NeedsInvestigation,compiler/runtime

<!-- Please answer these questions before submitting your issue. Thanks! -->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.16.4 linux/amd64
</pre>

### Does this issue reproduce with the latest release?

Yes, including go1.17 devel

### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN="/home/manlio/.local/bin"
GOCACHE="/home/manlio/.cache/go-build"
GOENV="/home/manlio/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE="*.local"
GOMODCACHE="/home/manlio/.local/lib/go/pkg/mod"
GONOPROXY=""
GONOSUMDB="*.local"
GOOS="linux"
GOPATH="/home/manlio/.local/lib/go:/home/manlio/src/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/lib/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.16.4"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build3881295983=/tmp/go-build -gno-record-gcc-switches"
GOROOT/bin/go version: go version go1.16.4 linux/amd64
GOROOT/bin/go tool compile -V: compile version go1.16.4
uname -sr: Linux 5.12.5-arch1-1
/usr/lib/libc.so.6: GNU C Library (GNU libc) release release version 2.33.
gdb --version: GNU gdb (GDB) 10.2
</pre></details>

### What did you do?

https://play.golang.org/p/vYlTzluIuBL

### What did you expect to see?

The last line of the output being `false`

### What did you see instead?

The last line is `true`.

See https://groups.google.com/g/golang-nuts/c/W5NNNC0h5Zc for a discussion.
Thanks to Brian Candler for the simplified example.
Repository: vscode
Issue: Allow defining save as file types for custom editors
Labels: feature-request,api,custom-editors

I don't think it's possible unless using the simple dialog to specify the save as file type:

<img width="231" alt="Screen Shot 2021-05-22 at 5 56 09 AM" src="https://user-images.githubusercontent.com/2193314/119227408-8acc5200-bac2-11eb-8f42-a5a40668b6c7.png">

I'd like to remove all language extensions from that list and add my own (name + extension) in order to support https://github.com/lunapaint/vscode-luna-paint/issues/69
Repository: flutter
Issue: [local_auth] Mismatching & outdated Android setup instructions
Labels: platform-android,d: api docs,p: local_auth,package,P2,team-android,triaged-android

The current Android setup instructions for the local_auth plugin suggest updating `MainActivity` as shown at the bottom of this issue however the correct instructions for flutter apps using v2 embedding are:
Step 1. Replace existing `FlutterActivity` import with `import io.flutter.embedding.android.FlutterFragmentActivity`.
```diff
- import io.flutter.embedding.android.FlutterActivity;
- import io.flutter.app.android.FlutterActivity;
- import io.flutter.app.android.FlutterFragmentActivity;
+ import io.flutter.embedding.android.FlutterFragmentActivity;
```
Step 2. Replace `FlutterActivity` with `FlutterFragmentActivity`.
```diff
- public class MainActivity extends FlutterActivity {
+ public class MainActivity extends FlutterFragmentActivity {
```
or for Kotlin
```diff
- class MainActivity: FlutterActivity {
+ class MainActivity: FlutterFragmentActivity {
```
---

## Current Instructions

MainActivity.kt
```kotlin
import io.flutter.embedding.android.FlutterFragmentActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugins.GeneratedPluginRegistrant

class MainActivity: FlutterFragmentActivity() {
    override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
        GeneratedPluginRegistrant.registerWith(flutterEngine)
    }
}
```


MainActivity.java
```java
import android.os.Bundle;
import io.flutter.app.FlutterFragmentActivity;
import io.flutter.plugins.flutter_plugin_android_lifecycle.FlutterAndroidLifecyclePlugin;
import io.flutter.plugins.localauth.LocalAuthPlugin;

public class MainActivity extends FlutterFragmentActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        FlutterAndroidLifecyclePlugin.registerWith(
                registrarFor(
                        "io.flutter.plugins.flutter_plugin_android_lifecycle.FlutterAndroidLifecyclePlugin"));
        LocalAuthPlugin.registerWith(registrarFor("io.flutter.plugins.localauth.LocalAuthPlugin"));
    }
}
```
Repository: flutter
Issue: Locale.toString() is not released for non-debugging use
Labels: framework,a: internationalization,c: proposal,P2,team-framework,triaged-framework

According to the documentation, Locale.toString() is only to be used for debugging:
https://api.flutter.dev/flutter/dart-ui/Locale/toString.html

The proposed alternative is `toLanguageTag()`.

However, toString uses underscores, whereas toLanguageTag uses hyphens as separators.

The popular Dart 'intl' library requires stringified locales with underscores, as returned by toString.

I am therefore proposing that either toString() becomes officially usable for non-debugging production use. Or the toLanguageTag method gains a 'separator' parameter which defaults to '-'.
Repository: node
Issue: Is it possible to delay the auto-closing & warning for the open `FileHandle`?
Labels: fs,promises

* **Node.js Version**: 14.17.0 & 16.2.0
* **Module (and version) (if relevant)**: `fs/promises`

I tried to cleanup the unclosed `FileHandle` using the `FinalizationRegistry` as shown in the following code example.

`test.mjs`
```js
import { close } from 'fs';
import { open } from 'fs/promises';

const registry = new FinalizationRegistry(fd => {
    console.log('FinalizationRegistry callback');
    close(fd, err => {
        // console.log(err); // [Error: EBADF: bad file descriptor, close]
    });
});

let fileHandle = await open('/path/to/file', 'r');

// register the file descriptor
registry.register(fileHandle, fileHandle.fd);

// release the reference intentionally
setTimeout(() => fileHandle = null, 1000);

// run garbage collector
setTimeout(() => global?.gc?.(), 2000);

await new Promise(_ => setTimeout(_, 3000));
```

However, before the `FinalizationRegistry` callback is executed, the node.js "auto-closing" is run and warned.
```shell-session
$ node --expose-gc test.mjs 
(node:6796) Warning: Closing file descriptor 3 on garbage collection
(Use `node --trace-warnings ...` to show where the warning was created)
(node:6796) [DEP0137] DeprecationWarning: Closing a FileHandle object on garbage collection is deprecated. Please close FileHandle objects explicitly using FileHandle.prototype.close(). In the future, an error will be thrown if a file descriptor is closed during garbage collection.
```
This "auto-closing" is a great feature for safety reasons, but if the developer has implemented their own cleanup process, could you delay the timing of its execution a bit so that it doesn't get warned?

I would be happy if you will consider it.
Repository: terminal
Issue: Support for XTSAVE and XTRESTORE or DECRQM
Labels: Product-Conhost,Help Wanted,Area-VT,Product-Terminal,Issue-Task

# Description of the new feature/enhancement

With the introduction of bracketed paste mode it is now possible to handle pasting when announcing support via DECSET 2004 (see https://github.com/microsoft/terminal/issues/395), which is great! As a terminal-based user interface application the question now arises how to know which value to restore at the end of the application. This is usually done by using XTSAVE prior to setting bracketed paste mode and then calling XTRESTORE before closing the application or by querying the state of bracketed paste mode via DECRQM (as far as I understand).

Why is this important? Imagine the following:

- Initially Bracketed Paste Mode is Off
- One application is started which supports it and enables it
- At the end of the application the application does not know if bracketed paste was on or off before the application started, so it opts to leave it enabled.
- If the user next starts an application does not support bracketed paste, then the user will start seeing escape sequences `\x1b[200~` etc when pasting.

Please add support for either method, so we can leave bracketed paste mode in the same state as it was before the application was started.

# Proposed technical implementation details (optional)

XTSAVE and XTRESTORE need to keep a stack of values for the given CSI and either push the current value on the stack or restore the value from the stack and pop.