Skip to content

Instantly share code, notes, and snippets.

View ConanMercer5's full-sized avatar

Conan Mercer ConanMercer5

View GitHub Profile
// --- Libraries
#include <Arduino.h>
#include <U8g2lib.h>
#include <Wire.h>
#include <Adafruit_MLX90614.h> // Library to communicate with IR sensors
// --- Variables and settings
U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, /* reset=*/U8X8_PIN_NONE);
Adafruit_MLX90614 IR_1 = Adafruit_MLX90614(0x5A); // MLX90614 address is 0x5A
Adafruit_MLX90614 IR_2 = Adafruit_MLX90614(0x2B); // MLX90614 address is 0x2B
// --- Libraries
#include <Arduino.h>
#include <U8g2lib.h>
#include <Wire.h>
#include <Adafruit_MLX90614.h> // Library to communicate with IR sensors
void printTemp(Adafruit_MLX90614 sensor)
{
if (i < 1)
{
u8g2.begin(); // initialize OLED screen
}
TEMP = sensor.readObjectTempC(); // store temp in a double
u8g2.clearBuffer(); // clear the internal memory
u8g2.drawStr(0, 50, dtostrf(TEMP, 5, 1, outstr)); // convert double to string
u8g2.drawStr(80, 50, "\xb0"); // hex code for degrees celsius
void printOLED(const char *t, const char *t2)
{
u8g2.begin();
u8g2.clearBuffer();
u8g2.drawStr(0, 20, t);
u8g2.drawStr(0, 60, t2);
u8g2.sendBuffer();
}
<div class="some-class">
<iframe src="YourNotebook.html" width="100%" scrolling="no" frameBorder="0" onload="resizeIframe(this)"></iframe>
</div>
jupyter nbconvert --to html YourNotebook.ipynb
pip install nbconvert
# OR
conda install nbconvert
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import pandas as pd #pandas library that supports reading a comma-separated values (csv) file into DataFrame
df = pd.read_csv('https://covid.ourworldindata.org/data/owid-covid-data.csv') #df stands for DataFrame
df2 = df.set_index("location", drop = False) #drop is set to false so it will not be deleted if we set another index later
df3 = df2.loc["Spain","date":"new_cases"].tail(100)
import pandas as pd #pandas library that supports reading a comma-separated values (csv) file into DataFrame
df = pd.read_csv('https://covid.ourworldindata.org/data/owid-covid-data.csv') #df stands for DataFrame
df2 = df.set_index("location", drop = False) #drop is set to false so it will not be deleted if we set another index later