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
Sending build context to Docker daemon 668.7kB | |
Step 1/21 : FROM pytorch/pytorch:1.1.0-cuda10.0-cudnn7.5-devel | |
---> 1be771bff6d1 | |
Step 2/21 : WORKDIR /workspace/ | |
---> Using cache | |
---> ae7d466850b7 | |
Step 3/21 : RUN apt-get update -y | |
---> Using cache | |
---> c3d261d70ab6 | |
Step 4/21 : RUN apt-get install -y git curl ca-certificates bzip2 cmake tree htop bmon iotop sox libsox-dev libsox-fmt-all vim |
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
def recurse_and_stringify_dates(d, date_format_string="%m/%d/%Y"): | |
""" | |
Walks through a dictionary recursively and converts None to "" and datetime objects to strings | |
:param d: dictionary object to convert | |
:param date_format_string: final format of the datetime objects when converted to strings | |
:return: a dictionary of the same structure, with None converted to "" and datetime objects converted to strings | |
""" | |
# formats individual fields | |
def format_value(value): |
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
// This #include statement was automatically added by the Particle IDE. | |
#include "bluz_gateway.h" | |
#define POLL_CONNECTIONS_INTERVAL 10000 | |
SYSTEM_MODE(SEMI_AUTOMATIC); | |
bluz_gateway gateway; | |
int bluz_peripherals_available = 0; | |
int bluz_preipherals_reported = 0; |
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
// This #include statement was automatically added by the Particle IDE. | |
#include "bluz_gateway/bluz_gateway.h" | |
#define POLL_CONNECTIONS_INTERVAL 30000 | |
SYSTEM_MODE(SEMI_AUTOMATIC); | |
bluz_gateway gateway; | |
void handle_custom_data(uint8_t *data, uint16_t length) { | |
//if you use BLE.send from any connected DK, the data will end up here | |
Particle.publish("Bluz Custom Data", String((char*)data)); |
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 "application.h" | |
SYSTEM_MODE(MANUAL); | |
int timeLastPublish = 0; | |
int timeBetweenPublishes = 300000; | |
bool sendData = false; | |
void dataCallbackHandler(uint8_t *data, uint16_t length) { | |
sendData = true; | |
} |
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 uint8_t tx_data[1]; /**< SPI TX buffer. */ | |
static uint8_t rx_data[1]; /**< SPI RX buffer. */ | |
static uint8_t id[3]; /**< SPI RX buffer. */ | |
/**@brief Function for application main entry. | |
*/ | |
int main(void) | |
{ | |
//connect | |
spi_base_address = spi_master_init(SFLASH_SPI, SPI_MODE0, (bool)0); |
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 <SPI.h> // Include the Arduino SPI library | |
// Define the SS pin | |
// This is the only pin we can move around to any available | |
// digital pin. | |
const int ssPin = 8; | |
#define DATAOUT 11//MOSI | |
#define DATAIN 12//MISO | |
#define SPICLOCK 13//sck |