index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
12,030
squidinkettle/twotter
refs/heads/master
/run_app.py
import os from twitter_api.main import app, api from twitter_api.apify import User_id, Users, Twoots from flask_restful import Resource, Api api.add_resource(User_id, '/user_id') # Route_1 api.add_resource(Users, '/users') # Route_2 api.add_resource(Twoots, '/users/<int:id>') # Route_3 if __name__ == '__main__': ...
{"/run_app.py": ["/twitter_api/main.py", "/twitter_api/apify.py"]}
12,031
squidinkettle/twotter
refs/heads/master
/twitter_api/apify.py
from flask import Flask, request from flask_restful import Resource, Api from sqlalchemy import create_engine from json import dumps from flask_jsonpify import jsonify import sqlite3 class User_id(Resource): def get(self): conn = sqlite3.connect('user_info.db') c = conn.cursor() query = c.e...
{"/run_app.py": ["/twitter_api/main.py", "/twitter_api/apify.py"]}
12,032
squidinkettle/twotter
refs/heads/master
/twitter_api/main.py
import sqlite3 from urllib import urlopen import json from json import dumps import requests from flask import Flask, render_template,request, jsonify,g, redirect,url_for, session, logging, flash import oauth2 as oauth from wtforms import Form, StringField, TextAreaField, PasswordField, validators from passlib.hash imp...
{"/run_app.py": ["/twitter_api/main.py", "/twitter_api/apify.py"]}
12,038
10arturoV/curso-programacionATS
refs/heads/master
/prueba3.py
sueldo = int(input("ingrese su sueldo ")) print("su sueldo es "+str(sueldo)) cat = int(input("ingresa tu categoria ")) if (cat == 1): cat1 = (sueldo*.15) print("el aumento es "+str(cat1)) aumento = cat1+sueldo print("el total es " + str(aumento)) elif (cat == 2): cat2 = (sueldo * .10) print("e...
{"/programa que llama a modulo.py": ["/mdulo1.py"], "/de modulo solo importar una funcion.py": ["/mdulo1.py"], "/programa1.py": ["/modulo1.py"]}
12,039
10arturoV/curso-programacionATS
refs/heads/master
/prueba5.py
cantidad_total = 0 if __name__ == '__main__': while True: print(("El monto de la venta es: ")) monto_venta = float(input()) iva = (monto_venta*.16) print(("El IVA es: "),iva) total_pagar = (monto_venta+iva) print(("El total a pagar es: "),total_pagar) print(("Ingresa el pago del cliente: ")) pago_clien...
{"/programa que llama a modulo.py": ["/mdulo1.py"], "/de modulo solo importar una funcion.py": ["/mdulo1.py"], "/programa1.py": ["/modulo1.py"]}
12,040
10arturoV/curso-programacionATS
refs/heads/master
/mdulo1.py
#modulo def saludar(nombre): print("hola, soy "+nombre) def despedir(nombre): print("bye bye "+nombre)
{"/programa que llama a modulo.py": ["/mdulo1.py"], "/de modulo solo importar una funcion.py": ["/mdulo1.py"], "/programa1.py": ["/modulo1.py"]}
12,041
10arturoV/curso-programacionATS
refs/heads/master
/prueba9.py
a = int(input("ingresa 1er numero ")) b = int(input("ingresa 2do numero ")) c = int(input("ingresa 3er numero ")) if a >= b and a >= c: print("el numero "+str(a)+" es mayor") elif b >= a and b >= c: print("el numero "+str(b)+" es mayor") elif c >= a and c >= b: print("el numero " + str(c) + " es mayor")
{"/programa que llama a modulo.py": ["/mdulo1.py"], "/de modulo solo importar una funcion.py": ["/mdulo1.py"], "/programa1.py": ["/modulo1.py"]}
12,042
10arturoV/curso-programacionATS
refs/heads/master
/prueba4.py
producto = int(input("cuantos articulos va a llevar ")) contador = 0 cuentaTo = 0 while contador < producto: contador = contador + 1 costo = int(input("ingrese el costo del producto ")) captura = costo * .16 total = captura + costo print("costo del articulo con iva " + str(tot...
{"/programa que llama a modulo.py": ["/mdulo1.py"], "/de modulo solo importar una funcion.py": ["/mdulo1.py"], "/programa1.py": ["/modulo1.py"]}
12,043
10arturoV/curso-programacionATS
refs/heads/master
/bucle while 2.py
inicio = 0 while inicio < 20: print("hola mundo") inicio += 1
{"/programa que llama a modulo.py": ["/mdulo1.py"], "/de modulo solo importar una funcion.py": ["/mdulo1.py"], "/programa1.py": ["/modulo1.py"]}
12,044
10arturoV/curso-programacionATS
refs/heads/master
/cajero.py
saldoInicial = 1000 print("bienvenido a cajeros atm") opcion = int(input("que operacion desea realizar? ")) if opcion == 1: print(f"su saldo disponible es {saldoInicial}") elif opcion == 2: retiro = float(input("ingrese la cantidad que desea retirar ")) if retiro > saldoInicial: print("no cuenta c...
{"/programa que llama a modulo.py": ["/mdulo1.py"], "/de modulo solo importar una funcion.py": ["/mdulo1.py"], "/programa1.py": ["/modulo1.py"]}
12,045
10arturoV/curso-programacionATS
refs/heads/master
/prueba 2.py
par1 = int(input("ingrese primer parcial ")) par2 = int(input("ingrese segundo parcial ")) par3 = int(input("ingrese tercer parcial ")) parTot = (par1+par2+par3)/3*.55 print("el parcial total es "+str(parTot)) exam = int(input("ingresa la calif de tu examen ")) exa = exam *.15 print("calificacion examen es "+str(exa)...
{"/programa que llama a modulo.py": ["/mdulo1.py"], "/de modulo solo importar una funcion.py": ["/mdulo1.py"], "/programa1.py": ["/modulo1.py"]}
12,046
10arturoV/curso-programacionATS
refs/heads/master
/programa que llama a modulo.py
import mdulo1 mdulo1.saludar("antonio") nombre = "luis" mdulo1.saludar(nombre)
{"/programa que llama a modulo.py": ["/mdulo1.py"], "/de modulo solo importar una funcion.py": ["/mdulo1.py"], "/programa1.py": ["/modulo1.py"]}
12,047
10arturoV/curso-programacionATS
refs/heads/master
/de modulo solo importar una funcion.py
from mdulo1 import despedir as adios minombre = "jorge" adios(minombre)
{"/programa que llama a modulo.py": ["/mdulo1.py"], "/de modulo solo importar una funcion.py": ["/mdulo1.py"], "/programa1.py": ["/modulo1.py"]}
12,048
10arturoV/curso-programacionATS
refs/heads/master
/prueba8.py
a = int(input("ingresa un numero ")) b = int(input("ingresa otro numero ")) if a%2 == 0 and b%2 == 0: print("los 2 numeros son pares") elif a%2 == 0 and b%2!=0: print("el numero "+str(a) + " es par y el numero "+str(b)+" no es par") elif a%2!= 0 and b%2 == 0: print("el numero "+str(b) + " es par y el num...
{"/programa que llama a modulo.py": ["/mdulo1.py"], "/de modulo solo importar una funcion.py": ["/mdulo1.py"], "/programa1.py": ["/modulo1.py"]}
12,049
10arturoV/curso-programacionATS
refs/heads/master
/calculadora aritmetica.py
operacion = input("que operacion desea realizar? ") if operacion == "S" or operacion == "s": a = float(input("ingrese primer digito ")) b = float(input("ingrese primer digito ")) c = a + b print("la suma es "+str(c)) elif operacion == "R" or operacion == "r": a = float(input("ingrese primer digito ...
{"/programa que llama a modulo.py": ["/mdulo1.py"], "/de modulo solo importar una funcion.py": ["/mdulo1.py"], "/programa1.py": ["/modulo1.py"]}
12,050
10arturoV/curso-programacionATS
refs/heads/master
/modulo1.py
class Coche: def __init__(self, marca, color, combustible, cilindrada): self.marca = marca self.color = color self.combustible = combustible self.cilindrada = cilindrada def mostrar_caracteristicas(self): print("mi coche es marca {} el color es {} usa combustible {} y ti...
{"/programa que llama a modulo.py": ["/mdulo1.py"], "/de modulo solo importar una funcion.py": ["/mdulo1.py"], "/programa1.py": ["/modulo1.py"]}
12,051
10arturoV/curso-programacionATS
refs/heads/master
/mostar si un caracter es vocal o no.py
a = str(input("ingresa el caracter ")).lower() if a == "a" or a == "e" or a == "i" or a == "o" or a == "u": print(f"el caracter {a} si es vocal") else: print(f"el caracter {a} NO es vocal")
{"/programa que llama a modulo.py": ["/mdulo1.py"], "/de modulo solo importar una funcion.py": ["/mdulo1.py"], "/programa1.py": ["/modulo1.py"]}
12,052
10arturoV/curso-programacionATS
refs/heads/master
/bucle while.py
import math numero = int(input("ingresa un numero ")) while numero < 0: print("ingresa un numero valido") numero = int(input("ingresa un numero ")) print(f"la raiz cuadrada es {math.sqrt(numero):.2f}")
{"/programa que llama a modulo.py": ["/mdulo1.py"], "/de modulo solo importar una funcion.py": ["/mdulo1.py"], "/programa1.py": ["/modulo1.py"]}
12,053
10arturoV/curso-programacionATS
refs/heads/master
/prueba7.py
print("ingresa 1er digito") num1 = int(input()) print("ingresa 2do digito") num2 = int(input()) print("ingresa 3er digito") num3 = int(input()) if num1 > num2: if num1 > num3: if num2 > num3: Mediana = num2 else: Mediana = num3 else: Mediana = num1 else: if n...
{"/programa que llama a modulo.py": ["/mdulo1.py"], "/de modulo solo importar una funcion.py": ["/mdulo1.py"], "/programa1.py": ["/modulo1.py"]}
12,054
10arturoV/curso-programacionATS
refs/heads/master
/Ejercicio 1 – Operación aritmética.py
a =int(input("ingrsa el valor de a ")) b =int(input("ingrsa el valor de b ")) c =int(input("ingrsa el valor de c ")) d =float(a**3 * (b**2 - 2*a*c) / 2*b) print(f"la respuesta es {d}")
{"/programa que llama a modulo.py": ["/mdulo1.py"], "/de modulo solo importar una funcion.py": ["/mdulo1.py"], "/programa1.py": ["/modulo1.py"]}
12,055
10arturoV/curso-programacionATS
refs/heads/master
/programa1.py
import modulo1 coche1= modulo1.Coche("opel","rojo","gasolina","1.6") print(coche1.mostrar_caracteristicas()) media = modulo1.media(8, 8, 8) print("nuestra nota media es "+ str(media))
{"/programa que llama a modulo.py": ["/mdulo1.py"], "/de modulo solo importar una funcion.py": ["/mdulo1.py"], "/programa1.py": ["/modulo1.py"]}
12,056
ash-ishh/opentelemetry_poc_django
refs/heads/main
/gunicorn.conf.py
import os from opentelemetry import trace from opentelemetry.exporter.jaeger import JaegerSpanExporter from opentelemetry.sdk.trace import TracerProvider from opentelemetry.sdk.trace.export import BatchExportSpanProcessor from opentelemetry.instrumentation.django import DjangoInstrumentor def post_fork(server, worker...
{"/fibonacci/views.py": ["/fibonacci/utils.py"]}
12,057
ash-ishh/opentelemetry_poc_django
refs/heads/main
/fibonacci/utils.py
def fib_slow(n): if n <= 1: return n return fib_slow(n - 1) + fib_fast(n - 2) def fib_fast(n): nth_fib = [0] * (n + 2) nth_fib[1] = 1 for i in range(2, n + 1): nth_fib[i] = nth_fib[i - 1] + nth_fib[i - 2] return nth_fib[n]
{"/fibonacci/views.py": ["/fibonacci/utils.py"]}
12,058
ash-ishh/opentelemetry_poc_django
refs/heads/main
/opentelemetry_poc_django/wsgi.py
""" WSGI config for opentelemetry_poc_django project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application from opentelemetry....
{"/fibonacci/views.py": ["/fibonacci/utils.py"]}
12,059
ash-ishh/opentelemetry_poc_django
refs/heads/main
/fibonacci/views.py
from django.http import HttpResponse from fibonacci.utils import fib_fast, fib_slow from opentelemetry import trace def calculate(request): n = request.GET.get('n', 1) if n.isnumeric(): n = int(n) else: return HttpResponse(f'Calculation for {n} is not supported', status=415) tracer = t...
{"/fibonacci/views.py": ["/fibonacci/utils.py"]}
12,063
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/command/views/actions.py
import bleach import json import time import uuid from django.conf import settings from django.contrib.auth import get_user_model from dynamic_preferences.registries import global_preferences_registry # Local imports from actuator.models import Actuator, ActuatorProfile from device.models import Device from orchestra...
{"/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,064
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/orchestrator/apps.py
import atexit import sys from django.apps import AppConfig from django.conf import settings from utils import MessageQueue class OrchestratorConfig(AppConfig): name = 'orchestrator' _FALSE_READY = ( 'runserver', 'orchestrator.wsgi', 'uwsgi' ) def ready(self): """ ...
{"/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,065
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/backup/urls.py
from django.urls import include, path from rest_framework_files import routers from . import views router = routers.ImportExportRouter() router.register('actuator', views.ActuatorImportExport) router.register('device', views.DeviceImportExport) urlpatterns = [ # Router Views 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,066
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/gui/server/gui_server/webApp/jwt_handlers.py
from datetime import datetime from calendar import timegm from rest_framework_jwt.settings import api_settings def jwt_payload_handler(user): """ Custom payload handler Token encrypts the dictionary returned by this function, and can be decoded by rest_framework_jwt.utils.jwt_decode_handler :param 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,067
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/account/views/api.py
import bleach import coreapi import coreschema from django.contrib.auth.models import Group, User from rest_framework import permissions from rest_framework.decorators import api_view, permission_classes, schema from rest_framework.exceptions import ParseError from rest_framework.response import Response # Local impo...
{"/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,068
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/actuator/models.py
import uuid from django.conf import settings from django.contrib.auth.models import User from django.db import models from django.db.models.signals import post_save, pre_save from django.dispatch import receiver from drf_queryfields import QueryFieldsMixin from jsonfield import JSONField from rest_framework import ser...
{"/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,069
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/device/migrations/0001_initial.py
# Generated by Django 2.2 on 2019-04-04 18:39 import device.models from django.conf import settings from django.db import migrations, models import django.db.models.deletion import uuid class Migration(migrations.Migration): initial = True dependencies = [ ('orchestrator', '0001_initial'), ...
{"/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,070
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/gui/server/gui_server/webApp/urls.py
from django.conf import settings from django.contrib import admin from django.urls import include, path from rest_framework.schemas import get_schema_view from rest_framework_swagger.views import get_swagger_view from . import views admin.site.site_title = 'OpenC2 Orchestrator Administration' admin.site.site_header...
{"/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,071
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/account/models.py
from django.contrib.auth.models import User from rest_framework import serializers from rest_framework.authtoken.models import Token # Local imports from actuator.models import ActuatorGroup from device.models import DeviceGroup from .exceptions import EditException class UserSerializer(serializers.ModelSerializer):...
{"/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,072
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/backup/views/api.py
from django.apps import apps from django.http import JsonResponse from rest_framework import permissions from rest_framework.decorators import api_view, permission_classes exclude = { "actuator": ("actuatorprofile", ), "admin": (), "auth": (), "contenttypes": (), "sessions": (), "rest_framework...
{"/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,073
g2-inc/openc2-oif-orchestrator
refs/heads/master
/base/modules/utils/root/sb_utils/message/serialize.py
""" Message Conversion functions """ import base64 import bson import cbor2 import edn_format import json import msgpack import shutil import toml import ubjson import yaml from typing import Union from . import ( helpers, pybinn, pysmile ) from .. import ( ext_dicts, general ) try: from ya...
{"/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,074
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/tracking/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 class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_...
{"/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,075
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/es_mirror/utils/general.py
import string from django.db.models import signals, Model from django.db.models.fields.related import ForeignKey, ManyToManyField from elasticsearch.exceptions import NotFoundError from elasticsearch_dsl import connections, Document, Field, Nested, Object from typing import ( Dict, List, Tuple, Union )...
{"/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,076
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/actuator/migrations/0002_auto_20190417_1319.py
# Generated by Django 2.2 on 2019-04-17 13:19 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('actuator', '0001_initial'), ] operations = [ migrations.AddField( model_name='actuator', name='schema_format', ...
{"/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,077
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/gui/server/gui_server/orchestrator/models.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals import uuid from django.db import models from django.conf import settings from django.contrib.auth import get_user_model from django.core.validators import MaxValueValidator, MinValueValidator from rest_framework import serializers PROTO_CHOICES = ( ...
{"/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,078
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/gui/server/gui_server/utils/model.py
from django.contrib import admin def get_or_none(model, *args, **kwargs): tmp_qry = model.objects.filter(*args, **kwargs) if len(tmp_qry) == 0: return None elif len(tmp_qry) == 1: return tmp_qry.first() else: return tmp_qry class ReadOnlyModelAdmin(admin.ModelAdmin): """...
{"/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,079
g2-inc/openc2-oif-orchestrator
refs/heads/master
/base/modules/utils/root/sb_utils/message/__init__.py
from .serialize import decode_msg, encode_msg, serializations __all__ = [ 'decode_msg', 'encode_msg', 'serializations' ]
{"/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,080
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/transport/mqtt/MQTT/mqtt_transport.py
# mqtt_transport.py from sb_utils import Consumer from callbacks import Callbacks # Begin consuming messages from internal message queue print("Connecting to RabbitMQ...") try: consumer = Consumer( exchange="transport", routing_key="mqtt", callbacks=[Callbacks.send_mqtt], debug=Tru...
{"/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,081
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/backup/utils/xls.py
import json import re from collections import OrderedDict from io import BytesIO as StringIO from pyexcel_xls import get_data, save_data from rest_framework.exceptions import ParseError from rest_framework.parsers import BaseParser from rest_framework.renderers import BaseRenderer def simpleType(obj): if isinsta...
{"/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,082
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/conformance/urls.py
from django.urls import include, path from rest_framework import routers from . import views router = routers.DefaultRouter() router.register('unittest', views.UnitTests, basename='unittest') router.register('test', views.ConformanceViewSet) urlpatterns = [ 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,083
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/conformance/views/viewsets.py
import threading import unittest import uuid from io import StringIO from django.core.exceptions import ObjectDoesNotExist from rest_framework import viewsets, filters from rest_framework.exceptions import NotFound from rest_framework.permissions import IsAuthenticated from rest_framework.response import Response # L...
{"/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,084
g2-inc/openc2-oif-orchestrator
refs/heads/master
/base/modules/utils/root/setup.py
from setuptools import setup version = dict( major=0, minor=1, bugfix=0 ) setup( name='ScreamingBunny Utils', version='{major}.{minor}.{bugfix}'.format(**version), package_data={ 'SB_Utils': [ './sb_utils/*', ] }, include_package_data=True )
{"/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,085
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/gui/server/gui_server/webApp/apps.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals import sys from django.apps import AppConfig from utils import OrchestratorAPI class WebAppConfig(AppConfig): name = 'webApp' _FALSE_READY = ( 'runserver', 'orchestrator.wsgi', 'uwsgi' ) def ready(self): ...
{"/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,086
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/gui/server/gui_server/utils/schema.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.urls import resolve from django.utils.six.moves.urllib import parse as urlparse from rest_framework.compat import coreapi from rest_framework.schemas import AutoSchema class OrcSchema(AutoSchema): """ Schema View creation based on H...
{"/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,087
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/gui/server/gui_server/webApp/views/gui.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.http import HttpResponseRedirect from django.shortcuts import reverse def gui_redirect(request): return HttpResponseRedirect(reverse('api.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,088
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/tracking/middleware.py
import ast import re from django.utils.deprecation import MiddlewareMixin from django.utils.timezone import now from .conf import settings, TrackingConfig from .models import RequestLog class LoggingMiddleware(MiddlewareMixin): """ Adapted from DRF-Tracking - drf-tracking.readthedocs.io Applied as middl...
{"/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,089
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/gui/server/gui_server/orchestrator/admin.py
from django.contrib import admin from .models import Orchestrator, OrchestratorAuth # Register your models here. class OrchestratorAdmin(admin.ModelAdmin): list_display = ( 'orc_id', 'name', 'proto', 'host', 'port', ) class OrchestratorAuthAdmin(admin.ModelAdmin): ...
{"/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,090
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/command/views/viewsets.py
import coreapi import coreschema from rest_framework import viewsets, filters from rest_framework.permissions import IsAdminUser, IsAuthenticated from rest_framework.decorators import action from rest_framework.exceptions import PermissionDenied from rest_framework.response import Response # Local imports import util...
{"/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,091
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/gui/server/gui_server/tracking/log.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from . import EVENT_LEVELS from .models import EventLog from .settings import TRACKING log_levels = TRACKING['EVENT_LEVELS'] def log(level=EVENT_LEVELS.Info, usr=None, msg=''): """ Log a message at the specified level :param level: level of...
{"/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,092
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/account/exceptions.py
from rest_framework.exceptions import APIException class EditException(APIException): status_code = 403 default_detail = 'Permission Denied, cannot alter object' default_code = '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,093
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/conformance/tests/sbom_tests.py
""" OpenC2 Software Bill of Materials Profile (SBOM) Conformance """ from test_setup import SetupTestCase class SBOM_UnitTests(SetupTestCase): """ SBOM OpenC2 Conformance Tests """ profile = "SBOM"
{"/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,094
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/gui/server/gui_server/tracking/settings.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from . import EVENT_LEVELS, REQUEST_LEVELS _DEFAULT = { "URL_PREFIXES": [ # "^/(?!admin)" # Don"t log /admin/* ".*" # Log Everything ], "EVENT_LEVELS": [getattr(EVENT_LEVELS, err) for err i...
{"/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,095
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/command/preferences_registry.py
from django.forms import ValidationError from dynamic_preferences.types import IntegerPreference from dynamic_preferences.preferences import Section from dynamic_preferences.registries import global_preferences_registry as global_registry command = Section('command') @global_registry.register class CommandWait(Integ...
{"/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,096
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/es_mirror/utils/__init__.py
from .general import es_dict, get_nestedFields, ElasticHooks __all__ = [ 'es_dict', 'get_nestedFields', 'ElasticHooks', ]
{"/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,097
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/gui/server/gui_server/account/models.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib.auth.models import User from rest_framework import serializers class UserSerializer(serializers.ModelSerializer): """ Model Serializer for Users """ auth_groups = serializers.SerializerMethodField() class Meta: ...
{"/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,098
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/utils/model.py
""" Django Model Utilities """ from django.contrib import admin def get_or_none(model, **kwargs): """ Get filtered results from the given model :param model: model to filter :param kwargs: field/value to match :return: matching row(s) from the model """ base_model = getattr(model, 'objects...
{"/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,099
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/gui/server/gui_server/webApp/templatetags/common.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.template import Library register = Library() @register.simple_tag def define(val): """ Dynamically define a variable within a template :param val: value to assign :return: value """ return val @register.filter(name...
{"/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,100
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/backup/views/import_export.py
""" Save and load data for the Orchestrator """ from rest_framework import permissions from rest_framework.parsers import JSONParser, MultiPartParser from rest_framework.renderers import JSONRenderer from rest_framework_files.viewsets import ImportExportModelViewSet # Local imports from actuator.models import 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,101
g2-inc/openc2-oif-orchestrator
refs/heads/master
/base/modules/utils/twisted/sb_utils/twisted_tools.py
# -*- coding: utf-8 -*- # pylint: disable=C0111,C0103,R0205 """ # based on: # - txamqp-helpers by Dan Siemon <dan@coverfire.com> (March 2010) # http://git.coverfire.com/?p=txamqp-twistd.git;a=tree # - Post by Brian Chandler # https://groups.google.com/forum/#!topic/pika-python/o_deVmGondk # - Pika Documentatio...
{"/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,102
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/transport/coap/COAP/coap_server.py
import os from coapthon import defines from coapthon.resources.resource import Resource from coapthon.server.coap import CoAP from sb_utils import decode_msg, encode_msg, Producer class TransportResource(Resource): def __init__(self, name="TransportResource", coap_server=None): super(TransportResource, ...
{"/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,103
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/device/migrations/0005_auto_20191220_1353.py
# Generated by Django 2.2.7 on 2019-12-20 13:53 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('device', '0004_remove_device_multi_actuator'), ] operations = [ migrations.RemoveField( model_name='transport', name...
{"/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,104
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/command/processors.py
import random # Local imports from actuator.models import Actuator from orchestrator.models import Protocol from tracking import log from utils import decode_msg, get_or_none, isHex, safe_cast from .models import SentHistory, ResponseHistory def command_response(body, message): """ Process a command received...
{"/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,105
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/tracking/views/viewsets.py
from rest_framework import permissions, viewsets from ..models import EventLog, EventLogSerializer, RequestLog, RequestLogSerializer class RequestLogViewSet(viewsets.ReadOnlyModelViewSet): """ API endpoint that allows logs to be viewed """ permission_classes = (permissions.IsAdminUser, ) serializ...
{"/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,106
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/es_mirror/decorators.py
from django.db.models import Model from elasticsearch_dsl import Document from .apps import ES_Hooks def ElasticModel(doc: Document) -> Model: def wrapper(model: Model) -> Model: if ES_Hooks: ES_Hooks.add_model(model, doc) return model return wrapper
{"/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,107
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/orchestrator/views/gui.py
from django.http import HttpResponseRedirect from django.shortcuts import reverse def gui_redirect(request): """ GUI redirect to API :param request: request instance :return: HTTP Redirect """ return HttpResponseRedirect(reverse('api.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,108
g2-inc/openc2-oif-orchestrator
refs/heads/master
/base/modules/utils/root/sb_utils/message/pysmile/decode.py
#!/usr/bin/env python """ SMILE Decode """ import json import logging import struct from dataclasses import dataclass from enum import Enum from typing import ( Callable, Dict, List, Union ) from . import util from .constants import ( BYTE_MARKER_END_OF_CONTENT, BYTE_MARKER_END_OF_STRING, ...
{"/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,109
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/conformance/tests/sfpf_tests.py
""" OpenC2 Stateful Packet Filtering Profile (SFPF) Conformance """ from test_setup import SetupTestCase class SFPF_UnitTests(SetupTestCase): """ SFPF OpenC2 Conformance Tests """ profile = "SFPF"
{"/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,110
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/command/models.py
import uuid from django.contrib.auth.models import User from django.dispatch import receiver from django.db import models from django.db.models.signals import pre_save from django.utils import timezone from jsonfield import JSONField from rest_framework import serializers # Local Imports from actuator.models import 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,111
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/device/models.py
import uuid from django.contrib.auth.models import User from django.core.exceptions import ValidationError as DjangoValidationError from django.core.validators import MaxValueValidator, MinValueValidator from django.db import models from django.db.models.signals import m2m_changed, post_delete from django.db.models.qu...
{"/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,112
g2-inc/openc2-oif-orchestrator
refs/heads/master
/base/modules/utils/root/sb_utils/general.py
import base64 import binascii import json import re import struct import sys import uuid from typing import ( Any, Callable, Dict, Type, Union ) # Util Functions def toStr(s: Any) -> str: """ Convert a given type to a default string :param s: item to convert to a string :return: c...
{"/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,113
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/tracking/views/api.py
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): """ Logging root """ rtn = dict( message="Hello, {}. You...
{"/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,114
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/gui/server/gui_server/account/urls.py
from django.urls import include, path from rest_framework import routers from rest_framework_jwt.views import obtain_jwt_token, refresh_jwt_token, verify_jwt_token from . import views router = routers.DefaultRouter() router.register(r'', views.UserViewSet) urlpatterns = [ # JWT Tokens path('jwt/', include([...
{"/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,115
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/gui/server/gui_server/tracking/urls/gui.py
from django.urls import include, path from .. import views urlpatterns = [ path('', views.gui_root, name='tracking.gui_root'), path('events', views.gui_events, name='tracking.gui_events'), path('requests', views.gui_requests, name='tracking.gui_requests'), ]
{"/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,116
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/conformance/tests/general_tests.py
""" OpenC2 Generic Conformance """ import random from test_setup import SetupTestCase class General_UnitTests(SetupTestCase): """ General OpenC2 Conformance Tests """ profile = "General" def test_headers(self): """ Test of OpenC2 specific headers """ print("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,117
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/gui/server/gui_server/account/views/__init__.py
import os import pkgutil import sys from importlib import import_module for _, name, _ in pkgutil.iter_modules([os.path.dirname(__file__)]): module = import_module(f'.{name}', package=__name__) exports = getattr(module, 'exports', None) if exports: for export in exports: if hasattr(...
{"/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,118
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/tracking/__init__.py
default_app_config = 'tracking.conf.TrackingConfig' class FrozenDict(dict): def __init__(self, *args, **kwargs): self._hash = None super(FrozenDict, self).__init__(*args, **kwargs) def __hash__(self): if self._hash is None: self._hash = hash(tuple(sorted(self.items()))) #...
{"/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,119
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/command/views/__init__.py
from .actions import action_send from .viewsets import HistoryViewSet, SentHistory __all__ = [ # Actions 'action_send', # Viewsets 'HistoryViewSet', 'SentHistory', ]
{"/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,120
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/account/urls.py
from django.urls import include, path from rest_framework import routers from rest_framework_jwt.views import obtain_jwt_token, refresh_jwt_token, verify_jwt_token from . import views router = routers.DefaultRouter() router.register('', views.UserViewSet) router.register('(?P<username>[^/.]+)/history', views.UserHis...
{"/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,121
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/conformance/tests/__init__.py
from .utils import get_tests, load_test_suite, tests_in_suite, TestResults __all__ = [ 'get_tests', 'load_test_suite', 'tests_in_suite', 'TestResults' ]
{"/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,122
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/gui/server/gui_server/webApp/__init__.py
import sys ver = sys.version_info if ver < (3, 6): print('PythonVersionError: Minimum version of v3.6+ not found') exit(1) default_app_config = 'webApp.apps.WebAppConfig'
{"/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,123
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/backup/utils/__init__.py
from rest_framework_msgpack.parsers import MessagePackParser from rest_framework_msgpack.renderers import MessagePackRenderer from rest_framework_xml.parsers import XMLParser from rest_framework_xml.renderers import XMLRenderer from .xls import XLSParser, XLSRenderer __all__ = [ # MsgPack 'MessagePackParser'...
{"/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,124
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/orchestrator/management/commands/createsuperuser_default.py
import sys from django.contrib.auth.models import User from django.core.management.base import BaseCommand class Command(BaseCommand): """ Custom django command - createsuperuser_default Create a default superuser is one does not exist """ def handle(self, *args, **kwargs): """ Ha...
{"/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,125
g2-inc/openc2-oif-orchestrator
refs/heads/master
/base/modules/utils/root/sb_utils/message/helpers.py
""" Serialization encode/decode helper functions """ import bencode import collections import json import os import sexpdata import tempfile import xmltodict from subprocess import Popen, PIPE from typing import ( Union ) from ..general import ( check_values, default_encode, floatByte ) # Message Co...
{"/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,126
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/orchestrator/__init__.py
import sys if sys.version_info < (3, 6): print('PythonVersionError: Minimum version of v3.6+ not found') sys.exit(1) default_app_config = 'orchestrator.apps.OrchestratorConfig'
{"/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,127
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/orchestrator/admin.py
from django.contrib import admin from rest_framework.authtoken.admin import TokenAdmin from .models import Protocol, Serialization class ProtocolAdmin(admin.ModelAdmin): """ Protocol model admin """ list_display = ('name', 'pub_sub', 'port') class SerializationAdmin(admin.ModelAdmin): """ S...
{"/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,128
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/device/admin.py
from django.contrib import admin from .models import Device, DeviceGroup, Transport class TransportAdmin(admin.ModelAdmin): """ Transport model admin """ list_display = ('transport_id', 'host', 'port', 'protocol', ) filter_horizontal = ('serialization', ) class DeviceAdmin(admin.ModelAdmin): ...
{"/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,129
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/gui/server/gui_server/orchestrator/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 from ..models import Orchestrator @api_view(['GET']) @permission_classes((permissions.IsAuthenticated...
{"/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,130
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/orchestrator/models.py
from django.conf import settings from django.db import models from django.db.models.signals import post_save from django.dispatch import receiver from django.core.validators import MaxValueValidator, MinValueValidator from rest_framework.authtoken.models import Token class Protocol(models.Model): """ OpenC2 P...
{"/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,131
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/gui/server/gui_server/orchestrator/urls/api.py
from django.urls import include, path from rest_framework import routers from .. import views router = routers.DefaultRouter() router.register(r'registered', views.OrchestratorViewSet) router.register(r'auth', views.OrchestratorAuthViewSet) urlpatterns = [ # Routers path('', views.api_root, name='orchestra...
{"/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,132
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/orchestrator/urls.py
from django.conf import settings from django.contrib import admin from django.urls import include, path # from rest_framework import routers from rest_framework.schemas import get_schema_view from rest_framework_swagger.views import get_swagger_view # from dynamic_preferences.api.viewsets import GlobalPreferencesView...
{"/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,133
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/command/migrations/0002_senthistory__coap_id.py
# Generated by Django 2.2 on 2019-05-02 17:42 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('command', '0001_initial'), ] operations = [ migrations.AddField( model_name='senthistory', name='_coap_id', ...
{"/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,134
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/es_mirror/document.py
from django.db.models import Model from elasticsearch_dsl import Document as DSL_Document, InnerDoc, Nested, Object from .utils import es_dict, get_nestedFields class Document(DSL_Document): @classmethod def model_init(cls, model: Model = None) -> 'Document': fields = dict( _id=model.pk ...
{"/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,135
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/es_mirror/apps.py
from django.apps import AppConfig from .settings import SETTINGS from .utils import ElasticHooks ES_Hooks = ElasticHooks(**SETTINGS) class EsMirrorConfig(AppConfig): name = 'es_mirror' verbose_name = 'Elasticsearch Mirror'
{"/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,136
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/gui/server/gui_server/utils/api_test.py
from orchestrator_api import OrchestratorAPI orc_api = OrchestratorAPI('http://localhost:8080/api/', ws=False) # orc_api = OrchestratorAPI('http://localhost:8080/', ws=True) jwt = orc_api.account.jwt(body=dict(username="admin", password="password")) token = jwt.body.get('token', '') opts = dict( headers=dict( ...
{"/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,137
g2-inc/openc2-oif-orchestrator
refs/heads/master
/orchestrator/core/orc_server/conformance/admin.py
from django.contrib import admin from .models import ConformanceTest class ConformanceTestAdmin(admin.ModelAdmin): """ ConformanceTest admin """ list_display = ('test_id', 'actuator_tested', 'test_time') readonly_fields = ('test_id', 'actuator_tested', 'test_time', 'tests_run', 'test_results') ...
{"/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...