View det.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View Monoid.scala
import simulacrum.{op, typeclass}
import scala.language.experimental.macros
object MyOps extends machinist.Ops{
override def operatorNames: Map[String, String] = Map(
"$bar$plus$bar" -> "plus"
)
}
View loan.scala
val rawData = sc.textFile("hdfs://hdfs-nn-host.com:9000/user/umb/bank/bank.csv")
rawData.take(5)
// 30;"unemployed";"married";"primary";"no";1787;"no";"no";"cellular";19;"oct";79;1;-1;0;"unknown";"no"
implicit def str2int(x: String) = x.toInt // because i'm lazy
// case class for representing data row
case class DataRow(age: Int,
job: String,
maritial: String,
View changed.csv
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field on line 10.
"","ROLLNO","FORMNO.x","NAME.x","GENDER.x","SCORE.x","RANK.x","FORMNO.y","NAME.y","GENDER.y","SCORE.y","RANK.y","diff_percentage"
"1",6894,"2071-2878","SURENDRA KUNWAR","Male",73.68,499,"2071-2878","SURENDRA KUNWAR","Male",48.223,4294,25.457
"2",7114,"2071-11158","TEZINA KHADKA","Female",66.62,1183,"2071-11158","TEZINA KHADKA","Female",50.076,3919,16.544
"3",7126,"2071-5200","TILAK PRASAD BHATT","Male",65.69,1289,"2071-5200","TILAK PRASAD BHATT","Male",41.51,5766,24.18
"4",7124,"2071-10055","TILAK GIRI","Male",62.32,1713,"2071-10055","TILAK GIRI","Male",72.5,613,-10.18
"5",6895,"2071-317","SURENDRA NEPAL","Male",61.95,1768,"2071-317","SURENDRA NEPAL","Male",87.409,13,-25.459
"6",7122,"2071-7648","TIKAM RAI","Male",59.67,2111,"2071-7648","TIKAM RAI","Male",40.58,5947,19.09
"7",7115,"2071-5978","THAKUR LAMICHHANE","Male",54.93,2936,"2071-5978","THAKUR LAMICHHANE","Male",70.199,801,-15.269
"8",63,"2071-5163","AASHISH CHANDRA","Male",53.31,3237,"2071-5163","AASHISH CHANDRA","Male",45.671,4874,7.639
"9",7113,"2071
View ioe.R
ioe1 <- read.csv('/Volumes/umb/ioe entrance/ioe-first.csv')
ioe1 <- subset(ioe1, select = c(1:6))
ioe2 <- read.csv('/Volumes/umb/ioe entrance/ioe second.csv')
require('dplyr')
ioe_joined = inner_join(ioe1, ioe2, by = "ROLLNO")
ioe_joined$diff_percentage <- ioe_joined$SCORE.x - ioe_joined$SCORE.y
ioe_contrasts <- filter(ioe_joined, diff_percentage > 0.1 | diff_percentage < -0.1)
write.csv(ioe_contrasts, "~/changed.csv")
View iris.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View DisjointSet.scala
package util
import scala.collection.mutable.HashMap
import scala.collection.mutable.ArrayBuffer
class DisjointSet[Element] {
private val parent = new HashMap[Element, Element]
private val rank = new HashMap[Element, Int]
View BinaryHeap.scala
package util
import scala.collection.mutable.HashMap
import scala.collection.mutable.ArrayBuffer
/*
* Single Array Based Binary Min Heap
*/
class BinaryHeap[T]{
View dtw_pattern.py
# -*- coding: utf-8 -*-
"""
Created on Tue Mar 11 11:05:05 2014
@author: logpoint
"""
import numpy as np
View lof.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.