WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
TypeScript Version:

1.8.2

Code

type FooBar = "foo" | "bar";

var map:{[foobBar:FooBar]: boolean};

Expected behavior:

I should be able to define a index type with a string literal type as key.

Actual behavior:

The typescript compiler complains with

Error:(3, 11) TS1023: An index signature parameter type must be 'string' or 'number'.

Issue 2:
export interface Keyed<k extends string, a> {
[key: k]: a; // <-- An index signature parameter type must be 'string' or 'number'.
}
Issue 1:
Bug report

What is the current behavior?

If you force some async chunks to be in the sync chunk, then the code in other async chunks won't be reused from the sync chunk.

If the current behavior is a bug, please provide the steps to reproduce.

Import your sync chunks

import bar from 'foo/bar/index.js';

Use async import in the same directory

import(/* webpackChunkName: "page-[request]" */ `foo/${pageName}/index.js`)

Use splitChunks.chunks: 'all';

The code in sync and async chunks will be duplicated.

// app chunk (sync)
(window.webpackJsonp = window.webpackJsonp || []).push([[3, 1], {
"/rhA": function(t, e, s) {

// page A chunk (async)
(window.webpackJsonp = window.webpackJsonp || []).push([[4], {
"/rhA": function(t, e, n) {

// page B chunk (async)
(window.webpackJsonp = window.webpackJsonp || []).push([[7], {
"/rhA": function(t, e, n) {

What is the expected behavior?

Async chunks should not have duplicated code.

A more detalied example

// App entrypoint
import loadPages from '@modules/app/loadPages.js';
import homePage from '@pages/home/index.js';
import aboutPage from '@pages/about/index.js';

const criticalPages = {
homePage,
aboutPage
};

loadPages(criticalPages);

// loadPages.js
const loadPage = criticalPages => async pageName => {
if (pageName in criticalPages) {
try {
criticalPages[pageName]();
}
catch(err) {
console.log(`Error loading page: '${pageName}'`);
console.log(err);
}
return;
}
try {
import(/* webpackChunkName: "page-[request]" */ `@pages/${pageName}/index.js`)
.then(res => {
res && res.default && res.default()
});
}
catch(err) {
console.log(`Page loader not found for page '${pageName}'`);
console.log(err);
}
};

export default function loadPages(criticalPages = {}) {
const documentPages = document.documentElement?.dataset.pages;
if (!documentPages) return;

const pagesToLoad = JSON.parse(documentPages);

const loadPageWithCritical = loadPage(criticalPages);

pagesToLoad?.forEach(loadPageWithCritical);
};

Issue 2:
In following the tutorial, this line:

webpack ./entry.js bundle.js --module-bind "css=style!css"

... gives me this error...

zsh: event not found: css

This [https://github.com//issues/242] says that it need \, which works for me, so the command would be:

webpack ./entry.js bundle.js --module-bind "css=style\!css"

Hope that helps.
Issue 1:
i git clone branch0.4.1,

git clone --recursive -b v0.4.1 https://github.com/pytorch/pytorch.git

and install from source, after install, use python print pytorch version, is

>>> torch.__version__

0.5.0a0+a24163a

and i find version in setup.py, is also 0.5.0a0, but i install from Binaries, print info is 0.4.1.

why??

Issue 2:
Issue description

The __version__ provided by Pytorch is wrong

See this line
Issue 1:
System info

Playwright Version: [v1.31.2]

Operating System: [Windows 11]

Browser: [All, Chromium, Firefox, WebKit]

Steps

Let's suppose we have 10 test files -

Test File 1 - 2 tests

Test File 2 - 10 tests

Test File 3 - 10 tests

Test File 4 - 1 tests

Test File 5 - 1 tests

Test File 6 - 2 tests

Test File 7 - 1 tests

Test File 8 - 1 tests

Test File 9 - 1 tests

Test File 10 - 1 tests

Now if we are executing the tests using 3 / 4 shards, ~equal number tests are not getting executed for each shard and it's causing a huge problem for us as we are having 1000+ cases across ~180 files. We are currently using 6 shards, but we see huge number of tests difference for each shard when using latest playwright 1.31.2.

Observed the comment from #21226 that, with new playwright version sharding will be performed on test files.

But I believe, it may cause a big problem for existing projects / new projects, where some feature may have more number of tests than other features. And every time, it will be very difficult for maintaining the count of tests in the test files from user side and instead I believe it should be automatically handled by the playwright framework itself as maintaining / re-factoring tests numbers for each test file will be a big challenge, where multiple users will be working on the repository.

Expected

Playwright sharding should divide the tests ~equally for each shard by the playwright framework itself and user don't need to maintain the framework seperately.

Actual

Playwright sharding is not dividing the tests ~equally for each shard when using 1.31.2.

Issue 2:
System info

Playwright Version: [v1.31.2, v1.30.0]

Operating System: [Ubuntu 20.04, Ubuntu 22.04]

Browser: [WebKit]

Other info: Works as expected on macOS

Source code

I provided exact source code that allows reproducing the issue locally.

Link to the GitHub repository with the repro

I have created this repo with an example test that reproduces the bug. I have also provided the test snippet below.

import { test } from '@playwright/test';

test('test', async ({ page }) => {
await page.goto('https://mail.google.com/');
await page.goto('https://mail.google.com/');
await page.goto('https://github.com');
await page.goto('https://github.com');
await page.goto('https://www.disneyplus.com/account');
await page.goto('https://www.disneyplus.com/account');
await page.goto('https://app.mabl.com');
await page.goto('https://app.mabl.com');
});

Steps

Run the test on Ubuntu 22.04 or 20.04

Expected

Test passes on all three browsers (WebKit, Chromium, Firefox)

Actual

WebKit test fails with a browser crash on the second await page.goto('https://app.mabl.com') call but none of the other addresses.
Issue 1:
I totally get why it is a cause for concern when adding to an int, but I feel like floor division by a positive should be expected to return an integer "safe".

Reproducing code example:

import numpy as np
np.uint64(0) // 4

Out[2]: -0.0

I guess since I need to divide by 4 I'll just bitshift, but this was kinda unexpected for me.

Numpy/Python version information:

In [3]: import sys, numpy; print(numpy.__version__, sys.version)
1.16.1 3.7.2 (default, Dec 29 2018, 06:19:36)
[GCC 7.3.0]

installed through conda / conda-forge

xref: #5745

Issue 2:
This is to gather and close some other issues. The NEP 50 proposal would close it. In many cases using int64 as the default Python integer for scalar operations (where we disable value-based logic) can be surprising

gh-2955 (bitwise_and)

gh-5746 (comparison) although uint64 and int64 comparisons of course have still more issues (covered by gh-12525)

gh-2524 (bit shift operators)

gh-8809 power is surprising for promotion (which is just the normal madness of scalar+value-based logic), again together with gh-12525

gh-13057 (division of uint by Python int)

This issue is just to gather and close the other ones as duplicates.
Issue 1:
Hi Guys! [ # if you don't won't to read everything go down directly to # SOLUTION ]

here is the way how i fixed the problem of installing tensorflow on Windows. I will start 👍from the begining 👍

I downloaded the Anaconda 4.3.1 For Windows with Python 3.6 version.

Create a conda environment named tensorflow by invoking the following command:

C:> conda create -n tensorflow

Activate the conda environment by issuing the following command:

C:> activate tensorflow

(tensorflow)C:> # Your prompt should change

Issue the appropriate command to install TensorFlow inside your conda environment. To install the CPU-only version of TensorFlow, enter the following command:

(tensorflow)C:> pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.0.1-cp35-cp35m-win_amd64.whl

Message appear : can not install this wheel ......... [ i forgot the message, it's just couldn't find the point]

To install the GPU version of TensorFlow, enter the following command (on a single line):

(tensorflow)C:> pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-1.0.1-cp35-cp35m-win_amd64.whl

same message appear couldn't install

so after that i wanted to write my first code 👍

c>python

python version 3.6 .... (anaconda).............

import tensorflow as tf

[it appears this Error : ]

Traceback :

File "", line 1, in

ModuleNotFoundError: No module named 'tensorflow'

SOLUTION

Fix The Problem :

https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.0.1-cp35-cp35m-win_amd64.whl

tensorflow-1.0.1 -cp35-cp35m-win_amd64.whl

tensorflow version 1.0.1

-cp 35 : python version needed

win_amd64 : windows x64

so the Anaconda 4.3.1 For Windows with Python 3.6 version so we need python 3.5 i downloaded it from other this web site cause anaconda has only the version 4.3.1 & for python 2.7 :

so this anaconda for python 3.5 : http://www.gurobi.com/downloads/get-anaconda

then i followed the other steps & everything worked fine :), i hope everything will work with you

Issue 2:
The current .whl does not support python 3.6. Please update to support the latest version of python. Thanks!

C:\WINDOWS\system32>python --version

Python 3.6.0

C:\WINDOWS\system32>pip install --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-0.12.1-cp35-cp35m-win_amd64.whl

tensorflow-0.12.1-cp35-cp35m-win_amd64.whl is not a supported wheel on this platform.
Issue 1:
it woul be great if it would be possible to register a blueprint inside of an other blueprint

to increase modularity

Issue 2:
Hi All,

I am working on a Flask project and suddenly my unit tests start failing on the latest flask version 2.2.1

Got following error while running tox command

/usr/lib/python3.8/doctest.py:939: in find

self._find(tests, obj, name, module, source_lines, globs, {})

.tox/tests/lib/python3.8/site-packages/_pytest/doctest.py:533: in _find

super()._find( # type:ignore[misc]

/usr/lib/python3.8/doctest.py:998: in _find

if ((inspect.isroutine(inspect.unwrap(val))

.tox/tests/lib/python3.8/site-packages/_pytest/doctest.py:475: in _mock_aware_unwrap

return real_unwrap(func, stop=_is_mocked)

/usr/lib/python3.8/inspect.py:520: in unwrap

while _is_wrapper(func):

/usr/lib/python3.8/inspect.py:514: in _is_wrapper

return hasattr(f, 'wrapped') and not stop(f)

.tox/tests/lib/python3.8/site-packages/werkzeug/local.py:316: in get

obj = instance._get_current_object() # type: ignore[misc]

.tox/tests/lib/python3.8/site-packages/werkzeug/local.py:509: in _get_current_object

raise RuntimeError(unbound_message) from None

E RuntimeError: Working outside of request context.

E

E This typically means that you attempted to use functionality that needed

E an active HTTP request. Consult the documentation on testing for

E information about how to avoid this problem.

When I changed my flask version back to 2.1.3 it started working again.
Issue 1:
function foo():number {
var v2 = 5 + v1
var v1 = 3
return v2
}

When compiled, I expect this to output a warning because the variable v1 is used before it is declared. Instead it compiles without complaint, and emits a function that returns NaN.

message TS6029: Version 1.6.2

Issue 2:
Introduce two new syntax for type declaration based on JSDoc

var myString: !string = 'hello world'; //non-nullable
var myString1: ?string = 'hello world'; // nullable
var myString2: string = 'hello world'; // nullable
var myString3 = 'hello world'; // nullable

by default type are nullable.

Two new compiler flag :

inferNonNullableType make the compiler infer non-nullable type :

var myString3 = 'hello world' // typeof myString is '!string', non-nullable

nonNullableTypeByDefault (I guess there might be a better name) :

var myString: !string = 'hello world'; // non-nullable
var myString1: string = 'hello world'; // non-nullable
var myString2: ?string = 'hello world'; // nullable
var myString3 = 'hello world' // non-nullable
Issue 1:
Consider the following code (http://play.golang.org/p/0Sm13cKcq5):

type A interface {
Read()
Write()
}
var a A = 1

This fails to compile with the following message:

"cannot use 1 (type int) as type A in assignment: int does not implement A (missing Read method)"

The problem is that 'int' also misses the 'Write' method, but it is not disclosed until user works around by defining a custom type and implementing the missing method (only to realize that it was not the only one).

This behavior delivers surprises when using complex libraries and writing compartibility layers for them.

Issue 2:
If a type does not implement an interface, the compiler currently only reports one
error. It would be nice if it reported more errors.

http://play.golang.org/p/ayvTDLAJiZ
Issue 1:
Moved from vue-ssr-docs#210.

Version

2.5.21

Reproduction link

https://github.com/phil294/vue-hackernews-ssr-alternative-data-fetching

Steps to reproduce

In SSR docs, option 2, Fetch data after the matched view is rendered, calls asyncData in beforeMount.

The pseudo-syntax is

if (asyncData)
asyncData()

This does not check if asyncData was already called by the server. Thus, guided by the official docs, this leads to duplicate fetches. In the case of dynamic module registration, even to duplicate modules.

In the linked repro, I cloned vue-hackernews and changed the fetch method accordingly. I also added a console.log to when fetchIdsByType is called which happens when asyncData is called.

What is expected?

Data is fetched on server, client does not fetch it again (as is the case with the usual router.beforeResolve solution (step 1).

What is actually happening?

Data is fetched twice, also on client, because there is no check on whether the data is already there, effectively making option 2 unusable.

Issue 2:
Version

2.6.10

Reproduction link

https://github.com/maoberlehner/transition-to-height-auto-with-vue

Steps to reproduce

Source: https://github.com/maoberlehner/transition-to-height-auto-with-vue

Demo: https://transition-to-height-auto-with-vue.netlify.com/

Source has scoped css on the * rule. However in the demo, it is not applied.

However if you change v-if to v-show, the * rule will be applied to that scope.

What is expected?

The functional component's scope is added on both v-if and v-show usage.

What is actually happening?

The functional component's scope is added only on v-show and not applied on v-if.
Issue 1:
VSCode Version: 0.10.12-alpha

OS Version: Windows10

Steps to Reproduce:

Launch app and open any folder.

Try to add .js or .cs file by clicking on + sign.

Verify app behavior.

Try to add other file like go, css, ts and verify app behavior.

Actual: Getting error "Cannot convert undefined or null to object" when adding .js or .cs file.

Expected: It should not throw any error while adding .js or .cs file.

Note: I tried the same steps on MAC and it is working fine.

Issue 2:
VSCode Version: 0.10.12-alpha

OS Version: Windows10

Steps to Reproduce:

Launch an app from command prompt without any command line argument.

code-alpha

Open any folder which contains C# code.

Verify installed extensions for C#, PS, GO etc. should work fine.

Verify there should not be any error message.

Close app and re-launch it from command prompt with disable-extension argument.

code-alpha --disable-extension

Verify app behavior and configuration changes.

Actual:

Getting error message Like: "Cannot convert undefined or null to object"

There is no changes in app behavior or configuration.

a. Default setting is not changing at all.

b. Linter is working as it was working before re-launch.

c. Debugger is working as it was working before re-launch.

d. Intellisense is working as it was working before re-launch.

Expected: There should not be any error message.

Clarification: What are the changes user should expect when launching app with --disable-extension argument.
Issue 1:
It would be nice to have a complete, end-to-end working example using TensorBoard. In addition, some of the documentation appears to be incorrect.

Possible Incorrect Documentation:

http://tensorflow.org/how_tos/summaries_and_tensorboard/index.md

A concise, completely coded example may help. Note, more detail is shown here, but it's still have hard to grasp the full picture. A complete coded example may help.

...
sess.run(init)

# Build the summary operation based on the TF collection of Summaries.
tf.train.write_graph(sess.graph_def, './tenIrisSave/logsd','graph.pbtxt')

tf.scalar_summary("Accuracy:", tf_accuracy)
tf.histogram_summary('weights', tf_weight)
tf.histogram_summary('bias', tf_bias)
tf.histogram_summary('softmax', tf_softmax)
tf.histogram_summary('accuracy', tf_accuracy)

summary_op = tf.merge_all_summaries()
summary_writer = tf.train.SummaryWriter('./tenIrisSave/logs',sess.graph_def)

# This will not work. You need the full path.
# tensorboard --logdir=./tenIrisSave/ # BAD!
# tensorboard --logdir=$(pwd)/tenIrisSave/ # Good!
...
for i in range(100):
...
summary_str = sess.run(summary_op,feed_dict={tf_in: x_test, tf_softmax_correct: y_test_onehot})
summary_writer.add_summary(summary_str, i)

The complete example can be seen here:

https://gist.github.com/mchirico/bcc376fb336b73f24b29

Agreed. The example needs to be cleaned up. The point is to give the user a complete working example that can be run and verified.

Issue 2:
pip install --upgrade https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-0.12.0rc1-cp35-cp35m-win_amd64.whl

Collecting tensorflow-gpu==0.12.0rc1 from https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-0.12.0rc1-cp35-cp35m-win_amd64.whl

HTTP error 404 while getting https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-0.12.0rc1-cp35-cp35m-win_amd64.whl

Could not install requirement tensorflow-gpu==0.12.0rc1 from https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-0.12.0rc1-cp35-cp35m-win_amd64.whl because of error 404 Client Error: Not Found for url: https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-0.12.0rc1-cp35-cp35m-win_amd64.whl
Issue 1:
Steps to reproduce

Open VS Code and zoom in as much as possible.

Click feedback button ☺️

Expected

Feedback popup appears, and is zoomed in along with everything else.

There are scroll bars so you can see the whole popup.

Actual

Feedback popup is not visible.

Can tab into the feedback popup.

After tabbing into it, there are no scrollbars.

This happens when the height of the popup is greater than that of the main text area (see screenshots).

Before zoom

After zoom

Version

Found in version 0.10.1

Issue 2:
see screen shot. text overflows the box
Issue 1:
I wrote a package: https://atom.io/packages/joe-keybinds (github: https://github.com/iarna/atom-joe) and when I use the move operation it provides (https://github.com/iarna/atom-joe/blob/master/lib/joe.coffee#L56-L67) and then undo it with Cmd-Z, the resulting display of the buffer is corrupted. I can tell that the underlying buffer is fine because saving and reloading shows the undo occurred correctly. The display corruption shows duplicated lines where there are none, and things like what constitutes the end of the line no longer match the display.

The move operation uses transact to combine of the pieces of the move operation into a single undoable chunk.

Issue 2:
This should be a simple bug fix.

When deleting a file, or folder,in Atom it appears to not do anything. You still see the file, or folder, sitting there. What you have to do to update the change, is close the parent folder, and open it back up to refresh the changes.

projectname
- images
- image1.png
- image2.png

If you delete for example 'image2.png', it stays there. Click the arrow on the 'images' folder to collapse the folder in the tree view, and again to expand it, and it will show the file is now gone.

When you delete a file, it should call the same refresh action as expanding does, to reflect the changes immediately.

This happens when deleting both files and folders. You have to manually close and open the parent folder to reflect the changes.
Issue 1:
Electron Version: 3.0.0-beta.4

Operating System : Windows 10 & Mac OS 10.13

Last known working Electron version: 2.0.6

Expected Behavior

Shared Workers instances are shared across Electron Windows

Actual behavior

Shared Workers are re-instanciated for each Electron Window

To Reproduce

Repostiory

Working version in latest 2.X (Electron 2.0.6)

$ git clone https://github.com/kuashe/electron3-shared-worker-broken

$ npm install

$ npm start

Select the 'Console' tab in the Chrome DevTools

The Shared Worker variable named 'increment' is incremented alternatively across windows, thus the worker being shared.

Regression in current 3.X (Electron 3.0.0-beta.4)

$ npm install electron@beta

$ npm start

Select the 'Console' tab in the Chrome DevTools

The Shared Worker variable named 'increment' is duplicated across windows, thus the worker not being shared.

Issue 2:
Electron Version: 3.0.0-beta.1

Operating System (Platform and Version): MacOS

Last known working Electron version: none

Setting titleBarStyle: 'customButtonsOnHover' causes app to have straight corners (instead of rounded)

Expected Behavior

App to have rounded corners like any other MacOS app.

Actual behavior

App has straight corners.

To Reproduce

Set titleBarStyle: 'customButtonsOnHover'

Additional Information

Also, is it possible to make the window buttons (traffic lights) appear inset, further from the app edges, like when titleBarStyle is hidden-inset?

This:

Instead of: