WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Please see:

http://play.golang.org/p/VXUScwoGAH

I can see and understand why the final equality test returns false, but at the same time given that the default timezone is Z, would nevertheless expect the result to be true.

Issue 2:
It seems that marshaling and unmarshaling a zero time produces an object that is different from the original:

func TestMarshalUnmarshalJSON(t *testing.T) {
var expected, parsed Time

body, err := expected.MarshalJSON()
if err != nil {
t.Errorf("json.Marshal error = %v", err)
}

err = parsed.UnmarshalJSON(body)
if err != nil {
t.Errorf("json.Unmarshal error = %v", err)
}

if !reflect.DeepEqual(expected, parsed) {
t.Errorf("json error, expected = %#v, parsed = %#v", expected, parsed)
}
}

--- FAIL: TestMarshalUnmarshalJSON (0.00 seconds)
time_test.go:807: json error, expected = time.Time{sec:0, nsec:0x0, loc:(*time.Location)(nil)}, parsed = time.Time{sec:0, nsec:0x0, loc:(*time.Location)(0x6cd2a0)}
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

Dubbo version: master

Operating System version: mac os 10.14.3

Java version: 1.8.0_201

Steps to reproduce this issue

remove code ClassUtils.isPrimitive(method1.getReturnType()) in AbstractConfig.java at line 653

ClassUtils.isPrimitive(method1.getReturnType()) is already judge in method MethodUtils.isGetter

no need to do this any more

What actually happens?

make code brief and clean

Issue 2:
I have searched the issues of this repository and believe that this is not a duplicate.

I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

Dubbo version: xxx

Operating System version: xxx

Java version: xxx

Steps to reproduce this issue

xxx

xxx

xxx

Pls. provide [GitHub address] to reproduce this issue.

Expected Result

What do you expected from the above steps？

Actual Result

What actually happens?

If there is an exception, please attach the exception trace:

Just put your stack trace here!
Issue 1:
The documentation for read() in the Reader trait specifies:

Read bytes, up to the length of buf and place them in buf.

Returns the number of bytes read. The number of bytes read may

be less than the number requested, even 0. Returns Err on EOF.

However, the BufferedReader type which implements Reader will only perform a single read up to its internal buffer size of 64kB, regardless of the input stream size or output buffer size.

The following test program creates a 200kB file and reads it into a similarly sized buffer. Only the first 64kB is read:

use std::io::{BufferedReader, BufferedWriter, File};

fn main() {

let buf_size = 200*1024;
let filename = "/tmp/test.dat";

println!("Generating buffer of {} bytes", buf_size);
let source_data = Vec::from_elem(buf_size, 0xA5);

let path = Path::new(filename);
let mut file = BufferedWriter::new(File::create(&path));
match file.write(source_data.as_slice()) {
Ok(()) => (), // succeeded
Err(e) => println!("failed in write: {}", e),
}

let path = Path::new(filename);
let mut file = BufferedReader::new(File::open(&path));
let mut read_data = Vec::from_elem(buf_size, 0);
println!("Buffer capacity {} bytes", read_data.len());

match file.read(read_data.as_mut_slice()) {
Ok(bytes_read) => println!("Read {} bytes", bytes_read),
Err(e) => println!("error reading: {}", e)
}
}

The output is:

Generating buffer of 204800 bytes
Buffer capacity 204800 bytes
Read 65536 bytes

The expected output would obviously report "Read 204800 bytes". As per the trait's documentation, the read() method should read up to the size of either the input stream or the output buffer, whichever is smaller; reading in chunks of 64kB in its internal buffer is an implementation detail.

If instead of using read() the read_at_least() method is called (with buf_size), the full size is read.

Issue 2:
Issue 1:
Hi, I recently opened an issue here atom/tabs#148 , claiming I couldn't drag tabs around to rearrange them, but realized it's a more general problem. I can't left-click and drag ANYTHING in Atom. I can't even left mouse down and drag to highlight text. It's as if the mouse up event is firing when it shouldn't.

I'm using a fresh install of

Atom 0.204.0

on Linux Mint 17 Qiana (based on Ubuntu 14.04, Trusty Tahr)

Thanks!

Issue 2:
Almost certainly because of this Chrome issue: https://code.google.com/p/chromium/issues/detail?id=465660 (see also https://code.google.com/p/chromium/issues/detail?id=456222, https://www.virtualbox.org/ticket/13968). Didn't have this problem in Atom in this environment before the upgrade to use Chrome 41. Makes Atom very difficult to use in this environment.
Issue 1:
Bug summary

Compare the colorbars at the top of the imagegrid in https://matplotlib.org/3.4.3/gallery/axes_grid1/demo_axes_grid.html and https://matplotlib.org/3.5.3/gallery/axes_grid1/demo_axes_grid.html (same example, but mpl3.4 vs 3.5): the ticks have incorrectly moved from the top side of the colorbar to the bottom side (and the ticklabels are no longer suppressed by the toggle_label(False) call, but that's more or less a consequence of the first point, because toggle_label will try to hide the labels on the cbar_location="top" side).

This is a regression that bisects to #20054.

Code for reproduction

# Run galleries/examples/axes_grid1/demo_axes_grid.py or galleries/examples/axes_grid1/demo_axes_grid2.py

Actual outcome

https://matplotlib.org/3.5.3/gallery/axes_grid1/demo_axes_grid.html

Expected outcome

https://matplotlib.org/3.4.3/gallery/axes_grid1/demo_axes_grid.html

Additional information

Obviously #20054 changed colorbar axes for the (much) better. We can either try to fix the problematic interaction between new-style colorbars and ImageGrid, or "advantageously" interpret the fact that no one reported this bug in the ~1.5y since the release of matplotlib 3.5 as a sign that ImageGrid sees very little use and perhaps deprecate it (it has a slightly idiosyncratic API anyways, and may be better replaced by compressed layout these days).

Operating system

macos

Matplotlib Version

3.8.0.dev1020+gefd66d48fc

Matplotlib Backend

mplcairo

Python version

3.11

Jupyter version

enosuchlib

Installation

git checkout

Issue 2:
Part of #11299 deprecates the property Patches.xy.

I assume this was based on the existing docstring

Set/get the vertices of the polygon. This property is

provided for backward compatibility with matplotlib 0.91.x

only. New code should use

:meth:~matplotlib.patches.Polygon.get_xy and

:meth:~matplotlib.patches.Polygon.set_xy instead.

That docstring is 10 years old, and I'm not sure if we really want to deprecate the property. In many places I would actually favor properties over getters/setters.
Issue 1:
Description

I tried to use the learning_curve function using a Pipeline object as estimator but this results in a TypeError.

Steps/Code to Reproduce

import numpy as np
from sklearn.datasets import load_boston
from sklearn.linear_model import ElasticNet
from sklearn.model_selection import learning_curve
from sklearn.pipeline import Pipeline
from sklearn.preprocessing import StandardScaler

X, y = load_boston(return_X_y=True)

pipe = Pipeline((['preproc', StandardScaler()],
['predict', ElasticNet()]))

learning_curve(pipe, X, y)

Expected Results

Actual Results

TypeError: 'tuple' object does not support item assignment

Versions

Linux-4.4.0-96-generic-x86_64-with-debian-stretch-sid
('Python', '2.7.13 |Continuum Analytics, Inc.| (default, Dec 20 2016, 23:09:15) \n[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]')
('NumPy', '1.13.1')
('SciPy', '0.19.1')
('Scikit-Learn', '0.19.0')

Issue 2:
Description

TypeError: 'tuple' object does not support item assignment error thrown when calling fit on a Pipeline whose steps parameter was initialized with an n-tuple (as opposed to a list) of (name, transform) tuples.

Previous versions of sklearn Pipelines worked when an n-tuple was used for steps. I guess new functionality associated with Pipelines now requires that steps be mutable.

I guess there are a few choices here:

Automatically handle the case of an n-tuple being passed by creating a new list for self.steps and copying over the tuple's items to it. And maybe throw a warning for behavior's deprecation.

Throw an immediate error during initialization if steps is a tuple. Of course, this is still a breaking change, but at least, the user won't have to wait until calling fit before discovering something is wrong.

I could submit a PR for this if you want.

Steps/Code to Reproduce

from sklearn.pipeline import Pipeline
from sklearn.ensemble import RandomForestClassifier
from sklearn.decomposition import PCA
from sklearn.datasets import load_breast_cancer

pipeline = Pipeline((('pca', PCA()), ('rf', RandomForestClassifier())))
X, y = load_breast_cancer(True)
pipeline.fit(X, y)

Expected Results

This had no errors in previous versions

Actual Results

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/sklearn/pipeline.py", line 257, in fit
Xt, fit_params = self._fit(X, y, **fit_params)
File "/usr/local/lib/python2.7/dist-packages/sklearn/pipeline.py", line 226, in _fit
self.steps[step_idx] = (name, fitted_transformer)
TypeError: 'tuple' object does not support item assignment

Versions

Linux-4.4.0-36-generic-x86_64-with-Ubuntu-14.04-trusty

('Python', '2.7.6 (default, Jun 22 2015, 17:58:13) \n[GCC 4.8.2]')

('NumPy', '1.13.1')

('SciPy', '0.19.0')

('Scikit-Learn', '0.19.0')
Issue 1:
by google@barrera.io:

$ go version
go version go1.2.2 linux/amd64
$ cat test.go
package main

import "net"
import "fmt"

func main() {
conn, err := net.Dial("tcp", "google.com:80")
if err != nil {
fmt.Println(err)
}
fmt.Fprintf(conn, "GET / HTTP/1.0\r\n\r\n")
}
$ go run test.go
dial tcp 173.194.42.72:80: network is unreachable

---

This is happening on an IPv6-only host, so there should be no attempt to connect to the
above IPv4, and instead, try the IPv6 (eg: the AAAA record) one instead.

Issue 2:
Forking this from issue #3610.

My experiments show that net.Dial has two modes of operation when connecting to a
dual-stack hostname:

1. By default, it prefers IPv4 :(
2. When using a net.Dialer{DualStack: true}, IPv4 and IPv6 SYNs are sent simultaneously,
and the resulting address family is unpredictable.

The latter violates a "MUST" in the Happy Eyeballs RFC:
http://tools.ietf.org/html/rfc6555#section-4.1

This is harmful for two reasons:
- It increases server load in the common case, by always sending two SYNs.
- Dual-stack clients cannot reliably use IPv6 to route around NATs. The primary
incentive for a network operator to deploy IPv6 is to reduce NAT load (and therefore
save money), but this sort of client behavior invalidates that incentive.
Issue 1:
julia 0.3.3 on Mac OSX 10.9.4/amd64

When I re-define a function, any other functions that call that function need to be recompiled to use the new definition.

Here is a simple example:

julia> function f() print("f called\n") end
f (generic function with 1 method)

julia> function g() print("g, pre-f\n"); f(); print("g, post-f\n") end
g (generic function with 1 method)

julia> g()
g, pre-f
f called
g, post-f

julia> function f() print("hi, I'm a new definition of f \n") end
f (generic function with 1 method)

julia> g()
g, pre-f
f called <<<<<<< ARG, WHAT?!
g, post-f

julia>

Issue 2:
if I define a function d2 before a function d1 which calls d2 then change d2, d1 uses the old definition for d2.

I assume this is because it is all precompiled, but maybe there should be a note warning of this? Or would it be possible to replace the old definition with a longjmp to the new one?

(Mostly important for the REPL, since I don't always do a full load)

julia> function d2()
a
end

julia> function d()
d2()
end

julia> d()
in d: a not defined

julia> function d2()
b=2
end

julia> d()
in d: a not defined

julia> d2
Methods for generic function d2
d2() at prompt:2

julia> function d()
d2()
end

julia> d()
2
Issue 1:
Problem

Most Linux distribution provide python2 as Python 2 program, yet python scripts within the repo still use #! /usr/bin/env python making it impossible to run them on Linux outside Docker sandbox.

Suggestion

Change these shebangs to #! /usr/bin/env python2

Issue 2:
hello!

I have built deno in my Manjaro. But Manjaro use python3 for default python.So I get a error.

Can use python2 instead of python in the build script .

thank.
Issue 1:
I am getting this weird behaviour in jnp.linalg.norm where in when I set ord="fro", I get different values when I pass input array x having shape as [1,1] instead of [2, 1, 1]. However, it is only the case for fro.

For other values of ord, I get consistent values.

Check for duplicate issues.

Provide a complete example of how to reproduce the bug, wrapped in triple backticks like this:

import jax.numpy as jnp

x = jnp.zeros([2, 1, 1])
x = x.at[0, 0, 0].set(3.4346476e-38)
x
# DeviceArray([[[3.4346476e-38]],
#
# [[0.0000000e+00]]], dtype=float32)

y = jnp.zeros([1, 1])
y = y.at[0, 0].set(3.4346476e-38)
y
# DeviceArray([[3.4346476e-38]], dtype=float32)

print(jnp.linalg.norm(x, "fro", (-2, -1)))
print(jnp.linalg.norm(y, "fro", (-2, -1)))
# [3.4346476e-38 0.0000000e+00]
# 0.0 -------> why is this zero ? and not 3.4346476e-38 ?

print(jnp.linalg.norm(x, 1, (-2, -1)))
print(jnp.linalg.norm(y, 1, (-2, -1)))
# [3.4346476e-38 0.0000000e+00]
# 3.4346476e-38

print(jnp.linalg.norm(x, 2, (-2, -1)))
print(jnp.linalg.norm(y, 2, (-2, -1)))
# [3.4346476e-38 0.0000000e+00]
# 3.4346476e-38

If applicable, include full error messages/tracebacks.

Issue 2:
Simple example:

jnp.linalg.norm(jnp.array([1e-20], jnp.float32))

produces 0.

Denormals are flushed to zero, and 1e-20**2 is smaller than the smallest normal float32.

It's possible to define a non-underflowing Euclidean norm using variadic reductions:

def norm2(xs):
def reducer(xs, ys):
(ssq_x, scale_x) = xs
(ssq_y, scale_y) = ys
scale = lax.max(scale_x, scale_y)
scale_is_zero = lax.eq(scale, jnp.float32(0))
ssq = ssq_x * (scale_x/scale)** 2 + ssq_y * (scale_y / scale)**2
return (lax.select(scale_is_zero, jnp.ones_like(ssq), ssq), scale)

ssq_y, scale_y = lax.reduce(
(np.ones_like(x), jnp.abs(x)),
(jnp.float32(1), jnp.float32(0)),
reducer, dimensions=(0,))
return scale_y * jnp.sqrt(ssq_y)

We should determine whether we want to do this; if so it probably needs to be implemented as a primitive.

Interestingly numpy.linalg.norm also produces 0 if the CPU ftz flag is set (e.g., via the daz package), but scipy.linalg.norm does not.
Issue 1:
It sends an error

I was gonna install sqlite3 through npm but suddenly an error occured

Issue 2:
npm http fetch GET 200 https://registry.npmjs.org/qs/-/qs-6.9.1.tgz 9519ms

npm timing npm Completed in 3754889ms

npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:

npm ERR! https://npm.community

npm ERR! A complete log of this run can be found in:

npm ERR! C:\Users\Siva\AppData\Roaming\npm-cache_logs\2019-11-08T14_43_49_232Z-debug.log

node -v

v13.1.0

npm -v

6.12.1

This is happening for v12.13.0 also.
Issue 1:
Given the example code below:

<ul class="list-group">
<li class="list-group-item active">
<span class="badge">14</span>
<a href="#">Cras justo odio</a>
</li>
</ul>

When the class of active is applied to li.list-group-item the color of the anchor tag remains blue instead of being changed to @list-group-active-text-color.

Issue 2:
http://bootply.com/78668
Issue 1:
TypeScript Version:

1.8.9

Code

new Map<number, number>([1, 2].map(x => [x, x]));

// Error:
// Argument of type 'number[][]' is not assignable to parameter of type 'Iterable<[number, number]>'…

Expected behavior: types are inferred correctly, no error shown.

Actual behavior: type error.

Issue 2:
I have a piece of code with many foo[]s that should really be [foo,foo] -- it would be nicer if map had a type that preserves tuples, so something like this:

var x: [number, number];
x = [1,2].map(x=>x+1);

would work, even if it's some hack with a union of tuples up to some number of elements (I think that I saw something like that around rest arguments, and I imagine that this in a close neighborhood).

I thought that this would be common, but didn't find anything about it. Feel free to dismiss if it is.
Issue 1:
Hi everyone :)

I found a small inaccuracy in the docs for np.clip. There it says

Equivalent to but faster than np.maximum(a_min, np.minimum(a, a_max))

https://github.com/numpy/numpy/blob/master/numpy/core/fromnumeric.py#L2039-L2051

but the function actually seems to behave like np.minimum(a_max, np.maximum(a, a_min))

To be fair: This is only relevant if the user mixes up the order of the inputs.

import numpy as np

def min_max(a, a_min, a_max):
return np.minimum(a_max, np.maximum(a, a_min))

def max_min(a, a_min, a_max):
return np.maximum(a_min, np.minimum(a, a_max))

print(np.clip(4, 5, 2)) # Returns 2
print(min_max(4, 5, 2)) # Returns 2
print(max_min(4, 5, 2)) # Returns 5

Issue 2:
It's sometimes hard to tell in numpy whether a given numpy function will also be a method of an array.

e.g. You can go arr.max() or np.max(arr), but you can's go arr.abs() (you need to go np.abs(arr).

Same goes for most functions: median, sign, exp, etc. It would be nice, because I find it much more readable to look at:

mean_rmse = ((out-targ)**2).mean(axis=1).sqrt().mean(axis=0)

Than:

mean_rmse = np.mean(np.sqrt(np.mean((out-targ)**2, axis =1)), axis=0)
Issue 1:
Is there a reason why read_csv has a usecols and skiprows as arguments, but not skipcols and userows? Is this to avoid parameter checks or something more fundamental than that?

It would be nice to have all four options to avoid clunky inversions of the type usecols = columns.remove(unwanted_col).

Issue 2:
Code Sample, a copy-pastable example if possible

# Your code here
import pandas as pd

df = pd.DataFrame({'A'=[1,2,3],'B'=[3,2,1]})

Here, I need something like the following,
C should be, True = if the row value of A is less than the value of B. Else False.
Without a for loop.
df.C.tolist() should be [True, False, False]

Problem description

[this should explain why the current behaviour is a problem and why the expected output is a better solution.]

Note: We receive a lot of issues on our GitHub tracker, so it is very possible that your issue has been posted before. Please check first before submitting so that we do not have to handle and close duplicates!

Note: Many problems can be resolved by simply upgrading pandas to the latest version. Before submitting, please check if that solution works for you. If possible, you may want to check if master addresses this issue, but that is not necessary.

For documentation-related issues, you can check the latest versions of the docs on master here:

https://pandas-docs.github.io/pandas-docs-travis/

If the issue has not been resolved there, go ahead and file it in the issue tracker.

Expected Output

Output of pd.show_versions()

[paste the output of pd.show_versions() here below this line]
Issue 1:
Here's what atom looks like on my Chromebook Pixel (2015) - running trusty Ubuntu / Gnome.

It has a DPI of 239.

Is there any way to fix this via internal settings?

Issue 2:
I've just installed Atom from a git checkout on Ubuntu 12.10, and the attached screenshot is what I see (I've shrunk the editor font size). I'm assuming that fonts aren't really meant to be that large.
Issue 1:
Challenge http://www.freecodecamp.com/challenges/waypoint-manipulate-arrays-with-unshift has an issue. Please describe how to reproduce it, and include links to screenshots if possible.

Although the comment conveys the correct message as below

// Add "Paul" to the start of myArray

// Only change code below this line.

The description says the following :

Let's take the code we had last time and unshift this value to the end : "Paul"

It should be to the first

Issue 2:
Challenge http://www.freecodecamp.com/challenges/waypoint-manipulate-arrays-with-unshift has an issue.

Just a little detail that may lead to confusion: in the description of the Waypoint it's written "to the end", when the unshift function adds the new value to the beginning of the array:

"Let's take the code we had last time and unshift this value to the 'END': "Paul"". (I've written it in uppercase so you can see it better).

That's all. Thanks for the work you're doing! ;)
Issue 1:
function f0(): [number, number] {
return [1, 2]; // works
}

interface Some<a> { some: a; }
interface None { none: void; }
type Optional<a> = Some<a> | None;

function f1(): Optional<[number, number]> {
return { some: [1, 2] }; // works
}

function some<a>(value: a) : Some<a> {
return { some: value };
}

function f2() : Optional<[number, number]> {
return some([1, 2]); // doesn't work
}

Issue 2:
Tuple types aren't always inferred when calling generic functions. For example:

function identity<A>(value: A): A {
return value
}

// works
const [a1, b1]: [number, string] = [1, 'a']

// works
const [a2, b2]: [number, string] = identity<[number, string]>([1, 'a'])

// breaks
const [a3, b3]: [number, string] = identity([1, 'a'])

Output:

foo.ts(12,7): error TS2322: Type '(number | string)[]' is not assignable to type '[number, string]'.
Property '0' is missing in type '(number | string)[]'.

See also #2189, #4136, #6037.
Issue 1:
I am working in Android app that load images from Amazon S3. The Image URL randomly changes with token and expiry key. For that reason i can't cache the image Glide.

There is any way to set Glide cache key as any static ID(like image id) not url.

I attached my code snippet to load image from AWS

Glide
.with(remoteGalleryAct)
.load(photoFinalImageURL)
.signature(new StringSignature(getImageUrl(photoFinalImageURL)))// remove AWS keys
.error(defaultNoImageDrawable)
.placeholder(defaultNoImageDrawable)
.dontAnimate()
.diskCacheStrategy(DiskCacheStrategy.SOURCE)
.into(new ImageViewTarget<GlideDrawable>(photoHolder.photo) {
@Override protected void setResource(GlideDrawable resource) { }
@Override public void onResourceReady(final GlideDrawable resource, GlideAnimation<? super GlideDrawable> glideAnimation) {
//super.onResourceReady(resource, glideAnimation);
view.setImageDrawable(resource);
}
});

Please suggest me there is any way to achieve in Glide.

Issue 2:
Hi, folks.

I need to cache images with dynamic url. I have 2 methods .getImageId() and .getImageUrl();

I need to cache my downloaded images with getImageId() key, because this id is unique and image url change all time.

How to set custom image id to cache? Please show me a way. Thanks.
Issue 1:
Windows Terminal 0.4.2382.0

Windows 10

# Steps to reproduce

RUN 'Windows Terminal' with two command-prompts.
Run next command in both prompt (simultanuously)
for /l %f in (1,1,100000) do @echo abcdefghijklmnopqrstuvwxyz %f

In de output of the first screen the 'wrong output' is found.
(not neccesarily at the point given in the example)

# Expected behavior

correct output,
100000 lines containing the alphabet, with a number at the end of the line.

# Actual behavior

In the first tab, something like this is seen:
abcdefghijklmnopqrstuvwxyz 98810
abcdefghijklmnopqrstuvwxyz 98811
abcdefghijklmnopqrstuvwxyz 98812
abcdefghijklmnopqrstuvwxyz 98813
abcdefghijklmnopqrstuvwxyz 98814
abcdefghijklmnopqrstuvwxyz 98815
�]0;CMD - echo abcdefghiz 98816
abcdefghijklmnopqrstuvwxyz 98817
abcdefghijklmnopqrstuvwxyz 98818
abcdefghijklmnopqrstuvwxyz 98819
abcdefghijklmnopqrstuvwxyz 98820
abcdefghijklmnopqrstuvwxyz 98821
abcdefghijklmnopqrstuvwxyz 98822
abcdefghijklmnopqrstuvwxyz 98823
abcdefghijklmnopqrstuvwxyz 98824
abcdefghijklmnopqrstuvwxyz 98825

Issue 2:
Description of the new feature/enhancement

Proposed technical implementation details (optional)