sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: Dimension reducing variants of bitwise operations (bitwise_or, bitwise_and, bitwise_xor)
Labels: triaged,function request,module: reductions

## 🚀 Feature
Function for reducing tensor along specified dim with bitwise operations.

## Motivation

In my project I have a need to reduce my tensors along some dimensions with a bitwise operations.

## Pitch

In pytorch I can reduce my tensor along dim in multiple ways (like t.min(dim=0), t.sum(dim=0), t.any(dim=0), t.all(dim=0). 
Unfortunately it's not yet possible to reduce dimension with a bitwise operation like bitwise_or, bitwise_xor, bitwise_and.

Possible method headers could look like this:

```
def bitwise_or(dim=None, keepdim=False)
def bitwise_and(dim=None, keepdim=False)
def bitwise_xor(dim=None, keepdim=False)
```

Currently in BoolTensor there are two special methods `any(dim)` and `all(dim)` that implements logical or/and reduction. Bitwise_or/bitwise_and could be a generalization of those two to other tensor types. (Similarly as & operator that is a bitwise operation for non Bool tensors, and a logical one for BoolTensor)

Possibly loosely connected to https://github.com/pytorch/pytorch/pull/26824 - however it seems like it's only a pytorch distributed reduction method, not a tensor API one.

## Alternatives

I implemented binary reducing operations in python using builtin pytorch functions with a loop along dimension dim. I imagine that implementing those directly in C++/CUDA could yield performance boost.
Repository: godot
Issue: yield "node_added" executed multiple times
Labels: bug,topic:core

**Godot version:** 3.2.1 stable
**OS/device including version:** Ubuntu

**Issue description:** 
Adding nodes to the tree after `yield`ing for `node_added` to be emitted, will execute the yield again. This leads to a stack overflow

As a workaround you can just use `call_deferred("add_child", ...)` instead of the second `add_child(...)`

**Steps to reproduce:** 
The following script illustrates the problem, just add it to a button's script:
```
extends Button

func _pressed() -> void:
	call_deferred("add_child", Node.new())
	yield(get_tree(), "node_added")
	add_child(Node.new())
```

**Minimal reproduction project:** 
[yield.zip](https://github.com/godotengine/godot/files/4398618/yield.zip)
Repository: rust
Issue: Tracking Issue for {BTreeMap,BTreeSet}::extract_if
Labels: A-collections,T-libs-api,B-unstable,C-tracking-issue,Libs-Tracked

This is a tracking issue for the Implementation of a `extract_if` method on `BTreeMap` and `BTreeSet`, similar to the one in LinkedList and in Vec (#43244).
The feature gate for the issue is `#![feature(btree_extract_if)]` (previously `btree_drain_filter`)

### About tracking issues

Tracking issues are used to record the overall progress of implementation.
They are also uses as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however *not* meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.

### Steps

- [x] Implement suboptimally, relying on an `Ord` bound: efficient for simple and common cases, but falling back on a coarse restart after complicated removals.
- [x] ~~Possibly adjust the underlying tree representation (using `Cell`s).~~
- [x] Implement all cases without relying on an `Ord` bound, tracking every adjustment
- [ ] Adjust documentation ([see instructions on rustc-dev-guide][doc-guide])
- [ ] Stabilization PR ([see instructions on rustc-dev-guide][stabilization-guide])

[stabilization-guide]: https://rustc-dev-guide.rust-lang.org/stabilization_guide.html#stabilization-pr
[doc-guide]: https://rustc-dev-guide.rust-lang.org/stabilization_guide.html#documentation-prs

### Unresolved Questions
- Do we want the `Ord` bound on `drain_filter` (that is currently not required)?
- Do we need to implement some post-panic guarantees beyond memory leaks, like the undocumented guarantees that `Vec::drain_filter` and `LinkedList::drain_filter` provide, as I tried to discuss in #67290?
- The unstable book seems abandoned - [the other drain_filter is listed](https://doc.rust-lang.org/unstable-book/library-features/drain-filter.html) but generated from somewhere.

### Implementation history
- Remove the `Ord` bound on `DrainFilter` (not on `drain_filter`) (#70843)
- Keep track of position when deleting from a `BTreeMap` (#70795)
- Initial suboptimal implementation (#68770)
- Related attempt to implement `drain` and `retain` (#66747)
- #104455
Repository: godot
Issue: When "use bezier curves" active animation not working properly 
Labels: bug,topic:core

**Godot version:** 3.2

**OS/device including version:** Manjaro arc linux

**Issue description:** I am working on skeloton animation. And when i insert key with use bezier curves activated Some bones rotation change to 0.  when i deselect "use bezier curves" working normal. 
i got screen record to show what issue

[![Watch the video](https://streamable.com/38jdy)](https://streamable.com/38jdy)

**Steps to reproduce:** 

**Minimal reproduction project:**
Repository: PowerToys
Issue: [FancyZones] Feature Request: add hotkey to increment/decrement number of zones in template layouts. 
Labels: Idea-Enhancement,Help Wanted,Product-FancyZones

# Summary of the new feature/enhancement

When using one of the template layouts the user needs to open the settings window each time they want to increase or decrease the number of zones. It would be more convenient if fancy zones provided a keybinding to do this without opening the settings window.

# Proposed technical implementation details

Add logic in FancyZones.cpp to respond to a keypress and increment/decrement the zone-count for the active layout.

I have created a local branch that implements this feature using win+ctrl+oem_plus/oem_minus. Further work would be needed to have this setting be optional or to make this binding customisable.
Repository: neovim
Issue: spell checker integration
Labels: enhancement,status:blocked-external,has:vim-patch,spell

As mentioned in https://github.com/neovim/neovim/issues/356 would be great to have external spellchecking.

I noticed there was some work on hunspell https://github.com/vim/vim/pull/2500 , but nothing finished.

Is any chance to integrate enchant or nuspell https://nuspell.github.io/ (or at least older hunspell) as an option to Neovim?

Please keep this at least as placeholder to track progress. @mcepl
Repository: flutter
Issue: Bad PlatformView performance on Android
Labels: platform-android,engine,c: performance,a: platform-views,c: rendering,perf: speed,P2,team-android,triaged-android

I'm trying to integrate native OpenGL rendering by exposing GLSurfaceView as PlatformView.
On my Nexus 6P (Android 8.1) the performance is quite bad, rendering is not smooth.

Here is a complete example:
https://github.com/t-artikov/flutter_platform_view_test

<details>
<summary>flutter doctor -v</summary>

```
[✓] Flutter (Channel master, v1.16.4-pre.18, on Linux, locale en_US.UTF-8)
    • Flutter version 1.16.4-pre.18 at /home/timur/flutter
    • Framework revision c8efcb632b (2 days ago), 2020-03-27 22:31:01 -0700
    • Engine revision 3ee9e3d378
    • Dart version 2.8.0 (build 2.8.0-dev.18.0 1402e8e1a4)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /home/timur/Android/Sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.2
    • ANDROID_HOME = /home/timur/Android/Sdk
    • Java binary at: /snap/android-studio/84/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
    • All Android licenses accepted.

[✓] Linux toolchain - develop for Linux desktop
    • clang++ 9.0.0
    • GNU Make 4.1

[✓] Android Studio (version 3.6)
    • Android Studio at /snap/android-studio/84/android-studio
    • Flutter plugin version 44.0.2
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)

[✓] VS Code (version 1.43.0)
    • VS Code at /usr/share/code
    • Flutter extension version 3.8.1

[✓] Connected device (2 available)
    • Nexus 6P • ENU7N15B06000345 • android-arm64 • Android 8.1.0 (API 27)
    • Linux    • Linux            • linux-x64     • Linux

• No issues found!  
```
</details>

[Observatory timeline](https://github.com/flutter/flutter/files/4432099/platform_view-timeline.zip)
Repository: excalidraw
Issue: Discoverability/UX/user pain points
Labels: discussion

I've come across these feature/UI not being obvious enough for new (or even experienced) users:

- [ ] **sharing by link:** currently it's hidden under an `export` menu which isn't at all obvious it should contain that feature. (case 1: did a usability test with a colleague; case 2: https://github.com/excalidraw/excalidraw/pull/1094)
- [ ] **multi-line arrows/lines:** people don't tend to read the hint even if it's in their face. Or maybe they skim it and not understand it properly.
- [x] **multiline text** https://github.com/excalidraw/excalidraw/issues/939
- [ ] **double-click to enter text (and potentially center to element)** https://github.com/excalidraw/excalidraw/issues/938
Repository: pytorch
Issue: Caffe2 ReshapeOpGPUTest crashes on Windows
Labels: module: tests,triaged

See https://app.circleci.com/pipelines/github/pytorch/pytorch/148411/workflows/eee3cc8e-867b-412c-9c3c-9c46a1da56b6/jobs/4994040
```
Running "C:\Users\circleci\project\build\win_tmp\build\torch\test\reshape_op_gpu_test.exe"
Running main() from ..\third_party\googletest\googletest\src\gtest_main.cc
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from ReshapeOpGPUTest
[ RUN      ] ReshapeOpGPUTest.testReshapeWithScalar
+ cleanup
```
Repository: rust
Issue: Misleading E0583 when attempting to compile a file that includes itself as a module
Labels: C-enhancement,A-diagnostics,T-compiler,D-papercut,D-newcomer-roadblock

If we have any file `aaa.rs` and `example.rs` in the same directory, where `example.rs` contains:

```rust
mod aaa;
mod example;
```

Compiling `example.rs` with `rustc example.rs` gives an error about being unable to find `aaa`, rather than an error about `example.rs` importing itself as a module:

```
$ rustc example.rs
error[E0583]: file not found for module `aaa`
 --> example.rs:1:5
  |
1 | mod aaa;
  |     ^^^
  |
  = help: name the file either example/aaa.rs or example/aaa/mod.rs inside the directory ""

error: aborting due to previous error

For more information about this error, try `rustc --explain E0583`.
```

<details>
<summary>The error message with <code>rustc +nightly</code>.</summary>

```
error[E0583]: file not found for module `aaa`
 --> example.rs:1:1
  |
1 | mod aaa;
  | ^^^^^^^^
  |
  = help: to create the module `aaa`, create file "example/aaa.rs"

error[E0583]: file not found for module `example`
 --> example.rs:2:1
  |
2 | mod example;
  | ^^^^^^^^^^^^
  |
  = help: to create the module `example`, create file "example/example.rs"

error[E0601]: `main` function not found in crate `example`
 --> example.rs:1:1
  |
1 | / mod aaa;
2 | | mod example;
  | |____________^ consider adding a `main` function to `example.rs`

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0583, E0601.
For more information about an error, try `rustc --explain E0583`.
```

</details>

**I expected to see this happen:** `rustc` give an error about `mod example;` in `example.rs`.

**Instead, this happened:** `rustc` gave an error about not being able to find the *first* import in the file *relative* to `example.rs` *as a module.*

The error messages are a little bit better on nightly, but still misleading.

<details>
<summary>Shell script to reproduce the issue.</summary>

```bash
#!/usr/bin/env bash
pushd "$(mktemp --directory)" > /dev/null || exit

touch aaa.rs
echo "mod aaa;" > example.rs
echo "mod example;" >> example.rs
rustc example.rs

popd > /dev/null || exit
```

</details>

### Meta
<!--
If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions.
-->

`rustc --version --verbose`:
```
rustc 1.42.0 (b8cedc004 2020-03-09)
binary: rustc
commit-hash: b8cedc00407a4c56a3bda1ed605c6fc166655447
commit-date: 2020-03-09
host: x86_64-unknown-linux-gnu
release: 1.42.0
LLVM version: 9.0
```

`rustc +nightly --version --verbose`:
```
rustc 1.44.0-nightly (1057dc97a 2020-03-20)
binary: rustc
commit-hash: 1057dc97afce39ff6a224966ece3ed438af4c1f5
commit-date: 2020-03-20
host: x86_64-unknown-linux-gnu
release: 1.44.0-nightly
LLVM version: 9.0
```

The error messages are the same with `RUST_BACKTRACE=1` on the stable and nightly compilers.
Repository: godot
Issue: Using print_line from the destructor of a tool class in a GDNative library crashes Godot on exit
Labels: bug,topic:gdextension,crash

Godot 3.2.1
Windows 10 64 bits

I made an editor plugin which instanciates a C++ NativeScript (GDNative) to speed up some things. This class inherits `Reference` and gets freed when Godot quits.
As I often do to debug some of my classes, I used `Godot::print` in the destructor of that class. It gets destroyed when my editor plugin gets destroyed, because it is stored in one of its member variables.
However, this causes Godot to crash on exit.

The call stack to this is unbelievably long. It starts from the scene tree destroying its root, which goes to *predelete* the `EditorNode` (the one in GDCLASS), gets to destroy my plugin (I guess?), which destroys the class, which prints, goes to `EditorNode::_print_handler`, and leads to the `RichTextLabel` of the editor... which was freed already.
It looks like the print handler is not being told that the console output has been freed and still references a dangling pointer?
Indeed, `print_handler` is only removed in `~EditorNode`, but `~EditorNode` has not been called yet.

```cpp
void EditorNode::_print_handler(void *p_this, const String &p_string, bool p_error) {
	EditorNode *en = (EditorNode *)p_this;
	en->log->add_message(p_string, p_error ? EditorLog::MSG_TYPE_ERROR : EditorLog::MSG_TYPE_STD);
}
```
This print handler should be setup and deinitialized by `EditorLog`, not `EditorNode`.

![image](https://user-images.githubusercontent.com/1311555/77863613-8d634c80-721b-11ea-892b-8b3e510e5a78.png)

This is happening in a large plugin and making a simple one means going through a lot of steps (and only for Windows) so I don't have a simple test project at the moment.

However, reproduction steps with this project are simple:
http://zylannprods.fr/dl/godot/gdnative_hterrain_repro_crash_on_exit.zip
On Windows, just launch the editor on this project, with debugger attached, and close it.
This project contains a precompiled debug dll compiled with msvc.
Repository: godot
Issue: Item of PopupMenu not selectable on first click if no mouse motion.
Labels: bug,topic:input,topic:gui

**Godot version:**
3.2.1

**OS/device including version:**
Windows 10 Pro

**Issue description:**
PopupMenu of a MenuButton with action_mode set to button release is not selectable on the first click if their is no mouse motion or if you consume the InputEventMouseMotion. On windows you would probably not notice since you always hover the menu item before clicking on it. However it is a problem on Mobile since I need to touch the menu twice to select it. If I make a "big" touch it works because it detects drag motion a little bit but does not work on quick touch. The second quick touch works every time. 

**Steps to reproduce:**
1) Attache this script on a MenuButton and run it.
```
extends MenuButton


func _ready():
	get_popup().add_item("item 1", 1)
	get_popup().connect("gui_input", self, "_on_PopupMenu_gui_input" )
	connect("pressed", self, "_on_Button_pressed")
	action_mode = BaseButton.ACTION_MODE_BUTTON_RELEASE
	flat = false

func _on_Button_pressed():
	get_popup().popup()


func _on_PopupMenu_gui_input(event):
	if event is InputEventMouseMotion:
		get_popup().accept_event()
	if event is InputEventMouseButton:
		if event.pressed:
			print("mouse button pressed on popupmenu")
		else:
			print("mouse button released on popupmenu")

```
2) Click on the button, click on the menu item, click again.
Repository: excalidraw
Issue: Support colors for ranges in text
Labels: enhancement,help wanted,Candidate P1

I often want to change a color of a single word in text. That's not currently possible. Not looking for any advanced features or more UI but this would be really handy.
Repository: pytorch
Issue: Caffe2 utility_ops_gpu_test fails on Windows
Labels: module: tests,triaged

From https://app.circleci.com/pipelines/github/pytorch/pytorch/148427/workflows/3844733c-9ac5-4003-b085-d73172e4272b/jobs/4994613
```
Running "C:\Users\circleci\project\build\win_tmp\build\torch\test\utility_ops_gpu_test.exe"
Running main() from ..\third_party\googletest\googletest\src\gtest_main.cc
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from UtilityOpGPUTest
[ RUN      ] UtilityOpGPUTest.testReshapeWithScalar
"utility_ops_gpu_test" failed with 3
+ cleanup
```
Repository: youtube-dl
Issue: [youtube] -f to merge video with two audio tracks
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.03.24. 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.03.24**
- [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.
-->

There are surround sound audio tracks popping up on YouTube now, and I'd like to mux both a stereo and a multi-channel track into the file using something like `--format 313+258+251`, so that the resulting file can be played on both stereo and surround setups without sounding bad.

But that gives the error:
```
[youtube] fbyIYXEu-nQ: Downloading webpage
ERROR: The first format must contain the video, try using "-f 251+258"
ERROR: 'NoneType' object is not subscriptable
```

Example video is the Vsauce Mindfield series: [https://www.youtube.com/watch?v=fbyIYXEu-nQ](https://www.youtube.com/watch?v=fbyIYXEu-nQ)

The example formats would be:
```
251          webm       audio only tiny  147k , opus @160k (48000Hz), 21.18MiB
258          m4a        audio only tiny  388k , m4a_dash container, mp4a.40.2 (48000Hz), 63.82MiB
313          webm       3840x2160  2160p 18419k , vp9, 24fps, video only, 2.39GiB
```

And I expect ffmpeg to mux them into a Matroska file. I know I could download the individual tracks and then mux them together manually, but I like how youtube-dl is able to embed thumbnails, metadata, subtitles and descriptions in one go.
Repository: flutter
Issue: Text widget should allow for other line-breaking algorithms
Labels: framework,engine,a: typography,customer: crowd,c: proposal,P3,team-engine,triaged-engine

Currently the Text widget uses a **greedy** algorithm to apply line-breaks. Words are laid out until they don't fit, and then it continues in the next line.

I suggest there should be an option to choose other, better, line-breaking algorithms:

    enum LineBreakAlgorithm { 
          greedy, 
          minimumRaggedness, 
          totalFit, 
          custom 
    }

    Text({ ...
        List<int> Function(ParagraphInfo) customLineBreakAlgorithm,
        LineBreakAlgorithm lineBreakAlgorithm = LineBreakAlgorithm.greedy})

The `LineBreakAlgorithm.minimumRaggedness` could implement one of the algorithms shown here: 

- https://xxyxyz.org/line-breaking.

The `LineBreakAlgorithm.totalfit` could implement the **total-fit** line breaking algorithm, by Donald Knuth and Michael Plass, which is considered the best there is, and is used in TeX and Adobe InDesign:

- http://www.eprg.org/G53DOC/pdfs/knuth-plass-breaking.pdf
- https://github.com/robertknight/tex-linebreak
- https://github.com/baskerville/paragraph-breaker
- https://cs.uwaterloo.ca/~dberry/ATEP/StudentLectures/Ananya.pdf
- https://news.ycombinator.com/item?id=1134342
- https://www.tug.org/TUGboat/tb21-3/tb68fine.pdf
- https://www.students.cs.ubc.ca/~cs-490/2015W2/lectures/Knuth.pdf
- https://fastapi.metacpan.org/source/MWARD/Text-Reflow-1.17/Reflow.pm
- https://github.com/jaroslov/knuth-plass-thoughts/blob/master/plass.cpp (C++)
- https://gist.github.com/allen-chin/fb660a1fc77b00d1bdce25adb567dc0e (Java)
- https://github.com/manifoldco/ansiwrap/blob/master/ansiwrap.go (Go)

The `LineBreakAlgorithm.custom` would accept a custom algorithm that would return a list of positions (indexes in the text string) where the line-breaks should be applied. This would allow us to do cool stuff like make text into circular or triangular shapes.