WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
At first I explain you what I would like to do with tsserver. @dbaeumer I think you could be interested with this issue for VSCode and Angular2 support.

Take the sample https://angular.io/docs/ts/latest/quickstart.html with Angular2 & TypeScript. There is a ts file:

import {Component} from 'angular2/angular2';
@Component({
selector: 'my-app'
})
class AppComponent { }

And the HTML:

<my-app></my-app>

The HTML contains <my-app> which is binded with decorator @Component/selector property. My goal is to provide completion, navigation inside HTML (Eclipse) editor for <my-app>. In other words, I need to collect the whole @Component/selector node of the project to use it in a HTML editor. I tell me how I could do that:

with TypeScript language service? Develop a walk kind which loop for each @component decorators? If yes, could you give me some info please to do that.

after that I will need to provide this new command to tsserver. So it should be very cool if tsserevr could provide the capability to contribute with custom tsserver command (without compiling a custom tsserver).

With ternjs it's possible to write a tern plugin which is able to do that (collect @Component/selector) because:

ternjs gives the capability to write a tern plugin where you can add your custom function when AST is walked (to help inference engine to create the well type, or collect modules like I have done with Angular Explorer .

ternjs load tern plugin which follow a name pattern (tern-xxxx) from the node_modules to load it. See https://github.com/ternjs/tern/blob/master/bin/tern#L120

tsserver could do the same thing by searching inside node_modules with a pattern name like tsserver-xxxx to provide a custom command. After that any editor will be able to consume it just by installing with `npm installl tsserver-angular2'

Hope you will understand my issue.

Issue 2:
Say I'm writing a declaration file for an external library that both exposes a global and supports CommonJS. According to the handbook I would write that like this:

module zoo {
function open(): void;
}

declare module "zoo" {
export = zoo;
}

And then the usage would be this:

// Either
import x = require('zoo');
x.open();
// or
zoo.open();

The problem is that while the above would compile when using external modules, at run-time it would fail since the "zoo" identifier doesn't actually exist. Is there any way to write declaration files such that you can split them into two separate files (one for internal, one for external) so that you only reference the one you intend on using but not actually duplicate the definitions in those files? For example

// zoo.d.ts
declare module "zoo" {
export = zoo;
}

// zoo-internal.d.ts

/// <reference path="zoo.d.ts" />
module zoo {
// this doesn't work but illustrates what I'm trying to accomplish
import zoo = require('zoo')
export = zoo;
}

Or any thoughts on another way to accomplish the same goals in a single file?
Issue 1:
Yanming Zhou opened SPR-3559 and commented

public String parseStringValue(String placeholder)

developer can reuse placeholder programmatically not only in xml configuration,for example,when use spring-javaconfig

@Configuration(defaultAutowire = Autowire.BY_NAME)

public abstract class Config {

@ExternalBean
public abstract PropertyPlaceholderConfigurer propertyPlaceholderConfigurer();

@Bean(destroyMethodName = "close")
public DataSource dataSource() {
BasicDataSource ds = new BasicDataSource();
ds.setUrl(propertyPlaceholderConfigurer().parseStringValue("${jdbc.url}")));
ds.setUsername(propertyPlaceholderConfigurer().parseStringValue("${jdbc.username}"));
ds.setPassword(propertyPlaceholderConfigurer().parseStringValue("${jdbc.password}"));
ds.setDriverClassName(propertyPlaceholderConfigurer().parseStringValue("${jdbc.driverClassName}"));
ds.setPoolPreparedStatements(true);
return ds;
}

}

Affects: 2.1 M2

Attachments:

PropertyPlaceholderConfigurer.java (17.12 kB)

PropertyResourceConfigurer.java (4.85 kB)

Issue Links:

#11823 Need a way to ask PropertyPlaceholderConfigurer to resolve a placeholder string ("duplicates")

Issue 2:
Vincent MONIER opened SPR-8884 and commented

For testing purpose, I use EmbeddedDatabase.

My database schema contains HSQLDB PMS stored procedures.

like this one:

----------- content of procedure.sql (a valid HSQLDB PMS stored procedure) ---------------------

CREATE PROCEDURE get_customer(IN id INT, OUT firstname VARCHAR(50), OUT lastname VARCHAR(50))

READS SQL DATA

BEGIN ATOMIC

SELECT first_name, last_name INTO firstname, lastname FROM customers WHERE cust_id = id;

END

When I create database instance:

EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder();

database = builder.setType(EmbeddedDatabaseType.HSQL).addScript("classpath:/META-INF/sql/schema.sql")

.addScript("classpath:/META-INF/sql/procedure.sql")

.build();

I get this exception:

"an error occurs during parsing of procedure.sql

org.hsqldb.HsqlException: unexpected end of statement: required: ; "

The problem is not in HSQLDB part but is located in :

org.springframework.jdbc.datasource.init.ResourceDatabasePopulator#splitSqlScript(String script, char delim, List<String> statements)

it uses ';' character as a delimiter for statements and therefore creates 2 statements, one for [CREATE PROCEDURE .... cust_id = id] and the second for [END].

The first statement is rejected by HSQLDB because of a missing ';' character in BEGIN block.

Affects: 3.0.6

Issue Links:

#13459 Support per-script statement separator configuration for SQL scripts ("duplicates")
Issue 1:
Important note: the development of Keras is currently taking place at github.com/tensorflow/tensorflow. Please file your bug report by creating a new issue in the TensorFlow repository.

Please note that multi-backend Keras development has been discontinued. Do not report issues about multi-backend Keras (Keras 2.3.1 and lower), only report issues about the TensorFlow implementation of Keras (tf.keras).

How can I convert (None, 224,224,1) to (None,224,224,3) shape?

Issue 2:
I train a Keras model and want to perform some matrix operation on the output (e.g. numpy.matmul()). However, each time I try to use any of numpy functions (like, matmul(), dot(), concatenate()), the IPython kernel dies and restarts. I'm using Spyder IDE on Mac OS X, both Keras, Tensorflow, and numpy are up-to-date.

Please help me identify the culprit!

Additional details:

The problem occurs even if I use numpy functions with newly generated data, instead of the model outputs (see script below)

Numpy functions do not raise any errors if used before the model training

Using tensorflow.matmul instead of numpy.matmul helps to avoid the problem, but it is not a solution as in the end I need to use more than one numpy function

Here's the script I'm running:

from keras.layers import Input, Dense, Conv2D, MaxPooling2D,Flatten

from keras.models import Model

import numpy as np

import tensorflow as tf

import keras.utils as kutils

n_y = 10

mnist = tf.keras.datasets.mnist

(X_train, y_train), (X_test, y_test) = mnist.load_data()

y_train = kutils.to_categorical(y_train, n_y)

y_test = kutils.to_categorical(y_test, n_y)

X_train = X_train.reshape(X_train.shape[0], 28, 28,1)

X_test = X_test.reshape(X_test.shape[0], 28, 28,1)

channels = 512

X = Input(shape=(28,28,1)) # size of MNIST images

y = Input(shape=(n_y,))

conv1 = Conv2D(32, (3, 3), activation='relu')(X)

pool1 = MaxPooling2D((2, 2), strides=(2, 2), name='block1_pool')(conv1)

flatten = Flatten()(pool1)

h_1 = Dense(64, activation='relu')(flatten)

h_2 = Dense(10, activation='softmax')(h_1)

model = Model(inputs=[X,y], outputs=h_2)

model.summary()

model.compile(loss='mean_squared_error', optimizer='adam',metrics=['accuracy'])

model.fit([X_train, y_train],y_train, batch_size=channels, epochs=1, validation_split=0.1)

np.matmul(np.array([[1, 0],[0, 1]],dtype=np.float64),np.array([[2, 3],[4, 6]],dtype=np.float64))
Issue 1:
First of all , Thanks to all contributor

When i use the lastest version to build my node app, i want to debug my app..

when i add the launch.json , but not appear in the launch configuration dropdown menu.

So , i guess need restart the VSCode , Yes... did it...

Maybe it's a tiny bug...

thx.

OS : Windows 10 pro 10586

Issue 2:
Using VS Code 0.10.1 on Mac OS 10.10.5

create and cd into a new project directory

invoke "npm init" and specify "entry point" file (i.e. "main" in package.json)

create the entry point file (i.e. index.js)

invoke "code ."

switch to debug view and click the gear icon or press "run"

Expect result: launch.json should include configurations for "Launch index.js" and "Attach" with "type":"node" and other needed parameters.

Actual result: launch.json configurations is [], an empty array, i.e.

{
"version": "0.2.0",
"configurations": []
}
Issue 1:
PowerToys version: 0.21 and 0.22

PowerToy Utility:

Running PowerToys as Admin: no

Windows build number: 19041.508

📷 Screenshots

Issue 2:
Summary of the new feature/enhancement

Allow windows to snap into 2 or more Zones.

Proposed technical implementation details (optional)

When moving a window to a zone can choose to allow the window to snap to multiple zones that is in the same monitor. For example if you have 3 zones in one monitor you can snap the window to 2 zones by going to space between the 2 zones you want to snap too.
Issue 1:
resource r(b: int) { r(b); }
fn main() { r(0); }

Hits a fatal assertion rather than simply failing:

rust: task 7fce71800000 ran out of stack
rust: fatal, 'on_rust_stack()' failed, ../src/rt/rust_task.cpp:570

Issue 2:
What we are doing now leaks (#3555) and I don't know how to fix it yet, so we should not pretend we can enforce stack size limits safely.
Issue 1:
Relating to #875, willing to try a PR if offered guidance.

We're building a ecommerce store from scratch with next and are close to finishing the initial architecture. The only thing bugging us is the number of folders we ended up with. The src folder would be a major improvement in our structure and the way we thought it could be done is by adding a property called pagesDir in the next.config.js configuration.

With this new options set to something like:

{
"pagesDir": './src/pages'
}

we could keep all the source code in src, including the pages.

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

Expected Behavior

Added description at the top of the page

Current Behavior

Pages cannot be placed within a sub folder.

Steps to Reproduce (for bugs)

Context

Your Environment

Tech
Version

next
6.0.0

node
6.x

OS
N/A

browser
N/A

etc

Issue 2:
When using Router.push(url, as, { shallow }) the Router should validate that as is a String and warn the consumer.

As a consumer, I would expect Router.push to gracefully handle / fallback to setting as = url so I can simply invoke Router.push(url, {shallow: true}) but 🤷‍♀️

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

Steps to Reproduce (for bugs)

invoke Router.push like Router.push(url, { shallow: true })

Context

If doing ^ it can stop the URL of your next app from updating even when navigating deep into different routes.

Your Environment

Tech
Version

next
5.1
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.

Issue Details

Electron Version: v9.0.5

9.0.5

Rejection Email

Guideline 2.1 - Performance - App Completeness

We were unable to review your app as it crashed on launch on Mac running macOS 10.15.3. We have attached detailed crash logs to help troubleshoot this issue.

Next Steps

To resolve this issue, please revise your app and test it on a device to ensure it will launch without crashing.

Resources

For information on how to symbolicate and read a crash log, please review Tech Note TN2151 Understanding and Analyzing Application Crash Reports.

Guideline 2.5.1 - Performance - Software Requirements

Your app uses or references the following non-public APIs:

Symbols: _vDSP_deq22D, _vDSP_vsma

The use of non-public APIs is not permitted on the App Store, because it can lead to a poor user experience should these APIs change.

We are constantly reevaluating and identifying non-public APIs that you may have been using for an extended period of time. You should always use public APIs and frameworks and ensure they are up-to-date to prevent this issue in the future.

Next Steps

If you are using third-party libraries, please update to the most recent version of those libraries. If you do not have access to the libraries' source, you may be able to search the compiled binary using the "strings" or "otool" command line tools. The "strings" tool can output a list of the methods that the library calls and "otool -ov" will output the Objective-C class structures and their defined methods. These tools can help you narrow down where the problematic code resides.

Continuing to use or conceal non-public APIs in future submissions of this app may result in the termination of your Apple Developer account, as well as removal of all associated apps from the App Store.

Resources

If there are no alternatives for providing the functionality your app requires, you can use Feedback Assistant to submit an enhancement request.

If you are unable to reproduce this issue, ensure you are testing the exact version of the app that you submitted for review, and that you're doing so in a minimally privileged environment. See Technical Q&A QA1778: How to reproduce bugs reported against Mac App Store submissions.

For information on how to symbolicate and read a crash log, please see Technical Note TN2123 - CrashReporter.

Additional Information

Issue 2:
I just received a MAS rejection for an app using Electron 8.3.0. The app I submitted was a small feature bump - no major changes. Moreover the last review was just a few days ago.

From MAS review:

Your app includes a version of an SDK from Electron that violates the App Store Review Guidelines. The version of the Electron SDK you are using in your app attempts to hide the use of private APIs. This is a violation Section 2.5.1 of the App Store Review Guidelines.

Symbols: _vDSP_deq22D, _vDSP_vsma

Guideline 2.5.1: Apps may only use public APIs.
Issue 1:
My problem is with import TF module. Here is my configuration: Python 3.6.1, Windows 7 64-bit. I've MSVCP140.dll library in 'C:\Windows\System32' and 'C:\Windows\SysWOW64' folders. I also have instaled Update 3 for VS2015 C++.

In Windows PATH varitable I have such value related to python:

C:\Users\Jacek\AppData\Local\Programs\Python\Python36\Scripts

C:\Users\Jacek\AppData\Local\Programs\Python\Python36\

Steps which I made:

I've installed TensorFlow by command (in power shell). It works.

python -m pip install --upgrade tensorflow

But when I run python environment and try import Tensor Flow

import tensorflow as tf

I get errors, this error raise another errors related with it, but at the beginning I want to resolve this first

Traceback (most recent call last): File "C:\Users\Jacek\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 18, in swig_import_helper fp, pathname, description = imp.find_module('_pywrap_tensorflow', [dirname(file)]) File "C:\Users\Jacek\AppData\Local\Programs\Python\Python36\lib\imp.py", line 296, in find_module raise ImportError(_ERR_MSG.format(name), name=name) ImportError: No module named '_pywrap_tensorflow'

Issue 2:
The current .whl does not support python 3.6. Please update to support the latest version of python. Thanks!

C:\WINDOWS\system32>python --version

Python 3.6.0

C:\WINDOWS\system32>pip install --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-0.12.1-cp35-cp35m-win_amd64.whl

tensorflow-0.12.1-cp35-cp35m-win_amd64.whl is not a supported wheel on this platform.
Issue 1:
Here is error:

Python 3.7.8

fastapi 0.63.0

Run configuration:

uvicorn.run("app:app", host="0.0.0.0", port=port, reload=True)

I think the error is in the path here is console log:

127.0.0.1:54913 - "GET /api/v1/api/v1/openapi.json HTTP/1.1" 404 Not Found

Here is double path: /api/v1/api/v1/

Doc path is wrong http://localhost:8080/docs I expect it to be: http://localhost:8080/api/v1/docs

Here is the test code to reproduce 'test_app.py' file:

import uvicorn
import json
from fastapi import FastAPI, APIRouter, Response
from fastapi.responses import RedirectResponse

app = FastAPI(title="Root path test", root_path="/api/v1")

@app.post("/test-call ", tags=["test"])
def ping():
return Response(
json.dumps(dict(ping='pong')),
headers={'Content-Type':'application/json'})

@app.get("/")
def read_typer():
return RedirectResponse('/docs')

if __name__ == "__main__":
uvicorn.run("test_app:app", host="0.0.0.0", port=8080, reload=True)

Issue 2:
Hello,

I am following to fastAPI callbacks here : https://fastapi.tiangolo.com/advanced/openapi-callbacks/ to try to set up slack alerts in one of my projects.

My goal is to sending a slack message whenever the API request failed. My code looks like this:

from typing import Optional

from fastapi import APIRouter, FastAPI
from pydantic import BaseModel, HttpUrl

app = FastAPI()

class Invoice(BaseModel):
id: str
title: Optional[str] = None
customer: str
total: float

class InvoiceEvent(BaseModel):
description: str
paid: bool

class InvoiceEventReceived(BaseModel):
ok: bool

invoices_callback_router = APIRouter()

@invoices_callback_router.post("", response_model=InvoiceEventReceived)
def invoice_notification(body: InvoiceEvent):
return {"okay": "yes"}

@app.post("/invoices/", callbacks=invoices_callback_router.routes)
def create_invoice(invoice: Invoice, callback_url: Optional[HttpUrl] = None):
return {"msg": "Invoice received"}

I would input slack webhooks link in callback_url, however, I am not very sure where to put payload for the callback_url, anyone could help ?
Issue 1:
System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No

OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu 16.04

Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: n/a

TensorFlow installed from (source or binary): binary (Docker tensorflow/tensorflow)

TensorFlow version (use command below): 1.10.1 (from core/public/version.h)

Python version:2.7.12

Bazel version (if compiling from source): n/a

GCC/Compiler version (if compiling from source): n/a

CUDA/cuDNN version: n/a

GPU model and memory: n/a

Exact command to reproduce:

# docker run -it tensorflow/tensorflow bash

root@xxxxxxx:/notebooks# python2.7 -c "import tensorflow as tf"

Illegal instruction

Describe the problem

This is a request to update documentation to include minimal system requirements, especially the description for Docker images that include prebuilt binaries.

For example, the main Docker image on DockerHub (tensorflow/tensorflow, 19M downloads) currently does not operate on CPU's without AVX support. This includes CPUs sold as recently as 4 years ago.

This requirement should be stated in the Docker image description displayed in DockerHub. Perhaps also include a link to an alternative docker image that users with non-AVX CPUs may utilize to build from source.

Source code / logs

n/a

Issue 2:
As announced in release notes, TensorFlow release binaries version 1.6 and higher are prebuilt with AVX instruction sets. This means on any CPU that do not have these instruction sets either CPU or GPU version of TF will fail to load with any of the following errors:

ImportError: DLL load failed:

A crash with return code 132

Our recommendation is to build TF from sources on these systems.

System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No

OS Platform and Distribution (e.g., Linux Ubuntu 16.04): ubuntu/windows/macos

TensorFlow installed from (source or binary): binary

TensorFlow version (use command below): 1.6 and up

Python version: 2.7, 3.3, 3.4, 3.5, 3.6 and any newer

Bazel version (if compiling from source): n/a

GCC/Compiler version (if compiling from source): n/a

CUDA/cuDNN version: any

GPU model and memory: any

Exact command to reproduce: python -c "import tensorflow as tf"
Issue 1:
Example Code

print(pd.DataFrame({'a': np.zeros(1000, 'V4')}))

Results

Non-deterministic behavior. Sometimes you get all zeros, sometimes you get garbage like this:

a
0 [1, 0, 0, 0]
1 [0, 0, 0, 0]
2 [8, 0, 0, 0]
3 [0, 0, 0, 0]
4 [48, -92, 71, -60]
5 [-27, 127, 0, 0]
6 [5, 0, 0, 0]
7 [0, 0, 0, 0]
...

That is despite the fact that the bytes are actually all zero, and NumPy prints all rows as [0, 0, 0, 0].

Sometimes when printing a wider DataFrame containing such a column, it segfaults with this stack trace:

#0 BYTE_copyswap (dst=0x7fffebdbe868, src=0x7fffe9f0d054, __NPY_UNUSED_TAGGEDswap=0, __NPY_UNUSED_TAGGEDarr=0x7fffea15f990)
at numpy/core/src/multiarray/arraytypes.c.src:1911
#1 0x00007ffff5d82075 in PyArray_Scalar (data=0x7fffe9f0d054, descr=0x7fffea1612d0, base=<optimized out>) at numpy/core/src/multiarray/scalarapi.c:835
#2 0x00007ffff5d52df0 in array_item (self=0x7fffea15f990, i=<optimized out>) at numpy/core/src/multiarray/mapping.c:1371

Expected Output

All rows [0, 0, 0, 0] - just as NumPy prints it.

Output of pd.show_versions()

## INSTALLED VERSIONS

commit: None

python: 3.5.1

python-bits: 64

OS: Linux

OS-release: 3.13.0

machine: x86_64

processor: x86_64

byteorder: little

LC_ALL: None

LANG: en_US.UTF-8

pandas: 0.18.1

pip: 8.1.2

setuptools: 27.2.0

numpy: 1.11.1

Issue 2:
Trying to print anything containing a V* (void) type throws in isnull:

>>> import numpy as np
>>> import pandas as pd
>>> arr = np.array([b'foo'], dtype='V')
>>> arr
array([[102 111 111]],
dtype='|V3')
>>> s = pd.Series(arr)
>>> s[0]
[102 111 111]
>>> s
TypeError: ufunc 'isnan' not supported for the input types, and the inputs could
not be safely coerced to any supported types according to the casting rule ''safe''

From the looks of it, pandas.core.common._isnull_ndarraylike (and maybe some other methods?) should take care of this, e.g. return an array filled with False.

Here's the relevant part of the traceback:

pandas/formats/format.py in _format_strings(self)
2057 vals = vals._values
2058
-> 2059 is_float = lib.map_infer(vals, com.is_float) & notnull(vals)
2060 leading_space = is_float.any()
2061

pandas/core/common.py in notnull(obj)
248 pandas.isnull : boolean inverse of pandas.notnull
249 """
--> 250 res = isnull(obj)
251 if lib.isscalar(res):
252 return not res

pandas/core/common.py in isnull(obj)
89 pandas.notnull: boolean inverse of pandas.isnull
90 """
---> 91 return _isnull(obj)
92
93

pandas/core/common.py in _isnull_new(obj)
99 raise NotImplementedError("isnull is not defined for MultiIndex")
100 elif isinstance(obj, (gt.ABCSeries, np.ndarray, pd.Index)):
--> 101 return _isnull_ndarraylike(obj)
102 elif isinstance(obj, gt.ABCGeneric):
103 return obj._constructor(obj._data.isnull(func=isnull))

pandas/core/common.py in _isnull_ndarraylike(obj)
190 result = values.view('i8') == tslib.iNaT
191 else:
--> 192 result = np.isnan(values)
193
194 # box

TypeError: ufunc 'isnan' not supported for the input types, and the inputs could
not be safely coerced to any supported types according to the casting rule ''safe''