index int64 | repo_name string | branch_name string | path string | content string | import_graph string |
|---|---|---|---|---|---|
89,276 | HuddleEng/octopose | refs/heads/master | /octopose/nu.py | """ This module calls through to nuget to install NuGet packages"""
# MIT License
#
# Copyright (c) 2018 Huddle
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, includi... | {"/octopose/deploy.py": ["/octopose/local_deploy.py"]} |
89,277 | HuddleEng/octopose | refs/heads/master | /octopose/generate_manifest.py | """ This module generates manifest files based on Octopus Deploy releases"""
# MIT License
#
# Copyright (c) 2018 Huddle
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction... | {"/octopose/deploy.py": ["/octopose/local_deploy.py"]} |
89,278 | HuddleEng/octopose | refs/heads/master | /octopose/local_deploy.py | # MIT License
#
# Copyright (c) 2018 Huddle
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publi... | {"/octopose/deploy.py": ["/octopose/local_deploy.py"]} |
89,279 | HuddleEng/octopose | refs/heads/master | /octopose/deploy.py | """ This module is used to call through to the Octopus Deploy APIs"""
# MIT License
#
# Copyright (c) 2018 Huddle
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, inclu... | {"/octopose/deploy.py": ["/octopose/local_deploy.py"]} |
89,280 | HuddleEng/octopose | refs/heads/master | /octopose/remote_deploy.py | # MIT License
#
# Copyright (c) 2018 Huddle
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publi... | {"/octopose/deploy.py": ["/octopose/local_deploy.py"]} |
89,281 | HuddleEng/octopose | refs/heads/master | /octopose/octopose.py | # MIT License
#
# Copyright (c) 2018 Huddle
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publi... | {"/octopose/deploy.py": ["/octopose/local_deploy.py"]} |
89,282 | HuddleEng/octopose | refs/heads/master | /octopose/config.py | # MIT License
#
# Copyright (c) 2018 Huddle
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publi... | {"/octopose/deploy.py": ["/octopose/local_deploy.py"]} |
89,306 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /network/hardware/MessageStatus.py | from enum import Enum
class MessageStatus(Enum):
received = 1
to_transmit = 2
transmitting = 3
transmitted = 4
| {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,307 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /main.py | import matplotlib.pyplot as plt
import numpy
import numpy as np
from Position import Position
from Time import Time
from computer.Computer import Computer
from computer.hardware.sound import Microphone, States
from computer.software.sound import SensorController
from computer.software.sound.duplicates_filter import Fi... | {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,308 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /sound/wave/GeneratorStates.py | """
В этом модуле описывается класс SoundWaveGeneratorStates.
"""
from enum import Enum
class GeneratorStates(Enum):
"""
Состояния генератора звуковых волн.
Attributes:
time_to_generate_wave (int): Звуковая волна будет сгенерирована в ближайшем будущем.
waiting (int): Ожидание сигнала на ... | {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,309 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /Position.py | """Summary
"""
from typing import Dict
import numpy
class Position(object):
"""
Позиция в трёхмерном пространстве.
Attributes:
x (float): Координата x.
y (float): Координата y.
z (float): Координата z.
"""
def __str__(self) -> str:
return 'x={0}, y={1}, z={2}'.fo... | {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,310 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /computer/hardware/sound/States.py | """
В этом модуле описывается класс SoundSensorStates.
"""
from enum import Enum
class States(Enum):
"""
Состояния звукового датчика.
Attributes:
perceived_something (int): Датчик услышал сигнал.
waiting (int): Ожидание сигнала.
"""
waiting = 1
perceived_something = 2
| {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,311 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /computer/hardware/sound/Microphone.py | from Position import Position
from Time import Time
from sound import Sensor as SoundSensor
from Hardware import Hardware
from .States import States
from MulticastDelegate import MulticastDelegate
class Microphone(Hardware):
def __init__(
self,
time: Time,
position: Position,
... | {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,312 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /network/__init__.py | from .Address import Address
from .Message import Message
from .MessageWithTimestamp import MessageWithTimestamp
| {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,313 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /TimeRelated.py | """
В этом модуле описывается класс TimeRelated.
"""
from Tickable import Tickable
from Time import Time
class TimeRelated(Tickable):
"""
Базовый класс для всех объектов, существующих во времени.
"""
def __init__(self, time: Time) -> None:
"""
Конструктор.
Args:
t... | {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,314 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /computer/software/sound/tdoa/ControllerNew.py | import itertools
import statistics
from typing import Dict, Set
from Position import Position
from Time import Time
from computer.software.sound import SignalPerceivedReport
from network import Address, Message as NetworkMessage
from .LocatedObjectsReporter import LocatedObjectsReporter
from .Locator import Locator
fr... | {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,315 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /TickTimer.py | """
В этом модуле описывается класс TickTimer.
"""
from MulticastDelegate import MulticastDelegate
from Time import Time
from TimeRelated import TimeRelated
class TickTimer(TimeRelated):
"""
Отсчитывает заданное число тактов, после чего уведомляет всех о том, что отсчёт завершен.
"""
def __init__(
... | {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,316 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /sound/wave/PropagatorStates.py | """
В этом модуле описывается класс SoundWavePropagatorStates.
"""
from enum import Enum
class PropagatorStates(Enum):
"""
Состояния распространителя звуковых волн.
Attributes:
end_of_propagation (int): Звуковая волна распространена и затухла.
propagating (int): Звуковая волна распростран... | {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,317 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /network/software/Protocol.py | from typing import Dict, Set
from Installable import Installable
from MulticastDelegate import MulticastDelegate
from Time import Time
from computer.Computer import Computer
from network.Message import Message
from network.hardware import Adapter
class Protocol(Installable):
def __init__(
self,
... | {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,318 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /sound/wave/Generator.py | """
В этом модуле описывается класс SoundWaveGenerator
"""
from .Spherical import Spherical as SphericalSoundWave
from MulticastDelegate import MulticastDelegate
from Physical import Physical
from Position import Position
from TickTimer import TickTimer
from Time import Time
from sound.wave.GeneratorStates import Gene... | {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,319 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /computer/software/sound/tdoa/SensorInfo.py | from typing import Optional
from Position import Position
from computer.software.sound import SignalPerceivedReport
class SensorInfo:
def __init__(
self,
position: Position,
last_report: Optional[SignalPerceivedReport]
) -> None:
super().__init__()
self._po... | {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,320 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /Installable.py | from typing import Optional
from Software import Software
from Time import Time
from computer.Computer import Computer
class Installable(Software):
def __init__(self, time: Time) -> None:
super().__init__(time)
self._computer = None
def install(self, computer: Computer):
computer.so... | {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,321 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /Waiting.py | from MulticastDelegate import MulticastDelegate
from TickTimer import TickTimer
class Waiting:
def __init__(
self,
timer: TickTimer
) -> None:
super().__init__()
self._timer = timer
timer.time_elapsed_broadcaster.register(self._on_complete)
self._complet... | {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,322 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /sound/wave/Spherical.py | """
В этом модуле описывается класс SphericalSoundWave.
"""
from Position import Position
from sound.wave.Wave import Wave
class Spherical(Wave):
"""
Сферическая звуковая волна.
"""
def __init__(
self,
initial_position: Position,
initial_power: float
):
... | {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,323 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /Hardware.py | """
В этом модуле описывается класс AbstractHardware.
"""
from Physical import Physical
class Hardware(Physical):
"""
Базовый класс для всего аппаратного обеспечения.
"""
pass
| {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,324 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /computer/software/sound/duplicates_filter/State.py | from enum import Enum
class State(Enum):
waiting = 1
active = 2
| {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,325 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /computer/software/NetworkRelated.py | from Installable import Installable
from Time import Time
from computer import Computer
from network import Address
from network.software import Protocol
from network import Message as NetworkMessage
class NetworkRelated(Installable):
def __init__(self, time: Time, address: Address) -> None:
super().__ini... | {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,326 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /sound/wave/SphericalPropagator.py | """
В этом модуле описывается класс SphericalSoundWavePropagator.
"""
from typing import Set
from .PropagatorStates import PropagatorStates as SoundWavePropagatorStates
from .Spherical import Spherical as SphericalSoundWave
from MulticastDelegate import MulticastDelegate
from Position import Position
from Time import... | {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,327 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /network/MessageWithTimestamp.py | from network import Message, Address
class MessageWithTimestamp(Message):
def __init__(
self,
address_from: Address,
address_to: Address,
tick: int
):
super().__init__(address_from, address_to)
self._tick = tick
@property
def tick(self) ... | {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,328 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /MulticastDelegate.py | """
В этом модуле описывается класс MulticastDelegate.
"""
from typing import Callable
from weakref import WeakMethod
class MulticastDelegate(object):
"""
Хранит ссылки на функции.
Вызывает их всех при выполнении метода broadcast.
"""
def __init__(self):
"""
Конструктор.
"... | {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,329 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /computer/Computer.py | from typing import Set
from Hardware import Hardware
from Software import Software
class Computer:
def __init__(
self,
hardware: Set[Hardware],
software: Set[Software]
) -> None:
super().__init__()
self._hardware = hardware
self._software = software... | {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,330 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /Physical.py | """
В этом модуле описывается класс Physical.
"""
from Position import Position
from Time import Time
from TimeRelated import TimeRelated
class Physical(TimeRelated):
"""
Базовый класс для всех физических объектов.
"""
def __init__(
self,
time: Time,
position: Posi... | {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,331 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /sound/PropagationEnvironment.py | """
В этом модуле описывается класс SoundPropagationEnvironment.
"""
from weakref import WeakSet
from Time import Time
from TimeRelated import TimeRelated
from sound.Sensor import Sensor
from sound.wave import (
Wave as SoundWave,
Generator as SoundWaveGenerator,
PropagatorStates as SoundWavePropagatorStat... | {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,332 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /computer/software/__init__.py | from .NetworkRelated import NetworkRelated
| {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,333 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /computer/software/sound/duplicates_filter/Filtration.py | import statistics
from typing import Set
from Position import Position
from TickTimer import TickTimer
from Waiting import Waiting
class Filtration(Waiting):
def __init__(
self,
timer: TickTimer,
points: Set[Position],
max_deviations: Position
) -> None:
... | {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,334 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /computer/software/sound/tdoa/__init__.py | from .ControllerState import ControllerState
#from .Controller import Controller
from .ControllerNew import Controller
from .SensorInfo import SensorInfo
from .ObjectLocatedReport import ObjectLocatedReport
from .LocatedObjectsReporter import LocatedObjectsReporter
| {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,335 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /network/hardware/Adapter.py | """
В этом модуле описывается класс NetworkAdapter.
"""
from typing import Dict
from Hardware import Hardware
from MulticastDelegate import MulticastDelegate
from Position import Position
from Time import Time
from .Connection import Connection
from .MessageStatus import MessageStatus
from network import Message
cla... | {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,336 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /computer/software/sound/__init__.py | from .SensorController import SensorController
from .SignalPerceivedReport import SignalPerceivedReport
from .ObjectLocatedMessage import ObjectLocatedMessage
| {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,337 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /sound/wave/__init__.py | from .Generator import Generator
from .Wave import Wave
from .GeneratorStates import GeneratorStates
from .Spherical import Spherical
from .SphericalPropagator import SphericalPropagator
from .PropagatorStates import PropagatorStates
| {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,338 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /Time.py | """
В этом модуле описывается класс Time.
"""
from MulticastDelegate import MulticastDelegate
class Time(object):
"""
Отсчитывает время в тактах и уведомляет об этом.
"""
def __init__(self) -> None:
"""
Конструктор.
"""
super(Time, self).__init__()
self._tick_b... | {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,339 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /network/hardware/Connection.py | from typing import Set
from MulticastDelegate import MulticastDelegate
from TickTimer import TickTimer
from Time import Time
from TimeRelated import TimeRelated
from .MessageTransmission import MessageTransmission
from network import Message
class Connection(TimeRelated):
def __init__(
self,
... | {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,340 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /sound/Sensor.py | """
В этом модуле описывается класс SoundSensor.
"""
from MulticastDelegate import MulticastDelegate
from Physical import Physical
from Position import Position
from Time import Time
class Sensor(Physical):
"""
Датчик звука.
"""
def __init__(
self,
time: Time,
posi... | {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,341 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /computer/software/sound/SignalPerceivedReport.py | from network import MessageWithTimestamp, Address
from computer.hardware.sound import Microphone
class SignalPerceivedReport(MessageWithTimestamp):
def __init__(
self,
address_from: Address,
address_to: Address,
sensor: Microphone,
power: float,
... | {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,342 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /computer/hardware/sound/__init__.py | from .States import States
from .Microphone import Microphone
| {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,343 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /computer/software/sound/duplicates_filter/__init__.py | from .Filtration import Filtration
from .Filter import Filter
| {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,344 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /network/hardware/MessageTransmission.py | from MulticastDelegate import MulticastDelegate
from TickTimer import TickTimer
from Waiting import Waiting
from network import Message
class MessageTransmission(Waiting):
def __init__(
self,
message: Message,
timer: TickTimer
) -> None:
super().__init__(timer)
... | {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,345 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /computer/software/sound/tdoa/ObjectLocatedReport.py | from Position import Position
from network import Address, MessageWithTimestamp
class ObjectLocatedReport(MessageWithTimestamp):
def __init__(
self,
address_from: Address,
address_to: Address,
tick: int,
position: Position
):
super().__init__... | {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,346 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /Software.py | from TimeRelated import TimeRelated
class Software(TimeRelated):
pass
| {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,347 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /network/Address.py | class Address(object):
"""
Сетевой адрес.
"""
def __init__(self, host: str, port: int) -> None:
"""
Конструктор
Args:
host (str): Хост.
port (int): Порт.
"""
super(Address, self).__init__()
self._host = host
self._port = p... | {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,348 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /computer/software/sound/tdoa/Controller.py | import itertools
import statistics
from typing import Dict, Optional, Set
from Position import Position
from TickTimer import TickTimer
from Time import Time
from computer.software.sound import SignalPerceivedReport
from .LocatedObjectsReporter import LocatedObjectsReporter
from network import Address, Message as Netw... | {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,349 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /computer/software/sound/duplicates_filter/Filter.py | from typing import Set
from Position import Position
from TickTimer import TickTimer
from Time import Time
from computer.software.sound.duplicates_filter import Filtration
from computer.software.sound.tdoa import LocatedObjectsReporter, ObjectLocatedReport
from network import Address, Message as NetworkMessage
class... | {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,350 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /network/hardware/__init__.py | from .Adapter import Adapter
from .Connection import Connection
from .MessageStatus import MessageStatus
from .MessageTransmission import MessageTransmission
| {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,351 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /sound/__init__.py | from .Sensor import Sensor
from .PropagationEnvironment import PropagationEnvironment
| {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,352 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /network/Message.py | """
В этом модуле описывается класс NetworkMessage.
"""
from .Address import Address
class Message(object):
"""
Сообщение, передающееся по сети.
"""
def __init__(
self,
address_from: Address,
address_to: Address
):
"""
Конструктор.
Args... | {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,353 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /computer/software/sound/tdoa/LocatedObjectsReporter.py | from typing import Set
from Position import Position
from Time import Time
from computer.software import NetworkRelated
from .ObjectLocatedReport import ObjectLocatedReport
from network import Address
class LocatedObjectsReporter(NetworkRelated):
def __init__(
self,
time: Time,
... | {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,354 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /sound/wave/Wave.py | """
В этом модуле описывается класс SoundWave.
"""
from Position import Position
class Wave(object):
"""
Базовый класс для всех звуковых волн.
"""
def __init__(
self,
initial_position: Position,
initial_power: float
):
"""
Конструктор.
... | {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,355 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /computer/software/sound/tdoa/Locator.py | import numpy
class Locator(object):
def __init__(self, microphone_positions: list, speed_of_sound=340.29):
self._speed_of_sound = speed_of_sound
self._inverted_speed_of_sound = 1 / self._speed_of_sound
self._count_of_microphones = len(microphone_positions)
# self._initialize_source... | {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,356 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /computer/software/sound/SensorController.py | from typing import Set
from Time import Time
from computer import Computer
from computer.hardware.sound import Microphone
from computer.software import NetworkRelated
from network import Address
from .SignalPerceivedReport import SignalPerceivedReport
class SensorController(NetworkRelated):
def __init__(
... | {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,357 | xxyyss/synchronous_tdoa_multisensor_model | refs/heads/master | /Tickable.py | class Tickable(object):
"""
Объект, имеющий функцию on_tick.
"""
def on_tick(self) -> None:
"""
Вызывается каждый такт времени.
"""
pass
| {"/main.py": ["/Position.py", "/Time.py", "/computer/Computer.py", "/computer/hardware/sound/__init__.py", "/computer/software/sound/__init__.py", "/computer/software/sound/duplicates_filter/__init__.py", "/computer/software/sound/tdoa/__init__.py", "/network/__init__.py", "/network/hardware/__init__.py", "/sound/__ini... |
89,450 | halo91cs/Harassment_Detection | refs/heads/master | /MainEngine.py | import pandas as pd
from ExtractData import Extract
from Transformation import Transformation
from ExtractImages import ExtractImages
from test_calc import TestConfig
from RegexConfig import Configuration
class MainEngine:
ext_img = ExtractImages()
trans_obj = Transformation()
if __name__ == '__main__':
mai... | {"/MainEngine.py": ["/ExtractData.py", "/Transformation.py", "/ExtractImages.py", "/RegexConfig.py"], "/Transformation.py": ["/ExtractData.py", "/RegexConfig.py", "/ImageProcessing.py"], "/test_functions.py": ["/ExtractData.py", "/RegexConfig.py"], "/ImageProcessing.py": ["/ExtractData.py"], "/ExtractImages.py": ["/Tra... |
89,451 | halo91cs/Harassment_Detection | refs/heads/master | /Transformation.py | from ExtractData import Extract
from RegexConfig import Configuration
from ImageProcessing import ImageProcessing
import pandas as pd
import json
import re
import demoji
class Transformation():
extractObj = Extract()
config = Configuration()
img_process = ImageProcessing()
lexicon = extractObj.getCsvDa... | {"/MainEngine.py": ["/ExtractData.py", "/Transformation.py", "/ExtractImages.py", "/RegexConfig.py"], "/Transformation.py": ["/ExtractData.py", "/RegexConfig.py", "/ImageProcessing.py"], "/test_functions.py": ["/ExtractData.py", "/RegexConfig.py"], "/ImageProcessing.py": ["/ExtractData.py"], "/ExtractImages.py": ["/Tra... |
89,452 | halo91cs/Harassment_Detection | refs/heads/master | /RegexConfig.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import re
class Configuration():
# Not needed at this time.
#x = "(?<=^|(?<=[^a-zA-Z0-9-_\.]))@([A-Za-z0-9-_]+[A-Za-z0-9-_]+)"
#y = "RT @[A-Za-z0-9-_]+"
#url = '"(?P<url>https?://[^\s]+)"'
#def getMentioned(self, text):
# return re.compil... | {"/MainEngine.py": ["/ExtractData.py", "/Transformation.py", "/ExtractImages.py", "/RegexConfig.py"], "/Transformation.py": ["/ExtractData.py", "/RegexConfig.py", "/ImageProcessing.py"], "/test_functions.py": ["/ExtractData.py", "/RegexConfig.py"], "/ImageProcessing.py": ["/ExtractData.py"], "/ExtractImages.py": ["/Tra... |
89,453 | halo91cs/Harassment_Detection | refs/heads/master | /ExtractData.py | import requests
import json
from pathlib import Path
import os
import pandas as pd
class Extract():
data_sources = json.load(open('data_config.json'))
json = data_sources['data_sources']['json']
csv = data_sources['data_sources']['csv']
authTwitter = data_sources['auth']['twitter']
get_output = da... | {"/MainEngine.py": ["/ExtractData.py", "/Transformation.py", "/ExtractImages.py", "/RegexConfig.py"], "/Transformation.py": ["/ExtractData.py", "/RegexConfig.py", "/ImageProcessing.py"], "/test_functions.py": ["/ExtractData.py", "/RegexConfig.py"], "/ImageProcessing.py": ["/ExtractData.py"], "/ExtractImages.py": ["/Tra... |
89,454 | halo91cs/Harassment_Detection | refs/heads/master | /test_functions.py | import unittest
import ExtractData
import RegexConfig
#from ExtractData import Extract
from RegexConfig import Configuration
from unittest.mock import patch
import os.path
# We want to inherit from unittest.TestCase
# Inheriting from unittest.TestCase will give us access to a lot of different testing capabilities withi... | {"/MainEngine.py": ["/ExtractData.py", "/Transformation.py", "/ExtractImages.py", "/RegexConfig.py"], "/Transformation.py": ["/ExtractData.py", "/RegexConfig.py", "/ImageProcessing.py"], "/test_functions.py": ["/ExtractData.py", "/RegexConfig.py"], "/ImageProcessing.py": ["/ExtractData.py"], "/ExtractImages.py": ["/Tra... |
89,455 | halo91cs/Harassment_Detection | refs/heads/master | /ImageProcessing.py | import numpy as np
import pandas as pd
import os
from tensorflow import keras
import keras
import tensorflow_hub as hub
from keras.applications import resnet50
from keras.preprocessing.image import load_img
from keras.preprocessing.image import img_to_array
from keras.applications.imagenet_utils import decode_predictio... | {"/MainEngine.py": ["/ExtractData.py", "/Transformation.py", "/ExtractImages.py", "/RegexConfig.py"], "/Transformation.py": ["/ExtractData.py", "/RegexConfig.py", "/ImageProcessing.py"], "/test_functions.py": ["/ExtractData.py", "/RegexConfig.py"], "/ImageProcessing.py": ["/ExtractData.py"], "/ExtractImages.py": ["/Tra... |
89,456 | halo91cs/Harassment_Detection | refs/heads/master | /ExtractImages.py | from Transformation import Transformation
from ExtractData import Extract
import pandas as pd
import urllib
import os
import demoji
import twitter
import json
import numpy as np
import time
class ExtractImages():
transObj = Transformation()
extractObj = Extract()
twitter = extractObj.getAuth()
... | {"/MainEngine.py": ["/ExtractData.py", "/Transformation.py", "/ExtractImages.py", "/RegexConfig.py"], "/Transformation.py": ["/ExtractData.py", "/RegexConfig.py", "/ImageProcessing.py"], "/test_functions.py": ["/ExtractData.py", "/RegexConfig.py"], "/ImageProcessing.py": ["/ExtractData.py"], "/ExtractImages.py": ["/Tra... |
89,466 | fmixson/AA_T_LA_Division_Degrees-master | refs/heads/main | /Major_Progress.py | import pandas as pd
from Major_Requirements import MajorRequirements
class MajorProgress(MajorRequirements):
# columns = ['Student_ID', 'Major1', 'Major2', 'Major3', 'Major4', 'Major5']
# major_df = pd.DataFrame(columns=columns)
requirements = []
def __init__(self, student_id, major_course_dict, maj... | {"/PlanB_Degree_Process.py": ["/GE_Progress.py", "/GE_Requirements.py", "/Major_Progress.py"]} |
89,467 | fmixson/AA_T_LA_Division_Degrees-master | refs/heads/main | /GE_Progress.py | import pandas as pd
class GEProgress:
planb_ge_requirements = {'Oral_Comm': 0, 'Writ_Comm': 0, 'Crit_Think': 0,
'Phys_Sci': 0, 'Bio_Sci': 0, 'Sci_Labs': 0, 'Math': 0,'Arts': 0, 'Hum': 0, 'Arts_Hum': 0,
'Amer_Hist': 0, 'Amer_Gov': 0, 'Institutions': 0, 'Se... | {"/PlanB_Degree_Process.py": ["/GE_Progress.py", "/GE_Requirements.py", "/Major_Progress.py"]} |
89,468 | fmixson/AA_T_LA_Division_Degrees-master | refs/heads/main | /GE_Requirements.py | import pandas as pd
class GeRequirements:
ge_dataframe = pd.read_csv("PlanB_GE.csv")
pd.set_option('display.max_columns', None)
# print(ge_dataframe)
def __init__(self, degree_applicable_dict):
self.degree_applicable_dict = degree_applicable_dict
self.completed_ge_courses = {}
... | {"/PlanB_Degree_Process.py": ["/GE_Progress.py", "/GE_Requirements.py", "/Major_Progress.py"]} |
89,469 | fmixson/AA_T_LA_Division_Degrees-master | refs/heads/main | /PlanB_Degree_Process.py | from Degree_Applicable_Electives import DegreeApplicableUnits
from Degree_Completion_Report import DegreeCompletionReport
from GE_Progress import GEProgress
from GE_Requirements import GeRequirements
from Major_Progress import MajorProgress
from Major_Requirements import MajorRequirements
from Student_Info import... | {"/PlanB_Degree_Process.py": ["/GE_Progress.py", "/GE_Requirements.py", "/Major_Progress.py"]} |
89,477 | cobaltine/json-fingerprint | refs/heads/main | /json_fingerprint/tests/test_match.py | import json
import unittest
from json_fingerprint import create, exceptions, hash_functions, match
class TestMatch(unittest.TestCase):
def test_jfpv1_match(self):
"""Test json fingerprint matcher.
Verify that:
- Fingerprints of all jfpv1 SHA-2 variants are properly matched
- Exce... | {"/json_fingerprint/tests/test_match.py": ["/json_fingerprint/__init__.py"], "/json_fingerprint/__init__.py": ["/json_fingerprint/_create.py", "/json_fingerprint/_decode.py", "/json_fingerprint/_find_matches.py", "/json_fingerprint/_match.py", "/json_fingerprint/exceptions.py"], "/json_fingerprint/_decode.py": ["/json_... |
89,478 | cobaltine/json-fingerprint | refs/heads/main | /json_fingerprint/__init__.py | from ._create import create
from ._decode import decode
from ._find_matches import find_matches
from ._match import match
from .exceptions import (
FingerprintPattern,
FingerprintVersion,
HashFunction,
InputDataType,
JSONLoad,
)
| {"/json_fingerprint/tests/test_match.py": ["/json_fingerprint/__init__.py"], "/json_fingerprint/__init__.py": ["/json_fingerprint/_create.py", "/json_fingerprint/_decode.py", "/json_fingerprint/_find_matches.py", "/json_fingerprint/_match.py", "/json_fingerprint/exceptions.py"], "/json_fingerprint/_decode.py": ["/json_... |
89,479 | cobaltine/json-fingerprint | refs/heads/main | /json_fingerprint/_decode.py | from typing import Tuple
from ._validators import _validate_fingerprint_format
def decode(fingerprint: str) -> Tuple[int, str, str]:
"""Decode json fingerprints into version, hash function, and the hex digest of the hash value.
Args:
fingerprint (str):
A valid JSON fingerprint (example: ... | {"/json_fingerprint/tests/test_match.py": ["/json_fingerprint/__init__.py"], "/json_fingerprint/__init__.py": ["/json_fingerprint/_create.py", "/json_fingerprint/_decode.py", "/json_fingerprint/_find_matches.py", "/json_fingerprint/_match.py", "/json_fingerprint/exceptions.py"], "/json_fingerprint/_decode.py": ["/json_... |
89,480 | cobaltine/json-fingerprint | refs/heads/main | /json_fingerprint/_jfpv1.py | import hashlib
import json
from typing import Any, Dict, List
from json_fingerprint import hash_functions
def _create_json_hash(data: Any, hash_function: str) -> str:
"""Create a hash hex digest from json-converted data."""
json_string = json.dumps(
data,
allow_nan=False,
ensure_ascii... | {"/json_fingerprint/tests/test_match.py": ["/json_fingerprint/__init__.py"], "/json_fingerprint/__init__.py": ["/json_fingerprint/_create.py", "/json_fingerprint/_decode.py", "/json_fingerprint/_find_matches.py", "/json_fingerprint/_match.py", "/json_fingerprint/exceptions.py"], "/json_fingerprint/_decode.py": ["/json_... |
89,481 | cobaltine/json-fingerprint | refs/heads/main | /json_fingerprint/tests/test_find_matches.py | import json
import unittest
from json_fingerprint import _find_matches, create, exceptions, hash_functions
class TestFindMatches(unittest.TestCase):
def setUp(self):
self.test_input = json.dumps({"foo": "bar"})
self.jfpv1_sha256 = create(input=self.test_input, hash_function=hash_functions.SHA256,... | {"/json_fingerprint/tests/test_match.py": ["/json_fingerprint/__init__.py"], "/json_fingerprint/__init__.py": ["/json_fingerprint/_create.py", "/json_fingerprint/_decode.py", "/json_fingerprint/_find_matches.py", "/json_fingerprint/_match.py", "/json_fingerprint/exceptions.py"], "/json_fingerprint/_decode.py": ["/json_... |
89,482 | cobaltine/json-fingerprint | refs/heads/main | /json_fingerprint/tests/test_decode.py | import json
import unittest
from json_fingerprint import create, decode, exceptions, hash_functions
class TestDecode(unittest.TestCase):
def test_jfpv1_decode(self):
"""Test json fingerprint decoder.
Verify that:
- Fingerprints of all jfpv1 SHA-2 variants are properly decoded
- E... | {"/json_fingerprint/tests/test_match.py": ["/json_fingerprint/__init__.py"], "/json_fingerprint/__init__.py": ["/json_fingerprint/_create.py", "/json_fingerprint/_decode.py", "/json_fingerprint/_find_matches.py", "/json_fingerprint/_match.py", "/json_fingerprint/exceptions.py"], "/json_fingerprint/_decode.py": ["/json_... |
89,483 | cobaltine/json-fingerprint | refs/heads/main | /json_fingerprint/tests/test_jfpv1.py | import hashlib
import json
import unittest
from json_fingerprint import _jfpv1, hash_functions
class TestJfpv1(unittest.TestCase):
def test_create_json_hash(self):
"""Test jfpv1 json hash creation.
Verify that:
- Key-value pairs are sorted properly and the resulting SHA256 matches the ex... | {"/json_fingerprint/tests/test_match.py": ["/json_fingerprint/__init__.py"], "/json_fingerprint/__init__.py": ["/json_fingerprint/_create.py", "/json_fingerprint/_decode.py", "/json_fingerprint/_find_matches.py", "/json_fingerprint/_match.py", "/json_fingerprint/exceptions.py"], "/json_fingerprint/_decode.py": ["/json_... |
89,484 | cobaltine/json-fingerprint | refs/heads/main | /json_fingerprint/exceptions.py | class FingerprintPattern(Exception):
"""The fingerprint pattern is not a valid JSON fingerprint pattern."""
pass
class FingerprintVersion(Exception):
"""The fingerprint version is not a supported JSON fingerprint version."""
pass
class HashFunction(Exception):
"""The hash function is not a sup... | {"/json_fingerprint/tests/test_match.py": ["/json_fingerprint/__init__.py"], "/json_fingerprint/__init__.py": ["/json_fingerprint/_create.py", "/json_fingerprint/_decode.py", "/json_fingerprint/_find_matches.py", "/json_fingerprint/_match.py", "/json_fingerprint/exceptions.py"], "/json_fingerprint/_decode.py": ["/json_... |
89,485 | cobaltine/json-fingerprint | refs/heads/main | /json_fingerprint/tests/run.py | import unittest
from json_fingerprint.tests.test_create import TestCreate
from json_fingerprint.tests.test_decode import TestDecode
from json_fingerprint.tests.test_find_matches import TestFindMatches
from json_fingerprint.tests.test_hash_functions import TestHashFunctions
from json_fingerprint.tests.test_jfpv1 import... | {"/json_fingerprint/tests/test_match.py": ["/json_fingerprint/__init__.py"], "/json_fingerprint/__init__.py": ["/json_fingerprint/_create.py", "/json_fingerprint/_decode.py", "/json_fingerprint/_find_matches.py", "/json_fingerprint/_match.py", "/json_fingerprint/exceptions.py"], "/json_fingerprint/_decode.py": ["/json_... |
89,486 | cobaltine/json-fingerprint | refs/heads/main | /json_fingerprint/_match.py | from ._create import create
from ._decode import decode
def match(input: str, target_fingerprint: str) -> bool:
"""Match raw json string input to target fingerprint.
Decodes the target fingerprint and creates a fingerprint from the input with identical parameters.
If the target fingerprint uses, for exam... | {"/json_fingerprint/tests/test_match.py": ["/json_fingerprint/__init__.py"], "/json_fingerprint/__init__.py": ["/json_fingerprint/_create.py", "/json_fingerprint/_decode.py", "/json_fingerprint/_find_matches.py", "/json_fingerprint/_match.py", "/json_fingerprint/exceptions.py"], "/json_fingerprint/_decode.py": ["/json_... |
89,487 | cobaltine/json-fingerprint | refs/heads/main | /json_fingerprint/tests/test_hash_functions.py | import json
import unittest
from json_fingerprint import _validators, create, exceptions, hash_functions
class TestHashFunctions(unittest.TestCase):
def test_hash_function_module_options(self):
"""Test the 'hash_functions' module's SHA-2 options.
Verify that:
- Each supported hash functi... | {"/json_fingerprint/tests/test_match.py": ["/json_fingerprint/__init__.py"], "/json_fingerprint/__init__.py": ["/json_fingerprint/_create.py", "/json_fingerprint/_decode.py", "/json_fingerprint/_find_matches.py", "/json_fingerprint/_match.py", "/json_fingerprint/exceptions.py"], "/json_fingerprint/_decode.py": ["/json_... |
89,488 | cobaltine/json-fingerprint | refs/heads/main | /setup.py | import setuptools
with open("README.md", "r", encoding="utf-8") as f:
long_description = f.read()
with open(".version", "r", encoding="utf-8") as f:
version_raw = f.read()[1:] # omit "v"
version = version_raw.split("-")[0] # omit trailing version identifiers
setuptools.setup(
name="json-fingerprin... | {"/json_fingerprint/tests/test_match.py": ["/json_fingerprint/__init__.py"], "/json_fingerprint/__init__.py": ["/json_fingerprint/_create.py", "/json_fingerprint/_decode.py", "/json_fingerprint/_find_matches.py", "/json_fingerprint/_match.py", "/json_fingerprint/exceptions.py"], "/json_fingerprint/_decode.py": ["/json_... |
89,489 | cobaltine/json-fingerprint | refs/heads/main | /json_fingerprint/hash_functions.py | """Supported hash function choices."""
SHA256 = "sha256"
SHA384 = "sha384"
SHA512 = "sha512"
| {"/json_fingerprint/tests/test_match.py": ["/json_fingerprint/__init__.py"], "/json_fingerprint/__init__.py": ["/json_fingerprint/_create.py", "/json_fingerprint/_decode.py", "/json_fingerprint/_find_matches.py", "/json_fingerprint/_match.py", "/json_fingerprint/exceptions.py"], "/json_fingerprint/_decode.py": ["/json_... |
89,490 | cobaltine/json-fingerprint | refs/heads/main | /json_fingerprint/_load_json.py | import json
from .exceptions import JSONLoad
def _load_json(data: str):
try:
return json.loads(data)
except Exception:
err = "Unable to load JSON"
raise JSONLoad(err) from None
| {"/json_fingerprint/tests/test_match.py": ["/json_fingerprint/__init__.py"], "/json_fingerprint/__init__.py": ["/json_fingerprint/_create.py", "/json_fingerprint/_decode.py", "/json_fingerprint/_find_matches.py", "/json_fingerprint/_match.py", "/json_fingerprint/exceptions.py"], "/json_fingerprint/_decode.py": ["/json_... |
89,491 | cobaltine/json-fingerprint | refs/heads/main | /json_fingerprint/tests/test_create.py | import json
import os
import unittest
from json_fingerprint import create, hash_functions
from json_fingerprint.exceptions import JSONLoad
TESTS_DIR = os.path.dirname(__file__)
TESTDATA_DIR = os.path.join(TESTS_DIR, "testdata")
class TestCreate(unittest.TestCase):
def test_jfpv1_json_load_error(self):
"... | {"/json_fingerprint/tests/test_match.py": ["/json_fingerprint/__init__.py"], "/json_fingerprint/__init__.py": ["/json_fingerprint/_create.py", "/json_fingerprint/_decode.py", "/json_fingerprint/_find_matches.py", "/json_fingerprint/_match.py", "/json_fingerprint/exceptions.py"], "/json_fingerprint/_decode.py": ["/json_... |
89,492 | cobaltine/json-fingerprint | refs/heads/main | /json_fingerprint/_validators.py | import re
from json_fingerprint import hash_functions
from .exceptions import (
FingerprintPattern,
FingerprintVersion,
HashFunction,
InputDataType,
)
SHA256_JFP_REGEX_PATTERN = re.compile("^jfpv1\\$sha256\\$[0-9a-f]{64}$")
SHA384_JFP_REGEX_PATTERN = re.compile("^jfpv1\\$sha384\\$[0-9a-f]{96}$")
SHA5... | {"/json_fingerprint/tests/test_match.py": ["/json_fingerprint/__init__.py"], "/json_fingerprint/__init__.py": ["/json_fingerprint/_create.py", "/json_fingerprint/_decode.py", "/json_fingerprint/_find_matches.py", "/json_fingerprint/_match.py", "/json_fingerprint/exceptions.py"], "/json_fingerprint/_decode.py": ["/json_... |
89,493 | cobaltine/json-fingerprint | refs/heads/main | /json_fingerprint/_find_matches.py | from typing import Dict, List
from ._create import create
from ._decode import decode
def _get_target_hashes(fingerprints: List[str]) -> List[Dict]:
target_hashes = []
for fingerprint in fingerprints:
version, hash_function, _ = decode(fingerprint=fingerprint)
element = {"version": version, "... | {"/json_fingerprint/tests/test_match.py": ["/json_fingerprint/__init__.py"], "/json_fingerprint/__init__.py": ["/json_fingerprint/_create.py", "/json_fingerprint/_decode.py", "/json_fingerprint/_find_matches.py", "/json_fingerprint/_match.py", "/json_fingerprint/exceptions.py"], "/json_fingerprint/_decode.py": ["/json_... |
89,494 | cobaltine/json-fingerprint | refs/heads/main | /json_fingerprint/_create.py | from ._jfpv1 import _create_jfpv1_fingerprint
from ._load_json import _load_json
from ._validators import (
_validate_hash_function,
_validate_input_type,
_validate_version,
)
def create(input: str, hash_function: str, version: int) -> str:
"""Create JSON fingerprints with the selected hash function a... | {"/json_fingerprint/tests/test_match.py": ["/json_fingerprint/__init__.py"], "/json_fingerprint/__init__.py": ["/json_fingerprint/_create.py", "/json_fingerprint/_decode.py", "/json_fingerprint/_find_matches.py", "/json_fingerprint/_match.py", "/json_fingerprint/exceptions.py"], "/json_fingerprint/_decode.py": ["/json_... |
89,495 | cobaltine/json-fingerprint | refs/heads/main | /json_fingerprint/tests/test_validators.py | import json
import unittest
from json_fingerprint import _validators, create, exceptions, hash_functions
class TestValidators(unittest.TestCase):
def test_json_fingerprint_version(self):
"""Test JSON fingerprint FingerprintVersion exception.
Verify that:
- FingerprintVersion exception is... | {"/json_fingerprint/tests/test_match.py": ["/json_fingerprint/__init__.py"], "/json_fingerprint/__init__.py": ["/json_fingerprint/_create.py", "/json_fingerprint/_decode.py", "/json_fingerprint/_find_matches.py", "/json_fingerprint/_match.py", "/json_fingerprint/exceptions.py"], "/json_fingerprint/_decode.py": ["/json_... |
89,525 | BorisJov/Glasacki-informacioni-sistem-IIS | refs/heads/master | /project/migrations/0006_auto_20190608_1530.py | # Generated by Django 2.1.5 on 2019-06-08 13:30
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('project', '0005_auto_20190608_1522'),
]
operations = [
migrations.AlterField(
model_name='voter',
name='voting_power... | {"/project/admin.py": ["/project/models.py"], "/project/views.py": ["/project/models.py"]} |
89,526 | BorisJov/Glasacki-informacioni-sistem-IIS | refs/heads/master | /project/admin.py | from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
from .models import *
class VoterInline(admin.StackedInline):
model = Voter
can_delete = False
class UserAdmin(BaseUserAdmin):
inlines = (VoterInline,)
class VoterAdmin(admin.ModelAdmin):
list_display... | {"/project/admin.py": ["/project/models.py"], "/project/views.py": ["/project/models.py"]} |
89,527 | BorisJov/Glasacki-informacioni-sistem-IIS | refs/heads/master | /project/migrations/0005_auto_20190608_1522.py | # Generated by Django 2.1.5 on 2019-06-08 13:22
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('project', '0004_auto_20190606_2123'),
]
operations = [
migrations.AlterUniqueTogether(
name='candidate',
unique_together={('... | {"/project/admin.py": ["/project/models.py"], "/project/views.py": ["/project/models.py"]} |
89,528 | BorisJov/Glasacki-informacioni-sistem-IIS | refs/heads/master | /project/migrations/0004_auto_20190606_2123.py | # Generated by Django 2.1.5 on 2019-06-06 19:23
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('project', '0003_votingunit_voters_can_be_added'),
]
operations = [
migrations.AlterUniqueTogether(
name='candidatechoice',
u... | {"/project/admin.py": ["/project/models.py"], "/project/views.py": ["/project/models.py"]} |
89,529 | BorisJov/Glasacki-informacioni-sistem-IIS | refs/heads/master | /project/urls.py | from django.urls import path
from . import views
app_name = 'project'
urlpatterns = [
path('login/', views.voter_login, name="voter_login"),
path('logout/', views.voter_logout, name="voter_logout"),
path('voter_homepage/', views.voter_homepage, name="voter_homepage"),
path('voting_step1/<int:election_i... | {"/project/admin.py": ["/project/models.py"], "/project/views.py": ["/project/models.py"]} |
89,530 | BorisJov/Glasacki-informacioni-sistem-IIS | refs/heads/master | /project/templatetags/result_extras.py | from django import template
from django.utils.safestring import mark_safe
register = template.Library()
@register.simple_tag
def table_results(unit_list, results, candidate):
ret_val = ''
for i, result in enumerate(results):
ret_val += '<td colspan="' + str(unit_list[i].get_colspan()) + '">'
... | {"/project/admin.py": ["/project/models.py"], "/project/views.py": ["/project/models.py"]} |
89,531 | BorisJov/Glasacki-informacioni-sistem-IIS | refs/heads/master | /project/views.py | from datetime import date, timedelta, datetime
from django.shortcuts import get_object_or_404, render, redirect
from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.decorators import login_required
from .models import *
#import pdb; pdb.set_trace()
@login_required()
def voter_homepage... | {"/project/admin.py": ["/project/models.py"], "/project/views.py": ["/project/models.py"]} |
89,532 | BorisJov/Glasacki-informacioni-sistem-IIS | refs/heads/master | /project/migrations/0002_auto_20190606_1544.py | # Generated by Django 2.1.5 on 2019-06-06 13:44
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('project', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='candidate',
... | {"/project/admin.py": ["/project/models.py"], "/project/views.py": ["/project/models.py"]} |
89,533 | BorisJov/Glasacki-informacioni-sistem-IIS | refs/heads/master | /project/migrations/0003_votingunit_voters_can_be_added.py | # Generated by Django 2.1.5 on 2019-06-06 13:52
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('project', '0002_auto_20190606_1544'),
]
operations = [
migrations.AddField(
model_name='votingunit',
name='voters_ca... | {"/project/admin.py": ["/project/models.py"], "/project/views.py": ["/project/models.py"]} |
89,534 | BorisJov/Glasacki-informacioni-sistem-IIS | refs/heads/master | /project/migrations/0001_initial.py | # Generated by Django 2.1.5 on 2019-06-03 20:55
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
ope... | {"/project/admin.py": ["/project/models.py"], "/project/views.py": ["/project/models.py"]} |
89,535 | BorisJov/Glasacki-informacioni-sistem-IIS | refs/heads/master | /project/models.py | from django.db import models
from django.contrib.auth.models import User
class ElectionType(models.Model):
secrecy = models.BooleanField()
candidate_selection_number = models.IntegerField()
voter_equality = models.BooleanField()
def __str__(self):
return 'S:' + str(self.secrecy) + ' CSN:' + s... | {"/project/admin.py": ["/project/models.py"], "/project/views.py": ["/project/models.py"]} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.