WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
When testing #2832 I tried to set a function breakpoint on 'parseInt', but that doesn't seem to be supported.

It worked for setTimeout and for my own global functions

Issue 2:
Testing #2832

I have a breakpoint on if (_key === key) { and I've added a function breakpoint for console.log. The breakpoint for if (_key === key) { is hit, but the console.log near the end is not hit.

I tried clicking Reapply all breakpoints which did not help in this case.

function Safe(_key) {
var _locked = true;
var _value = null;

this.unlock = function(key) {
if (_key === key) {
_locked = false;
}
return;
};

this.lock = function() {
_locked = true;
};

Object.defineProperty(this, 'value', {
get: function() {
if (_locked) {
console.log('thief detected!');
process.exit(0);
}
return _value;
},

set: function(value) {
if (_locked) {
console.log('thief detected!');
process.exit(0);
}
_value = value;
}
});
}

var safe = new Safe('mySecretPassword');

safe.unlock('mySecretPassword');
safe.value = 3;
console.log(safe.value);
safe.lock();
Issue 1:
I've just started moving an app over to Next v5. I'm doing this in small chunks, and have just finished a page. In order to verify it in production-mode, I ran the build (NODE_ENV=production next build && NODE_ENV=production next export). The styles.css file is correctly build/saved to ./.next/static/styles.css, but it is not included in the exported build (./out/**).

This results in 404s when requesting the stylesheet.

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

Expected Behavior

The stylesheet should be included in the exported build.

Current Behavior

The stylesheet is not included in the exported build.

Steps to Reproduce (for bugs)

Add @zeit/next-css to your next.config.js

Import a .css file

Run next build

Run next export

Run serve ./out

Run curl http://localhost:3000/_next/static/style.css to see the 404

Context

This has prevented me from migrating to Next v5.

Your Environment

Tech
Version

next
5

node
8

OS
High Sierra

browser
*

etc

Issue 2:
I want to use universal webpack in this PR: #3578 but I don't know when the release cycle is for nextjs version 5.0. Anyone have any idea when universal webpack can be loaded?

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

Context

I want to use universal webpack loader to load in babel and use es6 on ssr.
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

No code, it's a documentation correction (possibly).

Description

FastAPI's documentation, in it's "Python Types/Pydantic models" section says:

Pydantic is a Python library to perform data validation.

You declare the "shape" of the data as classes with attributes.

And each attribute has a type.

Then you create an instance of that class with some values and it will validate the values, convert them to the appropriate type (if that's the case) and give you an object with all the data.

But Pydantic's documentation, in the "Models" section notes that:

pydantic is primarily a parsing library, not a validation library. Validation is a means to an end: building a model which conforms to the types and constraints provided.

Then FastAPI's documentation could be rewritten this way:

Pydantic is a Python library to perform data parsing.

You declare the "shape" of the data as classes with attributes.

And each attribute has a type.

Then you create an instance of that class with some values and it will parse the values, convert them to the appropriate type (if that's the case) and give you an object with all the data.

I did not send a pull request right away because I think it may have been written this way to facilitate the understanding but I think that it's better to be technically correct.

Operating System

Linux

Operating System Details

No response

FastAPI Version

0.68.0

Python Version

irrelevant

Additional Context

No response

Issue 2:
Description

I'm using Django ORM + Mysql with fastapi

all works fine

but at some point when application have no requests for some period of time I'm getting

2006 mysql server gone away

Most likely Django does some connection checks or closing somehere in the request flow..

(I tried to play with CONN_MAX_AGE and close_old_connections in middleware - no luck)

any idea how to do it with fastapi ?
Issue 1:
Changes

I wrote a small script to import Terminal color schemes from VSCode themes. However, there's something I think is unintended design:

The "cursorColor" setting is currently part of the profile, not the color scheme. In my opinion it doesn't make sense, because by changing the color scheme of a given profile, the background color may be similar to the cursor color. Both settings should be coupled to each other for consistency.

Additional features

It'd be amazing if you guys could implement the few remaining color customization options from VSCode's terminal to reach feature parity. They are:

terminal.border: The color of the border that separates split panes within the terminal.

terminal.selectionBackground: The selection background color of the terminal.

terminalCursor.background: The background color of the terminal cursor. Allows customizing the color of a character overlapped by a block cursor.

Issue 2:
Environment

Windows build number: 10.0.18362.0
Windows Terminal version: 0.5.2762.0

Neovim version: 0.4.2

Steps to reproduce

Open neovim from the terminal, then change the size of the window.

Expected behavior

I expect that neovim view adapt with the new window size

Actual behavior

If I open neovim and I change the window size, neovim view is extended only respect to the horizontal direction.

This issue happens only by using Windows Terminal. If I use Powershell, everything works as expected.
Issue 1:
Hi,

Elasticsearch 5.0.0 now 5.1.1

Running JVM 1.8.102 and then updated to JVM 1.8.112 - problem occurs on both.

Windows 2008 R2

I updated from 2.4.1 to 5.0 then to 5.1.1 since I've moved to 5.0 I've been having nodes drop out of the cluster. I have a 6 data nodes, each one exhibits the exact same problem but at random times. My ingest and master nodes do not exhibit this issue, but as soon as I enable a ingest node as a data node it starts to drop. I never had this issue before when on 2.4.1.

Logging doesn't show anything other than the node left and joined, I turned the logging up to debug but the same problem logging stops outputting anything, even the usual 10s marvel metrics shipping stops logging. I'm not able to bring up the hot threads via 9200 as that connection times out. Even trying to do a jstack dump hangs until the java process starts to normalize. The 100% cpu spike can last a few seconds to a few minutes, but it does recover on it's own. Disk I/O is at nothing. I've reduced my cluster down to 2 data nodes made them mangers and removed 95% of my indexes to accommodate only the current daily indexes, the problem persists. No searches are occurring. I'm now starting to disable all other windows services to see if there's some conflict.

I only have process explorer, and the thread dump from as soon as the jstack was able to connect and dump.

These are all the threads in the java.exe when running at 100%

Some stack views from the TIDs if these will help any.

threadDumps.txt

Issue 2:
Assume a 2-node cluster with an index with 1 primary and 1 replica. The index has auto_expand_replicas set 0-all. The second node drops, which leads to the first node automatically resetting the number_of_replicas to 0. This is a process that's triggered in a delayed fashion. MetaDataUpdateSettingsService listens on cluster state changed events and submits a cluster state update task to adjust number_of_replicas when it detects that the number of data nodes is smaller/greater than the number of currently-configured replicas. Assume this update successfully completes. When the second node rejoins, it sees a shard routing table that has all shards active (= primary only) and starts deleting it's local shard copy. Shortly thereafter (maybe a few milliseconds?) the first node updates the cluster state by auto-expanding the number of replicas back to one. The second node however has deleted the data and needs to resync the complete shard.
Issue 1:
In csv files that have odd spacing

name, amount
Alice,100
Bob,200

Loaded dataframes can sometimes have column names with leading or trailing whitespace. Should these column names be stripped by default?

In [4]: pd.read_csv('foo.csv').columns
Out[4]: Index([u'name', u' amount'], dtype='object')

Issue 2:
When using .loc to expand a column, the dataframe and the constituent Series can get out of sync. This led to a strange issue in some legacy code I inherited. Because of the copy/view issues I wouldn't have written this particular code myself, but it still cost me some time tracking down what was happening:

df = pd.DataFrame({"a": [10,20,30]})
df["a"].loc[4] = 40

gives me

In [224]: df
Out[224]:
a
0 10
1 20
2 30

In [225]: df["a"]
Out[225]:
0 10
1 20
2 30
4 40
Name: a, dtype: int64

In [226]: df.shape, df["a"].shape
Out[226]: ((3, 1), (4,))

which is a little unnerving. I expected that df and df["a"] would both be unchanged or both be changed. Not sure if it's too much trouble to fix and we should just say "don't move your arm like that", though.

@jorisvandenbossche reported the same thing in master; here I'm on 0.18.0.

INSTALLED VERSIONS
------------------
commit: None
python: 3.5.1.final.0
python-bits: 64
OS: Windows
OS-release: 7
machine: AMD64
processor: Intel64 Family 6 Model 60 Stepping 3, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None

pandas: 0.18.0
nose: 1.3.7
pip: 8.1.1
setuptools: 20.3
Cython: 0.23.4
numpy: 1.10.4
scipy: 0.17.0
statsmodels: 0.6.1
xarray: None
IPython: 4.1.2
sphinx: 1.3.1
patsy: 0.4.0
dateutil: 2.5.1
pytz: 2016.2
blosc: None
bottleneck: 1.0.0
tables: 3.2.2
numexpr: 2.5
matplotlib: 1.5.1
openpyxl: 2.3.2
xlrd: 0.9.4
xlwt: 1.0.0
xlsxwriter: 0.8.4
lxml: 3.6.0
bs4: 4.4.1
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: 1.0.12
pymysql: None
psycopg2: None
jinja2: 2.8
boto: 2.39.0
Issue 1:
The following script reliably causes a deadlock (or perhaps hanging for some other reason) on my machine. Not sure if it is a pytorch bug or a librosa bug.

import sys
from urllib.request import urlopen
from urllib.error import URLError
from torchvision.datasets import ImageFolder
from torch.utils.data import DataLoader
import librosa

# I am using the ImageFolder dataset to load audio data.
# To do this, I rename all my WAV files to end in .jpg
# so ImageFolder will think they are images and then
# load them with librosa. Note: it is important that there
# are no actual image files under ./data!

# The program hangs after printing
#
# trying to load ./data/foo/file.jpg
#
# However, if bug_condition is set to False, or if either
# fixes_bug1 or fixes_bug2 is set to True, then it does
# not hang.

bug_condition = True
fixes_bug1 = False
fixes_bug2 = False

if bug_condition:
try:
urlopen('http://localhost:8097')
except URLError:
pass
else:
sys.exit('please retry without a server running on port 8097')

if fixes_bug1:
# Note: ./data/foo/file.jpg must be a valid WAV file.
librosa.load('./data/foo/file.jpg')

def audio_loader(filename):
print('trying to load', filename)
audio = librosa.load(filename, sr=16000)[0]
print('loaded', filename)
return audio

data = ImageFolder(root='./data', loader=audio_loader)
loader = DataLoader(data, num_workers=(0 if fixes_bug2 else 1))

for x, y in loader:
print('OK')

Issue 2:
the bug is described at pytorch/examples#148. I just wonder if this is a bug in PyTorch itself, as the example code looks clean to me. Also, I wonder if this is related to #1120.
Issue 1:
Hi, I am doing an android demo for RNN. I built a two-layer GRU network for inference. I used the API tf.nn.dynamic_rnn. However, when using this API, the saved generated .pb file contains an op called "All". And after I moved my .pb file to assets directory and run my android app demo, it said the op "All" is not registered. I know I can register an op in /core/kernels/BUILD file. However, I didn't find such an op in BUILD file. What is it and how can I fix the problem?

Thank you very much!

Here is the .pb file:

node {

name: "Test/Model/RNN/RNN/All"

op: "All"

input: "Test/Model/RNN/RNN/Equal"

input: "Test/Model/RNN/RNN/Const"

attr {

key: "Tidx"

value {

type: DT_INT32

}

}

attr {

key: "keep_dims"

value {

b: false

}

}

}

Issue 2:
Hello folks.

Everytime I try to run the example fo TOCO:

import tensorflow as tf

img = tf.placeholder(name="img", dtype=tf.float32, shape=(1, 64, 64, 3))
val = img + tf.constant([1., 2., 3.]) + tf.constant([1., 4., 4.])
out = tf.identity(val, name="out")
with tf.Session() as sess:
tflite_model = tf.contrib.lite.toco_convert(sess.graph_def, [img], [out])
open("test.tflite", "wb").write(tflite_modeL)

I get the error: module 'tensorflow.contrib' has no attribute 'lite'

OS Platform and Distribution: Mac OS High Sierra

Tensorflow installed from pip version 1.4.1.

Python version: 2.7.14 and 3.6.3 :: Anaconda custom (64-bit)

The informations about my system are those:

== cat /etc/issue ===============================================

Darwin Leandros-MacBook-Pro.local 17.3.0 Darwin Kernel Version 17.3.0: Thu Nov 9 18:09:22 PST 2017; root:xnu-4570.31.3~1/RELEASE_X86_64 x86_64

Mac OS X 10.13.2

== are we in docker =============================================

No

== compiler =====================================================

Apple LLVM version 9.0.0 (clang-900.0.37)

Target: x86_64-apple-darwin17.3.0

Thread model: posix

InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

== uname -a =====================================================

Darwin Leandros-MacBook-Pro.local 17.3.0 Darwin Kernel Version 17.3.0: Thu Nov 9 18:09:22 PST 2017; root:xnu-4570.31.3~1/RELEASE_X86_64 x86_64

== check pips ===================================================

numpy (1.13.3)

numpydoc (0.7.0)

protobuf (3.5.0.post1)

tensorflow (1.3.0)

tensorflow-tensorboard (0.1.8)

== check for virtualenv =========================================

False

== tensorflow import ============================================

tf.VERSION = 1.3.0

tf.GIT_VERSION = v1.3.0-rc2-20-g0787eee

tf.COMPILER_VERSION = v1.3.0-rc2-20-g0787eee

Sanity check: array([1], dtype=int32)

== env ==========================================================

LD_LIBRARY_PATH is unset

DYLD_LIBRARY_PATH is unset

== nvidia-smi ===================================================

./tf_env_collect.sh: line 105: nvidia-smi: command not found

Seams like tensorflow lite is not available for reason =/

Sorry if this is not a bug and I am just being dumb about how to make TOCO works.
Issue 1:
Environment

Windows build number: 10.0.18362.175
Windows Terminal version (if applicable): 0.2.1715.0

Any other software? No

Steps to reproduce

Using a brazillian ABNT2 keyboard, open any terminal and type right alt + Q.

Expected behavior

This should type / in any type of terminal.

Actual behavior

When using bash, it deletes the rest of the typed line. When using powershell or cmd, it types ^_

Issue 2:
Your Windows build number:

10.0.18362.86

What you're doing and what's happening:

Trying to enter the @ sign on a Swedish keyboard in a PowerShell console using Alt Gr + 2.

See animated gif:

What's wrong / what should be happening instead:

Windows terminal shows digit-argument instead of outputting the @ sign as expected.

It's possible this is a PEBKAC error somehow but the problem doesn't show up in the normal PowerShell console... 😓
Issue 1:
I was playing with passing around a trait that only has static methods. It works okay, but it appears that this confuses the dead code lint. Here's an example:

trait Visitor<R> {
fn foo();
}

fn visit<V: Visitor<R>, R>() {
Visitor::<R>::foo()
}

struct V;

impl Visitor<()> for V {
fn foo() { println!("hi") }
}

pub fn main() {
visit()
}

Which warns with:

serde2.rs:9:1: 9:10 warning: struct is never used: `V`, #[warn(dead_code)] on by default
serde2.rs:9 struct V;
^~~~~~~~~

As best as I can tell, Rust is able to infer that there's only one implementation possible and uses it, but this information isn't conveyed to the lint, so it marks the struct as being unused.

Issue 2:
Issue 1:
Something within OpenCV's NONFREE library is triggering a fatal make error. The error message does not provide many clues:

[ 51%] Linking CXX shared library ../../lib/libopencv_cudaarithm.so

[ 51%] Built target opencv_cudaarithm

Makefile:162: recipe for target 'all' failed

make: *** [all] Error 2

m@DarkMatter:/DM_Util/_INSTALL_LINUX/OpenCV_4/OpenCV_4.2.0_2020jan16/opencv/build$

Line 162 in the Makefile is just the spec for make target, so no clues there either:

The main all target

all: cmake_check_build_system

$(CMAKE_COMMAND) -E cmake_progress_start

...

$(MAKE) -f CMakeFiles/Makefile2 all

$(CMAKE_COMMAND) -E cmake_progress_start

Additional notes: Though I have not seen this consistently between build attempts,

there is sometimes a non-fatal error re openGL. But this related indirectly to rgbd in the contrib lib.

[ 50%] Built target example_shape_shape_example

[ 50%] Built target opencv_test_shape

../../lib/libopencv_rgbd.so.4.2.0: undefined reference to glRenderbufferStorageEXT' ../../lib/libopencv_rgbd.so.4.2.0: undefined reference to glGenFramebuffersEXT'

../../lib/libopencv_rgbd.so.4.2.0: undefined reference to glBindRenderbufferEXT' ../../lib/libopencv_rgbd.so.4.2.0: undefined reference to glGenRenderbuffersEXT'

../../lib/libopencv_rgbd.so.4.2.0: undefined reference to glFramebufferRenderbufferEXT' ../../lib/libopencv_rgbd.so.4.2.0: undefined reference to glBindFramebufferEXT'

collect2: error: ld returned 1 exit status

modules/rgbd/CMakeFiles/opencv_test_rgbd.dir/build.make:192: recipe for target 'bin/opencv_test_rgbd' failed

make[2]: *** [bin/opencv_test_rgbd] Error 1

CMakeFiles/Makefile2:12517: recipe for target 'modules/rgbd/CMakeFiles/opencv_test_rgbd.dir/all' failed

make[1]: *** [modules/rgbd/CMakeFiles/opencv_test_rgbd.dir/all] Error 2

[ 50%] Built target opencv_datasets

[end]

Issue 2:
System information (version)

OpenCV => opencv.js 4.1.0-dev

Operating System / Platform => Version 74.0.3729.157 (Official Build) unknown (64-bit)

Compiler => opencv.js WASM build from master branch as described here.

Detailed description

Now the sample of face recognition with opencv.js just work for the asm.js version of, and doesn't work for the WASM version of opencv.js, saying cv.Mat is not a constructor in the console.log. Seems we need cv.onRuntimeInitialized=()=>{} for the loading of opencv.js WASM.

Steps to reproduce

Go to here
Issue 1:
I use deno in a Monorepo project witch nodejs and browser code.

And for now,webstorm only support one typescript language server. Actually, I did some work in babel,and now I can deliver code between node、deno and brower.

And I use vscode for deno,webstorm for node and brower.

What annoying me is, if I careless touch a deno file in webstrom,it alart me '.ts' error as you know.

Use deno and node in mix mode is the reality.

Actually,the reason I use deno is because,it is good to write TypeScript script. And I can obtain that ability via esbuild.

I think the incompatible in typescript import syntax,is a big mistake you should change.

deno is good,because if we make a huge program,we can use deno to isolate something.In that scope,what is important is we can tansfer any code from deno to node,and any code from node to deno.

In order to achieve this goal, my design(and I think is the common one) is use node develop code.and generate deno code.(because if a problem can solve in deno,it certainly can be solved in node,but not the other way around).

And I think it's good for deno to generate language syntax compatible design.

Meanwhile,I think npm discompatible is receivable,because this is higher than lanuage syntax,And we can do a lot to compat that layer.

Issue 2:
I made an example repo that allows someone to convert npm modules for use with deno.

https://github.com/reggi/node-to-deno

Not sure if anyone is interested or if this has been done before.

Is there any discussion for making polyfills node -> deno and deno -> node for standard lib? That's the next chunk needed to make some node modules work with deno.

Is there any discussion about something like a mixture of what I built and https://unpkg.com? A whole CDN registry that has npm modules ready to use with deno?
Issue 1:
Ian Wright opened SPR-9531 and commented

Overview

When executing SQL scripts using ResourceDatabasePopulator or JdbcTestUtils errors may occur if there are block comments in the file. In general multi-line comments using the /* ... */ syntax are not explicitly supported.

Notes

Proper support for standard SQL comments (i.e., any text beginning with two hyphens and extending to the end of the line) was introduced in #14616 and #14708. However, neither ResourceDatabasePopulator nor JdbcTestUtils contains explicit support for multi-line SQL comments.

Deliverables

Extract common functionality related to script parsing from ResourceDatabasePopulator and JdbcTestUtils into a new public component or utility in the org.springframework.jdbc.datasource.init package in the spring-jdbc module.

Support multi-line SQL comments in the component extracted in the previous deliverable.

Make the start and end delimiters for block comments configurable.

Affects: 3.1.1

Issue Links:

#16310 Support EOF as statement separator in SQL scripts ("is depended on by")

#16184 SQL Scripts with newline separators no longer work

#14616 Support comments within SQL statements in JdbcTestUtils

#14708 Support comments within SQL statements in ResourceDatabasePopulator

#20450 H2 aliases are not supported in SQL ScriptUtils

#16144 Support custom comment prefix in JdbcTestUtils.executeSqlScript()

#16188 Introduce SQL script exception hierarchy

Referenced from: commits 01b2f67, 7853e74, 9230b38, cc0ae3a, fbd2546, bb67cd4, 2bfd6dd, e5c1756

2 votes, 10 watchers

Issue 2:
Sam Brannen opened SPR-10075 and commented

Status Quo

The deficiency addressed by this issue is the same as that described in #14616 but for ResourceDatabasePopulator.

Deliverables

Refactor ResourceDatabasePopulator.splitSqlScript(String, String, String, List) so that:

Standard SQL comments (i.e., any text beginning with two hyphens and extending to the end of the line) are properly omitted from the statement before executing it.

Multiple adjacent whitespace characters within a statement but outside a literal are collapsed into a single space.

Affects: 3.1.3

Issue Links:

#14616 Support comments within SQL statements in JdbcTestUtils

#14165 Support multi-line SQL comments in ResourceDatabasePopulator and JdbcTestUtils

Referenced from: commits 8a422f4, aa16caa