index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
12,138
g2-inc/openc2-oif-orchestrator
refs/heads/master
/base/modules/utils/root/sb_utils/message/pysmile/encode.py
#!/usr/bin/env python """ SMILE Encode """ import copy import decimal import logging import struct from typing import ( Callable, Dict, Type, Union ) from . import util from .constants import ( BYTE_MARKER_END_OF_CONTENT, BYTE_MARKER_END_OF_STRING, HEADER_BIT_HAS_RAW_BINARY, HEADER_BIT...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,139
g2-inc/openc2-oif-orchestrator
refs/heads/master
/base/modules/utils/twisted/sb_utils/__init__.py
""" Screaming Bunny Utils Twisted namespace """ from pkgutil import extend_path __path__ = extend_path(__path__, __name__) from .twisted_tools import PikaFactory, PikaProtocol __all__ = [ # Twisted Tools 'PikaFactory', 'PikaProtocol' ]
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,140
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/transport/https/HTTPS/main.py
import re from datetime import datetime from flask import Flask, request, make_response from sb_utils import Producer, decode_msg, encode_msg, default_encode, safe_json app = Flask(__name__) @app.route("/", methods=["POST"]) def result(): encode = re.search(r"(?<=\+)(.*?)(?=\;)", request.headers["Content-type"]...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,141
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/utils/messageQueue.py
""" Combination of AMQP Consumer/Producer as class for easier access within the Orchestrator code """ from sb_utils import safe_cast, Consumer, FrozenDict, Producer class MessageQueue: _auth = FrozenDict({ 'username': 'guest', 'password': 'guest' }) _exchange = 'orchestrator' _consumer...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,142
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/gui/server/gui_server/webApp/routing.py
from channels.auth import AuthMiddlewareStack from channels.routing import ProtocolTypeRouter, URLRouter from django.urls import path from .sockets import SocketConsumer application = ProtocolTypeRouter({ # (http->django views is added by default) 'websocket': AuthMiddlewareStack( URLRouter([ ...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,143
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/orchestrator/views/__init__.py
from .api import api_favicon, api_root from .gui import gui_redirect from .handlers import bad_request, page_not_found, permission_denied, server_error __all__ = [ # API 'api_favicon', 'api_root', # GUI 'gui_redirect', # Handlers 'bad_request', 'page_not_found', 'permission_denied',...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,144
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/account/views/apiviews.py
import bleach import coreapi import coreschema from django.contrib.auth.models import Group, User from rest_framework import permissions from rest_framework.exceptions import ParseError from rest_framework.response import Response from rest_framework.views import APIView # Local imports import utils from actuator.mod...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,145
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/device/views/viewsets.py
from django.db.utils import IntegrityError from django.contrib.auth.models import User from rest_framework import filters, status, viewsets from rest_framework.decorators import action from rest_framework.exceptions import PermissionDenied from rest_framework.permissions import IsAdminUser, IsAuthenticated from rest_f...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,146
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/gui/server/gui_server/webApp/templatetags/var_dump.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django import template from django.template.defaultfilters import linebreaksbr from django.utils.html import escape from django.utils.safestring import mark_safe from pprint import pformat register = template.Library() @register.filter def var_du...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,147
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/orchestrator/views/api.py
import importlib import os from django.conf import settings from django.http import FileResponse from dynamic_preferences.registries import global_preferences_registry from inspect import isfunction from rest_framework import permissions from rest_framework.decorators import api_view, permission_classes from rest_fram...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,148
g2-inc/openc2-oif-orchestrator
refs/heads/master
/base/modules/utils/root/sb_utils/__init__.py
""" Screaming Bunny Utils Root Namespace """ from pkgutil import extend_path __path__ = extend_path(__path__, __name__) from .amqp_tools import Consumer, Producer from .general import prefixUUID, default_decode, default_encode, safe_cast, safe_json, toStr from .ext_dicts import FrozenDict, ObjectDict, QueryDict from ....
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,149
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/utils/__init__.py
from sb_utils import decode_msg, encode_msg, FrozenDict, safe_cast # Local imports from .general import isHex, prefixUUID, randBytes, to_str from .messageQueue import MessageQueue from .model import get_or_none, ReadOnlyModelAdmin from .permissions import IsAdminOrIsSelf from .schema import OrcSchema __all__ = [ ...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,150
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/gui/server/gui_server/webApp/sockets.py
import json from channels.generic.websocket import JsonWebsocketConsumer from django.contrib.auth.models import AnonymousUser from django.http import HttpRequest, JsonResponse, QueryDict from django.urls import resolve from rest_framework.request import Request from urllib.parse import parse_qsl, urlparse from .statu...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,151
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/orchestrator/migrations/0002_protocol_port.py
# Generated by Django 2.2 on 2019-05-07 14:52 import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('orchestrator', '0001_initial'), ] operations = [ migrations.AddField( model_name='protocol', ...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,152
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/es_mirror/field.py
import uuid from elasticsearch_dsl.field import ( Boolean, Binary, Byte, Completion, CustomField, Date, DateRange, Double, DoubleRange, Field, Float, FloatRange, GeoPoint, GeoShape, HalfFloat, Integer, IntegerRange, Ip, IpRange, Join, ...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,153
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/gui/server/gui_server/utils/__init__.py
from .general import prefixUUID, safe_cast, to_str from .model import get_or_none, ReadOnlyModelAdmin from .orchestrator_api import OrchestratorAPI from .permissions import IsAdminOrIsSelf from .schema import OrcSchema from sb_utils import FrozenDict, safe_cast __all__ = [ 'FrozenDict', 'get_or_none', 'Is...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,154
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/gui/server/gui_server/webApp/templatetags/jsonify.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals import json from django.core.serializers import serialize from django.db.models.query import QuerySet from django.utils.safestring import mark_safe from django.template import Library register = Library() @register.filter(is_safe=True) def jsonify(val...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,155
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/conformance/tests/slpf_tests.py
""" OpenC2 Stateless Packet Filtering Profile (SLPF) Conformance """ from test_setup import SetupTestCase class SLPF_UnitTests(SetupTestCase): """ SLPF OpenC2 Conformance Tests """ profile = "SLPF" def test_allow_ip(self): print("Test SLPF Allow:IP...")
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,156
g2-inc/openc2-oif-orchestrator
refs/heads/master
/base/modules/utils/root/sb_utils/ext_dicts.py
import copy from typing import ( Any, List, Sequence ) from .general import safe_cast class ObjectDict(dict): """ Dictionary that acts like a object d = ObjectDict() d['key'] = 'value' SAME AS d.key = 'value' """ def __getattr__(self, key: Any) -> Any: """ ...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,157
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/device/migrations/0003_device_multi_actuator.py
# Generated by Django 2.2 on 2019-05-17 14:40 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('device', '0002_auto_20190416_1225'), ] operations = [ migrations.AddField( model_name='device', name='multi_actuator',...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,158
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/gui/server/gui_server/webApp/views/handlers.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals import json from django.http import HttpResponseBadRequest, HttpResponseForbidden, HttpResponseNotFound, HttpResponseServerError from django.template import loader from tracking import log _browser_search = ( "IE", "Firefox", "Chrome", ...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,159
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/command/admin.py
from django.contrib import admin from .models import SentHistory, ResponseHistory class ResponseInline(admin.TabularInline): """ Command Response InLine admin """ model = ResponseHistory readonly_fields = ('command', 'received_on', 'actuator', 'response', 'received_on') class SentHistoryAdmin(a...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,160
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/actuator/views/__init__.py
from .viewsets import ActuatorViewSet __all__ = [ # Viewsets 'ActuatorViewSet', ]
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,161
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/actuator/migrations/0001_initial.py
# Generated by Django 2.2 on 2019-04-04 18:39 import actuator.models from django.conf import settings from django.db import migrations, models import django.db.models.deletion import jsonfield.fields import uuid class Migration(migrations.Migration): initial = True dependencies = [ ('device', '0001...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,162
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/gui/server/gui_server/tracking/models.py
from django.db import models from django.conf import settings from django.utils import timezone from rest_framework import serializers from . import _DB_LEVELS class RequestLog(models.Model): """ Logs Django requests """ user = models.ForeignKey( settings.AUTH_USER_MODEL, on_delete=m...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,163
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/device/views/__init__.py
from .viewsets import DeviceViewSet __all__ = [ 'DeviceViewSet', ]
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,164
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/conformance/tests/test_setup.py
""" Conformance Test Setup """ import unittest # Local imports from sb_utils import FrozenDict class SetupTestSuite(unittest.TestSuite): """ Basic OpenC2 TestSuite Class """ _testKwargs: dict def __init__(self, tests: tuple = (), **kwargs): super(SetupTestSuite, self).__init__(tests=test...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,165
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/tracking/conf.py
from django.apps import AppConfig from django.conf import settings from . import LEVELS, REQUEST_LEVELS class TrackingConfig(AppConfig): name = 'tracking' URL_PREFIXES = [ # "^/(?!admin)" # Don"t log /admin/* ".*" # Log Everything ] EVENT_LEVELS = [l[0].upper() for l in LEVELS] ...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,166
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/orchestrator/middleware.py
import json from django.http import QueryDict from django.http.multipartparser import MultiValueDict from django.utils.deprecation import MiddlewareMixin class RESTMiddleware(MiddlewareMixin): """ REST API Middleware for proper handling of REST HTTP methods """ def process_request(self, request): ...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,167
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/command/documents.py
from es_mirror.document import Document, InnerDoc from es_mirror.field import ( Date, Integer, Nested, Object, Text ) class UserDocument(InnerDoc): username = Text() email = Text() class DeviceDocument(InnerDoc): name = Text() device_id = Text() class ActuatorDocument(InnerDoc)...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,168
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/command/views/stats.py
from ..models import SentHistory, ResponseHistory def app_stats(): return dict( sent=SentHistory.objects.count(), responses=ResponseHistory.objects.count() )
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,169
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/orchestrator/settings.py
import datetime import os import re # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) DATA_DIR = os.path.join(BASE_DIR, 'data') FIXTURE_DIRS = [ os.path.join(DATA_DIR, 'fixtures') ] if not os.path.isdir(DATA_DIR): o...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,170
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/device/migrations/0002_auto_20190416_1225.py
# Generated by Django 2.2 on 2019-04-16 12:25 import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('device', '0001_initial'), ] operations = [ migrations.AlterField( model_name='transport', ...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,171
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/conformance/views/__init__.py
from .viewsets import ConformanceViewSet, UnitTests __all__ = [ # ViewSets 'ConformanceViewSet', 'UnitTests' ]
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,172
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/es_mirror/__init__.py
default_app_config = 'es_mirror.apps.EsMirrorConfig'
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,173
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/tracking/log.py
from . import EVENT_LEVELS, LEVEL_EVENTS from .conf import settings, TrackingConfig from .models import EventLog def log(level=EVENT_LEVELS.Info, usr=None, msg=''): """ Log a message at the specified level :param level: level of the error :param usr: user that caused the message :param msg: messag...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,174
g2-inc/openc2-oif-orchestrator
refs/heads/master
/logger/server/syslog.py
#!/usr/bin/env python import logging import os import time import urllib3 from datetime import datetime, timezone from elasticsearch import Elasticsearch from elasticsearch.exceptions import TransportError from logging.handlers import RotatingFileHandler from syslog_rfc5424_parser import SyslogMessage, ParseError # ht...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,175
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/account/views/viewsets.py
import base64 import bleach import coreschema from django.contrib.auth.models import User from django.core.exceptions import PermissionDenied from django.http import Http404 from rest_framework import filters, permissions, status, viewsets from rest_framework.compat import coreapi from rest_framework.decorators import...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,176
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/gui/server/gui_server/tracking/views/gui.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib.auth.decorators import login_required, permission_required from django.shortcuts import render, reverse @login_required @permission_required('logs.can_view') def gui_root(request): page_args = { 'page_title': 'Logs' }...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,177
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/transport/mqtt/MQTT/callbacks.py
# callbacks.py import json import os import paho.mqtt.client as mqtt import paho.mqtt.publish as publish import re from sb_utils import Consumer, Producer, encode_msg, decode_msg, safe_cast # maintains a list of active devices we can receive responses from ACTIVE_CONNECTIONS = [] class Callbacks(object): requi...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,178
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/orchestrator/migrations/0001_initial.py
# Generated by Django 2.2 on 2019-04-04 18:39 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Protocol', fields=[ ('id', models.AutoField(a...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,179
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/actuator/urls.py
from django.urls import include, path from rest_framework import routers from . import views router = routers.DefaultRouter() router.register('', views.ActuatorViewSet) urlpatterns = [ # Actuator Router path('', include(router.urls), name='actuator.root'), ]
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,180
g2-inc/openc2-oif-orchestrator
refs/heads/master
/base/modules/script_utils.py
# Utility functions for update_subs and configure import fnmatch import importlib import io import os import re import shutil import stat import subprocess import sys from getpass import getpass try: input = raw_input except NameError: pass # Classes class FrozenDict(dict): def __init__(self, *args, **...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,181
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/gui/server/gui_server/orchestrator/views/viewsets.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from rest_framework import permissions, status, viewsets from rest_framework.exceptions import PermissionDenied from rest_framework.response import Response from ..models import Orchestrator, OrchestratorSerializer, OrchestratorAuth, OrchestratorAuthSeri...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,182
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/command/migrations/0001_initial.py
# Generated by Django 2.2 on 2019-04-04 18:39 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone import jsonfield.fields import uuid class Migration(migrations.Migration): initial = True dependencies = [ ('actuator...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,183
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/transport/https/HTTPS/https_transport.py
import re import urllib3 from datetime import datetime from sb_utils import Producer, Consumer, default_encode, decode_msg, encode_msg, safe_json def process_message(body, message): """ Callback when we receive a message from internal buffer to publish to waiting flask. :param body: Contains the message ...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,184
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/gui/server/gui_server/tracking/admin.py
from django.contrib import admin from .models import EventLog, RequestLog class RequestLogAdmin(admin.ModelAdmin): """ Request Log model admin """ date_hierarchy = 'requested_at' list_display = ( 'id', 'requested_at', 'response_ms', 'status_code', 'user', ...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,185
g2-inc/openc2-oif-orchestrator
refs/heads/master
/base/modules/utils/root/sb_utils/message_obj.py
import struct import uuid from datetime import datetime from enum import Enum from typing import ( List, Union ) from .message import decode_msg, encode_msg class ContentType(Enum): """ The content format of an OpenC2 Message """ Binn = 1 BSON = 2 CBOR = 3 JSON = 4 MsgPack = ...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,186
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/gui/server/gui_server/utils/general.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals import sys import uuid def prefixUUID(pre='PREFIX', max=30): uid_max = max - (len(pre) + 10) uid = str(uuid.uuid4()).replace('-', '')[:uid_max] return f'{pre}-{uid}'[:max] def safe_cast(val, to_type, default=None): try: return ...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,187
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/gui/server/gui_server/webApp/management/commands/makemigrations_apps.py
import os import sys from django.conf import settings from django.core.management import ManagementUtility from django.core.management.base import BaseCommand class Command(BaseCommand): """ Custom django command - makemigrations_apps Make migrations for the custom apps available to the Django app ""...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,188
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/tracking/urls/__init__.py
from django.urls import include, path from .api import urlpatterns as api_patterns from .gui import urlpatterns as gui_patterns urlpatterns = [ # API Patterns path('api/', include(api_patterns), name='log.api'), # GUI Patterns path('', include(gui_patterns), name='log.gui') ]
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,189
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/device/urls.py
from django.urls import include, path from rest_framework import routers from . import views router = routers.DefaultRouter() router.register('', views.DeviceViewSet) urlpatterns = [ # Device Router path('', include(router.urls), name='device.root'), ]
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,190
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/orchestrator/preferences_registry.py
import ipaddress import os import re import uuid from django.forms import ValidationError from dynamic_preferences.admin import GlobalPreferenceAdmin, PerInstancePreferenceAdmin from dynamic_preferences.types import StringPreference from dynamic_preferences.preferences import Section from dynamic_preferences.registrie...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,191
g2-inc/openc2-oif-orchestrator
refs/heads/master
/configure.py
#!/usr/bin/env python import atexit import os import re import shutil import sys from datetime import datetime from optparse import OptionParser from base.modules.script_utils import ( # Functions build_image, check_docker, check_docker_compose, checkRequiredArguments, human_size, install...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,192
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/tracking/urls/api.py
from django.urls import include, path from rest_framework import routers from .. import views router = routers.DefaultRouter() router.register('event', views.EventLogViewSet) router.register('request', views.RequestLogViewSet) urlpatterns = [ # Routers path('', include(router.urls)) ]
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,193
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/utils/general.py
""" General Utilities """ import random import string import sys import uuid from typing import Any valid_hex = set(string.hexdigits) valid_hex.add(" ") def prefixUUID(pre: str = "PREFIX", max_length: int = 30) -> str: """ Create a unique name with a prefix and a UUID string :param pre: prefix to use ...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,194
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/es_mirror/settings.py
import logging from django.conf import settings SETTINGS = dict( host=None, prefix='', timeout=60 ) SETTINGS.update(getattr(settings, 'ES_MIRROR', {})) # elastic logger config es_logger = logging.getLogger('elasticsearch') es_logger.setLevel(logging.WARNING)
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,195
g2-inc/openc2-oif-orchestrator
refs/heads/master
/update_subs.py
#!/usr/bin/env python import atexit import os import re import sys from datetime import datetime from optparse import OptionParser from pathlib import Path from base.modules.script_utils import ( # Functions checkRequiredArguments, install_pkg, recursive_find, update_repo, # Classes Conso...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,196
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/conformance/migrations/0001_initial.py
# Generated by Django 2.2.10 on 2020-03-09 15:14 from django.db import migrations, models import django.db.models.deletion import django.utils.timezone import jsonfield.fields import uuid class Migration(migrations.Migration): initial = True dependencies = [ ('actuator', '0002_auto_20190417_1319'),...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,197
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/gui/server/gui_server/webApp/views/api.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from rest_framework import permissions from rest_framework.decorators import api_view, permission_classes from rest_framework.response import Response @api_view(['GET']) @permission_classes((permissions.AllowAny,)) def api_root(request): """ Orc...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,198
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/actuator/admin.py
from django.contrib import admin # Local imports from utils import ReadOnlyModelAdmin from .models import Actuator, ActuatorGroup, ActuatorProfile class ActuatorAdmin(admin.ModelAdmin): """ Actuator admin """ readonly_fields = ('actuator_id', 'profile', 'schema_format') list_display = ('name', 'd...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,199
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/conformance/models.py
import uuid from django.db import models from django.utils import timezone from drf_queryfields import QueryFieldsMixin from jsonfield import JSONField from rest_framework import serializers # Local imports from actuator.models import Actuator, ActuatorSerializer class ConformanceTest(models.Model): """ Con...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,200
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/actuator/apps.py
from django.apps import AppConfig class ActuatorConfig(AppConfig): name = 'actuator'
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,201
g2-inc/openc2-oif-orchestrator
refs/heads/master
/base/modules/utils/root/sb_utils/message/pybinn/decoder.py
""" Implementation of BINNDecoder """ import io from datetime import datetime, timedelta from functools import partial from struct import unpack from typing import ( Callable, Dict, Union ) from . import datatypes as types class BINNDecoder: """ BINN <https://github.com/liteserver/binn> decoder ...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,202
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/utils/permissions.py
""" Django View Permission Utilities """ from rest_framework import permissions class IsAdminOrIsSelf(permissions.BasePermission): """ Object-level permission to only allow owners of an object to edit it. Only functional for User model functions """ def has_object_permission(self, request, view, ...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,203
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/tracking/views/__init__.py
from .api import api_root from .gui import gui_events, gui_requests, gui_root from .viewsets import EventLogViewSet, RequestLogViewSet __all__ = [ # API 'api_root', # GUI 'gui_events', 'gui_requests', 'gui_root', # Viewsets 'EventLogViewSet', 'RequestLogViewSet' ]
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,204
g2-inc/openc2-oif-orchestrator
refs/heads/master
/base/modules/utils/root/sb_utils/amqp_tools.py
""" amqp_tools.py Implements wrapper for kombu module to more-easily read/write from message queue. """ import kombu # handles interaction with AMQP server import socket # identify exceptions that occur with timeout import datetime # print time received message import os # to determine localhost on a given machine ...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,205
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/device/migrations/0004_remove_device_multi_actuator.py
# Generated by Django 2.2.7 on 2019-12-20 13:45 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('device', '0003_device_multi_actuator'), ] operations = [ migrations.RemoveField( model_name='device', name='multi_actuator',...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,206
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/gui/server/gui_server/account/views/viewsets.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals import base64 from django.contrib.auth.models import User from rest_framework import permissions, status, viewsets from rest_framework.decorators import detail_route from rest_framework.response import Response from ..models import UserSerializer, Pass...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,207
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/transport/coap/COAP/coap_client.py
import json from coapthon import defines from coapthon.client.helperclient import HelperClient from coapthon.messages.option import Option from coapthon.utils import generate_random_token from sb_utils import encode_msg, safe_cast, Consumer class CoapClient(HelperClient): def post(self, path, payload, callback=...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,208
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/account/views/__init__.py
from .api import actuatorDelete from .apiviews import ActuatorAccess from .viewsets import UserViewSet, UserHistoryViewSet __all__ = [ # API 'actuatorDelete', # APIViews 'ActuatorAccess', # Viewsets 'UserViewSet', 'UserHistoryViewSet', ]
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,209
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/gui/server/gui_server/webApp/management/commands/loaddata_apps.py
import os import sys from django.conf import settings from django.core.management import ManagementUtility from django.core.management.base import BaseCommand from threading import Thread class Command(BaseCommand): """ Custom django command - loaddata_apps Load data for the custom apps available to the ...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,210
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/backup/views/__init__.py
from .api import ( backupRoot ) from .import_export import ( ActuatorImportExport, DeviceImportExport ) __all__ = [ # API 'backupRoot', # APIViews # Import/Export 'ActuatorImportExport', 'DeviceImportExport' ]
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,211
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/actuator/views/viewsets.py
import bleach from rest_framework import viewsets, filters from rest_framework.decorators import action from rest_framework.exceptions import PermissionDenied from rest_framework.permissions import IsAdminUser, IsAuthenticated from rest_framework.response import Response from ..models import Actuator, ActuatorGroup, ...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,212
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/gui/server/gui_server/utils/orchestrator_api.py
import atexit import json import re import websocket from functools import partial from simple_rest_client.api import API from simple_rest_client.resource import Resource from sb_utils import FrozenDict, safe_cast class RootResource(Resource): _base_url = "" actions = dict( info=dict(method="GET", u...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,213
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/conformance/tests/utils.py
""" Unittest Utilities """ import inspect import os import unittest from typing import ( Dict, List, Tuple, Union ) from .test_setup import SetupTestSuite, SetupTestCase test_dirs = [ os.path.dirname(os.path.realpath(__file__)), # Local Dir # "./tests" # Custom Dir ] def inherits_from(chi...
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,214
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/gui/server/gui_server/webApp/models.py
from django.conf import settings from django.db.models.signals import post_save from django.dispatch import receiver
{"/orchestrator/core/orc_server/command/views/actions.py": ["/orchestrator/core/orc_server/command/models.py"], "/orchestrator/gui/server/gui_server/webApp/urls.py": ["/orchestrator/gui/server/gui_server/webApp/__init__.py"], "/orchestrator/core/orc_server/account/models.py": ["/orchestrator/core/orc_server/account/exc...
12,225
ppiazi/korea_univ_gscit_notice_bot
refs/heads/master
/BotMain.py
# -*- coding: utf-8 -*- """ Copyright 2016 Joohyun Lee(ppiazi@gmail.com) 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 applicabl...
{"/BotMain.py": ["/NoticeReader.py", "/BotMainDb.py"], "/NoticeReader.py": ["/BotMain.py"], "/BotMainDb.py": ["/BotMain.py"]}
12,226
ppiazi/korea_univ_gscit_notice_bot
refs/heads/master
/NoticeReader.py
# -*- coding: utf-8 -*- """ Copyright 2016 Joohyun Lee(ppiazi@gmail.com) 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 applicabl...
{"/BotMain.py": ["/NoticeReader.py", "/BotMainDb.py"], "/NoticeReader.py": ["/BotMain.py"], "/BotMainDb.py": ["/BotMain.py"]}
12,227
ppiazi/korea_univ_gscit_notice_bot
refs/heads/master
/BotMainDb.py
# -*- coding: utf-8 -*- """ Copyright 2016 Joohyun Lee(ppiazi@gmail.com) 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 applicabl...
{"/BotMain.py": ["/NoticeReader.py", "/BotMainDb.py"], "/NoticeReader.py": ["/BotMain.py"], "/BotMainDb.py": ["/BotMain.py"]}
12,233
2-propanol/BTF_helper
refs/heads/main
/btf_helper/btfnpz.py
import numpy as np class Btfnpz: """.btf.npzファイルから角度や画像を取り出す 角度は全て度数法(degree)を用いている。 .btf.npzファイルに含まれる角度情報の並べ替えはしない。 角度情報の取得には`angles_set`(Pythonの`set`)の他、 `angles_list`(`flags.writeable`を`False`にセットした`np.ndarray`)が利用できる。 画像の実体はopencvと互換性のあるndarray形式(BGR, channels-last)で出力する。 .btf.npzファ...
{"/btf_helper/__init__.py": ["/btf_helper/btfnpz.py", "/btf_helper/btfzip.py"]}
12,234
2-propanol/BTF_helper
refs/heads/main
/btf_helper/__init__.py
from .btfnpz import Btfnpz from .btfzip import Btfzip
{"/btf_helper/__init__.py": ["/btf_helper/btfnpz.py", "/btf_helper/btfzip.py"]}
12,235
2-propanol/BTF_helper
refs/heads/main
/btf_helper/btfzip.py
from collections import Counter from decimal import Decimal from sys import stderr from typing import Tuple from zipfile import ZipFile import cv2 import numpy as np from simplejpeg import decode_jpeg # PEP484 -- Type Hints: # Type Definition Syntax: # The numeric tower: # when an argument is annotated as...
{"/btf_helper/__init__.py": ["/btf_helper/btfnpz.py", "/btf_helper/btfzip.py"]}
12,236
ToddLichty/BowlingKata
refs/heads/master
/bowling.py
class BowlScorer(): def __init__(self): self._rolls = [0 for i in range(21)] self._current_roll = 0 def roll(self, pins): self._rolls[self._current_roll] = pins self._current_roll += 1 def get_score(self): score = 0 rollIndex = 0 for frameIndex in r...
{"/test_bowling.py": ["/bowling.py"]}
12,237
ToddLichty/BowlingKata
refs/heads/master
/test_bowling.py
import unittest from bowling import BowlScorer class BowlingScorerTests(unittest.TestCase): def setUp(self): self.scorer = BowlScorer() def test_all_gutter_balls(self): self.rollMany(0, 20) self.assertEqual(0, self.scorer.get_score()) def test_knocked_over_single_pin(self): ...
{"/test_bowling.py": ["/bowling.py"]}
12,243
barrettellie/coursework
refs/heads/master
/mainwindow.py
#create the main window from PyQt4.QtCore import * from PyQt4.QtGui import * from PyQt4.QtSql import * import sys class MainWindow(QMainWindow): """simple example using QtSql""" #doc string #constructor def __init__(self): #calls the super class constructor super().__init__() sel...
{"/display_menu.py": ["/full_time_employee.py", "/calculate_wages.py"], "/calculate_wages.py": ["/full_time_employee.py"]}
12,244
barrettellie/coursework
refs/heads/master
/createtables.py
#create tables and enititys import sqlite3 def create_table(db_name, table_name,sql): with sqlite3.connect(db_name) as db: cursor = db.cursor() cursor.execute("select name from sqlite_master where name = ?",(table_name,)) result = cursor.fetchall() if len(result) == 0: ...
{"/display_menu.py": ["/full_time_employee.py", "/calculate_wages.py"], "/calculate_wages.py": ["/full_time_employee.py"]}
12,245
barrettellie/coursework
refs/heads/master
/full_time_employee.py
#full time employee def full_time_employee(): hours = int(input("Please enter the nuber of hours you have worked: ")) rate_of_pay = float(input("Please enter your hourly rate of pay: ")) overtime = int(input("Please enter the number of over time hours worked: ")) overtime_pay_rate = float(input("Please...
{"/display_menu.py": ["/full_time_employee.py", "/calculate_wages.py"], "/calculate_wages.py": ["/full_time_employee.py"]}
12,246
barrettellie/coursework
refs/heads/master
/display_menu.py
from part_time_employee import * from full_time_employee import * from calculate_wages import * def display_menu(): print() print("1. Employee Login") print("2. Manager Login") print() print("Please select an option from the above menu") def select_option(): choice = "" valid_option = Fals...
{"/display_menu.py": ["/full_time_employee.py", "/calculate_wages.py"], "/calculate_wages.py": ["/full_time_employee.py"]}
12,247
barrettellie/coursework
refs/heads/master
/calculate_wages.py
from full_time_employee import * from part_time_employee import * def calculate_wages(): print() print("1. Full Time Employee") print("2. Part Time Employee") print() print("Please select your employee status from the above menu") def select_option(): choice = "" valid_option = False w...
{"/display_menu.py": ["/full_time_employee.py", "/calculate_wages.py"], "/calculate_wages.py": ["/full_time_employee.py"]}
12,248
barrettellie/coursework
refs/heads/master
/employeelogin.py
class EmployeeLogin(): """Employee Login""" def __init__(self): super().__init__() def login(self, username, password): username = "barrettellie" password = "hello" username = input("Please enter your username: ") if username == True: password = input("P...
{"/display_menu.py": ["/full_time_employee.py", "/calculate_wages.py"], "/calculate_wages.py": ["/full_time_employee.py"]}
12,249
sosboy888/covidTrackerEDVERB
refs/heads/master
/Main.py
import requestData from tkinter import * from tkinter import messagebox from tkinter.ttk import * window=Tk() window.minsize(300,300) window.title("Coronavirus Tracker") logo=PhotoImage(file="icon.png") window.iconphoto(False, logo) imageLabel=Label(window, image=logo) imageLabel.grid() textLabel=Label(window, text="E...
{"/Main.py": ["/requestData.py"]}
12,250
sosboy888/covidTrackerEDVERB
refs/heads/master
/requestData.py
import requests def request(countryName): url = "https://covid-19-data.p.rapidapi.com/country" querystring = {"format":"json","name":countryName} headers = { 'x-rapidapi-host': "covid-19-data.p.rapidapi.com", 'x-rapidapi-key': "YOUR API KEY" } response = requests.request("GET"...
{"/Main.py": ["/requestData.py"]}
12,251
tominsam/feedify
refs/heads/main
/instagram/migrations/0001_initial.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import datetime class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='AccessToken', fields=[ ('id', m...
{"/instagram/feeds.py": ["/instagram/models.py", "/flickr/feeds.py"], "/flickr/feeds.py": ["/flickr/models.py"], "/instagram/admin.py": ["/instagram/models.py"], "/urls.py": ["/flickr/feeds.py", "/instagram/feeds.py"], "/flickr/admin.py": ["/flickr/models.py"]}
12,252
tominsam/feedify
refs/heads/main
/flickr/models.py
from django.db import models from django.conf import settings from django.core.cache import cache import urlparse import urllib import datetime import oauth2 import uuid import json import time import logging EXTRAS = "date_upload,date_taken,owner_name,icon_server,original_format,description,geo,tags,machine_tags,o_d...
{"/instagram/feeds.py": ["/instagram/models.py", "/flickr/feeds.py"], "/flickr/feeds.py": ["/flickr/models.py"], "/instagram/admin.py": ["/instagram/models.py"], "/urls.py": ["/flickr/feeds.py", "/instagram/feeds.py"], "/flickr/admin.py": ["/flickr/models.py"]}
12,253
tominsam/feedify
refs/heads/main
/flickr/views.py
from flickr.models import RequestToken, AccessToken, FlickrException from django.http import HttpResponseRedirect from django.contrib import messages from django.shortcuts import render from django.conf import settings import oauth2 import urllib import logging # decorator, for some reason def flickr_auth(fn): ...
{"/instagram/feeds.py": ["/instagram/models.py", "/flickr/feeds.py"], "/flickr/feeds.py": ["/flickr/models.py"], "/instagram/admin.py": ["/instagram/models.py"], "/urls.py": ["/flickr/feeds.py", "/instagram/feeds.py"], "/flickr/admin.py": ["/flickr/models.py"]}
12,254
tominsam/feedify
refs/heads/main
/instagram/feeds.py
from instagram.models import AccessToken from flickr.feeds import GeoFeed from django.contrib.syndication.views import Feed from django.shortcuts import get_object_or_404 class InstagramPhotoFeed(Feed): feed_type = GeoFeed description_template = 'instagram/_photo.html' def get_object(self, request, toke...
{"/instagram/feeds.py": ["/instagram/models.py", "/flickr/feeds.py"], "/flickr/feeds.py": ["/flickr/models.py"], "/instagram/admin.py": ["/instagram/models.py"], "/urls.py": ["/flickr/feeds.py", "/instagram/feeds.py"], "/flickr/admin.py": ["/flickr/models.py"]}
12,255
tominsam/feedify
refs/heads/main
/flickr/feeds.py
from flickr.models import AccessToken from django.contrib.syndication.views import Feed from django.utils.feedgenerator import Atom1Feed from django.shortcuts import get_object_or_404 class GeoFeed(Atom1Feed): def root_attributes(self): attrs = super(GeoFeed, self).root_attributes() attrs['xmlns...
{"/instagram/feeds.py": ["/instagram/models.py", "/flickr/feeds.py"], "/flickr/feeds.py": ["/flickr/models.py"], "/instagram/admin.py": ["/instagram/models.py"], "/urls.py": ["/flickr/feeds.py", "/instagram/feeds.py"], "/flickr/admin.py": ["/flickr/models.py"]}
12,256
tominsam/feedify
refs/heads/main
/instagram/admin.py
from instagram.models import * from django.contrib import admin admin.site.register(AccessToken, list_display = ("key", "userid", "username", "created", "fetched"), date_hierarchy = "created", )
{"/instagram/feeds.py": ["/instagram/models.py", "/flickr/feeds.py"], "/flickr/feeds.py": ["/flickr/models.py"], "/instagram/admin.py": ["/instagram/models.py"], "/urls.py": ["/flickr/feeds.py", "/instagram/feeds.py"], "/flickr/admin.py": ["/flickr/models.py"]}
12,257
tominsam/feedify
refs/heads/main
/settings.py
# Django settings for feedify project. import os ROOT = os.path.dirname(__file__) ADMINS = ( ("Tom Insam", "tom@movieos.org"), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(os.path.dirname(__file__), 'default.db'), } } APPEND...
{"/instagram/feeds.py": ["/instagram/models.py", "/flickr/feeds.py"], "/flickr/feeds.py": ["/flickr/models.py"], "/instagram/admin.py": ["/instagram/models.py"], "/urls.py": ["/flickr/feeds.py", "/instagram/feeds.py"], "/flickr/admin.py": ["/flickr/models.py"]}