class: center, middle, inverse, title-slide # Hypothesis testing via simulation --- --- class: center, middle # Hypothesis testing for a single proportion --- ## Packages ```r library(tidyverse) library(infer) ``` --- ## Organ donors People providing an organ for donation sometimes seek the help of a special "medical consultant". These consultants assist the patient in all aspects of the surgery, with the goal of reducing the possibility of complications during the medical procedure and recovery. Patients might choose a consultant based in part on the historical complication rate of the consultant's clients. One consultant tried to attract patients by noting that the average complication rate for liver donor surgeries in the US is about 10%, but her clients have only had 3 complications in the 62 liver donor surgeries she has facilitated. She claims this is strong evidence that her work meaningfully contributes to reducing complications (and therefore she should be hired!). --- ## Data ```r organ_donor <- read_csv("../../data/organ-donor.csv") organ_donor %>% count(outcome) ``` ``` ## # A tibble: 2 x 2 ## outcome n ## <chr> <int> ## 1 complication 3 ## 2 no complication 59 ``` --- ## Parameter vs. statistic A **parameter** for a hypothesis test is the "true" value of interest. We typically estimate the parameter using a **sample statistic** as a **point estimate**. `\(p~\)`: true rate of complication `\(\hat{p}~\)`: rate of complication in the sample = `\(\frac{3}{62}\)` = 0.048 --- ## Correlation vs. causation .question[ Is it possible to assess the consultant's claim using the data? ] -- No. The claim is that there is a causal connection, but the data are observational. For example, maybe patients who can afford a medical consultant can afford better medical care, which can also lead to a lower complication rate. While it is not possible to assess the causal claim, it is still possible to test for an association using these data. For this question we ask, could the low complication rate of `\(\hat{p}\)` = 0.048 be due to chance? --- ## Two claims - **Null hypothesis:** "There is nothing going on" Complication rate for this consultant is no different than the US average of 10% -- - **Alternative hypothesis:** "There is something going on" Complication rate for this consultant is **lower** than the US average of 10% --- ## Hypothesis testing as a court trial - **Null hypothesis**, `\(H_0\)`: Defendant is innocent - **Alternative hypothesis**, `\(H_A\)`: Defendant is guilty -- - **Present the evidence:** Collect data -- - **Judge the evidence:** "Could these data plausibly have happened by chance if the null hypothesis were true?" * Yes: Fail to reject `\(H_0\)` * No: Reject `\(H_0\)` --- ## Hypothesis testing framework - Start with a null hypothesis, `\(H_0\)`, that represents the status quo - Set an alternative hypothesis, `\(H_A\)`, that represents the research question, i.e. what we’re testing for - Conduct a hypothesis test under the assumption that the null hypothesis is true and calculate a **p-value** (probability of observed or more extreme outcome given that the null hypothesis is true) - if the test results suggest that the data do not provide convincing evidence for the alternative hypothesis, stick with the null hypothesis - if they do, then reject the null hypothesis in favor of the alternative --- ## Setting the hypotheses .question[ Which of the following is the correct set of hypotheses? ] (a) `\(H_0: p = 0.10\)`; `\(H_A: p \ne 0.10\)`
 (b) `\(H_0: p = 0.10\)`; `\(H_A: p > 0.10\)`
 (c) `\(H_0: p = 0.10\)`; `\(H_A: p < 0.10\)`
 (d) `\(H_0: \hat{p} = 0.10\)`; `\(H_A: \hat{p} \ne 0.10\)`
 (e) `\(H_0: \hat{p} = 0.10\)`; `\(H_A: \hat{p} > 0.10\)`
 (f) `\(H_0: \hat{p} = 0.10\)`; `\(H_A: \hat{p} < 0.10\)`
 --- ## Simulating the null distribution Since `\(H_0: p = 0.10\)`, we need to simulate a null distribution where the probability of success (complication) for each trial (patient) is 0.10. .question[ Describe how you would simulate the null distribution for this study using a bag of chips. How many chips? What colors? What do the colors indicate? How many draws? With replacement or without replacement? ] --- ## What do we expect? .question[ When sampling from the null distribution, what is the expected proportion of success (complications)? ] --- ## Simulation #1 ``` ## sim1 ## complication no complication ## 3 59 ``` ``` ## [1] 0.0483871 ``` ![](u2_d07-sim-test_files/figure-html/unnamed-chunk-3-1.png) --- ## Simulation #2 ``` ## sim2 ## complication no complication ## 9 53 ``` ``` ## [1] 0.1451613 ``` ![](u2_d07-sim-test_files/figure-html/unnamed-chunk-4-1.png) --- ## Simulation #3 ``` ## sim3 ## complication no complication ## 8 54 ``` ``` ## [1] 0.1290323 ``` ![](u2_d07-sim-test_files/figure-html/unnamed-chunk-5-1.png) --- ## This is getting boring... We need a way to automate this process! --- ## Using `infer` to generate the null distribution .small[ ```r null_dist <- organ_donor %>% specify(response = outcome, success = "complication") %>% hypothesize(null = "point", p = c("complication" = 0.10, "no complication" = 0.90)) %>% generate(reps = 1000, type = "simulate") %>% calculate(stat = "prop") ``` ] ``` ## # A tibble: 1,000 x 2 ## replicate stat ## <dbl> <dbl> ## 1 1 0.161 ## 2 2 0.081 ## 3 3 0.161 ## 4 4 0.145 ## 5 5 0.097 ## 6 6 0.145 ## 7 7 0.081 ## 8 8 0.097 ## 9 9 0.161 ## 10 10 0.048 ## # ... with 990 more rows ``` --- ## Visualizing the null distribution .question[ What would you expect the center of the null distribution to be? ] -- ```r ggplot(data = null_dist, mapping = aes(x = stat)) + geom_bar(width = .01) + labs(title = "Null distribution") ``` ![](u2_d07-sim-test_files/figure-html/unnamed-chunk-8-1.png) --- ## Calculating the p-value, visually .question[ What is the p-value, i.e. in what % of the simulations was the simulated sample proportion at least as extreme as the observed sample proportion? ] ![](u2_d07-sim-test_files/figure-html/unnamed-chunk-9-1.png) --- ## Calculating the p-value, directly ```r null_dist %>% filter(stat <= (3/62)) %>% summarise(p_value = n()/nrow(null_dist)) ``` ``` ## # A tibble: 1 x 1 ## p_value ## <dbl> ## 1 0.125 ``` --- ## Significance level We often use 5% as the cutoff for whether the p-value is low enough that the data are unlikely to have come from the null model. This cutoff value is called the **significance level**, `\(\alpha\)`. - If p-value < `\(\alpha\)`, reject `\(H_0\)` in favor of `\(H_A\)`: The data provide convincing evidence for the alternative hypothesis. - If p-value > `\(\alpha\)`, fail to reject `\(H_0\)` in favor of `\(H_A\)`: The data do not provide convincing evidence for the alternative hypothesis. --- ## Conclusion .question[ What is the conclusion of the hypothesis test? ] -- Since the p-value is greater than the significance level, we fail to reject the null hypothesis. These data do not provide convincing evidence that this consultant incurs a lower complication rate than 10% (overall US complication rate). --- ## Let's get real - 1000 simulations is borderline sufficient - We usually simulate around 15,000 times to get an accurate distribution --- ## Run the test .small[ ```r null_dist <- organ_donor %>% specify(response = outcome, success = "complication") %>% hypothesize(null = "point", p = c("complication" = 0.10, "no complication" = 0.90)) %>% generate(reps = 1500, type = "simulate") %>% calculate(stat = "prop") ``` ] --- ## Visualize and calculate .small[ ```r ggplot(data = null_dist, mapping = aes(x = stat)) + geom_histogram(binwidth = 0.01) + geom_vline(xintercept = 3/62, color = "red") ``` ![](u2_d07-sim-test_files/figure-html/unnamed-chunk-12-1.png) ```r null_dist %>% filter(stat <= 3/62) %>% summarise(p_value = n()/nrow(null_dist)) ``` ``` ## # A tibble: 1 x 1 ## p_value ## <dbl> ## 1 0.131 ``` ] --- class: center, middle # One vs. two sided hypothesis tests --- ## Types of alternative hypotheses - One sided (one tailed) alternatives: The parameter is hypothesized to be less than or greater than the null value, < or > -- - Two sided (two tailed) alternatives: The parameter is hypothesized to be not equal to the null value, `\(\ne\)` - Calculated as two times the tail area beyond the observed sample statistic - More objective, and hence more widely preferred -- .question[ Average systolic blood pressure of people with Stage 1 Hypertension is 150 mm Hg. Suppose we want to use a hypothesis test to evaluate whether a new blood pressure medication has an effect on the average blood pressure of heart patients. What are the hypotheses? ] --- class: center, middle # Testing for independence --- ## Is yawning contagious? .question[ Do you think yawning is contagious? ] .pull-left[ ![empirical](img/yawn1.png) ] .pull-right[ ![empirical](img/yawn2.png) ] --- ## Is yawning contagious? An experiment conducted by the MythBusters tested if a person can be subconsciously influenced into yawning if another person near them yawns. https://www.discovery.com/tv-shows/mythbusters/videos/is-yawning-contagious-2 --- ## Study description In this study 50 people were randomly assigned to two groups: 34 to a group where a person near them yawned (treatment) and 16 to a control group where they didn't see someone yawn (control). ```r mb_yawn <- read_csv("../../data/mb-yawn.csv") ``` ```r mb_yawn %>% count(group, outcome) ``` ``` ## # A tibble: 4 x 3 ## group outcome n ## <chr> <chr> <int> ## 1 control not yawn 12 ## 2 control yawn 4 ## 3 treatment not yawn 24 ## 4 treatment yawn 10 ``` --- ## Proportion of yawners .small[ ```r mb_yawn %>% count(group, outcome) %>% group_by(group) %>% mutate(p_hat = n / sum(n)) ``` ``` ## # A tibble: 4 x 4 ## # Groups: group [2] ## group outcome n p_hat ## <chr> <chr> <int> <dbl> ## 1 control not yawn 12 0.75 ## 2 control yawn 4 0.25 ## 3 treatment not yawn 24 0.706 ## 4 treatment yawn 10 0.294 ``` ] - Proportion of yawners in the treatment group: `\(\frac{10}{34} = 0.2941\)` - Proportion of yawners in the control group: `\(\frac{4}{16} = 0.25\)` - Difference: `\(0.2941 - 0.25 = 0.0441\)` - Our results match the ones calculated on the MythBusters episode. --- ## Independence? .question[ Based on the proportions we calculated, do you think yawning is really contagious, i.e. are seeing someone yawn and yawning dependent? ] ``` ## # A tibble: 4 x 4 ## # Groups: group [2] ## group outcome n p_hat ## <chr> <chr> <int> <dbl> ## 1 control not yawn 12 0.75 ## 2 control yawn 4 0.25 ## 3 treatment not yawn 24 0.706 ## 4 treatment yawn 10 0.294 ``` --- ## Dependence, or another possible explanation? - The observed differences might suggest that yawning is contagious, i.e. seeing someone yawn and yawning are dependent. - But the differences are small enough that we might wonder if they might simple be **due to chance**. - Perhaps if we were to repeat the experiment, we would see slightly different results. - So we will do just that - well, somewhat - and see what happens. - Instead of actually conducting the experiment many times, we will **simulate** our results. --- ## Two competing claims - "There is nothing going on." Yawning and seeing someone yawn are **independent**, yawning is not contagious, observed difference in proportions is simply due to chance. `\(\rightarrow\)` Null hypothesis - "There is something going on." Yawning and seeing someone yawn are **dependent**, yawning is contagious, observed difference in proportions is not due to chance. `\(\rightarrow\)` Alternative hypothesis --- ## Checking for independence .question[ Does seeing someone yawn and yawning appear to be dependent? ] .small[ ```r null_dist <- mb_yawn %>% specify(outcome ~ group, success = "yawn") %>% hypothesize(null = "independence") %>% generate(1000, type = "permute") %>% calculate(stat = "diff in props", order = c("treatment", "control")) ``` ] --- ## Visualizing the null distribution .question[ What would you expect the center of the null distribution to be? ] -- ```r ggplot(data = null_dist, mapping = aes(x = stat)) + geom_bar() + labs(title = "Null distribution") ``` ![](u2_d07-sim-test_files/figure-html/unnamed-chunk-18-1.png) --- ## Calculating the p-value, visually .question[ What is the p-value, i.e. in what % of the simulations was the simulated difference in sample proportion at least as extreme as the observed difference in sample proportions? ] ![](u2_d07-sim-test_files/figure-html/unnamed-chunk-19-1.png) --- ## Calculating the p-value, directly ```r null_dist %>% filter(stat >= 0.0441) %>% summarise(p_value = n()/nrow(null_dist)) ``` ``` ## # A tibble: 1 x 1 ## p_value ## <dbl> ## 1 0.491 ``` --- ## Conclusion .question[ What is the conclusion of the hypothesis test? ]
 -- .question[ Do you "buy" this conclusion? ]


In this post, we are going to discuss a very powerful -mathematically as well as pragmatically- optimization framework; the First Order Primal Dual Convex Optimization Technique. This involves a few definitions that may not look friendly at first, but the framework is in fact relatively understandable. The framework has successfully been applied to image denoizing and image inpainting, and is really worthy of spending some time to comprehend it.
We will remind a couple of definitions that are useful in this framework, but you can find many more details, definitions, theorems and proofs in "Convex Analysis" by Hiriart-Urruty and Lemarchal, "Convex Optimization" by Boyd and Vandenberghe or "Optimization. Applications in image processing." by Nikolova (the latter two are available freely in pdf format).
We are going to consider here a general problem of the form: $$ \begin{align} & \underset{x}{\text{minimize}} & & \sum_{i \in \Omega} M_i(x_i) + R(Lx) \end{align} $$ with:
- \(M_i\) a lower semi continuous function
- \(R\) a lower semi continuous function
- \(L\) a continuous linear operator
I strongly suggest this excellent paper from A. Chambolle : An introduction to Total Variation for Image Analysis, since it is the paper we are going to base this blog post on.
Soooo.... Why is this useful, again?
Let's say you need to denoise an image for instance. In the Total Variation context, you can write image denoising as the following optimization problem: $$ \begin{align*} & \underset{x}{\text{minimize}} & & \left\| \nabla x\right\|_{1} + \frac{\lambda}{2} \left\| x - f \right\|^2_2 \end{align*} $$ where:
- \(x \in X\) is the sought solution,
- \(f \in X\) is the noisy input image,
- \(\lambda \in \mathbb{R} \) is a parameter to define the trade of between regularization and data fitting,
- \(\left\| \nabla x \right\|_{1}\) represents the discretized version of the isotropic total variation of the function \(x\).
The Total Variation (TV) framework also allows for a nice formulation of the motion estimation problem: $$\begin{align} \min \limits_{x\in \mathcal{X}, v \in \mathcal{Y}} \left\| \nabla u \right\|_{1} + \left\| \nabla v \right\|_{1} + \lambda \left\| \rho (u, v) \right\|_{1} \end{align}$$ where:
- \((u, v)\) are the apparent motion vectors,
- \(\left\| \nabla u \right\|_{1} + \left\| \nabla v \right\|_{1}\) is the total variation of the apparent motion field,
- \(\left\| \rho (u, v) \right\|_{1} = I_{t} + (\nabla I)^T (v - v_0) + \beta u \) is the linearization of the assumption that the intensities of the pixels stay constant over time, known as the Optical Flow Constraint, plus a term that takes into account a drift in the value of pixels over time,
- \(\lambda \in \mathbb{R} \) is a parameter to define the trade of between regularization and data fitting,
- \(\left\| \nabla u \right\|_{1}\) represents the discretized version of the isotropic total variation of the function \(u\).
This same TV framework can also be used for inpainting: $$\begin{align} \min \limits_{x\in \mathcal{X}} \left\| \Phi u \right\|_{1} + \frac{\lambda}{2} \left\| u-g \right\|_{2}^2 \end{align}$$ where:
- \(u\) is the sought solution,
- \(g \in X\) is the noisy input image,
- \(\Phi\) is a linear operator, which can be \(\nabla\) or the Fast Discrete Curvelet Transform for instance,
- \(\left\| \Phi u \right\|_{1}\) is,
- \(\left\| u-g \right\|_{2}^2\) is the linearization of the assumption that the intensities of the pixels stay constant over time,
- \(\lambda \in \mathbb{R} \) is a parameter to define the trade of between regularization and data fitting.
The aim of the inpainting model is to find a sparse representation of the image \(u\) in the domain of \(\Phi\). This is achieved through minimizing the L1 norm.
Useful definitions
Let's first define a couple of concepts that will be useful to us. A function \(f\)on a normed real vector space \(V\) is proper if \(f: V \rightarrow ]-\infty , \infty] \) and if it is not identically equal to \(+\infty \).
A function \(f\) on a normed real vector space \(V\) is coercive if \(\lim_{\left\|u \right\| \rightarrow + \infty} f(u) = + \infty\).
Most of the functions we will consider here will be lower semi-continuous. This means that a function \(f\) on a real topological space \(\mathcal{X}\), \(f: V \rightarrow ]-\infty , \infty] \) is lower semi-continuous (l.s.c.) if \( \forall \lambda \in \mathbb{R}\), the set \( {u \in V: f(u) \leq \lambda}\) is closed in V.
This property is quite important, as we will see in the following theorem: Let \(U\) be non-empty and closed, and \( f : \mathbb{R}^n \rightarrow \mathbb{R}\) be l.s.c.and proper. If \(U\) is not bounded, we also suppose that f is coercive. Then: \(\exists \hat{u} \in U s.t. f(\hat{u}) = inf_{u \in U} f(u)\).
This is actually very important; it means that if \(f\) has all the aforementioned properties, it takes a minimum value on any set \(U\) non-empty and closed.
We will suppose here that you are familiar with the concept of convex functions and sets.
The Moreau Envelope
In our image denoising or inpainting context, the function to optimize may not be smooth, and this complicates the task of minimizing/optimizing the objective function. In order to alleviate this difficulty, a brilliant idea has been introduced in "Proximité et dualité dans un espace hilbertien" by Moreau. Given a proper lsc convex function \( F : \mathcal{X} \leftarrow \mathbb{R} \), the Moreau envelope constructs a smoothed version of function \(F\) where the degree of smoothing is controlled by a parameter \(\tau\). The Moreau envelope is defined as the unique solution of the optimization problem: $$ \begin{align} \mathcal{M}_{F, \tau} (\tilde{x}) = \min \limits_{x \in \mathcal{X}} F(x) + \frac{1}{2 \tau} \left\| x - \tilde{x} \right\|_2^2 \end{align} $$
We note that this problem is smooth and it admits a unique minimizer due to the added smoothing \(\mathcal{l}_2\) norm term.
This being said, just because a problem is strictly convex doesn't mean it is easy to solve. So basically, if \( F \) is hard to optimize, the Moreau envelope is likely difficult to compute. Nonetheless, there exist some functions whose Moreau envelope computation yields a closed form.
We can associate to this function the following operator: $$ \begin{align} prox_{F, \tau} (\tilde{x}) = \arg \min \limits_{x \in \mathcal{X}} F(x) + \frac{1}{2 \tau} \left\| x - \tilde{x} \right\|_2^2 \end{align} $$ that returns the unique minimizer of the Moreau envelope. This operator is called the proximal operator.
Here is a figure to illustrate what the Moreau envelope is on a non-smooth function, with \(\tau=1\) :
Here is figure to illustrate the influence of the \(\tau\) parameter. We draw the function \(F\) and the functions \(x \mapsto F(x) + \frac{1}{2\tau} \left\| x - \tilde{x} \right\|_2^2 \), with \(\tilde{x}\) fixed at 0.5, with various \(\tau\) values:
The Fenchel Transform
Another difficulty of this optimization problem is the coupling of variables \(x_i\) due to the linear operator \(L\) and the function \(R\). Combined to the eventual non smoothness of \(R\), this imposes to optimize all variables \(x_i\) jointly. One solution would be to smooth the objective function \(R\) to make corners disappear. However, this changes the objective function which might not be desirable. Using the Moreau envelope is unfortunately generally computationally very intensive because, as seen in Section 2.3.1, the proximal operator is not an additive function. The first order primal dual technique relies on the Fenchel transformation to decouple the variables. This transformation comes with the cost of adding new variables, named dual variables, to our current optimization problem. The Fenchel transform augments to a saddle point optimization problem, that is to say, a convex minimization problem for the primal and a concave maximization problem for the dual variables (see following figure).
The Fenchel Transform, also called convex conjugate of a function \(R\) is defined as follows: $$ \begin{align} R^{*}(y) = \sup \limits_{x} \langle x, y \rangle - R(x) \end{align} $$ This transformation encodes the convex hull of the function \(R\) epigraph as a set of hyperplanes. It is worth noting that the Fenchel transform always yields a convex function.
Applying this transform twice to the function \(R\) yields the bi-convex conjugate \( R^{**} \): $$ \begin{align} R^{**}(y) = \sup \limits_{y} \langle x, y \rangle - R^*(y) \end{align} $$ So if \(R\) is a convex function, \( R^{**} = R \) and we have: $$ \begin{align} R(x) = \sup \limits_{y} \langle x, y \rangle - R^*(y) \end{align} $$ And this gives an efficient approach to decouple the variable \(x\) in our context!!
Primal Dual algorithm
So now let's see how to combine the last two ideas in our optimization problem. First, we introduce the Moreau envelope for the \( (M_i)_{i} \) : $$ \begin{align} \arg \inf \limits{x \in \mathcal{X}} \sum_{i} M_i (x_i) + \frac{1}{\tau} \left\| x_i - \tilde{x}_i \right\|^2_2 + R(Lx) \end{align} $$ Then we apply the Fenchel Transform to \(R\): $$ \begin{align} \arg \inf \limits{x \in \mathcal{X}} \sum_{i} M_i (x_i) + \frac{1}{2\tau} \left\| x_i - \tilde{x}_i \right\|^2_2 + \langle y , Lx \rangle - R^{*}(y) \end{align} $$ So now, all the \(x_i\) are decoupled. Their minimization is achieved by computing a proximal operator. But \(R^{*}\) is not assured to be smooth, so we are going to use the Moreau envelope again on \(R^{*}\): $$ \begin{align} \arg \inf \limits{x \in \mathcal{X}} \sum_{i} M_i (x_i) + \frac{1}{2\tau} \left\| x_i - \tilde{x}_i \right\|^2_2 + \langle y , Lx \rangle - R^{*}(y) - \frac{1}{2 \sigma} \left\| y - \tilde{y} \right\|^2_2 \end{align} $$ And now, we can transform this problem into an iterative one by doing: $$ \begin{align} \arg \inf \limits{x \in \mathcal{X}} \sum_{i} M_i (x_i^{(n)}) + \frac{1}{2\tau} \left\| x_i^{(n)} - x_i^{(n-1)} \right\|^2_2 + \langle y^{(n)} , Lx^{(n)} \rangle - R^{*}(y^{(n)}) - \frac{1}{2 \sigma} \left\| y^{(n)} - y^{(n-1)} \right\|^2_2 \end{align} $$ So now, we have, for all \(n\), a problem that is convex with respect to \(x^{(n)}\) and concave with respect to \( y^{(n)}\); we have a saddle point problem formulation! And we know that the two series converge to a fixed saddle point.
Now that we finally have a problem that is iteratively optimizable, let's see the pseudo code of the Primal Dual Algorithm:
\begin{algorithm} \caption{First Order Primal Dual Algorithm} \begin{algorithmic} \PROCEDURE{primal-dual}{$M_i, R, L, data$} \STATE Compute $R^{*}$ \STATE Initialize Primal variable $x^0 \leftarrow 0$ \STATE Initialize Dual variable $y^0 \leftarrow 0$ \STATE $\tilde{x} \leftarrow 0$ \WHILE{Stopping Criteria is not met} \STATE {Optimize dual variable $y^{(n+1)} \leftarrow prox_{\sigma (\langle y, L\tilde{x} \rangle - R^{*} (y^{(n)}))} (y^{(n)})$} \STATE {Optimize the primal variable $x^{(n+1)} \leftarrow prox_{\tau(\sum_i M_i(x_i) + \langle L^{T}y^{(n)}, x \rangle) (x^{(n)})}$} \STATE {Smooth Variable $\tilde{x} \leftarrow x^{(n+1)} + \theta (x^{(n+1)} - x^{(n)})$} \ENDWHILE \RETURN $x^{(n)}$ \ENDPROCEDURE \end{algorithmic} \end{algorithm}
A real life example
In this section, we are going to look at an example of image denoising following the ROF model (from Rudin, Osher and Fatemi). Let's say we have a noisy image \(c\), and we are going to note \(x\) the primal variable. The ROF problem for denoising is the following optimization problem: \[ min_x \frac{\lambda}{2} \left\| x - c \right\|^2_2 + \left\| \nabla x \right\|_1 \].
In this context, the convex conjugate of the regularization term is: \[F^* (y) = \sup \limits_{x \in \mathbb{R}^d} {\langle x, y \rangle - \left\|x\right\|} \\ = \sup \limits_{x \in \mathbb{R}^d} {\sum_{i=1}^d x_i y_i - \|x_i\|}\] \(y_i\) must be less or equal than 1, otherwise \(F^*\) is not finite. Then we can write: \[\sum_{i=1}^d x_i y_i - \|x_i\| \leq \sum_{i=1}^d x_i - \|x_i\| \leq 0\] The supremum is then attained for \(0_{\mathbb{R}^d}\). So the convex conjugate of this term is: \[F^*(y) = \mathcal{I}_{\left\|.\right\|_{\infty}\leq 1} (y)\] After a direct calculation of \( (Id + \sigma \partial F^*)^{-1} (\tilde{p})\), the proximal of this term is: \[prox_{\sigma F^*} (\tilde{p}) = \frac{\tilde{p}_{ij}}{max(1, \| \tilde{p}_{ij}\|)}\]
Another direct calcultation of \( (Id + \tau \partial G)^{-1} (\tilde{u})\) gives: \[ prox_{\tau G} (\tilde{u}) = \frac{\tilde{u}+\lambda \tau \nabla \tilde{u}}{1 + \lambda \tau}\]
Let's see now how to implement the differential operators:
def forward_gradient(im):
"""
Function to compute the forward gradient of the image I.
Definition from: http://www.ipol.im/pub/art/2014/103/, p208
:param im: numpy array [MxN], input image
:return: numpy array [MxNx2], gradient of the input image, the first channel is the horizontal gradient, the second
is the vertical gradient.
"""
h, w = im.shape
gradient = np.zeros((h, w, 2), im.dtype) # Allocate gradient array
# Horizontal direction
gradient[:, :-1, 0] = im[:, 1:] - im[:, :-1]
# Vertical direction
gradient[:-1, :, 1] = im[1:, :] - im[:-1, :]
return gradient
def backward_divergence(grad):
"""
Function to compute the backward divergence.
Definition in : http://www.ipol.im/pub/art/2014/103/, p208
:param grad: numpy array [NxMx2], array with the same dimensions as the gradient of the image to denoise.
:return: numpy array [NxM], backward divergence
"""
h, w = grad.shape[:2]
div = np.zeros((h, w), grad.dtype) # Allocate divergence array
# Horizontal direction
d_h = np.zeros((h, w), grad.dtype)
d_h[:, 0] = grad[:, 0, 0]
d_h[:, 1:-1] = grad[:, 1:-1, 0] - grad[:, :-2, 0]
d_h[:, -1] = -grad[:, -2:-1, 0].flatten()
# Vertical direction
d_v = np.zeros((h, w), grad.dtype)
d_v[0, :] = grad[0, :, 1]
d_v[1:-1, :] = grad[1:-1, :, 1] - grad[:-2, :, 1]
d_v[-1, :] = -grad[-2:-1, :, 1].flatten()
# Divergence
div = d_h + d_v
return div
It is of critical importance that these two operators are adjoint to the sign of each other. We can check that it is the case by check the value of the following expression is \(0\):
check = abs((y[:] * gx[:]).sum() + (dy[:]*x[:]).sum())
You can find this in the test folder of the Github Code .
Then, we are going to implement the dual proximal operator:
def proximal_linf_ball(p, r=1.0):
"""
Proximal operator for sum(gradient(x)).
:param p: numpy array [MxNx2],
:param r: float, radius of infinity norm ball.
:return: numpy array, same dimensions as p
"""
n_p = np.maximum(1.0, norm2(p) / r)
return p / n_p[..., np.newaxis]
And the main loop of the algorithm becomes:
import numpy as np
import matplotlib.pyplot as plt
import skimage
from scipy.misc import face
from norm import norm1, norm2
from differential_operators import backward_divergence, forward_gradient
from proximal_operators import proximal_linf_ball
def dual_energy_rof(y, im_obs):
"""
Computes the dual energy of ROF problem.
:param y:
:param im_obs: numpy array, observed image
:return: float, dual energy
"""
nrg = -0.5 * (im_obs - backward_divergence(y))**2
nrg = nrg.sum()
return nrg
def primal_energy_rof(x, img_obs, clambda):
"""
Computes the primal energy of the ROF problem.
:param x:
:param img_obs:
:param clambda:
:return:
"""
energy_reg = norm1(forward_gradient(x)).sum()
energy_data_term = 0.5*clambda * norm2(x - img_obs).sum()
return energy_reg + energy_data_term
if __name__ == '__main__':
img_ref = np.array(face(True)) # Reference image
img_obs = skimage.util.random_noise(img_ref, mode='gaussian') # noisy image
# Parameters
norm_l = 7.0
max_it = 3000
theta = 1.0
tau = 0.01
sigma = 1.0 / (norm_l * tau)
lambda_rof = 7.0
# Variables
x = img_obs
x_tilde = x
h, w = img_ref.shape
y = np.zeros((h, w, 2))
p_nrg = primal_energy_rof(x, img_obs, lambda_rof)
print "Primal Energy = ", p_nrg
d_nrg = dual_energy_rof(y, img_obs)
print "Dual Energy = ", d_nrg
# Solve ROF
primal = np.zeros((max_it,))
dual = np.zeros((max_it,))
gap = np.zeros((max_it,))
primal[0] = p_nrg
dual[0] = d_nrg
y = forward_gradient(x)
for it in range(max_it):
# Dual update
y = y + sigma * forward_gradient(x_tilde)
y = proximal_linf_ball(y, 1.0)
# Primal update
x_old = x
x = (x + tau * backward_divergence(y) + lambda_rof * tau * img_obs) / (1.0 + lambda_rof * tau)
# Smoothing
x_tilde = x + theta * (x - x_old)
# Compute energies
primal[it] = primal_energy_rof(x_tilde, img_obs, sigma)
dual[it] = dual_energy_rof(y, img_obs)
gap[it] = primal[it] - dual[it]
plt.figure()
plt.plot(np.asarray(range(max_it)), primal, label="Primal Energy")
plt.legend()
plt.figure()
plt.plot(np.asarray(range(max_it)), dual, label="Dual Energy")
plt.legend()
plt.figure()
plt.plot(np.asarray(range(max_it)), gap, label="Gap")
plt.legend()
# Plot reference, observed and denoised image
f, ((ax1, ax2), (ax3, ax4)) = plt.subplots(2, 2, sharex='col', sharey='row')
ax1.imshow(img_ref)
ax1.set_title("Reference image")
ax2.imshow(img_obs)
ax2.set_title("Observed image")
ax3.imshow(x)
ax3.set_title("Denoised image")
plt.show()
The code is available in its full here.
You can leave comments down here, or contact me through the contact form of this blog if you have questions or remarks on this post!


Click to Show/Hide Instructions
The following webpage contains the heading,
Student Grades, and uses a script that inputs a student's
homework average, mid-term exam score, final exam score, and ACR (all as integers)'.
Calculate the student's final average according to the formula:
final average = (.5 * hwAvg) + (.2 * midExam) + (.2 * finalExam) + (.1 * ACR) '


Police searching for elderly man missing from Logan
by Matt McDonaldPolice are appealing for help from the public to track down an elderly man missing from the Logan area.
73-year-old Heikki Nieminen has been missing since around 2pm on Saturday afternoon.
He was last seen leaving a home on Turill St in Shailer Park and hasn’t been heard from since.
Police believe he may have travelled to Brisbane on public transport.
Concerns are held for his welfare as he has a medical condition and may be disorientated.
Heikki is described as Caucasian, around 175cm tall with grey hair and blue eyes.
He was last seen wearing a blue and white polo shirt.
Police are urging anyone who sees him to contact them.
If you have information for Police, please contact Policelink on 131 444 or provide information using their online form 24 hours per day.
You can also report information about crime anonymously to Crime Stoppers by calling 1800 333 000 or via crimestoppersqld.com.au 24 hours per day. Crime Stoppers is a registered charity and community volunteer organisation.


Time magazine hand Ben Stokes another memorable ‘100’
The England all-rounder has been named in a prestigious new list by famous publication.
Ben Stokes has been feted by Time magazine in its inaugural ‘100 Next’ List – a lofty collection of “rising stars shaping the future”.
The England all-rounder has enjoyed an unforgettable year, playing a starring role in the historic World Cup victory at Lord’s then producing one of Test cricket’s greatest ever innings in the Ashes Test at Headingley.
His place among the upper echelon of British sporting stars was duly assured, but in being picked out by the famous American news weekly alongside global leaders in entertainment, politics, science and activism he has reached a whole new audience.
Without him, England would not be world cricket championsStephen Fry on Ben Stokes
The Time 100 Next List is billed as a forward-looking companion piece to the magazine’s traditional countdown of the world’s most influential people and contains characters as disparate as Pete Buttiegieg – a prospective candidate for the presidency of the United States – actor Ezra Miller, rapper Lil Nas X and tennis player Coco Gauff.
Actor and writer Stephen Fry penned Stokes’ tribute. In it he wrote: “In summer 2019, Ben Stokes unleashed two such explosions of greatness, each one enough to cement his reputation as one of the foremost all-around talents in cricketing history.
“Without him, England would not be world cricket champions and we would have lost a subsequent five-match series to our old rival Australia. He’ll never have to buy a drink again.”


Film photography is where it all began. Before the birth of digital photography, we all took photographs on strips of plastic with layers of emulsion. Further back from that, we used glass and metal sheets which played both the role of light carrier and print.
These strips come with a coating of a silver halide solution, protected by a layer of gelatin. The photographs we took burned an imprint into the silver.
To get a negative out of this, chemicals and washes stripped the plastic of all its coating. This reveals a reversed image.
Dark areas of the scene would show up as transparent on the negative.
The grain or ‘noise’ we see from higher ISOs come from the size of the silver pieces.
The bigger the pieces, the better they were at capturing light but that also meant they were big enough to see.
Film photography is all about having a physical element with the possibility of experimentation. It relies on the process of conscious image-making because you have a limited number of frames. It is also time-consuming due to the developing and scanning process.
These days, film photography is making a huge comeback. There are plenty of reasons why you should shoot film. There are a lot of online communities, collectives and groups on social media. You can even find hashtags like #filmisnotdead where people are aiming to bring film photography back to life.
Click on the hamburger menu to reveal the full documentation. Enjoy.


--- layout: default title: Categories permalink: /categories/ ---
Notes organized by category.
{% assign collection = site.note | group_by: "categories" %} {% for group in collection %} {% comment %} This is super hacky and I don't like it {% endcomment%}


带边框的UIImage缩放
一个带边框的UIImage如果使用常规的缩放，边框部分将被按照缩放比例拉伸或压缩，有些时候这并不是我们所期望的..比如这个边框是根据图片大小变化的外框。比如下面的类似按钮的不明物体图片：主体为渐变蓝色，边框为外圈白色，灰色底板为背景。Origin post can be found here.
I recently began writing a short example to learn more about the iOS 5 Appearance API and customizing UINavigationBar objects. The goal was to add a custom background, title and text to the navbar. Once I had this working, to keep a consist look across my application, I began tweaking the buttons on the navbar using the same Appearance API.
常见的按钮添加和背景设置如下：
[crayon]
UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(80, 130, 160, 44)];
[button setTitle:@”Test Button” forState:UIControlStateNormal];
// Image with without cap insets
UIImage *buttonImage = [UIImage imageNamed:@”blueButton”];
[button addTarget:self action:@selector(buttonPressed:) forControlEvents: UIControlEventTouchUpInside];
[button setBackgroundImage:buttonImage forState:UIControlStateNormal];
[[self view] addSubview:button];
[/crayon]
所得到的按钮会相当悲剧…
边框，特别是左右边框由于按钮frame过大被惨烈拉伸…
iOS5中提供了一个新的UIImage方法，resizableImageWithCapInsets:，可以将图片转换为以某一偏移值为偏移的可伸缩图像（偏移值内的图像将不被拉伸或压缩）。
用法引述如下：
resizableImageWithCapInsets:
Creates and returns a new image object with the specified cap insets.- (UIImage *)resizableImageWithCapInsets:(UIEdgeInsets)capInsetsParameters
- capInsets
- The values to use for the cap insets.
Return Value
A new image object with the specified cap insets.
Discussion
You use this method to add cap insets to an image or to change the existing cap insets of an image. In both cases, you get back a new image and the original image remains untouched.During scaling or resizing of the image, areas covered by a cap are not scaled or resized. Instead, the pixel area not covered by the cap in each direction is tiled, left-to-right and top-to-bottom, to resize the image. This technique is often used to create variable-width buttons, which retain the same rounded corners but whose center region grows or shrinks as needed. For best performance, use a tiled area that is a 1x1
pixel area in size.
输入参数为一个capInsets结构体：
Defines inset distances for views.
typedef struct {
CGFloat top, left, bottom, right;
} UIEdgeInsets;
分别表示上左下右四个方向的偏移量。于是把上面按钮的UIImage改为如下形式：
[crayon]
// Image with cap insets
UIImage *buttonImage = [[UIImage imageNamed:@”blueButton”]
resizableImageWithCapInsets:UIEdgeInsetsMake(0, 16, 0, 16)];
[/crayon]
可以得到如下按钮：
问题得到解决。
但是值得注意的是该方法需要至少iOS5的运行环境，因此对于需要开发支持iOS5之前的App来说是不可行的。替代方案是stretchableImageWithLeftCapWidth:topCapHeight:，但是在iOS5中，这已经是被Deprecated的方法了，而且该方法只能以1px作为重复铺满拉伸区域，无法做到类似渐变等图片效果，是存在一定局限的。
As I got further into the customization of the buttons, I ran into a method within UIImage that was introduced in iOS 5, resizableImageWithCapInsets. I found myself getting side-tracked from the original idea of navbar look and feel, to understanding how cap insets work. This post delves into what I learned.
Cap Insets with UIButton
As the documentation describes, you use resizableImageWithCapInsets to add cap insets to an image, when the image is resized or scaled, cap areas are not affected. The best way to understand this is through an example.Let’s assume I want all the buttons on my UI to have a similar look, a gradient with a white border. Below is the image used for the examples in this post (the button is shown on a gray backdrop so you can see the white border):
Depending on the context of where the button appears, its size may vary. The code to create a button with the image and the corresponding output follow:
UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(80, 130, 160, 44)];
[button setTitle:@”Test Button” forState:UIControlStateNormal];// Image with without cap insets
UIImage *buttonImage = [UIImage imageNamed:@”blueButton”];[button addTarget:self action:@selector(buttonPressed:) forControlEvents: UIControlEventTouchUpInside];
[button setBackgroundImage:buttonImage forState:UIControlStateNormal];
[[self view] addSubview:button];
[/crayon]
As you can see, the button is stretched in all directions. Let’s change the code to include cap insets, however, before we do that, let’s look at the signature of the cap insets method:
- (UIImage *)resizableImageWithCapInsets:(UIEdgeInsets)capInsets
Looking on step further, UIEdgeInserts is defined as:
typedef struct { CGFloat top, left, bottom, right; } UIEdgeInsets;
// Image with cap insets
UIImage *buttonImage = [[UIImage imageNamed:@”blueButton”]
resizableImageWithCapInsets:UIEdgeInsetsMake(0, 16, 0, 16)];
[/crayon]
Cap Insets with UIBarButtonItem
We can use the same image for a button on a navbar (I’ll show the specifics in the next post on customizing the navbar). Without specifying the cap insets, the button looks as follows:The code below specifies an image where 12 pixels on the top, left, bottom and right be preserved when stretching/resizing the button:
resizableImageWithCapInsets:UIEdgeInsetsMake(12, 12, 12, 12)];
[/crayon]


Schnapp's tightly focused case study proves to be a formidable vantage point from which to consider, and possibly reformulate, wider questions about modern uses of the past and archaeology's role in mediating such evocations. The paper centers on an event that did not happen, as Pavia was not reconstructed in the 1930s according to the Ciocca/BBPR radical modernist and corporativist urban plan that appealed to the city's Roman past; instead it remained one of the spectacular historical medieval towns of Italy. In his investigation of this non-event, Schnapp places the modernist plan's turn to the past in a rich variety of contexts as he recounts the drawing of the proposal in the wake of the 1933 CIAM at Athens, the failure of the project at the open competition for Pavia's urban planning, the ensuing controversy and the combative exhibition dedicated to the failed plan itself. These different moments take us on an interdisciplinary ride into the culture of modernity, from the Fascist culture wars, to the novel means and arenas in which these conflicts were fought—such as the exhibition at the Galleria il Milione—and to individuals' trajectories realized against this complex background. Schnapp stimulatingly disentangles these many threads while keeping to his leading question—the tension between the radical modernist project of urban rebuilding and its appeal to the past as framed by a quotation from Livy. He resolves this tension by exposing the urbanists' mistaken interpretation of Livy's text—omnes in corpus unum fusi sunt—which was wishfully understood to resonate with modern fascist corporativism. Schnapp shows how the evocation of that past, Roman austerity and its civic and rational virtus,was put in the service of functional architecture and the new radical modernist program. This skillful analysis is not only a case study in the use of the Roman past and archaeology in Fascist culture but also illuminates broader questions about the central role of archaeology in modernity.
The appropriation of ancient Rome in modern Italian Fascism has received considerable attention in the until recently little explored field of the history of archaeology. Well before the recent efforts to understand various aspects of Fascist culture—from industrial development, economic organization and transportation to architecture, the organization of consensus and their relation to avant-gardist movements—as distorted but somewhat genuine forms of authoritarian and compulsive modernization, the idea of Rome was long considered the only cultural component of Fascist ideology even by Italian scholars who, like Norberto Bobbio, disdainfully opposed the application of the category of culture to any of the activities of the Fascist regime. 1 Since the 1970s, moreover, the very role and work of classicists and archaeologists during Fascism has come under scrutiny, thus touching a sensitive spot for the Italian academy, which arguably displays unsettling continuities through the pre- and post-Fascist periods (for example, eight popular as well as scholarly periodicals dedicated to the ancient world of Rome were started under Fascist sponsorship, and many of them continued publication well after 1945, and some unto the present day). Luciano Canfora called as early as 1976 for both the exposure of such connections and the investigation of how such contacts influenced the content of scholarship. Debates have been harsh (most recently about the publication of some apparently "Fascist" letters by the famous ancient historian Arnaldo Momigliano); Italian colonialist archaeology overseas, as well as the excavations of the Fori in Rome, much desired by Mussolini himself, have come under close investigation and strong criticism. 2 But Canfora's dismissal of Fascist ideas of Rome as devoid of any historical depth needs to be further examined: we have learned much about the misdeeds of academic archaeology under Fascism, but less about the practices and cultural contexts in which to place them, thus possibly creating an artificial gap. For example, a recent article effectively shows how in the 1930s a Roman historian strongly aligned with the regime produced both propaganda for Fascist corporativism and highly valued scholarly work on ancient Roman collegia. 3 This simple denunciation of dichotomy rather calls for further investigation from the perspective of interdisciplinary studies. In moving across the borders of scholarly culture, Schnapp's study leads the way, offering further insights into conflicting uses and constructions of the past in Fascist Italy.
The Pavia plan case study shows that both the past and the modes of its appropriation were fields of contest. As early as 1922 Mussolini made ancient romanitas central to his ideological project: he talked of an "Italian [ancient] Rome wise and strong, disciplined and imperialist" and of the need to strip and liberate Roman monuments from all that had grown around them during the centuries of decadence. But stripping is no neutral practice: it can reach different depths and reveal different layers. The Ciocca and BBPR's proposed stripping of Pavia reveals a different ideal Fascist Rome more in line with the ambiguous attitude of Le Corbusier in "Lesson of Rome," who ironically concluded his appeal to Rome's example by stating that a visit to the eternal city would cripple students of architecture for life. Le Corbusier's concern was not just that later periods' monuments obscured Roman glory, but that Rome had always been too "huddled together." 4 According to him, Romans were at their best as great architects, and indeed the first planners in Western history, not in Rome itself, but in the newly conquered, empty regions they equipped in order to control. This was the same romanitas that Ciocca and BBPR laboriously searched for and claimed in Pavia's origins as a Roman castra. Le Corbusier, seeing through buildings and monuments of "huddled together" Rome, detected and distilled their underlying simple masses and geometries (cupolas, vaulting, cylinders, rectangular prisms, or pyramids). Pavia, on the other hand, with its rich display of essentially medieval architecture of the Lombard, communal, and Viscontean past, offered no such possibility. Ciocca and BBPR conjured their vision of the Roman past by taking recourse to Livy's narrative and pointing to the feeble traces in Pavia's maps of the Roman castra's original regular structure. This complex palimpsest of texts and map surveys stripped Pavia back to its Roman origins, while simultaneously projecting its future and putting the modern urbanists poised for reconstruction face to face with the ancient Roman city planners praised by Le Corbusier. But Pavia's Roman past of Scipio, Cato, and Caesar's moral and military virtue, is much different from the Augustan imperial one sought for in the excavation of Rome's imperial Fori.
Despite the different version of the Roman past pursued by the Ciocca and
BBPR in Pavia and the Augustan revolution in Rome, these projects also
share practices and modes of representation which further speak to the
significant role of archaeology in the construction of modernity. The
exhibition of the Pavia plan in Milan at Galleria il Milione
cannot but recall the grand exhibitions on ancient Rome of those years:
the 1911 exhibition on Roman culture's contribution to the West, but
especially the one to honor the bimillenary of Augustus, the Mostra
Augustea planned in 1933 and opened in 1938 (on the same day as
the exhibition on Fascist revolution) which combined a chronological
arc (reaching from the founding of Rome all the way to Fascist Italy)
with an exploration of daily life in ancient imperial Rome. On a smaller
scale and with no objects, the Pavia exhibition shared with the Augustan
one the effort to move the visitor, by means of very modernly conceived
images, through time and space to a vision of a city, be it future
or past. The excavators in Rome boasted: "we have dug out 4,000 cubic
meters of soil, we have transported to the dumps 10,000 cubic meters of
remains, we have reconstructed at amazing heights 1,300 square meters
of roofing." These words would have sounded just right in the mouth of
Ciocca, but while special laws allowed the destruction necessary for
the excavation of the Fori, Pavia was preserved. In some ways Ciocca
and BBPR are the ideal archaeologists as they conjured their vision
without the actual destruction that archaeological practices necessitate,
but also suppress in their claims to recover the past. But as Schnapp
shows, it is precisely the close relationship between construction and
destruction embodied in archaeology that puts it at the center of many
tropes of modernity. Encounters between ideology and scholarship take
place within this wider context, in which, just as in scholarly debates,
the past is contested ground. We are reminded that any such appropriation
of the past involves a selection, as Schnapp writes, by another project
realized in post-World War II Italy by the surviving members of BBPR. This
is the Torre Velasca, an unusual modernist skyscraper in Milan that uses,
instead of ancient Rome, the model of the medieval tower (explicitly
alluding to the towers of the Castello Sforzesco)—and combines a
geometric and modernist shape with a Gothic look.
Giovanna Ceserani is an assistant professor of Classics at Stanford University.
1. N. Bobbio, "La cultura e il fascismo," in G. Quazza, ed., Fascismo e società italiana (Turin: Einaudi, 1973), 209-46.
2. Most of these debates took place in the journal Quaderni di Storia edited by Canfora: see especially Canfora, "Classicismo e fascismo," QdS 3 : 15-48; M. Cagnetta, "Augusto e la 'rivoluzione' fascista," QdS 3 139-81; and D. Manacorda, "Aspetti dell'archeologia italiana durante il fascismo. A proposito di Mussolini urbanista," Dialoghi di Archeologia : 89-96; and D. Manacorda and R. Tamassia, Il piccone del regime (Rome: Armando Curcio, 1985); for the polemics on Momigliano see La Repubblica, 16 March 2002.
3. See J. Perry, "Ancient Collegia, Modern Blackshirts: The Study of Roman Corporations in Fascist Italy," International Journal of the Classical Tradition 8 (2001-2002): 205-16.
4.
Le Corbusier, Towards a New Architecture (1927; London:
Architectural Press, 1946), 141-61.


Two injured after car crashes 'fleeing from police' in Castlemilk area of Glasgow
Two people were arrested after the car 'failed to stop' and then crashed a short time
by Kathleen SpeirsTwo motorists have been arrested after a car, allegedly fleeing from police, crashed in Glasgow's south side.
Officers were hunting car in the Castlemilk area of the city, which was traced on Carmunnock Road.
After 'failing to stop' for officers, the motor crashed into another vehicle on Homelea Road where it meets Ruel Street in the Cathcart area.
Ambulance crews were called and two people were taken to hospital.
Police arrested two people from the car and an investigation is underway.
A spokesman from Police Scotland told the Record: "At around 1.50pm on Friday, November 15, enquiries were ongoing to trace a car in the Castlemilk area of Glasgow.
"The car was located in the Carmunnock Road area of Croftfoot, however, it failed to stop.
“Officers stood down and the car collided with another vehicle a short time later on Holmlea Road at Ruel Street and two occupants of the car were arrested.
"Two people were taken to hospital where they were treated for minor injuries.
“Enquires into the circumstances surrounding this incident are continuing.”


This example show how to display Celery tasks status and progression real time, in case of multiple tasks running. Clic on the button to start a new job in Celery.


Didi is stable: Madhur Bhandarkar after meeting Lata Mangeshkar in hospital
Director Madhur Bhandarkar on Tuesday visited veteran singer Lata Mangeshkar and informed that her health is getting better.
by ANINew Delhi: Director Madhur Bhandarkar on Tuesday visited veteran singer Lata Mangeshkar and informed that her health is getting better.
The ' Padma Shri,' director shared a picture of the playback singer in an Instagram post that read, "Visited the Hospital to see @lata_mangeshkar didi glad to inform that she is stable and responding positively to the treatment. Thanks everyone for countless blessings & prayers for her speedy recovery #latamangeshkar."
Earlier, the Maharashtra Navnirman Sena (MNS) chief Raj Thackeray paid a visit to the veteran singer Lata Mangeshkar, post which he said, "Lata Mangeshkar is stable. We are expecting her to be discharged in 4-5 days. We can say that she has an old age-related illness and I wish for her speedy recovery and wellness for the future."
The 90-year-old playback singer is admitted at the Breach Candy Hospital in Mumbai following chest infection and breathing issues.
Mangeshkar, who began her career in 1942 is a recipient of the Bharat Ratna, Padma Vibhushan, Padma Bhushan and the Dadasaheb Phalke Awards.
She is known for iconic songs 'Aye mere vatan ke logon' and 'Babul Pyare' among others. She has sung over 25,000 songs in over 20 Indian languages.


Enumerable Methods: Map, Group_by, and Cycle
October 28, 2014
Today I'm going to write a little bit about Enumerable methods and then go over the map, group_by, and cycle methods in a bit more detail.
What are these things??
The Enumerable Module is basically a group of Ruby methods (called Enumerable Methods) that are handily prebuilt and included in Ruby. The catch is that enumerable methods can only be used on certain classes. The basic rule of thumb is that you can use Enumerable methods on a class if that class has a .each method. This makes sense because Enumerable methods tend to cycle through the object they are called on and do something--just like the each method.
.map
Map basically goes through the object it is called on, let's say an array and does the something you tell it to do to each element in the array. Let's look at an example:
demoArray = [1, 3, 5, 3, 2, 1] demoArray.map{|elem| (elem*2)+5} #==> returns [7, 11, 15, 11, 9, 7] demoArrayStrings = ['San Francisco', 'Los Angeles', 'Detroit'] demoArrayStrings.map{|city| city + " is a city."} #==> returns ['San Francisco is a city', 'Los Angeles is a city', 'Detroit is a city']
So as you can see map is great if you want to do the same thing to each element in the object you call it on.
.group_by
As you might have guessed .group_by is great for grouping the object you call it on by something. You could use it to group an array of numbers by if they are greater than 3 or their %3. Let's look at an example.
This block of code groups the elements of the input array based on if their values are equal to one and then returns a hash with true and false as the keys and arrays of the grouped elements as the values.
demoArray = [1, 3, 5, 3, 2, 1] demoArray.group_by{|element| element == 1} #==> returns {true=>[1,1], false=>[3, 5, 3, 2]}
This block of code groups the strings in the input array based on if they have an even or odd number of letters. Returns a hash as the output.
demoArrayStrings = ["daniel", "john", "ben", "lisa"] demoArrayStrings.group_by{|name| name.length%2} #==> {0=>["daniel", "john", "lisa"], 1=>["ben"]}
.cycle
Cycle allows you to cycle through an object (such as an array or a hash) as many times as you want and do something with it. If you do not pass it a number of times you want it to cycle it will cycle forever.
demoArray = [1, 3, 5, 3, 2, 1] demoArray.cycle(2){|num| puts num*2} #==> prints 2, 6, 10, 6, 4, 2, 2, 6, 10, 6, 4, 2 demoArray = [1, 3, 5, 3, 2, 1] demoArray.cycle{|num| puts num*2} #==> prints 2, 6, 10, 6, 4, 2, 2, 6, 10, 6, 4, 2....and on and on for-ev-er
Get in touch below


Banshee
Banshee stars Antony Starr as Lucas Hood, an ex-con and master thief who assumes the identity of the sheriff of Banshee, Pennsylvania, where he continues his criminal activities, even as he's hunted by the shadowy gangsters he betrayed years earlier.


- What is City Hall and why is it important?
-
City Hall is the home of the Greater London Authority - London's government. The Mayor (currently Boris Johnson) has powers over London's transport, housing policy, policing and other vital areas.
City Hall's 25 Assembly Members hold the Mayor to account. They oversee the Mayor's major projects, approve the budget, and sit on decision-making committees.
Most importantly, they represent Londoners, address the issues that concern them, and work to improve life in the capital.
You can find out more about their work.
- Who are the London Assembly list?
-
Of the 25 Assembly Members, 14 are elected on a constituency basis (each constituency is several Parliamentary constituencies grouped together), and 11 are elected on a Londonwide, proportional representation basis: these are the 'List' Assembly Members.
Our 'London Assembly List' is the list of 11 people selected by London Green Party members to gain seats in the London Assembly. The List is ranked in order of votes, with the person at the top of the List being the one with most votes, and so on, down to 11.
The number of seats the Green Party gains at the London Assembly elections next May will depend on our share of the vote: on a 5% share of the vote at the last election in 2012, we gained two 'Londonwide' seats.
- What is a Podemos ‘Circle’?
-
A Podemos ‘Circle’ is a self-sustaining, community organising group without leaders, which operates open public assemblies where people debate whatever they feel is most relevant to their situation.
Circles have a strong local focus, covering areas from entire cities to districts, or form around special interests (for example, there are currently circles for psychoanalysis, music and nursing).
The Green Party model of Circles will be based on the five campaigning themes for London: housing, air pollution, equal pay, transport and climate change.
People with a particular interest or expertise in one area will join that circle, working with others to decide on action to make progress on that issue. Actions are decided by a simple majority vote.
- Why should I care about housing?
-
Everyone needs a home, yet more and more ordinary people - even people on very good salaries - cannot afford to live in London. The UK's capital is a place of huge housing inequality, with flats and houses treated primarily as investments, not as places to live.
The Green Party wants to put people first, create more truly affordable homes, bring in controls on the rents landlords can charge, and slow down housing speculation - which is no good for the future of London or Londoners.
- Why should I care about equal pay?
-
London is characterised by unequal pay - the bankers' bonuses we're always hearing about never seem to trickle down enough to make a difference to the people doing less exciting but more useful work, like nurses, teachers, and those in the service industries.
The Green Party wants an economy that works for everyone, where the rewards are more evenly shared. That means bringing in a London Living Wage, taxing those at the top a little bit more, and encouraging companies to introduce a 10:1 wage ratio (with no-one earning more than 10 times the least well-paid person in the organisation).
This time, with nearly 12,000 Green Party members in the capital, and a really good campaign, we hope to get more.
- Why should I care about air pollution?
-
London has some of the dirtiest air in Europe – Oxford Street has been judged to have the worst air quality in the world. It’s so bad that we are threatened with a multi-million Euro fine from the EU Supreme Court. London’s polluted air is responsible for the premature deaths of 4,000 Londoners every year.
By prioritising cleaner forms of transport, cutting emissions and creating more public spaces, the Green Party will make London a heathier, cleaner and more attractive place to live, work and play in.
- Why should I care about transport?
-
A good public transport system is essential to life in a civilised city. People and goods need to be able to move around efficiently, and that means proper public investment – not leaving things to the market.
The Green Party is committed to excellent public transport in London. But we also know that the best way to get around is usually the lowest-tech option. Walking and cycling are not only very cheap; they are positively good for your health, and make roads more pleasant places to be. So we would prioritise the needs of pedestrians and cyclists over those of car drivers – making London greener, cleaner and healthier for all.
- Why should I care about climate change?
-
The impact of climate change will be felt in every part of the world, and by every person living on earth. Climate change has implications for our food supply, for migration to the UK, and for the sustainability of our way of life.
The way cities are run, their priorities for transport, housing and water use all have huge implications for our ability to adapt to the changing climate, and ultimately to limit the negative consequences of climate change.
The Green Party will urge investment in renewable technology to reduce greenhouse gas emissions, ensure housing uses less energy, and prioritise transport that is part of the solution to climate change, not part of the problem.


net.glowstone.generator.objects.trees
Classes
AcaciaTree
BigOakTree
BigTree
BirchTree
BrownMushroomTree
CocoaTree
DarkOakTree
GenericTree
JungleBush
JungleTree
MegaJungleTree
MegaPineTree
MegaRedwoodTree
MegaSpruceTree
RedMushroomTree
RedwoodTree
SwampTree
TallBirchTree
TallRedwoodTree


St. Paul's Episcopal Church
St. Paul's Parish draws its membership from all over the Kansas City area. . Nor is it unusual for our members to take a short walk from home to church activities.
http://stpaulskcmo.org/
Treatment for Herniated or Bulging Discs
All Saints Episcopal Church - WhereTraveler.com
It is an understatement to say that the original All Saints is a lovely church. It's overhung . Myrtle Beach Museums and Attractions: All Saints Episcopal Church .
http://www.wheretraveler.com/classic/us/sc/myrtle-beach/museums-and-attractions/CL0000042472.shtml
All Saints Episcopal Church, Kansas City, MO | Episcopal Church
All Saints Episcopal Church, Kansas City, MO. Clergy: The Rev. Barbara J. Beam - Priest in Charge. Website: http://www.allsaintskc.org/. Email: .
http://www.episcopalchurch.org/parish/all-saints-episcopal-church-kansas-city-mo
all saint's episcopal church kansas city Herniated or Bulging Discs
St. Michael and All Angels Episcopal Church
The Vestry of St. Michael and All Angels wish to thank our parish family for their generosity. . The Episcopal Church has members in the United States, as well as in Colombia, the Dominican Republic, Ecuador, Austria, . Saint Michael and All Angels Episcopal Church 6630 Nall Avenue Mission KS 66202 913-236- 8600 .
http://www.stmaa.com/
All Saints Episcopal Church - Pleasant Ridge Cincinnati OH
Aug 31, 2012 . If you like spiritual practices in theory, but have trouble with actual practice, join us at All Saints Episcopal Church in Pleasant Ridge on .
http://all-saints-cincinnati.diosohio.org/digital_faith
Official Impairment Listing for Spinal Disorders
All Saints Episcopal Church Torrington WY
Nov 29, 2012 . All Saints Episcopal Church | Torrington. The following article appeared in the Torrington Telegram Nov. 28, 2012. More .
http://allsaintstorrington.diowy.org/digital_faith
- century 21 team new hampshire (narrowing of the spine)
St. Andrew's Episcopal Church in Kansas City
St. Andrew's Episcopal Church - Kansas City, Missouri. . cheer and caroling, with parishioners accompanying all of us in singing your favorite Christmas carols.
http://www.standrewkc.org/All Saints Episcopal Church, Kansas City, MO
email:WebWorker. Our Mission Statement: "Lighting the way to faith in Jesus Christ". All Saints Episcopal Church is a prayerful community of faith that strives to .
http://www.allsaintskc.org/
All Saints Episcopal Church (Valley City, North Dakota) - Wikipedia ...
All Saints Episcopal Church (Valley City, North Dakota) is located in North Dakota. Location: 516 N. Central Ave. Valley City, North Dakota. Coordinates .
http://en.wikipedia.org/wiki/All_Saints_Episcopal_Church_(Valley_City,_North_Dakota)
All Saints Episcopal Church - DeQuincy News
All Saints Episcopal Church. History: The church was built at a cost of $2800 in Pattersonville (now Patterson) in 1885 as the Holy Trinity Episcopal Church.
http://www.dequincynews.com/cent/all_saints.htm
Medical-Vocational Allowance for Herniated Disc
All Saints Episcopal Church in Kansas City, MO | 9201 Wornall Rd ...
All Saints Episcopal Church in Kansas City, MO -- Map, Phone Number, Reviews, Photos and Video Profile for Kansas City All Saints Episcopal Church.
http://www.superpages.com/bp//All-Saints-Episcopal-Church-L0013867590.htm
All Saints' Episcopal Church (Kaua'i) Kapaa HI
Find A Church Near Near or Close to Kapaa HI. . All Saints' Episcopal Church ( Kaua'i) . Find People at All Saints' Episcopal Church (Kaua'i) | Kapaa, HI . Churches near Kansas City, MO · Churches near Bogotá · Churches near Caracas .
http://allsaintskauai.episcopalhawaii.org/digital_faith
Appealing a Denial of Benefits
Gay Affirming Churches in Missouri MO (www.gaychurch.org)
All Saints Episcopal Church, Kansas City, Episcopal. Grace & Holy Trinity Cathedral, Kansas City, Episcopal. St. Mary's Episcopal Church, Kansas City .
http://www.gaychurch.org/find_a_church/united_states/us_missouri.htm
JEANNE BIGGS Obituary: JEANNE BIGGS's Obituary by the Kansas ...
Mar 4, 2012 . In lieu of flowers, memorial contributions may be made to All Saints Episcopal Church. Mrs. Biggs was born April 10, 1920 in Kansas City, MO, .
http://www.legacy.com/obituaries/kansascity/obituary-print.aspx?n=jeanne-marie-biggs&pid=156251568
home.


Paragraph paragraphparagraphparagraphparagraphparagraphparagraphparagraphparagraphparagraphparagraphparagraphparagraphparagraphparagraphparagraphparagraphparagraphparagraphparagraphparagraphparagraphparagraphparagraph
pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp


Welcome to noxeos, the new eosgarden's blog!
I'll write down here stuff related to the eosgarden's activities, software development and releases, miscellaneous code related stuff, Mac & iOS development tips, etc.
For the curious, the name noxeos comes from the latin word for night (nox) and the greek word for dawn (eos).
I choosed it so it can represent the reverse face of the eosgarden website.
Anyway, thanx for reading this! : )


RapidQube
Dashboard
Order Details
Menu Levels
Second Level Item
Second Level Item
Second Level Item
Third Level
Third Level Item
Third Level Item
Third Level Item
Link
Logout
Dashboard
My Dashboard
Data Table Example
Purchase Order
Ordered
Quantity
Location
Start date
End Date
Ready to Leave?
×
Select "Logout" below if you are ready to end your current session.


We just Google! Right?
Vocab focuses on the Zen of Browsing - Learn just what's needed for now. Just build vocabulary
Google for the rest when you have leasure time.
Vocab focuses on intuition and cognitive ease of learning. Words, graphs and info graphics over long running hyperlinked texts.
Vocab is clutter less learning!


voltdb-client-erlang Erlvolt 0.3
Release: 'Erlvolt 0.3.2'
Author: H. Diedrich
Production: Eonblast Corporation
Copyright: (c) 2013 VoltDB, Inc
Licence: MIT
Date: 31 Jan 2013
Start the Voter database and run a benchmark client on local host:
$ cd voltdb/examples/voter && ./run.sh &
$ cd erlvolt && make clean fast bench
For a reference benchmark done in the EC2 cloud, see doc/BENCHMARK1.md or html.
The benchmark module can be parametrized for quite different modi operandi and it can be started in three different ways:
Alle three ways, in the end, execute the same module, bench.erl. They expose different options to change the module's behavior and get benchmark clients up and running quickly, or easily tune them.
The benchmark is mostly based on the 'Voter example' database and server, which is present in every VoltDB distribution and is a VoltDB benchmark staple. For an explanation of the 'TV voter' scenario, see comments below.
To run the Voter database, start the Voter server from your VoltDB installation with:
$ cd voltdb/examples/voter
$ ./run.sh
The benchmark can also be run with the 'Hello world' tutorial database.
To run the Hello World database, start it from your VoltDB installation with:
$ cd voltdb/examples/voter
$ ./run.sh
You need to start the right database before you can run the benchmark.
The host addresses, for almost all cases that are described below, is read from
etc/bench/bench.config
. You would change that file and write your actual
host information into it, once you are doing a real, live benchmark. The port
would probably always remain 21212, across all nodes.
The default bench.config
points to localhost, like this:
[ {erlvolt, [
{hosts, [
{"localhost", 21212}]},
{start_delay, 0}
]}].
The bench.config
also offers support to get bench clients on multiple
machines to start at the exact same time:
the start_delay
parameter is used to synchronize benchmarks across multiple
machines e.g. EC2 instances. Use e.g. 20 to have twenty seconds to start all
benchmarks on all machines. All benchmarks will start after 20 to 40 seconds,
at the same wallclock time.
To start a benchmark pre-configured in make, open a new terminal screen, and from the driver root, do:
$ make clean fast bench
You can of course leave out the middle part -- clean fast
-- for repeat
runs.
fast
builds HiPE native compiled beams, without debug information,
which makes for some tens of percents higher throughput compared to
the default compilation (all
) without HiPE & with debug information.
profile
compiles similar but with the profiler enabled, which
gives you rolling performance stats every second.
bench
actually triggers one specific bench, tagged 'VSD', which
stands for Voter, Steady load and Direct calls.
*benches
runs four voter benchmarks, in a row: VSD, VSM, VBM, VBD.
From make clean fast bench
you will see this kind of response:
Erlvolt Bench 0.9 (client 'VSD')
-------------------------------------------------------------------------------------------------------------------------------------
Client 'VSD', voter, 100,000 calls, steady, 200 workers, delay n/a, direct, queue n/a, slots n/a, limit n/a, verbose, 'n/a' stats/sec
Hosts: localhost:21212 localhost:21212
connect ...
preparation ...
calls ... ........................
cool down ...
check writes ... ok
results ... votes: 200,000 (6 contestants)
.....Alana Bregman: 33,742
...Tabatha Gehling: 33,661
......Kelly Clauss: 33,264
....Jessie Alloway: 33,162
.....Edwina Burnam: 33,118
....Jessie Eichman: 33,053
close pool ...
Client 'VSD', voter, 100,000 calls, steady, 200 workers, delay n/a, direct, queue n/a, slots n/a, limit n/a, verbose, 'n/a' stats/sec
-------------------------------------------------------------------------------------------------------------------------------------
Client 'VSD' overall: 20,050 T/sec throughput, 0.00% fails, total transactions: 100,000, fails: 0, total time: 4.987sec
Erlvolt 0.3.0, bench started 2013-02-03 15:21:41, ended 2013-02-03 15:21:46, database: +100,000 new votes
[++++++++++++++++++++]
From make clean **profile** bench
you will see this kind of response:
Erlvolt Bench 0.9 (client 'VSD')
-----------------------------------------------------------------------------------------------------------------------------------
Client 'VSD', voter, 100,000 calls, steady, 200 workers, delay n/a, direct, queue n/a, slots n/a, limit n/a, verbose, 5.0 stats/sec
Hosts: localhost:21212 localhost:21212
connect ...
preparation ...
calls ...

Client 'VSD', voter, 100,000 calls, steady, 200 workers, delay n/a, direct, queue n/a, slots n/a, limit n/a, verbose, 5.0 stats/sec
-----------------------------------------------------------------------------------------------------------------------------------
Client 'VSD' overall: 18,622 T/sec throughput, 0.00% fails, total transactions: 100,000, fails: 0, total time: 5.370sec
Erlvolt 0.3.0, bench started 2013-02-03 15:23:42, ended 2013-02-03 15:23:47, database: +100,000 new votes
[++++++++++++++++++]
'make bench-mvm' starts multiple Erlang VMs (emulators), e.g.:
$ make bench-mvm VMS=2 CORES=4
Parameters are:
VMS (1) number of virtual machines (Erlang emulators) started
CORES (1) number of cores used per VM (erl parameter +S)
CALLS (10000) number of transactions per VM for the benchmark
SPAWN (100) number of parallel ('steady') workers = max server load
This can be the most effective way to run real benchmarks. This make
command uses the etc/bench/benchstart shell script. It can make sense
to first experiment with direct parameters as described below, then
hardcode the results into etc/bench/benchstart to prepare for a real
bench run, e.g. in a cloud setup.
E.g. for make clean fast bench-mvm VMS=3 CALLS=1000000
you could get this kind of dump:
Mulitple VM Erlvolt Bench Log
This is the followed tail of the file bench.log, which is written to by 3 separate Erlang VMs running the benchmark.
Client 'VSD2', voter, 1,000,000 calls, steady, 100 workers, delay n/a, direct, queue n/a, slots n/a, limit n/a, nonverbose, 'n/a' stats/sec
Client 'VSD3', voter, 1,000,000 calls, steady, 100 workers, delay n/a, direct, queue n/a, slots n/a, limit n/a, nonverbose, 'n/a' stats/sec
Client 'VSD1', voter, 1,000,000 calls, steady, 100 workers, delay n/a, direct, queue n/a, slots n/a, limit n/a, nonverbose, 'n/a' stats/sec
.................................................................................................... [..]
Client 'VSD2' overall: 10,617 T/sec throughput, 0.00% fails, total transactions: 1,000,000, fails: 0, total time: 94.183sec
Erlvolt 0.3.0, bench started 2013-02-03 15:29:51, ended 2013-02-03 15:31:25, database: +2,999,831 new votes
[++++++++++]
Client 'VSD3' overall: 10,583 T/sec throughput, 0.00% fails, total transactions: 1,000,000, fails: 0, total time: 94.483sec
Erlvolt 0.3.0, bench started 2013-02-03 15:29:51, ended 2013-02-03 15:31:26, database: +2,999,995 new votes
[++++++++++]
Client 'VSD1' overall: 10,577 T/sec throughput, 0.00% fails, total transactions: 1,000,000, fails: 0, total time: 94.539sec
Erlvolt 0.3.0, bench started 2013-02-03 15:29:51, ended 2013-02-03 15:31:26, database: +2,999,895 new votes
[++++++++++]
Total transactions per second: 31777 T/sec
With make clean profile bench-mvm VMS=3 CALLS=10000
you get rolling stats like this:
Mulitple VM Erlvolt Bench Log
This is the followed tail of the file bench.log, which is written to by 3 separate Erlang VMs running the benchmark.

Note that this bench module cannot perform automatic fine tuning as
the original Java client can, which you can run in the same folder
as the server, using './run.sh client'.
However, it doesn't take long to zero in to a best load and the 'VSD'
configuration would be your starting point (voter, steady, direct).
It produces a steady load from parallel worker threads that are each
blocking individually, until they get a response. This is the fastest
way on the client-side to protect the server from overload from
'fire-hosing' clients.
The parameters are:
$ erl -pa ../../ebin -s bench run <vmid> <bench> <calls> <rhythm>\
<burstsize> <delay> <mode> <queuesize> <slots> <limit> \
<verbosity> <dumpinterval> -s init stop -noshell +p 1000000 \
-smp +s $cores -config bench
E.g. the standard bench is kicked in with:
$ erl -pa ../../ebin -s bench run VSD voter 100000 steady 100 x \
direct x x x nonverbose 500 -s init stop -noshell +P 1000000 \
-smp +S $CORES -config bench
For more examples see etc/bench/Makefile.
The Voter sample application simulates a phone-based election process.
Voters (based on phone numbers generated randomly by the client
application) are allowed a limited number of votes.
The main goal of the voter application is to demonstrate the
performance possibilities of VoltDB:
Stored procedures are invoked asynchronously. The client can record
and report thoughput and latency, when compiled with the driver-built
in profiler (make clean profile
).
Usually, you will run this sample on a single node. However, it can
easily be reconfigured to run any combination of clients and servers.
The servers support multiple clients, and single-node or multi-node
server clusters are supported.
To test the server with a different configuration, simply edit run.sh
listing one server node as the lead node when building the catalog
and using a comma-separated list of the server addresses as argument
to the client. See the comments in the build script for details.
The client starts 'fire-hosing' the VoltDB server using pre-set
parameters. You can experiment with different loads to better
understand the best tuning to get the most out of your specific
VoltDB deployment.
Rate-limiting your clients (or adding cluster nodes) is essential to
preventing 'fire-hosing' your server (cluster) and will ensure you
get proper application responsiveness (latency) while maximizing
througput (TPS) for your hardware configuration.
The "Voter" application is specifically designed for benchmarking to
give you a good feel for the type of performance VoltDB is capable
of on your hardware.
For more on benchmarking and tips on application tuning, visit the
VoltDB blog: [http://voltdb.com/search/node/benchmark][] and
[http://voltdb.com/search/node/tuning][]
For a barebones 'hello world' see examples/hello.erl.
See README.md or .html for instructions, examples/ for more examples.
See doc/BENCHMARKS.md or .html for a description of benchmarks done.
For getting started with VoltDB,see: voltdb/doc/GettingStarted.pdf or
online: http://voltdb.com/downloads/documentation/GettingStarted.pdf.
/hd 31 jan 13


weyerhaeuser
Businessmodel of Weyerhaeuser
Customer Segments
Weyerhaeuser provides a broad range of products and services that target commercial and industrial customers across multiple business sectors. These customers can be organised broadly into the following categories:
- Construction and Property Development, including various contracting, specialist construction, and real estate and property development companies – including residential, multi-family, industrial and light commercial operators – to which the Company provides lumber, wood products, structural panels, and other specialty products:
- Retail, including wood products dealers, and do-it-yourself retailers to which the Company sells various wood products;
- Consumer Goods, including producers of consumer items such as sanitary disposable products, food, and beverages, as well as specialist packaging companies, to which the Company provides absorbent products, and specialist packaging products; and
- Industrial and Manufacturing, including producers of paper and pulp, textile manufacturers, oil and gas companies, and energy companies to which the Company provides oils, gases, cellulose fibers, and other products. Weyerhaeuser primarily serves customers across the US and Canada. It is also a significant exporter of products, serving customers across Asia and Europe, in particular customers in Japan and China.
Value Propositions
Weyerhaeuser provides value to its customers in the following ways:
- Its industry standing and reputation, with the Company established as leading operators in its field, having a track record for providing high-quality products reliably and efficiently;
- Its broad portfolio of products, with the Company offering a broad range of products – including lumber, wood products, cellulose fibers, and packaging products – to customers across a diverse range of industries;
- Its development of innovative solutions, with the Company dedicating a portion of its funds to the development of innovative processes and solutions that allow it to serve customers quickly and effectively;
- Its international sales reach, with the Company serving an extensive customer base across the US and Canada, as well as exporting products to customers in Europe and Asia, particularly China and Japan; and
- Its commitment to sustainability, with the Company committed to developing and utilising sustainable and environmentally friendly processes. ### Channels
Weyerhaeuser operates a website at www.weyerhaeuser.com, through which it provides information on its products, services, target industries, and operating locations. The Company does not, however, operate an online sales channel, nor does it provide an online customer portal trough which customers can manage transactions and orders.
Weyerhaeuser makes sales to its clients through an in-house direct sales organisation, which deals directly with the Company’s clients. This sales force is organised by business segment and by geographic region, with the Company’s sales personnel operating out of an international network of dedicated sales and liaison offices across the US, as well as in Japan, South Korea, Brazil, Uruguay, Ireland, and France.
Weyerhaeuser operates its own network of manufacturing facilities and lumber mills across the US and Canada, as well as a facility in Poland. This infrastructure is supported by the Company’s in-house network of distribution centres and facilities.
Customer Relationships
Despite its online presence, Weyerhaeuser does not offer any of its products and services to customers on a self-service basis. The Company’s in-house sales personnel deal directly with clients, agreeing the details of individual sales and distribution contracts on a case-by-case basis. The Company seeks to establish longstanding relationships with its commercial clients, with a view too securing recurring business.
Weyerhaeuser has relationships and account management teams that are able to provide ongoing support to its larger clients. Customers can also make more general enquiries with the Company over the phone or via an online contact form, and receive personalised responses to queries and complaints. The Company also provides technical support resources to its customers, including product information, installation guides, and news articles.
Additionally, Weyerhaeuser operates social media accounts with Facebook, LinkedIn, and Twitter, through which it is able to update clients with company development and interact with customers directly.
Key Activities
Weyerhaeuser operates as a real estate investment trust, and an owner of timberlands. The Company is principally engaged in the growing and harvesting of timber, as well as the manufacture, distribution, and sale of products made from trees.
Weyerhaeuser aligns its operations into three reportable business segments: Timberlands, which produces logs, timberland, timber, minerals, oil and gas, and other products, as well as plywood and hardwood lumber; Wood Products, produces and sells structural lumber, engineered wood products, structural panels and complimentary building products; and Cellulose Fibers, which produces pulp and liquid packaging board.
The Company owns approximately seven million acres of timberlands, primarily in the US, and manages additional timberlands under long-term licenses in Canada. It serves an international customer base, spanning multiple industries, including the oil and gas, the construction and development, energy, and manufacturing sectors.
Key Partners
Weyerhaeuser works in conjunction with various companies and organisations in the manufacture, sale, and distribution of its products. These partners can be organised into the following categories:
- Supplier and Vendor Partners, including suppliers of materials, tools, and equipment used in the Company’s manufacturing and milling operations, as well as suppliers of services and technologies that are utilised across the enterprise more broadly;
- Joint Venture Partners, including manufacturing and timber companies with which the Company jointly manufactures and sells products around the world, through mutually owned entities;
- Community and Sustainability Partners, comprising various non-profits and charitable organisations, with which the Company collaborates on various community and sustainability projects at home and abroad; and
- Strategic and Alliance Partners, including market leading companies across multiple industries, with which the Company collaborates on various marketing and alliance projects. Weyerhaeuser has a number of partnership in place. This includes a sustainability partnership with World Vision, a joint venture with Nippon Paper Industries that produces primarily high- brightness publication papers and newsprint, and a community partnership with United Way of the Coastal Empire.
Key Resources
Weyerhaeuser’s key resources are its intellectual properties, its equipment and materials, its supply chain, its manufacturing and milling facilities, its sales and distribution operations, its partnerships, and its personnel.
Weyerhaeuser owns and or leases a number of properties that are key to its operations, this includes its network of sales and liaison offices, as well as its various manufacturing facilities and wood mills, including in the US, Canada, and Poland.
Weyerhaeuser also owns and licenses a number of patents and trademarks which are important in its manufacturing and delivery of products. Searches of records published by the US Patent and Trademark Office identified a number of patent applications filed in the name of Weyerhaeuser, including applications entitled ‘Modified fiber, methods, and systems’, ‘System and method for differentiating type of vegetation from remotely sensed data’ and ‘Sorting green lumber’.
Cost Structure
Weyerhaeuser incurs costs in relation to the development of its solutions and processes, the procurement of supplies and materials, the operation of its manufacturing facilities and wood mills, the implementation of marketing campaigns, the operation of its sales and distribution infrastructure, the management of its partnerships, and the retention of its personnel.
In its 2015 annual report, Weyerhaeuser recorded total selling expenses in the amount of $113 million, and general and administrative expenses totalling 289 million. The Company recorded research and development costs totalling $24 million.
Revenue Streams
Weyerhaeuser generates revenue through the production and sale of lumber, wood products, and cellulose fibers to companies across multiple industries. The Company’s products include softwood lumber, cellulose fibers, engineered wood products, structural panels and other specialty products.
In 2015 Weyerhaeuser recorded total net sales across its three operating segments in the amount of $7.2 billion, down slightly on the $7.4 billion recorded by the Company in 2014. The Company’s largest revenue generator was its Wood Products segment, which recorded net sales for the year of $3.9 billion. The Company’s Timberlands and Cellulose Fibers segments recorded annual net sales of $1.4 billion and 1.9 billion.


The plot below visualizes the similarity between passages within the corpus. By using the search box to select a text, one can retrieve the most similar passages for each passage in the selected text. Clicking on the scatterplot circles within the plot displays the compared passages.


Uranium-238 has a half-life of about 4 billion years.
Drag the circle below to observe how this group of uranium atoms undergoes alpha decay over time.
Blah
Blah


skin wound healing human microbiome wounds chronic bacterial cutaneous Staphylococcus Wound aureus biofilms microbial healing. biofilm production host microbiota diversity {border-style Pseudomonas abundance studies burn px;} #ffffff;} Skin decreased immune demonstrated pathogenic role Dermatol. However, study bacteria microbes model cells commensals fungal identified inflammation response species tissue E.A. Human acute clinical epithelial healthy models patients treatment Grice Investig. Microbiol. Repair associated compared epidermidis impact increased shown AMPs Regen. epidermal example, formation growth improve inflammatory pathogens potential signaling Factor Healing Microbiome R.L. addition, commensal innate normal sensing wounds. (e.g., Burn Gallo Gram James Lactobacillus Sci. Wolcott ability antibiotics atopic communities composition effects high keratinocyte major probiotics promote px; significantly various vitro wounds, {font-family ./j.-X...x ./journal.pone. Clin. G.A. Infect. R.A. Res. cell common different disease factor factors font-size healing, infection injury number presence quorum resulted revealed sequencing sites ./j.-...x A.L. Acid K.A. Kinase M.J. Moreover, Nature P.S. Stewart USA aeruginosa antibiotic antimicrobial changes colonization contain demonstrating dermatitis development double; health keratinocytes known lesions levels microbe molecular murine open organisms peptides produced research result seen skin, spp. targets ultimately used viral virome vital A.J. Acad. Agents Antimicrob. B.P. Biofilms Chemother. Cutaneous Growth J.C. J.E. Lai Local M.A. Med. Microbial Negative Protein Quorum Radek Secor TLR absence abundant accelerated acid administration altered anti-microbial border-color border-width community containing diseases effect epidermis expressed expression greater include increase infection, inhibitors large lower mice needed non-healing pathways plantarum process protein recent resulting showed solid; strategies therapeutic using viruses {font-style {font-weight (%), ./AAC.- ./j.jid... ./jid.. ./pnas. ./s--- Associated B.J. Bacteria Beta Biotechnol. C.H. Chen Cogen Curr. DFUs DFUs, E.M. Effects Epidermal Finally, Fleckman Furthermore, Group H.H. Hancock Hodkinson Huang Immun. J.A. J.K. Kalan Kong Liu M.M. Natl. Olerud P.R. Proc. Propionibacterium R.E. Rep. S.E. Similarly, TAK/MKK/p Wounds adjacent advantageous affect analysis apoptosis approaches barrier bold burden colonization, commonly control courier; decreases derived diabetic differences differentiation dysbiosis em; essential genera highly including increases infected infections influence inhibits initial invasion low mechanism mentioned microbiome. microorganisms migration novel outcomes. overall peptide potentially probiotic promoting protection provide pt;} regeneration. relative similar small stimulation streptococcus suggest superficial systemic terms topical types ulcers unburned use variety


HackExeter is a student-run STEM education event aimed towards middle-schoolers and high-schoolers who are just on the cusp of getting into computer science. Participants learn to program by creating their own project, under guidance by competition mentors, over the course of ten hours.
We believe that one of the biggest barriers to computer science is confidence. Many students are turned away by the myth that it’s “too hard” or that they’re not a “science person.” HackExeter, in one day, gets students to make an impressive project that was their own idea. This is important to students, because it shows them that they are capable of doing the things that they want to do in computer science, not just what their teacher tells them.
Last year, HackExeter Spring had 12 teams and 55 participants. We were very pleased by the results. When one team came in, the first thing they told us was “We don’t know what we’re doing.” By the time they left, they had made a Processing game with an amusing twist ending that won our award for the fastest-learning team. They tied for that award with an all-girls team of middle-schoolers, who had made a huge, recursive choose-your-own adventure game in Pencilcode, complete with sound and images.
This year we expect to have between 60 and 150 participants. If you or your organisation would like to chip in, it would be greatly appreciated. Our target budget this year is $3,000 for food and prizes. You would be acknowledged on this website, at opening and closing ceremonies, and would be able to send representatives to the event if you wish. Additionally, if you are an educational organisation and have curriculum or tooling you would like us to test at the event, we will take extensive notes and provide you with feedback on your tools.
Sound good? Get in touch at contact@hackexeter.com.


Here's a list of all available users. Click on one of them to start a call.
Show advanced options
Known Peers
Here's a list of known peers (IP:Port). Add new peers with the form below.
TURN
Enable TURN support (the client will look for TURN relays in other nodes of the network in port 3478).


Mars Mine Dungeon
The Mars Mine Dungeon is the first dungeon in the world of Madrigal. If you choose to adventure through these
deadly mines, be on your guard, who knows what evil may still lurk there?
History
The Mars Mine Dungeon, located in the northeastern part of
Flaris
, is currently the residence of several species of mutated Masquerpets which have adapted to the dungeon's
lack of sunlight over the years. In the past, the Mars Mine Dungeon was used as a shelter by the ancient
inhabitants of Flaris and eventually as a mine where clay was harvested. Evidence of the people who once lived
within the mines is abundant; fragments of ancient statues, machinery, and various other artifacts are
commonplace within the dungeon.
Present
Hidden deep within the Mars Mine Dungeon is a statue of
Serus Uriel
carved by the long-forgotten Caoin race, who thought of her as a demonic goddess. The statue was erected as a
peace offering, and Serus Uriel was brought live sacrifices on a regular basis to appease her bloodthirsty
temperament. Although it is not known exactly when, at one point in history Serus Uriel was sealed away in the
final chamber of the Mars Mine Dungeon. The remainder of the Caoin people are believed to have all been
slaughtered by her offspring, which haunt the deepest reaches of the dungeon to this day. Today there are only
six survivors left of that lost civilization. Not sure who they are? Think carefully and you just might. They
guard the ancient monsters that were locked away by their ancestors eons ago, to make certain that they never
escape
|
Mars Mine Dungeon is accessible from the
Flaris
continent.
|
Dungeon Particularities
|
Some
Masquerpets are aggravated. This is not an
Instance Dungeon
so other players will be present.
|
|
Entrance Fee
There is no entrance fee for this dungeon
|
|
Available
Available from
(Sage) Radion
Prizes:
Experience
|
|
Quest Items Found Here
|
|
Monster Dropped
|
Monster Dropped
|
|
Icon
|
Name
Monster
|
Icon
|
Name
Monster
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This dungeon is for level 155 ~ 172 Masquerpets.
This is a regular dungeon so masquerpets hit a little bit harder here then on normal map.
Unique Items that can be obtained
Mars Mine Dungeon does contain item uniquely found here.
You will need to talk to the 3rd Class Job Masters of Eillun Village. They will allow you to get any
Yggdrasil Helmet, Gauntlets, Suit or Boots in exchange for 15
Purified Yggdrasil Tree Branches
, 15
Purified Dryad's Spirits
and 15
Yggdrasil Leaves
.
|
Yggdrasil Armor
|
|
Yggdrasil Crackshooter
|
|
Yggdrasil Harlequin
|
|
Yggdrasil Force Master
|
|
Yggdrasil Seraph
|
|
Yggdrasil Arcanist
|
|
Yggdrasil Mentalist
|
|
Yggdrasil Slayer
|
|
Yggdrasil Templar
|
Speak to
(Town Chief) Huntrang
of Eillun Village. He will give you any of the new Yggdrasil weapons in exchange for 15
Purified Yggdrasil Tree Branches
, 15
Purified Dryad's Spirits
and 15
Yggdrasil Leaves
.


ABOUT
Kent Hack Enough brings hackers from all over the nation together to learn something new, party hard, and create something awesome. With more than 325 highly motivated, creative, and talented participants, Kent Hack Enough is a weekend-long event where students from all areas of interest come together to make something awesome, like an app, website or hardware hack. The entire event is free for students, including food, energy drinks, and swag. In between all the coding, designing, and water pong, our sponsors are available as mentors to provide help and expertise throughout the hacking process.
ATTENDEES
Kent Hack Enough is free and open to students of all majors. If you are a high school student or a minor, please contact us for more information about how to attend. We'll send you a waiver for your parents to sign and return before the event, and then you'll be allowed in. If you're travelling to Kent, please contact us for more information about travel reimbursement.
RULES
We require that all entries be created from scratch, during the competition. The use of 3rd party libraries and APIs is allowed and encouraged. Teams are limited to four people. To provide hackers with the best possible environment for learning, networking, and creating we adhere to the
MLH Code of Conduct.


Getting Started With ANTLR3 For Ruby
Step 1: Download / Install
Two Ways To Install
Rubygems
% sudo gem install antlr3 # or whatever form of this command appropriate for your system |
- this will install the runtime library and customized ANTLR jar as a ruby gem
Git
% git clone http://github.com/ohboyohboyohboy/antlr3 |
% cd antlr3 |
% ruby setup.rb |
% rake install |
Step 2: Write an ANTLR Grammar
- For general information on writing grammars, read up on ANTLR’s official documentation
- For ruby output, the grammar must declare language = Ruby; in its top-level
options
block
Step 3: Run the ANTLR Tool
% antlr4ruby path/to/your/Grammar.g |
- the
antlr4ruby
command is just a simple wrapper around the command java org.antlr.Tool. It makes sure the customized ANTLR jar bundled up with this package is in the java class path to get correct output.
- for information on using the ANTLR tool command, refer to the official documentation
- assuming ANTLR doesn’t have any serious complaints about your grammar, you should now have a number of ruby output files containing your recognition code


Before Change
}
// http://www.iana.org/assignments/protocol-numbers
WK_PROTOCOLS = frozenset(["eth", "ipv6", "ip", "tcp", "arp", "icmp", "gre", "esp"])
// https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xml
// TODO: enumerate most common ports from survey (complete indicator matrix too expensive)
WK_PRIV_PROTO_PORTS = frozenset(
[22, 23, 25, 53, 67, 68, 69, 80, 88, 110, 123, 137, 138, 139, 143, 161, 443, 631])
After Change
class HostBase:
CALC_COL_NAMES = (
("frame.len", "frame_len"),
("frame.time_delta_displayed", "time_delta"))
CALC_COL_FUNCS = (
("max", lambda x: x.max()),
("min", lambda x: x.min()),
("count", lambda x: x.count()),


 Used for quickly referencing in the Device Management Dashboard.
Pairing Token
Link this device to your Device Management Dashboard account.
Pair Device
Enter your Kiosk Professional pairing token or skip and
configure manually