WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Migrated issue, originally created by Johannes Erdfelt (@jerdfelt)

In some cases when code is poorly written and triggers a deadlock in the database, a confusing ResourceClosedError can be raised instead of an OperationalError which explains the deadlock.

The attached script reproduces the problem. When run with the argument 'bad', it will result in this exception:

ResourceClosedError: This result object does not return rows. It has been closed automatically.

if run without any arguments, it results in this exception:

OperationalError: (OperationalError) (1213, 'Deadlock found when trying to get lock; try restarting transaction') 'SELECT b.id AS b_id, b.value AS b_value \nFROM b \nWHERE b.id = %s \n LIMIT %s FOR UPDATE' (1, 1)

The latter message is much more useful than the former, which left me scratching my head and spending a day trying to figure out what was happening.

The only difference between the two is that the OperationalError case uses filter_by(id=1) whereas the ResourceClosedError case uses filter(B.value.in_(1)). It's not clear to me yet why using the in_ filter causes a different exception to be raised.

The little amount I was able to figure out before I had to move on made it look like the OperationalError was getting supressed somehow, the connection was closed and then the subsequent call to first() fails since the connection is closed (resulting in the ResourceClosedError exception).

Attachments: deadlock_sqlalchemy.py

Issue 2:
Migrated issue, originally created by Anonymous

Hi,

First, please consider I'm new to SQLAlchemy.

I find the custom list classes pattern interesting, it can make a lot of use cases cleaner.

However, there is an API problem: it modifies the iter_ method from dict. It can lead to subtle bugs if one doesn't pay attention, especially if someone uses the object without knowing it is managed by the SQLAlchemy mapper.

What the "collection_class" option could do is see whether the custom class has a values() (or itervalues()), and use that one instead of iter it it exists. This means the user only has to add an append() method, without breaking the standard dict API (and, if he doesn't subclass dict, he just has to implement an itervalues() method instead of an iter() method).
Issue 1:
Hi,

Just seeking enlightenment regarding the default values for cookies with Symfony2.

http://symfony.com/doc/current/reference/configuration/framework.html#cookie-httponly

Documentation here states the default value for cookie's created by the framework are for httponly to be set to false.

I've personally encountered numerous Symfony2 apps where existing XSS injection vulnerabilities resulting in identify theft could be easily mitigated by changing this value to true. Below is the relevant OWASP documentation:

https://www.owasp.org/index.php/HttpOnly

I can't help but wonder the rationale behind providing less than secure defaults?

Cheers

Issue 2:
Actually, the default value of framework.session.cookie_httponly is false, which allows javascript to read the sessionId.

To improve security, I think, we should add a BC Break by inverting this parameter.
Issue 1:
My goal is to separate the app code and the vendor code in two different chunks. This works, but my issue is that the vendor chunk changes slightly based on the content of the app chunk. If I for instance require a new file in the app chunk there are some ID's and stuff in the vendor chunk that changes and I need to check that big file into source control every time.

I would very much prefer if the vendor chunk would be consistent between builds, even if the app code changes. I'm using the OccurenceOrderPlugin but it doesn't seem to help achieving this.

Is there anything I am doing wrong, or is this currently how Webpack works by design?

My config file:

webpack({
entry: {
vendor: ["react", "react-router", "lodash", "jquery", "bluebird"],
app: "app.js",
},
output: {
path: paths.jsPublicDev,
filename: "app.bundle.js",
},
plugins: [
new webpack.optimize.OccurenceOrderPlugin(true),
new webpack.optimize.CommonsChunkPlugin({
name: "vendor",
filename: "vendor.bundle.js",
minChunks: Infinity,
}),
],
}
})

Apart from this, Webpack works very well for me. Thank you!

Issue 2:
I'm trying to split my vendor code from my app code and got it all working. However, every time I change some code in my app and create a new build, the vendor file gets a new chunkhash and thus is downloaded by the clients again. The contents are exactly the same though.

Here is a fully working small example showing the problem: https://github.com/kevinrenskers/chunkhash-problem

And as you can see, the contents of these files are 100% identical even though the chunkhash keeps changing:
Issue 1:
A touch version of atom with builds for jail broken iOS devices and Android devices.

This will probably take a lot of work to get done but would be worth it. Since atom is a web technology based in nature just making it touch capable would be the only thing needed.

This could be done as a separate branch of Atom and also a version that doesn't have as much of the hack ability as the regular version for release on the iOS App Store.

The iOS version would have to support x-callback-urls for compatibility with coding apps that have them like an app called Working Copy which is a great Git client for iOS.

Issue 2:
[Enter steps to reproduce below:]

Install on windows 7 box

start the editor

Atom Version: 0.186.0

System: Windows 7

Thrown From: Atom Core

Stack Trace

Uncaught TypeError: Cannot read property 'getEntries' of undefined

At /c:/Users/zimmer/.atom/packages/tualo-git-context/lib/tualo-git-context-view.coffee:236

TypeError: Cannot read property 'getEntries' of undefined
at module.exports.TualoGitContextView.refreshTree (/c:/Users/zimmer/.atom/packages/tualo-git-context/lib/tualo-git-context-view.coffee:236:18)

Commands

Config

{
"core": {},
"editor": {
"invisibles": {}
}
}

Installed Packages

# User
git-merge-conflicts, v0.0.2
git-tab-status, v1.3.0
tualo-git-context, v0.3.0

# Dev
No dev packages
Issue 1:
resize_image_with_crop_or_pad() should work for multiple images (batch of images) similar to tf.image.resize_images()

Issue 2:
Because tf.image.resize_image_with_crop_or_pad() requires its input to have a fully defined shape, it's not useful as part of an input pipeline since the size of images loaded will not be known in advance.

queue = tf.train.string_input_producer(filenames)
reader = tf.WholeFileReader()
_, contents = reader.read(queue)
image = tf.image.decode_jpeg(contents, channels=3)
cropped = tf.image.resize_image_with_crop_or_pad(image, 224, 224)

Ideally the above would work...
Issue 1:
I'm trying to compile the TcpListener example from the docs with rustc -g (via cargo build) and I'm getting this error:

src/main.rs:15:9: 15:15 error: internal compiler error: debuginfo::create_for_loop_var_metadata() - Referenced variable location is not an alloca!
src/main.rs:15 for stream in acceptor.incoming() {
^~~~~~
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box<Any>', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/libsyntax/diagnostic.rs:123

stack backtrace:
1: 0x1136332f8 - sys::backtrace::write::he7909da9eb6468e9fBt
2: 0x113653c03 - failure::on_fail::hb7ba51d37f883f003Qz
3: 0x1135bfcfa - rt::unwind::begin_unwind_inner::hf4af2222e6b64258uyz
4: 0x1114c4d97 - rt::unwind::begin_unwind::h8565474196370893881
5: 0x1114c4d30 - rt::unwind::begin_unwind::h8565474196370893881
6: 0x11093a52d - session::Session::span_bug::hf51aebfd6f9bd43e1on
7: 0x1100e8904 - middle::pat_util::pat_bindings::closure.49095
8: 0x11148fcd1 - ast_util::walk_pat::h8ae3b0f1f213c350lxC
9: 0x11001da90 - trans::expr::trans_rvalue_stmt_unadjusted::hd7e98e6041ff86d1l4i
10: 0x10ffd5835 - trans::expr::trans_into::h24b0113a1e4ebf0euGh
11: 0x10ffd47cb - trans::controlflow::trans_stmt_semi::he012fdd638652fbcgZd
12: 0x10ffd5e72 - trans::controlflow::trans_block::hc3b3fec5a3fb9ff79Zd
13: 0x110080234 - trans::base::trans_closure::hd46f470562b1daa76au
14: 0x10ffca622 - trans::base::trans_fn::hbf7352ab9dfcd879nmu
15: 0x10ffc5e33 - trans::base::trans_item::hf69d9d491dc08772rHu
16: 0x110086d38 - trans::base::trans_crate::h82eea2293a06ce55HDv
17: 0x10fdc950e - driver::phase_4_translate_to_llvm::h3268e7acb055bc171Ca
18: 0x10fda32d8 - driver::compile_input::ha7c31ba4e10c023avba
19: 0x10ff1b8e6 - thunk::F.Invoke<A,$u{20}R$GT$::invoke::h2822247860475515909
20: 0x10ff181e9 - rt::unwind::try::try_fn::h6416506685293600697
21: 0x1136b9d29 - rust_try_inner
22: 0x1136b9d16 - rust_try
23: 0x10ff188e7 - thunk::F.Invoke<A,$u{20}R$GT$::invoke::h15537213600061603954
24: 0x1136431d4 - sys::thread::thread_start::h3cbfc0fe9ecfb222Kww
25: 0x7fff9bc942fc - _pthread_body
26: 0x7fff9bc94279 - _pthread_body

Running rust --version --verbose gives me this:

rustc 0.13.0-nightly (34d680009 2014-12-22 00:12:47 +0000)
binary: rustc
commit-hash: 34d680009205de2302b902d8f9f5f7ae7a042f1a
commit-date: 2014-12-22 00:12:47 +0000
host: x86_64-apple-darwin
release: 0.13.0-nightly

Note that running rustc without the -g flag compiles without issue.

Issue 2:
src/config.rs:74:9: 74:10 error: internal compiler error: debuginfo::create_for_loop_var_metadata() - Referenced variable location is not an alloca!
src/config.rs:74 for i in range(1u, 10) {

Happens with the latest commit (34d6800)
Issue 1:
I would like to do a binary search without having to materialize the array:

I would prefer not to build the array, because my function is not i->i^2 but expensive to calculate.

searchsortedfirst([i^2 for i in 1:10], 25) # is working
searchsortedfirst((i^2 for i in 1:10), 25) # no method
searchsortedfirst(1:10, 25, by=i->i^2) # does not what I had expected

It looks like an implementation error, that the by=transform is applied to the value to compare with.

There are at least 2 arguments against the current implementation:

It forces the user to pre-calculate an abstract vector with the transformed values

the transform of the comparison value is performed as many times as comparisons are made in the algorithm

the documentation does not suggest, that the comparison value is treated this way

Issue 2:
Consider this:

using Base.Dates: Second

immutable tsp # time series point
t :: DateTime
y :: Float64
end

t0 = now()
S = [tsp(t0+Second(10), 42), tsp(t0+Second(13), -1), tsp(t0+Second(17), 31)]

searchsortedfirst(S, t0+Second(12), by=x -> x.t)
searchsortedfirst(S, tsp(t0+Second(12), NaN), by=x -> x.t)

The first search call fails and the second is not ideal because one has to use a dummy value (NaN here) to fill in the parts of the item being searched that are not part of the key. I think that in searchsortedfirst(S, x, by=f) it would make more sense to apply f() to the items of S but not to the item x. If the searchsorted functions worked like that, then the current behavior is easily obtained by using searchsortedfirst(S, f(x), by=f). Inversion of f() is not necessarily as easy.
Issue 1:
by euug3576:

What steps will reproduce the problem?
1. download the attached test program
2. obtain a relatively large zip file (e.g.
http://www.xmind.net/xmind/downloads/xmind-portable-3.2.1.201011212218.zip)
3. run 8g ziptest.go && 8l -o ziptest ziptest.8 && ./ziptest
~/downloads/xmind-portable-3.2.1.201011212218.zip

What is the expected output?
program should loop forever with stable memory usage

What do you see instead?
after about 30 seconds:

runtime: memory allocated by OS not in usable range
runtime: memory allocated by OS not in usable range
runtime: out of memory: cannot allocate 524288-byte block (536870912 in use)
throw: out of memory

goroutine 1 [running]:
bytes.(*Buffer).ReadFrom(0x384f90c0, 0x18616da0, 0x384ee140, 0x3fe00, 0x0, ...)
/home/Downloads/go/src/pkg/bytes/buffer.go:137 +0x2f0
io.Copy(0x18616d80, 0x384f90c0, 0x18616da0, 0x384ee140, 0x0, ...)
/home/Downloads/go/src/pkg/io/io.go:328 +0x86
main.main()
/home/programs/go-fuse/ziptest.go:27 +0x1a7

Which compiler are you using (5g, 6g, 8g, gccgo)?
8g

Which operating system are you using?
Ubuntu 11.10 (32-bit)

Which revision are you using? (hg identify)
82fdc445f2ff weekly.2011-12-14
also tested on 09e6b7463474 tip

Please provide any additional information below.

Attachments:

ziptest.go (685 bytes)

Issue 2:
When cgo is used to compile objective-C code (see also CL 4476049), the resulting
objects cannot be linked.
I get errors like this:

_test/tst-go.nowhere.com/tst.a(tst.cgo2.o)(__DATA/__objc_classrefs): unhandled
relocation for OBJC_CLASS_$_NSApplication (type 20 rtype 120)

Given that it is necessary to use Objective-C to interact with much of the Mac OS system
functionality (e.g. graphics), it would be nice to be able to fix this.

Attached is a package that demonstrates the problem (gotest to try).

6g darwin 502384dd99e8+ tip

Attachments:

tstcgo.zip (788 bytes)
Issue 1:
[Enter steps to reproduce below:]

open $file in atom

delete $file

Atom Version: 0.199.0-f48351e

System: linux 3.13.0-52-generic (Ubuntu 14.04)

Thrown From: Atom Core

Stack Trace

Uncaught Error: ENOENT: no such file or directory, open $deletedFIle

At events.js:141

Error: ENOENT: no such file or directory, open $deletedFIle
at Error (native)

Commands

-4:48.9.0 editor:move-to-end-of-screen-line (atom-text-editor.editor.is-focused.autocomplete-active)
-4:47.5.0 core:save (atom-text-editor.editor.is-focused)
-4:08.9.0 core:cut (atom-text-editor.editor.is-focused)
-4:08.6.0 editor:delete-line (atom-text-editor.editor.is-focused)
-4:07.4.0 core:backspace (atom-text-editor.editor.is-focused)
-4:05.1.0 editor:newline (atom-text-editor.editor.is-focused)
-4:04.8.0 core:paste (atom-text-editor.editor.is-focused)
-4:02.9.0 editor:move-to-beginning-of-word (atom-text-editor.editor.is-focused)
-4:02.3.0 editor:move-to-first-character-of-line (atom-text-editor.editor.is-focused)
-3:59.5.0 editor:move-to-end-of-screen-line (atom-text-editor.editor.is-focused)
3x -3:57.7.0 core:save (atom-text-editor.editor.is-focused)
3x -1:17.8.0 core:copy (atom-text-editor.editor.is-focused)
-1:15.5.0 core:paste (atom-text-editor.editor.is-focused)
2x -1:14.1.0 core:save (atom-text-editor.editor.is-focused)
-0:05.2.0 core:move-right (atom-text-editor.editor.is-focused)
-0:04.4.0 core:save (atom-text-editor.editor.is-focused)

Config

{
"core": {
"projectHome": "/home/thomas/ws",
"disabledPackages": [
"tree-view",
"background-tips"
],
"audioBeep": false
},
"editor": {
"fontFamily": "Source Code Pro Medium",
"fontSize": 14,
"invisibles": {}
}
}

Installed Packages

# User
editorconfig, v1.0.0

# Dev
No dev packages

Issue 2:
Some repro steps that I gathered from the existing issues:

Have a file open in branch something that doesn't exist in branch atom

git checkout atom

ENOENT 💥

OR

Have a file open in Atom that will be affected by git rebase

git rebase

ENOENT 👎

OR

Just simply rename a file outside of Atom that's currently open inside of Atom.
Issue 1:
For example, we have an input tensor shape (50,256,256,1), where 50 is the number of images (depth), height and width of each image is 256 and the number of channel is 1.

Then what is the difference between the following two operations?

model = Conv3D(32, (3, 3, 3), strides = 1, padding = 'same', data_format = 'channels_first')

model = Conv3D(32, (3, 3, 3), strides = 1, padding = 'same', data_format = 'channels_last')

My doubt is, if we take channel_first. Then applying 3x3x3 convolution would extract temporal information or not? Whether it would behave like a 2D convolution? (if yes, then what is the use of the 3rd dimension in con3D).

Also, what is the exact padding scheme used when we set padding='same'. Is it zero padding?, one padding?, or data duplication?

Issue 2:
We are trying to make all the files in the codebase have a line lenght below 85. This has been done to nearly all files. Just five are not done yet:

keras/backend/cntk_backend.py

keras/backend/common.py

keras/backend/tensorflow_backend.py

keras/backend/theano_backend.py

tests/keras/backend/backend_test.py

If you want to take up this issue, please make one Pull request per file (you don't have to do all five pull requests at once). And once the lines are shorter for one file, you can remove the corresponding exception in the https://github.com/keras-team/keras/blob/master/pytest.ini to enable the tests.
Issue 1:
Migrated issue, originally created by Anonymous

When attempting to autoload a table in an MSSQL database, the ForeignKey.references() method doesn't correctly match the table name in the metadata, and fails to match. See the attached test case.

Note that this situation arises in a real-world scenario where a given schema is created on both Oracle, Postgres, and MSSQL using another product. Oracle and Postgres throw away the case, but MSSQL preserves it, so changing the Table definitions to match the MSSQL case doesn't fix the problem because it breaks when connecting to the Oracle and Postgres instances.

I imagine this problem could be resolved a couple of ways:

When a table is autoloaded (from any dialect), copy the name of the table as the database knows it into the .name property of the table. It's possible this will break other things including 3rd-party implementations.

Require the each dialect provide a method used to compare table names... and use that in ForeignKey.references(). I notice there is already significant case handling in the MSSQL dialect. Perhaps this can be extended to address this issue.

I also suspect there may be another approach that is more appropriate. If there is a user-side suggestion, that would be appreciated as well.

I have considered a work-around whereby I use engine.get_tables() to determine the table names before declaring the Table objects, but I would rather address this from the core issue first, if appropriate.

Attachments: autoload_case_sensitive.py | 1012_reload.py

Issue 2:
Please add support for spatial data types as well as spatial indices for all RDBMS. Not having those data types limits utility. Especially for mobile apps.
Issue 1:
Challenge http://freecodecamp.com/challenges/waypoint-comment-your-javascript-code.

The regex used in the test won't match comments of the form

/*
multiple line comment
*/

Issue 2:
Challenge http://www.freecodecamp.com/challenges/waypoint-comment-your-javascript-code has an issue. Please describe how to reproduce it, and include links to screenshots if possible.

Left side error checking seems wrong
Issue 1:
If you have a Material that simply changes its position within a list and if it has an ongoing InkSplash animation, the splash will be disposed of.

Issue 2:
Phone auth support would be great inclusion, lately its one of the quickest sign process in mobile app development

Text below picked from this page https://firebase.google.com/products/auth/ linked in the plugin's page

Firebase Authentication aims to make building secure authentication system easy, while improving the sign-in and onboarding experience for end users. It provides an end-to-end identity solution, supporting Email/password accounts, phone auth, Google, Twitter, Facebook, GitHub login and more.
Issue 1:
Migrated issue, originally created by Nagaraj Tantri

Hi,

I had a scenario where I would treat a custom column as unix date time and convert it to the required output via:

literal_column("date_format(from_unixtime(ts), '%Y-%m-%d'"))

But that is getting converted to:

WHERE date_format(from_unixtime(ts), '%%Y-%%m-%%d')
>= '1916-07-04 15:10:18.000000'

I tried looking into other examples to escape the same and also tried to use bindparam but was in no success.

Could anyone point me the actual solution to get it as:

WHERE date_format(from_unixtime(ts), '%Y-%m-%d')
>= '1916-07-04 15:10:18.000000'

Issue 2:
Migrated issue, originally created by Michael Bayer (@zzzeek)

Currently, literal_column() doubles up percent signs as the base compiler.py level, which is inconsistent with the behavior of text() and column(), which both do it at the per-dialect level. But also, at the per-dialect level, the mysqldb and psycopg2 compilers hardcode this behavior in two separate places for text(), column(), and the modulus operator.

doubling of percents should be done based on paramstyle alone and can be done by default in the base compiler. literal_column() should not unconditionaly double percents as this is legacy behavior.
Issue 1:
Chris Beams opened SPR-8179 and commented

Spring 3.1 eliminates the use of xsd:ID typing, minimizing the utility of idref and local.

Sub-tasks:

#12831 Test idref/local checks by container

#12832 Consider pruning 'idref' and 'local' from spring-beans-3.1.xsd

#12833 Update reference documentation regarding idref and local

Issue Links:

#12711 Decide what to do with 'local' attribute in beans: namespace ("is duplicated by")

#8731 Add external-ref and local-ref to DTD/XSD

#6579 XML simplification for property tag with nested ref-local tag

#7133 Allow short-form "idref" properties in addition to "ref"

#7189 Allow to set property value to id of bean

#7719 idref could contain a app context scope to prevent from going to parent bean factory

Issue 2:
Damir Murat opened SPR-542 and commented

Hi,

Is it possible to add property editor support for indexed and mapped

properties specified through <value> element in configuration? I.e.

if one have configuration like this

<bean id="MyBean" class="testing.MyBean">

<property name="myList">

<list>

<value>10</value>

<value>testing.MyBean</value>

</list>

</property>

</bean>

than all elements in list will be String instances. I will like a

mechanism here which enables specification of list type, which will

result in usage of registered property editors. This type can maybe

be specified as an attribute of value element (i.e.

<value type="java.lang.Long">10</value>) or maybe as a special prefix

of concrete value (i.e. <value>(java.lang.Long)10</value>). I am

aware that above example can be configured differently to achieve

same result (using factory class and method as one possibility) but

it seems to me that usage of property editors will be more elegant.

Of course, such functionally maybe already exists in Spring, but

I'm not aware of it and couldn't find any reference to it (including

asking on forums). If this is the case, any help will be great.

Thanks,

Damir Murat

Affects: 1.1.3

Issue Links:

#5327 use property editors for value elements in lists and maps ("is duplicated by")