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
Giving feedback on code and designs can be difficult. Note that the developer has invested much time and effort in the development so it can be difficult to hear about issues. Often it is better to ask about the issue as a question than as a direct comment (i.e. “Where are the returned error codes checked by the calling code?” is easier than “This function is broken.”). With each comment, please note the severity of the item found: | |
• BUG: This is wrong. If you opt not to change it, I’d like to understand why. | |
• OUGHTTO: This is going to be a problem and ought to be fixed but if there is a good reason to leave it for now, ok but add a comment or something. | |
• MAYBE: If there is time and you agree this should be changed. There may be a better way. | |
• NIT: My OCD compels me to point this out but it need not compel you to make any changes. | |
• KUDOS: This area is particularly good. | |
Note: all but the first of these levels are advisory; the developer is permitted to use the feedback as they see fit. |
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
# Trinket IO demo | |
# Welcome to CircuitPython 3.1.1 :) | |
import board | |
from digitalio import DigitalInOut, Direction, Pull | |
from analogio import AnalogOut, AnalogIn | |
import touchio | |
import time | |
import adafruit_dotstar as dotstar |
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
Start Tinkering | |
My Little Pony Stopped Outputting | |
Plenty of Candy, No Guns | |
Are We Not Lawyers? | |
Passion Is Contagious | |
Do Robot Squirrels Dream of Electric Imps... | |
Lights, Camera, Electrons | |
Studebaker Love Story | |
Kidnapped and Blindfolded | |
Hands Off, Baby |
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 <stm32f0xx.h> | |
#include <stdint.h> | |
#include "../lib/generated_files/STM32F030R8_Init.h" | |
#define BIT_SET(PORT, BIT) (((PORT) -> BSRR) |= (1 << (BIT))) | |
#define BIT_RESET(PORT, BIT) (((PORT) -> BSRR) |= (1 << ((BIT) + 16))) | |
// Create a timer variable so it is easier to deal with in GDB | |
TIM_TypeDef * counter = TIM6; |
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
# ===== A Temporal-Difference Learning Snapshot ===== | |
# Patrick M. Pilarski, [email protected], Feb. 11, 2017 | |
# ---- | |
# 'xt' and 'xpt1' are the state information for the current (time t) and next (time t+1) time steps in the form of binary vectors | |
# e.g., if you had a house with five rooms, 'xtp1' could be [0,0,1,0,0], with the single '1' indicating that you are in Room 3; | |
# in this case, 'xt' might be [0,1,0,0,0] indicating you were just in Room 2; | |
# for a robot servo, instead of "rooms" you could use binned joint angle ranges. | |
# 'r' is the signal to be predicted; this is a scalar and could represent reward, or any other signal of interest | |
# e.g., in the examples above, it might be the reward you get for entering a given room, or the current draw of the servo. | |
# 'gamma' is the desired time scale of the prediction (with 0 <= gamma <= 1); |