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
class Pen: | |
color = None | |
ink_level = None | |
active = True | |
def __init__(self, color="black", ink_level=1000): | |
self.color = color | |
self.ink_level = ink_level | |
def __str__(self): |
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
cmake_minimum_required(VERSION 3.7) | |
project(DEMOranges) | |
set(CMAKE_CXX_STANDARD 11) | |
# Fix Windows path environment variable. | |
if (WIN32) | |
STRING(REGEX REPLACE "\\\\" "/" OCL_ROOT $ENV{OCL_ROOT}) | |
endif(WIN32) | |
# Set required OpenCL CMake build options. |
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 | |
def deserialize_sudoku(serialized): | |
""" | |
a b c d e f g h i | |
j k l . . . . . . | |
. . . . . . . . . | |
would be from | |
abcdefghijkl... | |
""" |
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
# -*- coding: utf-8 -*- | |
""" | |
Created on Mon Jun 26 21:05:22 2017 | |
@author: Xorgon | |
""" | |
import numpy as np | |
import scipy.optimize as opt | |
import matplotlib.pyplot as plt |
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 <SoftwareSerial.h> | |
#define MSP_ATTITUDE 108 | |
SoftwareSerial mspSerial(11, 12); // RX TX | |
void setup() { | |
mspSerial.begin(9600); | |
Serial.begin(9600); | |
} |
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
Matrix: | |
[[ 0.00000000e+00 1.60000000e-01 0.00000000e+00 -9.81000000e+00] | |
[ -1.25000000e-01 -5.00000000e-01 2.12000000e+02 0.00000000e+00] | |
[ 0.00000000e+00 -8.20000000e-03 -5.00000000e-01 0.00000000e+00] | |
[ 0.00000000e+00 0.00000000e+00 1.00000000e+00 0.00000000e+00]] | |
Eigenvalues: | |
(-0.498753770359+1.32368162214j) | |
(-0.498753770359-1.32368162214j) | |
(-0.00124622964121+0.0708790500223j) |
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 | |
matrix = np.array([[0., 0.16, 0., -9.81], | |
[-0.1250, -0.5, 212., 0.], | |
[0., -0.0082, -0.5, 0.], | |
[0., 0., 1., 0.]]) | |
print("Matrix:\n" + str(matrix)) | |
# Get the eigenvalues (eig returns tuple with eigenvalues and eigenvectors) |