WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
The PDF and CDF functions for the generalized Pareto distribution return nan for any quantile when the shape parameter is zero:

In [54]: genpareto.pdf([0, 1, 2.5], 0.0)
Out[54]: array([ nan, nan, nan])

In [55]: genpareto.cdf([0, 1, 2.5], 0.0)
Out[55]: array([ nan, nan, nan])

When the shape is not zero, the standard CDF is 1 - (1 + c*z)**(-1/c), but when the shape is 0, the formula for the standard CDF is 1 - exp(-z). See the "Definition" section of http://en.wikipedia.org/wiki/Generalized_Pareto_distribution. The current implementation doesn't handle this special case.

The PDF function has the same problem: when the shape is 0, the standard PDF should be exp(-z).

Issue 2:
Original ticket http://projects.scipy.org/scipy/ticket/768 on 2008-10-31 by @pbrod, assigned to unknown.

The generalized pareto cumulative distribution in standard form [1]_ is defined as:

F(x;c) = 1-(1-c*x)**(1/c) for c>0 and c<0

where c is the shape parameter.

The limiting case as c->0 is the exponential cdf defined as

F(x;c=0) = 1-exp(-x)

and is not implemented in the scipy.stats.distributions.genpareto distribution.

To add this limiting case to scipy.stats.distributions.genpareto would

greatly simplify statistical analysis. Through inference on the shape parameter, c, the data themselves determine the most approprate type of tailbehavior and there is no need for making subjective a priori judgement of which individual extremevalue family to adopt.

.. [1] Stuart Coles (2000),

"An Introduction to Statistical Modeling of Extreme Values"
Issue 1:
Preflight Checklist

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

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

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

Issue Details

Electron Version:

7.1.1

Operating System:

macOS 10.15.1, Windows 10 (1903)

Last Known Working Electron version:

Expected Behavior

window.print() should print every time it is called

Actual Behavior

After the first printing operation, window.print() displays the print dialog, but does not produce any output; no printing, no saving as PDF, no opening in Preview, just nothing.

To Reproduce

Gist

Click "Print Me" twice.

On the first click, the window is printed. On further clicks, the print dialog appears, but no output is generated.

Screenshots

Additional Information

Issue 2:
Preflight Checklist

I have read the Contributing Guidelines for this project.

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

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

Issue Details

Electron Version:

Not working since v7.00.

Tested on:

v8.0.0-beta.4

v7.0.0

Operating System:

macOS 10.14.5

Last Known Working Electron version:

v6.1.5

Expected Behavior

That the window.print() will work, even after the first time.

Like in versions prior to v7.0.0

Actual Behavior

The window.print() function only works one time.

After the first time, it's not working.

The print dialog appears but the actual printing is not.

To Reproduce

Run window.print() twice.

On the Electron Fiddle app example, click on the Print Page and print.

After that first time, click on the Print Page button again and try to print again.

Link to the Gist

Screenshots

Link to video
Issue 1:
When we open three stacked modals a stack problem due to the invocation of enforceFocus function in bootstrap-modal.js file.

The following simple html code illustrate the issue.

<a href="#myModal" role="button" class="btn" data-toggle="modal">Launch demo modal</a>

<!-- Modal 1 -->
<div id="myModal" style="width: 700px;" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">

<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel">Modal header 1</h3>
</div>
<div class="modal-body">
<p>One fine body … 1</p>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
<a href="#myModal2" role="button" class="btn btn-primary" data-toggle="modal">Launch modal 2</a>
</div>
</div>

<!-- Modal 2 -->
<div id="myModal2" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel">Modal header 2</h3>
</div>
<div class="modal-body">
<p>One fine body … 2</p>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
<a href="#myModal3" role="button" class="btn btn-primary" data-toggle="modal">Launch modal 3</a>
</div>
</div>

<!-- Modal 3 -->
<div id="myModal3" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel">Modal header 3</h3>
</div>
<div class="modal-body">
<p>One fine body … 3</p>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
</div>
</div>

<script src="jquery.js"></script>
<script src="bootstrap-modal.js"></script>
<script src="bootstrap-transition.js"></script>

Issue 2:
Issue reproducible with: http://jsbin.com/otuduz/5/

Situation:

When using a page involving multiple modals where focus goes from modal 1 -> item within modal 2 without returning to the page itself first an error or crash is recorded (browser dependent).

In the above example a button is clicked to open one modal, then a button on that modal opens a 2nd modal. Clicking on the textarea of the 2nd modal causes and issue and possibly crash.

The error can either be a Uncaught RangeError: Maximum call stack size exceeded or an in either case it seems that the issue is the enforceFocus method.

On line 838:

, enforceFocus: function () {
var that = this
$(document).on('focusin.modal', function (e) {
if (that.$element[0] !== e.target && !that.$element.has(e.target).length) {
that.$element.focus()
}
})
}
Issue 1:
I'm trying to write mixed C tensorflow code with python tensorflow code by

embedding the CPython interpreter in my application.

I'm mainly doing this because defining the model is only really possible in

Python at the moment due to the lack of gradients (#6268), and I want to define

new models from the C side at speed without needing to invoke or

communicate to an external python process to get a new model.

To reproduce the problem is quite straightforward, simply import tensorflow

in python after the libtensorflow library has already been dynamically linked.

Here is a quick reproducer in pure python which will not run:

import ctypes

tf_dll = ctypes.CDLL("/usr/local/lib/libtensorflow.so")

import tensorflow

libtensorflow can be obtained like so:

TF_TYPE=cpu # Set to gpu for GPU support
TF_OS=linux
curl -L \
"https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-${TF_TYPE}-${TF_OS}-x86_64-1.0.0.tar.gz" |
sudo tar -C /usr/local -xz

Here are two fatal messages I have encountered (the first from the Python reproducer above, the second from a C program):

F tensorflow/stream_executor/cuda/cuda_platform.cc:180] Check failed: ::perftools::gputools::port::Status::OK() == (MultiPlatformManager::RegisterPlatform(std::move(platform))) (OK vs. Internal: platform is already registered with name: "CUDA")

F tensorflow/core/lib/monitoring/collection_registry.cc:77] Cannot register 2 metrics with the same name: /tensorflow/cc/saved_model/load_attempt_count

I assume the problem is that the _pywrap_tensorflow.so has tensorflow

statically linked into them, so they don't use libtensorflow. Then you have

two shared libraries conflicting with one another.

Is there a way to avoid this conflict?

Issue 2:
Notice that I'm not looking for a tutorial like this.

What I'm trying to do

I'm new to C++ and bazel and I want to make some change on the convolution operation in tensorflow, so I decide that my first step is to create an ops just like it.

What I have done

I copied conv_ops.cc from //tensorflow/core/kernels and change the name of the ops registrated in my new_conv_ops.cc. I also changed some name of the functions in the file to avoid duplication. And here is my BUILD file.

As you can see, I copy the deps attributes of conv_ops from //tensorflow/core/kernels/BUILD. Then I use "bazel build -c opt //tensorflow/core/user_ops:new_conv_ops.so" to build the new op.

What my problem is

Then I got this error.

I tried to delete bounds_check and got same error for the next deps. Then I realize that there is some problem for including h files in //tensorflow/core/kernels from //tensorflow/core/user_ops. So how can I perfectely create a new op excatcly like conv_ops?
Issue 1:
Recently I found this piece of code inside bootstrap 3 releases.

This can be a problem for those trying to override css styling on print.

Does anyone have any proposal to fix it?

@media print {
* {
color: #000 !important;
text-shadow: none !important;
background: transparent !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
}
}

Eventually a css sheet dedicated to print would be better.

This problem is reported here too : #14031

Issue 2:
default print media query adds an aggressive * style with !important to it. This makes it impossible to have a print version of the page without manually deleting the media query.

Bootstrap should not make any assumptions about the desired print view of the site.

[should be labeled under "meta"]
Issue 1:
Description

Hi folks.

Forgive me if this is already possible but I didn't see in the values.yaml file a clear way to specify multiple git repos as sources for dags. If this is possible already great!

Use case / motivation

The use case is when we have teams working on different projects but want a single airflow instance to manage the dags, we'd like to have separate repos for those projects.

Check this out; https://github.com/bitnami/charts/blob/master/bitnami/airflow/values.yaml#L725

Are you willing to submit a PR?

Possibly yes, If I'm feeling brave. Honestly out of my depth atm.

Related Issues

Issue 2:
Description

Git sync feature with multiple git repositories

Use case / motivation

We have a use case where multiple tenants create DAGs and they dont work with common git repository. Its a security issue if we share one customer info with other

What do you want to happen?

Airflow should support git-sync of DAG's from multiple git repositories

Are you willing to submit a PR?

No

Related Issues

No
Issue 1:
Regarding the docs components with property mdDown should not be shown:

If true, screens this size and down will be hidden.

I have searched the issues of this repository and believe that this is not a duplicate.

maybe related to #8172 and #6767

Expected Behavior

<Hidden mdDown> components must not be displayed when withStyles() returns width: "md"

Current Behavior

Content is shown.

Neither Safari's nor Chrome's "inspect" shows that the media query for class MuiHiddenCss-mdDown is matched.

Steps to Reproduce (for bugs)

https://codesandbox.io/s/7wlyw4y8m0

change window size in project view

Your Environment

Tech
Version

Material-UI
1.0.0-beta.2

React
16.2.0

browser
Safari 11.0.1, Chrome 64.0.3278.0

If you confirm that this is a bug, please give me a hint where to fix it.

Issue 2:
Problem Description

Hi guys,

I have been having performance issues that might be related to transition.js dependencies of material-ui.

I have a medium size SPA using redux.

I believe that one of the most CPU consuming process of my app are the ones related with material-ui components.

I don't know if this is a fixable issue, but I'm attaching a snapshot of my chrome cpu profile.

Versions

Material-UI: "material-ui": "^0.15.0-alpha.2"

React: "react": "^0.14.8"

Browser: Chrome Version 49.0.2623.110 (64-bit)
Issue 1:
The following code works:

pub fn new(delay: uint, callback: Box<FnMut() -> uint + 'a>, remove_on_drop: bool) -> Timer<'a> {
...
}

But this doesn't:

pub fn new(delay: uint, callback: Box<(FnMut() -> uint) + 'a>, remove_on_drop: bool) -> Timer<'a> {
...
}

rustc complains that

src/sdl2/timer.rs:33:43: 33:60 error: expected a path on the left-hand side of `+`, not `(FnMut() -> uint)` [E0178]
src/sdl2/timer.rs:33 pub fn new(delay: uint, callback: Box<(FnMut() -> uint) + 'a>, remove_on_drop: bool) -> Timer<'a> {
^~~~~~~~~~~~~~~~~
src/sdl2/timer.rs:33:43: 33:60 note: perhaps you forgot parentheses? (per RFC 438)
src/sdl2/timer.rs:33 pub fn new(delay: uint, callback: Box<(FnMut() -> uint) + 'a>, remove_on_drop: bool) -> Timer<'a> {
^~~~~~~~~~~~~~~~~

If I understand correctly the syntax is trait + lifetime, so I'd expect those parentheses to be fine (and imho they make the code more clear). The note about forgetting parentheses is also puzzling.

Issue 2:
// Accepted while it should not.
type A = Box<(Trait1) + Trait2 + 'lifetime>;

// Correct syntax.
type A = Box<Trait1 + Trait2 + 'lifetime>;

The syntax for object types is the same as for other bounds - Bound + Bound + Bound + .... and parentheses are not a part of bound syntax.

This is a stable-stable regression, introduced in Rust 1.6 by #29870.

cc #39169 #39179

Current status

#40043 - (Bound) + Bound + .... is still parsed , but with a warning. This is a "hardcoded" warning and not a lint, lints cannot be reported from libsyntax.

PR ? turns this syntax into a hard error
Issue 1:
just use conda install transformers，the transformers version is 4.4.2, can't run

1.1. error:

```bash

can't import pipline

# then use tokenizer and model to get my feature vector，ERROR：

RuntimeError: Error(s) in loading state_dict for BartModel:

size mismatch for model.encoder.embed_positions.weight: copying a param with shape torch.Size([16386, 768]) from

checkpoint, the shape in current model is torch.Size([1026, 768]).

```

change to use pip install transformers, the transformers version is 3.3.0,can't run

2.1. error:

```bash

can't import name tokenizer

# then i found it in issue that use "pip install tokenizer", it has exited, and tokenizer version is 0.8.0rc2. I find another env that can work,the tokenizer version is 0.5.0,so i use pip to change its version from 0.8.0rc2 to 0.5.0.ERROR:

pip's dependency ..... which is incompatibe

# however the version of toikenizer in only one env which can run is 0.5.0 .
```

So the only one worked env is:

conda create -n dnabert python=3.6

# pytorch-transformers
pip install pytorch-transformers

conda install pytorch torchvision cudatoolkit=10.0 -c pytorch

# dnabert
git clone https://github.com/jerryji1993/DNABERT
cd DNABERT
python3 -m pip install --editable .
cd examples
python3 -m pip install -r requirements.txt

# allenai
conda install cudatoolkit=10.0
pip install git+https://github.com/allenai/longformer.git

# huggingface
pip install transformers

我做错了什么才会到这种局面？

Issue 2:
RuntimeError: Error(s) in loading state_dict for BartModel:
size mismatch for model.encoder.embed_positions.weight: copying a param with shape torch.Size([16386, 768]) from checkpoint, the shape in current model is torch.Size([1026, 768]).

I use longformer model called longformer-encdec-base-16384 which is downloaded in https://github.com/allenai/longformer，and use huggingface to load the model，when transformers’ version is 3.1.0， the code can run, but when it is 4.4.2，the error happened.

MeanWhile,when I use the model to proposal pairs of sentences，I found it that the returned token_type_ids values are just zero

without one. how ever,in the model's special_tokens_map.json, it has defined cls_token and sep_token.

Finally, I sincerely hope you would reply me soon. Thanks！
Issue 1:
Same problem when starting julia with -p 4 parameter (for example).

Problem only occurs on 64 bit version. (on Windows 8.1)

32 bit version is OK.

Issue 2:
julia> versioninfo()
Julia Version 0.3.0-prerelease+1358
Commit cb26338* (2014-02-01 14:56 UTC)
Platform Info:
System: Windows (i686-w64-mingw32)
CPU: Intel(R) Core(TM)2 Duo CPU T9300 @ 2.50GHz
WORD_SIZE: 32
BLAS: libopenblas (DYNAMIC_ARCH NO_AFFINITY)
LAPACK: libopenblas
LIBM: libopenlibm

julia> a=[1:5]
5-element Array{Int32,1}:
1
2
3
4
5

Then calling a[a.>3] crashes the REPL on 32-bit Vista.

I have also tried this win32-prerelease on 64-bit Win7 and it works fine.
Issue 1:
Do you want to request a feature or report a bug?

feature

What is the current behavior?

getDerivedStateFromProps only receives the nextProps and previousState as arguments.

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:

The deprecated componentWillReceiveProps(nextProps) used to allow code like this.props.foo !== nextProps.foo. With the new getDerivedStateFromProps function, there's no choice (because it is a static method) but to constantly copy nextProps.foo into state in order to access it later.

This is illustrated in the example posted to twitter by @gaearon: https://twitter.com/dan_abramov/status/953612246634188800?lang=en

What is the expected behavior?

Ideally (if it's not difficult to implement!) the getDerivedStateFromProps would also take the current (previous/old) props as an argument, something like:

getDerivedStateFromProps(nextProps, prevState, prevProps)

This would eliminate the need to constantly assign props to state purely for comparison purposes...

A quick look at the source doesn't make it clear to me how easy this would be though...

react/packages/react-dom/src/server/ReactPartialRenderer.js

Line 456
in
4a20ff2

partialState = Component.getDerivedStateFromProps.call(

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

16.3.0

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

bug

What is the current behavior?

Our tests are sporadically logging a warning Warning: ReactDebugTool: debugID may not be empty.. We fail any tests that log warnings, so this is causing flakiness.

If the current behavior is a bug, please provide the steps to reproduce...

I'm unable to consistently reproduce, but we're seeing roughly a 2% failure rate for our test suite. Doesn't seem to be any patterns around which tests will fail with this error.

What is the expected behavior?

I'd expect our tests to either log a warning consistently if we're doing something wrong or to not log a warning at all.

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

❯ node --version; npm --version; npm ls react react-dom enzyme
v6.10.2
2.15.12
Airbnb@1.0.0 /Users/gary_borton/airlab/repos/airbnb
├── enzyme@2.8.0
├── react@15.4.2
├── react-dom@15.4.2
└─┬ react-router-dom@4.1.1
└── react@15.5.4

The appearance of this warning correlates pretty closely with our migration from node 4 to node 6.
Issue 1:
I discovered that when we start service neo4j with systemd on ubuntu /etc/systemd/system/neo4j.service is buggy.

I already create a ticket n°7911 on problem with false analysis.

Neo4j version: 3.0.1 to 3.1.1

Operating system: Ubuntu 16.04 and 16.10

API/Driver: file systemd /etc/systemd/system/neo4j.service

missing lines in file neo4j.service of systemd for creating folder /run/neo4j and attribute authorizations to this folder.

...

[Service]:

...

RuntimeDirectory=neo4j

RuntimeDirectoryMode=770

...

Steps to reproduce**

user@hostname:~$ systemctl status neo4j.service
● neo4j.service - Neo4j Management Service
Loaded: loaded (/etc/systemd/system/neo4j.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since mar. 2016-08-16 17:33:00 CEST; 2s ago
Process: 25319 ExecStop=/usr/bin/neo4j stop (code=exited, status=0/SUCCESS)
Process: 21791 ExecStart=/usr/bin/neo4j start (code=exited, status=0/SUCCESS)
Main PID: 21849 (code=exited, status=143)

Expected behavior

Script /etc/systemd/system/neo4j.service :

[Unit]
Description=Neo4j Management Service

[Service]
Type=forking
#User=neo4j
RuntimeDirectory=neo4j
RuntimeDirectoryMode=770
ExecStart=/usr/bin/neo4j start
ExecStop=/usr/bin/neo4j stop
ExecReload=/usr/bin/neo4j restart
RemainAfterExit=no
Restart=on-failure
PIDFile=/var/run/neo4j/neo4j.pid
LimitNOFILE=60000
TimeoutSec=600

[Install]
WantedBy=multi-user.target

Actual behavior

Script /etc/systemd/system/neo4j.service :

[Unit]
Description=Neo4j Management Service

[Service]
Type=forking
#User=neo4j
ExecStart=/usr/bin/neo4j start
ExecStop=/usr/bin/neo4j stop
ExecReload=/usr/bin/neo4j restart
RemainAfterExit=no
Restart=on-failure
PIDFile=/var/run/neo4j/neo4j.pid
LimitNOFILE=60000
TimeoutSec=600

[Install]
WantedBy=multi-user.target

Issue 2:
I have noticed that a fresh install of neo4j enterprise is not creating pid file on /var/run/neo4j directory. Also if I'm creating this directory manually it's been deleted by neo4j stop procedure.

The result is an instance of neo4j which is not controllable by neo4j bin file.

This occurs after first reboot of the server and in order to stop neo4j I forced to kill -9 the process.

Neo4j Version: 3.0M03

Operating System: Ubuntu 14.04

Steps to reproduce

apt-get install neo4j-enterprise

reboot the server

check running process - you will notice that neo4j is running by neo4j user

try to stop neo4j by #service neo4j stop / start

You will receive: /usr/share/neo4j/bin/neo4j: line 149: /var/run/neo4j/neo4j.pid: No such file or directory

Expected behavior

neo4j start procedure should create neo4j.pid file on upstart

neo4j stop procedure should delete neo4j.pid

Actual behavior

neo4j start procedure is not creating neo4j.pid file on upstart
Issue 1:
Description

A way to manipulate execution_date, or triggering backfills/catchups from the Web GUI is proposed.

Use case / motivation

Web UI and the CLI interface have separate privileges and responsibilities. CLI is mostly geared towards maintenance of the Airflow system itself - while the Web GUI is intended for users using Airflow to manage tasks. Backfill is aligned with the second more closely - it makes no sense that it's not available through the web interface.

The sentiment is shared by multiple users.

Are you willing to submit a PR?

No.

Related Issues

Not that I know of.

Issue 2:
Description

I'd like to be able to trigger backfills remotely through a REST API endpoint - there's already support for triggering a single DAGRun so why not multiple?

This would involve creating a new endpoint (maybe under /dags/<dag_id>/backfills) which would handle the same parameters as the airflow dag backfill CLI command.

A coworker and I would be happy to build out this functionality, but I'd like to collect input from the community and core maintainers before we start.

Use case/motivation

We use a custom CLI built on top of the Airflow REST API for doing some basic Airflow operations via from the command line - It would be awesome if we could include support for triggering backfills remotely.

Related issues

No response

Are you willing to submit a PR?

Yes I am willing to submit a PR!

Code of Conduct

I agree to follow this project's Code of Conduct