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 reverse[A](as: List[A]): List[A] = { | |
foldLeft(as, List[A]())((acc, x) => x::acc) | |
} | |
def foldRightFromFoldLeft[A,B](as: List[A], z:B)(f:(B, A) => B):B ={ | |
foldLeft(reverse(as), z)((onlyNil, x) =>f(onlyNil, x) ) | |
} | |
// The Problem Child | |
// Type checker has a problem with both x.toString :: onlyNil or as seen below. |
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
FROM gliderlabs/alpine:latest | |
MAINTAINER Christopher Davenport <[email protected]> | |
ENV JAVA_VERSION=7 \ | |
JAVA_UPDATE=79 \ | |
JAVA_BUILD=15 \ | |
JAVA_HOME=/usr/lib/jvm/default-jvm \ | |
PATH=${PATH}:${JAVA_HOME}/bin | |
RUN apk add --update wget ca-certificates dnsmasq && \ |
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
#Vagrantfile AP/sytnax version | |
VAGRANTFILE_API_VERSION = "2" | |
$script = <<SCRIPT | |
yum install -y wget | |
#JAVA | |
wget --no-check-certificate --no-cookies --head "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u74-b02/jdk-8u74-linux-x64.rpm | |
yum localinstall -y jdk-8u74-linux-x64.rpm | |
rm -f jdk-8u74-linux-x64.rpm |
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
sqlserver = { | |
driver = "com.typesafe.slick.driver.ms.SQLServerDriver$" | |
db { | |
driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver" | |
host = "" | |
port = "" | |
databaseName = "" | |
url = "jdbc:sqlserver://"${sqlserver.db.host}":"${sqlserver.db.port}";databaseName="${sqlserver.db.databaseName} | |
user = "" |
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 deleteGroupsExample(currentGoogleGroups: Seq[Group]) = { | |
val set: Set[String] = currentGoogleGroups.map(_.id.get).toSet | |
db.run(googleGroups.result).flatMap { groups => | |
Future.sequence{ | |
groups.withFilter( group => !set.contains(group.id)) | |
.map{ group => | |
db.run(queryGoogleGroupsTableById(group.id).delete) | |
} | |
} | |
} |
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
CREATE TABLE NCBI_Annotation | |
( | |
UnigeneID VARCHAR(32) PRIMARY KEY NOT NULL, | |
Description VARCHAR(255) NOT NULL, | |
ProteinsPID VARCHAR(32) NOT NULL | |
); | |
CREATE TABLE Proteins | |
( | |
PID VARCHAR(32) PRIMARY KEY NOT NULL, |
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
#!/bin/bash | |
# This script moves to recompile all of the Banner Jobsub components. | |
# This function executes the file if it exists. | |
function ifFileExistsExecute(){ | |
if [ -f "$1" ]; then | |
if $1 ; then | |
echo "$1 compiled" |
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
Saved For Posterity | |
val futurePidmXor: Future[Xor[MissingPersonContact, BigDecimal]] = convertedContact | |
.bimap(Future.successful, x => pidmResponder(x.BannerID)) | |
.bisequence | |
.map(_.flatMap(Xor.fromOption(_, missingPersonContact))) |
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
- name: Install Something and Uninstall something else | |
yum: | |
name={{ item.name }} | |
state={{ item.state | default(present) }} | |
with_items: | |
- { name: 'program1', state: 'latest' } | |
- { name: 'program2'} | |
- { name: 'program3', state: 'absent' } |
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
type ID[A] = A |
OlderNewer