WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
I have a dataframe with nan value inside and wanna use io.sql.write_frame function to store it in a table.

But, nan value can not be treated well by MySQLdb, it will raise an exception:

OperationalError: (1054, "Unknown column 'nan' in 'field list'")

I've tried to convert all nan value to None, but it turns out to be impossible, fillna function treat param value=None as "the caller don't pass a value" not "the nan value should be None"

I think add some hacks to convert nan to None in io.sql._write_mysql can fix this.

Issue 2:
UPDATE from @jorisvandenbossche:

Overview of current status writing nan values (see also tests added in #7100):

For MySQL using pymysql/MySQLdb nothing works: you get message Unknown column 'nan' in 'field list' (see also eg http://stackoverflow.com/questions/23353732/python-pandas-write-to-sql-with-nan-values)

Numeric columns:

working for sqlite and postgres

Only full NaN columns stay None in sqlite

Object columns (eg strings)

for postgresql: NaN is converted to the string u'NaN', which is not really what we want

for sqlite it is returned as None

NaT:

postgresql: gives error on inserting "0001-255-255T00:00:00"

sqlite3: writing works, but reading it with query returns '-001--1--1 -1:-1:-1.-00001'

MSSQL: not working with message "The supplied value is not a valid instance of data type float", see #8088 for more details

not sure exactly what sql expects (Nones?) rather than np.nan (or NaT)

https://groups.google.com/forum/?fromgroups#!topic/pydata/lxhnFtuzvWQ

also provide pandas datetime64[ns], instead of datetime/date types

#3532
Issue 1:
Who can help me,Thank you!

Issue 2:
I am new in glide and want to migrate my app from universalimageloader to glide.

I want to convert cached image from the disk into image file, and show it into an ImageView.

When I use universalimageloader, I can do it easily with this way:

File imageFile = DiskCacheUtils.findInCache(image_url, ImageLoader.getInstance().getDiscCache());
//then show it into image view
String file_target = "file://"+imageFile.getPath();
ImageLoader.getInstance().displayImage(target, imageView);

However I have not found a way from documentation to do that in Glide.

Is it possible?
Issue 1:
If specifying a high dpi at Figure creation time, the points in a swarmplot become more and more overlapping.

Example:

for my_dpi in [50,80,100,150,200]:
fig, ax = plt.subplots(dpi=my_dpi)
a = np.random.normal(size=(100,))
sns.swarmplot(a, orient='v')
plt.show()

Issue 2:
If I use swarmplot with default DPI value, then it works as expected:

from matplotlib import pyplot as plt
import seaborn as sns
import numpy as np

data = np.random.rand(100)
data = np.vstack([np.zeros_like(data), data])
data[0,50:] = 1

fig, ax = plt.subplots()
sns.swarmplot(x=data[0], y=data[1], size=20, ax=ax)
fig.savefig("swarm.png")

However, larger DPI values lead to overlapping dots:

fig, ax = plt.subplots(dpi=150)
sns.swarmplot(x=data[0], y=data[1], size=20, ax=ax)
fig.savefig("swarm150.png")

The higher the DPI value, the worse it gets:

fig, ax = plt.subplots(dpi=300)
sns.swarmplot(x=data[0], y=data[1], size=20, ax=ax)
fig.savefig("swarm300.png")

Thank you!
Issue 1:
When upgrading our dependencies, we encountered this error in our stack trace:

Exception Thrown
org.elasticsearch.common.inject.CreationException: Guice creation errors:

1) Error injecting constructor, java.lang.NoClassDefFoundError: org/apache/http/util/Args
at org.elasticsearch.discovery.ec2.Ec2Discovery.<init>(Unknown Source)
while locating org.elasticsearch.discovery.ec2.Ec2Discovery
while locating org.elasticsearch.discovery.Discovery
for parameter 3 at org.elasticsearch.node.service.NodeService.<init>(Unknown Source)
while locating org.elasticsearch.node.service.NodeService
Caused by: java.lang.NoClassDefFoundError: org/apache/http/util/Args

After checking through the pomfile for elasticsearch-cloud-aws, we didn't find any references to a specific version of Apache HTTPCore (so we weren't able to directly identify which version elasticsearch depends on).

We are using elasticsearch 1.5.0 and cloud-aws 2.5.0 (per the helpful README in cloud-aws!); we were using these in a previous release as well, but had another dependency that happened to provide HTTPCore 4.3.x as a transitive dependency. When that lib was upgraded, it specified HTTPCore 4.2.5, which appears not to contain the org.apache.http.util.Args class.

So when we were no longer lucky enough to have another dependency transitively satisfying cloud-aws's dependency on HTTPCore 4.3.x, since cloud-aws doesn't specify HTTPCore 4.3.x in its pomfile, we got a NoClassDefFound error.

It was something like this before:

OUR_APP
/ \
/ \
/ \
DepA ElasticSearch
| / (dep not in pomfile)
HTTPCore <---------------------------/
(no version specified, so grabs 4.3.x)

And now we have this:

OUR_APP
/ \
/ \
/ \
DepA ElasticSearch
| / (dep not in pomfile)
HTTPCore <---------------------------/
(4.2.5, breaks ElasticSearch)

Should this dependency be added to the pomfile?

Issue 2:
When upgrading our dependencies, we encountered this error in our stack trace:

Exception Thrown
org.elasticsearch.common.inject.CreationException: Guice creation errors:

1) Error injecting constructor, java.lang.NoClassDefFoundError: org/apache/http/util/Args
at org.elasticsearch.discovery.ec2.Ec2Discovery.<init>(Unknown Source)
while locating org.elasticsearch.discovery.ec2.Ec2Discovery
while locating org.elasticsearch.discovery.Discovery
for parameter 3 at org.elasticsearch.node.service.NodeService.<init>(Unknown Source)
while locating org.elasticsearch.node.service.NodeService
Caused by: java.lang.NoClassDefFoundError: org/apache/http/util/Args

After checking through the pomfile for elasticsearch-cloud-aws, we didn't find any references to a specific version of Apache HTTPCore (so we weren't able to directly identify which version elasticsearch-cloud-aws depends on).

Should this dependency be added to the pomfile?
Issue 1:
The parent window will unexpectedly show itself if a child window is shown. I noticed this issue when my apps main window would reveal itself sooner than expected behind the splash screen.

OS - MacOS Big Sur

Electron - 13.1.2

This is not an issue in electron 12

Here is example code to reproduce the issue -

const {app, BrowserWindow} = require('electron');

function createWindow() {
const win = new BrowserWindow({
width: 800,
height: 600,
show: false
});

const child = new BrowserWindow({
parent: win,
width: 400,
height: 300,
show: false,
backgroundColor: '#4f4f4f'
})

child.loadFile('child.html').then(() => {
child.show();
setTimeout(() => {
win.loadFile('index.html').then(() => {
win.show();
child.close();
});
}, 5000);
});

}

app.whenReady().then(() => {
createWindow();
});

Issue 2:
Output of node_modules/.bin/electron --version: 3.0.4

Operating System (Platform and Version): Windows 10.0.14393 (also repros on Win7)

Output of node_modules/.bin/electron --version on last known working Electron version (if applicable): Unknown

This issue only manifests when running Electron as a non-admin user

Expected Behavior

Calls to BrowserWindow.close() should not crash the application.

Actual behavior

Application crashes when user closes the BrowserWindow.

To Reproduce

I reproduced this using electron-quick-start here.

On Windows, make sure you're using a non-admin account.

git clone; npm install; npm start;

Click the X in the top right hand corner of the BrowserWindow

$ git clone https://github.com/jameskoch/electron-quick-start
$ npm install
$ npm start

Additional Information

Note that this code works fine when run as an administrator.

This appears in the Windows Application Event Log with exception code/offset:

Exception code: 0xc0000005
Fault offset: 0x00000000018727f4

On a different machine, using my full app (Electron 3.0.5), I loaded symbols and got a bit more info:

nteract.exe!aura::Window::GetRootWindow() Line 212 C++
nteract.exe!aura::Window::GetHost() Line 216 C++
nteract.exe!atom::NativeWindowViews::GetAcceleratedWidget() Line 1028 C++
nteract.exe!atom::NativeWindowViews::IsClosable() Line 686 C++
nteract.exe!atom::NativeWindowViews::Close() Line 314 C++
nteract.exe!mate::internal::Dispatcher<void __cdecl(atom::api::Menu * __ptr64)>::DispatchToCallback(const v8::FunctionCallbackInfo<v8::Value> & info) Line 239 C++
node.dll!000007fec5e0de84() Unknown
node.dll!000007fec5e7f8fd() Unknown
node.dll!000007fec5e4db89() Unknown
node.dll!000007fec5e4da6b() Unknown
0000000c95f84561() Unknown

Perhaps this is just a nonsense usage of beforequit. My goal was to orchestrate an orderly shutdown of each open BrowserWindow before the application itself terminates. I developed this code on macOS, and was primarily targeting the "Command + Q" workflow when using beforequit.
Issue 1:
Version

2.5.13

Reproduction link

https://jsfiddle.net/8s42h4bp/25/

Steps to reproduce

<div v-for="row in visible" :key="row">{{row}}</div>

Case A (no problem): visible = rows.slice(100, 110) followed by visible = rows.slice(99, 109)

Case B (problem): visible = rows.slice(100, 110) followed by visible = rows.slice(101, 111)

The first reuses DOM elements, while the latter appears to create new ones. This can be seen by inspecting the div boxes in firefox and see them all flashing orange when clicking the "down" button, but not the "up" button in the minimal reproduction. Why is this so, is it some kind of optimization, or is it a bug?

I am trying to do this when scrolling a page up/down to only show rows that are in view in a huge table. It is visibly faster to scroll up than down, despite all elements being absolutely positioned. Happens in both Chrome and Firefox.

What is expected?

DOM elements are reused in both case A and B.

What is actually happening?

DOM elements appear to be recreated in case B, potentially causing unnecessary performance hit and contradicting:

https://vuejs.org/v2/guide/list.html#Replacing-an-Array

Loving Vue, keep up the great work!

Issue 2:
I have virtual scrolling list with a lot of rows. I only show a few of them at a time using

this.view = this.items.splice(position, position + 5)

If 'position' is incremented or decremented, you would expect that in the DOM one element gets added, and one gets deleted. In the 'up' direction, that is the case. But in the down direction, all elements get removed and added again. I have a couple of images in each row, and this hurts performance quite a bit.

Vue.js version

2.1.3

Reproduction Link

https://jsbin.com/netereyuxa/1/edit?html,console,output

Steps to reproduce

press up / down, see that in the up direction one LI is removed and one added at each step, and in the down direction all LIs are replaced every time.

What is Expected?

Only one LI added, one LI removed

What is actually happening?

All LI's removed and added
Issue 1:
OS: Windows 10,Windows 7

Electron Version: 0.37.4

In my renderer process (web page),I am sending a message synchronously for printing the page as PDF.

In the callback of window.webContents.printToPDF I am returning thereturnValue of event.But the callback is never called.

When attempting the same process asynchronously it works fine.

Code:

Renderer:

var params = {
"path": undefined,
"filename": vm.profile._id + " " + vm.profile.firstname
}
let result = ipcRenderer.sendSync('print-profile-pdf', params);

Main Process:

ipcMain.on('print-profile-pdf', function(event, params) {
printToPdf(params.path, params.filename, event);
});
function printToPdf(path, filename, event) {
var options = {
marginsType: 2,
pageSize: "A4",
printBackground: false,
printSelectionOnly: false,
landscape: false
};
let file = (path || app.getPath("desktop")) + "/" + (filename || "profile") + ".pdf";
previewWindow.webContents.printToPDF(options, function(error, data) {
if (error) {
logger.error(error);
event.returnValue = {
error: error,
success: false
};
throw error;
}
fs.writeFile(file, data, function(error) {
if (error) {
logger.error(error);
event.returnValue = {
error: error,
success: false
};
throw error;
}
logger.info("PDF Saved Successfully in " + filename);
event.returnValue = {
filename: filename + ".pdf",
success: true
};
});
});

I was able to duplicate the same issue in a fresh setup too.

Repo: https://github.com/RaghuChandrasekaran/electron-quick-start

Reason for sync call: I don't want to allow the user to intreact until this operation gets successfully executed.

Issue 2:
Electron version: 1.8.2 beta 3 and 4 (ia32 and x64)

Operating system: Windows 10 and Arch Linux

Expected behavior

Devtools work.

Actual behavior

Electron crash.

How to reproduce

Start electron, open devtools and type anything in console. Electron crash with error (0xC0000005). Unlike #10188 no any log was created.
Issue 1:
Hi, I am having issued placing my cursor in desired location within the embedded text editor. I am using google chrome, and the only way this seems to fix itself is if i restart my entire computer. Shutting down browser and reopening does not resolve the issue.

Challenge Create a Text Field has an issue.

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

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

My code:

<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
.red-text {
color: red;
}

h2 {
font-family: Lobster, Monospace;
}

p {
font-size: 16px;
font-family: Monospace;
}

.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
border-radius: 50%;
}

.smaller-image {
width: 100px;
}
</style>

<h2 class="red-text">CatPhotoApp</h2>

<p>Click here for <a href="#">cat photos</a>.</p>

<a href="#"><img class="smaller-image thick-green-border" alt="A cute orange cat lying on its back. " src="https://bit.ly/fcc-relaxing-cat"></a>

<p>Things cats love:</p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>

Issue 2:
Challenge http://www.freecodecamp.com/challenges/waypoint-comment-your-javascript-code has an issue. Please describe how to reproduce it, and include links to screenshots if possible.

Errors showing on waypoint "Comment your JavaScript code" - showing assertions instead of using them for validating user entry.

"assert(editor.getValue().match(/(//)...../g), 'Create a // style comment that contains at least five letters');

Create a // style comment that contains at least five letters

assert(editor.getValue().match(/(/)...../g), 'Create a / */ style comment that contains at least five letters.');

Create a /* _/ style comment that contains at least five letters.

assert(editor.getValue().match(/(_/)/g), 'Make sure that you close the comment with a */');

Make sure that you close the comment with a */"

User input box can be empty or filled and it makes no difference.

You can pass the waypoint with the correct input, so the problem appears to be cosmetic.
Issue 1:
by Yuriy.Shirokov:

What steps will reproduce the problem?
1.Run ./all.bash

What is the expected output? What do you see instead?
Expected output is:
"--- cd ../test
N known bugs; 0 unexpected bugs"

Actual output is:
--- cd ../misc/cgo/stdio
rm -rf *.[568vqo] *.a [568vq].out *.cgo[12].go *.cgo[34].c *.so _obj _test
_testmain.go hello fib chain run.out
cgo file.go
8g -o _go_.8 file.cgo1.go file.cgo2.go
8c -FVw -I/home/uri/bin/go//src/pkg/runtime file.cgo3.c
rm -f _obj/stdio.a
gopack grc _obj/stdio.a _go_.8 file.cgo3.8
cp _obj/stdio.a /home/uri/bin/go//pkg/linux_386/stdio.a
gcc -m32 -fPIC -O2 -o file.cgo4.o -c file.cgo4.c
gcc -m32 -shared -lpthread -lm -o stdio_file.so file.cgo4.o
cp stdio_file.so /home/uri/bin/go//pkg/linux_386/./stdio_file.so
8g hello.go
8l -o hello hello.8
8g fib.go
8l -o fib fib.8
8g chain.go
8l -o chain chain.8
rm stdio_file.so file.cgo4.o
./fib: symbol lookup error: /home/uri/bin/go//pkg/linux_386/libcgo.so:
undefined symbol: pthread_attr_getstacksize

What is your $GOOS? $GOARCH?
GOOS=linux
GOARCH=386

Which revision are you sync'ed to? (hg log -l 1)
changeset: 4012:dbb7b18d987b
tag: tip
user: Rob Pike <r@golang.org>
date: Thu Nov 12 14:10:16 2009 -0800
summary: add a paragraph about semicolons to the tutorial.

GCC version: 4.1.2

Issue 2:
by wander.gr:

What steps will reproduce the problem?
If possible, include a link to a program on play.golang.org.
1. Create a directory link using "mklink /D <Link> <Target>"
2. Create another regular directory
3. Figure out which of the 2 is a regular directory and which one is a link

What is the expected output?
To be able to tell when something is a link to a directory instead of a directory, and
where it links to

What do you see instead?
The only function I've found that seems to be able to tell something about symbolic
links on windows, is when comparing them using os.SameFile, however, this only helps if
you know a target to compare it with

I have tried a whole bunch of functions in the os and filepath packages, but they are
either not supported on windows, or give the exact same stats when it's a link or when
it's a directory

Which compiler are you using (5g, 6g, 8g, gccgo)?
Whichever one comes with the .msi installer

Which operating system are you using?
Windows 7 Professional 64-bit

Which version are you using? (run 'go version')
go1

Please provide any additional information below.
Issue 1:
It should be possible for searchsorted to search a view of an array without allocating.

julia> a = [0]
1-element Array{Int64,1}:
0

julia> @btime searchsorted($a, 0)
14.404 ns (0 allocations: 0 bytes)
1:1

julia> @btime searchsorted(view($a,1:1), 0)
37.277 ns (1 allocation: 48 bytes)
1:1

julia> @btime findfirst(x->x==0, view($a,1:1))
5.833 ns (0 allocations: 0 bytes)
1

julia> versioninfo()
Julia Version 1.5.0-DEV.645
Commit c3fc36707c (2020-04-18 20:13 UTC)
Platform Info:
OS: Linux (aarch64-unknown-linux-gnu)
CPU: unknown
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-9.0.1 (ORCJIT, kryo)

Issue 2:
I couldn't find an open issue for this frequently-noted problem, so I'm filing this. Feel free to close if there's an earlier one.

It's worth linking to https://groups.google.com/forum/#!topic/julia-users/6Z1kJ5LrSMU, where it was pointed out that "faking" a view as (A, R), where R is a CartesianRange, is currently the cleanest way to circumvent this problem (but can only handle the equivalent of Int/UnitRange/Colon indexes). Various solutions using Ptr have also been employed in the past, but of course those suffer from the standpoint of garbage-collection safety.
Issue 1:
There's inconsistent behavior when using jax.numpy arrays vs numpy arrays when plotting histograms in matplotlib. I'm guessing this is a result of some differing property of the two objects thats not immediately obvious to me. They have the same shape. Its easy to fix by just converting to a regular numpy array (as below), but I thought I would report in case this is indicative of something that might cause problems in other situations

import matplotlib.pyplot as plt
import jax.numpy as np
import numpy as onp

a = onp.random.rand(100)

plt.figure()
_ = plt.hist(np.array(a))

plt.figure()
_ = plt.hist(onp.array(a))

gives:

Issue 2:
For some usages of JAX, the elements of an array seem to be transposed relative to NumPy leading to unexpected result. This is for example the case for matplotlib histograms.

import jax.numpy as jnp
import matplotlib.pyplot as plt
import numpy as np

fig, axs = plt.subplots(1, 3)
axs.flat[0].hist(np.linspace(0., 1.))
axs.flat[0].set_title("Expected Result (NumPy)")
axs.flat[1].hist(jnp.linspace(0., 1.))
axs.flat[1].set_title("JAX Result")
axs.flat[2].hist(np.linspace(0., 1.).reshape(1, -1))
axs.flat[2].set_title("JAX Result w/ NumPy")
fig.tight_layout()
plt.show()
Issue 1:
Something in bootstrap.css (v2.0.1) is interfering with Google Maps info window's display. When you click on a map point, the information bubble display is altered. For example: http://311servic.es/treetrim/ Click on any dot on the map to see what I mean. when I remove the bootstrap CSS file, Google Maps information bubbles looks correct.

Other than that, I'm loving Bootstrap.

Issue 2:
First of all thanks for your fantastic work. It does SAVE me a lot of time.

When I put Google Maps into Bootstrap layout, img tag in Google Maps breaks because Bootstrap set img max-width to 100%. When I comment max-width, it's working find but I'm not sure whether it'll break something else in Bootstrap or not.

Bootstrap and Google Maps

http://jsfiddle.net/jhnRD/1/

Google Maps without Bootstrap

http://jsfiddle.net/aVx8L/

Cheers,
Issue 1:
This is a sequel to #3830. Those are improvements identified by @jnothman to improve the PDF output of running the make latexpdf command in the doc folder.

there is a couple of useless blank pages before the first chapter

there should be a table-of-contents

there seem to be many chapters that should really be sections of other chapters (e.g. the one on fetching covertype; changelong entries)

what would be thumbnails corresponding to examples on the web site show up as duplicated images in the examples themselves, as well as as in the examples associated with each class/function in the reference

assume within-documentation references should be hyperlinked, but do not seem to be in cases where I've looked

Issue 2:
In this article https://link.springer.com/article/10.1186/1471-2105-8-25 concerns about using gini for feature importance is being raised.

We found that for the original random forest method the variable importance measures are affected by the number of categories and scale of measurement of the predictor variables, which are no direct indicators of the true importance of the variable.

However, in studies where continuous variables, such as the folding energy, are used in combination with categorical information from the neighboring nucleotides, or when categorical predictors, as in amino acid sequence data, vary in their number of categories present in the sample variable selection with random forest variable importance measures is unreliable and may even be misleading.

I'm not entirely sure but as I understand the documentation and reading through the documentation and code feature importance is calculated by using either gini or entropy (both suffering from the same issue I suppose). Is their any way circumvent this problem or actions that is supposed to be taken before feature imortance.

In the article they propose a new splitting criteria to combat this problem.
Issue 1:
requests.session(**kwargs)
Returns a Session for context-management.

This not longer works:

session = requests.Session(verify=not staging)

TypeError: __init__() got an unexpected keyword argument 'verify'

Issue 2:
Hello,

I would like to update my virtual environment.

I am using python 3.9, requests 2.28.1 and charset-normalizer 2.1.1

When I update charset-normalizer:

$ python3 -m pip install -U charset-normalizer

I get this answer:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. requests 2.28.1 requires charset-normalizer<3,>=2, but you have charset-normalizer 3.0.1 which is incompatible.

Is a new version of the Requests library expected in a near future?

Thank you.