Author: Jinit Sanghvi
Introduction to ARIMA Model
A brief introduction followed by implementation
Taken from freestockcharts.com
ARIMA or Autoregressive Integrated Moving Average is a purely-regressive model and this model is used for forecasting values of a time series. A time series is essentially a sequence of data points or observations taken at different instances. Time Series are very common to find given how time-dependent most of the worldly schemes and variables are. To better understand this, take a look at the Stock Market or weather reports gathered over a timeline and you’ll observe patterns which are highly time-dependent.
In this post, we’ll first cover the theory and then move on to the code
Theory
One of the best ways to be introduced to the model is to understand why we’re using it, especially when other effective regression models like linear regression or multivariate regression exists. For time-series forecasting, why do we prefer the ARIMA model? Most of the time-series data available online focuses on the dependent variable, and how the dependent variable changes with time. For models like linear regression, we need independent variables to map a function from dependent variables to dependent variables for prediction.
However, this is not always possible because:-
- Independent Variables are not always available.
- In quite a few scenarios, too many independent variables exist and we may find it difficult to find enough dependent variables to sufficiently explain the behavior of the time-series.
On the other hand, ARIMA leverages the correlation between the values of the time-series and time, allowing it to better understand the relation between independent variables and time. Since the model focuses more on patterns and behavior of the time-series instead of finding out which factors affect these dependent variables, the model is able to forecast on the basis of these recognized patterns and behavior.
To better understand this model, let’s break it down into 2 parts and then integrate those 2 parts in the end.
AR or Autoregressive Model
The intuition behind this model is that observations at different time-steps are related to the previous value of the variable. For example, on a hot sunny day, you predict that the next day will be hotter because you’ve noticed increasing temperatures. Similarly, the AR model finds the correlation between future time-steps and past time-steps to forecast future values.
By the above equation, we can see how we can reduce this to a regression problem and statistically find the correlation between future values and earlier time-steps.
Moving Average Model
The intuition behind this model in nature is of reinforcement, i.e, a moving average model tries to learn from the previous errors it has committed and tries to tweak itself accordingly. To better understand this, take a look at the equation below:
But, what does signify? Simply put, it is the error or the difference between the actual value and the predicted value.
Since this model tries to learn from its mistakes, it is better able to account for unpredictable changes in value and is able to correct itself to provide more accurate results and predictions.
Now that you’ve understood the Autoregressive Model and the Moving Averages model, it’s time to learn about ARIMA. When the Autoregressive Terms and the Moving Average terms are combined together with differencing to make the time-series stationary(more on this later), we get the ARIMA Model! Since the equation is regressive in nature, we can find the respective weights of the terms in the equation using regression techniques.
So far, we’ve understood the basic intuition behind the ARIMA Model. Let’s dig a bit deeper and understand the parameters of an ARIMA model.
Consider a list below, and assume that every successive element of the list is a successive time-step or observation.
Now, when we difference the list, we subtract the nth value of the series with the (n-1)th value of the series. For a better understanding:
After First Differencing:
After Second Differencing:
The reason why we difference the time-series is to make the time-series stationary, i.e, the mean and the variance of the time-series remains constant/stable over time which allows us to reduce components like trend and seasonality(illustrated later). This is important because ARIMA expects the time-series to be stationary. Thus, we keep differencing the time-series till it becomes stationary.
Now that we have understood all the underlying concepts that we’re going to utilize, let’s learn how to find these parameters and dive right into the code!
To begin with, let’s start with some basic imports.
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import statsmodels.api as sm
plt.rcParams['axes.labelsize'] = 14
plt.rcParams['xtick.labelsize'] = 12
plt.rcParams['ytick.labelsize'] = 12
plt.rcParams['text.color'] = 'k'
from statsmodels.tsa.arima_model import ARIMA
from sklearn.metrics import mean_squared_error
%matplotlib inline
For this post, I’m going to use a time-series from the Huge Stock Market Dataset. This is just a sample time-series used to further ground the concepts you read about. At the end of this post, you’ll be able to apply these concepts to any other time-series you want to.
aus1 = pd.read_csv("a.us.txt",sep=',', index_col=0, parse_dates=True, squeeze=True)
aus1.head()
| Open | High | Low | Close | Volume | OpenInt | |
|---|---|---|---|---|---|---|
| Date | ||||||
| 1999-11-18 | 30.713 | 33.754 | 27.002 | 29.702 | 66277506 | 0 |
| 1999-11-19 | 28.986 | 29.027 | 26.872 | 27.257 | 16142920 | 0 |
| 1999-11-22 | 27.886 | 29.702 | 27.044 | 29.702 | 6970266 | 0 |
| 1999-11-23 | 28.688 | 29.446 | 27.002 | 27.002 | 6332082 | 0 |
| 1999-11-24 | 27.083 | 28.309 | 27.002 | 27.717 | 5132147 | 0 |
aus1.describe()
| Open | High | Low | Close | Volume | OpenInt | |
|---|---|---|---|---|---|---|
| count | 4521.000000 | 4521.000000 | 4521.000000 | 4521.000000 | 4.521000e+03 | 4521.0 |
| mean | 27.856296 | 28.270442 | 27.452486 | 27.871357 | 3.993503e+06 | 0.0 |
| std | 12.940880 | 13.176000 | 12.711735 | 12.944389 | 2.665730e+06 | 0.0 |
| min | 7.223100 | 7.513900 | 7.087800 | 7.323800 | 0.000000e+00 | 0.0 |
| 25% | 19.117000 | 19.435000 | 18.780000 | 19.089000 | 2.407862e+06 | 0.0 |
| 50% | 24.456000 | 24.809000 | 24.159000 | 24.490000 | 3.460621e+06 | 0.0 |
| 75% | 36.502000 | 37.046000 | 35.877000 | 36.521000 | 4.849809e+06 | 0.0 |
| max | 105.300000 | 109.370000 | 97.881000 | 107.320000 | 6.627751e+07 | 0.0 |
aus1.index
DatetimeIndex(['1999-11-18', '1999-11-19', '1999-11-22', '1999-11-23',
'1999-11-24', '1999-11-26', '1999-11-29', '1999-11-30',
'1999-12-01', '1999-12-02',
...
'2017-10-30', '2017-10-31', '2017-11-01', '2017-11-02',
'2017-11-03', '2017-11-06', '2017-11-07', '2017-11-08',
'2017-11-09', '2017-11-10'],
dtype='datetime64[ns]', name='Date', length=4521, freq=None)
Before we use this time-series, we first need to resample it into a time-series wherein each observation differs by a month.
y1 = aus1['Open'].resample('MS').mean()
y2 = aus1['Close'].resample('MS').mean()
y1.index
DatetimeIndex(['1999-11-01', '1999-12-01', '2000-01-01', '2000-02-01',
'2000-03-01', '2000-04-01', '2000-05-01', '2000-06-01',
'2000-07-01', '2000-08-01',
...
'2017-02-01', '2017-03-01', '2017-04-01', '2017-05-01',
'2017-06-01', '2017-07-01', '2017-08-01', '2017-09-01',
'2017-10-01', '2017-11-01'],
dtype='datetime64[ns]', name='Date', length=217, freq='MS')
So far, so good! Let’s plot the time-series and see what it looks like!
y1.plot(figsize=(15, 6))
plt.show()
Now that we’ve seen what it looks like, let’s try breaking it down into its components. Let’s try extracting the trend, the seasonality and the residual of our time-series.
from pylab import rcParams
rcParams['figure.figsize'] = 18, 8
decomposition = sm.tsa.seasonal_decompose(y1, model='additive')
fig = decomposition.plot()
plt.show()
Our inference from breaking the time-series down into components like seasonality and trend is that the given time-series is not stationary. Since the trend and seasonality of the time-series affect its values at different time-steps, this time-series is not stationary as its mean and variance keeps changing. Thus, we have to difference the time-series at least once to make it stationary.
If you remember, we discussed the three parameters of the ARIMA Model. In order to determine these 3 parameters and finding the best combination of these 3 parameters in order to yield the best results, we’ll use a combination of statistical tools and iteration (trying out different models to check which achieves the best results).
Let’s start by determining . As we mentioned earlier, we’ll keep differencing the time-series until it becomes stationary. Let’s try differencing it once and use the Augmented Dickey Fuller Test to find if it is stationary or not.
from statsmodels.tsa.stattools import adfuller
from numpy import log
y1_d = y1.diff()
y1_d = y1_d.dropna()
result = adfuller(y1_d)
print('ADF Statistic: %f' % result[0])
print('p-value: %f' % result[1])
ADF Statistic: -2.955284
p-value: 0.039287
As we see that the -value obtained is less than 0.05, we can reject the null hypothesis and say that the series is stationary. We can also see that the series has become more stationary from the plot above. Thus, obtaining a -value of less than 0.05 using ADF is a good indicator that our time-series has become stationary.
y1_d.plot(figsize=(15, 6))
plt.show()
In order to determine , we need to first understand what an ACF plot is. Autocorrelation Function plot or ACF plot shows how correlated the variable is with its previous time-steps. For example, while predicting stock prices, the ACF plot tries to show how correlated the stock prices of March are to the stock prices of February, how likely are the stock prices in March to follow the behavior of stock prices in February. To better understand this, let’s plot it.
from statsmodels.graphics.tsaplots import plot_acf,plot_pacf
plot_acf(y1_d,lags=10)
We can see that the auto-correlation is strong for the first 2 lags and then it decays and oscillates in the blue region.
Inferring from this, we can see that the first 1–2 lags show high correlation and values keep decreasing in the blue region.
Thus, we can say that the value of will lie in the range spanning from 1 to 2.
Let’s try determining now. The process of determining is very similar to the process of determining . Instead of using ACF, we’ll now use a PACF, or a Partial Autocorrelation Function. A PACF plot shows how correlated a variable is with itself at a previous time-step, ignoring all linear dependencies it has on time-steps that lie between the time-step against which correlation is to be found and the current time-step. Also called a conditional correlation fucntion, PACF aims to find the correlation between two time-steps independent of all other time-steps in between. Let’s understand this better with a plot.
plot_pacf(y1_d,lags=10)
From the plot we can see that the plot cuts off to zero at the second lag so we can estimate that the value of will be lesser than 2.
Thus, we can say that the value shall lie in the range spanning from 0 to 1.
You’ve finally learnt the necessary building blocks required to create an ARIMA model in order to perform time-series forecasting! Let’s jump right into it!
We divide our time-frame into a training and a testing set so that we can later gauge how well our model is performing. Training data is 70% of the original time-series data and testing data is 30% of the original time-series data.
size = int(len(y1) * 0.7)
train, test = y1[0:size], y1[size:len(y1)]
series = [y1 for y1 in train]
predictions = []
Alright, now let’s start training the model! Let’s try using values of equal to (2,1,1) and see how the model performs!
for y in range(len(test)):
arima_model = ARIMA(series, order=(2,1,1))
model_fit = arima_model.fit(disp=0)
preds = model_fit.forecast()
pred = preds[0]
predictions.append(pred)
actual_val = test[y]
series.append(actual_val)
error = mean_squared_error(test, predictions)
print('Test error is {}'.format(error))
plt.plot(predictions,'r')
plt.plot(np.array(test))
Test error is 3.273019781729989
[<matplotlib.lines.Line2D at 0x1d39598f668>]
We can see that the model has learnt the nature and behavior of the time-series, and is performing pretty well on the test set!
Let’s try out new values of . Let’s try out (1,1,1) this time and see if we obtain better results.
size = int(len(y1) * 0.7)
train, test = y1[0:size], y1[size:len(y1)]
series = [y1 for y1 in train]
predictions = []
for y in range(len(test)):
arima_model = ARIMA(series, order=(1,1,1))
model_fit = arima_model.fit(disp=0)
preds = model_fit.forecast()
pred = preds[0]
predictions.append(pred)
actual_val = test[y]
series.append(actual_val)
error = mean_squared_error(test, predictions)
print('Test error is {}'.format(error))
plt.plot(predictions,'r')
plt.plot(np.array(test))
Test error is 2.355571525013936
[<matplotlib.lines.Line2D at 0x1d3959f32b0>]
Great, we have obtained better results by changing the parameters of the model! By using the statistical methods above and by trying out different values, you can achieve great results on various different time-series.
I hope you’re now acquainted with various concepts of Time-Series Forecasting and the ARIMA Model!
You can get the jupyter notebook corresponding to this blog here


This site requires JavaScript. Here are the instructions how to enable JavaScript in your web browser.


Ability checks, attack rolls, and saving throws are the three main kinds of d20 rolls, forming the core of the rules of the game. All three follow these simple steps. 1.  2. Apply circumstantial bonuses and penalties. 3. Compare the total to a target number.


Introducing Rob Dickie: The Oxford United centre-back who could be the next Harry Maguire
ONE TO WATCH: Dickie has the chance to impress when Oxford face Man City in the Carabao Cup quarter-finals in the coming weeks
by John Cross, https://www.facebook.com/johncrossmirror/Former England under-19s international Rob Dickie has been a big part of Oxford United’s impressive season as Karl Robinson’s men are up into the play-off positions.
Dickie joined Reading as a nine-year-old came through the club’s academy, went out on loan to Basingstoke, Cheltenham and Lincoln before joining Oxford in January 2018.
Coming up through the lower leagues has helped him play a lot of games - an impressive 160 appearances by the time he was 23 - and has matured into a dominant, ball-playing centre half. A few big-name players have benefitted from working their way up.
Dickie has also caught the eye of Premier League scouts this season during their run of form in League One and also reaching the Carabao Cup quarter finals where they have clinched a tie with Manchester City .
Dickie’s statistics are impressive - 86.17 per cent pass accuracy, three assists and nine clean sheets in 19 starts - and his ability on the ball is key to his game.
He is a composed, ball-playing centre half who enjoys bringing the ball out of defence and he reads danger very well.
What he says...
“It’s important to get out and play,” he said.
“It’s a great grounding, you take all those experiences from the clubs and try to learn from everything and improve as a player.”
He could be the next...
Harry Maguire.
Came up through the divisions, has a powerful physique and is 6ft 3in as well as being very comfortable on the ball.


Time is: {{timepickerCtrl.mytime | date:'shortTime' }}
Hours step is:
{{opt}}
Minutes step is:
{{opt}}
12H / 24H
Set to 14:00
Clear


Contents
This is a design document about the innards of Ganeti’s job processing. Readers are advised to study previous design documents on the topic:
Ever since the introduction of the job queue with Ganeti 2.0 there have been situations where we wanted to run several jobs in a specific order. Due to the job queue’s current design, such a guarantee can not be given. Jobs are run according to their priority, their ability to acquire all necessary locks and other factors.
One way to work around this limitation is to do some kind of job grouping in the client code. Once all jobs of a group have finished, the next group is submitted and waited for. There are different kinds of clients for Ganeti, some of which don’t share code (e.g. Python clients vs. htools). This design proposes a solution which would be implemented as part of the job queue in the master daemon.
With the implementation of job priorities the processing code was re-architectured and became a lot more versatile. It now returns jobs to the queue in case the locks for an opcode can’t be acquired, allowing other jobs/opcodes to be run in the meantime.
The proposal is to add a new, optional property to opcodes to define dependencies on other jobs. Job X could define opcodes with a dependency on the success of job Y and would only be run once job Y is finished. If there’s a dependency on success and job Y failed, job X would fail as well. Since such dependencies would use job IDs, the jobs still need to be submitted in the right order.
The new attribute’s value would be a list of two-valued tuples. Each tuple contains a job ID and a list of requested status for the job depended upon. Only final status are accepted (canceled, success, error). An empty list is equivalent to specifying all final status (except canceled, which is treated specially). An opcode runs only once all its dependency requirements have been fulfilled.
Any job referring to a cancelled job is also cancelled unless it explicitly lists canceled as a requested status.
In case a referenced job can not be found in the normal queue or the archive, referring jobs fail as the status of the referenced job can’t be determined.
With this change, clients can submit all wanted jobs in the right order and proceed to wait for changes on all these jobs (see cli.JobExecutor). The master daemon will take care of executing them in the right order, while still presenting the client with a simple interface.
Clients using the SubmitManyJobs interface can use relative job IDs (negative integers) to refer to jobs in the same submission.
Example data structures:
# First job
{
"job_id": "6151",
"ops": [
{ "OP_ID": "OP_INSTANCE_REPLACE_DISKS", ..., },
{ "OP_ID": "OP_INSTANCE_FAILOVER", ..., },
],
}
# Second job, runs in parallel with first job
{
"job_id": "7687",
"ops": [
{ "OP_ID": "OP_INSTANCE_MIGRATE", ..., },
],
}
# Third job, depending on success of previous jobs
{
"job_id": "9218",
"ops": [
{ "OP_ID": "OP_NODE_SET_PARAMS",
"depend": [
[6151, ["success"]],
[7687, ["success"]],
],
"offline": True, },
],
}
Jobs waiting for dependencies are certainly not in the queue anymore and therefore need to change their status from “queued”. While waiting for opcode locks the job is in the “waiting” status (the constant is named JOB_STATUS_WAITLOCK, but the actual value is waiting). There the following possibilities:
Introduce a new status, e.g. “waitdeps”.
Pro:
Con:
Use existing “waiting” status.
Pro:
Con:
Based on these arguments, the proposal is to do the following:
Rename JOB_STATUS_WAITLOCK constant to JOB_STATUS_WAITING to reflect its actual meanting: the job is waiting for something
While waiting for dependencies and locks, jobs are in the “waiting” status
Export dependency information in lock monitor; example output:
Name Mode Owner Pending
job/27491 - - success:job/34709,job/21459
job/21459 - - success,error:job/14513
To determine the status of a dependency job the job queue must have access to its data structure. Other queue operations already do this, e.g. archiving, watching a job’s progress and querying jobs.
Initially (Ganeti 2.0/2.1) the job queue shared the job objects in memory and protected them using locks. Ganeti 2.2 (see design document) changed the queue to read and deserialize jobs from disk. This significantly reduced locking and code complexity. Nowadays inotify is used to wait for changes on job files when watching a job’s progress.
Reading from disk and deserializing certainly has some cost associated with it, but it’s a significantly simpler architecture than synchronizing in memory with locks. At the stage where dependencies are evaluated the queue lock is held in shared mode, so different workers can read at the same time (deliberately ignoring CPython’s interpreter lock).
It is expected that the majority of executed jobs won’t use dependencies and therefore won’t be affected.
At a first look it might seem to be better to put dependencies on previous jobs at a job level. However, it turns out that having the option of defining only a single opcode in a job as having such a dependency can be useful as well. The code complexity in the job queue is equivalent if not simpler.
Since opcodes are guaranteed to run in order, clients can just define the dependency on the first opcode.
Another reason for the choice of an opcode-level attribute is that the current LUXI interface for submitting jobs is a bit restricted and would need to be changed to allow the addition of job-level attributes, potentially requiring changes in all LUXI clients and/or breaking backwards compatibility.
There’s at least one implementation of a batched job executor twisted into the burnin tool’s code. While certainly possible, a client-side solution should be avoided due to the different clients already in use. For one, the remote API client shouldn’t import non-standard modules. htools are written in Haskell and can’t use Python modules. A batched job executor contains quite some logic. Even if cleanly abstracted in a (Python) library, sharing code between different clients is difficult if not impossible.


--- layout: post title: "Yojimbo Widescreen View Hack" external-url: http://hicksdesign.co.uk/journal/yojimbo-widescreen-view-hack ---
An oldie but essential for every Yojimbo user. It’s one of the first things I do on every OS reinstall or new Mac setup.


--- layout: page title: About description: The story so far... background: '/img/bg-about.jpg' ---
My name is Jaroslav C. If you know me that is because you should know me. If you do not know me, chances are high that you live under a rock on an island in the Pacific Ocean. If you do not live under a rock on an island in the Pacific Ocean and you have access to the Internet ( well obviously you are here ) please search for me. Chances are you might be related to me.
Many people have tried to explain my existence and tried to find reason for my genius. They will have to try harder. Many people have also tried to get me out of my self-imposed exile. They too must try harder.
The only reason as to why I am writing this here is because of my good friend Digital P. Digital’s great grandfather who went by the name of Analog P, was my student. At the time of inventing morse code, Analog fell ill. Unfortunately since I was busy with the invention I could not create the medicine in time. It took me exactly seven minutes to make the medicine but those seven minutes were too long for poor Analog.
Before moving on to the next dimension Analog made me promise that I would share my knowledge with one member of his family. I made that promise to Analog so that he could pass in peace. From that day on I would routinely examine each member of his family to find out who would best suited to pass on my learning.
I waited for generations till I found a young boy named Digital. He was Analog’s great grandson.
Impressed by his talent to learn and his desire to win and the fact that he cleared the test that none of his family members could, proved to me without a shadow of doubt that Digital was the one.
From that day onwards Digital and I would communicate. Since the pigeons would take ages to deliver the messages I decided to invent the Internet. It only seemed logical after inventing the Morse Code. It was a little challenging but Tim helped me out, just a little bit.
Things got better once the Internet was set up. After that Digital requested me to help him write about Prague. A city where I was not born but a city where I am fondly remembered. I was almost elected as a President there. Since I have fond memories of Prague I decided to help Digital.
“It’s called a blog “ said Digital. A blog ? The word that I had coined in the 19th century was “Magazine” and I still feel that it has more purpose, more meaning, more oomph, more character, more depth, more everything. Call it what you might, my other student William once said “What’s in a name” . A blog, a magazine, a newspaper, call it what you want, but please do show some love to Digital.
Till we meet again ....
J.C


Getting started with Consort is easy! The most basic consort project consists of three commands in a CMakeLists.txt file.
cmake_minimum_required(VERSION 3.0.3)
include("cmake/consort.cmake")
co_exe( hello
sources: *.cpp
)
The first line is necessary to suppress CMake warnings, Consort will also specify a minimum version based on the requirements of Consort's code - so the version you specify isn't crucial if you're only using Consort's capabilities.
The second line is necessary to enable all the Consort functions for your project. You should include consort.cmake in the top level CMakeLists.txt for your build and before you do anything else (except set Consort configuration variables) to make sure that Consort has a chance to do all it's key initial set-up before anything else.
The last command is the Consort way to declare an executable target, unless your project has some special requirements you should be able to specify all the important properties of your target in a single call. See the co_exe documentation for more details on the options you can specify.
Using Consort's module support is slightly more complex, however, after a few lines of set-up it's fairly straightforward to use. There are four key elements of a modular build:
To create a module, put all the code for your module into a subdirectory,
together with a CMakeLists.txt that contains all the necessary (Consort)
declarations to build the module. You do not need to use add_subdirectory
to add the module to your build, Consort will call add_subdirectory
for you.
Next create a file called module.cmake
in your module directory,
call co_module and pass the name of your module.
Consort will include your module.cmake
when searching for
modules.
In your top level CMakeLists.txt, add a call to
co_find_modules for each directory that
contains modules. Consort will search the subdirectories for a file called
module.cmake
and include it, each module.cmake
file will register it's modules with Consort.
Once you've registered all your modules with Consort, you need to tell Consort which ones to activate. There are two ways to do this, firstly link any target (that is not itself in a module) to a module - Consort will automatically activate the module. Secondly, you can call co_require_module to force Consort to activate the module.
Lastly, you need to include activated modules. This normally needs to be done in your top level CMakeLists.txt, so that the modules are always added from a consistent location. To include activated modules simply call co_include_modules
You should end up with a top-level CMakeLists.txt that looks a bit like this.
cmake_minimum_required(VERSION 3.0.3)
include("${CMAKE_SOURCE_DIR}/../../cmake/consort.cmake")
# Register all modules in the current directory
co_find_modules(.)
# Explicitly enable module1
co_require_module(module1)
# Include activated modules
co_include_modules()
Using Qt is pretty easy. First you need to enable Qt with co_enable_qt5 or co_enable_default_qt5.
co_enable_default_qt()
Then declare your targets as normal, add the gui and automoc flags to make a proper GUI application on Windows and have CMake automatically run Qt's MOC on any files that require it.
co_exe( hello gui automoc
sources: *.cpp
)
Add ui-files to the ui-sources group and any resource files to the sources group and Consort will compile them into your target for you.
co_exe( hello gui automoc
sources:
*.cpp
resources/*.qrc
ui-sources:
ui/*.ui
)
Link to suitable Qt modules using the qt-modules group.
co_exe( hello gui automoc
sources:
*.cpp
resources/*.qrc
ui-sources:
ui/*.ui
qt-modules:
Core
Gui
Widgets
)
Lastly, have Consort generate translation data and embed it into your target as a resource using the translations group.
co_exe( hello gui automoc
sources:
*.cpp
resources/*.qrc
ui-sources:
ui/*.ui
qt-modules:
Core
Gui
Widgets
translations:
en_GB.ts
fr.ts
de.ts
)
This will give you a fairly complete Qt target. See the CONSORT_COMMON_GROUPS documentation for more information on available options, and the qt5 example for details on how to load the embedded translation files.


Class for fields defined in a record More...
Public Types | |
| enum | SortOrder { ascending, descending, ignore } |
| Enum for the sorting order of record fields More... | |
Public Member Functions | |
| string | GetProperty (string key) |
| Returns the field's custom property value given the property name More... | |
| override bool | Equals (object obj) |
| Compares two field objects More... | |
| override int | GetHashCode () |
| Hash code function More... | |
Public Attributes | |
| readonly string | Name |
| Name of the field. More... | |
| readonly IList< string > | aliases |
| List of aliases for the field name More... | |
Properties | |
| int | Pos [get] |
| Position of the field within its record. More... | |
| string | Documentation [get] |
| Documentation for the field, if any. Null if there is no documentation. More... | |
| JToken | DefaultValue [get] |
| The default value for the field stored as JSON object, if defined. Otherwise, null. More... | |
| SortOrder | Ordering [get] |
| Order of the field More... | |
| Schema | Schema [get] |
| Field type's schema More... | |
Class for fields defined in a record
| enum Avro.Field.SortOrder |
Enum for the sorting order of record fields
|
inline |
Compares two field objects
| obj | field to compare with this field |
|
inline |
Hash code function
|
inline |
Returns the field's custom property value given the property name
| key | custom property name |
| readonly IList<string> Avro.Field.aliases |
List of aliases for the field name
| readonly string Avro.Field.Name |
Name of the field.
|
get |
The default value for the field stored as JSON object, if defined. Otherwise, null.
|
get |
Documentation for the field, if any. Null if there is no documentation.
|
get |
Order of the field
|
get |
Position of the field within its record.


Biography
I am an Adjunct Professor in Engineering Science at Simon Fraser University (SFU) and philanthropist. I received my PhD in Computing Science at Simon Fraser University in 2014, and I have been a software engineer for over 22 years working for various local and international clients. I am currently the Vice-Chair of the IEEE Signal Processing Society Vancouver Chapter as well as a Senior Member of the IEEE. My research interests include computational sustainability and the understanding of socioeconomic issues that pertain to technological advancement. I am an expert in data engineering and a world-renowned researcher in non-intrusive load monitoring (NILM) and disaggregation. Philanthropic work includes student scholarships (for aboriginal students in engineering) and mentoring.
Are you a BCHydro customer? Donate your data for research.
Latest News [View the news archive]
- New NILM filtering and NILM comparability papers to be presented at ISGT NA 2020.
- New Unsupervised NILM paper to be presented at APPEEC.
- Anomaly detection paper published in IEEE Access.
- HUE dataset journal paper now published.
- NILM paper to be presented at ICASSP.
- SFU Computational Sustainability Lab website now live.
Publications (Peer-Reviewed) [Citation data provided by Google Scholar]
Computational Sustainbility, Disaggregation & Nonintrusive Load Monitoring (NILM)
-
Richard Jones, Alejandro Rodriguez-Silva, Stephen Makonin.
Increasing the Accuracy and Speed of Universal Non-Intrusive Load Monitoring (UNILM) Using a Novel Real-Time Steady-State Block Filter.
Proceedings of the 11th Conference on Innovative Smart Grid Technologies (ISGT), 2020. -
Christoph Klemenjak, Stephen Makonin, Wilfried Elmenreich.
Towards Comparability in Non-Intrusive Load Monitoring: On Data and Performance Evaluation.
Proceedings of the 11th Conference on Innovative Smart Grid Technologies (ISGT), 2020. -
Christoph Klemenjak, Andreas Reinhardt, Lucas Pereira, Stephen Makonin, Mario Bergés, Wilfried Elmenreich.
Electricity Consumption Data Sets: Pitfalls and Opportunities.
Proceedings of the 6th ACM International Conference on Systems for Energy-Efficient Built Environments, Cities, and Transportation (BuildSys), 2019. -
Alejandro Rodriguez-Silva, Stephen Makonin.
Universal Non-Intrusive Load Monitoring (UNILM) Using Filter Pipelines, Probabilistic Knapsack, and Labelled Partition Maps.
Proceedings of the 11th IEEE PES Asia-Pacific Power and Energy Engineering Conference 2019 (APPEEC), 2019. -
Megha Gaur, Stephen Makonin, Ivan V. Bajic, Angshul Majumdar.
Performance evaluation of techniques for identifying abnormal energy consumption in buildings.
IEEE Access, vol. 7, pp. 62721-62733 (2019). -
Alon Harell, Stephen Makonin, Ivan V. Bajic.
WaveNILM: A Causal Neural Network for Power Disaggregation from the Complex Power Signal.
Proceedings of the 44th International Conference on Acoustics, Speech, and Signal Processing (ICASSP), pp. 8335-8339, 2019. -
Laura Guzman, Stephen Makonin, Roger Alex Clapp.
CarbonKit: Designing A Personal Carbon Tracking Platform.
Proceedings of SocialSense ’19: Fourth International Workshop on Social Sensing, pp. 24-29, 2019. -
Chinthaka Dinesh, Stephen Makonin, Ivan V. Bajic.
Residential Power Forecasting Using Load Identification and Graph Spectral Clustering.
IEEE Transactions on Circuits and Systems II: Express Briefs, vol. 66, no. 11 , pp. 1900-1904 (2019). -
Alon Harell, Stephen Makonin, Ivan V. Bajic.
A Recurrent Neural Network for Multisensory Non-Intrusive Load Monitoring on a Raspberry Pi.
Proceedings of the IEEE 20th International Workshop on Multimedia Signal Processing (MMSP), 2018. -
Chinthaka Dinesh, Stephen Makonin, Ivan V. Bajic.
Incorporating Time-Of-Day Usage Patterns Into Non-Intrusive Load Monitoring.
Proceedings of the 5th IEEE Global Conference on Signal and Information Processing (GlobalSIP), 2017. -
Chinthaka Dinesh, Stephen Makonin, Ivan V. Bajic.
Understanding Appliance Power Consumption Without Sensors.
In Poster Session at the 3rd Annual IC-IMPACTS Research Conference, 2017.
-
Md. Zulfiquar Ali Bhotto, Stephen Makonin, Ivan V. Bajic.
Load disaggregation based on aided linear integer programming.
IEEE Transactions on Circuits and Systems II: Express Briefs, vol. 64, no. 7, pp. 792-796 (2016). -
Stephen Makonin.
Investigating the Switch Continuity Principle Assumed in Non-Intrusive Load Monitoring (NILM).
Proceedings of the 29th Annual IEEE Canadian Conference on Electrical and Computer Engineering (CCECE), 2016. -
Stephen Makonin, Fred Popowich, Ivan V. Bajic, Bob Gill, Lyn Bartram.
Exploiting HMM Sparsity to Perform Online Real-Time Nonintrusive Load Monitoring.
IEEE Transactions on Smart Grid, vol. 7, no. 6, pp. 2575-2585 (2016). -
Bradley Ellert, Stephen Makonin, Fred Popowich.
Appliance Water Disaggregation via Non-Intrusive Load Monitoring (NILM).
Proceedings of the EAI International Conference on Big Data and Analytics for Smart Cities (BigDASC), 2015. -
Stephen Makonin, Fred Popowich.
Nonintrusive Load Monitoring (NILM) Performance Evaluation.
Energy Efficiency, vol. 8, no. 4, pp. 809–814 (2015). -
Stephen Makonin.
Real-Time Embedded Low-Frequency Load Disaggregation.
PhD thesis, Simon Fraser University, School of Computing Science, 2014. -
Stephen Makonin, Ivan V. Bajic, Fred Popowich.
Efficient Sparse Matrix Processing for Nonintrusive Load Monitoring (NILM).
Proceedings of the 2nd International Workshop on Non-Intrusive Load Monitoring, 2014. -
Stephen Makonin, Laura Guzman Flores, Robyn Gill, Roger Alex Clapp, Lyn Bartram, Bob Gill.
A Consumer Bill of Rights for Energy Conservation.
Proceedings of the IEEE Canada International Humanitarian Technology Conference (IHTC), 2014. -
Stephen Makonin
Nonintrusive Load Monitoring (NILM): What an algorithm can tell you about your energy consumption.
In Poster Session at SFU Postdoctoral Research Day, 2016.
In Poster Session at IEEE Vancouver Section Annual General Meeting, 2014.
-
Stephen Makonin, William Sung, Ryan Dela Cruz, Brett Yarrow, Bob Gill, Fred Popowich, Ivan V. Bajic.
Inspiring Energy Conservation Through Open Source Metering Hardware and Embedded Real-Time Load Disaggregation.
Proceedings of the 5th IEEE PES Asia-Pacific Power and Energy Engineering Conference (APPEEC), 2013. -
Stephen Makonin, Fred Popowich, Bob Gill.
The Cognitive Power Meter: Looking Beyond the Smart Meter.
Proceedings of the 26th Annual IEEE Canadian Conference on Electrical and Computer Engineering (CCECE), 2013. -
Stephen Makonin.
Approaches to Non-Intrusive Load Monitoring (NILM) in the Home.
PhD depth report, Simon Fraser University, School of Computing Science, 2012.
Data Science, Public Datasets & Big Data
-
Stephen Makonin.
HUE: The Hourly Usage of Energy Dataset for Buildings in British Columbia.
Data in Brief, vol. 23, no. 103744, pp. 1-4 (2019). -
Stephen Makonin, Z. Jane Wang, Chris Tumpach.
RAE: The Rainforest Automation Energy Dataset for Smart Grid Meter Data Analysis.
Data, vol. 3, no. 1, article 7, pp. 1-9 (2018) -
Stephen Makonin, Bradley Ellert, Ivan V. Bajic, Fred Popowich.
Electricity, water, and natural gas consumption of a residential house in Canada from 2012 to 2014.
Scientific Data, vol. 3, no. 160037, pp. 1-12 (2016). -
Stephen Makonin, Daniel McVeigh, Wolfgang Stuerzlinger, Khoa Tran, Fred Popowich.
Mixed-Initiative for Big Data: The Intersection of Human + Visual Analytics + Prediction.
Proceedings of the 49th Hawaii International Conference on System Sciences (HICSS), pp. 1427-1436, 2016. -
Stephen Makonin, Fred Popowich, Lyn Bartram, Bob Gill, Ivan V. Bajic.
AMPds: A Public Dataset for Load Disaggregation and Eco-Feedback Research.
Proceedings of the 2013 IEEE Electrical Power and Energy Conference (EPEC), 2013. -
Stephen Makonin.
ODDs: Occupancy Detection Dataset.
Harvard Dataverse, V1, 2010.
Visualization & Human-Computer Interaction (HCI)
-
Stephen Makonin, Lyn Bartram, Fred Popowich.
A Smarter Smart Home: Case Studies of Ambient Intelligence.
IEEE Pervasive Computing, vol. 12, no. 1, pp. 58–66 (2013). -
Stephen Makonin, Fred Popowich, TaeJin Moon, Bob Gill.
Inspiring Energy Conservation Through Open Source Power Monitoring and In-Home Display.
Proceedings of the IEEE Power and Energy Society General Meeting, 2013. -
Stephen Makonin, Fred Popowich.
Home Occupancy Agent: Occupancy and Sleep Detection.
GSTF Journal on Computing, vol. 2, no. 1, pp. 182–186 (2012). -
Stephen Makonin, Maryam H. Kashani, Lyn Bartram.
The Affect of Lifestyle Factors on Eco-Visualization Design.
Proceedings of Computer Graphics International (CGI), 2012. -
Stephen Makonin, Philippe Pasquier, Lyn Bartram.
Elements of Consumption: An abstract visualization of household consumption.
Proceedings of the 11th International Symposium on Smart Graphics, LNSC 6815:194–198, 2011. -
Stephen Makonin, Fred Popowich.
An intelligent agent for determining home occupancy using power monitors and light sensors.
Proceedings of the 9th International Conference on Smart Homes and Health Telematics (ICOST), LNSC 6719:236–240, 2011.
Electrical & Computer Engineering (ECE), incl. Software Engineering
-
Stephen Makonin.
Chapter 18: App programming and its use in smart buildings, pp. 451-463.
Book: Start-Up Creation: The Smart Eco-E cient Built Environment.
Editors: Fernando Pacheco-Torgal, Erik Rasmussen, Claes-Goran Granqvist, Volodymyr Ivanov, Arturas Kaklauskas, Stephen Makonin.
Woodhead Publishing, ISBN: 978-0-08-100546-0 (hardcover), 978-0-08-100549-1 (ebook), 2016. -
Joanna Wallace, Kyle Richardson, Bob Gill, Stephen Makonin.
Cognitive Radio Technology: System Evolution.
Proceedings of the 4th International Conference On Wireless Networks and Embedded Systems (WECON), 2015. -
Reza Filsoof, Alison Bodine, Bob Gill, Stephen Makonin, Robert Nicholson.
Transmitting Patient Vitals Over a Reliable ZigBee Mesh Network.
Proceedings of the IEEE Canada International Humanitarian Technology Conference (IHTC), 2014. -
David Bennett, Stephen Makonin, Vincent W. Mayfield, Ted Neustaedter, Mark R. Wrenn.
Visual C++ 5.0 Developer's Guide.
Sams Publishing, ISBN: 978-0-672-31031-7, 1996.
Academic Exploits
Current Supervision
-
Lior Bragilevsky — PhD Thesis (Senior Supervisor, starting Sep/2020)
Thesis: tbd (subject area: Deep Learning, Image Processing, Power Grid)
-
Alejandro Rodriguez-Silva — PhD Thesis (Senior Supervisor, May/2018 to present)
Thesis: tbd (subject area: NILM, Adaptive Filters, Machine Learning)
-
Alon Harell — MASc Thesis (Co-Supervisor, May/2018 to present)
Thesis: tbd (subject area: NILM, Deep Learning)
Awards: NSERC CGS-M
-
Richard Jones — MASc Thesis (Senior Supervisor, May/2019 to present)
Thesis: tbd (subject area: NILM, Software Engineering, Machine Learning)
Awards: GDES Entrance Scholarship, NSERC CGS-M
-
Md. Zulfiquar Ali Bhotto — Postdoctoral Fellow (Co-Supervisor, Dec/2017 to present)
Research subject area: Adaptive Filters, Optimization, Machine Learning, Power Grid
Past Supervision
-
Bradley Ellert — MSc Thesis (Co-Supervisor, defended Aug 17, 2015)
Thesis: Leveraging Submetered Electricity Loads to Disaggregate Household Water-Use
Visiting Scholars
-
David Murray — Visiting PhD Scholar from University of Strathclyde, UK (Jul/2019 to Aug/2019, 2 months)
-
Bundit Buddhahai — Visiting PhD Scholar from KMUTT, Thailand (May/2019 to Oct/2019, 6 months)
-
Christoph Klemenjak — Visiting PhD Scholar from University of Klagenfurt, Austria (May/2019 to Aug/2019, 3 months)
-
Shikha Singh — Visiting PhD Scholar from IIIT-Delhi, India (Jul/2018, ½ month)
Grant: IC-IMPACTS NCE and India DST -
Megha Gaur — Visiting PhD Scholar from IIIT-Delhi, India (Sep/2017 to Feb/2018, 6 months)
Grant: IC-IMPACTS NCE and India DST
Research Grants
- NSERC Engage Grant — ($25,000 over 6 months), 2019
Title: Inferring power grid transformer to meter association using inconsistent geospatial data - NSERC Discovery Launch Supplement Award — ($12,500), 2019
- NSERC Discovery Grant — ($140,000 over 5 years), 2018
Title: Non-Intrusive Load Monitoring - SFU GSS Professional Development Grant — ($500), 2014
- BCIT School of Energy Research Seed Funding — ($10,000 over 4 months), 2013
- SFU GSS Professional Development Grant — ($500), 2012
Course Instruction
-
CMPT 165 - Introduction to the Internet and the World Wide Web
Simon Fraser University, School of Computing Science: Fall/2014, Spring/2015.
Awards & Achievements
Service To Profession
General Chair/Co-Chair & Organizer
- Advanced Signal Processing for Non-intrusive Load Monitoring Special Session at ICASSP, Brighton UK, 2019
- 4th International Workshop on Non-Intrusive Load Monitoring (NILM), Austin USA, 2018
- The Plenty of Fish (POF) 24hr Hackathon, 2017
- 3rd International Workshop on Non-Intrusive Load Monitoring (NILM), 2016
- IEEE Vancouver Windows 10 Hackathon (28-hours), 2015
- IEEE Vancouver Kinect and Structure Sensor Hackathon (28-hours), 2014
Journal Editorship
Website & Social Media Chair
- 14th IEEE International NEW Circuits And Systems (NEWCAS) Conference, 2016
- 29th Annual IEEE Canadian Conference on Electrical and Computer Engineering (CCECE), 2016
- IEEE 15th International Conference on High Performance Switching and Routing (HPSR), 2014
Local Arrangements Chair
- IEEE 20th International Workshop on Multimedia Signal Processing (MMSP), 2018
- IEEE World Congress on Computational Intelligence (WCCI), 2016
Technical Program Committee
- eSim 2020 Conference, International Building Performance Simulation Association (IBPSA-Canada): 2020
- 11th IEEE PES Asia-Pacific Power and Energy Engineering Conference (APPEEC): 2019
- 5th IFIP Conference on Sustainable Internet and ICT for Sustainability (SustainIT): 2017
- IEEE Workshop on Pervasive Energy Services (PerEnergy): 2015, 2016, 2017
- 3rd International Workshop on Computational Energy Management in Smart Grids (CEMiSG): 2016
- EAI International Conference on Big Data and Analytics for Smart Cities (BigDASC): 2015
- International Conference on Ubiquitous Computing & Ambient Intelligence (UCAmI): 2011—2015
- IEEE International Conference on Power and Energy (PECON): 2012
Invited Talks & Keynotes
-
NILM Real-World Testing: The Case for an Emulator
The 2nd EU Nonintrusive Load Monitoring Workshop (London, UK), October 7, 2017 -
The Expectations of Non-Intrusive Load Monitoring (NILM)
The 2017 International Conference on Application of Demand-Side Management (DSM)
and Data Driven Technology in Energy Saving (Taipei, Taiwan), November 20, 2017 -
From Socioeconomic Concerns to Standardizing Accuracy to Water NILM
The 2nd EU Nonintrusive Load Monitoring Workshop (London, UK), July 8, 2015


Access
Access is a TCL-based language that allows you to write scripts that perform complex operations in DIScover. Access communicates directly with the information model through a command line interface in the model browser and enables enterprise-level features and functionality not available through the model browser. Access advantages include:
• sophisticated navigation and search capabilities for the Abstract Syntax Tree via Tree Pattern Matching (TPM)
• automated global change propagation
• ability to customize your environment with Access scripts
• create custom queries
Not every DIScover user needs to learn or use Access; however, if you are an Access user, the Access menu in the Browser provides quick shortcuts to the Access environment, such as opening an Access window, browsing the AST, performing Tree Pattern Matching routines, executing queries and filters, and reporting results.
For more information on using Access, see the DIScover Access Online Help.


Myner's
Pizza
Order your pizza!

Small:
Kshs. 550
Medium:
Kshs. 850
Large:
Kshs. 1200
When we talk of crust, what is your take?
None
Crispy
Stuffed
Gluten-free
Select Your Toppings at sh. 60 each
Sausage
Bacon
Mushrooms
How many of this pizzas do you need?
1
2
3
4
5
6
7
8
9
10
We need to act fast. Where do we deliver it?
No, thanks. I will pick it up
Yes, please. Kindly deliver it.
Share your location please for the sake of the boda guy
PLACE ORDER
Orders made so far!
ORDER SUMMARY
Pizza flavor


Toggle navigation
Dr Kang's Clinic
About US
Online Specials
Events Calender
Map And Directions
Contact Us
Getting to the office
Services
Teeth Whitening
Cosmetic Bonding
White Composite Fillings
Crowns
Inlays and Onlays
Bridges
Dentures
Implants
Periodental Therapy
Ask The Doctor
Appointments
Gallery
Call Now!<PHONE_NUMBER>
Login/Logout


{% extends 'base.html' %}
{% block page_header %}
{{ group.name }}
{% endblock %}
{% block home_link %}
{% include 'rankings/includes/home_link.html' %}
{% endblock %}
{% block content %}
Game {{ game.pk }} {{ game.date_time }}
Players
| Player |
Ranking |
{% for player in players %}
| {{ player.user.username }} |
{{ player.ranking }} |
{% endfor %}
{% if game.active %}
Finish the game
{% else %}
Results
| {{ game.winner }} won |
| {{ game.home_score }} vs {{ game.away_score }} |
| Player |
Ranking |
{% for player in players %}
| {{ player.user.username }} |
{{ player.rank_change }} |
{% endfor %}
{% endif %}
{% endblock %}


Methods
(static) add(phrase, data)
Add phrase to search index with optional data
Parameters:
| Name | Type | Description |
|---|---|---|
phrase |
string | text phrase |
data |
* | optional data, e.g. object, id, string etc |
Throws:
Will throw an error
(static) export() → {Object}
Returns the full phrase and index data, used for dumping the index to file / db
E.g. you can store the index as JSON file on disc and using api.import to
reinsert the index
Returns:
- Type
- Object
(static) import(data)
Import a preciously exported index
Warning: Does almost no validation and no normalization of data
Parameters:
| Name | Type | Description |
|---|---|---|
data |
object | must contain data.phrases and data.index (as returned by api.export) |
Throws:
Will throw an error
(static) length() → {number}
Returns number of phrases to search for
Returns:
Number of phrases to search for
- Type
- number
(static) reset()
Resets and empty index
(static) search(text, cb) → {*}
Search for added phrases in text, returns all matches
Parameters:
| Name | Type | Description |
|---|---|---|
text |
string | phrase |
cb |
function | optional callback |
Returns:
promise
- Type
- *
(static) searchOne(text, cb) → {*}
Search for added phrases in text, return one match (more performant than search)
Parameters:
| Name | Type | Description |
|---|---|---|
text |
string | phrase |
cb |
function | optional callback |
Returns:
promise
- Type
- *


{% extends "base.html" %}
{% block content %}
Inspired by James Clear's Proven Goal Setting Method, Motion helps you set better goals using 3 main strategies:
(1) Beside “What do you want to achieve?”, it's worthwhile to figure out “What kind of pain do you want?” or "What sacrifices do you need to take in order to achieve your goal"?
(2) Instead of focusing on goal setting alone, focus on designing a good system.
(3) Only through numbers and clear tracking that we have any idea if we are making progress and getting better.
That's it. Super simple yet super effective!


Coding Projects
An attempt to replicate the design of the Wikipedia front page as of August 2nd, 2018, using HTML, CSS, and Bootstrap design elements.
An introductory exercise in using the Bootstrap framework to design web pages, this site uses Bootstrap CSS to design a short site describing a vacation to Japan.
An exercise in styling a web site using concepts of cascading style rules in CSS, in the form of a fictional animal shelter.
An exercise in using CSS to float images, add borders to elements, and manipulating margins and padding, to create a web site for my favorite band, ABBA.
Continuing practice with styling web pages with HTML and CSS, as well as an introductory exercise in creating and merging branches in a Git project.
An introductory project in creating rudimentary web pages in HTML, utilizing hyperlinks, images, and inline styling.
About Me
Delivery driver, Amazon.com
Teaching assistant, University of Victoria Department of Mathematics and Statistics
Video analyst, Portland Trail Blazers, Analytics Division
Student help desk, Portland Community Colege - Sylvania
Portland Trail Blazers
Tottenham Hotspur
New Japan Pro Wrestling
(ok, "sports" in this case)


Learning objectives
- (1) Apply dynamically-typed variables with implicit type conversion… using JS.
- (2) Apply JS functions and control structures…
- (3) Design small client-side web apps that employ JS functions to respond to HTML DOM events… making changes to the HTML DOM.
- (4) Apply JavaScript's support for first class functions…
- (8) Apply best practices in internal documentation, file naming and web site structure…
What we know so far…
Web programming
Javascript language
Web programming
- What is web programming?
Plan, analyze, design, construct, document, test, publish.
Standards, conventions, best practices.
- What is full-stack development?
Client-side, server-side, communication, ...
Algorithms, performance, storage.
link
Javascript language
- paradigms
— object-based, prototype-based, object-oriented, imperative, functional, event-driven, procedural
- programs
— location, statements, flow control
- variables
— weekly-typed, scope: global, local, block
- operators
— assignment, conditional, arithmetic, strings,
link
Unobtrusive Javascript
- delay processing — place at the end body
- accelerate processing — DOMContentLoaded event
- avoid control boxes (alert, prompt,...)
- avoid event attributes — hard to maintain
- ultimately, move code to an external file
Worksheet 1 problems
-
Problem 1: Write a program that adds two numbers and display result together with the two values provided by the user.
Potential solutions: Similar to Increment a number by 1
Similar to the class example. Need to add input field for the second number and make appropriate substitutions for the fixed number "1". You can slip some versions and leave the console.log calls for further debuggubg and testing. Make sure to validate HTML and CSS.
-
Problem 2: Write a program that will allow the user to guess a number between 1 and 10 that was randomly chosen by the program.
Potential solutions: ?
You probably have done this one in Java. Starting with pseudocode (language-gnostic), you can convert to any language. Note similarities and differences in the code.
-
Problem 3: Write a program that calculates a given degrees Celsius in degrees Fahrenheit and displays a phrase that includes both values.
Potential solutions: ?
Prepare for next class
Study the assigned material and make notes.
Complete Worksheet 2
Post your questions, discuss, and collaborate to develop solutions on SLATE Discussion Board. Answer other students' questions. Start a conversation.
—


Introduction to DocFX Template System
DocFX Template System provides a flexible way of defining and using templates.
As the following DocFX workflow shows,
DocFX loads the set of files and transforms them into different data models using different types of Document Processors. Afterwards, DocFX Template System loads these data models, and transforms them into output files based on the document type of the data model.
Each file belongs to a document type. For example, the document type for Markdown files is conceptual
, and the document type for toc.md
files is Toc
.
For a specific Template, each document type can have several Renderers. For a specific file, DocFX Template System picks the corresponding Renderers to render the input data model into output files.
Renderer
Renderers are files written in a specific templating language. It is used to transform the input data model into output files.
Currently DocFX supports the following templating languages:
Naming rule for a Renderer file
The naming rule for a Renderer file is:
<document_type>.<output_extension>[.primary].<template_extension>
.
<document_type>
is the document type current Renderer responsible to.<output_extension>
defines the extension of the output files going through current Renderer. For example,conceptual.html.tmpl
transformsfile1.md
into output filefile1.html
, andtoc.json.tmpl
transformstoc.md
into output filetoc.json
.[.primary]
is optional. It is used when there are multiple Renderers with different extension for one particular document type. The output file transformed by the.primary
Renderer is used as the file to be linked. The below example describes the behavior in detail.<template_extension>
is the extension of the Renderer file based on the templating language it uses. For Mustache Renderer, it is.tmpl
, while for Liquid Renderer, it is.liquid
.
Here is an example.
The following template contains two Mustache Renderer files for conceptual
document type:
/- some_template/
|- conceptual.html.primary.tmpl
\- conceptual.mta.json.tmpl
There are two Markdown files A.md
and B.md
, the content for A.md
is:
[Link To B](B.md)
DocFX Template System produces two output files for A.md
: A.html
and A.mta.json
, and also two output files for B.md
: B.html
and B.mta.json
. According to conceptual.html.primary.tmpl
, .html
is the primary output file, the link from A.md
to B.md
is resolved to B.html
instead of B.mta.json
, which is to say, the content of A.md
is transformed to:
Link To B
Note
If no primary
Renderer is defined, DocFX randomly picks one Renderer as the primary one, and the result is unpredictable.
Renderer in Mustache syntax
Introduction to Mustache
Mustache is a logic-less template syntax containing only tags. It works by expanding tags in a template using values provided in a hash or object. Tags are indicated by the double mustaches. {{name}}
is a tag, it tries to find the name key in current context, and replace it with the value of name. mustache.5 lists the syntax of Mustache in detail.
Naming rule
Renderers in Mustache syntax MUST end with .tmpl
extension.
Mustache Partials
Mustache Partials is also supported in DocFX Template System. Partials are common sections of Renderer that can be shared by multiple Renderer files. Partials MUST end with .tmpl.partial
.
For example, inside a Template, there is a Partial file part.tmpl.partial
with content:
Inside Partial
{{ name }}
To reuse this Partial file, Renderer file uses the following syntax:
Inside Renderer
{{ >part }}
It has the same effect with the following Renderer file:
Inside Renderer
Inside Partial
{{ name }}
Extended syntax for Dependencies
When rendering the input data model into output files, for example, html files, the html file may rely on other files to display correctly. For example, the html file dependents on stylesheet file main.css
. We call such file main.css
a Dependency to the Renderer.
DocFX introduces the following syntax to define the dependency for the Renderer:
{{!include('<file_name>')}}
docfx
copies these dependencies to output folder preserving its relative path to the Renderer file.
Tip
Mustache is logic-less, and for a specific {{name}}
tag, Mustache searches its context and its parent context recursively.
So most of the time Preprocessor File is used to re-define the data model used by the Mustache Renderer.
Extended syntax for Master page
In most cases templates with different document types share the same layout and style, for example, most of the pages can share navbar, header, or footer.
DocFX introduces the following syntax to use a master page:
{{!master('<master_page_name>')}}
Inside the master page, the following syntax is used for pages to place their content body:
{{!body}}
For example, with the following master page _master.html
:

{{!body}}

A template conceptual.html.tmpl
as follows:
{{!master('_master.html')}}
Hello World
renders as the same as:

Hello World

Renderer in Liquid syntax
Naming rule
Renderers in Liquid syntax MUST end with .liquid
extension. Liquid contains include tag to support partials, we follow the ruby partials naming convention to have _<partialName>.liquid
as partial template.
Extended syntax for Dependencies
DocFX introduces a custom tag ref
, e.g. {% ref file1 %}
, to specify the resource files that current template depends on.
Extended syntax for Master page
DocFX introduces custom tags master
and body
to use master page:
{% master <master_page_name> %}
Inside the master page, the following syntax is used for pages to place their content body:
{% body %}
For example, with the following master page _master.html
:

{% body %}

A template conceptual.html.liquid
as follows:
{% master _master.html %}
Hello World
renders as the same as:

Hello World

Preprocessor
Renderers take the input data model produced by document processor and render them into output files. Sometimes the input data model is not exactly what Renderers want. DocFX Template System introduces the concept of Preprocessor to transform the input data model into what Renderers exactly want. We call the data model Preprocessor returns the View Model. View Model is the data model to apply Renderer.
Naming rule for Preprocessor
The naming of Preprocessor follows the naming of Renderer with file extension changes to .js
: <renderer_file_name_without_extension>.js
.
If a Preprocessor has no corresponding Renderer however it still needs to be executed, for example, to run exports.getOptions
function, it should be named as <document_type>.tmpl.js
.
Syntax for Preprocessor
Preprocessors are JavaScript files following ECMAScript 5.1 standard. DocFX Template System uses Jint as JavaScript Engine, and provides several additional functions for easy debugging and integration.
Module
Preprocessor leverages the concept of Module as similar to the Module in Node.js. The syntax of Module in Preprocessor is a subset of the one in Node.js. The advantage of the Module concept is that the Preprocessor script file can also be run in Node.js. The Module syntax in Preprocessor is simple,
To export function property from one Module file
common.js
:exports.util = function () {}
To use the exported function property inside
common.js
:var common = require('./common.js'); // call util common.util();
Note
Only relative path starting with ./
is supported.
Log
You can call the following functions to log messages with different error level: console.log
, console.warn
or console.warning
and console.err
.
Function Signature
A Preprocessor file is also considered as a Module. It MUST export the function property with the signature required by docfx
's prescriptive interop pattern.
There are two functions defined.
Function 1: exports.getOptions
Function property getOptions
takes the data model produced by document processor as the input argument, and the return value must be an object with the following properties:
| Property Name | Type | Description |
|---|---|---|
| isShared | bool | Defines whether the input data model can be accessed by other data models when transform . By default the value is false . If it is set to true , the data model will be stored into Globally Shared Properties. |
A sample exports.getOptions
defined in toc.tmpl.js
is:
exports.getOptions = function (model) {
return {
isShared: true;
};
}
Function 2: exports.transform
Function property transform
takes the data model produced by document processor (described in further detail in The Input Data Model) as the input argument, and returns the View Model. View Model is the exact model to apply the corresponding Renderer.
A sample exports.transform
for conceptual.txt.js
is:
exports.transform = function (model) {
model._title = "Hello World"
return model;
}
If conceptual.txt.tmpl
is:
{{{_title}}}
Then Markdown file A.md
is transformed to A.txt
with content:
Hello World
Tip
For each file, the input data model can be exported to a JSON file by calling docfx build --exportRawModel
.
And the returned View Model can be exported to a JSON file by calling docfx build --exportViewModel
.
The Input Data Model
The input data model used by transform
not only contains properties extracted from the content of the file, but also system generated properties and globally shared properties.
System Generated Properties
System generated property names start with underscore _
, as listed in the following table:
| Name | Description |
|---|---|
| _rel | The relative path of the root output folder from current output file. For example, if the output file is a/b/c.html from root output folder, then the value is ../../ . |
| _path | The path of current output file starting from root output folder. |
| _navPath | The relative path of the root TOC file from root output folder, if exists. The root TOC file stands for the TOC file in root output folder. For example, if the output file is html file, the value is toc.html . |
| _navRel | The relative path from current output file to the root TOC file, if exists. For example, if the root TOC file is toc.html from root output folder, the value is empty. |
| _navKey | The original file path of the root TOC file starting with ~/ . ~/ stands for the folder where docfx.json is in, for example, ~/toc.md . |
| _tocPath | The relative path of the TOC file that current output file belongs to from root output folder, if current output file is in that TOC file. If current output file is not defined in any TOC file, the nearest TOC file is picked. |
| _tocRel | The relative path from current output file to its TOC file. For example, if the TOC file is a/toc.html from root output folder, the value is ../ . |
| _tocKey | The original file path of the TOC file starting with ~/ . ~/ stands for the folder where docfx.json is in, for example, ~/a/toc.yml . |
Note
Users can also override system generated properties by using YAML Header, fileMetadata
or globalMetadata
.
Globally Shared Properties
Globally shared properties are stored in __global
key for every data model. Its initial value is read from global.json
inside the Template if the file exists.
If a data model has isShared
equal to true
with the above getOptions
function property, it is stored in __global._shared
with the original path starting with ~/
as the key.


This package contains the default server implementation of the transparent JCR-RMI layer. The classes in this package can be used to make a local JCR repository available as an RMI service. In addition, this package offers a straightforward mechanism for extending or modifying the behaviour of the server layer.
The contents of this package is designed using two design patterns, Factory and Adapter. All the remotely accessible ServerObject subclasses implement the Adapter pattern to adapt a local JCR interface to the corresponding remote JCR-RMI interface. The Factory pattern is used to centralize the creation and configuration of all adapter instances.
Setting up the server part of the JCR-RMI layer is quite straightforward. After instantiating a local JCR repository you need to wrap it into a remote adapter and create an RMI binding for the repository. A variation of the following code is usually all that is needed in addition to the standard RMI setup (starting rmiregistry, etc.):
Repository repository = ...; // The local repository String name = ...; // The RMI URL for the repository RemoteAdapterFactory factory = new ServerAdapterFactory(); RemoteRepository remote = factory.getRemoteRepository(repository); Naming.bind(name, remote); // Make the RMI binding using java.rmi.Naming
The Factory pattern used by this package makes it easy to extend the behaviour of the JCR-RMI server. Such changes in behaviour or policy can be implemented by modifying or replacing the default ServerAdapterFactory used in the example above.
The following example code adds transparent logging of all session logins and logouts:
Repository repository = ...; // The local repository String name = ...; // The RMI URL for the repository RemoteAdapterFactory factory = new ServerAdapterFactory() { public RemoteSession getRemoteSession(Session session) throws RemoteException { System.out.println("LOGIN: " + session.getUserId()); return new ServerSession(session, this) { public void logout() { System.out.println("LOGOUT: " + session.getUserId()); super.logout(); } }; } }; RemoteRepository remote = factory.getRemoteRepository(repository); Naming.bind(name, remote); // Make the RMI binding using java.rmi.Naming


|
cbg_pop
|
Unweighted Population by Census Block Group |
|
county_pop
|
Unweighted Population by County |
|
distancing
|
Example Stay-at-Home Data |
|
expand_cat_json()
|
Expand and collapse a categorical JSON column |
|
expand_integer_json()
|
Expand and collapse an integer JSON column |
|
expand_open_hours()
|
Expands the open_hours variable in the Core file |
|
find_date()
|
Find the date in a SafeGraph AWS-formatted filepath |
|
fips_from_cbg()
|
Pull state and county FIPS from CBG code |
|
fips_to_names
|
State and county names by FIPS codes |
|
graph_template()
|
Produce a nice-looking graph of foot traffic growth over time |
|
growth_over_time()
|
Track foot traffic by group over time |
|
hb_shrink()
|
Hierarchical Bayes Shrinkage |
|
link_poi_naics()
|
Use a Core Places file to Create a POI-NAICS crosswalk |
|
ma()
|
Seven-Day Moving Average |
|
naics_2
|
NAICS 4-Digit Code Titles |
|
naics_4
|
NAICS 4-Digit Code Titles |
|
naics_codes
|
NAICS Code Titles |
|
norm
|
Example Normalization Data |
|
panel
|
Example Panel Information Data |
|
patterns_lookup()
|
SafeGraph File Lookup |
|
pat_naics pat_naics
|
Example Patterns Data Aggregated by NAICS Code |
|
processing_template()
|
Perform basic processing and preparation of visits_by_day data |
|
rbind_by_list_pos()
|
Row-binds data.tables in a list of lists |
|
read_core()
|
Read SafeGraph Core |
|
read_distancing()
|
Read in Stay-at-Home Data |
|
read_many_csvs()
|
Read and row-bind many CSVs |
|
read_many_patterns()
|
Read and row-bind many patterns files |
|
read_many_shop()
|
Read and row-bind many files from the SafeGraph Shop |
|
read_patterns()
|
Read SafeGraph Patterns |
|
read_shop()
|
Read a ZIP file with patterns and other data as it comes from the SafeGraph Shop |
|
safegraph_aws()
|
Download SafeGraph data from AWS COVID Response |
|
sample_size_adjust()
|
Adjust SafeGraph Data for Sampling Size Differences |
|
scale_to_date()
|
Scale data relative to its value on a date |
|
scale_yoy()
|
Calculate year-on-year change |
|
state_info
|
State Information |


Formats the selected worksheet text box or button or any text item on a chart.
Syntax
FORMAT.TEXT(x_align, y_align, orient_num, auto_text, auto_size, show_key, show_value, add_indent)
FORMAT.TEXT?(x_align, y_align, orient_num, auto_text, auto_size, show_key, show_value, add_indent)
Arguments correspond to check boxes or options in the various tabs on Format Object dialog box. Arguments that correspond to check boxes are logical values. If an argument is TRUE, Microsoft Excel selects the check box; if FALSE, Microsoft Excel clears the check box; if omitted, the current setting is used.
X_align is a number from 1 to 4 specifying the horizontal alignment of the text.
| X_align | Horizontal alignment |
| 1 | Left |
| 2 | Center |
| 3 | Right |
| 4 | Justify |
Y_align is a number from 1 to 4 specifying the vertical alignment of the text.
| Y_align | Vertical alignment |
| 1 | Top |
| 2 | Center |
| 3 | Bottom |
| 4 | Justify |
Orient_num is a number from 0 to 3 specifying the orientation of the text.
| Orient_num | Text orientation |
| 0 | Horizontal |
| 1 | Vertical |
| 2 | Upward |
| 3 | Downward |
Auto_text corresponds to the Automatic Text check box. If the selected text was created with the Data Labels command from the Insert menu and later edited, this option restores the original text. Auto_text is ignored for text boxes on worksheets and macro sheets.
Auto_size corresponds to the Automatic Size check box. If you have changed the size of the border around the selected text, this option restores the border to automatic size. Automatic size makes the border fit exactly around the text no matter how you change the text.
Show_key corresponds to the Show Legend Key Next to Label check box in the Data Labels dialog box. This argument applies only if the selected text is an attached data label on a chart.
Show_value corresponds to the Show Value option button in the Format Data Labels dialog box. This argument applies only if the selected text is an attached data label on a chart.
The following list summarizes which arguments apply to each type of text item.
Add_indent This argument is for only Far East versions of Microsoft Excel.
| Text item | Arguments that apply |
| Worksheet text box or button | X_align, y_align, orient_num, auto_size |
| Attached data label | All arguments |
| Unattached text label | X_align, y_align, orient_num, auto_size |
| Tickmark label | Orient_num |
Related Functions
CREATE.OBJECT Creates an object
FONT.PROPERTIES Applies a font to the selection
FORMULA Enters values into a cell or range or onto a chart
Return to index


idea concept of
answer to this
we're I am going to
traditional and old
we'll I'll
the evolution of families and societies evolution
Traditionnal and past Traditional society
show shows the image
are gathering gathered
seem seems to be
wearied wears
[wearied = tired]
served serves
fourtys forties
at the an younger age
was headed
get gets reflected
Families The evolution of families and societies evolution
right rights for
flighted fought
women women's right
start started to
lead led by
arrestment harassment
what's about the
composed of woman women
woman's women's
all country most countries
there has is still
than male a male-only team
company boss company
gets is getting better
had been established
get got worse
erase eradicate these differences


apollo.gui
Class DetailInfo
java.lang.Object
apollo.gui.DetailInfo
public class DetailInfo
- extends java.lang.Object
This class is mainly for EvidencePanel and its SetDetailPanel, but there is handy methods
that could be widely used. Perhaps it belongs in util? I think it does belong in util
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected static final org.apache.log4j.Logger logger
GENOMIC_LENGTH
public static final int GENOMIC_LENGTH
- See Also:
- Constant Field Values
MATCH_LENGTH
public static final int MATCH_LENGTH
- See Also:
- Constant Field Values
GENOMIC_RANGE
public static final int GENOMIC_RANGE
- See Also:
- Constant Field Values
MATCH_RANGE
public static final int MATCH_RANGE
- See Also:
- Constant Field Values
SCORE
public static final int SCORE
- See Also:
- Constant Field Values
ID
public static final int ID
- See Also:
- Constant Field Values
TYPE
public static final int TYPE
- See Also:
- Constant Field Values
TIER
public static final int TIER
- See Also:
- Constant Field Values
NAME
public static final int NAME
- See Also:
- Constant Field Values
EVIDENCE
public static final int EVIDENCE
- See Also:
- Constant Field Values
GENOMIC_SEQUENCE
public static final int GENOMIC_SEQUENCE
- See Also:
- Constant Field Values
MATCH_SEQUENCE
public static final int MATCH_SEQUENCE
- See Also:
- Constant Field Values
START
public static final int START
- See Also:
- Constant Field Values
END
public static final int END
- See Also:
- Constant Field Values
LOW
public static final int LOW
- See Also:
- Constant Field Values
HIGH
public static final int HIGH
- See Also:
- Constant Field Values
STRAND
public static final int STRAND
- See Also:
- Constant Field Values
Type
public static final int Type
- See Also:
- Constant Field Values
Range
public static final int Range
- See Also:
- Constant Field Values
PHASE
public static final int PHASE
- See Also:
- Constant Field Values
BIOTYPE
public static final int BIOTYPE
- See Also:
- Constant Field Values
END_PHASE
public static final int END_PHASE
- See Also:
- Constant Field Values
CODING_PROPERTIES
public static final int CODING_PROPERTIES
- See Also:
- Constant Field Values
DetailInfo
public DetailInfo()
getPropertyForString
public static java.lang.Integer getPropertyForString(java.lang.String name)
getAllProperties
public static java.util.Enumeration getAllProperties()
getAllPropertyStrings
public static java.util.Enumeration getAllPropertyStrings()
getPrettyNameForString
public static java.lang.String getPrettyNameForString(java.lang.String key)
getPrettyNameForProperty
public static java.lang.String getPrettyNameForProperty(java.lang.Integer key)
getPrettyNamesFromStrings
public static java.util.Vector getPrettyNamesFromStrings(java.util.Vector values)
getRow
public static java.util.Vector getRow(java.util.Vector def,
SeqFeatureI feature)
getPropertyForFeature
public static java.lang.Object getPropertyForFeature(java.lang.String prop,
SeqFeatureI feature)
getStrand
public static java.lang.Object getStrand(SeqFeatureI feature)
getLow
public static java.lang.Object getLow(SeqFeatureI feature)
getHigh
public static java.lang.Object getHigh(SeqFeatureI feature)
getStart
public static java.lang.Object getStart(SeqFeatureI feature)
getEnd
public static java.lang.Object getEnd(SeqFeatureI feature)
getPhase
public static java.lang.Object getPhase(SeqFeatureI feature)
getEndPhase
public static java.lang.Object getEndPhase(SeqFeatureI feature)
getCodingProperties
public static java.lang.Object getCodingProperties(SeqFeatureI feature)
getEvidence
public static java.lang.Object getEvidence(SeqFeatureI feature)
getTranslationLength
public static java.lang.Object getTranslationLength(SeqFeatureI feature)
getTranslation
public static java.lang.String getTranslation(SeqFeatureI feature)
getMatchSequence
public static java.lang.String getMatchSequence(SeqFeatureI feature)
getGenomicSequence
public static java.lang.String getGenomicSequence(SeqFeatureI feature)
getID
public static java.lang.String getID(SeqFeatureI feature)
getName
public static java.lang.String getName(SeqFeatureI feature)
- The whole logic of this section has been put into the individual
getDisplayName() methods of the various classes
getScore
public static java.lang.Object getScore(SeqFeatureI feature)
getGenomicLength
public static java.lang.Object getGenomicLength(SeqFeatureI feature)
getMatchLength
public static java.lang.Object getMatchLength(SeqFeatureI feature)
getGenomicRange
public static java.lang.Object getGenomicRange(SeqFeatureI feature)
getMatchRange
public static java.lang.Object getMatchRange(SeqFeatureI feature)
getType
public static java.lang.Object getType(SeqFeatureI feature)
getBioType
public static java.lang.String getBioType(SeqFeatureI feature)
getTier
public static java.lang.Object getTier(SeqFeatureI feature)
getPropertyType
public static java.lang.String getPropertyType(SeqFeatureI feature)
- Changed return from Object to String since FeatureProperty.getDisplayType
is a String - rename this getVisualType?
getHitFeature
protected static SeqFeatureI getHitFeature(SeqFeatureI feature)


Coding Quiz Challenge
Click the button below to start!
Start
Time Left
:
A
B
C
Try to answer the following code-related questions within the time limit. Keep in mind that incorrect answers will penalize your score/time by ten seconds!


SKY UX Builder provides two methods for localization: skyLibResources for libraries and skyAppResources for SPAs.
Localization for libraries
You must set localization strings for libraries when publishing to NPM because libraries do not fetch them at runtime like SPAs. To set localization strings, follow the procedures below.
Install SKY UX Builder
-
In the command prompt, run the following command from your library's root directory.
npm install @skyux-sdk/builder-plugin-skyux --save-dev --save-exact
-
Add the plugin to your skyuxconfig.json file.
{
"plugins": [
"@skyux-sdk/builder-plugin-skyux"
]
}
Create a resources provider
-
Create a plugin-resources directory in /src/app/public/plugin-resources. The name and location of the directory are important.
-
In the plugin-resources directory, create a file named my-library-resources-provider.ts where my-library is the name of your library.
-
In the new file, import SkyAppLocaleInfo and SkyLibResourcesProvider from the @skyux/i18n library and export a MyLibraryResourcesProvider class where MyLibrary is the name of your library.
import {
SkyAppLocaleInfo,
SkyLibResourcesProvider
} from '@skyux/i18n';
export class MyLibraryResourcesProvider implements SkyLibResourcesProvider {
public getString: (localeInfo: SkyAppLocaleInfo, name: string) => string;
}
Create a resources module
The resources module allows all the modules in your library to access the locale resources strings.
In a shared directory, create the following Angular module where MyLibrary is the name of your library.
import {
NgModule
} from '@angular/core';
import {
SkyI18nModule,
SKY_LIB_RESOURCES_PROVIDERS
} from '@skyux/i18n';
import {
MyLibraryResourcesProvider
} from '../../plugin-resources/my-library-resources-provider';
@NgModule({
providers: [{
provide: SKY_LIB_RESOURCES_PROVIDERS,
useClass: MyLibraryResourcesProvider,
multi: true
}],
exports: [
SkyI18nModule
]
})
export class MyLibraryResourcesModule { }
Additional setup
For modules that require access to locale resource strings, import MyLibraryResourcesModule where MyLibrary is the name of your library. This allows the modules to use the skyLibResources pipe and the SkyLibResourcesService service.
import {
MyLibraryResourcesModule
} from './shared/my-library-resources.module';
@NgModule({
// ...
imports: [
MyLibraryResourcesModule
]
// ...
})
export class MyLibrarySomeOtherModule { }
Localization for SPAs
SKY UX Builder enables you to declare localization strings in a JSON file and then reference those strings throughout your SPA using the skyAppResources pipe or the SkyAppResourcesService service in @skyux/i18n.
Declare and reference localization strings
-
In the src/assets/locales folder, declare localization strings to use throughout your SPA in the resources_en_US.json file. Use JSON structure to specify a string name, and then provide the string and a description.
{
"string_name": {
"message": "The localization string",
"_description": "A description of the string for the translator."
}
}
-
Reference the localization strings with the skyAppResources pipe or the SkyAppResourcesService service.
-
For the skyAppResources pipe, pull the string into your template by name.
{{ 'string_name' | skyAppResources }}
-
For the SkyAppResourcesService service in @skyux/i18n, pull the string using getString.
this.resources.getString('string_name')
.subscribe((value) => {
/*do something with the string*/
});
Use templated strings
-
In the src/assets/locales folder, open the resources_en_US.json file and declare templated localization strings with .NET-style tokens in the string that you can replace with dynamic values. For example:
{
"string_name": {
"message": "{0} gave money to the {1} fund",
"_description": "A string with .NET-style tokens to replace with constituentName and fundName."
}
}
-
Reference the localization string using the skyAppResources pipe or the SkyAppResourcesService service and supply values to replace the .NET-style tokens in the string.
-
For the skyAppResources pipe, place {{ 'string_name' | skyAppResources }} in your template and insert values for the .NET-style tokens. For example:
{{ 'string_name' | skyAppResources:constituentName:fundName }}
-
For the SkyAppResourcesService service in @skyux/i18n, pull the string using getString and insert values for the .NET-style tokens. For example:
this.resources.getString('string_name',constituentName,fundName)
.subscribe((value) => {
/*do something with the string*/
});
Use the default locale provider
If you deploy your application through SKY UX Host and want to use the locale provided by the browser, no additional configuration is necessary.
Provide a custom locale provider
If your application determines the locale through a mechanism other than the browser's default, such as a setting stored in a database, you can provide a custom implementation of the SkyAppLocaleProvider.
For example, here is a sample app-extras.module.ts file:
import { NgModule } from '@angular/core';
import { TestLocaleProvider } from './test-locale-provider'
@NgModule({
providers: [{
provide: SkyAppLocaleProvider,
useClass: TestLocaleProvider
}]
})
export class AppExtrasModule { }
And here is a sample test-locale-provider.ts file:
import { NgModule } from '@angular/core';
import { SkyAppLocaleProvider } from '@skyux/i18n';
import { of } from 'rxjs';
export class TestLocaleProvider extends SkyAppLocaleProvider {
public getLocaleInfo(): Observable<SkyAppLocaleInfo> {
return of({
locale: 'en-GB'
});
}
}


To enlighten the concept that Ayurveda is not an alternative medical science, it is an ultimate science of life which also has solutions for diseases which are stated as incurable in modern science. To explore Ayurvedic fundamental principles which aid you to correct misconceptions about Ayurveda, lifestyle, dietary habits & many more things regarding health; thus help you to enhance your health condition. To minimize counter sell of Ayurvedic medicines & bring awareness among people that always consult your physician before taking random medicines.


By Gabriel da Silva Zech and Francesco Danovi
Prepared for Intro to Data Science, taught by Simon Munzert
Hertie School, Berlin


If you enable Google Drive synchronization, your vocabulary will be automatically backed up to your Google drive each time you add or remove words from it. Maximum sync frequency is once per 30 minutes, although you can always press "Sync now" button to force manual synchronization. If you use Vocabulary Sidebar extension in multiple browsers, their vocabularies will be synchronized through your Google Drive. Vocabulary Sidebar files will be saved to the "Words Discoverer Sync" folder in your Google Drive root directory. Your vocabulary can be found in "my_vocabulary.txt" file. ".my_vocabulary.backup" is a technical file which stores all added and deleted words. To stop synchronization press the "Stop Sync" button which will appear once synchronization is enabled. If extension icon shows red "err" badge, it means that synchronization has stopped due to an error. In this case you can try to press "Synchronize Now" button again or, if it doesn't help, try to restart the browser. The most convenient way to view your vocabulary in google drive without downloading is to use "Preview" button in the google drive file menu, see the screenshot below:


A guide to me is someone who is called to open others to their spiritual nature.  A guide is different than a sitter who just watches over someone during a trip. A sitter usually does not provide the material and/ or direct the individual in any way. As a guide, I usually am drawn to someone who has received the calling but doesn't know what it is or what to do about it. Often these people are in some form of trauma or emotional upset. They usually have never had a psychoactive experience.
When i establish contact with someone i feel is ready, i work on getting their trust and try to develop their understanding that they are ready to enter the realm of higher consciousness. Then i provide the material and explain what it is, as i believe one should know what they are putting in their body and how much. I then work with them to develop the mind set to be open to whatever comes up and to surrender to the experience.
The setting comes next, usually in their home or wherever they tell me they would be most comfortable, safe and undisturbed by outside distractions. I try to build a nest, usually on the floor in the living room with pads, blankets, pillows, water, music (new age, no voice), unplug phone etc.
Having instructed them to not have eaten for at least 6 hours, i then go to the experience which starts with getting relaxed and discussing the material and answering questions that come up. This time, just before and after ingesting is principally trying to minimize fear and get the person to open to the experience. I usually try not to interfere with the persons journey unless they want to talk or are in difficulty. with this type of preparation i seldom have a person get in trouble. During the session i make sure they drink enough water and generally see to their needs.
Afterward, i give suggestions on integrating what came up and not to do it again for at least 30 days
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


[[extend 'layout.html']] Friends Online Friend 1 Listening to Song - Artist Friend 2 Listening to Song - Artist Friend 3 Listening to Song - Artist Friend 4 Listening to Song - Artist Friend 5 Listening to Song - Artist Theme Top Songs & Artists Stats & Analytics Start Group Listen
Listening to Song - Artist
Top Songs & Artists
Stats & Analytics
Start Group Listen


The site/domain that I am covering for this report is MSN
I think the purpose of the site is to provide user with news, shopping, traveling, entertainment, and services, an all in one place platform for users to access.
The criteria I am using to analyze the site are don’t make me think, how users really use the web, billboard design, and omit needless words.
1) Don’t make me think- What's working are information and headlines from news, entertainment, and sports, and everything else are there on the site main homepage. What’s not working is the homepage of the site cluster with too many headlines and pictures as well as small size fonts that can make it difficult to focus on anything, too much distraction, and could lead to confusion of where to start or where to click.
2) How users really use the web- What's working is pictures on the site allow users to quickly identify or get their attention to click on the headline. What's not working is most pictures are too small to see and could lead to users moving on to only larger pictures.
3) Billboard design- What's working is lots of pictures and headlines for users to scan thru, what's not working is too many pictures, headlines, and small fonts that can take longer time to scan and understand what they are.
4) Omit needless words- What's working is headlines and sections for everything in one location without having to go anywhere else for information. What's not working is too many words on the site that users can get tired of reading and looking at to try and navigate thru the site and each section.
Placeholder text by Space Ipsum. Photographs from MSN site.


`fit1_pvl` uses several functions in the package qtl2pleio to fit the linear mixed effects model for a single d-tuple of markers. Creation of `fit1_pvl` - from code that originally resided in `scan_pvl`, enabled parallelization via the `parallel` R package.
fit1_pvl(indices, start_snp, probs, addcovar, inv_S, S, pheno)
| indices | a vector of indices for extracting elements of `probs` array |
|---|---|
| start_snp | an integer to specify the index of the marker where the scan - in call to scan_pvl - starts. This argument is needed because `mytab` has only relative indices (relative to the `start_snp` marker) |
| probs | founder allele probabilities matrix |
| addcovar | additive covariates matrix |
| inv_S | inverse covariance matrix for the vectorized phenotype |
| S | covariance matrix for the vectorized phenotype, ie, the inverse of inv_S |
| pheno | a n by d phenotypes matrix |
a number, the log-likelihood for the specified model
# read data iron <- qtl2::read_cross2(system.file("extdata", "iron.zip", package="qtl2")) # insert pseudomarkers into map map <- qtl2::insert_pseudomarkers(iron$gmap, step=1) # calculate genotype probabilities probs <- qtl2::calc_genoprob(iron, map, error_prob=0.002) # grab phenotypes and covariates; ensure that covariates have names attribute pheno <- iron$pheno # leave-one-chromosome-out kinship matrices kinship <- qtl2::calc_kinship(probs, "loco") # get founder allele probabilites probs <- qtl2::genoprob_to_alleleprob(probs) cc_out <- calc_covs(pheno, kinship$`1`, max_iter = 10000, max_prec = 1e-07, covariates = NULL) Vg <- cc_out$Vg Ve <- cc_out$Ve # define Sigma Sigma <- calc_Sigma(Vg, Ve, kinship$`1`) # define Sigma_inv Sigma_inv <- solve(Sigma) # prepare table of marker indices for each call of scan_pvl mytab <- prep_mytab(d_size = 2, n_snp = 10) # set up parallel analysis fit1_pvl(mytab[1, ], start_snp = 1, probs = probs$`1`, addcovar = NULL, inv_S = Sigma_inv, S = Sigma, pheno = pheno )#> [,1] #> [1,] -3269.198


GD: Geographical Detectors
Geographical detectors for measuring spatial stratified heterogeneity,
as described in Jinfeng Wang (2010) <doi:10.1080/13658810802443457> and
Jinfeng Wang (2016) <doi:10.1016/j.ecolind.2016.02.052>. Includes the
optimal discretization of continuous data, four primary functions of
geographical detectors, comparison of size effects of spatial unit and
the visualizations of results. The descriptions of the package, methods
and case datasets refer to the citation information below.
Downloads:
Reverse dependencies:
Linking:
Please use the canonical form
https://CRAN.R-project.org/package=GD
to link to this page.


--- layout: jsdoc title: "Home" jsdocNav: - Classes: - SeleniumAssistant - WebDriverBrowser ---
layout: index title: "Home"
This library is designed to make using selenium a little easier in terms of finding different releases of a particular browser and generating a web driver instance.
If you have feedback or find bugs, please feel free to file issues on the github repo.
To use this package, you'll need to set include / download the drivers yourself. For example:
To use Google Chrome:
npm install --save chromedriver
To use Opera:
npm install --save operadriver
To use Firefox there isn't a helpful wrapper, but you can use the SeleniumAssistant#downloadFirefoxDriver to make the appropriate driver available:
const seleniumAssistant = require('selenium-assistant');
seleniumAssistant.downloadFirefoxDriver()
.then(() => {
console.log('Finished downloading Firefox\'s Driver');
});
Below is a list of all the reference documentation for this project. You can find links to these in the navigation drawer as well.


×
Menu
About
Contact
Cookie Policy
Disclaimer
Privacy Policy
Terms and Conditions
Code of Conduct
RSS Feed
Sitemap
Personal Website
Podcast
{{ partial "icons/ui/menu3.html"}}


--- layout: page title: About permalink: /about/ main_image_path: main_image_caption: frontpage: false homepage_description_markdown: >- frontpagetitle: About images: - image_path: image_title: image_description: _options: layout: hidden: true image_path: uploads_dir: "assets/images/:year" width: 1200 height: 1200 resize_style: contain mime_type: image/jpeg main_image_path: uploads_dir: "assets/images/:year" width: 1200 height: 1200 resize_style: contain mime_type: image/jpeg content: uploads_dir: "assets/:year" _comments: title: Page title permalink: Be careful editing this main_image_path: Image used to represent your page frontpage: Show this page on the homepage homepage_description_markdown: Text used on homepage if shown frontpagetitle: Alternative title for home page use images: Add and edit images here ---
Surface quality, pattern with hidden detail, combined with multi viewing points has always been of interest to me. In my early work I used maps and aerial photography as the starting point for decoration, using coloured clay, oxides and engobes to build layers and blocks of pattern. Glaze was used sparingly to highlight selected areas and interiors.
My recent pieces have evolved from the use of layers and colour and I am still very much interested in hidden detail and surface quality. I like the suggestion of what might have once been and archaeological finds and remains, with their contrast in materials and surfaces, have led to where I am at today. The use of glaze has become more important and their action upon the various clays, stains, oxides and slips are crucial to the final result.
Each piece is formed from slabs which are built using layers of different clays, some printed with plaster blocks, some coloured with oxide or stain and others plain. Pieces of decorated clay are placed face down and joined together, this slab is then used to construct the desired form. More colour is either added when the piece is turned over, after it is fully constructed or after the biscuit firing. A number of glazes are used on each panel or vessel to achieve the variety of colour response and some are fired 3 or 4 times to achieve the desired finish; they are designed and made with both interior and exterior use in mind.
The pieces are meant to be touched, their tactile quality and surface contrasts are an integral part of the final intention.
A member of the Craft Potters Association of Great Britain


Helper class to re-map PyYAML events to method calls.
By default, PyYAML generates its events via a Python generator. This class
is a helper that iterates over the events from the PyYAML parser and forwards
them to a handle class in the form of method calls. For simplicity, the
underlying event is forwarded to the handler as a parameter to the call.
This object does not itself produce iterable objects, but is really a mapping
to a given handler instance.
Example use:
class PrintDocumentHandler(object):
def DocumentStart(event):
print "A new document has been started"
EventListener(PrintDocumentHandler()).Parse('''
key1: value1
---
key2: value2
'''
>>> A new document has been started
A new document has been started
In the example above, the implemented handler class (PrintDocumentHandler)
has a single method which reports each time a new document is started within
a YAML file. It is not necessary to subclass the EventListener, merely it
receives a PrintDocumentHandler instance. Every time a new document begins,
PrintDocumentHandler.DocumentStart is called with the PyYAML event passed
in as its parameter..
| def google.appengine.api.yaml_listener.EventListener.__init__ |
( |
|
self, |
|
|
|
event_handler |
|
) |
| |
Helper class to re-map PyYAML events to method calls.
By default, PyYAML generates its events via a Python generator. This class
is a helper that iterates over the events from the PyYAML parser and forwards
them to a handle class in the form of method calls. For simplicity, the
underlying event is forwarded to the handler as a parameter to the call.
This object does not itself produce iterable objects, but is really a mapping
to a given handler instance.
Example use:
class PrintDocumentHandler(object):
def DocumentStart(event):
print "A new document has been started"
EventListener(PrintDocumentHandler()).Parse('''
key1: value1
---
key2: value2
'''
>>> A new document has been started
A new document has been started
In the example above, the implemented handler class (PrintDocumentHandler)
has a single method which reports each time a new document is started within
a YAML file. It is not necessary to subclass the EventListener, merely it
receives a PrintDocumentHandler instance. Every time a new document begins,
PrintDocumentHandler.DocumentStart is called with the PyYAML event passed
in as its parameter..
Initialize PyYAML event listener.
Constructs internal mapping directly from event type to method on actual
handler. This prevents reflection being used during actual parse time.
Args:
event_handler: Event handler that will receive mapped events. Must
implement at least one appropriate handler method named from
the values of the _EVENT_METHOD_MAP.
Raises:
ListenerConfigurationError if event_handler is not an EventHandler.


Trevor Bedford (@trvrb)
{{ page.date | date: "%-d %b %Y" }}
{{ page.event }}
{{ page.venue }}
Project to provide a real-time view of the evolving influenza population
All in collaboration with Richard Neher
Clade frequencies $X$ derive from the fitnesses $f$ and frequencies $x$ of constituent viruses, such that
$$\hat{X}_v(t+\Delta t) = \sum_{i:v} x_i(t) \, \mathrm{exp}(f_i \, \Delta t)$$
This captures clonal interference between competing lineages
Influenza: WHO Global Influenza Surveillance Network, GISAID, Worldwide Influenza Centre at the Francis Crick Institute, Richard Neher, Colin Russell, Andrew Rambaut
Ebola: data producers, Gytis Dudas, Andrew Rambaut, Philipe Lemey, Richard Neher, Nick Loman, Ian Goodfellow, Matt Cotten, Paul Kellam, Danny Park, Kristian Andersen, Pardis Sabeti
Zika: data producers, Nick Loman, Nuno Faria, Oliver Pybus, Andrew Rambaut, Richard Neher, Charlton Callender
Statements of support from major journals and from the WHO