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 app.site | |
import org.apache.spark.graphx.{Edge, Graph} | |
import org.apache.spark.SparkContext | |
import org.apache.spark.sql.SparkSession | |
import org.apache.spark.rdd.RDD | |
object Sample { | |
def main(args: Array[String]): Unit = { | |
val spark = SparkSession |
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
# [[1, 2, 3, 4, 5], | |
# [6, 7, 8, 9, 10], | |
# [11, 12, 13, 14, 15], | |
# [16, 17, 18, 19, 20], | |
# [21, 22, 23, 24, 25]] | |
#input = [[1, 2, 3, 4],[5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16]] | |
input = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20], [21, 22, 23, 24, 25]] | |
# Transpose | |
for n in 0..input.length-2 |
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
Jotting this down so I can reference in the future. These are the steps I followed to upgrade from 9.2.4 to 9.3. | |
1. brew upgrade postgresql | |
2. pg_ctl -D /usr/local/var/postgres stop -s -m fast | |
3. mv /usr/local/var/postgres /usr/local/var/postgres92 | |
4. initdb /usr/local/var/postgres -E utf8 | |
5. pg_upgrade -b /usr/local/Cellar/postgresql/9.2.4/bin -B /usr/local/Cellar/postgresql/9.3.0/bin -d /usr/local/var/postgres92 -D /usr/local/var/postgres | |
6. pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start |
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
function setRandom() { db.skill.find().forEach(function (obj) {obj.random = Math.random();db.skill.save(obj);}); } db.eval(setRandom); |
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
info: Creating snapshot 0.0.0-35 | |
info Uploading: [=============================] 100% | |
error: Error running command deploy | |
error: Nodejitsu Error (500): Internal Server Error | |
error: socket hang up | |
help: For help with this error contact Nodejitsu Support: | |
help: webchat: <http://webchat.nodejitsu.com/> | |
help: irc: <irc://chat.freenode.net/#nodejitsu> | |
help: email: <support@nodejitsu.com> | |
help: |
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
info: Creating snapshot 0.0.0-35 | |
info Uploading: [=============================] 100% | |
error: Error running command deploy | |
error: Nodejitsu Error (500): Internal Server Error | |
error: npm http GET http://165.225.138.160:5984/registry/_design/app/_rewrite/request/2.21.0 | |
npm http GET http://165.225.138.160:5984/registry/_design/app/_rewrite/time/0.9.2 | |
npm http GET http://165.225.138.160:5984/registry/_design/app/_rewrite/redis/0.8.3 | |
npm http GET http://165.225.138.160:5984/registry/_design/app/_rewrite/nodemailer/0.4.2 | |
npm http GET http://165.225.138.160:5984/registry/_design/app/_rewrite/mongoose-pagination/1.0.0 | |
npm http GET http://165.225.138.160:5984/registry/_design/app/_rewrite/express.io/1.1.9 |