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 os | |
import urllib.request | |
import os.path | |
import json | |
def download_asset(url, filename, token=None): | |
headers = {} | |
headers["Accept"] = 'application/octet-stream' | |
if token: |
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 <SPI.h> | |
#define ADC_CS_PIN 2 | |
#define ADC_CONVERSION_PIN 3 | |
#define ADC_EOC_PIN 4 | |
enum Command : uint16_t { | |
SEL_AN_IN_CHANNEL_0 = 0b0000 << 12, | |
SEL_AN_IN_CHANNEL_1 = 0b0001 << 12, | |
WAKE_UP = 0b1011 << 12, |
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
// BY: yiipmann | |
// SOURCE: https://arduino.stackexchange.com/questions/17296/interfacing-ads8319-with-arduino-uno | |
#include <SPI.h> | |
#define CONVPIN 7 | |
#define SELPIN 8 | |
#define SELPIN2 4 | |
#define MISOPIN 12 | |
#define SCLKPIN 13 |
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
/* | |
Render a Horizontal Percentage Bar | |
Drains left to right normally, if width is negative it will drain right to left. | |
Percent is clamped 0.0f - 1.0f | |
*/ | |
void RenderHPBar(int x, int y, int w, int h, float Percent, SDL_Color FGColor, SDL_Color BGColor) { | |
Percent = Percent > 1.f ? 1.f : Percent < 0.f ? 0.f : Percent; |
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 <SPI.h> | |
// Generated using https://www.daycounter.com/Calculators/Triangle-Wave-Generator-Calculator.phtml | |
// max value 2^9 | |
// num values 128 | |
// val 0-4096 | mA 0-300 | |
// | |
int16_t* pValues = NULL; | |
int valuesCount = 0; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import os | |
import sys | |
import argparse | |
import traceback | |
import pickle | |
import logging | |
import logging.handlers |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
% Example self-mixing signal generation for a modulated laser - Kliese et al., 2014 | |
c = 299792458; % Speed of light in vacuum (m/s) | |
C = 2; % Feedback parameter | |
alpha = 4.6; % Linewidth enhancement factor | |
T = 29.3e-3; % Simulation time (s) | |
N = 1000; % Number of samples | |
beta = 0.1; % Laser power modulation coefficient | |
lambda0 = 845e-9; % Laser wavelength (m) | |
L = 0.024 + 0.5e-6; % Target distance (m) | |
deltaf = - 46e9; % Frequency modulation coefficient (Hz) |
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
export POP3_SERVER = 'pop3.host.com' | |
export POP3_PORT = '110' | |
export POP3_USER = 'pop3_username' | |
export POP3_PASS = 'pop3_password' | |
export IMAP_SERVER = 'imap.host.com' | |
export IMAP_PORT = '993' | |
export IMAP_USER = 'imap_username' | |
export IMAP_PASS = 'imap_password' | |
export IMAP_DST_MBOX = 'INBOX' |