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
# -*- coding: utf-8 -*- | |
# | |
# Licensed to the Apache Software Foundation (ASF) under one | |
# or more contributor license agreements. See the NOTICE file | |
# distributed with this work for additional information | |
# regarding copyright ownership. The ASF licenses this file | |
# to you under the Apache License, Version 2.0 (the | |
# "License"); you may not use this file except in compliance | |
# with the License. You may obtain a copy of the License at | |
# |
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
/* ATM90E36 Energy Monitor Demo Application | |
The MIT License (MIT) | |
Copyright (c) 2016 whatnick and Ryzee | |
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 copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. |
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
============================= test session starts ============================== | |
platform linux -- Python 3.6.8, pytest-5.3.2, py-1.8.0, pluggy-0.13.1 | |
rootdir: /home/ubuntu/eo-datasets, inifile: setup.cfg, testpaths: eodatasets3, tests | |
plugins: flake8-1.0.4, cov-2.8.1, hypothesis-4.54.0 | |
collected 94 items | |
eodatasets3/documents.py .... [ 4%] | |
eodatasets3/images.py ... [ 7%] | |
eodatasets3/properties.py .. [ 9%] | |
eodatasets3/ui.py . [ 10%] |
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
Open On-Chip Debugger 0.10.0 | |
Licensed under GNU GPL v2 | |
For bug reports, read | |
http://openocd.org/doc/doxygen/bugs.html | |
none separate | |
adapter speed: 25000 kHz | |
Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'. | |
Warn : Transport "jtag" was already selected | |
Info : ftdi: if you experience problems at higher adapter clocks, try the command "ftdi_tdo_sample_edge falling" | |
Info : clock speed 25000 kHz |
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
oauth_token = session['google_oauth_token'] | |
from oauth2client.client import OAuth2Credentials | |
from datetime import datetime | |
expirty_str = str(datetime.fromtimestamp(oauth_token['expires_at'])) | |
with flask_app.app_context(): | |
token_data = { | |
'access_token' : oauth_token['access_token'], | |
'token_expiry' : expirty_str, | |
'user_agent' : 'PyDrive Automation', | |
'refresh_token' : None, |
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
oauth_token = session['google_oauth_token'] | |
from oauth2client.client import OAuth2Credentials | |
from datetime import datetime | |
expirty_str = str(datetime.fromtimestamp(oauth_token['expires_at'])) | |
with flask_app.app_context(): | |
token_data = { | |
'access_token' : oauth_token['access_token'], | |
'token_expiry' : expirty_str, | |
'user_agent' : 'PyDrive Automation', | |
'refresh_token' : None, |
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
import machine | |
import time | |
SysStatus = 0x01 #System Status | |
sck = machine.Pin(5,machine.Pin.OUT) | |
mosi = machine.Pin(18,machine.Pin.OUT) | |
miso = machine.Pin(19,machine.Pin.IN) | |
cs1 = machine.Pin(15,machine.Pin.OUT) | |
cs2 = machine.Pin(33,machine.Pin.OUT) |
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
#include <Wire.h> | |
/* Comment this out to disable prints and save space */ | |
//#define BLYNK_PRINT Serial | |
#include <ESP8266WiFi.h> | |
#include <BlynkSimpleEsp8266.h> | |
#define DS1682_ADDR 0x6B | |
#define EVENT_COUNTER 0x09 |
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
/* | |
* This sketch sends ads1115 current sensor data via out over serial port. | |
* It needs the following libraries to work (besides the esp8266 standard libraries supplied with the IDE): | |
* | |
* - https://github.com/adafruit/Adafruit_ADS1X15 | |
* - https://github.com/adafruit/Adafruit_SSD1306 | |
* - https://github.com/adafruit/Adafruit-GFX-Library | |
* | |
* The above libraries can be directly installed via the Arduino IDE | |
* |
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
import time | |
from tentacle_pi.LM75 import LM75 | |
import httplib, urllib | |
from time import localtime, strftime | |
lm = LM75(0x48,"/dev/i2c-1") | |
while(True): | |
temperature = lm.temperature() | |
print "temperature: %0.2f" % temperature |