Module: Sprockets::Paths
| Relationships & Source Files | |
| Extension / Inclusion / Inheritance Descendants | |
|
Extended In:
| |
|
Included In:
| |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Instance Chain:
|
|
| Defined in: | lib/sprockets/paths.rb |
Constant Summary
Instance Attribute Summary
-
#root
rw
Returns
Environment
root. -
#root=(path)
rw
private
Internal: Change Environment root.
Instance Method Summary
-
#append_path(path)
Append a
path
to the #paths list. -
#clear_paths
Clear all paths and start fresh.
-
#each_file
Public: Iterate over every file under all load paths.
-
#paths
Returns an
Array
of pathString
s. -
#prepend_path(path)
Prepend a
path
to the #paths list.
PathUtils
- Included
| #absolute_path? | On Windows, ALT_SEPARATOR is \ Delegate to Pathname since the logic gets complex. |
| #atomic_write | Public: Write to a file atomically. |
| #directory? | Public: Like |
| #entries | Public: A version of |
| #file? | Public: Like |
| #find_matching_path_for_extensions | Internal: Match paths in a directory against available extensions. |
| #find_upwards | Internal: Find target basename checking upwards from path. |
| #join | Public: Joins path to base path. |
| #match_path_extname | Internal: Match path extnames against available extensions. |
| #path_extnames | Internal: Get path’s extensions. |
| #path_parents | Internal: Returns all parents for path. |
| #paths_split | Internal: Detect root path and base for file in a set of paths. |
| #relative_path? | Public: Check if path is explicitly relative. |
| #relative_path_from | Public: Get relative path from |
| #set_pipeline | Public: Sets pipeline for path. |
| #split_subpath | Internal: Get relative path for root path and subpath. |
| #stat | Public: Like |
| #stat_directory | Public: Stat all the files under a directory. |
| #stat_sorted_tree | Public: Recursive stat all the files under a directory in alphabetical order. |
| #stat_tree | Public: Recursive stat all the files under a directory. |
Utils
- Included
| #concat_javascript_sources | Internal: Accumulate asset source to buffer and append a trailing semicolon if necessary. |
| #dfs | Internal: Post-order Depth-First search algorithm. |
| #dfs_paths | Internal: Post-order Depth-First search algorithm that gathers all paths along the way. |
| #duplicable? | Internal: Check if object can safely be .dup’d. |
| #hash_reassoc | Internal: Duplicate and store key/value on new frozen hash. |
| #hash_reassoc1 | Internal: Duplicate and store key/value on new frozen hash. |
| #module_include | Internal: Inject into target module for the duration of the block. |
| #string_end_with_semicolon? | Internal: Check if string has a trailing semicolon. |
Instance Attribute Details
#root (rw)
Returns Environment
root.
All relative paths are expanded with root as its base. To be useful set this to your applications root directory. (Rails.root
)
#root=(path) (rw, private)
Internal: Change Environment root.
Only the initializer should change the root.
# File 'lib/sprockets/paths.rb', line 20
def root=(path) self.config = hash_reassoc(config, :root) do File. (path) end end
Instance Method Details
#append_path(path)
Append a path
to the #paths list.
Paths
at the beginning of the Array
have a higher priority.
#clear_paths
Clear all paths and start fresh.
There is no mechanism for reordering paths, so its best to completely wipe the paths list and reappend them in the order you want.
#each_file
Public: Iterate over every file under all load paths.
Returns Enumerator if no block is given.
#paths
Returns an Array
of path String
s.
These paths will be used for asset logical path lookups.
# File 'lib/sprockets/paths.rb', line 30
def paths config[:paths] end
#prepend_path(path)
Prepend a path
to the #paths list.
Paths
at the end of the Array
have the least priority.


Design overview¶
The following image shows a high level overview of the current stack.
Software stack overview¶
Can HDL is only a small piece of the puzzle to get a fully working system and the linux Software stack was not developed by me. The goal of the project is/was to have more flexibility in the lower layers to be able to implement different type of attacks and triggering.
HDL code overview¶
can_phy.vhd¶
Unlike something like an UART on the CAN bus multiple devices can drive the lines. The same lines are also used for send and receive. The overall design is that the lines have a “dormant” state of 1 and anybody on the bus can drive the lines to the “0” level.
To be able to implement this it was not enough to driver 0 or 1 out of the lines but also an “enable” was required.
Not only that but the protocol prevents collisions of packets by giving packets with a lower id (That thus drive the lines low) priotiry. In terms of implementation it is therefore required to be able to detect when you are sending a 1 but the line becomes a 0 (you lost arbitration).
can_tx.vhd¶
There are different standards for can packect length. I focused on the ones that have 11 bit id’s. Can tx accepts an id a data lenght and data and is able to drive the can_phy to send out a full packet (including things like the above arbitration and performing the calculation of the crc).
can_rx.vhd¶
Pertty much the same as can_tx but for the reveiving end
can.vhd¶
Wrapper for all the components related to this projects.
can_crc.vhd¶
Used in can_rx and can_tx to calculate the CRC of the packets (one bit at the time)
can_tx_mux.vhd¶
I expected the can_tx to be doing the sending and can_rx the receiving but things are not that simple. Almost at the end of sending a can packet a 1 bit wide acknowledge slot is left “dormant”. It is up to the receivers (rx) to drive the lines at that time if the packets.. was for the desgigned receiver and the crc matched. Can mux allows both the TX and RX part to drive the tx lines.
can_clk.vhd¶
Can clk can use a little move love but the main purpose is to generate clock events for the can bus. a bit time is divided in 10 (quanta). At time 0 the bits can be set. At time 7 the bits are to be read.
Can clock also synchronizes with the clock edges on incomming bit.(A test testing this is called can_two_devices_clk_sync_tb.
can_wb.vhd¶
This interface provides a way to interact with the code using the wishbone interface. This is there registers are defined.


§832-2 Fugitives from justice; duty of governor. Subject to this chapter, the provisions of the Constitution of the United States controlling, and any and all Acts of Congress enacted in pursuance thereof, it is the duty of the governor of this State to have arrested and delivered up to the executive authority of any state of the United States any person charged in that state with treason, felony, or other crime, who has fled from justice and is found in this State. [L 1941, c 99, §2; RL 1945, §10632; RL 1955, §250-2; HRS §713-2; ren L 1972, c 9, pt of §1]
Case Notes
See 5 H. 573 (1886).


StephenS
Home
Blog
Gallery
Lake Waikaremoana, January 2021
Hahei Beach, January 2021
Walk to Cathedral Cove, January 2021
Cathedral Cove, January 2021
Around the Coromandel Beach, January 2021
Around the Coromandel Beach, January 2021
Castlepoint, January 2021
Cathedral Cove, January 2021
Mt Taranaki, January 2021
Cathedral Cove Walk, January 2021
Road to Dawson Falls, January 2021
Dawson Falls, January 2021
©2021 StephenS


|
Drake
|
FBstabMpc implements the Proximally Stabilized Semismooth Method for solving the following quadratic programming problem (1):
min. \sum_{i=0}^N 1/2 [x(i)]' * [Q(i) S(i)'] [x(i)] + [q(i)]'*[x(i)] [u(i)] [S(i) R(i) ] [u(i)] [r(i)] [u(i)] s.t. x(i+1) = A(i)*x(i) + B(i) u(i) + c(i), i = 0 ... N-1 x(0) = x0 E(i)*x(i) + L(i)*u(i) + d(i) <= 0, i = 0 ... N
Where [ Q(i),S(i)'] [ S(i),R(i) ]
is positive semidefinite for all i \in [0,N]. See also (29) in https://arxiv.org/pdf/1901.04046.pdf.
The problem is of size (N,nx,nu,nc) where:
This is a specialization of the general form (2),
min. 1/2 z'Hz + f'z s.t. Gz = h Az <= b
which has dimensions nz = (nx + nu) * (N + 1), nl = nx * (N + 1), and nv = nc * (N + 1).
Aside from convexity there are no assumptions made about the problem. This method can detect unboundedness/infeasibility and exploit arbitrary initial guesses.
#include <drake/solvers/fbstab/fbstab_mpc.h>
Classes | |
| struct | QPData |
| Structure to hold the problem data. More... | |
| struct | QPVariable |
| Structure to hold the initial guess and solution. More... | |
Public Member Functions | |
| FBstabMpc (int N, int nx, int nu, int nc) | |
| Allocates workspaces needed when solving (1). More... | |
| SolverOut | Solve (const QPData &qp, const QPVariable *x, bool use_initial_guess=true) |
| Solves an instance of (1). More... | |
| void | UpdateOption (const char *option, double value) |
| Allows for setting of solver options, see fbstab_algorithm.h for a list. More... | |
| void | UpdateOption (const char *option, int value) |
| void | UpdateOption (const char *option, bool value) |
| void | SetDisplayLevel (FBstabAlgoMpc::Display level) |
| Controls the verbosity of the algorithm, see fbstab_algorithm.h for details. More... | |
Does not allow copy, move, or assignment | |
| FBstabMpc (const FBstabMpc &)=delete | |
| FBstabMpc & | operator= (const FBstabMpc &)=delete |
| FBstabMpc (FBstabMpc &&)=delete | |
| FBstabMpc & | operator= (FBstabMpc &&)=delete |
Allocates workspaces needed when solving (1).
| [in] | N | Horizon length |
| [in] | nx | number of states |
| [in] | nu | number of control input |
| [in] | nc | number of constraints per timestep |
Throws a runtime_error if any inputs are nonpositive.
| void SetDisplayLevel | ( | FBstabAlgoMpc::Display | level | ) |
Controls the verbosity of the algorithm, see fbstab_algorithm.h for details.
| level | new display level |
| SolverOut Solve | ( | const QPData & | qp, |
| const QPVariable * | x, | ||
| bool | use_initial_guess = true |
||
| ) |
Solves an instance of (1).
| [in] | qp | problem data |
| [in,out] | x | initial guess, overwritten with the solution |
| [in] | use_initial_guess | if false the solver is initialized at the origin |
| void UpdateOption | ( | const char * | option, |
| double | value | ||
| ) |
Allows for setting of solver options, see fbstab_algorithm.h for a list.
| option | Option name |
| value | New value |
| void UpdateOption | ( | const char * | option, |
| int | value | ||
| ) |
| void UpdateOption | ( | const char * | option, |
| bool | value | ||
| ) |


{% extends "base.html" %} {% block content %} {% include "header.html" %}
Please login to add new Genres or Subgenres


Amanda Nicole Komp
Home
About Me
Education
Relevant Coursework
Resume
Achievements
Family
Travel
Goals
Contact Me
Home
Welcome to my Webpage!
1 / 3
2 / 3
3 / 3


Johnson's manifesto pledges dominate today's newspapers
Boris Johnson dominates today’s front pages, and Prince Andrew also gets a mention.
The Guardian says the battle lines over public spending for the election have been drawn after the Prime Minister “set out a Conservative plan to spend just £2.9bn more a year against the £83bn outlined by Jeremy Corbyn”.
Sorry, this content isn't available on your device.
The Daily Mirror‘s splash reports that “A woman who claims Prince Andrew groped her at pervert Jeffrey Epstein’s home is prepared to testify to the FBI.”
Sorry, this content isn't available on your device.
The i reports that Mr Johnson has set out a “health and safety manifesto”, while The Times says the prime minister has pledged “50,000 more nurses as he attacks Corbyn’s ‘retrograde socialism’”.
Sorry, this content isn't available on your device.
Sorry, this content isn't available on your device.
The Daily Express reports that Mr Johnson has vowed to recruit 50,000 more nurses if the Tories win next month’s General Election, but The Independent says Labour has called this “fake” news.
Sorry, this content isn't available on your device.
Sorry, this content isn't available on your device.
The Daily Mail says the General Election is a battle between “good sense” (Mr Johnson) and “nonsense” (Jeremy Corbyn), and the Financial Times says the PM’s post-Brexit pitch to voters is “low-risk”.
Sorry, this content isn't available on your device.
Sorry, this content isn't available on your device.
According to Metro, Mr Johnson wants the UK to become “Corbyn-neutral”.
Sorry, this content isn't available on your device.
The Daily Telegraph reports that Mr Johnson “rejects spending contest with Labour in ‘most critical election in modern memory’ and vows to lead Britain out of EU’.
Sorry, this content isn't available on your device.
And, according to the Daily Star, Jeremy Clarkson has “finally admitted that global warming is real after a jet boat trip on a lake which was more like a ‘puddle’”.
Sorry, this content isn't available on your device.


climlab.domain package¶
climlab.domain.axis module¶
-
class
climlab.domain.axis.
Axis
(axis_type='abstract', num_points=10, points=None, bounds=None)[source]¶ Bases:
object
Creates a new climlab Axis object.
An
Axis
is an object where information of a spacial dimension of a_Domain
are specified.These include the type of the axis, the number of points, location of points and bounds on the spatial dimension, magnitude of bounds differences delta as well as their unit.
The axes of a
_Domain
are stored in the dictionary axes, so they can be accessed throughdom.axes
ifdom
is an instance of_Domain
.Initialization parameters
An instance of
Axis
is initialized with the following arguments (for detailed information see Object attributes below):Parameters: Raises: ValueError
ifaxis_type
is not one of the valid types or their euqivalents (see below).Raises: ValueError
ifpoints
are given and not array-like.Raises: ValueError
ifbounds
are given and not array-like.Object attributes
Following object attributes are generated during initialization:
Variables: - axis_type (str) –
Information about the type of axis. Valid axis types are:
'lev'
'lat'
'lon'
'depth'
'abstract'
(default)
- num_points (int) – number of points on axis
- units (str) – Unit of the axis. During intialization the unit is
chosen from the
defaultUnits
dictionary (see below). - points (array) – array with all points of the axis (grid)
- bounds (array) – array with all bounds between points (staggered grid)
- delta (array) – array with spatial differences between bounds
Axis Types
A couple of differing axis type strings are rendered to valid axis types. Alternate forms are listed here:
'lev'
'p'
'press'
'pressure'
'P'
'Pressure'
'Press'
'lat'
'Latitude'
'latitude'
'lon'
'Longitude'
'longitude'
'depth'
'Depth'
'waterDepth'
'water_depth'
'slab'
The default units are:
defaultUnits = {'lev': 'mb', 'lat': 'degrees', 'lon': 'degrees', 'depth': 'meters', 'abstract': 'none'}
If bounds are not given during initialization, default end points are used:
defaultEndPoints = {'lev': (0., climlab.constants.ps), 'lat': (-90., 90.), 'lon': (0., 360.), 'depth': (0., 10.), 'abstract': (0, num_points)}
Example: Creation of a standalone Axis:
>>> import climlab >>> ax = climlab.domain.Axis(axis_type='Latitude', num_points=36) >>> print ax Axis of type lat with 36 points. >>> ax.points array([-87.5, -82.5, -77.5, -72.5, -67.5, -62.5, -57.5, -52.5, -47.5, -42.5, -37.5, -32.5, -27.5, -22.5, -17.5, -12.5, -7.5, -2.5, 2.5, 7.5, 12.5, 17.5, 22.5, 27.5, 32.5, 37.5, 42.5, 47.5, 52.5, 57.5, 62.5, 67.5, 72.5, 77.5, 82.5, 87.5]) >>> ax.bounds array([-90., -85., -80., -75., -70., -65., -60., -55., -50., -45., -40., -35., -30., -25., -20., -15., -10., -5., 0., 5., 10., 15., 20., 25., 30., 35., 40., 45., 50., 55., 60., 65., 70., 75., 80., 85., 90.]) >>> ax.delta array([ 5., 5., 5., 5., 5., 5., 5., 5., 5., 5., 5., 5., 5., 5., 5., 5., 5., 5., 5., 5., 5., 5., 5., 5., 5., 5., 5., 5., 5., 5., 5., 5., 5., 5., 5., 5.])
- axis_type (str) –
climlab.domain.domain module¶
-
class
climlab.domain.domain.
Atmosphere
(**kwargs)[source]¶ Bases:
climlab.domain.domain._Domain
Class for the implementation of an Atmosphere Domain.
Object attributes
Additional to the parent class
_Domain
the following object attribute is modified during initialization:Variables: domain_type (str) – is set to
'atm'
Example: Setting up an Atmosphere Domain:
>>> import climlab >>> atm_ax = climlab.domain.Axis(axis_type='pressure', num_points=10) >>> atm_domain = climlab.domain.Atmosphere(axes=atm_ax) >>> print atm_domain climlab Domain object with domain_type=atm and shape=(10,) >>> atm_domain.axes {'lev': <climlab.domain.axis.Axis object at 0x7fe5b8ef8e10>} >>> atm_domain.heat_capacity array([ 1024489.79591837, 1024489.79591837, 1024489.79591837, 1024489.79591837, 1024489.79591837, 1024489.79591837, 1024489.79591837, 1024489.79591837, 1024489.79591837, 1024489.79591837])
-
set_heat_capacity
()[source]¶ Sets the heat capacity of the Atmosphere Domain.
Calls the utils heat capacity function
atmosphere()
and gives the delta array of grid points of it’s level axisself.axes['lev'].delta
as input.Object attributes
During method execution following object attribute is modified:
Variables: heat_capacity (array) – the ocean domain’s heat capacity over the 'lev'
Axis.
-
-
class
climlab.domain.domain.
Ocean
(**kwargs)[source]¶ Bases:
climlab.domain.domain._Domain
Class for the implementation of an Ocean Domain.
Object attributes
Additional to the parent class
_Domain
the following object attribute is modified during initialization:Variables: domain_type (str) – is set to
'ocean'
Example: Setting up an Ocean Domain:
>>> import climlab >>> ocean_ax = climlab.domain.Axis(axis_type='depth', num_points=5) >>> ocean_domain = climlab.domain.Ocean(axes=ocean_ax) >>> print ocean_domain climlab Domain object with domain_type=ocean and shape=(5,) >>> ocean_domain.axes {'depth': <climlab.domain.axis.Axis object at 0x7fe5b8f102d0>} >>> ocean_domain.heat_capacity array([ 8362600., 8362600., 8362600., 8362600., 8362600.])
-
set_heat_capacity
()[source]¶ Sets the heat capacity of the Ocean Domain.
Calls the utils heat capacity function
ocean()
and gives the delta array of grid points of it’s depth axisself.axes['depth'].delta
as input.Object attributes
During method execution following object attribute is modified:
Variables: heat_capacity (array) – the ocean domain’s heat capacity over the 'depth'
Axis.
-
-
class
climlab.domain.domain.
SlabAtmosphere
(axes=<climlab.domain.axis.Axis object>, **kwargs)[source]¶ Bases:
climlab.domain.domain.Atmosphere
A class to create a SlabAtmosphere Domain by default.
Initializes the parent
Atmosphere
class with a simple axis for a Slab Atmopshere created bymake_slabatm_axis()
which has just 1 cell in height by default.Example: Creating a SlabAtmosphere Domain:
>>> import climlab >>> slab_atm_domain = climlab.domain.SlabAtmosphere() >>> print slab_atm_domain climlab Domain object with domain_type=atm and shape=(1,) >>> slab_atm_domain.axes {'lev': <climlab.domain.axis.Axis object at 0x7fe5c4281610>} >>> slab_atm_domain.heat_capacity array([ 10244897.95918367])
-
class
climlab.domain.domain.
SlabOcean
(axes=<climlab.domain.axis.Axis object>, **kwargs)[source]¶ Bases:
climlab.domain.domain.Ocean
A class to create a SlabOcean Domain by default.
Initializes the parent
Ocean
class with a simple axis for a Slab Ocean created bymake_slabocean_axis()
which has just 1 cell in depth by default.Example: Creating a SlabOcean Domain:
>>> import climlab >>> slab_ocean_domain = climlab.domain.SlabOcean() >>> print slab_ocean_domain climlab Domain object with domain_type=ocean and shape=(1,) >>> slab_ocean_domain.axes {'depth': <climlab.domain.axis.Axis object at 0x7fe5c42814d0>} >>> slab_ocean_domain.heat_capacity array([ 41813000.])
-
class
climlab.domain.domain.
_Domain
(axes=None, **kwargs)[source]¶ Bases:
object
Private parent class for Domains.
A Domain defines an area or spatial base for a climlab
Process
object. It consists of axes which areAxis
objects that define the dimensions of the Domain.In a Domain the heat capacity of grid points, bounds or cells/boxes is specified.
There are daughter classes
Atmosphere
andOcean
of the private_Domain
class implemented which themselves have daughter classesSlabAtmosphere
andSlabOcean
.Several methods are implemented that create Domains with special specifications. These are
Initialization parameters
An instance of
_Domain
is initialized with the following arguments:Parameters: axes (dict or Axis
) – Axis object or dictionary of Axis object where domain will be defined on.Object attributes
Following object attributes are generated during initialization:
Variables: - domain_type (str) – Set to
'undefined'
. - axes (dict) – A dictionary of the domains axes. Created by
_make_axes_dict()
called with input argumentaxes
- numdims (int) – Number of
Axis
objects inself.axes
dictionary. - ax_index (dict) –
A dictionary of domain axes and their corresponding index in an ordered list of the axes with:
'lev'
or'depth'
is last'lat'
is second last
- shape (tuple) – Number of points of all domain axes. Order in
tuple given by
self.ax_index
. - heat_capacity (array) – the domain’s heat capacity over axis specified
in function call of
set_heat_capacity()
-
_make_axes_dict
(axes)[source]¶ Makes an axes dictionary.
Note
In case the input is
None
, the dictionary{'empty': None}
is returned.Function-call argument
Parameters: axes (dict or single instance of Axis
object orNone
) – axes inputRaises: ValueError
if input is not an instance of Axis class or a dictionary of Axis objetcsReturns: dictionary of input axes Return type: dict
- domain_type (str) – Set to
-
climlab.domain.domain.
box_model_domain
(num_points=2, **kwargs)[source]¶ Creates a box model domain (a single abstract axis).
Parameters: num_points (int) – number of boxes [default: 2]
Returns: Domain with single axis of type
'abstract'
andself.domain_type = 'box'
Return type: Example: >>> from climlab import domain >>> box = domain.box_model_domain(num_points=2) >>> print box climlab Domain object with domain_type=box and shape=(2,)
-
climlab.domain.domain.
make_slabatm_axis
(num_points=1)[source]¶ Convenience method to create a simple axis for a slab atmosphere.
Function-call argument
Parameters: num_points (int) – number of points for the slabatmosphere Axis [default: 1]
Returns: an Axis with
axis_type='lev'
andnum_points=num_points
Return type: Example: >>> import climlab >>> slab_atm_axis = climlab.domain.make_slabatm_axis() >>> print slab_atm_axis Axis of type lev with 1 points. >>> slab_atm_axis.axis_type 'lev' >>> slab_atm_axis.bounds array([ 0., 1000.]) >>> slab_atm_axis.units 'mb'
-
climlab.domain.domain.
make_slabocean_axis
(num_points=1)[source]¶ Convenience method to create a simple axis for a slab ocean.
Function-call argument
Parameters: num_points (int) – number of points for the slabocean Axis [default: 1]
Returns: an Axis with
axis_type='depth'
andnum_points=num_points
Return type: Example: >>> import climlab >>> slab_ocean_axis = climlab.domain.make_slabocean_axis() >>> print slab_ocean_axis Axis of type depth with 1 points. >>> slab_ocean_axis.axis_type 'depth' >>> slab_ocean_axis.bounds array([ 0., 10.]) >>> slab_ocean_axis.units 'meters'
-
climlab.domain.domain.
single_column
(num_lev=30, water_depth=1.0, lev=None, **kwargs)[source]¶ Creates domains for a single column of atmosphere overlying a slab of water.
Can also pass a pressure array or pressure level axis object specified in
lev
.If argument
lev
is notNone
then function tries to build a level axis andnum_lev
is ignored.Function-call argument
Parameters: Raises: ValueError
if lev is given but neither Axis nor pressure array.Returns: a list of 2 Domain objects (slab ocean, atmosphere)
Return type: Example: >>> from climlab import domain >>> sfc, atm = domain.single_column(num_lev=2, water_depth=10.) >>> print sfc climlab Domain object with domain_type=ocean and shape=(1,) >>> print atm climlab Domain object with domain_type=atm and shape=(2,)
-
climlab.domain.domain.
zonal_mean_column
(num_lat=90, num_lev=30, water_depth=10.0, lat=None, lev=None, **kwargs)[source]¶ Creates two Domains with one water cell, a latitude axis and a level/height axis.
- SlabOcean: one water cell and a latitude axis above
(similar to
zonal_mean_surface()
) - Atmosphere: a latitude axis and a level/height axis (two dimensional)
Function-call argument
Parameters: - num_lat (int) – number of latitude points on the axis [default: 90]
- num_lev (int) – number of pressure levels (evenly spaced from surface to TOA) [default: 30]
- water_depth (float) – depth of the water cell (slab ocean) [default: 10.]
- lat (
Axis
or latitude array) – specification for latitude axis (optional) - lev (
Axis
or pressure array) – specification for height axis (optional)
Raises: ValueError
if lat is given but neither Axis nor latitude array.Raises: ValueError
if lev is given but neither Axis nor pressure array.Returns: a list of 2 Domain objects (slab ocean, atmosphere)
Return type: list
ofSlabOcean
,Atmosphere
Example: >>> from climlab import domain >>> sfc, atm = domain.zonal_mean_column(num_lat=36,num_lev=10) >>> print sfc climlab Domain object with domain_type=ocean and shape=(36, 1) >>> print atm climlab Domain object with domain_type=atm and shape=(36, 10)
- SlabOcean: one water cell and a latitude axis above
(similar to
-
climlab.domain.domain.
zonal_mean_surface
(num_lat=90, water_depth=10.0, lat=None, **kwargs)[source]¶ Creates a Domain with one water cell and a latitude axis above.
Domain has a single heat capacity according to the specified water depth.
Function-call argument
Parameters: Raises: ValueError
if lat is given but neither Axis nor latitude array.Returns: surface domain
Return type: Example: >>> from climlab import domain >>> sfc = domain.zonal_mean_surface(num_lat=36) >>> print sfc climlab Domain object with domain_type=ocean and shape=(36, 1)
climlab.domain.field module¶
-
class
climlab.domain.field.
Field
[source]¶ Bases:
numpy.ndarray
Custom class for climlab gridded quantities, called Field.
This class behaves exactly like
numpy.ndarray
but every object has an attribute calledself.domain
which is the domain associated with that field (e.g. state variables).Initialization parameters
An instance of
Field
is initialized with the following arguments:Parameters: Object attributes
Following object attribute is generated during initialization:
Variables: domain (
_Domain
) – the domain associated with that field (e.g. state variables)Example: >>> import climlab >>> import numpy as np >>> from climlab import domain >>> from climlab.domain import field >>> # distribution of state >>> distr = np.linspace(0., 10., 30) >>> # domain creation >>> sfc, atm = domain.single_column() >>> # build state of type Field >>> s = field.Field(distr, domain=atm) >>> print s [ 0. 0.34482759 0.68965517 1.03448276 1.37931034 1.72413793 2.06896552 2.4137931 2.75862069 3.10344828 3.44827586 3.79310345 4.13793103 4.48275862 4.82758621 5.17241379 5.51724138 5.86206897 6.20689655 6.55172414 6.89655172 7.24137931 7.5862069 7.93103448 8.27586207 8.62068966 8.96551724 9.31034483 9.65517241 10. ] >>> print s.domain climlab Domain object with domain_type=atm and shape=(30,) >>> # can slice this and it preserves the domain >>> # a more full-featured implementation would have intelligent >>> # slicing like in iris >>> s.shape == s.domain.shape True >>> s[:1].shape == s[:1].domain.shape False >>> # But some things work very well. E.g. new field creation: >>> s2 = np.zeros_like(s) >>> print s2 [ 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] >>> print s2.domain climlab Domain object with domain_type=atm and shape=(30,)
-
climlab.domain.field.
global_mean
(field)[source]¶ Calculates the latitude weighted global mean of a field with latitude dependence.
Parameters: field (Field) – input field
Raises: ValueError
if input field has no latitude axisReturns: latitude weighted global mean of the field
Return type: Example: initial global mean temperature of EBM model:
>>> import climlab >>> from climlab.domain.field import global_mean >>> model = climlab.EBM() >>> global_mean(model.Ts) Field(11.997968598413685)
climlab.domain.initial module¶
Convenience routines for setting up initial conditions.
-
climlab.domain.initial.
column_state
(num_lev=30, num_lat=1, lev=None, lat=None, water_depth=1.0)[source]¶ Sets up a state variable dictionary consisting of temperatures for atmospheric column (
Tatm
) and surface mixed layer (Ts
).Surface temperature is always 288 K. Atmospheric temperature is initialized between 278 K at lowest altitude and 200 at top of atmosphere according to the number of levels given.
Function-call arguments
Parameters: - num_lev (int) – number of pressure levels (evenly spaced from surface to top of atmosphere) [default: 30]
- num_lat (int) – number of latitude points on the axis [default: 1]
- lev (
Axis
or pressure array) – specification for height axis (optional) - lat (array) – size of array determines dimension of latitude (optional)
- water_depth (float) – irrelevant
Returns: dictionary with two temperature
Field
for atmospheric columnTatm
and surface mixed layerTs
Return type: Example: >>> from climlab.domain import initial >>> T_dict = initial.column_state() >>> print T_dict {'Tatm': Field([ 200. ,<PHONE_NUMBER>7,<PHONE_NUMBER>4,<PHONE_NUMBER>2,<PHONE_NUMBER>9,<PHONE_NUMBER>6,<PHONE_NUMBER>3,<PHONE_NUMBER>1,<PHONE_NUMBER>8,<PHONE_NUMBER>5,<PHONE_NUMBER>2,<PHONE_NUMBER> ,<PHONE_NUMBER>7,<PHONE_NUMBER>4,<PHONE_NUMBER>1,<PHONE_NUMBER>9,<PHONE_NUMBER>6,<PHONE_NUMBER>3,<PHONE_NUMBER> ,<PHONE_NUMBER>8,<PHONE_NUMBER>5,<PHONE_NUMBER>2,<PHONE_NUMBER>9,<PHONE_NUMBER>7,<PHONE_NUMBER>4,<PHONE_NUMBER>1,<PHONE_NUMBER>8,<PHONE_NUMBER>6,<PHONE_NUMBER>3, 278. ]), 'Ts': Field([ 288.])}
-
climlab.domain.initial.
surface_state
(num_lat=90, water_depth=10.0, T0=12.0, T2=-40.0)[source]¶ Sets up a state variable dictionary for a zonal-mean surface model (e.g. basic EBM).
Returns a single state variable Ts, the temperature of the surface mixed layer, initialized by a basic temperature and the second Legendre polynomial.
Function-call arguments
Parameters: - num_lat (int) – number of latitude points on the axis [default: 90]
- water_depth (float) – irrelevant
- T0 (float) –
base value for initial temperature
- unit \(^{\circ} \textrm{C}\)
- default value:
12
- T2 (float) –
factor for 2nd Legendre polynomial
P2
to calculate initial temperature- unit: dimensionless
- default value:
-40
Returns: dictionary with temperature
Field
for surface mixed layerTs
Return type: Example: >>> from climlab.domain import initial >>> import numpy as np >>> T_dict = initial.surface_state(num_lat=36) >>> print np.squeeze(T_dict['Ts']) [-27.88584094 -26.97777479 -25.18923361 -22.57456133 -19.21320344 -15.20729309 -10.67854785 -5.76457135 -0.61467228 4.61467228 9.76457135 14.67854785 19.20729309 23.21320344 26.57456133 29.18923361 30.97777479 31.88584094 31.88584094 30.97777479 29.18923361 26.57456133 23.21320344 19.20729309 14.67854785 9.76457135 4.61467228 -0.61467228 -5.76457135 -10.67854785 -15.20729309 -19.21320344 -22.57456133 -25.18923361 -26.97777479 -27.88584094]


Class: ActiveSupport::BacktraceCleaner
| Inherits: |
Object
|
| Direct Subclasses: | Rails::BacktraceCleaner |
| Defined in: |
Overview
Backtraces often include many lines that are not relevant for the context under review. This makes it hard to find the signal amongst the backtrace noise, and adds debugging time. With a BacktraceCleaner, filters and silencers are used to remove the noisy lines, so that only the most relevant lines remain.
Filters are used to modify lines of data, while silencers are used to remove lines entirely. The typical filter use case is to remove lengthy path information from the start of each line, and view file paths relevant to the app directory instead of the file system root. The typical silencer use case is to exclude the output of a noisy library from the backtrace, so that you can focus on the rest.
bc = BacktraceCleaner.new
bc.add_filter { |line| line.gsub(Rails.root.to_s, '') } # strip the Rails.root prefix
bc.add_silencer { |line| line =~ /mongrel|rubygems/ } # skip any lines from mongrel or rubygems
bc.clean(exception.backtrace) # perform the cleanup
To reconfigure an existing BacktraceCleaner (like the default one in Rails)
and show as much data as possible, you can always call
BacktraceCleaner#remove_silencers!
, which will restore the
backtrace to a pristine state. If you need to reconfigure an existing
BacktraceCleaner so that it does not filter or modify the paths of any
lines of the backtrace, you can call
BacktraceCleaner#remove_filters!
These two methods will give
you a completely untouched backtrace.
Inspired by the Quiet Backtrace gem by Thoughtbot.
Class Method Summary collapse
-
.new ⇒ BacktraceCleaner
constructor
a new instance of BacktraceCleaner
Instance Method Summary collapse
-
#add_filter(&block)
Adds a filter from the block provided.
-
#add_silencer(&block)
Adds a silencer from the block provided.
-
#clean(backtrace, kind = :silent)
(also: #filter)
Returns the backtrace after all filters and silencers have been run against it.
-
#filter(backtrace, kind = :silent)
Alias for #clean.
-
#remove_filters!
Removes all filters, but leaves in the silencers.
-
#remove_silencers!
Removes all silencers, but leaves in the filters.
Constructor Details
.new ⇒ BacktraceCleaner
a new instance of BacktraceCleaner
30 31 32
# File 'activesupport/lib/active_support/backtrace_cleaner.rb', line 30 def initialize @filters, @silencers = [], [] end
Instance Method Details
#add_filter(&block)
55 56 57
# File 'activesupport/lib/active_support/backtrace_cleaner.rb', line 55 def add_filter(&block) @filters << block end
#add_silencer(&block)
Adds a silencer from the block provided. If the silencer returns
true
for a given line, it will be excluded from the clean
backtrace.
# Will reject all lines that include the word "mongrel", like "/gems/mongrel/server.rb" or "/app/my_mongrel_server/rb"
backtrace_cleaner.add_silencer { |line| line =~ /mongrel/ }
64 65 66
# File 'activesupport/lib/active_support/backtrace_cleaner.rb', line 64 def add_silencer(&block) @silencers << block end
#clean(backtrace, kind = :silent) Also known as: filter
Returns the backtrace after all filters and silencers have been run against it. Filters run first, then silencers.
36 37 38 39 40 41 42 43 44 45 46 47
# File 'activesupport/lib/active_support/backtrace_cleaner.rb', line 36 def clean(backtrace, kind = :silent) filtered = filter_backtrace(backtrace) case kind when :silent silence(filtered) when :noise noise(filtered) else filtered end end
#filter(backtrace, kind = :silent)
Alias for #clean.
#remove_filters!
Removes all filters, but leaves in the silencers. Useful if you suddenly need to see entire filepaths in the backtrace that you had already filtered out.
78 79 80
# File 'activesupport/lib/active_support/backtrace_cleaner.rb', line 78 def remove_filters! @filters = [] end
#remove_silencers!
Removes all silencers, but leaves in the filters. Useful if your context of debugging suddenly expands as you suspect a bug in one of the libraries you use.
71 72 73
# File 'activesupport/lib/active_support/backtrace_cleaner.rb', line 71 def remove_silencers! @silencers = [] end


"Adam's Rib"
Reviewed by Heather Picker
Directed by George Cukor. Written by Ruth Gordon and Garson Kanin. Starring Spencer Tracy and Katharine Hepburn, with Judy Holliday, Tom Ewell, Jean Hagen and David Wayne. 1949, 101 min., Not Rated.
Battle of the sexes films have become a comedic staple. "Adam's Rib" is one of the earliest examples of the best of that sub-genre. The film opens with a woman (Judy Holliday) following a man (Tom Ewell). She barges into a room to find him with the woman he is having an affair with (Jean Hagen), and, unsteadily holding a pistol, fires repeatedly, wounding him (he survives). Cut to Adam and Amanda Bonner (Spencer Tracy and Katharine Hepburn), Assistant District Attorney and attorney-at-law, respectively. Shortly after he wakes up she reads a newspaper article to him about a woman named Doris Attinger who shot her two-timing husband, Warren. They talk about it, and it is clear that the argument over whether or not the situation would be considered different had it been a man assaulting his cheating wife, will not be settled for quite some time.
Adam goes to his office to find that he has been assigned the dreaded case. When Amanda hears of this she does a bit of ambulance chasing and winds up defending Doris, who is more than a bit ditzy. Husband and wife prepare to go to court, unaware of just how troublesome the duration of the trial will prove to be for them, both professionally and personally. Assigned to the case because the District Attorney thinks he is the only man who can get the conviction, Adam firmly believes that no one has the right to break any laws. Amanda presents a different story to the jury, making the case more about sexual politics than actual law. The courtroom becomes a circus, and her strategy the bone of contention in their marriage.
The married screenwriting duo of Ruth Gordon and Garson Kanin crafted a witty script that provides many laughs, but also tries to focus on gender equality issues. Tracy and Hepburn, in their fifth film together, have unparalleled chemistry that makes their scenes together jump off the screen with immense believability. They are supported by one of the greatest comedic casts of the 1940s. Judy Holliday is marvelous as the light-headed, sarcastic Doris, Tom Ewell is appropriately whiney and smarmy as Warren (and very funny as seen in a dress during Amanda's closing statements), Jean Hagen is perfect as his mistress, Beryl Caighn, and David Wayne steals every scene he is in as Kip Lurie, a songwriter and singer who lives in the apartment across from the Bonners and is smitten with Amanda. (His ode to her is provided by Cole Porter.) George Cukor's direction, as usual, is confident and mostly seamless. Many funny parts of the film take place off-screen, with dialogue and/or background noise being our only indicator as to what is occurring, and I think it takes a true pro to make those types of scenes work. The only parts of "Adam's Rib" that weren't necessary were the questioning of women that Amanda brought into the trial in order to prove that women can do anything men can.
For you trivia buffs: Famous collaborations are abound in "Adam's Rib." Director George Cukor worked frequently with Katharine Hepburn, who in turn made eight movies with Spencer Tracy. Screenwriter Kanin's brother, Michael, co-wrote "Woman of the Year," Tracy and Hepburn's first film (1942, directed by George Stevens) together, and Kanin himself wrote the play "Born Yesterday," which made Judy Holliday a star. Gordon and Kanin, three years later, wrote another Tracy/Hepburn classic, "Pat and Mike."
DVD Details: MGM brings another one of their classics to DVD with little fanfare. The only supplementary feature is the original theatrical trailer. The actual film is presented standard, full-frame format "preserving the aspect ratio of its original theatrical exhibition." The transfer is outstanding, very sharp and with nice contrasts between the different variations of gray tones. The mono sound suits the movie well, as the dialogue is crisp and clear. English and French language tracks, English, French, and Spanish subtitles, and English captioning for the hearing impaired, as well as scene selections. The main menu is very simplistic, using a design seen throughout the movie as it's backdrop. Snapper case.
Notes: Available on video and DVD.
The Verdict: "Adam's Rib" is a delightful, occasionally daring, battle-of-the-sexes screwball comedy with a witty script and superlative performances. Recommended for screwball, classic, and/or Tracy/Hepburn aficionados, best viewed on DVD.
mailto<EMAIL_ADDRESS>Review courtesy of http://www.thatmoviesite.8m.com
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


What is this?
This is my personal portfolio/blog. Continue reading to learn more about programming, Javascript and how to make a great pizza 🍕
Software developer
This is my personal portfolio/blog. Continue reading to learn more about programming, Javascript and how to make a great pizza 🍕


Docker for Azure setup & prerequisites
Estimated reading time: 5 minutesDocker Enterprise Edition (EE) for Azure
This deployment is fully baked and tested, and comes with the latest Enterprise Edition version of Docker.
This release is maintained and receives security and critical bugfixes for one year.
Deploy Docker Enterprise Edition (EE) for Azure
Docker Community Edition (CE) for Azure
Quickstart
If your account has the proper permissions, you can generate the Service Principal and then bootstrap Docker for Azure using Azure Resource Manager.
Deploy Docker Community Edition (CE) for Azure (stable)
Prerequisites
- Access to an Azure account with admin privileges
- SSH key that you want to use when accessing your completed Docker install on Azure
Configuration
Docker for Azure is installed with an Azure template that configures Docker in swarm mode, running on VMs backed by a custom virtual hard drive (VHD). There are two ways you can deploy Docker for Azure. You can use the Azure Portal (browser based), or use the Azure CLI. Both have the following configuration options.
Configuration options
Manager count
The number of Managers in your swarm. You can pick either 1, 3 or 5 managers. We only recommend 1 manager for testing and dev setups. There are no failover guarantees with 1 manager — if the single manager fails the swarm goes down as well. Additionally, upgrading single-manager swarms is not currently guaranteed to succeed.
We recommend at least 3 managers, and if you have a lot of workers, you should pick 5 managers.
Manager VM size
The VM type for your manager nodes. The larger your swarm, the larger the VM size you should use.
Worker VM size
The VM type for your worker nodes.
Worker count
The number of workers you want in your swarm (1-100).
Service principal
A
Service Principal
is required to set up Docker for Azure. The Service Principal is used to invoke Azure APIs as you scale the number of nodes up
and down or deploy apps on your swarm that require configuration of the Azure Load Balancer. Docker provides a
containerized helper script called docker4x/create-sp-azure
to help you create the Service Principal.
- On a Linux machine, download the latest version of
docker4x/create-sp-azure
to your local environment:
docker pull docker4x/create-sp-azure:latest
- Run the
sp-azure
script with the following arguments:
$ docker run -ti docker4x/create-sp-azure sp-name [rg-name rg-region]
...
Your access credentials =============================
AD App ID: <app-id>
AD App Secret: <secret>
AD Tenant ID: <tenant-id>
If you have multiple Azure subscriptions, make sure to create the Service Principal with the subscription ID that you use to deploy Docker for Azure. The arguments are provided below.
| Argument | Description | Example values |
|---|---|---|
sp-name |
The name of the authentication app that the script creates with Azure. The name is not important. Choose something recognizable in the Azure portal. | sp1 |
rg-name |
The name of the new resource group to be created to deploy the resources (VMs, networks, storage accounts) associated with the swarm. The Service Principal is scoped to this resource group. Specify this when deploying Docker Community Edition for Azure. Do not specify this when deploying Docker Enterprise Edition for Azure. | swarm1 |
rg-region |
The name of Azure’s region/location where the resource group is to be created. This needs to be one of the regions supported by Azure. Specify this when deploying Docker Community Edition for Azure. Do not specify this when deploying Docker Enterprise Edition for Azure. | westus , centralus , eastus . See our FAQs for a list of regions. |
If you do not supply the rg-name
and rg-region
here, you are prompted
for that information each time you create a new service. The resource group
is created automatically and services are scoped to that resource
group.
If the script fails, it may be because your Azure user account does not have sufficient privileges. Contact your Azure administrator.
When setting up the Azure Resource Manager (ARM) template, you are prompted
for the App ID (a UUID) and the app secret. If you are deploying Docker
Community Edition for Azure and specify the resource group name and location
parameters, choose the option to deploy the template into an **existing resource
group and pass the same name and region/location that you used when running
the create-sp-azure
helper script.**
SSH Key
Docker for Azure uses SSH for accessing the Docker swarm once it’s deployed. During setup, you are prompted for a SSH public key. If you don’t have a SSH key, you can generate one with puttygen
or ssh-keygen
. You only need the public key component to set up Docker for Azure. Here’s how to get the public key from a .pem file:
ssh-keygen -y -f my-key.pem
Install with the CLI
You can also invoke the Docker for Azure template from the Azure CLI:
The Docker for Azure Template provides default values for the number and type of manager and worker nodes, but you may need to provide the following values:
- AppID
- AppSecret
- Public SSH Key
Below is an example of how to use the CLI. Make sure you populate all requested parameter values.
The command below assumes there is a resource group called docker-resource-group
present. This resource group can be created
- Via the Azure Portal web interface
- Via the Azure CLI (
az group create --name docker-resource-group
) - Via the
docker4x/create-sp-azure
container mentioned above.
If you use the AppID / AppSecret from the docker4x/create-sp-azure
helper script, it’s important it was created for the same resource-group.
$ az group deployment create --resource-group docker-resource-group --name docker.template --template-uri https://download.docker.com/azure/stable/Docker.tmpl
Parameters can be provided interactively, on the command line, or via a parameters file. For more info on how to use the Azure CLI, visit the Deploy resources with Resource Manager templates and Azure CLI page.
azure, microsoft, iaas, tutorial


ToDos!
Projects
placeholder for the projects list
Selected project name
Submit
Priority:
High
Low
placeholder for the todos list
Priority:
High
Low
Cancel
Save


Last updated: 2018-12-19
workflowr checks: (Click a bullet for more information) ✔ R Markdown file: up-to-date
Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.
✔ Environment: empty
Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.
✔ Seed:
set.seed(1)
The command set.seed(1)
was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.
✔ Session information: recorded
Great job! Recording the operating system, R version, and package versions is critical for reproducibility.
✔ Repository version: 190c855
wflow_publish
or wflow_git_commit
). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:
Ignored files:
Ignored: dsc/code/Wavelab850/MEXSource/CPAnalysis.mexmac
Ignored: dsc/code/Wavelab850/MEXSource/DownDyadHi.mexmac
Ignored: dsc/code/Wavelab850/MEXSource/DownDyadLo.mexmac
Ignored: dsc/code/Wavelab850/MEXSource/FAIPT.mexmac
Ignored: dsc/code/Wavelab850/MEXSource/FCPSynthesis.mexmac
Ignored: dsc/code/Wavelab850/MEXSource/FMIPT.mexmac
Ignored: dsc/code/Wavelab850/MEXSource/FWPSynthesis.mexmac
Ignored: dsc/code/Wavelab850/MEXSource/FWT2_PO.mexmac
Ignored: dsc/code/Wavelab850/MEXSource/FWT_PBS.mexmac
Ignored: dsc/code/Wavelab850/MEXSource/FWT_PO.mexmac
Ignored: dsc/code/Wavelab850/MEXSource/FWT_TI.mexmac
Ignored: dsc/code/Wavelab850/MEXSource/IAIPT.mexmac
Ignored: dsc/code/Wavelab850/MEXSource/IMIPT.mexmac
Ignored: dsc/code/Wavelab850/MEXSource/IWT2_PO.mexmac
Ignored: dsc/code/Wavelab850/MEXSource/IWT_PBS.mexmac
Ignored: dsc/code/Wavelab850/MEXSource/IWT_PO.mexmac
Ignored: dsc/code/Wavelab850/MEXSource/IWT_TI.mexmac
Ignored: dsc/code/Wavelab850/MEXSource/LMIRefineSeq.mexmac
Ignored: dsc/code/Wavelab850/MEXSource/MedRefineSeq.mexmac
Ignored: dsc/code/Wavelab850/MEXSource/UpDyadHi.mexmac
Ignored: dsc/code/Wavelab850/MEXSource/UpDyadLo.mexmac
Ignored: dsc/code/Wavelab850/MEXSource/WPAnalysis.mexmac
Ignored: dsc/code/Wavelab850/MEXSource/dct_ii.mexmac
Ignored: dsc/code/Wavelab850/MEXSource/dct_iii.mexmac
Ignored: dsc/code/Wavelab850/MEXSource/dct_iv.mexmac
Ignored: dsc/code/Wavelab850/MEXSource/dst_ii.mexmac
Ignored: dsc/code/Wavelab850/MEXSource/dst_iii.mexmac
Ignored: dsc/results/
Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.
| File | Version | Author | Date | Message |
|---|---|---|---|---|
| Rmd | 190c855 | Peter Carbonetto | 2018-12-19 | Working on R Markdown for Poisson results. |
This script produces supplementary tables for Poisson simulations.
library(xtable)
load("../output/pois.RData")
tex.row.names <- c("SMASH",
"BMSM",
"BMMIM",
"Haar-Fisz",
"Anscombe",
"Haar thresholds",
"L1_penalty"
)
tex.col.names <- c("intensity (0.01,3)",
"intensity (1/8,8)",
"intensity (1/128,128)")
mise.s.1.table=mise.s.1[c(1,2,3,4,6,7,8)]
mise.s.8.table=mise.s.8[c(1,2,3,4,6,7,8)]
mise.s.128.table=mise.s.128[c(1,2,3,4,6,7,8)]
mise.ang.1.table=mise.ang.1[c(1,2,3,4,6,7,8)]
mise.ang.8.table=mise.ang.8[c(1,2,3,4,6,7,8)]
mise.ang.128.table=mise.ang.128[c(1,2,3,4,6,7,8)]
mise.bur.1.table=mise.bur.1[c(1,2,3,4,6,7,8)]
mise.bur.8.table=mise.bur.8[c(1,2,3,4,6,7,8)]
mise.bur.128.table=mise.bur.128[c(1,2,3,4,6,7,8)]
mise.cb.1.table=mise.cb.1[c(1,2,3,4,6,7,8)]
mise.cb.8.table=mise.cb.8[c(1,2,3,4,6,7,8)]
mise.cb.128.table=mise.cb.128[c(1,2,3,4,6,7,8)]
mise.b.1.table=mise.b.1[c(1,2,3,4,6,7,8)]
mise.b.8.table=mise.b.8[c(1,2,3,4,6,7,8)]
mise.b.128.table=mise.b.128[c(1,2,3,4,6,7,8)]
mise.hs.1.table=mise.hs.1[c(1,2,3,4,6,7,8)]
mise.hs.8.table=mise.hs.8[c(1,2,3,4,6,7,8)]
mise.hs.128.table=mise.hs.128[c(1,2,3,4,6,7,8)]
mise.s.table=cbind(mise.s.1.table,
mise.s.8.table,
mise.s.128.table
)
mise.ang.table <- cbind(mise.ang.1.table,
mise.ang.8.table,
mise.ang.128.table
)
mise.bur.table=cbind(mise.bur.1.table,
mise.bur.8.table,
mise.bur.128.table
)
mise.cb.table=cbind(mise.cb.1.table,
mise.cb.8.table,
mise.cb.128.table
)
mise.b.table=cbind(mise.b.1.table,
mise.b.8.table,
mise.b.128.table
)
mise.hs.table=cbind(mise.hs.1.table,
mise.hs.8.table,
mise.hs.128.table
)
rownames(mise.ang.table)=tex.row.names
colnames(mise.ang.table)=tex.col.names
rownames(mise.b.table)=tex.row.names
colnames(mise.b.table)=tex.col.names
rownames(mise.cb.table)=tex.row.names
colnames(mise.cb.table)=tex.col.names
rownames(mise.s.table)=tex.row.names
colnames(mise.s.table)=tex.col.names
rownames(mise.hs.table)=tex.row.names
colnames(mise.hs.table)=tex.col.names
rownames(mise.bur.table)=tex.row.names
colnames(mise.bur.table)=tex.col.names
print(xtable(mise.s.table,caption="Comparison of methods for denoising Poisson data for the ``Spikes'' test function for 3 different (min,max) intensities ((0.01,3), (1/8,8), (1/128,128)). Performance is measured using MISE over 100 independent datasets, with smaller values indicating better performance. Values colored in red indicates the smallest MISE amongst all methods for a given (min, max) intensity.",label="table:pois_sp",digits=2),type = "html")
print(xtable(mise.ang.table,caption="Comparison of methods for denoising Poisson data for the ``Angles'' test function for 3 different (min,max) intensities ((0.01,3), (1/8,8), (1/128,128)). Performance is measured using MISE over 100 independent datasets, with smaller values indicating better performance. Values colored in red indicates the smallest MISE amongst all methods for a given (min, max) intensity.",label="table:pois_ang",digits=2),type = "html")
print(xtable(mise.hs.table,caption="Comparison of methods for denoising Poisson data for the ``Heavisine'' test function for 3 different (min,max) intensities ((0.01,3), (1/8,8), (1/128,128)). Performance is measured using MISE over 100 independent datasets, with smaller values indicating better performance. Values colored in red indicates the smallest MISE amongst all methods for a given (min, max) intensity.",label="table:pois_hs",digits=2),type = "html")
print(xtable(mise.bur.table,caption="Comparison of methods for denoising Poisson data for the ``Bursts'' test function for 3 different (min,max) intensities ((0.01,3), (1/8,8), (1/128,128)). Performance is measured using MISE over 100 independent datasets, with smaller values indicating better performance. Values colored in red indicates the smallest MISE amongst all methods for a given (min, max) intensity.",label="table:pois_bur",digits=2),type = "html")
print(xtable(mise.cb.table,caption="Comparison of methods for denoising Poisson data for the ``Clipped Blocks'' test function for 3 different (min,max) intensities ((0.01,3), (1/8,8), (1/128,128)). Performance is measured using MISE over 100 independent datasets, with smaller values indicating better performance. Values colored in red indicates the smallest MISE amongst all methods for a given (min, max) intensity.",label="table:pois_cb",digits=2),type = "html")
print(xtable(mise.b.table,caption="Comparison of methods for denoising Poisson data for the ``Bumps'' test function for 3 different (min,max) intensities ((0.01,3), (1/8,8), (1/128,128)). Performance is measured using MISE over 100 independent datasets, with smaller values indicating better performance. Values colored in red indicates the smallest MISE amongst all methods for a given (min, max) intensity.",label="table:pois_b",digits=2),type = "html")
sessionInfo()
R version 3.4.3 (2017-11-30)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.6
Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] xtable_1.8-2
loaded via a namespace (and not attached):
[1] workflowr_1.1.1 Rcpp_1.0.0 digest_0.6.17
[4] rprojroot_1.3-2 R.methodsS3_1.7.1 backports_1.1.2
[7] git2r_0.23.0 magrittr_1.5 evaluate_0.11
[10] stringi_1.2.4 whisker_0.3-2 R.oo_1.21.0
[13] R.utils_2.6.0 rmarkdown_1.10 tools_3.4.3
[16] stringr_1.3.1 yaml_2.2.0 compiler_3.4.3
[19] htmltools_0.3.6 knitr_1.20
This reproducible R Markdown analysis was created with workflowr 1.1.1


- instrument source folder using istanbul
istanbul instrument src --output srcInstrumented
- run phantomjs qunit runner on this file (does not need webserver)
phantomjs runner.js index.html
- the runner saves coverage report code_coverage_report.json
- write complete report including line by line indicators
istanbul report --root . -v html code_coverage_report.json --dir cover


Hi, my name is Scott Neaves. I'm a full-stack web developer with particular proficiency in AngularJS and python. This app is made with AngularJS, according to the specifications outlined in this gist: https://github.com/jonguan/c1CodeChallenge-weather-frontend. Other examples of public projects that I have done can be found here: www.scottneaves.me/pages/projects/, and a summary of my web development experience thus far can be found here: www.scottneaves.me/pages/resume/.


This post describes using SKiDL for a USB-to-JTAG interface that was taken all the way from concept to physically building a device.
The interface is pretty simple. It’s built from the following stuff:
- A PIC32MX220 microcontroller.
- A 12 MHz crystal.
- Some reset circuitry.
- A six-pin Microchip programming header (for the PIC32).
- A mini-USBB connector.
- A six-pin header for connecting to a JTAG port.
- A 5V-to-3.3V voltage regulator.
- A status LED.
Here’s a block diagram to help orient you as the SKiDL code is presented.
Any SKiDL project starts as a Python file.
In this example, I created the file intfc_brd.py
.
The first line in the file imports all the functions and classes of the skidl
module:
from skidl import *
Next, I made strings that contain the paths to some of my personal KiCad symbol libraries.
If these libraries ever move to another directory, then I only have to make a change here.
(The libraries that come with KiCad are included by default by querying the KISYSMOD
environment variable.)
# Libraries.
xess_lib = r'C:\xesscorp\KiCad\libraries\xess.lib'
pic32_lib = r'C:\xesscorp\KiCad\libraries\pic32.lib'
pickit3_lib = r'C:\xesscorp\KiCad\libraries\pickit3.lib'
Then I made templates for a resistor and a capacitor from the standard KiCad device
library.
I’ll make copies of these later on whenever I need one of these common components
in the design.
As with the libraries, if I ever need to modify these components (to use a
different footprint, for instance) then I only need to make the change here to
have it take effect globally.
# Some common parts used as templates.
res = Part('device', 'R', footprint='Resistors_SMD:R_0603', dest=TEMPLATE)
cap = Part('device', 'C', footprint='Capacitors_SMD:C_0603', dest=TEMPLATE)
I start the actual circuit design by defining three nets that distribute power
to all the other parts: ground, 5V from the USB port, and 3.3V generated by the
voltage regulator.
I also set the drive
attribute of the ground and 5V nets to indicate they are
for distributing power.
(I didn’t need to do that for the 3.3V net because that will happen automatically
when it is connected to the output of the regulator.)
# Global nets.
gnd = Net('GND')
gnd.drive = POWER
vusb = Net('VUSB')
vusb.drive = POWER
vdd = Net('+3.3V')
Next, I instantiated a voltage regulator from my personal library: a Texas Instruments TPS79333.
I also assigned an SOT-23-5 package to it from the TO_SOT_Packages_SMD
footprint
library distributed with KiCad.
Since I only needed one of these regulators, I omitted the dest=TEMPLATE
argument and
instantiated it directly into the circuit instead of making it a template.
# Regulate +5V VUSB down to +3.3V for VDD.
vreg = Part(xess_lib, 'TPS793XX', footprint='TO_SOT_Packages_SMD:SOT-23-5')
The input power to the regulator arrives on the 5V net from the USB port. The enable pin is also pulled high with the 5V net in order to enable the regulator. This can all be done with the following, single statement. (Note that I used names instead of numbers to reference the regulator pins. This makes the design intent clearer and decouples it from the pin numbering scheme of a particular package.)
vreg['IN, EN'] += vusb
The next two lines connect the ground pin of the regulator to the ground net, and the regulator output to the 3.3V net:
vreg['GND'] += gnd
vreg['OUT'] += vdd
The TPS79333 regulator also has a noise reduction pin where a small capacitor
is attached to filter out hash on the regulated output.
The cap
template I created earlier is instantiated as noise_cap
with an assigned value of 0.01 μF.
Then, the pins of noise_cap
are attached to the noise reduction pin of the voltage
regulator and ground, respectively.
noise_cap = cap(value='0.01uf')
noise_cap[1, 2] += vreg['NR'], gnd
Next up is the microcontroller: a PIC32MX220 in a 28-pin SSOP package.
The part is found in my personal PIC32 library, and the SSOP package is
in a KiCad footprint library.
(The rather cryptic name for the PIC32 results from my naming the library part
PIC32MX2*0F***B
in order to cover all the Microchip PIC32MX 200-series variants
with their differing memory sizes. Then I had to escape the *
characters
with backslashes to stop them from being interpreted as wildcards.)
# Microcontroller.
pic32 = Part(pic32_lib, 'pic32MX2\*0F\*\*\*B-SSOP28-SOIC28-SPDIP28',
footprint='Housings_SSOP:SSOP-28_5.3x10.2mm_Pitch0.65mm')
All the power and ground pins of the microcontroller are connected with the next
three statements. Any microcontroller pin with VSS
within its name gets
connected to ground, and any pins containing VDD
are connected to +3.3V
(this includes the analog power and ground pins, AVSS
and AVDD
).
The same applies to the VUSB3V3
pin, but here’s only one of those so it really
doesn’t matter.
pic32['VSS'] += gnd
pic32['VDD'] += vdd # Main CPU power.
pic32['VUSB3V3'] += vdd # Power to USB transceiver.
The next statement connects the 5V pin from the USB port to the USB voltage monitoring
pin of the microcontroller.
I had to be careful with the name of the pin because there was another pin
on the chip that contained VBUS
in its name.
I prevented that pin from being selected by surrounding VBUS
with the start (^
)
and end ($
) special characters for regular expressions so the pin name had to
exactly match VBUS
.
pic32['^VBUS$'] += vusb # Monitor power pin of USB connector.
The microcontroller needs some power supply bypass capacitors, so three 0.1 μF
capacitors are created (as a Python list) with two attached between the 3.3V supply rail and ground
while the remaining capacitor connects to the VCAP
pin to filter the internal CPU logic supply.
# Bypass capacitors for microcontroller.
bypass = cap(3, value='0.1uf')
bypass[0][1, 2] += vdd, gnd
bypass[1][1, 2] += vdd, gnd
bypass[2][1, 2] += pic32['VCAP'], gnd
The microcontroller reset circuit contains two resistors and a capacitor that
create an RC time delay on the MCLR
pin of the PIC32.
The r_pullup
and filter_cap
components are connected in series between
3.3V and ground to create a delayed release from reset upon power-up, and the r_series
resistor carries
the delayed signal to the MCLR
pin.
# Microcontroller MCLR circuitry:
# Pull-up resistor to VDD.
# Filter capacitor to delay exit of reset or eliminate glitches.
# Series resistor to isolate capacitor from device programmer.
r_pullup = res(value='10K')
filter_cap = cap(value='0.1uf')
r_pullup[2] += vdd
filter_cap[1, 2] += r_pullup[1], gnd
r_series = res(value='1K')
r_series[1, 2] += r_pullup[1], pic32['MCLR']
The next two lines instantiate a mini-B USB connector and attach the D+
and D-
data lines to the associated pins of the microcontroller.
The USB power and ground pins are wired to the 5V and ground nets of the board.
The USB connector also has an unused pin (NC
) which is connected to a special
no-connect net designated by NC
(which prevents a warning when the ERC is run).
# USB connector.
usb_conn = Part(xess_lib, 'USBB', footprint='XESS:UX60SC-MB-5ST')
usb_conn['D\+, D-, VCC, GND, NC'] += pic32['D\+, D-'], vusb, gnd, NC
The shield pins of the USB connector are attached to ground through a parallel capacitor/resistor network. This is supposed to provide high-frequency RF shielding while preventing DC ground-loop currents. Or something like that. Nobody’s really sure.
# Noise filtering/isolation on the USB connector shield.
shld_cap = cap(value='4.7nf')
shld_res = res(value='1M')
shld_cap[1] += usb_conn['shield']
shld_res[1] += usb_conn['shield']
gnd += shld_cap[2], shld_res[2]
The following statements implement
a status LED driven by pin RB4
of the PIC32 through a current-limiting resistor.
Once again, note the use of the A
(anode) and K
(cathode) pin names for the LED
instead of pin numbers in order to more clearly show design intent.
# LED with current-limiting resistor driven by microcontroller pin.
led = Part('device', 'led', footprint='Diodes_SMD:D_0603')
led_curr_limit = res(value='1K')
led_curr_limit[1, 2] += pic32['RB4'], led['A']
led['K'] += gnd
A 12 MHz crystal in a four-pin package provides the frequency source for the microcontroller.
Two of the pins (1 and 3) attach to the oscillator pins of the PIC32 (OSC1
and OSC2
),
while the remaining two pins connect to ground.
Two trim capacitors connect from the non-ground pins of the crystal to ground.
# Crystal and trim capacitors.
xtal = Part(xess_lib, 'XTAL4', footprint='XESS:32x25-4')
xtal.value = '12 MHz'
xtal[2, 4] += gnd
pic32['OSC1, OSC2'] += xtal[3, 1]
trim_cap = cap(2, value='10pf')
trim_cap[0][1, 2] += xtal[1], gnd
trim_cap[1][1, 2] += xtal[3], gnd
A six-pin header provides the attachment point for a Microchip PICKit3 programmer
that is used to program the flash memory of the PIC32.
The PICKit3 port attaches to the MCLR
, PGEC
and PGED
programming pins of the PIC32.
It also connects to the 3.3V and ground nets so the PICKit3 can power the board
during programming and debugging.
# Port for attachment of device programmer.
prg_hdr = Part(pickit3_lib, 'pickit3_hdr', footprint='Pin_Headers:Pin_Header_Straight_1x06')
prg_hdr.ref = 'PRG'
prg_hdr['MCLR'] += pic32['MCLR']
prg_hdr['PGC'] += pic32['PGEC1']
prg_hdr['PGD'] += pic32['PGED1']
prg_hdr['VDD'] += vdd
prg_hdr['GND'] += gnd
The microcontroller receives data packets from the USB port and translates them
into JTAG signals that are driven through another six-pin header.
The TCK
, TMS
, TDI
, and TDO
JTAG signals are attached to specific pins
of the PIC32 that connect to dedicated SPI circuitry for fast JTAG transfers.
# Port for attachment of FPGA programming pins.
port = Part('conn', 'CONN_01x06', footprint='Pin_Headers:Pin_Header_Straight_1x06')
port.ref = 'JTAG'
port[1, 2] += vusb, gnd
port[3] += pic32['SCK1'] # SCK1 output for TMS.
port[5] += pic32['RB5'] # PPS: SDI1 input for TDI.
port[4] += pic32['RB15'] # PPS: SS1 output for TMS.
port[6] += pic32['RA4'] # PPS: SDO1 output for TDO.
The next-to-last line of the file runs an electrical rules check (ERC) on the instantiated circuitry to try and detect any problems. Unconnected pins and conflicting drivers are the usual culprits it finds.
ERC()
The final line outputs the circuitry netlist into a file (intfc_brd.net
, in this case).
generate_netlist()
Once the Python file is complete, the netlist is created by running the command:
python intfc_brd.py
Python will execute the script and generate the following warnings:
$ python intfc_brd.py
ERC WARNING: Unconnected pin: BIDIRECTIONAL pin 2/PGED3/VREF+/CVREF+/AN0/C3INC/RPA0/CTED1/PMD7/RA0 of PIC32MX2*0F***B-SSOP28-SOIC28-SPDIP28/U2.
ERC WARNING: Unconnected pin: BIDIRECTIONAL pin 3/PGEC3/VREF-/CVREF-/AN1/RPA1/CTED2/PMD6/RA1 of PIC32MX2*0F***B-SSOP28-SOIC28-SPDIP28/U2.
ERC WARNING: Unconnected pin: BIDIRECTIONAL pin 6/AN4/C1INB/C2IND/RPB2/SDA2/CTED13/PMD2/RB2 of PIC32MX2*0F***B-SSOP28-SOIC28-SPDIP28/U2.
ERC WARNING: Unconnected pin: BIDIRECTIONAL pin 7/AN5/C1INA/C2INC/RTCC/RPB3/SCL2/PMWR/RB3 of PIC32MX2*0F***B-SSOP28-SOIC28-SPDIP28/U2.
ERC WARNING: Unconnected pin: BIDIRECTIONAL pin 16/TDI/RPB7/CTED3/PMD5/INT0/RB7 of PIC32MX2*0F***B-SSOP28-SOIC28-SPDIP28/U2.
ERC WARNING: Unconnected pin: BIDIRECTIONAL pin 17/TCK/RPB8/SCL1/CTED10/PMD4/RB8 of PIC32MX2*0F***B-SSOP28-SOIC28-SPDIP28/U2.
ERC WARNING: Unconnected pin: BIDIRECTIONAL pin 18/TDO/RPB9/SDA1/CTED4/PMD3/RB9 of PIC32MX2*0F***B-SSOP28-SOIC28-SPDIP28/U2.
ERC WARNING: Unconnected pin: BIDIRECTIONAL pin 24/AN11/RPB13/CTPLS/PMRD/RB13 of PIC32MX2*0F***B-SSOP28-SOIC28-SPDIP28/U2.
8 warnings found during ERC.
0 errors found during ERC.
No errors or warnings found during netlist generation.
The ERC warns that eight of the microcontroller pins are unconnected (because I’m not using them for anything). That might be a problem in a production design, but I’m willing to let it slide for this project.
 Parts are assembled with the PCB to arrive at the finished module shown at the beginning of this post.
Initial testing of the interface board shows the microcontroller can be loaded with a program that successfully communicates over a USB link. While this is a relatively small board (18 components and 20 nets), it is my first end-to-end design using SKiDL. I’m encouraged by the fact no problems arose, although I found facets of SKiDL that need polishing. But that’s always going to be the case.


If you accpet, you will be responsible for this shift unless the trade is rejected. You will not be able to relist the shift until initial trade is approved.
Are you sure you want to delete shift?
Store Manager: {{manager}}
{% include "flash.html" %}
Urgent Shift Requests:
{% for shift in urgentShifts %}
{% if shift == urgentShifts[4] %}
{% endif %}
{% if user_perms[-2] == true or (userType == 'Employee' and user_perms[1] == true) %}
{% if userType == 'Employee' and user_perms[1] == true %}


You can download an example excel file that connects to this data, or the Excel data connection file if you want to make the connection from scratch. Please see the README for instructions on how to edit this data.
| Code | Short description | Long description |
|---|


MULHOLLAND FALLS A film review by Mark R. Leeper Copyright 1996 Mark R. Leeper
Capsule: Four beefy L.A. cops trample the law to solve a case with national implications. This is a film with a terrific look and a very strong cast but a shockingly weak script with a wafer-thin story that is full of superficial characterizations, plot contrivances, and holes. This clearly was a film with more budget than intelligence. Rating: 0 (-4 to +4)
Well, somebody must have believed in this script. I am not sure why. I suppose the reason may be that it is a murder mystery that has a setting of post-war Los Angeles and environs. And the plot has to do with political conspiracies and sex. Perhaps someone thought this could be the new CHINATOWN. MULHOLLAND FALLS has terrific photography by Haskell Wexler, one of the great cinematographers. There are a surprising number of name actors even in tiny roles. This is a film that was given every advantage the Zanuck organization could give it.  ("Mr. Bond, this is the reactor keeps my whole island running.")
Max Hoover (played by Nick Nolte), Coolidge (Chazz Palminteri), Eddie (Michael Madsen), and Relyea (Chris Penn) are the kind squad of cops that give the Los Angeles Police Department the reputation it enjoys after the Rodney King and O. J. Simpson cases. They come on like the Untouchables (in the movie) and have no respect for hoods, gangsters, or due process of law. After an initial sequence that shows just how far beyond the law that they are willing to operate, they are called in on a mysterious case. A woman has been found dead in the desert, and Max obviously knows the woman, but is keeping that to himself. The woman was found actually imbedded IN the desert as if she had fallen off a cliff, but there are no cliffs around from which she could have fallen. From the dialogue it is clear that our squad of deep-thinking policemen cannot figure out how that is possible. To their credit, nobody in my audience shouted the answer at the screen, but we are just a few minutes into MULHOLLAND FALLS and it is clear this was not going to be a mind-stretching film. And it certainly is not. Multiple times there are scenes which do not make sense, such as characters being frisked by experts who somehow miss little things like eight-inch blackjacks. The logic of this film is on the level of a bad James Bond movie with the bad guys making major and stupid errors in judgment. That is actually a shame because both the police enforcement squad and the secret they uncover individually have a basis in truth. What is far- fetched is the scripting and not the basic plot.
Why Nick Nolte's agent let him play opposite Chazz Palminteri is anybody's guess, but it certainly was a mistake. Playing a scene opposite James Earl Jones, Howard da Silva, Chazz Palminteri, or Rin- Tin-Tin, you are in a battle for the audience's attention and you are probably going to lose. Nolte is okay, but Palminteri manages to make his own every scene in which he plays. Palminteri is really along mostly for comic relief from a tension that rarely manages to materialize. Second billing goes to Melanie Griffith in a decidedly secondary part as Max's wife. Her character is not even a major character in the story, though she does get some opportunity to act. John Malkovich does have a pivotal role as a general as well as a scientist working for the Atomic Energy Commission who was involved with the murdered woman. The casting department seems to have gone out of its way to get name actors in even some of the tiniest roles. People like Bruce Dern, Brad Pitt, and Louise Fletcher show up for parts as small as three sentences and then are seen no more. Direction is by New Zealander Lee Tamahori who directed ONCE WERE WARRIORS.
With a few good revisions on the script by Pete Dexter this could have been a major film and worthy of the attention that was lavished on it. As it is this is a film that has great style, but weak substance. I rate it a 0 on the -4 to +4 scale.
Mark R. Leeper<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


14 May 2019 Marta Paes (@morsapaes)
Figuring out how to manage and model temporal data for effective point-in-time analysis was a longstanding battle, dating as far back as the early 80’s, that culminated with the introduction of temporal tables in the SQL standard in 2011. Up to that point, users were doomed to implement this as part of the application logic, often hurting the length of the development lifecycle as well as the maintainability of the code. And, although there isn’t a single, commonly accepted definition of temporal data, the challenge it represents is one and the same: how do we validate or enrich data against dynamically changing, historical datasets?
For example: given a stream with Taxi Fare events tied to the local currency of the ride location, we might want to convert the fare price to a common currency for further processing. As conversion rates excel at fluctuating over time, each Taxi Fare event would need to be matched to the rate that was valid at the time the event occurred in order to produce a reliable result.
Modelling Temporal Data with Flink
In the 1.7 release, Flink has introduced the concept of temporal tables into its streaming SQL and Table API: parameterized views on append-only tables — or, any table that only allows records to be inserted, never updated or deleted — that are interpreted as a changelog and keep data closely tied to time context, so that it can be interpreted as valid only within a specific period of time. Transforming a stream into a temporal table requires:
-
Defining a primary key and a versioning field that can be used to keep track of the changes that happen over time;
-
Exposing the stream as a temporal table function that maps each point in time to a static relation.
Going back to our example use case, a temporal table is just what we need to model the conversion rate data such as to make it useful for point-in-time querying. Temporal table functions are implemented as an extension of Flink’s generic table function class and can be defined in the same straightforward way to be used with the Table API or SQL parser.
import org.apache.flink.table.functions.TemporalTableFunction;
(...)
// Get the stream and table environments.
StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
StreamTableEnvironment tEnv = StreamTableEnvironment.getTableEnvironment(env);
// Provide a sample static data set of the rates history table.
List <Tuple2<String, Long>>ratesHistoryData =new ArrayList<>();
ratesHistoryData.add(Tuple2.of("USD", 102L));
ratesHistoryData.add(Tuple2.of("EUR", 114L));
ratesHistoryData.add(Tuple2.of("YEN", 1L));
ratesHistoryData.add(Tuple2.of("EUR", 116L));
ratesHistoryData.add(Tuple2.of("USD", 105L));
// Create and register an example table using the sample data set.
DataStream<Tuple2<String, Long>> ratesHistoryStream = env.fromCollection(ratesHistoryData);
Table ratesHistory = tEnv.fromDataStream(ratesHistoryStream, "r_currency, r_rate, r_proctime.proctime");
tEnv.registerTable("RatesHistory", ratesHistory);
// Create and register the temporal table function "rates".
// Define "r_proctime" as the versioning field and "r_currency" as the primary key.
TemporalTableFunction rates = ratesHistory.createTemporalTableFunction("r_proctime", "r_currency");
tEnv.registerFunction("Rates", rates);
(...)
What does this Rates function do, in practice? Imagine we would like to check what the conversion rates looked like at a given time — say, 11:00. We could simply do something like:
SELECT * FROM Rates('11:00');
Even though Flink does not yet support querying temporal table functions with a constant time attribute parameter, these functions can be used to cover a much more interesting scenario: temporal table joins.
Streaming Joins using Temporal Tables
Temporal tables reach their full potential when used in combination — erm, joined — with streaming data, for instance to power applications that must continuously whitelist against a reference dataset that changes over time for auditing or regulatory compliance. While efficient joins have long been an enduring challenge for query processors due to computational cost and resource consumption, joins over streaming data carry some additional challenges:
- The unbounded nature of streams means that inputs are continuously evaluated and intermediate join results can consume memory resources indefinitely. Flink gracefully manages its memory consumption out-of-the-box (even for heavier cases where joins require spilling to disk) and supports time-windowed joins to bound the amount of data that needs to be kept around as state;
- Streaming data might be out-of-order and late, so it is not possible to enforce an ordering upfront and time handling requires some thinking to avoid unnecessary outputs and retractions.
In the particular case of temporal data, time-windowed joins are not enough (well, at least not without getting into some expensive tweaking): sooner or later, each reference record will fall outside of the window and be wiped from state, no longer being considered for future join results. To address this limitation, Flink has introduced support for temporal table joins to cover time-varying relations.
Each record from the append-only table on the probe side (Taxi Fare
) is joined with the version of the record from the temporal table on the build side (Conversion Rate
) that most closely matches the probe side record time attribute (time
) for the same value of the primary key (currency
). Remember the temporal table function (Rates
) we registered earlier? It can now be used to express this join as a simple SQL statement that would otherwise require a heavier statement with a subquery.
Temporal table joins support both processing and event time semantics and effectively limit the amount of data kept in state while also allowing records on the build side to be arbitrarily old, as opposed to time-windowed joins. Probe-side records only need to be kept in state for a very short time to ensure correct semantics in presence of out-of-order records. The challenges mentioned in the beginning of this section are overcome by:
- Narrowing the scope of the join: only the time-matching version of
ratesHistory
is visible for a giventaxiFare.time
; - Pruning unneeded records from state: for cases using event time, records between current time and the watermark delay are persisted for both the probe and build side. These are discarded as soon as the watermark arrives and the results are emitted — allowing the join operation to move forward in time and the build table to “refresh” its version in state.
Conclusion
All this means it is now possible to express continuous stream enrichment in relational and time-varying terms using Flink without dabbling into syntactic patchwork or compromising performance. In other words: stream time-travelling minus the flux capacitor. Extending this syntax to batch processing for enriching historic data with proper (event) time semantics is also part of the Flink roadmap!
If you’d like to get some hands-on practice in joining streams with Flink SQL (and Flink SQL in general), checkout this free training for Flink SQL. The training environment is based on Docker and set up in just a few minutes.
Subscribe to the Apache Flink mailing lists to stay up-to-date with the latest developments in this space.


This module converts static scene file to scene graph schema. Each of converters should know scene graph definitions schema of each engine/library, this module provides CocosCreator exporter by default.
The schema definition of scene graph is based on @drecom/scene-graph-schema .
$ sgmed
Usage:
set environment variable as below, then execute lib/index.js with node
required:
RUNTIME runtime identifier, currently supports only 'cc'
ASSET_ROOT root directory for assets
SCENE_FILE exporting scene file
optional:
DEST destination directory; default './scene-graph'
ASSET_NAME_SPACE asset directory name; default 'assets',
ASSET_DEST asset destination directory; default ${DEST}/${ASSET_NAME_SPACE}
GRAPH_FILE_NAME scene graph file name; default 'graph.json',
e.g;
RUNTIME=cc ASSET_ROOT=path/to/asset SCENE_FILE=path/to/scene sgmed
Generated using TypeDoc


Xinwei Wang is a junior student of computer engineering and cognitive science at UC San Diego (Go Tritons!). His projects and researches spans human-computer interaction, front-end design, and computing education.


| Package | org.as3commons.collections.iterators |
| Class | public final class CollectionFilterIterator |
| Implements | ICollectionIterator |
Description
The CollectionFilterIterator
accepts an ICollection
instance
and a filter function and works the same way as the ICollectionIterator
returned
by the particular iterator()
method of the given collection. In difference to,
the CollectionFilterIterator
considers only those items that pass the given filter.
Filter function
The filter function accepts the current item and returns a boolean
value (true
if the item is accepted).
function filter(item : : Boolean { var accept : Boolean = false; // test the item return accept; } var iterator : ICollectionIterator = new CollectionFilterIterator(collection, filter);
Collection filter iterator example
Show exampleSee also
| Property | Defined by | ||
|---|---|---|---|
| current : * [read-only]
The item that most recently has been returned by
next()
or previous() . | CollectionFilterIterator |
| Method | Defined by | ||
|---|---|---|---|
|
CollectionFilterIterator(collection:ICollection, filter:Function)
CollectionFilterIterator constructor.
| CollectionFilterIterator | ||
|
end():void
Resets the iterator to the position after the last item.
| CollectionFilterIterator | ||
|
hasNext():Boolean
Returns
true if there are succeeding items to be enumerated. | CollectionFilterIterator | ||
|
hasPrevious():Boolean
Returns
true if there are preceeding items to be enumerated. | CollectionFilterIterator | ||
|
next():*
Returns the next item and places the internal cursor after that item.
| CollectionFilterIterator | ||
|
previous():*
Returns the previous item and places the internal cursor before that item.
| CollectionFilterIterator | ||
|
remove():Boolean
Removes the current item from the collection if any.
| CollectionFilterIterator | ||
|
start():void
Resets the iterator to the position before the first item.
| CollectionFilterIterator |
| current | property |
current:*
[read-only]
The item that most recently has been returned by next()
or previous()
.
Returns undefined
if the iterator points to the postion before the first
or after the last item or the collection is empty.
The current item is nullified after all operations that modify the underlying
collection order (add(), remove()
) or modify the cursor position
(start(), end()
).
Returns initially undefined
.
public function get current():*
| CollectionFilterIterator | () | constructor |
public function CollectionFilterIterator(collection:ICollection, filter:Function)
CollectionFilterIterator constructor.
Parameterscollection:ICollection — The collection to be enumerated.
|
|
filter:Function — The filter function.
|
| end | () | method |
public function end():void
Resets the iterator to the position after the last item.
The last item of the collection is then returned with a subsequent
call to previous()
.
| hasNext | () | method |
public function hasNext():Boolean
Returns true
if there are succeeding items to be enumerated.
Returns false
, if the internal cursor is placed after the
last item or the collection is empty.
Boolean — true if there are items left to be enumerated.
|
| hasPrevious | () | method |
public function hasPrevious():Boolean
Returns true
if there are preceeding items to be enumerated.
Returns false
, if the internal cursor is placed before the
first item or the collection is empty.
Boolean — true if there are items left to be enumerated.
|
| next | () | method |
public function next():*
Returns the next item and places the internal cursor after that item.
Returnes undefined
if no next item exists or the collection is empty.
* — The next item of iteration or undefined if no such item exists.
|
| previous | () | method |
public function previous():*
Returns the previous item and places the internal cursor before that item.
Returnes undefined
if no previous item exists or the collection is empty.
* — The previous item of iteration or undefined if no such item exists.
|
| remove | () | method |
public function remove():Boolean
Removes the current item from the collection if any.
ReturnsBoolean — true if an item has been removed.
|
| start | () | method |
public function start():void
Resets the iterator to the position before the first item.
The first item of the collection is then returned with a subsequent
call to next()
.


Icon of the Present:
########################
%name1%: Why did the Kamael have to hide themselves in the first place?
N: I cannot tell you that now. You will know later, when you have advanced sufficiently to learn the Kamael's "Lost History."
Our story here is finished. Find the Icon of the Future somewhere within this Nornil's Cave to hear more. The password for the Icon of the Future is "CHAOS". Do not forget!
########################