WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Describe your issue.

We are running into issues reading and writing SET files that were created with Matlab 7.3 (using the HDF5 format). We were wondering whether there was a plan to support more recent versions of Matlab and the HDF5 format for electrophysiological recordings.

Here is part of a traceback we get when running scipy on such files:

File "/opt/loris/bin/mri/python/lib/utilities.py", line 177, in update_set_file_path_info
dataset = scipy.io.loadmat(set_file)
File "/opt/loris/bin/mri/python_virtualenvs/loris-mri-python/lib/python3.8/site-packages/scipy/io/matlab/_mio.py", line 225, in loadmat
MR, _ = mat_reader_factory(f, **kwargs)
File "/opt/loris/bin/mri/python_virtualenvs/loris-mri-python/lib/python3.8/site-packages/scipy/io/matlab/_mio.py", line 80, in mat_reader_factory
raise NotImplementedError('Please use HDF reader for matlab v7.3 files')
NotImplementedError: Please use HDF reader for matlab v7.3 files

Could you kindly let us know if that is on your roadmap and if it is, when approximately do you expect to have the fix out?

Thank you very much in advance for your feedback. Best,

Reproducing Code Example

dataset = scipy.io.loadmat(set_file)

### Error message

```shell
File "/opt/loris/bin/mri/python/lib/utilities.py", line 177, in update_set_file_path_info
dataset = scipy.io.loadmat(set_file)
File "/opt/loris/bin/mri/python_virtualenvs/loris-mri-python/lib/python3.8/site-packages/scipy/io/matlab/_mio.py", line 225, in loadmat
MR, _ = mat_reader_factory(f, **kwargs)
File "/opt/loris/bin/mri/python_virtualenvs/loris-mri-python/lib/python3.8/site-packages/scipy/io/matlab/_mio.py", line 80, in mat_reader_factory
raise NotImplementedError('Please use HDF reader for matlab v7.3 files')
NotImplementedError: Please use HDF reader for matlab v7.3 files

### SciPy/NumPy/Python version information

1.9.3

Issue 2:
Is your feature request related to a problem? Please describe.

Currently, scipy is unable to load MATLAB files that are saved with the new MATLAB file format.

Attempting to load them will raise an

NotImplementedError: Please use HDF reader for matlab v7.3 files

Describe the solution you'd like

I've implemented a small library that can also load MATLAB 7.3

https://github.com/skjerns/mat7.3 , using h5py.

It will load all data with the indicated MATLAB datatype into a dict, so similar to scipy.io.loadmat.

Do you think it makes sense to integrate this directly into scipy?

Describe alternatives you've considered

Just leaving it as it is might be actually okay, as adding it would introduce a dependency on h5py (which is not a dependency of scipy afaik?). what do you think?
Issue 1:
permutation and shuffle functions in numpy.random leak memory. On different test machines it either caused MemoryError, script termination with SIGKILL from OS, or produced no errors but the script consumed huge amount of memory (~ 5Gb).

Reproducing code example:

import numpy as np

for k in range(1000):
ind = np.random.permutation(44100 * 1000)

or

import numpy as np

for k in range(1000):
x = np.empty(44100 * 1000)
np.random.shuffle(x)

Start top and watch the memory grow.

Error message:

Traceback (most recent call last):

File "leak_memory.py", line 5, in

ind = np.random.permutation(44100 * 1000)

File "mtrand.pyx", line 4917, in mtrand.RandomState.permutation

MemoryError

Numpy/Python version information:

1.16.3 3.7.1 (default, Oct 22 2018, 11:21:55)

[GCC 8.2.0]

OS: Ubuntu 18.04 (Error message and SIGKILL)

Windows 10 (huge memory consumption)

Issue 2:
Reading attribute "ctypes.data" from an ndarray causes a leak.

version <= 1.14.5 doesn't leak

version >= 1.16.2 leaks

latest 1.16.4 leaks

Reproducing code example:

import numpy as np
import sys

print(np.version.full_version)

data = np.empty(8192)

before = sys.getrefcount(data)
data.ctypes.data
after = sys.getrefcount(data)
print(before, after)

assert before==after

Error message:

File "/mnt/d/code/python/test_numpy_leak.py", line 17, in

assert before==after

AssertionError

Numpy/Python version information:

1.16.4 3.6.8 (default, Jan 14 2019, 11:02:34)

[GCC 8.0.1 20180414 (experimental) [trunk revision 259383]

Summary (@seberg) 2019-12-03

This has been partially fixed by gh-14469; There are still issues here, although they are mainly issues with upstream ctypes creating deep reference cycles.
Issue 1:
I'm submitting a ... (check one with "x")

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

Current behavior

Given CanDeactivate is setup to warn user of navigation (via confirm or whatever)

user clicks back

unsaved warning comes up

user clicks to cancel navigation

user clicks back

user accepts the navigation

user is taken back two route changes

If the user continues to click back but cancelling then eventually they will leave the webapp

Expected behavior

@6 user is taken to the previous page/route. If the user cancels then the browser history state should be the same as before they tried to navigate.

Minimal reproduction of the problem with instructions

Follow instructions on plnkr

http://plnkr.co/edit/X9KfCvIs2m7lsLiygYk4?p=preview

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

If CanDeactivate is used to warn about unsaved changes, they click back then decide to cancel but later decide to go back anyway. The user should be presented with the previous page.

Please tell us about your environment:

OS: Windows 7

Using Angular 2 with webpack

Angular version: 2.4.4

Browser: Chrome 55

Language: TypeScript 2.0.2

Node (for AoT issues): node --version = v7.3.0

Issue 2:
[x] feature request

Angular version: 2

Reactive forms is meant to be used in complex forms but control's valueChanges are Observable<any>, which are totally against good practices for complex code.

There should be a way to create strongly typed form controls.
Issue 1:
Using this example:

https://github.com/GoogleCloudPlatform/kubernetes/blob/master/examples/guestbook-go/v1beta3/guestbook-service.json

When created "as is", it works, however doing the same but omitting the 'kind' and 'apiversion' causes it to fail with 422 with the following message:

""Service "guestbook2" is invalid: spec.sessionAffinity: required value""

If it already knows it's a service (based on resource name and returned error msg), why there was a need to specify its kind in the first place from client side? Namespaces for example can be created np without those 2 properties.

why kind and api version removal causes an error regarding session affinity ? when they are in the input json, it is created successfully without specifying session affinity and its value is set to "None".

Issue 2:
Why is there a need in 'apiVersion' property in all REST entities?

The client accesses the api already when specifying the version in the url so the client is fully aware which api version was called.

Will there be cases when user approaches v1beta3 and will receive entities with apiVersion=v1beta1 ?

In other words - what's the reason/use case for this attribute?
Issue 1:
TypeScript Version:

1.9.0-dev

Code

// A self-contained demonstration of the problem follows...
interface A {}
interface B {}
interface C {}
declare function isA(arg: any): arg is A;
declare function isB(arg: any): arg is B;
declare function isC(arg: any): arg is C;

function handleAction<T>(action: T) {
switch (true) {
case isA(action):
case isB(action):
// action expected to be A|B type here
break;
case isC(action):
// action expected to be C type here
break;
default:
// action expected to be undefined type here
}
}

Issue 2:
Typescript supports type aliases since 1.4.

In order to achieve better abstraction patterns and to enhance tooling, it would be nice to have a more extended alias syntax in typescript.

One current issue of not having aliases for other typescript constructs, like modules and interfaces, is code fragmentation in the generated declaration files, as they often end up describing the same construct multiple times in one file, referenced by a common name.

For example, the typescript.d.ts declaration file contains 6 occurences of the same "typescript" module. Aliases could allow here to differentiate the different intended sections of the typescript module in the declaration file.

The "as" syntax already exists in ecmascript 6 for importing modules:

import * as lib from 'lib';

We could extend this syntax for aliases in typescript, and this optional feature could enhance all nodes having the ability to be duplicated in code, like interfaces and modules, as well as type definitions, ambient declarations, exports and original javascript nodes.

typescript constructs:

declare module "moduleName" as moduleAlias

module "moduleName" as moduleAlias

type typeName as typeAlias

interface interfaceName as interfaceAlias

javascript nodes:

export class className as classAlias

class className as classAlias

function functionName() as functionAlias {};

let var1 as letAlias

var var2 as varAlias

The extended "as" syntax would not affect the resulting javascript code, it would only serve as a typescript abstraction.
Issue 1:
Feature request

Is your feature request related to a problem? Please describe.

/[entity] => matched as all values

and always i add strong check conditions in gip

Gender.getInitialProps = async ({ query }) => {
if (!['mens', 'womens', 'kids'].includes(query.gender)) {
return { errorCode: 404 };
}
or
if (!allowedGroupCatalogs.includes(query.groupId)) {
return { errorCode: 404, items: {} }
}

and added conditions in client-side page
if (errorCode) {
return <Error statusCode={errorCode} />;
}

I want to have a chance, use to that example

/:entity(allowedValue1|allowedvalue2)

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

Expected Behavior

I switched my React based landing page to use next.js for easy server-side rendering for SEO - that works great by the way, amazing work!

The problem is, I was using a JSON-LD component which simply rendered an object to a <script>.

Here's the code:

https://github.com/Southclaws/homepage/blob/55fc7d79c494a97134a419b0e9c84ebd44e2389e/pages/components/JsonLD.js#L4

I've also tried dangerouslySetInnerHTML, same result though:

https://github.com/Southclaws/homepage/blob/bf0db23726847b56d884f261e9064f1800adaa36/pages/components/JsonLD.js#L4

and the expected output is this JSON-LD would eventually be rendered to that tag like:

<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Person",
...
}
</script>

Current Behavior

Currently, it seems like the next.js build process is escaping the contents of this tag and it ends up looking like this:

<script type="application/ld+json">{
&quot;data&quot;: {
&quot;@context&quot;: &quot;http://schema.org&quot;,
&quot;@type&quot;: &quot;Person&quot;,
...

Steps to Reproduce (for bugs)

I guess the best example is the source and the actual site itself:

https://github.com/Southclaws/homepage

https://southcla.ws

Context

My plan is to eventually serve the JSON-LD from github and fetch it before server rendering so I can describe the site/portfolio via a single JSON object.

I'm not really sure if this functionality really matters to anyone else though or if there's a good reason for escaping it. If it's intentional, is there a way to disable it?

Your Environment

Tech
Version

next
4.1.4

node
v8.6.0

OS
OS X and Docker Node latest (9) image

browser
Chrome latest
Issue 1:
Output of node_modules/.bin/electron --version: v4.0.2 x86

Operating System (Platform and Version): win7 sp1 x64

Expected Behavior

no duplication

Actual behavior

each console.log from the preload script produces 2 renderer devtools console entries

To Reproduce

run the following app

in the renderer devtools settings (Console)

uncheck "group similar"

check "preserve log"

check "show timestamps"

navigate via devtools console (location = 'about:blank')

app.js

'use strict';

const {app, BrowserWindow} = require('electron'),
Path = require('path');

let win;

app.on('ready', async () => {

win = new BrowserWindow({
width: 1440,
height: 900,
useContentSize: true,
webPreferences: {
preload: Path.join(__dirname, 'preload.js'),
},
});

win.webContents.debugger.attach();

win.webContents.openDevTools({mode: 'right'});

win.loadURL('about:blank');

});

preload.js

console.log('preload log 1');
console.log('preload log 2');

Issue 2:
For projects using Atom Shell that are not Atom, using the "Atom Package Manager" to build native modules is a bit strange. It might be useful to have a core component of Atom Shell be a tool to build native modules that is not so deeply connected to the Atom project to make packaging easier for other framework users, perhaps allowing for building a dist of atom-shell (e.g. from a branch) and rebuilding specified modules to match it in one go. I'm curious to hear thoughts on this from @atom/core as well as other people trying to build on this framework.

cc @paulcbetts who brought this up in conversation yesterday
Issue 1:
At the moment, I don't see any way to have performant, timezone aware columns. This seems rather surprising, as generally when you have a column with timestamps, they will all likely be of the same timezone. Right now, as far as I can see you have two options:

Columns that are basically just numpy datetime64[ns] types. These seem to be timezone unaware.If you make such a column timezone aware (by e.g., dataframe.time_column.dt.tz_localize('UTC')) it becomes a column of dtype object.

A DatetimeIndex, which keeps track of timezone information at seemingly the column level (which is laudable). However, this only seems to really work used as an index. If I assign it to a column, it again gets converted to a dtype object, and things get slow.

Am I missing something? Is there a really good reason why a DatetimeIndex can't just be used, as is, in a column, without the dtype=object conversion?

Issue 2:
Potential version 23 upgrade bug with pd.to_sql on Windows 7?

Code Sample, a copy-pastable example if possible

pd.to_sql('TEST_TABLE', con=con, if_exists = 'replace')

worked fine but then failed immedietly after i upgraded to version 23.

i downgraded to version 22, and now it works fine like a charm, but not with 23???

Im on windows 7 enterprise and running 32 bit anaconda.

# Your code here

Problem description

[this should explain why the current behaviour is a problem and why the expected output is a better solution.]

Note: We receive a lot of issues on our GitHub tracker, so it is very possible that your issue has been posted before. Please check first before submitting so that we do not have to handle and close duplicates!

Note: Many problems can be resolved by simply upgrading pandas to the latest version. Before submitting, please check if that solution works for you. If possible, you may want to check if master addresses this issue, but that is not necessary.

For documentation-related issues, you can check the latest versions of the docs on master here:

https://pandas-docs.github.io/pandas-docs-travis/

If the issue has not been resolved there, go ahead and file it in the issue tracker.

Expected Output

Output of pd.show_versions()

[paste the output of pd.show_versions() here below this line]
Issue 1:
I've noticed that when renaming a directory and having a saved file open in a tab, does not update the file reference, it still points to the old directory?

Steps to reproduce:

mkdir d1
cd d1
touch f1 f2 f3
(open f1 from tree-view)
cd ..
mv d1 d2

Result: f1 points to d1

I am on; atom 0.188.0, linux fedora 21

Issue 2:
Moving a file in the tree view causes an autosave.

Refs atom/tree-view#123
Issue 1:
Steps to Reproduce

Create a center widget containing a Stack

Put widgets inside the Stack. One of those widgets must be a button (make sure the Stack doesn't cover all the screen)

Move the button using FractionalTranslation outside of the bounds of the stack

Try to click the button

The click is not registered

I don't think this is the intended behavior. If it is, how can I work around it?

Doctor

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel beta, v0.5.1, on Microsoft Windows [Version 10.0.17134.112], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK 27.0.3)
[√] Android Studio (version 3.1)
[√] Connected devices (1 available)

• No issues found!

Issue 2:
Internal: b/143100923

When a Stack contains MyWidget inside of a Positioned.

Stack(
overflow: Overflow.visible,
children: [
Positioned(
top: -50.0,
child: MyWidget(),
)],
);

Since overflow is Overflow.visible, MyWidget displays outside of the Stack. However, it doesn't accept gestures in the overflowed area. I have no idea if it's easy, difficult or downright impossible to make this change, but I can think of a gazillion use cases for that, which at the moment must be satisfied by using the much more complex Overlay, or some Stack tricks.

And in case it's impossible to make this change, then at least the documentation should clearly state that overflowed content can't receive gestures.

Also, see: https://stackoverflow.com/questions/51366761/in-flutter-how-can-a-positioned-widget-feel-taps-outside-of-its-parent-stack-ar
Issue 1:
If you have a rc and then create a deployment for the rc(deployment and rc has the sample selector), the cluster will create and terminate pod infinitely.

Issue 2:
We've discussed this in person a few times.

Events account for the overwhelming majority of our etcd write volume, which is causing a variety of performance and stability problems (#3853, #3329, #2298, #3521, #4073).

Since we GC events, they can't be relied upon as a messaging mechanism. Distributed control components should be watching status instead. Also, we support hooks to facilitate user extensions, so events are (arguably) not needed for that case, either, provided we add the necessary hooks.

Therefore, the main purpose of events is to inform users of relevant occurrences. Given that, we could consider a different delivery mechanism for the events.

One proposal is to treat them as log messages. That has a certain appeal. We do "log" all such events into our equivalent of BigQuery internally, to facilitate searching, filtering, sorting, etc.

We'd need to find a way to make the logs/events accessible via the CLI and UI, and we'd need a non-BigQuery implementation for other platforms. We could probably use fluent as the plugin mechanism. There's also an amqp fluent plugin, which would facilitate pushing the events into a message queue.

@lavalamp @brendandburns @saad-ali @smarterclayton
Issue 1:
Can not find GlideApp Class in glide 4.0?

Issue 2:
I'm trying to use glide 4.0.0-RC0 by Gradle:

dependencies {
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.caverock:androidsvg:1.2.2-beta-1'
compile 'com.github.bumptech.glide:glide:4.0.0-RC0'
compile 'com.android.support:support-v4:25.3.1'
}

I followed the example here: https://github.com/bumptech/glide/tree/master/samples/svg/src/main/java/com/bumptech/glide/samples/svg

but after add glide by Gradle, I got error: Cannot resolve symbol 'GlideApp'

My source:

package com.example.quangson.glidesvg;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import static com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions.withCrossFade;

import android.content.ContentResolver;
import android.graphics.drawable.PictureDrawable;
import android.net.Uri;
import android.widget.ImageView;
import android.widget.LinearLayout;

import com.bumptech.glide.RequestBuilder;
import com.example.quangson.glidesvg.glide.SvgSoftwareLayerSetter;

public class MainActivity extends AppCompatActivity {

private static final String TAG = "SVGActivity";

private ImageView imageViewRes;
private ImageView imageViewNet;
private RequestBuilder<PictureDrawablerequestBuilder;
LinearLayout ll;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

imageViewNet = (ImageView) findViewById(R.id.svg_image_view2);

requestBuilder = GlideApp.with(this)
.as(PictureDrawable.class)
.placeholder(R.drawable.image_loading)
.error(R.drawable.image_error)
.transition(withCrossFade())
.listener(new SvgSoftwareLayerSetter());

Uri uri = Uri.parse("http://www.clker.com/cliparts/u/Z/2/b/a/6/android-toy-h.svg");
requestBuilder.load(uri).into(imageViewNet);
}
}

Please help
Issue 1:
Apache Airflow version:

1.10.10

Kubernetes version (if you are using kubernetes) (use kubectl version):

1.18.3

Environment:

Kubernetes cluser

What happened:

During dag execution I am not able to see logs

*** Log file does not exist: /opt/airflow/logs/example_dag/python_print_date_152/2019-01-01T00:00:00+00:00/1.log

*** Fetching from: htttp://fi-airflow-worker-97bcfb76-jdwj7:8793/log/example_dag/python_print_date_152/2019-01-01T00:00:00+00:00/1.log

*** Failed to fetch log file from worker. HTTPConnectionPool(host='fi-airflow-worker-97bcfb76-jdwj7', port=8793): Max retries exceeded with url: /log/example_dag/python_print_date_152/2019-01-01T00:00:00+00:00/1.log (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f6409dfcd10>: Failed to establish a new connection: [Errno -2] Name or service not known'))

What you expected to happen:

See logs from dag execution in UI no only from command line

Issue 2:
Apache Airflow version: 2.0.2

Kubernetes version (if you are using kubernetes):

Client Version: v1.17.4

Server Version: v1.18.14

Environment:

Cloud provider or hardware configuration: Azure

What happened:

Using KEDA, the logs are not accessible.

Trying to access the logs on a task gives an error like the following:

*** Log file does not exist: /opt/airflow/logs/tutorial_taskflow_api_etl/load/2021-04-28T09:58:43.050614+00:00/1.log
*** Fetching from: http://airflow2-worker-0.airflow2-worker.airflow2.svc.cluster.local:8793/log/tutorial_taskflow_api_etl/load/2021-04-28T09:58:43.050614+00:00/1.log
*** Failed to fetch log file from worker. HTTPConnectionPool(host='airflow2-worker-0.airflow2-worker.airflow2.svc.cluster.local', port=8793): Max retries exceeded with url: /log/tutorial_taskflow_api_etl/load/2021-04-28T09:58:43.050614+00:00/1.log (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f761829eda0>: Failed to establish a new connection: [Errno -2] Name or service not known',))

Accessing the logs when the worker is executing a task (hence running) works as expected.

What you expected to happen:

To be able to access the logs even when the worker is not running

How to reproduce it:

Install Airflow using the Helm chart with the values

executor: "CeleryExecutor"
workers:
keda:
enabled: true
dags:
persistence:
enabled: true
existingClaim: dags

where the persistent volume claim for the dags in

kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: dags
labels:
tier: airflow
release: airflow2
heritage: "Helm"
spec:
accessModes:
- "ReadWriteMany"
resources:
requests:
storage: "1Gi"
storageClassName: "azurefile"