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
def importFile = Action.async{ implicit request => | |
user.isAdmin(LDAPAuth.getUser()).map { | |
case true =>Ok(views.html.person.importFile()) | |
case false => Unauthorized(views.html.page_403( "You don't have access to import SAP files")) | |
} | |
} | |
def doImport = Action.async(parse.multipartFormData) { implicit request => | |
user.isAdmin(LDAPAuth.getUser()).map { | |
case false => Future.successful(Unauthorized(views.html.page_403("You don't have access to import SAP files")) ) |
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
// Slick 2.x / play 2.4 | |
final def managementTree()(implicit session:Session):Set[String] = { | |
managerTreeIter(Set(this.login.toLowerCase)) | |
} | |
@tailrec | |
private def managerTreeIter(acc:Set[String])(implicit session:Session):Set[String] = { | |
this.manager match { | |
case None => acc | |
case Some(mgr) => mgr.managerTreeIter( acc ++Set( mgr.login.toLowerCase)) | |
} |
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 controllers | |
import javax.inject._ | |
import models.{ProductTrackRepo, ResourcePoolRepository} | |
import play.api._ | |
import play.api.db.slick.{DatabaseConfigProvider, HasDatabaseConfigProvider} | |
import play.api.mvc._ | |
import play.db.NamedDatabase |
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
public class DL { | |
private static Logger log = LoggerFactory.getLogger(DL.class); | |
public static void main(String[] args) throws Exception { | |
int batchSize = 10; | |
File file = new File("/Users/iholsman/dl/data/out/deeplearning.1.csv"); | |
//File file = new File("/Users/iholsman/dl/src/Canova/canova-api/src/test/resources/iris.libsvm"); | |
FileSplit fileSplit = new FileSplit(file); | |
Configuration conf = new Configuration(); | |
conf.set(FileRecordReader.APPEND_LABEL, "true"); | |
RecordReader libSvmRecordReader = new LibSvmRecordReader(); |
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
IMAGE CREATED CREATED BY SIZE | |
7833f968b4947a1f3afa17310e40a17d5a65efd1d499ee932330926c5f41f440 10 days ago /bin/sh -c #(nop) CMD [apache2 -DFOREGROUND] 0 B | |
8768d709f4174518805c988c4fc5256286d27a5df9b65649d1da84126f9b1947 10 days ago /bin/sh -c #(nop) EXPOSE map[80/tcp:{}] 0 B | |
5558d195c659515eb9d205991c17f096ce94a5b1cd7ef4631fc1c66d9f6c17d5 10 days ago /bin/sh -c #(nop) ENTRYPOINT [/usr/src/wordpress/docker-entrypoint.sh] 0 B | |
622d0a732c5e7b1 |
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
% Copyright (C) Daphne Koller, Stanford University, 2012 | |
function [] = PrintFactor(F) | |
% Pretty print the factor F. | |
% The first row lists the variables and subsequent rows are | |
% the joint assignment and their associated factor value in | |
% the last column. | |
for i=1:length(F.var) | |
fprintf(1, '%d\t', F.var(i)); |