WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
We have in with ∈, but not an non-ascii alias for ∉. I suggest !in or notin.

The problem is I don't want to use ∉ when I wouldn't use ∈. In other words, if my code is using in, it then kinda forces you to change these to ∈ so they match with ∉.

Issue 2:
I encountered a possible MKL threading bug in Julia 1.7.0 on macOS but don't know if it is the same as the OpenBLAS threading issue (e.g. #43301 ), so please close if this is a duplicate.

The following code is a simplified version of code that generates impulse response functions from a state-space model. It works with 1 BLAS thread but the matrix based iteration x2 explodes with any higher thread number, even though the relevant row of the matrix only has one non-zero entry of 0.9 and should give the same path as x1, which is essentially an AR1. On Linux, the code runs for any number of threads and x1 and x2 follow the same impulse response.

using Plots, MKL, LinearAlgebra
BLAS.set_num_threads(2)

var_index = 150 # index of variable of interest
LOMstate = randn(300, 300) # law of motion
LOMstate[var_index, :] .= 0.0 # set the law of motion for the variable of interest to an AR with coefficient 0.9
LOMstate[var_index, var_index] = 0.9

x0 = zeros(size(LOMstate, 1), 1)
x0[var_index] = 1.0 # shock to the variable of interest

irf_horizon = 40
x1 = x0 * ones(1, irf_horizon + 1)
x2 = x0 * ones(1, irf_horizon + 1)

for t = 1:irf_horizon
x1[var_index, t+1] = LOMstate[var_index, var_index] * x1[var_index, t] # just iterate over AR1
x2[:, t+1] = LOMstate * x2[:, t] # iterate full system but variable of interest should be unaffected by rest of system
end

plt1 = plot(x1[var_index, :], label = "IRF AR1 based")
plt1 = plot!(x2[var_index, :], label = "IRF matrix based")

With 1 thread

With 2 or more threads (might look different due to randomLOMstate matrix)

My system:

Julia Version 1.7.0
Commit 3bf9d17731 (2021-11-30 12:12 UTC)
Platform Info:
OS: macOS (x86_64-apple-darwin19.5.0)
CPU: Intel(R) Xeon(R) W-2191B CPU @ 2.30GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-12.0.1 (ORCJIT, skylake-avx512)
Environment:
JULIA_EDITOR = code
JULIA_NUM_THREADS = 1

I'm happy to provide more information.
Issue 1:
There is an error in the docstring for the query function in

pandas/core/frame.py.

The PR here fixes this: #21731

Code Sample, a copy-pastable example if possible

# Your code here

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 2:
Hey everyone,

I was working on a project that involves working with data acquired via the world bank pandas api (i.e. pandas.io.wb). This library has a function called pandas.io.wb.search(str) which is very useful. In data transformation terms, it's basically does this- given a string 's', filter the dataframe by retaining only the tuples where a string match occurs with the given string 's'.

This operation occurs in my workflow on a regular basis, and I was wondering if anyone else feels the need to have this function natively in pandas. Would be a huge time saver in my opinion!

Was thinking of a function that looks like this:

DataFrame.search(search_str, is_ignore_case=True, is_match_full_word=False, **kwargs)

Would love to hear from the community! :)
Issue 1:
Here http://getbootstrap.com/css/#grid-offsetting we see col-lg-offset-* but there's no col-lg-offset-. There's col-offset-. Need to fix.

Issue 2:
So as per the documentation, I tried using two different offsets for desktop and phone. But I could not find the col-lg-offset on the CDN hosted css file.

http://netdna.bootstrapcdn.com/bootstrap/3.0.0-rc1/css/bootstrap.min.css

Am not sure if this is an issue or am I going wrong somewhere?
Issue 1:
by roberto.catini:

The comment for the P521 function partially reference another function:

At line 373 of the source code:
http://golang.org/src/pkg/crypto/elliptic/elliptic.go?s=11710:11727#L364

the comment should read:
// P521 returns a Curve which implements P-521 (see FIPS 186-3, section D.2.5)

Issue 2:
by ilarkin@crystalnix.com:

What does 'go version' print?

go version go1.2 linux/amd64

What steps reproduce the problem?

Code: http://play.golang.org/p/TasQabnlRu

1. Create a new *net.TCPConn (using net.Accept)
2. Call File()
3. Close new file
4. Set Read Deadline to 5 seconds
5. Start reading

What happened?

The reading is never finishes. As the result i see the following output:

> New Connection: 127.0.0.1:33079
> Fd: 7
>

What should have happened instead?

> New Connection: 127.0.0.1:33079
> Fd: 7
> Error: read tcp 127.0.0.1:33079: i/o timeout

Please provide any additional information below.

I'm trying to understand why this code sample doesn't work. As i understand, File()
creates a copy of the underlying fd. And the new fd has no effect to the original.

One more thing... If i use only the SetReadDeadline function - timeout doesn't work. But
if i use it in couple with the syscall.SetsockoptTimeval function - it works.
Issue 1:
Hi,

VS: 2015 CTP 5

TS: 1.4

In the snapshot below, we are at the point of assigning an inline function to property foo:

The intention is to write something like

x.foo = bar => bar.toString();

Clearly, the provided completion list is not very helpful here.

Furthermore, when the letter b is typed intellisense shows an already _selected_ item in the list of completions. By this I mean the item blur is highlighted with a background colour. This provides a misleading impression that an exact match has been identified by the intellisense engine, providing a (false) incentive for the user to hit tab in order to complete the term.

I believe the more correct behaviour here is to

not show intellisense at all unless a type compatible with x.foo exists, or

only show an outline, similar to the one below:

Issue 2:
VS now commits completion lists on more than tab and enter, including space and a variety of punctuation characters (semicolon, parens, brackets, etc). There are places where we offer completion lists that we shouldn't, or poor completion lists, which were previously visual distractions but now are significant annoyances in the actual typing experience, requiring constantly dismissing completion lists via Esc to type what you intended.

Fat arrow functions

Typing a space after the fat arrow argument commits a suggestion that is never correct, and then happens frequently in the body as well.

Type argument declarations

Tracked here #1428

Destrucuring Assignments

Not supported in the editor yet but will need to work like var declaration completion lists.

There are likely other cases as well but these ones stand out immediately. This also ties into #315 which is asking for a toggle on this behavior. Depending on the fix we use for this behavior we may also have some significant test costs associated with these fixes.
Issue 1:
Migrated issue, originally created by Anonymous

Versions of Firebird prior to 2.0 were subject to the following bug http://tracker.firebirdsql.org/browse/CORE-356

The gist of CORE-356 is that values in the RDB$DEFAULT_SOURCE column of the RDB$RELATION_FIELDS table can have leading whitespace.

Trying to use meta.reflect on one of these tables results in errors like this:

File ".../site-packages/sqlalchemy/databases/firebird.py", line 501, in reflecttable
assert row['fdefault']('fdefault').upper().startswith('DEFAULT '), row
AssertionError: (u'ARCHIVED ', None, u'TEXT', 0, 1, None, 0, " DEFAULT 'N'")

A simple fix for this is to add a TRIM to the tblqry around the COALESCE or since the fdefault value is being modified with .upper anyway line 501 might be a better spot to "fix" this

assert row['fdefault']('fdefault').upper().lstrip().startswith('DEFAULT '), row

Issue 2:
Migrated issue, originally created by Anonymous

During schema reflection SQLAlchemy fails with AssertionError

Traceback (most recent call last):
File "/tmp/sqla2.py", line 190, in <module>
concentrate=False # Don't try to join the relation lines together
File "/tmp/sqla2.py", line 132, in create_schema_graph
metadata.reflect()
File "/home/filip/tefnet/teferp/workspace/tefobjects/lib/python2.5/site-packages/SQLAlchemy-0.5.5-py2.5.egg/sqlalchemy/schema.py", line 1733, in reflect
Table(name, self, **reflect_opts)
File "/home/filip/tefnet/teferp/workspace/tefobjects/lib/python2.5/site-packages/SQLAlchemy-0.5.5-py2.5.egg/sqlalchemy/schema.py", line 108, in __call__
return type.__call__(self, name, metadata, *args, **kwargs)
File "/home/filip/tefnet/teferp/workspace/tefobjects/lib/python2.5/site-packages/SQLAlchemy-0.5.5-py2.5.egg/sqlalchemy/schema.py", line 236, in __init__
_bind_or_error(metadata).reflecttable(self, include_columns=include_columns)
File "/home/filip/tefnet/teferp/workspace/tefobjects/lib/python2.5/site-packages/SQLAlchemy-0.5.5-py2.5.egg/sqlalchemy/engine/base.py", line 1265, in reflecttable
self.dialect.reflecttable(conn, table, include_columns)
File "/mnt/tmp/tefnet/teferp/workspace/tefobjects/lib/python2.5/site-packages/SQLAlchemy-0.5.5-py2.5.egg/sqlalchemy/databases/firebird.py", line 502, in reflecttable
assert row['fdefault']('fdefault').upper().startswith('DEFAULT '), row
AssertionError: (u'DATAREJ ', 1, u'DATE ', None, 4, None, 0, ' DEFAULT CURRENT_DATE')

The problem is because 'DEFAULT' sometimes has whitespaces at the begining

Attachments: tef_firebird_default_reflection.patch
Issue 1:
I recently ran into an issue whereby curve_fit was failing to fit a function, even though the guesses were reasonable. The warning reported by Scipy was "/usr/local/depot/Python-3.5.1/lib/python3.5/site-packages/scipy/optimize/minpack.py:690: OptimizeWarning: Covariance of the parameters could not be estimated".

After hours of searching, I discovered that the problem was that I was using np.float32 arrays for the x and y data. Simply using x.astype(np.float64) resolved the issue. Though the warning provided no help or hints as to the source of the problem.

This is similar to what was reported in this (rather old) email thread: http://scipy-user.scipy.narkive.com/wSafjCiz/curve-fit-with-float32-values, which proved to be very difficult to find. It would be useful to warn in the curve_fit documentation (and other minimisation functions) about using float32 inputs, particularly as the problem only manifests itself with certain data sets.

Issue 2:
Hello, I have some data where inadvertently the x and y data were of different types, eventually after much troubleshooting I discovered that one was np.float32 and the other was np.float64. When trying to use least-squares minimization to fit to the data, either scipy.optimize.curve_fit or scipy.optimize.leastsq failed in a weird quasi-silent way. The failure mode is that the parameters are barely changed from the initial guess and the optimization returns even though the result is clearly not good. Below is a minimum example demonstrating the bug (from a jupyter notebook):

Reproducing code example:

%pylab inline
import numpy as np
from scipy.optimize import curve_fit

def gauss(x, A, mu, sigma):
return A/(sigma*np.sqrt(2*np.pi))*np.exp(-(np.power(x-mu,2)/(2*np.power(sigma,2))))

xdata = np.linspace(-1, 1, 20)
p_act = [1.4, 0.2, 0.2]
ydata = gauss(xdata, *p_act) + np.random.normal(loc=0, scale=0.05, size=len(xdata))
p0 = [1, 0, 0.1]

xdata = xdata.astype(dtype=np.float32)
ydata = ydata.astype(dtype=np.float64)
fit1, pcov1 = curve_fit(gauss, xdata, ydata, p0=p0)

xdata = xdata.astype(dtype=np.float32)
ydata = ydata.astype(dtype=np.float32)
fit2, pcov2 = curve_fit(gauss, xdata, ydata, p0=p0)

print(fit1)
print(fit2)

plot(xdata, ydata, 'bo')
x2 = np.linspace(xdata[0], xdata[-1], 100)
plot(x2, gauss(x2, *fit1), 'r--')
plot(x2, gauss(x2, *fit2), 'm--')

The output of the print statements are:

[1. 0.05021768 0.10987875]
[1.37911003 0.19699727 0.19586094]

Error message:

The only signature is that there is a covariance warning when fitting with the different data types:

/usr/local/lib/python3.7/site-packages/scipy/optimize/minpack.py:794: OptimizeWarning: Covariance of the parameters could not be estimated
category=OptimizeWarning)

Scipy/Numpy/Python version information:

1.1.0 1.15.1 sys.version_info(major=3, minor=7, micro=1, releaselevel='final', serial=0)
Issue 1:
I've been using twitter-fetcher to circumvent Twitter's latest API without much issues until recently when I started getting the following errors, after posting a duplicate tweet:

[Vue warn]: Duplicate value found in v-for="tweet in tweets": "<p class=\"tweet\">tweet parsed from json file!</p>". Use track-by="$index" if you are expecting duplicate values.

vue.js:1174 Uncaught TypeError: Cannot read property 'parentNode' of null.

Why would v-for throw an error when there's a duplicate value? I've reproduced the warning here

Issue 2:
What problem does this feature solve?

make template html more DRY by reducing simple component (self-evident?) definitions.

Many times I find that I declare event methods using the same name as the underlying event, such as

<a @click=click @mouseover=mouseover :title=title>hello</a>

(where click and mouseover are of course defined as methods for the component, and title is declared within the data() object).

A cleaner way to do this (imho, and in keeping with javascript's shorthand object notation: e.g. const x = { a, b, c }), a cleaner way may look like this:

<a @click @mouseover :title>hello</a>

This concept could also be extended to binding of variables & props (e.g. :title=title becomes :title).

What does the proposed API look like?

the API would not (should not need to) be changed as this would affect only the initial parsing of a template's html.

I suspect the parts of the code to be modified would be here and here but those were too involved for me to attempt.
Issue 1:
Sorry, it was glitch on my side after ObjLoader update. After my code fixing everything works fine.

...

Three.js version

Dev

r74

r75

...

Browser

[] All of them

Chrome

Firefox

Internet Explorer

OS

All of them

Windows

Linux

Android

IOS

Issue 2:
I was wondering if the extrude part of TextGeometry could be somehow separated into it's on ExtrudeGeometry class.

Right now we have have LatheGeometry which gets a set of points and creates a revoluted mesh with it, and would be great to have something like that for extrusions.

@zz85, @alteredq, thoughts?
Issue 1:
Why this margin is needed?

bootstrap.css (5648 line)

body.modal-open,
.modal-open .navbar-fixed-top,
.modal-open .navbar-fixed-bottom {
margin-right: 15px;
}

Issue 2:
When launching the modal component (http://getbootstrap.com/javascript/#modals) the entire content will slightly move to the left on mac OS (haven't tried it on windows yet). With the active modal the scrollbar seem to disappear, while the content width still changes.

You can observer the problem on the bootstrap page
Issue 1:
Cast renders an anonymous alias contrary to the documentation

The example used in the documantation

from sqlalchemy import cast, Numeric, select

stmt = select([
cast(product_table.c.unit_price, Numeric(10, 4))
])

renders as

SELECT CAST(product_table.unit_price AS NUMERIC(10, 4)) AS anon_1 FROM product_table

instead of

SELECT CAST(unit_price AS NUMERIC(10, 4)) FROM product

I've tried sqlalchemy version 1.2.7 and 1.2.16 and both return the same result

Issue 2:
We're having some issues with back_populates of relationships referring to other relationships with viewonly=True. We get duplicates in the relationship list that the back_populates refers to. Test case:

import sqlalchemy
from sqlalchemy import Column
from sqlalchemy import ForeignKey
from sqlalchemy import Integer
from sqlalchemy import String
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import attributes
from sqlalchemy.orm import relationship

Base = declarative_base()

class User(Base):
__tablename__ = 'user'
id = Column(Integer, primary_key=True)
name = Column(String)
boston_addresses = relationship(
"Address",
# primaryjoin="and_(User.id==Address.user_id, Address.city=='Boston')", # Not necessary but shows the use case
viewonly=True) # Setting viewonly = False prevents the issue

class Address(Base):
__tablename__ = 'address'
id = Column(Integer, primary_key=True)
user_id = Column(Integer, ForeignKey('user.id'))
user = relationship('User', back_populates='boston_addresses')

city = Column(String)

def main():
session = setup_database_and_session()

user = User()

session.add(user)
session.commit()

# user.boston_addresses # Reading the value here prevents the issue

address = Address(user=user, city='Boston')

actual = user.boston_addresses
expected = [address]
assert actual == expected, f"{actual} != {expected}"

def setup_database_and_session():
engine = sqlalchemy.create_engine("sqlite://")
session_maker = sqlalchemy.orm.sessionmaker(bind=engine)
session = session_maker()
Base.metadata.create_all(engine)
return session

if __name__ == "__main__":
main()

Result:

AssertionError: [<__main__.Address object at 0x10d95aeb8>, <__main__.Address object at 0x10d95aeb8>] != [<__main__.Address object at 0x10d95aeb8>]
Issue 1:
This bug-tracker is monitored by Windows Console development team and other technical types. We like detail!

If you have a feature request, please post to the UserVoice.

Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue.

Please use this form and describe your issue, concisely but precisely, with as much detail as possible

Your Windows build number: 10.0.18362.30

What you're doing and what's happening: Resize the terminal window to minimum, then resize the window to normal, the text will disappear.

The normal window size

Resize it to minimum

Then resize to normal, the text disappear

Scroll up the window

What's wrong / what should be happening instead: I don't know. Is this a bug?

Issue 2:
When we paste anything in the Windows Terminal ubuntu instance using any command like vim abc.txt, it automatically inserts new line after each line, and eats up some characters from the beginning of the pasted text.

Here is the screenshot: https://i.imgur.com/pJ0Fsbw.png

Here the text copied to my clipboard copied was:

Line 1
Line 2
Line 3
Line 4
Line 5
Line 6
Line 7

I ran command: vim abc.txt

And after paste, it became

ne 1

Line 2

Line 3

Line 4

Line 5

Line 6

Line 7
Issue 1:
Use case: for classifiers with predict_proba I like to see precision/recall data across different probability values. This would be really easy to return from current cross_validation.py master if not for

if not isinstance(score, numbers.Number):

raise ValueError

in _cross_val_score

with this changed to a warning, cross_val_score can do the check before converting scores to np.array, and return plain list for incompatible types.

Issue 2:
I'd like to use cross_validation.cross_val_score with metrics.precision_recall_fscore_support so that I can get all relevant cross-validation metrics without having to run my cross-validation once for accuracy, once for precision, once for recall, and once for f1. But when I try this I get a ValueError:

from sklearn.datasets import fetch_20newsgroups

from sklearn.svm import LinearSVC
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn import metrics
from sklearn import cross_validation
import numpy as np

data_train = fetch_20newsgroups(subset='train', #categories=categories,
shuffle=True, random_state=42)
clf = LinearSVC(loss='l1', penalty='l2')
vectorizer = TfidfVectorizer(
sublinear_tf=False,
max_df=0.5,
min_df=2,
ngram_range = (1,1),
use_idf=False,
stop_words='english')

X_train = vectorizer.fit_transform(data_train.data)

# Cross-validate:
scores = cross_validation.cross_val_score(
clf, X_train, data_train.target, cv=5,
scoring=metrics.precision_recall_fscore_support)
Issue 1:
Referring the documentation provided by playwright, seems like the hooks (example: afterAll / beforeAll) can be used only inside a spec/ test file as below:

// example.spec.ts

import { test, expect } from '@playwright/test';

test.beforeAll(async () => {

console.log('Before tests');

});

test.afterAll(async () => {

console.log('After tests');

});

test('my test', async ({ page }) => {

// ...

});

My question: is there any support where there can be only one AfterAll() or beforeAll() hook in one single file which will be called for every test files ? the piece of code that i want to have inside the afterAll and beforeAll is common for all the test/ specs files and i dont want to have the same duplicated in all the spec files/ test file.

Any suggestion or thoughts on this?

TIA

Allen

Issue 2:
System info

Playwright Version: [v1.32.3]

Operating System: [All, Windows] I only has Windows

Browser: [Chromium, Firefox]

Page Visibility API : https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API

Steps

Start a test and wait for the browser opens (let the test wait log, we need do following steps manually )

open inspect/'dev tool' in a tab

In console panel run the following script

document.addEventListener("visibilitychange", () => {
console.log('visibilitychange work', document.visibilityState === 'visible')
});

open another new tab --just open it manually

switch to the previous tab and watch the console log

Expected

We can see the console log:

"visibilitychange work false"

"visibilitychange work true"

Actual

There is not such log. looks 'visibilitychange' event never triggered

Note: open the browser(Chromium) manually , Page Visibility API works OK.

But when running in test env, Page Visibility API does not work OK.