WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
(Initially #1212, which I opened and @BerkeleyTrue closed without discussion and which I can't reopen.)

This really isn't Ideal to compare your solutions

Actually, from a learner's perspective, being able to compare their own solution against the ideal solution is absolutely ideal. In fact, "If feedback is not appropriate (either from an instructor or from self-reference to an information source), then the practice tends to be ineffective or even detrimental to learning." [1]. It isn't about competition with others, but self-reflection.

One of the biggest challenges becomes identifying "the ideal solution". But interestingly, reviewing peers' work can be, in and of itself, an effective pedagogical method if certain conditions are met [2, 3, 4], and FCC is a poster-child for these conditions!

The current approach means:

Having to go search for feedback (e.g. go look it up on the wiki), which means many learners simply won't get that feedback.

Lack of comparison between alternative answers (e.g. comparing and rating multiple working solutions) means learners aren't exposed to other solution paradigms, and therefore aren't developing relevant critical thinking skills.

And to be very clear, providing alternative solutions does not necessitate competition. Reviewing multiple alternative solutions (including non-optimal solutions), and comparing peers' ratings of solutions, is the goal. There is no need for names, affiliations, or anything else that breeds competition with anyone else. However, it should encourage self-reflection.

[1] https://en.wikipedia.org/wiki/Practice_%28learning_method%29#Deliberate_practice

[2] https://onlinelearninginsights.wordpress.com/2013/03/09/why-and-when-peer-grading-is-effective-for-open-and-online-learning/ , particularly:

Listed below are a list of conditions needed to ensure that peer grading is effective:

When learners are at a similar skill level.

When assignments are low stakes [i.e. when a course is taken for professional development of personal interest as was the Digital Cultures course].

Where credit is not granted.

When learners are mature, self-directed and motivated.

When learners have experience in learning and navigating within a networked setting [if the review is completed in an open and online setting].

Learners have a developed set of communication skills.

[3] http://www.lrdc.pitt.edu/schunn/research/peers.html

[4] http://eric.ed.gov/?id=EJ938586

Issue 2:
Challenge Waypoint: Passing Values to Functions with Arguments has an issue.

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36.

Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

// Example
function ourFunction(a, b) {
console.log(a - b);
}
//ourFunction(10, 5); // Outputs 5

// Only change code below this line.

function myFunction(arg1, arg2) {
console.log(arg1 + arg2);
}

myFunction(4,5);
Issue 1:
Hi,

It's not clear to me what 2D/3D corner case I've found myself in between Scipy, pyinstaller, and GH actions, but since it seemed related to other issues (#14002), I wanted to report, feel free to close if best reported in one of those other tools instead.

As part of the CellProfiler build process on GH actions we pip install SciPy (just from PyPI, nothing fancy) as part of the process of installing CellProfiler then use pyinstaller to package in our dependencies via the linked spec . When we tested a release we put together yesterday, we found that on Windows but not Mac pyinstaller was unable to find the OpenBLAS dll, leading to a bunch of messages ala the below

2022-12-15T13:28:48.4432784Z 112298 WARNING: lib not found: libopenblas-57db09cfe174768fb409a6bb5a530d4c.dll dependency of c:\hostedtoolcache\windows\python\3.8.10\x64\lib\site-packages\scipy\sparse\linalg\_isolve\_iterative.cp38-win_amd64.pyd
2022-12-15T13:28:48.4550912Z 112314 WARNING: lib not found: libopenblas-57db09cfe174768fb409a6bb5a530d4c.dll dependency of c:\hostedtoolcache\windows\python\3.8.10\x64\lib\site-packages\scipy\special\_ufuncs.cp38-win_amd64.pyd

The application was built, but then failed on launch due to scipy.libs not being able to be found.

We had last built in August with 1.9.0, so after trying other stuff we tried pinning to that, and the build succeeded - I didn't test 1.9.1 or .2 . Is it expected that the location or packaging of that dll would be different in 1.9.0 vs 1.9.3 ? I did try a bunch of things (to be fair, my PyInstaller skills are poor hahaha) to try to get it to find the dll, but none succeded. Thanks in advance for any help you can give - happy to upload build logs or anything else you think may help.

Issue 2:
Describe your issue.

From scipy 1.9.1 to scipy 1.9.3 the directory used to install dlls on windows changed.

scipy-1.9.1: dlls are installed in .../site-packages/scipy/.libs

scipy-1.9.3: dlls are installed in .../site-packages/scipy.libs

This causes pyinstaller builds using scipy-1.9.3 to fail as the expected dll location changed.

If this change was intented I will file a bug report with pyinstaller to update the scipy installer hook.

Reproducing Code Example

None

Error message

None

SciPy/NumPy/Python version information

1.9.3 1.23.1 sys.version_info(major=3, minor=10, micro=6, releaselevel='final', serial=0)
Issue 1:
Summary of the new feature/enhancement

Is it possible, to implement something like this:

When there is an active process in the current tab, a confirmation dialect window may show up before actually closing.

When I was writing vim, I need to use C-W to switch among vim tabs.

C-W is also the hotkey to close the current tab.

When the first two times I ran into this problem, I suppose it was some crashing thing.

Finally, I realized it was a hotkey conflict.

Proposed technical implementation details (optional)

I did not dive into the code base of this project yet, but I hope it is not too hard to implement.

Issue 2:
I can not input Chinese, can only input English, where to set the character?
Issue 1:
Feature request

What is the expected behavior?

After searching in the "search" bottom panel, only one the workspace files should appear.

After last update it shows both the "workspace file" and the "localhost file".

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

Making the search results more readable and avoid redundant items.

And avoid "this file has not been saved" yellow alert icon that appears in the edited "workspace files" every time you unwillingly edit the "localhost file" instead.

How should this be implemented in your opinion?

It was showing only the workspace one version ago, I think that's fine, but maybe this has a reason that I can't understand, so I think the best way would add an option.

Are you willing to work on this yourself?

yes, sure!

Screenshot

Issue 2:
Operating System: Linux

Node Version: 12

NPM Version: 6

webpack Version: 4

webpack-dev-server Version: 3

Browser: Chrome

[x ] This is a bug

This is a modification request

Code

output: {
path: path.resolve(ROOT_PATH, 'dist'),
publicPath: '0.0.0.0:10005/',
filename: '[name].bundle.js',
chunkFilename: '[id].bundle.js'
},
devServer: {
allowedHosts: ['.ec2.pin220.com', '.pinterdev.com'],
// 0.0.0.0 binds to all interfaces. The public port is 8080 which is served
// by nginx and proxied to the internal webpack port of 10005.
host: '0.0.0.0',
port: 10005,
hotOnly: true,
publicPath: '0.0.0.0:10005/'
}

if (module.hot) module.hot.accept();

const root = document.getElementById('root');

if (root !== null) {
ReactDOM.render(<App />, root);
}

Expected Behavior

Work

Actual Behavior

Doesn't work, just says

[WDS] App hot update...
log.js?1afd:24 [HMR] Checking for updates on the server...
Issue 1:
go get is frequently used by users and developers on hostile networks (eg, the internet) to fetch and run code. Incredibly, when HTTPS connections fail (for instance because an attacker is denying access to HTTPS), go get falls back to HTTP.

Please remove support for plain HTTP, or refuse to use it without the user specifying explicitly that they want to make HTTP connections!

Issue 2:
Currently it is impossible to securely fetch a package via go get, because it downloads via an insecure protocol if secure protocols fail or are not available. It is possible for an attacker to block secure ports (443 for HTTPS and 22 for git+ssh) and serve malicious packages via plain-text HTTP or git protocols.

I propose making it an explicit option to enable insecure protocols, e.g. -allow-insecure.

As a compromise (e.g. for backwards compatibility), -secure option may be implemented instead, making insecure behavior the default, but allowing users to add the flag to disable plain-text protocols.
Issue 1:
Behold the insanity. I'll take this one, just wanted to make a note of it.

Issue 2:
[Enter steps to reproduce below:]

...

...

Atom Version: 0.176.0

System: Mac OS X 10.10.2

Thrown From: Atom Core

Stack Trace

Uncaught Error: EEXIST, file already exists '/Users/renews/.atom/storage'

At /Users/renews/.atom/packages/auto-update-packages/node_modules/fs-plus/node_modules/mkdirp/index.js:74

undefined

Commands

Config

{
"core": {
"ignoredNames": [
".git",
".svn",
".DS_Store",
".vagrant"
],
"disabledPackages": [
"atom-jshint",
"vim-mode",
"terminal"
],
"themes": [
"spacegray-dark-ui",
"monokai"
],
"projectHome": "/Users/renews/SkyDrive/projetos"
},
"editor": {
"fontSize": 12,
"showInvisibles": true,
"showIndentGuide": true
}
}

Installed Packages

# User
Atom-Syntax-highlighting-for-Sass, v0.5.0
ScssBundle, v0.4.0
atom-beautify, v0.3.4
atom-handlebars, v0.4.0
atom-lint, v0.20.0
auto-update-packages, v0.2.1
coffee-compile, v0.8.4
coffee-eval, v0.8.0
coffee-lint, v0.7.3
color-picker, v1.2.6
command-logger, v0.20.0
css-color-highlight, v0.3.0
docs-snippets, v0.8.0
editor-stats, v0.16.0
emmet, v2.2.1
foundation5-snippets, v0.2.0
language-haml, v0.14.0
linter, v0.9.0
meteor-api, v2.9.0
minitest-snippets, v0.2.0
monokai, v0.9.0
open-last-project, v0.1.1
package-sync, v0.1.1
pretty-json, v0.3.1
project-manager, v1.14.1
rspec-snippets, v0.4.0
ruby-define-method, v0.1.0
ruby-strftime-reference, v0.2.0
script, v2.15.1
spacegray-dark-ui, v0.5.0
trailing-spaces, v0.2.3
travis-ci-status, v0.11.0
visual-bell, v0.9.0

# Dev
No dev packages
Issue 1:
The line (

numpy/numpy/core/numeric.py

Line 2157
in
843792b

r = all(less_equal(abs(x-y), atol + rtol * abs(y)))

):

r = all(less_equal(abs(x-y), atol + rtol * abs(y)))

abs(y) can be negative if y contains the smallest negative integer.

The following demonstrates the problem:

>>> import numpy as np
>>> a=np.int32(-2147483648)
>>> a
-2147483648
>>> a==a
True
>>> abs(a)
-2147483648
>>> np.allclose(a, a)
False

Issue 2:
Original ticket http://projects.scipy.org/numpy/ticket/1684 on 2010-11-22 by trac user lamblin, assigned to unknown.

If I create an array containing the minimal value of an int dtype, for instance an 'int8' array containing -128, numpy.allclose fails to detect it is "close" to itself, although it is equal.

>>> a = numpy.asarray(-128, dtype='int8')
>>> numpy.all(a == a)
True
>>> numpy.allclose(a, a)
False

I would expect:

>>> numpy.allclose(a, a)
True

This is due to the fact that the tolerance uses numpy.absolute, and in that case, it is negative:

>>> numpy.absolute(a)
array([-128], dtype=int8)

I reproduced the same with int16 and -215, int32 and -231, and int64 and -2**63.
Issue 1:
Perhaps I overlooked it browsing through the json file but i didn't see another means to achieve transparency and i'm not a fan of the acrylic effects blurring factor or the fact that it turns off when the window is not selected. The traditional console provides for a static opacity just like in most nix envs, i'd hope it's just a matter of time before it's implemented here?

Issue 2:
Multiline text pasted from the clipboard includes CRLF pairs in all cases; this is inappropriate for "Unix-space" sessions, such as WSL.

Environment

Windows build number: Microsoft Windows [Version 10.0.18362.145]
Windows Terminal version (if applicable): 71e19cd82528d66a0a7867cbed85990cfc1685f1

Steps to reproduce

Select multiline text in Terminal.

Copy it (via right-click, ostensibly)

Paste it (again via right-click)

Expected behavior

When pasting into a Unix-space session -- such as WSL -- pasted text should have a reasonable set of line-ending characters.

Actual behavior

Line endings are "doubled" on text paste to Unix-space sessions.
Issue 1:
When the while loop is infinite (say by not incrementing the iterator), the error is not surfaced, and the last test does not appear.The current behavior does not indicate that there is a problem with the code; the experience just breaks silently.

This may be expected behavior, as the infinite evaluation will preclude the second test running, but there may be a more elegant way to surface this issue. Let me know how best to follow up on this, or if it is duplicated elsewhere.

Challenge Waypoint: Iterate with JavaScript While Loops has an issue.

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36.

Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

var myArray = [];
var i = 0;

// Only change code below this line.

while (i < 5){
myArray.push(i);

}

// Only change code above this line.

if(typeof(myArray) !== "undefined"){(function(){return myArray;})();}

Issue 2:
Thanks to @d3ddd for reporting this and including the link.

Warning - this will cause an infinite loop and crash your browser, but if you still take a look at the code and confirm it is indeed an infinite loop.

We used to have safeguards against infinite loops, but it seems those are no longer working (we've gotten several complaints in the past few days about this all the sudden).

http://freecodecamp.com/challenges/bonfire-spinal-tap-case#?solution=function%20spinalCase(str)%20%7B%0A%20%20%2F%2F%20%22It's%20such%20a%20fine%20line%20between%20stupid%2C%20and%20clever.%22%0A%20%20%2F%2F%20--David%20St.%20Hubbins%0A%20%20%0A%20%20if(str.indexOf('%20')%20%3D%3D%3D%20-1%20%26%26%20str.indexOf('_')%20%3D%3D%3D%20-1)%20%7B%0A%20%20%20%20%0A%20%20%20%20str%20%3D%20str.split('')%3B%0A%20%20%20%20%0A%20%20%20%20for(var%20i%3D0%3B%20i%3Cstr.length%3B%20i%2B%2B)%20%7B%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20if(str%5Bi%5D%20%3D%3D%3D%20str%5Bi%5D.toUpperCase())%20%7B%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20str.splice(i%2C%200%2C%20'%20')%3B%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%0A%20%20%20%20%7D%0A%20%20%20%20%0A%20%20%7D%0A%20%20%0A%20%20%0A%20%20%0A%20%20%20return%20str.replace(%2F%20%2Fg%2C%20'-').replace(%2F_%2Fg%2C%20'-').toLowerCase()%3B%0A%7D%0A%0AspinalCase('This%20Is%20Spinal%20Tap')%3B%0A%0A%2F%2FNOTES%3A%0A%2F%2F%20%20%20%20%20%20If%20no%20spaces%20-%20or%20_%20then%20Turn%20str%20into%20array.%20Look%20for%20capital%20letters%20and%20insert%20space%20before%20the%20capital%0A%2F%2F%20%20%20%20%20%20then%20you%20can%20join%20array%20back%20into%20screen%20and%20perfom%20classci%20regex%20like%20alrady%20done%20son.%0A
Issue 1:
What is the current behavior?

Currenty render method is invoking even I am returned null in the getDerivedStateFromProps irrespective of whether props changed or not (just to check the behavior).

Here is CodeSandBox link:

https://codesandbox.io/s/7wy6xm1z10

Expected behavior : Not to invoke render method.

React version: 16.6.3

import React from "react";
class Demo extends React.Component {
constructor(props) {
super(props);
this.state = { hello: "sam" };
}

static getDerivedStateFromProps(props, state) {
console.log("getDerivedStateFromProps ", props, state);
return null;
}

render() {
console.log("render", this.state);
return (
<React.Fragment>
Hello
<hr />
<button
onClick={() =>
this.setState(() => {
return { name: "Kiran" };
})
}
>
click me
</button>
</React.Fragment>
);
}
componentDidMount() {
this.state = { HEHE: "HEHE" };
console.log("DidMount");
}

getSnapshotBeforeUpdate() {
console.log("getsnapshotbeforeupdate");
return 12;
}
componentDidUpdate(props, state, snapshot) {
console.log("DId Update", props, state, snapshot);
}
componentWillUnMount() {
console.log("Will Unmount");
}
}

export default Demo;

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

Bug

What is the current behavior?

Returning null from getDerivedStateFromProps triggers updates and componentDidUpdate is being called.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:

https://jsfiddle.net/69z2wepo/328290/

What is the expected behavior?

componentDidUpdate and render methods should not be called.
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

Current Behavior

Steps to Reproduce (for bugs)

Context

Your Environment

Tech
Version

next

node

OS

browser

etc

Issue 2:
Bug report

css content strings added for icons appear as stings not as icons

Describe the bug

a css class defined as

.a::before { content: '\f054'; }

dont render the icon, instead some text is displayed

A clear and concise description of what the bug is.

To Reproduce

USe this code sandbox to view the issue and a probable workaround with scss

https://codesandbox.io/s/async-wind-uj7z6

Steps to reproduce the behavior, please provide code snippets or a repository:

Create a css class with 'content' eg: a.css

a::before { content: '\f054'; }

import the css class into the react component

import css from "../style/a.css";

<style jsx>{css}</style> in the component to render the styles

in the render function add html in a way that the class will get selected

eg:

<a>Hi</a>

Expected behavior

The icon should render instead of the text

Screenshots

If applicable, add screenshots to help explain your problem.

System information

-package.json dev deps

"devDependencies": { "cross-env": "^5.2.0", "node-sass": "^4.7.2", "sass-loader": "7.1.0" },

-next.config.js

`

module.exports = {

webpack: (config, { defaultLoaders }) => {

config.module.rules.push({

test: /.scss|css$/,

use: [

defaultLoaders.babel,

{

loader: require('styled-jsx/webpack').loader,

options: {

type: 'scoped'

}

},

'sass-loader'

]

})

return config
}

}

`

Browser Chrome

Version of Next.js: seems to be broken in v9, v9.1 and v9.2, works fine in v7 and v8 though

Additional context

Seems like a issue related to the style-jsx version that is bundled

vercel/styled-jsx#589, i have commented my findings and workaround in that issue as well
Issue 1:
Context:

Playwright Version: 1.19.2

Operating System: Mac

Node.js version: 12.22

Browser: All

Extra: Docker Focal Image 1.19.2

Code Snippet

Help us help you! Put down a short code snippet that illustrates your bug and

that we can run and debug locally. For example:

//config.js

outputDir: 'src/tests/e2e/test-results',
use: {
screenshot: 'on',
},

reporter: [
['html', { open: 'never', outputFolder: 'src/tests/e2e/test-results' }],
],

Describe the bug

As noticed in the above config, I want test artifacts and html report to be in the same directory.

When I run the tests locally, it generates the index.html only and screenshot isn't saved.

When I run the tests on Docker (using volume mount), it generates the index.html as well as screenshots are saved.

Wondering why this is the case?

Issue 2:
System info

Playwright Version: [1.34.3]

Operating System: [MacOS Ventura - Version 13.4]

Browser: [All, Chromium, Firefox, WebKit]

Other info:

$ node -v
v19.4.0

$ yarn -v
1.22.19

$ yarn list --pattern @playwright/test
yarn list v1.22.19
└─ @playwright/test@1.34.3

Additional notes:

I get this problem when I created a new playwright project with yarn create playwright
Issue 1:
Since I updated my pandas lib, I can't do this anymore

db = pandas.HDFStore(path)
df = db.get('x')
df = df[['a', 'b', 'c']]

It throw me Exception('Reindexing only valid with uniquely valued Index objects',)

Mrknacky

Issue 2:
import pandas as pd
a = pd.TimedeltaIndex(range(3),unit='S')
print (a[1])

gives output

11574 days 01:46:40

I would expect the same output as from

import pandas as pd
import numpy as np
npa = np.array(range(3),dtype='timedelta64[s]')
a = pd.TimedeltaIndex(npa)
print(a[1])

giving output

0 days 00:00:01

This is pandas 0.15.1 as installed by conda update pandas from a fresh python 3.4 install of anaconda.

INSTALLED VERSIONS
------------------
commit: None
python: 3.4.1.final.0
python-bits: 64
OS: Windows
OS-release: 7
machine: AMD64
processor: Intel64 Family 6 Model 58 Stepping 9, GenuineIntel
byteorder: little
LC_ALL: None
LANG: nb_NO

pandas: 0.15.1
nose: 1.3.4
Cython: 0.21
numpy: 1.9.1
scipy: 0.14.0
statsmodels: 0.5.0
IPython: 2.2.0
sphinx: 1.2.3
patsy: 0.3.0
dateutil: 2.1
pytz: 2014.9
bottleneck: None
tables: 3.1.1
numexpr: 2.3.1
matplotlib: 1.4.0
openpyxl: 1.8.5
xlrd: 0.9.3
xlwt: None
xlsxwriter: 0.5.7
lxml: 3.4.0
bs4: 4.3.2
html5lib: None
httplib2: None
apiclient: None
rpy2: None
sqlalchemy: 0.9.7
pymysql: None
psycopg2: None
Issue 1:
My machine has a Titan X card so I would like to use the memory as efficient as possible to avoid expensive data transfer between the CPU and GPU. Therefore, I want to have as many images as possible (let's say 5 GB) on the GPU memory inside a tf.Variable or tf.constant. However, I also want to update these data tensors after a number of iterations (e.g. a replay memory). For training, I then only need to send sample indices to the GPU and use tf.slice to generate a training batch.

My question is what the correct way is to update specific elements in an existing tf.Variable? I already found methods using tf.scatter_update and tf.slice:

http://stackoverflow.com/questions/34685947/adjust-single-value-within-tensor-tensorflow

http://stackoverflow.com/questions/37593960/set-k-largest-elements-of-a-tensor-to-zero-in-tensorflow

But these methods seem cumbersome and tricky. Are there better ways of updating existing variables?

Issue 2:
I've been trying to install tensorflow with GPU support using these steps:

http://www.nvidia.com/object/gpu-accelerated-applications-tensorflow-installation.html

This is the error message that I'm getting when I try to run the bazel build command for building the tensorflow pip package (with the --config-cuda flag set):

bazel build -c opt --config=cuda //tensorflow/tools/pip_package:build_pip_package

i get :

The specified --crosstool_top '//third_party/gpus/crosstool:crosstool' is not a valid cc_toolchain_suite rule

What's strange is that if i remove the --config=cuda flag, I don't get the error message while building and I'm able to install tensorflow successfully - but without GPU support.