Skip to content

Commit

Permalink
added licence comments
Browse files Browse the repository at this point in the history
  • Loading branch information
vahagpetrosyan committed Mar 19, 2024
1 parent 5992c94 commit 221d7f0
Show file tree
Hide file tree
Showing 85 changed files with 1,444 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Ethosight/Ethosight/ChatGPTReasoner.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@

# Copyright 2022 Cisco Systems, Inc. and its affiliates
#
# 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.
#
# SPDX-License-Identifier: Apache-2.0

import os
import openai
import requests
Expand Down
17 changes: 17 additions & 0 deletions Ethosight/Ethosight/Ethosight.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@

# Copyright 2022 Cisco Systems, Inc. and its affiliates
#
# 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.
#
# SPDX-License-Identifier: Apache-2.0

# Ethosight environment variables
# EthosightBackend: "core" or "client"
# EthosightBackendURL: URL for EthosightRESTClient backend e.g. http://localhost:8000
Expand Down
17 changes: 17 additions & 0 deletions Ethosight/Ethosight/EthosightApp.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@

# Copyright 2022 Cisco Systems, Inc. and its affiliates
#
# 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.
#
# SPDX-License-Identifier: Apache-2.0

from .EthosightMediaAnalyzer import EthosightMediaAnalyzer, EthosightOutput
from .LabelSpaceOptimization import SemanticRelationsOptimization, SemanticSimilarityOptimization
from ruamel.yaml import YAML
Expand Down
17 changes: 17 additions & 0 deletions Ethosight/Ethosight/EthosightAppCLI.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@

# Copyright 2022 Cisco Systems, Inc. and its affiliates
#
# 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.
#
# SPDX-License-Identifier: Apache-2.0

#!/usr/bin/env python3
import click
from .EthosightApp import EthosightApp
Expand Down
17 changes: 17 additions & 0 deletions Ethosight/Ethosight/EthosightCLI.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@

# Copyright 2022 Cisco Systems, Inc. and its affiliates
#
# 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.
#
# SPDX-License-Identifier: Apache-2.0

#!/usr/bin/env python3
import click
import os
Expand Down
17 changes: 17 additions & 0 deletions Ethosight/Ethosight/EthosightCore.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@

# Copyright 2022 Cisco Systems, Inc. and its affiliates
#
# 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.
#
# SPDX-License-Identifier: Apache-2.0

import os
import torch
from models import imagebind_model
Expand Down
17 changes: 17 additions & 0 deletions Ethosight/Ethosight/EthosightDatasetCLI.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@

# Copyright 2022 Cisco Systems, Inc. and its affiliates
#
# 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.
#
# SPDX-License-Identifier: Apache-2.0

#!/usr/bin/env python3
import os
import csv
Expand Down
17 changes: 17 additions & 0 deletions Ethosight/Ethosight/EthosightMediaAnalyzer.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@

# Copyright 2022 Cisco Systems, Inc. and its affiliates
#
# 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.
#
# SPDX-License-Identifier: Apache-2.0

import os
import copy
import yaml
Expand Down
17 changes: 17 additions & 0 deletions Ethosight/Ethosight/EthosightMediaAnalyzerCLI.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@

# Copyright 2022 Cisco Systems, Inc. and its affiliates
#
# 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.
#
# SPDX-License-Identifier: Apache-2.0

#!/usr/bin/env python3
import click
import yaml
Expand Down
17 changes: 17 additions & 0 deletions Ethosight/Ethosight/EthosightRESTClient.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@

# Copyright 2022 Cisco Systems, Inc. and its affiliates
#
# 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.
#
# SPDX-License-Identifier: Apache-2.0

import requests
import os
from Ethosight.EthosightCore import EthosightCore
Expand Down
17 changes: 17 additions & 0 deletions Ethosight/Ethosight/EthosightRESTServer.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@

# Copyright 2022 Cisco Systems, Inc. and its affiliates
#
# 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.
#
# SPDX-License-Identifier: Apache-2.0

#!/usr/bin/env python3
from fastapi import FastAPI, HTTPException, UploadFile, File, Depends, status, Form
from fastapi.encoders import jsonable_encoder
Expand Down
17 changes: 17 additions & 0 deletions Ethosight/Ethosight/LabelSpaceOptimization.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@

# Copyright 2022 Cisco Systems, Inc. and its affiliates
#
# 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.
#
# SPDX-License-Identifier: Apache-2.0

from abc import ABC, abstractmethod
from .ChatGPTReasoner import ChatGPTReasoner
from tqdm import tqdm
Expand Down
17 changes: 17 additions & 0 deletions Ethosight/Ethosight/NARSGPTReasoner.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@

# Copyright 2022 Cisco Systems, Inc. and its affiliates
#
# 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.
#
# SPDX-License-Identifier: Apache-2.0

import os
import sys
import torch
Expand Down
17 changes: 17 additions & 0 deletions Ethosight/Ethosight/NARSReasoner.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@

# Copyright 2022 Cisco Systems, Inc. and its affiliates
#
# 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.
#
# SPDX-License-Identifier: Apache-2.0

import os
import sys
with open("NARSReasoner_knowledge.nal","r") as f:
Expand Down
17 changes: 17 additions & 0 deletions Ethosight/Ethosight/ReasonerInterface.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@

# Copyright 2022 Cisco Systems, Inc. and its affiliates
#
# 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.
#
# SPDX-License-Identifier: Apache-2.0

from abc import ABC, abstractmethod

class AbstractReasoner(ABC):
Expand Down
17 changes: 17 additions & 0 deletions Ethosight/Ethosight/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@

# Copyright 2022 Cisco Systems, Inc. and its affiliates
#
# 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.
#
# SPDX-License-Identifier: Apache-2.0

from .Ethosight import Ethosight
from .EthosightMediaAnalyzer import EthosightMediaAnalyzer
from .ChatGPTReasoner import ChatGPTReasoner
17 changes: 17 additions & 0 deletions Ethosight/Ethosight/langchain_reasoner.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@

# Copyright 2022 Cisco Systems, Inc. and its affiliates
#
# 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.
#
# SPDX-License-Identifier: Apache-2.0

from .ReasonerInterface import AbstractReasoner
from langchain.chat_models import ChatOpenAI
from langchain.prompts import PromptTemplate
Expand Down
17 changes: 17 additions & 0 deletions Ethosight/Ethosight/llama_index_reasoner.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@

# Copyright 2022 Cisco Systems, Inc. and its affiliates
#
# 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.
#
# SPDX-License-Identifier: Apache-2.0

from .ReasonerInterface import AbstractReasoner
from llama_index import (
Document,
Expand Down
17 changes: 17 additions & 0 deletions Ethosight/Ethosight/shared_models.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@

# Copyright 2022 Cisco Systems, Inc. and its affiliates
#
# 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.
#
# SPDX-License-Identifier: Apache-2.0

# shared_models.py

from pydantic import BaseModel
Expand Down
Loading

0 comments on commit 221d7f0

Please sign in to comment.