This file contains 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
mol141+ nµ nlk ui j G-,GTRE\bnkkn m ñ→ b b tf fd | |
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ |
This file contains 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
39> << <<X:4>> || X <- [1,2] >>. | |
<<18>> |
This file contains 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
a | |
{1: "a", 2: "b"} | |
c | |
{1: "a", 2: "b"} | |
a == c | |
false | |
a === c | |
false | |
y |
This file contains 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
class GeometryExcpetion(Exception): | |
pass | |
class GeometryField(serializers.Field): | |
geom_type = None | |
def __init__(self, *args, **kwargs): | |
if not self.geom_type: | |
raise GeometryException('You must declare a `geom_type` attribute on your field' |
This file contains 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
#include <dirent.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <time.h> | |
int main(void) { | |
DIR *main_dir; | |
FILE *temp_file; | |
struct dirent *read_dir; |
This file contains 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/python | |
# | |
# The wiring for the LCD is as follows: | |
# 1 : GND | |
# 2 : 5V | |
# 3 : Contrast (0-5V)* | |
# 4 : RS (Register Select) | |
# 5 : R/W (Read Write) - GROUND THIS PIN | |
# 6 : Enable or Strobe | |
# 7 : Data Bit 0 - NOT USED |
This file contains 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
#include <stdio.h> | |
#include <stddef.h> | |
void foo(char **p, size_t lol); | |
void bar(char **p, size_t *lol); | |
void bar(char **p, size_t *lol) { | |
char method[] = "GET"; | |
size_t lol_size = 50; |
This file contains 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
2018-11-05T11:05:00.524+0100 [DEBUG] plugin.terraform-provider-aws_v1.29.0_x4: ----------------------------------------------------- | |
2018-11-05T11:05:00.526+0100 [DEBUG] plugin.terraform-provider-aws_v1.29.0_x4: 2018/11/05 11:05:00 [DEBUG] Creating IoT Topic Rule: { | |
2018-11-05T11:05:00.526+0100 [DEBUG] plugin.terraform-provider-aws_v1.29.0_x4: RuleName: "shadow_rejected_error", | |
2018-11-05T11:05:00.526+0100 [DEBUG] plugin.terraform-provider-aws_v1.29.0_x4: TopicRulePayload: { | |
2018-11-05T11:05:00.526+0100 [DEBUG] plugin.terraform-provider-aws_v1.29.0_x4: Actions: [{ | |
2018-11-05T11:05:00.526+0100 [DEBUG] plugin.terraform-provider-aws_v1.29.0_x4: CloudwatchMetric: { | |
2018-11-05T11:05:00.526+0100 [DEBUG] plugin.terraform-provider-aws_v1.29.0_x4: MetricName: "Rejected", | |
2018-11-05T11:05:00.526+0100 [DEBUG] plugin.terraform-provider-aws_v1.29.0_x4: MetricNamespace: "Shadow", | |
2018-11-05T11:05:00.526+0100 [DEBUG] plugin.terraform-provider-aws_v1.29.0_x4: MetricTimestamp: "", |
This file contains 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
resource "aws_iot_topic_rule" "shadow_rejection_errors" { | |
name = "shadow_rejected_error" | |
description = "Add a metric to cloudwatch if any shadow fails update" | |
enabled = true | |
sql = "SELECT *, topic(3) as device_id FROM '$aws/things/+/shadow/update/rejected'" | |
sql_version = "2016-03-23" | |
cloudwatch_metric { | |
metric_name = "Rejected" | |
metric_namespace = "Shadow" |
This file contains 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
import logging | |
import time | |
from logging.handlers import SocketHandler | |
logger = logging.getLogger('test') | |
class BinarySocketHandler(SocketHandler): | |
def prepare_record(self, record): | |
return self.format(record).encode() |
OlderNewer