WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
I've reproduced this on the DEB package (might likely applies to the RPM package also).

I ran across a scenario wherein user was using the DEB package. Then they opened the /etc/elasticsearch/elasticsearch.yml file and changed path.plugins to point to a different folder (anything really)

After this, they installed Marvel (or any plugin for that matter). Unfortunately, the plugin was installed into /usr/share/elasticsearch/plugins instead of picking up the path.plugins override in the elasticsearch.yml file. Thus when starting ES, the plugin does not load correctly.

This can be potentially fixed by changing the plugin script line to:

exec $JAVA $JAVA_OPTS -Xmx64m -Xms16m -Delasticsearch -Des.path.home="$ES_HOME" -Des.config="/etc/elasticsearch/elasticsearch.yml" $properties -cp "$ES_HOME/lib/*" org.elasticsearch.plugins.PluginManager $args

I'm not 100% sure if this has other implications or is the right approach here.

Issue 2:
I've been trying to make sense of Elasticssearch histogram aggregations the last couple of days. And I've found that they don't work as expected, or even advertised.

Lets say i want to aggregate like so:

"aggregations": {
"sea_water_temperature": {
"histogram": {
"field": "sea_water_temperature",
"interval": 3
}
}
}

Response buckets looks fine at first glance, but when trying to query for documents within the bounds of a bucket I don't get the same document count as the bucket suggested. E.g.

"filter": {
"range": {
"sea_water_temperature": {
"lt": 0,
"gte": -3
}
}
}

This could give x results while the bucket "-3" had a doc_count of y. This seems to only be an issue for negative bucket keys.

In the docs for histogram it states that the bucket key for a given value is:

rem = value % interval
if (rem < 0) {
rem += interval
}
bucket_key = value - rem

However I tried a term aggregation with that as a value script:

"aggregations": {
"sea_water_temperature": {
"terms": {
"field": "sea_water_temperature",
"script": "rem = _value % interval; rem = rem < 0 ? rem + interval : rem; _value - rem",
"params": {
"interval": 3
}
}
}
}

That gives me the same kind of bucketing as histogram does but now my filter queries actually match the doc_counts of the buckets(!). Why isn't histogram working as described? or am I missing something?
Issue 1:
After unstacking data that were grouped using groupby the data appears in an unexpected order. The groupby data are in the ascending order, but after unstacking this is no longer true.

The following code demonstrates:

import numpy as np

import pandas as pd

print pd.version

random data

data = pd.DataFrame()

data['a'] = np.random.random(1000)_10. - 2

data['b'] = np.random.random(1000)_10. - 2

data['c'] = np.random.random(1000)*10. - 2

bins in a and b

ba = np.linspace(-5., 5, 8)

bb = np.linspace(-5., 5, 9)

groupby bins

groups = data.groupby([pd.cut(data['a'], ba), pd.cut(data['b'], bb)])

mask, needs at least 10 to get robust std estimate

msk = groups.count()['c'] > 10

std(c) per bin, these are ordered as expected

stdc = groups['c'].agg([np.std, len])[msk]

print stdc

now unstack

result = stdc['std'].unstack()

and the results are not ordered as expected

print result

and the result is:

b (-1.25, 0] (-2.5, -1.25] (0, 1.25] (1.25, 2.5]

a

(-0.714, 0.714] 2.878018 NaN 3.019754 2.908735

(-2.143, -0.714] 2.490683 NaN 2.809243 2.754959

(0.714, 2.143] 2.656060 2.940749 2.421975 2.677205

(2.143, 3.571] 3.128538 2.879978 3.038488 3.191041

(3.571, 5] 2.534340 2.943076 3.215626 2.687091

b (2.5, 3.75] (3.75, 5]

a

(-0.714, 0.714] 3.328777 3.305938

(-2.143, -0.714] 2.716552 3.090601

(0.714, 2.143] 3.093307 1.669262

(2.143, 3.571] 2.885055 3.295693

(3.571, 5] 3.333355 2.972684

[5 rows x 6 columns]

This seems to happen if the bins cross zero.

Issue 2:
I recall discussing this before but came up on the mailing list again. Sorting of cut output is always wrong / ugly. I propose creating a str-like that compares with others of the same type as if they were tuples (possibly with nice logic around ranges) - would be facilitated by intro of CategoricalBlock.

Similar to replacing qcut output with this:

def convert_bins_to_tuple(iterable):
return [(left, right) for elem in iterable for left, right in elem.strip('()[]').split(',')]
Issue 1:
Hey!

I think I found a bug, although I'm not sure if it might be intended behavior. If it is actually a bug, I'll try find the fix and flesh out a proper minimum reproducible example.

Here's an annotated plot that I generated during my day-to-day usage:

This is a fairly standard g = sns.catplot(..., kind="boxen", ...), but have a look at the colouring for the fourth boxen in red on the two axes. On the left, the "very light red" has a width of about half the main box, but on the right the "very light red" has a width of only a quarter the main box, and the "light red" has a width of half the main box.

I feel like the red boxens should look something more like:

So that if two boxes in a boxen plot have the same color and represent the same quantile range, they also have the same width.

Once again, it's debatable if this is a bug or not, but I thought I'd raise it and offer to help out if it was actually overlooked.

Issue 2:
Hi,

I've been an avid user of boxenplot, and it's a great function!

I noticed that there were some improvements to boxenplot in #2086 that were incorporated into release v0.11. Now, with the default k_depth='tukey' the boxes are "sequentially colored from the input color all the way to white". However, while this new styling also looks to be applied for 'trustworthy', the old styling is still used for 'proportion' and 'full'.

Is this intended behavior? Would it be possible to either clarify in the documentation that the styling may differ depending on the k_depth, to add the option to have this sequential hue gradient for all options for k_depth, or the option to turn it on/off since it's somewhat tricky to work with the resulting cmap of the PatchCollections?

With seaborn=='0.11.1' and matplotlib=='3.3.4' this is what I currently see:

tips = sns.load_dataset("tips")
k_depth_methods = ["proportion", "tukey", "trustworthy", "full"]
fig, axes = plt.subplots(2,2, figsize=(12,12), sharex=True, sharey=True)
for ax, k in zip(axes.flatten(), k_depth_methods):
sns.boxenplot(
x="day", y="total_bill", hue="time", data=tips, linewidth=2.5, k_depth=k, ax=ax
)
ax.set_title(k, y=1.05)
ax.legend(loc="upper left", bbox_to_anchor=(0,1.05))
sns.despine()
Issue 1:
I ran the yo aspnet and selected web api after following the tutorial. I tried to bring up dnx web command by pressing command shift p but it didn't find my command even through I could do dnx restore. This command worked from terminal.. Ideas?

Issue 2:
From @Injac on November 19, 2015 14:34

Today I installed VSCode and tried this tutorial:

ASP.NET 5 Applications with VS Code

I opened Startup.cs and tried the System.Console.WriteLine sample. Intellisense did not show up. Only namespaces are shown after hitting CTRL+SPACE. It does not even recognize the built-in types like string, int, etc. .

I am running VSCode on Debian 8.2 x64.

Do I have to install additional components to make this work?

Copied from original issue: microsoft/vscode#240
Issue 1:
Summary of the new feature/enhancement

Several times a user may need a administrator cmd window for doing some task.

But the current terminal design doesn't allow it. This terminal is beneficial for using multiple command line tools easily.

If the new administrator tab is opened in the current window then it will help user to keep all the command tools in the same window.

Proposed technical implementation details (optional)

The proposed idea would allow user to access super user cmd/powershell/wsl shell easily.

It can implemented in following ways,

A right click on current tab allowing user to open admin window in new tab.

A right click on the option in the dropdown list allow user to launch the prompt in administrator mode.

A icon alongside the name in the dropdown list to launch list item in administrator mode.

If the new administrator tab is opened in the current window then it will help user to keep all the command tools in the same window.

Issue 2:
When using normal cmd.exe console, using https://github.com/bmatzelle/gow and then using nano readme.txt, all works normally.

In the new terminal, arrow keys displays [ Unknown Command ] (Backspace also not working sometimes and typing leave the cursor 1 letter behind, i.e.: typing teste gives me test|e (notice the cursor before the last e, not after, where it should be)
Issue 1:
Summary of the new feature/enhancement

A Button to import/export zones so you can share it with friends or on a new computer!

It would be way easier to export it put the file on a USB and import it on a different pc then. Going into settings and trying to recreate it.

Issue 2:
Summary of the new feature/enhancement

I'd like to be able to share a saved FancyZone layout using a file, maybe adding a share as a file button on the app.

The file should be a JSON, or XML (but please, a JSON) including the resolution of the screen and all the details of the zone (dimension and position).
Issue 1:
Code Sample, a copy-pastable example if possible

import pandas as pd

df = pd.DataFrame(["a", "b", "c"], columns=["test"])

print(df["test"].value_counts())

Problem description

Using value_counts in a testsuite can be a problem, when the resulting values have the same count as they permutade on each call, e.g.:

$ python pandas_value_counts.py
a 1
b 1
c 1
Name: test, dtype: int64

$ python pandas_value_counts.py
c 1
a 1
b 1
Name: test, dtype: int64

Expected Output

Some stable/deterministic output or optionally additionally sorting of the keys, if they have the same counts

Output of pd.show_versions()

INSTALLED VERSIONS
------------------
commit: None
python: 3.6.0.final.0
python-bits: 32
OS: Windows
OS-release: 10
machine: AMD64
processor: Intel64 Family 6 Model 94 Stepping 3, GenuineIntel
byteorder: little
LC_ALL: None
LANG: de_DE.UTF-8
LOCALE: None.None

pandas: 0.19.2

nose: 1.3.7

pip: 9.0.1

setuptools: 27.2.0

Cython: 0.25.2

numpy: 1.11.3

scipy: 0.18.1

statsmodels: 0.6.1

xarray: None

IPython: 5.1.0

sphinx: 1.5.1

patsy: 0.4.1

dateutil: 2.6.0

pytz: 2016.10

blosc: None

bottleneck: 1.2.0

tables: 3.2.2

numexpr: 2.6.1

matplotlib: 2.0.0

openpyxl: 2.4.1

xlrd: 1.0.0

xlwt: 1.2.0

xlsxwriter: 0.9.6

lxml: 3.7.2

bs4: 4.5.3

html5lib: None

httplib2: None

apiclient: None

sqlalchemy: 1.1.5

pymysql: None

psycopg2: None

jinja2: 2.9.4

boto: 2.45.0

pandas_datareader: None

Issue 2:
Hello,

I'm trying to make a new DataFrame that contains the value counts of a column of an existing DataFrame (spreadsheet.xlsx), but I want the rows in the new DataFrame to be in the same order as the old one.

When I do:

import pandas as pd
df = pd.read_excel('./spreadsheet.xlsx')
print(df[0].value_counts(sort=False))

I get the DataFrame:

h4 8
ct1 6
f2 2
s1 2
EST2 2
f5 2
E4 8
h2 8
hd2 7
f3 2
ART1 2
s2 2
f1 2
h3 8
EST1 2
s3 2
E6 8
ART2 2
DGT2 2
ct2 6
s4 2
ct3 6
f4 2
DGT1 2
s5 2

When what I really want is:

h2 8
h3 8
h4 8
hd2 7
E4 8
E6 8
ct1 6
.
.
.

...because that's the order in which the values occur in the original DataFrame.

I can't tell how it's sorting them, but it is somehow. Is this the expected behavior?

Thanks

Installed versions:
commit: None
python: 3.5.1.final.0
python-bits: 64
OS: Darwin
OS-release: 15.3.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: None

pandas: 0.18.0
nose: 1.3.7
pip: 8.1.1
setuptools: 20.3
Cython: 0.23.4
numpy: 1.10.4
scipy: 0.17.0
statsmodels: None
xarray: None
IPython: 4.1.2
sphinx: 1.3.5
patsy: 0.4.0
dateutil: 2.5.0
pytz: 2016.1
blosc: None
bottleneck: 1.0.0
tables: 3.2.2
numexpr: 2.4.6
matplotlib: 1.5.1
openpyxl: 2.3.2
xlrd: 0.9.4
xlwt: 1.0.0
xlsxwriter: 0.8.4
lxml: 3.6.0
bs4: 4.4.1
html5lib: None
httplib2: 0.9.2
apiclient: 1.5.0
sqlalchemy: 1.0.12
pymysql: None
psycopg2: None
jinja2: 2.8
boto: 2.39.0
Issue 1:
Summary

When submitting a POST request of relatively small size,

import * as qs from "querystring";
import axios from "axios";

const requestConfig = {
url : myUrl,
method : "POST",
headers : {
"Content-Type" : "application/x-www-form-urlencoded",
},
data : qs.stringify({ test : "data" });
};
const response = await axios.request(requestConfig);
console.log(
requestConfig.method,
requestConfig.url,
response.status,
response.statusText,
typeof response.data
);
console.log(response.request._header);
//Output: "POST", myUrl, 200, "OK", "string"
//Output: "POST myUrl HTTP/1.1/*snip*/

However, when I stringify() a larger object, giving a string of about 55k characters,

//Output: "POST", myUrl, 200, "OK", "string"
//Output: "GET / HTTP/1.1 /*snip*/

I expected POST myUrl but got GET /.

So, while my config says "POST" and gives a URL that is not the root, it seems like axios is doing its own thing.

Context

axios version: 0.16 and 0.18.0

Environment: node v6.11.0, ts-node v3.3.0, TS v2.7.2, Ubuntu 16.04.2

I tried fetch() on my browser and the request works fine.

I also tried the request npm package and it worked fine. For now, I'll use request for POST-ing "large" amounts of data. It just seems weird that axios works most of the time, except for "large" chunks of data.

Issue 2:
android 4.4.4 系统上，我用axios发起请求，后台返回json数据过大的时候，response 为null，后面改用fetch 使用ok，使用环境react native 0.55版本

axios version: e.g.: v0.18.0
Issue 1:
I noticed that doing the following

mul!(C, A, view(B,:,j)) # where A is a SparseMatrixCSC and B is transpose(any matrix),

falls back to the generic matvecmul.

The thing that breaks it, is the transpose. Without that it works as expected.

Of course, if I know that B is a transpose of some matrix, the code would just access the row j of that matrix instead.

BTW: I'm trying to avoid unnecessary copies of the B[:,j] vectors.

Issue 2:
julia> using Requests

julia> help(get)
INFO: Loading help data...
Base.get(collection, key, default)

Return the value stored for the given key, or the given default
value if no mapping for the key is present.

Base.get(f::Function, collection, key)

Return the value stored for the given key, or if no mapping for the
key is present, return "f()". Use "get!" to also store the
default value in the dictionary.

This is intended to be called using "do" block syntax:

get(dict, key) do
# default value calculated here
time()
end

Oh, okay. Let's disambiguate then:

julia> help(Requests.get)
Base.get(collection, key, default)

Return the value stored for the given key, or the given default
value if no mapping for the key is present.

Base.get(f::Function, collection, key)

Return the value stored for the given key, or if no mapping for the
key is present, return "f()". Use "get!" to also store the
default value in the dictionary.

This is intended to be called using "do" block syntax:

get(dict, key) do
# default value calculated here
time()
end

Hrmmm.......
Issue 1:
glyphicon makes html and css longer, why not using only gi.

e.g.:

<span class="gi gi-search"></span>

Where as Documentation already refers Glyphicon, or may be public will link back to Glyphicon. So, this can't be a big issue!

Issue 2:
I'm sure some where along the line there was a discussion about how icon classes should be declared, but how the current format was decided on is beyond me.

it takes forever to type by hand

impossible to switch to other icons-as-a-font libraries and keep the same code as most of them use Bootstrap 2.x .icon-

approx 17 extra bytes I don't want or need

just plain old silly

I believe it would be in the best interest of the Bootstrap community to start a serious discussion on standardizing the icon class names. More for than just for Bootstrap, too. Font-Awesome and the other icons-as-a-font libraries would benefit from standardization as well.

To me, it seems natural to stick to Bootstrap 2.x, (just .icon-), however extending with an extra .icon before it would also be better than the existing implementation.
Issue 1:
Describe the bug

When set url:

https://localhost:44302/api/v1/contract?order%5B0%5D.ascendant=false&order%5B0%5D.name=id&pagging.page=0&pagging.pageSize=9&filter.code9=222&filter.onlyAgency=true

https://localhost:44302/api/v1/contract?code9=222&onlyAgency=true

Fail function isValidXss

line: 1464 var xssRegex = /(\b)(on\w+)=|javascript|(<\s*)(/*)script/gi;

To Reproduce

Open devTools (F12) in chrome

var xssRegex = /(\b)(on\w+)=|javascript|(<\s*)(\/*)script/gi;
xssRegex.test('https://localhost:44302/api/v1/contract?code9=222&onlyAgency=true')

Expected behavior

must print false

Solution

Fix regular expression

Environment:

Axios Version: 0.19.1

OS: Windows

Browser: Chrome

Browser Version: 79

Additional Library Versions: React 16.12

Issue 2:
It seems that axios v0.19.1 introduced a new bug.

The bug comes from #2464

All urls containing javascriptkeyword is throwing XSS error. So, all following urls cannot be used in axios any more:

https://www.javascript.com

https://stackoverflow.com/questions/tagged/javascript

https://www.google.com/search?q=javascript

Here is a link to regexp: https://regexr.com/4rsst

Expected behavior: axios should accept javascript in urls
Issue 1:
Migrated issue, originally created by Alistair Watson

The code below emits:

CREATE SEQUENCE test_sequence

when according to the documentation it should get it's default schema value from the metadata and it should emit:

CREATE SEQUENCE test_schema.test_sequence

It's not really an issue if you are connecting as the user/schema you want to own the sequence - unfortunately I need to create all tables and database objects as a different user. Providing the schema parameter to each sequence directly does solve the issue.

from sqlalchemy import create_engine, MetaData, Column, Integer,Sequence
from sqlalchemy.ext.declarative import declarative_base

engine = create_engine('oracle+cx_oracle://test_schema:Welcome1@localhost:1521/xe', echo=True)
metadata = MetaData(schema='test_schema')
Base = declarative_base(metadata=metadata)

class Child(Base):
__tablename__ = 'child'
id = Column(Integer, Sequence(name="test_sequence"), primary_key=True)
data = Column(Integer)

Base.metadata.drop_all(engine, checkfirst = True)
Base.metadata.create_all(engine)

Issue 2:
Migrated issue, originally created by Andrew Paulo Robillo (@shimofuri)

I'd been copying this snippet from my old cookbook to add a surrogate key to a declarative table class:

class MixinIntKey(object):
@declared_attr
def key(cls):
return Column(
pg.INTEGER,
Sequence(f"sqk_{cls.__tablename__}", 1, 1),
nullable=False,
primary_key=True
)

This code was working before (some 3-4 years ago, I think around version 0.8 ): it generates the Sequence when I build the database objects through metadata.create_all(). The only change I made to the snippet was to update it to use format strings (Python 3.6).

After some googling around and testing (see attached file/link), the Sequence can be generated only if the metadata is passed during Sequence init:

Sequence(f"sqk_{cls.__tablename__}", 1, 1, metadata=metadata)

My environment: psycopg2==2.7.1, SQLAlchemy==1.1.8, Python 3.6 64bit on Windows 8.1 64bit, PostgreSQL 9.6 server

Attachments: sequence_bug.py
Issue 1:
SubArrays are not subtypes of DenseArray, even when they could be:

julia> arr = rand(3,3)
3x3 Array{Float64,2}:
0.838499 0.649594 0.810356
0.865377 0.204888 0.224049
0.842879 0.747802 0.67063

julia> s_arr = sub(arr, :, 1)
3-element SubArray{Float64,1,Array{Float64,2},Tuple{Colon,Int64},2}:
0.838499
0.865377
0.842879

julia> super(typeof(s_arr))
AbstractArray{Float64,1}

This is a problem when trying to pass the SubArray to a function that only accepts DenseArrays.

Issue 2:
Many C libraries have functions like the following:

void fastadd(size_t len, const double *a, const double *b, double *c)

These functions assume that the arrays have contiguous memory layout.

Now for safety, packages like Yeppp and VML etc restrict the arguments to Array. It would be very useful to generalize the fast computation functions there to arbitrary array types with contiguous array layouts (e.g. some SubArray or array views).

A iscontiguous function can be useful in such cases

function fastadd(a::StridedArray{Float64}, b::StridedArray{Float64}, c::StridedArray{Float64})
(iscontiguous(a) && iscontiguous(b) && iscontiguous(c)) ||
error("a, b, c must be contiguous")
# invoke the fastadd c-function
end

cc: @timholy @ViralBShah @simonster
Issue 1:
Hi,

when I start my Flask app via python3 -m flask run and there is an error in my code, Flask only returns with the following message:

Usage: python -m flask run [OPTIONS]

Error: The file/path provided (server2.run) does not appear to exist. Please verify the path is correct. If app is not on PYTHONPATH, ensure the extension is .py

Is there a way to get proper error stack messages or am I not seeing the obvious.. 🤔

~ For Frodo

Issue 2:
(Observed on Python 2.7; untested on 3.x)

Steps to reproduce:

echo "import thisisnotarealpackage" > error_app.py
export FLASK_APP=error_app.py
flask run

Expected result:

Some indication that thisisnotarealpackage is not a real package

Observed result:

Usage: python -m flask run [OPTIONS]

Error: The file/path provided (error) does not appear to exist.
Please verify the path is correct.
If app is not on PYTHONPATH, ensure the extension is .py

(Newlines added)

Why Bother

This has been causing some confusion on my team because cx_Oracle can fail to import (from the bowels of SQLAlchemy) if it can't find certain Oracle support files on the host machine.
Issue 1:
This issue occured when we upgraded to bootstrap 3.1.

jsfiddle: http://jsfiddle.net/kKsp7/2/

The hack I will use until this issue is fixed is included in the css.

Issue 2:
As of 3.1, when you do:

<div class="panel panel-default">
<table class="table table-bordered">
<thead>
<th>foo</th>
</thead>
<tbody>
<tr>
<td>baz</td>
</tr>
</tbody>
</table>
</div>

You get no border between the head and the body like in 3.0.x. It comes back if you remove table-bordered but then you don't have vertical separators between columns.

Without table-bordered:
Issue 1:
Symfony version(s) affected: 3.4.9

Description

Cache don't invalidate tags. In version 3.4.8 everything working fine.

How to reproduce

$cache = new TagAwareAdapter(
new FilesystemAdapter(),
new FilesystemAdapter()
);

$review = $cache->getItem('reviews-1');
$review->set('test');
$review->tag(['reviews']);
$cache->save($review);
dump($cache->getItem('reviews-1')->isHit()); //true - correct

$cache->invalidateTags(['reviews']);

dump($cache->getItem('reviews-1')->isHit()); //false - correct

$cache = new TagAwareAdapter(
new FilesystemAdapter(),
new FilesystemAdapter()
);
$review = $cache->getItem('reviews-1');
dump($cache->getItem('reviews-1')->isHit()); //true - incorrect / why ?

Probably error in GH-27007

Issue 2:
Q
A

Bug report?
yes

Feature request?
no

BC Break report?
no

RFC?
no

Symfony version
^4.0

I am using the TagAwareAdapter so I can invalidate my REDIS cache by tag. The problem is that, while the cache item gets invalidated, this change does not persist between requests.

See this reproduction repo , it has four commands:

One that populates the cache, one that invalidates the cache by tag, one that fetches the keys and one that does all three in a single command.

Expected behaviour:

$ bin/console app:add
$ bin/console app:invalidate
$ bin/console app:get

The final command should output:

item-0, isHit:false
item-1, isHit:false
item-2, isHit:false
item-3, isHit:false
item-4, isHit:false

Actual output:

item-0, isHit:true
item-1, isHit:true
item-2, isHit:true
item-3, isHit:true
item-4, isHit:true

Running the command $ bin/console app:add-invalidate-and-get works as expected