sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: Performance issue of unique on CPU
Labels: module: performance,module: cpu,triaged,module: sorting and selection

Related: https://github.com/pytorch/pytorch/issues/15804 https://github.com/pytorch/pytorch/issues/18405 https://github.com/pytorch/pytorch/pull/16145 https://github.com/pytorch/pytorch/pull/18648

The performance on GPU has been fully resolved.

Newest benchmark on CPU on a tensor of shape `torch.Size([15320, 2])`:

```python
print(torch.__version__)
%timeit a.unique(dim=0, sorted=True, return_inverse=False)
%timeit a.unique(dim=0, sorted=True, return_inverse=True)
%timeit torch._unique_dim2_temporary_will_remove_soon(a, dim=0, sorted=True, return_inverse=False, return_counts=True)
%timeit torch._unique_dim2_temporary_will_remove_soon(a, dim=0, sorted=True, return_inverse=True, return_counts=True)
```

```
1.1.0a0+13f03a4
60.5 ms ± 115 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)
60.5 ms ± 150 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)
60.7 ms ± 170 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)
60.7 ms ± 217 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)
```

```python
print(torch.__version__)
%timeit a.unique(sorted=True, return_inverse=False)
%timeit a.unique(sorted=True, return_inverse=True)
%timeit torch._unique2_temporary_will_remove_soon(a, sorted=True, return_inverse=False, return_counts=True)
%timeit torch._unique2_temporary_will_remove_soon(a, sorted=True, return_inverse=True, return_counts=True)
```

```
1.1.0a0+13f03a4
308 µs ± 690 ns per loop (mean ± std. dev. of 7 runs, 1000 loops each)
906 µs ± 769 ns per loop (mean ± std. dev. of 7 runs, 1000 loops each)
60 ms ± 96.9 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)
60.2 ms ± 254 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)
```

cc @VitalyFedyunin @ngimel
Repository: flutter
Issue: Optimize RenderTransform where any scale axis == 0
Labels: framework,a: animation,c: proposal,P3,team-framework,triaged-framework

I noticed this while working on #30522 

If you introduce a `Transform.scale` that scales its children to exactly 0 on any axis (as can happen when animating the scale), we still do all the layout and painting work for those children.

Painting probably isn't a ton of work, but layout could very well be.  We document `performLayout` as _always needing to layout children_, but I think this case should be an exception for a `RenderTransform`.

The proposed logic would look something like:

- Update the `RenderTransform.transform` setter to check if the scale has gone to or from 0 -if so `markNeedsLayout`
- Update the `RenderTransform.scale` method to check if we're scaling to or from 0 - if so, `markNeedsLayout`
- Update the `RenderTransform.performLayout` to check if the scale == 0 on any axis. If so, fizzle and don't have children layout.
- Update the `RenderTransform.paint` to fizzle if the scale == 0 on any axis.

/cc @goderbauer @Hixie
Repository: godot
Issue: Y-Billboard Sprite3D does not cast shadows
Labels: bug,topic:rendering,confirmed,topic:3d

**Godot version:**
3.06.stable.official.8314054. I had also tried it on 3.1 with the same results.

**OS/device including version:**
Windows 10 Home
NVIDIA GeForce GTX 1080 with Driver Version 25.21.14.1967

**Issue description:**
3D sprites cast shadows when Depth Draw Mode is set to "Opaque Pre-Pass", but when Billboard Mode is set to "Y-Billboard" the sprite no longer casts shadows. Using the normal "Enabled" Billboard Mode works mostly as I expected "Y-Billboard" to also work (shadow is upside down but I think changing properties can fix that).    
    

![Y-Billboard Shadows](https://user-images.githubusercontent.com/15621181/55674214-90c53180-586e-11e9-91d8-d2afb7911916.png)
In this example screenshot, the closer sprite is set to "Enabled", and the farther sprite is set to "Y-Billboard". Other properties are the same.

**Steps to reproduce:**
Easiest is to open up the Minimal reproduction project and look at it.    
Otherwise get yourself a light, a plane, and a sprite. Set the sprite material Depth Draw Mode to "Opaque Pre-Pass" and set Billboard Mode to "Y-Billboard".

**Minimal reproduction project:**
[Y-Billboard Shadows.zip](https://github.com/godotengine/godot/files/3050841/Y-Billboard.Shadows.zip)
Repository: go
Issue: testing: support explicitly running non-hermetic (or non-deterministic) examples
Labels: NeedsInvestigation

We can have examples which show up in the godoc but aren't runnable, and runnable examples which are run as part of `go test`.

What about examples which are too slow or unreliable for `go test`, for example those needing access to the internet? I can make them non-runnable, but what if a user wants to give one a try? `go test -run ExampleSlow` doesn't work, and the next best option is copy-pasting into a main func, which is awkward.

The only other option, which is what I tend to do, is to stick examples as main packages elsewhere. But that's also icky; if the example packages aren't hidden, `go install ./...` will include them, and if they're hidden in another repo or in `_examples`, they are hard to find.

Another disadvantage of hiding the examples in a separate dir/repo is that `go test ./...` won't check if they compile fine; one has to remember to check that dir/repo too.

For some context, I'm trying to collapse the https://github.com/chromedp/examples into the main repo, starting with an [example_test.go](https://github.com/chromedp/chromedp/blob/504561eab2c5fb5b2e9b9b88160da2dcf2cfa199/example_test.go) file. The second and third examples are quick, but the first accesses the internet and is slow. I don't want to run it with `go test`, but I want it to show up in godoc and allow people to run it easily to try it out.

I'm not labelling this as a proposal, because I don't have a specific solution in mind; this is just a description of a problem I have when trying to document packages with non-trivial examples.

/cc @acln0 @mpvl @bcmills @ianlancetaylor
Repository: go
Issue: x/net/html: Tokenizer could track Line/Column of token
Labels: NeedsInvestigation,FeatureRequest

<!-- Please answer these questions before submitting your issue. Thanks! -->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.12.1 linux/amd64
</pre>

### Does this issue reproduce with the latest release?

Yes.

### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GOARCH="amd64"
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
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-build083125343=/tmp/go-build -gno-record-gcc-switches"
</pre></details>

### What did you do?

I wanted to get the line and column for the current Token, which forced me to fork the package. The key change is adding something like the following to the end of readByte() in token.go:
```go
	// Increment the line and column tracker
	if x == '\n' {
		z.currentLine++
		z.currentColumn = 0
	} else {
		z.currentColumn++
	}
```

### What did you expect to see?

I'd like to see a public method on Tokenizer that returns the starting and ending line/column of the current Token. The method could return a new struct with these four values. 

### What did you see instead?

There isn't a way to figure out where the token is in the input aside from byte offset. I could feed that byte offset into user code to determine where the line/column is, but then I'd have to parse the input twice and build up that lookup table first.
Repository: pytorch
Issue: ninja: build stopped: subcommand failed.
Labels: module: build,triaged

## 🐛 Bug

[446/3104] Building CXX object third_party/fbgemm/CMakeFiles/fbgemm_avx2.dir/src/FbgemmI8DepthwiseAvx2.cc.o
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
  File "setup.py", line 719, in <module>
    build_deps()
  File "setup.py", line 285, in build_deps
    build_dir='build')
  File "/home/prjs/tmp/pytorch/tools/build_pytorch_libs.py", line 278, in build_caffe2
    check_call(ninja_cmd, cwd=build_dir, env=my_env)
  File "/root/miniconda3/envs/py35/lib/python3.5/subprocess.py", line 271, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ninja', 'install']' returned non-zero exit status 1
Repository: scrcpy
Issue: screen rotation
Labels: rotation

I have a bug on my LG device where the screen on my pc is rotated 90 degrees but still functions as if the touches were not. it is similar to this issue, https://github.com/Genymobile/scrcpy/issues/186

but the reference there doesn't help me. 
![sdfgsdfgsdfg](https://user-images.githubusercontent.com/49355355/55677825-9a718800-58b4-11e9-8d2d-56521205d469.PNG)

how do i fix this bug and/or rotate the screen on my pc
Repository: go
Issue: bytes: trivial to beat ContainsAny in easy cases
Labels: Performance,help wanted,NeedsInvestigation

See this CL: https://go-review.googlesource.com/c/go/+/155965

In short, code like `bytes.ContainsAny(data, " \t")` is easy to read and write, but a simple manual implementation as follows is considerably faster:

```
any := false
for _, b := range data {
	if b == ' ' || b == '\t' {
		any = true
		break
	}
}
```

`ContainsAny` uses `IndexAny`, which already has three paths; it does nothing for empty `chars`, it builds an ASCII set if `chars` is all ASCII and over eight bytes, and otherwise it does a naive double-loop search.

I'm not sure what the right solution here would be. I think adding more special cases to `IndexAny` would probably be overkill, and even slow down the other cases because of the added code. Making the compiler treat `ContainsAny` or `IndexAny` in a special way is also undesirable.

I guess if the compiler was super smart in the future, inlined all the code and realised that our chars are just `" \t"`, it would simply inline that last naive search code. But I imagine the current compiler is far away from that possibility.

This is an unfortunate outcome, because the `bytes` and `strings` packages are very intuitive and often the fastest. I'd like to continue relying on them, without having to write my own loops by hand when they start showing up on CPU profiles.

/cc @josharian @randall77 @martisch
Repository: scrcpy
Issue: resize window to 1:1 when rotated
Labels: feature request

I want to use OBS to capture my phone's screen, and in order to ensure the resolution quality, I press Ctrl+G to make it resize window to 1:1 (pixel-perfect), but the problem is that everytime I rotate my phone, I need to press Ctrl+G again to resize the window. Could you help me to make the window fixed to 1:1 once I press Ctrl+G, thanks.
Repository: godot
Issue: Improve error reporting when rcedit fails to change icon / set PE data
Labels: enhancement,platform:windows,topic:editor,topic:porting,good first issue,usability

**Godot version:**
GoDot 3.1 Stable/ rcedit 1.1.1/wine 3.0.2


**OS/device including version:**
Ubuntu 19.04


**Issue description:**
No matter what I try, every time I export for windows .exe file does not have icon. There is no error in log. I tried everything. Using rcedit in terminal gives me error not shown in godot :0009:fixme:ver:GetCurrentPackageId (0x33fe24 (nil)): stub .I'm giving up, I'll just leave here issue in case someone know what to do with this. Nobody knew on discord, nobody on reddit, I don't know why I'm still trying...
Repository: godot
Issue: Scale operation doesn't respect that "Use pixel snap" is turned on
Labels: enhancement,discussion,topic:editor

**Godot version:**
3.1 stable

**OS/device including version:**
Windows 7 x64

**Steps to reproduce:**
1. Scene editor -> Snapping Options -> "Use Pixel Snap" is turned on,
2. Drag Sprite to Scene editor,
3. Change sprite scale using mouse

**_Result_**: when you change scale this way, sprite position changes too. And this can be half a pixel despite "Use Pixel Snap" option is on.

**_Expected_**: in my opinion it should not behave this way. Scale should get those values which not lead to integer position.

![bug2](https://user-images.githubusercontent.com/1552169/55684714-2d62fe80-5957-11e9-85bf-685ee66f7990.gif)
Repository: pytorch
Issue: torch.from_PIL() Request ?
Labels: feature,triaged,module: vision

## 🚀 Feature
A simple method for transforming a PIL images directly into torch tensor.

## Motivation
It's frustrating to use transforms for a simple conversion between a PIL image and torch tensors and in the same time it's very easy to get tensor from numpy through ```torch.from_numpy()``` 

## Pitch

Giving it a PIL images of any type and it returns a torch tensor

## Alternatives
I have considered two:
1. Transforms
2. convert it first to numpy then to torch
Repository: godot
Issue: Editor Snap/View settings doesn't saved automatically right after change
Labels: bug,topic:editor,confirmed

**Godot version:**
3.1 stable

**OS/device including version:**
Windows 7 x64

**Steps to reproduce:**
Example:
1. Turn on/off "Snap to grid",
2. Re-open project,
3. Check that "Snap to grid" setting wasn't saved 

**_Result_**:
Those settings are saved only when you save the project. 

**_Expected_**:
Settings should be saved to file right after change were made, as it is when you change IDE layout or Editor settings.

**Note**:
I guess it's relevant for every settings in "Godot/projects/%project_name%/Main.tscn-editstate-bcb0d2eb5949c52b6a65bfe9de3e985b.cfg" file, like:
snap, view, tileset, texture region, 3D

![bug4](https://user-images.githubusercontent.com/1552169/55685477-7ae36980-595f-11e9-98f8-914312e1b77e.gif)
Repository: rust
Issue: Move libtest out of tree
Labels: C-enhancement,T-libs-api,A-libtest

See: https://internals.rust-lang.org/t/a-path-forward-towards-re-usable-libtest-functionality-custom-test-frameworks-and-a-stable-bench-macro

An attempt for moving libtest out of tree was made in https://github.com/rust-lang/rust/pull/57842 , however it broke clippy in weird ways that involve interactions with the rustc build system.

It has been reverted in https://github.com/rust-lang/rust/pull/59766 so that the beta is fixed in time.

We should still work towards making this happen.

A potential plan is to:

 - Continue to improve http://github.com/rust-lang/libtest/
 - Migrate compiletest-rs to using http://github.com/rust-lang/libtest/, on pure stable
 - Make sure rustc compiletest and compiletest-rs match
 - Update clippy, miri to use new compiletest-rs, ensure this works within the rustc build system
 - Update rustc compiletest to be compiletest-rs (optional, but nice to have)
 - Update rustc libtest to reexport libtest

thoughts? @gnzlbg @xales
Repository: node
Issue: Increase buffer pool size and streams high water marks
Labels: buffer,fs,stream,performance

Our Buffer pool size is currently set to 8kb. This seems pretty low for most hardware used these days.

Similar with our default high water marks in streams (16kb for all streams besides fs readable streams that are set to 64kb).

Increasing the buffer size allows less allocations to be used in general and increasing the default high water mark reduces the number of chunks which improves the throughout a lot.

I would like to increase the buffer pool size to 128kb. The regular high water mark could increase to 64kb and the high water mark for fs to e.g., 256kb.

Those numbers are all "magical" numbers but they seem better defaults than the current ones. Please let me know if there are reasons to either not change the defaults or if you have an alternative suggestion.

It is also possible to change the Buffer's pool size default during runtime and to set each high water mark per stream.

@nodejs/fs @nodejs/streams @nodejs/buffer PTAL
Repository: fastapi
Issue: ApiKey Header documentation
Labels: good first issue,docs,confirmed,reviewed

Hi,

Do you have some documentation or example regarding configuration for ApiKey (header) and how to verify it on FastAPI ?

thanks in advance,

Rémy.
Repository: neovim
Issue: Floating windows inherit horizontal scroll offset
Labels: bug,needs:decision,needs:discussion,floatwin

- `nvim --version`: v0.4.0-545-gc5e8924f4
- Operating system/version: Mac OS Mojave
- Terminal name/version: kitty 0.13.1 
- `$TERM`: xterm-256color

Floating windows apparently inherit the horizontal scroll offset of the currently focused window, if the floating window is not being entered (`nvim_open_win({buffer}, false, {config})`)

![Kapture 2019-04-07 at 19 26 02](https://user-images.githubusercontent.com/264745/55688023-d287d200-596b-11e9-9dd1-8fd1aae5467a.gif)

I have been able to reproduce this with a _work-in-progress_ [plugin](https://github.com/tbo/notion/blob/master/index.ts#L25) of mine, but I have seen the same behavior with [coc.nvim](https://github.com/neoclide/coc.nvim):

<img width="860" alt="Screenshot 2019-04-07 at 18 48 17" src="https://user-images.githubusercontent.com/264745/55688253-87bb8980-596e-11e9-9d21-01e324cfe091.png">
Repository: godot
Issue: Shader looks different on Android (two devices; GLES2)
Labels: bug,platform:android,topic:rendering

<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->

**Godot version:**
master

**OS/device including version:**
Android (zerofltexx Ressurrection OS 9.0; matissewifi Lineage OS 7.1)


**Issue description:**
While the shader looks correct on my smartphone, on my tablet with lineage os there are strange rectangles.


**Steps to reproduce:**
![bug](https://user-images.githubusercontent.com/34406967/55689501-66b26300-5985-11e9-948a-49b72b51b3d0.jpeg)
![expected](https://user-images.githubusercontent.com/34406967/55689505-6ca84400-5985-11e9-8c02-c48b0ef18b66.jpeg)


**Minimal reproduction project:**
[Solus-Stunts-v1.0-bug.zip](https://github.com/godotengine/godot/files/6386996/Solus-Stunts-v1.0-bug.zip)
Repository: godot
Issue: ViewportTexture: Path to node is invalid
Labels: bug,topic:core,confirmed

___

***Bugsquad note:** This issue has been confirmed several times already. No need to confirm it further.*

___

**Godot version:** v3.1.stable.mono.official
<!-- Specify commit hash if non-official. -->


**OS/device including version:** Windows 10.0.17763 Build 17763
<!-- Specify GPU model and drivers if graphics-related. -->


**Issue description:**
<!-- What happened, and what was expected. -->
I created a Viewport node and had it draw some GUI. Then, on a MeshInstance (quad) I set its albedo texture to ViewportTexture and selected the viewport node (at Player/Viewport). It still came up with a preview.

When I ran the game I was met with two errors:
```
Node not found: Player/Viewport
ViewportTexture: Path to node is invalid
```
But I was still able to play the game and furthermore, the viewport still worked correctly. I took a look at the scene's `.tscn` file and found that the ViewportTexture does indeed point correctly to the Viewport node I had created.

ViewportTexture, SpatialMaterial, and QuadMesh:
```tscn
...

[sub_resource type="ViewportTexture" id=1]
flags = 1
viewport_path = NodePath("Player/Viewport")

[sub_resource type="SpatialMaterial" id=2]
resource_local_to_scene = true
flags_transparent = true
flags_unshaded = true
flags_albedo_tex_force_srgb = true
albedo_texture = SubResource( 1 )

[sub_resource type="QuadMesh" id=3]
resource_local_to_scene = true
material = SubResource( 2 )
size = Vector2( 0.3, 0.2 )

...
```

**Scene tree:**
```
 ┖╴Spatial
    ┠╴Player
    ┃  ┠╴Camera
    ┃  ┠╴Cockpit
    ┃  ┠╴Right
    ┃  ┠╴Left
    ┃  ┠╴CockpitAudio
    ┃  ┠╴GunFireCockpitAudio
    ┃  ┠╴TargetingMesh
    ┃  ┖╴Viewport
    ┃     ┖╴GUI
    ┃        ┖╴Speed
    ┠╴CSGBox
    ┖╴CSGBox2
```

This is very similar to #14790, #12781, and #19259.
**Steps to reproduce:**
Create a Viewport node, assign a ViewportTexture to a mesh, select the Viewport you made, and run the game.
Repository: rust
Issue: attribute to reserve None value on Option<enum>
Labels: A-FFI,T-lang,C-feature-request,needs-rfc,A-enum

For example:

```rust
#[repr(u8)]
#[reserved(0)]
enum Foo {
    Bar = 17,
    Baz = 32,
}

fn main() {
    assert_eq!(std::mem::size_of::<Option<Foo>>(), std::mem::size_of::<Foo>());

    let foo: Option<Foo> = None;
    let byte: u8 = std::mem::transmute(foo);
    println!("{}", byte); // Prints 0
}
```

This would be incredibly useful in FFI situations. Often there is an enum of values for which a particular value (usually zero) is reserved to represent "none" or "invalid" or "empty". This would make translation into idiomatic Rust both easy and safe.

Rust already optimizes `Option<enum>` this way. However, it always selects the highest used discriminant + 1 to represent `None` (this is likely undefined behavior). Having control over this value simply makes the behavior defined. It would also mean that the compiler could warn if there was any attempt to use the reserved value in an actual enumeration item.
Repository: godot
Issue: Socket Error 54
Labels: bug,platform:macos,topic:core

<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->

**Godot version:**
<!-- Specify commit hash if non-official. -->
3.1.stable.mono.official


**OS/device including version:**
<!-- Specify GPU model and drivers if graphics-related. -->
MacOS Mojave


**Issue description:**
<!-- What happened, and what was expected. -->
I downloaded the procedural planet generation project from:
https://github.com/Bauxitedev/stylized-planet-generator
But when I try to run it, I get the following error:
** Debug Process Started **
 drivers/unix/net_socket_posix.cpp:199 - Socket error: 54
** Debug Process Stopped **


**Steps to reproduce:**
Download this github project and try to run.


**Minimal reproduction project:**
<!-- Recommended as it greatly speeds up debugging. Drag and drop a zip archive to upload it. -->
See the github project.
Repository: flutter
Issue: Splash Animation on Icon Button is always behind the Stack
Labels: framework,f: material design,a: quality,f: gestures,has reproducible steps,P2,found in release: 3.3,workaround available,found in release: 3.7,team-design,triaged-design

## Steps to Reproduce
```dart
        bottomNavigationBar: Stack(
          children: <Widget>[
            BottomNavigationBar(
              type: BottomNavigationBarType.fixed,
              items: [
                BottomNavigationBarItem(...),
                BottomNavigationBarItem(...),
                BottomNavigationBarItem(...),
                // Imitate an invisible icon
                BottomNavigationBarItem(
                  icon: const Icon(Icons.add_circle, size: 0),
                  title: const Text(''),
                ),
              ],
              currentIndex: _selectedIndex,
              fixedColor: Colors.indigo,
              onTap: _onItemTapped,
              iconSize: 24,
            ),
            Positioned(
              right: 32.0,
              top: 8.5,
              child: CircleAvatar(
                child: IconButton(
                  splashColor: Colors.green,
                  icon: Icon(Icons.add),
                  onPressed: () {},
                ),
              ),
            )
          ],
        ),
```
## Description
As you can see the splash for the icon button is positioned behind the bottom navigation. 

| Video |
|--------|
| ![ezgif com-video-to-gif](https://user-images.githubusercontent.com/26712061/55694517-21268200-59e7-11e9-94bf-d525a9419b66.gif) |