WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Challenge http://freecodecamp.com/challenges/waypoint-bring-your-javascript-slot-machine-to-life has an issue. Please describe how to reproduce it, and include links to screenshots if possible.

// Only change code below this line.

$($('.slot')[0]).html(slotOne);

$($('.slot')[1]).html(slotTwo);

$($('.slot')[2]).html(slotThree);

functions but does not report a pass

Issue 2:
Challenge Checkpoint: Stand in Line has an issue.

User Agent is: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36.

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

My code:

// Setup
var myArr = [1,2,3,4,5];

function queue(arr, item) {
// Your code here
arr.push(item);
return arr.shift(); // Change this line
}

// Display Code
console.log("Before: " + JSON.stringify(myArr));
console.log(queue(myArr, 6)); // Modify this line to test
console.log("After: " + JSON.stringify(myArr));
Issue 1:
In Deno WebAssembly modules can be imported directly. However, there seems to be a bug where if a big file is being downloaded via the network, this fails.

How to reproduce

// This fails
import * as sqlite from "https://deno.land/x/sqlite/build/sqlite.wasm";

Download the big WASM file: git clone https://github.com/dyedgreen/deno-sqlite && cd deno-sqlite.

// This works
import * as sqlite from "./build/sqlite.wasm";

Error

$ deno file.js
Compile https://deno.land/x/sqlite/mod.ts
error: Uncaught CompileError: WebAssembly.compile(): expected 7299055 bytes, fell off end @+13
► $deno$/compiler.ts:710:40
at window_ts_10.window.onmessage ($deno$/compiler.ts:710:40)
at workerMain ($deno$/workers.ts:93:51)

Issue 2:
There seems to be an issue where Deno does not exit correctly if an uncaught exception occurs and a big WASM module was imported.

This seems to happen for modules around 100K and bigger (from testing on my machine, vary the 10000 in for loop to get different size binary).

Note: I ran across the issue while working on: https://github.com/dyedgreen/deno-sqlite, which uses a binary of around 1MB.

Steps to reproduce:

Build big WASM file:

deno --allow-write gen_big.js
clang --target=wasm32 --no-standard-libraries -Wl,--no-entry -nostartfiles -O0 -o big.wasm big.c

Run deno big.js

Needed files

// gen_big.js

const prefix = "test";
const str = "int ?(a, b) { return a+b; }";

const lines = [];
const main = ["int a = 0;"];
for (let i = 0; i < 10000; i ++) {
lines.push(str.replace("?", prefix.concat(i)));
main.push("a = " + prefix.concat(i) + "(a, b);");
if (i % 1000 === 0)
console.log(i);
}
main.push("return a;");
const total = lines.join("\n") + "\n\n" + `int __attribute__((used)) __attribute__ ((visibility ("default"))) add(int b) {\n${main.join("\n")}\n};\n`;
await Deno.writeFile("big.c", new TextEncoder().encode(total));

// big.js

import * as mod from "./big.wasm";

throw new Error("Does not die :(");
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

While Drawer is closed, it should be possible to change it's anchor side.

Current Behavior

Changing anchor side doesn't recalculate MuiPaper-root's transform: translateX coordinates correctly thus making it appear in the visible part of the screen.

Steps to Reproduce (for bugs)

https://codesandbox.io/s/zw5w01nnrp

Click 'Toggle' to check it opens from the left.

Click it again to close the Drawer

Click 'Change Anchor' to make it to the right

Observe the Drawer

Click 'Toggle' again - Drawer will recalculate to correct opened position.

Context

Drawer with some basic settings, applied until it's used.

Your Environment

Tech
Version

Material-UI
^1.0.0-beta.20

React
^16.0.0

browser
Chrome Version 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:
Using material-ui 0.14.0-rc2

The documentation for using custom themes states that a raw theme can be defined as:

{
spacing: Spacing,
fontFamily: 'Roboto, sans-serif',
palette: {
primary1Color: Colors.cyan500,
primary2Color: Colors.cyan700,
primary3Color: Colors.lightBlack,
accent1Color: Colors.pinkA200,
accent2Color: Colors.grey100,
accent3Color: Colors.grey500,
textColor: Colors.darkBlack,
alternateTextColor: Colors.white,
canvasColor: Colors.white,
borderColor: Colors.grey300,
disabledColor: ColorManipulator.fade(Colors.darkBlack, 0.3),
},
}

However, if you use such a theme with the AppBar component, you'll end up with the following error:

Uncaught TypeError: Cannot read property 'appBar' of undefined
getStyles @ app-bar.js:195
render @ app-bar.js:258

The code that's failing is in app-bar.js on this line: zIndex: rawTheme.zIndex.appBar,

In order to fix this, you must add the following to the raw theme:

zIndex: {
appBar: 1
}

Is the documentation missing zIndex values? Or is the AppBar component not properly handling themes ? Not sure exactly where the inconsistency is.

Issue 2:
just upgraded to rc2 and the tooltip prop on my IconButton just broke. Works fine when I remove the tooltip prop.
Issue 1:
I haven't seen anywhere in the kubernetes documentation that shows how to use variables (either specified command line, or by importing all declared environment variables) in my yaml configuration files. As I'm getting started with google container engine, it's definitely something I'm already wishing for.

With things as they currently are, I either have to generate the files myself, or maintain multiple copies of similar configuration files (usually by environment).

Apologies in advance if this is a duplicate feature request. I couldn't get a clear idea as to whether this is already underway.

Issue 2:
Duplicate of #33874

https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-e2e-gci-gce-reboot-release-1.4/318/

Failed: [k8s.io] Reboot [Disruptive] [Feature:Reboot] each node by dropping all outbound packets for a while and ensure they function afterwards {Kubernetes e2e suite}

/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/reboot.go:126
Sep 28 16:44:58.713: Test failed; at least one node failed to reboot in the time given.
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/reboot.go:158
Issue 1:
Hi all,

I was going through the API reference and noticed that some classifiers (eg. BaggingClassifier) are lacking examples. I've created some examples for these and would love to contribute them! Thanks

Issue 2:
UPDATE May 23 202

Here's a list of the remaining classes:

feature_selection.SelectorMixin

calibration.CalibratedClassifierCV (#15134)

decomposition.DictionaryLearning (#16907)

decomposition.MiniBatchDictionaryLearning (#16907)

decomposition.SparseCoder (#15233)

ensemble.GradientBoostingClassifier

gaussian_process.kernels.CompoundKernel

gaussian_process.kernels.Hyperparameter

gaussian_process.kernels.Kernel

gaussian_process.kernels.PairwiseKernel

inspection.PartialDependenceDisplay

linear_model.PoissonRegressor

linear_model.TweedieRegressor

linear_model.GammaRegressor

metrics.ConfusionMatrixDisplay

metrics.PrecisionRecallDisplay

mixture.BayesianGaussianMixture

mixture.GaussianMixture

multioutput.ClassifierChain (#15211)

multioutput.RegressorChain (#15215)

neighbors.BallTree

neighbors.DistanceMetric

neighbors.KDTree

Most of the docs in classes lack examples. It would be great to add one or two examples similar to this, http://scikit-learn.org/stable/modules/generated/sklearn.linear_model.Lasso.html
Issue 1:
SCRIPT5009: 'System' is undefined

I am still facing this issue. I tried including whatever told

My index.html

<html>

<head>
<title>RPortal</title>
<base href="/">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- inject:js -->
<script src="system.src.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/es6-shim/0.33.3/es6-shim.min.js"></script>
<script src="https://npmcdn.com/angular2/es6/dev/src/testing/shims_for_IE.js"></script>
<script src="vendors.min.js"></script>
<script src="lib.bundle.js"></script>
<script src="system-config.js"></script>
<!-- endinject -->
</head>

<body>
<app-root>Loading...</app-root>
<script>
System.import('main.js');
</script>
</body>

</html>

In vendors.min.js, I bundled polyfills from

import 'core-js/es6/symbol';
import 'core-js/es6/object';
import 'core-js/es6/function';
import 'core-js/es6/parse-int';
import 'core-js/es6/parse-float';
import 'core-js/es6/number';
import 'core-js/es6/math';
import 'core-js/es6/string';
import 'core-js/es6/date';
import 'core-js/es6/array';
import 'core-js/es6/map';
import 'core-js/es6/set';
import 'core-js/es6/reflect';
import 'core-js/es7/reflect';

Please help me.

Please let me know if any information needed.

Issue 2:
SCRIPT5009: 'System' is undefined

I am still facing this issue. I tried including whatever told

My index.html

<html>

<head>
<title>RPortal</title>
<base href="/">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- inject:js -->
<script src="system.src.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/es6-shim/0.33.3/es6-shim.min.js"></script>
<script src="https://npmcdn.com/angular2/es6/dev/src/testing/shims_for_IE.js"></script>
<script src="vendors.min.js"></script>
<script src="lib.bundle.js"></script>
<script src="system-config.js"></script>
<!-- endinject -->
</head>

<body>
<app-root>Loading...</app-root>
<script>
System.import('main.js');
</script>
</body>

</html>

In vendors.min.js, I bundled polyfills from

import 'core-js/es6/symbol';
import 'core-js/es6/object';
import 'core-js/es6/function';
import 'core-js/es6/parse-int';
import 'core-js/es6/parse-float';
import 'core-js/es6/number';
import 'core-js/es6/math';
import 'core-js/es6/string';
import 'core-js/es6/date';
import 'core-js/es6/array';
import 'core-js/es6/map';
import 'core-js/es6/set';
import 'core-js/es6/reflect';
import 'core-js/es7/reflect';

Please help me.

Please let me know if any information needed.
Issue 1:
In Python3 not all objects are comparable:

>>> a = ['', 3, 5, 8, None]
>>> a.sort()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: unorderable types: int() < str()
>>> a
['', 3, 5, 8, None]

Numpy does not acknowledge this possibility, so when trying to sort an object array, even though the error is raised, the sorting goes on as if all unorderable objects compared equal:

>>> arr = np.array(a, dtype=object)
>>> arr
array(['', 3, 5, 8, None], dtype=object)
>>> arr.sort()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: unorderable types: int() > NoneType()
>>> arr
array([3, 5, 8, None, ''], dtype=object)

Issue 2:
Using some set of parameters with numpy.digitize should yield the same bin classification as those from numpy.histogram.

For instance given an array x I may have 10 bins (11 bin edges). If I pass any individual entry from the array to numpy.digitize:

import numpy

counts,bin_edges = numpy.histogram(X,bins=10)
ind = numpy.digitize(x[i],bin_edges,right=True)

For x[i] <= bin_edges[0] left edge cases and x[i] >= bin_edges[-1] right edge cases I will get ind as 0 or bin_edges.shape[0], respectively. There should be a way to have the output agree with histogram without adding new binning.

I currently add something like this to fix the bounding issue on the left edge case

fix = lambda x: 1 if x == 0 else x
ind = fix(ind)

For the right edge case use the right=True parameter and only pass bin_edges[:-2].
Issue 1:
When I upgraded from 0.16.2 to 0.17.0, I was met with a nasty surprise when dropping duplicates. It looks like DataFrame.drop_duplicates() is not working as I would expect it to based on the previous version. I have a dataframe

test_ids = df['test_id'].unique()
print('N test ids: {}'.format(test_ids.shape))
print('N tests: {}'.format(df[['test_id', <some other columns>]].drop_duplicates().shape))

the output is:

N test ids: (341334,)
N tests: (237426, 10)

when I run the same in 0.16.2 the output is:

N test ids: (341334,)
N tests: (341334, 10)

I don't think you should be able to get fewer rows than the number of unique entries in a single column.

Issue 2:
promotes consistency, see #3021, #3016, #9065
Issue 1:
I cant move a file with mouse on terminal. :)

Issue 2:
Summary of the new feature/enhancement

For terminals which support zmodem protocol (like Xshell), one can use lrzsz to upload and download files from remote server directly through ther terminal, or even drag and drop files to upload. It will be great if Windows Terminal can support this protocol.

Proposed technical implementation details (optional)

Unfortunately I cannot provide technical details. But I'd like to say thants for your great work.
Issue 1:
use electron 9.1.1 open a pdf url dialog , press print button always hang

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 an issue that matches the one I want to file, without success.

Issue Details

Electron Version:

Operating System:

Last Known Working Electron version:

Expected Behavior

Actual Behavior

To Reproduce

Screenshots

Additional Information

Issue 2:
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 an issue that matches the one I want to file, without success.

Issue Details

Electron Version:

9.1.0

Operating System:

macOS Mojave 10.14.6

Last Known Working Electron version:

just v9. Because in electron version 9 was introduce "pdf viewer", but now it cant print pdf.

Expected Behavior

just print correctly the pdf...

Actual Behavior

when you try to print with "window.print()" a page that load a PDF electron do not respond.... sometimes crash...

To Reproduce

just clone "electron-quick-start" and replace this line :

mainWindow.loadFile('index.html')

for

mainWindow.loadURL('http://www.africau.edu/images/default/sample.pdf')

and replace all content script "preload.js" for:

window.addEventListener('DOMContentLoaded', () => {

window.print();

});

this is a example repo to reproduce the error:

https://github.com/rgarcia1990/electron-quick-start

just do the normal setup

$ git clone https://github.com/rgarcia1990/electron-quick-start

$ npm install

$ npm start || electron .

and when the app electron start will popup print dialog, just try to print!

that is all!
Issue 1:
🐛 Bug

Torchscript seems to require comments (in a function) to be indented otherwise it complains with an error message that is not very explicit.

However when you comment stuff (e.g. on a jupyter notebook) the comment symbol can be placed at the beginning of the line. It can be confusing.

To Reproduce

Steps to reproduce the behavior:

import torch
import torch.nn as nn

class M(nn.Module):
def __init__(self):
super().__init__()
def forward(inputs):
# some comment
return inputs

M_instance = M()
torch.jit.script(M_instance)

leads to:

File "/***/python3.7/ast.py", line 35, in parse
return compile(source, filename, mode, PyCF_ONLY_AST)

File "<unknown>", line 1
def forward(inputs):
^
IndentationError: unexpected indent

However if I indent my comment it works:

import torch

class M(nn.Module):
def __init__(self):
super().__init__()
def forward(inputs):
# some comment
return inputs

M_instance = M()
torch.jit.script(M_instance)

> RecursiveScriptModule(original_name=M)

Expected behavior

I would expect it to simply ignore all lines where the first character is. #

Environment

PyTorch Version (e.g., 1.0): 1.5.0a0-fb

Additional context

cc @suo

Issue 2:
This can cause issues when you have comments at a lower indentation than the rest of the code:

import torch

class Foo(torch.nn.Module):
def forward(self, x):
x = torch.neg(x)
# foo foo foo i have a comment at the wrong indent
return x

torch.jit.script(Foo())

Traceback (most recent call last):
File "ought.py", line 9, in <module>
torch.jit.script(Foo())
File "/home/jamesreed/pytorch/torch/jit/__init__.py", line 1159, in script
return torch.jit.torch.jit._recursive.recursive_script(obj)
File "/home/jamesreed/pytorch/torch/jit/_recursive.py", line 166, in recursive_script
stubs = list(map(make_stub, filtered_methods))
File "/home/jamesreed/pytorch/torch/jit/_recursive.py", line 163, in make_stub
return torch.jit.script_method(func, _jit_internal.createResolutionCallbackFromClosure(func))
File "/home/jamesreed/pytorch/torch/jit/__init__.py", line 1224, in script_method
ast = get_jit_def(fn, self_name="ScriptModule")
File "/home/jamesreed/pytorch/torch/jit/frontend.py", line 164, in get_jit_def
py_ast = ast.parse(dedent_src)
File "/home/jamesreed/miniconda3/lib/python3.6/ast.py", line 35, in parse
return compile(source, filename, mode, PyCF_ONLY_AST)
File "<unknown>", line 1
def forward(self, x):
^
IndentationError: unexpected indent

cc @suo
Issue 1:
System information

OS X with a CPU libtensorflow.so built off master (2336cdf)

Describe the problem

TF_AddGradients reports

No gradient defined for op: Add. Please see https://www.tensorflow.org/code/tensorflow/cc/gradients/README.md for instructions on how to add C++ gradients.

when asked to compute dz/dx for z=x+y (see code example).

and yet Add has a registered gradient. Mul also doesn't work, although gradients of other operations (like Sin) do work.

Source code / logs

#include "c_api.h"

void check_status(TF_Status* status) {
auto code = TF_GetCode(status);
if (code != TF_OK) {
cout<<TF_Message(status)<<endl;
exit(0);
}
}

int main() {
auto graph = TF_NewGraph();
auto x_desc = TF_NewOperation(graph, "Placeholder", "x");
TF_SetAttrType(x_desc, "dtype", TF_FLOAT);
auto status = TF_NewStatus();
auto x = TF_FinishOperation(x_desc, status);
auto y_desc = TF_NewOperation(graph, "Placeholder", "y");
TF_SetAttrType(y_desc, "dtype", TF_FLOAT);
auto y = TF_FinishOperation(y_desc, status);
auto z_desc = TF_NewOperation(graph, "Add", "z");
TF_AddInput(z_desc, {x, 0});
TF_AddInput(z_desc, {y, 0});
auto z = TF_FinishOperation(z_desc, status);
TF_Output output = {z, 0};
TF_Output input = {x, 0};
TF_Output grad;
TF_AddGradients(graph, &output, 1, &input, 1, NULL, status, &grad);
check_status(status);
return 0;
}

Issue 2:
Describe the problem

In my model, I use the FTRL Optimizer like below:

self.optimizer = tf.train.FtrlOptimizer(0.005, learning_rate_power=-0.5, initial_accumulator_value=0.1, l1_regularization_strength=1.0, l2_regularization_strength=0.00001)

Inside the FtrlOptimizer it will create several const variables for the parameters, such as learning rate, learning rate power, etc.

When I run the distributed tensorflow job, from the timeline I can see that for each session run I can see that the worker will send the above const variables to all the ps nodes. This is a cost since the variables are const and not needed to sent to ps nodes repeatedly.

I was wondering is there a way to pin those const variables to the ps and save the transferring cost during each session run.

Thanks.
Issue 1:
I have noticed that it's not possible to pass data to the root level component using properties.

I was hoping to pass data to the root level component as a way to initialize it from external data sources.

One simple example would be a JavaScript object defined in index.html - outside of Angular.

Ex:

<demo-app [testing]="[1,2,3]"></demo-app>

Assume the above root level component in my index.html page. I would like to pass an array to the testing property as a way to initialize the main component.

This doesn't seem to work and I find this to be an unfortunate limitation since the alternative is to define a global variable that I can access from inside the component. Instead we should be able to just "ferry" in the data via properties.

Issue 2:
http://plnkr.co/edit/5731Z9N6tQ391gQtfZrA?p=preview

I've been over the documentation 10 times, I've read through the source code, tutorials, the works... and I still can't wrap my head around what I'm doing wrong.

all I want to do is:

<app myTitle='my awesome title'>

and access myTitle from inside the constructor.

Is that possible in NG2?
Issue 1:
Version

2.6.11

Reproduction link

https://jsfiddle.net/ndxL039y/2/

Steps to reproduce

Just add a property that can accept both boolean and string:

...
props: {
value: [Boolean, String]
},
...

Then feed an empty string value into this property. Empty string value will be converted to boolean value, to true.

What is expected?

If property can accept both boolean and string value, then empty string value should behave as any other string value and shouldn't be converted into boolean.

What is actually happening?

Empty string value is converted into boolean true value.

Tested in Vue 2.7.1, but 2.7.1 is not availalble in your Issue Helper.

Issue 2:
Version

2.6.8

Reproduction link

https://codesandbox.io/s/lpkp7lkkm

Steps to reproduce

press toggle button

What is expected?

only the toggle method should be triggered

What is actually happening?

the toggle method AND the hide method trigger right away

if you revert to vue 2.5.22 this code works, it however does not work on latest 2.6.x. was upgrading from 2.5.x to 2.6.x and noticed that this broke.
Issue 1:
Glide Version:

4.2.0

Integration libraries:

okhttp3-integration:4.2.0@aar

Device/Android Version:

Pixel 2 (but i'd be surprised, if it weren't like that on all others as well)

Issue details / Repro steps / Use case background:

I have a global LoggingListener set to my GlideApp and on some occasions wanna use an additional Listener to set the visibility of my View after loading is complete.

Sometimes i have to influence other Views depending on the outcome of an Image load.

Glide load line / GlideModule (if any) / list Adapter code (if any):

I assume, you can imagine that those RequestListener implementation do "anything"

GlideApp.with(view).load(url)
.signature(new LongVersionSignature(pictureVersion))
.listener(new VisibilitySettingListener<Drawable>(borderLayout))
.listener(new TriggerLayoutNotifications<Drawable>())
.listener(new LoggingListener<Drawable>())
.diskCacheStrategy(DiskCacheStrategy.ALL)
.into(image);

No error - just the last Listener fires, the rest seems to be overwritten in the builder already.

Change:

RequestListener listener;
listener(RequestListener listener) {this.listener = listener; return this;}

to

List<RequestListener> listenerList = new ArrayList<>();
listener(RequestListener listener) {this.listenerList.add(listener); return this;}

Issue 2:
See: https://groups.google.com/d/topic/glidelibrary/auMdMEA7pw4/discussion

return new Picasso.Builder(app)
.listener(new Picasso.Listener() {
@Override
public void onImageLoadFailed(Picasso picasso, Uri uri, Exception e) {
Log.e(e, "Failed to load image: %s", uri);
}
})
.build();

I'm trying to replace the above block of picasso code. Picasso has a single location where we can listen for and log all errors, whereas Glide requires use to listen every place we request an image. Enhancement request is to build a hook into glide where we can log all requests in a single place such as in the Builder or during configuration.