WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
When I use tf.gfile.GFile and set mode='rb' to open a file on windows, it will read as 'str' instead of 'byte'. For example,

f = tf.gfile.GFile("d2f42068.ini", mode='rb')

f.readline()

The result shows

'\n'.

It should be

b'\n'

I find the gfile.py replace the 'r' to empty.

def init(self, name, mode='r'):

mode = mode.replace('b', '')

super(FastGFile, self).init(name=name, mode=mode)

This issue will cause some error of data reading on windows.

My OS is win10 x64. The version of tensorflow is r0.12.

Issue 2:
NOTE: Only file GitHub issues for bugs and feature requests. All other topics will be closed.

For general support from the community, see StackOverflow.

To make bugs and feature requests more easy to find and organize, we close issues that are deemed

out of scope for GitHub Issues and point people to StackOverflow.

For bugs or installation issues, please provide the following information.

The more information you provide, the more easily we will be able to offer

help and advice.

What related GitHub issues or StackOverflow threads have you found by searching the web for your problem?

None

Environment info

Operating System: macOS Sierra 10.12.2

Installed version of CUDA and cuDNN: None

(please attach the output of ls -l /path/to/cuda/lib/libcud*): None

If installed from binary pip package, provide:

A link to the pip package you installed:

The output from python -c "import tensorflow; print(tensorflow.__version__)".

If installed from source, provide

The commit hash (git rev-parse HEAD)

4d924e7

The output of bazel version

0.4.3-homebrew

If possible, provide a minimal reproducible example (We usually don't have time to read hundreds of lines of your code)

import tensorflow as tf
import pickle

f = tf.gfile.GFile("data_batch_1")
pickle.load(f, encoding='latin1')

What other attempted solutions have you tried?

I tried to manually read all data into a variable: s = f.read() and unpickle it: pickle.loads(s, encoding='latin'). It works well.

Logs or other output that would be helpful

(If logs are large, please upload as attachment or provide link).

TypeError: a bytes-like object is required, not 'str'

I don't know why this happened. I checked the file_io code, and it returns byte object when calling read. So maybe this is something about pickle, any ideas?
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

Dubbo version: 2.6.3

Operating System version: xxx

Java version: xxx

Steps to reproduce this issue

When I browse this issue Dubbo-2013 ,I found 「dubbo:consume」 more attributes。But in the official documentation dubbo-consume, it is not updated

Expected Result

What do you expected from the above steps？

Actual Result

What actually happens?

If there is an exception, please attach the exception trace:

Just put your stack trace here!

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

I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

Dubbo version: 2.6.3

Operating System version: all

Java version: all

Step to reproduce this issue

To setting @Reference#parameters()

Expected Result

ReferenceBean contains parameters Map

Actual Result

ReferenceBean does not contain parameters Map
Issue 1:
export var seven = 7;
export var seven = 7;

This is valid_invalid_, and TS doesn't error on it.

export var seven = 7;
export var seven = 8;

This is invalid, and TS doesn't error on it.

The spec:

For each ExportEntry Record e in module.[[StarExportEntries]], do

Let importedModule be HostResolveImportedModule(module, e.[[ModuleRequest]]).

ReturnIfAbrupt(importedModule).

Let resolution be importedModule.ResolveExport(exportName, resolveSet, exportStarSet).

ReturnIfAbrupt(resolution).

If resolution is "ambiguous", return "ambiguous".

If resolution is not null, then

If starResolution is null, let starResolution be resolution.

Else

Assert: there is more than one * import that includes the requested name.

If resolution.[[module]] and starResolution.[[module]] are not the same Module Record or SameValue(resolution.[[exportName]], starResolution.[[exportName]]) is false, return "ambiguous".

A module is free to export the same value (as in the same value spec function) multiple times, but exporting different values under the same identifier should be a syntax error. This should also be an error:

export var state = {};
export var state = {};

Because unique objects do not pass the SameValue() test. (It is not currently reported as an error.)

Given that we don't want to attempt to evaluate RHS expressions to resolve the same value functions, we're pretty much stuck using type information to infer the same thing. Or we could just forbid the re-declaration of exports, given that since you're forced the reexport the exact same value or error, there's no real value in doing so.

And perhaps the more relevant part of the spec that I found:

15.2.1.1 Static Semantics: Early Errors

It is a Syntax Error if the ExportedNames of ModuleItemList contains any duplicate entries.

We do forbid multiple default exports already, but don't check other names if the types match for some reason?

Issue 2:
Type inference seems to fail when the return-type is a union between a class and a generic type.

I was hoping to use this pattern to be able to decorate an object (not a class) with traits/behaviors on a per-instance basis, in a type-safe manner, something along the lines of Scala's with operator.

Best explained by example:

class Fud {}

interface Decorated {
foo(): string;
}

function decorate<T>(object: T) : T|Decorated {
object['foo'] = function () {
return 'Hello';
};
return <T|Decorated> object;
}

var test = decorate(new Fud());

console.log(test.foo()); // ERROR

So anything that goes through the decorate() function comes out decorated with a new interface, which is made possible using a union between a variable type and some interface.

Hovering over the call to decorate(), the return-type is correctly reported as Decorated | Fud - however, when the result is assigned to the test variable, the inferred type is Fud, and the attempt to call test.foo() generates the error "property foo does not exist on type Fud".

Am I missing something? Is there some reason this shouldn't work?
Issue 1:
@person142 responsed to #8354 that his preference was for a cython optimize api.

This came up before: #7242.

As you can see I was against the idea. Handling all reasonable halting conditions for a scalar solver is already a PITA, and I think the problem gets much worse for a vectorized scalar solver. IMO it is better to provide a Cython API to a scalar solver and let users handle looping over it.

#8357 only vectorized Newton methods. #8431 allows users to use a "tight loop" in C with Brent, Ridder, and other root finders.

We decided it was okay to split up Newton

Is it okay to split up Newton, Halley's, and secant into different calls in cython_optimize?

I am personally pro this (wish it had been done that way in optimize), but maybe others will feel more strongly that the APIs should match.

We discussed which callbacks to support and the fact that cython_optimize should be pure C so it can free the GIL in this comment

This commit has links to annotated html that shows that zeros_struct and zeros_array are pure C, no Python so they can release the GIL to call Cython prange

The Cython optimize API in #8431 was discussed in this SciPy-Dev post and this one too when I specifically asked about callback signatures.

Issue 2:
My issue is about converting a large coo matrix (stored as npz) to csr format. The number of entries (including duplicates) in the coo matrix is 16,940,976,557. I tried converting it, but everytime it goes out of memory, despite the fact that I have 500 GB of memory in my machine.

import scipy.sparse as sp
coomat = sp.load_npz(input_file)
sp.save_npz(output_file, coomat.to_csr())

Done loading coomat in 1138.3824996530311 seconds
Traceback (most recent call last):
File "coo_to_csr.py", line 16, in <module>
sp.save_npz(output_file, coomat.tocsr())
File "/home/sidak/.conda/envs/myenv/lib/python3.6/site-packages/scipy/sparse/coo.py", line 392, in tocsr
indices = np.empty_like(col, dtype=idx_dtype)
MemoryError

import sys, scipy, numpy; print(scipy.__version__, numpy.__version__, sys.version_info)
1.1.0 1.15.1 sys.version_info(major=3, minor=6, micro=6, releaselevel='final', serial=0)

The coo matrix gets loaded in memory, but converting to csr, it creates another copy and then goes out of memory. Is there some more efficient way of doing this? or if I can in some way split the matrix in parts and combine?

It would be great if you can help me out on this. Thanks a lot! 😄
Issue 1:
I'm really sorry if this is a duplicate issue of #2997, but it seems to me that this is a little bit different. Here the .ix when getting a value interprets the integer as label, and when setting a value it interprets it as a positional index.

>>> import numpy as np
>>> import pandas as pd
>>> df = pd.DataFrame(np.arange(16).reshape((4, 4)),
columns=['a', 'b', 8, 'c'],
index=['e', 7, 'f', 'g'])
>>> df
a b 8 c
e 0 1 2 3
7 4 5 6 7
f 8 9 10 11
g 12 13 14 15
>>> df.ix['e', 8]
2
>>> df.ix['e', 8] = 42
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "pandas/core/indexing.py", line 90, in __setitem__
self._setitem_with_indexer(indexer, value)
File "pandas/core/indexing.py", line 190, in _setitem_with_indexer
values[indexer] = value
IndexError: index 8 is out of bounds for axis 1 with size 4
>>> df.loc['e', 8] = 42
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "pandas/core/indexing.py", line 90, in __setitem__
self._setitem_with_indexer(indexer, value)
File "pandas/core/indexing.py", line 190, in _setitem_with_indexer
values[indexer] = value
IndexError: index 8 is out of bounds for axis 1 with size 4

I see this issue with the 0.12 version and also with the latest git checkout.

Update: @jreback noticed that the .loc is not working either.

Issue 2:
Code Sample, a copy-pastable example if possible

python -c "import pandas as pd; df = pd.DataFrame(dict(a=[1, 1, 2, 3], b=[1, 2, 3, 4])); print(df.nsmallest(2, 'a'))"

Problem description

When using nlargest/nsmallest and the n largest / smallest values are identical, the method seems to return the dataframe concatenated with the filtered version of itself.

Furthermore if all values are identical, you get the full dataframe concatenated with itself, regardless of the choice of n

Expected Output

Not really sure, I guess in the example above you should simply get a dataframe that looks like this

pd.DataFrame(dict(a=[1, 1], b=[1, 2]))

however if you were to have

df = pd.DataFrame(dict(a=[1, 1, 1, 1], b=[1, 2, 3, 4]))

and asked for

df.nlargest(2, 'a') you should again get

pd.DataFrame(dict(a=[1, 1], b=[1, 2]))

Output of pd.show_versions()

INSTALLED VERSIONS
------------------
commit: None
python: 2.7.12.final.0
python-bits: 64
OS: Linux
OS-release: 4.8.0-34-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_IE.UTF-8
LOCALE: None.None

pandas: 0.19.2

nose: 1.3.7

pip: 9.0.1

setuptools: 28.3.0

Cython: 0.23.4

numpy: 1.12.0

scipy: 0.16.1

statsmodels: 0.6.1

xarray: None

IPython: None

sphinx: 1.3.1

patsy: 0.4.1

dateutil: 2.6.0

pytz: 2016.10

blosc: None

bottleneck: None

tables: 3.2.0

numexpr: 2.4.6

matplotlib: 1.5.0

openpyxl: None

xlrd: None

xlwt: None

xlsxwriter: None

lxml: None

bs4: None

html5lib: None

httplib2: 0.9.2

apiclient: None

sqlalchemy: 1.0.9

pymysql: None

psycopg2: None

jinja2: 2.8

boto: 2.38.0

pandas_datareader: None
Issue 1:
TypeScript Version:

1.8.10 / nightly (1.9.0-dev.20160515)

Code

// file ThingA.ts
export class ThingA { }

// file ThingB.ts
export class ThingB { }

// file Things.ts (re-export)
export {ThingA} from "./ThingA";
export {ThingB} from "./ThingB";

// file Test.ts (uses re-exported classes)
import * as things from "./Things";

export class Test {
public method = (input: things.ThingA) => { };
}

// compile
tsc Test.ts --declaration --outDir compiled

Expected behavior:

No errors

Actual behavior:

Test.ts(5,5): error TS4029: Public property 'method' of exported class has or is using name 'ThingA' from external module ".../ThingA" but cannot be named.

It seems declaration file can't be generated due to the things.ThingA reference, but in a similar case without re-exporting it works fine (I will give an example of this in the next post).

If I change the import statement in Test.ts to this:

import {ThingA,ThingB} from "./Things";

(instead of import * as things) and further use ThingA directly, there are no errors, but this defeats the purpose of re-exporting.

Issue 2:
interface A {
p: number
}
interface B {
p: string
}
type C = A & B; // suggest an error here
var c: C;
c.p = 1; // because it's impossible assign a number or
c.p = "x"; // a string to that property.
Issue 1:
...or until a script tag is added. I've found that the following is sufficient to get it started.

<script>""</script>

I suspect this has to do with a Chromium "no-JavaScript-efficiency" thing that is not being taken into account with the preload. Found on 0.34.0

I found this while battling a strange yet currently unticketable issue where if you open devtools for a webview on the did-start-loading event, jQuery does not have access to the document object (or something) and dies during require, wwhich does not happen if devtools is opened _after) did-finish-load.

Issue 2:
I have a very little demo like this:

<!DOCTYPE html>
<html>
<head>
<title>Hello World!</title>
</head>
<body>
<webview src="https://www.google.com/" autosize="on" minwidth="576" minheight="432"></webview>
</body>
</html>

When I run the application, I get a blank page, nothing displayed. But if I add some script to the page, the webview will render. e.g.:

<!DOCTYPE html>
<html>
<head>
<title>Hello World!</title>
</head>
<body>
<script>console.log("Hello World");</script>
<webview src="http://www.baidu.com/" autosize="on" minwidth="576" minheight="432"></webview>
</body>
</html>
Issue 1:
Add the PowerToys Run shortcut to the PowerToys 'Shortcut Guide' display

When the Shortcut Guide is displayed on the screen, the [Space] key shortcut which launches the PowerToys Run dialog is not shown.

Issue 2:
Would love to see the size of the zone by pixel count during editing. Possibly even percentage of total resolution. Another idea might be to put guides or a grid on the screen underneath the zone editor.
Issue 1:
Environment

Microsoft Windows [Version 10.0.19041.264]

Windows build number: [run "ver" at a command prompt]
PowerToys version:
PowerToysSetup-0.18.1-x64.msi
PowerToy module for which you are reporting the bug (if applicable):

Steps to reproduce

Does not search for files at all. Only searches through apps

alt space, search for a fiile or music file

Expected behavior

no results, search box only shows apps

Im expecting to see search resultsa that include files, system files, music, pictures, and videos

Actual behavior

Actual behavour only shows apps that are installed from store

Screenshots

https://1drv.ms/u/s!AqlJY73bUA7rhrtccXa8LhUXwcOEAA?e=NwBA8T

https://1drv.ms/u/s!AqlJY73bUA7rhrtdzuQGHGMuZqPvYw?e=Gd2Ty5

Issue 2:
Environment

Windows build number: Windows 10 Home Single Language 1909
PowerToys version: 0.18.1
PowerToy module for which you are reporting the bug (if applicable): Run

Steps to reproduce

The v0.18.1 is only able to search for programs but not individual files, even when running in administrator mode.

Expected behavior

The v0.18.0 could search for all files and programs. The same was expected of the update.

For the sake of complete reporting, I went back and installed v0.18.0 and did not experience the issue, which would rule out any problem caused by settings on the device.

Actual behavior

Screenshots
Issue 1:
I followed the guestbook guide and encountered below problem:

k8s version: release 0.13

Curl test

root@uminion:~# curl "192.168.40.11:8000/index.php?cmd=set&key=messages&value=jay_sais_hi"
<br />
<b>Fatal error</b>: Uncaught exception 'Predis\Connection\ConnectionException' with message 'php_network_getaddresses: getaddrinfo failed: Name or service not known [tcp://redis-master:6379]' in /vendor/predis/predis/lib/Predis/Connection/AbstractConnection.php:141
Stack trace:
#0 /vendor/predis/predis/lib/Predis/Connection/StreamConnection.php(96): Predis\Connection\AbstractConnection-&gt;onConnectionError('php_network_get...', 0)
#1 /vendor/predis/predis/lib/Predis/Connection/StreamConnection.php(70): Predis\Connection\StreamConnection-&gt;tcpStreamInitializer(Object(Predis\Connection\ConnectionParameters))
#2 /vendor/predis/predis/lib/Predis/Connection/AbstractConnection.php(96): Predis\Connection\StreamConnection-&gt;createResource()
#3 /vendor/predis/predis/lib/Predis/Connection/StreamConnection.php(144): Predis\Connection\AbstractConnection-&gt;connect()
#4 /vendor/predis/predis/lib/Predis/Connection/AbstractConnection.php(181): Predis\Connection\StreamConnection-&gt;connect()
#5 /vendor/predis/predis/lib/Predis/Connection/StreamConnecti in <b>/vendor/predis/predis/lib/Predis/Connection/AbstractConnection.php</b> on line <b>141</b><br />

I don't know why they are there.

Flannel IP

Flannel's IP is same in all minions, Is that all right?

Issue 2:
Something is leaving a PD around and causing kube-up on GCE to block partway up (which is disruptive when you're trying to just create a cluster while grabbing coffee):

Looking for already existing resources
Persistent disk kubernetes-kube-system-kube-registry found.
Would you like to shut down the old cluster (call kube-down)? [y/N]
Starting master and configuring firewalls

I've had this happen pretty consistently on a clean project, clean build, kube-down / kube-up. Seems like an easy bug to fix.
Issue 1:
ISSUE TYPE

Bug Report

COMPONENT NAME

include_role

ANSIBLE VERSION

ansible 2.3.1.0
config file =
configured module search path = Default w/o overrides
python version = 3.6.1 (default, Jul 6 2017, 10:09:38) [GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.42)]

OS / ENVIRONMENT

N/A

SUMMARY

include_role doesn't support changed status, making it impossible to trigger handlers or further activities based on include_role invocation.

STEPS TO REPRODUCE

- include_role: {name: other_role}
register: role
- debug:
msg: '{{role.changed}}'

EXPECTED RESULTS

role.changed would be true if any task within included role was changed

ACTUAL RESULTS

role is empty

Issue 2:
Issue Type:

Bug Report

Ansible Version:

1.5.3

Environment:

Ubuntu 13.10

Summary:

New EC2 machines cannot be added to EC2 load balancers without producing an error.

Steps To Reproduce:

Attempt to add a new EC2 server to an existing LB.

Expected Results:

The server is added to the Load balancer.

Actual Results:

failed: [ec2-54-82-200-114.compute-1.amazonaws.com] => (item=ec2-54-196-51-24.compute-1.amazonaws.com) => {"failed": true, "item": "ec2-54-196-51-24.compute-1.amazonaws.com"}
msg: failed to find the initial state of the load balancer
failed: [ec2-54-82-200-114.compute-1.amazonaws.com] => (item=ec2-54-82-200-114.compute-1.amazonaws.com) => {"failed": true, "item": "ec2-54-82-200-114.compute-1.amazonaws.com"}
msg: failed to find the initial state of the load balancer
Issue 1:
TypeScript Version:

typescript@1.8.9

typescript@1.9.0-dev.20160330

Code

function isFunction(item: any): item is Function {
return typeof item === `function`;
}
function isString(item: any): item is String {
return typeof item === `string`;
}

const example: string | Function = function () { };

if (isFunction(example)) {
['a', 'b', 'c'].filter(item => example(item));
} else if (isString(example)) {
example.toUpperCase();
}

Expected behavior:

No errors are thrown.

Actual behavior:

Works fine in 1.8.9

Throws in 1.9.0-dev.20160330

foo.ts(11,36): error TS2349: Cannot invoke an expression whose type lacks a call signature.

Issue 2:
This is a place holder for changes to the type narrowing behavior in TypeScript 2.0:

Generic type parameters are now narrowed

function g<T>(obj: T) {
var t: T;
if (obj instanceof RegExp) {
t = obj; // RegExp is not assignable to T
}
}

See the explanation by @Arnavion in #7719 (comment)

Type narrowing does not work for catprued variables in functions and class expressions

export class Class {
constructor(public p) { }
}

var c: Class | string;
var x: Class;

if (c instanceof Class) {
function inner() {
x = c; // Error, type of c is not narrowed, c is Class | string
}
x = c; // OK, c is Class
}
Issue 1:
As I checked the code, there is no possibility to disable react-hot-loader warnings.

What Next.js team does? Ignore them? Thank you.

https://github.com/gaearon/react-hot-loader#disable-warnings

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

Expected Behavior

Current Behavior

Unexpected token function G:\huxinmin.github.io\nextJs\.next\dist\pages\index.js:65 value: async function getInitialProps() { ^^^^^^^^ SyntaxError: Unexpected token function at Object.exports.runInThisContext (vm.js:76:16) at Module._compile (module.js:542:28) at Module._compile (G:\huxinmin.github.io\nextJs\node_modules\_source-map-support@0.4.15@source-map-support\source-map-support.js:483:25) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at _callee$ (G:\huxinmin.github.io\nextJs\node_modules\_next@3.2.2@next\dist\server\require.js:33:46)

Steps to Reproduce (for bugs)

clone data-fetch example and npm install and npm run dev

see 127.0.0.1:3000 in browser

the package.json is { "name": "nextJs", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "dev": "next", "build": "next build", "start": "next start" }, "keywords": [], "author": "", "license": "ISC", "dependencies": { "isomorphic-fetch": "^2.2.1", "next": "latest", "react": "^15.4.2", "react-dom": "^15.4.2" } }

Context

I did all same as the example told but can not successful , I was very sad and ask for help

Your Environment

Tech
Version

next
3.2.2

node
6.10. 0

OS
windows

browser
chrome

etc
Issue 1:
The transform-runtime plugin results in errors when doing catch-all reexporting (export * from 'something';).

Input Code

package.json:

"plugins": ["transform-runtime"]

Say you have 3 files:

a.js:

const a = 1;
export { a };

b.js:

export * from './a.js';

c.js:

import a from './b.js';

The result from running babel-node is:

import _Object$defineProperty from 'babel-runtime/core-js/object/define-property';
^^^^^^

SyntaxError: Unexpected token import
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:588:28)
at loader (/home/cmcdragonkai/Projects/js-virtualfs/node_modules/babel-register/lib/node.js:144:5)
at Object.require.extensions.(anonymous function) [as .js] (/home/cmcdragonkai/Projects/js-virtualfs/node_modules/babel-register/lib/node.js:154:7)
at Module.load (module.js:545:32)
at tryModuleLoad (module.js:508:12)
at Function.Module._load (module.js:500:3)
at Module.require (module.js:568:17)
at require (internal/module.js:11:18)

I'm using babel-plugin-transfrom-runtime at 6.23.0 and babel-runtime at 6.26.0.

Issue 2:
I am attempting to use transform-runtime in combination with code that uses the export * from 'x' statement. The code that is generated during transpilation includes an import statement for core-js' define-property. I'm using the es2015 preset, so I would expect that a require statement would be generated, not an import.

Small sample project at https://gist.github.com/mdouglass/a6a5c5aae68ac03a92d3