sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: os/exec: add example of handling exec.Error and exec.ExitError
Labels: Documentation,help wanted,NeedsFix

https://golang.org/pkg/os/exec provides `exec.Error` and `exec.ExitError` error types and doesn't document how to check and distinguish between them.

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.13.4 linux/amd64

</pre>

### What did you do?

I am using https://golang.org/pkg/os/exec/#Cmd.Output to capture the output of `dnf` command and check its return code. The doc says `Any returned error will usually be of type *ExitError`. However, trying to detect error with `errors.Is(err, exec.ExitError)` (as mentioned in https://golang.org/pkg/errors/) fails with `./prog.go:20:15: type exec.ExitError is not an expression`.

https://play.golang.org/p/7hjN2PCyBgB

### What did you expect to see?

Expect to separate error when command not found (seems to be `*exec.Error`) and when command run successfully with return code (`*exec.ExitError`). Expect to read exit code from `dnf` somehow which is part of its API.

Expect to see the example of distinguishing between these two errors and reading the exit code in Output example.

### What did you see instead?
```go
./prog.go:20:15: type exec.ExitError is not an expression

Go build failed.
```
Repository: storybook
Issue: In the Docs addon, import description from a Readme file
Labels: feature request,addon: docs

**Is your feature request related to a problem? Please describe.**
The docs addon default functionality is awesome, except that the description field is populated from JSDocs within the component file.

**Describe the solution you'd like**
An parameter for the docs addon to use a .mdx file for the description that retains all the other default docs functionality.

**Describe alternatives you've considered**
The readme addon sort of works, but it also adds the readme to the canvas, and adds a mandatory sidebar. Seems maybe I can I do this with a slot function, but I can't find any example code.

**Are you able to assist bring the feature to reality?**
no
Repository: godot
Issue: Pixel offset when resizing or zooming
Labels: bug,confirmed,topic:gui

**Godot version:** 3.1.2 RC1 Mono and 3.1.1 Mono

**OS/device including version:** Windows 10

**Issue description:**
I have two textures aligned next to each other. Both are at integer positions and scale. Problem is that they drift apart, or get inside of each other when zooming or resizing the window, even in the editor.

![resizeBug2](https://user-images.githubusercontent.com/7768485/69750586-6271ca80-114d-11ea-8e67-8c32fefc2f11.gif)
[^Zooming in the editor^]


![resizeBug](https://user-images.githubusercontent.com/7768485/69750347-d5c70c80-114c-11ea-9285-fe891dd688c6.gif)
[^Resizing the game window (uses "2d" display mode and "keep")^]
**Minimal reproduction project:**
[Test.zip](https://github.com/godotengine/godot/files/3898342/Test.zip)

Just open the speechbubble scene and scroll in and out to observe the effect
Repository: pytorch
Issue: [Tensorboard] nothing appears in the projector tab
Labels: needs reproduction,module: tensorboard,oncall: visualization

## 🐛 Bug

When running the add_embedding example provided in the official [documentation](https://pytorch.org/docs/stable/tensorboard.html#torch.utils.tensorboard.writer.SummaryWriter.add_embedding), I am unable to visualize the output in Tensorboard. When loading the projector page, it's blank. Yet the image and graph tab both works fine.

![tb_200](https://user-images.githubusercontent.com/30210529/69751901-51768880-1150-11ea-8db8-0ba4be404f8d.png)

## Script To Reproduce

```
import keyword
import torch


import torch
import torchvision
from torch.utils.tensorboard import SummaryWriter
from torchvision import datasets, transforms

# Writer will output to ./runs/ directory by default
writer = SummaryWriter()

transform = transforms.Compose([transforms.ToTensor(), transforms.Normalize((0.5,), (0.5,))])
trainset = datasets.MNIST('mnist_train', train=True, download=True, transform=transform)
trainloader = torch.utils.data.DataLoader(trainset, batch_size=64, shuffle=True)
model = torchvision.models.resnet50(False)
# Have ResNet model take in grayscale rather than RGB
model.conv1 = torch.nn.Conv2d(1, 64, kernel_size=7, stride=2, padding=3, bias=False)
images, labels = next(iter(trainloader))

grid = torchvision.utils.make_grid(images)
writer.add_image('images', grid, 0)
writer.add_graph(model, images)


meta = []
while len(meta)<100:
    meta = meta+keyword.kwlist # get some strings
meta = meta[:100]

for i, v in enumerate(meta):
    meta[i] = v+str(i)

label_img = torch.rand(100, 3, 10, 32)
for i in range(100):
    label_img[i]*=i/100.0

writer.add_embedding(torch.randn(100, 5), metadata=meta, label_img=label_img)
writer.add_embedding(torch.randn(100, 5), label_img=label_img)
writer.add_embedding(torch.randn(100, 5), metadata=meta)

writer.close()
```

## Environment
pytorch: 1.3.0
torchvision: 0.5.0a0+9cdc814
tensorboard: 2.0.0
tensorflow not installed.

cc @ezyang @gchanan @zou3519 @jerryzh168
Repository: flutter
Issue: Don't include dev_dependencies in native build scripts
Labels: c: new feature,tool,P3,team-tool,triaged-tool

## Use case

I'm maintaining a package providing bindings to sqlite via `dart:ffi`. For Android apps, we need to compile sqlite3 as a dynamic library that gets put into the apk. For iOS and non-Flutter Dart apps, we use the sqlite3 library from the system, if available.

Since `dart:ffi` is still in an early stage, many users want to use native bindings for tests only, and use another package like `sqflite` for production. Unit tests are run on a desktop machine, so we don't compile any native libraries and instead use the one from the system. Unfortunately, the Flutter tool will include the native build script even if the package is just a `dev_dependency`. This means that native libraries are added into the built apk for no reason, but are still increasing app size.

## Proposal

The `dev_dependecies` section of a pubspec indicates that a package is only used for development. So, I believe that the Flutter tool should not view packages in `dev_dependencies` as a native package and not run their native buildscripts when using `flutter run` or `flutter build`.
Repository: pytorch
Issue: Warn about driver CUDA mismatch in torch.cuda.is_available()
Labels: module: cuda,triaged,enhancement

## 🐛 Enhancement

The `torch.cuda.is_available()` should print a warning if the GPU driver is too old to support the CUDA version installed with PyTorch. If the system does not have a GPU or PyTorch was built without CUDA support, the function should return False but remain silent to avoid spamming less useful messages.

We already print such a warning about driver mismatch when initializing CUDA. However, I've seen a number of shared PyTorch scripts that don't even get to initializing CUDA because its gated on a `torch.cuda.is_available()` call. People are usually a little lost at that point, because they don't know **why** `torch.cuda.is_available()` returned `False`.

cc @ngimel
Repository: flutter
Issue: A way to observe child size changes
Labels: c: new feature,framework,customer: dream (g3),P3,team-framework,triaged-framework

There are use cases for observing a child's layout parameters whenever they change.
`Customer: dream` were recently asking for an easy way to observe a subtree's size.

To unblock `customer: dream` they are using this snippet: https://github.com/amirh/size_observer/blob/master/lib/size_observer.dart#L12

I'm filing the issue to discuss whether we want to include an equivalent widget in the framework. If there's already an equivalent in the framework I'm not aware of please let me know 😄 .

The closest thing I'm aware of in the framework is [SizeChangeLayoutNotifier](https://github.com/flutter/flutter/blob/37f9c541165c3516f727cd36bd502d411fdad3b8/packages/flutter/lib/src/widgets/size_changed_layout_notifier.dart#L52) which sends a notification when the size has changed. Relevant properties of the current implementation for SizeChangeLayoutNotifier:

1. It does not notify on the initial size.
2. It does not include the size with the notification (can be worked around by a closure with access to BuildContext as a post frame callback when a notification arrives).
3. The notification is not tied to a specific widget, e.g a NotificationListener with more than one SizeChangeLayoutNotifier in its subtree cannot tell which of them sent the notification.

While we can adjust `SizeChangeLayoutNotifier` to meet the same requirements by:
1. Add an optional `notifyOnInitialSize` bool parameter to `SizeChangeLayoutNotifier` (defaults to false for backwards compatibility).
2. Include the new layout size as part of [SizeChangedLayoutNotification](https://master-api.flutter.dev/flutter/widgets/SizeChangedLayoutNotification-class.html).
3. Add some identifying property to `SizeChangedLayoutNotification`.

I feel like the ergonomics of the adjusted `SizeChangeLayoutNotifier` won't be so nice (especially due to `#3`). So I think it may sense to add something like [SizeObserver](https://github.com/amirh/size_observer/blob/master/lib/size_observer.dart#L12) to the framework.

@HansMuller I wonder if you have any thoughts.
Repository: pytorch
Issue: Document memory characteristics of in-place ops
Labels: module: sparse,module: docs,triaged,enhancement,module: type promotion

## 📚 Documentation

Users typically expect in-place operations to save memory over out of place variants. There are some cases, e.g. when mixed-type operations will perform the op into a different tensor of a common dtype, or when (after https://github.com/pytorch/pytorch/pull/30429), performing certain operations on uncoalesced sparse tensors. The memory characteristics should be explained somewhere in the docs.




cc @vincentqb
Repository: godot
Issue: AutoLoads can be named "_"
Labels: enhancement,topic:editor,usability

**Godot version:** 3.2 beta 2

**OS/device including version:** Pop OS 19.04

**Issue description:**

The singleton name-check allows to call singletons "_", "__", etc.
You **cannot** do `_.some_thing`
You **can** do `__.some_thing`

![Screenshot from 2019-11-27 22-11-44](https://user-images.githubusercontent.com/44414272/69759652-eedab800-1162-11ea-897c-0d72245ccace.png)

**Steps to reproduce:**
Make an autoload scene/script and name it "_".

**Minimal reproduction project:**
Repository: pytorch
Issue: [FR] nn.init.* accept None as input tensor
Labels: module: nn,triaged,enhancement

## 🚀 Feature
It would be great if `nn.init.*` methods accept `None` as the input (and do noop in that case). 

## Motivation

Greatly simplifies the common pattern:
```py
        def init(m):
            if isinstance(m, (nn.Linear, nn.Conv2d)):
                nn.init.normal_(m.weight, 0, 0.02)
                if getattr(m, 'bias', None) is not None:
                    nn.init.zeros_(m.bias)
            elif isinstance(m, nn.BatchNorm2d):
                if getattr(m, 'weight', None) is not None:
                    nn.init.ones_(m.weight)
                if getattr(m, 'bias', None) is not None:
                    nn.init.zeros_(m.bias)
```
Repository: youtube-dl
Issue: Pony.fm
Labels: site-support-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 2019.11.22. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
- Make sure that all provided video/audio/playlist URLs (if any) are alive and playable in a browser.
- Make sure that site you are requesting is not dedicated to copyright infringement, see https://yt-dl.org/copyright-infringement. youtube-dl does not support such sites. In order for site support request to be accepted all provided example URLs should not violate any copyrights.
- Search the bugtracker for similar site support 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 new site support request
- [x] I've verified that I'm running youtube-dl version **2019.11.22**
- [x] I've checked that all provided URLs are alive and playable in a browser
- [x] I've checked that none of provided URLs violate any copyrights
- [x] I've searched the bugtracker for similar site support requests including closed ones


## Example URLs && Description

Free Audio tracks from pony.fm

- Overview page which should be detected: https://pony.fm/tracks/43462-summer-wind-fallout-equestria-skybolt
  - that's `https://pony.fm/tracks/<track-id>-<text>`
- On there is a <kbd>Downloads</kbd> button with different formats
  - [ ] OGG Vorbis (download see below)
  - [ ] ALAC (download see below)
  - [ ] AAC (download see below)
  - [ ] MP3: https://pony.fm/t43462/dl.mp3
    - that's `https://pony.fm/t<track-id>/dl.mp3`
  - [ ] FLAC: https://pony.fm/t43462/dl.flac
    - that's `https://pony.fm/t<track-id>/dl.flac`

- For OGG Vorbis, AAC, ALAC the download requires calling a REST endpoint first:
 - `GET https://pony.fm/api/web/tracks/cached/<track-id>/ALAC` or `/AAC` or `/OGG%20Vorbis`
   - returns a json `{"url": null}`
   - redo that request until it contains an url
   - e.g. `{"url":"https:\/\/pony.fm\/t43462\/dl.m4a"}`

- [ ] There also is a lyrics section
- [ ] Cover image can be loaded from https://pony.fm/i10167/normal.png, `https://pony.fm/i<track-id>/normal.png`
Repository: go
Issue: cmd/go: error isn't properly reported when running go list on cgo package with missing pkg-config
Labels: NeedsFix,GoCommand

<!-- Please answer these questions before submitting your issue. Thanks! -->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.13.3 darwin/amd64
</pre>

### Does this issue reproduce with the latest release?

Yes

### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/muir/Library/Caches/go-build"
GOENV="/Users/muir/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/muir/projects/<project>/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/_q/1xpb0k992ll803xsldpx0qyr0000gn/T/go-build252385107=/tmp/go-build -gno-record-gcc-switches -fno-common"
</pre></details>

### What did you do?

I opened a non-cgo package in our project. The package does not transitively depend on any cgo packages.

### What did you expect to see?

I expected gopls to load the package with no issue.

### What did you see instead?

gopls failed to create the view due to a `go list` "missing pkg-config" error.

```
LSP :: Error loading workspace folders (expected 1, got 0)
failed to load view for file:///Users/muir/projects/<project>/go/src: error loading packages: go [list -e -json -compiled=true -test=true -export=false -deps=true -find=false -- ./...]: exit status 2: # pkg-config --cflags  -- <bunch of libraries>
pkg-config: exec: "pkg-config": executable file not found in $PATH
```

Elsewhere, our project has a cgo package that uses the cgo pkg-config directive (e.g. `// #cgo pkg-config: some-library`). My laptop doesn't currently have pkg-config installed.

I assume the error comes from the `go list ./...` we do now when creating a view.
Repository: flutter
Issue: Expose more APIs to interact with app in driver API
Labels: c: new feature,framework,t: flutter driver,P3,team-framework,triaged-framework

Internal: b/140894344

Customer dream ran into some limitations of our driver API. It seems like we could make things better by some minor changes:

- In addition to `tap`, expose `tapAt` (taking a DriverOffset).
- In addition to `scroll`, expose `scrollFrom` (taking a DriverOffset) (and maybe rename it `drag`/`dragFrom`).
- Expose new APIs TestPointer and TestGesture in the driver API, equivalent to the homonymous classes in flutter_test.
Repository: TypeScript
Issue: type destructuring
Labels: Suggestion,Awaiting More Feedback

## Search Terms
type destructuring

## Suggestion
Allow destructuring syntax when assigning `type`

## Use Cases
Dynamically assign a type as the type of an other type's property.

## Examples
Where `AutocompleteService` is a class, `PlacesServiceStatus` is an enum, and `AutocompletePrediction` is an interface.

What I'm doing currently:
```ts
const { AutocompleteService, PlacesServiceStatus } = google.maps.places;
type AutocompletePrediction = google.maps.places.AutocompletePrediction;
```

What I'd like to be able to do:
```ts
const { AutocompleteService, PlacesServiceStatus } = google.maps.places;
type { AutocompletePrediction } = google.maps.places;
```

## Checklist

My suggestion meets these guidelines:

* [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [x] This could be implemented without emitting different JS based on the types of the expressions
* [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
Repository: flutter
Issue: Expand output paths for `flutter build ios-framework`, allow ~
Labels: c: new feature,platform-ios,tool,dependency: dart,a: existing-apps,P3,team-ios,triaged-ios

## Steps to Reproduce

```
flutter build ios-framework --output=~/Desktop/FlutterFrameworks/
```

Creates a `~` directory in the working directory instead of expanding ~
Repository: TypeScript
Issue: Smarter errors around `Function.length`
Labels: Domain: Error Messages

I don't know how often other people have encountered this, but here goes: In the same vein as our uncalled function checks, most usages of `Function.length` are _probably_ an error. Here's a toy example that just bit me:
```ts
declare function getResult(): string[];
for (let i = 0; i< getResult.length; i++) {
  getResult().slice(0, i).map(x => console.log(x));
}
```

Minimally, I think we could suggest that if a function returns something with a `length` property, and the function's `length` property is inspected instead, we could probably mark it as suspect.
Repository: go
Issue: proposal: crypto/x509: reloading certificates from disk
Labels: Proposal,Proposal-Crypto

[From][1] #24254:

>  I wonder if there is any real use case for reloading the system cert pool.

One use case is long-running processes that now have to jump through hoops to update their view of the system cert pool (e.g. openshift/cloud-credential-operator#113).  On Unix, [the loading logic][2] is expensive, traversing multiple directories.  But for processes who know they can load certs from a single file, it would be nice to have a way to reload if the backing file had changed but not otherwise.  For example, something like:

```go
// NewCertPoolsFromFile parses a series of PEM encoded certificates from the file at the
// given path and records the Stat ModTime of the loaded file.  When the pool is used to
// verify a certificate, it has been more than a minute since the last Stat, and a fresh
// Stat gives a ModTime newer than the cached value, the file is reloaded before being
// used to perform the verification.
func NewCertPoolFromFile(path string) *CertPool
```

Obviously the "don't bother `Stat`ing again" time could be configurable if that seemed important.  Or maybe checking the current time is about as expensive as running the `Stat`, so we should just call `Stat` on every `contains`.  Or maybe there would be no auto-refresh in `contains`, but `CertPool` would become an `interface`:

```go
type CertPool interface {
  BySubjectKeyID(key string) []*Certificate
  ByName(name string) []*Certificate
}
```

In which case there could be a from-file `CertPool` implementation with a `Refresh` method to trigger the `Stat` check and possible reload.  Or something ;).  But having something in the stdlib that could be dropped into [`tls.Config.RootCAs`][3] to get efficient reloads without the caller having to babysit the `CertPool` would be great.  Thoughts? 

[1]: https://github.com/golang/go/issues/24540#issuecomment-376227784
[2]: https://github.com/golang/go/blob/8a5af7910a9b157c02736c3e0998a587bb8511c1/src/crypto/x509/root_unix.go#L39-L89
[3]: https://golang.org/pkg/crypto/tls/#Config
Repository: PowerToys
Issue: [FancyZones] add support for afwn [a few windows niceties] store app window layout and positioning keyboard shortcuts
Labels: Idea-Enhancement,Product-FancyZones

# Summary 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 afwn [ a few windows niceties ] store app [ [https://microsoft.com/en-us/p/a-few-windows-niceties/9mtw4cj7s276](https://microsoft.com/en-us/p/a-few-windows-niceties/9mtw4cj7s276) ] window layout and positioning keyboard shortcuts.  

Specifically the alt+c[enter 60% of screen width], alt+p[hone 80% of screen height with 9:16 aspect ratio] and alt+t[ablet 80% of screen height with 16:9 aspect ratio]. All three with alt+shift modifier variants that reduce the % of width and height used and in case of latter two change the aspect ratio to 3:4 and 4:3 respectively.  

Also consider enabling the alt+b[utton swap on mouse] and alt+z[leep computer] options.

For more details on these keyboard shortcuts see app's [help screen screenshot](https://github.com/myusrn/uwpSystrayExtension/blob/master/Package/Images/Screenshot%20combined.png).

# Proposed technical implementation details (optional)

<!-- 
A clear and concise description of what you want to happen.
-->
Repository: node
Issue: Migration of core modules to primordials
Labels: meta

This is a tracking issue for the migration of core modules to use builtins from the `primordials` object.

At the moment, for performance-sensitive code, only static methods and global functions should be migrated. V8 8.0 might have the optimization that we need to migrate prototype methods.