sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: [feature request] Faster specialized int16->float32 conversions to match speed with NumPy
Labels: module: performance,module: cpu,triaged

I found that int16->float32 conversion in PyTorch is at least 3x slower than in NumPy.

How can we properly measure wall clock time ("real" time) when using multi-threaded code?
Is there a context manager for disabling multi-threading reliably for a block of code? (taking care of MKL_NUM_THREADS / OMP_NUM_THREADS/etc). In some cases it may be that overhead of multi-threading surpasses the benefit (especially in the context of data loader processes)

I've also tried `time.process_time`, `time.perf_counter`, `time.thread_time`, `time.monotonic` - they all give me sth like sum over all threads.

`time python3 bug.py`

```
use_numpy False use_torch True set_num_threads False
21875.09536743164 us

real    0m3.086s
user    1m13.246s
sys     0m0.268s
```

```
use_numpy True use_torch False set_num_threads False
18.9971923828125 us

real    0m0.852s
user    0m0.722s
sys     0m0.125s
```

```
use_numpy False use_torch True set_num_threads True
35.28118133544922 us

real    0m1.022s
user    0m0.855s
sys     0m0.154s
```


```python
# bug.py

(use_numpy, use_torch, set_num_threads) = (False, True, False)
print('use_numpy', use_numpy, 'use_torch', use_torch, 'set_num_threads', set_num_threads)

import time
import torch

timer = time.time
s2f = lambda signal: signal.float() / 32767
s2f_ = lambda signal: signal.astype('float32') / 32767

number = 100
scale = 1e-6

signal = torch.randint(-32_000, 32_000, (40_000, ), dtype = torch.int16)

if set_num_threads:
    torch.set_num_threads(1)

if use_torch:
    tic = timer()
    for i in range(number):
        s2f(signal)
    print((timer() - tic) / scale / number, 'us')

if use_numpy:
    tic = timer()
    for i in range(number):
        s2f_(signal.numpy())
    print((timer() - tic) / scale / number, 'us')
```

cc @VitalyFedyunin @ngimel
Repository: flutter
Issue: Remove the -fno-ident flag when compiling engine translation units.
Labels: customer: fuchsia,engine,platform-fuchsia,P2,team-engine,triaged-engine

The comment above the specification of the flag states:

```
    # Don't emit the GCC version ident directives, they just end up in the
    # .comment section taking up binary size.
```

The size savings looks dubious and prevent toolchain maintainers from identifying the compiler used to compile the engine. This flag must be removed.
Repository: ant-design
Issue: [Statistic.Countdown] Would be nice to have a pause/start api.
Labels: help wanted,Inactive

- [x] I have searched the [issues](https://github.com/ant-design/ant-design/issues) of this repository and believe that this is not a duplicate.

### What problem does this feature solve?
In some cases, countdown might need to be paused and continue later on.

### What does the proposed API look like?
const { Countdown  } = Statistic;
const deadline = 1000 * 30; // mili seconds, not depend on Data.now() 
const ref= useRef(null);
const autoStart = false; // boolean

// once mounted, we can call following API to control the countdown
ref.start()
ref.pause()

Countdown: ref={ref} autoStart={autoStart} value={deadline} onFinish={onFinish}


<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: pytorch
Issue: Enable torch.testing._internal typechecks during CI 
Labels: module: typing,triaged

`TestTypeHints.test_run_mypy_strict` should pass with `[mypy-torch.testing._internal.*]` deleted from `mypy.ini`

cc @ezyang @malfet @rgommers
Repository: pytorch
Issue: Enable torch.quantization.fuse_modules typechecks during CI 
Labels: module: typing,triaged

`TestTypeHints.test_run_mypy_strict` should pass with `[mypy-torch.quantization.fuse_modules]` deleted from `mypy.ini`

cc @ezyang @malfet @rgommers
Repository: scrcpy
Issue: "sudo ninja -Cx install" consistently failing on Ubuntu 16.04
Labels: build

 - [Yes, no such issue reported ] I have read the [FAQ](https://github.com/Genymobile/scrcpy/blob/master/FAQ.md).
 - [[Yes, no such issue reported for -v1.16- ] I have searched in existing [issues](https://github.com/Genymobile/scrcpy/issues).

**Environment**
 - OS: [Ubuntu 16.04]
 - scrcpy version: [latest version with "scrcpy-server-v1.16"]
 - installation method: [e.g. manual build, Ubuntu 16_04 Linux]
 - device model:irrelevant
 - Android version: [irrelevant]

**Describe the bug**
I'm trying to install scrcpy on Ubuntu 16.04, I've tied many combinations of building and installing scrcpy as described in both previous version of BUILD.md, with scrcpy-server-v1.14 I found on GitHub on Monday August 3rd, as well as the current version with scrcpy-server-v1.16. However I never tried to build the scrcpy-server, though {{ ninja -Cx }} sometimes even though I always choose to use the "prebuilt server" rather than building one, erroneously blows up with the following error 

     Could not determine the dependencies of task               \\s\
        ':server:compileReleaseJavaWithJavac'.
    > SDK location not found. Define location with an 
        ANDROID_SDK_ROOT environment variable or by setting the \\s\
        sdk.dir path in your project's local properties file at \\s\
        '/home/uID/wk/scrcpy-wk/scrcpy/local.properties'.

I tweaked the installation process with all the relevant tweaks suggested in the current BUILD.md document, most importantly the suggested fix to avoid problems with older version of {{ meson }} used on Ununtu 16.04 installing {{ python3-pip }} and subsequently {{ pip3 install meson }}, as well as by running one, two or all three suggested tweaks {{ "ninja reconfigure", "meson --reconfigure" and "meson setup --wipe" }} with the latter actually beeing {{ meson setup --wipe x --buildtype release --strip -Db_lto=true -Dprebuilt_server=/usr/local/bin/scrcpy-server }} which finally enable able me to bring the process to the last step {{ sudo ninja -Cx install }}. However, at this point I consistently keep getting the following error: 

    ninja: fatal: ninja version (1.5.1) incompatible with build     \\s\
        file ninja_required_version version (1.7.1).

(BTW: the {{ \\\s\ }} mark above is a line-concatenation sign indicating that 
 a space is allowed between the two parts (lines) separated by it.)
Repository: flutter
Issue: [in_app_purchase] When reporting an error, PurchaseDetails has a null Product ID and null Purchase ID (Android)
Labels: p: in_app_purchase,package,team-ecosystem,P2,triaged-ecosystem

I'm testing IAP on Android using a Play Store test account.

I launch the purchase flow as usual. If I do anything to trigger an error in the purchase flow, the `PurchaseDetails` instance that is sent to my listener contains the reported `error`, but reports `null` for `productId` and `null` for `purchaseId`.

Without either of these IDs, I can't tell whether this particular product event is related to given product, and this given purchase attempt, or some other product/purchase attempt.

Errors that cause this behavior include:
 * the user cancelling the transaction
 * attempting to purchase an already owned subscription
 * declined card

Flutter version:
```
Flutter 1.21.0-1.0.pre • channel master • https://github.com/flutter/flutter.git
Framework • revision 6eaaf1650e (5 weeks ago) • 2020-07-09 18:04:37 -0700
Engine • revision 9b3e3410f0
Tools • Dart 2.9.0 (build 2.9.0-20.0.dev 06cb010247)
```

IAP version: `^0.3.4+3`

Android version: `10`
Repository: flutter
Issue: Building  getFlutterView with enableTransparentBackground in new v2 embedding  based on kotlin
Labels: platform-android,engine,d: examples,a: existing-apps,P2,team-android,triaged-android

According to recommendations provided by @leisim and others here: 

- [1] [https://github.com/NMateu/flutter_transparent_app/ ](https://github.com/NMateu/flutter_transparent_app/ )
- [2] [https://github.com/flutter/flutter/issues/28844#issuecomment-478939888 ](https://github.com/flutter/flutter/issues/28844#issuecomment-478939888 )

..., I'm trying to built a **transparent flutter app** using **Flutter new embedding v2**.  

As far as [1] and [2] represent _**Flutter old v1 embedding**_, while I need **Flutter new v2 embedding**, I'm trying to convert java code provided by [1] and stored in the next java file: 

-  /android/app/src/main/java/com/example/transparent_app/MainActivity.java 

... to kt code that according to **Flutter new v2 embedding** rules should be stored in the next kt file: 

- /android/app/src/main/[package_name]/MainActivity.kt . 

I'm using **Android Studio**, and **the Studio** readily helps me convert java code to kt code syntactically. But, as it is thought expected, Android Studio is unable to convert semantics of the code, so I receive such errors: 

`Type mismatch: inferred type is MainActivity but FlutterEngine was expected`. 
 `Unresolved reference: getFlutterView`.

The kotlin code that produces those error is provided here: 

```
package [my_package_name]

import io.flutter.embedding.android.FlutterActivity
import android.os.Bundle
import io.flutter.view.FlutterView
import io.flutter.plugins.GeneratedPluginRegistrant
import androidx.annotation.NonNull
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugin.common.MethodChannel

class MainActivity : FlutterActivity() {

    // added from android/app/src/main/java/com/example/transparent_app : begin : ↓

    override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
        super.configureFlutterEngine(flutterEngine)
    }

    override
    protected fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        GeneratedPluginRegistrant.registerWith(this)
        val view: FlutterView = getFlutterView()
        view.enableTransparentBackground()
    }
    
    // moved from android/app/src/main/java/com/example/transparent_app : end : ↑

}
```

Is it possible to somehow overcome this incompatibility of **flutter_transparent_app** with **Flutter new v2 embedding**? 

Putting it In other words: how can I build **flutter_transparent_app** using **Flutter new v2 embedding**? 

**Or is any other way to build transparent flutter apps using Flutter new v2 embedding?**
Repository: go
Issue: cmd/link: help text for linkmode isn't helpful
Labels: Documentation,NeedsInvestigation,compiler/runtime

```
$ go version
go version devel +5c7748dc9d Mon Aug 10 23:44:58 2020 +0000 linux/amd64
$ go tool link -h 2>&1 | grep -A1 linkmode
  -linkmode mode
    	set link mode
```

At least, it could tell me what the modes are, and ideally point me at the docs for what they do.

I realise that the compiler and linker are fairly low level and mostusers shouldn't be looking at `go tool link -h`, but given that `-linkmode=external` is somewhat well known and widely used, it's confusing that it's hard to find its definition without looking at the code.

CC @cherrymui @jeremyfaller
Repository: excalidraw
Issue: dark mode: detect user's color theme preference
Labels: enhancement

Since [Dark mode](https://github.com/excalidraw/excalidraw/pull/2006) has landed, it would be nice if we could use system's color theme as default `prefers-color-scheme`
Repository: PowerToys
Issue: [WinAppDriver] Shortcut Guide test failure
Labels: Issue-Bug,Product-Shortcut Guide,Area-Tests,External Dependency

The Shortcut Guide tests fail because of https://github.com/microsoft/WinAppDriver/issues/1081
Repository: bitcoin
Issue: RPC level Timeout feature
Labels: Feature,RPC/REST/ZMQ

We had an instance of a single RPC request blocking for a while. I suspect it was because the RPC client socket got closed ungracefully and the RPC request's reply was just blocking there until the server eventually dropped the socket. (probably a network related problem)

The problem is that while the request was blocking, other requests got queued in the RPC queue for processing. But those requests failed to be processed before the other clients timeout, because of the first RPC request blocking all processing until the socket timeout.

Some of those requests were not idempotent (like `sendtoaddress`). The caller of this request, not seeing any response from in a certain timeout, assumed the request failed, however this request got eventually processed once the RPC queue started getting processed again. The caller, assuming `sendtoaddress` failed, made another request, essentially sending twice.

`rpcservertimeout` is only referring to the timeout it takes to read the HTTP request, but HTTP requests get read immediately and queued in the RPC queue. Once queued, bitcoin core makes no check after dequeuing the request that it got timed out.

I was thinking, the best way to solve this is to have a timeout at RPC protocol level, that clients can specify in the RPC request. When bitcoin core unqueue the request from the rpc queue, it can check if the request expired and not running it if that's the case.

What do you think about such solution? I agree this is to solve a corner case issue, but nevertheless this issue could have resulted in loss of funds, and I need to find a way so it does not happen again.
Repository: storybook
Issue: Button control type
Labels: feature request,addon: controls

With the Knobs addon I could include a button and associated handler... is this possible with the Controls addon?

```
import { button } from '@storybook/addon-knobs';
 
const label = 'Do Something';
const handler = () => doSomething('foobar');
const groupId = 'GROUP-ID1';
 
button(label, handler, groupId);
```
Repository: svelte
Issue: Values in an outro transition are sometimes determined at render time
Labels: stale-bot

**Describe the bug**
Values in an outro (`out:`) transition are sometimes determined at render time, rather than at transition time. More specifically, this happens when the the outro is on elements in an `#each` block. I have determined that this is indeed the case by putting logs in the svelte transition code.

**To Reproduce**
A REPL of the bug can be found here:
https://svelte.dev/repl/1ad9b6b4883e4b92bb679418a529ea00?version=3.24.1

While normal behavior can be found here:
https://svelte.dev/repl/ad9931c0bfb1420aadec3180202bf6bd?version=3.24.1

**Expected behavior**
In the bug repl, the outro transition should always match the `outX` variable, which is set to a negative value when "next" is clicked, and a positive value when "prev" is clicked. This would be similar to the behavior in the second repl (demonstrating normal behavior), where the outro always matches the value of `y`.
Instead, the outro always matches the previous value of `outX`, resulting in the outros occasionally moving in the wrong direction.

**Severity**
This bug causes problems trying to make a carousel component. It is not blocking me personally, but it was reported on discord.

**Additional context**
This bug was originally reported by @levyadams on discord.
Repository: flutter
Issue: Restricting Map Bounds
Labels: c: new feature,p: maps,package,c: proposal,team-ecosystem,P3,triaged-ecosystem

According to Google documentation, we developer can restrict the map bounds by providing the restriction latLngBounds

but, when checking flutter GoogleMap it does not expose such functionally. 

<details>
  <summary>Restricting Map Bounds - developers.google.com</summary>
  
  ## Maps control bounds restriction
```
  map = new google.maps.Map(document.getElementById("map") as HTMLElement, {
    center: AUCKLAND,
    **restriction: {
      latLngBounds: NEW_ZEALAND_BOUNDS,
      strictBounds: false
    },**
    zoom: 7
  });
```
[maps_control_bounds_restriction-typescript](https://developers.google.com/maps/documentation/javascript/examples/control-bounds-restriction#maps_control_bounds_restriction-typescript)
</details>
Repository: storybook
Issue: Import .md (and not .mdx file) as Docs Only page?
Labels: question / support,addon: docs

### Bug or support request summary

Is it possible to directly import a normal `.md` file (such as a `README.md` file) into a story for display? Or, is it possible to import a `.md` file as a Docs Only page? If so, how would I go about doing that?

So far, I've only been able to get that working by copying the contents of a `.md file into a `.stories.mdx` file, while also using `<Meta />` for the docs only approach.


### Please specify which version of Storybook and optionally any affected addons that you're running

- @storybook/react 6.0.4
- @storybook/addon-docs 6.0.4
Repository: pytorch
Issue: Implement map-style caching DataSet as PyTorch build-in DataSet.
Labels: module: bootcamp,module: dataloader,triaged

This is follow-up of #35642 proposal and discussion under #39274 implementation.

Proposed API:

Option 1:
```python
c_map_dataset = CachingDataSet(map_dataset)
```
Option 2:
```python
c_map_dataset = CachingDataSet(map_dataset, maxsize = 32)
# specify max size of default LRU cache
```
Option 2:
```python
cache_obj = LRUCache()
c_map_dataset = CachingDataSet(map_dataset, cache = cache_obj)
```
Where cache_obj implements `get(k, v)` `set(k, v)` or `get(k, v)` `put(k,v)` or `__getitem__()` `__setitem__()`.

Note: Build-in Python's `lru_cache` is keyed on an object, making cache ineffective between epoch as DataSet object might be recreated, so we cannot recommend it as the default solution.

Note 2: The cache key should be constructed as a combination of cache object id and data-id.



cc @SsnL @VitalyFedyunin
Repository: terminal
Issue: Animate Theme transition, maybe other color changes too?
Labels: Help Wanted,Area-UserInterface,Product-Terminal,Issue-Task,Priority-3

_Big s/o to @stmoy who helped point me at the fact that this is possible with XAML._

refer to: https://docs.microsoft.com/en-us/windows/uwp/design/motion/motion-in-practice#implicit-animations

Also refer to the "Implicit Transitions" page in the xaml controls gallery.
![implicit-transitions-sample](https://user-images.githubusercontent.com/18356694/90152286-4484de00-dd4d-11ea-834e-5863ad38698e.gif)

Apparently we can add a trivial amount of markup to our XAML to get some pretty slick color transitions. I think this would be awesome to add.

(maybe also relevant: #1001, #7216 )
Repository: flutter
Issue: Consider MSIX as a build option
Labels: c: new feature,tool,platform-windows,a: desktop,a: build,P3,team-windows,triaged-windows

There have periodically been requests for an installation solution for Windows (see discussion in https://github.com/flutter/flutter/issues/53167, and https://github.com/flutter/flutter/issues/63646, for examples). While there isn't a single install option—and in fact, an installer isn't actually necessary for some distribution models—it does appear that Microsoft is trying to move the ecosystem toward MSIX as a standard packaging system (especially with MSIX Core as a backfill for targeting older versions of Windows).

So far we'd been considering installers to be above the level of Flutter, but if MSIX is going to be a standard app package format we should explore supporting it directly, either as a new build option (e.g., `flutter build msix`) or as an extra artifact from `flutter build windows`).
Repository: go
Issue: x/tools/go/analysis/passes/shadow/cmd/shadow: Failure/success of the linter depends also on filename, not just the content
Labels: NeedsInvestigation,Tools,Analysis

<!--
Please answer these questions before submitting your issue. Thanks!
For questions please use one of our forums: https://github.com/golang/go/wiki/Questions
-->

### What version of Go are you using (`go version`)?

<pre>
$ go version
1.14.6
</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="/home/wolf/.cache/go-build"
GOENV="/home/wolf/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY="go.showmax.cc,go.platfoo.cc"
GONOSUMDB="go.showmax.cc,go.platfoo.cc"
GOOS="linux"
GOPATH="/home/wolf/go"
GOPRIVATE="go.showmax.cc,go.platfoo.cc"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/lib/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
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 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build056422182=/tmp/go-build -gno-record-gcc-switches"

</pre></details>

### What did you do?

<!--
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
-->

1. Install shadow vet:

	$ go install golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow

2. Create following files:

	+$ tree .
	.
	├── b.go
	├── c.go
	└── go.mod

	0 directories, 3 files
	+$ cat b.go
	package foo

	func newX() int {
		x := 1
		return x
	}

	var x = newX()
	+$ cat c.go
	package foo

	func f() {
		x = 1
	}
	+$ cat go.mod
	module foo

	go 1.14

3. Run the shadow vet:

	$ go vet -vettool=/home/wolf/go/bin/shadow ./...

### What did you expect to see?

	# foo
	./b.go:4:2: declaration of "x" shadows declaration at line 8

### What did you see instead?

Nothing.

### Some research notes

It looks like shadow vet depends on the filenames, because all one needs to do
to get the expected output is to rename `c.go` to `a.go`, so when sorted by
alphabet is is **before** `b.go`. My understanding is that the package is the
scope, so alphabetic ordering of the files should not matter.
Repository: create-react-app
Issue: Licensing template files
Labels: needs triage

When creating a new React app using [the template](https://github.com/facebook/create-react-app/tree/v3.4.1/packages/cra-template) the new project is necessarily based on those files. Presumably the files are under the [MIT License](https://github.com/facebook/create-react-app/blob/v3.4.1/LICENSE) that covers the rest of the package. This creates a situation where the best course may be to license the new project under the same license. Another option may be to create a THIRD-PARTY-NOTICES file that carefully notes which files are under the MIT License and which are under other licenses. Neither of these options are ideal for all React users.

Would it be appropriate to put the template files under a [public domain declaration](https://creativecommons.org/publicdomain/zero/1.0/) or a no-conditions license like [MIT No Attribution (MIT-0)](https://spdx.org/licenses/MIT-0.html) or [BSD Zero Clause](https://spdx.org/licenses/0BSD.html) so that it's clear to users that their projects can be licensed however they like, as long as it's compatible with other licensed works in their project?

The template also includes logos which might be under trademark (the MIT License does not include a trademark grant). Would a statement allowing their use be appropriate? Or should they be removed from the template?
![logo](https://github.com/facebook/create-react-app/raw/v3.4.1/packages/cra-template/template/public/logo192.png)

Thanks!
Repository: flutter
Issue: Add new Cupertino calendar date picker mode
Labels: c: new feature,platform-ios,framework,f: date/time picker,f: cupertino,customer: crowd,P3,team-ios,triaged-ios

Apple introduced a new full calendar date picker mode in iOS 14 
https://developer.apple.com/design/human-interface-guidelines/ios/controls/pickers/

![date-picker-date_2x-1](https://user-images.githubusercontent.com/156888/90176697-37241f80-dd5e-11ea-9c82-7d2546f7d36f.png)