WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
I'm developing an app and want to dynamically load content into my application. I am using flux, so there is a fairly defined pipeline for getting and managing data.

What I want is to do something like this:

<MyRootComponent ...>
<LoadSomethingInteresting ...>
<ComponentThatUsesLoadedData />
</LoadSomethingInteresting>
</MyRootComponent>

Currently, I get around this by using <div> as the rendered component, but this doesn't work well when I lazy load into a table:

<MyRoot>
<table>
<thead>
<LoadSomeTheadData>
<ComponentThatRendersTrAndTds />
</LoadSomeTheadData>
</thead>
</table>
</MyRoot>

Chome (but probably in other browsers) will push the loading div outside the table, which will force the browser to inject it's own corrected HTML, and React will lose it's root since the DOM gets modified without React's consent.

So is there any way I can do something similar to:

render: function() {
return null; // won't work because this.props.children won't get rendered
return this.props.children; // won't work because render can't return an array of elements
return React.Children.only(this.props.children); // won't work because I may need more than one child rendered
}

I realize I can pass a React component to my loader and tell it to wrap any of it's content into that component, but I think that's quite messy.

TL;DR I want a component that can do all the logic of the current component implementation, but without rendering itself (but still rendering children).

Issue 2:
Note from maintainers:

We know this is an issue and we know exactly what set of problem can be solved. We want this too but it is a hard problem with our current architecture. Additional comments expressing desire for this feature are not helpful. Feel free to subscribe to the issue (there's button in the right hand column) but do not comment unless you are adding value to the discussion. "Me too" and "+1" are not valuable, nor are use cases that have already been written in the comments (e.g., we know that you can't put <tr> or <dd> elements with a <div>).

Consider the following:

var ManagePost = React.createClass({

render: function() {
var posts = this.props.posts

var something;
var somethingelse;

var row = posts.map(function(post){
return(
<div>
<div className="col-md-8">
</div>
<div className="cold-md-4">
</div>
</div>
)
});

return (
{row}
);
}

});

If you remove the <div></div> in the map, you get the following error: Adjacent XJS elements must be wrapped in an enclosing tag

it isn't till I re-add the surrounding, and rather pointless, divs that it compiles with out issue. I am running 0.11.1

Is this being addressed? It adds extra, and again - IMO - useless and pointless html to the page, that while harming nothing - looks messy and unprofessional. Maybe I am just doing something wrong, please enlighten me if I am.
Issue 1:
Font rendering looks non-native. In particular, on non-retina displays with subpixel font rendering enabled, it looks like your fonts are using a different rendering engine (Freetype?) and at least are not using subpixel antialiasing. It looks janky. I suppose you don't notice on a retina display?

From: support/6d8865b29fb811e391bb3f51061e064b

Issue 2:
I install many versions, when I try the version more than 0.187.0 ,it can't display chinese normal. I have read former Issues, many people say I can't try to change the font-family , but it doesn't work.
Issue 1:
I want to go through Tensorflow's CUDA kernels and optimize them. It seems like all the CUDA kernels are defined in tensorflow/core/kernels and tensorflow/contrib with some helper functions in tensorflow/core/util.

Is it okay for me to optimize kernels in tensorflow/core/kernels and send pull request?

now that tensorflow is moving to 2.0, are the CUDA kernels going to also change so dramatically that any improvements to them now could be rendered useless?

what are some conventions or practices when writing CUDA kernels? I have read the contrib.md, but there was nothing special on CUDA kernels ( ex. " Do not change kernel launch configurations " or " must support devices of compute capability >= 3.0 " )

must I use CudaGridRangeX over regular for loops?

Is there way to test and profile each .cu file individually, instead of having to rebuild the entire tensorflow or even having to test all kernels?

Issue 2:
I want to go through Tensorflow's CUDA kernels and optimize them. It seems like all the CUDA kernels are defined in tensorflow/core/kernels and tensorflow/contrib with some helper functions in tensorflow/core/util.

Is it okay for me to optimize kernels in tensorflow/core/kernels and send pull request?

now that tensorflow is moving to 2.0, are the CUDA kernels going to also change so dramatically that any improvements to them now could be rendered useless?

what are some conventions or practices when writing CUDA kernels? I have read the contrib.md, but there was nothing special on CUDA kernels ( ex. " Do not change kernel launch configurations " or " must support devices of compute capability >= 3.0 " )

must I use CudaGridRangeX over regular for loops?

Is there way to test and profile each .cu file individually, instead of having to rebuild the entire tensorflow or even having to test all kernels?
Issue 1:
I may be totally off on this, but I wanted to point it out...

I noticed that on the "Customize" page, you can set the @screen-sm-min, @screen-md-min, @screen-lg-min variables, as well as the @container-sm, @container-md and @container-lg variables. But after compiling it, I still seem to be getting the default break-points on the container width for small and medium.

So on the customize page, if I enter...

@screen-sm-min = 992px

@screen-md-min = 1200px

@screen-lg-min = 1600px

@container-sm = 970px

@container-md = 1170px

@container-lg = 1570px

I end up with...

@media (min-width: 768px) { /*Should be 992px*/
.container {
width: 970px;
}
}
@media (min-width: 992px) { /*Should be 1200px*/
.container {
width: 1170px;
}
}
@media (min-width: 1600px) {
.container {
width: 1570px;
}
}

This will make the container wider than the screen on small and meduim. I think the issue may be that in the less files, they are referencing @screen-sm instead of @screen-sm-min (same for md) for the container width.

// Set the container width, and override it for fixed navbars in media queries
.container {
.container-fixed();

@media (min-width: @screen-sm) { /*Should be @screen-sm-min?*/
width: @container-sm;
}
@media (min-width: @screen-md) {/*Should be @screen-md-min?*/
width: @container-md;
}
@media (min-width: @screen-lg-min) {
width: @container-lg;
}
}

Issue 2:
When customizing bootstrap (e.g. http://getbootstrap.com/customize/?id=7880081) and setting

@screen-md-min = 1280px

@screen-lg-min = 1900px

@container-md = ((1220px + @grid-gutter-width))

@container-lg = ((1860px + @grid-gutter-width))

it will generate the default @screen-md-min 992px instead of 1280px bootstrap.css (line 700)

@media (min-width: 768px) {
.container {
width: 750px;
}
}
@media (min-width: 992px) {// WRONG
.container {
width: 1250px;
}
}
@media (min-width: 1900px) {
.container {
width: 1890px;
}
}
Issue 1:
System information.

Have I written custom code (as opposed to using a stock example script provided in Keras): No

OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Win10

TensorFlow installed from (source or binary): Anaconda

TensorFlow version (use command below): 2.9.1

Python version: 3.9

GPU model and memory: None

Describe the problem.

I am going through Francois Chollet's book "Deep Learning with Python" and running the code in his Jupyter Notebooks with Keras: 2.9.0 , Tensorflow: 2.9.1.

Notebook 6.3, (under the heading "1.6 Using recurrent dropout to fight overfitting") has a model following:

model = Sequential()
model.add(layers.GRU(32,
dropout=0.2,
recurrent_dropout=0.2,
input_shape=(None, float_data.shape[-1])))
model.add(layers.Dense(1))

model.compile(optimizer=RMSprop(), loss='mae')
history = model.fit_generator(train_gen,
steps_per_epoch=500,
epochs=40,
validation_data=val_gen,
validation_steps=val_steps)

Running parts 6.3.6 (recurrent dropout) and 6.3.7 (stacked recurrent layers) gives the following training and validation losses:

6.3.6

6.3.7

Describe the expected behavior.

After using dropout it should solve the overfitting problem just like in the book.

Issue 2:
System information.

Have I written custom code (as opposed to using a stock example script provided in Keras: no

OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 20.04

TensorFlow installed from (source or binary): binary

TensorFlow version (use command below): v2.4.0-rc4-71-g582c8d236cb 2.4.0

Python version: 3.8.5

Describe the problem.

The error and warning messages seem to be different when model(x) is used instead of model.predict(x) to make a prediction.

Is this intentional and documented somewhere?

For example, in the following simple model there is a warning when model.predict(x) is used, but none for model(x).

Moreover, it would be generally good to know which warnings (or errors) might not occur when a specific prediction method is used and also which warnings will be the same.

Standalone code to reproduce the issue.

import tensorflow as tf
from tensorflow import keras
from tensorflow.keras import layers
import numpy as np
model = keras.Sequential([
keras.layers.ReLU(threshold=3, input_shape=(2,))])
x = tf.constant([[[[1,2,3,4,5]]]])
print (np.array2string(model(x).numpy(), separator=', '))
#print (np.array2string(model.predict(x), separator=', '))
Issue 1:
ref #16560 #15730

Here is the road-map:

Writing Client-gen:

Generate the common methods, ignore the methods operating on subresources for now

Unify the signature of the common methods in our individual typed clients

Make a test type, then write the test against this type instead of every type

manually add the methods that are not common to all typed clients

make go2idl track the functions, constants, variables, methods in the input package.

add a "plural" namer to go2idl

Using Client-gen:

generate the internalversion clientset, to replace pkg/client/clientset/unversioned

generate the fake clients to enable testing

generate versioned client

Using generated clientset:

replace the pkg/client/unversioned/ in controllers

replace the pkg/client/unversioned/ in kubelets

let controllers use versioned clientset

let kubelet use versioned clientset

cc @kubernetes/goog-csi

Issue 2:
Background: Client proposal in #15730, api type structure proposal in #16062

At first I was thinking we'd generate based on tags in the comments, e.g. something like:

// Pod documentation here
// +generate=Create,Update,List,Get,Delete
type Pod struct {
...
}

And the result would be something like our current PodsNamespacer client. But then I got to thinking that it'd be super nice to have type information in the methods, to handle the case where e.g. the Binding() method takes an *v1.Binding.

type PodsREST interface {
Create(*Pod) *Pod
Update(*Pod) *Pod
List(???) *PodList
Binding(*Binding) *Status
}

This has some downsides, like how do you represent query parameters, or the fact that you'll either get a *Pod or a *Status (i.e., error) back? Or that that you must POST to Binding?

We could model one layer down.

type PodsPOST struct {
Parameters *POSTParams
ReqBody *Pod
RespBody *Pod
}

type PodsREST struct {
POST PodsPOST
...
bindings PodBindingsREST
}

type PodBindingsREST struct {
POST BindingsPOST
}

type BindingsPOST struct {
Parameters *POSTParams
ReqBody *Binding
RespBody *Status
}

This has disadvantages: it's starting to get quite complex and verbose, there's still no good go way to indicate union types.

So we need to explore alternatives.

Always generate clients from swagger? Then we don't need to solve this until we want to generate the rest setup code. This is probably the most obvious thing to do, which is why I'm filing this as only P2.

Switch to proto? The RPC/service stuff there isn't super natural for describing REST either, but it can work. This would be very disruptive, though.
Issue 1:
I'm running into huge build time issues with webpack. We're using a combination of TypeScript, CoffeeScript, and SCSS. I've tried poking around with disabling source maps and other stuff but it seems like the core issue is that the compilers for these languages are just slow. If I understand correctly, all of these languages have the property where the individual files can be compiled independently and the result will still be valid. Given this 1:1 mapping property it seems like webpack could build much faster with a plugin that maintains a content-addressed map of original files to compiled files on the file system and avoids rebuilding files that haven't changed (using webpack's in-memory watch functionality doesn't work for our use case). However I can't see any documentation about something like this, I can't find a plugin that does this, and I don't see any obvious way of building a plugin like that after poking around in the webpack source code for a bit. Is this something that could be made to work with webpack? Even better, does it already exist?

Issue 2:
The current watch mode for webpack is fairly good at caching load results and general workload between file changes as long as you keep the same webpack process running. The initial build for some projects, on the other hand, can be on the order of more than a minute. This can make the build process very slow if for some reason you need to stop your watcher, or node crashes, or you simply want to restart your connect server with different flags.

It would be nice if webpack were able to persist compilation information between invocations of the node process to the filesystem and reload that cache later -- so ideally, performance between different $ webpack calls would be close to how long it takes to --watch to recompile when it detects a change.
Issue 1:
A example.

In my computer output.

4.814477205276489
0.03499555587768555

code

import torch
import numpy as np
import time

a = [np.random.random([512, 512, 3]).astype(np.float32) for i in range(10)]

t1 = time.time()
b = torch.tensor(a, dtype=torch.float32)
t2 = time.time()

c = torch.tensor(np.array(a), dtype=torch.float32)
t3 = time.time()

print(t2-t1)
print(t3-t2)

Issue 2:
I just started learning PyTorch, but it is puzzling that neither Pycharm nor VS Code can automatically complete the code for some functions, such as torch.empty(), torch.zeros(), etc.

Can you give me some advice?

Thanks~ o(￣︶￣)o
Issue 1:
Currently, if I close the editor and open it again, I have to go through the same steps to open the project again. Why not to remember the previously opened project and open it automatically once the user starts the editor?

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

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

It's also nice because I generally have five or six open projects that I just keep minimized in the editor for ease of access. It would be great to have such a feature in Atom.
Issue 1:
Do you want to request a feature or report a bug?

Feature.

If this is a feature request, what is motivation or use case for changing the behavior?

webpack-cli does a lot of neat things, but it's huge, has a huge dependency list, and I don't personally need any of its features other than a tiny CLI that takes args and passes them to a webpack compiler. It's also annoying to have to remember to install an additional dependency for each web project.

Would you consider providing an extremely minimal CLI within the webpack package itself, which simply parsed args and sent them to a webpack instance? Everyone would still be free to use webpack-cli if they want/need, but no one would be forced to install an extremely large tool just to call webpack from the command line.

Issue 2:
Bug report

What is the current behavior?

Currently have 42 line of codes in a utils.js file which will be used in another Module Federation.

Federate Module 1

delta.js // with 22 line of codes

export const SAMPLE = 'SAMPLE';

utils.js // with 42 line of codes. All are exported functions

import { getUserProfile } from './config';
import * as delta from './delta';

export const thisMethodIsTruncated = () => {
const { user } = getUserProfile();
....
}

export const method2 = () => { ... }

export const method3 = () => { ... }

.... //upto line 42 or more

webpack.config.js

new ModuleFederationPlugin({
name: 'module1',
exposes: {
'./utils': './src/common/utils.js',
},
...
})

Federated Module 2

module2.js

useEffect(() => {
import('module1/utils').then((util) => {
const { thisMethodIsTruncated } = util;
thisMethodIsTruncated() // thisMethodIsTruncated is not a function
})
}, [])

webpack.config.js //module 2

new ModuleFederationPlugin({
name: 'module2',
remotes: {
module1: 'module1',
}
...
});

Solution Weird

Create a new file and move this method thisMethodIsTruncated

If the current behavior is a bug, please provide the steps to reproduce.

steps provided above

What is the expected behavior?

should be able to import federated module 1 in federated module 2.

Other relevant information:

webpack version: 5.41.0

Node.js version: 12.16.0

Operating System: windows 10

Additional tools: na
Issue 1:
http://stackoverflow.com/questions/38530831/webpack-vendor-chunk-changing-every-time

Webpack version:

"^1.13.1"

Please tell us about your environment:

OSX El Capitan

Current behavior:

Expected/desired behavior:

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem along with a gist/jsbin of your webpack configuration.

What is the expected behavior?

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

Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

Language: [all | TypeScript X.X | ES6/7 | ES5 | Dart | ...]

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:
Challenge Clone an Element Using jQuery has an issue.

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36.

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");
$("#target5").clone().appendTo("left-well");

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

});
</script>

jQuery Playground

#left-well

#target1
#target2
#target3

#right-well

#target4
#target5
#target6

This is on the challenge "Clone and Element using jQuery - I have this and it all looks okay but it wont make a copy of #target5 in the left well

Issue 2:
Spanish language translation for PR #9647

Added text: "Together with the commands used in Step 11, this adds additional parameters to the

mongod command to allow MongoDB to run in the C9 environment." & "Note: Use the command mongod --port 27017 in place of mongod --port 27017 --dbpath=./data to avoid a duplicate parameter error.--dbpath=./data is already included in the ./mongod command."
Issue 1:
Describe the bug

I am unable to use big integer columns with tuple_ when querying the DB.

To Reproduce

The following code is a minimal example:

big_int = 2**31 + 123
session.add(Actor(id=big_int))
await session.commit()

s = select(Actor.id).where(tuple_(Actor.id, Actor.id) == tuple_(big_int, big_int))
await session.execute(s)

Attempting to execute the query leads to the error below.

I fixed the issue by using func.cast(big_int, BigInteger) explicitely before calling tuple_, but I would expect this to be automatic?

Error

sqlalchemy.exc.DBAPIError: (sqlalchemy.dialects.postgresql.asyncpg.Error) <class 'asyncpg.exceptions.DataError'>: invalid input for query argument $1: 2147483771 (value out of int32 range)

Versions

OS: Ubuntu 22.04

Python: 3.10.3

SQLAlchemy: 1.4.34

Database: Postgres

DBAPI (eg: psycopg, cx_oracle, mysqlclient): postgresql+asyncpg

Additional context

Full reproducible gist here:

https://gist.github.com/Apakottur/62e38315949c0e57169cc95616299f22

Issue 2:
Migrated issue, originally created by Henrique Alves (@hcarvalhoalves)

I'm trying to do something that, in principle, should be simple: inject a expression-based column into an ORM-based Query. I've tried this:

query = db.session.query(MyClass).all()
# Using `now` just as an example, ideally it's something that takes a parameter
# so it can't be replaced by `orm.column_property`
some_expression = func.now()
selectable = query.selectable
# The following works as expected, injecting the expression as a column
# the AnnotatedSelect object...
selectable.append_column(some_expression.label('some_column'))
# ... but I can't set it back on the query
query.selectable = selectable
query = query.order_by('some_column')

It fails with AttributeError since query.selectable is read-only. I haven't found another way to inject an expression by reading the docs or the source.

Query.add_column isn't quite the same thing since you now get a KeyedTuple back, not a MyClass object with the injected attribute.

orm.column_property is of limited usefulness since you can't pass arguments only known at runtime instead of class-evaluation time.

I thought SQLAlchemy made things like this a breeze, but I've spent days without finding an adequate solution. Either I'm missing something, or an API for this is badly needed.
Issue 1:
VSCode support extension, that's good. but i found extension will not auto update. nor auto check update , nor notify us to update.

So i suggest can you please improve extension update?

Auto check update

Notify user to update or not

User can setting check up frequency(every start? one day? one week?)

The check update can be put in background, not slow down the main VSCode window

Check update can be single/mutiple request. (If installed multiple extensions. check update may slow )

If user choose update, then download new extensions one by one and installed or down them simultaneouslyl and installed

Issue 2:
Such as IEncodingSupport::setEncoding , i want to code an extension for detect file's encoding. now detect encoding successed, but i don't known how to change encoding by API, could u help me?