diff --git a/dubhe-visual-server/backend/backend/api/api.py b/dubhe-visual-server/backend/backend/api/api.py index afe05fc..0bc73c3 100644 --- a/dubhe-visual-server/backend/backend/api/api.py +++ b/dubhe-visual-server/backend/backend/api/api.py @@ -1,18 +1,20 @@ # -*- coding: UTF-8 -*- -# Copyright 2020 Zhejiang Lab. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================= +""" + Copyright 2020 Tianshu AI Platform. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================= +""" from .utils import * from backend.component import * from django.views.decorators.gzip import gzip_page diff --git a/dubhe-visual-server/backend/backend/api/utils.py b/dubhe-visual-server/backend/backend/api/utils.py index 1394929..90d93c2 100644 --- a/dubhe-visual-server/backend/backend/api/utils.py +++ b/dubhe-visual-server/backend/backend/api/utils.py @@ -1,18 +1,20 @@ # -*- coding: UTF-8 -*- -# Copyright 2020 Zhejiang Lab. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================= +""" + Copyright 2020 Tianshu AI Platform. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================= +""" import re import time from pathlib import Path diff --git a/dubhe-visual-server/backend/backend/component/Audio/audio_read.py b/dubhe-visual-server/backend/backend/component/Audio/audio_read.py index 9f448ef..530758a 100644 --- a/dubhe-visual-server/backend/backend/component/Audio/audio_read.py +++ b/dubhe-visual-server/backend/backend/component/Audio/audio_read.py @@ -1,18 +1,20 @@ # -*- coding: UTF-8 -*- -# Copyright 2020 Zhejiang Lab. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================= +""" + Copyright 2020 Tianshu AI Platform. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================= +""" class audio_read: diff --git a/dubhe-visual-server/backend/backend/component/Audio/provider.py b/dubhe-visual-server/backend/backend/component/Audio/provider.py index 2897890..bb09e47 100644 --- a/dubhe-visual-server/backend/backend/component/Audio/provider.py +++ b/dubhe-visual-server/backend/backend/component/Audio/provider.py @@ -1,18 +1,20 @@ # -*- coding: UTF-8 -*- -# Copyright 2020 Zhejiang Lab. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================= +""" + Copyright 2020 Tianshu AI Platform. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================= +""" from utils.cache_io import CacheIO from utils.path_utils import get_file_path from .audio_read import audio_read diff --git a/dubhe-visual-server/backend/backend/component/Distribution/dist_read.py b/dubhe-visual-server/backend/backend/component/Distribution/dist_read.py index a2c3b08..ccc804c 100644 --- a/dubhe-visual-server/backend/backend/component/Distribution/dist_read.py +++ b/dubhe-visual-server/backend/backend/component/Distribution/dist_read.py @@ -1,18 +1,20 @@ # -*- coding: UTF-8 -*- -# Copyright 2020 Zhejiang Lab. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================= +""" + Copyright 2020 Tianshu AI Platform. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================= +""" import numpy as np from backend.component.Histogram.hist_read import histogram_read diff --git a/dubhe-visual-server/backend/backend/component/Distribution/provider.py b/dubhe-visual-server/backend/backend/component/Distribution/provider.py index a85a6cd..5633379 100644 --- a/dubhe-visual-server/backend/backend/component/Distribution/provider.py +++ b/dubhe-visual-server/backend/backend/component/Distribution/provider.py @@ -1,18 +1,20 @@ # -*- coding: UTF-8 -*- -# Copyright 2020 Zhejiang Lab. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================= +""" + Copyright 2020 Tianshu AI Platform. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================= +""" from utils.cache_io import CacheIO from utils.path_utils import get_file_path from .dist_read import distribution_read diff --git a/dubhe-visual-server/backend/backend/component/Exception/exception_read.py b/dubhe-visual-server/backend/backend/component/Exception/exception_read.py index 9e62f40..860cff6 100644 --- a/dubhe-visual-server/backend/backend/component/Exception/exception_read.py +++ b/dubhe-visual-server/backend/backend/component/Exception/exception_read.py @@ -1,18 +1,20 @@ # -*- coding: UTF-8 -*- -# Copyright 2020 Zhejiang Lab. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================= +""" + Copyright 2020 Tianshu AI Platform. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================= +""" import numpy as np import math from .histogram import Histogram diff --git a/dubhe-visual-server/backend/backend/component/Exception/histogram.py b/dubhe-visual-server/backend/backend/component/Exception/histogram.py index edf41ca..fd9e171 100644 --- a/dubhe-visual-server/backend/backend/component/Exception/histogram.py +++ b/dubhe-visual-server/backend/backend/component/Exception/histogram.py @@ -1,18 +1,20 @@ # -*- coding: UTF-8 -*- -# Copyright 2020 Zhejiang Lab. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================= +""" + Copyright 2020 Tianshu AI Platform. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================= +""" import numpy as np diff --git a/dubhe-visual-server/backend/backend/component/Exception/provider.py b/dubhe-visual-server/backend/backend/component/Exception/provider.py index 1b5da8b..d113017 100644 --- a/dubhe-visual-server/backend/backend/component/Exception/provider.py +++ b/dubhe-visual-server/backend/backend/component/Exception/provider.py @@ -1,18 +1,20 @@ # -*- coding: UTF-8 -*- -# Copyright 2020 Zhejiang Lab. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================= +""" + Copyright 2020 Tianshu AI Platform. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================= +""" from utils.cache_io import CacheIO from utils.path_utils import get_file_path from .exception_read import Exception_read diff --git a/dubhe-visual-server/backend/backend/component/Graph/graph.py b/dubhe-visual-server/backend/backend/component/Graph/graph.py index 53d2989..c83efce 100644 --- a/dubhe-visual-server/backend/backend/component/Graph/graph.py +++ b/dubhe-visual-server/backend/backend/component/Graph/graph.py @@ -1,18 +1,20 @@ # -*- coding: UTF-8 -*- -# Copyright 2020 Zhejiang Lab. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================= +""" + Copyright 2020 Tianshu AI Platform. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================= +""" from __future__ import division, print_function, with_statement from __future__ import unicode_literals # at top of module diff --git a/dubhe-visual-server/backend/backend/component/Graph/graph_read.py b/dubhe-visual-server/backend/backend/component/Graph/graph_read.py index ccb22f8..7c19732 100644 --- a/dubhe-visual-server/backend/backend/component/Graph/graph_read.py +++ b/dubhe-visual-server/backend/backend/component/Graph/graph_read.py @@ -1,18 +1,20 @@ # -*- coding: UTF-8 -*- -# Copyright 2020 Zhejiang Lab. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================= +""" + Copyright 2020 Tianshu AI Platform. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================= +""" from backend.component.Graph.graph import Node from backend.component.Graph.graph import Proxy diff --git a/dubhe-visual-server/backend/backend/component/Graph/parse_json.py b/dubhe-visual-server/backend/backend/component/Graph/parse_json.py index 585def2..32f096a 100644 --- a/dubhe-visual-server/backend/backend/component/Graph/parse_json.py +++ b/dubhe-visual-server/backend/backend/component/Graph/parse_json.py @@ -1,18 +1,20 @@ # -*- coding: UTF-8 -*- -# Copyright 2020 Zhejiang Lab. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================= +""" + Copyright 2020 Tianshu AI Platform. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================= +""" from .graph import Node, Graph, TreeNode from collections import defaultdict diff --git a/dubhe-visual-server/backend/backend/component/Graph/provider.py b/dubhe-visual-server/backend/backend/component/Graph/provider.py index 960c823..edba36e 100644 --- a/dubhe-visual-server/backend/backend/component/Graph/provider.py +++ b/dubhe-visual-server/backend/backend/component/Graph/provider.py @@ -1,18 +1,20 @@ # -*- coding: UTF-8 -*- -# Copyright 2020 Zhejiang Lab. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================= +""" + Copyright 2020 Tianshu AI Platform. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================= +""" import json from utils.cache_io import CacheIO from utils.path_utils import get_file_path diff --git a/dubhe-visual-server/backend/backend/component/Graph/s_graph_read.py b/dubhe-visual-server/backend/backend/component/Graph/s_graph_read.py index e1749ab..e3e80f8 100644 --- a/dubhe-visual-server/backend/backend/component/Graph/s_graph_read.py +++ b/dubhe-visual-server/backend/backend/component/Graph/s_graph_read.py @@ -1,18 +1,20 @@ # -*- coding: UTF-8 -*- -# Copyright 2020 Zhejiang Lab. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================= +""" + Copyright 2020 Tianshu AI Platform. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================= +""" import json from backend.component.Graph.parse_json import Proxy_json from backend.component.Graph.graph import Node diff --git a/dubhe-visual-server/backend/backend/component/Histogram/hist_read.py b/dubhe-visual-server/backend/backend/component/Histogram/hist_read.py index c97cad6..c7d709e 100644 --- a/dubhe-visual-server/backend/backend/component/Histogram/hist_read.py +++ b/dubhe-visual-server/backend/backend/component/Histogram/hist_read.py @@ -1,18 +1,20 @@ # -*- coding: UTF-8 -*- -# Copyright 2020 Zhejiang Lab. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================= +""" + Copyright 2020 Tianshu AI Platform. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================= +""" import random diff --git a/dubhe-visual-server/backend/backend/component/Histogram/hist_summary.py b/dubhe-visual-server/backend/backend/component/Histogram/hist_summary.py index 3d54d28..be80c38 100644 --- a/dubhe-visual-server/backend/backend/component/Histogram/hist_summary.py +++ b/dubhe-visual-server/backend/backend/component/Histogram/hist_summary.py @@ -1,18 +1,20 @@ # -*- coding: UTF-8 -*- -# Copyright 2020 Zhejiang Lab. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================= +""" + Copyright 2020 Tianshu AI Platform. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================= +""" import numpy as np diff --git a/dubhe-visual-server/backend/backend/component/Histogram/provider.py b/dubhe-visual-server/backend/backend/component/Histogram/provider.py index 345e44a..ca30fae 100644 --- a/dubhe-visual-server/backend/backend/component/Histogram/provider.py +++ b/dubhe-visual-server/backend/backend/component/Histogram/provider.py @@ -1,18 +1,20 @@ # -*- coding: UTF-8 -*- -# Copyright 2020 Zhejiang Lab. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================= +""" + Copyright 2020 Tianshu AI Platform. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================= +""" from utils.cache_io import CacheIO from .hist_read import histogram_read from utils.path_utils import get_file_path diff --git a/dubhe-visual-server/backend/backend/component/Hparams/hparams_read.py b/dubhe-visual-server/backend/backend/component/Hparams/hparams_read.py index 75a9e2e..72baa98 100644 --- a/dubhe-visual-server/backend/backend/component/Hparams/hparams_read.py +++ b/dubhe-visual-server/backend/backend/component/Hparams/hparams_read.py @@ -1,18 +1,20 @@ # -*- coding: UTF-8 -*- -# Copyright 2020 Zhejiang Lab. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================= +""" + Copyright 2020 Tianshu AI Platform. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================= +""" def get_proto_value(value): _data = None if value.HasField("number_value"): diff --git a/dubhe-visual-server/backend/backend/component/Hparams/provider.py b/dubhe-visual-server/backend/backend/component/Hparams/provider.py index e578926..3c9834b 100644 --- a/dubhe-visual-server/backend/backend/component/Hparams/provider.py +++ b/dubhe-visual-server/backend/backend/component/Hparams/provider.py @@ -1,18 +1,20 @@ # -*- coding: UTF-8 -*- -# Copyright 2020 Zhejiang Lab. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================= +""" + Copyright 2020 Tianshu AI Platform. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================= +""" from utils.cache_io import CacheIO from .hparams_read import hparams_read from utils.path_utils import get_file_path diff --git a/dubhe-visual-server/backend/backend/component/Image/image_read.py b/dubhe-visual-server/backend/backend/component/Image/image_read.py index 14e3177..4dc8b22 100644 --- a/dubhe-visual-server/backend/backend/component/Image/image_read.py +++ b/dubhe-visual-server/backend/backend/component/Image/image_read.py @@ -1,18 +1,20 @@ # -*- coding: UTF-8 -*- -# Copyright 2020 Zhejiang Lab. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================= +""" + Copyright 2020 Tianshu AI Platform. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================= +""" class image_read: diff --git a/dubhe-visual-server/backend/backend/component/Image/provider.py b/dubhe-visual-server/backend/backend/component/Image/provider.py index 9829778..727916a 100644 --- a/dubhe-visual-server/backend/backend/component/Image/provider.py +++ b/dubhe-visual-server/backend/backend/component/Image/provider.py @@ -1,18 +1,20 @@ # -*- coding: UTF-8 -*- -# Copyright 2020 Zhejiang Lab. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================= +""" + Copyright 2020 Tianshu AI Platform. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================= +""" from utils.cache_io import CacheIO from utils.path_utils import get_file_path from .image_read import image_read diff --git a/dubhe-visual-server/backend/backend/component/Projector/projector_read.py b/dubhe-visual-server/backend/backend/component/Projector/projector_read.py index b6c5c35..de204c2 100644 --- a/dubhe-visual-server/backend/backend/component/Projector/projector_read.py +++ b/dubhe-visual-server/backend/backend/component/Projector/projector_read.py @@ -1,18 +1,20 @@ # -*- coding: UTF-8 -*- -# Copyright 2020 Zhejiang Lab. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================= +""" + Copyright 2020 Tianshu AI Platform. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================= +""" class projector_read: diff --git a/dubhe-visual-server/backend/backend/component/Projector/projector_reduction.py b/dubhe-visual-server/backend/backend/component/Projector/projector_reduction.py index adea72a..d11eede 100644 --- a/dubhe-visual-server/backend/backend/component/Projector/projector_reduction.py +++ b/dubhe-visual-server/backend/backend/component/Projector/projector_reduction.py @@ -1,22 +1,25 @@ # -*- coding: UTF-8 -*- -# Copyright 2020 Zhejiang Lab. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================= +""" + Copyright 2020 Tianshu AI Platform. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================= +""" from sklearn.decomposition import PCA import numpy as np from tsne import bh_sne + class projector_reduction: def __init__(self, data, method, dimension=None): self.data = self.data_preprocess(data) diff --git a/dubhe-visual-server/backend/backend/component/Projector/provider.py b/dubhe-visual-server/backend/backend/component/Projector/provider.py index f5f7692..0b747f1 100644 --- a/dubhe-visual-server/backend/backend/component/Projector/provider.py +++ b/dubhe-visual-server/backend/backend/component/Projector/provider.py @@ -1,18 +1,20 @@ # -*- coding: UTF-8 -*- -# Copyright 2020 Zhejiang Lab. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================= +""" + Copyright 2020 Tianshu AI Platform. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================= +""" from PIL import Image import io from utils.cache_io import CacheIO diff --git a/dubhe-visual-server/backend/backend/component/Scalar/provider.py b/dubhe-visual-server/backend/backend/component/Scalar/provider.py index b444f80..8a2d2c9 100644 --- a/dubhe-visual-server/backend/backend/component/Scalar/provider.py +++ b/dubhe-visual-server/backend/backend/component/Scalar/provider.py @@ -1,18 +1,20 @@ # -*- coding: UTF-8 -*- -# Copyright 2020 Zhejiang Lab. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================= +""" + Copyright 2020 Tianshu AI Platform. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================= +""" from utils.cache_io import CacheIO from .scalar_read import scalar_read from utils.path_utils import get_file_path diff --git a/dubhe-visual-server/backend/backend/component/Scalar/scalar_read.py b/dubhe-visual-server/backend/backend/component/Scalar/scalar_read.py index a858fe0..d2c6f30 100644 --- a/dubhe-visual-server/backend/backend/component/Scalar/scalar_read.py +++ b/dubhe-visual-server/backend/backend/component/Scalar/scalar_read.py @@ -1,18 +1,20 @@ # -*- coding: UTF-8 -*- -# Copyright 2020 Zhejiang Lab. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================= +""" + Copyright 2020 Tianshu AI Platform. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================= +""" class scalar_read: diff --git a/dubhe-visual-server/backend/backend/component/Text/provider.py b/dubhe-visual-server/backend/backend/component/Text/provider.py index 1f96e65..6c74437 100644 --- a/dubhe-visual-server/backend/backend/component/Text/provider.py +++ b/dubhe-visual-server/backend/backend/component/Text/provider.py @@ -1,18 +1,20 @@ # -*- coding: UTF-8 -*- -# Copyright 2020 Zhejiang Lab. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================= +""" + Copyright 2020 Tianshu AI Platform. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================= +""" from utils.cache_io import CacheIO from utils.path_utils import get_file_path from .text_read import text_read diff --git a/dubhe-visual-server/backend/backend/component/Text/text_read.py b/dubhe-visual-server/backend/backend/component/Text/text_read.py index 8f4fbf5..1bce5eb 100644 --- a/dubhe-visual-server/backend/backend/component/Text/text_read.py +++ b/dubhe-visual-server/backend/backend/component/Text/text_read.py @@ -1,18 +1,20 @@ # -*- coding: UTF-8 -*- -# Copyright 2020 Zhejiang Lab. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================= +""" + Copyright 2020 Tianshu AI Platform. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================= +""" def _warp_values(values): diff --git a/dubhe-visual-server/backend/backend/component/__init__.py b/dubhe-visual-server/backend/backend/component/__init__.py index e84bcb5..6689a75 100644 --- a/dubhe-visual-server/backend/backend/component/__init__.py +++ b/dubhe-visual-server/backend/backend/component/__init__.py @@ -1,18 +1,20 @@ # -*- coding: UTF-8 -*- -# Copyright 2020 Zhejiang Lab. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================= +""" + Copyright 2020 Tianshu AI Platform. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================= +""" __all__ = [ "get_scalar_data", "get_histogram_data", "get_distribution_data", "get_text_data", "get_audio_meta_data", "get_audio_data", diff --git a/dubhe-visual-server/backend/backend/data_provider/session_mdw.py b/dubhe-visual-server/backend/backend/data_provider/session_mdw.py index e097d03..5cec794 100644 --- a/dubhe-visual-server/backend/backend/data_provider/session_mdw.py +++ b/dubhe-visual-server/backend/backend/data_provider/session_mdw.py @@ -1,18 +1,20 @@ # -*- coding: UTF-8 -*- -# Copyright 2020 Zhejiang Lab. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================= +""" + Copyright 2020 Tianshu AI Platform. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================= +""" from django.http import JsonResponse diff --git a/dubhe-visual-server/backend/main.py b/dubhe-visual-server/backend/main.py index f7d11f6..75c353f 100644 --- a/dubhe-visual-server/backend/main.py +++ b/dubhe-visual-server/backend/main.py @@ -1,18 +1,20 @@ # -*- coding: UTF-8 -*- -# Copyright 2020 Zhejiang Lab. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================= +""" + Copyright 2020 Tianshu AI Platform. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================= +""" from absl import app, flags import manage import sys diff --git a/dubhe-visual-server/init.sh b/dubhe-visual-server/init.sh index ded5905..fcf5a21 100644 --- a/dubhe-visual-server/init.sh +++ b/dubhe-visual-server/init.sh @@ -1,11 +1,24 @@ #!/bin/bash +echo '开始下载anaconda,版本Anaconda3-2020.07-Linux-x86_64 ...' wget https://repo.anaconda.com/archive/Anaconda3-2020.07-Linux-x86_64.sh + +echo '安装anaconda环境 ...' + bash Anaconda3-2020.07-Linux-x86_64.sh echo 'export PATH=$PATH:/root/anaconda3/bin'>>/root/.bashrc source /root/.bashrc +echo 'conda 安装完毕,执行依赖环境初始化操作...' + conda env create --file dubhe_visual.yaml -echo '环境初始化成功,启动服务请执行:source start_server.sh' +echo 'conda dubhe_visual虚拟环境初始化成功,进入环境并执行数据初始化操作...' + +conda activate dubhe_visual + +cd backend/ +python manage.py migrate + +echo '数据库初始化成功,启动服务请执行:source start_server.sh' diff --git a/dubhe-visual-server/parser_service/master.py b/dubhe-visual-server/parser_service/master.py index 5aae4ee..4eb76e9 100644 --- a/dubhe-visual-server/parser_service/master.py +++ b/dubhe-visual-server/parser_service/master.py @@ -1,18 +1,20 @@ # -*- coding: UTF-8 -*- -# Copyright 2020 Zhejiang Lab. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================= +""" + Copyright 2020 Tianshu AI Platform. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================= +""" import sys sys.path.append('../service_utils') from python_io import logfile_utils diff --git a/dubhe-visual-server/parser_service/python_io/dictionary_watcher.py b/dubhe-visual-server/parser_service/python_io/dictionary_watcher.py index 5b1ca1f..6fe2d3f 100644 --- a/dubhe-visual-server/parser_service/python_io/dictionary_watcher.py +++ b/dubhe-visual-server/parser_service/python_io/dictionary_watcher.py @@ -1,18 +1,20 @@ # -*- coding: UTF-8 -*- -# Copyright 2020 Zhejiang Lab. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================= +""" + Copyright 2020 Tianshu AI Platform. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================= +""" import os from watchdog.observers.polling import PollingObserver from watchdog.events import * diff --git a/dubhe-visual-server/parser_service/python_io/lazy_load.py b/dubhe-visual-server/parser_service/python_io/lazy_load.py index 3971b61..fa61faa 100644 --- a/dubhe-visual-server/parser_service/python_io/lazy_load.py +++ b/dubhe-visual-server/parser_service/python_io/lazy_load.py @@ -1,18 +1,20 @@ # -*- coding: UTF-8 -*- -# Copyright 2020 Zhejiang Lab. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================= +""" + Copyright 2020 Tianshu AI Platform. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================= +""" from pathlib import Path from typing import Union import os diff --git a/dubhe-visual-server/parser_service/python_io/logfile_loader.py b/dubhe-visual-server/parser_service/python_io/logfile_loader.py index 07d44fa..6032f9e 100644 --- a/dubhe-visual-server/parser_service/python_io/logfile_loader.py +++ b/dubhe-visual-server/parser_service/python_io/logfile_loader.py @@ -1,18 +1,20 @@ # -*- coding: UTF-8 -*- -# Copyright 2020 Zhejiang Lab. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================= +""" + Copyright 2020 Tianshu AI Platform. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================= +""" import threading import time from io import BytesIO diff --git a/dubhe-visual-server/parser_service/python_io/logfile_utils.py b/dubhe-visual-server/parser_service/python_io/logfile_utils.py index f7ff85f..226f43e 100644 --- a/dubhe-visual-server/parser_service/python_io/logfile_utils.py +++ b/dubhe-visual-server/parser_service/python_io/logfile_utils.py @@ -1,18 +1,20 @@ # -*- coding: UTF-8 -*- -# Copyright 2020 Zhejiang Lab. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================= +""" + Copyright 2020 Tianshu AI Platform. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================= +""" from pathlib import Path diff --git a/dubhe-visual-server/parser_service/tbparser/graph_reader.py b/dubhe-visual-server/parser_service/tbparser/graph_reader.py index 4cfa0c7..20e34ea 100644 --- a/dubhe-visual-server/parser_service/tbparser/graph_reader.py +++ b/dubhe-visual-server/parser_service/tbparser/graph_reader.py @@ -1,18 +1,20 @@ # -*- coding: UTF-8 -*- -# Copyright 2020 Zhejiang Lab. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================= +""" + Copyright 2020 Tianshu AI Platform. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================= +""" from tbparser.events_reader import EventReadingError, EventsFileReader from tensorboard.compat.proto.graph_pb2 import GraphDef from pathlib import Path diff --git a/dubhe-visual-server/parser_service/tbparser/projector_reader.py b/dubhe-visual-server/parser_service/tbparser/projector_reader.py index 5f08848..38cbff6 100644 --- a/dubhe-visual-server/parser_service/tbparser/projector_reader.py +++ b/dubhe-visual-server/parser_service/tbparser/projector_reader.py @@ -1,18 +1,20 @@ # -*- coding: UTF-8 -*- -# Copyright 2020 Zhejiang Lab. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================= +""" + Copyright 2020 Tianshu AI Platform. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================= +""" from oneflow.customized.utils import projector_pb2 from collections.abc import Iterable from typing import BinaryIO diff --git a/dubhe-visual-server/service_utils/monitor.py b/dubhe-visual-server/service_utils/monitor.py index 5b7cc0d..cf2e9a0 100644 --- a/dubhe-visual-server/service_utils/monitor.py +++ b/dubhe-visual-server/service_utils/monitor.py @@ -1,18 +1,20 @@ # -*- coding: UTF-8 -*- -# Copyright 2020 Zhejiang Lab. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================= +""" + Copyright 2020 Tianshu AI Platform. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================= +""" from utils.redis_utils import RedisInstance import json import time diff --git a/dubhe-visual-server/service_utils/utils/cache_io.py b/dubhe-visual-server/service_utils/utils/cache_io.py index 0ef35e4..dd8f8bf 100644 --- a/dubhe-visual-server/service_utils/utils/cache_io.py +++ b/dubhe-visual-server/service_utils/utils/cache_io.py @@ -1,18 +1,20 @@ # -*- coding: UTF-8 -*- -# Copyright 2020 Zhejiang Lab. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================= +""" + Copyright 2020 Tianshu AI Platform. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================= +""" import pickle diff --git a/dubhe-visual-server/service_utils/utils/config_utils.py b/dubhe-visual-server/service_utils/utils/config_utils.py index ebc6888..eecb7dc 100644 --- a/dubhe-visual-server/service_utils/utils/config_utils.py +++ b/dubhe-visual-server/service_utils/utils/config_utils.py @@ -1,18 +1,20 @@ # -*- coding: UTF-8 -*- -# Copyright 2020 Zhejiang Lab. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================= +""" + Copyright 2020 Tianshu AI Platform. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================= +""" import configparser from os import path diff --git a/dubhe-visual-server/service_utils/utils/path_utils.py b/dubhe-visual-server/service_utils/utils/path_utils.py index 92a7933..acb9918 100644 --- a/dubhe-visual-server/service_utils/utils/path_utils.py +++ b/dubhe-visual-server/service_utils/utils/path_utils.py @@ -1,18 +1,20 @@ # -*- coding: UTF-8 -*- -# Copyright 2020 Zhejiang Lab. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================= +""" + Copyright 2020 Tianshu AI Platform. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================= +""" from pathlib import Path from .redis_utils import RedisInstance from .config_utils import ConfigInstance diff --git a/dubhe-visual-server/service_utils/utils/redis_utils.py b/dubhe-visual-server/service_utils/utils/redis_utils.py index ad9a0d2..b8604d5 100644 --- a/dubhe-visual-server/service_utils/utils/redis_utils.py +++ b/dubhe-visual-server/service_utils/utils/redis_utils.py @@ -1,18 +1,20 @@ # -*- coding: UTF-8 -*- -# Copyright 2020 Zhejiang Lab. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================= +""" + Copyright 2020 Tianshu AI Platform. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============================================================= +""" import redis from pathlib import Path from .config_utils import ConfigInstance diff --git a/dubhe-visual-server/start_server.sh b/dubhe-visual-server/start_server.sh index 407a3e8..06e3c91 100644 --- a/dubhe-visual-server/start_server.sh +++ b/dubhe-visual-server/start_server.sh @@ -8,11 +8,11 @@ cd backend/ nohup python $DIRNAME/backend/main.py --port 9898 >django.log 2>&1 & echo 'http 服务启动' -cd parser_service/ +cd ../parser_service/ nohup python $DIRNAME/parser_service/master.py >server.log 2>&1 & echo 'parser 服务启动' -cd service_utils/ +cd ../service_utils/ nohup python $DIRNAME/service_utils/monitor.py >monitor.log 2>&1 & echo 'monitor 服务启动'