WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
I was trying this code:

corpus = ['This is the first document.',

... 'This is the second second document.',

... 'And the third one.',

... 'Is this the first document?']

from sklearn.feature_extraction.text import TfidfVectorizer

vectorizer = TfidfVectorizer(min_df=1)

vectorizer.fit_transform(corpus).todense()

Gives

ValueError: Buffer dtype mismatch, expected 'int' but got 'long'

scikit-learn version = '0.15-git'

Scipy version = '0.14.0.dev-7cefb25'

Platform = Mac OSX 10.9.2

Issue 2:
Hello the great scikit-learn team!

Consider the following simple example (also posted on SO)

data = pd.DataFrame({'text1' : ['hello world', 'hello universe'],
'text2': ['good morning', 'hello two three']})

data
Out[489]:
text1 text2
0 hello world good morning
1 hello universe hello two three

As you can see, text1 and text2 share one exact word in common: hello. I am trying to create ngrams separately for text1 and text2 and I want to concatenate the results together into a countvectorizer object.

The idea is that I want to create ngrams separately for the two variables and used them as features in a ML algo. However, I do want the extra ngrams that would be created by concatenating the string together, like world good in hello world good morning. This is why I keep the ngram creation separated.

The issue is that by doing so, the resulting (sparse) vector will contain a duplicated hello column.

See here:

vector = CountVectorizer(ngram_range=(1, 2))

v1 = vector.fit_transform(data.text1.values)
print(vector.get_feature_names())

['hello', 'hello universe', 'hello world', 'universe', 'world']

v2 = vector.fit_transform(data.text2.values)
print(vector.get_feature_names())

['good', 'good morning', 'hello', 'hello two', 'morning', 'three', 'two', 'two three']

And now concatenating `v1` and `v2` gives 13 columns

from scipy.sparse import hstack
print(hstack((v1, v2)).toarray())

[[1 0 1 0 1 1 1 0 0 1 0 0 0]
[1 1 0 1 0 0 0 1 1 0 1 1 1]]

The proper text-features should be 12:

hello, word, hello word, good, morning, good morning,hello universe,universe, two, three, hello two, two three

I thought I had found the solution by using ColumnTransformer but it seems I am getting the same extra column

union= ColumnTransformer([("norm1", CountVectorizer(ngram_range=(1, 2)), "text1"), ("norm2", CountVectorizer(ngram_range=(1, 2)), "text2")])

union.fit_transform(data)
Out[508]:
array([[1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0],
[1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1]], dtype=int64)

Is this a bug in ColumnTransformer? Isnt ColumnTransformer supposed to get rid of duplicates?

Thanks!
Issue 1:
Just noting that there was a PR #14264 a year ago to try and add a strftime method to datetime64 object. Wonder if it might be resurrected??? :issue:#14243

To make it a little more friendly for packages downstream like Pandas it helps to compare synonomously with Python datetime and something like:

import datetime as dt
import numpy as np

date = dt.datetime.strptime('2020-06-30', format='%Y-%m-%d')
date.strftime('%Y-%m-%d')
dt.datetime.strftime(date, "%Y-%m-%d")

date64 = np.datetime64('2012-06-30T20:00')
np.datetime_as_string(date64, unit='D')
# nice with a direct date64.strftime(format) method..

Issue 2:
Looking at extending the support for datetime64 in matplotlib, in particular to allow plotting times that are outside years 0001-9999. Lots of science applications have millennial time scales, so being able to have support for a large time range is desirable, and is a definite strength of datetime64.

However, our tick formatters use datetime.strftime, and allow all the formatting strings for those (i.e. %Y, %y, %x, %g etc). However, we can't convert datetime64 to datetime for years outside 0001-9999 so we can't use strftime (directly).

Is there any way to get what we want? We can do a song and dance to force a datetime64 to be between 0001-9999 by adding or subtracting multiples of 400 years, and then reformatting just the year part of the string, but it would be nice if there were something more robust. Not sure if datetime_as_string could be enhanced to take a fmt=str optional kwarg?
Issue 1:
https://twitter.com/mausch/status/530504035540160513

https://twitter.com/LeviNotik/status/530505312777023488

https://twitter.com/mwotton/status/442775637648891904

https://twitter.com/melvinmt/status/530474427306479616

https://twitter.com/kosmikko/status/502340971527671808

https://twitter.com/kenperkins/status/494173990152175617 (navigation, I've had this problem and I'm a relatively experienced user of the site and ES itself)

https://twitter.com/icyliquid/status/477500839020752896

https://twitter.com/werg/status/466733972324880384 (another suggestion to bypass official ES documentation)

I wrote https://github.com/bitemyapp/bloodhound partly because I was having a hell of a time generating valid Elasticsearch requests without lots of copy-paste and templating.

The docs have not been improved much in the last couple years other than when you did the big site change.

It's extremely hard for a new user of Elasticsearch to get a bird's eye view.

I brought up Bloodhound when I first released it as a way to possibly start a proper spec of what Elasticsearch accepts as a valid request and what it does not. I'd like to revive the idea of having a spec so that users and client implementors don't have to keep rediscovering how Elasticsearch works through haphazard experimentation.

Back when I was implementing Bloodhound I asked if there was a spec. I was told there wasn't one. I was briefly hopeful when I saw there was a Thrift spec...but it passes off the actual document structure as a JSON blob, lending no useful information.

Please at least consider having a spec for the API.

Issue 2:
Requests/queries/etc currently have custom parsers, which make it more difficult to be certain that they are error free. We should replace all this hand parsing with some form of grammar, which defines exactly what syntax is allowed. This will also benefit those implementing clients, as they will have a grammar that can be interrogated programmatically.

Any unknown parameters should throw a parsing exception.

We can add custom rules where needed (eg to disallow certain combinations of parameters like using fuzzy in the multi_match query with type cross_fields).
Issue 1:
cuDNN v6.0 was released on Mar 23, are there any plans for adding compatibility (building against compatibility version 6000)?

Issue 2:
cuDNN v6.0 has been released. There are some cool new features:

Dilated Convolutions: Dilated Convolutions are now supported in cuDNN without a

change in API.

cudnnConvolutionBiasActivationForward allows for the execution of a single kernel fusing convolution, bias and activation operations

Full release notes:

Dilated Convolutions: Dilated Convolutions are now supported in cuDNN without a

change in API. Previously unused “upscale” fields in the Convolution Descriptor

have been repurposed to allow user specification of dilation factors along each

dimension. Support for dilation is present in the following code paths :

Forward : CUDNN_CONVOLUTION_FWD_ALGO_IMPLICIT_GEMM,

Backward Data: CUDNN_CONVOLUTION_BWD_DATA_ALGO_0 and

Backward Filter: CUDNN_CONVOLUTION_BWD_FILTER_ALGO_0

 The new API cudnnConvolutionBiasActivationForward allows for the execution of

a single kernel fusing convolution, bias and activation operations. At present, only

per channel bias and RELU activation are supported.

 Inference on 8 bit integer data is now supported, leveraging the 4 element dot

product instruction (IDP4A) of Pascal GPUs with CUDA capabilities 6.1. Two tensor

layouts are supported for this feature: CUDNN_TENSOR_NHWC with INT8 data

type and CUDNN_TENSOR_NCHW_VECT with INT8x4 data type.

 RNN now supports 3 algorithms

o CUDNN_RNN_ALGO_STANDARD :

 Same functionality as in CUDNN v5.1

o CUDNN_RNN_ALGO_PERSIST_STATIC :

 This algorithm relies on the usage of persistent CUDA kernels which

are pre-compiled to fit different GPUs.

 This algorithm is available only on Pascal GPUs.

o CUDNN_RNN_ALGO_PERSIST_DYNAMIC :

This algorithm also relies on the usage of persistent CUDA kernels

but these kernels are compiled at runtime using nvrtc. In some cases

this results in a significant performance benefit.

 This algorithm is also available only on Pascal GPUs and is supported

only on Linux and Windows.

 Support for 1D-FFT convolutions has been added

 New API routine cudnnReduceTensor has been added, supporting 8 reduction

operations

 Activation mode CUDNN_ACTIVATION_ELU is now supported.

 A deterministic max pooling mode CUDNN_POOLING_MAX_DETERMINISTIC

has been added.

 Significant performance improvement for softmax layers for mode

CUDNN_SOFTMAX_MODE_CHANNEL has been achieved when low batch

number is used.

 Significant performance improvements have been added for cudnnAddTensor

when spatial dimensions are set to 1.
Issue 1:
Checklist

I have checked the issues list

for similar or identical bug reports.

I have checked the pull requests list

for existing proposed fixes.

I have checked the commit log

to find out if the bug was already fixed in the master branch.

I have included all related issues and possible duplicate issues in this issue

(If there are none, check this box anyway).

Related Issues and Possible Duplicates

Related Issues

None

Possible Duplicates

None

Description

The RabbitMQ setting task_queue_ha_policy no longer has any affect, as described in the release notes for version 3.

This was reported to the mailing list here (in 2013!) and the answer then was that it's deprecated and will be removed.

Suggestions

Remove the configuration parameter and maybe reference the blog post and/or docs on how to set a policy.

Issue 2:
Checklist

I have checked the issues list

for similar or identical enhancement to an existing feature.

I have checked the pull requests list

for existing proposed enhancements.

I have checked the commit log

to find out if the if the same enhancement was already implemented in the

master branch.

I have included all related issues and possible duplicate issues in this issue

(If there are none, check this box anyway).

Related Issues and Possible Duplicates

Related Issues

#5928

Possible Duplicates

None

Brief Summary

db.authenticate() is deprecated starting from pymongo 3.5.

It is being used in our backend:

celery/celery/backends/mongodb.py

Lines 266 to 277
in
ee13eae

def _get_database(self):

conn = self._get_connection()

db = conn[self.database_name]

if self.user and self.password:

source = self.options.get(

'authsource',

self.database_name or 'admin'

)

if not db.authenticate(self.user, self.password, source=source):

raise ImproperlyConfigured(

'Invalid MongoDB username or password.')

return db

Celery 5.1.0 will introduce official support for Python 3.9 and so we require our dependencies to support it.

Design

Remove usage of db.authenticate() as we already authenticate when creating the MongoClient instance.

Architectural Considerations

None as the newer pymongo versions do not drop support for MongoDB versions.

Proposed Behavior

The backend should behave exactly the same.

Proposed UI/UX

The same exception should be raised in case of an authentication failure.

Diagrams

N/A

Alternatives

None
Issue 1:
I'm seeing some weird off-by-one issues when moving the selection point around in code, especially at the beginning of a line. I'll add a note to this if I figure out a reproduction, but it's happening pretty frequently.

User: @jbarnette

Atom Version: 0.42.0

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_0) AppleWebKit/537.36 (KHTML, like Gecko) Atom/0.42.0 Safari/537.36

Issue 2:
Getting some whack cursor behavior on atom 0.41.0:

I'm trying to write the _ outside of the quotes. But it stays inside.

I tried to fix it manually, but it won't let me.

This is what I want:

_ "./cache"
Issue 1:
There is a defect in the cron module when running on SuSE and other distributions that add a header, three lines, to the user crontab file. Each call to add/remove a job includes the previous header. After adding the code to strip the header, I created a test suite outside ansible and found other problems with the handling empty jobs and cron files. I should be able to cleanup my changes and generate a pull request over the weekend.

Issue 2:
ISSUE TYPE

Bug Report

COMPONENT NAME

template module(action plugin)

ANSIBLE VERSION

ansible 2.2.1.0

CONFIGURATION

Default config

SUMMARY

Jinja2 templates can't be included between roles in 2.2.1

STEPS TO REPRODUCE

Make two roles: common_role, service_role.

Make template in common_role/templates/common.j2.

Make template in service_role/templates/service.j2:

This is a service
{% include 'common_role/templates/common.j2' %}

Trying to template service.j2 will fail with error:

TemplateNotFound: common_role/templates/common.j2

EXPECTED RESULTS

service.j2 should include common.j2 while rendering.

DETAILS

This happens because /path/to/project/roles is not included in search path any more.

Commit with braking changes.

Original behaviour has been done here and patched a bit here.

This allow to include templates between roles, because Jinja2 blocks include paths with ...
Issue 1:
problem: https://babeljs.io/repl/#?experimental=false&evaluate=true&loose=false&spec=false&code=const%20a%20%3D%20%7Bb%3A%20%7Bc%3A%20Function()%7D%7D%0Aconst%20%7Bc%7D%20%3D%20a.b%0Aconst%20d%20%3D%20%7B%0A%20%20c%20()%20%7B%0A%20%20%20%20console.log(typeof%20c)%20%2F%2F%20should%20be%20function%2C%20is%20undefined%0A%20%20%7D%0A%7D

Input code

const a = {b: {c: Function()}}
const {c} = a.b
const d = {
c () {
console.log(typeof c) // should be function, is undefined
}
}

yields:

"use strict";

var a = { b: { c: Function() } };
var _c = a.b._c; // this should be `c`, not `_c`

var d = {
c: function c() {
console.log(typeof _c);
}
};
// should be function, is undefined

Issue 2:
We expect the following:

var Utils = {
get: function() {}
};

var { get } = Utils;

var bar = {
get: function(arg) {
get(arg, "baz");
}
};

To become:

"use strict";

var Utils = {
get: function get() {}
};

var _get = Utils.get;

var bar = {
get: function get(arg) {
_get(arg, "baz");
}
};

But actually we get:

"use strict";

var Utils = {
get: function get() {}
};

var _get = Utils._get; // <--- Note the extra underscore

var bar = {
get: function get(arg) {
_get(arg, "baz");
}
};

I’ve prepared a branch with failing test case:

babel:a241300...jgwhite:2826614

Let me know if you want a PR.
Issue 1:
From the beginning, you can make a choice of language. And then, the information will (could be) appear according to the chosen language. If there is no translated information, then in English.

Probably it will be the Chaos

Issue 2:
As an user, when completing challenges in a non-english language and running into a challenge that does not have an active translation, I want a notification explaining that translation is being worked on, and the current one is missing. And invitation to contribute with it, perhaps?

Said notification should link to the translation repo's issues, with the respective language tags selected.

Active translations are translations of a challenge that is relatively up to date
Issue 1:
Description

The fit_transfrom function from the sklearn.impute.KNNImputer returns array that with NaN values removed instead of imputed.

For example if an array X with shape (1,100) and 4 missing values is passed to fit_transform. It returns an array with size shape (1,96); The NaN values removed.

Example :

import numpy as np
from sklearn.impute import KNNImputer

X = np.array([[1,2,np.nan,3,4,np.nan,5,6,np.nan]])
imp = KNNImputer()
X_imp = imp.fit_transform(X)

print(X.shape)
print(X_imp.shape)

print(X)
print(X_imp)

Expected Results

(1, 9)

(1, 9)

[[ 1. 2. nan 3. 4. nan 5. 6. nan]]

[[1. 2 some_value_here 3. 4. some_value_here 5. 6. some_value_here]]

Actual Results

(1, 9)

(1, 6)

[[ 1. 2. nan 3. 4. nan 5. 6. nan]]

[[1. 2. 3. 4. 5. 6.]]

Versions

System:

python: 3.7.4 (default, Aug 9 2019, 18:34:13) [MSC v.1915 64 bit (AMD64)]

executable: C:\Users\my_name\Anaconda3\pythonw.exe

machine: Windows-10-10.0.18362-SP0

Python dependencies:

pip: 20.0.2

setuptools: 45.2.0.post20200210

sklearn: 0.22.1

numpy: 1.18.1

scipy: 1.4.1

Cython: 0.29.15

pandas: 1.0.1

matplotlib: 3.1.3

joblib: 0.14.1

Built with OpenMP: True

Issue 2:
Code sample

In the sample code below, a column is removed from the dataset during the pipeline

>>> from sklearn.impute import SimpleImputer
>>> import numpy as np
>>> imp = SimpleImputer()
>>> imp.fit([[0, np.nan], [1, np.nan]])
>>> imp.transform([[0, np.nan], [1, 1]])
array([[0.],
[1.]])

Problem description

Currently sklearn.impute.SimpleImputer silently removes features that are np.nan on every training sample.

This may cause further issues on pipelines because the dataset's shape has changed, e.g.

dataset[:, columns_to_impute_with_median] = imp.fit_transform(dataset[:, columns_to_impute_with_median])

Possible solutions

For the problematic features, either keep their values if valid or impute the fill_value during transform. I suggest adding a new parameter to trigger this behaviour with a warning highlighting the referred features.

As I'm willing to implement this feature, I look forward advices.
Issue 1:
Original ticket http://projects.scipy.org/numpy/ticket/2168 on 2012-06-16 by trac user kobejohn, assigned to unknown.

I found this due to someone having a problem not being able to load large integers with recfromcsv. After playing with it, I think it is simply ignoring all the dtype information provided.

[https://github.com/numpy/numpy/blob/master/numpy/lib/npyio.py#L1859 Line 1859 in npyio.py, part of recfromcsv()] tries to either bring in the dtypes passed or set None. However, it actually brings in a kwarg that I couldn't find anywhere else called 'update' which looks suspiciously like a copied mistype from earlier in the line.

If I change 'update' --> 'dtype', then the types get picked up as expected.

I found this in the github repo (although I may have been looking at the wrong branch) as well as 1.6.2

Issue 2:
I found this due to someone's problem loading large integers with recfromcsv. After playing with it, I think it is simply ignoring all the dtype information provided.

Line 1859 in npyio.py, part of recfromcsv() tries to either bring in the dtypes passed or set None. However, it actually brings in a kwarg that I couldn't find anywhere else called 'update' which looks suspiciously like a copied mistype from earlier in the line. If I change 'update' --> 'dtype', then the types get picked up as expected. More explicitly, in recfromcsv, change:

kwargs.update(dtype=kwargs.get('update', None),

to this:

kwargs.update(dtype=kwargs.get('dtype', None),

I found this in the github repo (although I may have been looking at the wrong branch) as well as the 1.6.2 release that I am using.

_(apologies for double posting this. I posted in trac first and then heard that maybe that won't be looked at. I haven't found a way to delete or close that ticket.)_
Issue 1:
Please make sure that this is a bug. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:bug_template

System information

Have I written custom code.

OS Platform and Distribution: Ubuntu 18.04.

TensorFlow installed from pip

TensorFlow version 1.14 with GPU support

Python version: 3.7.3

CUDA/cuDNN version: 10

Describe the current behavior

Hi, when I am using the hessian_vector_product() to computer the hessian_vector_product of my model, it returns results organized as IndexedSliceValue. This is OK because the model include data structure like embeddings.

However, when I do the assert on the indices of the returned IndexedSliceValue. I notice that there are duplicated indices with different corresponding values. May I know how to deal with these conflict <indices, values>? Thanks in advance.

Issue 2:
System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No

OS Platform and Distribution (e.g., Linux Ubuntu 16.04):Linux Ubuntu 18.04

Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:

TensorFlow installed from (source or binary): binary

TensorFlow version (use command below): 2.0.0-rc0

Python version: 3.6.8

Bazel version (if compiling from source):

GCC/Compiler version (if compiling from source):

CUDA/cuDNN version: CUDA 10.0

GPU model and memory: GeForce RTX 2080 Ti

Describe the current behavior

Running any of the saved models from tensorflow model zoo leads to a segmentation fault.

Code to reproduce the issue

import os
import tensorflow as tf
import numpy as np

os.system('wget http://download.tensorflow.org/models/object_detection/ssd_mobilenet_v2_coco_2018_03_29.tar.gz')
os.system('tar -xvf ssd_mobilenet_v2_coco_2018_03_29.tar.gz')

with tf.device('/device:GPU:0'):
loaded_model = tf.saved_model.load('ssd_mobilenet_v2_coco_2018_03_29/saved_model')
infer = loaded_model.signatures['serving_default']
sample_img = np.zeros((1,128,128,3))
predicted = infer(tf.constant(sample_img, tf.uint8))
print(predicted)

gdb output

Thread 89 "python3" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffbfbfff700 (LWP 7857)]
0x00007fff4372b741 in tensorflow::NonMaxSuppressionV2GPUOp::Compute(tensorflow::OpKernelContext*) ()
from /usr/local/lib/python3.6/dist-packages/tensorflow_core/python/_pywrap_tensorflow_internal.so
Issue 1:
Although it's working properly on the left side, on the right side it doesn't encounter that it's close to the end of the window and a vertical scroll bar is displayed.

Probably it's the same with tooltip.

http://jsfiddle.net/PRrky/1/

Issue 2:
I think it would be great to have some CSS for a calendar widget. It may seem pointless to have CSS without some JS to accompany it. Would it be possible to have a calendar icon appended to an input that when clicked on would display the calendar. I know jQuery UI can accomplish this, but it would great if it matched the Boostrap CSS.
Issue 1:
Electron Version:

5.0.x

Operating System:

macOS 10.14.5

Expected Behavior

Electron does not crash at exit.

Actual Behavior

The notifications are sent well, i use the close() function to avoid persistence in Notification Center.

By doing this every time I quit the application I have a message that warns me that the application did not stop properly.

To Reproduce

const notif = new Notification({title: title, body: body, silent: true})
notif.on('click', () => appEvent.emit('show-window'))
notif.show()
setTimeout(() => notif.close(), 10000)

After sending notification(s), close application (app.quit()) and the error will appear.

To no longer have the error after quitting app, i do not use the function close () but my application generates a lot of notifications and I would have preferred to handle that.

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:

6.0.0-beta3

Operating System:

macOS 10.13.6 10.14.4 / Windows 7 -->

Last Known Working Electron version::

5.0.1

Expected Behavior

Clicked download link in renderer process, then show Save as dialog.

Actual Behavior

Clicked download link in renderer process, then Electron app creshed.

To Reproduce

Clone and start sample app

$ git clone https://github.com/agata/crash-electron-with-download-link.git
$ cd ./crash-electron-with-download-link
$ npm install
$ npm start

Click a download link in the app -> Crash electron app

Screenshots

Electron 5.0.1

Electron 6.0.0-beta.3

Screencast: Electron-6.0.0-beta.3.mov.zip

Additional Information

If using electron-dl, it does not happen this problem. Electron-dl don't show Save As dialog with default mode.