sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: opencv
Issue: A formula of official documentation and source code are different
Labels: question (invalid tracker)

**Hello,**
**I have a question about the formula in the official documentation.**
**You can find the formula in ink below:**
[https://docs.opencv.org/4.5.4/db/d58/group__calib3d__fisheye.html](url)


**This is the formula about distorted point coordinates conversion into pixel coordinates:**
                 x′=(θd/r)a                    (1)
                 y′=(θd/r)b                    (2)
                 u=fx(x′+αy′)+cx           (3)
                 v=fyy′+cy                     (4)

**I found the source code in link below:**
[https://github.com/opencv/opencv/blob/4.x/modules/calib3d/src/fisheye.cpp](url)
**And this how the source code programed:**

                double scale = (r == 0) ? 1.0 : theta_d / r;
                u = f[0]*x*scale + c[0];
                v = f[1]*y*scale + c[1];

**My question is:**
1.what is α in formula(3)? 
2.Why the caculation of formula(3) is different from source code?

**Thank you!**
Repository: TypeScript
Issue: Support additional glob pattern formats such as `**/*{test,spec}.ts` in include/exclude specifiers
Labels: Suggestion,Awaiting More Feedback

# Suggestion

<!--
  Please fill in each section completely. Thank you!
-->

## 🔍 Search Terms

<!--
  💡 Did you know? TypeScript has over 2,000 open suggestions!
  🔎 Please search thoroughly before logging new feature requests as most common ideas already have a proposal in progress.
  The "Common Feature Requests" section of the FAQ lists many popular requests: https://github.com/Microsoft/TypeScript/wiki/FAQ#common-feature-requests

  Replace the text below:
-->


## ✅ Viability Checklist

<!--
   Suggestions that don't meet all these criteria are very, very unlikely to be accepted.
   We always recommend reviewing the TypeScript design goals before investing time writing
   a proposal for ideas outside the scope of the project.
-->
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, new syntax sugar for JS, etc.)
* [ x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).


## ⭐ Suggestion

<!-- A summary of what you'd like to see added or changed -->
a `tsconfig.json` example: 
```json
{
  "extends": "@tsconfig/node16/tsconfig.json",
  "include": ["lib/**/*.ts"],
  "exclude": ["**/*.{test,spec}.ts"]
}
```

* `"exclude": ["**/*.test.ts"]` ✅supported
* `"exclude": ["**/*.{test,spec}.ts"]` ❌not supported. (ts v4.5)

I'd propose support patterns like this, as it's very widely used in js community, e.g. babel/jest/eslint/....

<!--
  If you were announcing this feature in a blog post, what's a short explanation that shows
  a developer why this feature improves the language?
-->

## 💻 Use Cases

<!--
  What do you want to use this for?
  What shortcomings exist with current approaches?
  What workarounds are you using in the meantime?
-->

workaround: `"exclude": ["**/*.test.ts", "**/*.spec.ts"]`. but it would have a better readability to write to one pattern.
Repository: pytorch
Issue: [feature request] More masked reductions: amin/amax, argmin/argmax, quantile, mean/var/std/std_mean/var_mean
Labels: module: sparse,triaged,module: masked operators

An important feature would be passing a custom "fill value" (for the case when no elements in the mask across a dimension are True), and that a fill value could be an appropriately sized (broadcastable) tensor. 


This  is also related to reducing over empty dimensions. If custom "fill values" are supported, all reductions across empty dimensions will make sense even for the cases when the output is not  an empty tensor

A real-world usecase of usage: [`masks_to_boxes(...)`](https://github.com/facebookresearch/detr/blob/main/util/box_ops.py#L64)

@zrphercule

cc @nikitaved @pearu @cpuhrsch
Repository: material-ui
Issue: [TextField] Type password - duplicate icon in Edge
Labels: bug 🐛,browser: Edge

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Current behavior 😯

![image](https://user-images.githubusercontent.com/45595443/144588813-75adce59-756c-495c-bc07-0cbdbdf2e802.png)

I just made my login form using TextField with type `password`
But then I found these bug in my program
I thought thats my program error, but when I checked it in MUI documentation i found the same problem
Link : https://mui.com/components/text-fields/


### Expected behavior 🤔

![image](https://user-images.githubusercontent.com/45595443/144589175-b4054972-d289-454a-91ff-7610e6eaea3a.png)

expected: eye icon in left doesnt appear

### Steps to reproduce 🕹

Steps:

1. Leave the eye icon opened
2. Type something
3.
4.


### Context 🔦

_No response_

### Your environment 🌎

<details>
  <summary>`npx @mui/envinfo`</summary>

```
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.
```
</details>
Repository: PowerToys
Issue: [Mouse Highlighter] Provide a way to turn highlighting mode on/off (next to shortcut) / show state
Labels: Idea-Enhancement,Product-Settings,Product-Mouse Utilities

### Description of the new feature / enhancement

It took a moment for me to actually understand that the `Enable Mouse Higlighter` button, and toggling with the shortcut (`WIN + SHIFT + H`), are not pointing to the same setting.

![image](https://user-images.githubusercontent.com/1516035/144587927-d256cc97-c263-4618-a981-2bead4bd5bfa.png)

### I propose, two scenarios: 

1. to either, let these be unified as one setting (this means the shortcut should function even when `Enable Mouse Higlighter`  is toggled off)
2. or to add a new `Enable/Disable Highlighter`-toggle to inform the user these are two different settings.

![image](https://user-images.githubusercontent.com/1516035/144588565-507877c9-ba03-4f7a-a46c-fb101794ef04.png)



### Scenario when this would be used?

### For option 1

Let the shortcut actually toggle the tool

### For option 2

Enhance the user experience by making it clear that these two toggles are not linked internally. When the tool is on, we can turn on and off the highlighting with a shortcut.

This enables disables the highlighting, but not the tool itself. 

This is how it currently functions, so the changes would all be UI / UX related.

### Supporting information

_No response_
Repository: PowerToys
Issue: A visual cue for the "Mouse highlighter toggle shortcut"
Labels: Idea-Enhancement,Product-Mouse Utilities

### Description of the new feature / enhancement

Would it be possible to give the user a visual cue for when the shortcut has been pressed. Maybe also give the current status?

Like: when pressed, show small pop-up saying "mouse highlighting turned off/on". Like when we mute unmute mic/camera/...

![image](https://user-images.githubusercontent.com/1516035/144591657-5fc020f2-efd4-4edd-a6e7-17b6414350ee.png)


### Scenario when this would be used?

When pressing the shortcut, we provide a visual feedback so u immediately see it was registered correctly. 

### Supporting information

_No response_
Repository: pytorch
Issue: Citation request for "probabilities for each class" in the doc's description on cross-entropy
Labels: module: docs,module: nn,triaged

## 📚 Documentation

<!-- A clear and concise description of what content in https://pytorch.org/docs is an issue. If this has to do with the general https://pytorch.org website, please file an issue at https://github.com/pytorch/pytorch.github.io/issues/new/choose instead. If this has to do with https://pytorch.org/tutorials, please file an issue at https://github.com/pytorch/tutorials/issues/new -->

Hi PyTorch developers, 

Please first let me express my gratitude for PyTorch, a marvelous deep learning framework. 

I found that in the doc of PyTorch v 1.10.0, the probabilities for each class have been introduced in cross-entropy. The same form has been introduced in our 2019 paper: Rethinking Softmax with Cross-Entropy: Neural Network Classifier as Mutual Information Estimator (https://arxiv.org/abs/1911.10688). 

In the paper, we propose the probability-correct (PC) softmax. Its form is: 
$\sigma_p(n(\mathbf{x}))_y = \frac{ \exp( n(\mathbf{x})_y )}{\sum_{y'=1}^{M}P(y')\exp( n(\mathbf{x})_{y'})}$. 
It is Equation 10 of the paper. 

In the description of cross-entropy within PyTorch doc, the form is: 
$\ell(x, y) = L = \{l_1,\dots,l_N\}^\top, \quad l_n = - \sum_{c=1}^C w_c \log \frac{\exp(x_{n,c})}{\exp(\sum_{i=1}^C x_{n,i})} y_{n,c}$. 
The doc's link is: https://pytorch.org/docs/1.10.0/generated/torch.nn.CrossEntropyLoss.html?highlight=cross%20entropy#torch.nn.CrossEntropyLoss. 

We can see that the two forms are the same. We also describe the information-theoretic motivation behind this form. Hence, it may help people understand the rationale behind the form with probabilities. 

If possible, can you please consider citing our paper? The BibTeX is as follows: 
@article{qin2019rethinking,
  title={Rethinking softmax with cross-entropy: Neural network classifier as mutual information estimator},
  author={Qin, Zhenyue and Kim, Dongwoo and Gedeon, Tom},
  journal={arXiv preprint arXiv:1911.10688},
  year={2019}
}

Thank you! 

cc @brianjo @mruberry @albanD @jbschlosser @walterddr
Repository: flutter
Issue: [DropdownButton] Fix highlight behavior
Labels: framework,f: material design,f: focus,has reproducible steps,found in release: 2.6,team-design,triaged-design

DropdownButtonFormField highlights and unhighlight quickly when tapping 

### Expected behavior
Widget should be once and should stay highlighted until focus is moved to another widget



<details> 
<summary>minimal code sample</summary> 

```dart
import 'package:flutter/material.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({Key? key}) : super(key: key);

  @override
  _State createState() => _State();
}

class _State extends State<MyHomePage> {
  int? dropdownValue = 1;
  final List<int> hugeMenuItems = List<int>.generate(100, (int index) => index);
  late FocusNode focusNode;

  @override
  void initState() {
    super.initState();
    focusNode = FocusNode();
  }

  @override
  void dispose() {
    focusNode.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Title'),
      ),
      body: Column(
        children: <Widget>[
          const TextField(),
          DropdownButton(
              focusNode: focusNode,
              value: dropdownValue,
              onTap: () {
                print('FocusNode has focus: ${focusNode.hasPrimaryFocus}');
              },
              items: hugeMenuItems.map<DropdownMenuItem<int>>((int item) {
                return DropdownMenuItem<int>(
                  key: ValueKey<int>(item),
                  value: item,
                  child: Text(item.toString(),
                      key: ValueKey<String>('Text $item')),
                );
              }).toList(),
              onChanged: (int? value) {
                setState(() => dropdownValue = value);
              }),
        ],
      ),
    );
  }
}
``` 
	
</details>





Also address https://github.com/flutter/flutter/pull/93716#issuecomment-985471665
Repository: go
Issue: x/crypto/ssh: rsa-sha2-256/rsa-sha2-512 tracking issue
Labels: NeedsFix,umbrella

OpenSSH migrated the `ssh-rsa` key type, which historically used the `ssh-rsa` signature algorithm based on SHA-1, to the new `rsa-sha2-256` and `rsa-sha2-512` signature algorithms.

x/crypto/ssh was not ready for the key type / signature algorithm mismatch, so it needs a few changes. Moreover, OpenSSH implemented a few mechanisms at the same time to enable the rollout, which we need to assess and expose.

This is a tracking issue for the effort in general. Here's a list of not-duplicate related issues:

- [x] #37278
    - Fixed by https://golang.org/cl/220037
- [x] #46569
- [x] #49269
- [x] #39885
- [x] #53391
- [x] #36261
   - [x] #52132

We'll also need some tests against OpenSSH proper, like the crypto/tls recorded tests against OpenSSL, since https://golang.org/cl/220037 turned out to be a partial fix.
Repository: node
Issue: Unify node.gyp code styling
Labels: build,gyp

### Version

16.13.1, maybe also 17.2.0 (not tested myself)

### Platform

Microsoft Windows NT 10.0.19043.0 x64

### Subsystem

node.gyp

### What steps will reproduce the bug?

In #40481, it combines multiple lines of strings with `\` before a line break.
See [node/node.gyp at master · nodejs/node](https://github.com/nodejs/node/blob/master/node.gyp#L1479)

This `\` causes an error in gyp-parser [addaleax/gyp-parser: GYP file format parser in JS](https://github.com/addaleax/gyp-parser).

I looked at the .gyp docs [GYP - Input Format Reference](https://gyp.gsrc.io/docs/InputFormatReference.md), I wasn't sure if it allowed to combine multiple lines of strings with `\`.

But any way, it doesn't match code styling in the same file.
In other places, multiple lines are combined like
```
['"foo" and '
 '"bar"', {
}]
```
[#L79](https://github.com/nodejs/node/blob/master/node.gyp#L79)
[#L849](https://github.com/nodejs/node/blob/master/node.gyp#L849)

I think [#L1479](https://github.com/nodejs/node/blob/master/node.gyp#L1479) should follow the same code styling.


### How often does it reproduce? Is there a required condition?

Always since 16.13.1


### What is the expected behavior?

Do not cause errors in other modules.


### What do you see instead?

Parse error in [gyp-parser](https://github.com/addaleax/gyp-parser).

### Additional information

_No response_
Repository: pytorch
Issue: [feature request] `quantized::linear_dynamic` on CUDA/eager, and other quantized and low-level int8 operators (matmul, gemm etc) on CUDA + integrate LLM.int8 + integrate ZeroQuant?
Labels: oncall: quantization,module: cuda,triaged

It's useful to be able to run a quantized transformer exported TorchScript model on CUDA even if some quantized operators are performed by dequant/conversion to float32/requant (some sort of temporary "polyfill"). E.g. `quantized::linear_dynamic` (also requested at https://discuss.pytorch.org/t/does-dynamic-quantization-support-gpu/119231)

For TorchScript context, is it possible to manually patch `torch.ops.quantized.linear_dynamic` to support CUDA? Maybe via some manual op registration / dispatch? Otherwise, is there a method to convert a TorchScript model to do without quantization? (via some FX transforms?)

Maybe relevant to huggingface as well especially if it's for inferencing a pretrained frozen quantized BERT as part of larger model.

Thanks!

cc @jerryzh168 @jianyuh @raghuramank100 @jamesr66a @vkuzo @jgong5 @Xia-Weiwen @leslie-fang-intel @ptrblck @ngimel
Repository: go
Issue: cmd/go: occasional network and server errors in tests that connect to rsc.io
Labels: Testing,NeedsInvestigation

```
#!watchflakes
post <- pkg ~ `cmd/go` && `(reading |Get ")https://(swtch.com|rsc.io).*(connection reset by peer|network is unreachable|Internal Server Error)`
```

`greplogs --dashboard -md -l -e 'Get "https://rsc\.io/.*read: connection reset by peer' --since=2021-01-01`

[2021-12-01T10:19:34-0e1d553/linux-386-longtest](https://build.golang.org/log/e20cc61b45593649035baa4eb28af38d5c45d217)
[2021-11-24T20:51:25-5d8c49a/linux-386-longtest](https://build.golang.org/log/81d8f90150cfc63e553f7a5d2be6e38857827d67)
[2021-11-16T17:13:33-29ec902/linux-386-longtest](https://build.golang.org/log/672b506e0ffc793d64e45c97f9c0401055d8c014)
[2021-11-15T19:24:28-9265558/linux-386-longtest](https://build.golang.org/log/88eb4b4d2d334e84f75ecbce00857fa4946725c2)
[2021-09-30T18:10:18-205640e/linux-amd64-longtest](https://build.golang.org/log/fc8e6a2b7f41e2cb5dea7b10a5583cc6108805e2)
[2021-02-24T19:25:49-bf48163/linux-386-longtest](https://build.golang.org/log/6ccdecd5fe266a994bc1f4957c5453cf2cc1b928)
[2021-02-23T21:49:20-0458d8c/linux-amd64-longtest](https://build.golang.org/log/845bdc6478015e8834f8d4f5a4bbe40969a20145)
[2021-02-13T15:15:13-66c2709/linux-amd64-longtest](https://build.golang.org/log/473f2f2dc756b17fe39877b257b5177cd851c12f)
Repository: rust
Issue: Consider suggesting to folks that they wanted a `Vec` when they passed a slice
Labels: A-diagnostics,T-compiler

<!--
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
along with any information you feel relevant to replicating the bug.

If you cannot produce a minimal reproduction case (something that would work in
isolation), please provide the steps or even link to a repository that causes
the problematic output to occur.
-->

Given the following code: <!-- Please provide a link to play.rust-lang.org -->

```rust
fn manipulate_vec(v: &[&str]) {
    v.retain(|i| i.starts_with("h"))
}

fn main() {
    let v = vec!["hello", "goodbyte"];
    manipulate_vec(&v); 
    println!("{:?}", v);
}
```

[playground link](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=1b4320d5427afea9ab3e55d18a66ab75)

The current output is:

```
error[E0599]: no method named `retain` found for reference `&[&str]` in the current scope
 --> src/main.rs:2:7
  |
2 |     v.retain(|i| i.starts_with("h"))
  |       ^^^^^^ method not found in `&[&str]`

For more information about this error, try `rustc --explain E0599`.
error: could not compile `playground` due to previous error
```

<!-- The following is not always necessary. -->
This is absolutely right, but maybe we can be more helpful here?

```
error[E0599]: no method named `retain` found for reference `&[&str]` in the current scope
 --> src/main.rs:2:7
  |
2 |     v.retain(|i| i.starts_with("h"))
  |       ^^^^^^ method not found in `&[&str]`

  |
  | Vec has a method called 'retain'. Perhaps you meant for your method to take a Vec instead
  | of a slice?
1 |     fn manipulate_vec(v: &[&str]) {
  |                          ^^^^^^^
  |          consider: fn manipulate_vec(v: &mut Vec<&str>) {

For more information about this error, try `rustc --explain E0599`.
error: could not compile `playground` due to previous error
```

A (relative) Rust newbie hit this whilst attempting Advent of Code this year and it wasn't obvious to them what they were doing wrong. I don't know how easy it would be to add a special diagnostic here (especially given there are mut-vs-non-mut issues) and whether `Vec` is sufficiently special to justify it, but I thought I'd pass the idea on.

The Rust newbie keeps saying how great Rust error messages are 👍
Repository: react-native
Issue: No support for 120Hz in React Native
Labels: Needs: Triage :mag:,Never gets stale

### Description

React Native does not support ProMotion on iOS 15 with iPad Pro or iPhone 13 Pro, the performance monitor display up to 64FPS, how can I fix this 

Setup: 
- Macbook M1 Monterey 
- Xcode 13 
- iOS 15 Real device 
- react native 0.66.3

### Version

0.66.3

### Output of `react-native info`

iOS Running app on iPhone 13 Pro Max

### Steps to reproduce

Use iPhone 13 Pro Max with Performance monitor

### Snack, code example, screenshot, or link to a repository

_No response_
Repository: material-ui
Issue: [TextField] Support for the multiple attribute on type=email
Labels: new feature,component: text field

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Summary 💡

The HTML Input type can accepts an attribute of "Multiple" which would allow to have multiple emails separated by a comma.

Using multiline on a textfield doesn't really work since you can have lots of empty lines which wouldn't be possible with the input type="email"

### Examples 🌈

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/email

### Motivation 🔦

I've been trying to implement this in an application that wants to allow for multi email inputs
Repository: rust
Issue: Apparent infinite loop when passing infinitely recursive type using Iterator::filter
Labels: A-type-system,T-compiler,C-bug,I-hang,T-types

I tried this code:

```rust
fn recur(lines: impl Iterator) {
    recur(lines.filter(|_| true))
}

fn main() {
    recur([0u8].into_iter());
}
```

I expected the compiler would provide an error message, akin to `reached the recursion limit while instantiating`.

Instead, the compiler appears to hang indefinitely — I killed the process after a while.

### Meta

```
% rustc +stable --version --verbose
rustc 1.57.0 (f1edd0429 2021-11-29)
binary: rustc
commit-hash: f1edd0429582dd29cccacaf50fd134b05593bd9c
commit-date: 2021-11-29
host: aarch64-apple-darwin
release: 1.57.0
LLVM version: 13.0.0

% rustc +nightly --version --verbose
rustc 1.59.0-nightly (acbe4443c 2021-12-02)
binary: rustc
commit-hash: acbe4443cc4c9695c0b74a7b64b60333c990a400
commit-date: 2021-12-02
host: aarch64-apple-darwin
release: 1.59.0-nightly
LLVM version: 13.0.0
```
Repository: opencv
Issue: SIFT detectAndCompute crashes without error when run on a large (4000x3000) input image
Labels: duplicate,category: features2d

##### **System information (version)**
OpenCV 4.5.4
Running on Android 9
Compiled using Android Studio Native C++ (not sure what compiler that uses)

##### **Detailed description**

SIFT detectAndCompute() crashes when run with a large (4000x3000) input image. There is no error message.

Reducing the resolution by half causes this function and subsequent matching etc, to work correctly.

Link to stack exchange post:
https://stackoverflow.com/questions/70211684/opencv-sift-detectandcompute-crashes-without-error-on-android/70220120#70220120

##### **Steps to reproduce**

Stripped down offending function:

```
    void process_image(char* in_filepath,char* out_filepath){

        Mat usr_img = imread(in_filepath); //read large photo from disk (mine was 4000x3000)
        //resize(usr_img,usr_img,Size(),0.5,0.5,INTER_CUBIC); //uncommenting fixes issue

        Ptr<SIFT> detector = SIFT::create();
        //Ptr<ORB> detector = ORB::create(); //detectAndCompute works if I use this instead

        //generate all white mask for the usr image
        Mat usr_mask = Mat(usr_img.cols,usr_img.rows, CV_8UC1, Scalar(255.0));

        //detect keypoints
        std::vector<KeyPoint> usr_keypoints;
        Mat usr_descriptors;
        detector->detectAndCompute(usr_img,usr_mask,usr_keypoints,usr_descriptors);
    } 
```

Execution hits detectAndCompute while debugging, and then the program crashes. When the code is run on an emulated phone, the device actually locks up and need to be cold booted to work again.