index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
61,061
CIGAUNAM/SIA
refs/heads/master
/formacion_recursos_humanos/apps.py
from django.apps import AppConfig class FormacionRecursosHumanosConfig(AppConfig): name = 'formacion_recursos_humanos'
{"/apoyo_institucional/models.py": ["/nucleo/models.py"], "/experiencia_laboral/serializers.py": ["/experiencia_laboral/models.py"], "/vinculacion/admin.py": ["/vinculacion/models.py"], "/nucleo/serializers.py": ["/nucleo/models.py", "/formacion_academica/models.py"], "/formacion_academica/serializers.py": ["/formacion...
61,062
CIGAUNAM/SIA
refs/heads/master
/formacion_academica/admin.py
from django.contrib import admin # Register your models here. from . models import CursoEspecializacion, Licenciatura, \ Maestria, Doctorado, PostDoctorado admin.site.register(CursoEspecializacion) admin.site.register(Licenciatura) admin.site.register(Maestria) admin.site.register(Doctorado) admin.site.register...
{"/apoyo_institucional/models.py": ["/nucleo/models.py"], "/experiencia_laboral/serializers.py": ["/experiencia_laboral/models.py"], "/vinculacion/admin.py": ["/vinculacion/models.py"], "/nucleo/serializers.py": ["/nucleo/models.py", "/formacion_academica/models.py"], "/formacion_academica/serializers.py": ["/formacion...
61,063
CIGAUNAM/SIA
refs/heads/master
/nucleo/urls.py
from django.conf.urls import url from rest_framework.urlpatterns import format_suffix_patterns from nucleo import views urlpatterns = [ url(r'^tags/', views.TagLista.as_view()), url(r'^rest/tags/$', views.TagList.as_view()), url(r'^rest/tag/(?P<pk>[0-9]+)/$', views.TagDetail.as_view()), url(r'^rest/zo...
{"/apoyo_institucional/models.py": ["/nucleo/models.py"], "/experiencia_laboral/serializers.py": ["/experiencia_laboral/models.py"], "/vinculacion/admin.py": ["/vinculacion/models.py"], "/nucleo/serializers.py": ["/nucleo/models.py", "/formacion_academica/models.py"], "/formacion_academica/serializers.py": ["/formacion...
61,064
CIGAUNAM/SIA
refs/heads/master
/investigacion/admin.py
from django.contrib import admin # Register your models here. from . models import ArticuloCientifico, CapituloLibroInvestigacion, MapaArbitrado, InformeTecnico admin.site.register(ArticuloCientifico) admin.site.register(CapituloLibroInvestigacion) admin.site.register(MapaArbitrado) admin.site.register(InformeTecnic...
{"/apoyo_institucional/models.py": ["/nucleo/models.py"], "/experiencia_laboral/serializers.py": ["/experiencia_laboral/models.py"], "/vinculacion/admin.py": ["/vinculacion/models.py"], "/nucleo/serializers.py": ["/nucleo/models.py", "/formacion_academica/models.py"], "/formacion_academica/serializers.py": ["/formacion...
61,065
CIGAUNAM/SIA
refs/heads/master
/difusion_cientifica/admin.py
from django.contrib import admin # Register your models here. from . models import MemoriaInExtenso, PrologoLibro, Resena, OrganizacionEventoAcademico, ParticipacionEventoAcademico admin.site.register(MemoriaInExtenso) admin.site.register(PrologoLibro) admin.site.register(Resena) admin.site.register(OrganizacionEven...
{"/apoyo_institucional/models.py": ["/nucleo/models.py"], "/experiencia_laboral/serializers.py": ["/experiencia_laboral/models.py"], "/vinculacion/admin.py": ["/vinculacion/models.py"], "/nucleo/serializers.py": ["/nucleo/models.py", "/formacion_academica/models.py"], "/formacion_academica/serializers.py": ["/formacion...
61,066
CIGAUNAM/SIA
refs/heads/master
/vinculacion/apps.py
from django.apps import AppConfig class VinculacionConfig(AppConfig): name = 'vinculacion'
{"/apoyo_institucional/models.py": ["/nucleo/models.py"], "/experiencia_laboral/serializers.py": ["/experiencia_laboral/models.py"], "/vinculacion/admin.py": ["/vinculacion/models.py"], "/nucleo/serializers.py": ["/nucleo/models.py", "/formacion_academica/models.py"], "/formacion_academica/serializers.py": ["/formacion...
61,067
CIGAUNAM/SIA
refs/heads/master
/experiencia_laboral/urls.py
from django.conf.urls import url from rest_framework.urlpatterns import format_suffix_patterns from experiencia_laboral import views urlpatterns = [ url(r'^experiencias.laborales/$', views.ExperienciaLaboralList.as_view()), url(r'^experiencia.laboral/(?P<pk>[0-9]+)/$', views.ExperienciaLaboralDetail.as_view()...
{"/apoyo_institucional/models.py": ["/nucleo/models.py"], "/experiencia_laboral/serializers.py": ["/experiencia_laboral/models.py"], "/vinculacion/admin.py": ["/vinculacion/models.py"], "/nucleo/serializers.py": ["/nucleo/models.py", "/formacion_academica/models.py"], "/formacion_academica/serializers.py": ["/formacion...
61,068
CIGAUNAM/SIA
refs/heads/master
/investigacion/models.py
from django.db import models from django.conf import settings from autoslug import AutoSlugField from nucleo.models import User, Tag, Pais, Estado, Ciudad, Ubicacion, Institucion, Dependencia, Cargo, Proyecto, TipoDocumento, Revista, Indice, Libro, Editorial, Coleccion STATUS_PUBLICACION = getattr(settings, 'STATUS_P...
{"/apoyo_institucional/models.py": ["/nucleo/models.py"], "/experiencia_laboral/serializers.py": ["/experiencia_laboral/models.py"], "/vinculacion/admin.py": ["/vinculacion/models.py"], "/nucleo/serializers.py": ["/nucleo/models.py", "/formacion_academica/models.py"], "/formacion_academica/serializers.py": ["/formacion...
61,069
CIGAUNAM/SIA
refs/heads/master
/formacion_academica/urls.py
from django.conf.urls import url from rest_framework.urlpatterns import format_suffix_patterns from formacion_academica import views urlpatterns = [ url(r'^cursos.especializacion/$', views.CursoEspecializacionList.as_view()), url(r'^curso.especializacion/(?P<pk>[0-9]+)/$', views.CursoEspecializacionDetail.as_v...
{"/apoyo_institucional/models.py": ["/nucleo/models.py"], "/experiencia_laboral/serializers.py": ["/experiencia_laboral/models.py"], "/vinculacion/admin.py": ["/vinculacion/models.py"], "/nucleo/serializers.py": ["/nucleo/models.py", "/formacion_academica/models.py"], "/formacion_academica/serializers.py": ["/formacion...
61,070
CIGAUNAM/SIA
refs/heads/master
/formacion_academica/models.py
from django.db import models from django.conf import settings from autoslug import AutoSlugField from nucleo.models import User, Tag, Dependencia, AreaConocimiento, ProgramaLicenciatura, ProgramaMaestria, ProgramaDoctorado, Proyecto CURSO_ESPECIALIZACION_TIPO = getattr(settings, 'CURSO_ESPECIALIZACION_TIPO', (('CURSO...
{"/apoyo_institucional/models.py": ["/nucleo/models.py"], "/experiencia_laboral/serializers.py": ["/experiencia_laboral/models.py"], "/vinculacion/admin.py": ["/vinculacion/models.py"], "/nucleo/serializers.py": ["/nucleo/models.py", "/formacion_academica/models.py"], "/formacion_academica/serializers.py": ["/formacion...
61,071
CIGAUNAM/SIA
refs/heads/master
/movilidad_academica/admin.py
from django.contrib import admin # Register your models here. from . models import EstanciaColaboracion admin.site.register(EstanciaColaboracion)
{"/apoyo_institucional/models.py": ["/nucleo/models.py"], "/experiencia_laboral/serializers.py": ["/experiencia_laboral/models.py"], "/vinculacion/admin.py": ["/vinculacion/models.py"], "/nucleo/serializers.py": ["/nucleo/models.py", "/formacion_academica/models.py"], "/formacion_academica/serializers.py": ["/formacion...
61,072
CIGAUNAM/SIA
refs/heads/master
/geom/envolvente.py
from random import randrange from geom.geomcom import Punto2D from geom.funciones import * import pygame, sys from pygame.locals import * puntos = [] ps = [(181, 40), (119, 121), (245, 226), (180, 90), (377, 225), (293, 285), (294, 46)] for i in ps: puntos.append(Punto2D(i[0], i[1])) pt = puntos.copy() pyg...
{"/apoyo_institucional/models.py": ["/nucleo/models.py"], "/experiencia_laboral/serializers.py": ["/experiencia_laboral/models.py"], "/vinculacion/admin.py": ["/vinculacion/models.py"], "/nucleo/serializers.py": ["/nucleo/models.py", "/formacion_academica/models.py"], "/formacion_academica/serializers.py": ["/formacion...
61,073
CIGAUNAM/SIA
refs/heads/master
/nucleo/models.py
from django.db import models from django.contrib.auth.models import AbstractUser from django.conf import settings from autoslug import AutoSlugField STATUS_PROYECTO = getattr(settings, 'STATUS_PROYECTO', (('NUEVO', 'Nuevo'), ('EN_PROCESO', 'En proceso'), ('CONCLUIDO', 'Concluído'), ('OTRO', 'Otro'))) CLASIFICACION_...
{"/apoyo_institucional/models.py": ["/nucleo/models.py"], "/experiencia_laboral/serializers.py": ["/experiencia_laboral/models.py"], "/vinculacion/admin.py": ["/vinculacion/models.py"], "/nucleo/serializers.py": ["/nucleo/models.py", "/formacion_academica/models.py"], "/formacion_academica/serializers.py": ["/formacion...
61,074
CIGAUNAM/SIA
refs/heads/master
/nucleo/admin.py
from django.contrib import admin # Register your models here. from . models import Tag, ZonaPais, Pais, Estado, Ciudad, Region, Ubicacion, Institucion, Dependencia, Departamento, \ User, ProgramaFinanciamiento, AreaConocimiento, AreaEspecialidad, ImpactoSocial, Cargo, Financiamiento, \ Metodologia, Beca, Tesi...
{"/apoyo_institucional/models.py": ["/nucleo/models.py"], "/experiencia_laboral/serializers.py": ["/experiencia_laboral/models.py"], "/vinculacion/admin.py": ["/vinculacion/models.py"], "/nucleo/serializers.py": ["/nucleo/models.py", "/formacion_academica/models.py"], "/formacion_academica/serializers.py": ["/formacion...
61,075
CIGAUNAM/SIA
refs/heads/master
/vinculacion/models.py
from django.db import models from django.conf import settings from autoslug import AutoSlugField from nucleo.models import User, Tag, Pais, Estado, Ciudad, Region, Ubicacion, Institucion, Dependencia, Cargo, Proyecto, TipoDocumento, Revista, Indice, Libro, Editorial, Coleccion from investigacion.models import Capitulo...
{"/apoyo_institucional/models.py": ["/nucleo/models.py"], "/experiencia_laboral/serializers.py": ["/experiencia_laboral/models.py"], "/vinculacion/admin.py": ["/vinculacion/models.py"], "/nucleo/serializers.py": ["/nucleo/models.py", "/formacion_academica/models.py"], "/formacion_academica/serializers.py": ["/formacion...
61,076
CIGAUNAM/SIA
refs/heads/master
/divulgacion_cientifica/admin.py
from django.contrib import admin # Register your models here. from . models import ArticuloDivulgacion, LibroDivulgacion, CapituloLibroDivulgacion, OrganizacionEvento, ParticipacionEvento, MedioDivulgacion, ProgramaRadioTelevisionInternet admin.site.register(ArticuloDivulgacion) admin.site.register(LibroDivulgacion)...
{"/apoyo_institucional/models.py": ["/nucleo/models.py"], "/experiencia_laboral/serializers.py": ["/experiencia_laboral/models.py"], "/vinculacion/admin.py": ["/vinculacion/models.py"], "/nucleo/serializers.py": ["/nucleo/models.py", "/formacion_academica/models.py"], "/formacion_academica/serializers.py": ["/formacion...
61,077
CIGAUNAM/SIA
refs/heads/master
/experiencia_laboral/models.py
from django.db import models from nucleo.models import User, Tag, Cargo, Nombramiento, Dependencia # Create your models here. class ExperienciaLaboral(models.Model): dependencia = models.ForeignKey(Dependencia) nombramiento = models.ForeignKey(Nombramiento, blank=True, null=True) es_nombramiento_definiti...
{"/apoyo_institucional/models.py": ["/nucleo/models.py"], "/experiencia_laboral/serializers.py": ["/experiencia_laboral/models.py"], "/vinculacion/admin.py": ["/vinculacion/models.py"], "/nucleo/serializers.py": ["/nucleo/models.py", "/formacion_academica/models.py"], "/formacion_academica/serializers.py": ["/formacion...
61,078
CIGAUNAM/SIA
refs/heads/master
/docencia/models.py
from django.db import models #from django.contrib.auth.models import User from autoslug import AutoSlugField from nucleo.models import User, Tag, Dependencia, Proyecto from vinculacion.models import RedAcademica from formacion_academica.models import Licenciatura, Maestria, Doctorado # Create your models here. class...
{"/apoyo_institucional/models.py": ["/nucleo/models.py"], "/experiencia_laboral/serializers.py": ["/experiencia_laboral/models.py"], "/vinculacion/admin.py": ["/vinculacion/models.py"], "/nucleo/serializers.py": ["/nucleo/models.py", "/formacion_academica/models.py"], "/formacion_academica/serializers.py": ["/formacion...
61,079
CIGAUNAM/SIA
refs/heads/master
/experiencia_laboral/admin.py
from django.contrib import admin # Register your models here. from . models import ExperienciaLaboral, LineaInvestigacion, CapacidadPotencialidad admin.site.register(ExperienciaLaboral) admin.site.register(LineaInvestigacion) admin.site.register(CapacidadPotencialidad)
{"/apoyo_institucional/models.py": ["/nucleo/models.py"], "/experiencia_laboral/serializers.py": ["/experiencia_laboral/models.py"], "/vinculacion/admin.py": ["/vinculacion/models.py"], "/nucleo/serializers.py": ["/nucleo/models.py", "/formacion_academica/models.py"], "/formacion_academica/serializers.py": ["/formacion...
61,080
CIGAUNAM/SIA
refs/heads/master
/distinciones/apps.py
from django.apps import AppConfig class DistincionesConfig(AppConfig): name = 'distinciones'
{"/apoyo_institucional/models.py": ["/nucleo/models.py"], "/experiencia_laboral/serializers.py": ["/experiencia_laboral/models.py"], "/vinculacion/admin.py": ["/vinculacion/models.py"], "/nucleo/serializers.py": ["/nucleo/models.py", "/formacion_academica/models.py"], "/formacion_academica/serializers.py": ["/formacion...
61,081
CIGAUNAM/SIA
refs/heads/master
/desarrollo_tecnologico/admin.py
from django.contrib import admin # Register your models here. from . models import TipoDesarrollo, Licencia, DesarrolloTecnologico admin.site.register(TipoDesarrollo) admin.site.register(Licencia) admin.site.register(DesarrolloTecnologico)
{"/apoyo_institucional/models.py": ["/nucleo/models.py"], "/experiencia_laboral/serializers.py": ["/experiencia_laboral/models.py"], "/vinculacion/admin.py": ["/vinculacion/models.py"], "/nucleo/serializers.py": ["/nucleo/models.py", "/formacion_academica/models.py"], "/formacion_academica/serializers.py": ["/formacion...
61,082
CIGAUNAM/SIA
refs/heads/master
/divulgacion_cientifica/models.py
from django.db import models from django.conf import settings #from django.contrib.auth.models import User from autoslug import AutoSlugField from nucleo.models import User, Tag, Pais, Ciudad, Ubicacion, Proyecto, TipoEvento, Evento, Libro, Revista, Indice EVENTO__AMBITO = getattr(settings, 'EVENTO__AMBITO', (('INSTI...
{"/apoyo_institucional/models.py": ["/nucleo/models.py"], "/experiencia_laboral/serializers.py": ["/experiencia_laboral/models.py"], "/vinculacion/admin.py": ["/vinculacion/models.py"], "/nucleo/serializers.py": ["/nucleo/models.py", "/formacion_academica/models.py"], "/formacion_academica/serializers.py": ["/formacion...
61,083
CIGAUNAM/SIA
refs/heads/master
/formacion_academica/views.py
from django.shortcuts import render from django.http.response import HttpResponse from . permissions import IsOwnerOrReadOnly from rest_framework import permissions from formacion_academica.serializers import * from rest_framework import generics # Create your views here. class CursoEspecializacionList(generics.Li...
{"/apoyo_institucional/models.py": ["/nucleo/models.py"], "/experiencia_laboral/serializers.py": ["/experiencia_laboral/models.py"], "/vinculacion/admin.py": ["/vinculacion/models.py"], "/nucleo/serializers.py": ["/nucleo/models.py", "/formacion_academica/models.py"], "/formacion_academica/serializers.py": ["/formacion...
61,084
CIGAUNAM/SIA
refs/heads/master
/apoyo_institucional/admin.py
from django.contrib import admin # Register your models here. from . models import Actividad, Comision, Representacion, CargoAcademicoAdministrativo, \ RepresentanteAnteOrganoColegiado, ComisionAcademica, ApoyoTecnico, ApoyoOtraActividad #OrganoColegiado, ComisionEvaluacion admin.site.register(Actividad) admi...
{"/apoyo_institucional/models.py": ["/nucleo/models.py"], "/experiencia_laboral/serializers.py": ["/experiencia_laboral/models.py"], "/vinculacion/admin.py": ["/vinculacion/models.py"], "/nucleo/serializers.py": ["/nucleo/models.py", "/formacion_academica/models.py"], "/formacion_academica/serializers.py": ["/formacion...
61,085
CIGAUNAM/SIA
refs/heads/master
/geom/funciones.py
from math import sqrt, pow, hypot, atan2, cos, sin, degrees, radians from geom.geomcom import Punto2D import sys def dist(P, Q): """A math Point function to calculate the distance between 2 points.""" d = sqrt(pow(P.x - Q.x, 2) + pow(P.y - Q.y, 2)) return d def mid_point(P, Q): """A math Point func...
{"/apoyo_institucional/models.py": ["/nucleo/models.py"], "/experiencia_laboral/serializers.py": ["/experiencia_laboral/models.py"], "/vinculacion/admin.py": ["/vinculacion/models.py"], "/nucleo/serializers.py": ["/nucleo/models.py", "/formacion_academica/models.py"], "/formacion_academica/serializers.py": ["/formacion...
61,086
CIGAUNAM/SIA
refs/heads/master
/formacion_recursos_humanos/models.py
from django.db import models from django.conf import settings from nucleo.models import User, Tag, Dependencia, Beca, Proyecto, Tesis, ProgramaLicenciatura, ProgramaMaestria, ProgramaDoctorado GRADO_ACADEMICO = getattr(settings, 'GRADO_ACADEMICO', (('LICENCIATURA', 'licenciatura'), ('MAESTRIA', 'Maestría'), ('DOCTORA...
{"/apoyo_institucional/models.py": ["/nucleo/models.py"], "/experiencia_laboral/serializers.py": ["/experiencia_laboral/models.py"], "/vinculacion/admin.py": ["/vinculacion/models.py"], "/nucleo/serializers.py": ["/nucleo/models.py", "/formacion_academica/models.py"], "/formacion_academica/serializers.py": ["/formacion...
61,087
CIGAUNAM/SIA
refs/heads/master
/distinciones/models.py
from django.db import models from django.conf import settings #from django.contrib.auth.models import User from autoslug import AutoSlugField from nucleo.models import User, Dependencia, Distincion EVENTO__AMBITO = getattr(settings, 'EVENTO__AMBITO', (('INSTITUCIONAL', 'Institucional'), ('REGIONAL', 'Regional'), ('NA...
{"/apoyo_institucional/models.py": ["/nucleo/models.py"], "/experiencia_laboral/serializers.py": ["/experiencia_laboral/models.py"], "/vinculacion/admin.py": ["/vinculacion/models.py"], "/nucleo/serializers.py": ["/nucleo/models.py", "/formacion_academica/models.py"], "/formacion_academica/serializers.py": ["/formacion...
61,088
CIGAUNAM/SIA
refs/heads/master
/apoyo_institucional/apps.py
from django.apps import AppConfig class ApoyoInstitucionalConfig(AppConfig): name = 'apoyo_institucional'
{"/apoyo_institucional/models.py": ["/nucleo/models.py"], "/experiencia_laboral/serializers.py": ["/experiencia_laboral/models.py"], "/vinculacion/admin.py": ["/vinculacion/models.py"], "/nucleo/serializers.py": ["/nucleo/models.py", "/formacion_academica/models.py"], "/formacion_academica/serializers.py": ["/formacion...
61,089
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/sg/factory.py
""" Smartglass packet factory """ from construct import Container from xbox.sg.enum import PacketType, MessageType, ClientType from xbox.sg.packet import simple, message CHANNEL_CORE = 0 def _message_header(msg_type, channel_id=0, target_participant_id=0, source_participant_id=0, is_fragment=Fals...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,090
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/auxiliary/manager.py
import logging from typing import Any from xbox.sg import factory from xbox.sg.manager import Manager from xbox.sg.enum import ServiceChannel, MessageType from xbox.sg.constants import MessageTarget from xbox.sg.utils.events import Event log = logging.getLogger(__name__) class TitleManagerError(Exception): """...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,091
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/tests/test_struct.py
import construct from xbox.sg.utils import struct, adapters def test_xstruct(): test_struct = struct.XStruct( 'a' / construct.Int32ub, 'b' / construct.Int16ub ) obj = test_struct(a=1, b=2) assert test_struct.a.subcon == construct.Int32ub assert test_struct.b.subcon == construct.I...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,092
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/tests/test_auxstream_packing.py
import io from xbox.sg.crypto import PKCS7Padding from xbox.auxiliary import packer from xbox.auxiliary import packet def _read_aux_packets(data): with io.BytesIO(data) as stream: while stream.tell() < len(data): header_data = stream.read(4) header = packet.aux_header_struct.parse...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,093
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/rest/singletons.py
import aiohttp from typing import Dict, Optional from .schemas.auth import AuthSessionConfig from .consolewrap import ConsoleWrap from xbox.webapi.api.client import XboxLiveClient from xbox.webapi.api.provider.titlehub import TitleHubResponse from xbox.webapi.authentication.manager import AuthenticationManager htt...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,094
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/tests/test_adapters.py
import pytest import construct from xbox.sg.utils import adapters @pytest.mark.skip(reason="Not Implemented") def test_cryptotunnel(): pass def test_json(): import json test_data = {"Z": "ABC", "A": "XYZ", "B": 23} bytes_data = json.dumps(test_data, separators=(',', ':')...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,095
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/rest/common.py
import aiohttp from xbox.webapi.authentication.manager import AuthenticationManager from .schemas.auth import AuthenticationStatus, AuthSessionConfig def generate_authentication_status( manager: AuthenticationManager ) -> AuthenticationStatus: return AuthenticationStatus( oauth=manager.oauth, ...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,096
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/rest/__init__.py
SMARTGLASS_PACKAGENAMES = [ 'xbox-smartglass-core', 'xbox-smartglass-nano', 'xbox-webapi' ]
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,097
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/auxiliary/__init__.py
""" Auxiliary stream support for smartglass """
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,098
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/stump/json_model.py
""" JSON models for deserializing Stump messages """ from typing import List, Dict, Union, Optional from uuid import UUID from pydantic import BaseModel from xbox.stump.enum import Message class StumpJsonError(Exception): pass # Root-level containers class StumpRequest(BaseModel): msgid: str request: st...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,099
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/tests/test_stump_json_models.py
import pytest from xbox.stump import json_model from xbox.stump.enum import Message def test_stump_response(stump_json): data = stump_json['response_recent_channels'] msg = json_model.deserialize_stump_message(data) assert msg.msgid == 'xV5X1YCB.16' assert Message(msg.response) == Message.R...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,100
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/tests/test_factory.py
import uuid from binascii import unhexlify from xbox.sg import enum, constants from xbox.sg import packer from xbox.sg import factory def _pack(msg, crypto): return packer.pack(msg, crypto) def test_message_header(): msg = factory._message_header( msg_type=enum.MessageType.Ack, target_parti...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,101
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/rest/schemas/root.py
from typing import Dict, Optional from pydantic import BaseModel class IndexResponse(BaseModel): versions: Dict[str, Optional[str]] doc_path: str
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,102
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/rest/app.py
from fastapi import FastAPI import uvicorn import aiohttp from . import singletons from .api import api_router app = FastAPI(title='SmartGlass REST server') @app.on_event("startup") async def startup_event(): singletons.http_session = aiohttp.ClientSession() @app.on_event("shutdown") async def shutdown_event(...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,103
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/sg/__init__.py
""" Meta package for xbox-smartglass-core-python. Version and author information. """ __author__ = """OpenXbox""" __version__ = '1.3.0'
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,104
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/tests/test_padding.py
from xbox.sg.crypto import Padding, PKCS7Padding, ANSIX923Padding def test_calculate_padding(): align_16 = Padding.size(12, alignment=16) align_12 = Padding.size(12, alignment=12) align_10 = Padding.size(12, alignment=10) assert align_16 == 4 assert align_12 == 0 assert align_10 == 8 def te...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,105
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/rest/deps.py
from typing import Tuple, Optional import aiohttp from fastapi import Query, Header, HTTPException, status from xbox.webapi.api.language import DefaultXboxLiveLanguages, XboxLiveLanguage from . import singletons from .common import generate_authentication_status from .schemas.auth import AuthenticationStatus from xbo...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,106
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/sg/packer.py
""" Smartglass message un-/packing Also handles de/encryption internally, this means: You feed plaintext data (wrapped in :class:`.XStruct`) and you get plaintext data **Note on encryption** Depending on the packet-type, acquiring the `Initialization Vector` and encrypting the `protected payload` happens differently:...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,107
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/handlers/text_input.py
""" Text smartglass client """ import logging import asyncio import aioconsole LOGGER = logging.getLogger(__name__) async def userinput_callback(console, prompt): print('WAITING FOR TEXT INPUT...') text = await aioconsole.ainput(prompt) await console.send_systemtext_input(text) await console.finish_...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,108
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/sg/utils/struct.py
""" Custom construct fields and utilities """ import construct COMPILED = True class XStruct(construct.Subconstruct): def __init__(self, *args, **kwargs): struct = construct.Struct(*args, **kwargs) super(XStruct, self).__init__(struct) self.compiled = self.compile() if COMPILED else None...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,109
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/scripts/recrypt.py
""" Encrypt smartglass messages (type 0xD00D) with a new key Example: usage: xbox_recrypt [-h] src_path src_secret dst_path dst_secret Re-Encrypt raw smartglass packets from a given filepath positional arguments: src_path Path to sourcefiles src_secret Source shared secret in hex-format ...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,110
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/tests/test_managers.py
import pytest @pytest.mark.skip(reason="Not Implemented") def test_x1(): pass
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,111
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/tests/test_console.py
from xbox.sg import console from xbox.sg import enum from xbox.sg import packer def test_init(public_key, uuid_dummy): c = console.Console( '10.0.0.23', 'XboxOne', uuid_dummy, 'FFFFFFFFFFF', enum.PrimaryDeviceFlag.AllowConsoleUsers, 0, public_key ) assert c.address == '10.0.0.23' asse...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,112
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/stump/manager.py
""" StumpManager - Handling TV Streaming / IR control commands """ import random import logging import requests from typing import Union from xbox.sg.utils.events import Event from xbox.sg.enum import ServiceChannel from xbox.sg.manager import Manager from xbox.stump.enum import Message, Notification, Source, Source...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,113
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/scripts/pcap.py
""" Parse a pcap packet capture and show decrypted packets in a human-readable ways. Requires the shared secret for that smartglass-session. """ import os import shutil import string import textwrap import argparse from binascii import unhexlify import dpkt from xbox.sg import packer from xbox.sg.crypto import Crypt...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,114
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/handlers/fallout4_relay.py
""" Fallout 4 AuxiliaryStream Relay client Tunnels packets via TCP/27000 - compatible with regular PipBoy-clients """ import logging import asyncio from xbox.auxiliary.relay import AuxiliaryRelayService from xbox.sg.utils.struct import XStructObj LOGGER = logging.getLogger(__name__) FALLOUT_TITLE_ID = 0x4ae8f9b2 LOC...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,115
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/sg/utils/adapters.py
""" Adapters and other Construct utility classes """ import json import construct from io import BytesIO from enum import Enum from uuid import UUID from cryptography import x509 from cryptography.x509.oid import NameOID from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives.serial...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,116
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/tests/test_cli_scripts.py
import pytest @pytest.mark.script_launch_mode('subprocess') def test_cli_rest_server(script_runner): """ Needs to be done in subprocess due to monkey-patching """ ret = script_runner.run('xbox-rest-server', '--help') assert ret.success def test_cli_maincli(script_runner): ret = script_runner...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,117
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/scripts/main_cli.py
""" Main smartglass client Common script that handles several subcommands See `Commands` """ import os import sys import logging import argparse import functools import asyncio import aioconsole import aiohttp from typing import List from logging.handlers import RotatingFileHandler from xbox.webapi.authentication.mo...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,118
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_namespace_packages setup( name="xbox-smartglass-core", version="1.3.0", author="OpenXbox", author_email="noreply@openxbox.org", description="A library to interact with the Xbox One gaming console via the SmartGlass pr...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,119
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/rest/schemas/general.py
from typing import Dict, Optional from pydantic import BaseModel class GeneralResponse(BaseModel): success: bool details: Optional[Dict[str, str]]
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,120
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/rest/routes/root.py
from fastapi import APIRouter from .. import schemas, SMARTGLASS_PACKAGENAMES router = APIRouter() @router.get('/', response_model=schemas.IndexResponse) def get_index(): import pkg_resources versions = {} for name in SMARTGLASS_PACKAGENAMES: try: versions[name] = pkg_resources.get_d...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,121
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/rest/consolewrap.py
from typing import Dict, Optional import logging from xbox.sg import enum from xbox.sg.console import Console from xbox.sg.manager import InputManager, TextManager, MediaManager from xbox.stump.manager import StumpManager from xbox.stump import json_model as stump_schemas from . import schemas log = logging.getLogge...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,122
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/sg/console.py
""" Console Console class is a wrapper around the protocol, can be used to `discover`, `poweron` and `connect`. Also stores various device status informations. It can be either created manually or instantiated via `DiscoveryResponse` message. However, calling static method `discover` does all that for you automatical...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,123
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/sg/constants.py
""" Constant values used by SmartGlass """ from uuid import UUID from xbox.sg.enum import ClientType, DeviceCapabilities class AndroidClientInfo(object): """ Client Info for Android device (tablet). Used for LocalJoin messages """ DeviceType = ClientType.Android # Resolution is portrait mode ...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,124
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/sg/manager.py
""" Managers for handling different ServiceChannels. If a manager for a specific :class:`ServiceChannel` is attached, incoming messages get forwarded there, otherways they are discarded. Managers can be attached by calling `add_manager()` on the :class:`Console` object (see example) Methods of manager are available t...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,125
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/stump/enum.py
""" Stump enumerations """ from uuid import UUID from enum import Enum class Message(str, Enum): """ Message types """ ERROR = "Error" ENSURE_STREAMING_STARTED = "EnsureStreamingStarted" CONFIGURATION = "GetConfiguration" HEADEND_INFO = "GetHeadendInfo" LIVETV_INFO = "GetLiveTVInfo" ...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,126
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/scripts/__init__.py
import os import logging from enum import IntEnum from appdirs import user_data_dir DATA_DIR = user_data_dir('xbox', 'OpenXbox') TOKENS_FILE = os.path.join(DATA_DIR, 'tokens.json') CONSOLES_FILE = os.path.join(DATA_DIR, 'consoles.json') if not os.path.exists(DATA_DIR): os.makedirs(DATA_DIR) LOG_FMT = '[%(asctim...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,127
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/auxiliary/crypto.py
""" Cryptography portion used for Title Channel aka Auxiliary Stream """ import hmac import hashlib from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes class AuxiliaryStreamCrypto(object): _backend = default_backend() def __ini...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,128
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/rest/schemas/__init__.py
from .root import IndexResponse from .general import GeneralResponse from .auth import AuthenticationStatus, AuthSessionConfig from .device import ( ConsoleStatusResponse, DeviceStatusResponse, MediaStateResponse, InfraredResponse, InfraredDevice, InfraredButton, MediaCommandsResponse, ...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,129
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/sg/protocol.py
""" Smartglass protocol core **NOTE**: Should not be used directly, use :class:`.Console` ! """ import uuid import json import base64 import logging import asyncio import socket from typing import List, Optional, Tuple, Dict, Union from xbox.sg import factory, packer, crypto, console from xbox.sg.packet.message im...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,130
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/tests/test_pcap.py
from xbox.scripts import pcap def test_pcap_filter(pcap_filepath): packets = list(pcap.packet_filter(pcap_filepath)) assert len(packets) == 26 def test_run_parser(pcap_filepath, crypto): pcap.parse(pcap_filepath, crypto)
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,131
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/sg/packet/simple.py
# flake8: noqa """ Construct containers for simple-message header and payloads """ from construct import * from xbox.sg import enum from xbox.sg.enum import PacketType from xbox.sg.utils.struct import XStruct from xbox.sg.utils.adapters import CryptoTunnel, XSwitch, XEnum, CertificateAdapter, UUIDAdapter, SGString, Fie...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,132
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/sg/utils/events.py
""" Wrapper around asyncio's tasks """ import asyncio class Event(object): def __init__(self, asynchronous: bool = False): self.handlers = [] self.asynchronous = asynchronous def add(self, handler): if not callable(handler): raise TypeError("Handler should be callable") ...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,133
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/rest/schemas/device.py
from typing import List, Dict, Optional from pydantic import BaseModel class DeviceStatusResponse(BaseModel): liveid: str ip_address: str connection_state: str pairing_state: str device_status: str last_error: int authenticated_users_allowed: bool console_users_allowed: bool anonymo...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,134
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/auxiliary/packet.py
from construct import Struct, Int16ub AUX_PACKET_MAGIC = 0xDEAD aux_header_struct = Struct( 'magic' / Int16ub, 'payload_size' / Int16ub # payload # hash )
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,135
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/auxiliary/relay.py
import logging # import gevent import asyncio from typing import Optional from xbox.sg.crypto import PKCS7Padding from xbox.sg.utils.events import Event from xbox.auxiliary import packer from xbox.auxiliary.packet import aux_header_struct, AUX_PACKET_MAGIC from xbox.auxiliary.crypto import AuxiliaryStreamCrypto from x...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,136
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/auxiliary/packer.py
from typing import List from xbox.auxiliary.crypto import AuxiliaryStreamCrypto from xbox.sg.crypto import PKCS7Padding from xbox.auxiliary.packet import aux_header_struct, AUX_PACKET_MAGIC class AuxiliaryPackerException(Exception): pass def pack( data: bytes, crypto: AuxiliaryStreamCrypto, server_...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,137
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/rest/api.py
from fastapi import APIRouter from xbox.rest.routes import root, auth, device, web api_router = APIRouter() api_router.include_router(root.router, tags=["root"]) api_router.include_router(auth.router, prefix="/auth", tags=["auth"]) api_router.include_router(device.router, prefix="/device", tags=["device"]) api_route...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,138
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/handlers/__init__.py
""" CLI script handlers """
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,139
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/scripts/rest_server.py
import argparse import uvicorn REST_DEFAULT_SERVER_PORT=5557 def main(): parser = argparse.ArgumentParser(description='Xbox REST server') parser.add_argument( '--host', '-b', default='127.0.0.1', help='Interface address to bind the server') parser.add_argument( '--port', '-p', type...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,140
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/tests/test_rest_consolewrap.py
import pytest from xbox.rest.consolewrap import ConsoleWrap from xbox.sg import enum def test_consolewrap_init(console): wrap = ConsoleWrap(console) assert wrap.console == console assert 'text' in wrap.console.managers assert 'input' in wrap.console.managers assert 'stump' in wrap.console.manage...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,141
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/sg/packet/message.py
# flake8: noqa """ Construct containers for message header and payloads """ from construct import * from xbox.sg import enum from xbox.sg.enum import PacketType, MessageType from xbox.sg.utils.struct import XStruct from xbox.sg.utils.adapters import CryptoTunnel, UUIDAdapter, JsonAdapter, XSwitch, XEnum, SGString, Pref...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,142
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/tests/test_auxmanager.py
import pytest from xbox.sg.enum import ServiceChannel from xbox.auxiliary.manager import TitleManager, TitleManagerError def test_manager_messagehandling(console, decrypted_packets): manager = TitleManager(console) def handle_msg(msg): manager._pre_on_message(msg, ServiceChannel.Title) assert m...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,143
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/tests/conftest.py
import os import pytest import uuid import json from fastapi import FastAPI from fastapi.testclient import TestClient from binascii import unhexlify from construct import Container from xbox.sg import enum, packer, packet from xbox.sg.console import Console from xbox.sg.crypto import Crypto from xbox.sg.manager impo...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,144
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/rest/routes/auth.py
import secrets import aiohttp from typing import Optional from fastapi import APIRouter, HTTPException, status from fastapi.responses import RedirectResponse from .. import singletons, schemas from ..common import generate_authentication_status, generate_authentication_manager from xbox.webapi.scripts import CLIENT_...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,145
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/handlers/gamepad_input.py
""" Input smartglass client Send controller input via stdin (terminal) to the console """ import sys import logging from xbox.sg.enum import GamePadButton LOGGER = logging.getLogger(__name__) input_map = { "i": GamePadButton.DPadUp, "k": GamePadButton.DPadDown, "j": GamePadButton.DPadLeft, "l": Game...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,146
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/tests/test_packer.py
from binascii import hexlify, unhexlify from xbox.sg import packer, enum from xbox.sg.constants import MessageTarget def _unpack(data, crypto): return packer.unpack(data, crypto) def _pack(msg, crypto): return packer.pack(msg, crypto) def test_poweron_request(packets, crypto): unpacked = _unpack(pack...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,147
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/rest/schemas/auth.py
from typing import List from pydantic import BaseModel from xbox.webapi.authentication.manager import AuthenticationManager from xbox.webapi.authentication.models import OAuth2TokenResponse, XSTSResponse class AuthSessionConfig(BaseModel): client_id: str client_secret: str redirect_uri: str scopes: Li...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,148
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/rest/routes/web.py
from typing import Optional from fastapi import APIRouter, Depends, HTTPException, status from ..deps import get_xbl_client from xbox.webapi.api.client import XboxLiveClient from xbox.webapi.api.provider.titlehub import TitleFields from xbox.webapi.api.provider.titlehub import models as titlehub_models from xbox.weba...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,149
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/sg/crypto.py
""" Cryptography portion used for sending Smartglass message Depending on the foreign public key type, the following Elliptic curves can be used: * Prime 256R1 * Prime 384R1 * Prime 521R1 1. On Discovery, the console responds with a DiscoveryResponse including a certificate, this certificate holds the console's ...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,150
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/sg/enum.py
""" Smartglass enumerations """ from enum import Enum, Flag class PacketType(Enum): """ Packet Types of core protocol: Connect*, Discovery*, PowerOnRequest -> SimpleMessage Message -> Message """ ConnectRequest = 0xCC00 ConnectResponse = 0xCC01 DiscoveryRequest = 0xDD00 DiscoveryR...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,151
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/tests/test_crypto.py
import pytest from binascii import unhexlify from xbox.sg.enum import PublicKeyType def test_generate_random_iv(crypto): rand_iv = crypto.generate_iv() rand_iv_2 = crypto.generate_iv() assert len(rand_iv) == 16 assert len(rand_iv_2) == 16 assert rand_iv != rand_iv_2 def test_generate_seeded_iv(...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,152
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/handlers/tui.py
""" Terminal UI Smartglass Client Supported functions: Poweron/off, launch title, gamepad input and entering text. Additional shows console status (active titles, OS version, locale) and media state. """ import json import urwid import logging import asyncio from typing import List, Optional from binascii import hexli...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,153
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/xbox/rest/routes/device.py
import logging from typing import Optional, List from fastapi import APIRouter, Depends, HTTPException from .. import schemas, singletons from ..deps import console_exists, console_connected, get_xbl_client, get_authorization from ..consolewrap import ConsoleWrap from xbox.webapi.api.client import XboxLiveClient fro...
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,154
OpenXbox/xbox-smartglass-core-python
refs/heads/master
/tests/test_protocol.py
import pytest from xbox.sg.protocol import _fragment_connect_request, FragmentError from xbox.sg.protocol import ChannelManager, ChannelError from xbox.sg.protocol import SequenceManager from xbox.sg.protocol import FragmentManager def test_fragment_connect_request(crypto): from uuid import UUID from xbox.sg....
{"/xbox/sg/factory.py": ["/xbox/sg/enum.py"], "/xbox/auxiliary/manager.py": ["/xbox/sg/__init__.py", "/xbox/sg/manager.py", "/xbox/sg/enum.py", "/xbox/sg/constants.py", "/xbox/sg/utils/events.py"], "/tests/test_auxstream_packing.py": ["/xbox/sg/crypto.py", "/xbox/auxiliary/__init__.py"], "/xbox/rest/singletons.py": ["/...
61,172
Ajinkz/swdc-sublime
refs/heads/master
/Software.py
# Copyright (c) 2018 by Software.com from threading import Thread, Timer, Event from package_control import events from queue import Queue import webbrowser import time import datetime import json import os import sublime_plugin, sublime from .lib.SoftwareHttp import * from .lib.SoftwareUtil import * from .lib.Softwar...
{"/Software.py": ["/lib/SoftwareUtil.py"]}
61,173
Ajinkz/swdc-sublime
refs/heads/master
/lib/SoftwareUtil.py
# Copyright (c) 2018 by Software.com from threading import Thread, Timer, Event import os import json import time import datetime import socket import sublime_plugin, sublime import sys import uuid import platform import re, uuid import webbrowser from urllib.parse import quote_plus from subprocess import Popen, PIPE f...
{"/Software.py": ["/lib/SoftwareUtil.py"]}
61,193
zhChenOuO/python-tiny-url
refs/heads/master
/app/models/test_short_url.py
import json import unittest from .short_url import ShortURL from ..errors import ToManyShortURL, NoSupportShortURLCharacter, NoSupportURL, InvalidInput class TestStringMethods(unittest.TestCase): def test_url_is_valid(self): t1 = ShortURL() t1.init_by_create({"url": "http://google.com"}) ...
{"/app/models/test_short_url.py": ["/app/models/short_url.py", "/app/errors.py"], "/app/__init__.py": ["/app/route/short_url.py", "/app/route/static_file.py"], "/app/models/short_url.py": ["/app/errors.py"], "/app/route/static_file.py": ["/app/models/short_url.py", "/app/errors.py"], "/app/route/short_url.py": ["/app/m...
61,194
zhChenOuO/python-tiny-url
refs/heads/master
/app/__init__.py
# coding:utf-8 import os from flask import Flask, request, current_app, jsonify, g from flask_sqlalchemy import SQLAlchemy from flask_redis import FlaskRedis from flask_migrate import Migrate from .extensions import db, redis_store, migrate from werkzeug.exceptions import HTTPException import traceback import sys impo...
{"/app/models/test_short_url.py": ["/app/models/short_url.py", "/app/errors.py"], "/app/__init__.py": ["/app/route/short_url.py", "/app/route/static_file.py"], "/app/models/short_url.py": ["/app/errors.py"], "/app/route/static_file.py": ["/app/models/short_url.py", "/app/errors.py"], "/app/route/short_url.py": ["/app/m...
61,195
zhChenOuO/python-tiny-url
refs/heads/master
/app/models/short_url.py
# -*- coding: utf-8 -*- from app.extensions import db from sqlalchemy.sql import func import json import re from app.errors import ToManyShortURL, NoSupportShortURLCharacter, NoSupportURL, InvalidInput, SameDomin alphabet = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" length = len(alphabet) regex ...
{"/app/models/test_short_url.py": ["/app/models/short_url.py", "/app/errors.py"], "/app/__init__.py": ["/app/route/short_url.py", "/app/route/static_file.py"], "/app/models/short_url.py": ["/app/errors.py"], "/app/route/static_file.py": ["/app/models/short_url.py", "/app/errors.py"], "/app/route/short_url.py": ["/app/m...
61,196
zhChenOuO/python-tiny-url
refs/heads/master
/app/errors.py
# -*- coding: utf-8 -*- # define Python user-defined exceptions class Error(Exception): """Base class for other exceptions""" pass class ToManyShortURL(Error): """Raised when the input value is too small""" pass class NoSupportShortURLCharacter(Error): """Raised when the input value is too smal...
{"/app/models/test_short_url.py": ["/app/models/short_url.py", "/app/errors.py"], "/app/__init__.py": ["/app/route/short_url.py", "/app/route/static_file.py"], "/app/models/short_url.py": ["/app/errors.py"], "/app/route/static_file.py": ["/app/models/short_url.py", "/app/errors.py"], "/app/route/short_url.py": ["/app/m...