WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Preflight Checklist

I have read the Contributing Guidelines for this project.

I agree to follow the Code of Conduct that this project adheres to.

I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

Electron Version:

10.1.2

Operating System:

Windows 10 Enterprise (1909)

Last Known Working Electron version:

none

Expected Behavior

I should be able to see the first line of the uploaded file in the browser's console every time I upload the file.

Actual Behavior

Once I reload the app, I do not see the first line of the uploaded file in the browser's console in the subsequent uploads.

To Reproduce

Download the app folder from the following ftp link:

ftp://ftp.lrz.de/transfer/bug/test_Electron/

Install the dependencies as:

npm install

launch the app using the following command:

npm start

click Upload File button and upload the file sample.txt from test_Electron/assets folder.

In the browser's console you should see the following output:

First line of the file: abc (highlighted using red rectangle in the first screenshot)

Now reload the app by pressing CTRL + SHIFT + R

click Upload File button and upload the file sample.txt from test_Electron/assets folder.

you will NOT see First line of the file: abc in the browser's console (see the second screenshot)

Screenshots

Expected Behavior

Behavior After Reload

Additional Information

The same app (with exactly the same electron version) works perfectly when I run it on 64-bit Ubuntu 18.04 and 20.04

Issue 2:
Problem Description

No way to implement the frameless window in Windows OS with only the controls

Proposed Solution

I would really appreciate a feature in electron that can only implement the frameless window without the electron name and icon to the side in windows OS like the (titleBarStyle: ‘hidden’.) feature in Mac OS

Alternatives Considered

I have tried implementing custom NPM solutions but they really interfere with my project and make it slow in run-time

Additional Information

I have tried using the feature "Frame: false" but it does not provide the controls and also the window is not draggable.
Issue 1:
Issue 1) y float values get truncated.

from sklearn.svm import SVC
clf = SVC()
X = [[10], [20]]
y = [3.3, 6.6]
clf = clf.fit(X, y)
clf.predict([10]) # outputs array([ 3.])

It predicts a 3. instead of a 3.3.

Issue 2) Output types are float arrays.

from sklearn.svm import SVC
clf = SVC()
X = [[10], [20]]
y = [4, 5]
clf = clf.fit(X, y)
clf.predict([10]) # outputs array([4.])

The output is a float array when it could be typed int maybe.

Issue 3) Targets can't be strings.

from sklearn.svm import SVC
clf = SVC()
X = [[10], [20]]
y = ["a","b"]
clf = clf.fit(X, y)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-247-fa0538af1002> in <module>()
----> 1 clf = clf.fit(X, y)

/usr/lib/python2.7/site-packages/sklearn/svm/base.pyc in fit(self, X, y, sample_weight)
160
161 X = atleast2d_or_csr(X, dtype=np.float64, order='C')
--> 162 y = np.asarray(y, dtype=np.float64, order='C')
163
164 if self.impl != "one_class" and len(np.unique(y)) < 2:

/usr/lib/python2.7/site-packages/numpy/core/numeric.pyc in asarray(a, dtype, order)
322
323 """
--> 324 return array(a, dtype, copy=False, order=order)
325
326 def asanyarray(a, dtype=None, order=None):

ValueError: could not convert string to float: a

Issue 2:
Open an issue for the latest Circle failure on master.

Unexpected failing examples:
/home/circleci/project/examples/applications/plot_tomography_l1_reconstruction.py failed leaving traceback:
Traceback (most recent call last):
File "/home/circleci/project/examples/applications/plot_tomography_l1_reconstruction.py", line 115, in <module>
proj_operator = build_projection_operator(l, l / 7.)
File "/home/circleci/project/examples/applications/plot_tomography_l1_reconstruction.py", line 95, in build_projection_operator
proj_operator = sparse.coo_matrix((weights, (camera_inds, data_inds)))
File "/home/circleci/miniconda/envs/testenv/lib/python3.6/site-packages/scipy/sparse/coo.py", line 150, in __init__
self._shape = check_shape((M, N))
File "/home/circleci/miniconda/envs/testenv/lib/python3.6/site-packages/scipy/sparse/sputils.py", line 281, in check_shape
new_shape = tuple(operator.index(arg) for arg in args)
File "/home/circleci/miniconda/envs/testenv/lib/python3.6/site-packages/scipy/sparse/sputils.py", line 281, in <genexpr>
new_shape = tuple(operator.index(arg) for arg in args)
TypeError: 'numpy.float64' object cannot be interpreted as an integer
Issue 1:
https://play.golang.org/p/rEXm1QaLgo prints

false
true

instead of

false
false

This happens both in the playground (currently 1.4) and at tip (1.5) (go version devel +4ec018e Fri Aug 21 13:08:00 2015 -0700 darwin/amd64).

I suspect the condition code register gets clobbered or perhaps is not properly saved/restored across function calls.

Thanks to Daniel Martí (@mvdan) for reporting this.

Issue 2:
var lines = []string{"foo", "bar", "baz"}

func main() {
for _, line := range lines {
if len(line) == 0 ||
[]byte(line)[0] == []byte("#")[0] {
continue
}
fmt.Println(line)
}
}

This snippet of code prints the strings as you would expect when compiled with 1.4, but produces no output when compiled with 1.5.

http://play.golang.org/p/hR7iVDC-Vu

Here's a slightly simpler example of the same bug:

s := "foo"
fmt.Println(len(s)==0 || []byte(s)[0]==[]byte("#")[0])

This results in false with 1.4, but true with 1.5.

by taruti in #golang-nuts on irc
Issue 1:
gorename reports a variable as being unused when the variable is assigned in a closure. go build will compile the code without complaining.

Error reported by gorename:

11:50 $ gorename -offset rotator.go:#831 -to TimeFormat
/home/iand/src/code.avct.io/services/log/rotator.go:398:6: s declared but not used
gorename: couldn't load packages due to errors: code.avct.io/services/log

Can reproduce with code like this:

func Scan() {
var s string

tester(func() {
s = "done"
})
}

func tester(fn func()) {
fn()
}

go version go1.6 linux/amd64

golang.org/x/tools commit 6f233b9

This renders gorename unusable if any of the GOPATH contains this pattern of code, even though it compiles fine with the go command.

Issue 2:
For this program:
http://play.golang.org/p/BzMO7Vt3uy
switch x := interface{}(nil).(type) {}
go/types reports an error but gc does not.

I realize the spec does not say what should happen here, but the fact of this
implementation-specific behaviour is that we have two dialects of Go whose tools reject
each others' programs.

We should probably make the tools consistent one way or another.
I would also argue in favour of removing this hole in the spec.
Issue 1:
By following the upgrade to 2.7 documentation, I'm changing choice options.

With the given form:

->add('environment', 'choice', [
'choices' => [
'production' => 'Production',
'beta' => 'Beta',
'development' => 'Development',
'binpkg' => 'BinPkg',
],
])

We get this output:

<select>
<option value=""></option>
<option value="production">Production</option>
<option value="beta">Beta</option>
<option value="development">Development</option>
<option value="binpkg">BinPkg</option>
</select>

If I try to reverse choices and use choices_as_value option:

->add('environment', 'choice', [
'choices' => [
'Production' => 'production',
'Beta' => 'beta',
'Development' => 'development',
'BinPkg' => 'binpkg',
],
'choices_as_values' => true,
])

I got this:

<select>
<option value=""></option>
<option value="0">Production</option>
<option value="1">Beta</option>
<option value="2">Development</option>
<option value="3">BinPkg</option>
</select>

As you can see, my associated array keys are simply ignored and replaced by numeric values.

Issue 2:
Q
A

Bug report?
no

Feature request?
no

BC Break report?
no

RFC?
no

Symfony version
2.8.11

If my application has multiple firewalls with some of them using the same user provider; they will be added to the AuthenticationProviderManager as unique authentication providers.

Is this intended behavior c.q. is there a use case I'm overlooking?

I would expect them to be deduplicated somewhere during the configuration compilation.
Issue 1:
s = pd.Series([0], index=pd.MultiIndex.from_tuples([('a', 1)]))

# This works:
s.rename(lambda x: x)

# This fails:
s.iloc[0:0].rename(lambda x: x)

Renaming an empty index should not throw an error. It should just return the original empty index. It appears to be failing because _transform_index calls MultiIndex.from_tuples, which doesn't accept an empty list of tuples.

I would imagine that this could instead call from_arrays, which from_tuples calls anyway, or it could check for the special case of an empty index.

Issue 2:
xref #14139 for empty MI

Hi everybody,

in the current version renaming of MultiIndex DataFrames does not work. Lets take the following example:

import datetime as DT
import pandas as pd
df = pd.DataFrame({
'Branch' : 'A A A A A B'.split(),
'Buyer': 'Carl Mark Carl Joe Mark Carl'.split(),
'Quantity': [1,3,5,8,9,3],
'Date' : [
DT.datetime(2013,9,1,13,0),
DT.datetime(2013,9,1,13,5),
DT.datetime(2013,10,1,20,0),
DT.datetime(2013,10,3,10,0),
DT.datetime(2013,12,2,12,0),
DT.datetime(2013,12,2,14,0),
]})

and the following query:

test_df = df[df['Buyer'].isin(['Carl', 'Mark'])].set_index('Buyer', append=True)[['Date']].unstack(['Buyer'])

Now, the following renaming does not work

test_df.rename(columns={('Date', 'Carl'): 'Carl'}, inplace=True)

Thanks in advance

Andy
Issue 1:
Migrated issue, originally created by Wichert Akkerman (@wichert)

Except for the first entry all search results are listed twice. As an example here are the current search results for query:

sqlalchemy.ext.horizontal_shard.ShardedQuery (Python class, in Horizontal Sharding)
sqlalchemy.ext.horizontal_shard.ShardedQuery.set_shard (Python method, in Horizontal Sharding)
sqlalchemy.ext.horizontal_shard.ShardedQuery.set_shard (Python method, in Horizontal Sharding)
sqlalchemy.orm.query.Query (Python class, in Querying)
sqlalchemy.orm.query.Query (Python class, in Querying)
sqlalchemy.orm.query.Query.add_column (Python method, in Querying)
sqlalchemy.orm.query.Query.add_column (Python method, in Querying)
sqlalchemy.orm.query.Query.add_columns (Python method, in Querying)
sqlalchemy.orm.query.Query.add_columns (Python method, in Querying)
sqlalchemy.orm.query.Query.add_entity (Python method, in Querying)
sqlalchemy.orm.query.Query.add_entity (Python method, in Querying)

Issue 2:
Describe the bug

When using AsyncSession in a session_maker and scoped_session around that, the .close() call on the AsyncSession object is not awaited.

To Reproduce

from asyncio import current_task, run

from sqlalchemy.ext.asyncio import create_async_engine, AsyncSession
from sqlalchemy.orm import scoped_session, sessionmaker

engine = create_async_engine('sqlite+aiosqlite:///test.db')
async_session = scoped_session(sessionmaker(engine, expire_on_commit=False, class_=AsyncSession),
scopefunc=current_task)

async def main():
async with async_session() as session:
pass

async_session.remove()

run(main())

Error

Provide the complete text of any errors received including the complete

stack trace. If the message is a warning, run your program with the

-Werror flag: python -Werror myprogram.py

D:\dev\projects\async-test\site-packages\sqlalchemy\orm\scoping.py:145: RuntimeWarning: coroutine 'AsyncSession.close' was never awaited
self.registry().close()
RuntimeWarning: Enable tracemalloc to get the object allocation traceback

Versions.

OS: Windows 10

Python: 3.9.2

SQLAlchemy: 1.4.15

Database: -

DBAPI: aiosqlite 0.17.0

Additional context

Test is provided using aiosqlite, because it's simple, but this fails using asyncpg as well.

Have a nice day!
Issue 1:
Description

Currently, the 2nd Y-axis on the right side in the Mixed Time-Series does not allow Label to be vertically oriented on the side. Can this be fixed?

Design input

Naturally, the label should behave the same as the left Y-Axis (which is oriented vertically).

Issue 2:
Hi,

We are attempting to create a highly restricted user in Caravel. This user can create slices and dashboards, but only for a specific set of datasources. They should not be able to even see the existence of other datasource when creating a slice.

We currently have two datasources, one as an admin datasource with access to everything, and one as a restricted datasource for the restricted user.

When navigating to the Slice, the restricted user can still see all of the other datasources, even if restriction is denied.

Is there a way to prevent the restricted user from even seeing the other datasources?

(Sorry for duplicating this question in the Google Group.)

Thank you!
Issue 1:
I've tried PowerToys Run for quite some time now, I also use Win+R for the shortcut, so essentially I've used it as a replacement for the default run, by doing this I've noticed that most of the Default Run commands doesn't work on PowerToys Run, like appdata, system32, devmgmt.msc, etc etc, without using shell commands (prefix >), and also appdata doesn't work with shell commands (only %appdata% works), and maybe there are some other things that's missing from PowerToys Run that exists in default run, but I only found appdata so far.

That's all for now, thanks

Issue 2:
Summary of the new feature/enhancement

It would be helpful to have a PowerToy that enables any window to be minimized to system tray.

As an example, I have some PWAs installed that I use very often (YouTube Music, Outlook Webmail). However they are minimized most of the time. By minimizing to system tray it would free up space from the taskbar.

Proposed technical implementation details (optional)

There is already an existing open source project: RBTray

Steps:

Single Right-click on minimize window icon

The window is minimized to tray, displaying its application icon

Single Left-click on application icon in system tray

The window is restored
Issue 1:
Q
A

Bug report?
no

Feature request?
yes

BC Break report?
no

RFC?
no

Symfony version
4.1

Recall for #22308 :)

# security.yaml
firewalls:
# ....
api:
pattern: ^/api
stateless: true
anonymous: true
# ...

# bundle extension
public function prepend(ContainerBuilder $container)
{
$security = $container->getExtensionConfig('security');
$security[0]['firewalls']['api']['anonymous'] = false;
$security[0]['firewalls']['api']['fos_oauth'] = true;

$container->loadFromExtension('security', $security[0]);
}

Result

Configuration path "security.access_control" cannot be overwritten. You have to define all options for this path, and any of its sub-paths in one configuration section.

I understand loadFromExtension adds a new config branch ($configs[] = $config). But im trying to fake 1 config branch, so i guess i need reflection to clear current branch first.

Can we create API for that? Or what about allowing overwrites on existing elements?

Thx!

Issue 2:
Q
A

Bug report?
yes

Feature request?
no

BC Break report?
no

RFC?
yes

Symfony version
3.4 ? maybe also before

In the sulu recipe, we will add another file which adds the firewall to the existing configuration. This is not really possible without manually adding the admin key inside the security.yaml file!

@stof hopefully you will add your thought which we have at the #SymfonyConHackday2017
Issue 1:
Checklist

I have checked the issues list

for similar or identical bug reports.

I have checked the pull requests list

for existing proposed fixes.

I have checked the commit log

to find out if the bug was already fixed in the master branch.

I have included all related issues and possible duplicate issues in this issue

(If there are none, check this box anyway).

Related Issues and Possible Duplicates

Related Issues

None

Possible Duplicates

None

Description

Per documentation here Task.request; expect this to be an instance of Request. However in reality this is an instance of Context that wraps request._request_dict. This lacks the message property as described on Request.

My expectation per the documentation is that Task.request should behave as an instance of Request.

Suggestions

Document the Context class and then change Task.request to be an instance of Context; or

Include context missing attributes in request._request_dict so that it meets the Request expectations; or

Include the actual request instance in context.

In my usecase I ended up doing the following (see task_b):

from celery.worker.request import Request
from celery import Celery, Task
# celery_app is an instance of Celery

class MyRequest(Request):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self._request_dict["message"] = self.message

class MyTask(Task):
Request = MyRequest

@celery_app.task()
def task_a(*args, **kwargs):
print(task_a.request.message) # Fails: AttributeError: 'Context' object has no attribute 'message'

@celery_app.task(base=MyTask)
def task_b(*args, **kwargs):
print(task_b.request.message) # Succeeds

Issue 2:
Checklist

I have checked the issues list

for similar or identical bug reports.

I have checked the pull requests list

for existing proposed fixes.

I have checked the commit log

to find out if the bug was already fixed in the master branch.

I have included all related issues and possible duplicate issues in this issue

(If there are none, check this box anyway).

Related Issues and Possible Duplicates

Related Issues

#6266

Possible Duplicates

None

Description

Since we migrated to Click, preload options are now using Click's API.

Previously, the used argparse's API.

This breaking change was not properly documented.

Suggestions

We should update our extending user guide and use the correct APIs.
Issue 1:
Hi,

In testing the hann function (and a few others), odd length windows are the same for both symmetrical and periodic types. For example:

from scipy.signal import hann
w1 = hann(5,True) #array([ 0. , 0.5, 1. , 0.5, 0. ])
w2 = hann(5, False) #array([ 0. , 0.5, 1. , 0.5, 0. ])

I think the cause is the N-1 denominator which is not adjusted for odd lengths when periodic.

I believe this issue was brought up here

Issue 2:
Original ticket http://projects.scipy.org/scipy/ticket/1665 on 2012-05-30 by @endolith, assigned to @cournape.

The window functions in scipy.signal have a sym option for producing symmetric windows or periodic windows, but if you create a periodic window of an odd size, it gives identical output to a symmetric window. This is in the code, but is it right? It doesn't match Matlab's behavior, as described [https://ccrma.stanford.edu/~jos/sasp/Matlab_Hamming_Window.html here].

If it's right, it should be documented why it works this way

>> hamming(3) % same in Matlab and Octave
ans =
0.0800
1.0000
0.0800
>> hamming(3,'symmetric') % Matlab only
ans =
0.0800
1.0000
0.0800
>> hamming(3,'periodic') % Matlab only
ans =
0.0800
0.7700
0.7700
>> hamming(4) % same in Matlab and Octave
ans =
0.0800
0.7700
0.7700
0.0800

SciPy:

In [2]: hamming(3)
Out[2]: array([ 0.08, 1. , 0.08])

In [3]: hamming(3,sym=True)
Out[3]: array([ 0.08, 1. , 0.08])

In [4]: hamming(3,sym=False)
Out[4]: array([ 0.08, 1. , 0.08])

In [5]: hamming(4)
Out[5]: array([ 0.08, 0.77, 0.77, 0.08])

In [6]: hamming(4, sym=True)
Out[6]: array([ 0.08, 0.77, 0.77, 0.08])

In [7]: hamming(4, sym=False)
Out[7]: array([ 0.08, 0.54, 1. , 0.54])
Issue 1:
Modal is not working with IE 10

Issue 2:
I got always the following error in css (also you don't change anything):

A less error occured trying to build your bundle. You've likely entered an invalid input into the less variable field. Check your syntax and try again!

thanks!

{"type":"Parse","message":"Syntax Error on line 792","index":25106,"filename":"bootstrap.css","line":792,"column":11,"extract":[" *margin: -5px 0 5px;"," ove rflow: hidden;"," background-color: @top;"]}
Issue 1:
Hello,

it seems that nextjs' router has a trouble on Windows filesystem, generating code like this:

window.__NEXT_REGISTER_PAGE('/page\subpage', function() { ...

which ultimately leads to syntax error "Invalid Unicode escape sequence"

I am quite new when it comes to node, so I might be wrong, but fix should be in using nodejs "path" utility and its "normalize" or "resolve" functions to generate paths like these. See https://shapeshed.com/writing-cross-platform-node/#use-path-normalize-to-create-reliable-paths

Thank you,

David S.

Issue 2:
from slack channel

aktxyz [12:36 PM]

I just updated my nextjs to the latest 2.3.0-alpha1 ... and my navigation tags stopped working, I tried older versions one by one, and the nav components stopped working on the jump from 2.1.1 to 2.2.0

before digging around ... any thoughts on what may be causing this?

aktxyz [12:43 PM]

the routeChangeStart event fires, but the routeChangeComplete never fires

aktxyz [1:25 PM]

it looks like the issue I am seeing is limited to subdirectories under pages ...

this works About

this fails About

[1:25]

where pages/about.js AND pages/App/about.js both exist

This ended up being related to back slashes, I solved by changing this line

https://github.com/zeit/next.js/blob/master/server/build/plugins/pages-plugin.js#L15

from

const routeName = /${pageName.replace(/[/\]?index$/, '')}``

to

const routeName = /${pageName.replace(/[/\]?index$/, '')}.replace(/\\/g, '/')

There is probably a more elegant way or place to do this, can someone chime in on thoughts for this?
Issue 1:
Environment

Windows build number: Microsoft Windows [Version 10.0.18362.175]
Windows Terminal version (if applicable): 0.2.1715.0

Any other software?

Steps to reproduce

I tried to keep profiles.json saved in my OneDrive, so I created a profiles.json symlink as the following:

DEL /Q %LocalAppData%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\RoamingState\profiles.json
mklink %LocalAppData%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\RoamingState\profiles.json %ONEDRIVE%\Windows\conf\WindowsTerminal\profiles.json

Expected behavior

It should work exactly like the actual profiles.json file: any modification will trigger the reload of the app.

Actual behavior

Windows Terminal works fine with the settings loaded from the created symlink, but when I modify the file content, it won't trigger any reload of the Terminal app. I have to close and relaunch the app in order to apply the modified settings.

Issue 2:
Environment

Windows build number: 1903 (18362.295)
Windows Terminal version (if applicable): 0.4.2382.0

Any other software?

Steps to reproduce

Open Terminal.

Double-click on Title Bar away from open tabs.

Expected behavior

Terminal window should maximize or restore to original size

Actual behavior

Nothing
Issue 1:
Bug report

Describe the bug

Cannot use next.config.js with a custom express server

To Reproduce

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

Clone custom express server example

Create a next.config.js and add withCSS

Try and import a css fire

Expected behavior

CSS file imports, no errors.

Screenshots

System information

OS: Windows 10

Version of Next.js: 7.0.2

Note

I have added the conf parameter in the next function in the server file.

const app = next({dev: process.env.NODE_ENV !== 'production', conf: require('./next.config')})

Issue 2:
When trying to import the Font Awesome css

import 'font-awesome/css/font-awesome.css';

It fails to compile with this error:

./node_modules/font-awesome/css/font-awesome.css
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleParseError: Module parse failed: Unexpected character '' (1:0)
You may need an appropriate loader to handle this file type.
(Source code omitted for this binary file)