sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: cmd/gofmt: rewrite removes comments
Labels: NeedsInvestigation

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.15 linux/amd64
</pre>

### Does this issue reproduce with the latest release?
Yes (with 1.15.3)

### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="$HOME/.cache/go-build"
GOENV="$HOME/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="$HOME/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="$HOME/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/lib/google-golang"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/google-golang/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build684341242=/tmp/go-build -gno-record-gcc-switches"
</pre></details>

### What did you do?

```
$ cat gofmt_ex.go
package tmp

var Entities = []*upb.Entity{
	// This is a comment.
	upb.Entity_builder{Name: proto.String("alpha")}.Build(),
	upb.Entity_builder{Name: proto.String("beta")}.Build(),
}

$ gofmt -d -r 'upb.Entity_builder{Name: proto.String(n)}.Build() -> Entity(n)' gofmt_ex.go
```

### What did you expect to see?

The comment should stay intact.
```
diff -u gofmt_ex.go.orig gofmt_ex.go
--- gofmt_ex.go.orig
+++ gofmt_ex.go
@@ -1,7 +1,7 @@
 package tmp
 
 var Entities = []*upb.Entity{
 	// This is a comment.
-	upb.Entity_builder{Name: proto.String("alpha")}.Build(),
-	upb.Entity_builder{Name: proto.String("beta")}.Build(),
+	Entity("alpha"),
+	Entity("beta"),
 }
```
### What did you see instead?

The comment is replaced by a blank line.
```
diff -u gofmt_ex.go.orig gofmt_ex.go
--- gofmt_ex.go.orig
+++ gofmt_ex.go
@@ -1,7 +1,7 @@
 package tmp
 
 var Entities = []*upb.Entity{
-	// This is a comment.
-	upb.Entity_builder{Name: proto.String("alpha")}.Build(),
-	upb.Entity_builder{Name: proto.String("beta")}.Build(),
+
+	Entity("alpha"),
+	Entity("beta"),
 }
```
Repository: flutter
Issue: 99th_percentile_frame_rasterizer_time_millis needs 2 tests: a fresh install and a rerun
Labels: a: tests,engine,team: benchmark,P2,team-engine,triaged-engine

After https://github.com/flutter/flutter/pull/68128 was landed the flutter_gallery is uninstalled between tests.  This has the affect that the shader cache is thrown out.  Now `99th_percentile_frame_rasterizer_time_millis` is showing a reading for an app without a full shader cache.  It would be nice if we could tweak the test so that we can measure both values, once with the cache full and once empty.

related issue: https://github.com/flutter/flutter/issues/68316

cc @liyuqian @jonahwilliams
Repository: three.js
Issue: alphaTest with fixed mipmap level sample
Labels: Suggestion

When using `alphaTest` the alpha value from map is used where the corresponding mipmap level has been used, but this causes objects to "dissolve" quickly, leaves of trees for example will disappear quickly and they end up as blank trunks.

By sampling the map for alphaTest with a fixed level this problem disappears/gets reduced enough to prevent this to happen too early. Here are 2 tests, the first using the sample from map and the second using fixed mipmap level.

_Using diffuseColor.a from map:_
![alphaTest2](https://user-images.githubusercontent.com/28584767/96322132-2f138500-1018-11eb-851a-90f155eb8ea0.png)

_Sampling again with fixed mipmap level:_
![alphaTest1](https://user-images.githubusercontent.com/28584767/96322133-2fac1b80-1018-11eb-9c12-503acc75f670.png)

You see in the first there are barely trunks left while they remain filled in the second, it generally improved finer details that tend to disappear quickly. It also could be implemented optionally as it adds another texture fetch, if MSAA is available the issue is reduced a lot as well. However, otherwise there is dissolving vegetation, hair or other which can get really ugly.

I've been using `textureLod` here, but bias with `texture2D` seems to be the same visually. I've temporarily implemented it like this:

```
#ifdef ALPHATEST

	#if defined( USE_MAP ) && __VERSION__ == 300
		float alphaTest = textureLod( map, vUv, 0.0 ).a;
		if ( alphaTest < ALPHATEST ) discard;
	#else
		if ( diffuseColor.a < ALPHATEST ) discard;
	#endif

#endif
```

**Edit**: i changed it to texture and the bias being a parameter, as it works very well with less detailed textures but can turn harshly pixelated close up with very fine detailed textures like hair, this is something that needs to be fine tuned depending on the texture details / mesh size, but for most cases it works well with some general value.
Repository: scrcpy
Issue: Remember window position
Labels: feature request

When I turn on Scrcpy, I move the window to the bottom right corner every time. So on my Acer Swift 5 with a touch screen it is very convenient to operate the phone with the right hand. Is it possible to make the previous window position remember, or to be able to specify the window position when running Scrcpy?

Acer Swift 5, Arch Linux, Gnome Shell.

Sorry for Google Translate.

![Снимок экрана от 2020-10-17 15-09-31](https://user-images.githubusercontent.com/1708881/96335609-fe206800-108a-11eb-8332-d94d70ac3459.png)
Repository: create-react-app
Issue: How to prevent console output errors.
Labels: stale,needs triage

After creating the app using creative-react-app-typescrpt, I wrote code like this:

Demo.tsx:

```jsx
import React from 'react';

interface PropsType {
	name: string,
	msg?: string,
}

const Demo: React.FC<PropsType> = (props) => {
	return(
		<div>
			<span>{props.name}</span>
			<span>{props.msg ? props.msg : "no msg"}</span>
		</div>
	);
}

export default Demo;
```

App.tsx:

```jsx
import React from 'react';
import Demo from './Demo';
import { Button } from 'antd';

function App() {
  return (
    <div className="App">
      <header className="App-header">
        <Demo name="name1"/>
        <Demo name="name2" msg="yes"/>
        <Demo name="name3" demo="yes"/>
        <Button demo="yes">button</Button>
      </header>
    </div>
  );
}

export default App;
```
.env:
```
TSC_COMPILE_ON_ERROR=true
```
this is the errors:
![图片](https://user-images.githubusercontent.com/39870481/96335835-f1f9d200-10ad-11eb-8764-b52d28101d4f.png)
directory structure
![图片](https://user-images.githubusercontent.com/39870481/96335850-0ccc4680-10ae-11eb-9dd5-28e31eff3cad.png)

package.json is the default configuration for scaffolding, with only anantd added.

If there are too many errors in the project, the console will go crazy with output errors until all errors are output in the console.

thank u.
Repository: rust
Issue: #73905 regressed several tests around associated type defaults
Labels: A-associated-items,T-compiler,C-bug,requires-nightly,F-associated_type_defaults

It seems that several test regression got ignored in #73905:
- [cyclic defaults getting accepted in concrete impl](https://github.com/rust-lang/rust/pull/73905/files#diff-5e213bb51976c3affa00f56052023bbdc2591e09068a509fe10f663d0ffe7e5eL11)
- ~[default types no longer needs to be wf](https://github.com/rust-lang/rust/pull/73905/files#diff-b6013565ee6db9e8d556c2951744ffc44e724dd2c86b97fe17998dd3347df1feL4)~

While some of the other changes are acceptable, I think the changes listed above doesn't really get justified and seems to be a regression.

cc @matthewjasper
Repository: youtube-dl
Issue: [YouTube] Get the list of IDs of the recommended videos of a video
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 2020.09.20. 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 **2020.09.20**
- [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.
-->

I'd like to retrieve the list of IDs of the suggested/recommended videos of a certain video (the ones shown on the right side in the desktop page). As it stands these are updated as we scroll through, so even just having the ones appearing at the page load would be great (I believe there are about 20).

The list of IDs could gets added by default to the JSON dump obtained with `-j`, or it could be a new simulation option `--json-related` or similar.
Repository: deno
Issue: Proposal: import.meta.test gating pattern
Labels: cli,suggestion

I'm wondering if this might be a nice pattern for inline tests:

```js
if (import.meta.test) {
  Deno.test("test", async function () {
    assert(fn(), 'value');
  });
}
```

Where the `import.meta.test` guard is automatically optimized out for bundling / runtime builds.

The above pattern would then integrate into `deno test` invocation as necessary.
Repository: terminal
Issue: terminal activity indicator/alert when in background
Labels: Issue-Feature,Help Wanted,Area-UserInterface,Product-Terminal

Problem:
Often times there's a command invoked on the shell prompt that's long running and takes a while, and the user switches to a different window and puts the terminal window in the background while waiting for this command/job to complete.  When the job completes, user is unaware this happened until the terminal window is switched back to (foreground) or user periodically peeks to see if the job has completed.

Suggestion:
If there can be some some sort of visual indicator or alert when there is terminal activity to suggest there is new output logged into the terminal, it would provide a cue to the user that the job may be complete.  If the long running job happens to continually output to the terminal this wouldn't be as useful, but most times there's a job that runs for an unpredictable amount of time and then terminal returns to the prompt.

The indicator could be a temporary flashing of the window title in the task bar, and/or a change to a different shade/color until user has acknowledged the alert.  Or may be display a badge on the title bar.  

Alternatives considered that are not viable or great:
- use unix terminal bell (I couldn't get this to work reliably while ssh'ed into different servers), also this requires user have the sound/headphones on, and is a one time event that if the user can miss (when the bell is rung), or if there are multiple windows there is no indication as to which window/pane is the one beeping.
- use some type of window pop up (would require X or some such windowing to accomplish this, and not native to terminal).
- notification systems similar to growl/notifier/etc (in MacOS) or even the Windows notification are not accessible while ssh'ed into a remote server where such long running command is run.

Terminal output based activity detection and alert seems native and logical place to do this without relying on any other system features.

--------------

_maintainer edit_: [spec here](https://github.com/microsoft/terminal/issues/7955#issuecomment-1303740796)
Repository: TypeScript
Issue: Template Literal with infer does not handle surrogate pairs
Labels: Suggestion,Awaiting More Feedback

<!-- 🚨 STOP 🚨 STOP 🚨 STOP 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section!

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ

Please fill in the *entire* template below.
-->

<!--
Please try to reproduce the issue with the latest published version. It may have already been fixed.
For npm: `typescript@next`
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly
-->
**TypeScript Version:**  4.1.0-dev.20201015

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**
template literal, surrogate pair, infer

**Code**

```ts

type Head<StrT extends string> = StrT extends `${infer HeadT}${string}` ? HeadT : never;

type Tail<StrT extends string> = StrT extends `${string}${infer TailT}` ? TailT : never;

type TestHead = Head<"𡁻">
type TestTail = Tail<"𡁻">
```

**Expected behavior:**
Should handle surrogate pairs properly

**Actual behavior:**
![image](https://user-images.githubusercontent.com/5655961/96346365-6a8a6f80-1069-11eb-8622-a91f842c3fb0.png)

![image](https://user-images.githubusercontent.com/5655961/96346433-d4a31480-1069-11eb-89ee-b7299a8138ec.png)


**Playground Link:** 
[Playground](https://www.typescriptlang.org/play?ts=4.1.0-dev.20201015#code/FAFwngDgpgBAElAhgEwDwGUQCcAqMoAeIUAdsgM4znYCWJA5gHwwC8Mmu+RpFMABgBIA3nQBmULPCTIcAX2HUsderL4wA-FJR4AXDBJQAbhIDcwUJFg5ENADYZseQsTKVFy5mw5Pur-gtoGeREScUlrOzk1TQjbXX0jU3NwaBgcKGoEFFYtNAAiQBENwG8dvMYLVPTqWJzY1EKSxiA)

**Related Issues:** 
Searched for "template literal surrogate pair" and didn't find anything
Repository: pytorch
Issue: Batchnorm support for tracking buffer statistics when using gradient accumulation 
Labels: triaged,enhancement,needs research,module: norms and normalization

## 🚀 Feature
Batchnorm support for tracking buffer statistics when using gradient accumulation

## Motivation

Without reliable access to multiple gpus for training, I'm stuck training on the cpu or with incredibly small batch sizes. Sometimes training benefits from a large batchsize, so I wanted to use gradient accumulation to have a larger effective batchsize. Manually updating batchnorm buffers is fine but messy, so it would be nice if there was a cleaner interface for it.

## Pitch

The main idea is to store tensor inputs for all forward passes when training, but don't update the buffers until triggered specifically before or after opt.step is called. When triggered, update the buffers using mean and var calculated from all of the stored tensor inputs.

The solution I've implemented and have been using on my local machine is to add two parameters to the _BatchNorm class: 'accumulate' (bool, default False) to flag accumulate mode and 'accumulate_device' (device name, default 'cpu') to indicated where input batch values should be stored until buffer updates are done (to calculate variance, all inputs have to be saved--since the goal is to save as much memory as possible on the gpu, I thought it would be good to allow flexible storage of this data). 

self.buffers and self.num_batches_tracked should only be updated when parameters are updated with the accumulated gradients, so I made a separate function to call before opt.step() using apply (model.apply(accumulate_step)) that checks module type and updates buffers and increments self.num_batches_tracked. Since minibatches might be as small as 1, currently I am using the buffer (rather than minibatch statistics) to to normalize the output into the next layer. 

Honestly, I'm not sure what effect this has on the training yet, but it seems beneficial over using the minibatch statistics given such small minibatch sizes.

## Alternatives

An alternative feature I considered would be to store the running mean and variance rather than storing every input (this would further reduce the memory overhead). However, I'm not aware of a reliable way to calculate a running variance.
Repository: rust
Issue: Incompatible type for trait should be reported before type checking the impl
Labels: C-enhancement,A-diagnostics,T-compiler

Suppose a user writes a trait and an impl while making a typo in the function header in impl (could be as simple as forgetting `&`).
Also suppose there are type errors in the body of the impl.

Currently, the compiler informs about the type errors and *after* the user fixes them it reports incompatible type for trait. There's a pretty good chance the user has to fix the impl again, possibly re-writing the same spots that were rewritten before. This can be pretty frustrating, especially during heavy refactors when it can happen more than once. (Source: just happened to me.)

It'd be much better if incompatible type for trait was reported *before* type checking the impl as the user can then avoid rewriting the impls. I also think that information about type errors in trait fns is probably irrelevant until the headers are fixed, so not displaying it would make sense. (But I can live with it being displayed as long as it's displayed **after** incompatible type for trait.)

This is loosely related to #65256, but not same, so I felt that opening a separate issue is appropriate. Feel free to merge if I'm mistaken.
Repository: create-react-app
Issue: localhost:3000 not respond and not open in Browser.
Labels: stale,needs triage,issue: bug report

Check if the name of your component is the same as a styling or another imported component.
Repository: create-react-app
Issue: how to fork create-react-app from github without using npm registry 
Labels: stale,needs triage

Hi, I'm wanted to do something like npx create-react-app myappname --scripts-version git://github.com/eran-or/create-react-app.git which is the path on github (i understand that it can also be one of: git+ssh,git+https, <githubname>/<githubrepo>, github:<githubname>/<githubrepo>, https://github.com/githubname/githubrepo)

None of them not working and i get an error like this npm ERR! Can't install github:eran-or/create-react-app#6f3e32e3b16e1f8bc72cf45e0e39d8cd20685d02: Missing package name 

Which is make sense because i don't have a package name in the package.json of create-react-app repo. The thing is that npm install see all this ways as legit options, so it must be something that i missed.
I don't have the fork on npm, and npm install docs says it's valid. Also using directly facebook repo as github path not working. 
First i want to say it is mandatory to document advanced feature like forking create-react-app with all it's option in the create-react-app site and not just reference it to something partial with one use case. I'v tried a lot
of things from the web and nothing worked smoothly, a lot of ways that don't work.
Second I want to say I'v got a solution but i think github path is more easy. My solution was installing verdaccio, fork create-react-app, clone it and publish to verdaccio and then run something like : 
npx create-react-app myapp --scripts-version path/to/my/react-scripts-folder/react-scripts-3.4.1.tgz

so i'm guessing that also publish to public npm and using it will work - i didn't tried it. but how to do it without publish to registry? is there any way to use github? 
(Please provide tested simple solution in your answer, i wasted a lot of time and i want to save others that waste of time. Also i'm not sure if it's needed to be asked in stackoverflow so forgive me ahead)
Repository: flutter
Issue: `RuntimeDelegate::OnRootIsolateCreated` duplicates functionality of `Settings::root_isolate_create_callback`.
Labels: engine,P2,team-engine,triaged-engine

This is an older API and must be removed in favor of the callback in the settings. The field may need to be updated to take a collection of callbacks.
Repository: youtube-dl
Issue: Ytdl with top search result
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
Can I download youtube videos by search keyword?