WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
This was originally brought up at https://github.com/kennethreitz/requests/issues/2061. If you change session.proxies after calling session.get and call session.get again, it does not use the updated value. You have to do session.get(proxies=session.proxies).

Assumedly this is not difficult to fix, since setting the keyword argument does work. I didn't read the code, though.

Issue 2:
Session.trust_env = False turns off the checking of environment variables for options including proxy settings (*_proxy). But urllib picks up and uses these environment proxy settings anyway. requests should pass the trust_env setting on to urllib. (Although I'm not sure if urllib has a similar override.)

(Proxy setting precedence should be sorted out here as well. They way it is now, environment proxy settings will interfere with (rather than be over-ridden by) the proxies argument in Session.request or requests.request calls and the Session.proxies config regardless of trust_env settings.)
Issue 1:
Right now, if I run deno doc without any params I get a stack overflow:

Instead it should show a descriptive error, that it needs params, like deno run.

(Should this issue be moved to deno_doc repo? )

Issue 2:
I was just upgrading deno to 1.3.1 version and going to show builtin docs. It shows

thread 'main' has overflowed its stack
fatal runtime error: stack overflow
Aborted (core dumped)
Issue 1:
The feature that captures "stdout" for tests doesn't capture all the ways that a test could print to stdout.

#[test]
fn output_capture_tests() {
println!("This gets captured...");
let _ = std::io::stdout().write_line("but this does not...");
let _ = std::task::try(proc() { println!("..and neither does this...") });
let _ = std::run::process_status("/bin/echo", [~"...nor this..."]);
fail!();
}

Only the first println! call gets captured--the rest appear intermingled with the test output:

running 1 test
but this does not...
..and neither does this...
...nor this...
test output_capture_tests ... FAILED

failures:

---- output_capture_tests stdout ----
This gets captured...
task 'output_capture_tests' failed at 'explicit failure', subproc-test-stdout.rs:7

failures:
output_capture_tests

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured

It would be nice if all of these got captured.

Issue 2:
I've filed this bug in rust-lang/cargo but I'm afraid rust-lang/rust is the correct repo for this.

I ran the tests for one of my crates that uses threads in its example code. I've noticed it printed some lines to stdout, even though --nocapture wasn't set, but not all of them. It appears that text printed from new threads are not correctly captured, I think this is not intended.

Reproduce

#[cfg(test)]
mod tests {
use std::thread;
use std::time::Duration;

#[test]
fn it_works() {
thread::spawn(move || {
println!("request: {:?}", 123);
});

thread::sleep(Duration::from_secs(1));
println!("response: {:?}", 456);
}

Output

running 2 tests
request: 123
test tests::it_works ... ok
[...]

Meta

rustc --version --verbose:

rustc 1.17.0
binary: rustc
commit-hash: unknown
commit-date: unknown
host: x86_64-unknown-linux-gnu
release: 1.17.0
LLVM version: 4.0
Issue 1:
The following code makes rustc core dump. It is hardly a normal use case, but it would be nice if rustc failed more gracefully.

$ cat main.rs
#![no_std]
#![feature(box_syntax)]
#![feature(lang_items)]

extern crate core;

use core::ptr::Unique;

#[lang="owned_box"]
pub struct Box<T>(Unique<T>);

#[lang="start"]
fn main() {
let mut test:[isize;1] = [0;1];
let a = box 5;
test[*a] = 0;
}

#[lang = "stack_exhausted"] extern fn stack_exhausted() {}
#[lang = "eh_personality"] extern fn eh_personality() {}
#[lang = "panic_fmt"] fn panic_fmt() -> ! { loop{} }

$ rustc main.rs
main.rs:5:1: 5:19 warning: use of unstable item, #[warn(unstable)] on by default
main.rs:5 extern crate core;
^~~~~~~~~~~~~~~~~~

thread 'rustc' has overflowed its stack
Illegal instruction (core dumped)

Issue 2:
I’m playing with making a bare-metal executable in rust. I fully admit to not knowing what I’m doing, but I thought this was worth reporting given that it resulted in a stack overflow in rustc. This was produced with the rust nightly from 2014/1/10. I’m on OS X 10.10.1 and installed rustc from the OS X .pkg flle.

Here’s how I invoked the compiler:

$ rustc spin.rs
spin.rs:4:1: 4:19 warning: use of unstable item, #[warn(unstable)] on by default
spin.rs:4 extern crate core;
^~~~~~~~~~~~~~~~~~

thread 'rustc' has overflowed its stack
Illegal instruction: 4

Here’s spin.rs:

#![feature(lang_items)]
#![no_std]

extern crate core;

use core::fmt::Arguments;

#[lang="stack_exhausted"]
extern fn stack_exhausted() {}

#[lang="eh_personality"]
extern fn eh_personality() {}

#[lang="begin_unwind"]
extern fn begin_unwind() {}

#[lang="panic_fmt"]
pub fn panic_fmt(_fmt: &Arguments, _file_line: &(&'static str, usize)) -> ! {
loop { }
}

#[lang="start"]
fn main() {
loop {
}
}
Issue 1:
Try this:

d = Dict([1,2] => 1.1, [3,2] => 0.1)
length.(keys(d))

It doesn't work on 0.5 (I've been told it works on master, https://discourse.julialang.org/t/length-keys-d-does-not-work/913). Can we pull this into 0.5.1?

Issue 2:
Currently the very common operation of iterating a Dict's keys in sorted order requires writing the overly verbose sort!(collect(keys(d))). This could be abbreviated to sort(keys(d)) by adding a sort method for KeyIterator, but do we manually add methods for all relevant functions in Base? What about user-defined functions that make sense for general collection-like types? At some point (IIRC) I proposed making KeyIterator and ValueIterator subtypes of AbstractVector, which would make many things "just work". The trouble is that indexing is O(n); however, I believe that something like @JeffBezanson's ordered dict experiment could make indexing O(1).
Issue 1:
While using the new version of ListItem this bit of code resulted in the following error uncaught Error: Invariant Violation: ReactMount: Two valid but unequal nodes with the same data-reactid

Note that this ListItem itself was nested in other lists and cards. Funny thing is the same code worked with the earlier version of material-ui. Just wondering what changed and what I can do to fix this?

<div>
<ListItem
secondaryText = {<p> secondaryText </p>}
disableTouchTap = {true}
rightIconButton={options}
style = {
{
fontSize : 16,
lineHeight : "16px",
backgroundColor : Colors.green50
}
}>
<p>ABCD</p>
<p>XYZ</p>
</ListItem>
</div>

Issue 2:
When a Menu has no selected items, it always has a highlighted first item.

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

Expected Behavior

If I open a menu that has no item with select={true} I would expect the menu to open with the first item highlighted for as long as the cursor is hovering over it and then when the cursor moves to another item, the first item should be un-highlighted. So, only the item that is under the cursor should be highlighted if there is no selected item.

Current Behavior

When the menu (with no selected items) opens, the first item is highlighted and remains highlighted (suggesting that it is somehow selected) while the cursor hovers over other items.

Steps to Reproduce (for bugs)

See simple menu demo

Context

I am using a Menu to display a list of commands/actions that a user might want to execute. So I should like the menu to highlight only the command that the user is currently hovering over with the mouse. (Or on a touch device, no command should be highlighted)

Your Environment

Tech
Version

Material-UI
1.0.0. beta 17

React

browser

etc
Issue 1:
Summary of the new feature/enhancement

Imagine you need to search something very quickly using PowerToys Run. You pressed Alt + Space, and you need to open your browser first then search on url bar. but instead I think we might use PT Run to launch websites as well as applications by typing some queries like: bing microsoft build. And it opens bing search result for microsoft build.

To customize web search, user might define prefixes and query url for the service.

Prefix
Url

yt
https://www.youtube.com/results?search_query={0}

bing
https://www.bing.com/search?q={0}

google
https://www.google.com/search?q={0}

I think users must be able to modify this list to add/edit/remove items.

For example when I type something like:

bing microsoft career

It should open this url on my default browser:

https://www.bing.com/search?q=microsoft+career

Proposed technical implementation details

You could check out this wox plugin for example.

Protip

Aslo, a note for myself

Power users could also use duckduckgo's "I'm feeling lucky" like service to directly search and redirect to first item.

Prefix
Url

web
https://duckduckgo.com/?q=!ducky+{0}

Source

So when we execute queries like web powertoys it will open this repo on our browser.

Issue 2:
Summary of the new feature/enhancement

I want to be able to start a web search from the launcher.

Ideally, I'd type bing power toys and it would navigate to https://www.bing.com/search?q=power+toys in my default browser.

google power toys would go to the equivalent.

The ability to specify the keyword/search engine to use and the domain it goes to would also be necessary. Not only would this enable supporting other search engines, but it would also allow for people to adjust for different TLD versions of search engines.

This would be similar to functionality that used to be available in Enso launcher.

Proposed technical implementation details (optional)

This would presumably require some settings for determining which words are identified as initiating the search and the URL to submit the query to.

This could also be the base for similar functionality where a keyword could launch an app and pass other values as command-line arguments. Without additional arguments, this could also serve as a way to create aliases for apps so they could be launched with a small number of keystrokes.

crutkas: possible solution to this issue in #10619. It defers to default browser + user's search engine. Lets PT Run be generic
Issue 1:
Do you want to request a feature or report a bug?

Bug

What is the current behavior?

The following code example works well with text input type, but allows inputs like 012 or 0012 to be entered when using the number input type.

The console.log line always runs and shows the right value, and the App state is also correct when checked with React Developer Tools. It's only that the controlled input is not being "controlled" somehow.

class App extends Component {
constructor() {
super()
this.state = {
value: '',
}
}

handleChange = e => {
const value = e.target.value
const num = parseInt(value, 10)
console.log(num)
this.setState({ value: isNaN(num) ? '' : num })
}

render() {
return (
<div className="App">
<input type="number" value={this.state.value} onChange={this.handleChange} />
</div>
)
}
}

Present with latest create react app or in this jsfiddle: https://jsfiddle.net/Lhj0j3ok/

Not present in this jsfiddle: https://jsfiddle.net/mayankshukla5031/08ecc97d/

What is the expected behavior?

Input should reflect the state, thus not allowing strings like 012, etc. to be displayed.

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

Latest create-react-app:

"react": "15.6.1",

"react-dom": "15.6.1",

"react-scripts": "1.0.11"

Browser: Chrome 60.0.3112.101

OS X 10.12.6

Present with latest create react app or in this jsfiddle: https://jsfiddle.net/Lhj0j3ok/

Not present in this jsfiddle: https://jsfiddle.net/mayankshukla5031/08ecc97d/

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

bug

What is the current behavior?

I have a number input with defalut value 0 and in onChange function I'll parse value to float to avoid invalid input, but I'll always get left pad 0 on input UI. But in previouse version, my code works.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar (template: https://jsfiddle.net/84v837e9/).

<input type="number" value={this.state.value} onChange={e=>this.setState({value: parseFloat(e.target.value)? parseFloat(e.target.value) : 0})}

What is the expected behavior?

Should not have left pad 0.

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

react 15.5.3, all browser / all OS. It works in 15.4.2
Issue 1:
const LogRow = React.createClass({
mixins: [PureRenderMixin],
render: function() {
return (
<TableRow>
<TableRowColumn >{this.props.dataVal.timestamp}</TableRowColumn>
<TableRowColumn >{this.props.dataVal.logLevel}</TableRowColumn>
<TableRowColumn >{this.props.dataVal.serviceType}</TableRowColumn>
<TableRowColumn>{this.props.dataVal.logMessage}</TableRowColumn>
<TableRowColumn >{this.props.dataVal.tailNumber}</TableRowColumn>
<TableRowColumn >{this.props.dataVal.logFilename}</TableRowColumn>
</TableRow>
);
}
})

then I used it like this

let logData = filteredObjects.map((dataVal, i) => <LogRow key={i} dataVal={dataVal} forId={'id'+i}/>);

When I change it to a simple code below, the checkboxes on my table are visible

let logData = filteredObjects.map((dataVal, i) => <TableRow key={i}><TableRowColumn >{dataVal.timestamp}</TableRowColumn><TableRowColumn >{dataVal.logLevel}</TableRowColumn><TableRowColumn >{dataVal.serviceType}</TableRowColumn><TableRowColumn>{dataVal.logMessage}</TableRowColumn><TableRowColumn >{dataVal.tailNumber}</TableRowColumn><TableRowColumn >{dataVal.logFilename}</TableRowColumn></TableRow>);

I'm not sure if it's a Material-UI or ReactJS issue though.

Issue 2:
I have created a component which generates Table and another one which generates TableRows. The problem is that the checkbox on the rows are not showing.

Any ideas?

Thanks
Issue 1:
Classes with super class are very slow to new, in comparison to what babel@7.8.8 does. The difference can be found at here.

function test(Vec3) {
const t1 = Date.now();
(() => {
for (let i = 0; i < 1000000; ++i) {
const x = Math.random();
new Vec3(x, x, x); // Key line
}
})();
const t2 = Date.now();
console.log(`Past: ${t2 - t1}ms`);
}

test(require('./out/7.8.8/vec3.js').Vec3); // 18ms
test(require('./out/7.9.x/vec3.js').Vec3); // Oops, 2451ms!!

I have upload the test code to this repository. You can try it just by node ./run-perf.js.

Issue 2:
Issue originally made by @madole

Bug information

Babel version: 6

Node version: 5

npm version: 3

Input code

class Animal {
constructor(name) {
this.name = name;
}

async getAge() {
const age = await getAgeFromAPI();
return age;
}
}

class Dog extends Animal {
async getAge() {
const age = await super.getAge();
return age * 7;
}
}

Description

I should be able to call getAge on the Dog instance and it should call the parent's prototype method of the same name.

It actually compiles to

class Dog extends Animal {
getAge() {
return (0, _bluebird.coroutine)(function* () {
const age = yield super.getAge();
return age * 7;
})();
}
}

Which means super is in the wrong scope... it could detect this scenario and compile to something like this..

class Dog extends Animal {
getAge() {
var _this = this;

return (0, _bluebird.coroutine)(function* () {
const age = yield Animal.prototype.getAge.call(_this);
return age * 5;
})();
}
Issue 1:
Opening this file: https://github.com/espadrine/aulx/blob/master/html/tokenizer.js

Causes the parser to choke and Atom warns several times about not responding. Eventually you have to give up and quit the whole app.

The exact line that is doing it is this: https://github.com/espadrine/aulx/blob/master/html/tokenizer.js#L63

If I remove the line there is no problem.

I notice that when opening the file in Sublime 3 they don't syntax colorize that line at all. For any really long line they just skip it.

Probably related issues:

#6830

#5882

The issue was reported by this guy: https://news.ycombinator.com/item?id=9782812

Issue 2:
May be a known issue, but files with large embedded images such as github's public/enterprise/maintenance.html will often cause Atom to freeze (MacVim actually struggles as well).

Seems some of them (github's public/maintenance.html for instance) work fine when in soft wrap mode, or until you move your cursor to the long line when out of soft wrap.
Issue 1:
This issue relates to scipy.stats.kstest. The one-sided test, as specified by the alternative argument, works in the opposite direction compared to the other statistical tests (ttest_ind, wilcoxon). In the example below, the p-values for the t-test and wilcoxon test are close to zero, but for the Kolmogorov-Smirnov test the p-value is 1.

Reproducing code example:

import scipy.stats
import numpy as np

x = np.random.normal(mu, sigma, 1000)
scipy.stats.ttest_ind(x, x+2, alternative='less')
scipy.stats.wilcoxon(x, x+2, alternative='less')
scipy.stats.kstest(x, x+2, alternative='less')

Scipy/Numpy/Python version information:

1.6.0 1.19.2 sys.version_info(major=3, minor=7, micro=3, releaselevel='final', serial=0)

Issue 2:
Hi, I've found that the stats.ks_2samp() documentation notes section states:

In the one-sided test, the alternative is that the empirical
cumulative distribution function F(x) of the data1 variable is "less"
or "greater" than the empirical cumulative distribution function G(x)
of the data2 variable, ``F(x)<=G(x)``, resp. ``F(x)>=G(x)``.

However, when running the function it has the opposite behavior. This is perhaps just a documentation error.

Reproducing code example:

In the code below I generate two gaussian distributions with different means,data1 has a smaller mean than data2.

data1 = np.random.normal(loc = 0, size = 100)
data2 = np.random.normal(loc = 5, size = 100)

# Should accept alternative hypothesis (data1 ECDF is less than data2's).
ks_2samp(data1, data2, alternative ='less')
>>>Ks_2sampResult(statistic=0.0, pvalue=1.0)

# Should reject alternative hypothesis
ks_2samp(data1, data2, alternative = 'greater')
>>>Ks_2sampResult(statistic=0.98, pvalue=2.197716889733508e-55)

Scipy/Numpy/Python version information:

Scipy version 1.4.1

Numpy version 1.19.1

sys.version_info(major=3, minor=7, micro=6, releaselevel='final', serial=0)
Issue 1:
xref #8309

for example:

pd.qcut([1,1,1,1,1,1,1,1,1,1,1,1,1,5,5,5], [0.00001, 0.5])

will raise "ValueError: Bin edges must be unique: array([ 1., 1.])" exception

Fix suggestion - add one new line:

def qcut(x, q, labels=None, retbins=False, precision=3):
if com.is_integer(q):
quantiles = np.linspace(0, 1, q + 1)
else:
quantiles = q
bins = algos.quantile(x, quantiles)
--->bins = np.unique(bins)
return _bins_to_cuts(x, bins, labels=labels, retbins=retbins,
precision=precision, include_lowest=True)

Issue 2:
pandas.cut and similar operate on the principle that bins start at one end of a line and finish at another. However, sometimes it is necessary to work with data that operates on a circular scale, for example compass directions.

It would be a great enhancement if pd.cut could deal with these cases.

I do not know of anything in numpy or pandas that currently deals with this situation, but it would be very useful.

Current workaround

Currently this is accomplished by having a bin covering half of the real bin at each end of the scale, for example the bin 345° to15° would be covered by a bin of 0° to 15° and a bin of 345° to 360°. It is then necessary to assign the members of one category to the other, rename it, and then delete the unused category.

data = pd.DataFrame(np.random.random(400) * 360, columns=["Direction"])
bins = np.array([-15, 15, 45, 75, 105, 135, 165, 195, 225, 255, 285, 315, 345, 375])
c = pd.cut(data.Direction, bins)
c[c=="(-15, 15]"] = "(345, 375]"
c = c.cat.remove_unused_categories()
cats = list(c.cat.categories)
cats[-1] = '(345, 15]'
c = c.cat.set_categories(cats)

Desired behaviour

Better would be accepting a parameter indicating at what point the scale loops, e.g. zeroat=360. Other solutions may be possible, such as taking the structure of the list of bins to indicate that the scale loops.

One issue is the order. How can the fact that 345 is both more than and less than 0 be dealt with, depending on what direction you are looking in? There is an order, but it isn't straight forward.
Issue 1:
my project is about a self driving car by using an odroid-c2 and usb camera ,wich can detect barriers and Traffic lights !

first step i succeed to realize the mjpeg streamer refering to this url: forum.odroid.com/viewtopic.php?f=52&t=23503

and at the end i got a real live video by accesing to http://ip-adress:port/

now i want to link the output of the mjpeg streamer with the code of opencv : i want to put the output of the mjpeg as an input of opencv for detecting to carry on my project .So my question is :how can i include the output of mjpeg streamer in the opencv code ??

Issue 2:
my project is about a self driving car by using an odroid-c2 and usb camera ,wich can detect barriers and Traffic lights !

first step i succeed to realize the mjpeg streamer refering to this url: forum.odroid.com/viewtopic.php?f=52&t=23503

and at the end i got a real live video by accesing to http://ip-adress:port/

now i want to link the output of the mjpeg streamer with the code of opencv : i want to put the output of the mjpeg as an input of opencv for detecting to carry on my project .So my question is :how can i include the output of mjpeg streamer in the opencv code ??