sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: neovim
Issue: nvim_win_set_buf triggers BufEnter triggers without buffer being entered
Labels: bug,events

### Neovim version (nvim -v)

v0.9.0-dev-211+g44b88d8c3

### Vim (not Nvim) behaves the same?

NA

### Operating system/version

Linux

### Terminal name/version

wezterm

### $TERM environment variable

xterm-256

### Installation

repo

### How to reproduce the issue

```lua
vim.cmd.messages("clear")
local api = vim.api

-- not interesting, creates a window at position
local function create_win(rows, cols, x, y, focus)
  local buf = api.nvim_create_buf(false, true)
  local win = api.nvim_open_win(
    buf,
    focus,
    {
      style = "minimal",
      relative = "editor",
      col = x, row = y,
      width = cols, height = rows
    })
  return buf, win
end

-- log a message when BufEnter is triggered for given buffer
local function attach_autocmd(buf_n)
  api.nvim_create_autocmd(
    {"BufEnter"},
    {
      buffer = buf_n,
      callback = function (event)
        local buf = event["buf"]
        return print(os.date(), "watch-fired-in-buf", buf)
      end
    }
  )
end

-- create left and right window/buffer pairs
--
-- left side has our on_lines watcher
-- right side has our autocommand which simply logs on BufEnter
--
-- when the left side has content matches "do it", create a new buffer, attach
-- the autocommand and replace put it in the right window.
--
-- When this swap is performed, BufEnter will fire for the new buffer even
-- though it is never entered.
local l_buf, l_win = create_win(10, 10, 10, 10, true)
local r_buf, r_win = create_win(10, 10, 22, 10, false)

print("l-buf", l_buf, "r-buf", r_buf)
attach_autocmd(r_buf)

local function on_lines()
  local lines = api.nvim_buf_get_lines(l_buf, 0, -1, false)
  if lines[1] == "do it" then
    -- perform the buffer swap
    local new_buf = api.nvim_create_buf(false, true)
    attach_autocmd(new_buf)
    vim.schedule(function()
      return api.nvim_win_set_buf(r_win, new_buf)
    end)
  else
    return nil
  end
end
api.nvim_buf_attach(l_buf, false, {on_lines = on_lines})
```

`:luafile %`, type "do it" and see the logged message, which will include the *new* buffers id but the buffer was never entered.

### Expected behavior

The `BufEnter` event doesn't fire until the buffer is entered.

### Actual behavior

The `BufEnter` event fires without entering the buffer.
Repository: next.js
Issue: Next 13: router.push with different searchParams does not trigger suspense fallback
Labels: bug

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

 Operating System:
      Platform: win32
      Arch: x64
      Version: Windows 10 Home
    Binaries:
      Node: 18.12.0
      npm: N/A
      Yarn: N/A
      pnpm: N/A
    Relevant packages:
      next: 13.0.2-canary.0
      eslint-config-next: 13.0.0
      react: 18.2.0
      react-dom: 18.2.0

### What browser are you using? (if relevant)

_No response_

### How are you deploying your application? (if relevant)

next dev

### Describe the Bug

 I'm struggling HARD with the `appDir Suspense` with `searchParams` . 

On **initial render**, the culprit falls back to the skeleton _just fine_. It's when I set **new searchParams** with `router.push` from another component, **the suspense fallback never renders**, and the server just **sits there** until data fetching gets completed.

**TL; DR, Changing searchParams does't make use of server-side suspense.** 

I'd greatly appreciate any help!


### Expected Behavior

The **`Foo` component**, 
_(i.e., the async server component that re-fetches data on prop change triggered by new searchParams acquired via the next router,)_ 
**when given new searchParams** --- thusly fetches new data --- should **fallback to the suspense's fallback component** _(e.g., a skeleton component)._

### Link to reproduction

https://github.com/krsteve/next-13-searchparam-bug

### To Reproduce

Code that DOES REPRODUCE the problem:

`page.tsx`
```tsx
import { Suspense } from "react";
import Foo from "./Foo";

export default function ({ searchParams }: { searchParams: { foo?: string } }) {
    return <Suspense fallback={<div>LOADING</div>}>
        {/* @ts-ignore */}
        <Foo foo={searchParams.foo} />
    </Suspense>;
}
```


`Foo.tsx`
```tsx
import { Button } from "./Button";

export default async function ({ foo }: { foo?: string }) {
    // Wait 3 seconds
    await new Promise(resolve => setTimeout(resolve, 3000));
    return <div>
        <div>{foo ?? "No Params"}</div>
        <Button />
    </div>;
}
```


`Button.tsx`
```tsx
'use client';

import { usePathname, useRouter } from "next/navigation";
import type { FC } from "react";

export const Button: FC = () => {
    const router = useRouter();
    const pathname = usePathname();
    const randNum = Math.ceil(Math.random() * 100);
    const setNewParams = () => {
        router.push(pathname + `?foo=${randNum}`);
    }

    return <button onClick={setNewParams}>Set New Params</button>
}
```


- Using router.replace does the same thing.
- Adding loading.tsx doesn't make any difference.
- Manually navigating with window.location.href does work, but it's just another initial rendering. (Re-renders the whole thing.)
Repository: pytorch
Issue: AttributeError: module 'tensorboard.compat.tensorflow_stub.io.gfile' has no attribute 'MakeDirs'
Labels: triaged,module: tensorboard

### 🐛 I am trying to run this code of BERT-based calssification, but I got this error message, where it says that there is no attribute in the tensorboard. Below is the imported line and the error line is given where the code threw the error. 

Is it because of the version that I am using: 

> tensorboard               2.10.1                   pypi_0    pypi
> tensorboard-data-server   0.6.1                    pypi_0    pypi
> tensorboard-plugin-wit    1.8.1                    pypi_0    pypi
> tensorflow                1.15.0          mkl_py37h28c19af_0  
> tensorflow-base           1.15.0          mkl_py37he1670d9_0  
> tensorflow-estimator      1.15.1             pyh2649769_0  
> tensorflow-hub            0.12.0                   pypi_0    pypi
> tensorflow-io-gcs-filesystem 0.27.0                   pypi_0    pypi
> 

```
import tensorboard as tb
tf.io.gfile = tb.compat.tensorflow_stub.io.gfile

...

tf.io.gfile.MakeDirs(OUTPUT_DIR)
print('***** Model output directory: {} *****'.format(OUTPUT_DIR))

```


### Versions

2022-11-02 21:46:13 (55.1 MB/s) - ‘collect_env.py’ saved [17278/17278]

Collecting environment information...
PyTorch version: N/A
Is debug build: N/A
CUDA used to build PyTorch: N/A
ROCM used to build PyTorch: N/A

OS: Ubuntu 22.04.1 LTS (x86_64)
GCC version: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
Clang version: Could not collect
CMake version: Could not collect
Libc version: glibc-2.17

Python version: 3.7.13 (default, Oct 18 2022, 18:57:03)  [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-5.15.0-52-generic-x86_64-with-debian-bookworm-sid
Is CUDA available: N/A
CUDA runtime version: Could not collect
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: 
GPU 0: NVIDIA RTX A6000
GPU 1: NVIDIA RTX A6000

Nvidia driver version: 510.85.02
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: N/A

Versions of relevant libraries:
[pip3] numpy==1.21.5
[conda] _tflow_select             2.3.0                       mkl  
[conda] blas                      1.0                         mkl  
[conda] cudatoolkit               11.2.2              hbe64b41_10    conda-forge
[conda] mkl                       2021.4.0           h06a4308_640  
[conda] mkl-service               2.4.0            py37h7f8727e_0  
[conda] mkl_fft                   1.3.1            py37hd3c417c_0  
[conda] mkl_random                1.2.2            py37h51133e4_0  
[conda] numpy                     1.21.5           py37h6c91a56_3  
[conda] numpy-base                1.21.5           py37ha15fc14_3  
[conda] tensorflow                1.15.0          mkl_py37h28c19af_0  
[conda] tensorflow-base           1.15.0          mkl_py37he1670d9_0
Repository: PowerToys
Issue: Allow disabling internal keyboard when an external keyboard is connected
Labels: Idea-New PowerToy,Needs-Triage

### Description of the new feature / enhancement

I use to own a macbook, and sometimes I would want to put my external keyboard on top of my laptop internal keyboard, so that i can have a better typing experience. 

### Scenario when this would be used?

The issue is, when putting an external keyboard on top of the internal keyboard, it may interfere or press some keys by accident, or unintendedly, (the external keyboard is physically on top of internal). Mac has this app called karabiner that have this convenient feature that allows auto-disabling the internal keyboard if it is connected with an external one. Could we have the same feature on PowerToys' Keyboard Manager ? 

### Supporting information

_No response_
Repository: storybook
Issue: [Bug]: /sb-addons/node_modules/%40storybook/addon-*/manager.mjs not found (404) after build
Labels: bug,needs triage

### Describe the bug

Greetings,

I'm experimenting with version 7, which looks great so far!

After the build, when I try to load the **static version** of my storybook, it loads pretty slowly, while the following errors appear in the console:

<img width="554" alt="image" src="https://user-images.githubusercontent.com/85000486/199508251-d230390f-4f5b-47e5-86b5-0d65a129fd82.png">

The same thing happens locally:

<img width="527" alt="image" src="https://user-images.githubusercontent.com/85000486/199507533-58e0fe40-ca43-495d-bf9a-c76eeab8fb25.png">

The path cannot find (404) is always something like:
`/sb-addons/node_modules/%40storybook/addon-*/manager.mjs not found (404) after build`

But when I change the **%40** to **@**, I can access the file. For example:

**NOT FOUND 404**
http://localhost:3000/storybook/sb-addons/node_modules/%40storybook/addon-links/manager.mjs

**OK 304**
http://localhost:3000/storybook/sb-addons/node_modules/@storybook/addon-links/manager.mjs

Is there a way to solve this?

Thanks and regards,

Roee Angel

### To Reproduce

_No response_

### System

```shell
Environment Info:

  System:
    OS: Linux 5.10 Ubuntu 18.04.6 LTS (Bionic Beaver)
    CPU: (16) x64 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz

  Binaries:
    Node: 16.17.0 - ~/.nvm/versions/node/v16.17.0/bin/node
    npm: 8.15.0 - ~/.nvm/versions/node/v16.17.0/bin/npm

  npmPackages:
    @storybook/addon-actions: ^7.0.0-alpha.42 => 7.0.0-alpha.42 
    @storybook/addon-backgrounds: ^7.0.0-alpha.42 => 7.0.0-alpha.42 
    @storybook/addon-controls: ^7.0.0-alpha.42 => 7.0.0-alpha.42 
    @storybook/addon-essentials: ^7.0.0-alpha.42 => 7.0.0-alpha.42 
    @storybook/addon-interactions: ^7.0.0-alpha.42 => 7.0.0-alpha.42 
    @storybook/addon-links: ^7.0.0-alpha.42 => 7.0.0-alpha.42 
    @storybook/addon-measure: ^7.0.0-alpha.42 => 7.0.0-alpha.42 
    @storybook/addon-outline: ^7.0.0-alpha.42 => 7.0.0-alpha.42 
    @storybook/addon-storysource: ^7.0.0-alpha.42 => 7.0.0-alpha.42 
    @storybook/addon-toolbars: ^7.0.0-alpha.42 => 7.0.0-alpha.42 
    @storybook/addon-viewport: ^7.0.0-alpha.42 => 7.0.0-alpha.42 
    @storybook/addons: ^7.0.0-alpha.42 => 7.0.0-alpha.42 
    @storybook/nextjs: ^7.0.0-alpha.42 => 7.0.0-alpha.42 
    @storybook/react: ^7.0.0-alpha.42 => 7.0.0-alpha.42 
    @storybook/testing-library: ^0.0.13 => 0.0.13 
    @storybook/theming: ^7.0.0-alpha.42 => 7.0.0-alpha.42 

  npmGlobalPackages:
    @storybook/react: 7.0.0-alpha.47
```


### Additional context

_No response_
Repository: pytorch
Issue: ASAN shard 4 started to OOM after unrelated commit
Labels: module: ci,triaged

### 🐛 Describe the bug

See https://hud.pytorch.org/hud/pytorch/pytorch/master/1?per_page=50&name_filter=asan%20%2F%20test%20(default%2C%204%2C%205


Error looks as follows:
```
test_serialization_offset_filelike_weights_only_False (__main__.TestOldSerialization) ... =================================================================
==1033==ERROR: AddressSanitizer: allocator is out of memory trying to allocate 0x80000000 bytes
```

First commit (clearly unrelated): https://hud.pytorch.org/pytorch/pytorch/commit/a51da28551e9f13a7afca5bbc829a8d9abced44e

### Versions

CI

cc @ezyang @gchanan @zou3519 @seemethere @pytorch/pytorch-dev-infra
Repository: rust
Issue: Tracking Issue for `more_float_constants`
Labels: T-libs-api,C-tracking-issue

<!--
Thank you for creating a tracking issue!

Tracking issues are for tracking a feature from implementation to stabilization.

Make sure to include the relevant RFC for the feature if it has one.

If the new feature is small, it may be fine to skip the RFC process. In that
case, you can use use `issue = "none"` in your initial implementation PR. The
reviewer will ask you to open a tracking issue if they agree your feature can be
added without an RFC.
-->

Feature gate: `#![feature(more_float_constants)]`

This is a tracking issue for additional constants in the `{f32,f64}::consts` modules.

ACP: https://github.com/rust-lang/libs-team/issues/119

### Public API

<!--
For most library features, it'd be useful to include a summarized version of the public API.
(E.g. just the public function signatures without their doc comments or implementation.)
-->

```rust
// in core::{f32, f64}::consts

/// The golden ratio (φ)
pub const PHI: f64 = 1.618033988749894848204586834365638118_f64;

/// The Euler-Mascheroni constant (γ)
pub const EGAMMA: f64 = 0.577215664901532860606512090082402431_f64;

/// 1/sqrt(π)
pub const FRAC_1_SQRT_PI: f64 = 0.564189583547756286948079451560772586_f64;

/// sqrt(3)
pub const SQRT_3: f64 = 1.732050807568877293527446341505872367_f64;

/// 1/sqrt(3)
pub const FRAC_1_SQRT_3: f64 = 0.577350269189625764509148780501957456_f64;
```

### Steps / History

<!--
For larger features, more steps might be involved.
If the feature is changed later, please add those PRs here as well.
-->

- [x] Implementation: #103836
- [ ] Final comment period (FCP)[^1]
- [ ] Stabilization PR

<!--
Once the feature has gone through a few release cycles and there are no
unresolved questions left, the feature might be ready for stabilization.

If this feature didn't go through the RFC process, a final comment period
(FCP) is always needed before stabilization. This works as follows:

A library API team member can kick off the stabilization process, at which point
the rfcbot will ask all the team members to verify they agree with
stabilization. Once enough members agree and there are no concerns, the final
comment period begins: this issue will be marked as such and will be listed
in the next This Week in Rust newsletter. If no blocking concerns are raised in
that period of 10 days, a stabilzation PR can be opened by anyone.
-->

### Unresolved Questions

- Naming of the Euler-Mascheroni constant (gamma)
- Any additional constants?
    - ln(3)

<!--
Include any open questions that need to be answered before the feature can be
stabilised. If multiple (unrelated) big questions come up, it can be a good idea
to open a separate issue for each, to make it easier to keep track of the
discussions.

It's useful to link any relevant discussions and conclusions (whether on GitHub,
Zulip, or the internals forum) here.
-->

[^1]: https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html
Repository: deno
Issue: Svelte support via Vite
Labels: bug,node compat

Running into a `TypeError` when trying to add an import statement in `vite.config.mjs`. I'm on MacOS Intel i5.

Reproduce:

1. Run `deno run -A --unstable npm:create-vite-extra` and selecting `deno-svelte`
2. Update `vite.config.mjs` to 

```
import { defineConfig } from 'npm:vite'
import { svelte } from 'npm:@sveltejs/vite-plugin-svelte'

import "npm:svelte";
import "npm:svelte-routing";

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [svelte()]
})
```

3. Run `dev deno run -A --unstable --node-modules-dir npm:vite`

Error message:

```
failed to load config from /Users/andyjiang/Developer/deno/blog/how-to-series/svelte/vite.config.mjs
error when starting dev server:
TypeError: 'import', and 'export' cannot be used outside of module code at file:///Users/andyjiang/Developer/deno/blog/how-to-series/svelte/node_modules/.deno/svelte-routing@1.6.0/node_modules/svelte-routing/src/index.js:1:1
    at async loadConfigFromBundledFile (file:///Users/andyjiang/Developer/deno/blog/how-to-series/svelte/node_modules/.deno/vite@3.2.2/node_modules/vite/dist/node/chunks/dep-c842e491.js:64010:21)
    at async loadConfigFromFile (file:///Users/andyjiang/Developer/deno/blog/how-to-series/svelte/node_modules/.deno/vite@3.2.2/node_modules/vite/dist/node/chunks/dep-c842e491.js:63895:28)
    at async resolveConfig (file:///Users/andyjiang/Developer/deno/blog/how-to-series/svelte/node_modules/.deno/vite@3.2.2/node_modules/vite/dist/node/chunks/dep-c842e491.js:63519:28)
    at async createServer (file:///Users/andyjiang/Developer/deno/blog/how-to-series/svelte/node_modules/.deno/vite@3.2.2/node_modules/vite/dist/node/chunks/dep-c842e491.js:62819:20)
    at async CAC.<anonymous> (file:///Users/andyjiang/Developer/deno/blog/how-to-series/svelte/node_modules/.deno/vite@3.2.2/node_modules/vite/dist/node/cli.js:707:24)
```
Repository: PowerToys
Issue: Text extractor Text Editor 
Labels: Idea-Enhancement,Needs-Triage,Needs-Team-Response,Product-Text Extractor

### Description of the new feature / enhancement

When copying text from the screen it would be nice to edit the Text and only copy the necessary text. An implementation could look like this:
1. enable open editor after select in the settings
2. Select text on screen
3. very simple editor pops up
4. text gets copied
5. change the text and remove parts that are unnecessary
6. press ok
7. text gets copied

### Scenario when this would be used?

When formatting text before reusing it. Or only copying relevant text to google for. There are many places where this is usefull. The texteditor coud automatically close on lost focus to not be intrusive.

### Supporting information

_No response_
Repository: stable-diffusion-webui
Issue: [Feature Request]: Make optional sequential generation order for x/y batches
Labels: enhancement

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What would your feature do ?

Currently if I create say a prompt S/R x/y grid and use a batch count of say 5, it will generate 5 images using the S value and after that 5 images using the R value. Please provide a checkbox that changes the logic so that both images with the same seed are generated after one another. This will make image comparison much easier by pressing left/right in an imageviewer. 

I can see how this would negatively effect performance if the x/y plot is for something like model since it would have to switch model after every gen, but that's why it should be optional. 

### Proposed workflow

Make an additional checkbox for sequential generation/same seed first in the x/y interface.

### Additional information

_No response_
Repository: vscode
Issue: tasks: empty arguments are not properly passed to the command
Labels: bug,tasks

Type: <b>Bug</b>

vscode fails to pass an empty option parameter to commands:

tested with flatc (https://github.com/google/flatbuffers)
sample task:

```
      {
        "label": "gen fbs",
        "command": "flatc",
        "args": [
          "--cpp",
          "foo.fbs",
          "--filename-suffix",
          "\"\"", // <------------ this gets swallowed
        ],
        "problemMatcher": []
      },
```

fbs schema:

```
table Foo{
  data:int;
}
root_type Foo;
```

This command works in cmd.exe: `flatc --cpp foo.fbs --filename-suffix ""`

VS Code version: Code 1.72.2 (d045a5eda657f4d7b676dedbfa7aab8207f8a075, 2022-10-12T22:15:18.074Z)
OS version: Windows_NT x64 10.0.19044
Modes:
Sandboxed: No


<!-- generated by issue reporter -->
Repository: pytorch
Issue: Group losses in a common namespace
Labels: module: nn,module: loss,triaged,needs research

### 🚀 The feature, motivation and pitch

It would be nice to remove the need to go fish losses from the `nn` module and have them all in a common `nn.loss` namespace.

So, instead of having
```
nn.L1Loss
nn.MSELoss
nn.CrossEntropyLoss
nn.CTCLoss
nn.NLLLoss
```
we would have
```
nn.loss.L1
nn.loss.MSE
nn.loss.CrossEntropy
nn.loss.CTC
nn.loss.NLL
```

Such a hierarchy (Containers, Convolution Layers, Pooling layers, Padding Layers, *etc*…) already exists in the [`nn` documentation](https://pytorch.org/docs/stable/nn.html) and, IMHO, should be reflected in the API as well. Is there a reason why this is not the case?

cc @albanD @mruberry @jbschlosser @walterddr @kshitij12345 @saketh-are
Repository: pytorch
Issue: MSE documentation is weak
Labels: module: docs,triaged

### 📚 The doc issue

Currently we have the MSE described as following:

> `CLASS` `torch.nn.MSELoss`(`size_average=None`, `reduce=None`, `reduction='mean'`)[[SOURCE]](https://pytorch.org/docs/stable/_modules/torch/nn/modules/loss.html#MSELoss)
Creates a criterion that measures the mean squared error (squared L2 norm) between each element in the input $x$ and target $y$.
> 
> The unreduced (i.e. with `reduction` set to `'none'`) loss can be described as:
>
> $$
> \ell(x, y) = L = \lbrace l_1,\dots,l_N\rbrace^\top, \quad l_n = \left( x_n - y_n \right)^2,
> $$

Which is not the case.
Say `x` and `y` have `N = 3` elements, `L` does **not** contain the `N` squared L2 norms.

```python
>>> # Define cost
>>> C = nn.MSELoss(reduction='none')
>>> x = torch.randn(3, 5)
>>> y = torch.randn(3, 5)
>>> C(x, y).size()
torch.Size([3, 5])
```

We're assuming the first dimension is the batch size, yes?

cc @svekars @carljparker
Repository: PowerToys
Issue: Hosts File Editor: Reset Hosts File
Labels: Idea-Enhancement,Needs-Triage,Product-Hosts File Editor

### Description of the new feature / enhancement

It would be nice for the Hosts File Editor to also allow re-initializing the hosts file at default values. Probably have a button at the top of the Hosts File Editor with an extra warning or something when clicked.

### Scenario when this would be used?

Perhaps a user would have too many old hosts in their file. In my case, I had some non-default values that I couldn't recall what they were doing in the first place, but I knew that they were not defaults from Windows.

### Supporting information

[This Microsoft support page](https://support.microsoft.com/en-us/topic/how-to-reset-the-hosts-file-back-to-the-default-c2a43f9d-e176-c6f3-e4ef-3500277a6dae) describes the default content of the file for Windows 10 and below.
Repository: PowerToys
Issue: Welcome Screen should not show GPO disabled items
Labels: Idea-Enhancement,Area-Enterprise

### Description of the new feature / enhancement

After the first Launch of the application the user get an information/welcome screen with all features of powertoys.
This screen should only show features that are enabled by the GPO settings. If no GPO setting is applied yet it can show everything.

### Scenario when this would be used?

After first Launch of the application or directly after launching it after an update.

### Supporting information

I disabled the Ruler stuff f.e. and it is shown.

![image](https://user-images.githubusercontent.com/17103076/199568707-b8b24295-5839-476f-973d-5485f59d55fe.png)

Users shouldn't get an idea of what can be enabled and what not. Less questions to us administrators :)