WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Hello,

I have noticed not all of my AJAX requests are catched by the new feature of 2.6 in WebProfilerBundle.

If you create an url with the twig function url they aren't recognized. With urls generated by path it works.

I am on version 2.6.

Issue 2:
I am just testing the new ajax debug toolbar and my request are not visible in the profiler.

It works if the url are relatives and not absolute.

"http://localhost/sf_test/app_dev.php/demo/test" is not handled, but "/sf_test/app_dev.php/demo/test" works.

That seems normal regarding this code:

/* prevent logging AJAX calls to static and inline files, like templates */
if (url.substr(0, 1) === '/' && !url.match(new RegExp("{{ excluded_ajax_paths }}"))) {

https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig#L181

excluded path does not work also:

"http://localhost/sf_test/app_dev.php/_wdt" does not match regexp "^/_wdt".

Did I miss something ?

tested on Firefox and Chrome (Ubuntu)
Issue 1:
Get the following error: Querying the GitHub API failed. This is usually caused by a network outage or because you have reached your hourly API rate limit of 60 requests.

Here is a screenshot:

Issue 2:
https://deno.land/std

Failed to get directory listing

Querying the GitHub API failed. This is usually caused by a network outage or because you have reached your hourly API rate limit of 60 requests.
Issue 1:
Hi! Do you plan to support the < noindex > tag (and even better its valid type <!--noindex>)? It is very necessary for every SEO needs.

Type: Feature Request

Component: DOM (general issues)

Issue 2:
I'm hacking on an fully server and client compatible app using React. One obstactle I'm running into is it seems react doesn't like exclamation marks in your jsx-style code.

Here's an example of a pretty standard boilerplate for HTML:

<!doctype html>
<!--[if IE 7]> <html class="no-js ie ie7 ltie8 ltie9"><![endif]-->
<!--[if IE 8]> <html class="no-js ie ie8 ltie9"><![endif]-->
<!--[if gt IE 8]> <html class="no-js ie gtie8"><![endif]-->
<!--[if !IE]><!--><html class="no-js" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml" ><!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">

<link rel="stylesheet" href="/css/app.css" type="text/css" media="all" />
</head>
<body>
<!--[if lt IE 8]>
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->

{this.props.page}

<!-- <script src="/js/vendor.js"></script> -->
<script src="/js/app.js"></script>
</body>
</html>

I think it's getting stuck on the conditional comments in this example.

I would prefer to keep this code in the HTML style, and to render it from the server without making major changes, it needs to be inside a react class. I'd be open to trying to hack this together, I may take a stab sometime this coming week.
Issue 1:

Issue 2:
Is there an existing issue for this?

I have searched the existing issues

Current Behavior

Minimal reproduction is here:

https://github.com/bigtimebuddy/npm-bug-package-lock-only

Package structure is roughly this:

packages/package-a (@package/a)

devDependencies

@tools/a

package/tools-a (@tools/a) private

After doing a version bump of my workspaces packages, I use --package-lock-only option to update the package-lock.json file. Prior to npm@7.20.2 this worked fine. After then, it fails with the following message:

npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@tools%2fa - Not found
npm ERR! 404
npm ERR! 404 '@tools/a@2.0.0' is not in this registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR! ~/.npm/_logs/2021-10-29T17_43_19_186Z-debug.log

Additional Links

Changed was introduced here: v7.20.2...v7.20.3

Additional context here: lerna/lerna#2891

Expected Behavior

With the reproduction, should get the following and not fail.

up to date, audited 6 packages in 1s

found 0 vulnerabilities

Steps To Reproduce

git clone https://github.com/bigtimebuddy/npm-bug-package-lock-only`
cd npm-bug-package-lock-only
npm i npm@8 -g
npm test

Environment

OS: macOS v11.6

Node: v12.20.1

npm: v8.1.2
Issue 1:
Let's assume there are two excel files with almost identical content:

file_1.xlsx:

file_2.xlsx:

Then reading first file in pandas:

df1 = pd.read_excel('file_1.xlsx',
header=0, index_col=None,
converters={'A0': str, 'B0': str})
print(df1)

Would produce expected result:

A0 B0 C0 D0 E0
0 0001 0004 0.1 1 a
1 0002 0005 0.2 2 b
2 0003 0006 0.3 3 c

However trying the same with the second file:

df2 = pd.read_excel('file_2.xlsx',
header=[0,1], index_col=None,
converters={('A0', 'A1'): str,
('A0', 'B1'): str},
)

print(df2)

Would yield somewhat different and unexpected (in comparison with previous example) result:

A0 A0 C0 E0
A1 B1 C1 D1 E1
1 0004 0.1 1 a
2 0005 0.2 2 b
3 0006 0.3 3 c

Since it is not possible to use has_index_names=False as it has been depreciated since 0.16.2, there seems to be no way to have control over how pandas imports this first column (i.e. no way to convert values before original formatting is lost).

And there is no way to tell pandas DO_NOT_ASSIGN first column to index as it ignores index_col=None when header is a list.

So the question is what would be the sensible way to regain control over import process of first columns with multi-index header:

revive or de-depreciate (would that be appreciate?) has_index_names;

make index_col play a role in parsing header?

Issue 2:
From SO: http://stackoverflow.com/questions/34020061/excel-to-pandas-dataframe-using-first-column-as-index

@chris-b1 another one on the multi-index excel issues .. :-)

Small test case: content of excel file:

A
A
B
B

key
val
key
val

1
2
3
4

1
2
3
4

gives:

In [2]: pd.read_excel("test_excel_index_col.xlsx", header=[0,1], index_col=None)
Out[2]:
A A B
key val key val
1 2 3 4
1 2 3 4

It's not super clear in the formatting of the dataframe, but the [1, 1] is the index and [A, key] are seen as the level names of the multi-indexed columns.
Issue 1:
Because denoland/deno_docker#175 would be possible.

References #10507 (comment), https://github.com/felipecrs/deno_docker/blob/e585daffcb72ed8accca8c392c7a040ff0b3218a/README.md#staying-low-on-size

Issue 2:
Feature request: compile JS/TS scripts with no dependency. To be used in IoT, IIoT, embedded devices etc.
Issue 1:
Balaji Varanasi opened SPR-6053 and commented

When executing a Sybase stored procedure using SimpleJdbcCall class, the database metadata is not being loaded. The logs show the following messages:

org.springframework.jdbc.core.metadata.CallMetaDataProviderFactory - SQL Server is not one of the databases fully supported for procedure calls -- supported are: [Apache Derby, DB2, MySQL, Microsoft SQL Server, Oracle, Sybase]

org.springframework.jdbc.core.metadata.CallMetaDataProviderFactory - Metadata processing disabled - you must specify all parameters explicitly

org.springframework.jdbc.core.metadata.CallMetaDataProviderFactory - Using org.springframework.jdbc.core.metadata.GenericCallMetaDataProvider

After little research, I found that our Sybase database is named "SQL Server" and the commonDatabaseName method in JdbcUtils being used to get the database name compares against the string "sql server".

This problem gets fixed if the comparison with "sql server" is done without considering the case.

Affects: 2.5.6, 3.0 M4

Attachments:

sybase.patch (822 bytes)

Issue Links:

#11630 Sybase isn't detected by metadata when using WebLogic JDBC Driver ("is duplicated by")

#10936 Include 'ASE' in the list of product names recognised by JDBCUtils as Sybase ("is duplicated by")

Referenced from: commits ea674f2, b482d6d

Issue 2:
Patrick Hancke opened SPR-3165 and commented

The Freemarker macro below displays a text area but performs a HTML escape of the 'stringStatusValue' variable. Nothing wrong with that, except that the 'bind' macro also does a HTML escape in case the "defaultHtmlEscape" context-param is set in the 'web.xml'. This is the case in my application, so I end up with a duplicate HTML escape of the textarea content. As a workaround, I've rewritten the 'formTextarea' macro to prevent the HTML escape.

<#macro formTextarea path attributes="" >

<@bind path/>

<textarea id="${status.expression}" name="${status.expression}" ${attributes}>${stringStatusValue?html}\</textarea>

</#macro>

<#macro bind path>

<#if htmlEscape?exists>

<#assign status = springMacroRequestContext.getBindStatus(path, htmlEscape)>

<#else>

<#assign status = springMacroRequestContext.getBindStatus(path)>

</#if>

<#-- assign a temporary value, forcing a string representation for any

kind of variable. This temp value is only used in this macro lib -->

<#if status.value?exists && status.value?is_boolean>

<#assign stringStatusValue=status.value?string>

<#else>

<#assign stringStatusValue=status.value?default("")>

</#if>

</#macro>

Affects: 2.0 final
Issue 1:
https://github.com/hupili/pandas-to-json-multi-index-issue/blob/master/pandas%20to_json%20test.ipynb

Code Sample, a copy-pastable example if possible

df = pd.DataFrame(
[
['1', '2', 'a'],
['1', '3', 'b'],
['2', '4', 'c'],
['3', '5', 'd']
],
columns=['key1', 'key2', 'key3']
)
j = df.set_index(['key1', 'key2']).to_json()
json.loads(j)

Problem description

The exported JSON is ill-formatted

---------------------------------------------------------------------------
JSONDecodeError Traceback (most recent call last)
<ipython-input-8-5f4db1ed154c> in <module>()
----> 1 json.loads(j)

/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/json/__init__.py in loads(s, encoding, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
317 parse_int is None and parse_float is None and
318 parse_constant is None and object_pairs_hook is None and not kw):
--> 319 return _default_decoder.decode(s)
320 if cls is None:
321 cls = JSONDecoder

/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/json/decoder.py in decode(self, s, _w)
337
338 """
--> 339 obj, end = self.raw_decode(s, idx=_w(s, 0).end())
340 end = _w(s, end).end()
341 if end != len(s):

/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/json/decoder.py in raw_decode(self, s, idx)
353 """
354 try:
--> 355 obj, end = self.scan_once(s, idx)
356 except StopIteration as err:
357 raise JSONDecodeError("Expecting value", s, err.value) from None

JSONDecodeError: Expecting ':' delimiter: line 1 column 13 (char 12)

Expected Output

Output of pd.show_versions()

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

pandas: 0.18.1

nose: 1.3.7

pip: 7.1.2

setuptools: 28.6.1

Cython: None

numpy: 1.11.2

scipy: 0.18.1

statsmodels: None

xarray: None

IPython: 5.1.0

sphinx: None

patsy: None

dateutil: 2.5.3

pytz: 2016.7

blosc: None

bottleneck: None

tables: None

numexpr: None

matplotlib: 1.4.3

openpyxl: None

xlrd: None

xlwt: None

xlsxwriter: None

lxml: None

bs4: 4.5.1

html5lib: None

httplib2: 0.9.2

apiclient: 1.5.4

sqlalchemy: 1.1.2

pymysql: None

psycopg2: 2.6.2 (dt dec pq3 ext lo64)

jinja2: 2.8

boto: 2.43.0

pandas_datareader: None

In [4]:

Issue 2:
cc @Komnomnomnom

I'm using a recent anaconda build on Windows, which includes v 0.12.0 pandas. I'm attempting to use a multi-index header, write it out to a json file, import it and get the same formatted dataframe. The column headers come out stacked vertically instead.

import numpy as np

import pandas as pd

pd.set_option('html',False)

index = pd.MultiIndex(levels=[['foo', 'bar', 'baz', 'qux'],

['one', 'two', 'three']],

labels=[[0, 0, 0, 1, 1, 2, 2, 3, 3, 3],

[0, 1, 2, 0, 1, 1, 2, 0, 1, 2]],

names=['foo', 'bar'])

df = pd.DataFrame(np.random.randn(10, 3), index=index,

columns=['A', 'B', 'C'])

dft = df.transpose()

dft

dft.to_json('D:\xxmt.json',orient='split')

dftj=pd.read_json('D:\xxmt.json',orient='split')

dftj
Issue 1:
We are investigating using React for drawing custom native UIs (that fall outside the scope of react-native and react-windows-native). ReactFiberReconciler seems like the most sensible place to start (assuming fibers start getting used in mainline relatively soon, which seems reasonably likely), and it certainly seems to be very easy to get a proof of concept up and running using it, at least so far.

If not this, then what is the recommended entry point for 3rd party renders to use?

Issue 2:
This issue is intended to be a discussion for how to distribute the ReactFiberReconciler.js file and dependencies for custom renderers.

Currently first-class renderers within the React codebase/Facebook ecosystem do not have any concerns for this because of Haste / access to the React.js build + publish tooling within this codebase.

3rd party renderers are currently adding react-dom to their dependency list and requiring react-dom/lib/ReactFiberReconciler.js to build and expose their custom renderer.

Ideally, ReactFiberReconciler.js would be distributed with the react package or as a standalone react-fiber-reconciler package. Whether this is at react/reconciler.js or react/lib/reconciler.js idk. I think at the root is better to continue the discouragement of looking in react/lib/* for anything.

I understand flat bundles are coming, too. I don’t know if that should block this or if this could be a flat bundle, or any other alternative.

Is this something the team is ready to commit to and support if we came to a decision on approach and I put together a PR?

Related issues:

#6795 Create Separate Copies of Each Renderer

#5472 Include flow type definitions (flow type distribution proposal at #5472 (comment))

@sebmarkbage @spicyj
Issue 1:
crypto/x509 currently supports parsing PKCS#8 private keys with ParsePKCS8PrivateKey but doesn't provide a way to marshal them. A corresponding MarshalPKCS8PrivateKey function would be handy.

Issue 2:
I posted to golang-nuts without any replies so before I push to gerrit I thought I'd make a bug here first.

There is a x509.ParsePKCS8PrivateKey but there is no x509.MarshalPKCS8PrivateKey, which doesn't seem to match up with the other Parse/Marshal combinations in the x509 package. I've written a Marshal method but I'm curious why it was originally omitted and if I'm missing something.
Issue 1:
🚀 Feature

I would like to see a PyTorch feature to generate a dataset, ideally Pandas DataFrame with the image name as index and lists of labels for each image.

Motivation

For multi-label image classification, it is important to generate the dataset from scratch given a custom datasets. Most likely, the images would be duplicated in multiple folder if the image has multiple label, similar to how ImageFolder works. Unfortunately, I have not seen any of such features offered in most PyTorch implementation.

Pitch

Multi-label image classification is definitely an important topic as most images can be classified with multiple labels. It is also much easier to implement compared to object detection if such level of detection is not required.

Alternatives

@SpandanMadan had proposed a working solution. I would like to clean it up and make it consistent with PyTorch implementation.

cc @fmassa

Issue 2:
🐛 Bug

When adding a tensor to another tensor c at some non-unique indices, we end up with an incorrect tensor. The output is stochastic (demonstrated below).

This bug is also there when writing to c (instead of adding); I.e., c1[b] = a; c2[b] = a.

To Reproduce

import torch
import numpy as np

def torch_indexing_test(device):
a = torch.arange(10000).float().to(device)
b = torch.tensor(np.random.choice(100, 10000)).to(device).long()

c1 = torch.zeros(100).to(device)
c2 = torch.zeros(100).to(device)

c1[b] += a
c2[b] += a

print(torch.max(c1-c2)) # should be zero

if __name__ == '__main__':
torch_indexing_test(device="cpu")
torch_indexing_test(device="cuda:0")

# print output:
# tensor(0.)
# tensor(9307., device='cuda:0')

Expected behavior

I would expect the printed output for the code when ran on both cpu and gpu to be 0 (meaning no stochasticity), but the output is non-zero for the gpu code.

Environment

PyTorch version: 1.4.0

Is debug build: No

CUDA used to build PyTorch: 10.1

OS: Microsoft Windows 10 Home

GCC version: (Rev5, Built by MSYS2 project) 5.3.0

CMake version: Could not collect

Python version: 3.7

Is CUDA available: Yes

CUDA runtime version: 10.1.105

GPU models and configuration: GPU 0: GeForce GTX 1080 Ti

Nvidia driver version: 441.22

cuDNN version: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\cudnn64_7.dll

Versions of relevant libraries:

[pip] numpy==1.18.1

[pip] torch==1.4.0

[pip] torchvision==0.5.0

[conda] blas 1.0 mkl

[conda] libblas 3.8.0 14_mkl conda-forge

[conda] libcblas 3.8.0 14_mkl conda-forge

[conda] liblapack 3.8.0 14_mkl conda-forge

[conda] liblapacke 3.8.0 14_mkl conda-forge

[conda] mkl 2019.4 245

[conda] mkl-service 2.3.0 py37hb782905_0

[conda] mkl_fft 1.0.15 py37h14836fe_0

[conda] mkl_random 1.1.0 py37h675688f_0

[conda] pytorch 1.4.0 py3.7_cuda101_cudnn7_0 pytorch

[conda] torchvision 0.5.0 py37_cu101 pytorch
Issue 1:
That came up during working on #12910. I'm adding new Job resource in pkg/expapi and while generating conversions for that I'm reaching convert_v1_PodSpec_To_api_PodSpec and convert_api_PodSpec_To_v1_PodSpec functions which are hand written in pkg/api/v1/conversion.go which results in compilation errors. What should be the right path to proceed with this? For now I've copied those functions manually to pkg/expapi/v1/conversion.go in aforementioned PR but I'm quite it's not the expected way to proceed with that.

@wojtek-t @smarterclayton

Issue 2:
Could not find anything about this, but would be nice to use petsets across clusters, for example database replication for read only databases to another cluster.

A possible first pass could be to make the DNS entries of each pet resolve in the other clusters.
Issue 1:
Joshua Vickery opened SPR-263 and commented

I am having trouble creating a bean of type java.io.File with a single constructor-arg. The problem is that the bean that is instantiated seems to "double" its argument value.

Application Context:

<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"

"http://www.springframework.org/dtd/spring-beans.dtd">

<beans>

<bean id="dir" class="java.io.File">

<constructor-arg><value>test</value></constructor-arg>

</bean>

</beans>

Test code:

import java.io.File;

import org.springframework.context.ApplicationContext;

import org.springframework.context.support.FileSystemXmlApplicationContext;

public class Test {

public static void main(String[] args) throws Exception {

File f1 = new File("test");

System.out.println(f1.getAbsolutePath());

ApplicationContext ac = new FileSystemXmlApplicationContext("applicationContext.xml");

File f2 = (File)ac.getBean("dir");

System.out.println(f2.getAbsolutePath());

}

}

Abbreviated Output from code:

run:

[java] /home/vickeryj/temp/springTest/test

...

[java] /home/vickeryj/temp/springTest/test/test

In short it seems to me that both println statements should be the same, however the bean retrieved from the application context has a path of "test/test" rather than the value of "test" which I passed in.

Can anyone recreate this?

Affects: 1.0.2

Issue 2:
Keith Donald opened SPR-6413 and commented

Spring Roo has the requirement to map a web requests to static views. Rather than configure a "default handler" that attempts to map any request not handled by a Controller to a view, they're now defining a ParameterizableViewController bean for each static view [which is a safer and more explicit]. This change results in some extra low-level bean configuration that could be simplified.

Currently, the following must be added to mvc-config.xml:

<!-- Required to enable invocation of org.springframework.web.servlet.Controllers -->
<bean class="org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter" />
<!-- Required for bean name-based request mapping -->
<bean class="org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping" p:order ="1">
<!-- Register any interceptors, typically duplicating interceptor set with other handler mappings -->
<property name="interceptors"> ... </property>
</bean>
<!-- Required for each static view controller -->
<bean name="/index" class="org.springframework.web.servlet.mvc.ParameterizableViewController" p:viewName="index" />

Proposal:

We can simplify the above config by encapsulating the registration of the SimpleControllerHandlerAdapter and BeanNameUrlHandlerMapping beans in the mvc:annotation-driven element.

We can simplify the registration of ParameterizableViewControllers by introducing a custom mvc namespace tag such as:

<mvc:view-controller path="/index" /> <!-- defaults to view name "index" via RequestToViewNameTranslator -->

<mvc:view-controller path="/foo" view-name="aCustomViewName" />

Affects: 3.0 RC2

Issue Links:

ROO-385 Use new Spring MVC namespace ("is depended on by")

Referenced from: commits de1d548
Issue 1:
I'm about to work on the Zipline: Show the Local Weather challenge but it appear the example failed to display weather information: http://codepen.io/AdventureBear/full/yNBJRj

Checking the console log reveal the following error:

Failed to load resource: the server responded with a status of 401 (Unauthorized) http://api.openweathermap.org/data/2.5/weather?lat=45.9000&lon=6.1167&units=metric&callback=jQuery213018545346311293542_1445901807518&_=1445901807520

The link http://api.openweathermap.org/data/2.5/weather?lat=45.9000&lon=6.1167&units=metric&callback=jQuery213018545346311293542_1445901807518&_=1445901807520 display the following error:

Invalid API key. Please see http://openweathermap.org/faq#error401 for more info.

Issue 2:
Our Weather Zipline example is now broken. Aparently the API @AdventureBear used on her Zipline no longer works. https://www.evernote.com/l/AlwSsfX2kblJYoOSp9uAq-BKFosOSCg8-aAB/image.png

We need to find an API that works and doesn't require adding an API key, or we need to make an API endpoint on Free Code Camp that campers can use (we don't want people exposing API keys on CodePen).

Thanks to @martoncsikos for spotting this issue.