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

Incompatible method call to SSL

Steps to Reproduce

Run scrapy

Expected behavior: Loading the tls.py file doesn't crash.

Actual behavior: Loading the tls.py file crashes.

Reproduces how often: 100%

Versions

Scrapy : 2.5.1

lxml : 4.9.1.0

libxml2 : 2.9.14

cssselect : 1.1.0

parsel : 1.6.0

w3lib : 2.0.1

Twisted : 22.8.0

Python : 3.9.14 (main, Sep 6 2022, 23:29:09) - [Clang 13.1.6 (clang-1316.0.21.2.5)]

pyOpenSSL : 22.1.0 (OpenSSL 3.0.5 5 Jul 2022)

cryptography : 38.0.1

Platform : macOS-12.6-x86_64-i386-64bit

Additional context

File "/Users/nroose/Library/Python/3.9/lib/python/site-packages/scrapy/core/downloader/tls.py", line 23, in

METHOD_SSLv3: SSL.SSLv3_METHOD, # SSL 3 (NOT recommended)

AttributeError: module 'OpenSSL.SSL' has no attribute 'SSLv3_METHOD'

Issue 2:
I am scraping a web page which has fragment identifiers (on the home page) for same page navigation. To make it clear I have this anchor tag <a href="#idx1">1. Histoire</a> and when you click on it you are taken to the 'Histoire' header on the same page. <h2 id="idx1">1. Histoire</h2>.

Scrapy is following this fragment as https://www.mysite.com/#idx1 (or https://www.mysite.com#idx1) and scraping the whole page again. Since this is the home page, it is yielding the same results as if it scraped the home page.

This behavior is not repeated for the rest of the fragment identifiers (I have many more). So for this anchor tag (on the same page) the above scenario is not manifested. <a href="#idx2">2. Idées reçues</a> -> Do not repeat itself for this.

Is this intentional or am I missing something?

import scrapy
from datetime import datetime
from netlinking.items import NetlinkItem
from urllib.parse import urlparse, urlunparse

class NetlinkingSpider(scrapy.Spider):
name = "netlinking"
referent_netloc = ''

def __init__(self, url=None, *args, **kwargs):
super(NetlinkingSpider, self).__init__(*args, **kwargs)
parsed_uri = urlparse(url)
self.referent_netloc = parsed_uri.netloc
self.referent_netloc = self.referent_netloc.replace('www.', '')
self.allowed_domains = [('%s' % self.referent_netloc)]
self.start_urls = [('%s' % url)]

def parse(self, response):
for anchor in response.css('a'):
netlink = NetlinkItem()
netlink['anchor_text'] = anchor.css('a::text').get()
netlink['referent_website'] = response.request.url
netlink['referent_netloc'] = self.referent_netloc
netlink['target_url'] = anchor.css('a::attr(href)').get()

parsed_target_uri = urlparse(netlink['target_url'])
if parsed_target_uri.netloc.strip() \
and (self.referent_netloc !=
parsed_target_uri.netloc.lower().replace('www.', '')):

netlink['target_website'] = \
'{uri.scheme}://{uri.netloc}/'.format(
uri=parsed_target_uri)

netlink['target_netloc'] = '{uri.netloc}'.format(
uri=parsed_target_uri).replace('www.', '')

netlink['timestamp'] = datetime.now().strftime(
"%Y-%m-%d %H:%M:%S")

yield netlink

#Here I am aware that I am following all links but this problem does not repeat for #idx2
for a in response.css('a'):
yield response.follow(a, callback=self.parse)
Issue 1:
Is there any movement on complete migration to AndroidX? So I could turn off jetifier.

Issue 2:
First of all thanks for giving this beautiful library !!!!!!

I am load image from internal memory, i am using the same path for image i will update the image in particular path. If i am fetch the image through glide it return only old image, how can i solve this, my code is

Glide.with(mContext)
.load(path)
.asBitmap()
.animate(R.anim.activity_fade_in)
.placeholder(new AsyncColorDrawable(mResources))
.skipMemoryCache(false)
.diskCacheStrategy(DiskCacheStrategy.ALL)
.override(width, height)
.into(new BitmapImageViewTarget(imageView) {
@Override
public void onResourceReady(Bitmap resource, GlideAnimation<? super Bitmap> glideAnimation) {
super.onResourceReady(resource, glideAnimation);
imageView.setVisibility(View.VISIBLE);
imageView.setScaleX(1);
imageView.setScaleY(1);
}
});
Issue 1:
[Enter steps to reproduce below:]

... Opened big file

... Error Happened

Atom Version: 0.169.0

System: Mac OS X 10.10.1

Thrown From: Atom Core

Stack Trace

Uncaught Error: Atom can only handle files < 2MB for now.

At /Users/Archie/Applications/Atom.app/Contents/Resources/app/src/project.js:355

Error: Atom can only handle files < 2MB for now.
at Project.module.exports.Project.buildBuffer (/Users/Archie/Applications/Atom.app/Contents/Resources/app/src/project.js:355:15)
at Project.module.exports.Project.bufferForPath (/Users/Archie/Applications/Atom.app/Contents/Resources/app/src/project.js:332:63)
at Project.module.exports.Project.open (/Users/Archie/Applications/Atom.app/Contents/Resources/app/src/project.js:286:19)
at Workspace.module.exports.Workspace.openUriInPane (/Users/Archie/Applications/Atom.app/Contents/Resources/app/src/workspace.js:485:29)
at Workspace.module.exports.Workspace.open (/Users/Archie/Applications/Atom.app/Contents/Resources/app/src/workspace.js:412:19)
at Ipc.<anonymous> (/Users/Archie/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:45:32)
at Ipc.emit (events.js:110:17)
at process.<anonymous> (/Users/Archie/Applications/Atom.app/Contents/Resources/atom/renderer/api/lib/ipc.js:22:29)
at process.emit (events.js:118:17)

Commands

Config

{}

Installed Packages

# User
No installed packages

# Dev
No dev packages

Issue 2:
Be in fullscreen

Be in an editor panel (you have a cursor)

M-tab to another app

M-tab back

I expect to have my cursor and be focused on the same pane I was when I left. Instead, focus is lost.
Issue 1:
Version: 1.184.0

OS: OSX

Problem Description: I am using the quick file/folder add feature when I use the file explorer right-click functionality to add a new file. When the dialog appears, if, for any reason, I move away from the app, it disappears. On OSX, this can be if I switch applications, three-finger swipe away, etc. Minor, but annoying from a UX perspective.

Expected: With most other dialogs, the dialog stays around despite loss of focus of the application.

Steps to Reproduce

Right click on a folder that is showing in the file navigator.

Chose New File

Swipe away/switch away from the app.

Dialog is gone.

Issue 2:
Halp reports:

support/a3fbafb2d0c011e3855fe03a98b207e5

support/4068a4a4d08f11e39bd83f5315db0b57

Related Issues

atom-archive/feedback#22

atom/fuzzy-finder#37

If you have opened up the Command Palette (Command-Shift-P) in Atom v.0.92.0, and then switch to another app, say the Mac OS X Terminal app to run something you've been working on, the Command Palette is gone when you switch back (this is also true of this "Send us feedback" drop-down pane). It would be preferable if, on switching back to the Atom app v.0.92.0, that the Command Palette were still open where you left it.

I've noticed this myself, but never fund it particularly annoying. Also, some other dialogs are affected by this as well, such as the fuzzy finder. Unsure if this is something that's handled on a per-package basis or in Atom core, so opened an issue here. 🍕

It seems that SublimeText doesn't have consistent behavior with these dialogs -- the command palette is closed similar to Atom, but the fuzzy finder is not (it stays open even after the app loses focus).
Issue 1:
📝Assign a specific zone for an application window.

What is the expected behavior of the proposed feature? What is the scenario this would be used?

--- Example for this: Set a zone 1 for Google Chrome, set zone 2 for Terminal, zone 3 for document viewer. On opening the specific app, it should always go to the specific zone unless we override it manually by dragging it.

If you'd like to see this feature implemented, add a 👍 reaction to this post.

Issue 2:
PowerToys should do its best to look like a system level integration. PowerRename is great but has a UX that doesn't match the OS. This shift would also allow PowerRename to respect darkmode (#887)

@itsmichaelwest did a great mockup on the Twitters of what it could look like.

During this upgrade, i suggest we shift the UX to WinUI3 as well.
Issue 1:
choices can be a nested array, there is also a group_by option in entity type, those can be used to group entities in HTML optgroup tags, but this only work for select widgets.

Shouldn't this also be applied to checkboxes and radios (with a fieldset and a legend)?

Might help for the use case described in #5286.

Issue 2:
When using "expanded" => true on a choice field that contains groups, the default form theme simply renders all radio buttons/checkboxes sequentially, without headings or any other indication of the group structure (at least under Twig).

From what I can tell, this issue stems from the fact that the choices in an expanded choice field are written directly from the FormView's choices variable, which is structured into groups. By contrast, expanded choice fields are represented using a series of checkbox/radio button fields, which are treated as children of the choice field - the problem being that the children are not arranged in any hierarchical structure.

The FormView for an expanded choice field does still have a choices variable like that of a collapsed choice field, but currently there is no effective way to match up the ChoiceView object with the corresponding child FormView in the template, so rendering the fields from the choices variable as with a collapsed choice field is not a viable option.
Issue 1:
🐛 Bug

max_norm in embedding layer modifies the embedding layer weight in-place which makes it a non-leaf variable. This leads to issues when doing gradient backpropogation.

Error: RuntimeError: leaf variable has been moved into the graph interior

To Reproduce

Script to reproduce the behavior:

import torch
import torch.nn as nn
import numpy as np

class sampleModel(nn.Module):
def __init__(self):
super(sampleModel, self).__init__()
input_layer= nn.Embedding(500, 10, max_norm=1.0)
output_layer = nn.Linear(10, 2)
self.layers = nn.Sequential(input_layer, output_layer)
self.loss_criterion = nn.NLLLoss()

def forward(self, input, labels):
em_x = self.layers[0](input).sum(1)
out = self.layers[1](em_x)
loss = self.loss_criterion(out, labels)
return loss

if __name__ == "__main__":
device = torch.device('cpu')

model = sampleModel().to(device)

data = []
for i in range(0,500):
data.append(np.random.randint(0, 20, size=30))

inputx = torch.LongTensor(data).to(device)
labels = torch.LongTensor( [0]*250 + [1]*250 ).to(device)

loss = model(inputx, labels)
print(loss)
loss.backward()

Stack trace:

File "bug_report_script.py", line 34, in <module>
loss.backward()
File "/data/anaconda/envs/bletchley/lib/python3.6/site-packages/torch/tensor.py", line 118, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph)
File "/data/anaconda/envs/bletchley/lib/python3.6/site-packages/torch/autograd/__init__.py", line 93, in backward
allow_unreachable=True) # allow_unreachable flag
RuntimeError: leaf variable has been moved into the graph interior

Expected behavior

calculating max_norm should not make the embedding layer weight non leaf variable.

Environment

PyTorch version: 1.2.0

Is debug build: No

CUDA used to build PyTorch: 10.0.130

OS: Ubuntu 16.04.6 LTS

GCC version: (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609

CMake version: version 3.5.1

Python version: 3.6

Is CUDA available: Yes

CUDA runtime version: 10.0.130

GPU models and configuration:

GPU 0: Tesla M60

GPU 1: Tesla M60

Nvidia driver version: 410.79

cuDNN version: /usr/lib/x86_64-linux-gnu/libcudnn.so.7.4.2

Versions of relevant libraries:

[pip] numpy==1.17.2

[pip] torch==1.2.0

[pip] torchvision==0.4.0

[conda] torch 1.2.0 pypi_0 pypi

[conda] torchvision 0.4.0 pypi_0 pypi

Additional context

Surprisingly, if the device is set to 'cuda', the script runs without error

cc @ezyang @ssnl @albanD @zou3519 @gqchen

Issue 2:
Hi all,

So there're some great things about PyTorch, but one of the not-great things is that it uses a mostly-but-not-fully different API than the one used for numpy, theano, and tensorflow. I find myself having to consult a lookup-table when I want to run familiar commands.

Are there any plans to make a numpytorch, where the API matches numpy's as closely as possible?

An advantage would be that many functions written for numpy could also be used by pytorch. It would also be nice to be able to call matplotlib functions (plot, imshow, etc) directly with torch variables without having to do any hacking of matplotlib.

cc @ezyang @gchanan @zou3519 @mruberry @rgommers @heitorschueroff
Issue 1:
Version

2.5.16

Reproduction link

https://codepen.io/JosephSilber/pen/KeWjzr

Description

Passing content in a slot causes the component to re-render when the parent re-renders, even if the component's data hasn't changed.

Steps to reproduce

Create a simple component that shows the amount of times it's been rendered:

Vue.component('times-rendered', {
created() {
this.timesRendered = 0
},
render(h) {
return h('div', `Times rendered: ${++this.timesRendered}`)
}
});

Use this component twice. Once with content in the default slot, once without. After the component is mounted, trigger any update to its data:

<template>
<div>
<div>{{ updateTrigger }}</div>
<times-rendered></times-rendered>
<times-rendered>
Any content in the default slot causes a re-render. Why?
</times-rendered>
</div>
</template>

<script>
export default {
data: () => ({ updateTrigger: false }),

async mounted() {
await this.$nextTick()

this.updateTrigger = true
},
};
</script>

What is expected?

I would expect each instance of the component to only render once.

What is actually happening?

The component with content in the slot renders twice.

I'm not actually sure whether this is a bug or a feature request. Maybe this is expected behavior currently. If it is, then I guess this would be better classified as a feature request.

Issue 2:
What problem does this feature solve?

I have developed some components that can generate large amounts of HTML, and allow content to be added via slot. It appears that if the slot content is updated, the render function is called for the component; however, this seems like something that could be avoided through optimization which would significantly improve the performance of my component in some instances.

Is this possible?

What does the proposed API look like?

Not proposing API changes.
Issue 1:
Say I want to write code for io.js, and I want to use ES6 generators. But I also want to use some other features that io.js doesn't support yet, like rest parameters and destructuring assignments. Enter Babel.

Is there some way I can use Babel to compile my code, but tell it not to compile the generators, just leave them as they are? This way my app would be running real generators natively – the benefits of which are (1) it should be faster, (2) no regenerator/runtime dep, (3) compiled code is more readable, (4) stack traces would be clearer.

It would be awesome if there was a way to tell Babel exactly which platform I'm targeting, and it would do only the minimal transformations needed to compile down my ES.next source code for that particular platform, based on knowledge from the compatibility table.

Issue 2:
Possibly through a blacklistUserAgent option or something. Would use the kangax compat-table. Important to note that it does not guarantee complete spec compliancy on the vendors end.

References:

https://github.com/kangax/compat-table

https://github.com/Fyrd/caniuse

https://github.com/3rd-Eden/useragent
Issue 1:
I have seen that you close another issue related to this one about including prompt as an option inside your API to show dialog. I don't know why is the reason to discard this basic function, but I think you should reconsider it because it's a basic feature that make you discard this API or use different API to fulfill your needs.

Please, introduce an option to prompt a value to the user in the dialog API.

Thx,

Issue 2:
What is the reason that prompt is not supported?

How could input box be created?

I see that prompt could be almost like confirm:

window.confirm = (message, title='') ->
remote = require 'remote'
dialog = remote.require 'dialog'
buttons = ['OK', 'Cancel']
not dialog.showMessageBox remote.getCurrentWindow(), {message, title, buttons}

Here is possible solution.
Issue 1:
https://github.com/facebook/flow

Many of us prefer Flow syntax over Typescript

Issue 2:
For tracking purposes, please don't work on this without discussing with Ry or myself.

Having a public API that is similar to how we perform TypeScript compilation is a good idea. It would allow JS->JS transpilation (e.g. those who need Babel custom plugins or Flow) or other languages (e.g. CoffeeScript).

Related to #1738 and some other work in rationalising the compiler APIs internally, but we should be able to support loading a compiler in a web worker and instructing the privileged side what resources should be sent to that runtime compiler.
Issue 1:
I'm using the following navigation bar:

<div class="navbar navbar-inverse navbar-static-top">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">REALLY BAD!</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<li class="active"><a href="#">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#contact">Contact</a></li>
<li><button class="btn navbar-btn">A</button></li>
</ul>
</div><!--/.nav-collapse -->
</div>

see http://bootply.com/101299 for more examples and my proposed fix.

(Note that this was generated using the Bootply template "Basic starter", and removing the container around the divs. (also see http://getbootstrap.com/components/#navbar-default ). My example only differs from the documentation example by using navbar-static-top.

The error is caused by a negative margin-right for the last ul in the bar. This makes sense if there is container, but none, if there is none (we would need a positive margin instead).

I propose setting this margin only if there is a container in the nav (which could be done by adding a simple .container in the corresponding rule).

Is this a bug or am I doing something wrong here?

Issue 2:
The navbar right padding is broken when using navbar-fixed-top with Bootstrap 3.0.3.

Was working fine with Bootstrap 3.0.2.

navbar-static-top and navbar-fixed-bottom are probably impacted too.

Live example: http://plnkr.co/edit/zn1Pc0?p=preview

With navbar-fixed-top:

Without navbar-fixed-top:

The issue is most probably related to this commit: 5a03655

Version 3.0.3 contains the following code:

// Undo the collapse side padding for navbars with containers to ensure
// alignment of right-aligned contents.
.navbar-fixed-top &,
.navbar-static-top &,
.navbar-fixed-bottom & {
padding-left: 0;
padding-right: 0;
}

3.0.2 does not.
Issue 1:
Description of the problem

Hi there,

I am currently using WebWorkers to generate large Float32Array's (size about 128000) and pass them back to the DOM-thread where they are sliced into smaller pieces and set in several different position-attribute-buffers.

I only need Two-Dimensional coordiinates X and Y for this and Z is always 0.

So I created the attribute liike this:

// position attribute (2 vertices per point)
geometry.setAttribute('position', new THREE.BufferAttribute(new Float32Array(mySize * 2), 2));

instead of this:

// position attribute (3 vertices per point)
geometry.setAttribute('position', new THREE.BufferAttribute(new Float32Array(mySize * 3), 3));

I did this in order to save some overhead (Z) when passing the data from the worker.

Otherwise I would have to process the array manually, which is not really efficient.

Using 2 vertices per point seems to work as intended, BUT in my case the console it's printing more than 200 of these INFO messages:

[0625/160435.634:INFO:CONSOLE(541)] "THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.", source: file:///D:/#####/js/three.min.js (541)

Since this is blowing up the log files, I didn't find a way to disable it and it seems to work as intended otherwise, I was wondering if this message could be removed.

Here is a short fiddle of this: https://jsfiddle.net/th2zvr9p/

Notice how it works the same for either "dimensions" 2 or 3, but it prints the error when using dimension 2.

This might be related? #13713

I'd be glad to provide more help and infos :)

Three.js version

Dev

Latest

...

Browser

All of them

Chrome (& Engine Framework), but probably all of them are affected?

Firefox

Internet Explorer

OS

All of them

Windows

macOS

Linux

Android

iOS

Hardware Requirements (graphics card, VR Device, ...)

Got a 1080ti, but dont think that matters.

Issue 2:
For geometries with vec2 positions, the computeBoundingSphere will not work correctly since it always assumes vec3s.

three.js/src/core/BufferGeometry.js

Lines 327 to 332
in
f73593b

for ( var i = 0, il = positions.length; i < il; i += 3 ) {

vector.set( positions[ i ], positions[ i + 1 ], positions[ i + 2 ] );

box.expandByPoint( vector );

}
Issue 1:
As an exercise, I am currently transforming some class components into FunctionComponent, using the new hook style. But I faced a strange problem: class components can render undefined (and so, will not display anything), stateless function components can render undefined, but if we need the new FunctionComponent to render nothing, it can only return null, and not undefined (same for RefForwardingComponent).

I think this is a bug, and it will be annoying as my policy (and I know it is the same in many companies) is to avoid usage of null, and prefer undefined.

The correction is trivial, so if you confirm this is an issue, I can make a PR.

I tried using the @types/react package and had problems.

I tried using the latest stable version of tsc. https://www.npmjs.com/package/typescript

I have a question that is inappropriate for StackOverflow. (Please ask any appropriate questions there).

Mention the authors (see Definitions by: in index.d.ts) so they can respond.

Authors: @eps1lon @Jessidhia @johnnyreilly @threepointone (sorry did not retrieved all authors' git name)

Issue 2:
I tried using the @types/xxxx package and had problems.

I tried using the latest stable version of tsc. https://www.npmjs.com/package/typescript

I have a question that is inappropriate for StackOverflow. (Please ask any appropriate questions there).

Mention the authors (see Definitions by: in index.d.ts) so they can respond.

Authors: @gaspard @vbfox

As mentioned in React documentation, a stateless component can return false for empty content. Currently StatelessComponent is defined as:

interface StatelessComponent<P = {}> {
(props: P & { children?: ReactNode }, context?: any): ReactElement<any> | null;

whereas Component has

class Component<P, S> {
constructor(props?: P, context?: any);
// ...snip...
render(): JSX.Element | null | false;

Shouldn't these types be the same (including eliminating the ReactElement vs JSX.Element difference)? And to avoid future such issues (#14064, this one) it should probably be a named type, e.g. RenderResult.

A search for | null also comes up with ComponentSpec.render which probably should also have the same result type.