sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: terminal
Issue: Add support for syntax highlighting
Labels: Issue-Feature,Area-TerminalControl,Area-Extensibility,Product-Terminal

# Description of the new feature/enhancement

<!-- 
A clear and concise description of what the problem is that the new feature would solve.
Describe why and how a user would use this new functionality (if applicable).
-->

Add support for syntax highlighting specific words like MobaXterm has:

![image](https://user-images.githubusercontent.com/1810977/83451728-c1dfc880-a457-11ea-9e22-1363fc31fbb8.png)

This makes finding errors/issues much easier and it's something that I immediately miss when using terminal :-)
Repository: pytorch
Issue: Clean up GIL that used to guard deleted RRef destructions 
Labels: triaged,better-engineering,module: rpc

As RRef now holds IValues instead of `py::object` and `python_ivalue.h` has its own GIL to guard the `py::object` destruction, we no long need additional GILs to guard deleted RRefs. 

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @gqchen @aazzolini @rohan-varma @xush6528 @jjlilley @osalpekar
Repository: pytorch
Issue: Torch script to support dictionary with keys of type tuple
Labels: oncall: jit,triaged

## 🚀 Feature
I'm seeing the following error in torch script when scripting an nn.Module that contains a dictionary of tuple (or list) data type as keys.

RuntimeError: Cannot create dict for key type '(int)', only int, float, Tensor and string keys are supported.

I'm looking into scripting a model that uses dictionary of tuple keys (Dict[Tuple[int], float])
to store tuples of ngrams with the corresponding ngram probability.

## Pitch
I expect torch script to successfully script the defined module with an attribute of type 
(Dict[Tuple[int], float]).


## Additional context
[Update]
There is a specific use-case for dictionaries of tuple keys. An example is a model which keeps track of ngrams and log probabilities corresponding to each ngram in a dictionary. In this case, ngrams should be represented with a tuple/list.

Repro code:

```python
# Scripting the module below throws the above exception:
import torch
from torch.jit.annotations import Tuple, List, Dict

class MyModule(torch.nn.Module):
    def __init__(self):
        super(MyModule, self).__init__()
        self.dict = torch.jit.Attribute({}, Dict[Tuple[int], float])

    def forward(self, x):
        return self.dict.get(x)

torch.jit.script(MyModule())
```


cc @suo
Repository: pytorch
Issue: Enable scripting modules with recursive functions
Labels: oncall: jit,feature,triaged

## 🚀 Feature
Scripting modules with recursive function calls. torch script currently does not support this case.

Current behavior:
During scripting the module below, I see an exception:

RuntimeError:
method 'get_value_' is called recursively. Recursive calls are not supported

## Pitch

To enable scripting modules that contain recursive functions.

## Additional context

To Reproduce:

```python
# Scripting the module below throws the above exception:
import torch
from torch import Tensor
from torch.jit.annotations import Dict


class MyModule(torch.nn.Module):
    def __init__(self):
        super(MyModule, self).__init__()
        self.dict = torch.jit.Attribute({}, Dict[Tensor, float])

    def get_value_(self, y):
        if y in self.dict:
            return self.dict.get(y)
        else:
            return self.get_value_(y[1:])

    def forward(self, x):
        return self.get_value_(x)

torch.jit.script(MyModule())

```


cc @suo
Repository: pytorch
Issue: SyncBatchNorm doesn't scale well across multiple nodes on large data sizes
Labels: module: performance,oncall: distributed,triaged

See internal details in https://fb.workplace.com/groups/1482616798564458/permalink/1520747598084711/?comment_id=1525863900906414&reply_comment_id=1537231383102999

The issue in general is that there was a reported 2x slowdown (compared to ideal scaling) for SyncBatchNorm on large data sizes while scaling across multiple nodes.

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @xush6528 @osalpekar @jiayisuse @agolynski @VitalyFedyunin @ngimel
Repository: TypeScript
Issue: Enable node typings if file starts with node shebang
Labels: Suggestion,Awaiting More Feedback

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->
<!-- Also please test using the latest insiders build to make sure your issue has not already been fixed: https://code.visualstudio.com/insiders/ -->

<!-- Use Help > Report Issue to prefill these. -->
- VSCode Version:
- OS Version:

Steps to Reproduce:

Here is intellisense working correctly for a node script in a project:
![image](https://user-images.githubusercontent.com/36224762/82467087-7c75df80-9ad6-11ea-9b37-a7df19bca044.png)

Here is another screenshot showing the support not working for a global script that does have a project:

![image](https://user-images.githubusercontent.com/36224762/82467270-be068a80-9ad6-11ea-9c32-fb51171f58c3.png)

As node.js is a perfectly valid choice for scripting, and has no need for verbose project structures to work, the lack of support is a bug. 

## System Info

```
CPUs | Intel(R) Core(TM) i5-6267U CPU @ 2.90GHz (4 x 2900)
-- | --
GPU Status | 2d_canvas: enabledflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmetal: disabled_offmultiple_raster_threads: enabled_onoop_rasterization: disabled_offprotected_video_decode: unavailable_offrasterization: enabledskia_renderer: disabled_off_okvideo_decode: enabledviz_display_compositor: enabled_onviz_hit_test_surface_layer: disabled_off_okwebgl: enabledwebgl2: enabled
Load (avg) | 8, 6, 6
Memory (System) | 8.00GB (0.08GB free)
Process Argv |  
Screen Reader | no
VM | 0%



Extension | Author (truncated) | Version
-- | -- | --
better-comments | aar | 2.0.5
interactive-scala | als | 1.2.1
better-toml | bun | 0.3.2
gitignore | cod | 0.6.0
bracket-pair-colorizer-2 | Coe | 0.1.3
scala | dal | 0.0.5
vsc-material-theme | Equ | 32.6.0
vsc-material-theme-icons | equ | 1.1.4
language-julia | jul | 0.15.32
crystal-ide | kof | 0.0.4
dotty | lam | 0.1.16
Lisp | mat | 0.1.10
vscode-docker | ms- | 1.2.0
python | ms- | 2020.5.78807
remote-containers | ms- | 0.117.1
remote-ssh | ms- | 0.51.0
remote-ssh-edit | ms- | 0.51.0
remote-wsl | ms- | 0.44.2
vscode-remote-extensionpack | ms- | 0.20.0
powershell | ms- | 2020.4.0
vscode-paste-image | mus | 1.0.4
gradle-language | nac | 0.2.3
java | red | 0.61.0
datetime | rid | 2.0.1
rust | rus | 0.7.8
scala | sca | 0.3.9
ayu | tea | 0.18.0
vscode-lldb | vad | 1.5.0
vscodeintellicode | Vis | 1.2.7
vscode-java-debug | vsc | 0.26.0
vscode-java-dependency | vsc | 0.10.1
vscode-java-pack | vsc | 0.9.1
vscode-java-test | vsc | 0.22.4
vscode-maven | vsc | 0.21.4
org-mode | vsc | 1.0.0
vim | vsc | 1.14.4
debug | web | 0.24.0
markdown-all-in-one | yzh | 2.8.0

```
Repository: pytorch
Issue: Draw quantized tensors in tensorboard
Labels: triaged,enhancement,module: tensorboard

Hi, I'd like to visualize the quantized model weights with TensorBoard:
```
for k, v in model.state_dict().items():
    writer.add_histogram(k, v)
```

 and got the error `TypeError: Got unsupported ScalarType QInt8`. 

Is there a way to add the tensor to TensorBoard please? Thank you!
Repository: kubernetes
Issue: Cron job staggering / randomization / concurrency limiting
Labels: kind/feature,sig/apps,area/workload-api/cronjob,needs-triage

<!-- Please only use this template for submitting enhancement requests -->

**What would you like to be added**: CronJobs should have fields allowing for their start time to be randomized (as systemd's Timers have), or even distributed within a range to spread out in equal intervals with other CronJobs of a set. At the very least, it would be useful to specify concurrency policies like "do not run more than two Jobs with the selected annotation", so that scheduling will be postponed until that policy could be met.

**Why is this needed**: I have a cluster with very few cores, and KubeApps adds a CronJob to sync every repo in the cluster, one for each repo, each one scheduled to run every 10 minutes. This would only take a few seconds per repo, but when it tries to run the CronJob at the same time for every repo, it causes a "Three Stooges effect", and most of the synchronization jobs end up timing out for lack of available processing. If I could stagger these synchronizations, they could all succeed, and my cluster wouldn't be momentarily starved of resources while it happens.
Repository: flutter
Issue: Prompt does not return when exiting desktop app in release mode
Labels: tool,platform-mac,platform-windows,platform-linux,a: desktop,P3,team-tool,triaged-tool

Thank you for supporting release mode.

## Steps to Reproduce

1. $ git clone https://github.com/google/flutter-desktop-embedding.git
2. $ cd flutter-desktop-embedding/testbed
3. $ flutter run -d linux --release

**Expected results:** <!-- what did you want to see? -->

The prompt should be returned when you exit the app window.
Debug mode is no problems.

**Actual results:** <!-- what did you see? -->

```
$ flutter run -d linux --release
Launching lib/main.dart on Linux in release mode...
Building Linux application...                                           

Flutter run key commands.
h Repeat this help message.
c Clear the screen
q Quit (terminate the application on the device).

<= It will stop here even if you quit the app!!
```

<details>
  <summary>flutter doctor log</summary>

```
$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, 1.19.0-3.0.pre.13, on Linux, locale ja_JP.UTF-8)
 
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    ✗ Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[!] Android Studio (version 3.5)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.45.1)
[✓] Connected device (3 available)

! Doctor found issues in 2 categories.
```
</details>
Repository: pytorch
Issue: Pickling a Tensor or a Storage is not deterministic
Labels: module: pickle,triaged

## 🐛 Bug

When calling pickle.dump on a Tensor, Storage, or a module, the resulting bytes change between two runs. I was unable to get byte for byte reproducibility.

## To Reproduce

Steps to reproduce the behavior:

1. Run `python -c "import torch, pickle; print(pickle.dumps(torch.IntTensor([1])))"`
1. Re-run it
1. The results are not the same, [cf the diff](https://gist.github.com/MatthieuBizien/cf6fc3265d879c1a25e6bdaa152b9eaf)

Same issue with torch.save:
```
f = io.BytesIO()
torch.save(torch.IntTensor([1]), f)
print(f.getvalue())
```

The bug is still present with  `PYTHONHASHSEED` fixed.

## Expected behavior

That snippet should give the same results every time. 

Deterministic pickling should be made possible, to allow reproducible pipelines, eg when transforming a model from a format to another format. Converting in Numpy array works but we lose the ability to simply to `torch.load`.

## Environment

```
Collecting environment information...
PyTorch version: 1.5.0
Is debug build: No
CUDA used to build PyTorch: 10.1

OS: Ubuntu 18.04.4 LTS
GCC version: Could not collect
CMake version: Could not collect

Python version: 3.7
Is CUDA available: Yes
CUDA runtime version: Could not collect
GPU models and configuration: GPU 0: Tesla V100-SXM2-16GB
Nvidia driver version: 418.87.00
cuDNN version: Could not collect

Versions of relevant libraries:
[pip] numpy==1.18.1
[pip] torch==1.5.0
[pip] torchvision==0.6.0a0+82fd1c8
[conda] blas                      1.0                         mkl  
[conda] cudatoolkit               10.1.243             h6bb024c_0  
[conda] mkl                       2020.0                      166  
[conda] mkl-service               2.3.0            py37he904b0f_0  
[conda] mkl_fft                   1.0.15           py37ha843d7b_0  
[conda] mkl_random                1.1.0            py37hd6b4f25_0  
[conda] numpy                     1.18.1           py37h4f9e942_0  
[conda] numpy-base                1.18.1           py37hde5b4d6_1  
[conda] pytorch                   1.5.0           py3.7_cuda10.1.243_cudnn7.6.3_0    pytorch
[conda] torchvision               0.6.0                py37_cu101    pytorch
```
Repository: deno
Issue: add flag to enable deterministic execution
Labels: feat,cli

This consists of 
1. Setting the random number generator seed. We have this already.
2. Disabling all I/O - so turn off allow-read, allow-write, allow-net, allow-run, allow-plugin - etc.
3. Controlling the Date object
4. need a custom v8::Platform which will allow us to control the date precisely. Then we can add some APIs to allow people to change it. (Probably from the command line would be ideal?)
https://github.com/v8/v8/blob/cc1b741ef34b56d1b29cb24cb391ef38a1172ce8/include/v8-platform.h#L532-L545 So the fix is really in rusty_v8 - we need to expose those primatives
Repository: TypeScript
Issue: TS: Option to not show imports in references search
Labels: Suggestion,Awaiting More Feedback

*TS Template added by @mjbvz*

**TypeScript Version**: 3.9.4

**Search Terms**
- references
- imports
- f12

---

Often I do a find references search and if the item is only used in one place, cmd+click on it will take me straight to it. However if the item is imported and used, I need to navigate the peek widget, expand the tree entry, then click on it. It would be nice if I can just skip over that if the only other reference is the import.
Repository: next.js
Issue: Scrolling happens when user returns to a page with hash using browser back button
Labels: good first issue

# Bug report

## Describe the bug

When user returns to a page which have url with hash (e.g. `http://localhost:3000/test#anchor`) from another page, unexpected scrolling to the anchor element happen.
It seems `componentDidUpdate` of Container triggers `scrollToHash` even when one returns by clicking browser back button.
(https://github.com/vercel/next.js/blob/v9.4.4/packages/next/client/index.js#L135-L137)

## To Reproduce

Example repo: https://github.com/monae/nextjs-scrolltohash-bug

1. `git clone git@github.com:monae/nextjs-scrolltohash-bug.git` and `npm run dev`.
2. Click on 'Open the test page without hash'. You are on top of the page.
3. Scroll down and click on  'Open another page'.
4. Click on browser back button, then you return to the preserved scroll position (Chrome, Safari) or top of the page (Firefox).
5. Back to the first page and click on 'Open the test page with hash'. You are on the anchor element.
6. Scroll down and click on  'Open another page'.
7. Click on browser back button, then you return to the anchor element.

## Expected behavior

The results of 4. & 7. should be same (although the behavior of Firefox is not desirable).

## Screenshots

## System information

- OS: macOS
- Browser (if applies) Chrome, Safari, Firefox
- Version of Next.js: 9.4.4
- Version of Node.js: 14.3.0

## Additional context
Repository: neovim
Issue: UI protocol: scrolling up sent as grid_line events instead of grid_scroll
Labels: bug,ui-extensibility


<!-- Before reporting: search existing issues and check the FAQ. -->

- `nvim --version`: NVIM v0.5.0-519-g74fed7d50
- UI extensions: ext_linegrid=true, ext_multigrid=false, ext_messages=false, rgb=true

### Steps to reproduce using `nvim -u NORC`

Create a 20 lines x 80 columns UI showing a buffer containing ~1000 lines and `:set nu`. Go to the bottom of the screen and press `k` to scroll up.

### Actual behaviour

Neovim sends the following events:

```
["grid_line",[1,29,71,[["g",1],["k"]]]]
["grid_line",[1,29,71,[[" ",1,2]]]]
["grid_line",[1,1,0,[[" ",67],["9"],["7"],["2"],[" "],[" ",0,77]]],[1,2,0,[[" ",67],["9"],["7"],["3"],[" "],[" ",0,77]]],[1,3,0,[[" ",67],["9"],["7"],["4"],[" "],[" ",0,77]]],[1,4,0,[[" ",67],["9"],["7"],["5"],[" "],[" ",0,77]]],[1,5,0,[[" ",67],["9"],["7"],["6"],[" "],[" ",0,77]]],[1,6,0,[[" ",67],["9"],["7",67,2],[" "],[" ",0,77]]],[1,7,0,[[" ",67],["9"],["7"],["8"],[" "],[" ",0,77]]],[1,8,0,[[" ",67],["9"],["7"],["9"],[" "],[" ",0,77]]],[1,9,0,[[" ",67],["9"],["8"],["0"],[" "],[" ",0,77]]],[1,10,0,[[" ",67],["9"],["8"],["1"],[" "],[" ",0,77]]],[1,11,0,[[" ",67],["9"],["8"],["2"],[" "],[" ",0,77]]],[1,12,0,[[" ",67],["9"],["8"],["3"],[" "],[" ",0,77]]],[1,13,0,[[" ",67],["9"],["8"],["4"],[" "],[" ",0,77]]],[1,14,0,[[" ",67],["9"],["8"],["5"],[" "],[" ",0,77]]],[1,15,0,[[" ",67],["9"],["8"],["6"],[" "],[" ",0,77]]],[1,16,0,[[" ",67],["9"],["8"],["7"],[" "],[" ",0,77]]],[1,17,0,[[" ",67],["9"],["8",67,2],[" "],[" ",0,77]]],[1,18,0,[[" ",67],["9"],["8"],["9"],[" "],[" ",0,77]]],[1,19,0,[[" ",67],["9",67,2],["0"],[" "],[" ",0,77]]],[1,20,0,[[" ",67],["9",67,2],["1"],[" "],[" ",0,77]]],[1,21,0,[[" ",67],["9",67,2],["2"],[" "],[" ",0,77]]],[1,22,0,[[" ",67],["9",67,2],["3"],[" "],[" ",0,77]]],[1,23,0,[[" ",67],["9",67,2],["4"],[" "],[" ",0,77]]],[1,24,0,[[" ",67],["9",67,2],["5"],[" "],[" ",0,77]]],[1,25,0,[[" ",67],["9",67,2],["6"],[" "],[" ",0,77]]],[1,26,0,[[" ",67],["9",67,2],["7"],[" "],[" ",0,77]]],[1,27,0,[[" ",67],["9",67,2],["8"],[" "],[" ",0,77]]],[1,28,0,[[" ",67],["9",67,3],[" "],[" ",0,77]]],[1,0,0,[[" ",67],["9"],["7"],["1"],[" "],[" ",0,77]]]]
```

### Expected behaviour

Neovim sends the following events:
```
["grid_line",[1,29,71,[["g",1],["k"]]]]
["grid_line",[1,29,71,[[" ",1,2]]]]
["grid_scroll",[1,0,29,0,82,-1,0]]
["grid_line",[1,28,0,[["1",67],["0",67,3],[" "],[" ",0,77]]]]
```

Since UI bugs aren't easy to reproduce I'll investigate myself. I'm just opening this here so that I don't forget.
Repository: scrcpy
Issue: Remote connection via VS Code
Labels: feature request

VS Code offers a very handy feature named [Shared servers](https://docs.microsoft.com/en-us/visualstudio/liveshare/use/vscode#share-a-server) essentially allowing anyone participating in my Live Share session to access ports that I choose to expose.

I tried exposing ports 5037 and 27183 and the participant partially managed to connect using scrcpy. The issues are:
- when he taps on the screen scrcpy crashes
- both of us cannot connect to the same device at the same time. If I connect first then he cannot connect at all.

This would be a very handy feature to support to enable remote pair programming sessions.

PS: We made sure that the ports we mapped correctly on the client and that we killed his local ADB before attempting connection.
Repository: opencv
Issue: Wrong eroding 3 pixels in seamlessclone
Labels: bug,category: photo,Hackathon

##### System information (version)
<!-- Example
- OpenCV => 3.4
- Operating System / Platform => Windows 64 Bit
- Compiler => Visual Studio 2017
-->

- OpenCV => 3.4
- Operating System / Platform => :grey_question:
- Compiler => :grey_question:

##### Detailed description

https://github.com/opencv/opencv/blob/c3e8a82c9c0b18432627fe100db332b42d64b8d3/modules/photo/src/seamless_cloning_impl.cpp#L261

It leads to undesired color propagation into the mask area, for the laplacian on the mask boarder to be used in poisson solver is same as the dst‘s. It's  not consistent with the algorithm proposed in the [paper](https://www.cs.virginia.edu/~connelly/class/2014/comp_photo/proj2/poisson.pdf), which directly uses the original mask to compute Laplacian.
Repository: flutter
Issue: Creating a paragraph is expensive, which makes animating the color of many individual glyphs prohibitively expensive
Labels: c: new feature,engine,c: performance,a: typography,c: proposal,perf: speed,P2,team-engine,triaged-engine

## Use case
I need to draw some complicated text on a Canvas, in Flutter. I have an external C library that calculates the positioning of all of the characters in the text, which I call with dart:ffi, and which then performs callbacks into Flutter with the data `(character_to_draw, x, y, font/style)`.

Currently I can use either `Canvas.drawParagraph()` or `TextPainter.paint()` to then paint the character at the required position on the canvas. However, I have to call the `layout()` method in either case, which I gather is an expensive operation, and which seems superfluous when I'm just laying out individual characters.

## Proposal
I would like there to be a `Canvas.drawCharacter()` method, that draws just a single character at a given position, in a given style, but without any separate `layout()` considerations.

It isn't clear to me if one can access the underlying drawing library (Skia?) directly, to bypass `layout()`.

If the proper solution to this is to have the C-library directly interface with a Skia canvas, that'd be fine -- I can write a wrapper for that -- but it's not clear to me (a) how to get a reference to the Skia canvas or (b) how I would import Flutter's copy of Skia into my C library. Any pointers in these directions would also be appreciated.
Repository: PowerToys
Issue: [Preview Pane] HEIC, WEBP File Explorer support
Labels: Idea-Enhancement,Help Wanted,Product-File Explorer

# Summary of the new feature/enhancement
Since native SVG support is now part of this (YES!), would love to see a few other common non-supported image types added as well. HEIC and WEBP.

# Proposed technical implementation details (optional)
I believe there are already Explorer apps that can render WEBP. Unsure of HEIC.
Repository: pytorch
Issue: Morphological operations
Labels: feature,triaged

## 🚀 Feature
Basic morphological operations (e.g. dilation and erosion)

## Motivation
Many pytorch applications deal with images. It would therefore be great if pytorch would natively support basic morphological operations, so that the user does not have to resort to other libraries (e.g. scipy) to carry them out, which involves moving the data from the GPU to the CPU and can therefore result in a bottleneck.

## Pitch
Implement basic morphological operations in pytorch. This should be very straight-forward, since the code can basically be translated from numpy to torch based on other implementations (e.g. scipy). If this feature request is accepted, then I would be glad to help with the implementation.