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 traceback | |
import requests | |
import time | |
while True: | |
try: | |
c = requests.get("http://www.google.com") | |
print("Connection Alive.") | |
except Exception: | |
print(traceback.format_exc()) |
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 random | |
import networkx as nx | |
from networkx.exception import NetworkXNoCycle | |
class Node(object): | |
def __init__(self, name, dependencies): | |
self.name = name |
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
{ | |
"daily_profiles": { | |
"giorno_lavorativo": [ | |
{ | |
"start": 0, | |
"end": 3600, // Secondi a partire dalla mezzanotte | |
"target_temperature": 19 | |
}, | |
{ |
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 re | |
from glob import glob | |
import docker | |
import os | |
from subprocess import Popen, PIPE | |
try: | |
from config import BALENA_HOST |
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
#ifndef MIND_DDS_PROCESSINGQUEUE_H | |
#define MIND_DDS_PROCESSINGQUEUE_H | |
#include <condition_variable> | |
#include <vector> | |
#include <functional> | |
#include <thread> | |
#include <iostream> | |
#include <third_party/easylogging/easylogging++.h> | |
#include <queue> |
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
[ 277.499132] xhci-tegra 3530000.xhci: tegra_xhci_mbox_work mailbox command 6 | |
[ 277.601864] falcon 154c0000.nvenc: Direct firmware load for tegra18x/nvhost_nvenc061.fw failed with error -2 | |
[ 277.611905] falcon 154c0000.nvenc: Falling back to user helper | |
[ 277.619602] falcon 154c0000.nvenc: failed to get firmware | |
[ 277.625097] falcon 154c0000.nvenc: failed to get firmware | |
[ 277.630554] falcon 154c0000.nvenc: nvhost_flcn_init_sw: failed | |
[ 277.636598] __arm_smmu_context_fault: 87048 callbacks suppressed | |
[ 277.642656] arm-smmu 12000000.iommu: Unhandled context fault: iova=0x00000000, fsynr=0x1, cb=19, sid=7(0x7 - NVENC), pgd=0, pud=0, pmd=0, pte=0 | |
[ 283.723193] host1x 13e10000.host1x: vision-manager: syncpoint id 24 (154c0000.nvenc_videosource:src_0) stuck waiting 1, timeout=-1 | |
[ 283.735056] ---- syncpts ---- |
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
#!/bin/sh | |
FILE_TO_WATCH=$1 | |
OLD=`sha1sum $FILE_TO_WATCH` | |
NEW=$OLD | |
while true; do | |
sleep 1 |
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
static xmodem_status xmodem_handle_packet(uint8_t header) { | |
/* Contains received data and 2 bytes CRC16 */ | |
uint8_t received_data[X_PACKET_1024_SIZE + X_PACKET_CRC_SIZE]; | |
/* Contains the remaining part of the header: the packet number and the 1-complement of the packet number | |
Note: does not contains the first-byte of the header (which is passed to this function) */ | |
uint8_t received_header[X_PACKET_HEADER_SIZE]; | |
xmodem_status status = X_OK; |
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
cmake_minimum_required(VERSION 3.16) | |
project(test_memcpy) | |
add_compile_options(-march=native) | |
set(CMAKE_CXX_STANDARD 14) | |
add_executable(test_memcpy main.cpp) | |
target_link_libraries(test_memcpy pthread) |
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 Prova { | |
public: | |
bool dataValid() { | |
return abs(this->data - INVALID_VALUE) > 1; | |
} | |
protected: |
OlderNewer