x
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # Copyright (c) 2022 Adrian Lopez | |
| # | |
| # Based on https://github.com/PinGwynn/mmonit-mattermost | |
| # | |
| # 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, publish, distribute, sublicense, and/or sell |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "net" | |
| "os" | |
| "time" | |
| ) | |
| var expectedPort = 80 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| # vim:fenc=utf-8 | |
| # | |
| """ | |
| A partir de una serie de medidas de presión y el correspondiente volumen, | |
| aproximar una función polinómica. | |
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /usr/bin/env pytho2 | |
| # -*- coding: utf-8 -2- | |
| # vim:fenc=utf-8 | |
| # | |
| # Copyright © 2022 adrian <adrian@arco> | |
| # | |
| # Distributed under terms of the MIT license. | |
| """ | |
| Representamos en 2d y 3d un número de puntos que entre ellos siempre están |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| # vim:fenc=utf-8 | |
| """ | |
| Leer la topologia de un fichero JSON y cargarlo en skydive | |
| """ | |
| import json | |
| from tqdm import tqdm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from ble_monitor.ble_parser import BleParser | |
| import struct | |
| class TestXiaomi: | |
| """Tests for the Xiaomi parser""" | |
| def test_Xiaomi_RTCGQ02LM(self): | |
| """Simulando el dispositivo y añadiendo algún sensor adicional (switch)""" | |
| data_string = "02" # ext_packet=True si 0x0D |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Get services, characteristics and descriptors for a BLE device | |
| """ | |
| import sys | |
| import asyncio | |
| import platform | |
| from bleak import BleakClient | |
| ADDRESS = ( "20:C3:8F:8A:5B:EA") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [[source]] | |
| url = "https://pypi.org/simple" | |
| verify_ssl = true | |
| name = "pypi" | |
| [packages] | |
| pyserial = "*" | |
| requests = "*" | |
| [dev-packages] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Execute a command under a different network namespace | |
| */ | |
| package main | |
| import ( | |
| "fmt" | |
| "io/ioutil" | |
| "log" |