WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Code Sample, a copy-pastable example if possible

# Your code here
import pandas as pd
df = pd.DataFrame([[1,2],[1,2]],columns=['a','b'])
print df.apply(lambda x: {'s':x['a']+x['b']},1)
################
# (AS EXPECTED)
# output:
# 0 {u's': 3}
# 1 {u's': 3}
# dtype: object
################

# add one new column with type Timestamp
df['tm'] = [pd.Timestamp('2017-05-01 00:00:00'),pd.Timestamp('2017-05-02 00:00:00')]
print df.apply(lambda x: {'s':x['a']+x['b']},1)

################
#(WRONG OUTPUT)
# output:
# a b tm
# 0 NaN NaN NaN
# 1 NaN NaN NaN
################

Problem description

when the return type of apply function is dict, if a new column with type Timestamp is added to the dataframe, the result will be unexpected even if the apply function is unchanged

Output of pd.show_versions()

commit: None

python: 2.7.13.final.0

python-bits: 64

OS: Darwin

OS-release: 14.5.0

machine: x86_64

processor: i386

byteorder: little

LC_ALL: None

LANG: zh_CN.UTF-8

LOCALE: None.None

pandas: 0.20.3

pytest: None

pip: 9.0.1

setuptools: 36.0.1

Cython: 0.25.2

numpy: 1.13.1

scipy: 0.19.1

xarray: None

IPython: 5.4.1

sphinx: None

patsy: 0.4.1

dateutil: 2.6.1

pytz: 2017.2

blosc: None

bottleneck: None

tables: None

numexpr: None

feather: None

matplotlib: 2.0.2

openpyxl: None

xlrd: 1.0.0

xlwt: None

xlsxwriter: 0.9.6

lxml: None

bs4: None

html5lib: 0.999999999

sqlalchemy: 1.1.14

pymysql: 0.7.11.None

psycopg2: None

jinja2: 2.9.6

s3fs: None

pandas_gbq: None

pandas_datareader: None

Issue 2:
Hello guys, I'm using the apply method with axis=1 argument and returning a list for each row. The weird thing is when the length of this list is equal to the number of features in the original dataframe, this apply returns another dataframe, and a series if anything else. I don't know if this is intended, but it was very unexpected.

import numpy as np
import pandas as pd

df = pd.DataFrame(np.random.randn(6, 3), columns=['A', 'B', 'C'])

ans1 = df.apply(lambda x: [1, 2, 3], axis=1)
ans2 = df.apply(lambda x: [1, 2], axis=1)

assert type(ans1) is pd.DataFrame
assert type(ans2) is pd.Series
Issue 1:
Julia Version: 1.1.0

rand(10) returns a 10-element Array{Float64, 1}.

rand.(10) returns the same thing, but of course with different numbers.

rand(10) .< 0.3 works, returning a 10-element BitArray{1}.

rand.(10) .< 0.3 screams:

julia> rand.(10) .< 0.3
ERROR: MethodError: no method matching isless(::Array{Float64,1}, ::Float64)
Closest candidates are:
isless(::Float64, ::Float64) at float.jl:459
isless(::Missing, ::Any) at missing.jl:70
isless(::AbstractFloat, ::AbstractFloat) at operators.jl:148
...
Stacktrace:
[1] <(::Array{Float64,1}, ::Float64) at .\operators.jl:260
[2] _broadcast_getindex at .\broadcast.jl:578 [inlined]
[3] getindex at .\broadcast.jl:511 [inlined]
[4] copy at .\broadcast.jl:763 [inlined]
[5] materialize(::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{0},Nothing,typeof(<),Tuple{Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{0},Nothing,typeof(rand),Tuple{Int64}},Float64}}) at .\broadcast.jl:753
[6] top-level scope at none:0

It doesn't seem right.

I encountered the issue on a more complex line, where I had been using @. at the beginning for convenience. It also does not work like that either.

Issue 2:
Following the discussion in this issue an Array is constructed as

Array{T}(undef, shape...)

A SharedArray however is still constructed using

SharedArray{T}(shape...)

Having asked about this on the Discourse forum, @rdeits suggested aligning the SharedArray API to that of general arrays, which seems like a good idea to me.
Issue 1:
I'm submitting a ... (check one with "x")

[x] bug report
[x] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

When you bind validation attributes the ngModel doesn't expose the correct errors.

When I set binding for minlength attribute ngModel.errors never expose minlength error.

When I set binding for pattern attribute ngModel.error has pattern error but with wrong pattern value (^null$).

Expected/desired behavior

ngModel.errors has to expose the correct errors.

For minlength validation ngModel.errors has to expose {"minlength": { "requiredLength": 2, "actualLength": 1}

For pattern validation ngModel.errors has to expose { "pattern" : ....}

Reproduction of the problem

Here is the plunkr: http://plnkr.co/edit/BCJ8wMpaYMT7PdrpgAFI

There are two inputs with validation attributes showing value, classes and ngModel validation errors.

The first one has attributes setted with values and works fine.

The second one has validation attribute bindings on require, minlength, maxlength and pattern, but only required works fine, minlength never apperars in validation errors and pattern has wrong value (example: { "pattern": { "requiredPattern": "^null$", "actualValue": "dd" } }). maxlength seems to work fine but I think that it is due to native HtmlInputElement implementation.

What is the expected behavior?

I think we should able to bind minlength and maxlength directly without ' attr.' preffix, but the most important is that ngModel.errors can to expose the correct error to be used to show error messages.

What is the motivation / use case for changing the behavior?

We need validation attribute binding in order to create custom input components.

For example you can see md-input implementation of angular material 2 it has [attr.minlength] binding however its doesn't work ...

Please tell us about your environment:

Angular version: 2.0.0-rc.4

Browser: [all ]

Language: [TypeScript]

Issue 2:
For example, in my demo I start with

`import {Component} from 'angular2/angular2';

and then I immediately show how cool it is that I can navigate to definition of that symbol and read the documentation, and how it's guaranteed to be the correct docs for this version (unlike some blog post).

But the documentation says

{@link ComponentMetadata} factory function.

so okay, I can click through again to the definition, by observing that it probably lives on the type declared on the following line

export declare var Component: ComponentFactory;

and on ComponentFactory I find what I want.

But this makes the demo kind of lame, and has an unneeded extra hop for what's likely to be the most common "jump to docs" use case. (Also the Java jokes will commence when users see everything is a "Factory").

Can we still change this, or is there a reason it has to be this way? @mhevery?

the docs don't appear for properties like 'templateUrl' because that is re-declared separate from the Metadata class

the {@link} syntax is not navigable in VSCode
Issue 1:
PLEASE INCLUDE REPRO INSTRUCTIONS AND EXAMPLE CODE

Simply click on profiler and baam!!

Please do not remove the text below this line

DevTools version: 4.0.3-95ffd3c

Call stack: at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:11:11441

at Map.forEach ()

at commitIndex (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:11:11387)

at e.getRankedChartData (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:11:11920)

at _i (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:56:277079)

at Ha (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:55890)

at bi (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:62939)

at Xl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:99535)

at Hl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:84255)

at Fl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:81285)

Component stack: in _i

in div

in div

in div

in Or

in Unknown

in n

in Unknown

in div

in div

in Ha

in le

in ve

in ko

in Ul

Issue 2:
PLEASE INCLUDE REPRO INSTRUCTIONS AND EXAMPLE CODE

I got this error when I click 'Ranked'.

Please do not remove the text below this line

DevTools version: 4.0.4-3c6a219

Call stack: at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:11:11441

at Map.forEach ()

at commitIndex (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:11:11387)

at e.getRankedChartData (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:11:11920)

at _i (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:56:277123)

at Ha (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:55890)

at Xl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:98280)

at Hl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:84255)

at Fl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:81285)

at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:25363

Component stack: in _i

in div

in div

in div

in Or

in Unknown

in n

in Unknown

in div

in div

in Ha

in le

in ve

in ko

in Ul
Issue 1:
VSCode Version: 1.1

OS Version: Linux rpm

Steps to Reproduce:

rpm is called vscode-x86_64.rpm

when installing the package is called

code-1.1.1-1463146452

normal convention would be to have the rpm name be the -same- as the package name that's installed and to also add a distribution version in it (el6, el7,...)

so for rhel,centos,ol,scientific Linux,...

it should be 👍

download code-1.1.1-146314652.el7.x86_64.rpm and install code-1.1.1-146314652 or

download vscode-1.1.1-146314652.el7.x86_64.rpm and instal vscode-1.1.1-146314652

Issue 2:
As per convention.
Issue 1:
session_id() is called before session_start() thus it returns emtpy string and new random session id set.

This fixes it (and removes duplicate code):

diff --git a/src/Symfony/Component/HttpFoundation/SessionStorage/FilesystemSessionStorage.php b/src/Symfony/Component/HttpFoundation/SessionStorage/FilesystemSessionStorag
index 562bfd2..b09b0a1 100644
--- a/src/Symfony/Component/HttpFoundation/SessionStorage/FilesystemSessionStorage.php
+++ b/src/Symfony/Component/HttpFoundation/SessionStorage/FilesystemSessionStorage.php
@@ -35,18 +35,8 @@ class FilesystemSessionStorage extends NativeSessionStorage
if ($this->started) {
return;
}
-
- session_set_cookie_params(
- $this->options['lifetime'],
- $this->options['path'],
- $this->options['domain'],
- $this->options['secure'],
- $this->options['httponly']
- );
-
- if (!ini_get('session.use_cookies') && isset($this->options['id']) && $this->options['id'] && $this->options['id'] != session_id()) {
- session_id($this->options['id']);
- }
+
+ parent::start();

if (!session_id()) {
session_id(hash('md5', uniqid(mt_rand(), true)));

But it's only for illustration of the issue because after session_start() one should not use session_id($id) to set another id.

At least that is what I understand from: http://marker.to/iVZeca#marker

Issue 2:
I believe I have found a bug in the Form or Validator component.

If you have a data_class that uses the camel case naming strategy for it's properties, and in your FormType you use underscores for the field names, the data gets mapped between the form and the object properly, but the errors for the underscored fields get bubbled to the parent form.

For instance, say you have a FormType with a data_class of Company. The Company class has a property named numberOfEmployees. In a FormType for this class, you can call your field number_of_employees, and the data currently gets mapped between the Form and the Company class properly. But say you have a constraint on the Company::$numberOfEmployees property, the resulting error for the number_of_employees field will appear on the parent form, and not on the field itself.

This doesn't occur if you use camelcase for the FormType field names, but this isn't always desired, as many times the HTML convention is to use underscores for field names and identifiers.

I was able to reproduce this issue for the latest Symfony and will begin working on a patch if someone can confirm this is a bug. Let me know if I need to clarify anything or if this is a duplicate as well.
Issue 1:
Is this a request for help? (If yes, you should use our troubleshooting guide and community support channels, see http://kubernetes.io/docs/troubleshooting/.):

There is no metrics in volume manager and controllers (i.e. attach/detach and provision controllers). It is hard to get latency and stats.

What keywords did you search in Kubernetes issues before filing this one? (If you have found any duplicates, you should instead reply there.):

metrics, volume

Is this a BUG REPORT or FEATURE REQUEST? (choose one):

FEATURE REQUEST

Kubernetes version (use kubectl version):

Environment:

Cloud provider or hardware configuration:

OS (e.g. from /etc/os-release):

Kernel (e.g. uname -a):

Install tools:

Others:

What happened:

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else do we need to know:

Issue 2:
http://kubekins.dls.corp.google.com/view/Scalability/job/kubernetes-e2e-gce-scalability/7705/

https://console.cloud.google.com/storage/browser/kubernetes-jenkins/logs/kubernetes-e2e-gce-scalability/7705
Issue 1:
by benjamin.heatwole:

$GOOS = linux
$GOARCH = amd64
hg identify = f7e1cbc5ce28 tip

Code demonstrating the problem:

func main() {
var min float32 = math.MinFloat32
var minPlusOne float32 = min + 1.0
var negOne float32 = -1.0
var zero float32 = 0.0
var one float32 = 1.0

// All these should be true, but only the comparison with a
positive number works
fmt.Println("Testing comparisons using math.MinFloat32 ... ")
fmt.Printf("%v > %v = %v\n", negOne, min, negOne > min)
fmt.Printf("%v > %v = %v\n", zero, min, zero > min)
fmt.Printf("%v > %v = %v\n", one, min, one > min)
fmt.Println()

// Adding one to MinFloat32 doesn't help
fmt.Println("Testing comparisons using math.MinFloat32 + 1 ... ")
fmt.Printf("%v > %v = %v\n", negOne, minPlusOne, negOne >
minPlusOne)
fmt.Printf("%v > %v = %v\n", zero, minPlusOne, zero > minPlusOne)
fmt.Printf("%v > %v = %v\n", one, minPlusOne, one > minPlusOne)
fmt.Println()

// Using another small value works
var small float32 = -999999.0
fmt.Println("Testing comparisons using -999999.0 ... ")
fmt.Printf("%v > %v = %v\n", negOne, small, negOne > small)
fmt.Printf("%v > %v = %v\n", zero, small, zero > small)
fmt.Printf("%v > %v = %v\n", one, small, one > small)
fmt.Println()

// One final test
fmt.Println("Testing 0 == MinFloat32 ... ")
fmt.Printf("%v == %v = %v\n", zero, min, zero == min)
}

Output is:

Testing comparisons using math.MinFloat32 ...
-1 > 1e-45 = false
0 > 1e-45 = false
1 > 1e-45 = true

Testing comparisons using math.MinFloat32 + 1 ...
-1 > 1 = false
0 > 1 = false
1 > 1 = false

Testing comparisons using -999999.0 ...
-1 > -999999 = true
0 > -999999 = true
1 > -999999 = true

Testing 0 == MinFloat32 ...
0 == 1e-45 = false

As you can see from the tests, MinFloat32 is being printed as "1e-45" but
internally its treating the value as "0" in some cases (the second test
with MinFloat32+1 prints as "1"), but not in others (the last test of 0 ==
MinFloat32 is false).

I'm not sure entirely what's going on, but something is goofy.

Issue 2:
What steps will reproduce the problem?

1.edit tt.go

package main

import "net"

func main() {
cname, addrs, e := net.LookupHost("boromir");
if e != nil {
e2 := e.(*net.DNSError);
println(cname, addrs, e2.Error, e2.Name, e2.Server);
}
}

2.6g tt.go && 6l tt.6 && ./6.out

expected nothing, but got:

[0/0]0x0 no such host boromir.

What is your $GOOS? $GOARCH?

Linux, AMD64

Which revision are you using? (hg identify)

5074575b745b+ tip

Please provide any additional information below.

davies@boromir ~/go $ 6g tt.go && 6l tt.6 && ./6.out
[0/0]0x0 no such host boromir.
davies@boromir ~/go $ ping boromir
PING boromir (192.168.1.13) 56(84) bytes of data.
davies@boromir ~/go $ uname -a
Linux boromir 2.6.22-gentoo-r9 #7 SMP Wed Dec 2 11:46:00 CST 2009 x86_64
Quad-Core AMD Opteron(tm) Processor 2344 HE AuthenticAMD GNU/Linux
Issue 1:
#31359

Issue 2:
Hi all,

Trying to build Tensorflow for iOs. The step tensorflow/contrib/makefile/build_all_ios.sh after around 20 minutes of building returns errors including duplicate symbols for architecture armv7. Please find the details bellow.

Environment info

Operating System: Mac OS X 10.11.6 (15G31)

Xcode 7.3.1 (7D1014)

Steps to reproduce

In terminal:

git clone git@github.com:tensorflow/tensorflow.git

cd tensorflow

tensorflow/contrib/makefile/download_dependencies.sh

tensorflow/contrib/makefile/build_all_ios.sh

What have you tried?

Removing the repository directory and going through the steps again.

Going through "Building by hand" steps described here. Error: ld: 44 duplicate symbols for architecture armv7s (Error log).

Error log (Full log)

...

ld: 44 duplicate symbols for architecture armv7

clang: error: linker command failed with exit code 1 (use -v to see invocation)

make: *** [/Users/b0915218/Xcode/tensorflow/tensorflow/contrib/makefile/gen/bin/ios_ARMV7/benchmark] Error 1

+ '[' 2 -ne 0 ']'

+ echo 'armv7 compilation failed.'

armv7 compilation failed.

+ exit 1
Issue 1:
Wasn't sure how to phrase this one so forgive me for the bad name, however I will explain!

I have two issues with VSC currently complaining about the following lines (arrow indicates red squiggly line).

$pushes: (
alpha : 40px,
// ^
beta : 30px,
// ^
gamma : 25px
);

The first arrows message is: ") expected" and the second "} expected".

@each $spacingName, $spacingValue in $pushes {
// ^
@include pushes($spacingName);
}

The arrows message is "in expected".

Hope this makes sense. Thanks.

Issue 2:
If I add a map to a scss file, e.g. "$map: (key1: value1, key2: value2, key3: value3);" it shows as an error. Red squiggly appears under the ":" after the first key and hover message reads ") expected". Despite the error in editor node-sass evaluates map-get correctly over it.
Issue 1:
Challenge Name

Issue Description

Browser Information

Browser Name, Version:

Operating System:

Mobile, Desktop, or Tablet:

Your Code

// If relevant, paste all of your challenge code in here

Screenshot

Issue 2:
Challenge Name

Video Challenges - Computer Basics

https://www.freecodecamp.com/videos/computer-basics-how-to-measure-data-size

Issue Description

I have watched How to Measure Data Size and answered the questions 3 times now and it is not marking it as complete. Same thing with Measuring Data Speed.

Browser Information

Browser Name, Version: Google Chrome 50.0.2661.94 m

Operating System: Windows 10

Mobile, Desktop, or Tablet: laptop

Your Code

// If relevant, paste all of your challenge code in here

Screenshot
Issue 1:
Version

2.6.10

Reproduction link

https://codepen.io/15757115286/pen/MWgZYgg

Steps to reproduce

collect garbage and take a snapshot before click the button toggleB

2.click button toggleB, change the value of the input

3.click button toggle A, make sure the external dynamic component is componentA

4.collect garbage and take a snapshot

What is expected?

the delta of the VueComponent is 0

What is actually happening?

the delta of the VueComponent is bigger than 0

the version of the chrome is 77.0.3865.90

when toggle the componet repeatedly, the count of VueComponent in memory is always increase

Issue 2:
Version

2.6.10

Reproduction

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Document</title>
</head>
<body>
<script src="https://unpkg.com/vue"></script>

<div id="app">
<div id="nav">
<button @click="goHome">go to Home</button>
<button @click="goAbout">go to About</button>
</div>
<component :is="current"></component>
</div>

<script>
const Home = {
name: 'Home',
template: `
<div>
<h2>Home</h2>
</div>
`,
}

const About = {
template: `
<div class="about">
<h1>This is an about page</h1>
<input type="text" v-model="input">
</div>
`,
name: 'about',
data: () => ({
input: '',
}),
}

const vm = new Vue({
el: '#app',
data() {
return {
current: 'Home',
}
},

methods: {
goHome() {
this.current = 'Home'
},
goAbout() {
this.current = 'About'
},
},
components: { Home, About },
})
</script>
</body>
</html>

Steps to reproduce

go to the about page

type in the input

leave the page

collect garbage and take a snapshot with devtools

What is expected?

VueComponent count should be stable

What is actually happening?

VueComponent count keeps increasing.

seems to be related to typing in the input
Issue 1:
We should consider implementing a command that would essentially evaluate a script and its dependencies and output a JSON structure representing the important documentation information for that code. This then could be used and ingested to generate static site documentation content for personal use or as part of a registry.

The TypeScript compiler API guide actually has a nice little example of how to walk the TypeScript AST and write out types to a JSON structure.

For prior art or standards, I did a bit of research. Looking at JSDoc3, it does not directly support a JSON structure, it emits HTML. It has some plugins that allow you to change how it renders, but there is no good intermediary standard. TypeDoc can produce an intermediary JSON blob, but it then can't ingest that for static site generation. Even then the structure of the TypeDoc JSON still has some strong opinions about how code is done, which is not ideal way. I really think we need to try to find something that meets our needs as there isn't really a good starting point that I can find.

Refs #2355 - deno ast script.ts the challenge I think is that there is there is a lot of information in there that is "useless" to the task of generating documentation, and some things are a bit hard to get to. I think a structure that is more focused on documentation might be a better idea.

cc/ @j-f1

Issue 2:
V8 offers the possibility to generate code coverage

ref: https://v8.dev/blog/javascript-code-coverage#for-embedders

I've already started writting a lcov parser : https://github.com/zekth/deno-lcov (ATM use standard lcov file but can be ported to v8 coverage files)

I think it would be really usefull for deno_std test modules and even for the core js of deno, to see what is really tested or not.