WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Consider i have the following directory tree in my application:

- app.js
- locale/
- es/
- module1/
- form1.json
- form2.json
- module2/
- form3.json
- form4.json
- en/
- module1/
- form1.json
- form2.json
- module2/
- form3.json
- form4.json

And app.js has this content:

/* ... */
function loadLazyModule (moduleName)
{
require.ensure ([], function ()
{
var lang = /* Browser language */;
var forms = ['form1', 'form2'] /* Get dynamically the array of forms? */

for (var i = 0; i < forms.length; i++)
{
var translations = require (
'locale/'+ lang +'/'+ moduleName +'/'+ form[i] +'.json');
registerTranslations (translations);
}
});
}
/* ... */

I need a main chunk with the core of my app, but i need to split every language translations of every module in diferent chunks and load them only when requested from the user. Im already using the json-loader for json files and the 'split-by-name-webpack-plugin' but it doesn't works with dynamic loading (require.ensure).

The output should be as follows:

myApp.js

locale.module1.es.js

locale.module2.es.js

locale.module1.en.js

locale.module2.en.js

Thanks.

Issue 2:
I'm having a hard time figuring this out. I have all these node_modules which include the css files I need but I can only get the javascript from the require.

For example require('bootstrap') will only return the js file and not the css.

I've tried

require("!style!css!bootstrap/dist/css");

but I just get this error:

ERROR in ./app/js/loader.js

Module not found: Error: Cannot resolve module 'bootstrap.css' in C:\Users\Administrator\Dropbox\projects\spDash\app\js

@ ./app/js/loader.js 10:0-24

ERROR in ./app/js/loader.js

Module not found: Error: Cannot resolve module 'bootstrap/dist/css' in C:\Users\Administrator\Dropbox\projects\spDash\app\js

@ ./app/js/loader.js 19:0-40

My config looks like this:

var webpack = require('webpack')
module.exports = {
entry: {
'spdash': './app/js/loader.js'
},
output: {
filename: 'bundle.js',
},
devtool: 'source-map',
module: {
loaders: [
// the url-loader uses DataUrls.
// the file-loader emits files.
{ test: /\.woff(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: "url-loader?limit=10000&minetype=application/font-woff" },
{ test: /\.(ttf|eot|svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: "file-loader" },
{
test: /\.css$/, // Only .css files
loader: 'style!css' // Run both loaders
},
{ test: /\.less$/, loader: 'style-loader!css-loader!less-loader' }, // use ! to chain loaders
{ test: /\.css$/, loader: 'style-loader!css-loader' },
{test: /\.(png|jpg)$/, loader: 'url-loader?limit=8192'} // inline base64 URLs for <=8k images, direct URLs for the rest
]
},
plugins: [
new webpack.optimize.UglifyJsPlugin({
minimize: true,
compress: {
warnings: false
}
}),
new webpack.IgnorePlugin(/^\.\/locale$/, [/moment$/])
]
};
Issue 1:
I am replacing the last softmax layer (with 1000 output units) of the original model (VGG16) with a new softmax layer (with 10 output units):

model.add(Dense(4096, activation='relu'))

model.add(Dropout(0.5))

model.add(Dense(1000, activation='softmax'))

model.load_weights('./vgg16_weights.h5')

model.layers.pop()

model.layers.pop()

model.add(Dropout(0.5))

model.add(Dense(10, activation='softmax'))

sgd = SGD(lr=1e-3, decay=1e-6, momentum=0.9, nesterov=True)

model.compile(optimizer=sgd, loss='categorical_crossentropy')

However, when I check input_shape and output_shape of the last three layers I find:

model.layers[-1].output_shape

(None, 10)

model.layers[-1].input_shape

(None, 1000)

model.layers[-2].input_shape

(None, 1000)

model.layers[-2].output_shape

(None, 1000)

model.layers[-3].output_shape

(None, 4096)

model.layers[-2].name

'dropout_3'

model.layers[-3].name

'dense_2'

model.layers[-1].name

'dense_4'

Apparently, model.layers.pop() does not fully update the model. I have OS X 10.11.5 and I just updated keras and tensorflow (I cannot use Theano since it produces Illegal instruction: 4 error)

Issue 2:
I'm trying to start https://github.com/iamaaditya/VQA_Demo which uses pre-trained VGG16 model (https://github.com/iamaaditya/VQA_Demo/blob/master/models/CNN/VGG.py). The last 2 layers are removed with layers.pop(). This doesn't seem to work, however. The message "ValueError: could not broadcast input array from shape (1000) into shape (4096)" is displayed, and I see the layers were not removed when I do "plot(image_model, to_file='model_vgg.png', show_shapes=True)". Thank you.
Issue 1:
With the new preview tabs, there's currently not a way to keep a tab opened without making changes to the file's contents. In sublime, double clicking a file prevents the preview from being closed when switching to another file. This would be useful behaviour in atom's preview tabs as well.

Issue 2:
Using Atom v0.206.0-4941229 on Mac OS X 10.10.3.

Repro Steps

Open Atom

Open Settings View

Navigate to Tabs package settings

Ensure "Use Preview Tabs" is checked

Close Settings View

Double-click any file in Tree View

Expected: Tab's title to not be italic (italic is the indicator that it is temporary)

Actual: Tab's title is italic

Double-click another file in Tree View

Expected: Second tab to open

Actual: New file overwrites the tab of the original file
Issue 1:
[x ] I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

When using a grid that scrolls vertically, a horizontal scrollbar should not be necessary.

Current Behavior

The grid looks like it generates double the needed spacing on the right side, resulting in a layout that is slightly too wide for the screen, and needs a horizontal scrollbar.

Steps to Reproduce (for bugs)

Add spacing to a grid container

Sometimes the issue happens

Here's the issue

Adding some padding to an outer div prevents it from happening

Tech
Version

Material-UI
1.0.0-beta.18

React
16.0.0

browser
chrome 61.0.3163.100

Issue 2:
The <Grid container> extends beyond its parent, with half of spacing size.

I have marked the extra width in red, also setting spacing to zero fixes the problem.

Here is a working example: https://codesandbox.io/s/Y8nzGm5W.

Similar code with a zero spacing works as expected: https://codesandbox.io/s/NxvYxvQpL.
Issue 1:
Code Sample

If test.csv file looks like:

a,b,c
0,1,2
1,2,3

Reading in the file with the header given in a list of length 0 results in no warnings or errors, but each line is interpreted as NaNs.

>>> import pandas as pd
>>> pd.read_csv("test.csv", header=[0])
a b c
0 NaN NaN NaN
1 NaN NaN NaN

Problem description

Single-length lists are not a problem elsewhere in pandas or within read_csv. For example, passing index_col=[0] does not cause pandas to read a csv file incorrectly. Preferably pandas would read in the csv file correctly given a list of header rows with one element. Raising an error or warning would also be an improvement over the current functionality.

Expected Output

>>> import pandas as pd
>>> pd.read_csv("test.csv", header=[0])
a b c
0 0 1 2
1 1 2 3

Output of pd.show_versions()

OS: macOS Sierra
Python: 2.7.13
pandas: 0.20.2
pytest: None
pip: 9.0.1
setuptools: 27.2.0
Cython: 0.25.2
numpy: 1.13.1
scipy: 0.19.1
xarray: None
IPython: 5.3.0
sphinx: None
patsy: 0.4.1
dateutil: 2.6.0
pytz: 2017.2
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 2.0.2
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: 0.999
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.9.6
s3fs: None
pandas_gbq: None
pandas_datareader: None

Issue 2:
read_csv with a single-row header either breaks any names that might be on the index, or reads all data as NaN. This problem might exist because pd.read_csv hasn't caught up to #7589.

In [1]: import pandas as pd

In [2]: from StringIO import StringIO

In [3]: pd.read_csv(StringIO('''\
alpha,,A,B
foo,bar,,
this,x,1,2
this,y,5,6
that,x,3,4
that,y,7,8'''), header=0, index_col=[0,1])
Out[3]:
A B
alpha Unnamed: 1
foo bar NaN NaN
this x 1 2
y 5 6
that x 3 4
y 7 8

In [4]: pd.read_csv(StringIO('''\
alpha,,A,B
foo,bar,,
this,x,1,2
this,y,5,6
that,x,3,4
that,y,7,8'''), header=[0], index_col=[0,1])
Out[4]:
alpha A B
foo bar
this x NaN NaN
y NaN NaN
that x NaN NaN
y NaN NaN

In [5]: pd.read_csv(StringIO('''\
alpha,,A,B
beta,,Y,Z
foo,bar,,
this,x,1,2
this,y,5,6
that,x,3,4
that,y,7,8'''), header=[0,1], index_col=[0,1])
Out[5]:
alpha A B
beta Y Z
foo bar
this x 1 2
y 5 6
that x 3 4
y 7 8
Issue 1:
See demo code which was taken straight from the blog post.

Issue 2:
The example from release notes is not working for me with babel --version // 5.1.13

.babelrc

{
"stage": 0,
"optional": [
"es7.decorators"
]
}

decorators.js

function concat(...args) {
let sep = args.pop();

return function(target, key, descriptor) {
descriptor.initializer = function() {
return args.map(arg => this[arg]).join(sep);
}
}
}

function autobind(target, key, descriptor) {
var fn = descriptor.value;
delete descriptor.value;
delete descriptor.writable;
descriptor.get = function () {
return this[key] = fn.bind(this);
};
}

class Person {
firstName = "Sebastian";
lastName = "McKenzie";

@concat("firstName", "lastName", " ") fullName;
@concat("lastName", "firstName", ", ") formalName;

@autobind
getFullName() {
return `${this.first} ${this.last}`;
}
}

console.log(new Person().firstName)
console.log(new Person().lastName)
console.log(new Person().fullName)
console.log(new Person().formalName)
console.log(new Person().getFullName)

assert(new Person().fullName, "Sebastian McKenzie");
assert(new Person().formalName, "McKenzie, Sebastian");
assert(new Person().getFullName.call(null), "Sebastian McKenzie");

When after compilation babel descriptors.js -o compiled.js and running node compiled.js I'm getting the following error

$ node scripts/compileds.js
Sebastian
McKenzie

,
/Users/marcin.kumorek/projects/es6-today/scripts/compileds.js:32
return this[key] = fn.bind(this);
^
TypeError: Cannot set property getFullName of #<Person> which has only a getter
at Person.descriptor.get (/Users/marcin.kumorek/projects/es6-today/scripts/compileds.js:32:22)
at Object.<anonymous> (/Users/marcin.kumorek/projects/es6-today/scripts/compileds.js:75:25)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3

There are two issues here:

first the output from console.logs are wrong (fullName returns '' and formalName ',')

second the @autoBind is not working correctly resulting in a TypeError

I'm running node -v0.12
Issue 1:
As of today one needs to enumerate all the directives used by a given @View. This is very verbose and repetitive process, especially for simpler cases / components where one uses only standard / built-in directives.

Assuming that I'm building a simple components that only consumes built-in directives I need to write:

import {Component, Template, bootstrap} from 'angular2/angular2';
import {If} from 'angular2/angular2';

@Component({
....
})
@View({
inline: '...',
directives: [If]
})
class Simple {
...
}

In a nutshell it means that for every directive I need to:

import it

reference in directives

While I understand the benefits of this approach as well as technical limitations here, it is still very repetitive in practice, especially for very often (application-wide) directives (built-ins, directives used in most of the pages, etc.).

Here are few ideas of how to make it easier on people:

allow omit directives and assume that all built-in directives are available

allow omit directives and assume that all directives specified by an app developer are available

This is not urgent / critical piece but would make things significantly easier on people.

Issue 2:
This is something that is bothering me.

<someComponent *ngfor="#video in videos" [video]='video'>

I'm repeating video 3 times, and I'm creating an extra temp variable.

<someComponent *ngfor="[video] in videos">

Makes much more sense to me. Is this something that is possible? Or is it a bad idea to begin with?
Issue 1:
Right now you have to type </ and press enter to close the last tag it would be much simpler to just press enter and have it close

Issue 2:
in html file-type

vscode version 0.10.6

My User Settings config says:

"editor.autoClosingBrackets": true,

but it still doesn't work.

For example, when you type in "<script" the IntelliSense suggestions pops up and you press enter on "script" it doesn't close the tag like this:

<script>
</script>

but it stays like this:

<script>
Issue 1:
Describe the feature: At the moment there is no single point of truth of all possible Elasticsearch settings.

By that i mean both settings that are configured in the elasticsearch.yml & ones that are configured on a specific index (For example in a template).

It would be extremely helpful to have a single page where you can just search for settings and read about them.

Thanks

Issue 2:
We currently build pom files for elasticsearch artifacts when running gradle assemble. We should validate these pom files, eg to ensure they don't contain broken xml, duplicate sections, valid tag names, etc.
Issue 1:
TypeScript Version:

nightly (1.9.0-dev.20160303)

Code

interface Foo {
foo( key: string ): string;
foo( keys: string[] ): string[];
}

declare var foo: Foo;
declare const bar: string|string[];

const baz = foo.foo( bar );

Expected behavior:

The code is valid and compiles without warning, because interface Foo contains a signature for a method foo corresponding to each type in the union string|string[]. The foo method can accept a parameter list of string, and it can also accept a parameter list of string[], therefore an argument list of string|string[] is satisfiable.

I would expect the return type for foo.foo invoked in this faction to be the type union of the return types of all matching signatures (so string|string[]). This code produces the same error even if all matching signatures have the same return type.

Actual behavior:

Argument of type 'string | string[]' is not assignable to parameter of type 'string[]' Type 'string' is not assignable to type 'string[]'.

Issue 2:
It would be enormously helpful if this recognized type parameters:

abstract class Functor<a> {
abstract map<b>(map: (value: a) => b): this<b>;
}

abstract class Monad<a> extends Functor<a> {
abstract bind<b>(bind: (value: a) => this<b>): this<b>;
}
Issue 1:
What does 'go version' print?
go version go1.3 linux/amd64
go version devel +f7e7857afd88 Fri Aug 01 16:45:33 2014 -0700 linux/amd64

What steps reproduce the problem?
If possible, include a link to a program on play.golang.org.

1. Run code at http://play.golang.org/p/41yjG2bL40

What happened?
Displays errors "json: cannot unmarshal number 1e2 into Go value of type
*int*" for all int types.

What should have happened instead?
No errors should be reported (and correct number should be unmarshaled).

The behaviour clearly is inline with strconv.{ParseInt,ParseUint}, but that does
arguably not agree with the JSON specification - unless int types are determined to not
be numbers.

Issue 2:
Go version: go version go1.5.1 linux/amd64

What I did: used gofmt on my source code

What I expected: have spaces around bitwise & everywhere

What I saw: in one occasion there was no spaces around the operator

I have put "before" and "after" code into a gist, so from the diff you can easily see the changes applied by gofmt
Issue 1:
just in case this is not present as another issue

Details are from a discourse post

Issue 2:
It's interesting that this is valid syntax in Julia and Lua:

function rec()
return rec()
end

The difference is that in Lua, when you call rec() it will stare at you and engage your motherboard's built-in space heater until you ctrl-C out. In Julia:

julia> rec()
ERROR: stack overflow
in rec at none:2 (repeats 80000 times)

So the stack 80000 things deep. That's interesting.

Why does this matter? I'm not sure. But some people care a lot:

http://www.lua.org/pil/6.3.html
Issue 1:
Challenge Waypoint: Use appendTo to Move Elements with jQuery has an issue.

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36.

Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

<script>
$(document).ready(function() {
$("#target1").css("color", "red");
$("#target1").prop("disabled", true);
$("#target4").remove();
<!-- Note that this code works because it uses the appendTo() method correctly -->
$("#target2").appendTo($("#right-well"));
<!-- Intended code based on instructions, which will not function -->
$("#target2").appendTo("#right-well");
});
</script>
'''

The instructions in the referenced waypoint misguide coders to use the appendTo() method of jQuery incorrectly. Github would not let me attach my screenshot :(

Issue 2:
A bug seems to be present: Chrome 46.0.2490.86 m; Windows 8.1 with respect to appendTo() function.

$("#target2").appendTo($("#right-well")); does work, but not the $("#target2").appendTo("#right-well");, the latter being suggested in the tutorial.

Hard reload and cache clearing did not seem to solve the problem.
Issue 1:
Symfony version(s) affected: 3.x, 4.x

Description

Due to update in php-intl library this loop is infinite.

symfony/src/Symfony/Component/Intl/Data/Bundle/Reader/BundleEntryReader.php

Line 81
in
95932df

while (null !== $currentLocale) {

How to reproduce

Update php-intl to the latest version and try to get country names for en locale for example.

Possible Solution

For BC it would be great to loop until locale is empty so check could be !empty($currentlocale)

Additional context

Ive been struggling with this all morning, later I had to code on my laptop and this error was not present, Ive updated php-intl and error became present as on my work PC.

Issue 2:
PHP 7.2.17-1+ubuntu18.04.1+deb.sury.org+3

SYMFONY: Symfony 4.2.4

locale_parse('root') now return an empty array as opposed to previos php versions which makes the Symfony\Component\Intl\Data\Bundle\Reader loop through fallback locales as

"en" => "root" => "" => "root" => "" and so on without it becoming null to break the loop

when reading from the regions because in the Symfony\Component\Intl\Locale::getFallback()

we never get inside the if (1 === \count($localeSubTags))
Issue 1:
Description of the new feature/enhancement

Customizing Terminal settings should be allowed to be loaded from my OneDrive folder or my own github repository, just like my powershell settings are or my VIM settings.

Currently, when I login into a new machine I have to merge or manually copy settings for Terminal, I don't have this problem in PowerShell or VIM as all I need to do is git clone and redirect to my settings folder.

Proposed technical implementation details (optional)

Here are some options:

Allow for an arbitrary folder to be configured to read settings.

Read from ~.terminal folder (but allow redirection)

After configuring the "reditected" folder, all my settings and profile are restored.

Issue 2:
Description of the new feature/enhancement

There should be an option for choosing default shell. Currently, If one wishes to use WSL, it has to open terminal, then open new tab with wsl. previously, one could simply pin wsl to taskbar, and when needed, one could open the wsl directly. furthermore, it would be nice to be able to pin terminal multiple times with different default shells. When pinned, it would be preferable to show default shell's icon or something that identifies what is the default shell that will be launched.

Proposed technical implementation details (optional)
Issue 1:
Bug summary

contourf() by default does not draw borders between adjacent levels. However, including the alpha keyword argument makes these borders visible. Desired behavior is to not draw these lines even with alpha specified.

Code for reproduction

import matplotlib.pyplot as plt
import numpy as np
x = np.linspace(-3, 5, 150).reshape(1, -1)
y = np.linspace(-3, 5, 120).reshape(-1, 1)
z = np.cos(x) + np.sin(y)
x, y = x.flatten(), y.flatten()
fig, ax = plt.subplots(nrows=2,ncols=1)
ax[0].set_title('Actual outcome')
ax[0].contourf(x, y, z, levels=15, vmin=0.5, vmax=1.0, cmap='cividis', alpha=0.9)
ax[1].set_title('Expected outcome')
ax[1].contourf(x, y, z, levels=15, vmin=0.5, vmax=1.0, cmap='cividis')
plt.show()

Actual outcome

Expected outcome

Additional information

No response

Operating system

Ubuntu 20.04

Matplotlib Version

3.5.1

Matplotlib Backend

QtAgg

Python version

3.8.8

Jupyter version

No response

Installation

conda

Issue 2:
This is the underlying problem raised in #1178.

It is illustrated by the test below; note that boundary anomalies are visible in all forms--agg on the screen, and pdf and svg displayed with a viewer--but in different places depending on the viewer and the size of the figure as rendered.

Note that the colorbar is rendered using pcolormesh, which has its own renderer with agg but otherwise is handled by draw_path_collection.

import numpy as np
import matplotlib.pyplot as plt

z = np.arange(150)
z.shape = (10,15)

fig, axs = plt.subplots(2,2)

ax = axs[0,0]
cs0 = ax.contourf(z, 20)
cbar0 = fig.colorbar(cs0, ax=ax)

ax = axs[0,1]
cs1 = ax.contourf(z, 20, alpha=0.3)
cbar1 = fig.colorbar(cs1, ax=ax)

ax = axs[1,0]
im2 = ax.imshow(z, interpolation='nearest')
cbar2 = fig.colorbar(im2, ax=ax)

ax = axs[1,1]
im3 = ax.imshow(z, interpolation='nearest', alpha=0.3)
cbar3 = fig.colorbar(im3, ax=ax)

plt.savefig("test1.pdf")
plt.savefig("test1.svg")
plt.show()
Issue 1:
Describe your issue.

This is fine on linux, but on OSX with an M1, stats.beta().interval() produces an overflow warning for completely reasonable values that should not cause overflow issues.

Reproducing Code Example

from scipy import stats
stats.beta(4, 2).interval(0.95)

Error message

/Users/twiecki/miniforge3/envs/pymc4/lib/python3.10/site-packages/scipy/stats/_continuous_distns.py:624: RuntimeWarning: overflow encountered in _beta_ppf
return _boost._beta_ppf(q, a, b)

SciPy/NumPy/Python version information

1.7.3 1.22.4 sys.version_info(major=3, minor=10, micro=4, releaselevel='final', serial=0)

Issue 2:
Describe your issue

Several statistical distribution methods emit warnings stemming from Boost. This issue tracks the status of all of them.

beta.ppf as reported here; should be fixed by boostorg/math#827

ncf as reported in gh-17101, should be fixed by boostorg/math#846

nct - I'm not sure that this has been reported separately yet. Is it caused by the same sort of thing?

ncx2 - Ditto.

gh-17272 will silence the failures in SciPy's tests temporarily, but as many of these marks as possible should be removed when gh-17207 merges.

Original Post

Describe your issue.

macOS CI is failing due to an overflow. I am still trying to reproduce locally.

NumPy was updated to 1.21.3, could be this or another dependency.

https://github.com/scipy/scipy/runs/3960228039

Reproducing Code Example

# from scipy/stats/tests/test_distributions.py:2878: in test_issue_12796
import numpy as np
from scipy import stats
q = 0.999995
a = np.array([ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])
b = np.array([99999, 99998, 99997, 99996, 99995, 99994, 99993, 99992, 99991, 99990, 99989, 99988, 99987, 99986, 99985, 99984, 99983, 99982, 99981])
stats.beta.ppf(q, a, b)

Error message

FAILED scipy/stats/tests/test_distributions.py::TestBeta::test_issue_12635 - ...
927
FAILED scipy/stats/tests/test_distributions.py::TestBeta::test_issue_12794 - ...
928
FAILED scipy/stats/tests/test_distributions.py::TestBeta::test_issue_12796 - ...
...
scipy/stats/_continuous_distns.py:626: in _ppf
916
return _boost._beta_ppf(q, a, b)
917
E RuntimeWarning: overflow encountered in _beta_ppf

SciPy/NumPy/Python version information

master on macOS/CI