Skip to main content

Universal Alarm for all kinds of people using state diagrams of Earthquakes and burglary

Project description

universal_burgary_alarm

Uses state diagram and multiple personas based security alarm

Sample code to run it

from universal_alarm import *

if name == "main": incident_dict = { "Burglary": 0.001, "Earthquake": 0.002, "Alarm_nonBurglarynonEarthquake": 0.001, "Alarm_BurglarynonEarthquake": 0.29, "Alarm_nonBurglaryEarthquake": 0.94, "Alarm_BurglaryEarthquake": 0.95 }

hearing_dict = {
    "John": {"nonAlarm": 0.1, "Alarm": 0.9},
    "Mary": {"nonAlarm": 0.2, "Alarm": 0.8},
    "Alice": {"nonAlarm": 0.15, "Alarm": 0.85},
    "Bob": {"nonAlarm": 0.25, "Alarm": 0.75},
    "Eve": {"nonAlarm": 0.05, "Alarm": 0.95}
}

qc, labels = universal_alarm(incident_dict, hearing_dict)
app,check = get_app(qc, labels)
if check == True:
    app.run_server(debug=True)

hearing_dict = {
    f"person_{i}": {"nonAlarm": random.uniform(0.1, 0.3), "Alarm": random.uniform(0.8, 0.9)}
    for i in range(100)
}
qc, labels = universal_alarm(incident_dict, hearing_dict)
app,check = get_app(qc, labels)
if check == True:
    app.run_server(debug=True)

hearing_dict = {
    f"person_{i}": {"nonAlarm": random.uniform(0.1, 0.3), "Alarm": random.uniform(0.8, 0.9)}
    for i in range(1000_000)
}
qc, labels = universal_alarm(incident_dict, hearing_dict)
app,check = get_app(qc, labels)
if check == True:
    app.run_server(debug=True)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

universal_burglary_alarm-0.2.0.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

universal_burglary_alarm-0.2.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file universal_burglary_alarm-0.2.0.tar.gz.

File metadata

  • Download URL: universal_burglary_alarm-0.2.0.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.13

File hashes

Hashes for universal_burglary_alarm-0.2.0.tar.gz
Algorithm Hash digest
SHA256 60f181c4fabe1d4dfc584dfa37b205379b7d7c0fe3b5af772f161f237a35ac19
MD5 68c3a70da3cc3247a10eef8498ce49ea
BLAKE2b-256 5dac32818ad1f68309b51848106bdd2b5b0a959dd89fa451eb6bec043f03c89a

See more details on using hashes here.

File details

Details for the file universal_burglary_alarm-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for universal_burglary_alarm-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 36d3cdaa4f5be02900619f60ac6142f2e1db8ba07126e1efe5a70df07e0b08d3
MD5 eab1852a1d59882b021fd960a9c843fa
BLAKE2b-256 4f7567a7b8c2de10587fc6f8baef9382ff3766f699ef63764c5c7dc7cf2ac0d4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page