WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Hi， I found the code in this

scikit-learn/sklearn/cluster/birch.py

Line 212
in
bac89c2

self.update_split_subclusters(

line would cause this error.

Because new_subcluster1, new_subcluster2 created by

new_subcluster1, new_subcluster2 = split_node(

closest_subcluster.child, threshold, branching_factor)

are constructed with

new_subcluster1 = _CFSubcluster()

new_subcluster2 = _CFSubcluster()

so, the problem is when calls the function update_split_subclusters in line

scikit-learn/sklearn/cluster/birch.py

Line 164
in
bac89c2

def update_split_subclusters(self, subcluster,

, there will call 'self.init_centroids_[ind] = new_subcluster1.centroid_'.

But this construction method of 'new_subcluster1 = CFSubcluster()' has no attribute 'centroid'.

Can you help me to fix this issue? Thanks.

Description

Steps/Code to Reproduce

Expected Results

Actual Results

Versions

Issue 2:
This issue occurs to me during an evaluation with growing feature set sizes. In under a second after the call to fit_predict on the BIRCH instance.

Strangely it works for smaller sets of features and does not run out of memory.

For my evaluation I employ 183719 datasets and construct feature sets of growing size. It works with 6 features, but returns this error with 12. I use the version 1.7.

Here is the full stack trace:

Traceback (most recent call last):
File "clusterer.py", line 27, in score
labels = self.clusterer.fit_predict(x)
File "/usr/lib/python2.7/dist-packages/sklearn/base.py", line 371, in fit_predict
self.fit(X)
File "/usr/lib/python2.7/dist-packages/sklearn/cluster/birch.py", line 424, in fit
return self._fit(X)
File "/usr/lib/python2.7/dist-packages/sklearn/cluster/birch.py", line 458, in _fit
split = self.root_.insert_cf_subcluster(subcluster)
File "/usr/lib/python2.7/dist-packages/sklearn/cluster/birch.py", line 193, in insert_cf_subcluster
subcluster)
File "/usr/lib/python2.7/dist-packages/sklearn/cluster/birch.py", line 212, in insert_cf_subcluster
closest_subcluster, new_subcluster1, new_subcluster2)
File "/usr/lib/python2.7/dist-packages/sklearn/cluster/birch.py", line 170, in update_split_subclusters
self.init_centroids_[ind] = new_subcluster1.centroid_
AttributeError: '_CFSubcluster' object has no attribute 'centroid_'

Sadly I'm not able to reproduce this with an minimal example
Issue 1:
Is there an existing issue for this?

I have searched the existing issues

Current Behavior

Downgrading npm 7.21.0 to a previous 7.x version causes all global packages to be deleted.

Expected Behavior

Downgrading npm 7.21.0 to a previous 7.x version should not delete all global packages.

Steps To Reproduce

A. Installed a clean node 14.17.5 installation (https://nodejs.org/dist/v14.17.5/node-v14.17.5-win-x64.zip) on Windows 10 in c:\temp\node. To avoid side-effects :

no custom $HOME/.npmrc present (so will use default settings)

no %AppData%\Local\npm-cache and neither %AppData%\Roaming\npm-cache present

B. Then in a DOS shell:

$set PATH=c:\temp\node;%PATH%

$node -v
v14.17.5

$npm -v
6.14.14

Until now OK.

C. Then I wanted to upgrade npm to the latest version (7.21.0):

Because npm update -g npm@latest does nothing and npm install -g npm@latest fails with "File exists: c:\temp\node\npm.cmd", I used following procedure to upgrade to npm@latest (based on https://try2explore.com/questions/10972799):

$cd c:\temp\node

$move npm npm-old
$move npm.cmd npm-old.cmd
$move npx npx-old
$move npx.cmd npx-old.cmd

$cd node_modules
$move npm npm-old
$cd npm-old\bin
$node npm-cli.js i -g npm@latest

$npm -v
7.21.0

Until now OK.

D. Now I wanted to downgrade npm to npm@7.20.3:

$npm update -g npm@7.20.3

removed 691 packages, and audited 1 package in 9s

found 0 vulnerabilities
The batch file cannot be found.

Result :

c:\temp\node\node_modules now completely empty! Also if I first would have installed other global packages (verdaccio, yeoman, ...), then they would also have disappeared from c:\temp\node\node_modules.

Above procedure was performed in a DOS shell but I also encountered the same issue in a Powershell 7 shell.

Environment

OS: Windows 10

Node: 14.7.5 (includes npm 6.14.14)

Issue 2:
Current Behavior:

Attempting to update a package with a tag using the update command globally causes ALL global packages to be removed.

Expected Behavior:

Packages should not be removed when updating global packages.

Steps To Reproduce:

npm i -g typescript nodemon @angular/cli # Install some global packages
npm ls -g --depth=0 # This shows the 3 installed packages
npm update -g @angular/cli@latest # Attempt to update one of the packages with a @latest tag
# Oh no! removed 620 packages
npm ls -g --depth=0 # Shows `-- (empty)

Environment:

OS: Windows 10 20H2

Node: 15.9.0

npm: 7.11.2

Additional Info

This only happens on the global scope
Issue 1:
Is your feature request related to a problem? Please describe.

The feature is related to a problem where I am unclear as to how to translate my data into parameters: n and p for nbinom.cdf. I am sort of lost translating R to Python here given different params:

test_arr = np.array([(1, 1, 3, 1, 1, 0, 0, 2, 2, 0, 1, 3, 0, 0, 0, 0, 3, 2, 1, 5, 2, 2,
4, 0, 7, 3, 0, 0, 2, 1, 2, 0, 1, 4, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1,
0, 0, 0, 0, 0, 2, 0, 3, 3, 1, 3, 0, 0, 2, 0, 3, 1, 0, 0, 0, 0, 1,
0, 4, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 2, 1, 2, 0, 0, 3, 2, 2, 0, 3,
0, 1, 0, 1, 0, 0, 0, 2, 1, 0, 1, 0)])
nbinom.cdf(test_arr, n=?, p=?) # how determine n and p from the data?

Describe the solution you'd like

When using R, I can obtain nbinom.cdf seemingly from the data itself

library(pscl)
arr1 <- c(1, 1, 3, 1, 1, 0, 0, 2, 2, 0, 1, 3, 0, 0, 0, 0, 3, 2, 1, 5, 2, 2,
4, 0, 7, 3, 0, 0, 2, 1, 2, 0, 1, 4, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1,
0, 0, 0, 0, 0, 2, 0, 3, 3, 1, 3, 0, 0, 2, 0, 3, 1, 0, 0, 0, 0, 1,
0, 4, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 2, 1, 2, 0, 0, 3, 2, 2, 0, 3,
0, 1, 0, 1, 0, 0, 0, 2, 1, 0, 1, 0)
m1 <- zeroinfl(arr1 ~ 1, dist='negbin')
m1$theta # dispersion param

library(VGAM)
# size is dispersion parameter
pnbinom(arr1, size=m1$theta, mu=mean(arr1))

It would be nice to derive the CDF of a value/vector by specifying the dispersion parameter and the mean.

Describe alternatives you've considered

N/A

Additional context (e.g. screenshots)

N/A

Issue 2:
Describe your issue.

In the following example with CubicSpline y=cos(x), I would naively expect a single root x=1 for cos(x)=1. However, it returns three nearly identical roots instead.

In another rare case where the curve is monotonic (I will provide the example when I get access to my data later), I also get two close roots, which only differ by 1e-16.

Is this expected or not? If yes, any good idea to search and remove such redundancy roots? Thanks.

Reproducing Code Example

import numpy as np
from scipy.interpolate import CubicSpline

x = np.linspace(-1, 1, 101)
y = cos(x)
f = CubicSpline(x, y)
rt = f.solve(1, extrapolate=False)
# array([-1.79965237e-07, 0.00000000e+00, 1.56105529e-16])
f(rt) - 1
# array([-1.62092562e-14, 0.00000000e+00, 0.00000000e+00])

Error message

--

SciPy/NumPy/Python version information

1.7.3 1.20.3 sys.version_info(major=3, minor=8, micro=12, releaselevel='final', serial=0)
Issue 1:
Summary of the new feature/enhancement

The tabs being convenient, their appearance isn't as pretty. The title of tabs are sometimes too long, making it really hard to switch between them. The title of a Windows Powershell tab is especially too long as it displays the full path.

I suggest the title be truncated. For example, the tab title of a Powershell tab should only be "Powershell", rather than its full path to the excutable.

Proposed technical implementation details (optional)

The tab title will be good to only display the exact name of the terminal. A tool-tip of the tab on mouse hover can display the full excutable path, or a context menu for copying the path can also be better than displaying a full long path in the tab title

Issue 2:
"Is it also possible to shown a short title instead of the whole path?"

Originally posted by @wahid in #491 (comment)
Issue 1:
Running the folloing code:

console.log( (import.meta as ImportMeta).url)

or

console.log( import.meta.url)

using:

deno run -c .\tsconfig.json .\meta.ts

with tsconfig.json

results in:

error: TS2339 [ERROR]: Property 'url' does not exist on type 'ImportMeta'.
console.log( (import.meta as ImportMeta).url)

but in globals.ts ImportMeta has url. Any help appreaciated. Thx

interface ImportMeta {
url: string;
main: boolean;
}

Issue 2:
The deno process keeps running (does not exit) using the WebSockets API on the client side.

On the backend side I use the ws server example from the std module: https://github.com/denoland/deno/tree/master/std/ws readme.

On the client side (running with deno) I use the following code. The deno process doesn't finish although the ws connection is closed (the server confirms this):

async function connect(url: string): Promise<WebSocket> {
return new Promise((resolve, reject) => {
const socket = new WebSocket(url);
socket.onopen = () => resolve(socket);
socket.onerror = (err) => reject(err);
});
}

async function getMessage(socket: WebSocket) {
return new Promise((resolve, reject) => {
socket.onmessage = (event: any) => {
resolve(event.data);
};
socket.onclose = () => resolve("connection is closed");
});
}

const socket = await connect("ws://0.0.0.0:8080");
socket.send("Here's some text that the server is urgently awaiting!");
const message = await getMessage(socket);
console.log(message);
socket.close();
Issue 1:
Instead of having just the textbox for run what if we made it like the open file window and had a list of directories in a default library and users could select from there. I have never made anything for windows but I think I might try.

Issue 2:
Currently, in Windows 10 (1903), when clicking Win+R, it opens the "Run" window command.

This functionality is very limited - the user must remember the exact command, or the exact file. No auto-correct, and if the user is wrong, it only brings an error message that says the file or command was not found.

Can you please add a tool which improves this window, at least with auto-correct?

crutkas edits:

https://github.com/microsoft/PowerToys/wiki/Launcher is the spec

remember to xref #51 as it was listed as a dup
Issue 1:
Hey,

today i noticed that many of the icons from https://material.io/tools/icons/?style=baseline aren't implemented in the Icons class. Maybe there is an possibility to update the icons.

This is one for example that isnt in the Icons class.

My flutter doctor output:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, v0.5.6-pre.76, on Mac OS X 10.13.5 17F77, locale de-DE)
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.0)
[✓] iOS toolchain - develop for iOS devices (Xcode 9.4.1)
[✓] Android Studio (version 3.1)
[!] IntelliJ IDEA Ultimate Edition (version 2018.1.5)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.24.1)
[✓] Connected devices (1 available)

Issue 2:
It looks like there are many newer icons that are missing from the latest font files hosted on the github (https://github.com/google/material-design-icons/tree/master/iconfont). One of these icons includes

arrow_right

It looks like the google web font is updated (https://fonts.gstatic.com/s/materialicons/v37/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2), but that is only the woff2 file. Our project also uses .woff/.ttf/.eot so we would need those files as well. Since we use a local copy of our fonts, switching to the google web font is not an option.

By opening https://fonts.googleapis.com/icon?family=Material+Icons in IE, i was able to get the url to the regular woff file: https://fonts.gstatic.com/s/materialicons/v37/flUhRq6tzZclQEJ-Vdg-IuiaDsNa.woff
Issue 1:
Atom version: 1.0.0

OS: OS X 10.10.3

I found an energy consumption problem when I install or upgrade packages.

Atom shows animation when I click the Install or Update buttom, and it will cause a high CPU consumption:

The impact on energy consumption has risen to 234.6 in total.Under normal circumstances, it won't be so dramatic.

Have any idea about these issue or how can I find the solution to this problem?

Issue 2:
From @lovio on June 26, 2015 6:7

No matter installing or uninstalling packages, Atom Helper will comsume over 100% CPU.

Copied from original issue: atom/atom#7438
Issue 1:
Windows 10's native Virtual Desktops feature is very under-powered. A "Fancy Virtual Desktops" PowerToy would make so much sense, particularly since the original appearance of Virtual Desktops in Windows was through the original PowerToys!

Here are some enhancements to Virtual Desktops that a "Fancy Virtual Desktops" PowerToy might provide:

Apply different backgrounds to each virtual desktop.

Each desktop shortcut/icon can appear on only one particular virtual desktop, or on all virtual desktops (configurable per shortcut/icon).

Any window can be designated as "sticky" so its contents appear on all virtual desktops.

In a multi-monitor environment, any monitor can be designated as "sticky" so its contents appear on all virtual desktops.

Virtual desktops can be named (applies to Win 10 releases prior to 2004).

Shortcut keys can be assigned to each virtual desktop to switch between desktops (in addition to Win+arrows for cycling between).

Programs can optionally be designated to launch in a particular virtual desktop by default, regardless of which virtual desktop is active at launch time.

The Virtual Desktops configuration (all of the above) can be saved and automatically loaded at startup, and a default virtual desktop can be designated.

If you'd like to see this feature implemented, add a 👍 reaction to this post.

Issue 2:
Summary of the new feature/enhancement

Virtual Desktops are great to improve productivity.

There are a few opensource Virtual Desktop Manager.

Most of them are not maintained or just not complete.

Have a look at those samples:

https://github.com/sdias/win-10-virtual-desktop-enhancer

https://github.com/m0ngr31/VirtualDesktopManager

https://github.com/mzomparelli/zVirtualDesktop

https://github.com/henkman/virgo
Issue 1:
Bug report

Describe the bug

We have a navigate component in our company site. Which use Link and not in all places Link works.

To Reproduce

In this page, you could click on:

You can't visit this page. Here is a code

I think a problem with a build because I go to node_modules/next/dist/client/link.js and make auto formatter for the file. After that, all works fine.

Before auto formatter

System information

OS: Linux 18.04

chrome

Version of Next.js: 9.0.6

Issue 2:
This is bug report

Link does not work with css-module imported. That happens when page with Link has no css, and linked page has. No errors in console, so im not sure about reasons, but there is minimal repo to reproduce:

https://github.com/standy/next-css-error

Bug appears in next@7.0.0 + next-css@1.0.1,

Older next@6.1.2 + next-css@0.2.0 works fine
Issue 1:
When I bundle the serve example in the homepage:

import { serve } from "https://deno.land/std@0.50.0/http/server.ts";
const s = serve({ port: 8000 });
console.log("http://localhost:8000/");
for await (const req of s) {
req.respond({ body: "Hello World\n" });
}

with deno bundle command, the output script doesn't work with deno run. It includes the SyntaxError at for-await loop:

$ deno bundle serve.ts > serve.js
$ deno run serve.js
error: Uncaught SyntaxError: Unexpected reserved word
for await (const req of s) {
~~~~~
at file:///Users/kt3k/3/deno/serve.js:5467:13

Strangely that for-await loop appears inside a non-async function and it seems causing the error.

Issue 2:
$ RUST_BACKTRACE=1 DENO_NODE_COMPAT_URL=file:///Users/me/dev/deno_std/ deno run --watch --unstable -A main.ts

import Koa from "npm:koa";
import KoaRouter from "npm:@koa/router";
import bodyparser from "npm:koa-bodyparser";

const app = new Koa();
const router = new KoaRouter();

router.get("/", (context) => {
context.status = 200;
});

app.use(bodyparser());
app.use(router.routes());

app.listen(3000);

============================================================
Deno has panicked. This is a bug in Deno. Please report this
at https://github.com/denoland/deno/issues/new.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 env
var set and include the backtrace in your report.

Platform: macos aarch64
Version: 1.25.0
Args: ["/Users/dimgl/.deno/bin/deno", "run", "--watch", "--unstable", "-A", "main.ts"]

thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', ext/flash/lib.rs:1316:42
stack backtrace:
0: _rust_begin_unwind
1: core::panicking::panic_fmt
2: core::panicking::panic
3: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
4: deno_core::runtime::JsRuntime::poll_event_loop
5: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
6: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
7: deno::run_command::{{closure}}
8: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
9: deno::main::{{closure}}
10: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
11: deno_runtime::tokio_util::run_local
12: deno::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Run this then save the file. It will immediately panic.
Issue 1:
Do you want to request a feature or report a bug?

Bug

What is the current behavior?

Watching fails if any part of the file path has a bracket in it.

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

Add a bracket to a parent folder of the project.

What is the expected behavior?

Watching should continue to work as expected (there's also an issue where css files aren't created from scss, I'm not sure if this is related or a Laravel bug).

If this is a feature request, what is motivation or use case for changing the behavior?

If the path cannot be escaped for some reason, an error should be displayed if possible.

Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.

Node v8.0.0

NPM 5.0.3

MacOS Sierra 10.12.5

Issue 2:
Bug

What is the current behavior?

runing: webpack -w

-> initially runs without any warning or error and compiles but does not trigger any consecutive recompile on file changes

-> also process cannot be cancelled with [Ctrl+C] and the webpack becomes unresponsive

Problem

The behavior is related to the directory path that in name includes the brackets "()".

(e.g. C:\Work_projects.NET\FWK\FWK.2016.Q3\5. User Interface (UI)\Application.UI.Web)

Removing the bracket fixes the (not so obvious) issue.

What is the expected behavior?

Either throw an error and complain or allow brackets "()" in the path

Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.

webpack: 2.2.1

Node version: 6.9.5

Window 10 (x64)
Issue 1:
We import two mini-apps, both depend upon react-intl, but each are using different versions of it (which leads to breaking changes)

A: react-intl@^2.7.3

B: react-intl@^3.1.8

SplitChunksPlugin does not seem to be aware of the difference of the two 🤔

It would be great if the official docs would clearly state how different module versions are handled, especially regarding breaking changes/major version numbers, is SplitChunksPlugin aware of package.json's dependecies version?

This issue has been raised several times, but I think is not handled completely:

#646

#6505

Issue 2:
tl;dr

Webpack should produce the same build whether a module is linked or not.

In depth

Considering the following dependency trees:

project@1.0.0
├── babel-runtime@5.1.9
└── sub-project@1.0.0

sub-project@1.0.0
└── babel-runtime@5.1.9

Notice: NPM does not include babel-runtime under sub-project when npm list is called from project.

Webpack builds something link:

[0] multi main 52 bytes {0} [built]
[1] ./index.js 2.08 kB {0} [built]
[2] ./~/babel-runtime/helpers/interop-require-wildcard.js 148 bytes {0} [built]
[3] ./~/sub-project/index.js 2.46 kB {0} [built]

If we run npm link sub-project we obtain the following tree:

project@1.0.0
├── babel-runtime@5.1.9
└── sub-project@1.0.0 -> /Users/fc/Development/sub-project

Notice: babel-runtime still doesn't appear under sub-project.

But building the project again will duplicate its dependencies:

[0] multi main 52 bytes {0} [built]
[1] ./index.js 2.08 kB {0} [built]
[2] ./~/babel-runtime/helpers/interop-require-wildcard.js 148 bytes {0} [built]
[3] /Users/fc/Development/sub-project/index.js 2.46 kB {0} [built]
[4] /Users/fc/Development/sub-project/~/babel-runtime/helpers/interop-require-wildcard.js 148 bytes {0} [built]

Using resolve.root or changing the resolve scope of loaders do not change anything.

Expectations

It would link to be able the link my in-development modules into my project using npm link without having to tweak the webpack config.

The real problem isn't the build size but the unexpected behaviors raised but duplicated dependencies.
Issue 1:
Hi all,

It seems like a Symfony limitation or bug (in our case a security case).

We use the _format for some validations and reports even when a Exception is thrown. But apparently it is not trusty all time. In one of the cases of use, we use the _format to generate the Exception redering according with requested format, but the format is ignored when the _method is not accepted.

product_option_create:
pattern: /create.{_format}
defaults:
_format: ~
_controller: controller.option:createAction
requirements:
_method: POST

The Symfony router cache system generates a cached UrlMatcher ( appdevUrlMatcher ) that has a method match($pathinfo) which verifies which cached URL matches with the current URL (including the _method) and returns the preg_match result to be merged with the context parameters. The preg_match result has all variables declared in the routes configurations populated with the URL data. The problem is when the parameter _method of route does not match with the request type, even then nothing is returned because a MethodNotAllowedHttpException is thrown.

#app/cache/dev/appdevUrlMatcher.php
public function match($pathinfo)
{
if (0 === strpos($pathinfo, '/product/option/show') && preg_match('#^/product/option/show(?:\\.(?P<_format>json))?$#s', $pathinfo, $matches)) {
if ($this->context->getMethod() != 'POST') {
// print_r($matches);
// Array ( [0] => /product/option/show.json [_format] => json [1] => json )
$allow[] = 'POST';
goto not_product_option_show;
}

return $this->mergeDefaults(array_replace($matches, array('_route' => 'product_option_show')), array ( '_format' => NULL, '_controller' => 'product.controller.option:showAction',));
}
not_product_option_show:

throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException(); //
}

Thus, the method getRequestFormat returns html once the Request->format property is null.

#Symfony\Component\HttpFoundation\Request
public function getRequestFormat($default = 'html')
{
#echo $this->format; // returns 'html'
if (null === $this->format) {
$this->format = $this->get('_format', $default);
}

return $this->format;
}

As the format is html, the method ExceptionController->showAction understands that is a case of templating format and renders a html page error instead of JSON serialization.

Maybe a possible solution is to pass the $matches embedded in the MethodNotAllowedException, but there is a discussion about it on FriendsOfSymfony/FOSRestBundle#358

Issue 2:
Do we need something in Symfony? Do we just reuse something that already exists? #5711 was a start of an implementation but was never finished.