Cluster Metrics Extension
Introduction
The member nodes of the cluster can collect system health metrics and publish that to other cluster nodes and to the registered subscribers on the system event bus with the help of Cluster Metrics Extension.
Cluster metrics information is primarily used for load-balancing routers, and can also be used to implement advanced metrics-based node life cycles, such as "Node Let-it-crash" when CPU steal time becomes excessive.
Cluster Metrics Extension is a separate Akka module delivered in akka-cluster-metrics jar.
To enable usage of the extension you need to add the following dependency to your project:
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-cluster-metrics_2.11</artifactId>
<version>2.4.11</version>
</dependency>
and add the following configuration stanza to your application.conf
akka.extensions = [ "akka.cluster.metrics.ClusterMetricsExtension" ]
Make sure to disable legacy metrics in akka-cluster: akka.cluster.metrics.enabled=off, since it is still enabled in akka-cluster by default (for compatibility with past releases).
Cluster members with status WeaklyUp, if that feature is enabled, will participate in Cluster Metrics collection and dissemination.
Metrics Collector
Metrics collection is delegated to an implementation of akka.cluster.metrics.MetricsCollector.
Different collector implementations provide different subsets of metrics published to the cluster. Certain message routing and let-it-crash functions may not work when Sigar is not provisioned.
Cluster metrics extension comes with two built-in collector implementations:
- akka.cluster.metrics.SigarMetricsCollector, which requires Sigar provisioning, and is more rich/precise
- akka.cluster.metrics.JmxMetricsCollector, which is used as fall back, and is less rich/precise
You can also plug-in your own metrics collector implementation.
By default, metrics extension will use collector provider fall back and will try to load them in this order:
- configured user-provided collector
- built-in akka.cluster.metrics.SigarMetricsCollector
- and finally akka.cluster.metrics.JmxMetricsCollector
Metrics Events
Metrics extension periodically publishes current snapshot of the cluster metrics to the node system event bus.
The publication period is controlled by the akka.cluster.metrics.collector.sample-period setting.
The payload of the akka.cluster.metrics.ClusterMetricsChanged event will contain latest metrics of the node as well as other cluster member nodes metrics gossip which was received during the collector sample period.
You can subscribe your metrics listener actors to these events in order to implement custom node lifecycle
ClusterMetricsExtension.get(system).subscribe(metricsListenerActor);
Hyperic Sigar Provisioning
Both user-provided and built-in metrics collectors can optionally use Hyperic Sigar for a wider and more accurate range of metrics compared to what can be retrieved from ordinary JMX MBeans.
Sigar is using a native o/s library, and requires library provisioning, i.e. deployment, extraction and loading of the o/s native library into JVM at runtime.
User can provision Sigar classes and native library in one of the following ways:
- Use Kamon sigar-loader as a project dependency for the user project. Metrics extension will extract and load sigar library on demand with help of Kamon sigar provisioner.
- Use Kamon sigar-loader as java agent: java -javaagent:/path/to/sigar-loader.jar. Kamon sigar loader agent will extract and load sigar library during JVM start.
- Place sigar.jar on the classpath and Sigar native library for the o/s on the java.library.path. User is required to manage both project dependency and library deployment manually.
Warning
When using Kamon sigar-loader and running multiple instances of the same application on the same host, you have to make sure that sigar library is extracted to a unique per instance directory. You can control the extract directory with the akka.cluster.metrics.native-library-extract-folder configuration setting.
To enable usage of Sigar you can add the following dependency to the user project
<dependency>
<groupId>io.kamon</groupId>
<artifactId>sigar-loader</artifactId>
<version>1.6.6-rev002</version>
</dependency>
You can download Kamon sigar-loader from Maven Central
Adaptive Load Balancing
The AdaptiveLoadBalancingPool / AdaptiveLoadBalancingGroup performs load balancing of messages to cluster nodes based on the cluster metrics data. It uses random selection of routees with probabilities derived from the remaining capacity of the corresponding node. It can be configured to use a specific MetricsSelector to produce the probabilities, a.k.a. weights:
- heap / HeapMetricsSelector - Used and max JVM heap memory. Weights based on remaining heap capacity; (max - used) / max
- load / SystemLoadAverageMetricsSelector - System load average for the past 1 minute, corresponding value can be found in top of Linux systems. The system is possibly nearing a bottleneck if the system load average is nearing number of cpus/cores. Weights based on remaining load capacity; 1 - (load / processors)
- cpu / CpuMetricsSelector - CPU utilization in percentage, sum of User + Sys + Nice + Wait. Weights based on remaining cpu capacity; 1 - utilization
- mix / MixMetricsSelector - Combines heap, cpu and load. Weights based on mean of remaining capacity of the combined selectors.
- Any custom implementation of akka.cluster.metrics.MetricsSelector
The collected metrics values are smoothed with exponential weighted moving average. In the Configuration you can adjust how quickly past data is decayed compared to new data.
Let's take a look at this router in action. What can be more demanding than calculating factorials?
The backend worker that performs the factorial calculation:
public class FactorialBackend extends UntypedActor {
@Override
public void onReceive(Object message) {
if (message instanceof Integer) {
final Integer n = (Integer) message;
Future<BigInteger> f = future(new Callable<BigInteger>() {
public BigInteger call() {
return factorial(n);
}
}, getContext().dispatcher());
Future<FactorialResult> result = f.map(
new Mapper<BigInteger, FactorialResult>() {
public FactorialResult apply(BigInteger factorial) {
return new FactorialResult(n, factorial);
}
}, getContext().dispatcher());
pipe(result, getContext().dispatcher()).to(getSender());
} else {
unhandled(message);
}
}
BigInteger factorial(int n) {
BigInteger acc = BigInteger.ONE;
for (int i = 1; i <= n; ++i) {
acc = acc.multiply(BigInteger.valueOf(i));
}
return acc;
}
}
The frontend that receives user jobs and delegates to the backends via the router:
public class FactorialFrontend extends UntypedActor {
final int upToN;
final boolean repeat;
LoggingAdapter log = Logging.getLogger(getContext().system(), this);
ActorRef backend = getContext().actorOf(FromConfig.getInstance().props(),
"factorialBackendRouter");
public FactorialFrontend(int upToN, boolean repeat) {
this.upToN = upToN;
this.repeat = repeat;
}
@Override
public void preStart() {
sendJobs();
getContext().setReceiveTimeout(Duration.create(10, TimeUnit.SECONDS));
}
@Override
public void onReceive(Object message) {
if (message instanceof FactorialResult) {
FactorialResult result = (FactorialResult) message;
if (result.n == upToN) {
log.debug("{}! = {}", result.n, result.factorial);
if (repeat)
sendJobs();
else
getContext().stop(getSelf());
}
} else if (message instanceof ReceiveTimeout) {
log.info("Timeout");
sendJobs();
} else {
unhandled(message);
}
}
void sendJobs() {
log.info("Starting batch of factorials up to [{}]", upToN);
for (int n = 1; n <= upToN; n++) {
backend.tell(n, getSelf());
}
}
}
As you can see, the router is defined in the same way as other routers, and in this case it is configured as follows:
akka.actor.deployment {
/factorialFrontend/factorialBackendRouter = {
# Router type provided by metrics extension.
router = cluster-metrics-adaptive-group
# Router parameter specific for metrics extension.
# metrics-selector = heap
# metrics-selector = load
# metrics-selector = cpu
metrics-selector = mix
#
routees.paths = ["/user/factorialBackend"]
cluster {
enabled = on
use-role = backend
allow-local-routees = off
}
}
}
It is only router type and the metrics-selector parameter that is specific to this router, other things work in the same way as other routers.
The same type of router could also have been defined in code:
int totalInstances = 100;
Iterable<String> routeesPaths = Arrays.asList("/user/factorialBackend", "");
boolean allowLocalRoutees = true;
String useRole = "backend";
ActorRef backend = getContext().actorOf(
new ClusterRouterGroup(new AdaptiveLoadBalancingGroup(
HeapMetricsSelector.getInstance(), Collections.<String> emptyList()),
new ClusterRouterGroupSettings(totalInstances, routeesPaths,
allowLocalRoutees, useRole)).props(), "factorialBackendRouter2");
int totalInstances = 100;
int maxInstancesPerNode = 3;
boolean allowLocalRoutees = false;
String useRole = "backend";
ActorRef backend = getContext().actorOf(
new ClusterRouterPool(new AdaptiveLoadBalancingPool(
SystemLoadAverageMetricsSelector.getInstance(), 0),
new ClusterRouterPoolSettings(totalInstances, maxInstancesPerNode,
allowLocalRoutees, useRole)).props(Props
.create(FactorialBackend.class)), "factorialBackendRouter3");
The Lightbend Activator tutorial named Akka Cluster Samples with Java. contains the full source code and instructions of how to run the Adaptive Load Balancing sample.
Subscribe to Metrics Events
It is possible to subscribe to the metrics events directly to implement other functionality.
import akka.actor.UntypedActor;
import akka.cluster.Cluster;
import akka.cluster.ClusterEvent.CurrentClusterState;
import akka.cluster.metrics.ClusterMetricsChanged;
import akka.cluster.metrics.NodeMetrics;
import akka.cluster.metrics.StandardMetrics;
import akka.cluster.metrics.StandardMetrics.HeapMemory;
import akka.cluster.metrics.StandardMetrics.Cpu;
import akka.cluster.metrics.ClusterMetricsExtension;
import akka.event.Logging;
import akka.event.LoggingAdapter;
public class MetricsListener extends UntypedActor {
LoggingAdapter log = Logging.getLogger(getContext().system(), this);
Cluster cluster = Cluster.get(getContext().system());
ClusterMetricsExtension extension = ClusterMetricsExtension.get(getContext().system());
// Subscribe unto ClusterMetricsEvent events.
@Override
public void preStart() {
extension.subscribe(getSelf());
}
// Unsubscribe from ClusterMetricsEvent events.
@Override
public void postStop() {
extension.unsubscribe(getSelf());
}
@Override
public void onReceive(Object message) {
if (message instanceof ClusterMetricsChanged) {
ClusterMetricsChanged clusterMetrics = (ClusterMetricsChanged) message;
for (NodeMetrics nodeMetrics : clusterMetrics.getNodeMetrics()) {
if (nodeMetrics.address().equals(cluster.selfAddress())) {
logHeap(nodeMetrics);
logCpu(nodeMetrics);
}
}
} else if (message instanceof CurrentClusterState) {
// Ignore.
} else {
unhandled(message);
}
}
void logHeap(NodeMetrics nodeMetrics) {
HeapMemory heap = StandardMetrics.extractHeapMemory(nodeMetrics);
if (heap != null) {
log.info("Used heap: {} MB", ((double) heap.used()) / 1024 / 1024);
}
}
void logCpu(NodeMetrics nodeMetrics) {
Cpu cpu = StandardMetrics.extractCpu(nodeMetrics);
if (cpu != null && cpu.systemLoadAverage().isDefined()) {
log.info("Load: {} ({} processors)", cpu.systemLoadAverage().get(),
cpu.processors());
}
}
}
Custom Metrics Collector
Metrics collection is delegated to the implementation of akka.cluster.metrics.MetricsCollector
You can plug-in your own metrics collector instead of built-in akka.cluster.metrics.SigarMetricsCollector or akka.cluster.metrics.JmxMetricsCollector.
Look at those two implementations for inspiration.
Custom metrics collector implementation class must be specified in the akka.cluster.metrics.collector.provider configuration property.
Configuration
The Cluster metrics extension can be configured with the following properties:
##############################################
# Akka Cluster Metrics Reference Config File #
##############################################
# This is the reference config file that contains all the default settings.
# Make your edits in your application.conf in order to override these settings.
# Sigar provisioning:
#
# User can provision sigar classes and native library in one of the following ways:
#
# 1) Use https://github.com/kamon-io/sigar-loader Kamon sigar-loader as a project dependency for the user project.
# Metrics extension will extract and load sigar library on demand with help of Kamon sigar provisioner.
#
# 2) Use https://github.com/kamon-io/sigar-loader Kamon sigar-loader as java agent: `java -javaagent:/path/to/sigar-loader.jar`
# Kamon sigar loader agent will extract and load sigar library during JVM start.
#
# 3) Place `sigar.jar` on the `classpath` and sigar native library for the o/s on the `java.library.path`
# User is required to manage both project dependency and library deployment manually.
# Cluster metrics extension.
# Provides periodic statistics collection and publication throughout the cluster.
akka.cluster.metrics {
# Full path of dispatcher configuration key.
# Use "" for default key `akka.actor.default-dispatcher`.
dispatcher = ""
# How long should any actor wait before starting the periodic tasks.
periodic-tasks-initial-delay = 1s
# Sigar native library extract location.
# Use per-application-instance scoped location, such as program working directory.
native-library-extract-folder = ${user.dir}"/native"
# Metrics supervisor actor.
supervisor {
# Actor name. Example name space: /system/cluster-metrics
name = "cluster-metrics"
# Supervision strategy.
strategy {
#
# FQCN of class providing `akka.actor.SupervisorStrategy`.
# Must have a constructor with signature `<init>(com.typesafe.config.Config)`.
# Default metrics strategy provider is a configurable extension of `OneForOneStrategy`.
provider = "akka.cluster.metrics.ClusterMetricsStrategy"
#
# Configuration of the default strategy provider.
# Replace with custom settings when overriding the provider.
configuration = {
# Log restart attempts.
loggingEnabled = true
# Child actor restart-on-failure window.
withinTimeRange = 3s
# Maximum number of restart attempts before child actor is stopped.
maxNrOfRetries = 3
}
}
}
# Metrics collector actor.
collector {
# Enable or disable metrics collector for load-balancing nodes.
# Metrics collection can also be controlled at runtime by sending control messages
# to /system/cluster-metrics actor: `akka.cluster.metrics.{CollectionStartMessage,CollectionStopMessage}`
enabled = on
# FQCN of the metrics collector implementation.
# It must implement `akka.cluster.metrics.MetricsCollector` and
# have public constructor with akka.actor.ActorSystem parameter.
# Will try to load in the following order of priority:
# 1) configured custom collector 2) internal `SigarMetricsCollector` 3) internal `JmxMetricsCollector`
provider = ""
# Try all 3 available collector providers, or else fail on the configured custom collector provider.
fallback = true
# How often metrics are sampled on a node.
# Shorter interval will collect the metrics more often.
# Also controls frequency of the metrics publication to the node system event bus.
sample-interval = 3s
# How often a node publishes metrics information to the other nodes in the cluster.
# Shorter interval will publish the metrics gossip more often.
gossip-interval = 3s
# How quickly the exponential weighting of past data is decayed compared to
# new data. Set lower to increase the bias toward newer values.
# The relevance of each data sample is halved for every passing half-life
# duration, i.e. after 4 times the half-life, a data sample’s relevance is
# reduced to 6% of its original relevance. The initial relevance of a data
# sample is given by 1 – 0.5 ^ (collect-interval / half-life).
# See http://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average
moving-average-half-life = 12s
}
}
# Cluster metrics extension serializers and routers.
akka.actor {
# Protobuf serializer for remote cluster metrics messages.
serializers {
akka-cluster-metrics = "akka.cluster.metrics.protobuf.MessageSerializer"
}
# Interface binding for remote cluster metrics messages.
serialization-bindings {
"akka.cluster.metrics.ClusterMetricsMessage" = akka-cluster-metrics
}
# Globally unique metrics extension serializer identifier.
serialization-identifiers {
"akka.cluster.metrics.protobuf.MessageSerializer" = 10
}
# Provide routing of messages based on cluster metrics.
router.type-mapping {
cluster-metrics-adaptive-pool = "akka.cluster.metrics.AdaptiveLoadBalancingPool"
cluster-metrics-adaptive-group = "akka.cluster.metrics.AdaptiveLoadBalancingGroup"
}
}
Contents


Hi, my name is Sam.
I'm a Front-End developer.
I write fluid and performant Javascript / React applications.
Check out my skills and projects below!
I write single page web applications in React using the Context API for state management in smaller applications and Redux for larger applications. It's easy, it's fun and I love it.
Whenever I write a single page application that gets too big for React's Context API, I normally use Redux for state management.
I implement back-end systems using Firebase to deliver features such as User Authentication, Cloud Storage and NoSQL Database querying. I am hoping that in the future I will learn back-end development (most likely, Node).
Bootstrap is my go-to CSS framework, I'm very well-versed with it and when I'm making something serious, I normally use it.
Materialize is fun, I'm comfortable with it and although I haven't used it yet for any of my main projects, I am hoping to in the near future.
Sass is a blessing. I have used Less before but primarily I write in Sass simply because I discovered it first. I use both Koala and the Live Sass Compiler in VS Code for compilation.
I use Gulp over Grunt as my preferred task manager.
I version control all my projects from the command line and everything is available for viewing on my github page (www.github.com/samjameshambridge)
(Technologies: Bootstrap, CSS/Sass, Vanilla Javascript, jQuery)


'function' keyword is non-standard. Delete it.
#!/bin/sh
function hello() {
echo "Hello World"
}
#!/bin/sh
hello() {
echo "Hello World"
}
function
is a non-standard keyword that can be used to declare functions in Bash and Ksh.
In POSIX sh
and dash
, a function is instead declared without the function
keyword as in the correct example.
None.


Need to find a breakfast place? Or an early morning hike? We've got you covered with plenty of sunrise activities!
Arizona is home to so many different kinds of resturaunts around the Phoenix area. We also have plenty of activities to do including ice skating, rock climbing, or just finding a nice park to relax at.
Nighttime means unique bars and clubs around the valley. We've tracked down the best places to check out after the sun goes down.


{% import "_macros.html" as macros%} {% extends "base.html" %} {% block page_content %}
Create account to see it in action.
Already have an account?
Inspinia we app framework base on Bootstrap 3 © 2014


Stark Logo was born this week!
Let's all make a round of applause for our java consultant, Maxime, who had the good idea to mix Angular's pretty logo with the name of our project!
The news page is there, get happy!
Don't mind me, I'm just an example with a bigger image, just so you know how I look like.


Concept Cars
Many of the creative and innovative concept cars premiered at the recent motor show left the audience in eager anticipation of their production.
Many of the creative and innovative concept cars premiered at the recent motor show left the audience in eager anticipation of their production.


Fitness vs Performance Analysis (AGS paper I)
Last updated: 09 December, 2020
Intro
Main question: is there a correlation between models fitness to the steady state and their performance?
All boolean model simulations were done using the druglogics-synergy
Java module, version 1.2.0
: git checkout v1.2.0
.
Input
Load libraries:
library(xfun)
library(emba)
library(usefun)
library(dplyr)
library(tibble)
library(stringr)
library(ggpubr)
library(ggplot2)
library(Ckmeans.1d.dp)
library(PRROC)
Load the AGS steady state:
# get the AGS steady state
steady_state_file = "data/steadystate"
lines = readLines(steady_state_file)
ss_data = unlist(strsplit(x = lines[8], split = "\t"))
ss_mat = stringr::str_split(string = ss_data, pattern = ":", simplify = TRUE)
colnames(ss_mat) = c("nodes", "states")
ss_tbl = ss_mat %>% as_tibble() %>% mutate_at(vars(states), as.integer)
steady_state = ss_tbl %>% pull(states)
names(steady_state) = ss_tbl %>% pull(nodes)
usefun::pretty_print_vector_names_and_values(vec = steady_state)
CASP3: 0, CASP8: 0, CASP9: 0, FOXO_f: 0, RSK_f: 1, CCND1: 1, MYC: 1, RAC_f: 1, JNK_f: 0, MAPK14: 0, AKT_f: 1, MMP_f: 1, PTEN: 0, ERK_f: 1, KRAS: 1, PIK3CA: 1, S6K_f: 1, GSK3_f: 0, TP53: 0, BAX: 0, BCL2: 1, CTNNB1: 1, TCF7_f: 1, NFKB_f: 1
Load observed synergies (the Gold Standard for the AGS cell line, as it was found by complete agreement of all curators here):
# get observed synergies for Cascade 2.0
observed_synergies_file = "data/observed_synergies_cascade_2.0"
observed_synergies = emba::get_observed_synergies(observed_synergies_file)
pretty_print_vector_values(vec = observed_synergies, vector.values.str = "observed synergies")
6 observed synergies: AK-BI, 5Z-PI, PD-PI, BI-D1, PI-D1, PI-G2
Flip training data analysis
The idea here is to generate many training data files from the steady state, where some of the nodes will have their states flipped to the opposite state (\(0\) to \(1\) and vice versa). That way, we can train models to different steady states, ranging from ones that differ to just a few nodes states up to a steady state that is the complete reversed version of the one used in the simulations.
Using the gen_training_data.R script, we first chose a few number of flips (\(11\) flips) ranging from \(1\) to \(24\) (all nodes) in the steady state. Then, for each such flipping-nodes value, we generated \(20\) new steady states with a randomly chosen set of nodes whose value is going to flip. Thus, in total, \(205\) training data files were produced (\(205 = 9 \times 20 + 24 + 1\), where from the \(11\) number of flips, the one flip happens for every node (\(24\) different steady states) and flipping all the nodes generates \(1\) completely reversed steady state).
Running the script run_druglogics_synergy_training.sh from the druglogics-synergy
repository root (version 1.2.0
: git checkout v1.2.0
), we get the simulation results for each of these training data files.
We mainly going to use the MCC performance score for each model in the subsequent analyses.
Note that in the CASCADE 2.0 configuration file (config
) we changed the number of simulations to (\(15\)) for each training data file, the attractor tool used was biolqm_stable_states
and the synergy_method: hsa
.
For the generated training data files (training-data-files.tar.gz
) and the results from the simulations (fit-vs-performance-results.tar.gz
) see .
To load the data, download the results (fit-vs-performance-results.tar.gz
) and extract it to a directory of your choice with the following commands: mkdir fit-vs-performance-results
and tar -C fit-vs-performance-results/ -xzvf fit-vs-performance-results.tar.gz
.
Then use the next R
code to create the res
data.frame (I have already saved the result):
# change appropriately
data_dir = "/home/john/tmp/ags_paper_res/fit-vs-performance-results"
res_dirs = list.files(data_dir, full.names = TRUE)
data_list = list()
index = 1
for (res_dir in res_dirs) {
model_predictions_file = list.files(path = res_dir, pattern = "model_predictions.tab", full.names = TRUE)
models_dir = paste0(res_dir, "/models")
model_predictions = emba::get_model_predictions(model_predictions_file)
models_link_operators = emba::get_link_operators_from_models_dir(models_dir)
# you get messages for models with {#stable states} != 1
models_stable_states = emba::get_stable_state_from_models_dir(models_dir)
# same order => same model per row (also pruned if != 1 stable states)
model_predictions = model_predictions[rownames(models_stable_states),]
models_link_operators = models_link_operators[rownames(models_stable_states),]
# calculate models MCC scores
models_mcc = calculate_models_mcc(
observed.model.predictions = model_predictions %>% select(all_of(observed_synergies)),
unobserved.model.predictions = model_predictions %>% select(-all_of(observed_synergies)),
number.of.drug.comb.tested = ncol(model_predictions))
# calculate models fitness to AGS steady state
models_fit = apply(models_stable_states[, names(steady_state)], 1,
usefun::get_percentage_of_matches, steady_state)
# check data consistency
stopifnot(all(names(models_mcc) == rownames(models_link_operators)))
stopifnot(all(names(models_mcc) == names(models_fit)))
# get link operator mutation code per model
# same code => exactly same link operator mutations => exactly the same model
link_mutation_binary_code = unname(apply(models_link_operators, 1, paste, collapse = ""))
# bind all to one (OneForAll)
df = bind_cols(model_code = link_mutation_binary_code, mcc = models_mcc, fitness = models_fit)
data_list[[index]] = df
index = index + 1
}
res = bind_rows(data_list)
# prune to unique models
res = res %>% distinct(model_code, .keep_all = TRUE)
saveRDS(object = res, file = "data/res_flip.rds")
We split the models from the simulations to \(10\) fitness classes, their centers being:
res = readRDS(file = "data/res_flip.rds")
### Fitness classes vs MCC
fit_classes = res %>% pull(fitness) %>% unique() %>% length()
fit_result = Ckmeans.1d.dp(x = res$fitness, k = round(fit_classes/2))
fit_result$centers
## [1] 0.2192911 0.3188087 0.3915344 0.4777328 0.5605536 0.6489758 0.7301299
## [8] 0.8141840 0.8982254 0.9784706
fitness_class_id = fit_result$cluster
res = res %>% add_column(fitness_class_id = fitness_class_id)
fit_stats = desc_statby(res, measure.var = "mcc", grps = c("fitness_class_id"), ci = 0.95)
ggbarplot(fit_stats, title = "Fitness Class vs Performance (MCC)",
x = "fitness_class_id", y = "mean", xlab = "Fitness Class",
ylab = "Mean MCC", ylim = c(min(fit_stats$mean - 2*fit_stats$se), max(fit_stats$mean) + 0.1),
label = fit_stats$length, lab.vjust = -5, fill = "fitness_class_id") +
scale_x_discrete(labels = round(fit_stats$fitness, digits = 2)) +
scale_fill_gradient(low = "lightblue", high = "red", name = "Fitness Class",
guide = "legend", breaks = c(1,4,7,10)) +
geom_errorbar(aes(ymin=mean-2*se, ymax=mean+2*se), width = 0.2, position = position_dodge(0.9))
# useful
#res %>% group_by(fitness_class_id) %>% summarise(avg = mean(mcc), count = n()) %>% print(n = 21)
No correlation whatsoever between models fitness and performance (as measured by the MCC score)
Note though that the results are very dependent on the dataset and the observed synergies used. For example, using the following observed synergies vector (we also show the previous one for comparison purposes - 3 out of 6 synergies remain the same):
# get observed synergies for Cascade 2.0 (new)
observed_synergies_file = "data/observed_synergies"
observed_synergies_2 = emba::get_observed_synergies(observed_synergies_file)
pretty_print_vector_values(vec = observed_synergies, vector.values.str = "GS observed synergies")
6 GS observed synergies: AK-BI, 5Z-PI, PD-PI, BI-D1, PI-D1, PI-G2
pretty_print_vector_values(vec = observed_synergies_2, vector.values.str = "New observed synergies")
6 New observed synergies: AK-BI, 5Z-D1, AK-D1, BI-D1, PI-D1, PK-ST
New scores (already saved):
# change appropriately
data_dir = "/home/john/tmp/ags_paper_res/fit-vs-performance-results"
res_dirs = list.files(data_dir, full.names = TRUE)
data_list = list()
index = 1
for (res_dir in res_dirs) {
model_predictions_file = list.files(path = res_dir, pattern = "model_predictions.tab", full.names = TRUE)
models_dir = paste0(res_dir, "/models")
model_predictions = emba::get_model_predictions(model_predictions_file)
models_link_operators = emba::get_link_operators_from_models_dir(models_dir)
# you get messages for models with {#stable states} != 1
models_stable_states = emba::get_stable_state_from_models_dir(models_dir)
# same order => same model per row (also pruned if != 1 stable states)
model_predictions = model_predictions[rownames(models_stable_states),]
models_link_operators = models_link_operators[rownames(models_stable_states),]
# calculate models MCC scores
models_mcc = calculate_models_mcc(
observed.model.predictions = model_predictions %>% select(all_of(observed_synergies_2)),
unobserved.model.predictions = model_predictions %>% select(-all_of(observed_synergies_2)),
number.of.drug.comb.tested = ncol(model_predictions))
# calculate models fitness to AGS steady state
models_fit = apply(models_stable_states[, names(steady_state)], 1,
usefun::get_percentage_of_matches, steady_state)
# check data consistency
stopifnot(all(names(models_mcc) == rownames(models_link_operators)))
stopifnot(all(names(models_mcc) == names(models_fit)))
# get link operator mutation code per model
# same code => exactly same link operator mutations => exactly the same model
link_mutation_binary_code = unname(apply(models_link_operators, 1, paste, collapse = ""))
# bind all to one (OneForAll)
df = bind_cols(model_code = link_mutation_binary_code, mcc = models_mcc, fitness = models_fit)
data_list[[index]] = df
index = index + 1
}
res = bind_rows(data_list)
# prune to unique models
res = res %>% distinct(model_code, .keep_all = TRUE)
saveRDS(object = res, file = "data/res_flip_2.rds")
New figures:
res = readRDS(file = "data/res_flip_2.rds")
### Fitness classes vs MCC
fit_classes = res %>% pull(fitness) %>% unique() %>% length()
fit_result = Ckmeans.1d.dp(x = res$fitness, k = round(fit_classes/2))
fitness_class_id = fit_result$cluster
res = res %>% add_column(fitness_class_id = fitness_class_id)
fit_stats = desc_statby(res, measure.var = "mcc", grps = c("fitness_class_id"), ci = 0.95)
ggbarplot(fit_stats, title = "Fitness Class vs Performance (MCC)",
x = "fitness_class_id", y = "mean", xlab = "Fitness Class",
ylab = "Mean MCC", ylim = c(min(fit_stats$mean - 2*fit_stats$se), max(fit_stats$mean) + 0.1),
label = fit_stats$length, lab.vjust = -5, fill = "fitness_class_id") +
scale_x_discrete(labels = round(fit_stats$fitness, digits = 2)) +
scale_fill_gradient(low = "lightblue", high = "red", name = "Fitness Class",
guide = "legend", breaks = c(1,4,7,10)) +
geom_errorbar(aes(ymin=mean-2*se, ymax=mean+2*se), width = 0.2, position = position_dodge(0.9))
Well, now there is correlation (but the observed synergies have been cherry-picked to get this result - so be careful!).
Reverse SS vs SS method
Next, I tried increasing the simulation output data and run only the extreme cases.
So the next results are for a total of \(5000\) simulations (\(15000\) models), fitting to steady state (ss), the complete opposite/flipped steady state (rev) and also the proliferation profile (prolif).
I ran these simulations 3 times, one with link operator mutations only, one with topology mutations only and one with both mutations applied in the models.
The drabme synergy method used was HSA
.
For the link operator models the biolqm_stable_states
attractor_tool option was used and for the other 2 parameterizations the bnet_reduction_reduced
.
And of course, the proper/initial observed synergies vector was used as the gold standard.
First download the dataset and then extract the 5000sim-hsa-*-res.tar.gz
compressed archives in a directory.
Load the data using the following R
code (I have already saved the results):
# simulation results directories (do not add the ending path character '/')
res_dirs = c(
"/home/john/tmp/ags_paper_res/topo-and-link/5000-sim-hsa-res/cascade_2.0_rev_5000sim_bnet_hsa_20200601_054944/",
"/home/john/tmp/ags_paper_res/topo-and-link/5000-sim-hsa-res/cascade_2.0_rand_5000sim_bnet_hsa_20200601_155644/",
"/home/john/tmp/ags_paper_res/topo-and-link/5000-sim-hsa-res/cascade_2.0_ss_5000sim_bnet_hsa_20200531_202847/")
res_dirs = c(
"/home/john/tmp/ags_paper_res/topology-only/5000-sim-hsa-res/cascade_2.0_rev_5000sim_bnet_hsa_20200530_153927/",
"/home/john/tmp/ags_paper_res/topology-only/5000-sim-hsa-res/cascade_2.0_rand_5000sim_bnet_hsa_20200531_014742/",
"/home/john/tmp/ags_paper_res/topology-only/5000-sim-hsa-res/cascade_2.0_ss_5000sim_bnet_hsa_20200531_080616/")
data_list = list()
index = 1
for (res_dir in res_dirs) {
if (str_detect(pattern = "cascade_2.0_ss", string = res_dir)) {
type = "ss"
} else if (str_detect(pattern = "cascade_2.0_rev", string = res_dir)) {
type = "rev"
} else {
type = "prolif"
}
model_predictions_file = list.files(path = res_dir, pattern = "model_predictions.tab", full.names = TRUE)
models_dir = paste0(res_dir, "/models")
model_predictions = emba::get_model_predictions(model_predictions_file)
# you get messages for models with {#stable states} != 1
models_stable_states = emba::get_stable_state_from_models_dir(models_dir)
# same order => same model per row (also pruned if != 1 stable states)
model_predictions = model_predictions[rownames(models_stable_states),]
# calculate models MCC scores
models_mcc = calculate_models_mcc(
observed.model.predictions = model_predictions %>% select(all_of(observed_synergies)),
unobserved.model.predictions = model_predictions %>% select(-all_of(observed_synergies)),
number.of.drug.comb.tested = ncol(model_predictions))
# calculate models fitness to AGS steady state
models_fit = apply(models_stable_states[, names(steady_state)], 1,
usefun::get_percentage_of_matches, steady_state)
# check data consistency
stopifnot(all(names(models_mcc) == names(models_fit)))
# bind all to one (OneForAll)
df = bind_cols(mcc = models_mcc, fitness = models_fit, type = rep(type, length(models_fit)))
data_list[[index]] = df
index = index + 1
}
res = bind_rows(data_list)
# choose one (depends on the `res_dirs`)
#res_link = res
res_topo = res
#res_link_and_topo = res
#saveRDS(res_link, file = "data/res_link.rds")
saveRDS(res_topo, file = "data/res_topo.rds")
#saveRDS(res_link_and_topo, file = "data/res_link_and_topo.rds")
Link operator mutated models
res_link = readRDS(file = "data/res_link.rds")
mean_fit = res_link %>% group_by(type) %>% summarise(mean = mean(fitness))
ggplot() +
geom_density(data = res_link, aes(x=fitness, group=type, fill=type), alpha=0.5, adjust=3) +
geom_vline(data = mean_fit, aes(xintercept = mean, color=type), linetype="dashed") +
xlab("Fitness Score") +
ylab("Density") +
ggtitle("Fitness density profile for different training data schemes") +
ggpubr::theme_pubr()
ggboxplot(data = res_link, x = "type", y = "mcc",
color = "type", palette = "Set1", order = c("rev", "prolif", "ss"),
bxp.errorbar = TRUE, bxp.errorbar.width = 0.2,
title = "Performance (MCC) of different training data schemes",
ylab = "MCC score", xlab = "Training Data Type") +
stat_compare_means(label.x = 2.5)
Topology-mutated models
res_topo = readRDS(file = "data/res_topo.rds")
mean_fit = res_topo %>% group_by(type) %>% summarise(mean = mean(fitness))
ggplot() +
geom_density(data = res_topo, aes(x=fitness, group=type, fill=type), alpha=0.5, adjust=3) +
geom_vline(data = mean_fit, aes(xintercept = mean, color=type), linetype="dashed") +
xlab("Fitness Score") +
ylab("Density") +
ggtitle("Fitness density profile for different training data schemes") +
ggpubr::theme_pubr()
ggboxplot(data = res_topo, x = "type", y = "mcc",
color = "type", palette = "Set1", order = c("rev", "prolif", "ss"),
bxp.errorbar = TRUE, bxp.errorbar.width = 0.2,
title = "Performance (MCC) of different training data schemes",
ylab = "MCC score", xlab = "Training Data Type") +
stat_compare_means(label.x = 2.5)
Both mutations on models
res_link_and_topo = readRDS(file = "data/res_link_and_topo.rds")
mean_fit = res_link_and_topo %>% group_by(type) %>% summarise(mean = mean(fitness))
ggplot() +
geom_density(data = res_link_and_topo, aes(x=fitness, group=type, fill=type), alpha=0.5, adjust=3) +
geom_vline(data = mean_fit, aes(xintercept = mean, color=type), linetype="dashed") +
xlab("Fitness Score") +
ylab("Density") +
ggtitle("Fitness density profile for different training data schemes") +
ggpubr::theme_pubr()
ggboxplot(data = res_link_and_topo, x = "type", y = "mcc",
color = "type", palette = "Set1", order = c("rev", "prolif", "ss"),
bxp.errorbar = TRUE, bxp.errorbar.width = 0.2,
title = "Performance (MCC) of different training data schemes",
ylab = "MCC score", xlab = "Training Data Type") +
stat_compare_means(label.x = 2.5)
ggdensity(data = res_link_and_topo, x = "mcc", color = "type", add = "mean",
fill = "type", palette = "Set1", xlab = "MCC score",
title = "MCC density profile for different training data schemes")
- Note that most of the models trained to the complete reverse steady state have an MCC score exactly equal to \(0\), since the denominator is also zero (\(TP+FP = 0\)). So, in a way the steady state models are better in that regard (i.e. they make predictions, even though most of them have negative MCC scores).
Fitness vs Ensemble performance
Is there any correlation between the calibrated models fitness to the AGS steady state and their ROC/PR AUC performance when they are normalized to a random proliferative model ensemble?
In this section we use the same technique as in the Flip training data analysis section: we had already generated the flipped training data files which we now use again with the script run_druglogics_synergy_training.sh from the druglogics-synergy
repository root (version 1.2.0
), to get the simulation results for each of these training data files.
Differences are that now in the in the CASCADE 2.0 configuration file (config
) we changed the number of simulations to \(20\) for each training data file, the attractor tool used was biolqm_stable_states
and the synergy_method: bliss
.
Also, we used the run_druglogics_synergy.sh
script at the root of the druglogics-synergy
(script config: {2.0
, rand
, 150
, biolqm_stable_states
, bliss
}) repo to get the ensemble results of the random (proliferative) models that we will normalize the calibrated model performance at.
With the code below you can load this data (I have stored it in a tibble
for convenience):
# random proliferative results
random_ew_synergies_file = "data/cascade_2.0_rand_150sim_fixpoints_bliss_ensemblewise_synergies.tab"
random_ew_synergies_150sim = emba::get_synergy_scores(random_ew_synergies_file)
# 1 (positive/observed synergy) or 0 (negative/not observed) for all tested drug combinations
observed = sapply(random_ew_synergies_150sim$perturbation %in% observed_synergies, as.integer)
# get flipped training data results
data_dir = "/home/john/tmp/ags_paper_res/fit-vs-performance-results-bliss"
# define `beta` values for normalization
beta1 = -1
beta2 = -1.6
data_list = list()
index = 1
for (res_dir in list.dirs(data_dir, recursive = FALSE)) {
ew_synergies_file = list.files(path = res_dir, pattern = "ensemblewise_synergies", full.names = TRUE)
ew_ss_scores = emba::get_synergy_scores(ew_synergies_file)
# get the models stable states
models_dir = paste0(res_dir, "/models")
# you get messages for models with {#stable states} != 1
models_stable_states = emba::get_stable_state_from_models_dir(models_dir)
# calculate models fitness to AGS steady state
models_fit = apply(models_stable_states[, names(steady_state)], 1,
usefun::get_percentage_of_matches, steady_state)
# calculate normalized model performance (ROC-AUC)
pred = dplyr::bind_cols(random = random_ew_synergies_150sim %>% rename(random_score = score),
ss = ew_ss_scores %>% select(score) %>% rename(ss_score = score),
as_tibble_col(observed, column_name = "observed"))
pred = pred %>%
mutate(combined_score1 = ss_score + beta1 * random_score) %>%
mutate(combined_score2 = ss_score + beta2 * random_score)
res_roc1 = PRROC::roc.curve(scores.class0 = pred %>% pull(combined_score1) %>% (function(x) {-x}),
weights.class0 = pred %>% pull(observed))
res_pr1 = PRROC::pr.curve(scores.class0 = pred %>% pull(combined_score1) %>% (function(x) {-x}),
weights.class0 = pred %>% pull(observed))
res_roc2 = PRROC::roc.curve(scores.class0 = pred %>% pull(combined_score2) %>% (function(x) {-x}),
weights.class0 = pred %>% pull(observed))
res_pr2 = PRROC::pr.curve(scores.class0 = pred %>% pull(combined_score2) %>% (function(x) {-x}),
weights.class0 = pred %>% pull(observed))
# bind all to one (OneForAll)
df = dplyr::bind_cols(roc_auc1 = res_roc1$auc, pr_auc1 = res_pr1$auc.davis.goadrich,
roc_auc2 = res_roc2$auc, pr_auc2 = res_pr2$auc.davis.goadrich,
avg_fit = mean(models_fit), median_fit = median(models_fit))
data_list[[index]] = df
index = index + 1
}
res = bind_rows(data_list)
saveRDS(res, file = "data/res_fit_aucs.rds")
We have used both a \(\beta=-1\) normalization (\(calibrated-random\)) and a \(\beta=-1.6\) (\(calibrated-1.6\times random\), as candidate values that maximized the ROC and PR AUC based on another analysis we done prior to this one. We quickly check for correlation between the AUC values produced with the different beta parameters:
[1] 0.8069361
[1] 0.8479174
Some scatter plots to get a first idea (every point is one of the \(205\) simulations, normalized to the random proliferative models):
# beta = -1
ggscatter(data = res, x = "avg_fit", y = "roc_auc1", xlab = "Average Fitness",
ylab = "ROC AUC", add = "reg.line", conf.int = TRUE, title = "β = -1",
cor.coef = TRUE, cor.coeff.args = list(method = "kendall")) +
theme(plot.title = element_text(hjust = 0.5))
ggscatter(data = res, x = "avg_fit", y = "pr_auc1", xlab = "Average Fitness",
ylab = "PR AUC", add = "reg.line", conf.int = TRUE, title = "β = -1",
cor.coef = TRUE, cor.coeff.args = list(method = "kendall")) +
theme(plot.title = element_text(hjust = 0.5))
# best beta (-1.6)
ggscatter(data = res, x = "avg_fit", y = "roc_auc2", xlab = "Average Fitness",
ylab = "ROC AUC", add = "reg.line", conf.int = TRUE, title = "β = -1.6",
cor.coef = TRUE, cor.coeff.args = list(method = "kendall")) +
theme(plot.title = element_text(hjust = 0.5))
ggscatter(data = res, x = "avg_fit", y = "pr_auc2", xlab = "Average Fitness",
ylab = "PR AUC", add = "reg.line", conf.int = TRUE, title = "β = -1.6",
cor.coef = TRUE, cor.coeff.args = list(method = "kendall")) +
theme(plot.title = element_text(hjust = 0.5))
# ggscatter(data = res, x = "median_fit", y = "roc_auc")
# ggscatter(data = res, x = "median_fit", y = "pr_auc")
We will split the points to \(4\) fitness groups (higher number group means higher fitness):
fit_classes_num = 4
avg_fit_res = Ckmeans.1d.dp(x = res$avg_fit, k = fit_classes_num)
median_fit_res = Ckmeans.1d.dp(x = res$median_fit, k = fit_classes_num)
res = res %>%
add_column(avg_fit_group = avg_fit_res$cluster) %>%
add_column(median_fit_group = median_fit_res$cluster)
And thus, we can show the following boxplots:
my_comparisons = list(c(1,2), c(1,3), c(1,4))
# beta = -1
ggboxplot(data = res, x = "avg_fit_group", y = "roc_auc1", fill = "avg_fit_group",
title = "β = -1", xlab = "Fitness Group (Average fitness)", ylab = "ROC AUC") +
stat_compare_means(comparisons = my_comparisons, method = "wilcox.test", label = "p.signif") +
theme(plot.title = element_text(hjust = 0.5))
ggboxplot(data = res, x = "avg_fit_group", y = "pr_auc1", fill = "avg_fit_group",
title = "β = -1", xlab = "Fitness Group (Average fitness)", ylab = "PR AUC") +
stat_compare_means(comparisons = my_comparisons, method = "wilcox.test", label = "p.signif") +
theme(plot.title = element_text(hjust = 0.5))
# best beta (-1.6)
ggboxplot(data = res, x = "avg_fit_group", y = "roc_auc2", fill = "avg_fit_group",
title = "β = -1.6", xlab = "Fitness Group (Average fitness)", ylab = "ROC AUC") +
stat_compare_means(comparisons = my_comparisons, method = "wilcox.test", label = "p.signif") +
theme(plot.title = element_text(hjust = 0.5))
ggboxplot(data = res, x = "avg_fit_group", y = "pr_auc2", fill = "avg_fit_group",
title = "β = -1.6", xlab = "Fitness Group (Average fitness)", ylab = "PR AUC") +
stat_compare_means(comparisons = my_comparisons, method = "wilcox.test", label = "p.signif") +
theme(plot.title = element_text(hjust = 0.5))
- There is seems to be some correlation between fitness group and AUC performance of the calibrated models normalized to the random proliferative ones. This manifests in better PR AUC for the higher fitness calibrated models subject to normalization. Note also that PR AUC is a better indicator of performance for our imbalanced dataset than the ROC AUC.
- Comparing the two normalization cases (\(\beta=-1\) and \(\beta=-1.6\)) we observe that the results were in general better for \(\beta=-1.6\) case (as was expected) but almost the same statistical differences and data trends were observed between the different fitness groups in each case.
R session info
R version 3.6.3 (2020-02-29)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.1 LTS
Locale:
LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
LC_PAPER=en_US.UTF-8 LC_NAME=C
LC_ADDRESS=C LC_TELEPHONE=C
LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
Package version:
abind_1.4-5 assertthat_0.2.1 backports_1.1.10
base64enc_0.1.3 BH_<IP_ADDRESS> bookdown_0.21
boot_1.3.25 broom_0.7.2 callr_3.5.1
car_3.0-10 carData_3.0-4 cellranger_1.1.0
Ckmeans.1d.dp_4.3.3 cli_2.1.0 clipr_0.7.1
colorspace_1.4-1 compiler_3.6.3 conquer_1.0.2
corrplot_0.84 cowplot_1.1.0 cpp11_0.2.3
crayon_1.3.4 curl_4.3 data.table_1.13.2
desc_1.2.0 digest_0.6.27 dplyr_1.0.2
ellipsis_0.3.1 emba_0.1.8 evaluate_0.14
fansi_0.4.1 farver_2.0.3 forcats_0.5.0
foreign_0.8-75 gbRd_0.4-11 generics_0.0.2
ggplot2_3.3.2 ggpubr_0.4.0 ggrepel_0.8.2
ggsci_2.9 ggsignif_0.6.0 glue_1.4.2
graphics_3.6.3 grDevices_3.6.3 grid_3.6.3
gridExtra_2.3 gtable_0.3.0 haven_2.3.1
highr_0.8 hms_0.5.3 htmltools_0.5.0
htmlwidgets_1.5.2 igraph_1.2.6 isoband_0.2.2
jsonlite_1.7.1 knitr_1.30 labeling_0.4.2
lattice_0.20.41 lifecycle_0.2.0 lme4_1.1.25
magrittr_1.5 maptools_1.0.2 markdown_1.1
MASS_7.3.53 Matrix_1.2.18 MatrixModels_0.4.1
matrixStats_0.57.0 methods_3.6.3 mgcv_1.8.33
mime_0.9 minqa_1.2.4 munsell_0.5.0
nlme_3.1.149 nloptr_<IP_ADDRESS> nnet_7.3.14
openxlsx_4.2.2 parallel_3.6.3 pbkrtest_<IP_ADDRESS>
pillar_1.4.6 pkgbuild_1.1.0 pkgconfig_2.0.3
pkgload_1.1.0 polynom_1.4.0 praise_1.0.0
prettyunits_1.1.1 processx_3.4.4 progress_1.2.2
PRROC_1.3.1 ps_1.4.0 purrr_0.3.4
quantreg_5.74 R6_2.4.1 rbibutils_1.3
RColorBrewer_1.1.2 Rcpp_1.0.5 RcppArmadillo_<IP_ADDRESS>.0
RcppEigen_<IP_ADDRESS>.0 Rdpack_2.0 readr_1.4.0
readxl_1.3.1 rematch_1.0.1 rio_0.5.16
rje_1.10.16 rlang_0.4.8 rmarkdown_2.5
rprojroot_1.3.2 rstatix_0.6.0 rstudioapi_0.11
scales_1.1.1 sp_1.4.4 SparseM_1.78
splines_3.6.3 statmod_1.4.35 stats_3.6.3
stringi_1.5.3 stringr_1.4.0 testthat_2.3.2
tibble_3.0.4 tidyr_1.1.2 tidyselect_1.1.0
tinytex_0.26 tools_3.6.3 usefun_0.4.8
utf8_1.1.4 utils_3.6.3 vctrs_0.3.4
viridisLite_0.3.0 visNetwork_2.0.9 withr_2.3.0
xfun_0.18 xml2_1.3.2 yaml_2.2.1
zip_2.1.1


Created by Arlo Siemsen | Refresh to reset | Last updated September 9th, 2017.
Game Manuel Part 1 | Game Manuel Part 2 | Feedback and PRs


Help
Input
The URL you want to connect to.
Enter: Submit
Textarea
When you submit this, it will be evaluated and the return value is sent to the target.
Ctrl/Shift + Enter: Submit
JavaScript
Return: The Return value of the script you submit is sent to the socket.
react(pattern, reactor): A function that calls a callback when the pattern matches a message sent by the server. The pattern may be a String, a RegExp or a match function.
reactor: A function that takes an argument data which contains data sent by the server. Inside the function this.send refers to a function that sends messages to the server.
match: A function that takes a message sent by the server as an argument and returns a boolean value.
Shortcuts
- ddp pong - react('ping', function () { this.send(JSON.stringify({msg: 'pong'})) })
- ddp connect - JSON.stringify({msg: 'connect', version: '1', support: ['1']})
- ddp msg - JSON.stringify({msg: ''})
Text
You can also use text. When the first character inside the textbox is a -, it will be interpreted as a string.


This project template is created to the spec of Spojko 100x100mm board with the 40-pin header for communication, IOs and 34-pin header for power supplys. It also includes the components for powering the Arduino from 5V using the 34-pin connector. You will need to configure else to suit your design.
The board outline looks like the following:
See project files for licensing details. This project is open source.(c)2017 tvlada73


My Profile
Events
Organisations
Secret password
Organisation
Event
Submit
Signout
Your organisations
Create one!
Public organisations
×
Create organisation
Name:
Location:
Description:
Make it private
Name must be between 3 - 50 characters long.
Maximum 2000 characters for description.
Maximum 200 characters for location.
Congratulations!! Your organisation ID:


#include "slu_zdefs.h"
Defines | |
| #define | StackFull(x) ( x + Glu->stack.used >= Glu->stack.size ) |
| #define | NotDoubleAlign(addr) ( (long int)addr & 7 ) |
| #define | DoubleAlign(addr) ( ((long int)addr + 7) & ~7L ) |
| #define | TempSpace(m, w) |
| #define | Reduce(alpha) ((alpha + 1) / 2) |
Functions | |
| void * | zexpand (int *prev_len,MemType type,int len_to_copy,int keep_prev,GlobalLU_t *Glu) |
| Expand the existing storage to accommodate more fill-ins. | |
| int | zLUWorkInit (int m, int n, int panel_size, int **iworkptr, doublecomplex **dworkptr, GlobalLU_t *Glu) |
| Allocate known working storage. Returns 0 if success, otherwise returns the number of bytes allocated so far when failure occurred. | |
| void | copy_mem_doublecomplex (int, void *, void *) |
| void | zStackCompress (GlobalLU_t *Glu) |
| Compress the work[] array to remove fragmentation. | |
| void | zSetupSpace (void *work, int lwork, GlobalLU_t *Glu) |
| Setup the memory model to be used for factorization. | |
| void * | zuser_malloc (int, int, GlobalLU_t *) |
| void | zuser_free (int, int, GlobalLU_t *) |
| void | copy_mem_int (int, void *, void *) |
| void | user_bcopy (char *, char *, int) |
| int | zQuerySpace (SuperMatrix *L, SuperMatrix *U, mem_usage_t *mem_usage) |
| int | ilu_zQuerySpace (SuperMatrix *L, SuperMatrix *U, mem_usage_t *mem_usage) |
| int | zLUMemInit (fact_t fact, void *work, int lwork, int m, int n, int annz, int panel_size, double fill_ratio, SuperMatrix *L, SuperMatrix *U, GlobalLU_t *Glu, int **iwork, doublecomplex **dwork) |
| Allocate storage for the data structures common to all factor routines. | |
| void | zSetRWork (int m, int panel_size, doublecomplex *dworkptr, doublecomplex **dense, doublecomplex **tempv) |
| Set up pointers for real working arrays. | |
| void | zLUWorkFree (int *iwork, doublecomplex *dwork, GlobalLU_t *Glu) |
| Free the working storage used by factor routines. | |
| int | zLUMemXpand (int jcol, int next, MemType mem_type, int *maxlen, GlobalLU_t *Glu) |
| Expand the data structures for L and U during the factorization. | |
| void | zallocateA (int n, int nnz, doublecomplex **a, int **asub, int **xa) |
| Allocate storage for original matrix A. | |
| doublecomplex * | doublecomplexMalloc (int n) |
| doublecomplex * | doublecomplexCalloc (int n) |
| int | zmemory_usage (const int nzlmax, const int nzumax, const int nzlumax, const int n) |
-- SuperLU routine (version 4.0) -- Lawrence Berkeley National Laboratory. June 30, 2009
| #define DoubleAlign | ( | addr | ) | ( ((long int)addr + 7) & ~7L ) |
| #define NotDoubleAlign | ( | addr | ) | ( (long int)addr & 7 ) |
| #define Reduce | ( | alpha | ) | ((alpha + 1) / 2) |
| #define StackFull | ( | x | ) | ( x + Glu->stack.used >= Glu->stack.size ) |
| #define TempSpace | ( | m, | |||
| w | ) |
Value:
( (2*w + 4 + NO_MARKER) * m * sizeof(int) + \ (w + 1) * m * sizeof(doublecomplex) )
| void copy_mem_doublecomplex | ( | int | howmany, | |
| void * | old, | |||
| void * | new | |||
| ) |
| void copy_mem_int | ( | int | , | |
| void * | , | |||
| void * | ||||
| ) |
| doublecomplex* doublecomplexCalloc | ( | int | n | ) |
| doublecomplex* doublecomplexMalloc | ( | int | n | ) |
| int ilu_zQuerySpace | ( | SuperMatrix * | L, | |
| SuperMatrix * | U, | |||
| mem_usage_t * | mem_usage | |||
| ) |
mem_usage consists of the following fields:
| void user_bcopy | ( | char * | , | |
| char * | , | |||
| int | ||||
| ) |
| void zallocateA | ( | int | n, | |
| int | nnz, | |||
| doublecomplex ** | a, | |||
| int ** | asub, | |||
| int ** | xa | |||
| ) |
| void * zexpand | ( | int * | prev_len, | |
| MemType | type, | |||
| int | len_to_copy, | |||
| int | keep_prev, | |||
| GlobalLU_t * | Glu | |||
| ) |
| int zLUMemInit | ( | fact_t | fact, | |
| void * | work, | |||
| int | lwork, | |||
| int | m, | |||
| int | n, | |||
| int | annz, | |||
| int | panel_size, | |||
| double | fill_ratio, | |||
| SuperMatrix * | L, | |||
| SuperMatrix * | U, | |||
| GlobalLU_t * | Glu, | |||
| int ** | iwork, | |||
| doublecomplex ** | dwork | |||
| ) |
Memory-related.
For those unpredictable size, estimate as fill_ratio * nnz(A). Return value: If lwork = -1, return the estimated amount of space required, plus n; otherwise, return the amount of space actually allocated when memory allocation failure occurred.
| int zLUMemXpand | ( | int | jcol, | |
| int | next, | |||
| MemType | mem_type, | |||
| int * | maxlen, | |||
| GlobalLU_t * | Glu | |||
| ) |
Return value: 0 - successful return > 0 - number of bytes allocated when run out of space
| void zLUWorkFree | ( | int * | iwork, | |
| doublecomplex * | dwork, | |||
| GlobalLU_t * | Glu | |||
| ) |
| int zLUWorkInit | ( | int | m, | |
| int | n, | |||
| int | panel_size, | |||
| int ** | iworkptr, | |||
| doublecomplex ** | dworkptr, | |||
| GlobalLU_t * | Glu | |||
| ) |
| int zmemory_usage | ( | const int | nzlmax, | |
| const int | nzumax, | |||
| const int | nzlumax, | |||
| const int | n | |||
| ) |
| int zQuerySpace | ( | SuperMatrix * | L, | |
| SuperMatrix * | U, | |||
| mem_usage_t * | mem_usage | |||
| ) |
mem_usage consists of the following fields:
| void zSetRWork | ( | int | m, | |
| int | panel_size, | |||
| doublecomplex * | dworkptr, | |||
| doublecomplex ** | dense, | |||
| doublecomplex ** | tempv | |||
| ) |
| void zSetupSpace | ( | void * | work, | |
| int | lwork, | |||
| GlobalLU_t * | Glu | |||
| ) |
lwork = 0: use system malloc; lwork > 0: use user-supplied work[] space.
| void zStackCompress | ( | GlobalLU_t * | Glu | ) |
| void zuser_free | ( | int | bytes, | |
| int | which_end, | |||
| GlobalLU_t * | Glu | |||
| ) |
| void * zuser_malloc | ( | int | bytes, | |
| int | which_end, | |||
| GlobalLU_t * | Glu | |||
| ) |


With the Eldrazi loose on Zendikar, Gideon Jura and the future Gatewatch fight for the survival of the plane aided by the Planeswalker Kiora. Learn how the Gatewatch was founded during the massive battle at the arc’s conclusion.


GLib - coverage report
Current view:
TopLevel
Hit
Total
Coverage
Test:
Title
Lines:
123
234
75 %
Time:
19 Sep 2019, 14:42:43 (+0100)
Functions:
123
234
74 %
Source
Lines
Functions
Mininum
Directory
65 %
123 / 234
65 %
123 / 234
Generated by
GLib


{% with DEFAULT_VIEW_OBJECTS.quests as quests %} {% if quests %}
There are no quests available at this time. Please check back later!


Pres the button below to execute the following GET request
Tells the CloudBank server to echo the RAIDA to see if it has connectivity.
Sample requesthttps://bank.cloudcoin.global/service/echo.aspxSample response if the RAIDA is ready:
{ "bank_server":"Bank.CloudCoin.Global", "status":"ready", "version":"2.0", "message":"The RAIDA is ready for counterfeit detection.", "time":"2018-06-23T05:18:34.3025868Z", "readyCount":25, "notReadyCount":0 }Sample response if the RAIDA is not ready. Meaning not enough RAIDA servers can be contacted to import new coins.
{ "bank_server":"Bank.CloudCoin.Global", "status":"fail", "version":"2.0", "message":"Not enough RAIDA servers can be contacted to import new coins.", "time":"2018-06-23T05:18:34.3025868Z", "readyCount":2, "notReadyCount":23 }


This page is the digital home of the Chef's many GAME-TOWN Games and TECH CHEX Applications used in class as Academic Objective Accomplishers!
Placeholder: Game Under Construction
To play this game, please, download the latest Flash player!
Chef Floyardee's Rocks Twitter Page Feed


Instructions: There are sixteen columns in the grid below. Each column represents a quarter note. Each row represents a note. When you click on a square in the grid, the note will play when the sequencer reaches that beat.
But, here's the fun part: you're not playing alone. When other users connect, you'll see their sequences down below. Your sequencer will play all of the notes sequenced by all of the users connected. If no one else is connected, you can always open a second window and play around (although you'll probably want to mute your other window).


Lists
General
Lists provide a way of visually grouping related information. Items within a list may also be paired with other
elements, such as icons and avatars, to differentiate similar information or show the current state of a
list item.
Purpose
To visually group related information together as well as describe the state of its elements.
Examples
Default
- Jonathan Smithsonian
- Camelot Rinkus
- Christian Pledger
- Becky Babbitt
w/ .ias-icon
-
Jonathan Smithsonian
-
Camelot Rinkus
-
Christian Pledger
-
Becky Babbitt
w/ .ias-avatar
-
Search
-
OneDrive
-
Geeko
-
Version One
w/ secondary .ias-icon
-
Jonathan Smithsonian
-
Camelot Rinkus
-
Christian Pledger
-
Becky Babbitt
.ias-offset
-
Jonathan Smithsonian
-
Camelot Rinkus
-
Christian Pledger
-
Becky Babbitt
w/ .ias-list-header
-
Jonathan Smithsonian
-
Camelot Rinkus
-
Christian Pledger
-
Becky Babbitt
Appearance
List Specifics
Common Patterns
- Use lists to group related information together in a visually meaningful way.
- Icons and avatars can help differentiate list items from each other.
- Lists with icons and avatars are lists, not tables. Icons and avatars are nested within <li> elements.
- Use .ias-offset to create a uniform alignment for items without added elements in lists that do.
Nesting
Nesting Lists in Other Components
Lists are nested in many different elements. Nested lists can primarily be found in menus, tables, and panels.
However this is not the limit of their scope, as lists can be nested into most elements that make use of text.
Nestable Components
Nesting icons within lists is often done to show the state of the list item associated with the icon.
- Avatar images (.ias-avatar)
- Icons (.ias-icon)
- Icon Buttons (.ias-button .ias-icon-button)


{% for quality_answer in quality_question.get_answers %}
{% include "planning/partial_quality_assessment_answer2.html" with quality_answer=quality_answer quality_question=quality_question %}
{% endfor %}
{% include "planning/partial_quality_assessment_answer_form2.html" with quality_question=quality_question %}


Preparation time
less than 30 mins
Cooking time
10 to 30 mins
Serves
Serves 4
Dietary
Serve up juicy slices of crisp halloumi with a homemade tartare sauce.
Marinate the halloumi in the buttermilk for at least 20 minutes.
To make the batter, sift the flour into a large bowl and add the egg yolk. Whisk in the lager gradually and add 125ml/4½oz ice-cold water until well combined.
Whisk the egg white until stiff peaks form in a separate bowl. Fold the egg whitesinto the batter and chill in the fridge until required.
Fill a deep-fat fryer or a large, deep, heavy-bottomed pan two-thirds full with vegetable oil. Heat the oil to 180C/350F (use a probe thermometer to check the temperature if you're not using a deep-fat fryer). (CAUTION: Hot oil can be dangerous. Don't leave unattended)
Shake any excess buttermilk off the halloumi, then dip into the flour and coat in the batter. Fry the halloumi 5 minutes, or until crisp and golden-brown. Remove with a slotted spoon and drain on a baking sheet lined with kitchen paper. Season to taste with salt and freshly ground black pepper.
For the röstis, boil the potatoes in for 7-8 minutes, then drain. Once cool enough to handle, peel and grate coarsely, and season with salt and freshly ground black pepper.
Form flat, rounded shapes of the potato mixture and chill in the fridge for 20 mnutes.
Heat the oil in a frying pan and fry the rostis on a medium heat for 4-5 minutes on each side, or until crisp and golden-brown. Drain on kitchen paper.
For the tartare sauce, stir the capers, gherkins, dill and lemon in a bowl, add the mayonnaise and mix until well combined.
Serve the halloumi on top of a rosti with a spoonful of tartare sauce and a lemon wedge on the side.


{% extends "article_list.html" %} {% block canonical_rel %}{% endblock %} {% block banner %} {% include 'includes/banner.html' %} {% endblock %} {% block content %}
I am an Assistant Professor at Tilburg University in The Netherlands, affiliated to the Department of Cognitive Science and Artificial Intelligence led by Dr Marie Postma.
Prior to joining Tilburg, I was a Senior Lecturer in NLP and Translation Technology at the University of Wolverhampton, member of and co-head of teaching for the Research Group on Computational Linguistics (RGCL), affiliated to the Research Institute of Information and Language Processing (RIILP) led by Prof Ruslan Mitkov.
Before becoming an academic, I was a research associate in Machine Translation in Prof. Lucia Specia's group at the University of Sheffield. I worked on discriminative training algorithms for Statistical Machine Translation and continuous adaptation from post-editing workflow within the scope of the EU H2020 QT21 project. I then turned to Quality Estimation for Machine Translation, a topic I have been working on since, in close collaboration with Lucia Specia. Together, we successfully secured several research grants (an Amazon Research Award grant, an EAMT grant and Bergamot, an EU H2020 project), leading to many publications and DeepQuest, the first open-source toolkit for quality estimation for neural-based Machine Translation.
I hold a PhD in Computer Science from Le Mans Université (France), which I defended in 2013. As a PhD student, I worked on post-editing, continuous adaptation as well as domain and project adaptations for Machine Translation under the supervision of Holger Schwenk (Facebook) and Jean Senellart (Systran). I pursued my PhD work as a postdoctoral researcher at LIUM, the Computer Science Laboratory of Le Mans Université, by joining the EU FP7 MateCAT project. I also have experience in industry having held a research engineer position at Systran during my PhD.
More details can be found in my CV and list of publications.
{{ article.title }}{% if article.subtitle %}{% endif %}
{% endfor %} {% endif %}


abstract class Model implements ArrayAccess, ArrayableInterface, JsonableInterface
Constants
| CREATED_AT |
The name of the "created at" column.
|
| UPDATED_AT |
The name of the "updated at" column.
|
| DELETED_AT |
The name of the "deleted at" column.
|
Properties
| bool | $incrementing | Indicates if the IDs are auto-incrementing. |
| bool | $timestamps | Indicates if the model should be timestamped. |
| bool | $exists | Indicates if the model exists. |
| static bool | $snakeAttributes | Indicates whether attributes are snake cased on arrays. |
| static array | $manyMethods | The many to many relationship methods. |
Methods
| void |
__construct(array $attributes = array())
Create a new Eloquent model instance. |
|
| static void |
observe(object $class)
Register an observer with the Model. |
|
| Model|Model |
fill(array $attributes)
Fill the model with an array of attributes. |
|
| Model|Model |
newInstance(array $attributes = array(), bool $exists = false)
Create a new instance of the given model. |
|
| Model|Model |
newFromBuilder(array $attributes = array())
Create a new model instance that is existing. |
|
| static Model|Model |
create(array $attributes)
Save a new model and return the instance. |
|
| static Model |
firstOrCreate(array $attributes)
Get the first record matching the attributes or create it. |
|
| static Model |
firstOrNew(array $attributes)
Get the first record matching the attributes or instantiate it. |
|
| static Builder|Model |
query()
Begin querying the model. |
|
| static Builder|Model |
on(string $connection = null)
Begin querying the model on a given connection. |
|
| static Collection|Model[] |
all(array $columns = array('*'))
Get all of the models from the database. |
|
| static Model|Collection|Model |
find(mixed $id, array $columns = array('*'))
Find a model by its primary key. |
|
| static Model|Collection|Model |
findOrFail(mixed $id, array $columns = array('*'))
Find a model by its primary key or throw an exception. |
|
| Model |
load(array|string $relations)
Eager load relations on the model. |
|
| static Builder|Model |
with(array|string $relations)
Being querying a model with eager loading. |
|
| HasOne |
hasOne(string $related, string $foreignKey = null, string $localKey = null)
Define a one-to-one relationship. |
|
| MorphOne |
morphOne($related, $name, $type = null, $id = null, $localKey = null)
Define a polymorphic one-to-one relationship. |
|
| BelongsTo |
belongsTo(string $related, string $foreignKey = null, string $otherKey = null, string $relation = null)
Define an inverse one-to-one or many relationship. |
|
| BelongsTo |
morphTo(string $name = null, string $type = null, string $id = null)
Define an polymorphic, inverse one-to-one or many relationship. |
|
| HasMany |
hasMany(string $related, string $foreignKey = null, string $localKey = null)
Define a one-to-many relationship. |
|
| HasManyThrough |
hasManyThrough(string $related, string $through, string|null $firstKey = null, string|null $secondKey = null)
Define a has-many-through relationship. |
|
| MorphMany |
morphMany(string $related, string $name, string $type = null, string $id = null, string $localKey = null)
Define a polymorphic one-to-many relationship. |
|
| BelongsToMany |
belongsToMany(string $related, string $table = null, string $foreignKey = null, string $otherKey = null, string $relation = null)
Define a many-to-many relationship. |
|
| MorphToMany |
morphToMany(string $related, string $name, string $table = null, string $foreignKey = null, string $otherKey = null, bool $inverse = false)
Define a many-to-many relationship. |
|
| MorphToMany |
morphedByMany($related, $name, $table = null, $foreignKey = null, $otherKey = null)
Define a many-to-many relationship. |
|
| string |
joiningTable(string $related)
Get the joining table name for a many-to-many relation. |
|
| static void |
destroy(array|int $ids)
Destroy the models for the given IDs. |
|
| bool|null |
delete()
Delete the model from the database. |
|
| void |
forceDelete()
Force a hard delete on a soft deleted model. |
|
| bool|null |
restore()
Restore a soft-deleted model instance. |
|
| static void |
saving(Closure|string $callback)
Register a saving model event with the dispatcher. |
|
| static void |
saved(Closure|string $callback)
Register a saved model event with the dispatcher. |
|
| static void |
updating(Closure|string $callback)
Register an updating model event with the dispatcher. |
|
| static void |
updated(Closure|string $callback)
Register an updated model event with the dispatcher. |
|
| static void |
creating(Closure|string $callback)
Register a creating model event with the dispatcher. |
|
| static void |
created(Closure|string $callback)
Register a created model event with the dispatcher. |
|
| static void |
deleting(Closure|string $callback)
Register a deleting model event with the dispatcher. |
|
| static void |
deleted(Closure|string $callback)
Register a deleted model event with the dispatcher. |
|
| static void |
restoring(Closure|string $callback)
Register a restoring model event with the dispatcher. |
|
| static void |
restored(Closure|string $callback)
Register a restored model event with the dispatcher. |
|
| static void |
flushEventListeners()
Remove all of the event listeners for the model. |
|
| array |
getObservableEvents()
Get the observable event names. |
|
| mixed |
update(array $attributes = array())
Update the model in the database. |
|
| bool |
push()
Save the model and all of its relationships. |
|
| bool |
save(array $options = array())
Save the model to the database. |
|
| void |
touchOwners()
Touch the owning relations of the model. |
|
| bool |
touches(string $relation)
Determine if the model touches a given relation. |
|
| bool |
touch()
Update the model's update timestamp. |
|
| void |
setCreatedAt(mixed $value)
Set the value of the "created at" attribute. |
|
| void |
setUpdatedAt(mixed $value)
Set the value of the "updated at" attribute. |
|
| string |
getCreatedAtColumn()
Get the name of the "created at" column. |
|
| string |
getUpdatedAtColumn()
Get the name of the "updated at" column. |
|
| string |
getDeletedAtColumn()
Get the name of the "deleted at" column. |
|
| string |
getQualifiedDeletedAtColumn()
Get the fully qualified "deleted at" column. |
|
| Carbon |
freshTimestamp()
Get a fresh timestamp for the model. |
|
| string |
freshTimestampString()
Get a fresh timestamp for the model. |
|
| Builder|Model |
newQuery(bool $excludeDeleted = true)
Get a new query builder for the model's table. |
|
| Builder|Model |
newQueryWithDeleted()
Get a new query builder that includes soft deletes. |
|
| bool |
trashed()
Determine if the model instance has been soft-deleted. |
|
| static Builder|Model |
withTrashed()
Get a new query builder that includes soft deletes. |
|
| static Builder|Model |
onlyTrashed()
Get a new query builder that only includes soft deletes. |
|
| Collection |
newCollection(array $models = array())
Create a new Eloquent Collection instance. |
|
| Pivot |
newPivot(Model $parent, array $attributes, string $table, bool $exists)
Create a new pivot model instance. |
|
| string |
getTable()
Get the table associated with the model. |
|
| void |
setTable(string $table)
Set the table associated with the model. |
|
| mixed |
getKey()
Get the value of the model's primary key. |
|
| string |
getKeyName()
Get the primary key for the model. |
|
| string |
getQualifiedKeyName()
Get the table qualified key name. |
|
| bool |
usesTimestamps()
Determine if the model uses timestamps. |
|
| bool |
isSoftDeleting()
Determine if the model instance uses soft deletes. |
|
| void |
setSoftDeleting(bool $enabled)
Set the soft deleting property on the model. |
|
| int |
getPerPage()
Get the number of models to return per page. |
|
| void |
setPerPage(int $perPage)
Set the number of models ot return per page. |
|
| string |
getForeignKey()
Get the default foreign key name for the model. |
|
| array |
getHidden()
Get the hidden attributes for the model. |
|
| void |
setHidden(array $hidden)
Set the hidden attributes for the model. |
|
| void |
setVisible(array $visible)
Set the visible attributes for the model. |
|
| void |
setAppends(array $appends)
Set the accessors to append to model arrays. |
|
| array |
getFillable()
Get the fillable attributes for the model. |
|
| Model |
fillable(array $fillable)
Set the fillable attributes for the model. |
|
| Model |
guard(array $guarded)
Set the guarded attributes for the model. |
|
| static void |
unguard()
Disable all mass assignable restrictions. |
|
| static void |
reguard()
Enable the mass assignment restrictions. |
|
| static void |
setUnguardState(bool $state)
Set "unguard" to a given state. |
|
| bool |
isFillable(string $key)
Determine if the given attribute may be mass assigned. |
|
| bool |
isGuarded(string $key)
Determine if the given key is guarded. |
|
| bool |
totallyGuarded()
Determine if the model is totally guarded. |
|
| array |
getTouchedRelations()
Get the relationships that are touched on save. |
|
| void |
setTouchedRelations(array $touches)
Set the relationships that are touched on save. |
|
| bool |
getIncrementing()
Get the value indicating whether the IDs are incrementing. |
|
| void |
setIncrementing(bool $value)
Set whether IDs are incrementing. |
|
| string |
toJson(int $options)
Convert the model instance to JSON. |
|
| array |
toArray()
Convert the model instance to an array. |
|
| array |
attributesToArray()
Convert the model's attributes to an array. |
|
| array |
relationsToArray()
Get the model's relationships in array form. |
|
| mixed |
getAttribute(string $key)
Get an attribute from the model. |
|
| bool |
hasGetMutator(string $key)
Determine if a get mutator exists for an attribute. |
|
| void |
setAttribute(string $key, mixed $value)
Set a given attribute on the model. |
|
| bool |
hasSetMutator(string $key)
Determine if a set mutator exists for an attribute. |
|
| array |
getDates()
Get the attributes that should be converted to dates. |
|
| string |
fromDateTime(DateTime|int $value)
Convert a DateTime to a storable string. |
|
| Model |
replicate()
Clone the model into a new, non-existing instance. |
|
| array |
getAttributes()
Get all of the current attributes on the model. |
|
| void |
setRawAttributes(array $attributes, bool $sync = false)
Set the array of model attributes. |
|
| array |
getOriginal(string $key = null, mixed $default = null)
Get the model's original attribute values. |
|
| Model |
syncOriginal()
Sync the original attributes with the current. |
|
| bool |
isDirty(string $attribute)
Determine if a given attribute is dirty. |
|
| array |
getDirty()
Get the attributes that have been changed since last sync. |
|
| array |
getRelations()
Get all the loaded relations for the instance. |
|
| mixed |
getRelation(string $relation)
Get a specified relationship. |
|
| Model |
setRelation(string $relation, mixed $value)
Set the specific relationship in the model. |
|
| Model |
setRelations(array $relations)
Set the entire relations array on the model. |
|
| Connection |
getConnection()
Get the database connection for the model. |
|
| string |
getConnectionName()
Get the current connection name for the model. |
|
| Model |
setConnection(string $name)
Set the connection associated with the model. |
|
| static Connection |
resolveConnection(string $connection = null)
Resolve a connection instance. |
|
| static ConnectionResolverInterface |
getConnectionResolver()
Get the connection resolver instance. |
|
| static void |
setConnectionResolver(ConnectionResolverInterface $resolver)
Set the connection resolver instance. |
|
| static Dispatcher |
getEventDispatcher()
Get the event dispatcher instance. |
|
| static void |
setEventDispatcher(Dispatcher $dispatcher)
Set the event dispatcher instance. |
|
| static void |
unsetEventDispatcher()
Unset the event dispatcher for models. |
|
| array |
getMutatedAttributes()
Get the mutated attributes for a given instance. |
|
| mixed |
__get(string $key)
Dynamically retrieve attributes on the model. |
|
| void |
__set(string $key, mixed $value)
Dynamically set attributes on the model. |
|
| bool |
offsetExists(mixed $offset)
Determine if the given attribute exists. |
|
| mixed |
offsetGet(mixed $offset)
Get the value for a given offset. |
|
| void |
offsetSet(mixed $offset, mixed $value)
Set the value for a given offset. |
|
| void |
offsetUnset(mixed $offset)
Unset the value for a given offset. |
|
| void |
__isset(string $key)
Determine if an attribute exists on the model. |
|
| void |
__unset(string $key)
Unset an attribute on the model. |
|
| mixed |
__call(string $method, array $parameters)
Handle dynamic method calls into the method. |
|
| static mixed |
__callStatic(string $method, array $parameters)
Handle dynamic static method calls into the method. |
|
| string |
__toString()
Convert the model to its string representation. |
Details
at line 242
public void
__construct(array $attributes = array())
Create a new Eloquent model instance.
at line 291
static public void
observe(object $class)
Register an observer with the Model.
at line 317
public Model|Model
fill(array $attributes)
Fill the model with an array of attributes.
at line 362
public Model|Model
newInstance(array $attributes = array(), bool $exists = false)
Create a new instance of the given model.
at line 380
public Model|Model
newFromBuilder(array $attributes = array())
Create a new model instance that is existing.
at line 395
static public Model|Model
create(array $attributes)
Save a new model and return the instance.
at line 410
static public Model
firstOrCreate(array $attributes)
Get the first record matching the attributes or create it.
at line 426
static public Model
firstOrNew(array $attributes)
Get the first record matching the attributes or instantiate it.
at line 459
static public Builder|Model
query()
Begin querying the model.
at line 470
static public Builder|Model
on(string $connection = null)
Begin querying the model on a given connection.
at line 488
static public Collection|Model[]
all(array $columns = array('*'))
Get all of the models from the database.
at line 502
static public Model|Collection|Model
find(mixed $id, array $columns = array('*'))
Find a model by its primary key.
at line 518
static public Model|Collection|Model
findOrFail(mixed $id, array $columns = array('*'))
Find a model by its primary key or throw an exception.
at line 531
public Model
load(array|string $relations)
Eager load relations on the model.
at line 548
static public Builder|Model
with(array|string $relations)
Being querying a model with eager loading.
at line 565
public HasOne
hasOne(string $related, string $foreignKey = null, string $localKey = null)
Define a one-to-one relationship.
at line 585
public MorphOne
morphOne($related, $name, $type = null, $id = null, $localKey = null)
Define a polymorphic one-to-one relationship.
at line 607
public BelongsTo
belongsTo(string $related, string $foreignKey = null, string $otherKey = null, string $relation = null)
Define an inverse one-to-one or many relationship.
at line 647
public BelongsTo
morphTo(string $name = null, string $type = null, string $id = null)
Define an polymorphic, inverse one-to-one or many relationship.
at line 677
public HasMany
hasMany(string $related, string $foreignKey = null, string $localKey = null)
Define a one-to-many relationship.
at line 697
public HasManyThrough
hasManyThrough(string $related, string $through, string|null $firstKey = null, string|null $secondKey = null)
Define a has-many-through relationship.
at line 718
public MorphMany
morphMany(string $related, string $name, string $type = null, string $id = null, string $localKey = null)
Define a polymorphic one-to-many relationship.
at line 744
public BelongsToMany
belongsToMany(string $related, string $table = null, string $foreignKey = null, string $otherKey = null, string $relation = null)
Define a many-to-many relationship.
at line 792
public MorphToMany
morphToMany(string $related, string $name, string $table = null, string $foreignKey = null, string $otherKey = null, bool $inverse = false)
Define a many-to-many relationship.
at line 829
public MorphToMany
morphedByMany($related, $name, $table = null, $foreignKey = null, $otherKey = null)
Define a many-to-many relationship.
at line 864
public string
joiningTable(string $related)
Get the joining table name for a many-to-many relation.
at line 889
static public void
destroy(array|int $ids)
Destroy the models for the given IDs.
at line 911
public bool|null
delete()
Delete the model from the database.
at line 940
public void
forceDelete()
Force a hard delete on a soft deleted model.
at line 980
public bool|null
restore()
Restore a soft-deleted model instance.
at line 1011
static public void
saving(Closure|string $callback)
Register a saving model event with the dispatcher.
at line 1022
static public void
saved(Closure|string $callback)
Register a saved model event with the dispatcher.
at line 1033
static public void
updating(Closure|string $callback)
Register an updating model event with the dispatcher.
at line 1044
static public void
updated(Closure|string $callback)
Register an updated model event with the dispatcher.
at line 1055
static public void
creating(Closure|string $callback)
Register a creating model event with the dispatcher.
at line 1066
static public void
created(Closure|string $callback)
Register a created model event with the dispatcher.
at line 1077
static public void
deleting(Closure|string $callback)
Register a deleting model event with the dispatcher.
at line 1088
static public void
deleted(Closure|string $callback)
Register a deleted model event with the dispatcher.
at line 1099
static public void
restoring(Closure|string $callback)
Register a restoring model event with the dispatcher.
at line 1110
static public void
restored(Closure|string $callback)
Register a restored model event with the dispatcher.
at line 1120
static public void
flushEventListeners()
Remove all of the event listeners for the model.
at line 1154
public array
getObservableEvents()
Get the observable event names.
at line 1216
public mixed
update(array $attributes = array())
Update the model in the database.
at line 1231
public bool
push()
Save the model and all of its relationships.
at line 1255
public bool
save(array $options = array())
Save the model to the database.
at line 1409
public void
touchOwners()
Touch the owning relations of the model.
at line 1423
public bool
touches(string $relation)
Determine if the model touches a given relation.
at line 1484
public bool
touch()
Update the model's update timestamp.
at line 1517
public void
setCreatedAt(mixed $value)
Set the value of the "created at" attribute.
at line 1528
public void
setUpdatedAt(mixed $value)
Set the value of the "updated at" attribute.
at line 1538
public string
getCreatedAtColumn()
Get the name of the "created at" column.
at line 1548
public string
getUpdatedAtColumn()
Get the name of the "updated at" column.
at line 1558
public string
getDeletedAtColumn()
Get the name of the "deleted at" column.
at line 1568
public string
getQualifiedDeletedAtColumn()
Get the fully qualified "deleted at" column.
at line 1578
public Carbon
freshTimestamp()
Get a fresh timestamp for the model.
at line 1588
public string
freshTimestampString()
Get a fresh timestamp for the model.
at line 1599
public Builder|Model
newQuery(bool $excludeDeleted = true)
Get a new query builder for the model's table.
at line 1621
public Builder|Model
newQueryWithDeleted()
Get a new query builder that includes soft deletes.
at line 1631
public bool
trashed()
Determine if the model instance has been soft-deleted.
at line 1641
static public Builder|Model
withTrashed()
Get a new query builder that includes soft deletes.
at line 1651
static public Builder|Model
onlyTrashed()
Get a new query builder that only includes soft deletes.
at line 1680
public Collection
newCollection(array $models = array())
Create a new Eloquent Collection instance.
at line 1694
public Pivot
newPivot(Model $parent, array $attributes, string $table, bool $exists)
Create a new pivot model instance.
at line 1704
public string
getTable()
Get the table associated with the model.
at line 1717
public void
setTable(string $table)
Set the table associated with the model.
at line 1727
public mixed
getKey()
Get the value of the model's primary key.
at line 1737
public string
getKeyName()
Get the primary key for the model.
at line 1747
public string
getQualifiedKeyName()
Get the table qualified key name.
at line 1757
public bool
usesTimestamps()
Determine if the model uses timestamps.
at line 1767
public bool
isSoftDeleting()
Determine if the model instance uses soft deletes.
at line 1778
public void
setSoftDeleting(bool $enabled)
Set the soft deleting property on the model.
at line 1805
public int
getPerPage()
Get the number of models to return per page.
at line 1816
public void
setPerPage(int $perPage)
Set the number of models ot return per page.
at line 1826
public string
getForeignKey()
Get the default foreign key name for the model.
at line 1836
public array
getHidden()
Get the hidden attributes for the model.
at line 1847
public void
setHidden(array $hidden)
Set the hidden attributes for the model.
at line 1858
public void
setVisible(array $visible)
Set the visible attributes for the model.
at line 1869
public void
setAppends(array $appends)
Set the accessors to append to model arrays.
at line 1879
public array
getFillable()
Get the fillable attributes for the model.
at line 1890
public Model
fillable(array $fillable)
Set the fillable attributes for the model.
at line 1903
public Model
guard(array $guarded)
Set the guarded attributes for the model.
at line 1915
static public void
unguard()
Disable all mass assignable restrictions.
at line 1925
static public void
reguard()
Enable the mass assignment restrictions.
at line 1936
static public void
setUnguardState(bool $state)
Set "unguard" to a given state.
at line 1947
public bool
isFillable(string $key)
Determine if the given attribute may be mass assigned.
at line 1967
public bool
isGuarded(string $key)
Determine if the given key is guarded.
at line 1977
public bool
totallyGuarded()
Determine if the model is totally guarded.
at line 2000
public array
getTouchedRelations()
Get the relationships that are touched on save.
at line 2011
public void
setTouchedRelations(array $touches)
Set the relationships that are touched on save.
at line 2021
public bool
getIncrementing()
Get the value indicating whether the IDs are incrementing.
at line 2032
public void
setIncrementing(bool $value)
Set whether IDs are incrementing.
at line 2043
public string
toJson(int $options)
Convert the model instance to JSON.
at line 2053
public array
toArray()
Convert the model instance to an array.
at line 2065
public array
attributesToArray()
Convert the model's attributes to an array.
at line 2107
public array
relationsToArray()
Get the model's relationships in array form.
at line 2183
public mixed
getAttribute(string $key)
Get an attribute from the model.
at line 2283
public bool
hasGetMutator(string $key)
Determine if a get mutator exists for an attribute.
at line 2307
public void
setAttribute(string $key, mixed $value)
Set a given attribute on the model.
at line 2339
public bool
hasSetMutator(string $key)
Determine if a set mutator exists for an attribute.
at line 2349
public array
getDates()
Get the attributes that should be converted to dates.
at line 2362
public string
fromDateTime(DateTime|int $value)
Convert a DateTime to a storable string.
at line 2453
public Model
replicate()
Clone the model into a new, non-existing instance.
at line 2467
public array
getAttributes()
Get all of the current attributes on the model.
at line 2479
public void
setRawAttributes(array $attributes, bool $sync = false)
Set the array of model attributes.
No checking is done.
at line 2493
public array
getOriginal(string $key = null, mixed $default = null)
Get the model's original attribute values.
at line 2503
public Model
syncOriginal()
Sync the original attributes with the current.
at line 2516
public bool
isDirty(string $attribute)
Determine if a given attribute is dirty.
at line 2526
public array
getDirty()
Get the attributes that have been changed since last sync.
at line 2546
public array
getRelations()
Get all the loaded relations for the instance.
at line 2557
public mixed
getRelation(string $relation)
Get a specified relationship.
at line 2569
public Model
setRelation(string $relation, mixed $value)
Set the specific relationship in the model.
at line 2582
public Model
setRelations(array $relations)
Set the entire relations array on the model.
at line 2594
public Connection
getConnection()
Get the database connection for the model.
at line 2604
public string
getConnectionName()
Get the current connection name for the model.
at line 2615
public Model
setConnection(string $name)
Set the connection associated with the model.
at line 2628
static public Connection
resolveConnection(string $connection = null)
Resolve a connection instance.
at line 2638
static public ConnectionResolverInterface
getConnectionResolver()
Get the connection resolver instance.
at line 2649
static public void
setConnectionResolver(ConnectionResolverInterface $resolver)
Set the connection resolver instance.
at line 2659
static public Dispatcher
getEventDispatcher()
Get the event dispatcher instance.
at line 2670
static public void
setEventDispatcher(Dispatcher $dispatcher)
Set the event dispatcher instance.
at line 2680
static public void
unsetEventDispatcher()
Unset the event dispatcher for models.
at line 2690
public array
getMutatedAttributes()
Get the mutated attributes for a given instance.
at line 2708
public mixed
__get(string $key)
Dynamically retrieve attributes on the model.
at line 2720
public void
__set(string $key, mixed $value)
Dynamically set attributes on the model.
at line 2731
public bool
offsetExists(mixed $offset)
Determine if the given attribute exists.
at line 2742
public mixed
offsetGet(mixed $offset)
Get the value for a given offset.
at line 2754
public void
offsetSet(mixed $offset, mixed $value)
Set the value for a given offset.
at line 2765
public void
offsetUnset(mixed $offset)
Unset the value for a given offset.
at line 2776
public void
__isset(string $key)
Determine if an attribute exists on the model.
at line 2788
public void
__unset(string $key)
Unset an attribute on the model.
at line 2802
public mixed
__call(string $method, array $parameters)
Handle dynamic method calls into the method.
at line 2821
static public mixed
__callStatic(string $method, array $parameters)
Handle dynamic static method calls into the method.
at line 2833
public string
__toString()
Convert the model to its string representation.


{% include head.html %}
{% include header.html %} {% include about.html %} {% include services.html %} {% include comp.html %} {% include donor.html %} {% include portfolio_grid.html %} {% include program.html %} {% include information.html %} {% include accom.html %} {% include map.html %} {% include contact.html %} {% include footer.html %} {% include js.html %}


Your browser doesn't support the features required by impress.js, so you are presented with a simplified version of this presentation.
For the best experience please use the latest Chrome, Safari or Firefox browser.
What have we learnt so far?
Animation: loops
Costumes: Looks
Timers, keeping score: Variables
Asking the user for input: Ask
Conditions: if -> then
Clicking on sprites: Events
Sprites sending messages to other sprites: Broadcast
Sprites touching things (color) Sensing


---
layout: post
title: TBI in Three Years
date: '2006-04-08T20:45:00.000-05:00'
author: Jabell
tags:
- School
modified_time: '2007-03-31T18:35:33.981-05:00'
blogger_id: tag:blogger.com,1999:blog-19739956.post-114454746074762323
blogger_orig_url: http://theabellsix.blogspot.com/2006/04/tbi-in-three-years.html
---
After much prayer and discussion, Wendy and I decided that we would extend our time in TBI to three years. The Bethlehem Institute is set up to be a two year program, with the option of a third year extension. Essentially, the second year of work is split into two halves.
So, next year my classes will include Preaching, Jonathan Edwards, Practical Theology and Galatians. The third year will include Hebrew (eight week summer course), Hebrew Exegesis, Genesis 1-4, and a yet undetermined Greek Bible exegesis course.
This will put off the final completion of an MDiv for another year, but the value of a less hectic schedule and increased time to study and reflect, as well as more time to be with Wendy and kids is too much to pass up.


WELCOME TO LITTLE SLICE O'HEAVEN PIZZA DELIVERY
First, pick a base size for your pizza.
8", $7.99
12", $11.99
15", $13.99
18", $18.99
Now, add your sauce/toppings:
Red Sauce, FREE
BBQ Sauce, FREE
White Sauce, FREE
Pepperoni +$1
Ham +$1
Grilled Chicken +$2
Sausage +$1
Seafood +$3
Mushrooms +¢50
Black Olives +¢50
Onions +¢50
Spinach +¢50
Jalapenos +¢50
Artichokes +$1
Banana Peppers, FREE
Regular Cheese, FREE
Mozzarella, +$1
Feta Cheese, +$1.50
Vegan Cheese, +$1.50
How Many?
Update Price
Your current total per pizza is:
$7.99
Your total price is:
$7.99
Place My Order!
Your order is on its way to you! Please allow 30-45 minutes for delivery.


One of the most prominent challenges in delivering and using data-driven solutions for any type of human process is the provision
of data visualization/summarization tools that are intuitive and easy to use for the experts at whom the datasets are targeted.
Summarizing and displaying the evidence that these experts need for making informed decisions, reusing the results in new contexts
and addressing their own challenges is the main task of such data visualization tools. The current method by which physicians look
for information on the web is through peer-reviewed publications. However, with the indexing of over 10000 papers in PubMed every
year, keeping current with the literature and using this knowledge to derive new research questions has become a herculean task.
To facilitate the intuitive exploration of the information available in TCGA datasets and tumor-related publications,
we have devised an interactive visual analytics platform, called the Linked Cancer Genome Atlas Dashboard.
The platform provides different perspectives to visualize the integrated datasets :-
In the future we plan to integrate additional perspectives namely the Genomic Wheel, to informatively isolate genomic segments of interest in cancer research, and a Geographical Viewer.
You could also search any mesh term or a publication, by typing in the Search Bar provided in the interface, which prompts all possible alternatives as you type ahead.
The Genome Browser perspective facilitates the cancer researcher to visualize the genomic datasets (DNA Methylation and Exon Expression) of the Linked Cancer Genome Atlas patients against the human genome (divided by the chromosomes). The user could select the chromosome for which he/she wishes to visualize the genomic datasets and the ideogrammatic representation of the selected chromosome is displayed in Track A. Ideograms are a schematic representation to depict staining patterns on a tightly-coiled chromosome. These Chromosome Bands (Ideograms) were downloaded from the Mapping and Sequencing Tracks Table in the Human Genome Assembly (GRCh37/hg19, Feb 2009), available at the UCSC Genome Browser The coordinates and descriptions of the Protein-coding genes contained within this chromosome are retrieved from CellBase. These genes are annotated using the HGNC Nomenclature and the positions are indicated by start/stop attributes, and are visualized in Track B. Hovering above any gene provides additional information on this gene, as shown in Dialog F.
The cancer researcher has the option to select any tumor category and load the DNA methylation and the exon expression datasets of the patients diagnosed with that tumor using Control E. Selection of the patient executes queries against the corresponding TCGA endpoints and retrieves his sequencing results in real-time. These datasets are represented using bar charts shown in Track C and D (red and green) respectively, whose X-coordinates are mapped to the genomic coordinates of the chromosome and the Y-coordinates indicate the normalized beta value or the RKPM value at that chromosomal position. The researcher can select more than one patient for a comparative analysis, and the genomic datasets are stacked vertically. The Genome Browser perspective provides the basic features, for zooming and automatic scrolling across the length of the clicked chromosome.
If you find a bug or wish to provide suggestions regarding the Linked Cancer Genome Atlas Dashboard, please contact either
Maulik R. Kamdar (maulik.kamdar_AT_deri.org),
Muhammad Saleem (saleem_AT_informatik.uni-leipzig.de) or
Aftab Iqbal (aftab.iqbal_AT_deri.org).
The RDF datasets adhere to TCGA’s copyright policy.
For more information on the Linked Cancer Genome Atlas Project, please visit http://tcga.deri.ie
The network explorer features a highly dense, force-directed network graph linking the different tumor topologies analysed in TCGA
to the publication resources where more information about these tumors can be discovered. The graph is reduced on the selection of any publication or tumor node, with associated Mesh Terms being displayed for further selection.
The explorer allows the quick exploration of various publications by clicking on the connected nodes and traversing the graph.
Selecting a publication node presents the metadata of the publication (author, abstract, mesh terms, chemicals cited, etc.) and a link to the original PubMed page.
This perspective is currently under development !! We hope to complete it soon !!