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
Homebrew build logs for homebrew/science/opencv3 on Mac OS X 10.11.4 | |
Build date: 2016-04-24 11:38:59 |
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 scala.util.Random; | |
var NUM_SAMPLES = 2000000000; | |
val count = sc.parallelize(1 to NUM_SAMPLES).map{ _ => Random.nextLong }; | |
var sum = count;for (_ <- 1 to 20){sum = sum ++ count}; | |
sum.saveAsTextFile("hdfs://10.0.72.14:54310/data/big_num_700g.txt"); |
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
var singleton = function () { | |
// all are public | |
var someVariable = "some value" // acts like states | |
var otherVariable = 123 // acts like states | |
return { | |
someFunction: function (someArg) { | |
// expressions go here, change state | |
return "other value" | |
}, |
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
/* absolution position + transform approach */ | |
.parent { | |
height: 100vh; | |
position: relative; | |
.children { | |
position: absolute; | |
top: 50%; | |
left: 50%; | |
transform: translate(-50%, -50%); |
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 java.text.SimpleDateFormat | |
import java.util.Date | |
import scala.collection._ | |
import sys.process._ | |
import java.io._ | |
import org.apache.spark.SparkContext | |
import org.apache.spark.SparkContext._ | |
import org.apache.spark.SparkConf | |
import org.apache.spark.scheduler._ |
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
var getTenPinBowlingScore = function (result) { | |
// construct the array from string | |
var resultArr = result.split(',').map(s => { | |
return parseInt(s) | |
}) | |
var calculatedResult = resultArr.reduce((preVal, curVal, curIdx, arr) => { | |
// calcualte any extra score |
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
// !!! Attention !!! | |
void initPort (SerialPort port) { | |
// set this encoding to extend the ascii range | |
port.Encoding = System.Text.Encoding.GetEncoding(28591); | |
} | |
// Take a string and parse the quaternion and corresponding index | |
// return: | |
// quat = Quaternion.identity if packet is invalid | |
// index = -1 if packet is invalid |
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
... | |
// modify the initiator of the packet | |
uint8_t teapotPacket[20] = { '$', 0x02, | |
0,0, 0,0, 0,0, 0,0, | |
0,0, 0,0, 0,0, | |
0x00, 0x00, '\r', '\n' }; | |
... | |
loop() { | |
... |
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
// I2C device class (I2Cdev) demonstration Arduino sketch for MPU6050 class | |
// 10/7/2011 by Jeff Rowberg <[email protected]> | |
// Updates should (hopefully) always be available at https://github.com/jrowberg/i2cdevlib | |
// | |
// Changelog: | |
// 2013-05-08 - added multiple output formats | |
// - added seamless Fastwire support | |
// 2011-10-07 - initial release | |
/* ============================================ |
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
// I2C device class (I2Cdev) demonstration Arduino sketch for MPU6050 class | |
// 10/7/2011 by Jeff Rowberg <[email protected]> | |
// Updates should (hopefully) always be available at https://github.com/jrowberg/i2cdevlib | |
// | |
// Changelog: | |
// 2013-05-08 - added multiple output formats | |
// - added seamless Fastwire support | |
// 2011-10-07 - initial release | |
/* ============================================ |
OlderNewer