WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
After many consecutive ORs in Golang, the code highlighting is messed up till the end of the file.

Code is obviously valid and compiles correctly.

Issue 2:
I opened a Python file with the following line (#963):

PrintAndLog(u"SSID: " + RememberedNetwork["SSIDString"].decode("utf-8") + u" - BSSID: " + RememberedNetwork["CachedScanRecord"]["BSSID"] + u" - RSSI: " + str(RememberedNetwork["CachedScanRecord"]["RSSI"]) + u" - Last connected: " + str(RememberedNetwork["LastConnected"]) + u" - Security type: " + RememberedNetwork["SecurityType"] + u" - Geolocation: " + Geolocation, "INFO")

Which led to the following bug:

You can find this as the main file in osxauditor.py.
Issue 1:
Electron version: 1.4.7

Operating system: OSX 10.12.1

Expected behavior

// in the render
var webview = document.querySelector('webview');

webview.addEventListener('will-navigate', function(e){
e.preventDefault(); // should prevent webview navigation

console.log(e);
// e.defaultPrevented: false
});

Also webview.stop() has no effect.

Actual behavior

The webview navigates to the target

How to reproduce

See code above.

Issue 2:
It would be very useful to get events related to navigation:

will-navigate: when the webview is about to navigate (url have been changed but no requests have been emited yet). It could eventually be cancelled with event.preventDefault())

page-url-set: like page-title-set but for url. It is different than before-navigate because it should also handle anchor changes and HTML5 url set without navigating (with history.pushState and history.replaceState)

did-navigate: after the navigation has occured (i.e. when a new entry have been pushed to history and canGoBack/canGoForward/canGo... may have changed)
Issue 1:
Issue originally made by @jonathanong

Bug information

Babel version: 6.2.0

Node version: 5.1.0

npm version: 3.3.12

Options

{
"presets": [
"es2015",
"stage-0",
"react"
],
"plugins": [
"lodash",
"transform-runtime"
]
}

Input code

'use strict'

export default async function a(x) {
return 2 * b(x)
}

async function b(x) {
return x + 1
}

Description

The output is:

'use strict';

var b = (function () {
var ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2(x) {
return _regenerator2.default.wrap(function _callee2$(_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
case 0:
return _context2.abrupt('return', x + 1);

case 1:
case 'end':
return _context2.stop();
}
}
}, _callee2, this);
}));
return function b(_x2) {
return ref.apply(this, arguments);
};
})();

Object.defineProperty(exports, "__esModule", {
value: true
});

var _regenerator = require('babel-runtime/regenerator');

var _regenerator2 = _interopRequireDefault(_regenerator);

var _asyncToGenerator2 = require('babel-runtime/helpers/asyncToGenerator');

var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

exports.default = (function () {
var ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(x) {
return _regenerator2.default.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
return _context.abrupt('return', 2 * b(x));

case 1:
case 'end':
return _context.stop();
}
}
}, _callee, this);
}));
return function a(_x) {
return ref.apply(this, arguments);
};
})();

_asyncToGenerator3 and _regenerator2 are used before they are defined. the runtime require()s should be at the top!

Issue 2:
hi.

seems like babel@4.6.x -> babel@4.7.1 has some regression bug, because that code worked fine on previous version:

const obj = {
symbol: Symbol()
};

class Foo {
[obj.symbol]() {
console.log(123);
}
}

const foo = new Foo();

foo[obj.symbol]();

├── babel@4.7.1
├── babel-core@4.7.1
├── babel-runtime@4.7.1

babel test.js -o test.es5.js -i runtime

test/node_modules/babel/lib/babel/helpers/parse.js:54
throw err;
^
RangeError: test.js: Maximum call stack size exceeded
at new Number (native)
at t.cloneDeep (test/node_modules/babel/lib/babel/types/index.js:473:19)
at Array.map (native)
at Object.t.cloneDeep (test/node_modules/babel/lib/babel/types/index.js:480:19)
at t.cloneDeep (test/node_modules/babel/lib/babel/types/index.js:478:17)
at Array.map (native)
at Object.t.cloneDeep (test/node_modules/babel/lib/babel/types/index.js:480:19)
at t.cloneDeep (test/node_modules/babel/lib/babel/types/index.js:478:17)
at Array.map (native)
at Object.t.cloneDeep (test/node_modules/babel/lib/babel/types/index.js:480:19)

but this is still working:

const symbol = Symbol();

class Foo {
[symbol]() {
console.log(123);
}
}

const foo = new Foo();

foo[symbol]();
Issue 1:
I wanted to make a FacetGrid plot with some offset.

Basic code:

import seaborn as sns
sns.set(style="ticks", color_codes=True)
tips = sns.load_dataset("tips")
g = sns.FacetGrid(tips, col="time", row="smoker")
g = g.map(plt.hist, "total_bill")

Now with offset:

tips = sns.load_dataset("tips")
g = sns.FacetGrid(tips, col = 'time', row='sex')
g.despine(offset=10)
g = g.map(plt.hist, "tip")

So the x- and y-label return in the inner axes, which is not what I want.

I looked in the code for the class definition of FacetGrid, and applied the same code to remove the labels on the inner axes.

The code I used as a base for my workaround:

link to code

# Now we turn off labels on the inner axes
if sharex:
for ax in self._not_bottom_axes:
for label in ax.get_xticklabels():
label.set_visible(False)
ax.xaxis.offsetText.set_visible(False)
if sharey:
for ax in self._not_left_axes:
for label in ax.get_yticklabels():
label.set_visible(False)
ax.yaxis.offsetText.set_visible(False)

generate the figure:

tips = sns.load_dataset("tips")
g = sns.FacetGrid(tips, col = 'time', row='sex')
g.despine(offset=10)
g = g.map(plt.hist, "tip")

for ax in g.axes[:, 1:].flat:
for label in ax.get_yticklabels():
label.set_visible(False)
ax.yaxis.offsetText.set_visible(False)

for ax in g.axes[:-1, :].flat:
for label in ax.get_xticklabels():
label.set_visible(False)
ax.xaxis.offsetText.set_visible(False)

My workaraound works, so no issues there. But I feel that this is not the behaviour you would expect from FacetGrid. I could not find the code in utils/despine which would be responsible for the behaviour.

original stackoverflow post

Issue 2:
Setup:

samples = 1

df = pd.DataFrame()

for batch_size in range(31):
samples = samples/(1+scipy.stats.expon.rvs(loc=0, scale=1/1000, size=10000))
df = df.append(dict(batch_size=batch_size, samples=samples), ignore_index=True)

exploded_df = df.explode("samples")

The following:

sns.displot(data=exploded_df[exploded_df.batch_size % 10 == 0], col="batch_size", x="samples", kind="hist")

takes forever (aborted after a minute or so), while

g = sns.FacetGrid(data=exploded_df[exploded_df.batch_size % 10 == 0], col="batch_size", sharey=False)

def plot_histplot(metric, color, data):
sns.histplot(x=np.array(data[metric]), color=color)

g.map_dataframe(plot_histplot, "samples")

works right away. (g.map_dataframe(sns.histplot, "samples") also takes ages, so it might be the call to np.array that speeds things up?)

The first version seems to spend most of its time in:

comp_data()->__setitem__()->_get_setitem_indexer()->_convert_to_indexer()->_get_listlike_indexer()->_reindex_non_unique()->get_indexer_non_unique()->resize()

Confounder:

If I recreate explode_df using dummy data:

exploded_df = pd.DataFrame(dict(batch_size=np.random.choice(31, 10000*31), samples=np.random.normal(size=10000*31)))

both are fast. So it might seem there is something about the DataFrame that makes it slow?

seaborn 0.11.2

pandas 1.1.5

pandas-datareader 0.9.0

pandas-gbq 0.13.3

pandas-profiling 1.4.1

sklearn-pandas 1.8.0

Thanks,

Andreas
Issue 1:
Steps to Reproduce

Use any branch on or after commit a2951a9

Run the release build with flutter run --release

The app will crash on launch

Logs

05-08 10:53:31.033 495 495 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
05-08 10:53:31.033 495 495 F DEBUG : Build fingerprint: 'Verizon/trltevzw/trltevzw:6.0.1/MMB29M/N910VVRU2CQL1:user/release-keys'
05-08 10:53:31.033 495 495 F DEBUG : Revision: '12'
05-08 10:53:31.033 495 495 F DEBUG : ABI: 'arm'
05-08 10:53:31.033 495 495 F DEBUG : pid: 12282, tid: 12310, name: 1.ui >>> com.clanhq.app <<<
05-08 10:53:31.033 495 495 F DEBUG : signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x9eb57000
05-08 10:53:31.053 495 495 F DEBUG : r0 9c5fd04d r1 9dcc0021 r2 9dcc0021 r3 9eb56fff
05-08 10:53:31.053 495 495 F DEBUG : r4 9dcc0021 r5 9dcc37b1 r6 9dcc2df9 r7 00000003
05-08 10:53:31.053 495 495 F DEBUG : r8 9c2fefe9 r9 00000000 sl adc9c800 fp 9ee527fc
05-08 10:53:31.053 495 495 F DEBUG : ip 9dcc0021 sp 9ee527e8 lr b2aa7168 pc b2aa73dc cpsr 000b0010
05-08 10:53:31.053 495 495 F DEBUG :
05-08 10:53:31.053 495 495 F DEBUG : backtrace:
05-08 10:53:31.053 495 495 F DEBUG : #00 pc 000003dc /data/data/com.clanhq.app/app_flutter/vm_snapshot_instr
05-08 10:53:31.053 495 495 F DEBUG : #01 pc 00000164 /data/data/com.clanhq.app/app_flutter/vm_snapshot_instr

[✓] Flutter (Channel unknown, v0.4.0, on Linux, locale en_US.UTF-8)
• Flutter version 0.4.0 at /home/paul/flutter
• Framework revision 7984f6e043 (4 days ago), 2018-05-04 10:48:06 -0700
• Engine revision e976be13c5
• Dart version 2.0.0-dev.53.0.flutter-e6d7d67f4b

[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
• Android SDK at /home/paul/Android/Sdk
• Android NDK at /home/paul/Android/Sdk/ndk-bundle
• Platform android-27, build-tools 27.0.3
• Java binary at: /usr/local/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
• All Android licenses accepted.

[✓] Android Studio (version 3.1)
• Android Studio at /usr/local/android-studio
• Flutter plugin version 23.2.2
• Dart plugin version 173.4700
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)

[✓] IntelliJ IDEA Community Edition (version 2018.1)
• IntelliJ at /home/paul/.local/share/JetBrains/Toolbox/apps/IDEA-C/ch-0/181.4203.550
• Flutter plugin version 24.0.2
• Dart plugin version 181.4203.498

[✓] IntelliJ IDEA Community Edition (version 2017.2)
• IntelliJ at /usr/local/idea-intellij
• Flutter plugin version 19.1
• Dart plugin version 172.4343.25

[✓] IntelliJ IDEA Community Edition (version 2017.3)
• IntelliJ at /home/paul/.local/share/JetBrains/Toolbox/apps/IDEA-C/ch-0/173.4548.28
• Flutter plugin version 22.0.2
• Dart plugin version 173.4548.30

[✓] VS Code (version 1.22.2)
• VS Code at /usr/share/code
• Dart Code extension version 2.11.1

[✓] Connected devices (1 available)
• SM N910V • f4c0da82 • android-arm • Android 6.0.1 (API 23)

• No issues found!

Issue 2:
I would expect either the whole word to wrap, or probably better to have it change phone size or ellipsize. We probably want some standardized titlebar behavior here.
Issue 1:
The system fails to give credit to the user if they add img-responsive class to the first image as well as the new image

Issue 2:
Lesson: http://www.freecodecamp.com/challenges/waypoint-mobile-responsive-images

Instructions are the wrong way around, should assign the class after instructing you to make the new img tag

Switches from https:// to http:// requirement for second img

If you add img-responsive to the existing img tag you are then unable to complete the lesson even if you add another image below it with the correct src and class

Lesson accepts itself as complete before you have to close the image tag eg: <img class="img-responsive" src="http://bit.ly/fcc-kittens2" is accepted (missing > on the end)

Don't think the notes should have the words responsive design wrapped in a code tag, previously only seen it used to describe markup.

Don't think this needs the caps either: Fortunately, we have access to a Responsive CSS Framework called Bootstrap. should just be responsive CSS framework
Issue 1:
When namespaces merge, any members exported by one namespace declaration are in scope in all the merged declarations. Ambient external modules like declare module "foo" { } can merge too. It seems natural then that exported declarations are in scope in merged external modules too. But external modules have additional ways of exporting their members, via export specifiers, export default, and export *. Should export specifiers contribute to the shared export scope as well?

declare module 'm' {
export interface I { }
interface J { }
interface K { }
export { K };
interface L { }
export { L as L2 };
export { P } from 'other';
}
declare module 'm' {
export function f(): I; // in scope because of export modifier
export function g(): J; // not in scope (lacks export modifier)
export function h(): K; // should this be in scope?
export function h(): L; // should this be in scope?
export function h(): P; // should this be in scope?
}
declare module 'other' {
export interface P { }
}

Today only J is in scope.

The key difference between export modifiers and export specifiers is that when an export modifier is used, the exporting entity is guaranteed to have a corresponding local entity with the same name. This is not true of export specifiers, as they can export stuff that is not declared locally, or they can export using a different name.

I can think of 4 options. I've listed them in order from smallest export scope to largest export scope:

Shared export scopes are not created at all for external modules. This is a pretty harsh breaking change.

Only an export modifier (implicit or explicit) can put the name into a shared export scope, but an export specifier cannot. This is the current behavior. It breaks a nice user intuition that using the export modifier is equivalent to leaving it out and writing an export specifier.

An export specifier that exports a locally declared module member with the same name is also in scope and treated just like an export modifier. This sounds like an oddly specific rule. But it maintains the user intuition that option 2 breaks, and when you think about it, it seems pretty natural I think. This would mean that in the above example, I and K are in scope.

All exported entities in a module are in the shared export scope, no matter how they were exported. This is inconsistent with ES6 export semantics.

I think 1 and 4 are not viable options. 3 seems ideal, but I could also see a case for 2. How about it?

Issue 2:
Just a suggestion, but it would be very cool if one could create a TypeScript Library project to contain nothing but TypeScript files, which would compile to a single JavaScript file that could then be linked from other projects. Maybe have a Definitions folder to contain .d.ts files. If the source-map-based debugging could be made to work with this project type, then even better.

I'm guessing the project would need the same kind of ordering semantics as F# projects, so that the output was concatenated in the correct order.

Since TypeScript's raison d'etre is large-scale applications, it would seem to make sense to support this level of componentization in a Visual Studio solution, right?
Issue 1:
The php error :

PHP Fatal error: Call to a member function getRepository() on a non-object

is suppressed and a blank page is rendered despite being in dev ( app_dev.php )

To replicate:

remove $em = $this->getDoctrine()->getManager(); from any crud action.

Issue 2:
How to reproduce

Create a controller action that contains $foo->bar();. Make sure that $foo is undefined.

Call said controller in both the prod and dev environments.

Code sample

<?php

// src/Acme/BugReportBundle/Controller/BuggyController.php
namespace Acme\BugReportBundle\Controller;

class BuggyController
{
public function indexAction()
{
$foo->bar();
}
}

Attempt at analysis

When indexAction() is called, Symfony will display a blank page if Debug::enable() was called before (for example, if the dev environment is being used).

If you insert $foo = null; before $foo->bar();, then Symfony's fatal error page will be displayed as intended.

Debug::enable() registers \Symfony\Component\Debug\ErrorHandler as an error handler. $foo->bar() will make PHP display two errors:

Notice: Undefined variable: foo in file on line line

Fatal error: Call to a member function bar() on a non-object in file on line line

The notice will trigger ErrorHandler::handle(), which will in turn raise a \Symfony\Component\Debug\Exception\ContextErrorException. However, presumably because of the fatal error in the same line, Symfony's "Exception detected" page will not be displayed. The thrown ContextErrorException also prevents ErrorHandler::handleFatal() from being called (if the line that throws said exception is commented out, handleFatal() will be called and the error page is displayed properly). Because of this, a blank page will be displayed which is not really useful for debugging.

Other information

Operating system: Debian GNU/Linux 6.0.7 (Linux 2.6.32 i686)

Symfony version: 2.3.3

PHP version: 5.3.6-11 (running via FastCGI)
Issue 1:
Describe your issue.

Ever since version 1.8.0 certain all calls to hypergeom.pmf seem to be slower with certain set of parameters being processed so slow that it is code breaking. For the code shown below, my computer needs ~0.08s to process the loop using scipy 1.7.3 but ~262s on scipy 1.9.3, slowing down the process by more than a factor of 3000.

Reproducing Code Example

import numpy as np
import time
from scipy.stats import hypergeom

start = time.time()

for i in range(0, 1000):
odds = hypergeom.pmf(np.arange(0, 201), 100000, 50000, 200)

end = time.time()
print("test: " f'{(end - start):0.5}' + "s")

Error message

no error

SciPy/NumPy/Python version information

1.7.3 1.22.4 sys.version_info(major=3, minor=10, micro=5, releaselevel='final', serial=0)

Issue 2:
Describe your issue.

While using the fisher_exact test in a loop on some 2x2 tables, I noticed a significant slowdown between Scipy versions 1.7.3 and 1.8.0 (1.8.0 is about 20x slower than 1.7.3). I narrowed it down to the call to hypergeom.cdf, and found a specific set of arguments with which the slowdown can be reproduced (see code example below).

Reproducing Code Example

import time
import scipy
from scipy.stats import distributions

ts = time.time()
for _ in range(10000):
distributions.hypergeom.cdf(0, 48127, 57, 35775)
te = time.time()
print(scipy.__version__, '%.2fs' % (te-ts))

# Output for version info 1.7.3 1.22.2 sys.version_info(major=3, minor=8, micro=10, releaselevel='final', serial=0)
# 1.7.3 1.84s

# Output for version info 1.8.0 1.22.2 sys.version_info(major=3, minor=8, micro=10, releaselevel='final', serial=0)
# 1.8.0 41.11s

Error message

-

SciPy/NumPy/Python version information

1.8.0 1.22.2 sys.version_info(major=3, minor=8, micro=10, releaselevel='final', serial=0)
Issue 1:
VSCode Version: 1.0.1-insider (85f337e)

OS Version: OS X 10.11.4 (15E65)

Steps to Reproduce:

Have code open with git enabled on a repository (in particular, I'm working with @mozilla/gecko-dev)

Do a git rebase -i that will take a while (my case had 11 commits that I was squashing into 1)

A few times during the rebase, my rebase stopped because it couldn't create index.lock, saying it already existed. If I then did git rebase --continue things would carry on. (FTR, git also totally messed up the squashing in this case, but that's a git bug, not a code bug.) I realized that code's git integration was interfering with my rebase, quit code, git reset --hard to the original commit, and redid my rebase, and everything worked fine. My best guess is that the periodic git status (or similar) that code does was racing with the various commits of git rebase, and when code won, it would mess up the rebase. Code should probably avoid updating its internal knowledge of the working directory status while a rebase (or similar) is running. (Not sure if that's entirely possible, but it's at least something to think about.)

Issue 2:
Several times now I've had mysteriously deleted files when doing a git pull in a console while Visual Studio Code is running. I've seen this roughly since version 0.10.

It seems that when auto-merging, Git is able to delete a file but not able to write the merged file back if it's open in Code. However that is just a hypothesis.

Seen the issue last with git version 1.9.5.msysgit.1 and Code 0.10.2.
Issue 1:
The second one looks like a duplicate of 2.0.0-alpha.33 (2015-07-30).

Issue 2:
I just ran through the demo for Dart here:

https://angular.io/docs/dart/latest/quickstart.html

Running through the built in Dart2JS transformer via pub serve results in a 5.2 MB main.dart.js file

Running through pub build results in a 2.5 MB main.dart.js file
Issue 1:
In language-javascript/snippets, there's an "f" snippet for an anonymous function, and language-todo/snippets has "fix" for a "fix me" comment. To see this:

Open a javascript file

Type "f"

The former should be offered as the first suggestion, as it's the best match, but instead it appears 6th on the list, behind fix, for, forin, forof and fun.

Issue 2:
When writing javascript code a common snippet is f that expands into an anonymous function.

However if I type f the topmost and selected suggestion is fix. And the f snippet is number 6 in the list. If I was looking for fix I could add the letter 'i' to select that one however as f is the whole snippet trigger I am forced to press down 5 times to select it.

When returning the list of suggestions it should be sorted so it puts exact matches to the top.
Issue 1:
When you have a one page site, and the navbar is collapsed (e.g. on an iPhone),

the 3-line collapse button is shown. Excellent.

When you then click that button, the menu pops open. Good.

If you then click one of the menu items, the 'jump' happens, but the menu does not collapse. Remember, it's a one page site, so the link refers to another location on the same page (#-link).

The user now has to click the 3-line collapse button again to close the menu.

Maybe it's easy to correct (by me), but if not, I hope you can fix it.

For an example (still based on bootstrap 2.3, because it's a live site):

Http://www.penumbragroup.com

Issue 2:
When writing a single-page application using Bootstrap's navbar, we quickly found out that we need a way to collapse the menu whenever any of the links are pressed.

The naive solution seemed to be to attach the following to every link:

data-toggle="collapse" data-target=".navbar-responsive-collapse"

However, while this works fine when the screen is narrow and the navbar needs to be collapsed, it causes some very strange side-effects when the screen is "tablet" or "desktop" sized. On some browsers (IE and Firefox), repeated clicks cause the contents of the navbar to disappear completely.

While it should be possible to deal with this issue by writing custom JS in the App, I think it would be much better if the App generally doesn't need to deal with it at all.

I've created a JsFiddle, showing the problem.

As an interim solution, I've added the following to Collapse's Data-Api on my local copy:

$(document).on('click.bs.collapse.data-api', '[data-hide=collapse]', function (e) {
var $this = $(this), href
var target = $this.attr('data-target')
|| e.preventDefault()
|| (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
var $target = $(target)

if ($target.hasClass('in')) {
$target.collapse('hide');
}
})

It's based on the [data-toggle=collapse] listener, but without support for accordion views. The key element is checking to see whether or not the navbar can be collapsed before collapsing it.

I'm hoping that something like this could be added to the Bootstrap Collapse API, or if we could just get the normal toggle listener to include more checks before toggling.

Thanks.
Issue 1:
The content of a pane/buffer that hasn't been saved to a file will dissapear after moving the pane to another place (in split-mode).

Video: http://youtu.be/Mp2R8vqFUdY

Issue 2:
I have my screen in split view (2 panes) and, when changing a tab from 1 pane to the other the file doesn't seem to show, after I switch tabs the content of the file show, there aren't errors in the developer tools. And a gif is included to demostrate the bug in atom --safe