WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Body

issue is described in PR #25705

the author of the PR abandon it so anyone can try to submit a fix to the issue.

Committer

I acknowledge that I am a maintainer/committer of the Apache Airflow project.

Issue 2:
Apache Airflow version

2.5.0

What happened

While creating SFTP sensor I have tried to find a file under directory. But I was getting error as Time Out, not found.

So after debugging code found that there is a issue with poke function.

As after getting matched file we are trying to find last modified time of the file using self.hook.get_mod_time which take full path (path + filename) and we are giving only filename as arguments.

What you think should happen instead

I have solved that issue by adding path with filename and then calling self.hook.get_mod_time function.

Here is modified code,

def poke(self, context: Context) -> bool:
self.hook = SFTPHook(self.sftp_conn_id)
self.log.info("Poking for %s, with pattern %s", self.path, self.file_pattern)

if self.file_pattern:
file_from_pattern = self.hook.get_file_by_pattern(self.path, self.file_pattern)
if file_from_pattern:
'''actual_file_to_check = file_from_pattern'''
actual_file_to_check = self.path + file_from_pattern
else:
return False
else:
actual_file_to_check = self.path

try:
mod_time = self.hook.get_mod_time(actual_file_to_check)
self.log.info("Found File %s last modified: %s", str(actual_file_to_check), str(mod_time))
except OSError as e:
if e.errno != SFTP_NO_SUCH_FILE:
raise e
return False
self.hook.close_conn()
if self.newer_than:
_mod_time = convert_to_utc(datetime.strptime(mod_time, "%Y%m%d%H%M%S"))
_newer_than = convert_to_utc(self.newer_than)
return _newer_than <= _mod_time
else:
return True

How to reproduce

You can get same issue by creating a DAG as mentioned

with DAG(
dag_id='sftp_sensor_dag',
max_active_runs=1,
default_args=default_args,
) as dag:
file_sensing_task = SFTPSensor(
task_id='sensor_for_file',
path= "Weekly/11/",
file_pattern = "*pdf*,
sftp_conn_id='sftp_hook_conn',
poke_interval=30
)

Operating System

Microsoft Windows [Version 10.0.19044.2251]

Versions of Apache Airflow Providers

No response

Deployment

Docker-Compose

Deployment details

No response

Anything else

No response

Are you willing to submit PR?

Yes I am willing to submit a PR!

Code of Conduct

I agree to follow this project's Code of Conduct
Issue 1:
Here is a test-case, where I expect the results to always be the same, but they are not.

import numpy as np
dtype=object

print("[[0]] = array-like")
A = np.zeros(2, dtype=dtype)
A[[0]] = [[1,2,3,4]]
print(A)

print("[[0]] = ndarray")
B = np.zeros(2, dtype=dtype)
B[[0]] = np.array([[1,2,3,4]])
print(B)

print("[[T,F]] = array-like")
C = np.zeros(2, dtype=dtype)
C[np.array([True, False])] = [[1,2,3,4]]
print(C)

print("[[T,F]] = ndarray")
D = np.zeros(2, dtype=dtype)
D[np.array([True, False])] = np.array([[1,2,3,4]])
print(D)

print("[0] = array-like")
E = np.zeros(2, dtype=dtype)
E[0] = [1,2,3,4]
print(E)

To be clear, I expected the result to always be [ [1,2,3,4], 0].

The results in 1.8 are different, but also wrong.

A probably related bug: when using dtype=int, then I would expect all the calls to trigger an error message, but they do not.

Tested on both 1.9.2 and current master.

Issue 2:
Usual assignment and now also advanced indexing assignments allow trailing ones in the values array such as:

np.arange(10)[:] = np.ones((1, 1, 1, 10))

However boolean indexing does not have any logic in place to ignore these.

Also for object assignments view based assignments (and now also advanced indexing assignments through a temporary step) have some extra logic to allow sequences:

In [6]: a = np.zeros(3, dtype=object)

In [7]: a[:] = [(1, 2), (2, 3), (3, 4)]

In [8]: a
Out[8]: array([(1, 2), (2, 3), (3, 4)], dtype=object)

In [9]: a[np.array([True, True, True])] = [(1, 2), (2, 3), (3, 4)]
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-9-361179bc09da> in <module>()
----> 1 a[np.array([True, True, True])] = [(1, 2), (2, 3), (3, 4)]

TypeError: NumPy boolean array indexing assignment requires a 0 or 1-dimensional input, input has 2 dimensions

In [10]: a[[0, 1, 2]] = [(1, 2), (2, 3), (3, 4)]
Issue 1:
Opening files compressed with UglifyJS or YUI compressor, which put everything on 1 line, can take seconds, even for small files (<100kb). Pasting a line like that into an already open file can also freeze things up. I guess syntax highlighting might have a problem dealing with the long lines.

If it's the syntax highlighting, perhaps that can kick in later so the file can at least be displayed within a reasonable time? Maybe it's a more fundamental problem. It just doesn't feel right to wait around 4 seconds for a 100kb file to load.

Issue 2:
May be a known issue, but files with large embedded images such as github's public/enterprise/maintenance.html will often cause Atom to freeze (MacVim actually struggles as well).

Seems some of them (github's public/maintenance.html for instance) work fine when in soft wrap mode, or until you move your cursor to the long line when out of soft wrap.
Issue 1:
Was working on trying to inherit from a trait with a <'self> lifetime parameter, like so:

trait A<'self> { fn foo(&self) -> &'self str; } trait B : A { fn bar(&self); }

and was getting this compile error:

error: Illegal anonymous lifetime: anonymous lifetimes are not permitted here
trait A<'self> { fn foo(&self) -> &'self str; } trait B : A { fn bar(&self); }
^~
aborting due to previous error

So I thought maybe I could just annotate the inherited trait with the lifetime:

trait A<'self> { fn foo(&self) -> &'self str; } trait B<'self> : A<'self> { fn bar(&self); }

which produced this ice:

task <unnamed> failed at 'region parameterization should have inferred that this type is RP', /home/rustbuild/src/rust-buildbot/slave/snap3-linux/build/src/librustc/middle/typeck/rscope.rs:238
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug
note: try running with RUST_LOG=rustc=1,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues
task <unnamed> failed at 'explicit failure', /home/rustbuild/src/rust-buildbot/slave/snap3-linux/build/src/librustc/rustc.rs:371
make: *** [x86_64-unknown-linux-gnu/stage0/lib/rustc/x86_64-unknown-linux-gnu/lib/libstd.so] Error 101

AFAICT, it's putting <'self> on A when declaring B is what's causing the ICE.

Issue 2:
sample code:

trait Tr<'self> {
fn f(&self) -> &'self int;
}

fn g<T: Tr<'self>>() {}

fn main() {}

rustc ICE:

rust: task failed at 'region parameterization should have inferred that this type is RP', [...]/rust/src/librustc/middle/typeck/rscope.rs:230
Issue 1:
Sorting on documents that are missing a key would be very helpful, partially matching the api for sorting numerical values. For example:

{
"sort" : [
{ "user" : {"missing" : "_last"} },
],
"query" : {
"term" : { "user" : "kimchy" }
}

{
"sort" : [
{ "user" : {"missing" : "_last"} },
],
"query" : {
"term" : { "user" : "kimchy" }
}

Unfortunately we can't use this pattern for custom values. To support that, we'll need a sub-object:

{
"sort" : [
{ "user" : {"missing" : { "order": "_first"} } },
],
"query" : {
"term" : { "user" : "kimchy" }
}

{
"sort" : [
{ "user" : {"missing" : { "order": "_last"} } },
],
"query" : {
"term" : { "user" : "kimchy" }
}

{
"sort" : [
{ "user" : {"missing" : { "value": "nobody"} } },
],
"query" : {
"term" : { "user" : "kimchy" }
}

Issue 2:
This is a follow up to #772 that supports special sorting for 'null' values for numeric fields. The same would be very useful for (not analyzed) string fields as well. If feasible, special handling for empty and blank strings would be useful. The latter is however optional as it is possible to achieve uniform handling by filtering out blank values at indexing time.
Issue 1:
As requested here I'm filing a bug report for the following test case:

$ cat hosts

---
- group: all
hosts:
- host: 10.120.137.188:23000
- host: 10.120.137.188:23001
$ ansible all -i ./hosts -m shell -a uptime
10.120.137.188:23000 | FAILED => FAILED: [Errno -2] Name or service not known
10.120.137.188:23001 | FAILED => FAILED: [Errno -2] Name or service not known

Issue 2:
Ansible: devel, r404c3acbbf5ed3f2f6a5a2f64cc230cd22317e15

OS: Ubuntu 12.04

Python: 2.7.3

When a host is listed both "globally" and within a group, e.g.

10.0.3.232 foo=bar

[example]
10.0.3.232

[example:vars]
domain=example.com

The 'setup' command lists it only as belonging to "ungrouped" and ignores any group vars:

"foo": "bar",
"group_names": "[ungrouped]",
"inventory_hostname": "10.0.3.232",
Issue 1:
column ordering is not stacking correctly in portrait view. see above image. tested on tablet and desktop.

not sure if this is a general css bug or just specific to the RC1 website?

Issue 2:
<div class="container">
<div id="teaser" class="row">
adsffdasdf
</div>

<div id="main" class="row">

<div class="col-lg-9 col-push-3">
asdfsdaf

</div>

<div class="col-lg-3 col-pull-9">
asdffaf

</div>
</div>
</div>

output on smaller resolution, see attached screenshot
Issue 1:
It doesn't seem possible to compile and output to stdout. There was some discussion on CodePlex before the migration to github: https://typescript.codeplex.com/workitem/600

Issue 2:
The compiler incorrectly reports a parameter/call target signature mismatch when using the spread operator. Pasting this code into the TypeScript Playground:

function foo(x: number, y: number, z: number) { }
var args = [0, 1, 2];
foo(...args);

produces this error:

Supplied parameters do not match any signature of call target.
Issue 1:
Note that this is my understanding, please correct me if I'm wrong.

Currently when conhost acts as bridge between kernel and terminal (is in vt mode), both conhost and terminal have a TextBuffer. If there is an API call from app, then conhost executes it as it used to in window mode, possibly altering buffer, but instead of displaying the changes in the window it sends them to terminal via text/vt sequence.

While being niffty idea to reuse much code and clever use of polymorphism, I don't think it works so well:

It requires both buffers and other data to be kept in sync.

When one buffer changes, the other loses context of that change. E.g. when there is a resize (the issue I'm currently most concerned about.), the other buffer deletes its content and writes it anew, which prevents it from keeping track of the character position transitions. And this is very complicated and apparently error prone (#1465).

If it's not slow, at least it seems to be. Don't show it to linux users.

So I suggest that conhost should translate API calls directly to text/vt. I also summize that this was the first obvious idea, but then something... something I'd like to know and potentially conquer.

There are problematic API calls that don't have correspondig vt sequence. Like ReadConsoleOutput - it clearly has to access the buffer. So there should be another way of IPC between terminal and conhost, besides the two text/vt pipes. But it would need to be anyway and right now it even exists - signal pipe that currently only sends one type of message: resize event. For performace reasons conhost would probably still cache some data, but not entire text buffer.

Maybe buffer could be in shared memory with access from both terminal and conhost?

Let's discuss the issues which led us to current design and prevent from the one above. If it is still beneficial, at least leave some spec about this and someone from community 'd be likely to implemement it.

Issue 2:
Environment

Windows build number: [Version 10.0.18362.239]
Windows Terminal version (if applicable): 0.3.2142.0

Steps to reproduce

Pressing AltGR + 2/3/4/7/8/9/0/+ (number row) - and possibly other key combinations requiring AltGR does not seem to bite on the terminal. For instance, getting the "at" sign "@", we usually press AltGR+2 or CTRL+ALT+2 to write it, but terminal does not recognise both of these ways.

Expected behavior

I was hoping to print out special letters very often needed in the terminal.

Actual behavior

Nothing happens, nothing shows up, not even prints of weird character codes. Just no response.
Issue 1:
Window is not defined every time npm install reactjs modules

window is not defined after install react-chat-widget or any others reactjs modules

Error of Window is not defined when import react modules

when i import the module as picture below:

import module

use module into render function

next.config.js with zeit/next-css npm package

package.json

Step to get error

Steps to produce the error after install react modules:

Open cmd as administration

run "yarn run dev"

localhost:3000 started

open chrome browser, refresh

Unhandled Rejection (ReferenceError): window is not defined

Expected behavior

I expect react-chat-widget it can do like this as picture below after installed module:

Screenshots of Error shows in browser after run it

System information

OS: Windows

chrome

Version of Next.js: [e.g. 7.0.2]

Issue 2:
Now some of us ships NPM packages (specially components) written in ES2015 without transpiling them.

That's a pretty good thing specially if they are gonna used in a project like Next.js or CRA (which does transpiling). They offer benefits like:

No need to transpile before shipping to NPM

Get the benefit of Webpack 2's tree-shaking

But we can't do this now we exclude everything inside node_modules from babel transpiling.

So, here's the proposed solution.

We have an entry in next.config.js to include modules which needs to go through babel. See:

module.exports = {
transpileModules: [
"my-component",
"redux/src"
]
}
Issue 1:
Torsten Krah opened SPR-8674 and commented

Please look at the attached Testcase. Conversion does work for String -> Set in 3.0.5 but fails in 3.0.6. Elements are converted to the collection type rather than their Collections elements type.

The revision and bug which causes this is mentioned in the forum thread.

Affects: 3.0.6

Reference URL: http://forum.springsource.org/showthread.php?113783-TypeConverterDelegate-change-in-3.0.6-has-broken-my-CustomCollectionEditor-bindings

Attachments:

Test.java (2.02 kB)

Issue Links:

#13307 Did spring framework 3.0.6 break property editor support for List's? If so, here's a new bug that was created. ("is duplicated by")

#13356 3.0.6 Map to Map conversion shallow copying maps causing unexpected results on upgrade from 3.0.5

Referenced from: commits 836e3c9, 33b53b7, 94513c1

1 votes, 3 watchers

Issue 2:
Jeremy Grelle opened SPR-7400 and commented

Building on the newly added ResourceHttpRequestHandler, the following advance features should be re-considered:

Minification should be applied to text-based resources where possible e.g. .js (should be possible to disable)

Resource bundling should be supported. This provides the ability to load multiple resources in one HTTP request, which can improve performance.

Resource versioning should be supported. This causes clients to refresh cached resources when a new version of the application is deployed. This prevents clients from working with stale content after deployment of a new version. (should be possible to disable, when disabled no caching should be performed)

The ability to serve GZip compressed resources should be further expanded to consider disk-cached pre-compressed versions of the resources

Affects: 3.0.4

Sub-tasks:

#11800 Add support for versioning resources

#12059 Add support for caching of compressed resources

#12060 Add support for versioning resources

Issue Links:

#11776 Add ResourceHttpRequestHandler for efficiently serving static resouces ("depends on")

#15561 Enhance ResourceHttpRequestHandler with ResourceResolver strategy ("duplicates")

4 votes, 8 watchers
Issue 1:
The following code:

@functools.partial(jax.custom_vjp, nondiff_argnums=(1,))
def _precise_mean(x, axis):
with jax.experimental.enable_x64():
return jnp.mean(x.astype("float64"), axis=axis).astype(x.dtype)

def _precise_mean_fwd(x, axis):
return _precise_mean(x, axis), (x,)

def _precise_mean_bwd(axis, res, g):
x, = res
dims = tuple(i for i in range(x.ndim) if i not in axis)
factor = 1
for a in axis:
factor *= x.shape[a]
g = g / factor
print(g.dtype)
return lax.broadcast_in_dim(g.astype(x.dtype), x.shape, dims),

_precise_mean.defvjp(_precise_mean_fwd, _precise_mean_bwd)

def precise_mean(x, axis=None):
if axis is None:
axis = tuple(range(x.ndim))
elif isinstance(axis, int):
axis = (axis,)
# Take care of negative values
axis = tuple((x.ndim + a) % x.ndim for a in axis)
if not all(isinstance(a, int) for a in axis):
raise ValueError("All axis must be integers.")
return _precise_mean(x, axis)

@jax.jit
def f(x, a, b):
x = jnp.matmul(x, a) + b[None]
y = jnp.sum(x, axis=-1)
return precise_mean(y, axis=0)

x = jnp.ones([5000, 100])
a = jnp.ones([100, 100])
b = jnp.zeros([100])
print(f(x, a, b).dtype)

Throws out the following error:

UnfilteredStackTrace: RuntimeError: Internal: Seen floating point types of different precisions in %reduce.23 = f32[] reduce(f64[5000]{0} %convert.17, f32[] %constant.18), dimensions={0}, to_apply=%primitive_computation_add.19, metadata={op_type="reduce_sum" op_name="jit(f)/custom_vjp_call_jaxpr/reduce_sum[ axes=(0,) ]" source_file="<ipython-input-219-aea426c526ae>" source_line=13}, but mixed precision is disallowed.

Failed after pipeline-start

The stack trace below excludes JAX-internal frames.
The preceding is the original exception that occurred, unmodified.

It is unclear at the moment how to use the enable_x64 contest when using jax.jit.

Issue 2:
minimal repro:

from jax import jit, experimental

@jit
def f(a):
with experimental.enable_x64():
return 1 + a
f(1)

RuntimeError: Invalid argument: Binary op add with different element types: s64[] and s32[].
Issue 1:
Expected Behavior

Use the session.setProxy function of a window to set a user:pass authenticated proxy. Load URL in that window. Expect that app.login event is triggered and request is made.

Actual behavior

Set session proxy to a user:pass authenticated proxy, loadURL requests fail with status "failed" in dev tools. App.login event never called.

To Reproduce

Create a window, use the session setProxy function to set a user:pass authenticated proxy. Then try to load ANY url in that window.

win.webContents.session.setProxy({
proxyRules: `http://user:pass@ip:port`
}, () => {});
}
//Requests fail status "failed"
win.loadURL('https://whatismyipaddress.com');
//This is NOT reached
app.on('login', function (event, request, authInfo, callback) {
if (authInfo.isProxy) {
log.info(`HI ${JSON.stringify(authInfo)}`)
// callback('username', 'password');
}
})

Working code with IP authenticated proxies

win.webContents.session.setProxy({
proxyRules: `http://ip:port`
}, () => {});
}
//Requests succeed
win.loadURL('https://whatismyipaddress.com');
//This is reached
app.on('login', function (event, request, authInfo, callback) {
if (authInfo.isProxy) {
log.info(`HI ${JSON.stringify(authInfo)}`)
// callback('username', 'password');
}
})

This code is working for me with IP authenticated proxies. App.login is triggered and the request completes as expected. Just user:pass proxies that are the issue.

When opening chrome dev tools I can see the requests being attempted and returning status "failed".

Additional Information

I opened this issue and it was closed, marked as a duplicate of #12443

This is a different case and not a duplicate. Please do not close this! Thank you.

edited

Electron version :2.0.1

Platform: MacOS High Sierra 10.13.3

Issue 2:
Preflight Checklist

I have read the Contributing Guidelines for this project.

I agree to follow the Code of Conduct that this project adheres to.

I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

Electron Version:

7.0.0

Operating System:

macOS

Last Known Working Electron version:

6.1.2

Expected Behavior

https://github.com/electron/electron/blob/v7.0.0/docs/api/web-contents.md#event-login triggered

Actual Behavior

login event not triggered

To Reproduce

run following code

const {app, BrowserWindow} = require('electron')
app.once('ready', async () => {
win = new BrowserWindow()
app.on('login', console.log)
win.webContents.on('login', console.log)
win.webContents.once('did-finish-load', async () => {
const html = await win.webContents.executeJavaScript('document.documentElement.innerHTML')
console.log(html)
app.quit()
})
await win.webContents.loadURL('https://httpbin.org/basic-auth/user/passwd')
})
Issue 1:
they have plans so that deno can run on arm architectures.

Issue 2:
When attempting to install deno on my Raspberry Pi, I get the following:

$ curl -fsSL https://deno.land/x/install/install.sh | sh -s v0.4.0

Unsuported architecture armv7l. Only x64 binaries are available.

Is support for 32-bit ARM processors something we can eventually expect?
Issue 1:
Migrated issue, originally created by Anonymous

It is possible for a MSSQL connection attached to one database to reference objects in another database by using the objects' full names in the form, <database_name>.<owner_name>.<table_name>. The schema.Table constructor takes a schema argument and an owner argument already. These arguments should be used so that the schema argument takes the place of the database name in the format described above.

So the following table definition:

t = Table('a_table', meta, Column('col1', Integer), Column('col2', Integer), schema='database_name', owner='owner_name')

and select construction:

select(t)

would yield the following SQL when compiled:

SELECT a_table_xxxx.col1, a_table_xxxx.col2

FROM database_name.owner_name.a_table

AS a_table_xxxx

Please find included a simple test case that demonstrates the desired behavior.

Attachments: test_mssql_naming_scheme.py

Issue 2:
Migrated issue, originally created by Anonymous

Please find attached some diffs which go towards supporting multipart schema names. Background discussion can be found on a thread on the sqlalchemy group:

http://groups.google.com/group/sqlalchemy/browse_frm/thread/e34ff8fed2c5be2a

I added a couple of new tests in test/dialect/mssql.py

Attachments: 1341.patch | sa_multipart_schema.patch
Issue 1:
Challenge Waypoint: Use appendTo to Move Elements with jQuery has an issue.

User Agent is: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0.

Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

<script>
$(document).ready(function() {
$("#target1").css("color", "red");
$("#target1").prop("disabled", true);
$("#target4").remove();
$("#target2").appendTo("#right-well");

});
</script>

<!-- Only change code above this line. -->

<div class="container-fluid">
<h3 class="text-primary text-center">jQuery Playground</h3>
<div class="row">
<div class="col-xs-6">
<h4>#left-well</h4>
<div class="well" id="left-well">
<button class="btn btn-default target" id="target1">#target1</button>
<button class="btn btn-default target" id="target2">#target2</button>
<button class="btn btn-default target" id="target3">#target3</button>
</div>
</div>
<div class="col-xs-6">
<h4>#right-well</h4>
<div class="well" id="right-well">
<button class="btn btn-default target" id="target4">#target4</button>
<button class="btn btn-default target" id="target5">#target5</button>
<button class="btn btn-default target" id="target6">#target6</button>
</div>
</div>
</div>
</div>

Issue 2:
A bug seems to be present: Chrome 46.0.2490.86 m; Windows 8.1 with respect to appendTo() function.

$("#target2").appendTo($("#right-well")); does work, but not the $("#target2").appendTo("#right-well");, the latter being suggested in the tutorial.

Hard reload and cache clearing did not seem to solve the problem.