WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Electron version: 1.2.0

Operating system: Mac OS

With electron 1.0.1, I'm able to use the following code:

// requests to 'itch-internal' are used to communicate between web content & the app
let internalFilter = {
urls: ['https://itch-internal/*']
}

session.webRequest.onBeforeRequest(internalFilter, (details, callback) => {
callback({cancel: true})
})

but on 1.2.0, the callback is never called. Did the filter syntax change? Or did the functionality broke with a Chrome update?

Issue 2:
Electron version: 1.2.0

Operating system: OS X 10.11.5

webview preload attribute seems to be broken in Electron 1.2.0/Chrome 51 (worked with 1.1.3/Chrome 50).

Here is how I used it (successfully) on versions prior to 1.2.0:

@webview.preload = "file://#{app.getAppPath()}/js/player-preload.js"

Tried to put it in the HTML webview tag directly as attribute, same thing.

Note: No error in the Console though, it's just that the script is never actually executed.
Issue 1:
Environment

Windows build number: Microsoft Windows [Version 10.0.18362.295]
Windows Terminal version (if applicable): 0.5.2661.0
Any other software? N/A

Steps to reproduce

In #2647 I reported that the Github preview asset 0.4 hung when installing behind a company proxy server. This was fixed by manually installing dependency package: VCLibs.140.

Now, on installing Terminal Preview 0.5, using the GitHub release asset, the same problem happens. There is no indication of the missing dependency. This is on the same machine so I assume VCLibs.140 is still present.

Issue 2:
Summary of the new feature/enhancement

In order to use modern authentication with Exchange Online, there is a module in appref-ms format which checks for updated versions of the module before running. The module is not accessible with Import-Module in a regular Powershell console, but can be installed from the Hybrid tab under the Exchange Admin Center of Exchange Online, as described at https://docs.microsoft.com/en-us/powershell/exchange/exchange-online/connect-to-exchange-online-powershell/mfa-connect-to-exchange-online-powershell?view=exchange-ps

I have attempted to add the full path to the appref=ms package as a new profile in Windows Terminal, but receive an error about bad syntax in profiles.json. I assume this is due to the presence of backslashes in the path to the module. Moving the appreff package to a folder in my PATH doesn't seem to make any difference either.

Considering the consolidation goal of this project, it would be useful to include all forms of the Powershell console, regardless of packaging.

Thanks for your attention!
Issue 1:
[~/go/src/golang.org/x/mobile/example/basic]
$ go run main.go
# golang.org/x/mobile/app
..\..\app\shiny.go:42: w.Events undefined (type screen.Window has no field or method Events)

Issue 2:
In shiny.go: https://github.com/golang/mobile/blob/master/app/shiny.go

w.Events line 42 throws an error because Events does not exist in the Window interface : https://github.com/golang/exp/blob/master/shiny/screen/screen.go

..\golang.org\x\mobile\app\shiny.go:42: w.Events undefined (type screen.Window has no field or method Events)

This was caught while trying to run the basic mobile example on Windows 10 64 bit.
Issue 1:
It would be great if the C# null-conditional operator ?. could be included in TypeScript.

Actually it might be more accurate to call it undefined-or-null-conditional operator in TypeScript.

The expected behavior for a?.b is to return a when a is undefined or null else a.b.

Typescript

var n1: number = 5;
var n2: number = undefined;
var b: boolean = false;

console.log(n1?.toString() || ''); // '5'
console.log(n2?.toString() || ''); // ''
console.log(b?.toString() || ''); // 'false'

Javascript

var n1 = 5;
var n2 = undefined;
var b = false;
console.log(n1 == null ? n1 : n1.toString() || ''); // '5'
console.log(n2 == null ? n2 : n2.toString() || ''); // ''
console.log(b == null ? b : b.toString() || ''); // 'false'

See this thread for the null checking explanation.

It should be possible to chain null-conditional operators:

Typescript

var x1 = null;
var x2 = {};
var x3 = { v: undefined };
var x4 = { v: 5 };
console.log(x1?.v?.toString() || ''); // ''
console.log(x2?.v?.toString() || ''); // ''
console.log(x3?.v?.toString() || ''); // ''
console.log(x4?.v?.toString() || ''); // '5'
console.log(x4?.v?.w?.toString() || ''); // ''

Issue 2:
http://stackoverflow.com/questions/37386265/generic-return-type-of-function-in-typescript

TypeScript Version:

1.7.5 / 1.8.0-beta / nightly (1.9.0-dev.20160217)

Code

// A self-contained demonstration of the problem follows...

Expected behavior:

Actual behavior:
Issue 1:
Description of the problem

https://github.com/mrdoob/three.js/blob/dev/src/objects/Mesh.d.ts#L16

The type of property material on the Mesh class is Material | Material[].

I run into an issue when i use:

const myMesh = new Mesh( someGeometry, new MeshBasicMaterial())
myMesh.material.map = foo //error

The workaround for me is:

const someMaterial = new MeshBasicMaterial()
const myMesh = new Mesh(someGeometry, someMaterial)
someMaterial.map = foo // no error, because the interface is from MeshBasicMaterial

However, the code can end up being somewhat ugly. I tend to end up with something like:

this.material // :Material
this._typedMaterial // ShaderMaterial

Prettier goes crazy when i try to cast it and i end up with something like:

;(this.material as MeshBasicMaterial).map = foo

If i have a few lines to set, i need to do this on each, hence storing it in a variable with the proper type feels less awkward.

Even something that is generic and common for all Material sub classes fails because of the | Material[] such as dephTest.

I was wondering if something involving generics could be applied here, ie:

const myMesh = new Mesh<MeshBasicMaterial>(someGeometry, new MeshBasicMaterial)
myMesh.map = foo //no error because Mesh would use <T>

I'm not sure what the exact syntax for this could be, and if <T> can be limited to a subclass of Material, but the Material interface seems somewhat awkward since it's sort of a utility class, everything we end up using extends from it. But even the class being generic is not that much of an issue, the possibility of the type being an array breaks it more.

Is this an issue, and if it is, what would be the solution? Is there a more elegant typescript approach where the property could be just inferred from the type of material passed?

Three.js version

Dev

r116

Browser

All of them

Chrome

Firefox

Internet Explorer

OS

All of them

Windows

macOS

Linux

Android

iOS

Issue 2:
Description of the problem

Hi, it would be really great to be able to specify generics from Geometry | BufferGeometry and Material in Mesh.d.ts.

In my current project, I need to change the Material property dynamically and I always need to keep an external reference on the Material class used to avoid casting. This change would avoid to always keep the reference and avoid casting.

Change request:

export class Mesh<TGeometry extends Geometry | BufferGeometry = Geometry | BufferGeometry, TMaterial extends Material | Material[] = Material | Material[]> extends Object3D {

constructor(
geometry?: TGeometry,
material?: TMaterial
);

geometry: TGeometry;
material: TMaterial;
morphTargetInfluences?: number[];
morphTargetDictionary?: { [key: string]: number };
readonly isMesh: true;
type: string;

updateMorphTargets(): void;
raycast( raycaster: Raycaster, intersects: Intersection[] ): void;
}

Usage

const mesh = new Mesh<BufferGeometry, MeshPhongMaterial>(myGeometry, myMaterial);

const material: MeshPhongMaterial = mesh.material;

Three.js version

[ X ] r115

Browser

All of them

OS

All of them

It would be my first time to make a feature request? Can I do a pull request by myself? What's the procedure?

Thank you
Issue 1:
#14169

playwright: 1.18.0

os:mac

I have this problem with firefox.

Issue 2:
Preface: I'm using playwright for large scale academic web measurements, which I know is not what playwright was built for. I've done a fair share of FOSS work myself, so you have my full sympathies if you consider hard-to-reproduce crashes from unsupported use-cases out of scope for the time being - I can easily work around them. That being said, I was originally about to report five different tracebacks here, just to notice that @dgozman fixed four of them in #9826 a few hours ago. 😄🍰 So my presumption is you may find this interesting, which is why I'm sharing the remaining one here.

I've encountered the following crash with 1.16.0-next-alpha-oct-20-2021 running Firefox on Ubuntu 20.04. Unfortunately there are no good repros - this happens very rarely and seemingly at random. For reference, I've seen it five times during ~70k website visits made with Firefox. For comparison, this is about as often as the various context-is-undefined crashes fixed in #9826.

2021-10-23T02:32:29.114Z pw:browser [pid=1135] <kill>
2021-10-23T02:32:29.114Z pw:browser [pid=1135] <will force kill>
2021-10-23T02:32:29.121Z pw:browser [pid=1135] starting temporary directories cleanup
/root/node_modules/playwright-core/lib/server/frames.js:337
for (const child of frame.childFrames()) this._removeFramesRecursively(child);
^

TypeError: Cannot read properties of undefined (reading 'childFrames')
at FrameManager.removeChildFramesRecursively (/root/node_modules/playwright-core/lib/server/frames.js:337:31)
at FrameManager.frameCommittedNewDocumentNavigation (/root/node_modules/playwright-core/lib/server/frames.js:169:10)
at FFPage._onNavigationCommitted (/root/node_modules/playwright-core/lib/server/firefox/ffPage.js:211:30)
at FFSession.emit (node:events:390:28)
at /root/node_modules/playwright-core/lib/server/firefox/ffConnection.js:247:41

I have also done about 70k website crawls with Chromium and Webkit each without observing a crash at this location, so this seems Firefox-specific.
Issue 1:
https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-e2e-gke-serial/2273/

Failed: [k8s.io] Kubelet [Serial] [Slow] [k8s.io] regular resource usage tracking resource tracking for 35 pods per node {Kubernetes e2e suite}

/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/kubelet_perf.go:278
Sep 16 22:17:09.002: CPU usage exceeding limits:
node gke-jenkins-e2e-default-pool-6b926500-7gt3:
container "kubelet": expected 50th% usage < 0.120; got 0.127, container "kubelet": expected 95th% usage < 0.140; got 0.219
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/kubelet_perf.go:187

Previous issues for this test: #28220

Issue 2:
https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-e2e-gce-serial/1597/

Failed: [k8s.io] Kubelet [Serial] [Slow] [k8s.io] regular resource usage tracking resource tracking for 35 pods per node {Kubernetes e2e suite}

/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/kubelet_perf.go:277
Jun 29 06:19:20.388: Memory usage exceeding limits:
node jenkins-e2e-minion-group-btbh:
container "runtime": expected RSS memory (MB) < 157286400; got 191840256
node jenkins-e2e-minion-group-g0nb:
container "runtime": expected RSS memory (MB) < 157286400; got 164356096
Issue 1:
Paper: https://arxiv.org/pdf/2005.14165

GitHub: https://github.com/openai/gpt-3

Author: @8enmann

Issue 2:
🌟 New model addition

Model description

The GPT-3 paper just landed on ArXiv: https://arxiv.org/abs/2005.14165.

Would be great to integrate it into Transformers, whenever models are available.

Here we show that scaling up language models greatly improves task-agnostic, few-shot performance, sometimes even reaching competitiveness with prior state-of-the-art fine-tuning approaches. Specifically, we train GPT-3, an autoregressive language model with 175 billion parameters, 10x more than any previous non-sparse language model, and test its performance in the few-shot setting. For all tasks, GPT-3 is applied without any gradient updates or fine-tuning, with tasks and few-shot demonstrations specified purely via text interaction with the model. GPT-3 achieves strong performance on many NLP datasets, including translation, question-answering, and cloze tasks, as well as several tasks that require on-the-fly reasoning or domain adaptation, such as unscrambling words, using a novel word in a sentence, or performing 3-digit arithmetic. At the same time, we also identify some datasets where GPT-3's few-shot learning still struggles, as well as some datasets where GPT-3 faces methodological issues related to training on large web corpora. Finally, we find that GPT-3 can generate samples of news articles which human evaluators have difficulty distinguishing from articles written by humans. We discuss broader societal impacts of this finding and of GPT-3 in general.

Open source status

GitHub repository is available: here

the model implementation is available: (give details)

the model weights are available: (give details)

who are the authors: (mention them, if possible by @gh-username)
Issue 1:
A small, complete example of the issue

In [2]: df = pd.DataFrame({'float' : range(4),
...: 'int' : range(4)},
...: index=pd.MultiIndex.from_product([[1,2]]*2))

In [3]: df['float'] = df['float'].astype(float)

In [4]: df.loc[(1,), 'int']
Out[4]:
1 0
2 1
Name: int, dtype: int64

Right!

In [5]: df.loc[(1,), 'int'].loc[1]
Out[5]: 0

Right!

In [6]: df.loc[(1,1), 'int']
Out[6]: 0.0

Wrong!

Expected Output

Still an integer.

Output of pd.show_versions()

In [7]: pd.show_versions()
## INSTALLED VERSIONS

commit: None

python: 3.5.1.final.0

python-bits: 64

OS: Linux

OS-release: 4.5.0-2-amd64

machine: x86_64

processor:

byteorder: little

LC_ALL: None

LANG: it_IT.utf8

LOCALE: it_IT.UTF-8

pandas: 0.19.0+1.g96b364a

nose: 1.3.7

pip: 1.5.6

setuptools: 18.4

Cython: 0.23.4

numpy: 1.10.4

scipy: 0.16.0

statsmodels: 0.8.0.dev0+f80669e

xarray: None

IPython: 5.1.0.dev

sphinx: 1.4.5

patsy: 0.3.0-dev

dateutil: 2.2

pytz: 2012c

blosc: None

bottleneck: 1.1.0

tables: 3.2.2

numexpr: 2.5

matplotlib: 1.5.1

openpyxl: None

xlrd: 0.9.4

xlwt: 1.1.2

xlsxwriter: 0.7.3

lxml: None

bs4: 4.4.0

html5lib: 0.999

httplib2: 0.9.1

apiclient: 1.5.0

sqlalchemy: 1.0.11

pymysql: None

psycopg2: None

jinja2: 2.8

boto: 2.38.0

pandas_datareader: 0.2.1

Issue 2:
xref #14205

The .loc method of DataFrame with different dtypes yields coerced type even if the resulting slice does only contain elements from one type. This happens only when selecting a single row.

I can guess that this might be intended because the implementation of loc seems to first lookup the row as a single Series, doing the coercion and then applying the second (column) indexer.

However, when the column indexer narrows down the selection such that the upcasting would not have been necessary in the first place, it can be very surprising and may even cause bugs (on user-side) if it goes unnoticed. (Like, "I was sure that those column was int64").

>>> import pandas as pd

>>> d = pd.DataFrame(dict(a=[1.23]))
>>> d["b"] = 666 # adding column with int

>>> d.info() # info as expected (column b is int64 - fine)
<class 'pandas.core.frame.DataFrame'>
Int64Index: 1 entries, 0 to 0
Data columns (total 2 columns):
a 1 non-null float64
b 1 non-null int64
dtypes: float64(1), int64(1)
memory usage: 24.0 bytes

>>> d.loc[0,"b"] # UNEXPECTED: returning a single float
666.0

>>> d.ix[0, "b"] # OK: returns a single int
666

>>> d.loc[[0], "b"] # OK
0 666
Name: b, dtype: int64

Feel free to close if the behavior s intended. Maybe this this a "bug" or an suggested API change. I dunno.

Perhaps related to #10503, #9519, #9269, #11594 ?

INSTALLED VERSIONS
------------------
commit: None
python: 3.4.3.final.0
python-bits: 64
OS: Darwin
OS-release: 15.0.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8

pandas: 0.17.0
[...]
Issue 1:
I explain.

When we open an "accordion-group", his "accordion-toggle" receives a "collapsed" class. And this class will be removed when we close this same "accordion-group".

But now, if we have an "accordion-group" opened and we want to open another, "collapsed" class was not appended to previous "a.accordion-toggle".

P.S. : Sorry for my english (i'm french).

Issue 2:
This line:

$this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed')

Only works to remove or add the collapsed class on the element clicked. It does not updated the element that was previously expanded/clicked. So the class usage becomes inconsistent quickly and stops me easily styling stuff.

Note diff b/w accordion-heading and accordion-body.
Issue 1:
How to apply to material-ui-icons global MuiSvgIcon styles from the theme

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

Expected Behavior

The MuiSvgIcon should override in theme both simple SvgIcon with path, and material ui icons, but overrides only SvgIcon

import SvgIcon from 'material-ui-next/SvgIcon'
import Add from 'material-ui-icons/Add'

<SvgIcon>
<path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z" />
</SvgIcon>

not

<Add />

Current Behavior

I've created createMuiTheme, and try to overrides material-ui-icons and apply new styles,

MuiSvgIcon: {
root: {
width: 18,
height: 18,
},
},

Context

Your Environment

Tech
Version

Material-UI
v1-beta

React
15.5.4

browser
chrome

material-ui-icons
^1.0.0-beta.10

Issue 2:
TL;DR I'm trying to render a Select element inside of an iframe, but when I do this, the MenuItem components inside render in completely the wrong place. Looking into the code, I noticed that the portal was actually mounting at the root of the document instead of the iframe.

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

Expected Behavior

Add a <Select> with <MenuItem>s inside an iframe.

Click on the Select

MenuItem shows up in the expected location.

Current Behavior

Add a <Select> with <MenuItem>s inside an iframe.

Click on the Select

MenuItem shows up in the wrong location.

Steps to Reproduce (for bugs)

See above.

CodeSandbox: https://codesandbox.io/s/73nnlv78wq

Note: in the codesandbox, the iframe doesn't contain material-ui styling. This is because the jss needs to be injected into the iframe explictly, as well as <MuiThemeProvider>. This is a different, unrelated issue and so I didn't take the time to implement that here.

Context

In my app, I have an iframe in which I would like to use material-ui components. This bug is preventing me from using anything that uses portals under the hood.

I dug into the source a bit, and I have identified this as the issue: https://github.com/mui-org/material-ui/blob/v1-beta/src/internal/Portal.js#L47.

Since this uses document directly, it ends up ignoring the context of my iframe and instead attaches the portal to the parent root. It would be nice if there was some way to manipulate this, maybe through context or props.

Your Environment

Tech
Version

Material-UI
v1.0.0-beta.13

React
16.0.0

browser
chrome v62.0.3202.9
Issue 1:
Oleg Alexeyev opened SPR-8235 and commented

Since H2 1.3.154 SQL error codes has changed in order to utilize commonly used ones. See the thread: http://groups.google.com/group/h2-database/browse_thread/thread/e4f6e77e3eebc1d4 and the change log: http://www.h2database.com/html/changelog.html.

This makes duplicate key condition undetected, DataIntegrityViolationException is thrown instead of DuplicateKeyException.

In order to fix this error code 23505 needs to be added to duplicateKeyCodes property of H2 bean in org/springframework/jdbc/support/sql-error-codes.xml.

Affects: 3.0.5

Issue Links:

#12138 org.h2.jdbc.JdbcSQLException: NULL nicht zulässig für Feld "xyz" gets translated to org.springframework.jdbc.UncategorizedSQLException

Issue 2:
Colin Yates opened SPR-1294 and commented

It is a pain that RedirectView appends all request parameters on the URL. It would be nice to filter these in someway, example:

[code]interface ParameterPredicate {

boolean process(final String parameterName, final Object parameter);

}

[/code]

RedirectView could then take an instance of this and check every parameter. Implementations of ParameterPredicate could include an IncludeParameterPredicate, ExcludeParameterPredicate. These implementations could include a set of regular expressions to apply to the parameter name. Wiring would look like:

[code]

<bean id="myView" class="org.springframework.web.servlet.view.RedirectView">

<property name="parameterPredicate">

<bean class="org.springframework.web.servlet.view.IncludeParameterPredicate">

<constructor-arg index="0">

<list>

<value>myName1</value>

<value>myName2</value>

</list>

</constructor-arg>

</bean>

</property>

</bean>

[/code]

Although I am sure you guys will come up with a much neater implementation :)

http://forum.springframework.org/viewtopic.php?t=8470&highlight=&sid=fb0f81783fb2d7b3081d76561eb109f7

Affects: 1.2.3

Issue Links:

#11462 Provide precise control over the attributes used in a redirect scenario ("is duplicated by")

ROO-2158 Deleting/creating/updating roo generated entities containing an enum property with lots of constants causes index out of bound exception while the scaffolded controller tries to redirect

#8614 RedirectView: make exposing of model parameters as request parameters optional

#7380 RedirectView with more flexible URL-building

18 votes, 19 watchers
Issue 1:
The isTTY property on process.stderr, process.stdout and process.stdin returns undefined instead of a boolean.

Electron version: 30.0.2

Mac OS X 10.10.3

Issue 2:
Electron Version: 0.25.3

System: Mac OS X 10.9.5

Steps to reproduce (video):

https://www.dropbox.com/s/i6zojbf5dfwrhhf/electron-bug.mov?dl=1

Repo:

https://github.com/tomashanacek/electron-bug
Issue 1:
Describe the workflow you want to enable

I want to be able to use it like this:

X_train, X_test, X_val, y_train, y_test, y_val = train_test_split(X, y, test_size=0.2, val_size=0.1)

I cannot do this:

X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2)
X_train, X_val, y_train, y_val = train_test_split(X_train, y_train, test_size=0.1)

because the size of validation set will be 0.8 * 0.1, right?

Issue 2:
Asking how to do a threefold split is the top sklearn question on stackoverflow:

https://stackoverflow.com/questions/tagged/scikit-learn?sort=frequent&pageSize=50

We have discussed this before but I think this is a good reason to add it - the other option would be to document more explictly doing

from sklearn.model_selection import train_test_split

X_trainval, X_test, y_trainval, y_test = train_test_split(X, y)
X_train, X_val, y_train, y_val = train_test_split(X_trainval, y_trainval)

if that's the idiomatic way to do that.

The "issue" with that way is that it's harder to figure out the ratios.

If we want to add a threefold split method, there's three options:

add another parameter to train_test_split (not sure I like this)

create a new method that mirrors the interface of train_test_split

create a new method with a better interface than train_test_split

I kinda prefer the last one but it might be confusing to users. My ideal signature would not have *args and explicitly name X and y so we could stratify by default.

Maybe

naming_is_hard(X=None, y=None, fit_parms=None, train_size=None, val_size=None, test_size=None).

I'm not sure if it would make sense to pass a cv object here? or a CV class that's internally instantiated? Or we could have stratify and grouped options? Maybe the last makes most sense?