WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Here's what I think we should do:

Keep string interpolation. It's just too convenient and taking away popular features for language purity is obnoxious.

Implement interpolation in the parser. Currently, it's implemented as a macro. This leads to problems like #455. Instead, we should implement string interpolation for normal strings in the parser, which will allow handling this just fine since it will know when a string is or isn't finished.

Non-standard string literals are on their own. This means that non-standard string literals cannot actually fully emulate the behavior of standard string literals. They can use interp_parse to get close, but they won't be able to handle string literals in interpolated expressions [#455]. That's fine. You can either have full-blown parser-supported string interpolation or you have a custom string literals, but not both at the same time. This is an acceptable compromise.

Use Allow string literal juxtaposition for concatenation. Merge this branch and make string literal juxtaposition the a syntax for string concatenation. If you want to concatenate two variables as strings, you can do foo "" bar, which parses as string(foo,bar) rather than string(foo,"",bar). If you need to reference the string concatenation operation as a function, you use string. This is not really any different than having special syntax for e.g. indexing.

Deprecate * for string concatenation. This was a cute experiment, but it's bad. The biggest problem is the Char*Char issue, which we should not deprecate, but rather just remove (and perhaps make Char a proper integer type again?).

Parse multiline string literals as macro calls. When an unprefixed multiline string literal (i.e. triple-quoted string) is encountered, handle interpolation in the parser and emit it as a macro call (maybe @mstr?) for further processing. When a prefixed multiline string literal is encountered, no interpolation is done, but the string is passed off to an appropriate macro.

Regarding the last point, consider the following:

# note the indentation
"""
Four score and $n years ago...
"""

Should be equivalent to:

@mstr("\n Four score and ", n, " years ago...\n ")

The @mstr macro can handle indentation stripping a la #70 by looking at the trailing whitespace of the last string literal macro argument and stripping that from the indentation of all the string literal arguments.

Prefixed triple-quoted strings should emit macro calls just like prefixed single-quoted strings do, although I'm not sure whether they should call a different macro or the same one. Having to have define different macros to support both normal and triple strings is annoying, but on the other hand, you might want to handle triple-quoted literals specially.

Issue 2:
I apologize if this is a duplicated issue.
Issue 1:
When using the mouse pointer and clicking on a certain section within the code editor, many times it would not work like a normal editor. Within the editor it will take me to either the beginning or end of the row and I would have to use my arrow keys if i wanted to edit something in the middle of the row.

This only happens randomly and in multiple computers wondering if it might be a browser issue.

Issue 2:
In all the exercises, we the users are forced to press the enter key before writing any code.

Update:

We have locked the conversation temporarily on this thread to collaborators only, this has been resolved in staging, and will be live soon.

The fix can be confirmed on the beta website.

The workaround currently on production website is:

Press the Enter key on the challenge editor and then proceed with the challenge.

Apologies for the inconvenience meanwhile.

Reach us in the chat room if you need any assistance.
Issue 1:
OS: Archlinux

Python: 2.7.8

PyQt bindings: 5.3.2-1

Qt: 5.3.2-1

Matplotlib: 1.4.0-2

Steps to reproduce:

from matplotlib import pyplot as plt

y_data = [....]

plt.plot(y_data, 'k+')

plt.show()

then press the "Save the figure" icon, it shows the dialog to write a filename. Then press Save, a model error window will pop-up complaining that "png)')" is not a supporte file extension.

Digging further in matplotlib/backend_bases.py (~2098) tries to resolve the extension by

if cbook.is_string_like(filename):
format = os.path.splitext(filename)[1][1:]

but filename is this unicode:

u"(u'/home/rbm/figure_1.png', u'Portable Network Graphics (*.png)')"

This in turn comes from the qt5 backend filters passed in method save_fig of matplotlib/backends/backend_qt5.py :

Encapsulated Postscript (.eps);;Joint Photographic Experts Group (.jpeg .jpg);;PGF code for LaTeX (.pgf);;Portable Document Format (.pdf);;Portable Network Graphics (.png);;Postscript (.ps);;Raw RGBA bitmap (.raw .rgba);;Scalable Vector Graphics (.svg .svgz);;Tagged Image File Format (.tif *.tiff)

This will fail for every other format whatever choosed in the Save File dialog.

I tested the GTK backend and it doesn't have this problem.

Issue 2:
Bug also reported here: https://bugs.archlinux.org/task/41790

When clicking on the Save button on the NavigationToolbar, I get an error:

Format "png)')" is not supported. Supported formats: eps, jpeg, jpg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff.

I tracked the bug to be coming from the output of the _getSaveFileName function, that is supposed to be a string but is a tuple in reality. In qt_compat.py, _getSaveFileName links to QtWidgets.QtFileDialog.getSaveFileName.

In pyqt4, this function returns a string, but the doc pyqt4/5 differences says that in pyqt5 the functions returns a tuple (filename, extension), as for getSaveFileNameAndFilter in pyqt4.

Commenting line 96 in qt_compat.py solved the problem, because _getSaveFileName is then correctly defined in line 117 (only returning the first element of the tuple).
Issue 1:
Did anybody notice that some sources in this project are identified as "Objective-J"?

Please see https://github.com/languages/Objective-J

Issue 2:
Is .j good enough, or should we go with .ju or something else? This is the discussion with some other suggestions as well.

https://groups.google.com/forum/?fromgroups#!searchin/julia-dev/$20file$20extension/julia-dev/pYdK3aHGB6k/J96CLtc8NasJ
Issue 1:
Hi, it will be nice to have a function that do the above automatically.

Issue 2:
Taking in a list of tensors, can we have a function to pad them? This is a useful feature to process sequences of different lengths and process mini batches.

I think the documentation of pad_packed_sequence and torch.nn.utils.rnn.pack_padded_sequence are a little confusing http://pytorch.org/docs/nn.html?highlight=pad_packed#torch.nn.utils.rnn.pad_packed_sequence maybe adding some examples could help the explanation.
Issue 1:
When the returned dataframe(or series) have the same length of the original dataframe. The index for grouped keys are missing. For example:

a = pd.DataFrame({'l':['a','a','b','b','c'],'x':[1,2,3,4,5]})

a.groupby('l')['x'].apply(lambda r: r)

output:

0 1

1 2

2 3

3 4

4 5

Notice the key 'l' is missing in the output.

This cause some problem if one is not sure whether the returned dataframe or sereires will have the same length.

Best regards

A small, complete example of the issue

# Your code here

Expected Output

Output of pd.show_versions()

# Paste the output here pd.show_versions() here

Issue 2:
A small, complete example of the issue

import pandas as pd
df1 = pd.DataFrame.from_items([('A', [1,2,3]), ('B', [4, 5, 6])])
df2 = pd.DataFrame.from_items([('A', [pd.datetime(1970,1,1), pd.datetime(1970,1,1), pd.datetime(1970,1,1)]), ('B', [4, 5, 6])])
f = lambda row: [row.B + 3]
r1 = df1.apply(f, axis=1)
r2 = df2.apply(f, axis=1)
# bug: r1 and r2 are different and different in shape.
# expect: r1 and r2 to be the same values and shape.
r1
r2
# a clue to the difference:
(df1._is_mixed_type,df1._is_datelike_mixed_type)
(df2._is_mixed_type,df2._is_datelike_mixed_type)

Expected Output

0 [7]
1 [8]
2 [9]

Output of pd.show_versions()

## INSTALLED VERSIONS

commit: None

python: 3.5.1.final.0

python-bits: 64

OS: Windows

OS-release: 10

machine: AMD64

processor: Intel64 Family 6 Model 58 Stepping 9, GenuineIntel

byteorder: little

LC_ALL: None

LANG: None

pandas: 0.18.1

nose: None

pip: 8.1.2

setuptools: 20.3

Cython: None

numpy: 1.11.1

scipy: None

statsmodels: None

xarray: None

IPython: None

sphinx: None

patsy: None

dateutil: 2.5.3

pytz: 2016.6.1

blosc: None

bottleneck: None

tables: None

numexpr: None

matplotlib: None

openpyxl: None

xlrd: None

xlwt: None

xlsxwriter: None

lxml: None

bs4: None

html5lib: None

httplib2: None

apiclient: None

sqlalchemy: None

pymysql: None

psycopg2: None

jinja2: None

boto: None

pandas_datareader: None
Issue 1:
I'm submitting a ...

[ X ] feature request

Current behavior

At the moment when a component wants to communicate with another component to which he is not directly related it has to use a service since only a parent can "subscribe" to an event emitted by its children.

This means that if we have a scenario like this where grand-grand-son3 wants to talk to grand-son-2 we have to use a service (or a dirty combination of ViewChild):

<parent>
<child-1>
<grand-son-1>
<grand-grand-son3></grand-grand-son3>
</grand-son1>
</child-1>
<child-2>
<grand-son-2>
</grand-son2>
</child-2>
</parent>

Creating a service for a simple click that manages the color of grand-son-2 would be silly. So one creates a service that deals with everything inside the parent and every components subscribe to it as needed. This way parent doesn't have a dozen services related to it. I like this solution but it's a lot of boiler plate just to change a color. It also breaks the principle of least privilege a bit. If there was a grandson-4, maybe I wouldn't want him to be able to subscribe to a specific event.

Another option is not to break components in mini components. In other words bigger components to not deal with yet again another service. I don't like this solution but I think the current behavior somewhat encourages that in some instances.

What I'm proposing

@Output(null, MyTargetComponent) sonClicked= new EventEmitter<any>();

It's easy and is in my opinion cleaner than a service.

Angular version: 2.0.0

Issue 2:
Couldn't get custom event (ping) bubble up to the root component. DOM event (click) works just fine:

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

Using alpha.25
Issue 1:
It would be great if, when atom restarts itself, upon reopening it had more of its state preserved:

Open directories

Open files

Position within files

Issue 2:
A feature I love about ST2 and iA Writer, which I'm missing in Atom, is when you quit the app with open windows (including unsaved documents), they all appear again when you reopen.

This has saved me countless times in my workflow to handle having to do a system restart for software update, etc and not have to take time to save all my unsaved docs, etc.

It's also nice because I generally have five or six open projects that I just keep minimized in the editor for ease of access. It would be great to have such a feature in Atom.
Issue 1:
Being able to close indices is a great way to reduce memory usage in an ES cluster with lots of indices. Unfortunately, it makes cluster expansion less automatic -- closed indices don't want to relocate when new nodes are added to the cluster.

It would be great it one could instruct ES to allow relocation of closed indices, too.

Similarly, imagine you have an index with 1 replica. Imagine this index is closed. Imagine that the node where there the replica was located dies. Ooops, at this point this index doesn't have a replica. I don't know if that will turn the index/cluster yellow or ES won't react to that, but it would be great it one could tell ES to create a replica on another node to make up for the lost replica.

Issue 2:
[2015-02-06 15:09:56,722][INFO ][cluster.service ] [LONTTL-ELS03v] detected_master [LONTTL-ELS01v][He9uLnSxRD2w-w6_4e8d8A][LONTTL-ELS01V][inet[/10.128.3.216:9300]], added {[LONTTL-ELS01v][He9uLnSxRD2w-w6_4e8d8A][LONTTL-ELS01V][inet[/10.128.3.216:9300]],[LONTTL-ELS02v][UPV5NBl2TECGYiExIG_I8A][LONTTL-ELS02v][inet[/10.128.3.218:9300]],}, reason: zen-disco-receive(from master [[LONTTL-ELS01v][He9uLnSxRD2w-w6_4e8d8A][LONTTL-ELS01V][inet[/10.128.3.216:9300]]])

LONTTL-ELS03v is on cluster name TTL.LOCAL_MarvelServer

LONTTL-ELS02v and LONTTL-ELS01v are on cluster name TTL.LOCAL_ElasticSearch

The customer misconfigured the unicast configuration and added the following configuration in all the nodes in both cluster :

discovery.zen.ping.unicast.hosts: ["LONTTL-ELS01v","LONTTL-ELS02v","LONTTL-ELS03v"]

The node LONTTL-ELS01v with one cluster name can discover a master with another cluster name when people misconfigured unicast discovery, because we do not check the cluster name in unicast ping.
Issue 1:
I'm trying to CrossFade each image loaded,but once it has loaded the images once,it jumps straight to the image without crossfading.

I'm using this in a while(true) loop in a thread.

Glide.with(this).load(images[i]).placeholder(imageView.getDrawable()).crossFade(1000).into(imageView);

I tried checking out the glidesong project,but can't figure out exactly what is different about the code there.

Issue 2:
I'm using glide to load an image into the background of one of my activities. This background image changes very often and I use the crossfade() to animate between the image changes. This works all fine and dandy when the image is not in the cache.. the crossfade works as expected. However, it seems that if the image was already in the memory cache, the animation does not happen and the image just instantly loads.

Is it currently possible to always animate regardless if its in the cache or not? If not, can this be added? The instant loading really messes with the fluidity of my app
Issue 1:
Describe what you were doing when the bug occurred:

1.

2.

3.

Please do not remove the text below this line

DevTools version: 4.8.2-fed4ae024

Call stack: at updateTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:17786:17)

at getCommitTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:17717:25)

at getCommitTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:17710:30)

at getCommitTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:17710:30)

at getCommitTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:17710:30)

at getCommitTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:17710:30)

at ProfilingCache.getCommitTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:18265:14)

at CommitFlamegraphAutoSizer (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:31718:33)

at vh (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:11067:7)

at fi (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:11733:7)

Component stack: at CommitFlamegraphAutoSizer (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:31701:48)

at div

at div

at div

at SettingsModalContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:26139:23)

at Profiler_Profiler (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:33363:48)

at ErrorBoundary (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:27172:5)

at PortaledContent (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:27303:32)

at div

at div

at ProfilerContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:30463:23)

at TreeContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:22538:23)

at SettingsContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:23040:27)

at ModalDialogContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:28328:23)

at DevTools_DevTools (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:33797:21)

Issue 2:
Describe what you were doing when the bug occurred:

I did profiling on a list, that gets updated on each pagination api call.

Once the profiling was done, I moved around in the Profiler to view the Flamegraph

Moving to second capture, the Profiler crashed.

DevTools version: 4.6.0-6cceaeb67

Component stack: in ec
in div
in div
in div
in So
in Unknown
in n
in Unknown
in div
in div
in rl
in Ze
in fn
in Ga
in _s
Issue 1:
While trying to convince React to replace DOM nodes in-place (which seems is not supported), I've discovered something that looks like bugs. I've put up a demo on http://jsbin.com/hokahaze/6/edit .

First of all, if a node gets replaced while animation is progressing, it is not removed. In the demo it means additional lines are created. As soon as the animation completes, the node usually goes away.

The second "feature" here is that if you leave that demo running, change to another tab, wait 10 seconds and change back to the tab with the demo running, it will now have accumulated lots of "green items" which are basically stuck (meaning their animation completed, but they were not removed from the dom).

Issue 2:
ReactTransitionableChild sets up listeners to detect when animations/transitions are complete so it knows when to remove the transition classes (and DOM elements for a "leave" transition). These listeners get confused when more than one element in the transitionable child tree performs an animation/transition. For example:

<div className="outer">
<div className="inner" />
</div>

Say the desired effect is for the outer div to fade in first, followed by the inner div. This is possible with two CSS transitions with the appropriate durations and delays.

React gets confused when this element is removed in the middle of the inner transition (in fact, I think removing the element before the outer transition finishes can also confuse React). Generally, listening to bubbled transition events violates encapsulation in some cases.
Issue 1:
Migrated issue, originally created by Michael Bayer (@zzzeek)

SQLIte-specific variant implemented similarly to Postgresql's ON CONFLICT, MySQL ON DUPLICATE KEY

original issue #960

Issue 2:
Migrated issue, originally created by Sean Dunn (@seanfdnn)

For MSSQL:

When reflecting a database (such as using autoload for a table) an exception can be thrown ArgumentError: ForeignKeyConstraint with duplicate source column references are not supported. Even when there are no duplicate source column references in the database.

This is caused by two tables in two schemas with the same Primary Key names -- SqlAlchemy confuses these two Primary Keys as being the referred column for a Foreign Key, when only one of them is. This is because SqlAlchemy isn't also checking the constraint schema.

To reproduce:

Create two schemas FOO and BAR

Create three tables, FOO.FOOTABLE, FOO.BAZTABLE, BAR.BARTABLE

Create a PRIMARY KEY on FOO.BAZTABLE and BAR.BARTABLE with the same PK names (i.e. `CONSTRAINT [MY_PK] PRIMARY KEY CLUSTERED ([MY_PK_COL])

Create a FK in FOO.FOOTABLE that references FOO.BAZTABLE.MY_PK_COL

reflect FOO.FOOTABLE via footable = Table('FOOTABLE', fooschemameta, autoload=True, autoload_with=myengine)

Here's one example of someone else who has had the same problem:

https://stackoverflow.com/questions/47205433/sqlalchemy-table-reflection-remove-duplicate-source-column-references/51024467#51024467

The root issue is in dialects/mssql/base.py in def_foreign_keys -- the query that checks the foreign key constraints does not have a WHERE clause that matches the R.c.constraint_schema to RR.c.unique_constraint_schema. -- so it's not uniquely identifying the PK (PK's can have identical names in different schemas, so we also need to check the schema)
Issue 1:
Ensure stubs packages are not installed

No sqlalchemy stub packages is installed (both sqlalchemy-stubs and sqlalchemy2-stubs are not compatible with v2)

Verify if the api is typed

The api is not in a module listed in #6810 so it should pass type checking

Describe the typing issue

Hello,

I was wondering if you would be open to converting _ColumnExpressionArgument from a private, underscore prefixed type to ColumnExpressionArgument, a public and exported type.

This would allow users who wrap SQLAlchemy expressions but accept where clauses from the caller to represent the where clause in the same way the underlying where call does, as seen and defined in these links:

where:

sqlalchemy/lib/sqlalchemy/orm/query.py

Line 1868
in
6f3c741

def where(self, *criterion: _ColumnExpressionArgument[bool]) -> Self:

ColumnExpressionArgument:

sqlalchemy/lib/sqlalchemy/sql/_typing.py

Line 169
in
6f3c741

_ColumnExpressionArgument = Union[

To Reproduce

Simple use case:

def list_where(session, *criterion: _ColumnExpressionArgument[bool]) -> Sequence[Model]:
return session.execute(select(Model).where(*criterion)).scalars().all()

This is obviously contrived, while the more realistic use case is when an application requires consistent use of joins and wants to wrap the query to reduce duplication.

Error

N/A

Versions

N/A

Additional context

Thank you for your time and consideration

Issue 2:
Migrated issue, originally created by Denis Otkidach (@ods)

According to documentation after_attach event should be generated for add(), merge(), and delete() calls. But the last doesn't work. Here is a code sample to reproduce the problem:

from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import Column, Integer, create_engine, event
from sqlalchemy.orm import sessionmaker, Session

Base = declarative_base()

class Obj(Base):
__tablename__ = 'objs'
id = Column(Integer, primary_key=True)

engine = create_engine('sqlite://', echo=True)
Base.metadata.create_all(engine)
session = sessionmaker(bind=engine)()

class EventHandlerIsCalled(Exception): pass

obj = Obj()

session.add(obj)
session.commit()

@event.listens_for(Session, 'after_attach')
def after_attach(session, instance):
raise EventHandlerIsCalled()

try:
session.delete(obj)
except EventHandlerIsCalled:
pass
else:
assert False, 'after_attach event is not generated'