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
int r = 2; | |
int g = 3; | |
int b = 4; | |
void setup() { | |
pinMode(10, OUTPUT); | |
pinMode(r, OUTPUT); | |
pinMode(g, OUTPUT); | |
pinMode(b, OUTPUT); | |
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 version of har_script.rb adheres more strictly to | |
# OOP principles because it enables code reusability without code duplication | |
require 'json' | |
require 'open-uri' | |
# Helper Method nested_search goes through nested Hashes, finds message in | |
# desired key. | |
# @param obj, the hash | |
# @param key, the desired key to be found, nested within obj | |
# @globalVar, the global variable to be modified |
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 <Wire.h> | |
#include <Encoder.h> | |
#include <PID_v1.h> | |
#include <Adafruit_MCP23017.h> | |
#include <BricktronicsShield.h> | |
#include <BricktronicsMotor.h> | |
#include <BricktronicsLight.h> | |
#include <BricktronicsButton.h> | |
#include <BricktronicsUltrasonic.h> |
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
import numpy as np | |
import pandas as pd | |
def clean_data(df, fill_method='ffill'): | |
''' | |
Takes in a pandas DataFrame and changes all string attributes and outputs | |
to integers. Returns the DataFrame and the mapping | |
fill_method can be: | |
- 'ffill': forward fill | |
- 'bfill': backward fill |
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
package opt.test; | |
import func.nn.backprop.BackPropagationNetwork; | |
import func.nn.backprop.BackPropagationNetworkFactory; | |
import func.nn.backprop.BatchBackPropagationTrainer; | |
import func.nn.backprop.RPROPUpdateRule; | |
import opt.OptimizationAlgorithm; | |
import opt.RandomizedHillClimbing; | |
import opt.SimulatedAnnealing; | |
import opt.example.NeuralNetworkOptimizationProblem; |