WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
This seems like something the compiler could merge, but currently it complains that property of foo in types A and B are not identical:

interface A {
foo(name: 'foo'): string;
foo(name: string): any;
}

interface B {
foo(name: 'bar'): number;
foo(name: string): any;
}

interface C extends A, B {}

I have some real world code I am trying to type and essentially I have to redeclare all the "inherited" string literal types like this in the final class, which is sort of unmaintainable.

Issue 2:
TypeScript Version:

1.8.10

Code

interface Foo {
on(type: 'foo', listener: (event: MouseEvent) => boolean): boolean;
on(type: string, listener: (event: Event) => boolean): boolean;
}

interface Bar {
on(type: 'bar', listener: (event: MSGestureEvent) => boolean): boolean;
on(type: string, listener: (event: Event) => boolean): boolean;
}

interface FooBarA extends Foo, Bar {} // Error: not correctly extended

interface FooBarB extends Foo, Bar {
on(type: 'foo', listener: (event: MouseEvent) => boolean): boolean;
on(type: 'bar', listener: (event: MSGestureEvent) => boolean): boolean;
on(type: string, listener: (event: Event) => boolean): boolean;
}

type FooBarC = Foo & Bar;

let foobar: FooBarC;

foobar.on('foo', (event) => { return false; });

Expected behavior:

That FooBarA would work instead of throwing an error.

Actual behavior:

FooBarA complains Interface 'FooBarA' cannot simultaneously extend types 'Foo' and 'Bar'. Named property 'on' of types 'Foo' and 'Bar' are not identical.

While that is true in the strictest sense, the "base" override matches, which means in theory the string literal types could be merged and the error should only occur if there is a conflict between a specific string literal type.

Using the intersection type works perfectly fine and the resulting type mirrors the runtime behaviour. Using the "reimplement all methods" (FooBarB) gets really tedious really quickly when you are trying to do something like model event listeners like the above.
Issue 1:
Is there an existing issue for this?

I have searched the existing issues

Current Behavior

Using vsce in vscode extension workspace throws errors for missing dependencies.

I have several VSCode extensions that am moving together in monorepo with npm workspace.

All the dependencies for the extensions are hoisted at the root node_modules.

To prepare the vscode extension packages I use the vsce tool, that internally uses:

npm list --production --depth=99999 --loglevel=error

to collect all npm modules that need to be backed in the VSCode extension.

The command is executed in the directory of each workspace, and fails with:

npm ERR! missing: @aspnet/signalr@^1.1.4, required by blazortemplatewizard@1.2.1
npm ERR! missing: @types/app-root-path@^1.2.4, required by blazortemplatewizard@1.2.1
npm ERR! missing: @types/archiver@^2.1.3, required by blazortemplatewizard@1.2.1

however these are already installed in node_modules a few folders up.

Expected Behavior

Using vsce in vscode extension workspace to pack correctly.

From what I understand it may need changes in that external vsce tool as well, but first the npm ls --production will need to either change behaviour to look in node_modules outside the current folder, or perhaps a new switch like --include-workspace-deps to look modules up. I hope I am missing something that could get this running.

Steps To Reproduce

Create a project with few workspaces.

Install the dependencies in at the root.

cd into one of the workspaces.

run npm list

It will generate errors for missing dependencies, that had been installed at the root level.

I've prepared a small repo that shows the list failing if the deps are installed at the root level, and how it works when the deps are installed locally in each dependency:

https://github.com/panayot-cankov/npm-list-repro

Environment

OS: Windows

Node: 14.16.0

npm: 1.16.0

Issue 2:
Hooks for scopes get a double prefix, ie @@scope, when shown with the npm hook ls command. This is due to the response from the web request already including the prefix in the name field, and the following lines of code then locally adding the prefix again, duplicating it.
Issue 1:
When I run a command

>"node_modules/.bin/ngc" -p ./

I get the error:

Error: Error encountered resolving symbol values statically. Function calls are not supported. Consider replacing the function or lambda with a reference to an exported function (position 65:17 in the original .ts file), resolving symbol COMPILER_PROVIDERS in .../node_modules/@angular/compiler/src/compiler.d.ts,

That all is related to this piece of code

@NgModule({
...
providers: [
COMPILER_PROVIDERS
],
})
export class AppModule {}

Once COMPILER_PROVIDERS are not declared

providers: [
// COMPILER_PROVIDERS

then AOT works as expected... just ... as also expected, the app is not working (simply, COMPILER_PROVIDERS are needed for it)

I did see this "encouraging disclaimer"

/**
* @module
* @description
* Entry point for all APIs of the compiler package.
*
* <div class="callout is-critical">
* <header>Unstable APIs</header>
* <p>
* All compiler apis are currently considered experimental and private!
* </p>
* <p>
* We expect the APIs in this package to keep on changing. Do not rely on them.
* </p>
* </div>

So - it is experimental, private, "I cannot rely on it" ... but I need it.

Please, am I doing something wrong? or is intended ... COMPILER_PROVIDERS will never be supported by AOT?

Issue 2:
This sentence in the Javacript Quick start:

Most application files export one thing into our faux-pas 'namespace

should read

Most application files export one thing into our faux 'namespace'

(The namespace is not an " an embarrassing social mistake", it is simply "fake".
Issue 1:
Sorry about the long title. I couldn't find a better way to express the issue :)

Given the following syntax extension:

#![crate_type = "dylib"]
#![allow(unstable)]
#![feature(plugin_registrar, quote)]

extern crate syntax;
extern crate rustc;

use syntax::ast::TokenTree;
use syntax::codemap::Span;
use syntax::ext::base::{DummyResult, ExtCtxt, MacExpr, MacResult};
use rustc::plugin::Registry;

fn expand<'cx>(cx: &'cx mut ExtCtxt, sp: Span, args: &[TokenTree]) -> Box<MacResult + 'cx> {
match args {
[ref tt, ..] => {
let e = quote_expr!(cx, println!("{}", $tt));
MacExpr::new(quote_expr!(cx, $e))
},
_ => DummyResult::any(sp),
}
}

#[plugin_registrar]
pub fn plugin_registrar(reg: &mut Registry) {
reg.register_macro("macro_test", expand);
}

and this test file:

#![feature(plugin)]

#[plugin] #[no_link] extern crate quote_fail;

#[test]
fn it_works() {
let a = "hello";
macro_test!(a);
}

The latter fails to compile with the following error:

<quote expansion>:1:27: 1:28 error: unresolved name `a`
<quote expansion>:1 name_228,ctxt_0!("{}" , a)
^
note: in expansion of format_args!
<std macros>:2:42: 2:75 note: expansion site
<std macros>:1:1: 2:77 note: in expansion of println!
<quote expansion>:1:1: 1:29 note: expansion site
/home/chris/dev/quote_fail/tests/tests.rs:1:1: 9:1 note: in expansion of macro_test!
/home/chris/dev/quote_fail/tests/tests.rs:8:5: 8:20 note: expansion site
error: aborting due to previous error
Could not compile `quote_fail`.

This error goes away if I do either of these things:

Remove the println! call, i.e. replace println!("{}", $tt) with $tt

Call quote_expr! only once instead of twice, i.e. MacExpr::new(e)

I'm using rustc commit 8903c21 built 2015-01-16 on Ubuntu 14.10 x86_64.

Issue 2:
#15750 is fixed now, but a variant of the same issue occurs when quoting a macro invocation.

Using plugin.rs from #15750 and this test.rs:

#![feature(phase)]

#[phase(plugin)]
extern crate plugin;

fn main() {
let x = true;
println!("{}", mymacro!(assert!(x)));
}

I get this result:

$ rustc -v
rustc 0.12.0-pre (3f5d0b5b6 2014-08-19 16:35:51 +0000)

$ rustc plugin.rs

$ rustc -L. test.rs
<quote expansion>:1:20: 1:21 error: unresolved name `x`.
<quote expansion>:1 name_64,ctxt_11!(x)
^
<std macros>:1:1: 12:2 note: in expansion of assert!
<quote expansion>:1:1: 1:22 note: expansion site
test.rs:1:1: 9:1 note: in expansion of mymacro!
test.rs:8:20: 8:40 note: expansion site
note: in expansion of format_args!
<std macros>:2:23: 2:77 note: expansion site
<std macros>:1:1: 3:2 note: in expansion of println!
test.rs:8:5: 8:42 note: expansion site
error: aborting due to previous error

Also the NULL characters used to delimit the magic identifier string appear in the error output, which causes the error caret to appear in the wrong place.

See also #15962.

CC @pnkfelix. This is still a huge improvement from before and I think I can work around the remaining issues in html5ever. Thank you for fixing #15750 :)
Issue 1:
@fchollet

We know that ImageDataGenerator provides a way for image data augmentation: ImageDataGenerator.flow(X, Y). Now consider the image segmentation task where Y is not a categorical label but a image mask which is the same size as input X, e.g. 256x256 pixels. If we would like to use data augmentation, the same transformation should also be adopted to Y. Is there any simple way to handle this?

Issue 2:
Please make sure that the boxes below are checked before you submit your issue. If your issue is an implementation question, please ask your question on StackOverflow or join the Keras Slack channel and ask there instead of filing a GitHub issue.

Thank you!

[ x] Check that you are up-to-date with the master branch of Keras. You can update with:

pip install git+git://github.com/fchollet/keras.git --upgrade --no-deps

[x ] If running on TensorFlow, check that you are up-to-date with the latest version. The installation instructions can be found here.

If running on Theano, check that you are up-to-date with the master branch of Theano. You can update with:

pip install git+git://github.com/Theano/Theano.git --upgrade --no-deps

Provide a link to a GitHub Gist of a Python script that can reproduce your issue (or just copy the script here if it is short)

Below is my simple code to use ImageDataGenerator to do some data augmentation. Let's say I have 1000 input cat images, I want to use ImageDataGenerator to augment each image 20 times, so totally I should get 1000*20 = 20,000 augmented images. However, the following code only produces < 10,000 files. The output files have a 'cat_0_xxxx.jpeg' pattern in filenames where xxxx goes from 0 to 9999, does that mean ImageDataGenerator won't go beyond 10,000 files? I would expect it will save 'cat_1_xxxx.jpeg" after saving cat_0_9999.jpeg but that did not happen. Is this a bug?

BTW, I installed Keras using pip: pip install keras, the installed version is keras-2.0.6.tar.gz.

from keras.preprocessing.image import ImageDataGenerator, array_to_img, img_to_array, load_img

import glob

import os, sys

datagen = ImageDataGenerator(

rotation_range=40,

width_shift_range=0.2,

height_shift_range=0.2,

shear_range=0.2,

zoom_range=0.2,

horizontal_flip=True,

fill_mode='nearest')

path = 'test20170721/train/cats'

outPath = 'test20170721/augmentation/cats'

files = glob.glob(path + '/*.jpg')

for file in files:

print file

img = load_img(file)

x = img_to_array(img)

x = x.reshape((1,) + x.shape)

i = 0

for batch in datagen.flow(x, save_to_dir=outPath, save_prefix='cat', save_format='jpeg'):

i += 1

if i > 20:

break
Issue 1:
System information

Have I written custom code:No

OS Platform and Distribution:Ubuntu 18.04.2

TensorFlow installed from:binary

TensorFlow version:tf-nightly-gpu 1.14.1.dev20190617

Python version:3.7

CUDA/cuDNN version:10.0

GPU model and memory:rtx 2070 8gb

Describe the current behavior

cannot import anything from tensorflow.python.

Describe the expected behavior

In tensorflow version 1.13 it works

Code to reproduce the issue

from tensorflow.python import tf2 and i get Unresolved reference

Issue 2:
PyCharms doesn't provide suggestions for some of the TensorFlow imports. For example:

from tensorflow.nn import rnn_cell
from tensorflow.keras import losses

In these cases, PyCharms doesn't provide suggestions for rnn_cell or losses members.

A potential solution for the rnn_cell import is to put API tree under root of TensorFlow pip package instead of under _api/v1 or _api/v2. However, this won't fix suggestions for keras import since keras API is in a different directory and we create an alias for it under tensorflow.

This issue is a follow up from #26502.
Issue 1:
Add a @var for inputs border color on focus :

&:focus {

border-color: rgba(82,168,236,.8);

outline: 0;

.box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6)");

}

Issue 2:
I would like to reopen the issue 517. Thx

#517
Issue 1:
Preflight Checklist

I have read the Contributing Guidelines for this project.

I agree to follow the Code of Conduct that this project adheres to.

I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Electron Version

9.4.4, 10.4.2, 11.4.2, 12.0.2

What operating system are you using?

macOS

Operating System Version

11.2.2

What arch are you using?

x64

Last Known Working Electron version

Expected Behavior

App works

Actual Behavior

App crashes

Testcase Gist URL

https://gist.github.com/mahnunchik/aaef0dffd6c03020b80c58925f31d2af

But removing callback call from the registerStringProtocol handler keeps app working.

Issue 2:
Electron version: 1.3.4

Operating system: OS X

I'd be great to be able to access the history inside a webview, across multiple pages. Basically, it'd help us tremendously if we didn't have to duplicate the history store from https://github.com/electron/electron/blob/df3f0a45164ff990e7b94bc7aa485b4659280755/lib/browser/api/navigation-controller.js
Issue 1:
Bug report

Markers disappear if I use markerfacecolor='None', when saving as eps file. if I save as png file, they are correctly displayed.

Note that markeredgewidth is correctly set to a non zero value and markeredgecolor is correctly set to a color. As I said, the figure is correctly produced when saved as png, so it should really work similarly for eps figure, but it doesn't.

Code for reproduction

I'm too lazy for a complete reproducible example. But here are the relevant lines.

axe.plot(x, y, linestyle = '-', linewidth=0.5, marker = 's', markeredgewidth = 0.5, label='something', c
lip_on= False, markersize = '3',markerfacecolor='None', markeredgecolor='green', color='green')

plt.savefig('another_name_come_on_not_this_again.png', format='png', dpi=400)
plt.savefig('another_name_come_on_not_this_again.eps', format='eps', dpi=400)

Only the line is displayed. No marker.

Expected outcome

As said above, the edges of the makers should be displayed, as in the case when the picture is saved as png. But they aren't.

Matplotlib version

Operating system: GNU/Arch Linux.

Matplotlib version: 2.2.2.

Matplotlib backend (print(matplotlib.get_backend())): Qt5Agg

Python version: 3.7.0.

Issue 2:
Symbols are missing from eps format

When I save a figure in eps format, the symbols that have no facecolor are not showing. This happened after I updated to the latest version.

Code for reproduction

import matplotlib.pyplot as plt
plt.plot([1,2,3],[2,1,3],'ko',markerfacecolor='None')
plt.plot([1,2,3],[2,1,3],'k')
plt.savefig('not_working.eps')
plt.savefig('working.eps')

I would expect empty circles (as will show if you save it as png), but they are missing when saved as eps.

Unfortunately I don't remember the last version I was using and was working before updating.

Operating system: Windows 7

Matplotlib version: 2.2.2

Matplotlib backend: Qt5Agg

Python version: 3.6.5

Spyder version: 3.2.8

I did a batch update and didn't notice this only a week after.
Issue 1:
I apologize if this is the wrong place to report this, but I don't know where else to do this.

Clicking on the link labeled "var" on this page: http://docs.scipy.org/doc/numpy/reference/routines.statistics.html

takes you to the page: http://docs.scipy.org/doc/numpy/reference/generated/numpy.var.html#numpy.var

However, that page says "Internal Server Error". Clearly the link is broken and needs to be fixed.

Issue 2:
Original ticket http://projects.scipy.org/numpy/ticket/1353 on 2010-01-08 by @timmie, assigned to @pv.

The following URL shows an 500 internal server error:

http://docs.scipy.org/doc/numpy/reference/generated/numpy.var.html
Issue 1:
Hi,

I've actually posted an issue 7753

In a word, I tried same sample_weight in SVC (linear kernel) and LinearSVC and got different results. I got feedback that the LinearSVC is "less sensitive" to sample_weight, but I still wonder how are they different? I want to know mathematically what they means. Currently the API documentation (and user guide) does not contain such description, so could we possibly add them?

Thank you very much!

Also asked here

Issue 2:
I think these should be documented in the quick start guide: http://scikit-learn.org/dev/tutorial/basic/tutorial.html
Issue 1:
no-undef error after today's babel update

Issue 2:
Issue originally made by @jrwebdev

Bug information

Babel version: 6.6.0

Node version: 4.2.4

npm version: 3.6.0

Options

Appears to be an issue with babel-preset-es2015@6.6.0

babel input.js --presets es2015 -o output.js

Input code

const values = {};
const obj = {
set a (a) {
values.a = a;
},
get a () {
return values.a;
},
set b (b) {
values.b = b;
},
get b () {
return values.b;
}
};

Description

Transpiled code differs between babel-preset-es2015@6.5.0 and babel-preset-es2015@6.6.0

babel-preset-es2015@6.5.0

'use strict';

var values = {};
var obj = {
set a(a) {
values.a = a;
},
get a() {
return values.a;
},
set b(b) {
values.b = b;
},
get b() {
return values.b;
}
};

babel-preset-es2015@6.6.0

'use strict';

var _a, _b, _b2, _obj, _mutatorMap;

function _defineEnumerableProperties(obj, descs) { for (var key in descs) { var desc = descs[key]; desc.configurable = desc.enumerable = true; if ("value" in desc) desc.writable = true; Object.defineProperty(obj, key, desc); } return obj; }

var values = {};
var obj = (_obj = {
set a(a) {
values.a = a;
}
}, _a = 'a', _mutatorMap = {}, _mutatorMap[_a] = _mutatorMap[_a] || {}, _mutatorMap[_a].get = function () {
return values.a;
}, _b = b, _mutatorMap[_b] = _mutatorMap[_b] || {}, _mutatorMap[_b].set = function (b) {
values.b = b;
}, _b2 = 'b', _mutatorMap[_b2] = _mutatorMap[_b2] || {}, _mutatorMap[_b2].get = function () {
return values.b;
}, _defineEnumerableProperties(_obj, _mutatorMap), _obj);

Error:

node output.js
/output.js:14
}, _b = b, _mutatorMap[_b] = _mutatorMap[_b] || {}, _mutatorMap[_b].set = function (b) {
^

ReferenceError: b is not defined

Only seems to occur if the object has more than one getter/setter. I'm guessing it's related to this PR - #3280
Issue 1:
People NEED a DETAILED (maybe indexed, too) API documentation, like python documentation. But it seems we only get a tutorial.

Issue 2:
First check

I used the GitHub search to find a similar issue and didn't find it.

I searched the FastAPI documentation, with the integrated search.

I already searched in Google "How to X in FastAPI" and didn't find any information.

Description

What I mean by api developer docs are basically something like sphinx docs for function definitions. This is usually generated from function docstrings (which I didn't see any in my small amount of browsing the FastAPI codebase). For example, here are the docs for github3 https://github3py.readthedocs.io/en/master/api-reference/index.html. It is an easy way to click through the entire package and see class and function definitions.

Does FastAPI have these? The tutorial docs look pretty good, but sometimes I just want to know what all the function parameters are independent of the context in a tutorial.
Issue 1:
My issue is about zpk2sos conversion I presume.

The power of the numerators of second order sections are evaluated not correctly

Reproducing code example:

Sample code to reproduce the problem

Jupyter QtConsole 5.0.3
Python 3.9.5 (default, May 9 2021, 14:00:28)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.23.1 -- An enhanced Interactive Python. Type '?' for help.

import math
from scipy import signal
import sympy

s = sympy.Symbol('s')
filterOrder = 3
passBand = list(map(lambda x: x*2*math.pi, [1000, 7000]))
filterType = 'bandpass'
z,p,k = signal.butter( filterOrder, passBand, filterType, analog=True, output='zpk')
b,a = signal.zpk2tf(z,p,k)
sos = signal.zpk2sos(z,p,k)
print("Transfer Function from z,p,k")
n,d = signal.zpk2tf(z,p,k)
print("H(s) =", sympy.Poly(n,s)/sympy.Poly(d,s))
print()
print("Transfer Function from sos")
n1,d1 = signal.sos2tf(sos)
print("H(s) =", sympy.Poly(n1,s)/sympy.Poly(d1,s))
Transfer Function from z,p,k
H(s) = 53578846103558.1*s**3/(1.0*s**6 + 75398.223686155*s**5 + 3671492837.20524*s**4 + 95251281961881.0*s**3 + 1.01461309221017e+18*s**2 + 5.75806638891985e+21*s + 2.11044155773651e+25)

Transfer Function from sos
H(s) = 53578846103558.1*s**6/(1.0*s**6 + 75398.223686155*s**5 + 3671492837.20524*s**4 + 95251281961881.0*s**3 + 1.01461309221017e+18*s**2 + 5.75806638891985e+21*s + 2.11044155773651e+25)

It can be seen that the numerators are different in the power of s.

Scipy/Numpy/Python version information:

1.6.3 1.20.3 sys.version_info(major=3, minor=9, micro=5, releaselevel='final', serial=0)

Issue 2:
As described in #3717 (comment), zpk2sos does not work for analog filters since the coefficients of each stage are different.

b, a = butter(1, 1, analog=True) produces b = [1], a = [1, 1] → H(s) = 1/(s+1)

sos = tf2sos(b, a) produces [1, 0, 0, 1, 1, 0]

this stage is b = [1, 0, 0], a = [1, 1, 0] → H(s) = s^2/(s^2+s) = s/(s+1) which is not the same as above. For digital filters, trailing zeros don't matter, but for analog filters, they do, and leading zeros don't matter. The correct result should be [0, 0, 1, 0, 1, 1]

So docstring should probably say it's not meant for analog at all for now?

and add analog=True to zpk2sos?
Issue 1:
Hello to all,

I facing a problem using the bootstrap affix. It is working fine in desktop and mobile version, but in mobile version affix is not responding correctly.

i.e. when you scroll to specific height it is not fixed to the top, after some time it becomes fixed to top. clearly in mobile or ipad the container is jumping while scrolling.It is not able to fix to top smoothly.

Issue 2:
Using Bootstrap 3+

I have a registration / login form in a modal. When you open a modal in the stock android browser the user can't touch a form or anything because it automatically closes like it would if you clicked outside of the modal area.

I have a lot of users using the default android browser for some strange reason so this is causing major issues on my website.

If anyone knows of a fix for this issue it would be much appreciated
Issue 1:
Hi, we are glad you can fix this issue to become a contributor to Apache Sharding Sphere.

Welcome! 😃

By doing this assignment, you can learn more about how a query SQL is parsed and how to verify the parsing result of a SQL in Apache ShardingSphere.

This issue is to add the parsing assertion for ParameterMarkerExpression by adding the start-index and stop-index attributes in parsing-result.xml.

It is not difficult, and the following comment also gives you the detailed instruction. BTW, if you need any help, please be free to reply to this one.

Issue 2:
Bug Report

SELECT region, SUM(population), SUM(area) FROM bbc GROUP BY region HAVING SUM(area)>1000000.

Parse the sql to get statement, there is not info about having.

Which version of ShardingSphere did you use?

5.0.0-alpha

Expected behavior

we can get info about having in the statement.

Actual behavior

there is no info about having in the statement.