WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
🚀 Feature

Support for RPCs having timeouts is being added in #29601, but this isn't currently per RPC. We would like to extend this to a per-RPC timeout that is configurable by calls to rpc.rpc_(a)sync. The reason for this is that the user may want more granular control over how long they expect an RPC to last. See the discussion in the mentioned PR for some more context on the specific changes that would be needed to implement this.

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @gqchen @aazzolini @rohan-varma @xush6528

Issue 2:
🚀 Feature

#28392 is adding timeouts per RPC, but it is currently a global timeout. Per @pritamdamania87's suggestion, we should:

1.Have a timeout parameter in RpcAgent.send().

2. For user RPCs, we always fill that in with the default rpc timeout.

3. For system RPCs, it'll default to 0 (which would be infinite) unless the system RPC sets it.

4. Later we can allow the user level RPC API to specify timeouts as well.## Motivation

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @gqchen @aazzolini @rohan-varma @xush6528
Issue 1:
I have some problems with non-accurate placing of images created by imshow. Output to PNG works fine, but the squares are rectangular and misaligned with the grid when plotting small squares to PDF (order of magnitude around 1-2 inches for the whole plot). I didn't inspect the contents of PDF, but I suspect that coordinates might be written with too low precision.

Here's a small example (maybe not the minimal possible, but hopefully short enough):

import numpy as np
import matplotlib.pyplot as plt

plt.gcf().set_size_inches([1,1])
a=np.random.rand(20,20)
im = plt.imshow(a, interpolation='nearest', origin='lower', extent=[-2,2,-2,2])
plt.gca().set_xticks(np.arange(-2,2,0.2))
plt.gca().set_yticks(np.arange(-2,2,0.2))
plt.gca().xaxis.set_ticklabels([])
plt.gca().yaxis.set_ticklabels([])
plt.grid(ls=':',lw=0.1,color='white')
plt.savefig('test.pdf')

I'm using python 3.3 and matplotlib 1.3.1.

Issue 2:
The following script show a mis-alignment between grid lines and image patterns while they should be aligned:

import numpy as np
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt

n = 16
fig = plt.figure(figsize=(6,6))
Z = np.zeros((n,n))
Z[::2,::2] = Z[1::2,1::2] = 1
plt.imshow(Z, interpolation='none', cmap=plt.cm.gray, extent=[0,n,0,n], alpha=0.25)
plt.xticks(np.arange(0,n), []), plt.yticks(np.arange(0,n), [])
plt.grid(ls='solid')
delta = 0.01
plt.xlim(1-delta,1+delta), plt.ylim(1-delta,1+delta)
plt.savefig('pylab-grid.png')
plt.savefig('pylab-grid.pdf')
Issue 1:
From the documentation on Full-width vs Centered, both example look pretty much the same (except for different column size for child items but I don't think that's what "full-width" and "centered" are about, correct me if I'm wrong).

AFAIK, full-width & centered are equivalent of Bootstrap's container-fluid and container, right?

I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

Examples should look significantly different between Full-Width and Centered (see Bootstrap)

Documentation should specify which part of the code is responsible for full-width and centered

Current Behavior

I don't think the example is correct

Steps to Reproduce (for bugs)

Just copy the code for Centered Grid from https://material-ui.com/layout/grid/#full-width-vs-centered on to your project, you don't see any effects that would be considered "centered"

Context

Just got confused by the documentation. I think the examples need to be updated.

Issue 2:
Problem description

Only on Firefox, day 2016-10-16 is missing and day 2016-10-15 is duplicated. Actually, it seems like the October month, in every year, has a pair of missing/duplicate days. Examples:

Link to minimally-working code that reproduces the issue

Well, you can just go to http://www.material-ui.com/#/components/date-picker and check it out. Remember to test on Firefox.

Versions

Material-UI: 0.15.4, but as you can see the website is also bugged

React: 15.3.2, but the website...

Browser: Tested on chrome and firefox, only firefox has problems. Chrome works correctly.
Issue 1:
On current master (0.4.0-dev+6723), I ran Pkg.update() and got this:

INFO: Computing changes...
ERROR: TypeError: map_to!: in typeassert, expected Array{VersionNumber,1}, got Array{VersionNumber,1}
in map_to! at abstractarray.jl:1307
in map at ./abstractarray.jl:1326
in prune_versions at ./pkg/query.jl:232
in prune_dependencies at ./pkg/query.jl:387
in resolve at ./pkg/entry.jl:414
in update at ./pkg/entry.jl:306
in anonymous at pkg/dir.jl:31
in cd at ./file.jl:22
in cd at pkg/dir.jl:31
in update at ./pkg.jl:45

Unless I am missing something the 'expected' and 'got' types match.

Issue 2:
Reproduce on

Version 0.4.0-dev+6540 (2015-08-08 20:25 UTC)
Commit f64cb1d* (0 days old master)

Checkout master of Convex.jl (e7cc681592be8494965e80da2e210acef276b775)

Base.compilecache("Convex")

Pkg.test("Convex")

ERROR: LoadError: LoadError: LoadError: TypeError: call: in new, expected
Dict{Tuple{Symbol,UInt64},Dict{UInt64,Union{AbstractArray{T,N},Number}}}, got
Dict{Tuple{Symbol,UInt64},Dict{UInt64,Union{AbstractArray{T,N},Number}}}
in call at /Users/idunning/.julia/v0.4/Convex/src/conic_form.jl:70
in conic_problem at /Users/idunning/.julia/v0.4/Convex/src/problems.jl:110
in solve! at /Users/idunning/.julia/v0.4/Convex/src/solution.jl:32
in solve! at /Users/idunning/.julia/v0.4/Convex/src/solution.jl:10
in anonymous at /Users/idunning/.julia/v0.3/Convex/test/test_affine.jl:12
in context at /Users/idunning/.julia/v0.4/FactCheck/src/FactCheck.jl:417
in anonymous at /Users/idunning/.julia/v0.3/Convex/test/test_affine.jl:7
in facts at /Users/idunning/.julia/v0.4/FactCheck/src/FactCheck.jl:391
in include at ./boot.jl:254
in include_from_node1 at ./loading.jl:263
in anonymous at no file:21
in include at ./boot.jl:254
in include_from_node1 at ./loading.jl:263
in anonymous at no file:36
in include at ./boot.jl:254
in include_from_node1 at ./loading.jl:263
in process_options at ./client.jl:308
in _start at ./client.jl:411
while loading /Users/idunning/.julia/v0.3/Convex/test/test_affine.jl, in expression starting on line 6
while loading /Users/idunning/.julia/v0.3/Convex/test/runtests_single_solver.jl, in expression starting on line 19
while loading /Users/idunning/.julia/v0.3/Convex/test/runtests.jl, in expression starting on line 32

(I've wrapped the lines to make it clear they are the same type)

To be clear, this doesn't happen with the non-precompiled version. So maybe of interest to @vtjnash.
Issue 1:
React version: 16.12.0

Steps To Reproduce

A component that suspends as a result of a context update is never rendered to DOM after suspension is finished.

Link to code example:

https://codesandbox.io/s/react-suspense-context-bug-rklls?file=/package.json:163-170

The current behavior

If a component suspends as a result of a context update, the component's render is called after suspension is finished but the result of the render is not reflected in the DOM (and effects aren't called).

The expected behavior

If a component suspends as a result of a context update, the component's render should be called and flushed to the DOM and effects called.

Related Issues:

#17356 - seems related to memoization but this does not use any memoization

Issue 2:
Do you want to request a feature or report a bug?

bug (I think?)

What is the current behavior?

const [value, setValue] = useState("default");
return (
<div className="App">
<input value={value} onChange={e => setValue(e.target.value)} />
<div>
<Value.Provider value={value}>
<Suspense fallback={<div>loading</div>}>
<MemoizedChild />
</Suspense>
</Value.Provider>
</div>
</div>
)

When using a memoized functional component (MemoizedChild in above example) in conjunction with Context as a child of a React.Suspense component, there seems to be a bug in which MemoizedChild does not update when the context it uses changes. For the full example, see my codesandbox below.

In the codesandbox, if you change the value of the input, the new value is provided to the context which causes the hook used in MemoizedChild (useValue) to throw a promise. This flips Suspense to the fallback state and when the promise resolves MemoizedChild's state is not updated with the proper context value because (I'm assuming) the memoized value of MemoizedChild is the one that contained the previous context value and technically no props have changed, so that makes sense why it wouldn't have updated. However, this seems like it would be unexpected behavior.

https://codesandbox.io/s/react-suspense-maybe-bug-sznbk

What is the expected behavior?

I would expect that MemoizedChild would be re-rendered with the new provided value.

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?

I'm assuming all of them that contain Suspense and memo. So, since 16.8?
Issue 1:
Migrated issue, originally created by 0xANDREW NA (@0xANDREW)

(SQLAlchemy 1.0.11)

Column definition in model:

public_data = Column(MutableDict.as_mutable(JSON), nullable=False)

Event listener in same model file:

def __listener(target, value, oldvalue, initiator):
... do some stuff

event.listen(User.public_data, 'set', __listener)

Change that should trigger set event:

# this doesn't work
user.public_data['address'] = ''

# but this works
user.public_data = {}

The event is never triggered when only a JSON attribute is modified. I stepped through the SQLAlchemy code and found that after the first line above is executed, the model's changed() method is called, which I assume should be responsible for the event firing. Am I doing something wrong or is this not supported?

Issue 2:
Migrated issue, originally created by zoomorph (@zoomorph)

Listening for changes to a scalar attribute can be done via the 'set' event:

def validate_phone(target, value, oldvalue, initiator):
"""Strip non-numeric characters from a phone number"""

return re.sub(r'(?![0-9])', '', value)

# setup listener on UserContact.phone attribute, instructing
# it to use the return value
listen(UserContact.phone, 'set', validate_phone, retval=True)

When Mutable attributes are set, they also emit the 'set' event. However, they do not emit any events when they are merely changed.

A new event such as 'changed' should be added to cover this case. It would work like so:

def favorites_changed(target, value, oldvalue, initiator):
logger.info("Favorites was set or changed")
# do something

# setup listeners on UserContact.favorites attribute (a MutableList for example)
listen(UserContact.favorites, 'set', favorites_changed)
listen(UserContact.favorites, 'changed', favorites_changed)

u = session.query(UserContact).first()
u.favorites = [1, 2, 3] # emits 'set'
u.favorites.append(4) # should emit 'changed'
u.favorites[-1] = 5 # should emit 'changed'

Related to issue #3297
Issue 1:
Here's a clear definition of set equality. One sees that order is not explicit at all.

https://proofwiki.org/wiki/Definition:Set_Equality

Two sets are equal iff they contain the same elements:

∀x:(x∈A⟺x∈B)⟺A=B

The order of the elements in the sets is immaterial.

Is there a way to reopen this topic?

(Edited note: I eliminated the reference to commutativity and associativity of symmetric difference since it is irrelevant to set equality)

the youtube video presented in case #1358 does not demonstrate at all that ordering matters.

I think the equality of sets is independent of order. {1,2,3} = {3,2,1}

see more here: http://www.cs.odu.edu/~toida/nerzic/content/set/basics.html

Please also note that according to the site above that is also true that:

{1, 2, 3} = {3, 2, 1, 1}, that is duplications do NOT make any difference for sets.

Issue 2:
Challenge http://freecodecamp.com/challenges/waypoint-sift-through-text-with-regular-expressions has an issue.

it wants a regular expression /and+/gi but should check for /and/gi

the plus means it would match andd or anddddddddddddddd instead of just and
Issue 1:
Original ticket http://projects.scipy.org/scipy/ticket/309 on 2006-11-17 by trac user Axel, assigned to unknown.

The PyEM example "Creating, sampling and plotting a mixture" on

http://www.ar.media.kyoto-u.ac.jp/members/david/softwares/pyem/ results in a strange plot that seems to consist of only integer data points. This differs from the example plot on the website.

Furthermore, after entering the example code, no plot is shown at all, so I added P.show() myself. I try to send a screen shot with this. Things may relate to the fact that I'm a newbie.

scipy.version

'0.5.2.dev2319'

matplotlib.version

'0.87.3'

pyem.info.version

'0.5.6'

Issue 2:
Original ticket http://projects.scipy.org/scipy/ticket/310 on 2006-11-17 by trac user Axel, assigned to unknown.

The PyEM example "Creating, sampling and plotting a mixture" on

http://www.ar.media.kyoto-u.ac.jp/members/david/softwares/pyem/ results in a strange plot that seems to consist of only integer data points. This differs from the example plot on the website.

Furthermore, after entering the example code, no plot is shown at all, so I added P.show() myself. I try to send a screen shot with this. Things may relate to the fact that I'm a newbie.

scipy.version

'0.5.2.dev2319'

matplotlib.version

'0.87.3'

pyem.info.version

'0.5.6'
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

Hi, I'm trying to make my app in production on Google App Engine but this error occur :

Uncaught TypeError: Cannot read property 'forEach' of undefined

When I check where the problem is I find :

window.__NEXT_LOADED_CHUNKS__.forEach

Everything is ok on dev.

You can check the live app here : https://www.chefing.fr

Here is my Dockerfile:

FROM node:6.5

RUN mkdir -p /app
WORKDIR /app

ADD package.json /app/

COPY . /app/

RUN npm i
RUN npm i -g nodemon
RUN npm i -g next
RUN npm i -g react
RUN npm i -g react-dom

RUN next build
RUN echo $GAE_VERSION > .next/BUILD_ID

ENV NODE_ENV=production

EXPOSE 3000
EXPOSE 8080

CMD [ "npm", "run", "start" ]

Everything is ok with the deployement, push / pull, deployement, start etc... No error.

And this is my next.config.js file (In case of problem).

module.exports = {
webpack: function (c) {
if (c.resolve.alias) {
delete c.resolve.alias['react']
delete c.resolve.alias['react-dom']
}
return c
}
}

I hope you can help us :)

Thanks, Steve.

|---------|---------|

| next | 2.4.7 |

| node | 6.5 |

| mobX | 3.2 |

Issue 2:
this is server.js

const defaultHandlerWrapper = (app) => {
const handler = app.getRequestHandler();
return ({ raw, url }, hapiReply) => {
return handler(raw.req, raw.res, url) // at this point filter raq,
.then(() => {
hapiReply.close(false);
});
};
};

I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

Current Behavior

Steps to Reproduce (for bugs)

Context

Your Environment

Tech
Version

next

node

OS

browser

etc
Issue 1:
When resizing your browser down to the minimum width and then bringing it back to full size the menu items wrap below the navigation. Doing it again compounds the problem. See pictures and http://getbootstrap.com/examples/justified-nav/ for an example.

Issue 2:
The justified nav example (http://getbootstrap.com/examples/justified-nav) collapses perfectly when the screen is narrowed, but when the screen is expanded it get wonky.

expanded
Issue 1:
First Check

I added a very descriptive title to this issue.

I used the GitHub search to find a similar issue and didn't find it.

I searched the FastAPI documentation, with the integrated search.

I already searched in Google "How to X in FastAPI" and didn't find any information.

I already read and followed all the tutorial in the docs and didn't find an answer.

I already checked if it is not related to FastAPI but to Pydantic.

I already checked if it is not related to FastAPI but to Swagger UI.

I already checked if it is not related to FastAPI but to ReDoc.

Commit to Help

I commit to help with one of those options 👆

Example Code

from fastapi import FastAPI
from pydantic import BaseModel

app = FastAPI()

class MyModel(BaseModel):
my_int: int

@app.get("/test", response_model=MyModel)
async def test():
model = MyModel(my_int=280456587464933376)
return model

Description

It should return 280456587464933376, but it returns 280456587464933380. In my testing, the difference was always + 4.

If I use a small number (for example, 2804) it works as intended. If I convert the integer to a string it also works as intended.

This is also reproducible if just the integer is returned with:

@app.get("/test")
async def test():
return 280456587464933376

Operating System

Windows

Operating System Details

Win10

FastAPI Version

0.73.0 (latest)

Python Version

3.10.1

Additional Context

No response

Issue 2:
Describe the bug

The interactive API docs interface misinterprets big integers.

To Reproduce

Here I use the example from the FastAPI homepage.

Create a file with:

from fastapi import FastAPI

app = FastAPI()

@app.get("/items/{item_id}")
async def read_item(item_id: int, q: str = None):
return {"item_id": item_id, "q": q}

Open the browser and call the endpoint /docs.

In the interactive API docs interface, click the /items/{item_id} item, and click the Try it out button.

Fill the item_id field with a big integer, e.g. 10001000100010001, and click the Execute button.

In the Server response section, it shows a JSON response body with {"item_id": 10001000100010000, "q": null}.

But I expected it to return {"item_id": 10001000100010001, "q": null}.

If the endpoint /items/10001000100010001 is called in the browser, it returns the expected JSON response.

If the command curl -X GET "http://127.0.0.1:8000/items/10001000100010001" -H "accept: application/json" is called in the shell, it returns the expected JSON response.

Expected behavior

The interactive API docs interface should return the same response that returns from the actual endpoint for big integers.

Screenshots

Environment

OS: macOS 10.15.4

FastAPI Version: 0.55.1

Python version: 3.8.2

Browser: Google Chrome 83.0.4103.97
Issue 1:
Context:

Playwright Version: 1.2.0

Operating System: Windows

Node version: 10/12/14

Browser: Webkit

Extra: Running as GitHub Action

Running one project: e2e
PASS browser: chromium e2e tests/e2e/example.test.js (17.677 s)
PASS browser: firefox e2e tests/e2e/example.test.js (12.755 s)
FAIL browser: webkit e2e tests/e2e/example.test.js (21.002 s)
● Example Tests › image snapshots

Expected image to match or be a close match to snapshot but was 26.405261426690828% different from snapshot (243350.8893083827 differing pixels).
See diff for details: D:\a\docsify\docsify\tests\e2e\__image_snapshots__\__diff_output__\example-test-js-example-tests-image-snapshots-1-webkit-diff.png

280 | // Viewport screenshot
281 | const screenshot1 = await page.screenshot();
> 282 | expect(screenshot1).toMatchImageSnapshot();
| ^
283 |
284 | // Full page screenshot
285 | const screenshot2 = await page.screenshot({ fullPage: true });

at Object.<anonymous> (tests/e2e/example.test.js:282:25)

› 1 snapshot failed.

Image diff output from jest-image-snapshot

Chromium on macOS (top) vs Chromium on Windows (bottom)

Describe the bug

We're running e2e tests using Chromium, Firefox, and Webkit on macOS, Ubuntu, and Windows, then using jest-image-snapshot for image comparisons. Reference screenshots are generated on a variety of platforms as project maintainers use Linux, macOS, and Windows.

Generally speaking, I can tweak jest-image-snapshot's threshold settings to allow screenshots to match despite the slight rendering differences across operating systems and browsers--except for Webkit on Windows. The reason is that Webkit on Windows renders text non-antialiased (see screenshot above) which results in a significant diff detection.

I'm assuming non anti-aliased text rendering is a bug. If not, is there a launch argument we can use to force Webkit on Windows to render anti-aliased text?

Issue 2:
Context:

Playwright Version: 1.1.1

Operating System: Windows

Browser: WebKit 1269

Bug description

When trying to test screenshots with webkit, I noticed that font rendering looks a bit weird and no font icons were rendered.

The icon font rendering can be easily tested by starting the playwright webkit browser (eg. AppData\Local\ms-playwright\webkit-1269\Playwright.exe) directly and navigating for example to https://material.io/resources/icons

An interesting behavior I could observe was that when I set font-kerning: normal on font icons (eg. on .material-icons), some icons appeared, some stayed hidden and some showed incorrect icons (eg. keyboard_arrow_down was rendered as keyboard icon only).

Also it seems while font-kerning: auto seems to enable it by default in other browsers, this does not seem to happen at all in the playwright webkit.

Without font-kerning: normal

With font-kerning: normal

How it should like like eg. in Chrome:

Any ideas on how to solve this?
Issue 1:
As pointed out in #5048, we should consider importing data URLs. The following works in Chromium:

await import("data:application/javascript;charset=utf-8;base64,Y29uc29sZS5sb2coImhlbGxvIHdvcmxkIik7");

Which which then will log hello world to the console.

Issue 2:
It contains a lot of duplicated functionality. lint should be a new "kind" of build which only runs on ubuntu.
Issue 1:
Just found this text rendering error in part of https://github.com/mapbox/mapbox-gl-native/blob/master/src/clipper/clipper.cpp#L4336-L4340

This is what it looks like, see all the ?

It renders fine on github.com

I am on Ubuntu 14.04 x64 with Atom 0.152.0

Issue 2:
Text:

这上面的夜的天空，奇怪而高，我生平没有见过这样奇怪而高的天空。他仿佛要离开人间而去，使人们仰面不再看见。然而现在却非常之蓝，闪闪地睒着几十个星星的眼，冷眼。他的口角上现出微笑，似乎自以为大有深意，而将繁霜洒在我的园里的野花草上。

It happen after update to 0.189.0, and it's normal in 0.188.0 .

I try disabled all community packages or star with --safe mode, still happen.

Update: Ubuntu 14.04