WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Describe the bug

When a model has a LargeBinary column, and I try to first() or one() a query, a TypeError is raised.

Please see the error message below.

To Reproduce

The model looks like this:

class User(Base):
__tablename__ = 'users'

id = Column(Integer, primary_key=True)
username = Column(String(20), unique=True)
email = Column(String(100), unique=True)
password_hash = Column(LargeBinary(length=100))

# added init
def __init__():
...

The code:

session = SessionLocal()
user = User('username', 'email', 'password')
session.add(user)
session.commit()

user = session.query(User).filter(User.username=='username').one()
# the error also occurs with 'first()'

Error

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/query.py", line 2865, in one
return self._iter().one()
File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/result.py", line 1417, in one
return self._only_one_row(
File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/result.py", line 559, in _only_one_row
row = onerow(hard_close=True)
File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/result.py", line 1281, in _fetchone_impl
return self._real_result._fetchone_impl(hard_close=hard_close)
File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/result.py", line 1684, in _fetchone_impl
row = next(self.iterator, _NO_ROW)
File "/usr/local/lib/python3.10/site-packages/sqlalchemy/orm/loading.py", line 147, in chunks
fetch = cursor._raw_all_rows()
File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/result.py", line 393, in _raw_all_rows
return [make_row(row) for row in rows]
File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/result.py", line 393, in <listcomp>
return [make_row(row) for row in rows]
File "/usr/local/lib/python3.10/site-packages/sqlalchemy/sql/sqltypes.py", line 993, in process
value = bytes(value)
TypeError: string argument without an encoding

Versions

OS: macOS

Python: 3.10

SQLAlchemy: 1.4.37

Database: MariaDB (MySQL)

DBAPI (eg: psycopg, cx_oracle, mysqlclient): pymysql

Additional context

No response

Issue 2:
sqlalchemy/lib/sqlalchemy/sql/sqltypes.py

Line 945
in
5881fd2

value = bytes(value)

value = bytes(value)

改为

value = bytes(value, 'utf8')

fix
Issue 1:
Hi,

VS: 2013 Update 4 RC.

TS: 1.3

In the code below:

class Foo {

constructor(
private bar: string
) { }

getBar() {
return this.bar;
}
}

right-clicking on the constructor bar and renaming does not rename this.bar in getBar.

If bar is public or defined outside of the constructor, then the rename works correctly.

Issue 2:
The following code used to find the reference for variable z in line2 correctly pre-1.0, but now fails to find the reference within the function func:

export class ABCD {
constructor(private x: number, public y: number, private z: number) {
}

func() {
return this.z;
}
}
Issue 1:
Multiple tabs are great, but multiple windows with multiple tabs are better. I typically have 4 terminal windows open to deal with daily tasks. I image this has already been requested, but I could not find it. Thanks.

Issue 2:
Description of the new feature/enhancement

Windows Terminal allows creating new terminal entries with its JSON file configuration. One of the properties of the terminal entry is Icon that allows an arbitrary image being shown alongside the new terminal name.

Currently the Icon property seems to accept only images encoded as PNGs or JPGs. The Icon property should be capable of showing an asset from a binary as well. Think about how icons are storage as resources in .exe and .dll files. Since a binary might have multiple assets (user32.dll for example), asset number could be defined after a comma (just like shell does).

This would be useful, for example, for having different icons for Visual Studio Native Tools 2019 and 2017 consoles. Currently I have to find and download the PNGs for the VS logos instead of grabbing from the .exes.

Proposed technical implementation details (optional)

The final JSON could look like as follows:

{

// Visual Studio 2019 x64 Native Tools

"guid": "{6277D459-07EF-4AE4-91DF-A7ED9EB95EF6}",

"name": "VS2019 x64",

"commandline": "cmd.exe /k "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"",

"hidden": false,

"icon": ""C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\devenv.exe,0""

},

{

// Visual Studio 2017 x64 Native Tools

"guid": "{9A014D1D-85D7-4470-8178-4369B5D31A76}",

"name": "VS2017 x64",

"commandline": "cmd.exe /k "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvars64.bat"",

"hidden": false,

"icon": ""C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\devenv.exe,0""

},
Issue 1:
TypeScript Version:

1.8.6.0

tsconfig.json

...
"noResolve": true
...

Expected behavior:

VS editor should respond to keyboard inputs when setting "noResolve" to true in tsconfig.json. Currently only responds to delete, tab and copy/paste.

Actual behavior:

VS editor doesn't respond to keyboard inputs when setting "noResolve" to true, except for delete, tab and copy/paste.

Related issue?

#6392

Issue 2:
I have an enum in an interface that, when used in my TS code in TypeScript 1.3, was output as a constant. This is no longer the case in 1.4 after saving my file. When i build the project, the enum code is properly output as a constant. Using VS 2013 update 4 with TypeScript 1.4 installed.

Enum declaration file (Colors.d.ts):

declare module server {
enum Colors {
Red = 0,
Green = 0,
Blue = 0
}
}

TS Code:

if(box.color === server.Colors.Red) {
...
}

JS Output after save:

if(box.color === server.Colors.Red) {
...
}

JS Output after build (correct, or what i consider to be correct since there is no implementation of the enum):

if(box.color === 0 /* Red */) {
...
}

The same is observed if the enum is declared using the new "const enum" feature.
Issue 1:
by piotrnar:

What steps will reproduce the problem?
If possible, include a link to a program on play.golang.org.
1. Extract the testcgo folder to %GOPATH%\src\testcgo
2. Extract test.go wherever you want
3. Execute "go build -race test.go"

---------------------
What is the expected output?
It should build an executable.

---------------------
What do you see instead?
It does not build executable, printing such an error:
C:\Temp\go-build267462183/testcgo.a(_all.o): duplicate symbol reference: ___chkstk_ms in
both runtime/race(.text) and testcgo(.text)

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

---------------------
Which version are you using? (run 'go version')
go version go1.1.2 windows/amd64

Attachments:

cgoerr.zip (284786 bytes)

Issue 2:
init.go:

package main

import "pckg_a"
import "pckg_b"

func main() {
pckg_a.New()
pckg_b.New()

src/pckg_a/test.go:

package pckg_a

import "pckg_b"

func New() string {
return pckg_b.New()

src/pckg_b/test.go:

package pckg_b

import "pckg_a"

func New() string {
return pckg_a.New()

In the directory containing init.go:

GOPATH=`pwd` go build

reports

init.go:3:8: import cycle not allowed

The bug is that it does not actually report the import cycle.

If I apply this patch to cmd/go/pkg.go:

--- a/src/cmd/go/pkg.go Sun Aug 11 13:05:51 2013 +0400
+++ b/src/cmd/go/pkg.go Mon Aug 26 09:42:19 2013 -0700
@@ -252,7 +252,7 @@
bp.BinDir = gobin
}
p.load(stk, bp, err)
- if p.Error != nil && len(importPos) > 0 {
+ if p.Error != nil && len(importPos) > 0 && p.Error.Err !=
"import cycle not allowed" {
pos := importPos[0]
pos.Filename = shortPath(pos.Filename)
p.Error.Pos = pos.String()

Then the complete import cycle is reported:

package .
imports pckg_a
imports pckg_b
imports pckg_a: import cycle not allowed

Recording this issue in the hopes of producing a more sensible patch.
Issue 1:
Sorry if this is a duplicated entry…

Each time I open a new window, I receive:

Failed to load /Users/me/.atom/init.coffee
Cannot read property 'eachEditorView' of undefined

Atom Version 0.206.0

No 3rd party packages active, default Atom theme.

Issue 2:
I wan't to have .tpl files associated with a Smarty grammar, but the default html grammar already specifies .tpl in its file type. Is there a way around this. I have seen the File Types package but this specifically says at the bottom of the read me You probably don't want to assign the same file type to multiple languages...

Is there any way other than editing the HTML language package and removing the .tpl association to override that? I can't see that would be great though as if you have two packages trying to override, which would be used?
Issue 1:
Seems to me that timedelta should be able to accept numpy integers as input, but it can't:

>>> import sys, numpy
>>> sys.version
'3.4.3 |Continuum Analytics, Inc.| (default, Mar 6 2015, 12:03:53) \n[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]'
>>> numpy.version.version
'1.9.2'
>>> np.timedelta64(4, 'm')
numpy.timedelta64(4,'m')
>>> np.timedelta64(np.int64(4), 'm')
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-10-432735e2a44e> in <module>()
----> 1 np.timedelta64(np.int64(4), 'm')

ValueError: Could not convert object to NumPy timedelta

This is numpy installed via conda on kubuntu 14.04

Not sure if this is related to #2543

Issue 2:
Example:

>>> np.datetime64(1478476800, "s")
numpy.datetime64('2016-11-07T00:00:00')

>>> np.datetime64(np.int64(1478476800), "s")
ValueError: Could not convert object to NumPy datetime

>>> np.timedelta64(1, "s")
numpy.timedelta64(1,'s')

>>> np.timedelta64(np.int64(1), "s")
ValueError: Could not convert object to NumPy timedelta
Issue 1:
I've an issue with overlay.js on line 64 when I am using 0.13.1 version

DATA FETCHING ERROR: ReferenceError: document is not defined
[0]
[0] - overlay.js:64 [object Object].componentWillMount

But it's okay on version 0.13.0. The only difference is that on line 64 in overlay.js componentDidMount changed to componentWillMount. So i don't know if thats problem on my server setup or else.

Issue 2:
In my code I added

import {DatePicker} from 'material-ui';

Then i've got error

ReferenceError: document is not defined

at [object Object].componentWillMount (~/node_modules/material-ui/lib/overlay.js:64:34)

I also change my import to

const DatePicker = require('material-ui/lib/date-picker/date-picker');

Still no luck
Issue 1:
Cmd + Shift + D should duplicate not only current line, but current selection if available.

Sublime Text allows it !! 😯

Issue 2:
I had a line over 80 characters, I added a newline and realigned the code.

I then changed another parameter and the line (the one I originally added the newline to) is again over 80 characters. I added another newline but this time atom duplicated the line below it!
Issue 1:
Environment

Windows 10.0.18362.175
Terminal version 0.2.1715.0

Steps to reproduce

Just run the application. Happens to all instances.

Expected behavior

Can move the window! :)

Actual behavior

Every window is locked to it's starting position. Can be resized however. Not sure what else I can provide, I have a triple screen setup on a 1080Ti, configuration 1920x1920 - 3440x1400 - 1920x1920 (the square monitors are the unusual Eizo ones). I'm not running any special display tools other than the LG screen split which is set to off. Setting it on (enables window snapping to various configurations to manage the desktop) other windows start snapping when moved, except terminal which still can't be moved.

Issue 2:
Summary of the new feature/enhancement

I'd expect the terminal window to be dragable on the full window header, but it doesn't work on the tabs pane:
Issue 1:
Bug report

Bug summary

imshow (and friends, e.g., pcolormesh) don't tightly fit the image inside the axes. I suspect an off-by-one error somewhere (see the hint section at the bottom).

Code for reproduction

from matplotlib import pyplot as plt

fig = plt.figure(figsize=(3.423,2.92917))
ax = plt.Axes(fig, [0.2,0.2,0.2,0.2])
fig.add_axes(ax)

ax.imshow([[1,2],[3,4]],rasterized=True)
plt.savefig('gap.pdf')

Actual outcome

gap.pdf

Expected outcome

There should be no gap between the x axis, and the image.

Matplotlib version

Operating system: linux

Matplotlib version: 3.2.2 (but also later 3.4.0)

Python version: 3.8

Hints

I don't have time to dig into this right now, but it is corrected (for my particular figure size) by subtracting 1 from the y parameter in the draw_image call in the stop_rasterizing definition of backend_mixed.py. I.e., change

self._renderer.draw_image(
gc,
l * self._figdpi / self.dpi,
(height-b-h) * self._figdpi / self.dpi,
image)

to

self._renderer.draw_image(
gc,
l * self._figdpi / self.dpi,
(height-b-h) * self._figdpi / self.dpi - 1,
image)

Hopefully that might help someone track this down.

Issue 2:
The following example (with Matplotlib 2.0.0b3) causes the colorbar inside the colorbar axes to be offset when outputting to PDF with a low DPI:

import matplotlib.pyplot as plt

fig = plt.figure()
ax = fig.add_subplot(1,1,1)
im = ax.imshow([[1]])
fig.colorbar(im)
fig.savefig('colorbar_test.pdf', dpi=7)

This wasn't an issue with Matplotlib 1.4:

and the bug was apparently introduces in Matplotlib 1.5:
Issue 1:
Website or app

https://github.com/abybaddi009/react-bug-report

Repro steps

Steps to reproduce:

Install all dependencies

Run the project with npm start

Navigate to http://localhost:3000/login

Enter any number into phone number and click on GET OTP.

Enter any number into the text boxes and click on SIGN IN.

Allow access to location.

Check the Dev Tools for the error

How often does this bug happen?

Every time

DevTools package (automated)

react-devtools-extensions

DevTools version (automated)

4.24.3-46a98cff2

Error message (automated)

Cannot add child "986" to parent "985" because parent node was not found in the Store.

Error call stack (automated)

emit@moz-extension://33a37ecb-24c1-4ab5-9400-2d8a276f2472/build/main.js:24430:22
bridge_Bridge/this._wallUnlisten<@moz-extension://33a37ecb-24c1-4ab5-9400-2d8a276f2472/build/main.js:24599:14
listener@moz-extension://33a37ecb-24c1-4ab5-9400-2d8a276f2472/build/main.js:54423:41

Error component stack (automated)

No response

GitHub query string (automated)

https://api.github.com/search/issues?q=Cannot add child to parent because parent node was not found in the Store. in:title is:issue is:open is:public label:"Component: Developer Tools" repo:facebook/react

Issue 2:
Do you want to request a feature or report a bug?

feature

What is the current behavior?

The current behavior requires end users to use createContext in the module scope. To my understanding, it's not currently possible to use a default value derived from the state of a component (a stateful Provider in my case).

This StackOverflow post hits the issue right on IMO.

I feel like this is the classic use case for replacing Redux, and it doesn't work out of the box with static types.

I think it's quite telling that react-redux is doing something similar here in their PR to move to React 16 context. I would expect the default value to be this.state of the Provider component instead of null.

My knowledge of React internals is naive, but I didn't see anyone else bringing up this issue.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:

What is the desired behavior?

Maybe a JSX API for context creation? I imagine it's not quite that simple.

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?

16.3+
Issue 1:
Right now the bats tests install elasticsearch on a clean system. They should also test that the packages can be upgraded without losing data. Both across major and minor versions.

Issue 2:
Elasticsearch version: 5.0.0, 2.4.1

Plugins installed: []

JVM version: 1.8.0_112-b15 64-bit

OS version: Windows 10 v. 1607 (build 14393.447)

Description of the problem including expected versus actual behavior:

When making a _termvectors query to an object in a "type": "nested" field, response is returned with "term_vectors" : { } if vectors are stored ("store": true in mapping). If the object isn't nested or term vectors aren't stored, the object returned is filled properly (examples below). When TV storing is enabled then despite the fact that I'm unable to retrieve them, highlighting seems to be significantly faster, as if term vectors were present.

Steps to reproduce:

PUT /mcve

2. PUT /mcve/ex/_mapping
{
"properties": {
"parent": {
"type": "nested",
"properties": {
"value": {"type": "text", "term_vector": "with_positions_offsets", "store": true}
}
}
}
}

3. PUT /mcve/ex/ample
{
"parent": {
"value": "hello world"
}
}

4. PUT /mcve/ex/ample/_termvectors
{
"fields": ["parent.value"]
}

Response:

{
"_index" : "mcve",
"_type" : "ex",
"_id" : "ample",
"_version" : 1,
"found" : true,
"took" : 1,
"term_vectors" : { }
}

However, if I disable storing term vectors by changing this line in mapping:

"value": {"type": "text", "term_vector": "with_positions_offsets", "store": true}

to this:

"value": {"type": "text"}

the result will be:

{
"_index" : "mcve",
"_type" : "ex",
"_id" : "ample",
"_version" : 1,
"found" : true,
"took" : 60,
"term_vectors" : {
"parent.value" : {
"field_statistics" : {
"sum_doc_freq" : 2,
"doc_count" : 1,
"sum_ttf" : 2
},
"terms" : {
/* ...snip... */
}
}
}
}

But highlighting queries will be slower (tested on a ~80 MB index with ~600 documents), as if term vectors were in fact built previously.

Provide logs (if relevant):

--

Related SO question
Issue 1:
This looks like #147, but I don't have permission to re-open that.

Consider the following situation:

In [3]: dt
Out[3]:
foo bar baz
0 1 2 3
1 4 5 6
2 1 2 4

In [4]: pandas.pivot_table(dt, values="baz", rows=["foo"], cols=["bar"])
Out[4]:
bar 2 5
foo
1 3.5 NaN
4 NaN 6

Notice the column for foo == 1 && bar == 2 shows a value of 3.5. Either this should be in the resulting table twice, or the command should fail with an error.

Issue 2:
The dataset named 'changes' was obtained from a merge by RID:

changes.head()

DX_m12
RID
DX_m12

0
1
3
1

1
0
4
0

2
0
6
0

3
0
8
0

4
1
10
1

I've used the two following commands with the intention of identifying lines in which DX_bl and DX_m12 are different:

print(changes[~changes.duplicated(subset = ['DX_bl','DX_m12'], keep=False)])

DX_bl
RID
DX_m12

64
64
1
167

print(changes.drop_duplicates(subset = ['DX_bl','DX_m12']))

DX_bl
RID
DX_m12

0
0
1
3

1
1
0
4

10
10
0
30

64
64
1
167

If keep=False, it should return lines 10 (RID 30) and 64 (RID 64). But, as we can see, it loses the information of line 10 (RID 30).

On the other hand, if 'keep' is let in default option (keep = 'first') it wrongly returns lines 0 (RID 3) and 1 (RID 4).

Is there a bug in pandas' duplicated/drop_duplicates??
Issue 1:
ImageLoader and XHRLoader both use a Cache to store loaded assets for reuse, although not very efficiently, at least for some use case.

For instance, TextureLoader.onload() creates a new ImageLoader every time the method is called, which means that the image cache is always empty because the image loader instance is only used once. ImageUtils.loadTexture() behaves similarly.

My preferred way to solve this would be to put the cache in the LoadingManager (one cache per LoadingManager instance). Each ImageLoader and XHRLoader would share the cache of their parent manager.

Users would be responsible to manually purge the manager cache as necessary, to free resources or request updated assets. That could be a problem for an application that cycles through a lot of loaded textures/images, especially if the DefaultLoadingManager is used - users might not be aware of cache implication. Maybe the common cache could be opted-in (loadingManager.useCache = true), which would be equivalent to the status quo. A simple loadingManager.cache.maxSize could be enough, too.

Another approach would be to create an ImageLoader instance as a property of TextureLoader in its constructor. The image cache would be reused as long as the same TextureLoader is kept around.

I can work on a patch if we agree on the approach.

Related to #3601

Issue 2:
Is your feature request related to a problem? Please describe.

The application we are building requires camera motion via trackball control, with the direction of movement able to be constrained to the x or y axis.

Describe the solution you'd like

Currently the TrackballControls example does not provide for this constraint of motion and it would be great if the current example were extended to include this.

Describe alternatives you've considered

We have implemented this by duplicating/modifying the example in our own repository but consider it may be useful to others as well as a more concise solution if it were included in the example.

Additional context

We've also included these options in the on-screen controls. Happy to work through this to a solution with feedback.
Issue 1:
Original ticket http://projects.scipy.org/scipy/ticket/750 on 2008-10-09 by @ilanschnell, assigned to unknown.

The Bessel function special.jn(3,4) in inaccurate.

Across different operating systems (OSX, Windows, Linux) and

different version of scipy recent being 0.7.0.dev4673,

the following little program

from numpy import linspace
import scipy.special

N = 5
x = linspace(3.999, 4.001, N)
y = scipy.special.jn(3, x)

for i in xrange(N):
print "%10.6f %10.6f" % (x[i], y[i])

gives this output

3.999000 0.430130
3.999500 0.430151
4.000000 0.397150
4.000500 0.430192
4.001000 0.430213

The value at x=4.0 is incorrect, as the Bessel function does not have a kink in this region.

Issue 2:
Original ticket http://projects.scipy.org/scipy/ticket/623 on 2008-03-17 by trac user wa03, assigned to @dmcooke.

The following code produces a plot with a discontinuous Bessel function, Jv:

from scipy import special
from numpy import arange
from pylab import *

x = arange(0, 10, 0.1)
y = special.jv(3,x)
plot(x,y)
show()

At the point x = 4.0 there is a discontinuity. If the dx is lessened (dx = x(2)-x(1)), the function is smooth except at x = 4.0. The plotting is not necessary for the bug to appear, but it helps with viewing the error.

I have tried using scipy 0.6.0 on both python 2.4.x and python 2.5.x--specifically, 2.4.4 and 2.5.2. The version of numpy used is 1.0.4.

Cheers,

Josh

P.S. I think this is a very severe bug for reliability of computations but I am unaware of the etiquette for new tickets and what qualifies as a major severity or normal or blocking, etc. I apologize if I inappropriately marked this higher than should be.
Issue 1:
That file contains a number of fake/mock objects used for testing, and it should really be moved to a separate package. Currently, all that code ends up in the production binaries.

As an aside, if doing this work, please change the "FindEmptyDirectoryUsageOnTmpfs" method to use the "MkTmpDir" call in "pkg/util/testing" package.

Issue 2:
This is a trivial cleanup, but we should be following this pattern all over.