WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
(This is also on stack overflow https://stackoverflow.com/q/45619654/5134817)

I have the following code (below) to produce a plot (a confusion matrix), and I want black lines between the squares, as below:

Code

import numpy as np
import matplotlib as mpl
from matplotlib.backends.backend_pgf import FigureCanvasPgf
mpl.backend_bases.register_backend('pdf', FigureCanvasPgf)
pgf_with_rc_fonts = {'figure.figsize': (15,9.3)} # Usually much longer.
mpl.rcParams.update(pgf_with_rc_fonts)
import matplotlib.pylab as plt
cm = np.array([[0.4, 0.6], [0.9, 0.1]])
classes = ['False', 'True']
plt.clf()
cmap = cmap=plt.cm.Blues
plt.imshow(cm, interpolation='none', cmap=cmap, aspect='equal', vmax=1, vmin=0)
plt.colorbar()
tick_marks = np.arange(len(classes))
plt.xticks(tick_marks, classes)
plt.yticks(tick_marks, classes)
plt.gca().set_xticks(np.arange(-.5, len(tick_marks), 1), minor=True)
plt.gca().set_yticks(np.arange(-.5, len(tick_marks), 1), minor=True)
plt.gca().grid(which='minor', color='k', linestyle='-')
plt.gca().tick_params('both', length=0, width=1, which='minor')

Plots

This produces the following plot:

The problem region

And the annoying thing is that:either than the box is not of the correct height, else the y axis minor tick is too low. I am not sure which, but it gives the ugly border:

However, when I remove the the parameter 'figure.figsize': (15,9.3) this doesn't happen. I am unsure what is going wrong, but I want the larger figure sizes for nicer plots, and so I can use larger interactive plots.

Issue 2:
I have some problems with non-accurate placing of images created by imshow. Output to PNG works fine, but the squares are rectangular and misaligned with the grid when plotting small squares to PDF (order of magnitude around 1-2 inches for the whole plot). I didn't inspect the contents of PDF, but I suspect that coordinates might be written with too low precision.

Here's a small example (maybe not the minimal possible, but hopefully short enough):

import numpy as np
import matplotlib.pyplot as plt

plt.gcf().set_size_inches([1,1])
a=np.random.rand(20,20)
im = plt.imshow(a, interpolation='nearest', origin='lower', extent=[-2,2,-2,2])
plt.gca().set_xticks(np.arange(-2,2,0.2))
plt.gca().set_yticks(np.arange(-2,2,0.2))
plt.gca().xaxis.set_ticklabels([])
plt.gca().yaxis.set_ticklabels([])
plt.grid(ls=':',lw=0.1,color='white')
plt.savefig('test.pdf')

I'm using python 3.3 and matplotlib 1.3.1.
Issue 1:
Preflight Checklist

[ x ] I have read the Contributing Guidelines for this project.

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

[ x ] I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

Electron Version:

10.1.1

Operating System:

macOS 10.15.6

Last Known Working Electron version:

unknown

Expected Behavior

I should be able to save a pdf file from the pdf menu without the app crashing

Actual Behavior

the pdf saves, but the app crashes

To Reproduce

Electron fiddle:

https://gist.github.com/c5de74c2973633e178803eef65b827df

Screenshots

Additional Information

It seems to be any of the options in this menu that crashes the app.

Removing the callback and running it like this:

mainWindow.webContents.print(printOptions)

seems to resolve it -- but I need the callback

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:

10.1.0

Operating System:

Windows 7

Last Known Working Electron version:

Didn't tried with any previous versions

Expected Behavior

Main process shouldn't crash when printing any content in the render process.

Actual Behavior

Main process crashes when trying to print div content

To Reproduce

Angular application running over Electron, and triggering window.print() from new window (using window.open())
Issue 1:
A crate that uses the core library gets a mysterious error message with a dummy span.

#[link(name = "rustmeta",
vers = "0.2",
uuid = "f19085c3-dd45-467d-b76b-cb07e5ecd13c")];

#[crate_type = "lib"];

use core(vers = "0.2");
use std(vers = "0.2");
use rustsyntax(vers = "0.2");

import core::*;
import syntax = rustsyntax;

../src/librustmeta/rustmeta.rc:1:0: 1:0 error: duplicate definition of module core
../src/librustmeta/rustmeta.rc:1 #[link(name = "rustmeta",

We know this happened because of the injected core library, so we should say so.

Issue 2:
In #6670 I add a basic form of static assertions (as suggested by graydon in #6568), but it's not nice to use. The biggest problem with it is you need a static variable with a name, that goes through trans and ends up in the object file.

@kud1ing suggested static_assert!(), which I think is a nice API but would need some invasive changed to the compiler (I think, uncertain).
Issue 1:
The compiler issues an error message for a goto jumping over type or const declaration, like

package main

func main() {
goto L1
type A int
L1:
}

The specification forbids only jumping over variable declarations.

Issue 2:
go version devel +4a839bf01b58 Tue May 20 15:52:08 2014 +1000 + linux/amd64

The program is:
package main
func main() {
goto label
type X int
label:
}

$ go build goto.go
goto.go:3: goto label jumps over declaration of X at goto.go:4

The spec only requires new variables to not come into scope:
"Executing the "goto" statement must not cause any variables to come into
scope that were not already in scope at the point of the goto".
Issue 1:
Here's a snippet to reproduce the issue:

const x = new THREE.WebGLRenderTarget();
const y = new THREE.WebGLRenderTarget();

console.log( x.texture.image === y.texture.image ); // false

x.copy( y );

console.log( x.texture.image === y.texture.image ); // true

What this means is that when x.setSize is called the object at y.texture.image is inadvertently modified but and is now out of sync with the true dimensions of render target y.

This line is the problem in Texture.copy:

this.image = source.image;

I assume this was originally intended to handle moving over an <img> tag without duplicating it -- maybe it makes sense to duplicate the image tag? Or maybe it should clone the object in some cases:

this.image = source.image instanceof Image ? source.image : { ...source.image };

I imagine copy would behave a bit confusingly for DataTexture, as well.

Edit: I see now that retaining the image data reference is important for dealing with cloning textures before they've been fully loaded and is valuable for minimizing data duplication.

Issue 2:
the face.material index is simply copied

https://github.com/mrdoob/three.js/blob/master/src/extras/GeometryUtils.js#L98

faceCopy.materialIndex = face.materialIndex;

maybe materialInddex should be reindexed as it were before r53

https://github.com/mrdoob/three.js/blob/r52/src/extras/GeometryUtils.js#L98

if ( face.materialIndex !== undefined ) {
var material2 = geometry2.materials[ face.materialIndex ];
var materialId2 = material2.id;
var materialIndex = geo1MaterialsMap[ materialId2 ];
if ( materialIndex === undefined ) {
materialIndex = geometry1.materials.length;
geo1MaterialsMap[ materialId2 ] = materialIndex;
geometry1.materials.push( material2 );
}
faceCopy.materialIndex = materialIndex;
}
Issue 1:
Documenting the list of tasks for ubernetes for 1.3 based on various discussions:

APIServer:

Add code for federated-apiserver ( #23509)

Add federation/v1alpha1 group version and cluster resource ( #23847)

Add service resource to federated-apiserver (#25232)

Add an e2e test for federation apiserver (@colhom #25125)

Client:

Generate auto generated clients (to be used by controllers) (#24117)

kubectl: Add support for cluster objects (kubectl get clusters) (#24016)

kubectl: Add federated-apiserver auth details to kubeconfig so that kubectl can talk to federated-apiserver.

kubectl: Verify if any change is required for kubectl describe service (not required)

hack/test-cmd.sh tests

Controller:

Bring up ubernetes controller manager ( #23430)

Write cluster controller: syncs state of registered kubernetes clusters.(#23430)

Service controller: delegate service creation to underlying clusters (#23848, #24009, #23430 )

Service controller: Create load balancing apparatus on top of resulting cluster services.

e2e tests

Tying together:

Add a script to bring up the control plane (brings up federation-apiserver, controller managers and atleast one underlying kubernetes cluster) (#25125)

Docs and example showing how it works

Future tasks (post 1.3):

Add replicaset resource to federated-apiserver ( #24764)

Write RS and subRS controllers/scheduler (#23269)

HA: Etcd quorum

HA: Multiple ubernetes api servers and controller managers (one in each cluster)

@kubernetes/sig-cluster-federation

Issue 2:
If you google e.g. "kuberentes ha" you hit http://kubernetes.io/v1.0/docs/admin/high-availability.html, which itself says that the page is an archived version of 1.1. It would be better to send users straight to the latest version.

I think if we add canonical link tags pointing to the latest version that would both avoid a penalty for duplicated content and push people to the latest version by default, though I am sure that someone on the Google team has more knowledge here!

Related to #2838
Issue 1:
The following code fails with an UndefRefError on Julia 1.7:

struct BadStruct{R,S}
named_tuple::NamedTuple{R,S}
n::Int
end

BadStruct(NamedTuple{}(), 0)

It also exits the REPL.

I'm not sure what's going on here, but here are some observations:

I can't reproduce the error with only the named tuple in the struct.

With no type parameters (R, S), there's no crash.

When the Named Tuple is nonempty, there's no crash.

The construction of the struct succeeds, because let x = BadStruct(NamedTuple{}(), 0); x.n end works. But let x = BadStruct(NamedTuple{}(), 0); x.named_tuple end raises the UndefRefError, this time in Base.getproperty. So it seems the struct is being constructed, but the named_tuple field is not getting initialized properly? Note this example gives an error but does not kill the REPL.

This is possibly related to #43411.

My versioninfo() is

Julia Version 1.7.1
Commit ac5cc99908 (2021-12-22 19:35 UTC)
Platform Info:
OS: macOS (arm64-apple-darwin21.2.0)
CPU: Apple M1 Pro
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-12.0.1 (ORCJIT, cyclone)

but @femtomc has reproduced the error, with

Julia Version 1.7.0
Commit 3bf9d17731 (2021-11-30 12:12 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-12.0.1 (ORCJIT, skylake-avx512)
Environment:
JULIA_VERSION = 1.6.1

This issue came up because Gen.jl's StaticChoiceMap datatype is similar to the BadStruct above, and we noticed crashes when upgrading to Julia 1.7. (https://github.com/probcomp/Gen.jl/blob/44f5f1408caf05ff95932bb58d9f57907c5084e3/src/choice_map.jl#L350).

The code works fine on my machine on Julia 1.6.3.

Thanks!

Issue 2:
cf brief discussion on discourse

This bug(?) occurs on 1.7 but not on 1.6:

struct Wrapper{SYMS, TT}
x::NamedTuple{SYMS, TT}
end
randnt() = Wrapper((a = randn(), b = rand(), c = rand(1:5), d = randn(SVector{3, Float64})))
X = randnt()
@allocated randnt() # 64
isbits(X) # false
isbits(X.x) # true

But if the wrapper is defined differently then the isbits == true is recovered:

struct Wrapper1{NT}
x::NT
end
randnt1() = Wrapper1((a = randn(), b = rand(), c = rand(1:5), d = randn(SVector{3, Float64})))
X1 = randnt1()
@allocated randnt1() # 0
isbits(X1) # true
isbits(X1.x) # true

Because of this, it is easy enough to produce a work-around, but it feels like that shouldn't be necessary and the behaviour described above should not occur?

julia> versioninfo()
Julia Version 1.7.0
Commit 3bf9d17731 (2021-11-30 12:12 UTC)
Platform Info:
OS: macOS (arm64-apple-darwin21.1.0)
CPU: Apple M1 Max
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-12.0.1 (ORCJIT, cyclone)

(built from source)
Issue 1:
Context:

Playwright Version: [1.30.0]

Operating System: [e.g. Windows]

Node.js version: [e.g. 12.22, 14.6]

Browser: [Chromium]

Extra: [electron test]

Code Snippet

Help us help you! Put down a short code snippet that illustrates your bug and

that we can run and debug locally. For example:

const fileChooserPromise = window.waitForEvent('filechooser');
await window.getByText('click to select file').click();
const fileChooser = await fileChooserPromise;
await fileChooser.setFiles(`./devices.xlsx`);

Describe the bug

If file is too large(more than 50M), it will choose large files mode ,the browser will get the file object containing path, such as {name: "devices. xlsx", row: {name: "devices. xlsx", path: "xxxx/devices. xlsx"...}...},else the browser will get the file object with the path properties is empty, such as {name: "devices. xlsx", row: {name: "devices. xlsx", path: ""...}...}

Issue 2:
My application uses the q-file feature of the quasar framework.here is the q-file link. When a file is uploaded, it gets the path parameter of the file in the files object array to find the local address where the file is located.

This is the file object printed in Developer tools after I uploaded the file manually, you can see the properties 'path' is not empty

I uploaded the file using setInputFiles() and 'path' is empty.

await window.locator('input[type="file"]').setInputFiles(path.resolve(__dirname, '../cypress/fixtures/samples/GoneNutty.avi'))

I know setInputFiles() has only 3parameters,can I still use other methods to achieve passing 'path',if you see my problem I hope you can help me,thanks a lot.
Issue 1:
I saw several issues regarding this from a few years ago (#11898, #6191, #8458), but I did not understand why didn't this go anywhere. The oldest one is still opened, but no activity since 2016?

The problem is that when I create a BufferGeometry from Geometry, there are a lot of duplicated vertices. Now, I know what you are thinking: normals are different, there are UV seams etc. Alas this is not the case (as far as I can tell).

For example, if I convert a Sphere(Buffer)Geometry:

var geometry1 = new THREE.SphereBufferGeometry( 0.7, 10, 10 );
var geometry2 = new THREE.Geometry().fromBufferGeometry(geometry1);
var geometry3 = new THREE.BufferGeometry().fromGeometry(geometry2);

Then there are 4+ (!) times as many vertices in geometry3 than in geometry1.

What I actually want is the position-based merge function (.mergeVertices) in the regular Geometry class. I started converting all my code to use BufferGeometry, but some functionality is not available there (like the merge). So I now want to convert my BufferGeometry to Geometry, parse it, and get it back to BufferGeometry for rendering. But this happens with the vertex count:

Shape
Original BG
Converted G
Converted BG
Indexed and merged BG

Plane
4
4
6
4

Box
24
24
36
24

Sphere
121
121
540
119

In the last column is the result from a merging and indexing function I created. That function checks all the attributes from the vertices of an un-indexed BG, removes duplicates and indexes it.

Live: http://tume-maailm.pri.ee/ylikool/muu/threejs/indexedBG/

(counts are in the Console)

I don't know, maybe there are some models where the resulting BufferGeometry cannot be indexed like that. But perhaps automatic indexing could be at least some option somewhere?

Three.js version

Dev

r106

...

Issue 2:
Sometimes? Most of the times? In fact, it could be done even in case with face normals - if the model has enough neighbour faces with the same normal, it could even make sense :) File it under suggestions.
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

Context

Thanks for making this library <3. I am currently using the library and am building a selectbox and when I read the docs I stumbled upon this description for renderValue: https://material-ui.com/api/select/#props

Important part:

Render the selected value. You can only use it when the native property is false (default).

I just wanted to ask if it's planned to add this feature for native selectboxes as well? To be more precise:

I want to have EVERY feature of material-ui-next but when I open the select box on mobile a "real" select should open. I found other libraries having this included. They build a <div> with <li> like you do already, but when you click on the <div> a <select> is triggered, so you can use both the features of the plugin AND the native select box.

Is this something you would do, or maybe something a contributor could do or would you reject both the idea and a PR? I'm not so fluent in JS, so not 100% sure if I can fix this problem without making huge BC breaks, but I wanted to know if there are any plans on doing so?

Reason is, we have a country selection where we display the country flag when a country has been selected and only display the country names when the select box is open and we wanted to use the same approach for mobile.

Your Environment

Tech
Version

Material-UI
v1.0.0-beta.29

React
16

browser
any

Issue 2:
Here are screenshots of 3 charts I've whipped up so far:

Vertical Bar Chart

Horizontal Bar Chart

Bullet Chart

The charts are made using nvd3 and each chart's theme inherits from the calling component's mui theme. The screenshots are showing the default-light-theme (they look especially nice when wrapped in the <Paper> component!).

I've got a forked branch set up here that you can look at to see the code.

@shaurya947 @hai-cea - I'd love to hear some thoughts and feedback on adding these components to mui src code.
Issue 1:
See details here: http://stackoverflow.com/questions/33986633/angular-2-dependency-injection-error-on-ngfor-in-dynamically-created-component

This is a showstopper for loadAsRoot. All I get is

<!--template bindings={}-->

where the repeated elements shoud be.

Issue 2:
When you add a component via DynamicComponentLoader.loadAsRoot, you can't use data binding in your loaded component template.

Plunker: http://plnkr.co/edit/yzKAiXQQQwKi88g6wIdY?p=preview
Issue 1:
struct Vector3<S>(S, S, S);

// passes type checking
fn into_vec3_arg<S>([x, y, z]: [S, ..3]) -> Vector3<S> {
Vector3(x, y, z)
}

fn into_vec3_let<S>(v: [S, ..3]) -> Vector3<S> {
let [x, y, z] = v; // error: use of moved value: `v[..]`
Vector3(x, y, z)
}

fn into_vec3_match<S>(v: [S, ..3]) -> Vector3<S> {
match v {
// error: use of moved value: `v[..]`
[x, y, z] => Vector3(x, y, z),
}
}

http://is.gd/bc1U2v

Note that it is impossible to work around this using transmute, because:

struct Vector3<S>(S, S, S);

fn into_vec3_transmute<S>(v: [S, ..3]) -> Vector3<S> {
// error: cannot transmute from a type that contains type parameters
unsafe { mem::transmute(v) }
}

http://is.gd/BeSWOs

Issue 2:
let arr = [Box::new(1), Box::new(2), Box::new(3)];
let [a, b, c] = arr;

fails with

<anon>:5:13: 5:14 error: use of moved value: `arr[..]` [E0382]
<anon>:5 let [a, b, c] = arr;
^
<anon>:5:10: 5:11 note: `arr[..]` moved here because it has type `Box<i32>`, which is moved by default
<anon>:5 let [a, b, c] = arr;
^
<anon>:5:10: 5:11 help: use `ref` to override

while the following work fine:

let arr = [Box::new(1)];
let [a] = arr;

enum Dummy<T> {
Val([T; 2]),
}
let arr = [Box::new(1), Box::new(2)];
let Dummy::Val([a, b]) = Dummy::Val(arr);
Issue 1:
This is a problem of implementation decisions. The adjusted mutual information (AMI) between two labelings is an adjusted-for-chance version of the normalized mutual information (NMI) of those labelings. There are numerous choices for how to normalize; four listed in Vinh et al. (2010) are min, sum, sqrt, and max. We use sqrt in metrics.normalized_mutual_info_score but max in metrics.adjusted_mutual_info_score.

Consistency makes sense, especially when comparing these two measures to each other. I think it makes sense to make the two definitions consistent with each other. Alternatively, a parameter could be added to each, letting the user choose their normalizing method. Since there hasn't been much study into when to use which normalizing method (and the choice doesn't alter results much), I think it's better to make a unilateral shift so both consistently use just one normalizing method.

Issue 2:
There exist many defintions of NMI and AMI.

Vinh, N. X., Epps, J., & Bailey, J. (2010). Information theoretic measures for clusterings comparison: Variants, properties, normalization and correction for chance. Journal of Machine Learning Research, 11(Oct), 2837-2854.

mention 5 different definitions of NMI, and based on that give 4 different AMI.

The NMI implemented in sklearn uses sqrt(H(U), H(V)) for normalization.

The AMI implemented in sklearn uses max(H(U), H(V)) for normalization.

There exists an NMI with the max normalization, and a AMI with the sqrt normalization, so this is inconsistent in sklearn. Ideally, they would both use the same definition by default, and allow using any of the others via an option.
Issue 1:
The link that states "Requests 3.0 development is underway, and your financial help is appreciated!"

at the top of every doc page (eg: http://docs.python-requests.org/en/master/), currently points to the url:

https://www.kennethreitz.org/requests3

Which, at the time of writing is a "404 not found" page.

I'd like to learn about requests 3, so this should point somewhere useful :) (or be removed temporarily)

Issue 2:
Summary.

link to support requests for py3 isn't working at the top of

http://docs.python-requests.org/en/master/

leads to https://www.kennethreitz.org/requests3

What you expected.

a website

What happened instead.

404

import requests

System Information

$ python -m requests.help

404

Thanks
Issue 1:
scipy/scipy/stats/_distn_infrastructure.py

Line 2402
in
f57e5bf

raise RuntimeError

I hit this message by running scipy.stats.skewnorm.fit([1,2,np.nan])

It would be good if the error was more descriptive. Perhaps "NaNs in data" or something, but I'm not sure if there are any other reasons that this error might get hit.

Issue 2:
Original ticket http://projects.scipy.org/scipy/ticket/1757 on 2012-10-29 by trac user stevenj, assigned to @pv.

In http://projects.scipy.org/scipy/ticket/1741 you replaced the original non-free complex error function ("wofz") code with a version written by me. You should update to the latest version of my code, which improves accuracy and performance:

http://ab-initio.mit.edu/wiki/index.php/Faddeeva_w

There are also a few new test cases in the test program at the end of my code.
Issue 1:
This behavior seems very weird to me.

If I run test.ts with

deno run test.ts --allow-net

I get the following error

error: Uncaught PermissionDenied: network access to "http://127.0.0.1:3333/", run again with the --allow-net flag
at unwrapResponse (rt/10_dispatch_json.js:24:13)
at sendAsync (rt/10_dispatch_json.js:75:12)
at async fetch (rt/26_fetch.js:279:29)

However, this works if I run it like this

deno run --allow-net test.ts

Everything works fine.

I feel like most users expect the same behavior from both examples.

Deno version 1.3.3

Issue 2:
I'm not hugely familiar with CLI standards, but I don't think I've ever run in to the requirement that --flags precede the positional arguments. I spent a long while trying to get --allow-net to work before realising this was necessary.

deno run --allow-net something.ts vs deno run something.ts --allow-net

Is there any reason not to support both forms?

Alternately, a warning that the arguments were being ignored as invalid would have helped me understand.