Time Series Forecasting¶
In this tutorial, we will demonstrate how to build a model for time series forecasting in NumPyro. Specifically, we will replicate the Seasonal, Global Trend (SGT) model from the Rlgt: Bayesian Exponential Smoothing Models with Trend Modifications package. The time series data that we will use for this tutorial is the lynx dataset, which contains annual numbers of lynx trappings from 1821 to 1934 in Canada.
[1]:
import os
from IPython.display import set_matplotlib_formats
import matplotlib.pyplot as plt
import pandas as pd
import jax.numpy as np
from jax import lax, random, vmap
from jax.nn import softmax
import numpyro; numpyro.set_host_device_count(4)
import numpyro.distributions as dist
from numpyro.diagnostics import autocorrelation, hpdi
from numpyro import handlers
from numpyro.infer import MCMC, NUTS
if "NUMPYRO_SPHINXBUILD" in os.environ:
set_matplotlib_formats('svg')
assert numpyro.__version__.startswith('0.2.4')
Data¶
First, lets import and take a look at the dataset.
[2]:
URL = "https://raw.githubusercontent.com/vincentarelbundock/Rdatasets/master/csv/datasets/lynx.csv"
lynx = pd.read_csv(URL, index_col=0)
data = lynx["value"].values
print("Length of time series:", data.shape[0])
plt.figure(figsize=(8, 4))
plt.plot(lynx["time"], data)
plt.show()
Length of time series: 114
The time series has a length of 114 (a data point for each year), and by looking at the plot, we can observe seasonality in this dataset, which is the recurrence of similar patterns at specific time periods. e.g. in this dataset, we observe a cyclical pattern every 10 years, but there is also a less obvious but clear spike in the number of trappings every 40 years. Let us see if we can model this effect in NumPyro.
In this tutorial, we will use the first 80 values for training and the last 34 values for testing.
[3]:
y_train, y_test = np.array(data[:80], dtype=np.float32), data[80:]
Model¶
The model we are going to use is called Seasonal, Global Trend, which when tested on 3003 time series of the M-3 competition, has been known to outperform other models originally participating in the competition:
, where level
and s
follows the following recursion rules:
A more detailed explanation for SGT model can be found in this vignette from the authors of the Rlgt package. Here we summarize the core ideas of this model:
Student’s t-distribution, which has heavier tails than normal distribution, is used for the likelihood.
The expected value
exp_val
consists of a trending component and a seasonal component:The trend is governed by the map \(x \mapsto x + ax^b\), where \(x\) is
level
, \(a\) iscoef_trend
, and \(b\) ispow_trend
. Note that when \(b \sim 0\), the trend is linear with \(a\) is the slope, and when \(b \sim 1\), the trend is exponential with \(a\) is the rate. So that function can cover a large family of trend.When time changes,
level
ands
are updated to new values. Coefficientslevel_sm
ands_sm
are used to make the transition smoothly.
When
powx
is near \(0\), the error \(\sigma_t\) will be nearly constant while whenpowx
is near \(1\), the error will be propotional to the expected value.There are several varieties of SGT. In this tutorial, we use generalized seasonality and seasonal average method.
Note that level
and s
are updated recursively while we collect the expected value at each time step. NumPyro uses JAX in the backend to JIT compile many critical parts of the NUTS algorithm, including the verlet integrator and the tree building process. However, doing so using Python’s for
loop in the model will result in a long compilation time for the model, so we use jax.lax.scan
instead. A detailed explanation for using this utility can be
found in lax.scan documentation. Here we use it to collect expected values while the pair (level, s)
plays the role of carrying state.
[4]:
def scan_exp_val(y, init_s, level_sm, s_sm, coef_trend, pow_trend, pow_season):
seasonality = init_s.shape[0]
def scan_fn(carry, t):
level, s, moving_sum = carry
season = s[0] * level ** pow_season
exp_val = level + coef_trend * level ** pow_trend + season
exp_val = np.clip(exp_val, a_min=0)
moving_sum = moving_sum + y[t] - np.where(t >= seasonality, y[t - seasonality], 0.)
level_p = np.where(t >= seasonality, moving_sum / seasonality, y[t] - season)
level = level_sm * level_p + (1 - level_sm) * level
level = np.clip(level, a_min=0)
new_s = (s_sm * (y[t] - level) / season + (1 - s_sm)) * s[0]
s = np.concatenate([s[1:], new_s[None]], axis=0)
return (level, s, moving_sum), exp_val
level_init = y[0]
s_init = np.concatenate([init_s[1:], init_s[:1]], axis=0)
moving_sum = level_init
(last_level, last_s, moving_sum), exp_vals = lax.scan(
scan_fn, (level_init, s_init, moving_sum), np.arange(1, y.shape[0]))
return exp_vals, last_level, last_s
With our utility function defined above, we are ready to specify the model using NumPyro primitives. In NumPyro, we use the primitive sample(name, prior)
to declare a latent random variable with a corresponding prior
. These primitives can have custom interpretations depending on the effect handlers that are used by NumPyro inference algorithms in the backend. e.g. we can condition on specific values using the substitute
handler, or record values at these sample sites in the
execution trace using the trace
handler. Note that these details are not important for specifying the model, or running inference, but curious readers are encouraged to read the tutorial on effect handlers in Pyro.
[5]:
def sgt(y, seasonality):
# heuristically, standard derivation of Cauchy prior depends on the max value of data
cauchy_sd = np.max(y) / 150
nu = numpyro.sample("nu", dist.Uniform(2, 20))
powx = numpyro.sample("powx", dist.Uniform(0, 1))
sigma = numpyro.sample("sigma", dist.HalfCauchy(cauchy_sd))
offset_sigma = numpyro.sample("offset_sigma", dist.TruncatedCauchy(low=1e-10, loc=1e-10,
scale=cauchy_sd))
coef_trend = numpyro.sample("coef_trend", dist.Cauchy(0, cauchy_sd))
pow_trend_beta = numpyro.sample("pow_trend_beta", dist.Beta(1, 1))
# pow_trend takes values from -0.5 to 1
pow_trend = 1.5 * pow_trend_beta - 0.5
pow_season = numpyro.sample("pow_season", dist.Beta(1, 1))
level_sm = numpyro.sample("level_sm", dist.Beta(1, 2))
s_sm = numpyro.sample("s_sm", dist.Uniform(0, 1))
init_s = numpyro.sample("init_s", dist.Cauchy(0, y[:seasonality] * 0.3))
exp_val, last_level, last_s = scan_exp_val(
y, init_s, level_sm, s_sm, coef_trend, pow_trend, pow_season)
omega = sigma * exp_val ** powx + offset_sigma
numpyro.sample("y", dist.StudentT(nu, exp_val, omega), obs=y[1:])
# we return last `level` and last `s` for forecasting
return last_level, last_s
Note that all prior parameters are retrieved from this file in the original source.
Inference¶
First, we want to choose a good value for seasonality
. Following the demo in Rlgt, we will set seasonality=38
. Indeed, this value can be guessed by looking at the plot of the training data, where the second order seasonality effect has a periodicity around \(40\) years. Note that \(38\) is also one of the highest-autocorrelation lags.
[6]:
print("Lag values sorted according to their autocorrelation values:\n")
print(np.argsort(autocorrelation(y_train))[::-1])
Lag values sorted according to their autocorrelation values:
[ 0 67 57 38 68 1 29 58 37 56 28 10 19 39 66 78 47 77 9 79 48 76 30 18
20 11 46 59 69 27 55 36 2 8 40 49 17 21 75 12 65 45 31 26 7 54 35 41
50 3 22 60 70 16 44 13 6 25 74 53 42 32 23 43 51 4 15 14 34 24 5 52
73 64 33 71 72 61 63 62]
Now, let us run \(4\) MCMC chains (using the No-U-Turn Sampler algorithm) with \(5000\) warmup steps and \(5000\) sampling steps per each chain.  First, we will make some utilities to do forecasting given a sample. Note that to retrieve the last level
and last s
value, we run the model forward by constraining the latent sites to a sample from the posterior using the substitute
handler:
... level, s = substitute(sgt, sample)(y, seasonality)
[8]:
# Ref: https://github.com/cbergmeir/Rlgt/blob/master/Rlgt/R/forecast.rlgtfit.R
def sgt_forecast(future, sample, y, level, s):
seasonality = s.shape[0]
moving_sum = np.sum(y[-seasonality:])
pow_trend = 1.5 * sample["pow_trend_beta"] - 0.5
yfs = [0] * (seasonality + future)
for t in range(future):
season = s[0] * level ** sample["pow_season"]
exp_val = level + sample["coef_trend"] * level ** pow_trend + season
exp_val = np.clip(exp_val, a_min=0)
omega = sample["sigma"] * exp_val ** sample["powx"] + sample["offset_sigma"]
yf = numpyro.sample("yf[{}]".format(t), dist.StudentT(sample["nu"], exp_val, omega))
yf = np.clip(yf, a_min=1e-30)
yfs[t] = yf
moving_sum = moving_sum + yf - np.where(t >= seasonality,
yfs[t - seasonality], y[-seasonality + t])
level_p = moving_sum / seasonality
level_tmp = sample["level_sm"] * level_p + (1 - sample["level_sm"]) * level
level = np.where(level_tmp > 1e-30, level_tmp, level)
# s is repeated instead of being updated
s = np.concatenate([s[1:], s[:1]], axis=0)
def forecast(future, rng_key, sample, y, seasonality):
level, s = handlers.substitute(sgt, sample)(y, seasonality)
forecast_model = handlers.seed(sgt_forecast, rng_key)
forecast_trace = handlers.trace(forecast_model).get_trace(future, sample, y, level, s)
results = [np.clip(forecast_trace["yf[{}]".format(t)]["value"], a_min=1e-30)
for t in range(future)]
return np.stack(results, axis=0)
Then, we can use jax.vmap to get prediction given a collection of samples. This allows us to vectorize the computation across the test dataset which can be dramatically faster as compared to using for-loop to collect predictions per test data point.
[9]:
rng_keys = random.split(random.PRNGKey(3), samples["nu"].shape[0])
forecast_marginal = vmap(lambda rng_key, sample: forecast(
len(y_test), rng_key, sample, y_train, seasonality=38))(rng_keys, samples)
Finally, let’s get sMAPE, root mean square error of the prediction, and visualize the result with the mean prediction and the 90% highest posterior density interval (HPDI).
[10]:
y_pred = np.mean(forecast_marginal, axis=0)
sMAPE = np.mean(np.abs(y_pred - y_test) / (y_pred + y_test)) * 200
msqrt = np.sqrt(np.mean((y_pred - y_test) ** 2))
print("sMAPE: {:.2f}, rmse: {:.2f}".format(sMAPE, msqrt))
sMAPE: 62.63, rmse: 1242.24
[11]:
plt.figure(figsize=(8, 4))
plt.plot(lynx["time"], data)
t_future = lynx["time"][80:]
hpd_low, hpd_high = hpdi(forecast_marginal)
plt.plot(t_future, y_pred, lw=2)
plt.fill_between(t_future, hpd_low, hpd_high, alpha=0.3)
plt.title("Forecasting lynx dataset with SGT model (90% HPDI)")
plt.show()
As we can observe, the model has been able to learn both the first and second order seasonality effects, i.e. a cyclical pattern with a periodicity of around 10, as well as spikes that can be seen once every 40 or so years. Moreover, we not only have point estimates for the forecast but can also use the uncertainty estimates from the model to bound our forecasts.
Acknowledgements¶
We would like to thank Slawek Smyl for many helpful resources and suggestions. Fast inference would not have been possible without the support of JAX and the XLA teams, so we would like to thank them for providing such a great open-source platform for us to build on, and for their responsiveness in dealing with our feature requests and bug reports.
References¶
[1] Rlgt: Bayesian Exponential Smoothing Models with Trend Modifications
, Slawek Smyl, Christoph Bergmeir, Erwin Wibowo, To Wang Ng, Trustees of Columbia University


Syntax:
let ({var | (var [init-form])}*) declaration* form* => result*
let* ({var | (var [init-form])}*) declaration* form* => result*
Arguments and Values:
var---a symbol.
init-form---a form.
declaration---a declare expression; not evaluated.
form---a form.
results---the values returned by the forms.
Description:
let and let* create new variable bindings and execute a series of forms that use these bindings. let performs the bindings in parallel and let* does them sequentially.
The form
(let ((var1 init-form-1) (var2 init-form-2) ... (varm init-form-m)) declaration1 declaration2 ... declarationp form1 form2 ... formn)first evaluates the expressions init-form-1, init-form-2, and so on, in that order, saving the resulting values. Then all of the variables varj are bound to the corresponding values; each binding is lexical unless there is a special declaration to the contrary. The expressions formk are then evaluated in order; the values of all but the last are discarded (that is, the body of a let is an implicit progn).
let* is similar to let, but the bindings of variables are performed sequentially rather than in parallel. The expression for the init-form of a var can refer to vars previously bound in the let*.
The form
(let* ((var1 init-form-1) (var2 init-form-2) ... (varm init-form-m)) declaration1 declaration2 ... declarationp form1 form2 ... formn)first evaluates the expression init-form-1, then binds the variable var1 to that value; then it evaluates init-form-2 and binds var2, and so on. The expressions formj are then evaluated in order; the values of all but the last are discarded (that is, the body of let* is an implicit progn).
For both let and let*, if there is not an init-form associated with a var, var is initialized to nil.
The special form let has the property that the scope of the name binding does not include any initial value form. For let*, a variable's scope also includes the remaining initial value forms for subsequent variable bindings.
Examples:
(setq a 'top) => TOP (defun dummy-function () a) => DUMMY-FUNCTION (let ((a 'inside) (b a)) (format nil "~S ~S ~S" a b (dummy-function))) => "INSIDE TOP TOP" (let* ((a 'inside) (b a)) (format nil "~S ~S ~S" a b (dummy-function))) => "INSIDE INSIDE TOP" (let ((a 'inside) (b a)) (declare (special a)) (format nil "~S ~S ~S" a b (dummy-function))) => "INSIDE TOP INSIDE"
The code
(let (x) (declare (integer x)) (setq x (gcd y z)) ...)is incorrect; although x is indeed set before it is used, and is set to a value of the declared type integer, nevertheless x initially takes on the value nil in violation of the type declaration.
Affected By: None.
Exceptional Situations: None.
See Also:
Notes: None.


Kyle Hines highlights Round 8 Top 10 Plays
Plenty of impressive efforts made out EuroLeague’s latest Top 10 installment.
By Eurohoops Team/<EMAIL_ADDRESS>Kyle Hines in blocking fashion took down Jan Vesely and secured first place in the Turkish Airlines EuroLeague Regular Season Round 8 Top 10 Plays as well. Tonye Jekiri, Kostas Papanikolaou, Tarik Black, Greg Monroe, Shane Larkin, Jacob Wiley, Ognjen Dobric, Alexey Shved and Quino Colom also made the cut.


Psalms 45:12
And the daughter of Tyre shall be there with a gift; even the rich among the people shall intreat thy favour.


Lightweight, 6-pound cordless vacuum features 150 Air Watts of power and a filter that traps 100% of dust and dirt.
Keeps your filter clean by preventing build up of derbis.
The Samsung Jet 70 Pet Cordless Stick Vacuum is your go-to for everyday cleaning. Featuring 150 Air Watts* of suction power and a dust filter that traps around 99.999%** of microdust, you’ll vacuum the many surfaces of your home with incredible precision. Use your vacuum for up to 40 minutes of uninterrupted cleaning before a recharge is needed or easily swap the battery with a spare.*** The lightweight design makes it easy to vacuum stairs, reach beneath sofas, and clean high cabinets. Enjoy many different specialized brushes and tools to choose from, with the highlight being the Turbo Action Brush Rotating more than 3,700 times a minute and with 180° swivel flexibility, the brush cleans dust, hair, and other debris on multiple surfaces. Use the cordless vacuum cleaner without interruption as consistent suction prevents dirt build-up on the filter**** and rest easy knowing the filter is dishwasher safe. When you’re done cleaning, mount your vacuum on a wall or in a closet to both maximize space and charge your device at the same time. *Tested internally using IEC62885-2. cl.5.9, and IEC62885-2, cl. 5.11 test standards. **Based on internal testing, using Max mode, in accordance with the IEC62885-2 cl. 5.11 standard. ***Stated run time applies to the minimum power level with a non motorized tool attached. Spare battery purchased separately. ****Based on internal testing using the IEC62885-2. cl.5.9. compared with Samsung VS80N8014KR/EN.
 This one by Samsung is fantastic. It’s very light and easy to clean. I very much appreciate the fact that unlike some other cordless vacuums the battery can be charged separately from the main unit so I did not need to install the mounting system. The charging base is convertible so it can function as either a mounting charger and storage for the vacuum or can be easily reconfigured to be a table top charger for just the battery and the rest of vacuum can be stored in a closet. This system makes it possible to get an extra battery to keep on hand for extra cleaning time if needed. I have found the charge time perfectly adequate for my needs so far. My house is so much cleaner. So easy to grab it and pick up bugs and dog hair as needed!
My husband bought me a Dyson 5 years ago,,,,,then another 2 years later...they both now sit in the closet NOT WORKING! Used them for kitchen and dining room only so its not as if they were overworked! Calling Dyson for last month is impossible with COVID...no one answers and no chat available so I had to guess what battery "$100.00" to get because serial number is difficult to find and it still doesn't work! $1000.00 on 2 Dysons in closet not working! Researched this Samsung LOOK NO MORE! This is an amazing stick vacuum for a much better price....Looks are gorgeous and performace off the charts with minumal weight, wonderful maneuverability, easy clean dirt container, battery holds it's charge up to date with technology has 2 speeds and also extra attachments if desired! Love this vacuum!!! Waaaaaay Better in every way than a Dyson! Just sayin........
This Samsung cordless is fantastic! I’ve owned 3 expensive Dyson cordless in the past and none have lasted more than an year! Amazing suction (3 levels) and the large canister is easy to remove/empty. We have 3 German Shepherds (big shedders) and this great with dog hair. I’m thrilled!!!!
This Samsung cordless is fantastic! I’ve owned 3 expensive Dyson cordless in the past and none have lasted more than an year! Amazing suction (3 levels) and the large canister is easy to remove/empty. We have 3 German Shepherds (big shedders) and this great with dog hair. I’m thrilled!!!!


Class S2Loop
An S2Loop represents a simple spherical polygon. It consists of a single chain of vertices where the first vertex is implicitly connected to the last. All loops are defined to have a CCW orientation, i.e. the interior of the loop is on the left side of the edges. This implies that a clockwise loop enclosing a small area is interpreted to be a CCW loop enclosing a very large area.
Loops are not allowed to have any duplicate vertices (whether adjacent or not). Non-adjacent edges are not allowed to intersect, and furthermore edges of length 180 degrees are not allowed (i.e., adjacent vertices cannot be antipodal). Loops must have at least 3 vertices (except for the "empty" and "full" loops discussed below). Although these restrictions are not enforced in optimized code, you may get unexpected results if they are violated.
There are two special loops: the "empty" loop contains no points, while the "full" loop contains all points. These loops do not have any edges, but to preserve the invariant that every loop can be represented as a vertex chain, they are defined as having exactly one vertex each (see kEmpty and kFull).
Point containment of loops is defined such that if the sphere is subdivided into faces (loops), every point is contained by exactly one face. This implies that loops do not necessarily contain their vertices.
Constructors
| Name | Description |
|---|---|
this
()
|
Default constructor. The loop must be initialized by calling Init() or Decode() before it is used. |
this
(vertices, s2DebugOverride)
|
Convenience constructor that calls Init() with the given vertices. |
this
(cell)
|
Construct a loop corresponding to the given cell. |
Properties
| Name | Type | Description |
|---|---|---|
s2DebugOverride [set]
|
s2 | Allows overriding the automatic validity checks controlled by the --s2debug flag. If this flag is true, then loops are automatically checked for validity as they are initialized. The main reason to disable this flag is if you intend to call IsValid() explicitly, like this: |
Methods
| Name | Description |
|---|---|
boundaryApproxEquals
(b, max_error)
|
Returns true if two loops have the same boundary except for vertex perturbations. More precisely, the vertices in the two loops must be in the same cyclic order, and corresponding vertex pairs must be separated by no more than "max_error". |
boundaryEquals
(b)
|
Returns true if two loops have the same boundary. This is true if and only if the loops have the same vertices in the same cyclic order (i.e., the vertices may be cyclically rotated). The empty and full loops are considered to have different boundaries. |
boundaryNear
(b, max_error)
|
Returns true if the two loop boundaries are within "max_error" of each other along their entire lengths. The two loops may have different numbers of vertices. More precisely, this method returns true if the two loops have parameterizations a:[0,1] -> S^2, b:[0,1] -> S^2 such that distance(a(t), b(t)) <= max_error for all t. You can think of this as testing whether it is possible to drive two cars all the way around the two loops such that no car ever goes backward and the cars are always within "max_error" of each other. |
clone
()
|
|
compareBoundary
(b)
|
Return +1 if A contains the boundary of B, -1 if A excludes the boundary of B, and 0 if the boundaries of A and B cross. Shared edges are handled as follows: If XY is a shared edge, define Reversed(XY) to be true if XY appears in opposite directions in A and B. Then A contains XY if and only if Reversed(XY) == B->is_hole(). (Intuitively, this checks whether A contains a vanishingly small region extending from the boundary of B toward the interior of the polygon to which loop B belongs.) |
contains
(b)
|
Returns true if the region contained by this loop is a superset of the region contained by the given other loop. |
containsNested
(b)
|
Given two loops of a polygon, return true if A contains B. This version of Contains() is cheap because it does not test for edge intersections. The loops must meet all the S2Polygon requirements; for example this implies that their boundaries may not cross or have any shared edges (although they may have shared vertices). |
decode
(decoder)
|
Decodes a loop encoded with Encode() or the private method EncodeCompressed() (used by the S2Polygon encoder). Returns true on success. |
depth
()
|
The depth of a loop is defined as its nesting level within its containing polygon. "Outer shell" loops have depth 0, holes within those loops have depth 1, shells within those holes have depth 2, etc. This field is only used by the S2Polygon implementation. |
empty
()
|
A special vertex chain of length 1 that creates an empty loop (i.e., a loop with no edges that contains no points). Example usage: |
encode
(encoder)
|
Appends a serialized representation of the S2Loop to "encoder". |
equals
(b)
|
Returns true if two loops have the same vertices in the same linear order (i.e., cyclic rotations are not allowed). |
findValidationError
(error)
|
Returns true if this is *not* a valid loop and sets "error" appropriately. Otherwise returns false and leaves "error" unchanged. |
findValidationErrorNoIndex
(error)
|
Like FindValidationError(), but skips any checks that would require building the S2ShapeIndex (i.e., self-intersection tests). This is used by the S2Polygon implementation, which uses its own index to check for loop self-intersections. |
full
()
|
A special vertex chain of length 1 that creates a full loop (i.e., a loop with no edges that contains all points). See kEmpty() for details. |
getArea
()
|
Return the area of the loop interior, i.e. the region on the left side of the loop. The return value is between 0 and 4*Pi. (Note that the return value is not affected by whether this loop is a "hole" or a "shell".) |
getCapBound
()
|
GetRectBound() returns essentially tight results, while GetCapBound() might have a lot of extra padding. Both bounds are conservative in that if the loop contains a point P, then the bound contains P also. |
getCentroid
()
|
Returns the true centroid of the loop multiplied by the area of the loop (see s2centroids.h for details on centroids). The result is not unit length, so you may want to normalize it. Also note that in general, the centroid may not be contained by the loop. |
getDistance
(x)
|
Returns the distance from the given point to the loop interior. If the loop is empty, return S1Angle::Infinity(). "x" should be unit length. |
getDistanceToBoundary
(x)
|
Returns the distance from the given point to the loop boundary. If the loop is empty or full, return S1Angle::Infinity() (since the loop has no boundary). "x" should be unit length. |
getSurfaceIntegral
(fTri)
|
This method computes the oriented surface integral of some quantity f(x) over the loop interior, given a function f_tri(A,B,C) that returns the corresponding integral over the spherical triangle ABC. Here "oriented surface integral" means: |
getTurningAngle
()
|
Returns the sum of the turning angles at each vertex. The return value is positive if the loop is counter-clockwise, negative if the loop is clockwise, and zero if the loop is a great circle. Degenerate and nearly-degenerate loops are handled consistently with s2pred::Sign(). So for example, if a loop has zero area (i.e., it is a very small CCW loop) then the turning angle will always be negative. |
getTurningAngleMaxError
()
|
Return the maximum error in GetTurningAngle(). The return value is not constant; it depends on the loop. |
initialize
(vertexRange)
|
Initialize a loop with given vertices. The last vertex is implicitly connected to the first. All points should be unit length. Loops must have at least 3 vertices (except for the "empty" and "full" loops, see kEmpty and kFull). This method may be called multiple times. |
intersects
(b)
|
Returns true if the region contained by this loop intersects the region contained by the given other loop. |
invert
()
|
Reverse the order of the loop vertices, effectively complementing the region represented by the loop. For example, the loop ABCD (with edges AB, BC, CD, DA) becomes the loop DCBA (with edges DC, CB, BA, AD). Notice that the last edge is the same in both cases except that its direction has been reversed. |
isEmpty
()
|
Returns true if this is the special "empty" loop that contains no points. |
isEmptyOrFull
()
|
Returns true if this loop is either "empty" or "full". |
isFull
()
|
Returns true if this is the special "full" loop that contains all points. |
isHole
()
|
Returns true if this loop represents a hole in its containing polygon. |
isNormalized
()
|
Return true if the loop area is at most 2*Pi. Degenerate loops are handled consistently with s2pred::Sign(), i.e., if a loop can be expressed as the union of degenerate or nearly-degenerate CCW triangles, then it will always be considered normalized. |
isValid
()
|
Returns true if this is a valid loop. Note that validity is checked automatically during initialization when --s2debug is enabled (true by default in debug binaries). |
makeRegularLoop
(center, radius, num_vertices)
|
Constructs a regular polygon with the given number of vertices, all located on a circle of the specified radius around "center". The radius is the actual distance from "center" to each vertex. |
makeRegularLoop
(frame, radius, num_vertices)
|
Like the function above, but this version constructs a loop centered around the z-axis of the given coordinate frame, with the first vertex in the direction of the positive x-axis. (This allows the loop to be rotated for testing purposes.) |
normalize
()
|
Invert the loop if necessary so that the area enclosed by the loop is at most 2*Pi. |
orientedVertex
(i)
|
Like vertex(), but this method returns vertices in reverse order if the loop represents a polygon hole. For example, arguments 0, 1, 2 are mapped to vertices n-1, n-2, n-3, where n == num_vertices(). This ensures that the interior of the polygon is always to the left of the vertex chain. |
project
(x)
|
If the given point is contained by the loop, return it. Otherwise return the closest point on the loop boundary. If the loop is empty, return the input argument. Note that the result may or may not be contained by the loop. "x" should be unit length. |
projectToBoundary
(x)
|
Return the closest point on the loop boundary to the given point. If the loop is empty or full, return the input argument (since the loop has no boundary). "x" should be unit length. |
sign
()
|
The sign of a loop is -1 if the loop represents a hole in its containing polygon, and +1 otherwise. |
spaceUsed
()
|
Returns the total number of bytes used by the loop. |
vertex
(i)
|
For convenience, we make two entire copies of the vertex list available: vertex(n..2*n-1) is mapped to vertex(0..n-1), where n == num_vertices(). |
clone
()
|
Returns a deep copy of the region. |
contains
(p)
|
Returns true if and only if the given point is contained by the region. The point 'p' is generally required to be unit length, although some subtypes may relax this restriction. |
contains
(cell)
|
Returns true if the region completely contains the given cell, otherwise returns false. |
getCapBound
()
|
Returns a bounding spherical cap that contains the region. The bound may not be tight. |
getCellUnionBound
(cellIds)
|
Returns a small collection of S2CellIds whose union covers the region. The cells are not sorted, may have redundancies (such as cells that contain other cells), and may cover much more area than necessary. |
getRectBound
()
|
Returns a bounding latitude-longitude rectangle that contains the region. The bound may not be tight. |
mayIntersect
(cell)
|
If this method returns false, the region does not intersect the given cell. Otherwise, either region intersects the cell, or the intersection relationship could not be determined. |
Inner classes
| Name | Description |
|---|---|
Shape
|
Wrapper class for indexing a loop (see S2ShapeIndex). Once this object is inserted into an S2ShapeIndex it is owned by that index, and will be automatically deleted when no longer needed by the index. Note that this class does not take ownership of the loop itself (see OwningShape below). You can also subtype this class to store additional data (see S2Shape for details). |
Note
The reason that duplicate vertices and intersecting edges are not allowed is that they make it harder to define and implement loop relationships, e.g. whether one loop contains another. If your data does not satisfy these restrictions, you can use S2Builder to normalize it.
TODO
Convert logic to use a ForwardRange rather than making a copy of its vertices.


Add New Book
Scrape Book From URL:
changes
submission info
email:
comment:
Written by
in
Belongs to
and is currently
edit
Editing
label
author
year
owner
availability
available
unavailable
description
delete
back


Syntax
Properties
Event
-
The S3 bucket event about which you want to publish messages to Amazon Simple Queue Service ( Amazon SQS). For more information, see Supported Event Types in the Amazon Simple Storage Service Developer Guide.
Required: Yes
Type: String
Filter
-
The filtering rules that determine for which objects to send notifications. For example, you can create a filter so that Amazon Simple Storage Service (Amazon S3) sends notifications only when image files with a
.jpg
extension are added to the bucket.Required: No
Type: NotificationFilter
Queue
-
The Amazon Resource Name (ARN) of the Amazon SQS queue that Amazon S3 publishes messages to when the specified event type occurs.
Required: Yes
Type: String


For now, brief text by Viktor Frankl:
We needed to stop asking about the meaning of life, and instead think of ourselves as those who were being questioned by life—daily and hourly. Our question must consist, not in talk and meditation, but in right action and in right conduct. Life ultimately means taking the responsibility to find the right answer to its problems and to fulfill the tasks which it constantly sets for each individual.


Design Systems: From Project Done to Project Done to Product Sustained, eightshapes, Nathan Curtis
Beyond the Toolkit
Day 1: All handles design leadership meeting: IBM
google system:
material design arc, diverse products that are cohesive visually, echoes of design decisions in ux, search, use of color blue and iconography
google docs, play, mail, calendar, chrome, you can see divergencies, New button, color, pair color with icon and text, produce unique identity
A design language big 3: Typography, color, iconography
Use same design system with different choices. visual style isn't just enough to make unification
Prioritize design system to make it a self sustaining enterprise
Design spec, Code library
Design system's reach
World's platform
An Enterprise's language
A portfolio's guide
Cisco, web marketing site: start with product section for selling, then support, training, about us
What's your get? Support. when people buy products, they are talking to sales
home page, avoid distractions, unstable patterns, get out of there. inject design system to all of them, start with navigation bar
Radiate influence Marriott from web apps, experiences shared with native apps and to websites, Marriott: reservation path
sun Microsystems: component library
Andrew maintained it and had to wait
Need to provide a tool and platform to help devs
Leah Buley
Federate influence that the people driving system to engage contributions and
Salesforce: cyclical team model, backlog and roadmap, shorter term pairings with orgs doing design, bringing influence in
sliding scale of giving a F, reveal passion for product to do and solve problems you need address
UVI: User experience, visual, interaction design
Need content in system and call it civx instead, designate go tos
mix doers with delegators.
Have a CEO who cares about design
Full-stack user experience: a marriage of design and technology, Dawn Ressel, Intuit
Surprising perspectives
Evolution of design systems:
Pattern libraries: doc of design, not a true design system
Component libraries: front end code, GE talk
Widget libraries: full stack code, functional on it's own and integrate
Past, present, future
A true design system must have a single source of truth in code
In the enterprise, how quickly and easily your design system can scale is directly proportional to the impact it can have
Intuit moved to cloud and made product more powerful, had a lot of data that could be connected wit independent products
One Intuit identity
Mint, quickbooks, turbotax
Interfaces were uneven quality and not sharing learnings and not unified
wanted to create a familiar experience across products
single identity, import mint user to make tax prep easier
Same account with additional product and show which products you've used in the past
Success story
Account recovery: dramatically increased user success rates: increase 10%
Quickbooks: were concerned about changing patterns with changing old way, AB test 13% increase success. 50% reduction support calls, $560,000 cost reduction
Roadblock: hacks on tax identity. Engineers had widget and were worried additional security would become a barrier. They needed to add them. Rolled out additional security in one week. massive reduction in fraud in 1 week
That team partnered with IRS to battle tax fraud, using code in open source fashion
on intuit dev widgets are being used to improved productivity and decrease time to market are being used in 100% of products
All products are financial management: upload data with doc, or take photo, experience should be the same whether work on budget or taxes
intuit link - used widgets
if can be reused, make it a widget, only use it when it makes sense
It is 1.5 times more investment to build something in a way that is reusable
Widget and component libraries are shared
How do I do it?
Close partnership with technologist, cross disciplinary team (work with engineers)
get them excited, frame it around user, not my design
don't start with how, start with problem space, let them decide how to build it
give them a tough challenge
get them to feel the customer pain
listen tot hem and have empathy, find their motivation
be specific and accurate to build credibility
How to handle resistance: overcoming barriers to working across teams
alignment can be slow
should this task work the same accountant and tax payer
start with single team with need and go really deep and look broadly across enterprise and embed with team, our designer as their designing. do research together. research bring people together
AB tests
paint a long term vision and what they can get in future
our medium is code for a user to benefit from
An Organizational Story: Salesforce lightening design system, Nalini P. Kotamraju
Researcher encounters a design system
CRM customer relation management tool. born on the cloud
lightning: changing ui design called lightning, revamp design system and ui
Good year for the design system: got attention
about people and relationships helped the success for Lightning, was not top down, off grid in corner
Hustle for buy in from executive, more scrappier than that
Theme 1: Solving Problems
how can we make cheaper cars for emerging middle class in India-- went smaller-- how do you solve people's problems and needs, family moped, Nano
salesforce mobile app with style guide for sales persons on the go
Customer and Partner's Needs: Customizations: Dreamforce hear from customer and partners
someone buy product, make it look like ours make it look like salesforce, changing css
Acquire a lot of code by acquisition, provide consistency across our products
Engineers don't like css
Implement removed gap between what designers want and developers deliver
Trust in design principles: clarity, efficiency, consistency, beauty
Create trust by showing not telling, living components were a conversation starter
sharing, brownbags, document, feedback surveys
trailhead, learning tool for free about salesforce
Open source to give back to community, we were putting ourselves on the map of representing salesforce
great at sharing and marketing outreach. two way part of feedback and push back and challenge when it wasn't working out. immediately responded in clarity of design system, external and internal. respond w/o ego
Helped put UX at the seat at the table in the room
QA
Non adopters to design system are the haters and more interested in power in the org and not efficient way to do things for customers and users
show benefit to them over and over again, haters get marginalized when others like it, topple
design systems emerge from development, stop repeating ourselves
legacy technology: re-architect tech to use design system, investment in future. our leaders need to understand it will pay dividends in the future
how do you get people to know things exist? publish in portal so people find and document


What's new
- What's new in Thymeleaf 2.0 [Read online]
- Older versions:
- What's new in Thymeleaf 1.1 [Read online]
Tutorials and Guides
Note: if you plan to use Thymeleaf in Spring MVC applications, you should read the "Using Thymeleaf" Guide before the "Thymeleaf + Spring 3" one. The former contains all the Thymeleaf basics whereas the latter only focuses on the Spring integration specifics.
-
Using Thymeleaf (24 February 2012)
[Download PDF]
[Read online]
- Example Application: Good Thymes Virtual Grocery (24 February 2012) [SOURCES ZIP]
-
Thymeleaf + Spring 3 (24 February 2012)
[Download PDF]
[Read online]
- Example Application: Spring Thyme Seed Starter Manager (24 February 2012) [SOURCES ZIP]
-
Extending Thymeleaf (24 February 2012)
[Download PDF]
[Read online]
- Example Application: Extrathyme - Thymeland's football website (24 February 2012) [SOURCES ZIP]
- The Thymeleaf Interactive Tutorial web application (24 February 2012) [Sources at GitHub] [Binaries at SourceForge]
Basic Articles
- Getting started with the Standard dialects in 5 minutes (08 January 2012) [Read online]
- Standard URL Syntax (06 April 2012) [Read online]
More Articles
- From HTML to HTML (via HTML) [Read online]
-
Spring MVC view layer: Thymeleaf vs. JSP [Read online]
- Example Application: Thymeleaf vs JSP (24 February 2012) [SOURCES ZIP]
-
Say Hello! Extending Thymeleaf in 5 minutes [Read online]
- Example Application: Say Hello! (24 February 2012) [SOURCES ZIP]
-
Say Hello Again! Extending Thymeleaf even more in another 5 minutes [Read online]
- Example Application: Say Hello! (24 February 2012) [SOURCES ZIP]
-
Thymeleaf + Spring Security integration basics [Read online]
- Example Application: Thymeleaf-SpringSecurity (31 December 2012) [SOURCES ZIP]
-
Rich HTML email in Spring with Thymeleaf [Read online]
- Example Application: Thymeleaf-SpringMail (24 February 2012) [SOURCES ZIP]
-
Bringing Thymeleaf and Natural Templates to the Spring PetClinic [Read online]
- Example Application: Thymeleaf-PetClinic (24 February 2012) [SOURCES ZIP]
Javadoc APIs
- thymeleaf 2.0.16 [Read online]
- thymeleaf-spring3 2.0.16 [Read online]
Old versions:
- thymeleaf 1.1.5 [Read online]
- thymeleaf-spring3 1.1.5 [Read online]
- thymeleaf 1.0.1 [Read online]
- thymeleaf-spring3 1.0.1 [Read online]
External Resources
- Thymeleaf: create page templates for web and non-web environments (blog.iprofs.nl) [Read online]
- Introducing the Thymeleaf template engine (blog.zenika.com) [Read online]
- Using Thymeleaf with Spring MVC (blog.zenika.com) [Read online]
- Spring MVC: From JSP and Tiles to Thymeleaf (blog.springsource.org) [Read online]
- HTML5 + CSS 3 Form Using Thymeleaf + Spring MVC (lordofthejars.com) [Read online]
- Thymeleaf Integration (doanduyhai.wordpress.com) [Read online]
- Thymeleaf Advanced Usage (doanduyhai.wordpress.com) [Read online]
- Spring and Thymeleaf with JavaConfig (krams915.blogspot.com) [Read online]
- Other languages:
- Japanese
- デザイナーさんたちとの協業を推し進める Thymeleaf (tech.nulab.co.jp) [Read online]
- Japanese
Frequently Asked Questions
See our Frequently Asked Questions
Software License
Thymeleaf is distributed under the Apache License 2.0.
Source Repositories
Thymeleaf uses GitHub to maintain its source code. These are the repositories:
- thymeleaf 2.0: https://github.com/thymeleaf/thymeleaf
- thymeleaf-spring3 2.0: https://github.com/thymeleaf/thymeleaf-spring3
- thymeleaf project (all repos): https://github.com/thymeleaf
Artwork
- Logo with name: [Normal] [Small] [Very small]
- Logo without name: [Normal] [Small] [Very small]
The Thymeleaf Artwork by The Thymeleaf Project is licensed under a Creative Commons Attribution 3.0 Unported License. Note that this license only applies to the above listed artwork, and specifically does not apply to software published by the Thymeleaf project.


The following tables describe how to access the logs and runtime statistics, depending on how to deploy your algorithms.
The following table describes how to access the logs and runtime statistics of algorithms you deploy in QuantConnect Cloud:
| Execution Type | Result Type | Access Tools |
|---|---|---|
| Backtest | Logs |
|
| Backtest | Runtime Statistics |
|
| Live Trading | Logs |
|
| Live Trading | Runtime Statistics |
|
The following table describes how to access the logs and runtime statistics of algorithms you deploy on-premise:
| Execution Type | Result Type | Access Tools |
|---|---|---|
| Backtest | Logs |
|
| Backtest | Runtime Statistics |
|
| Live Trading | Logs |
|
| Live Trading | Runtime Statistics |
|


Ghostemane Shares Blood-Curdling Stop Motion Visual for "Gatteka"
Featuring the main villain from his forthcoming comic book.
by Torsten IngvaldsenGhostemane has returned with a blood-curdling stop motion animation for his 2018 highlight “Gatteka.” Off of his overtly dark and exceedingly aggressive N/O/I/S/E project — aptly short for No One Is Safe from Evil — the track hones in on themes surrounding self-harm and enslavement, with lyrics pertaining to George Orwell’s 1984 and even the German demon Mephistopheles.
These motifs are carried forth within the Thomas J Yagodinski visual, whereby the haunting narrative and in-your-face visuals draw heavily from the artist’s upcoming comic book, Dr. Nihil and the Tremendous Blunder. The titular character featured in the forthcoming comic plays the video’s main villain. Within the visual, this villain can be seen transforming individuals into his Blackmage followers — when one steps out of line after seeing what will become of him, the villain’s transformed army chases after him until he is caught.
You can watch the video for “Gatteka” above. Ghostemane has also announced a massive Europe tour for 2020 — full dates can be found here.
For more new music videos, watch TNGHT’s visual for “Gimme Summn.”


What is Mackerelcrow? Simply, it's an idea that was taken to the full extreme. A brand, an e-commerce site, and a product line. How far can it be taken? How far will it go?
It all started with an idea. I had been using the same backpack for about a year. It was a pretty expensive pack $200+ from a particular scandinavian brand. I was not very happy with the usability of it though. It was hard to get in and out of and not that comfortable. But it looked great. Mackerelcrow started out as some simple pencil sketches of a bagpack I envisioned.
I didn't know how to sew. But, I figured it out enough to make an extremely crude mockup. I took the mockup to some professionals and produced a few prototypes. It was an excellent experience. Although, I was paying for the service of having prototypes produced. I ended up learning about the intricacies of product development.
To make the brand even more authentic, I hired my graphic designer friend to produce a logo and woven labels. The original brand name was Mackerel and Crow. Named after two of my favorite animals. Mackerel for how tasty it is. Crows for how playful they are. James decided to marry them into one animal, the mackerelcrow. I loved it.
Further pushing on the brand we did some lifestyle photo shoots. My photography background helped with this part greatly.
The models were just some friends of mine that did it all pro bono! Really nice of them.
Now with all the products, branding stuff and photography produced, I launched an e-commerce site on the shopify platform - mackerelcrow.com
The last bit of icing on the cake is the design and build of a tradeshow booth. Mackerelcrow exhibited at the Seattle Urban Craft Uprising.


| Version |
Description |
Old Code |
New Code |
| 2.1.x |
If you implemented your own ObjectFactory or ActionInvocation classes, you will notice that there have been some minor changes to make an "extraContext" Map available for the build* methods. This allows, for instance, access to the Session map during object creation, even before the ActionContext ThreadLocal has been set. |
ObjectFactory.getObjectFactory().buildBean(clazz); |
ObjectFactory.getObjectFactory().buildBean(clazz, extraContext); |
| 2.0+ |
If you've used the WebWork base classes for building templated tags, you'll run into the refactoring of the UI tags to use common Component classes as the templated back-end. The tags now use these Component classes, as do Velocity and FreeMarker. This allows Velocity and FreeMarker to use the same UI components directly, without pretending to be a JSP page, but it also means you need to refactor your custom tags to use the new API's |
...your code.. |
See the existing UI tags in the 2.2 source |
| 2.1.x |
If you were not using the Alt Syntax, it is now enabled by default. You can either upgrade or change the Tag Syntax |
<ww:url value="'http://www.yahoo.com'"/> |
<ww:url value="http://www.yahoo.com"/> |
| 2.1.x |
If you are using FreeMarker and your code uses psuedo properties on collections and maps, you need to modify the code to call methods instead. |
${parameters?size} / ${parameters.size?html} |
${parameters.size()} / ${parameters.get("size")?html} |
| 2.1.x |
The defaultStack has been renamed to the basicStack. |
<interceptor-ref name="defaultStack"/> |
<interceptor-ref name="basicStack"/> |
| 2.1.x |
The completeStack has been renamed to the defaultStack. |
<interceptor-ref name="completeStack"/> |
<interceptor-ref name="defaultStack"/> |
| 2.1.x |
The defaultStack (previously the completeStack) is now the default interceptor stack in webwork-default.xml. In addition, this stack now configures the Workflow Interceptor and the Validation Interceptor to not run if the method names are input, back, or cancel |
N/A |
N/A |
| 2.1.x |
The component interceptor has been deprecated (along with all WebWork IOC features) and has been removed from the basicStack and completeStack. You'll need to add it back by hand if you wish to use this deprecated feature. |
N/A |
N/A |
| 2.0+ |
The include tag's page attribute has been deprecated since 1.x and is now removed from 2.2. Please use the value attribute. |
<ww:include page="..."/> |
<ww:include value="..."/> |
| 2.0+ |
The text tag's value0, value1, value2, and value 3attributes have been deprecated since 1.x and are now removed from 2.2. Please use the param tag instead. |
<ww:text value0="...""/> |
<ww:text><ww:param value="someValue">...</ww:param></ww:text> |
| 2.0+ |
The session map wrapper (found in ActionContext) has been changed to no longer create sessions for every request. If your application depends on sessions being automatically created, WebWork 2.2 no longer does that. Instead, you must create the session yourself or the session will be created as soon as a value is put in the session Map. |
N/A |
N/A |
| 2.0+ |
The VUI tags have been removed from WebWork. They haven't been actively worked on in over 4 years and are not used in the community. |
N/A |
N/A |
| 2.0+ |
The URI of the WebWork TLD was change from webwork to /webwork. If you were already using the packaged TLD from webwork.jar, you will have to adjust URI in your JSPs |
<%@ taglib uri="webwork" prefix="ww" %> |
<%@ taglib uri="/webwork" prefix="ww" %> |
| 2.0+ |
The default encoding has changed from ISO-8859-1 to UTF-8. If you wish to continue to use ISO-8859-1, you must change your struts.properties. |
N/A |
webwork.i18n.encoding=ISO-8859-1 |


Let's talk about encryption
If you like this post and would like to read more of my posts,
Subscribe!The better to write you with
Let’s say you are Red Riding Hood, and you want to write a letter to your grandmother telling her you will be visiting. However, the big bad wolf is aware of your plans, and he decides he will also write a letter to your grandmother (pretending to be you) saying you won’t be visiting. If only there was a way you could let your grandmother know your letter was from you and the wolf’s letter was a fake. What if I tell you, little Red Riding Hood, that there is a way you can do this!
Now you’re just some terms that I used to know
Too complex so let’s be a little imaginary
I need you, dear reader, to assume a few things here.
Firstly, asymmetric key encryption may sound like magic, and it is tough to give really simple examples to show how it works. So, for now, we’ll just assume such algorithms exist. Secondly, it is also important to note here that it is assumed that an encrypted message cannot be easily decrypted without the decryption key. This is also true in practice, but reasons why it holds true are too complex for this post.
Uses
Now that we know about asymmetric key encryption, how can we use it to help solve Red Riding Hood’s conundrum?
–Feel free to take a break here and think about solutions to this if you wish–
Well, anytime you (or Red Riding Hood) want to say you yourself wrote a message, you can encrypt the message with your private key and add it as a “signature” (technical term, used to refer to the encrypted message) to the message. Your recipient (Grandma) knows your public key and should be able to decrypt your signature to see that it matches the original message. The big, bad wolf will not be able to sign the message (as he does not know your private key) with the same signature. Grandma will immediately know it is a fake when she is unable to decrypt the wolf’s false signature with your public key!
End
Relieved to have solved the problem, you get back to writing your letter. Little do you know, that further dangers remain…
Tune in next week for part 2!


Worshiping with Family on the Sabbath
Focus on Rest and Restoration
- Plan ahead: This day is a where we are allowed to celebrate our time with God. So for a whole week prior to the Sabbath, plan out what you all will be doing. Make it a huge event, push for it in the home, and get the excitement about this day up. Make it something that your family will look forward to.
- Be Creative: Don’t just nap the day away. Spend it with Family and Friends and stretch your creative side and make ways that will keep your mind on God and love His people.
- Spread Love: Whether it is with just you and your family or if it is with the people around your town or city, make sure that they all know that God has sent you out to love them.
Here are some great ways to spend your Sabbath with your Family and Friends
- Turn Your House into a Space for Worship: Gather your family together at home and discuss a lesson. This can be the sermon from last week, the current sermon series, or past series. Invite people who wouldn’t normally come to church to your home. This is a perfect opportunity to reach out to people that God misses the most.
- You can start your day of worship at your home and then do other activities for the rest of the day. Here are a few you can do!
- Nature Walk: Get some energy bars, Water, Your Bible and maybe even a hymnal. Head out to enjoy creation with the family. Worship outside together.  Create a list of wildlife to look out for and identify. Make it a challenge to find each one on the list.
- Day Camping Trip: turn off your phones, leave your tablets behinds, and put work on hold for the whole day.
- Ministry Brainstorm: Get together with friends and family and figure out ways that you all can come together and help do ministry at Bolingbrook Church! Think of new ways to reach others and share your great ideas with leaders at church!
- Cook: Friday afternoon before Sabbath starts, prepare meals for Saturday. Celebrate the Sabbath with a feast that your family and friends can all enjoy!
- Outreach to others: make food and give it out to people who are shut in on Sabbath. Spend time with the people who need aid
- Nursing home/Hospital visits.
- Visit someone from church you haven’t seen in a while.
- Prayer: Spend time in prayer with your family. Schedule times where you will gather together as a family and offer up prayer requests and or praises that you want each other to hear. This is a great way to have the opportunity to open up to your family and vice versa.
- Head to a Museum: look at the things that are a part of history and see how God has worked in those situations.
- Read stories: read through Bible Stories, Mission Stories, or stories in a Christian Magazine and see how God is working in the lives of other people.
- Can Collecting: Go around your neighborhood and gather canned goods and other non-perishables that can be donated to Bolingbrook Church Food Pantry.
- Visit the Homeless in the City: People without homes are still as much God’s children as you and me! So show them support and love by giving them a bag full of essential living supplies or even a meal.
- Soup Kitchens: Volunteer as a family at a soup kitchen and help feed those who are less fortunate and let them know that God still watches over them.
- Offer your Services for Free: If you don’t feel comfortable making a profit on the Sabbath but you love what you do, then do it for free! This is a great way to evangelize to those in the community or on your client list.
- Schedule a day at Feed My Starving Children: This is a great way to get involved with sending out love to people who live half way around the globe and are in need of food! This is a great Christian organization that benefits children all over the globe!


Plug.Assign
A simple plug to allow setting variables in a connection. For example, as a way to set default variables for a controller, view or template to use in a Phoenix app.
Installation
The package can be installed from Hex:
Add plug_assign to your list of dependencies in
mix.exs
:def deps do [{:plug_assign, "~> 1.0.0"}] end
Fetch and install the dependencies
$ mix deps.get
Define assigns as part of your plug stack
plug Plug.Assign, foo: "bar", bar: true, baz: 42
Or Set variables for templates to use in a Phoenix Pipeline
pipeline :admin do plug Plug.Assign, admin: true end
Or directly in a Phoenix Controller
defmodule Blog.Admin.PostController do use Blog.Web, :Controller plug Plug.Assign, subsection: :posts plug Plug.Assign, %{read_request: true} when action in [:index, :show] ... end


{% extends "navbar.html" %} {% block content %}
This is a Home Server that allows users connected to the same WiFi network to share pictures, documents and other files. Written with Flask and Bootstrap. More info.
This project started when I've decided to create a file sharing platform that would double as a local social media network, where users are able to follow, message and share files with each other. Although far from perfect, this is a great introductory to Flask and Bootstrap web development. If you're interested, the project is hosted here.
This web platform is brought to you by lukeathedev.
For a very long time I've been interested in programming and computer science in general. This project presented a great opportunity to expand my skill set while having fun developing a social-media like website. Even though my favorite topics involve low-level programming, web development is definetely pretty fun! If you access my GitHub profile, you'll notice it's pretty empty! That's because up until this point I wasn't all that serious about programming (if you can even call HTML development programming), but recently decided to make something for real.
What are you waiting for? Go back and Register!


March-2021
November-2020
October-2020
June-2020
April-2020
March-2020
February-2020
December-2019
November-2019
October-2019
September-2019
July-2019
June-2019
May-2019
April-2019
March-2019
February-2019
January-2019
October-2018
July-2018
June-2018
May-2018
April-2018
March-2018
December-2017
November-2017
October-2017
September-2017
August-2017
June-2017
May-2017
March-2017


By accessing this web site, you are agreeing to be bound by these website Terms and Conditions of Use, all applicable laws and regulations, and agree that you are responsible for compliance with any applicable local laws. If you do not agree with any of these terms, you are prohibited from using or accessing this site. The materials contained in this web site are protected by applicable copyright and trade mark law.
The materials on the jobs.freenode.net website are provided "as is". freenode makes no warranties, expressed or implied, and hereby disclaims and negates all other warranties, including without limitation, implied warranties or conditions of merchantability, fitness for a particular purpose, or non-infringement of intellectual property or other violation of rights. Further, freenode does not warrant or make any representations concerning the accuracy, likely results, or reliability of the use of the materials on its Internet web site or otherwise relating to such materials or on any sites linked to this site.
In no event shall freenode or its suppliers be liable for any damages (including, without limitation, damages for loss of data or profit, or due to business interruption,) arising out of the use or inability to use the materials on the jobs.freenode.net website, even if freenode or an authorised representative has been notified orally or in writing of the possibility of such damage. Because some jurisdictions do not allow limitations on implied warranties, or limitations of liability for consequential or incidental damages, these limitations may not apply to you.
The materials appearing on the jobs.freenode.net website could include technical, typographical, or photographic errors. freenode does not warrant that any of the materials on its web site are accurate, complete, or current. freenode may make changes to the materials contained on its web site at any time without notice. freenode does not, however, make any commitment to update the materials.
freenode has not reviewed all of the sites linked to its website and is not responsible for the contents of any such linked site. The inclusion of any link does not imply endorsement by freenode of the site. Use of any such linked web site is at the user's own risk.
freenode may revise these terms of use for its website at any time without notice. By using this web site you are agreeing to be bound by the then current version of these Terms and Conditions of Use.
Any claim relating to Freenode Jobs's web site shall be governed by the laws of England without regard to its conflict of law provisions.


Senate begins electoral act amendment
- Bill to amend Nigeria's electoral act has passed second reading
- Meanwhile, the bill has 26 clauses
- According to the achitect of the bill, it would strengthen and protect Nigeria’s democracy
The Nigerian Senate on Tuesday, November 19, began consideration of a bill to amend Nigeria’s electoral act. The bill which scaled Second Reading is For an Act to Amend the Electoral Act (No.6), 2010.
According to the sponsors, Senators Ovie Omo-Agege (APC, Delta Central) and Abubakar Kyari (APC, Borno North), the bill which has 26 clauses seeks to amend the Electoral Act to strengthen and protect Nigeria’s democracy, as well as “cure specific mischief plaguing our (Nigeria’s) elections and electoral processes."
Leading the debate on the bill, Omo-Agege said though the process under the eighth Senate was fraught with mutual suspicions and bitterness, electoral reform for the ninth National Assembly remains a priority in its legislative agenda.
E-voting bill scales second reading in Senate
The deputy Senate president added that the Bill to amend the Electoral Act seeks to enact a new Section 87 on the Nomination of Candidates by Parties for Elections by prescribing maximum fees payable by aspirants and restricting nomination criteria strictly to relevant provisions.
The bill, according to him, also seeks to make clarification under Section 38(1)(a) of the principal Act which states that “a person shall be deemed to be qualified for an elective office and his election shall not be questioned on grounds of qualification if, with respect to the particular election in question, he meets the applicable requirements of Sections 65, 107, 137 or 182 of the Constitution of the Federal Republic of Nigeria, 1999”.
The amendment to the Electoral Act will also provide sanctions for giving false information for purpose of registering a political party and ensure that failure by the Independent National Electoral Commission (INEC) and others to comply with any provision of the Act carries clear and adequate sanctions.
Electricity companies in trouble as Senate begins an investigation into poor power supply nationwide
PAY ATTENTION: Get the Latest Nigerian News Anywhere 24/7. Spend less on the Internet!
The president of the Senate, Ahmad Lawan, after consideration of the bill, referred same to the Committee on INEC for further legislative work.
Meanwhile, recall that Legit.ng had reported that Nigerians may likely witness significant changes in the country's electoral climate as a bill to ensure that the Independent National Electoral Commission (INEC) adopts electronic voting method for future elections has on Wednesday, November 20, scaled second reading.
NAIJ.com (naija.ng) -> Legit.ng We keep evolving to serve our readers better
Bayelsa election: Party agents argue fiercely over results anomaly | - on Legit TV


Photos
Mesmerizing view of The Administration and Academic Building
Sunrise at Teluk Mayat, located in the UiTMCT Dungun’s authority
Front view of the sea side from Block 15 of UiTMCT Campus of Dungun
Aerial Overhead Shot of UiTMCT Campus of Dungun
Main Gate of UiTMCT Campus of Dungun


|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dxf2svg.util.wiretrace.WireSearchStrategy dxf2svg.util.wiretrace.FindApplyWireIDsStrategy
This algorithm seeks the first text from the opposite end of the 'SHEET n[n]' pattern and gives the wire that the text appears over, that wire number as an ID attribute.
This is strictly for Spar formatted wiring diagrams.
NOTES: The algorithm works like this:
DxfConverter
for code location.)
CrossSheetWireIDs.wirePattern
regex.
| Field Summary | |
protected boolean |
isPrimaryPass
|
protected int |
MAX_SEARCH
|
protected java.util.Vector |
unmatchedWireIds
|
| Fields inherited from class dxf2svg.util.wiretrace.WireSearchStrategy |
DEBUG |
| Constructor Summary | |
FindApplyWireIDsStrategy()
|
| Method Summary | |
protected boolean |
isTextOnWire(SvgText svgTextWireId,
java.util.Vector wireCollection,
boolean searchFirstIntersection,
int testPass)
This method takes the test wire id number and tries to match it to any wire but by starting on the second intersection of the wire polyline. |
protected boolean |
isWireIntersectionInBoundingBox(SvgText text,
Point pt,
int testPass)
This method measures whether a vertual bounding box created in relation to the SvgText insertion point, encloses the argument point pt. |
protected boolean |
isWireMatch(WireLabelLocation wireLocation,
SvgText svgTextWireId,
boolean searchFirstIntersection,
int testPass)
This method takes the text and creates a virtual reference frame around the insersion point, it then measures whether any of the intersections of the argument wire falls within this reference frame. |
protected void |
process(DxfConverter conversionContext,
java.util.Vector wireIDHits,
java.util.Vector wireCollection)
|
void |
searchMatchModify(DxfConverter conversionContext,
java.util.Vector results,
SvgLayerGroup svgl,
java.util.Vector wireCollection,
java.util.regex.Pattern p)
The constructor manages the entire process of finding and matching wire id numbers to the collection of wires, from start to finish. |
protected void |
setWireId(SvgText svgTextWireId,
WireLabelLocation wireLocation)
This method applies the wire id. |
| Methods inherited from class dxf2svg.util.wiretrace.WireSearchStrategy |
toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected final int MAX_SEARCH
protected java.util.Vector unmatchedWireIds
protected boolean isPrimaryPass
| Constructor Detail |
public FindApplyWireIDsStrategy()
| Method Detail |
public void searchMatchModify(DxfConverter conversionContext, java.util.Vector results, SvgLayerGroup svgl, java.util.Vector wireCollection, java.util.regex.Pattern p)
searchMatchModify
in class WireSearchStrategy
conversionContext
- Parent object for important referencesresults
- Where we put the resultssvgl
- All the elements from the 'T' layerwireCollection
- Collected wires as WireLabelLocation objectsp
- The pattern for wire id numbersprotected void process(DxfConverter conversionContext, java.util.Vector wireIDHits, java.util.Vector wireCollection)
protected boolean isTextOnWire(SvgText svgTextWireId, java.util.Vector wireCollection, boolean searchFirstIntersection, int testPass)
This method is also where the id is added to the wire.
svgTextWireId
- The test wire idwireCollection
- The collection of wires to test the wire id againstsearchFirstIntersection
- flag to initiate search on first intersection
of the wire polyline or to start on the second and work back.testPass
- The pass number for setting the relative frame size of the
text element.protected void setWireId(SvgText svgTextWireId, WireLabelLocation wireLocation)
protected boolean isWireMatch(WireLabelLocation wireLocation, SvgText svgTextWireId, boolean searchFirstIntersection, int testPass)
Here is an explaination of intersections:
intersection 1
o-------- Q55A16 --------
\
\o----- Q55C18 --------
intersection 2Q55A16 will match both wires if it appears on the label list before the label Q55C18. To get around this we will test the wires from second intersection first. There will be a successful match for all the secondary wires first, then the primary wire will not match anything because its label is on the first segment. Next we test the first segment and the primary wire will pass.
wireLocation
- A SvgDoubleEndedGraphicElement
(polyline) that
represents a wire.svgTextWireId
- SvgText
element.searchFirstIntersection
- True if the search starts at intersection 0 of
a polyline and false if all other intersections to be search.testPass
- The pass number of the search from 1 to MAX_SEARCH
.
protected boolean isWireIntersectionInBoundingBox(SvgText text, Point pt, int testPass)
MAX_SEARCH
other attempts, each time broadening the width of
the bounding box in an attempt to rigorously test if the point will eventually
match. This is done because the text can appear at almost any distance from
the nearest intersection of a wire.
text
- The text reference whose insertion point is used to create the
bounding box for testingpt
- A point that may or may not fall within the bounding box.testPass
- Determines the size of the reference frame to attempt to capture a
wire's intersection. There are MAX_SEARCH
number of passes,
each will extend the reference frame a little farther trying to match a polyline's
intersection.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


Hawelia Group obtains Occupancy Certificate
Guwahati: Hawelia Group, a name synonymous with quality construction, obtained Occupancy Certificate from Greater Noida Industrial Development Authority (GNIDA) for its project -‘Hawelia Valenova Park’. The project is located in Greater Noida West (Noida Extension). ‘Hawelia Valenova Park’ has received Occupancy Certificate for 460 flats (5 tower) and commercial complex, stated a press release.
Commenting on this, Rattan Hawelia, founder and chairman, Hawelia Group said, “It is really very welcome news for getting Occupancy Certificate and looking at the happiness of our home buyers shifting to their home is a great moment of pride for us. We are overwhelmed and happy to offer the possession to our valued customers and all set to welcome the all home buyers. Our entire team, thank you all from the bottom of our heart for the well wishes and standing you had with us”.
Also Read: PSUs underspent their CSR funds by 43% in FY18
Also Watch: AGP leadership has not been vocal against the CAB: Prafulla Kumar Mahanta


Hess (HES) Presents At Bank of America Merrill Lynch 2019 Global Energy Conference - Slideshow
by SA Transcripts, https://seekingalpha.com/author/sa-transcriptsThe following slide deck was published by Hess Corporation in conjunction with this event.


@Experimental public class HBaseIO extends java.lang.Object
For more information, see the online documentation at HBase.
The HBase source returns a set of rows from a single table, returning a
PCollection<Result>
.
To configure a HBase source, you must supply a table id and a Configuration
to identify the HBase instance. By default, HBaseIO.Read
will read all rows in the
table. The row range to be read can optionally be restricted using with a Scan
object
or using the HBaseIO.Read.withKeyRange(org.apache.beam.sdk.io.range.ByteKeyRange)
, and a Filter
using
HBaseIO.Read.withFilter(org.apache.hadoop.hbase.filter.Filter)
, for example:
// Scan the entire table.
p.apply("read",
HBaseIO.read()
.withConfiguration(configuration)
.withTableId("table"));
// Filter data using a HBaseIO Scan
Scan scan = ...
p.apply("read",
HBaseIO.read()
.withConfiguration(configuration)
.withTableId("table"))
.withScan(scan));
// Scan a prefix of the table.
ByteKeyRange keyRange = ...;
p.apply("read",
HBaseIO.read()
.withConfiguration(configuration)
.withTableId("table")
.withKeyRange(keyRange));
// Scan a subset of rows that match the specified row filter.
p.apply("filtered read",
HBaseIO.read()
.withConfiguration(configuration)
.withTableId("table")
.withFilter(filter));
The HBase sink executes a set of row mutations on a single table. It takes as input a
PCollection<KV<byte[], Iterable<Mutation>>>
, where the
byte[]
is the key of the row being mutated, and each Mutation
represents an
idempotent transformation to that row.
To configure a HBase sink, you must supply a table id and a Configuration
to identify the HBase instance, for example:
Configuration configuration = ...;
PCollection<KV<byte[], Iterable<Mutation>>> data = ...;
data.setCoder(HBaseIO.WRITE_CODER);
data.apply("write",
HBaseIO.write()
.withConfiguration(configuration)
.withTableId("table"));
The design of the API for HBaseIO is currently related to the BigtableIO one, it can evolve or be different in some aspects, but the idea is that users can easily migrate from one to the other
.| Modifier and Type | Class and Description |
|---|---|
static class |
HBaseIO.Read
A
PTransform that reads from HBase. |
static class |
HBaseIO.Write
A
PTransform that writes to HBase. |
| Modifier and Type | Field and Description |
|---|---|
static Coder<KV<byte[],java.lang.Iterable<org.apache.hadoop.hbase.client.Mutation>>> |
WRITE_CODER |
| Modifier and Type | Method and Description |
|---|---|
static HBaseIO.Read |
read()
Creates an uninitialized
HBaseIO.Read . |
static HBaseIO.Write |
write()
Creates an uninitialized
HBaseIO.Write . |
@Experimental public static HBaseIO.Read read()
HBaseIO.Read
. Before use, the Read
must be
initialized with a
HBaseIO.Read.withConfiguration(Configuration)
that specifies
the HBase instance, and a tableId
that
specifies which table to read. A Filter
may also optionally be specified using
HBaseIO.Read.withFilter(org.apache.hadoop.hbase.filter.Filter)
.public static HBaseIO.Write write()
HBaseIO.Write
. Before use, the Write
must be
initialized with a
HBaseIO.Write.withConfiguration(Configuration)
that specifies
the destination HBase instance, and a tableId
that specifies which table to write.


Flying has never been easier or cheaper in USA than it is now. Flight delays and cancellations are a major concern for travellers as these events can cause everything from a ruined family vacation to serious monetary damage. We want to build a tool that gives travellers the ability to browse through flight delay and cancellation data for some recent years, across the major carriers in the US and major airports. After using this tool, travellers should be able to guage the performance of various carriers and airports. This tool also lets travellers anticipate a rise or fall in delays and cancellations across the seasons and regions of the US. Knowing this data could be useful for making travel plans.
This chart gives you an overview of the flight punctiality performance for some major US carriers for the years 2011 - 2015. The values represent the percentage of flights that were on time. To single out a single carrier, please hover your mouse icon over the line representing the carrier to blur out the other information.
With this map, you can view the flight routes that different carriers provide and their delay performance over the past 6 years in a specific month. You can select a carrier and a month, and hovering any airport will display all flight routes from this selected origin. Average delay time in minutes is shown in the bar chart and you can click to compare it among different months.
This table is meant to give users an overview of the performance of various carriers for a particular route, during a particular season. To use this table, select the cities of origin and destination and the month for which your trip is palnned. The resulting table will show you time delay data across multiple carriers, along with the cause of the delay. The arrows in the column headers allow you to filter data in asceding or descending order for that particular metric. For example, to sort the rows in ascending order by the number of flights, click the upside of the two sided arrow in the column header for "Total Flights". You will also some donut charts at the bottom of the table which represnt the overall proportions of the various causes of delay for the carriers displayed.
Origin:
Destination:
Month:
The four categories of flight cancellation cause, as reported by the Department of Transportation, are: National Air System, Carrier, Weather and Security. We have implemented a grid of maps to allow you to explore the cancellation data across the major carriers in USA. The size of the tile represents the proportion of cancellations for that particular cause. By hovering over over a single tile, you will be able to see the number of cancellations for a carrier, along with the cause and month of cancellation. The code inside the tiles represents the carrier code.
January
February
March
April
May
June
July
August
September
October
November
December


The stone looks like a tombstone placed at the entrance.
Insert the key engraved with the image of an evil eye.
Quest.


Linking
You can link tags and images in multiple ways:
- Drag the tag from the tag list to the image in the thumbnail view.
- Select the tags, right click on the image and select the first option.
- Drag the tags from the tag list to the image details tag list.


Welcome
Secondary
×
Success!
Welcome
Success
×
Success!
Welcome
Info
×
Success!
Welcome
Warning
×
Success!
Welcome
Danger
×
Success!
Welcome
Light
×
Success!
Welcome
Dark
×
Success!
Welcome


nginx-mongo-logger
- Pipe Nginx log output into a MongoDB collection
nginx-mongo-logger log_file mongo_collection [mongo_host] [mongo_port]
Spawns a tail process and listens for complete lines of input. For each line, nginx-mongo-logger
parses
CLF (Common Log Format) and extracts nuggets of info, which it then inserts into a MongoDB collection.
The log format that nginx-mongo-logger
expects is as follows:
IP_ADDR - USER [TIME_STAMP] "HTTP_METHOD REQUEST_URI HTTP/1.1" STATUS SIZE "REFERRER_URI" "USER_AGENT"
Where TIME_STAMP
looks like: 14/Oct/2011:19:53:31 -0400
For best results, you should setup a capped collection on your MongoDB server ahead of time. This takes care of automatic rotation, as old log data will be automatically replaced by new.
$ mongo
> use my_database
> db.createCollection('nginx_logs', { capped: true, size: 32000000 })
See examples/upstart.conf
for an example of an Upstart job using nginx-mongo-logger
.
Analyzing your stored logs is crazy simple. The easiest way is to write a MapReduce function and store it on the server to cut down on typing.
This example function will rank all 404 errors by frequency and store them in a collection called dead_links
.
$ mongo
> use my_database
> rank_404s = function() {
return db.runCommand({
mapReduce: 'access_logs',
query: { status: 404 },
out: 'dead_links',
map: function() {
emit(this.method + "::" + this.path, { count: 1 });
},
reduce: function(key, vals) {
var result = { count: 0 };
vals.forEach(function(val) {
result.count += val.count;
});
return result;
}
});
}
> db.system.js.save({ _id: 'rank_404s', value: rank_404s })
> db.eval('rank_404s()')


DOMError is an interface that describes an error.
More...
DOMError is an interface that describes an error.
- See Also
- DOMErrorHandler::handleError
- Since
- DOM Level 3
The severity of the error described by the DOMError
.
DOM_SEVERITY_ERROR:
The severity of the error described by the DOMError
is error. A DOM_SEVERITY_ERROR may not cause the processing to stop if the error can be recovered, unless DOMErrorHandler::handleError()
returns false.
DOM_SEVERITY_FATAL_ERROR
The severity of the error described by the DOMError
is fatal error. A DOM_SEVERITY_FATAL_ERROR will cause the normal processing to stop. The return value of DOMErrorHandler::handleError()
is ignored unless the implementation chooses to continue, in which case the behavior becomes undefined.
DOM_SEVERITY_WARNING
The severity of the error described by the DOMError
is warning. A DOM_SEVERITY_WARNING will not cause the processing to stop, unless DOMErrorHandler::handleError()
returns false.
- Since
- DOM Level 3
| Enumerator |
|---|
| DOM_SEVERITY_WARNING |
|
| DOM_SEVERITY_ERROR |
|
| DOM_SEVERITY_FATAL_ERROR |
|
| virtual DOMError::~DOMError |
( |
| ) |
|
|
virtual |
| virtual DOMLocator* DOMError::getLocation |
( |
| ) |
const |
|
pure virtual |
Get the location of the error.
- Since
- DOM Level 3
| virtual const XMLCh* DOMError::getMessage |
( |
| ) |
const |
|
pure virtual |
Get the message describing the error that occured.
- Since
- DOM Level 3
| virtual void* DOMError::getRelatedData |
( |
| ) |
const |
|
pure virtual |
| virtual void* DOMError::getRelatedException |
( |
| ) |
const |
|
pure virtual |
The related platform dependent exception if any.
- Since
- DOM Level 3
Get the severity of the error.
- See Also
- setSeverity
- Since
- DOM Level 3
| virtual const XMLCh* DOMError::getType |
( |
| ) |
const |
|
pure virtual |
A XMLCh*
indicating which related data is expected in relatedData.
Users should refer to the specification of the error in order to find its XMLCh*
type and relatedData definitions if any.
Note: As an example, DOMDocument::normalizeDocument()
does generate warnings when the "split-cdata-sections" parameter is in use. Therefore, the method generates a DOM_SEVERITY_WARNING with type "cdata-sections-splitted" and the first DOMCDATASection
node in document order resulting from the split is returned by the relatedData attribute.
- Since
- DOM Level 3
The documentation for this class was generated from the following file:


Initialize Method and Instance Variables
Initialize Method
When calling a Ruby class on an object, it is possible to pass in parameters/arguments when creating a new instance of the class. You do this by calling the new method with the parameters passed through it. To access these parameters from the class, you would first define a method called "initialize". Initialize is run when the "new" method is called on the class. Within this method you can use the parameters to create instance variables.
class Restaurant def initialize (name, location) @name = name @location = location end end
Instance Variables
Usually the reason for creating an initialize method is so that we can pass in parameters to it when calling the "new" method. In order to use these parameters throughout the class in other methods, we need to set the parameters to instance variables. You can see in the example above where we created the name and location instance variables in the initialize method. Instance variables are accessible to all methods within that instance. These variables are different from local variables in that they have an "@" in front of the variable name. Local variables are only available in the method in which they are created. Instance variables are great for passing and manipulating information throughout the methods in a class.
Here is an example of how instance variables can be used in a class. Notice how we do not need to pass any parameters into the ad method!
class Restaurant def initialize (name, location) @name = name @location = location end def ad print "Check out #{@name}" at #{@location}!"" end end
To read more about initialize and instance variables, check out http://www.tutorialspoint.com/ruby/ruby_classes.htm and to learn about these and other kinds of variables check out http://rubymonk.com/learning/books/4-ruby-primer-ascent/chapters/45-more-classes/lessons/113-class-variables and http://rubymonk.com/learning/books/4-ruby-primer-ascent/chapters/45-more-classes/lessons/110-instance-variables


Substances Case
Performance-enhancing substances, also known as performance-enhancing drugs (PED), are substances that are used to improve any form of activity performance in humans. A well-known example involves doping in sport, where banned physical performance–enhancing drugs are used by athletes and bodybuilders. Athletic performance-enhancing substances are sometimes referred to as ergogenic aids. Cognitive performance-enhancing drugs, commonly called nootropics, are sometimes used by students to improve academic performance. Performance-enhancing substances are also used by military personnel to enhance combat performance.
Query Words: Substances Doping
Tweets per Day
Contains the count of tweets submitted every day during the researching period.
Sentiment per Month
Contains information about the scores of six basic sentiments (Anger, Disgust, Fear, Joy, Sadness & Surprise), on each month.
Infobox
12.932
12.932 distinct tweets
5.950
5.950 distinct users
16.343
16.343 distinct words
16/05/2016 to 15/05/2017
The time frame of the data is 12 months
Sentiment: Anger
The overall score of our sentiment analysis indicated the main sentiment of the users was Anger.
Most Frequent Words
Contains the most frequent distinct words as extracted from the final data during the researching period.
| # | Word | Frequency |
|---|---|---|
| 1 | igf | 4095 |
| 2 | anavar | 1766 |
| 3 | trenbolone | 1718 |
| 4 | 1057 | |
| 5 | anadrol | 1001 |
| 6 | testosterone | 721 |
| 7 | growth | 689 |
| 8 | muscle | 670 |
| 9 | ghrp | 569 |
| 10 | hormone | 538 |
Most Frequent Hashtags
Contains the most frequent distinct hashtags as extracted from the final data. The table shows the top-10 hashtags along with their frequencies.
| # | Hashtag | Frequency |
|---|---|---|
| 1 | #IGF | 249 |
| 2 | #BodyBuilding | 209 |
| 3 | #trenbolone | 154 |
| 4 | #steroids | 140 |
| 5 | #Muscle | 119 |
| 6 | #Forum | 116 |
| 7 | #Gainz | 110 |
| 8 | #diet | 70 |
| 9 | #testosterone | 69 |
| 10 | #anavar | 64 |
Most Frequent Users
Contains the most frequent distinct Twitter users as extracted from the final data. The table shows the top-10 users along with their frequencies.
| # | User | Frequency |
|---|---|---|
| 1 | @anadrol_online | 637 |
| 2 | @crazybulkweb | 277 |
| 3 | @milknegativity | 236 |
| 4 | @ClenCycle | 226 |
| 5 | @BodyBuildTweets | 116 |
| 6 | @frophoun1 | 108 |
| 7 | @MuscleChem | 88 |
| 8 | @tohicareinfo | 76 |
| 9 | @PeptidesUse | 70 |
| 10 | @okbiotech | 68 |
Most Frequent Mentions
Contains the most frequent distinct Twitter mentions as extracted from the final data. The table shows the top-10 mentions along with their frequencies.
| # | Mention | Frequency |
|---|---|---|
| 1 | @YouTube | 412 |
| 2 | @eBay | 292 |
| 3 | @yotpo | 63 |
| 4 | 39 | |
| 5 | @wordpressdotcom | 34 |
| 6 | @landmarkchem | 19 |
| 7 | @enhancedathlete | 19 |
| 8 | @anadrol_online | 18 |
| 9 | @gmail | 14 |
| 10 | @ok | 14 |
Substances Connections
Presents the connections between different substances. Bigger circles indicate more common substances, while thicker lines indicate stronger connection.


{% include 'user_site/components/profile_panel.html' with user=user numSubmissions=submissions|length numReviews=user|count_incomplete_reviews %}
Submissions
{% bootstrap_messages %}
{% for submission in submissions %}
{% with review_stats=submission.conference.review_stats %}
{% if submission.status == submission.SUBMITTED %}
{% include 'submissions/components/card_submitted.html' with submission=submission %}
{% elif submission.status == submission.UNDER_REVIEW %}
{% include 'submissions/components/card_review.html' with submission=submission %}
{% elif submission.status == submission.ACCEPTED %}
{% include 'submissions/components/card_accepted.html' with submission=submission review_stats=review_stats %}
{% elif submission.status == submission.REJECTED %}
{% include 'submissions/components/card_rejected.html' with submission=submission review_stats=review_stats %}
{% elif submission.status == submission.IN_PRINT %}
{% include 'submissions/components/card_inprint.html' with submission=submission review_stats=review_stats %}
{% elif submission.status == submission.PUBLISHED %}
{% include 'submissions/components/card_published.html' with submission=submission review_stats=review_stats %}
{% else %}
{{ submission.title }} -- {{ submission.get_status_display }}
{% endif %}
{% endwith %}
{% endfor %}


Before Change
for _, group in itertools.groupby(variants,
variant_utils.variant_range_tuple):
variant = next(group)
if not (variant.calls and any(gt >= 0 for gt in variant.calls[0].genotype)):
raise ValueError((
"Variant {} does not have any genotypes. This tool only works with "
"variants that have been labeled.").format(
After Change
for _, group in itertools.groupby(variants,
variant_utils.variant_range_tuple):
variant = next(group)
if not variantcall_utils.has_genotypes(variant_utils.only_call(variant)):
raise ValueError((
"Variant {} does not have any genotypes. This tool only works with "
"variants that have been labeled.").format(


I am currently a Master of Applied Science(Research Based) student in The University of British Columbia. My Research interest is medical image analysis using deep learning techiniques. My research is utilizing Covolutional Neural Network to build an end-to-end diagnosis systems for diabetic retinopathy using retinal image. I am familier with modern deep learning platforms such as tensorflow, keras ,theano and so on. I have solid understanding and skills in machine learning as well as for different deep learning applications including Computer Vision, Natural Language Processing and Recommendation Systems.
I am focusing on the thesis writing at this moment. After graduation(hopefully at early September 2018), I will actively looking for a job in machine learning industry or software industry. Feel free to contact me for any issues.
Python ,Numpy ,Scipy ,Scikit-learn ,Pandas ,OpenCV
Tensorflow ,keras , Theano
Fluent in Python and familier with C++
Basis SQL skills(postgresql)
Performance and scalability optimization
experienced in using version control system(git).


- RandomEvent - Class in com.mygdx.game
-
- RandomEvent(GameScreen) - Constructor for class com.mygdx.game.RandomEvent
-
- randomEvents - Variable in class com.mygdx.game.GameEngine
-
- randomiser - Variable in class com.mygdx.game.RandomEvent
-
- rect - Static variable in class io.github.teamfractal.animation.AnimationTileFlash
-
- rectangle(ShapeRenderer.ShapeType, Color, int, int, int, int, int) - Method in class com.mygdx.game.Drawer
-
Draws a rectangle on the next frame to be rendered
Works by kickstarting a rendering pipeline and drawing a rectangle in that pipeline before disposing of it again
- refreshAuction() - Method in class com.mygdx.game.Market
-
Enables and disables various buttons in the auction based on the players inventory and the value
of the current resources and price of the current trade
- refreshButtonAvailability() - Method in class com.mygdx.game.Market
-
Enables/disables the market's purchase/sale buttons and updates their colours to reflect the player's current
amount of money, the game's current phase and the player's inventory
GRAY: Cannot buy/sell resource on the current phase
GREEN: Can buy/sell resource
RED: Cannot buy/sell resource due to a lack of money or stock
- refreshLabels() - Method in class com.mygdx.game.PlayerSelectScreen
-
update labels and buttons on screen
disable buttons which should not be pressed
change numbers displayed when incremented/decremented
- refreshPlayers() - Method in class com.mygdx.game.Market
-
updates the other player list so all players except the current player are in it
- regionHeight - Variable in class com.mygdx.game.Overlay
-
Height of the overlay region
- regionWidth - Variable in class com.mygdx.game.Overlay
-
Width of the overlay region
- removeAIPlayerButton - Variable in class com.mygdx.game.PlayerSelectScreen
-
decrease number of AI players
- removeBorder() - Method in class com.mygdx.game.TTFont
-
Removes the borders around the internal BitmapFont's characters
Internal FreeTypeFontGenerator re-generates the encapsulate BitmapFont following the border removal
- removeFromTile() - Method in class com.mygdx.game.Chancellor
-
Removes the chancellor from a tile
- removePlayerButton - Variable in class com.mygdx.game.PlayerSelectScreen
-
decrease number of human players
- removeShadow() - Method in class com.mygdx.game.TTFont
-
Removes the shadows beneath the internal BitmapFont's characters
Internal FreeTypeFontGenerator re-generates the encapsulate BitmapFont following the shadow removal
- render(float) - Method in class com.mygdx.game.GameScreen
-
Renders all visual elements (set up in the [show()] subroutine and all of its subsiduaries) to the window
This is called to prepare each and every frame that the game deploys
- render(float) - Method in class com.mygdx.game.HowToPlay
-
Renders all visual elements (set up in the [show()] subroutine and all of its subsiduaries) to the window
This is called to prepare each and every frame that the screen deploys
- render(float) - Method in class com.mygdx.game.LeaderboardFrontend
-
Renders all visual elements (set up in the [show()] subroutine and all of its subsiduaries) to the window
This is called to prepare each and every frame that the screen deploys
- render(float) - Method in class com.mygdx.game.MainMenu
-
Renders all visual elements (set up in the [show()] subroutine and all of its subsiduaries) to the window
This is called to prepare each and every frame that the screen deploys
- render(float) - Method in class com.mygdx.game.MiniGameScreen
-
- render(float) - Method in class com.mygdx.game.PlayerSelectScreen
-
- render(float) - Method in class com.mygdx.game.SplashScreen
-
Renders all visual elements (set up in the [show()] subroutine and all of its subsiduaries) to the window
This is called to prepare each and every frame that the screen deploys
- renderAnimation(float, IAnimation.AnimationType) - Method in class io.github.teamfractal.screens.AbstractAnimationScreen
-
Request to render animation.
- renderAnimation(float) - Method in class io.github.teamfractal.screens.AbstractAnimationScreen
-
Request to render all animation registered.
- renderer - Static variable in class com.mygdx.game.Drawer
-
- reset() - Method in class com.mygdx.game.Chancellor
-
Method to reset the game and make the chancellor hidden on all tiles
- resize(int, int) - Method in class com.mygdx.game.GameScreen
-
- resize(int, int) - Method in class com.mygdx.game.HowToPlay
-
- resize(int, int) - Method in class com.mygdx.game.LeaderboardFrontend
-
- resize(int, int) - Method in class com.mygdx.game.MainMenu
-
- resize(int, int) - Method in class com.mygdx.game.MiniGameScreen
-
- resize(int, int) - Method in class com.mygdx.game.PlayerSelectScreen
-
- resize(int, int) - Method in class com.mygdx.game.SplashScreen
-
- resume() - Method in class com.mygdx.game.GameScreen
-
- resume() - Method in class com.mygdx.game.HowToPlay
-
- resume() - Method in class com.mygdx.game.LeaderboardFrontend
-
- resume() - Method in class com.mygdx.game.MainMenu
-
- resume() - Method in class com.mygdx.game.MiniGameScreen
-
- resume() - Method in class com.mygdx.game.PlayerSelectScreen
-
- resume() - Method in class com.mygdx.game.SplashScreen
-
- resumeGame() - Method in class com.mygdx.game.GameEngine
-
Resumes the game and re-opens the primary in-game inteface
Specifically increments the in-game timer by 1 second, restarts it and marks the engine's internal play-state
to [State.PAUSE]
Note that the timer is incremented by 1 second to circumvent a bug that causes it to lose 1 second whenever
it's restarted
- ReturnBestPlayer(ArrayList<String[]>) - Method in class com.mygdx.game.LeaderboardBackend
-
This function will return the best three players that have played the game so that they are able to be displayed
- reverseAnimation - Variable in class io.github.teamfractal.animation.AnimationTileFlash
-
- rnd - Static variable in class com.mygdx.game.AiPlayer
-
- rnd - Variable in class com.mygdx.game.MiniGameScreen
-
- roboCustColours - Static variable in class com.mygdx.game.Drawer
-
- roboCustOffsetX - Static variable in class com.mygdx.game.Drawer
-
- roboCustOffsetY - Static variable in class com.mygdx.game.Drawer
-
- Roboticon - Class in com.mygdx.game
-
- Roboticon(int, Player, Tile) - Constructor for class com.mygdx.game.Roboticon
-
Constructor of the class
- RoboticonBuyPrice - Variable in class com.mygdx.game.Market
-
Variable holding roboticon buying price.
- roboticonCounter - Variable in class com.mygdx.game.GameScreen
-
Label counter providing a visual representation of the current player's roboticon stocks
- RoboticonID - Variable in class com.mygdx.game.Roboticon
-
Unique numerical identifier of the roboticon.
- roboticonIDCounter - Variable in class com.mygdx.game.GameEngine
-
An integer signifying the ID of the next roboticon to be created
- roboticonSprite - Static variable in class com.mygdx.game.Drawer
-
- RoboticonStock - Variable in class com.mygdx.game.Market
-
Variable holding current amount of Roboticons as an int, initialises at 12 as stated in the brief.
- roboticonStockLabel - Variable in class com.mygdx.game.Market
-
Visualises the amount of Roboticon stocks currently held by the market
- roboticonStored - Variable in class com.mygdx.game.Tile
-
The roboticon that has been placed on the tile.
- roboticonTileNo - Variable in class com.mygdx.game.Malfunction
-
- roboticonToMalfunction - Variable in class com.mygdx.game.Malfunction
-
- runColour - Variable in class com.mygdx.game.GameTimer
-
Holds the colour that the timer's label assumes while it's running
- runFunction() - Method in class com.mygdx.game.Tile
-
Runs the tile's associated function
- runnable - Variable in class com.mygdx.game.Tile
-
Object holding executable method that can be assigned to the tile
- runTerminalMethod() - Method in class com.mygdx.game.GameTimer
-
Runs the timer's terminal method upon being called
This can be called at any time


Manual can opener
Small fuel-operated stove and fuel
Utensils, plates, cups
Wind-up or battery-powered flashlight (extra batteries), candles and matches or lighter
Wind-up or battery-powered radio (extra batteries)
First aid kit
Extra keys (car, house, etc)
Cash, travellers' cheques
Important documents (water proof, fire proof container)
Emergency plan
0 changes of clothes.
0 sleeping bags or warm blanket.
0 rolls of toilet paper.
Soap, hand sanitizer and other hygiene items
Prescription medications, medical equipment
1 package garbage bags
Prepaid phone card, mobile phone charger
Small entertainment items (cards, books, toys, etc)
Household chlorine bleach or water purifying tablets
Basic tools (hammer, pliers, wrench, screwdrivers, work gloves, pocket knife)
Duct tape
Whistle