sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: proposal: os: make the internal lockedfile package public
Labels: Proposal

An internal filelock pkg can be found here: 
https://pkg.go.dev/cmd/go/internal/lockedfile/internal/filelock

A few projects are implementing file locking [1] but they do not seem to be maintained and I think they are not as nice as the internal filelock pkg I mentioned before. As a result some projects are doing their own version of it [2].

I suggest we make the filelock pkg public as I think this could be beneficial to the mass.

I'd be glad to do it given some pointers, like where to put it ?

Thanks !

---
[1] File lock projects:

https://github.com/gofrs/flock
https://github.com/MichaelS11/go-file-lock
https://github.com/juju/fslock


[2] Projects that implement their own file locking:

[terraform](https://github.com/hashicorp/terraform/blob/1ff9a540202b8c36e33db950374bbb4495737d8f/states/statemgr/filesystem_lock_unix.go)

[boltdb](https://github.com/boltdb/bolt/search?q=flock&unscoped_q=flock)
Repository: three.js
Issue: Water2 fragment shader does not support Z-up WCS
Labels: Addons

##### Description of the problem
The calculation which blends reflection and refraction fragment color assumes a default Y-up coordinate system to determine the blend amount. As a result, the transition between reflectance and refractance in a Z-up scene (or if the water surface doesn't lie in the xz-plane) happens while the camera is orbited around the scene, instead of while being tilted up and down. I was able to adjust the shader by trial and error, adding the following to line 339 of `examples/jsm/objects/Water2.js`:

```glsl
vec3 adjustedEye = vec3(toEye.x, toEye.z, toEye.y);
float theta = max( dot( adjustedEye, normal ), 0.0 );
```

Which simply swaps the z and y coordinates for this calculation only. It would be nice if the shader works for any camera-up and plane orientation by taking into account the normal of the surface to which it is applied, however my lack of GLSL knowledge prevents me from coming up with a solution.

##### Three.js version
- [x] r106

##### Browser
- [x] All of them


##### OS
- [x] All of them
Repository: flutter
Issue: [proposal] add --ios and --android parameter to specify the platform in `flutter emulators --create`, be able to create an ios simulator from flutter tool
Labels: c: new feature,tool,P3,team-tool,triaged-tool

## Use case
I'm trying to setup our CI for both ios and android flutter development and tests using docker.

i have founded the "flutter emulators —create" command help to create emulators but it's seems that it's only create an android emulator not ios.

Our driver and performance test will be run on both platform so would be great to have one command for both platform and not use the avdmanager or xcode commands.

## Proposal
please add a --ios and -android parameter to specify the platform.
Repository: vue
Issue: (programmatically added) destroyed hooks retain on new instances
Labels: has workaround

### Version
2.6.10

### Reproduction link
[https://jsfiddle.net/h86atdq4/](https://jsfiddle.net/h86atdq4/)







### Steps to reproduce
Open linked jsfiddle, open console and click toggle.

### What is expected?
That the logged destroyed hook count is always 0 similar to the other hooks

### What is actually happening?
The destroyed hook count keeps incrementing as it seems to retain hooks from already destroyed components

---
Note: I didnt check if this also happens with destroyed hook defined on the component itself

<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: terminal
Issue: Add offsetX/offsetY settings, respecting backgroundImageAlignment to determine which sides of the image to apply the offset to.
Labels: Issue-Feature,Help Wanted,Area-UserInterface,Product-Terminal

<!-- 
🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨

I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING:
1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement.
2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement.
3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number).
4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement.
5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement.

All good? Then proceed!
-->
In a recent blog, your team indicated you could position a background image to your liking.  Currently it appears on the very edge of the display (no gap).  It would be nice to be able to specify an offsetX/offsetY setting, respecting backgroundImageAlignment to determine which sides of the image to apply the offset to, so that you could indent the image.  The idea is that most people will use this to position a large-size icon somewhere in the window to make it super-obvious at a glance which shell is being displayed.  Currently to get a gap you need to manually insert a gap around your image, and getting the transparency right isn't necessarily easy.

<!-- 
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).
-->

# Proposed technical implementation details (optional)

<!-- 
A clear and concise description of what you want to happen.
-->
Repository: flutter
Issue: Image.network widget cannot rending the  gzip encoded image
Labels: framework,a: images,P2,team-framework,triaged-framework

All HttpClient requests set the header by defalt 

```
Accept-Encoding:gzip
```

so the Image.network received a gzip encoded image is possible,but it cannot rending.
I tried reset **Accept-Encoding** value to **identity** was defeated

```
Image.network(
            url
            headers: {"accept-encoding": "identity"},
          )
```

becase that:

```
in ...lib/src/painting/_network_image_io.dart

 headers?.forEach((String name, String value) {
        request.headers.add(name, value);
      });
```

finally,you only reset the **Accept-Encoding** value to **gzip,identity**

If use **headers.set** instead of **headers.add** everything is OK.


```
[✓] Flutter (Channel stable, v1.7.8+hotfix.4, on Mac OS X 10.13.6 17G65, locale zh-Hans-CN)
 
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 10.1)
[!] iOS tools - develop for iOS devices
    ✗ libimobiledevice and ideviceinstaller are not installed. To install with Brew, run:
        brew update
        brew install --HEAD usbmuxd
        brew link usbmuxd
        brew install --HEAD libimobiledevice
        brew install ideviceinstaller
[✓] Android Studio (version 3.2)
[✓] VS Code (version 1.37.1)
[✓] Connected device (1 available)
```
Repository: pytorch
Issue: Delete TensorOptions::operator==
Labels: module: internals,triaged,enhancement,small

We defined an equality test on TensorOptions but we really shouldn't have; the semantics are completely non-obvious.

What we should define instead is probably something like `TensorAxes` which is the tuple of `(DeviceType, Layout, DType)` which maps into TensorTypeId and uniquely specifies how dispatch computation happens. (Should Variable show up in here eventually? Probably.)
Repository: pytorch
Issue: Vectorize bool operations
Labels: triaged,enhancement,module: boolean tensor

While reviewing #25373 I realized that our bool operations are not vectorized. There isn't really any good reason they're not vectorized, right? We should vectorize them.

cc @izdeby
Repository: godot
Issue: Call to Thread.wait_to_finish() in my scene hangs in Windows but not Linux
Labels: discussion,topic:core

**Godot version:**
v3.1.1.stable.official

**OS/device including version:**
Linux/X11 and Windows 10

The same issue was observed across two Windows 10 machines and two Linux machines.

**Issue description:**
In a function I start a thread, yield until a signal from the thread is received, and then call `Thread.wait_to_finish()`. On Linux this produces the desired effect of doing work in the background without stopping a playing animation, but on Windows the call to `Thread.wait_to_finish()` never returns. I think it's a bug that Windows and Linux have different behaviour in these scenarios; it seems to me that the Linux behaviour should be the "correct" one, as I can't see any reason why Thread.wait_to_finish() should hang in that scenario. 

**Steps to reproduce:**
I've included a sample project  ([Thread_test.zip](https://github.com/godotengine/godot/files/3560890/Thread_test.zip)). `with_signal.tscn` prints: 
```
This is a thread!
Thread is done!
```
on Linux, but on Windows 10 it hangs and never prints the second line. 

I've also included `no_signal.tscn`, which demonstrates the workaround I've used for now.
Repository: go
Issue: x/tools: document minimum requirements for tests
Labels: Testing,Documentation,Builders,NeedsFix,Tools

Some of the x/tools tests are resource intensive and doing `go test golang.org/x/tools/...` on a machine with low RAM may fail.

I think it'd be helpful to document the RAM requirement. That way, if the tests run out of memory on a machine that meets the minimum requirements, it becomes easy to determine that the problem lies with the tests and not the machine. The responsibility division is unclear when the requirements are unspecified.

This is similar to issue #19046 but for x/tools.

/cc @ianthehat @heschik @stamblerre @bradfitz
Repository: pytorch
Issue: [feature request] symmetric matrix square root
Labels: triaged,module: linear algebra,function request

This is needed when incorporating curvature information into optimization

There's PyTorch implementation of symmetric matrix square root op [here](https://github.com/msubhransu/matrix-sqrt) but they use PyTorch for backward pass only, and use scipy for forward pass

In the meantime, see https://github.com/pytorch/pytorch/issues/25481#issuecomment-1032789228 for an implementation dispatching to `eigh`.

cc @vincentqb @vishwakftw @jianyuh @nikitaved @pearu @mruberry @heitorschueroff @SsnL
Repository: tensorflow
Issue: Cannot seek on write only tf.gfile.GFile
Labels: stat:awaiting tensorflower,type:bug,comp:apis,TF 2.11

**System information**

-  Have I written custom code: Yes
- OS Platform and Distribution: Linux Ubuntu 18.04
- TensorFlow installed from: binary
- TensorFlow version: v1.14.0-rc1-22-gaf24dc9 1.14.0
- Python version: 3.6

**Describe the current behavior**
Calling `seek()` on a `tf.gfile.GFile` opened in write only mode raises `tensorflow.python.framework.errors_impl.PermissionDeniedError`.

**Describe the expected behavior**
GFile should support the Python IO semantics that supports seeking on a write only file.

More generally it would be preferable if GFile followed the API of Python's [`io.IOBase`](https://docs.python.org/3/library/io.html#io.IOBase).


**Code to reproduce the issue**

```
import tensorflow as tf

with tf.io.gfile.GFile('test.txt', 'w') as f:
    f.seek(0)
```

**Other info / logs**
```
Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
  File "/VENV/lib/python3.6/site-packages/tensorflow/python/util/deprecation.py", line 507, in new_func
    return func(*args, **kwargs)
  File "/VENV/lib/python3.6/site-packages/tensorflow/python/lib/io/file_io.py", line 146, in seek
    self._preread_check()
  File "/VENV/lib/python3.6/site-packages/tensorflow/python/lib/io/file_io.py", line 82, in _preread_check
    "File isn't open for reading")
tensorflow.python.framework.errors_impl.PermissionDeniedError: File isn't open for reading
```
Repository: go
Issue: x/image/font/sfnt: GlyphName returns empty string on OpenType font
Labels: NeedsInvestigation

<!-- Please answer these questions before submitting your issue. Thanks! -->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.13beta1 darwin/amd64
</pre>


### What did you do?

<pre><code>
package main

import (
	"fmt"
	"io/ioutil"
	"log"

	"golang.org/x/image/font/sfnt"
)

func main() {
	b, err := ioutil.ReadFile("texgyrepagella-bold.otf")
	if err != nil {
		log.Fatal(err)
	}

	f, err := sfnt.Parse(b)
	if err != nil {
		log.Fatal(err)
	}

	var buffer sfnt.Buffer
	g, err := f.GlyphIndex(&buffer, '!')
	if err != nil {
		log.Fatal(err)
	}

	name, err := f.GlyphName(&buffer, g)
	if err != nil {
		log.Fatal(err)
	}

	fmt.Printf("The glyph name is %q.\n", name)
}
</code></pre>



[texgyrepagella-bold.otf.zip](https://github.com/golang/go/files/3561447/texgyrepagella-bold.otf.zip)


### What did you expect to see?

<pre><code>
The glyph name is "exclam".
</code></pre>

### What did you see instead?

<pre><code>
The glyph name is "".
</code></pre>
Repository: pytorch
Issue: Multithreaded backpropagation with custom autograd.Functions
Labels: feature,triaged,module: data parallel

## 🚀 Feature
By using DataParallel, the engine creates a thread for each GPU. It should do this for backpropagation too, including within python-implemented autograd.Functions.

## Motivation
We're trying to implement synchronized batchnorm for one machine/one "main" process using an interface like the traditional DataParallel. To synchronize the forward pass (computation of the mean+variance) we use a threading.Barrier to sync the threads for each GPU.

As it turns out, torch's batchnorm uses a custom backwards function which gives a different gradient than you'd get just from doing a linear transform with the mean and variance: https://github.com/pytorch/pytorch/blob/v1.1.0/aten/src/ATen/native/Normalization.cpp

To implement a SyncBatchNorm that behaves identically on multiple GPUs as torch's batchnorm does on one GPU it looks like we'd need to synchronize things like the mean of grad_output across all GPUs. But we can't get our .backward to be entered by multiple threads simultaneously to pull this off.

## Additional context
At first we were concerned that torch might not multithread backprop at all, which would be a huge slowdown for multi-GPU training, but it looks like it does for C implemented functions only? I can't find any clear documentation.
Repository: godot
Issue: Controls intercept hidden mouse input events
Labels: bug,confirmed,topic:input

**Godot version:** 3.2


**OS/device including version:** Linux


**Issue description:**
I have some free look camera code which uses Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED);

The problem is this would seemingly "lockup" and become unresponsive. I managed to find that the problem was that the Control elements I had on screen would take the input even when though the mouse was not visible!

**Steps to reproduce:**
Enable Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED); which will force the mouse to the centre of the viewport.
Then display a control on the centre of the screen that doesn't have mouse_filter set to MOUSE_FILTER_IGNORE


I have worked around the problem for now by ensuring I set mouse filter to MOUSE_FILTER_IGNORE when I go enable Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED);
Repository: pytorch
Issue: Assign torch.cuda.FloatTensor to List tensor
Labels: module: crash,module: cuda,triaged,has workaround

## ❓ Questions and Help

I make custom cell and use eager execution on CUDA.
Then I meet segmentation fault to assign torach.cuda.FloatTensor to List tensor.

List Tensor is defined in __init(self)__ as;
```python
self.x     = [torch.zeros(NUM_INPUT, device='cuda') for _ in range(NUM_HIDDEN)]
```

And the self.x is done as;
```python
for x, t in dataloader_train:
  for time in range(TIME_STEPS):
     for index in range(NUM_HIDDEN-1, 0, -1):
       model.x[index] = model.x[index - 1]
  
     model.x[0] = torch.cuda.FloatTensor(x[0][0][time])
```
Then output is
```python
Segmentation fault
```
How to avoid from the fault?
Repository: flutter
Issue: Driver over WebSocket instead of VMService
Labels: a: tests,tool,t: flutter driver,customer: dream (g3),P3,team-tool,triaged-tool

Internal: b/140286752

It would be interesting to provide a way to run Flutter Driver tests over a WebSocket connection instead of the VM Service protocol. That would allow it to be used in release builds, for example.

This would not be a feature that is enabled by default, and enabling it would have to involve some sort of out-of-band key exchange (with the driver extension generating part of the key) to ensure that only code that we expect to connect can connect. Or alternatively maybe the connection would be outgoing (you provide the endpoint to the driver extension). Or maybe you have to implement the endpoint logic and just hand in a socket or stream/sink pair.
Repository: pytorch
Issue: pytorch c++ api cannot call operator() on torch::nn::Sequential
Labels: module: cpp,module: nn,triaged

## 🐛 Bug

pytorch c++ api cannot call operator() on torch::nn::Sequential.

```cpp
class Net : torch::nn::Module {
 public:
  Net(int64_t in_size, int64_t out_size) {
     linears = register_module("linears", torch::nn::Sequential(
         torch::nn::Linear(in_size, out_size));
  }

  torch::Tensor forward(const torch::Tensor& input) {
      return linears(input);
      // return linears->forward(input) is okay but ModuleHolder should have implemented the operator() function.
  }  

  torch::nn::Sequential linears;
};
```

The error is "no viable conversion from torch::detail::return_type_of_forward_t to function return type torch::Tensor"

## To Reproduce

Steps to reproduce the behavior:

invoke operator() on torch::nn::Sequential

## Expected behavior

the same as torch::nn::Suqnential::forward

## Environment

Please copy and paste the output from our
[environment collection script](https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py)
(or fill out the checklist below manually).

You can get the script and run it with:
```
wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py
```

 - PyTorch Version (e.g., 1.0): 1.2
 - OS (e.g., Linux): linux
 - How you installed PyTorch (`conda`, `pip`, source): conda
 - Build command you used (if compiling from source):
 - Python version: 3.6
 - CUDA/cuDNN version: /
 - GPU models and configuration: /
 - Any other relevant information: /
Repository: godot
Issue: Light 2D masking changes brightness on sprites with transparency [GLES3 only]
Labels: bug,topic:rendering,confirmed,topic:2d

**Godot version:**
3.1


**OS/device including version:**
Ubuntu 19.04


**Issue description:**
When using a Light2D as a mask on a sprite with transparency it alters it's colour slightly.
![Capture d’écran de 2019-08-31 12-05-41](https://user-images.githubusercontent.com/30960698/64062648-59726b00-cbe9-11e9-9021-b4ba79d106c2.png)
![Capture d’écran de 2019-08-31 12-05-45](https://user-images.githubusercontent.com/30960698/64062649-5bd4c500-cbe9-11e9-900a-ab08502012df.png)
 
**Steps to reproduce:**

1. Add a sprite with transparency (or a opaque sprite and modulate the alpha by .5)
2. Add a Light2D in mask mode
3. Move the Light2D on and then of the sprite.

**Example Project:**

[Wrong masking.zip](https://github.com/godotengine/godot/files/3562431/Wrong.masking.zip)
Repository: storybook
Issue: Addon-docs: Load prop table from file
Labels: feature request,addon: docs,block: props

Parsing prop tables for typescript project takes a long time. react-docgen-typescript-loader parses all the prop table on every storybook load. 

However most times the prop tables very rarely change. A faster solution would be to generate prop table files only once in a while when the props of the components actually change.

If possible can you allow for loading prop tables from external files. By default, I am naming the external .json files for an example story ComponentName.stories.tsx as ComponentName.json

example external json file generated using directly "react-docgen-typescript":
https://github.com/atanasster/grommet-controls/blob/master/src/components/ColorInput/doc/ColorInput.json

my current (temporary) solution to use a webpack plugin to load the prop tables from files:
https://github.com/atanasster/grommet-controls/blob/master/.storybook/webpack.config.js

my current script to generate external json prop tables: 
https://github.com/atanasster/grommet-controls/blob/master/tools/generate-docs.js

If the feature request is accepted I can clean up my script and release it for other people to also use if they have typescript docgen prop tables.
Repository: storybook
Issue: Addon-docs: Expand/collapse prop table entries by their 'parent'
Labels: feature request,typescript,addon: docs,block: props

the typescript prop tables can often times get very long with components that are accepting props from many interfaces. Example: 
```
export type IDropInputProps = IDropInputOwnProps & TextInputProps & JSX.IntrinsicElements['input'];
```
the prop table in this case is really long: 
https://atanasster.github.io/grommet-controls/?path=/docs/controls-input-dropinput--main

The example prop table json file: 
https://github.com/atanasster/grommet-controls/blob/master/src/components/DropInput/doc/DropInput.json

A screenshot how the parent interface name can be collapsed. By default suggestion is to have expanded only the first interface name:
![screenshot805](https://user-images.githubusercontent.com/6075606/64064006-5fa51f00-cbca-11e9-944c-2f6edc3f3982.jpg)
Repository: storybook
Issue: Addon-docs: Proposal to link interfaces
Labels: feature request,addon: docs

In typescript projects, some (legacy) components accept large interfaces into a single prop name. In this case the prop table is really not very helpful as it shows only the top level property. I understand this is not a top priority, but just to keep it on file, can we have an option to 'link' embedded properties.

example of a prop table https://atanasster.github.io/grommet-controls/?path=/docs/charts-chartjs-barchart--main

it has only two props:
```
options: IChartjsOptions;
data:IChartjsData;
```

It would be more helpful to be able to link or expand the `IChartjsOptions` interface to actually see the available properties.
Repository: pytorch
Issue: [dataloader] Problem in exception reraise mechanism
Labels: module: dataloader,triaged

For some reason my implementation of `dataset.__getitem__` is throwing a `subprocess.CalledProcessError` (a problem in my dataset loading code).

If I pass to DataLoader `num_workers > 0`, I get the following - probably some issues with exception reraising (missing exception args). This is rather un-informative, since even exception type is missing.
```
Traceback (most recent call last):
  File "train.py", line 255, in <module>
    traineval(parser.parse_args())
  File "train.py", line 148, in traineval
    for batch_idx, (inputs, targets, filenames, input_percentages, target_lengths) in enumerate(train_data_loader):
  File "/miniconda/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 819, in __next__
    return self._process_data(data)
  File "/miniconda/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 846, in _process_data
    data.reraise()
  File "/miniconda/lib/python3.7/site-packages/torch/_utils.py", line 369, in reraise
    raise self.exc_type(msg)
TypeError: __init__() missing 1 required positional argument: 'cmd'
```

My PyTorch version is updated a week ago to a nightly.

@SsnL 

cc @SsnL