To start labelling, please click or tap this description.
You will be shown a few political statements, for which you decide their political orientation.
Depending on the direction you swipe, the currently shown sample will be tagged as:
- left - for swiping left
- right - for swiping right
- neutral - for swiping down


Quizzes
Chapter 1: Whole Numbers
Chapter 2: Multiplication & Division
Chapter 3: Number Theory and Fraction
Chapter 4: Geometry
Chapter 5: Pattern and Algebra
Chapter 6: Measurement
Back to main menu


--- layout: archive ---
{% include nicename_desc.html kind=layout.nicename_lookup slug=page.autopages.display_name %}


How do we calculate a sample mean? This is probably one of the most basic questions in statistics, with as its common answer the following: Given a vector of sample values \(\bf{x}\) of length \(N\), the sample mean \(m\) is defined as \[m = \frac{1}{N}\sum^N_{i=1}x_i\]
But this first assumption, given a vector of sample values, recently did not hold for me. The sheer size of the vector that I needed to process made sure it did not fit on my computer. Even worse, I had no way of knowing how big this vector would exactly be! My question was thus: how do I calculate the mean of a stream of sample values of indetermined length?
The solution to this was rather simple for calculation of the mean. We initialise the value of the mean to 0, and then update our current guess of the mean with the next value’s weighted deviation from the current mean. This happens like so:
\[m_{i} = m_{i-1} + \frac{(x_i-m_{i-1})}{i}\]
Reading the formula in words, the \(i^{th}\) mean is the \((i-1)^{th}\) mean plus the deviation of the \(i^{th}\) input value from this current mean divided by the current \(i\), i.e., the amount of values that have been input.
In code this is extremely simple to implement (click the code button on the right):
set.seed(3665364)
# let's assume we receive data of length 1234
streamlength <- 1234
# initialise m_i
m_i <- 0
for (i in 1:streamlength) {
m_prev <- m_i
x_i <- rnorm(1, 0, 3)
m_i <- m_prev + (x_i - m_prev)/i
}
print(m_i)
## [1] -0.08489741
Note that in the above code we never save the full vector \(\bf{x}\); we only ever save the current and previous versions of the mean. This is perfect for an extremely large, variable length input vector such as the one I talked about in the introduction!
set.seed(3665364)
# let's assume we receive data of length 1234
streamlength <- 1234
# initialise m_i
means <- numeric(streamlength)
for (i in 1:streamlength) {
x_i <- rnorm(1, 0, 3)
means[i] <- ifelse(i == 1, x_i, means[i - 1] + (x_i - means[i - 1])/i)
}
par(family = "serif")
plot(1:streamlength, means, type = "l", main = "Development of mean over stream",
xlab = "i", ylab = "Mean", bty = "L", lwd = 1.5)
Notice the big changes at the start of the stream, and the smaller changes at the end, asymptotically converging to the “true” mean value that we set here at 0.
We can also see this as a form of bayesian updating, if we turn the formula around like so:
\[m_{i} = \frac{(x_i-m_{i-1}) + i \cdot m_{i-1}}{i}\]
Here, we set the prior to be \(i \cdot m_{i-1}\), then we see \((x_i-m_{i-1})\) as our new data/evidence, \(m_i\) is our posterior, and \(i\) is the normalising constant. Cool!
The algorithm above translates nicely into the bayesian framework, but as with so many algorithms, it can be made much more efficient. It turns out that all we have to do is remember the sum
of the values input in the stream and a counter i
that indicates how many values went in. Then, when asking for the mean, all we need to do is \(m_i=\frac{\texttt{sum}}{\texttt{i}}\). Simple!
This is better for three reasons:
sum
, the sum of squares
, and the counter i
. Then, we can calculate the variance using the formula \(Var(X) = E[X^2] - (E[X])^2\) to calculate the variance: \(s^2_i=\frac{\texttt{sum of squares}}{\texttt{i}}-\left(\frac{\texttt{sum}}{\texttt{i}}\right)^2\). For each higher order moment, we need to remember a higher power sum in this framework.Let’s do it!
set.seed(3665364)
# let's assume we receive data of length 1234
streamlength <- 1234
# initialise
sum <- 0
sumsq <- 0
i <- 0
for (j in 1:streamlength){
value <- rnorm(1,0,3)
sum <- sum + value
sumsq <- sumsq + value^2
i <- i+1
}
list(sum = sum,
sum_of_squares = sumsq,
i = i,
mean = sum/i,
variance = sumsq/i - (sum/i)^2)
## $sum
## [1] -104.7634
##
## $sum_of_squares
## [1] 11547.45
##
## $i
## [1] 1234
##
## $mean
## [1] -0.08489741
##
## $variance
## [1] 9.35053
For the mean this was simple to implement. The question I’m pondering in the back of my mind throughout all this is the following: can any statistic be transformed into such a sequential statistic? How does this work for variance? Standard deviation? The median / other quantiles? If you let me know, I’ll be sure to update this blog post with the additions.


A free, bi-weekly email roundup of JavaScript news and articles.
What is The JS Post?
The JS post is a free mailing list for JavaScript enthusiasts. Subscribe to The JS Post to receive bi-weekly emails which feature a curated list of top JavaScript content from over the web.


In which year did Captain America and Iron Man go to, to retrieve the Tesseract after failing once in Avengers Endgame?
Difficulty - Easy
1974
1970
1967
1972
Submit
Next
Hint
Reload to solve again


Welcome to Inter(pre|in)vention, a collaborative, networked electronic poetry experiment. Here you will find a database of cybernetically generated poems, created from combined efforts of people and computers.
Writing and reading are collaborative and social behaviors. Language is a commons that is constituted by the community of language practitioners. We literally create language when we practice it together by reading, speaking, listening and writing. Technologies of language practice, be they oral, literary, or electrate in nature, form the vectors along which language enters the public sphere, giving it the potential to change and morph. As a product of the public, language is defined by accident, happenstance, and the various confluences of existing vectors, forces and states in human systems.
How can new systems of technological and cultural production change the ways we use language? When writing and reading are fully exposed and made available by the technical apparatus, what new patterns of meaning-making can emerge? As network and computational technologies become more powerful and available, how can their prosthetic, cybernetic functions change the way we write, read, and make inscription upon the commons of language?


[ aws ]
Overview
This is an interface reference for Amazon Redshift. It contains documentation for one of the programming or command line interfaces you can use to manage Amazon Redshift clusters. Note that Amazon Redshift is asynchronous, which means that some interfaces may require techniques, such as polling or asynchronous callback handlers, to determine when a command has been applied. In this reference, the parameter descriptions indicate whether a change is applied immediately, on the next instance reboot, or during the next maintenance window. For a summary of the Amazon Redshift cluster management interfaces, go to Using the Amazon Redshift Management Interfaces .
Amazon Redshift manages all the work of setting up, operating, and scaling a data warehouse: provisioning capacity, monitoring and backing up the cluster, and applying patches and upgrades to the Amazon Redshift engine. You can focus on using your data to acquire new insights for your business and customers.

If you are a database developer, the Amazon Redshift Database Developer Guide explains how to design, build, query, and maintain the databases that make up your data warehouse.


This tests for a bug where moving the selection to the end of the document would move it outside of an editable region if the selection started just before a table.
| foo |
In the above editable region, you should see 'foo' in the bordered table and 'bar' outside it.


{% extends 'base.html' %} {% block main %}
Connect to your Open Humans account to store location data from the Overland iPhone app.
Connect to Open HumansOverland is a free and open source app for iOS and for Android. It tracks your location and sends your data to a server of your choosing. It is highly configurable to help you preserve privacy and battery life, if you wish to do so!
Overland's data includes:
If you log in with your Open Humans account you can use this app to transfer your Overland location data to your Open Humans account.
This project is run by the Open Humans Foundation and governed by the Open Humans terms of use.
You can read more about its code, operation, and data management in our About/FAQ page.
The short answer: No.
The long answer: Data is private by default. If you want to, you can opt to make data sets publicly available on Open Humans and/or share it with other projects, but you can always keep data private.
You already have Overland Location Data in your Open Humans account
{%else%}You don't have any Overland data in your Open Humans account so far. Follow the steps below to start recording data:
{%endif%}
To push data from the Overland app on your phone to Open Humans you need to use the following URL as the Receiver Endpoint in the Overland:
{{ overland_endpoint }}
If you are on your computer right now and want to open these instructions on your iPhone you can scan the QR code below by just using the Camera app on your phone.
The resulting website that will open contains all the information you will need.
After you have copied your personal Overland endpoint URL you can enter it in your Overland app on your phone:
After you have copied your personal Overland endpoint URL you can enter it in your Overland app on your phone:


“James I, at the beginning of his reign, to gratify the people, published a book of sports, of which the women had some time before participated on Sunday evenings, but which had been prohibited. These sports consisted of dancing, ringing, wrestling, and other profanations of that day, and which had risen to such a height that the land would have been deluged with immorality, if Charles I had not wisely shown his piety, by totally abolishing them.” — The Mirror of Literature, Amusement and Instruction, Vol. 19, No. 553, 23rd June 1832


Package it.polimi.vovarini.model.board
Class Board
java.lang.Object
it.polimi.vovarini.model.board.Board
- All Implemented Interfaces:
java.io.Serializable
public class Board
extends java.lang.Object
implements java.io.Serializable
This class represents the board where the game is played.
- See Also:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_SIZE
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description java.util.List<Point>
getAdjacentPositions(Point p)
Computes and returns a list of all points within the board that are adjacent to p (d(point, p) is minor or equal to 1).Box
getBox(Point position)
Getter method for a Box belonging to the BoardPoint
getItemPosition(Item item)
Returns the item position after searching on top of all the boxes.int
getSize()
Getter method for the size of the Boardboolean
isPositionValid(Point p)
Checks if p is within the board.void
place(Item item, Point p)
Places item on the board at position p, if possible.
-
Field Details
-
DEFAULT_SIZE
public static final int DEFAULT_SIZE- See Also:
- Constant Field Values
-
-
Constructor Details
-
Method Details
-
isPositionValid
Checks if p is within the board.- Parameters:
p
- The point to check.- Returns:
- Whether p is within the board.
-
getAdjacentPositions
Computes and returns a list of all points within the board that are adjacent to p (d(point, p) is minor or equal to 1).- Parameters:
p
- The base point.- Returns:
- A list containing all points adjacent to p.
-
getBox
Getter method for a Box belonging to the Board- Parameters:
position
- is a Point, a set of coordinates indicating what is the Box the user is interested to get- Returns:
- the instance of Box included in the Board and corresponding to the coordinates specified by the parameter position
-
place
Places item on the board at position p, if possible.- Parameters:
item
- The item to be placed on the board.p
- Where the item should be placed.- Throws:
InvalidPositionException
- If p is outside of the board.BoxFullException
- If the box at position p is full.
-
getItemPosition
Returns the item position after searching on top of all the boxes.- Parameters:
item
- The item to search for.- Returns:
- Where the first occurrence of item was found.
- Throws:
ItemNotFoundException
- If item was not found.
-
getSize
public int getSize()Getter method for the size of the Board- Returns:
- the size of the Board
-


From http://sourceforge.net/forum/message.php?msg_id=3849557.
This page should not leak any elements.


Web Components allow for the creation of custom HTML tags with unique styles and functionality (imagine the ability to create complex tags like the <video> tag!)
Using web components allows PwrSlide to embrace the declarative power of HTML, making your presentations easier to read and create
Instead of ugly
 soup, you get clean, declarative code
Check out the Polymer Project for more information about this exciting new spec
So What Does This Mean for You?
The Pros and Cons of Using Web Components and PwrSlides
Pros
It's declarative: no more confusing code that's impossible to read and maintain
Style and function encapsulation make previously difficult or impossible tasks easy (imagine embedding a presentation inside a presentation - see slide 8)
It's modular: another benefit of encapsulation, now you can start building presentations within existing apps without worrying about cross-contamination of JS
Most importantly, it's Pwrful
Using Polymer and JS encapsulation allows for nearly limitless extensibility and customization by enabling custom callbacks, animations, and nesting that previously would have been incredibly difficult and/or convoluted
Cons
PwrSlide is built using the developing web components spec and the Polymer polyfill library, both of which are currently in development
Ergo, as with anything under active development, this project may have its fair share of bugs (I welcome your input to make PwrSlide better!)
Because PwrSlide uses Shadow DOM, HTML Imports, and other developing specs, only the evergreen browsers are supported (and even then, I would recommend that you stay away from IE, for your own sake)
Due to the fact that many features required by web components must be polyfilled, even in modern browsers, some of PwrSlide's features may detriment page load times
PwrSlide Features!
And Now for Some Good Stuff
Tons of Animations!
Built with a Powerful Animation Framework
PwrSlide.html ships with over 50 animations from Animate.css
PwrSlides and PwrPieces descend from the PwrAnimated Object
Custom attributes give fine-grain control over each animated component of your presentation
Animated components have access to several powerful animation methods
Wrap any regular HTML element in <pwr-piece> tags for them to become animated
Tags are animated by the slide in descending order
Add the 'show' attribute to the component to show its contents initially
PwrAnimated
<pwr-animated entrance exit onentry onexit>
Attributes
entrance: specify the entrance animation name
exit: specify the exit animation name
onentry: optional callback executed after entrance animation
onexit: optional callback executed before exit animation
NOTE: callbacks are bound by default to the tag on which they are called
animateIn( ): queue the target component's entrance animation
animateOut( ): queue the target component's exit animation
applyAnimation(animationName): applies the given animationName to the component
removeAnimations( ): removes any animations from the component
Animation Callbacks
Every Transition, Do Something Cool

<pwr-slide onentry="alert('Hi! I am an entrance callback on this slide');">

<pwr-piece exit="fadeOut" onexit="alert('And I am an exit callback on this piece');">

Deep, meaningful presentation insight

</pwr-piece>

</pwr-slide>
Animation callbacks allow you to perform complex manipulations of your presentation as elements enter and leave the view
Callbacks are handled similarly to the familiar "onclick" HTML attribute; just specify your code in quotes and let PwrSlide handle the rest
Allow for the presentation of time-sensitive code, giving you real-time interactivity within your presentation
For an example of animation callbacks, check out the color-changing function on the next slide
Custom Color Themes
Add A Splash of Color to Your Presentations

PwrSlide also ships with six custom color themes to allow you to add some color to your slides
Currently supports "red", "blue", "green", "gold", "salmon", and "black" themes
Simply add the corresponsing color class to a given slide to apply the color theme
Color themes have all been written in Sass using declarative variables for attributes, allowing for easy customization


Advanced Model Training with Fully Sharded Data Parallel (FSDP)¶
Author: Hamid Shojanazeri, Less Wright, Rohan Varma, Yanli Zhao
This tutorial introduces more advanced features of Fully Sharded Data Parallel (FSDP) as part of the PyTorch 1.12 release. To get familiar with FSDP, please refer to the FSDP getting started tutorial.
In this tutorial, we fine-tune a HuggingFace (HF) T5 model with FSDP for text summarization as a working example.
The example uses Wikihow and for simplicity, we will showcase the training on a single node, P4dn instance with 8 A100 GPUs. We will soon have a blog post on large scale FSDP training on a multi-node cluster, please stay tuned for that on the PyTorch medium channel.
FSDP is a production ready package with focus on ease of use, performance, and long-term support. One of the main benefits of FSDP is reducing the memory footprint on each GPU. This enables training of larger models with lower total memory vs DDP, and leverages the overlap of computation and communication to train models efficiently. This reduced memory pressure can be leveraged to either train larger models or increase batch size, potentially helping overall training throughput. You can read more about PyTorch FSDP here.
FSDP Features in This Tutorial¶
Transformer Auto Wrap Policy
Mixed Precision
Initializing FSDP Model on Device
Sharding Strategy
Backward Prefetch
Model Checkpoint Saving via Streaming to CPU
Recap on How FSDP Works¶
At a high level FDSP works as follow:
In constructor
Shard model parameters and each rank only keeps its own shard
In forward pass
Run all_gather to collect all shards from all ranks to recover the full parameter for this FSDP unit Run forward computation
Discard non-owned parameter shards it has just collected to free memory
In backward pass
Run all_gather to collect all shards from all ranks to recover the full parameter in this FSDP unit Run backward computation
Discard non-owned parameters to free memory.
Run reduce_scatter to sync gradients
Fine-tuning HF T5¶
HF T5 pre-trained models are available in four different sizes, ranging from small with 60 Million parameters to XXL with 11 Billion parameters. In this tutorial, we demonstrate the fine-tuning of a T5 3B with FSDP for text summarization using WikiHow dataset. The main focus of this tutorial is to highlight different available features in FSDP that are helpful for training large scale model above 3B parameters. Also, we cover specific features for Transformer based models. The code for this tutorial is available in Pytorch Examples.
Setup
1.1 Install PyTorch Nightlies
We will install PyTorch nightlies, as some of the features such as activation checkpointing is available in nightlies and will be added in next PyTorch release after 1.12.
pip3 install --pre torch torchvision torchaudio -f https://download.pytorch.org/whl/nightly/cu113/torch_nightly.html
1.2 Dataset Setup
Please create a data folder, download the WikiHow dataset from wikihowAll.csv and wikihowSep.cs, and place them in the data folder. We will use the wikihow dataset from summarization_dataset.
Next, we add the following code snippets to a Python script “T5_training.py”.
참고
The full source code for this tutorial is available in PyTorch examples.
1.3 Import necessary packages:
import os
import argparse
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from transformers import AutoTokenizer, GPT2TokenizerFast
from transformers import T5Tokenizer, T5ForConditionalGeneration
import functools
from torch.optim.lr_scheduler import StepLR
import torch.nn.functional as F
import torch.distributed as dist
import torch.multiprocessing as mp
from torch.nn.parallel import DistributedDataParallel as DDP
from torch.utils.data.distributed import DistributedSampler
from transformers.models.t5.modeling_t5 import T5Block
from torch.distributed.algorithms._checkpoint.checkpoint_wrapper import (
checkpoint_wrapper,
CheckpointImpl,
apply_activation_checkpointing_wrapper)
from torch.distributed.fsdp import (
FullyShardedDataParallel as FSDP,
MixedPrecision,
BackwardPrefetch,
ShardingStrategy,
FullStateDictConfig,
StateDictType,
)
from torch.distributed.fsdp.wrap import (
transformer_auto_wrap_policy,
enable_wrap,
wrap,
)
from functools import partial
from torch.utils.data import DataLoader
from pathlib import Path
from summarization_dataset import *
from transformers.models.t5.modeling_t5 import T5Block
from typing import Type
import time
import tqdm
from datetime import datetime
1.4 Distributed training setup. Here we use two helper functions to initialize the processes for distributed training, and then to clean up after training completion. In this tutorial, we are going to use torch elastic, using torchrun , which will set the worker RANK and WORLD_SIZE automatically.
def setup():
# initialize the process group
dist.init_process_group("nccl")
def cleanup():
dist.destroy_process_group()
2.1 Set up the HuggingFace T5 model:
def setup_model(model_name):
model = T5ForConditionalGeneration.from_pretrained(model_name)
tokenizer = T5Tokenizer.from_pretrained(model_name)
return model, tokenizer
We also, add couple of helper functions here for date and formatting memory metrics.
def get_date_of_run():
"""create date and time for file save uniqueness
example: 2022-05-07-08:31:12_PM'
"""
date_of_run = datetime.now().strftime("%Y-%m-%d-%I:%M:%S_%p")
print(f"--> current date and time of run = {date_of_run}")
return date_of_run
def format_metrics_to_gb(item):
"""quick function to format numbers to gigabyte and round to 4 digit precision"""
metric_num = item / g_gigabyte
metric_num = round(metric_num, ndigits=4)
return metric_num
2.2 Define a train function:
def train(args, model, rank, world_size, train_loader, optimizer, epoch, sampler=None):
model.train()
local_rank = int(os.environ['LOCAL_RANK'])
fsdp_loss = torch.zeros(2).to(local_rank)
if sampler:
sampler.set_epoch(epoch)
if rank==0:
inner_pbar = tqdm.tqdm(
range(len(train_loader)), colour="blue", desc="r0 Training Epoch"
)
for batch in train_loader:
for key in batch.keys():
batch[key] = batch[key].to(local_rank)
optimizer.zero_grad()
output = model(input_ids=batch["source_ids"],attention_mask=batch["source_mask"],labels=batch["target_ids"] )
loss = output["loss"]
loss.backward()
optimizer.step()
fsdp_loss[0] += loss.item()
fsdp_loss[1] += len(batch)
if rank==0:
inner_pbar.update(1)
dist.all_reduce(fsdp_loss, op=dist.ReduceOp.SUM)
train_accuracy = fsdp_loss[0] / fsdp_loss[1]
if rank == 0:
inner_pbar.close()
print(
f"Train Epoch: \t{epoch}, Loss: \t{train_accuracy:.4f}"
)
return train_accuracy
2.3 Define a validation function:
def validation(model, rank, world_size, val_loader):
model.eval()
correct = 0
local_rank = int(os.environ['LOCAL_RANK'])
fsdp_loss = torch.zeros(3).to(local_rank)
if rank == 0:
inner_pbar = tqdm.tqdm(
range(len(val_loader)), colour="green", desc="Validation Epoch"
)
with torch.no_grad():
for batch in val_loader:
for key in batch.keys():
batch[key] = batch[key].to(local_rank)
output = model(input_ids=batch["source_ids"],attention_mask=batch["source_mask"],labels=batch["target_ids"])
fsdp_loss[0] += output["loss"].item() # sum up batch loss
fsdp_loss[1] += len(batch)
if rank==0:
inner_pbar.update(1)
dist.all_reduce(fsdp_loss, op=dist.ReduceOp.SUM)
val_loss = fsdp_loss[0] / fsdp_loss[1]
if rank == 0:
inner_pbar.close()
print(f"Validation Loss: {val_loss:.4f}")
return val_loss
2.4 Define a distributed train function that wraps the model in FSDP:
def fsdp_main(args):
model, tokenizer = setup_model("t5-base")
local_rank = int(os.environ['LOCAL_RANK'])
rank = int(os.environ['RANK'])
world_size = int(os.environ['WORLD_SIZE'])
dataset = load_dataset('wikihow', 'all', data_dir='data/')
print(dataset.keys())
print("Size of train dataset: ", dataset['train'].shape)
print("Size of Validation dataset: ", dataset['validation'].shape)
#wikihow(tokenizer, type_path, num_samples, input_length, output_length, print_text=False)
train_dataset = wikihow(tokenizer, 'train', 1500, 512, 150, False)
val_dataset = wikihow(tokenizer, 'validation', 300, 512, 150, False)
sampler1 = DistributedSampler(train_dataset, rank=rank, num_replicas=world_size, shuffle=True)
sampler2 = DistributedSampler(val_dataset, rank=rank, num_replicas=world_size)
setup()
train_kwargs = {'batch_size': args.batch_size, 'sampler': sampler1}
test_kwargs = {'batch_size': args.test_batch_size, 'sampler': sampler2}
cuda_kwargs = {'num_workers': 2,
'pin_memory': True,
'shuffle': False}
train_kwargs.update(cuda_kwargs)
test_kwargs.update(cuda_kwargs)
train_loader = torch.utils.data.DataLoader(train_dataset,**train_kwargs)
val_loader = torch.utils.data.DataLoader(val_dataset, **test_kwargs)
t5_auto_wrap_policy = functools.partial(
transformer_auto_wrap_policy,
transformer_layer_cls={
T5Block,
},
)
sharding_strategy: ShardingStrategy = ShardingStrategy.SHARD_GRAD_OP #for Zero2 and FULL_SHARD for Zero3
torch.cuda.set_device(local_rank)
#init_start_event = torch.cuda.Event(enable_timing=True)
#init_end_event = torch.cuda.Event(enable_timing=True)
#init_start_event.record()
bf16_ready = (
torch.version.cuda
and torch.cuda.is_bf16_supported()
and LooseVersion(torch.version.cuda) >= "11.0"
and dist.is_nccl_available()
and nccl.version() >= (2, 10)
)
if bf16_ready:
mp_policy = bfSixteen
else:
mp_policy = None # defaults to fp32
# model is on CPU before input to FSDP
model = FSDP(model,
auto_wrap_policy=t5_auto_wrap_policy,
mixed_precision=mp_policy,
#sharding_strategy=sharding_strategy,
device_id=torch.cuda.current_device())
optimizer = optim.AdamW(model.parameters(), lr=args.lr)
scheduler = StepLR(optimizer, step_size=1, gamma=args.gamma)
best_val_loss = float("inf")
curr_val_loss = float("inf")
file_save_name = "T5-model-"
if rank == 0:
time_of_run = get_date_of_run()
dur = []
train_acc_tracking = []
val_acc_tracking = []
training_start_time = time.time()
if rank == 0 and args.track_memory:
mem_alloc_tracker = []
mem_reserved_tracker = []
for epoch in range(1, args.epochs + 1):
t0 = time.time()
train_accuracy = train(args, model, rank, world_size, train_loader, optimizer, epoch, sampler=sampler1)
if args.run_validation:
curr_val_loss = validation(model, rank, world_size, val_loader)
scheduler.step()
if rank == 0:
print(f"--> epoch {epoch} completed...entering save and stats zone")
dur.append(time.time() - t0)
train_acc_tracking.append(train_accuracy.item())
if args.run_validation:
val_acc_tracking.append(curr_val_loss.item())
if args.track_memory:
mem_alloc_tracker.append(
format_metrics_to_gb(torch.cuda.memory_allocated())
)
mem_reserved_tracker.append(
format_metrics_to_gb(torch.cuda.memory_reserved())
)
print(f"completed save and stats zone...")
if args.save_model and curr_val_loss < best_val_loss:
# save
if rank == 0:
print(f"--> entering save model state")
save_policy = FullStateDictConfig(offload_to_cpu=True, rank0_only=True)
with FSDP.state_dict_type(
model, StateDictType.FULL_STATE_DICT, save_policy
):
cpu_state = model.state_dict()
#print(f"saving process: rank {rank} done w state_dict")
if rank == 0:
print(f"--> saving model ...")
currEpoch = (
"-" + str(epoch) + "-" + str(round(curr_val_loss.item(), 4)) + ".pt"
)
print(f"--> attempting to save model prefix {currEpoch}")
save_name = file_save_name + "-" + time_of_run + "-" + currEpoch
print(f"--> saving as model name {save_name}")
torch.save(cpu_state, save_name)
if curr_val_loss < best_val_loss:
best_val_loss = curr_val_loss
if rank==0:
print(f"-->>>> New Val Loss Record: {best_val_loss}")
dist.barrier()
cleanup()
2.5 Parse the arguments and set the main function:
if __name__ == '__main__':
# Training settings
parser = argparse.ArgumentParser(description='PyTorch T5 FSDP Example')
parser.add_argument('--batch-size', type=int, default=4, metavar='N',
help='input batch size for training (default: 64)')
parser.add_argument('--test-batch-size', type=int, default=4, metavar='N',
help='input batch size for testing (default: 1000)')
parser.add_argument('--epochs', type=int, default=2, metavar='N',
help='number of epochs to train (default: 3)')
parser.add_argument('--lr', type=float, default=.002, metavar='LR',
help='learning rate (default: .002)')
parser.add_argument('--gamma', type=float, default=0.7, metavar='M',
help='Learning rate step gamma (default: 0.7)')
parser.add_argument('--no-cuda', action='store_true', default=False,
help='disables CUDA training')
parser.add_argument('--seed', type=int, default=1, metavar='S',
help='random seed (default: 1)')
parser.add_argument('--track_memory', action='store_false', default=True,
help='track the gpu memory')
parser.add_argument('--run_validation', action='store_false', default=True,
help='running the validation')
parser.add_argument('--save-model', action='store_false', default=True,
help='For Saving the current Model')
args = parser.parse_args()
torch.manual_seed(args.seed)
fsdp_main(args)
To run the the training using torchrun:
torchrun --nnodes 1 --nproc_per_node 4 T5_training.py
Transformer Wrapping Policy¶
As discussed in the previous tutorial, auto_wrap_policy is one of the FSDP features that make it easy to automatically shard a given model and put the model, optimizer and gradient shards into distinct FSDP units.
For some architectures such as Transformer encoder-decoders, some parts of the model such as embedding table is being shared with both encoder and decoder. In this case, we need to place the embedding table in the outer FSDP unit so that it could be accessed from both encoder and decoder. In addition, by registering the layer class for a transformer, the sharding plan can be made much more communication efficient. In PyTorch 1.12, FSDP added this support and now we have a wrapping policy for transfomers.
It can be created as follows, where the T5Block represents the T5 transformer layer class (holding MHSA and FFN).
t5_auto_wrap_policy = functools.partial(
transformer_auto_wrap_policy,
transformer_layer_cls={
T5Block,
},
)
torch.cuda.set_device(local_rank)
model = FSDP(model,
fsdp_auto_wrap_policy=t5_auto_wrap_policy)
To see the wrapped model, you can easily print the model and visually inspect the sharding and FSDP units as well.
Mixed Precision¶
FSDP supports flexible mixed precision training allowing for arbitrary reduced precision types (such as fp16 or bfloat16). Currently BFloat16 is only available on Ampere GPUs, so you need to confirm native support before you use it. On V100s for example, BFloat16 can still be run but due to it running non-natively, it can result in significant slowdowns.
To check if BFloat16 is natively supported, you can use the following :
bf16_ready = (
torch.version.cuda
and torch.cuda.is_bf16_supported()
and LooseVersion(torch.version.cuda) >= "11.0"
and dist.is_nccl_available()
and nccl.version() >= (2, 10)
)
One of the advantages of mixed percision in FSDP is providing granular control over different precision levels for parameters, gradients, and buffers as follows:
fpSixteen = MixedPrecision(
param_dtype=torch.float16,
# Gradient communication precision.
reduce_dtype=torch.float16,
# Buffer precision.
buffer_dtype=torch.float16,
)
bfSixteen = MixedPrecision(
param_dtype=torch.bfloat16,
# Gradient communication precision.
reduce_dtype=torch.bfloat16,
# Buffer precision.
buffer_dtype=torch.bfloat16,
)
fp32_policy = MixedPrecision(
param_dtype=torch.float32,
# Gradient communication precision.
reduce_dtype=torch.float32,
# Buffer precision.
buffer_dtype=torch.float32,
)
Note that if a certain type (parameter, reduce, buffer) is not specified, they will not be casted at all.
This flexibility allows users fine grained control, such as only setting gradient communication to happen in reduced precision, and all parameters / buffer computation to be done in full precision. This is potentially useful in cases where intra-node communication is the main bottleneck and parameters / buffers must be in full precision to avoid accuracy issues. This can be done with the following policy:
grad_bf16 = MixedPrecision(reduce_dtype=torch.bfloat16)
In 2.4 we just add the relevant mixed precision policy to the FSDP wrapper:
model = FSDP(model,
auto_wrap_policy=t5_auto_wrap_policy,
mixed_precision=bfSixteen)
In our experiments, we have observed up to 4x speed up by using BFloat16 for training and memory reduction of approximately 30% in some experiments that can be used for batch size increases.
Intializing FSDP Model on Device¶
In 1.12, FSDP supports a device_id argument meant to initialize input CPU module on the device given by device_id. This is useful when the entire model does not fit on a single GPU, but fits in a host’s CPU memory. When device_id is specified, FSDP will move the model to the specified device on a per-FSDP unit basis, avoiding GPU OOM issues while initializing several times faster than CPU-based initialization:
torch.cuda.set_device(local_rank)
model = FSDP(model,
auto_wrap_policy=t5_auto_wrap_policy,
mixed_precision=bfSixteen,
device_id=torch.cuda.current_device())
Sharding Strategy¶
FSDP sharding strategy by default is set to fully shard the model parameters, gradients and optimizer states get sharded across all ranks. (also termed Zero3 sharding). In case you are interested to have the Zero2 sharding strategy, where only optimizer states and gradients are sharded, FSDP support this feature by passing the Sharding strategy by using 《ShardingStrategy.SHARD_GRAD_OP》, instead of 《ShardingStrategy.FULL_SHARD》 to the FSDP initialization as follows:
torch.cuda.set_device(local_rank)
model = FSDP(model,
auto_wrap_policy=t5_auto_wrap_policy,
mixed_precision=bfSixteen,
device_id=torch.cuda.current_device(),
sharding_strategy=ShardingStrategy.SHARD_GRAD_OP # ZERO2)
This will reduce the communication overhead in FSDP, in this case, it holds full parameters after forward and through the backwards pass.
This saves an all_gather during backwards so there is less communication at the cost of a higher memory footprint. Note that full model params are freed at the end of backwards and all_gather will happen on the next forward pass.
Backward Prefetch¶
The backward prefetch setting controls the timing of when the next FSDP unit’s parameters should be requested. By setting it to BACKWARD_PRE, the next FSDP’s unit params can begin to be requested and arrive sooner before the computation of the current unit starts. This overlaps the all_gather communication and gradient computation which can increase the training speed in exchange for slightly higher memory consumption. It can be utilized in the FSDP wrapper in 2.4 as follows:
torch.cuda.set_device(local_rank)
model = FSDP(model,
auto_wrap_policy=t5_auto_wrap_policy,
mixed_precision=bfSixteen,
device_id=torch.cuda.current_device(),
backward_prefetch = BackwardPrefetch.BACKWARD_PRE)
backward_prefetch has two modes, BACKWARD_PRE and BACKWARD_POST. BACKWARD_POST means that the next FSDP unit’s params will not be requested until the current FSDP unit processing is complete, thus minimizing memory overhead. In some cases, using BACKWARD_PRE can increase model training speed up to 2-10%, with even higher speed improvements noted for larger models.
Model Checkpoint Saving, by streaming to the Rank0 CPU¶
To save model checkpoints using FULL_STATE_DICT saving which saves model in the same fashion as a local model, PyTorch 1.12 offers a few utilities to support the saving of larger models.
First, a FullStateDictConfig can be specified, allowing the state_dict to be populated on rank 0 only and offloaded to the CPU.
When using this configuration, FSDP will allgather model parameters, offloading them to the CPU one by one, only on rank 0. When the state_dict is finally saved, it will only be populated on rank 0 and contain CPU tensors. This avoids potential OOM for models that are larger than a single GPU memory and allows users to checkpoint models whose size is roughly the available CPU RAM on the user’s machine.
This feature can be run as follows:
save_policy = FullStateDictConfig(offload_to_cpu=True, rank0_only=True)
with FSDP.state_dict_type(
model, StateDictType.FULL_STATE_DICT, save_policy
):
cpu_state = model.state_dict()
if rank == 0:
save_name = file_save_name + "-" + time_of_run + "-" + currEpoch
torch.save(cpu_state, save_name)
Summary¶
In this tutorial, we have introduced many new features for FSDP available in Pytorch 1.12 and used HF T5 as the running example. Using the proper wrapping policy especially for transformer models, along with mixed precision and backward prefetch should speed up your training runs. Also, features such as initializing the model on device, and checkpoint saving via streaming to CPU should help to avoid OOM error in dealing with large models.
We are actively working to add new features to FSDP for the next release. If you have feedback, feature requests, questions or are encountering issues using FSDP, please feel free to contact us by opening an issue in the PyTorch Github repository.


On the other hand, we denounce with righteous indignation and dislike men who are so beguiled demord by.
MY WORKOn the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by th charms of pleasure of the moment, so blinded by desire, tht they cannot foresee the pain and trouble that are.
There are many variations of pssges of Lorems Ipsum available, bu in some form, by


--- layout: post title: Five Ways to Read with Your Toddler date: 2011-07-25 11:30:06.000000000 -07:00 type: post parent_id: '0' published: true pd: '' status: publish categories: - Classroom Talk - Early Childhood Issues - Infants and Toddlers tags: - books for toddlers - children's books - early childhood - kindergarten readiness - literacy - reading to your toddler author: login: k email: k@k display_name: mcary first_name: '' last_name: '' ---
Try to read books with your child every day, even if it is only for a short time. Books can become a source of comfort and are a great way to wind down, share cuddle time and make the transition to bedtime or a nap. But don’t just rely on books; employ reading moments throughout the day. Here are five ways to increase and enhance your toddler’s reading experiences:
1. Point to the Picture. To help develop vocabulary, ask your child to point to a picture in a book or wherever you might find pictures, which he can identify with a word. “Can you point at the cow?” “Show me the dog.”
2. Discuss what’s happening in pictures. What or who are the items or characters? Where does the story take place? What do you think is happening?
3. If your child wants to hear the same story or book over and over (and over and over), make the best of it. Discuss details, ask lots of questions, delve deeper into the details, motives and meaning.
4. By the age of three, many children can begin learning letters and sounds. Begin with the letters in your child’s name and look for them in books, on signs, in advertisements, on products, etc.
5. Start reading environmental print together when you’re out walking or even driving. You’d be surprised how quickly children can read favorite restaurant, grocery store and department store signs.


a web developer
Tribute Page
Random Quote Machine
JavaScript Calculator
Map Data Across the Globe
Wikipedia Viewer
Tic Tac Toe Game
How do you take your coffee?


There are many money exchange companies in Dhaka and other major cities of Bangladesh. People think , to exchange money from Banks is little hassle and getting low rates. Sometime the private or government banks will ask about the legal procedure of earning the foreign currency. But private money broker house will not ask any question to exchange any amount of dollar or Riyals to Bangladesh Taka. On the other hand, private money broker house offer better rates and available when you need. But money changing from broker is a big risk for big amount of foreign currency.
Bushra Money ExchangeDhaka Sheraton Hotel,
1, Minto Road, Dhaka,
Tel: 9347933, 8312375, Fax: 9353147
Capital Money ChangerZ-Shah House (3rd Fl)120/A, Motijheel, Dhaka,
Tel: 9562476, Fax: 9564306
Diamond Money Exchange Service Dhaka Sheraton Hotel, Dhaka,
Tel: 9350024, Fax: 9350024, :
Federal Money Changer2, R.K. Mission Road, Motijheel, Dhaka,
Tel: 9563343
Good Will Money ExchangeLand View Shopping Complex, 28, Gulshan North C/A, Gulshan-2, Dhaka,
Tel: 8815702, 9881965
HAQUE INT’L MONEY CHANGER
B-102, Gulshan Shopping Center, First Floor
Gulshan # 1,
Dahaka-1212
01818597920
TURNA MONEY CHANGER
B. 100/3, Gulshan Shopping Center, First Floor
Gulshan # 1,
Dahaka-1212
01740907521
KAMAAS MONEY EXCHANGE COR
61 no., Gulshan Shopping Center First Floor
Gulshan # 1,
Dhaka1212
0088-02-9886086
S.H. MONEY EXCHANGE
63, Gulshan Shopping Center, First Floor
Gulshan # 1,
Dhaka1212
0088-02-8834391
RAJ MONEY EXCHANGE
53, Gulshan Shopping Center, First Floor
Gulshan # 1,
Dhaka
01911-489866
Shapla Money Changer
B-98, Gulshan Shopping Center, First Floor
Gulshan # 1,
Dhaka
0088-02-9856736
Lochnath Money Exchange
B-97, Gulshan Shopping Center, First Floor
Gulshan # 1,
Dhaka
0088-02-9881730
S.H. Money Exchange
63, Gulshan Shopping Center
1st Floor, Gulshan – 1
Dhaka
02-8834391,8812671
A.R. Money Exchanger
887, Sadarghat Road, N J Bearing Market
Chittagong, Bangladesh
Mob: +880-31-633795


WELCOME TO VIENNA A film review by Ben Hoffman Copyright 1997 Ben Hoffman
This is the third in a trilogy by the Viennese director which is based on the real-life experience of the screenwriter Stephan Troller, an Austrian Jew who fled the Nazis prior to WWII, came to the U.S. and then went back to Austria with the victorious American army, as an interpreter.
It is not necessary to have seen the first two of the series as this is a self contained movie, and is an exceedingly gripping, well-made film not to be missed.
The film follows Freddy, its hero, right to his home city but none of Vienna is like the civilized country he had left, and of course it is in shambles from the bombings. As one woman mumbles at the American soldier, "All you Americans are good at is bombing" as if Vienna were in no way at fault.
The "adoption" by the U.S. of Nazi war criminals who are able to reveal to us Russian secrets, and how the Nazis are brought to the U.S. shows the collapse of the ideals the war was supposed to be about. As one of the officers points out to Freddy, "The Russians probably are doing the same thing." The analogy to Kurt Waldheim is not overlooked.
There's the family that says they "bought" the pharmacy that Freddy's parents used to own; the children running after the American soldiers for chocolates, and the women playing up to them, too, for the same reason. There are the black marketeers. Freddy realizes that he belongs neither in the U.S. nor in Austria.
Rather than dwelling on the war, the director explores the post-war issues. No one, including the American officers, stays clean as they compromise their ideals as each new situation arises.
I noted that a banner strung across a street, written in German, was not subtitled: "Welcome the Red Army, Liberators of Vienna." Just one more compromise and adjustment to new life by the Viennese. Not to be missed.
In German with English subtitles.
Directed by Axel Corti.
4 bytes
4 bytes = Superb 3 bytes = Too good to miss 2 bytes = Average 1 byte = Save your money
Ben Hoffman
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


The Hitchhiker's Guide to the Galaxy has a few things to say on the subject of resumés. A resumé, it says, is about the most massively useful thing an interstellar hitch hiker can have.


My Header

A car is a wheeled, self-powered motor vehicle used for transportation.

My Footer

Try It Yourself »
W3.CSS uses color classes.
The color classes are inspired by colors used in marketing, road signs, and sticky notes.
w3-red
w3-pink
w3-purple
w3-deep-purple
w3-indigo
w3-blue
w3-light-blue
w3-cyan
w3-aqua
w3-teal
w3-green
w3-light-green
w3-lime
w3-sand
w3-khaki
w3-yellow
w3-amber
w3-orange
w3-deep-orange
w3-blue-grey
w3-brown
w3-light-grey
w3-grey
w3-dark-grey
w3-black
w3-pale-red
w3-pale-yellow
w3-pale-green
w3-pale-blue


brian-taveras2
Based on the Design Your Life course at Stanford, Design Your Life helps you figure out which
activities bring you enjoyment, energy, and engagement.
These clues are the first step you need
to take to design your ideal life.
Activity logs record daily your main activities, and a gauge to show how engaged and energized you were.
Reflection logs are done once a week to record your trends, insights and surprises as to what activities work and don't work for you.
his app helps you figure out which activities bring you enjoyment, energy, and engagement. These clues are the first step you need to take to design your ideal life. The journal includes an activity log and a reflection log. Activity logs record daily your main activities, and a gauge to show how engaged and energized you were. Reflection logs are done once a week to record your trends, insights and surprises as to what activities work and don't work for you. .
Never in all their history have we had so many tools to live our best lives.
We hope to organize the tools to help you live your best life.
Organize Your Life to live your Best Life Possible.
Use this App to take back control and fullfill your dreams.


This website relies on JavaScript-based technologies and services.
Please enable JavaScript and then reload the page.


Thank you for visiting Northern Moon Designs! Did you know that the art of jewelry-making is as old as the human race? Isn't it amazing to think that every time we adorn ourselves in this age-old tradition, we are connecting to this rich past?
My name is Rhonda and this is one of the many reasons I love this craft. Based out of Minneapolis, I specialize in making unique, handcrafted jewelry and accessories inspired by history, fashion, and the natural world. Seashells, glass, and semi-precious gemstones are my favorite materials to work with, and I go to great lengths to locate quality supplies from all over the world.
To see what's currently for sale, please visit my Etsy shop. I hope you find something you love there!


“Automated testing is the enabler... It is the thing that allows us to iterate on our code, bring more features, make risky refactorings, make aggresive performance optimizations, all while knowing that all the features we've built already still work.”
Igor Minar - "Software Engineering as an Engineering Discipline" at AngularMix
The primary benefits of testing your applications are:
Most common types of tests used in Angular applications are:
Unit Testing:
Unit testing is a software testing method by which individual units of source code... are tested to determine whether they are fit for use.
Functional Testing:
Functional testing is a way of checking software to ensure that it has all the required functionality that's specified within its functional requirements.
Source: https://www.techopedia.com/definition/19509/functional-testing
End-to-end Testing
End-to-end testing is a methodology used to test whether the flow of an application is performing as designed from start to finish. The purpose of carrying out end-to-end tests is to identify system dependencies and to ensure that the right information is passed between various system components and systems.
Source: https://www.techopedia.com/definition/7035/end-to-end-test
| Type | Technologies |
|---|---|
| Test Framework | |
| Test Runner | |
| End-to-end Test Framework |
| Type | Technologies |
|---|---|
| Test Framework | |
| Test Runner | |
| End-to-end Test Framework |
A behavior-driven development framework that is commonly used when testing JavaScript code.
describe('#onSelect', () => {
it('should set the selectedCharacter property', () => {
const character = new Character();
component.onSelect(character);
expect(component.selectedCharacter).toBe(character);
});
});
Some of the common matchers included with Jasmine are:
| Matcher | Definition |
|---|---|
| toEqual() | e.g. a == b |
| toBe() | e.g. a === b |
| toMatch() | matches based on a regular expression |
| toHaveBeenCalled() | function has been called |
| toHaveBeenCalledWith() | function has been called with certain arguments |
Karma is the most commonly used test runner with Angular applications
Running unit tests with the Angular CLI and Karma
Karma allows you to continuously run tests as you are saving changing to your code
Wallaby
Wallaby runs continuously as your are writing your code giving you quick feedback without having to save.
“...mock objects are simulated objects that mimic the behavior of real objects in controlled ways”
Same old Tour of Heroes but with a twist:
router.navigate()
Function:
gotoDetail(character: Character): void {
const link = ['/detail', character.id];
this.router.navigate(link);
}
Test:
it('should navigate to the details page for the given character', () => {
const spy = spyOn(router, 'navigate');
const character = new Character();
character.id = 1;
component.gotoDetail(character);
expect(router.navigate).toHaveBeenCalledWith(['/detail', character.id]);
});
fakeAsync() and tick()
Function:
save(): void {
this.characterService
.save(this.character)
.then(character => {
this.character = character;
this.goBack(character);
})
.catch(error => this.error = error);
}
Test:
it('should display an error if save fails', fakeAsync(() => {
spyOn(characterService, 'save')
.and.returnValue(new Promise((resolve, reject) => reject('Error!')));
component.save();
tick();
expect(component.error).toEqual('Error!');
}));
Event Emitting
Function:
goBack(savedCharacter: Character = null): void {
this.close.emit(savedCharacter);
/* ... */
}
Test:
it('should emit the saved character', () => {
const expected = new Character();
component.close
.subscribe(result => expect(result).toBe(expected));
component.goBack(expected);
});
Global objects like window and localStorage
Function:
goBack(savedCharacter: Character = null): void {
/* ... */
if (this.navigated) { window.history.back(); }
}
Test:
it('should go back if navigated is true', () => {
const spy = spyOn(window.history, 'back');
component.navigated = true;
component.goBack();
expect(spy).toHaveBeenCalled();
});
Http
Function:
getCharacters() {
return this.http
.get(this.charactersUrl)
.toPromise()
.then((response) => {
return response.json().data as Character[];
})
.catch(this._handleError);
}
Test:
it('should return characters', fakeAsync(() => {
const character1 = new Character();
const character2 = new Character();
let result: Character[];
service.getCharacters().then(characters => result = characters);
lastConnection.mockRespond(new Response(new ResponseOptions({
body: { data: [character1, character2] }
})));
tick();
expect(lastConnection.request.url).toMatch(/app\/characters$/);
expect(result.length).toEqual(2);
expect(result[0]).toEqual(character1);
expect(result[1]).toEqual(character2);
}));
HttpClient
Test:
it('should return characters', () => {
const character1 = new Character();
const character2 = new Character();
let result: Character[];
service.getCharacters().subscribe(characters => result = characters);
const req = httpMock.expectOne(`app/characters`);
expect(req.request.method).toEqual('GET');
req.flush([character1, character2]);
expect(result.length).toEqual(2);
expect(result[0]).toEqual(character1);
expect(result[1]).toEqual(character2);
});
The feature we are going to develop using TDD is:
Villains attacking heroes!!!


{% if site.author %} {{site.author}}'s Picture {{site.author}} {{site.author-bio}} {% endif %}
{{site.author-bio}}


vignettes/keypoint-SURF.Rmd
keypoint-SURF.Rmd
The R code underlying the functions in this vignette were borrowed with permission from Vinces Gaitan’s blog post: https://www.kaggle.com/vicensgaitan/image-registration-the-r-way/notebook
I have modified the code where necessary in order to make it more pipeline-friendly and function oriented.
imlinks <- system.file(package = "ShoeSampleData", "extdata/") %>%
list.files(pattern = "036285L", full.names = T) %>%
sort()
clean_shoe_img <- function(im) {
suppressMessages({
im_bbox <- im %>%
imsplit(axis = "c") %>%
(function(x) is.finite((x[[1]] + x[[2]]) / x[[3]])) %>%
as.cimg() %>%
(function(x) x == 1)
crop.bbox(im, im_bbox) %>%
grayscale() %>%
map_halfimg(fun = autocrop) %>%
crop.borders(nx = 5, ny = 5) %>%
autocrop() %>%
threshold() %>%
shrink(3) %>%
grow(3) %>%
autocrop() %>%
# img_rotate_refit() %>%
# magrittr::extract2("img") %>%
grayscale()
})
}
img_a <- load.image(imlinks[1]) %>% clean_shoe_img()
img_b <- load.image(imlinks[2]) %>% clean_shoe_img()
plot(imlist(img_a, img_b))
We need to pad image a so that it is the same size as image b:
dim(img_a)
# [1] 1179 3847 1 1
dim(img_b)
# [1] 1196 3860 1 1
pad_size <- dim(img_b) - dim(img_a)
img_a <- pad(img_a, nPix = pad_size[1], axes = "x", pos = 1, val = max(img_a)) %>%
pad(nPix = pad_size[2], axes = "y", pos = 1, val = max(img_a))
We can then overlay the two images to see how far apart they are:
Use the image_surf()
function in the image.dlib package to identify keypoints for alignment
if (!"image.dlib" %in% installed.packages()) {
devtools::install_github("bnosac/image/image.dlib")
}
library(image.dlib)
# image_surf requires a bmp file...
get_surf <- function(im, n = 500) {
tmpbmp <- tempfile(fileext = ".bmp")
save.image(im, tmpbmp)
image_surf(tmpbmp, max_points = 500)
}
sp_a <- get_surf(img_a)
sp_b <- get_surf(img_b)
centers_a <- data_frame(mx = sp_a$x, my = sp_a$y)
centers_b <- data_frame(mx = sp_b$x, my = sp_b$y)
kpf_a <- sp_a$surf
kpf_b <- sp_b$surf
With SURF, we can skip the image orientation and feature detection steps, as features are generated with an angle as part of the SURF algorithm.
Match points are calculated using the K nearest neighbors algorithm, combined with some thresholding by distance.
The homography can be used to warp one image onto the other:
map_fcn <- map_affine_gen(ransac_points$homography)
img_a_warp <- imwarp(img_a, map_fcn, direction = "backward", boundary = "neumann")
plot(img_a_warp)
We can then overlay the two images:
blank_channel <- as.cimg(img_b > 0 & img_a_warp > 0)
overlaid_images <- imappend(imlist(img_a_warp, blank_channel, img_b), axis = "c")
plot(overlaid_images)
Areas that are in the first image only are shown in red; areas in the second image only are shown in blue. Areas in both images are shown in black.


Some Recommended Films on Video 8 mini-reviews by Ken Johnson Copyright 1992 Ken Johnson
These are some films that I just recently checked out of my video store and really enjoyed. They are ones that I feel are probably commonly overlooked and I feel are definitely worth renting. The rating system is based on a zero to five scale.
PARIS, TEXAS 145 min., R, Drama, 1984 Director: Wim Wenders Cast: Harry Dean Stanton, Nastassja Kinski, Dean Stockwell, Aurore Clement, Hunter Carson, Bernard Wicki
Drifter Harry Dean Stanton gets reunited with his son Hunter Carson after a long time of wandering. His wife Nastassja Kinski had walked out on him years ago and Stanton feels guilty about it. He and Carson go out to try to find Kinski so Carson can be reunited with her.
Although this film is rather long, I found it to be attention grabbing. The film is rather sad in places and happy in others. The acting is very well done and the script is well written. I highly recommend this film to any fan of dramas.
Rated R for explicit language and adult situation. Rating: Five.
PRIVATE POPSICLE 100 min., not rated, Comedy, 1982, In Israli with English subtitles Director: Boaz Davidson Cast: Iftach Katzur, Zachi Noy, Jonathan Segal, Sonia Martin, Menache Warshawski, Bea Fiedler, Dietmar Siegert, Dvora Keidar, Joseph Shiloah
This film is part four of the European LEMON POPSICLE series. Katzur, Noy, and Segal all become part of the Israli army. They get put through a vigorous training course. The three try to get out of everything they were assigned. One of the boys sees Martin in the girls side of the camp. He dresses up as an officer to go over to see her
This film ended up being a lot like the American film STRIPES, except not quite as funny. The Lemon Popsicle team, Iftach Katzur, Zachi Noy, and Jonathan Segal, have done a great job with this film, and after seeing it, I now want to search out their first three works. The film is very funny, but only if you like slapstick comedy.
Not rated but contains adult situations, female nudity, explicit language, and adult humor. Rating: Four.
THE SPRING 102 min., R, Action, 1989 Director: John D. Patterson Cast: Dack Rambo, Shari Shattuck, Gedde Wantanabe, Steven Keats, Virginia Watson, Jessie Lawrence Ferguson, Robert V. Barron, Rick Olivio, Byron Webster
Rambo and Wantanabe are archeologists who get evidence that leads them to believe that Ponce De Leon's fountain of youth exists. They travel to Florida to try to find the fountain. Rambo meets artist Shattuck, who paints paintings of the fountain and may know its where abouts. They are followed by Keats, who wants to use the fountain for his own personal gain.
This film silently appeared on the video shelves of a video store in my area. Because of the cover, I had never bothered to check it out. One day I got curious what the film was like so I checked it out, and it is nothing like the cover implies. This film will probably only be liked by fans of B movies who will probably enjoy watching it. Others will probably find the story cheesy and the acting poor.
Rated R for violence, explicit language, adult situations, and female nudity. Rating: Four.
STAR 80 104 min., R, Drama/Biography, 1983 Director: Bob Fosse Cast: Mariel Hemingway, Eric Roberts, Cliff Robertson, Roger Rees, David Clennon, Carroll Baker, Keenen Ivory Wayans
The true story of Playboy centerfold Dorothy R. Stratten, played by Mariel Hemingway. She gets seen by Paul Snider, played by Eric Roberts, who convinces Stratten to pose nude for "Playboy." He and she get married and soon their relationship starts to go bad, so she tries to get out of it. Snider, in a mad rage, kills Hemingway. Dorothy R. Stratten's story is also told in the film DOROTHY STRATTEN: THE UNTOLD STORY, and the television film DEATH OF A CENTERFOLD: THE DOROTHY STRATTEN STORY.
The story line is often depressing, but the acting is great and the story is well-written. Hemingway does a great job as Dorothy and Roberts is perfect as the slimy Snider. I recommend this film only to people who are interested in Dorothy Stratten, or enjoy a good drama.
Rated R for female nudity, adult situations, explicit language, and graphic violence. Rating: Four.
STEWARDESS SCHOOL 93 min., R, Comedy, 1987 Director: Ken Blancato Cast: Brett Cullen, Mary Cadorette, Donald Most, Sandahl Bergman, Judy Landers, Wendie Jo Spencer, Julie Montgomery, Dennis Burkley, Corinne Bohrer, Sherman Hemsley, Vicki Frederick, Leslie Huntly, Brooke Bundy, Fran Ryan
A school for stewardesses lowers its standards and accepts anybody who will apply. The trainees that show up are anything but desirable, so one of the instructors tries to get the undesirable students to quit.
The basic story line is a complete rip-off of POLICE ACADEMY, but the film is fun to watch if you don't expect too much. I suggest this film for anyone who enjoyed the original POLICE ACADEMY film and other fans of slapstick type humor.
Rated R for explicit language, adult situations, female nudity, and adult humor. Rating: Four.
THE SUICIDE CLUB 90 min., R, Drama, 1988 Director: James Bruce Cast: Mariel Hemingway, Robert Joy, Madeline Potter, Michael O'Donoghue, Anne Lange, Sullivan Brown, Keith Berger, Tom Cayler, Lenny Henry, Anne Carlisle
Hemingway is feeling guilty over the suicide of her brother. She gets invited to a party where most of the guests play a card game with a twist, the winner loses. The one who wins, gets killed. Hemingway observes the first night, and against the suggestions of her boyfriend Joy, she goes back a second night to play the game.
This often depressing film is certainly not for everybody's tastes. I found this film good, but in a weird way. It is not one to just sit down to, you have to think while watching it. I recommend this film to people who like bizarre movies.
Rated R for explicit language and violence. Rating: Four.
TUFF TURF 112 min., R, Drama/Action, 1985 Director: Fritz Kiersch Cast: James Spader, Kim Richards, Paul Mones, Matt Clark, Claudette Nevins, Olivia Barash, Robert Downey, Jr., Ranchito Gomez, Michael Wyle, Kerry Brennon
Teen Spader moves to a new city. He sees beautiful Richards and wants her to be his girlfriend. She is already seeing punk Mones and he doesn't want to give her up. Mones and his gang start a war against Spader, and Spader fights to get Richards.
An above-average teen gang film which I feel will be liked by teenagers/college students, and open minded adults as well. The acting in the film is great and the story is rather interesting. Just don't expect a perfect film.
Rated R for explicit language, adult situations, brief female nudity, graphic violence. Rating: Five.
WILD ORCHID 111 min., not rated, Drama, 1990 Director: Zalman King Cast: Mickey Rourke, Jacqueline Bisset, Carre Otis, Assumpta Serna, Bruce Greenwood, Jens Peter Oleg Vidou
Naive American Otis joins a firm and gets sent to Rio De Janeiro to help Bisset with a real estate deal. Otis meets bizarre Rourke, who is interested in Otis.  Rourke doesn't make moves on Otis and she is confused over it. Also available in a less explicit R rated version that runs for 103 minutes. Followed by WILD ORCHID 2: TWO SHADES OF BLUE, which just came to video.
I feel this is Zalman King's, director of TWO MOON JUNCTION, best film yet. The film is just an interesting film to sit down and watch. As far as I can tell there is no great significance to the film. I recommend this film to people who like provocative dramas.
Not rated but contains explicit language, adult situations, female nudity, and strong sexual content. Rating: Four.
Ken J<EMAIL_ADDRESS>.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


{% extends "global/Base.html" %} {% load staticfiles otree_tags %} {% block title %} Results {% endblock %} {% block content %}
| Round | {{ subsession.round_number }} |
| Catches | {{ player.catches }} |
| Clicks | {{ player.clicks }} |
| Score | {{ player.score }} |
| Expense | {{ player.expense }} |
| Earnings in this round | {{ player.payoff }} |


All sites listed below were built as part of the SNworks team, using the Bootstrap responsive framework, HTML5, CSS3, TWIG, LESS, and running on an in-house CMS called Gryphon. Our sites are built with users in mind to be viewed on any device. Git, Github and Bitbucket are used for version control during development, and JIRA and Basecamp were used for project coordination. My responsibilities range from acting as a Senior Developer on a new site build or redesign, answering ticket request, and reviewing and deploying other teammates code and assets to all our live sites. The sites below are just a few examples of sites I've contributed a large amount of work to.
Hi there! My name is Kevin Horgan, Front-End Web Developer and proud MSU Spartan
I'm moving on from my education as a Media and Information BS major graduate in Spring of 2015, and am ready to get into the work world!
I have special interest in Front-End, writing clean semantic HTML and CSS code. I also have experience with other web and programming languages, but am looking for opportunities to learn those and any other new technologies I can be exposed to. I have a passion for learning teamwork and collaboration, all in the pursuit of the latest trends in web design and development!
Let's get in touch!
I am available and looking for full time employment in the web development world!
Email<EMAIL_ADDRESS>Address: 214 Bailey St East Lansing, MI 48823
Phone:<PHONE_NUMBER>


The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:
| GroupId | ArtifactId | Version | Type | License |
|---|---|---|---|---|
| org.orbisgis | h2spatial-ext | 1.2.0 | jar | GNU General Public License (GPLV3+) |
| org.slf4j | slf4j-api | 1.7.12 | jar | MIT License |
| org.slf4j | slf4j-log4j12 | 1.7.12 | jar | MIT License |
The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:
| GroupId | ArtifactId | Version | Type | License |
|---|---|---|---|---|
| junit | junit | 4.12 | jar | Eclipse Public License 1.0 |
The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.
The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:
The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:
| GroupId | ArtifactId | Version | Type | License |
|---|---|---|---|---|
| org.hamcrest | hamcrest-core | 1.3 | jar | New BSD License |
MPL 2.0, and EPL 1.0: H2 Database Engine
GNU Lesser General Public License, Version 2.1: Jackson-core
The Apache License, Version 2.0: h2spatial
Eclipse Public License 1.0: JUnit
GNU Lesser General Public License Version 2.1, February 1999: JGraphT - Core
Eclipse Public License (EPL) 1.0: JGraphT - Core
Lesser General Public License (LGPL): JTS Topology Suite
MIT License: SLF4J API Module, SLF4J LOG4J-12 Binding
GPL V3: h2spatial, h2spatial-api
GNU General Public License (GPLV3+): cts, h2drivers, h2network, h2spatial-ext, jdelaunay, org.orbisgis:java-network-analyzer, spatial-utilities
New BSD License: Hamcrest Core
The Apache Software License, Version 2.0: Apache Commons Compress, Apache Log4j, Jackson-core


Filter
No race
Protoss
Terran
Zerg
Offline
Columns
Race
Viewers
Peak
Time Online
Last Seen
Other
Refresh page
Link to full screen streams
Refresh
Settings
Streamer
Race
Viewers
Peak
Time Online
Last Seen


The Aurelia Team continues to iterate and improve all aspects of the framework. Below you can find details on our recent minor release of aurelia-validation along with our patch releases of the aurelia-cli and aurelia-polyfills.
Minor Releases
Minor updates include new features, updates to bugs and performance improvements.
aurelia-validation 1.1.0
Bug Fixes
- getPropertyInfo: use scope traversal ( 6789112 ), closes #408
- ValidationControllerFactory: supply required arg ( 377e6c9 )
- ValidationRules: merge rules for same property ( 33f741a ), closes #400
- ValidationRules: satisfies callback arg required ( 258615e ), closes #426
Features
- build: add ES2017 target ( b266af5 )
- ValidationController: accept property accessor expression in addError ( 842fb4c ), closes #422
- ValidationController: add revalidateErrors method ( 47026ec ), closes #349
- ValidationController: events ( 57232ce ), closes #318
- ValidationRules: untaggedRules ( 549a4a9 ), closes #436
Patch Releases
Patch updates include only fixes to bugs and performance improvements.
aurelia-cli 0.30.1
Bug Fixes
- bundle: continue build in case of incorrect sourcemap ( 4988dd6 )
- html-minify: resolve parse error of interpolations ( b15199f )
- systemjs-loader: systemjs config for karma test runner ( adac051 ), closes aurelia/cli#648
aurelia-polyfills 1.2.2
Bug Fixes
- symbols: propertyIsEnumerable null reference ( b7c59e5 )
- IE 11 access denied fix


#include <XKMSStatus.hpp>
The <Status> Element is used in a KeyBinding message to a client to provide status information for keys that are returned in a ValidateResult message
The schema definition for KeyBinding is as follows :
<!-- Status --> <element name="Status" type="xkms:StatusType"/> <complexType name="StatusType"> <sequence> <element ref="xkms:ValidReason" minOccurs="0" maxOccurs="unbounded"/> <element ref="xkms:IndeterminateReason" minOccurs="0" maxOccurs="unbounded"/> <element ref="xkms:InvalidReason" minOccurs="0" maxOccurs="unbounded"/> </sequence> <attribute name="StatusValue" type="xkms:KeyBindingStatus" use="required"/> </complexType> <simpleType name="KeyBindingStatus"> <restriction base="QName"> <enumeration value="xkms:Valid"/> <enumeration value="xkms:Invalid"/> <enumeration value="xkms:Indeterminate"/> </restriction> </simpleType> <!-- /Status -->
Constructors and Destructors | |
| virtual | ~XKMSStatus () |
| XKMSStatus () | |
Public Types | |
| enum | StatusValue { StatusUndefined = 0, Valid = 1, Invalid = 2, Indeterminate = 3 } |
| enum | StatusReason { ReasonUndefined = 0, IssuerTrust = 1, RevocationStatus = 2, ValidityInterval = 3, Signature = 4 } |
Public Member Functions | |
Getter methods | |
| virtual StatusValue | getStatusValue (void) const =0 |
| Get the KeyBinding status assertion. | |
| virtual bool | getStatusReason (StatusValue status, StatusReason reason) const =0 |
| Find the Reason for a particular facet of status codes. | |
Setter Methods | |
| virtual void | setStatusReason (StatusValue status, StatusReason reason, bool value)=0 |
| Activate or de-activate a particular reason in the status result. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Find the Reason for a particular facet of status codes. For each status reason, a Status can define a number of reasons to return to a client. There are some controls on this (e.g. you cannot have an InvalidReason if the actual KeyBindingStatus is Valid), but you can have things in ValidReason and IndeterminateReason for an Invalid result. This call allows you to find out about any facet of a reason
|
|
|
Get the KeyBinding status assertion. The Status element has a StatusValue attribute that defines the validity of the key in question
|
|
|
Activate or de-activate a particular reason in the status result. For each status reason, a Status can define a number of reasons to return to a client. There are some controls on this (e.g. you cannot have an InvalidReason if the actual KeyBindingStatus is Valid), but you can have things in ValidReason and IndeterminateReason for an Invalid result. This call allows you to set any facet of a reason
|


getCoalescedEvents()
getPredictedEvents()
Adapted from Smoother Interactions on the Web: getCoalescedEvents(). Only tracks a single isPrimary pointer.
isPrimary


{% extends 'base.html' %} {% load url from future %} {% load i18n %} {% load faqtags %} {% block title %}{{block.super}} - {% trans "Questions and answers about TB"%}{% endblock %} {% block content %}
Please send us questions via the contact page of the site.
We might add your question and our answer to the site. We always treat personal patient information confidentially.
{% endblocktrans %} {% get_question_categories "1,2,4" as questioncategories %}{% trans "There are no questions in this category yet." %}
{% endfor %}{% trans "There are no questions in this category yet." %}
{% endfor %} {% endfor %}


--- layout: post title: Lost in VR date: '2019-01-13 12:31:26 +0100' categories: - Illustration ---
An illustration I did for a friend.


DVIPDF(1) Ghostscript DVIPDF(1) NAME dvipdf - Convert TeX DVI file to PDF using ghostscript and dvips SYNOPSIS dvipdf [ options ] input.dvi [ output.pdf ] ... DESCRIPTION This script invokes dvips(1) with the -q option, and pipes its output into gs(1) with the following options: -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite as well as -sOutputFile and any options from the command-line. SEE ALSO gs(1), dvips(1) VERSION This document was last revised for Ghostscript version 9.05. AUTHOR Artifex Software, Inc. are the primary maintainers of Ghostscript. This manpage by George Ferguson. 9.05 8 February 2012 DVIPDF(1)


1. Attractiveness of the Document Summary
In this task you are given a question and a document summary.
You will be asked to judge if examining the full document
(from which the summary was extracted) is useful for answering the question.
Task (Attractiveness):
Do you think examining the full document will be useful to answer the question?
HINT: Do not try to follow any links while answering this question, but think if following the link would be worthy.
Possible Answers (Attractiveness):
- Likely, yes should be chosen when the summary makes you believe the document is worth examining.
- Likely, no should be chosen when the summary makes you believe the document is not interesting.
- Question/summary is not in English should be chosen only if you are sure that the question and/or summary is in language that you don't understand. Keep in mind that it may be just a technical term in English, so do not select this answer unless you are absolutely sure.
2. Full Document Relevance
Once you are done with the Attractiveness task, you may proceed to the next one.
In this task, you will be given a question and a web document to judge.
You will be asked to judge if the document contains an answer to the question or not.
Your rating should be made based on our rules only; this task is not asking for opinion.
Task (Relevance)
Does the document contain an answer to the question?
HINT: If you are familiar with document relevance tasks, this is one is very similar.
Possible Answers (Relevance):
- Perfect match is for documents that match the question perfectly. E.g., the Wikipedia page for the question [genome] or the Facebook homepage for the question [facebook].
- Relevant document with possible differences when the document matches the question in general but there is ambiguity that does not allow to choose "Perfect match" with certainty. Also choose this variant if there are multiple interpretation of the question and the document matches to only one of them (for example, the question [jaguar speed] may refer to the car or the animal).
- Marginally relevant: obvious differences should be chosen when there is a logical connection between the question and the document, but there is also an obvious mismatch. For example, the question [GDP of Switzerland] is related to the page talking about languages of Switzerland, but those are different things.
- Irrelevant / Offtopic is for cases when the question and the document are talking about different things, even though there might be some common words. E.g., a recipe of Peking duck is irrelevant for the question [peking university].
- Cannot open the document should only be chosen if you cannot open the document or get an error.
- The document is not in English should be chosen only if you are sure that the document is in language you don't understand. Keep in mind that it may be a technical term in English, so do not select this answer unless you are absolutely sure.


Running Puppet Server in Docker Part 2: r10k
24 Jun 2015Last time we got our Puppet Server up and running - now we need to put some Puppet modules on it so we can use it.
To do that, we’re going to use r10k. It’s a tool that uses a control git repository that contains something called a puppetfile- a file that lists all of the puppet modules you want to use, either from the puppet forge or from git repositories. You may want to keep this module private by using a paid account on GitHub if your configuration contains secrets, but it doesn’t have to be - mine doesn’t have anything particularly sensitive in, so here it is: grahamgilbert/personal-puppet.
The Control module
Puppet recommends the use of environments - a way of separating your clients into groups - usually this is test and production groups. r10k uses git branches to determine which environments you have, so we’re going to set up our repository. The default branch is called master
, but we want ours to be called production
- Github has some excellent documentation on the subject. I recommend accepting GitHub’s suggestion of putting a README in your repository so you can clone it right away.
The Puppetfile
Now we’ve got our control repo set up, we can clone it so we can work on it.
If you’re familiar with Puppet, this will be familiar - an environment is what you would have once put at /etc/puppet
- the only change is that you can override options on a per-environment basis by using environment.conf
. In my control repo, I have a default manifest at the top of the environment rather than in manifests
for example. (more information)
At its simplest, a Puppetfile is just a list of modules we want to use. As we’re just starting off, we can use pre-built ones from GitHub and the forge. We’re going to get Munki installed on a client, so we’ll use my MacAdmin module. One thing to note is that r10k won’t resolve dependencies for you, so be sure to specify any modules the module you need. A simple Puppetfile is below:
Configuring r10k
The next piece of the puzzle is to set up r10k to download our repository. I’m running r10k directly on my Docker host, but this could easily be (and probably should be) put into a Docker container. First off, let’s get r10k installed:
r10k get’s in configuration from /etc/r1ok.yaml
, so let’s create that:
Puppet Conf
The final piece of configuration for today will be to set our Puppet Server to use environments. Add the following to /usr/local/docker/puppetserver/puppet/puppet.conf
:
Gimmie some modules
We’re ready to get some modules installed on the Puppet Server:
You’ll see all of the modules you specified in your Puppetfile download theselves to the right place. But of course, we’re not quite ready to use this for applying configuration to our Macs yet - we have modules, but we’ve not applied the config to specific machines. In the next post we’ll cover how we use Hiera to do this.


module Statistics
Overview
Basic descriptive statistics functionality.
More flexible than a scientific-calculator, but not as exhaustive, yet.
Extended Modules
Defined in:
lib/distributions.crstatistics.cr
Constant Summary
-
VERSION =
"1.0.0"
Instance Method Summary
-
#bin_count(values : Enumerable, bins : Int32, min = nil, max = nil, edge : Edge = :left) : Bins
Counts the number of values in each bin of size
(max - min) / bins
. -
#describe(values)
Computes several descriptive statistics of the passed array.
-
#frequency(values : Enumerable(T)) forall T
Computes the number of occurrences of each value in the dataset.
-
#kurtosis(values, corrected = false, excess = false)
Computes the kurtosis of a dataset.
-
#mean(values)
Computes the mean of a dataset.
-
#median(values, sorted = false)
Computes the median of all elements in a dataset.
-
#middle(a, b)
Computes the middle of two values
a
andb
. -
#middle(values)
Computes the middle of an array
a
, which consists of finding its extrema and then computing their mean. -
#mode(values : Enumerable)
Computes the modal (most common) value in a dataset.
-
#moment(values, mean = nil, n = 1)
Calculates the n-th moment about the mean for a sample.
-
#quantile(values, p, sorted = false)
Computes the quantile of a dataset at a specified probability
p
on the interval [0,1]. -
#skew(values, corrected = false)
Computes the skewness of a dataset.
-
#std(values, mean = nil, corrected = false)
Computes the standard deviation of a dataset.
-
#var(values, mean = nil, corrected = false)
Computes the variance of a dataset.
Instance Method Detail
Counts the number of values in each bin of size (max - min) / bins
.
Returns a Bins
object where edges
and counts
are ordered by edge.
NOTE Any empty bin will also be included.
Parameters
- values: a one-dimensional dataset.
- bins: the number of equally-sized bins to divide the datapoints into.
- min: the left end of the first bin's edge. If none is provided, then
values.min
is used. - max: the right end of the last bin's edge. If none is provided, then
values.max
is used. - edge: determines whether the left edge of the bin, its mid-point or right edge should be returned.
Choices are
:left
,:centre
and:right
. Default is:left
.
Computes several descriptive statistics of the passed array.
Parameters
- values: a one-dimensional dataset.
Computes the number of occurrences of each value in the dataset.
Returns a Hash with each the dataset values as keys and the number of times they appear as value.
Parameters
- values: a one-dimensional dataset.
Computes the kurtosis of a dataset.
Parameters
- values: a one-dimensional dataset.
- corrected: when set to
true
, then the calculations are corrected for statistical bias. Default isfalse
. - excess: when set to
true
, computes the excess kurtosis. Default isfalse
.
This implementation is based on the scipy/stats.py.
Computes the median of all elements in a dataset.
For an even number of elements the mean of the two median elements will be computed.
Parameters
- values: a one-dimensional dataset.
- sorted: when
true
, the computations assume that the provided values are sorted. Default isfalse
.
See Julia's Statistics.median.
Computes the middle of an array a
, which consists of finding its
extrema and then computing their mean.
Parameters
- values: a one-dimensional dataset.
See Julia's Statistics.middle.
Computes the modal (most common) value in a dataset.
Returns a pair with the modal value and the bin-count for the modal bin. If there is more than one such value, no guarantees are made which one will be picked.
NOTE Computing the mode requires traversing the entire dataset.
Parameters
- values: a one-dimensional dataset.
Calculates the n-th moment about the mean for a sample.
Parameters
- values: a one-dimensional dataset.
- mean: a pre-computed mean. If a mean is not provided, then the sample's
mean will be computed. Default is
nil
. - n: order of central moment that is returned. Default is
1
.
Computes the quantile of a dataset at a specified probability p
on the interval [0,1].
Quantiles are computed via linear interpolation between the points ((k-1)/(n-1), v[k])
,
for k = 1:n
where n = values.size
.
Parameters
- values: a one-dimensional dataset.
- p: probability. Values of
p
should be in the interval[0, 1]
. - sorted indicates whether values can be assumed to be sorted.
Implementation based on Julia's Statistics.quantile.
Computes the skewness of a dataset.
Parameters
- values: a one-dimensional dataset.
- corrected: when set to
true
, then the calculations are corrected for statistical bias. Default isfalse
.
This implementation is based on the scipy/stats.py.
Computes the standard deviation of a dataset.
Parameters
- values: a one-dimensional dataset.
- mean: a pre-computed mean. This could be a pre-computed sample's mean
or the population's known mean. If a mean is not provided, then the sample's
mean will be computed. Default is
nil
. - corrected: when set to
true
, then the sum of squares is scaled withvalues.size - 1
, rather than withvalues.size
. Default isfalse
.
Computes the variance of a dataset.
Parameters
- values: a one-dimensional dataset.
- mean: a pre-computed mean. This could be a pre-computed sample's mean
or the population's known mean. If a mean is not provided, then the sample's
mean will be computed. Default is
nil
. - corrected: when set to
true
, then the sum of squares is scaled withvalues.size - 1
, rather than withvalues.size
. Default isfalse
.


the and {background margin {border-style px;} #ffffff;} with for may BAK COVID- are viral conjunctivitis drops eye have patients px; {font-family also font-size The double; treatment use COVID--related border-color border-width containing coronavirus disease effective from has need ocular reduce solid; through transmission virus {font-style {font-weight action antiviral been bold cases chloride commonly courier; em; measures pt;} saline these this used various which


A 20-year-old college student explains how he made a business of faking trade volumes at crypto exchanges.
Caglio10-Aug-19 03:38 PM
Sound on
jl777c10-Aug-19 03:39 PM
you say that article, right?
this is just the third tier variant
Markus10-Aug-19 03:39 PM
saw that one
jl777c10-Aug-19 03:39 PM
many exchanges have built in deals with market makers
Caglio10-Aug-19 03:39 PM
happy vitalik
jl777c10-Aug-19 03:40 PM
but some wallstreet types have setup shop in crypto to make giant killings by manipulating prices, to get the TA patterns as all the TA believers like to see, then when there is enough liquidity to sell their upfronted stake...
you know the rest. BTT seems a good example
Markus10-Aug-19 03:41 PM
Whales definitely made a killing on BTT
jl777c10-Aug-19 03:41 PM
the market maker made the most, other than the insiders
Markus10-Aug-19 03:42 PM
Not sure how sats value of BTT will ever rise, considering they have regular airdrops like every month or so?
jl777c10-Aug-19 03:42 PM
so this is what is really going on with some (not all) coins
keep this in mind as you assess how KMD is doing
with all altcoins sharing 30% of crypto marketcap, all prices are compressed
Markus10-Aug-19 03:44 PM
Well im not worried at all when it comes to KMD, sure its a rough time to see this prices but if u check overall market then were atleast not performing the worst i would say somewhere in the middle
jl777c10-Aug-19 03:45 PM
a few BTC can push KMD price in either direction, it is more volatile than most the other top coins
Buddz199310-Aug-19 03:46 PM
Imagine when Kmd becomes a multi million dollar asset to hold , if you can imagine that you can also thank me later
meatspoon10-Aug-19 03:46 PM
what do i get to do to you if it keeps going down?
Markus10-Aug-19 03:46 PM
Ofc it can go down but why think short term
think a few years ahead
Buddz199310-Aug-19 03:46 PM
Well as JL said blame the marketmakers(edited)
Andersen10-Aug-19 03:47 PM
Excellent explanation of the current market situation. Thanks to JL777. It's all better to read @coingirl87
Buddz199310-Aug-19 03:47 PM
but now in all seriousness
Flint10-Aug-19 03:47 PM
and if bitcoin continues its volatile growth up to $ 20,000 right up to halving, then we will also fall all this time
Buddz199310-Aug-19 03:47 PM
we can go down even further but you have to think long term exactly,
jl777c10-Aug-19 03:47 PM
it is up to BTC now
DCA will protect to a large degree from this type of volatility
Buddz199310-Aug-19 03:48 PM
when btc was at his peak the btc dominance was like what
Global cryptocurrency charts: total market cap, top coins, Bitcoin dominance etc.
mrtzmp310-Aug-19 04:26 PM
@jl777c so how to beat the marketmakers while trading , find manipulated coin and counter trade the obvious chart patterns ???(edited)
And who says kmd doesn't have market makers , maybe not employed by you guys but private ones it's possible
Looking at whalebro
jl777c10-Aug-19 04:28 PM
the ones i talk about need significant percentage of coinsupply, a private one wouldnt have anywhere near the coins needed
these coins will follow the standard TA pattern, until there is enough fomo to liquidate the holdings at nice profits
there is no way to know when they will stop the TA matching
they have 20 years of trained neural nets and supercomputers that know how to squeeze as much out of the normal traders as possible
Markus10-Aug-19 04:30 PM
how do u know all of this JL?
mrtzmp310-Aug-19 04:30 PM
Thx nice info
jl777c10-Aug-19 04:31 PM
this is why vast majority of traders lose money and hodl being a decent strategy, though i think a DCA to acquire coins and DCA to divest is a better way than hodl till it doubles and selling half
@Markus i happen to know a lot of things
1
Markus10-Aug-19 04:32 PM
So what is your take on the current market situation?
jl777c10-Aug-19 04:33 PM
90%+ depends on BTC dominance
the rest doesnt really matter until it stops going up like an escalator
Markus10-Aug-19 04:34 PM
Are they doing this on purpose to then buy up the cheap alts or what is the reason behind all of this
Use OpenMarketCap to get crypto prices and volumes from trusted exchanges
Markus10-Aug-19 04:35 PM
this sites btc dominance is same as tradingview
jl777c10-Aug-19 04:36 PM
these sort of marketmakers take little to no risk, but if they do their job (manipulating the TA up and up to get the volumes), they can make a killing
what other reason do they need?
they also need cheap inventory as the cheaper their inventory, the more profits they make, so of course they push the prices down when they can
the way the crypto prices move is just not logical at all
why are there fiat pegs for many coins that dont have any large fiat gateways?
Markus10-Aug-19 04:37 PM
Who are the ppl behind marketmaking?
jl777c10-Aug-19 04:37 PM
it is an artificial justification for pushing the price lower. probably this BTC dominance surge made them change their gameplan to a create despair and buy at ATL
there are some from former wall street tradings, many started with crypto, a lot based in china
but not all in china, this "take advantage of the normal traders" is a global pastime
Markus10-Aug-19 04:38 PM
The btc drop from 6k to 3k was this also made by those ppl?
Neko10-Aug-19 04:43 PM
and normal traders are panicking and selling at ATL, I see some of them of this channel, they are also loud
Caglio10-Aug-19 04:43 PM
@Markus that was me
polycryptoblog10-Aug-19 04:44 PM
Is
Caglio10-Aug-19 04:44 PM
not this time @polycryptoblog
i dont pump btc, I short him
mrtzmp310-Aug-19 04:45 PM
@Neko talking about @Caglio
1
Caglio10-Aug-19 04:45 PM
this time it could be Jihan Wu, Roger Ver or ghost of Freddie Mercury


100
999
0
99
Church
Tavern
Blacksmith
Goblin Cave
The Dancing Tunnels
Temple of the Ancient Giant
Hi do you need room or you just want to drink beer?
Dungeon power level is 8.
Dungeon power level is 18.
Dungeon power level is 35.


Patterson Cookies
You will go coocoo for our cookies
I'm the Consumer Page
Main Page
Pistachio White Chocolate Chip Cookies
Handmaiden Cookie Dough
Oreo Smores Cookies
Oreo Delights Cookies /figcaption>
Oat Meal Cookies
This could be you
Order your pattersonTShirt today
Select a product
-- Select a product --
Oreo Smores
Oreo Delights
Pistachio White Chocolate Chip
Oat Meal Cookies
Handmaiden Cookie Dough
Patterson Logo T-Shirt
Color scheme
-- Select a color scheme --
Blue
Pink
Yellow
Size
-- Select a size --
2 x 4 - $3.95 USD
3 x 5 - $4.95 USD
4 x 6 - $5.95 USD
Pat Patterson
.
Visit us at: PattersonCookies.com
7600 Wisconsin Ave
Bethesda, MD 20910
Search location:
Radius:
50 kms
30 kms
20 kms
10 kms


{% extends 'reports/base.html' %} {% block title %}{{_(report.data.project_region|e)}} ·{{ _('Public Health Profile') }} · {{ _('Week') }} {{ report.data.epi_week_num }}{% endblock title %} {% block body %}
Information reported in this public health profile represents cases reported from %(clinic_num)s reporting sites in %(project_region)s between %(start_date)s and %(end_date)s. This report is up to date as of %(generation_time)s on %(generation_date)s.
', clinic_num=report.data.clinic_num, project_region=_(report.data.project_region), start_date=report.data.start_date|datetime_from_json|datetime('dd MMMM YYYY'), end_date=report.data.end_date|datetime_from_json|datetime('dd MMMM YYYY'), generation_time=report.meta.generation_timestamp|datetime_from_json|datetime('HH:mm'), generation_date=report.meta.generation_timestamp|datetime_from_json|datetime('dd MMMM YYYY')) }}| % | # | |||
|---|---|---|---|---|
| {{ loop.index }} | {{ _(indicator.title)|e }} | {{ indicator.percent|float|round(1) }}% | {% if indicator.quantity == "-" %}- | {% else %}{{ indicator.quantity|commas }} | {% endif %}
| % | # | ||
|---|---|---|---|
| {{ loop.index }} | {{ _(item.age|e) }} | {{ item.percent|float|round(1) }}% | {{ item.quantity|commas }} |
| {{_('Total')}} | 100.0% | {{report.data.gender_totals}} |
| % | # | ||
|---|---|---|---|
| {{ loop.index }} | {{ _(item.title|e) }} | {{ item.percent|float|round(1) }}% | {{ item.quantity|commas }} |
| {{_('Total')}} | 100.0% | {{report.data.gender_totals}} |
| {{ _('%% morbidity') }} | {{ _('# of cases') }} | ||
|---|---|---|---|
| {{ loop.index }} | {{ _(disease.title)|e }} | {{ disease.percent|float|round(1) }}% | {{ disease.quantity|commas }} |
| {{ _('%% morbidity') }} | {{ _('# of cases') }} | ||
|---|---|---|---|
| {{ loop.index }} | {{ _(disease.title)|e }} | {{ disease.percent|float|round(1) }}% | {{ disease.quantity|commas }} |
{{ _('A program of case-based, electronic reporting of priority diseases, conditions and events is ongoing with Ministry of Health in %(project_region)s, supported by WHO, UNICEF and Save the Children / NGO consortium.
The clinician uses the system within the consultation, which introduces clinical-decision support using an electronic integrated management of childhood illness (IMCI) algorithm as well as best practice prescribing guidance and real-time reporting of information. Information is made available within one hour via an online framework with automated generation of mapping and reporting.
The project is supporting long-term health management information system (HMIS) strengthening work with Ministry of Health in %(project_region)s.',
project_region=_(report.data.project_region|e)
)}}


Log In
using Google, Facebook, Twitter, etc.
Welcome, {{ session.name }}
Log Out
Galton/Angular : estimate with confidence


Sketch | Streya
Sketch | Wright
Sketch | Mindstorms
Sketch | Komura
Sketch | Watercolor
Sketch | Tree
Sketch | Ots People
Sketch | Madsen Rand
Sketch | Amish Quilt
Sketch | Kandinsky Circles
Sketch | Ibm Poster Circles
Sketch | Ibm Poster Entropy
Sketch | Ibm Poster Ribbons
Sketch | Nested Boxes
Sketch | Mohr
Sketch | Molnar
Sketch | Noll
Sketch | Nake
Sketch | Nees