Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 | |
import fileinput | |
import re | |
import sys | |
import binascii | |
from paho.mqtt.publish import single | |
# Esto buscan una trama que tenga Payload MARA | |
regex = re.compile(r'\[(?P<ip>[\d\.]+)\]\s<\w+=[\w_]+>\s[<>]+\s(?P<frame>[\w{2}\s?]+)') |
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
void setup() | |
{ | |
system("ifconfig eth0 192.168.0.100 netmask 255.255.255.0 up"); | |
} | |
void loop(){} |
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
# jupyter must be installed in the container, and if you want fancy tables, pandas too. | |
# docker exec -u 0 $(docker-compose -f $(COMPOSE_FILE) images -q django) pip install jupyter pandas | |
start_jupyter: ## Starts a Jupyter | |
$(eval DJANGO_IMAGE := $(shell docker-compose -f $(COMPOSE_FILE) images -q django)) | |
$(eval DJANGO_CONTAINER := $(shell docker-compose -f $(COMPOSE_FILE) ps -q django)) | |
$(eval POSTGRES_CONTAINER := $(shell docker-compose -f $(COMPOSE_FILE) ps -q postgres)) | |
$(eval ANOTHER_POSTGRES_CONTAINER := $(shell docker-compose -f $(COMPOSE_FILE) ps -q another-postgres)) | |
@docker run --rm \ | |
--volumes-from $(DJANGO_CONTAINER) \ |
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
[ | |
{ | |
"id": "36201a11.29adb6", | |
"type": "mqtt in", | |
"z": "590fa7d1.dae2c8", | |
"name": "", | |
"topic": "outTopic", | |
"qos": "2", | |
"broker": "49181d47.366c24", | |
"x": 259.5, |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
<?xml version='1.0' encoding='utf-8'?> | |
<mlt title="Anonymous Submission" version="6.4.1" root="/tmp" producer="main bin" LC_NUMERIC="es_AR.UTF-8"> | |
<profile width="640" frame_rate_den="1" height="480" display_aspect_num="16" display_aspect_den="9" frame_rate_num="25" colorspace="709" sample_aspect_den="1" description="HD 1080p 25 fps" progressive="1" sample_aspect_num="1"/> | |
<producer id="1" title="Anonymous Submission" out="2531" in="0"> | |
<property name="length">00:01:41:07</property> | |
<property name="eof">pause</property> | |
<property name="resource">/path/to/project/Clap_tap.mp3</property> | |
<property name="meta.media.nb_streams">1</property> | |
<property name="meta.media.0.stream.type">audio</property> | |
<property name="meta.media.0.codec.sample_fmt">s16p</property> |
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 python2 | |
''' | |
Plots a MELT xml schema with matplotlib | |
''' | |
from __future__ import print_function | |
from lxml import etree | |
import sys | |
from datetime import datetime, timedelta | |
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas | |
from matplotlib.figure import Figure |
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
# Copies a model from one DB to another using Django | |
# If you're using heroku, you may wanna check https://gist.github.com/D3f0/edd70a6066863ee74674ac5ede838a20 | |
def db_copy(obj, to, *skip, **kwargs): | |
''' | |
Copies a model from one database into another. | |
`obj` is the model that is going to be cloned | |
`to` is the db definition | |
`skip` is a list of attribtues that won't be copied | |
`kwargs is a list of elements that will be overwritten over model data |