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
public class BoyerMoore | |
{ | |
private int[] _jumpTable; | |
private byte[] _pattern; | |
private int _patternLength; | |
public BoyerMoore() | |
{ | |
} | |
public BoyerMoore(byte[] pattern) | |
{ |
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 numpy as np | |
import matplotlib.pyplot as plt | |
def gradientdescentoptimizer(param, c, learning_rate =0.01): | |
# Forward Propagation | |
param["cost"] = c[0][0] * param["w"] ** 2 + c[1][0] * param["w"] + c[2][0] | |
# Backward Propagation | |
param["dw"] = 2 * c[0][0] * param["w"] + c[1][0] | |
# Update Omega |
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
# imports | |
import tensorflow as tf | |
import numpy as np | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
# Create linear spaced million points | |
xData = np.linspace(0.0, 10.0, 1000000, dtype=float) | |
# Create million random points | |
noise = np.random.randn(len(xData)) |
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 <Servo.h> | |
#include <Wire.h> | |
#include <Firmata.h> | |
#define I2C_WRITE B00000000 | |
#define I2C_READ B00001000 | |
#define I2C_READ_CONTINUOUSLY B00010000 | |
#define I2C_STOP_READING B00011000 | |
#define I2C_READ_WRITE_MODE_MASK B00011000 | |
#define I2C_10BIT_ADDRESS_MODE_MASK B00100000 |