WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
🚀 Feature request

I was just reading how make style can be automated with pre-commit hooks. Noticing how often I run and even more often forget to run make style before committing, perhaps others are in the same boat - and therefore I thought to propose to the dev community to (mostly) automate this process. The only cons is that each dev will still have to run pre-commit install once after cloning the project. This is a security feature of git, so it won't run anything automatically unless you take action to enable such thing.

If I understand it correctly, if an individual dev doesn't run pre-commit install inside the repo, things are just as normal as they are now. That dev will just run make style manually. i.e. the proposed feature is optional for those who want it.

I read about it here, please scroll down to the section: "Black as a Git pre-commit hook". And it links to the whole detailed website: https://pre-commit.com/

Issue 2:
System Info

transformers version: 4.19.2

Platform: Linux-5.4.0-72-generic-x86_64-with-glibc2.29

Python version: 3.8.10

Huggingface_hub version: 0.7.0

PyTorch version (GPU?): 1.11.0+cu113 (False)

Tensorflow version (GPU?): not installed (NA)

Flax version (CPU?/GPU?/TPU?): not installed (NA)

Jax version: not installed

JaxLib version: not installed

Using GPU in script?:

Using distributed or parallel set-up in script?: no

Who can help?

@LysandreJik

Information

The official example scripts

My own modified scripts

Tasks

An officially supported task in the examples folder (such as GLUE/SQuAD, ...)

My own task or dataset (give details below)

Reproduction

from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained('facebook/opt-350m')
tok = AutoTokenizer.from_pretrained('facebook/opt-350m', use_fast=False)

print(model.config.vocab_size) # 50272
print(tok.vocab_size) # 50265

Expected behavior

Hello,

I'm not sure whether this is a bug or if I am missing something.

In the reproduction script above, the model has a bigger vocabulary than the tokenizer. In my project, the LM produces the token 50272, which the tokenizer doesn't know and thus the decode() function fails.

(I use my own text generation script, so is it by any chance that the model is not supposed to output the last 7 tokens that the tokenizer doesn't know?)

Best, David
Issue 1:
I'm submitting a ... (check one with "x")

[ ] bug report => search github for a similar issue or PR before submitting
[x] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

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

Just a fix idea, but it would be cool to have model binding inside of the css styles similar to the model bindings in html templates. This would make things like theming at runtime a lot easier.

Something like this:

.button {

background-color: {{myColorPropertyInMyCompontent}}

}

Issue 2:
I have an app that requires the overloading of some stylesheet properties. A use-case example:

App defines only one style

Api (remote backend) defines a "theming" option, e.g. "logo", "primary color", et cetera.

In my opinion I should be able to interpolate the styles argument just like templates, taken the angular.io website example, something like this:

@Component({
selector: 'todo-app',
template: '<span>{{todos.length}}</span>',
styles:['a { color: {{styles.someAttr}}; }'],
directives: [TodoList, TodoForm]
})
export class TodoApp {
// retrieve and set styles variable from a service
}

Please note that these styles should be applied globally and are received in a dynamic fashion (from a service that outputs json for example).

Sofar I have been unable to find a proper hook to interpolate the styles argument or render style sheets overall. Please advise.
Issue 1:
julia> @generated function generatedfoo(T)
:(return $T)
end
generatedfoo (generic function with 1 method)

julia> (@which generatedfoo(1)).source
ERROR: UndefRefError: access to undefined reference

It doesn't make much sense to me to not have this here. It's what the user wrote, after all, even if you have to look at isstaged to properly interpret it.

Issue 2:
The following code seems to leak the scope of the variable x:

try
for i in 0:0
x = i
end
println("first: $x")
catch err
println(err)
end

try
for i in 1:1
x = i
end
println("second: $x")
catch err
println(err)
end

output:

UndefVarError(:x)
second: 1

The first UndefVarError makes sense since the scope of x is limited in the for loop. But the second time, now x gets visible even in the outside of the for loop. I couldn't explain the change of behavior, so I filed this issue.

The version I used is:

julia> versioninfo()
Julia Version 0.4.0-dev+2304
Commit 8cea71e* (2014-12-29 02:07 UTC)
Platform Info:
System: Darwin (x86_64-apple-darwin13.4.0)
CPU: Intel(R) Core(TM) i5-4288U CPU @ 2.60GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
LAPACK: libopenblas
LIBM: libopenlibm
LLVM: libLLVM-3.3
Issue 1:
Hi, and first, thank you so much for your project.

This problem first appeared in my work project which is unfortunately private. All my files was considered as ignore and appeared in grey in the treeview. I took some time and finally succeed to isolate and reproduce it.

In a Git project, if a .gitignore from a subdirectory match a path from the root of the project, the treeview will use the rule and ignore the path while it's incorrect. Indeed, Git will not do the same mistake and the git status will be different as what Atom show.

You can easily test on this repository I create to demonstrate the problem:

https://github.com/Swiip/atom-git-tree-test

The test.txt file inside the src directory should not be displayed grey as it's not ignored in git.

If it's needed, I tested on a Mac with OSX 10.9.5, Atom 0.134.0, I tried several times to delete cached files and it change nothing. I have no error in the developer panel.

Issue 2:
I've the following setup:

> tree
.
└── ipfs
├── .gitignore
├── ipfs
...
> cat ipfs/.gitignore
ipfs

> echo because ipfs/ipfs is a binary.
and atom is ignoring the entire ipfs/ directory

> echo this shouldnt happen because the .gitignore
is within the directory, and shouldn't apply outside!

thanks all ❤️

(Stopgap: do ./ipfs in .gitignore. but this shouldn't be necessary).
Issue 1:
Version

2.6.10

Reproduction link

https://codesandbox.io/s/functional-components-issue-ubtr8

Steps to reproduce

Create a functional component.

Add that component to another with a class attribute

What is expected?

The class attribute should be added to the root element of the component

What is actually happening?

The class attribute is ignored

Issue 2:
Version

2.5.2

Reproduction link

[https://jsfiddle.net/hastom/uomhejLe/4/](https://jsfiddle.net/hastom/uomhejLe/4/

Steps to reproduce

Inspect list with dev tools

Click add to end button

All
nodes highlithed that means they were updated

What is expected?

First item dropped, new item inserted at the end of the list, other items stay still

What is actually happening?

All items dropped, new items inserted

I first discovered this behavior while trying to create a dynamic list moving up and down with transiotion (of "top" property) on each element. Moving down was OK, transition applied correctly. Moving up was just moving elements without any trasition. I went deeper and discovered whole list was rerendered so transition was not applied.
Issue 1:
Symfony version(s) affected: 4.1.2

Description

Since i update from 4.1.1 to 4.1.2, default binding from controllers failed :

Controller "App\Controller\Admin\KitController::edit()" requires that you provide a value for the "$customDir" argument. Either the argument is nullable and no null value has been provided, no default value has been provided or because there is a non optional argument after this one.

custom_dir is defined in env, i try to rollback to 4.1.1 and it works.

How to reproduce

service.yml

services:
# default configuration for services in *this* file
_defaults:
bind:
$customDir: '%custom_dir%'

Controller :

public function edit($customDir) {
// ...
}

Issue 2:
Symfony version(s) affected: 3.4.13 (and other new patch releases for 4.0 & 4.1)

Description

I just updated my app from 3.4.12 to 3.4.13 and have an error with a service configuration.

How to reproduce

Add a binding by variable name for an argument of a controller action.

I have a controller like this:

class LegacyAdminController extends Controller
{
/**
* @Route("/{path}", requirements={"path"=".+"})
*/
public function proxyAction(
ServerRequestInterface $request,
LegacyUserMapper $legacyUserMapper,
Client $legacyProxyClient
) {

And the config:

App\Controller\LegacyAdminController:
tags: ['controller.service_arguments']
bind:
$legacyProxyClient: '@ca_admin.legacy_proxy_client'

Now I get this error:

In ResolveBindingsPass.php line 48:

Unused binding "$legacyProxyClient" in service "CA\AdminBundle\Controller\LegacyAdminController".

Possible Solution

As just discussed with @nicolas-grekas the problem was introduced in https://github.com/symfony/symfony/pull/27834/files.
Issue 1:
Challenge http://www.freecodecamp.com/challenges/waypoint-comment-your-javascript-code has an issue. Please describe how to reproduce it, and include links to screenshots if possible.

If Comment is done in a block format it fails challenge.

Issue 2:
Challenge http://www.freecodecamp.com/challenges/waypoint-comment-your-javascript-code has an issue. Please describe how to reproduce it, and include links to screenshots if possible.

Left side error checking seems wrong
Issue 1:
opencv-4.1.2 breaks vlc, e.g., since it compiles some files with gcc instead of g++

Some parts of /usr/include/x86_64-pc-linux-gnu/opencv4/opencv2/core/cvdef.h

can only be compiled by a C++ compiler, e.g.,

#ifndef CV_CXX11

if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)

define CV_CXX11 1

endif

#else

if CV_CXX11 == 0

undef CV_CXX11

endif

#endif

#ifndef CV_CXX11

error "OpenCV 4.x+ requires enabled C++11 support"

#endif

or

#include

Is it really intended to break packages which compile (some) files with a C-compiler?

Issue 2:
System information (version)

OpenCV => 3.4.1

Operating System / Platform => Linux

Compiler => gcc-7-20180222 (a 7.3.1 snapshot)

vlc-3.0.1 fails to build against opencv-3.4.1, because the C compiler produces and error at line 485 of /usr/include/opencv2/core/cvdef.h. The error message is:

/usr/include/opencv2/core/cvdef.h:485:1: error: unknown type name 'namespace'

This is because the C compiler is trying to compile C++ code.

Steps to reproduce

build and install opencv-3.4.1

configure vlc-3.0.1 to include opencv and then run make

Proposed fix

The following patch to opencv allows the build of vlc to complete:

--- opencv-3.4.1/modules/core/include/opencv2/core/cvdef.h.orig	2018-02-28 10:16:45.000320632 +0000
+++ opencv-3.4.1/modules/core/include/opencv2/core/cvdef.h	2018-02-28 10:34:30.852346927 +0000
@@ -454,6 +454,7 @@ Cv64suf;

// Integer types portatibility
+#if defined __cplusplus
#ifdef OPENCV_STDINT_HEADER
#include OPENCV_STDINT_HEADER
#else
@@ -494,6 +495,9 @@ typedef ::uint64_t uint64_t;
}
#endif
#endif
+#else
+#include <stdint.h>
+#endif

//! @}

With the patched opencv installed, I have also built the frei0r-plugin-1.6.0, gstreamer-plugins-bad-1.12.4 and LiVES-2.8.7, all of which use opencv (although I don't know whether they failed against an unpatched version)
Issue 1:
For Visual Studio Code 0.10./6

And for Windows 7 Enterprise SP1

When in the cmd I type %HTTP_PROXY%

Then I get "http://proxy.mydomain.com:8083"

And when I try do install any extension, e.g. PureScript language supports.

Then I get the error: getaddrinfo ENOTFOUND proxy.ml.mydomain:8083 proxy.mydomain.com:8083:8083

My User Settings is { "http.proxyStrictSSL": false }

My Workspace Settings is {..."http.proxy": ""...}

WTF? And why the port is duplicated???

I get the same error even when I overwrite "http.proxy" with explicit value in my User Settings.

Issue 2:
Whenever I try to install any extension, using ext install, I get a connect ETIMEDOUT 191.238.172.191:443 error.

Trying to navigate to https://191.238.172.191 in the browser produces a warning regarding the certificate being valid only for *.market.visualstudio.com, but I'm allowed to proceed.

Shouldn't VSCode try to connect to the name instead of the IP?

I'm behind a proxy, VSCode updates just fine behind it, and also lists the available extensions. The firewall here logs the invalid certificate but allows the connection to proceed. Doesn't look like a problem in my end...

OS: Windows 7

VSCode: 0.10.1
Issue 1:
Why this framework using Dart ? not using more stable and robust like TypeScript or ES6 Javascript ?

Look at Angular and other TypeScript based framework, it stable and easy to understand for large team and beginner.

So any plan to leave Dart and using TypeScript language ?

Issue 2:
Hi, I don't know to ask for help for implementation so I fire an issue. If you find this not appropriate, please delete. Thanks.

In iOS, we have a UITabBarController which stays permanently at the bottom of the screen when we push to a new ViewController.

In iOS, we have a UITabBarController which stays permanently at the bottom of the screen when we push to a new ViewController.

In Flutter, we have a bottomNavigationBar of a Scaffold. However, unlike iOS, when we Navigator.push to a new screen, this bottomNavigationBar disappears.

In my app, I want to fulfil this requirement: Home screen has a bottomNavigationBar with 2 items (a & b) presenting screen A & B. By default, screen A is displayed. Inside screen A, there is a button. Tap that button, Navigator.push to screen C. Now in screen C, we can still see the bottomNavigationBar. Tap item b, I go to screen B. Now in screen B, tap item a in the bottomNavigationBar, I go back to screen C (not A, A is currently below C in the navigation hierarchy).

How can I do this? Thanks, guys.

I'm including some pictures for demonstration:

Screen A

https://i.stack.imgur.com/TLckw.png

Tap Go to C button, push to screen C

https://i.stack.imgur.com/5MpU5.png

Tap Right item inside bottom navigation bar, go to screen B

https://i.stack.imgur.com/gtqQq.png
Issue 1:
It is unclear in the prompt whether the test function sym(A, B, C, D, E, F) is requesting the user to create a function that accomplishes:

return A △ B △ C △ D △ E △ F

OR

return ((((A △ B) △ C) △ D) △ E) △ F

The syntax difference is important. For the following test case:

A = [3, 3, 3, 2, 5] B = [2, 1, 5, 7] C = [3, 4, 6, 6] D = [1, 2, 3], E = [5, 3, 9, 8] F = [1] should return [1, 2, 4, 5, 6, 7, 8, 9]

The first version I mentioned (the symmetric difference of ALL ARRAYS) would return

[4, 7, 8, 9]

Whereas the second returns

[1, 2, 4, 5, 6, 7, 8, 9].

I'm just wondering if we could make this clearer in the instructions? Technically, the instructions

Create a function that takes two or more arrays and returns an array of the symmetric difference (△ or ⊕) of the provided arrays.

actually ask for the first version, not the second version, and according to my limited programming and mathematics knowledge, the test cases are wrong ...

Maybe someone can clarify this?

Issue 2:
This is a bit of a formal issue, not a "bug" per se:

In CSS, proper font names like Arial or "Times New Roman" should be Title Case (and in quotes where applicable).

Generic font names like sans-serif or monospace should be lowercase.

--- wm

Challenge Set the Font Family of an Element has an issue.

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) 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:

<style>
.red-text {
color: red;
}

p {
font-size: 16px;
font-family: monospace;
}
</style>

<h2 class="red-text">CatPhotoApp</h2>

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
Issue 1:
VSCode Version: Version 1.2.0 (1.2.0)

OSX Version: 10.11.5

#!/bin/bash
export GOPATH=$HOME/go
export GOBIN=$HOME/go/bin
export GOAPP=$HOME/go_appengine
export JSBIN=$HOME/node_modules/.bin/
export ANDROID=$HOME/Library/Android/sdk/platform-tools/
export PATH=$PATH:$GOBIN:$GOAPP:$JSBIN:$ANDROID
export EDITOR="code"
export VISUAL="code"
export CLICOLOR=1
function prompt {
EXITSTATUS="$?"
BOLD="\[\033[1m\]"
RED="\[\033[1;31m\]"
GREEN="\[\e[32;1m\]"
BLUE="\[\e[34;1m\]"
OFF="\[\033[m\]"

PROMPT="\u@\h ${BLUE}\W${OFF}"

if [ "${EXITSTATUS}" -eq 0 ]
then
PS1="${PROMPT}${BOLD}${GREEN}/${OFF} "
else
PS1="${PROMPT}${BOLD}${RED}/${OFF} "
fi

PS2="${BOLD}>${OFF} "
}
export PROMPT_COMMAND=prompt

It seems it does execute .bash_profile but it doesn't do it correctly on startup?

After doing it manually it works? (see screenshots)

Issue 2:
#3246

When tab focus mode is on, doing the following:

Select text editor

Press tab

At this point I have no idea what is focused as I can't see anything on the UI with a border.

Pressing enter will add a new line where the cursor was, pressing enter again will not add another line

Pressing enter will add a new line, pressing backspace and enter will add another new line
Issue 1:
// CREATE INDEX

curl -X PUT -d '{

"number_of_shards" : 1,

"number_of_replicas" : 1

}' "http://localhost:9200/services"

// MAPPING

curl -X PUT -d '{

"service": {

"properties": {

"name": {

"type": "string",

"index": "not_analyzed"

},

"pin": {

"type":"geo_point"

},

"currentstatus": {

"type": "string",

"index": "not_analyzed"

},

"suggest_field": {

"type": "completion",

"context": {

"status": {

"type": "category",

"default": "bad",

"path": "currentstatus"

},

"location": {

"type": "geo",

"precision": "100km",

"neighbors": true,

"path":"pin",

"default": {

"lat": 0.0,

"lon": 0.0

}

}

}

}

}

}

}' "http://localhost:9200/services/service/_mapping"

// Insert record

curl -X PUT -d '{

"name": "knapsack",

"pin": {

"lat": 47.620499,

"lon": -122.350876

},

"currentstatus" : "good",

"suggest_field": {

"input": [

"knacksack",

"backpack",

"daypack"

]

}

}' "http://localhost:9200/services/service/1"

// Suggest

curl -X POST -d '{

"suggest": {

"text": "k",

"completion": {

"field": "suggest_field",

"size": 10,

"context": {

"location": {

"lat": 47.482880,

"lon": -122.217064,

"precision":"100km"

},

"status": "good"

}

}

}

}' "http://localhost:9200/services/_suggest"

You'd expect that we'd get a suggestion here. When I do the category completion alone, it works correctly but it doesn't seem to get the lat/lon from the path but rather always uses the default. I don't want to have to duplicate data and this is not working as expected. What is going wrong here?

Issue 2:
Currently the Completion & Context Suggesters suggests from documents that were deleted but not still merged away by Lucene. Ideally the suggesters should never suggest from deleted documents.

The solution is to encode lucene docids in the generated FST used by suggesters, and filter out suggestions from deleted documents at query time. This approach would also allow us to make use of the lucene docids to make the suggesters more flexible in terms of returning fields not specified at 'index' time in the future. This approach also implies changing how the FSTs are built currently (i.e. dedup-ing same surface forms might not make sense anymore, as each entry will be tied to a lucene doc).

NOTE: this is an issue for feature/nrt_suggester
Issue 1:
Description

Cache pools can easily be configured in the framework bundle with

framework:
cache:
pools:
cache.pool1:
adapter: cache.adapter.redis
cache.pool2:
adapter: cache.adapter.redis

But all the cache services created only implement PSR-6 Psr\Cache\CacheItemPoolInterface. We would like to use PSR-16 Psr\SimpleCache\CacheInterface instead. Currently the only solution seems to be to wrap all the pools in an adapter like

services:
cache.simple.pool1:
class: Symfony\Component\Cache\Simple\Psr6Cache
arguments: ['@cache.pool1']

cache.simple.pool2
class: Symfony\Component\Cache\Simple\Psr6Cache
arguments: ['@cache.pool2']

This is quite cumbersome as we have alot of pools. It would be nice if the framework bundle provides a way to use SimpleCache directly. Maybe something like the following would create PSR-16 caches instead:

framework:
cache:
pools:
cache.pool1:
adapter: cache.adapter.redis
simple: true
cache.pool2:
adapter: cache.adapter.redis
simple: true

Issue 2:
What do you think about deprecating the Date and Time constraints in favor of add a format option to the DateTime constraint.

We can do that using the DateTime::createFromFormat() and DateTime::getLastErrors() to check if a date is valid based on a specific format.

What do you think? Can be this discussed?
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

Developer should be able to shallow test components in pages using withRedux

Current Behavior

Cannot access methods or state within components in pages using withRedux

Steps to Reproduce (for bugs)

Create a page

import withRedux

Manipulate state within the page

Shallow test the page

console log the shallow test.

State or methods will not be shown in console.log.

Context

We haven't been able to write tests for pages using withRedux

Your Environment

Tech
Version

next
3.2.1

node
6.3.1

OS
OSX Sierra

browser
Chrome 61.0.3163.100

Issue 2:
❌ This won't hot reload when changes are made on render function:

import React from 'react'

export default class Opa extends React.Component {
render = () => (
<div>Welcome to next.js!</div>
)
}

✅ But this will hot reload when changes are made on render function:

import React from 'react'

export default class Opa extends React.Component {
render() {
return (
<div>Welcome to next.js!</div>
)
}
}

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

Expected Behavior

The arrow function version should hot reload. The create-react-app for instance can hot reload with arrow function.

Your Environment

Tech
Version

next
^3.0.1-beta.20

node
v6.11.1

OS
macOS

browser
Chrome 59
Issue 1:
Elasticsearch version: 2.3.0

Plugins installed: [head, decompound, naturalsort]

JVM version: 1.8.0_03

OS version: Linux Mint 18

Description of the problem including expected versus actual behavior: When performing a multi_match query with fuzziness enabled results with typos have higher score than exact matches. The expected behavior should give exact matches higher score than fuzzy matches.

Steps to reproduce:

Create the search index with the provided index settings (index.txt)

Insert the documents with the following values for the field "username": user100, user1000, user1001, user1002, user1003, user1004

Execute the multi_match query (query.txt)

The first few results are "user1000", "user1001", "user1002" etc. instead "user100"

Provide logs (if relevant): /

This issue is a duplicate of #3125. But somehow this issue isn't fixed yet, although the Lucene bugfix https://issues.apache.org/jira/browse/LUCENE-329 is marked as solved.

Issue 2:
Using this query:

"query": {

"fuzzy": {

"_all": "excellent"

}

The top results are all misspellings of excellent, likely as the result of IDF.

This is surely behaviour that typical end users would see as a bug?

If nothing else the docs for fuzzy query should reference FuzzyLikeThis query as an alternative.

The ideal of behaviour of fuzzy was discussed here:

https://issues.apache.org/jira/browse/LUCENE-329