|
THE GUILTY PLEASURES OF
REUNIONS--LA LAW: THE MOVIE
By Michael Asimow
Ever gone to a high school
reunion?
Or you can revel in how the ones who were most popular and successful
in high school have struggled to get by in later life.
Similar
pleasures attended the tenth reunion of the law firm of McKenzie,
Brackman. Here they were--most of the old cast members of LA
Law--together again! Why, it was the very same crowd that
spent an hour a week in our living room from 1986 to 1994 (before
the show fizzled out amid a departure of key cast members and
an epidemic of weak scripts). And now we find out what's happened
to each of them in the ensuing ten years. This was the show that
was a ratings sensation in its early years and attracted hordes
of money-hungry applicants to the law schools.
How wonderful to see these
old friends again! Leland McKenzie has retired and is clipping
roses in Montecito but Douglas Brackman is still managing partner.
Indeed, Douglas' son is now an associate with the firm, but he
doesn't exactly share Douglas' bottom-line approach to law. Michael
Kuzak has left the firm and now runs a successful bar (Michael
gave up the law after a client for whom he had won an acquittal
raped and killed a new victim). Arnie Becker--yes, good old Arnie--is
going through a divorce from his much younger wife. Stuart Markowitz
and Ann Kelsey--who are still married and have a kid at Crossroads
School--have opened their hearts (and their checking account)
to their guru. Benny Stulwicz --still there, fetching Starbucks
and Krispy Kremes for the staff. Roxanne, now the office manager,
is still having problems with her dorky ex, Dave. Grace Van Owen
has become Los Angeles DA and is as tough and tight-lipped as
ever. And so on.
But wait--they look so much
older than when we saw them last! Roxanne has put on a lot of
weight and Arnie has lost his hair. He's just not the hunk he
used to be. Douglas and Leland look much older. Grace, Stuart
and Ann are aging, too. Michael Kuzak looks terrific.
The reunion movie wasn't one
of the best LA Laws (at least as I recall them) but it wasn't
bad either. I thought the energy level was quite a bit lower
than the way I remembered it. The main story involved Kuzak's
coming out of retirement to handle a stay of execution for a
client he had represented years ago. Entertainingly, but implausibly,
Kuzak manages to establish that the client was framed; he walks
out of the courtroom a free man. Grace is defeated again! (But
will former lovers Michael and Grace get together again??) Stuart
and Anne are ripped off by their guru. Arnie discovers his wife
(from whom he is separated) in bed with another man and declares
war. He's going to fight the divorce to the bitter end, demand
all of the property, seek custody of the dogs (whom he detests).
Abby Perkins (who now has her
own law firm) emerges to represent Arnie's wife--and shows up
with eight forensic accountants to audit McKenzie, Brackman and
establish the value of Arnie's interest in the firm. Dave contacts
Roxanne and announces that he has cancer and has only a few weeks
left; can she shelter him in his last days? (Or is he still just
the old scam artist?) A new female associate is on the make for
Ann's client and Arnie's body. So there is an abundance of thematic
material in the reunion show. It is somewhat like Bartok's Concerto
for Orchestra--everybody gets to play a solo.
So how come we have such fond memories for this TV show that
was really part law story, part soap opera? Watching the reunion
show brought back some of the reasons.
First, LA Law opened
the way for the type of law shows on TV that we now take for
granted. Prior to LA Law, lawyers on TV were solo practitioners,
often in the painfully formulaic Perry Mason or Matlock mode.
Like The Defenders from the 1960's, none of the TV lawyers
ever appeared to care about money and none ever had an ethical
problem. LA Law was about law the way it's practiced today--in
firms, for dollars. Today, we want our TV lawyers to be realistic.
We know that the law is full of shadowy ethical conflicts without
simple answers, that the adversary system often conceals the
truth and produces injustice, that clients are not all innocent
or even decent people, and that practicing law is a tough and
very stressful way to make a living. Lawyers on TV (and in real
life) often wonder what they hell they are doing with their lives.
We would never have The Practice or Law & Order
if LA Law had not gone first.
Second, LA Law did a
great job in probing the business v. profession conflict that
is at the root of the problems of law practice today. Is law
just another profit-making business--no different from selling
advertising or sweaters--or is it still a "profession"?
Should you extract every possible dollar from every client by
overbilling or charging $2 per page for sending or receiving
faxes? Or do the old ideas of professionalism still hold, such
as putting the client's interest before the lawyer's, maintaining
some independence from clients, or recognizing the obligation
to do pro bono work? This is the era of mega-firms, soaring associate
salaries, seven-figure profit shares, 2400 billable hours a year,
disappearing civility, and brutal competition among lawyers and
within law firms. In this Darwinian world, the business model
holds sway and the professional model has nearly collapsed. .
On LA Law, we saw the
business/profession battle being fought out within the partnership
every week. Brackman was always bottom line; all that counted
were billable hours, collecting fees, avoiding clients who couldn't
pay. Arnie Becker was always interested in pumping up the hours
and turning friendly divorces into lucrative vendettas. Before
her untimely demise, Rosalind Shays carried the profit incentive
to the max. On the other hand, McKenzie often stuck up for the
professional model, aided by Michael Kuzak and Ann Kelsey.
This old struggle played out
well in the reunion show. Kuzak wanted to represent his former
client in the death penalty hearing but he needed backup from
the firm. Brackman wouldn't hear of it. After all, Kuzak hasn't
worked there for years, the firm doesn't do criminal law (at
least not that kind of criminal law), and this client can't pay
a nickel. Kuzak goes to the retired McKenzie for support and
also gets enthusiastic backing from Markowitz and Brackman's
son. Well, folks, Douglas Brackman is the way law is practiced
today. It's pretty much all bottom line. Pro bono and all that
soft stuff is shoved aside.
Third, LA Law was the
first of the law shows to deal with the personal life of its
characters, as The Practice continues to do. Perry
Mason and The Defenders apparently had no lives outside
the office (Law & Order maintains this tradition).
But the lawyers of LA Law were all too human. Just because
they were great lawyers did not make them great human beings
or give them good judgment about their lives. Indeed, their personal
lives were mostly a shambles. And so it is in real life too.
Many lawyers today have no time for a personal life, much less
a life-style, and don't know how to spend all that money (once
they've paid back their six-figure student loans). The rates
of alcoholism and drug abuse among lawyers are far higher than
in the general population.
In the reunion show, we see
smart lawyers acting like personal idiots. Take a tax lawyer
like Stuart Markowitz--he'd watch out for a client's every nickel.
Yet Stuart and Ann give their guru the power to draw from their
checking account for his new building project!
So it was with nostalgic feelings
and guilty delight that this aging LA Law fan welcomed
his aging friends from McKenzie, Brackman back into his living
room. Who knows? Maybe we'll all see each again at the twentieth
reunion.
Posted: May 21, 2002
|


I'm a software developer and development manager at IBM in Böblingen near Stuttgart, Germany. Working in IBMs Cloud Software development team. In my private live I'm a father of three kids, husband, enthusiast about all kinds of sports such as Volleyball, biking, swimming and live the universe and everything.
I'm just starting this page. Meanwhile you find some traces at different places in the net like:
Twitter
connect on LinkedIn or Xing
,
developerWorks.com
Google+
shared views on Panoramio,
and notes on live, the universe and everthing on Facebook.


Comments
-
Greg Hurrell
Current behaviour:
Match
class returnstrue
formatches?
with empty search string.Matcher
class uses alphabetical sorting insorted_matches_for
method when search string is empty.
So, would need to:
- Make
Match
class returnfalse
formatches?
when any path component in the path begins with a dot, unless the search string contains a dot - Make
Matcher
class use alphabetical sorting insorted_matches_for
not only for empty search strings but also for search strings which contain only a dot
And I think with those changes we'll basically have the desired behavior.
-
Greg Hurrell
Summary changed:
- From: Don't show dotfiles unless query starts with a dot
- To: Don't show dotfiles unless query contains a dot
-
Greg Hurrell
Note might be one tiny little gotcha with the "only if contains a dot" requirement; namely, that the offset corresponding to the dot must actually match up with a dot at the beginning of a path component.
ie. given:
foo/bar/.secret/baz
And abbrev:
fb.baz
We want to match.
But given:
foo/bar/wincent.com/.secret/baz foo/bar/wincent.com/baz foo/bar/.secret/baz
Is it really so clear which one we are expecting to match? Maybe the user does want the first result, but because the first dot appears in the middle of a component, they won't be shown the match if we impose that restriction on "must actually match up with a dot at the beginning of a path component". Alternatively, maybe they don't care about invisible files at all. How can we know this?
The pitfall here is given paths like:
.Trash/wanted.docs/other/map/baz web/wincent.com/baz
And a search string like:
w.comb
It's hard to know which one the user really wanted, and if they actually care to see hidden files at all.
Will need to think more on this.
-
Greg Hurrell
To summarize:
- if we require the dot to be at the start of the search string we lose the ability to search by specifying chars in the entire path
eg. can't search for:
foo/bar/xyz/.gitignore
with:
fbz.g
- if we allow the dot anywhere then we might be pulling in a whole bunch of rubbish we're not interested in
eg. thousands of files under:
.cpan/...
For an innocent query like:
foo.c
-
Greg Hurrell
I guess in most working directories the number of dotfiles isn't high enough that pulling in too many dotfiles by accident is much of a problem.
It only is a problem with pathological cases like the home directory with literally thousands of files inside dot directories (mine, for example, has about 12k paths that are either dot files or are an item inside a dot directory hierarchy).
So I guess we have to optimize the design for the most common workflow.
-
Greg Hurrell
Two thoughts have occurred to me.
One: even though this approach of displaying dot files whenever a period appears may end up with some "false positives", it's still better than what we have now (where we always show dotfiles).
Two: there might actually be a fairly elegant algorithm for checking whether to display a dotfile or not, which I will describe below.
Basically, in pseudo-code:
# this is the Match class, when deciding whether or not # to classify something as a match if match contains a dot at the beginning of any path component (note that this conditional doesn't require a separate pass through the string, it can be done on the initial pass while trying to detect a match; we flag such strings for a separate pass through the string as described here) scan through each letter of query string if character is a dot if offset is zero this is a path starting with a dot: we have a match! else look up character just to left (offset - 1) if it is a path separator (/) this is a path component starting with a dot: we have a match! else this particular dot isn't enough to consider this a match but seeing as the match algorithm always picks the leftmost match there might actually be another qualifying dot up ahead before the next match... so: scan ahead up to but not including next matched offset if we see a dot before we hit the next offset and if that dot is right after a path separator then we have a match end end end end end
-
Greg Hurrell
Applying the algorithm to the examples cited so far in the thread:
Path:
stuff/.gitignore
(filtered)
Queries:
sgi
: no match (good)s.gi
: match (good)
Paths:
foo/bar/.secret/baz
(filtered)foo/bar/wincent.com/.secret/baz
(filtered)foo/bar/wincent.com/baz
foo/bar/.secret/baz
(filtered)
Query:
fb.baz
: finds paths 1 (good), 2 (good), 3 (good) and 4 (good)
Paths:
.Trash/wanted.docs/other/map/baz
(filtered)web/wincent.com/baz
Query:
w.comb
: finds path 2 (good) but not path 1 (good)
Path:
foo/bar/xyz/.gitignore
(filtered)
Query:
fbz.g
: finds path (good)
So looks to be pretty good.
-
Greg Hurrell
Implemented. Will mark as closed.
-
Greg Hurrell
Status changed:
- From: new
- To: closed
Add a comment
Comments are now closed for this issue.


Nice and short headline
Foo bar baz.
This header has a verrry verrry verrry verrry verrry verrry verrry verrry verrry verrry verrry verrry verrry verrry verrry verrry long heading
This xHeader has a lot of whitespace, but it's still short


The information of this website is for information purposes only. While we endeavour to keep the information up to date and correct, we make no warranties
of any kind, express or implied, about the completeness, accuracy, reliability, suitability or availability with respect to the website or the information,
products, services, or related graphics contained on the website for any purpose. Any reliance you place on such information is therefore strictly at your
own risk.
In no event will we be liable for any loss or damage including without limitation, indirect or consequential loss or damage, or any loss or damage
whatsoever arising from loss of data or profits arising out of, or in connection with, the use of this website.
Through this website you are able to link to other websites which are not under the control of AGORA. We have no control over the nature, content and
availability of those sites. The inclusion of any links does not imply a recommendation or endorse the views expressed within them.
Additionally, through AGORA you have access to source code either in the form of code fragments or files or whole projects. Note that any of the
aforementioned code may be subject to copyright and/or may have a specific license. In no event will we be liable for the use of any code either if it is
compliant or not with the licensing and copyright provided for it.
Every effort is made to keep the website up and running. However, we take no responsibility for, and will not be liable for, the website being temporarily
unavailable due to technical issues beyond our control.
Finally, our service respects the privacy of its online visitors. AGORA collects data anonymously in order to create useful analytics and thus
improve the offered service and advance scientific research. As such, we retain the right to use the anonymously collected data and even share the
information with other parties without restriction. Note, however, that no personally identifiable information is collected.
This disclaimer and privacy policy were last updated on 21/02/2017. Please refer back to this page for any changes.


R/input.R
get_link_operators_from_models_dir.Rd
Use this function to merge the link operator data used in the boolean equations
of the models into a single data.frame
object. Every boolean model is defined by a series
of boolean equations in the form \(Target *= (Activator or Activator or...)
and not (Inhibitor or Inhibitor or...)"\). The link operator can be
either and not, or not or non-existent if the target has only
activating regulators or only inhibiting ones (the not remains in the
latter case). The models are loaded from .gitsbe files (and only these)
that can be found inside the given models.dir
directory.
get_link_operators_from_models_dir( models.dir, remove.equations.without.link.operator = TRUE )
| models.dir | string. A directory path with .gitsbe files/models. Do not include the ending path character in the string (/). |
|---|---|
| remove.equations.without.link.operator | logical. Should we keep the nodes (columns in the returned matrix) which do not have both type of regulators (so no link operator)? Default value: TRUE (remove these nodes). |
a data.frame
(nxm) with n models and m nodes. The row names
specify the models' names whereas the column names specify the
network nodes (gene, proteins, etc.). Possible values for each model-node
element are either 0 (and not link operator), 1
(or not link operator) or 0.5 if the node is not targeted by
both activating and inhibiting regulators (no link operator).
models.dir = system.file("extdata", "models", package = "emba", mustWork = TRUE) models.link.operator = get_link_operators_from_models_dir(models.dir) models.link.operator.with.extra.nodes = get_link_operators_from_models_dir(models.dir, FALSE)


My Dating Website
Home
Personal Information
First Name
{{ @errors['fname'] }}
Last Name
{{ @errors['lname'] }}
Age
{{ @errors['age'] }}
Gender
checked = "checked" >{{ @genderOption }}
Phone Number
{{ @errors['phone'] }}
Sign me up for a Premium account!
Note:
All information is protected by our
privacy policy
. Profile information can only be viewed by others with your permission.
Next >


Done!
Help us improving Blockpass, let us know how was your experience by filling this survey:
Join our Telegram group
USER INSTRUCTIONS
1
Download Blockpass mobile app
2
Create your identity
3
Click Verify with Blockpass
4
Scan the QR Code with app
5
Confirm registration in app


AppearedViewControllerState
public class AppearedViewControllerState: ViewControllerState
Appeared UIViewController state.
-
Undocumented
Declaration
Swift
public override func isValidNext<S: State>(state type: S.Type) -> Bool


nss - Name Service Switch configuration file
Each call to a function which retrieves data from a system database like the
password or group database is handled by the Name Service Switch
implementation in the GNU C library. The various services provided are
implemented by independent modules, each of which naturally varies widely from
the other.
The default implementations coming with the GNU C library are by
default conservative and do not use unsafe data. This might be very costly
in some situations, especially when the databases are large. Some modules
allow the system administrator to request taking shortcuts if these are
known to be safe. It is then the system administrator's responsibility to
ensure the assumption is correct.
There are other modules where the implementation changed over
time. If an implementation used to sacrifice speed for memory consumption,
it might create problems if the preference is switched.
The /etc/default/nss file contains a number of variable
assignments. Each variable controls the behavior of one or more NSS modules.
White spaces are ignored. Lines beginning with '#' are treated as
comments.
The variables currently recognized are:
- NETID_AUTHORITATIVE = TRUE|FALSE
- If set to TRUE, the NIS backend for the initgroups(3) function will
accept the information from the netid.byname NIS map as
authoritative. This can speed up the function significantly if the
group.byname map is large. The content of the netid.byname
map is used as is. The system administrator has to make sure it is
correctly generated.
- SERVICES_AUTHORITATIVE = TRUE|FALSE
- If set to TRUE, the NIS backend for the getservbyname(3) and
getservbyname_r(3) functions will assume that the
services.byservicename NIS map exists and is authoritative,
particularly that it contains both keys with /proto and without /proto for
both primary service names and service aliases. The system administrator
has to make sure it is correctly generated.
- SETENT_BATCH_READ = TRUE|FALSE
- If set to TRUE, the NIS backend for the setpwent(3) and
setgrent(3) functions will read the entire database at once and
then hand out the requests one by one from memory with every corresponding
getpwent(3) or getgrent(3) call respectively. Otherwise,
each getpwent(3) or getgrent(3) call might result in a
network communication with the server to get the next entry.
The default configuration corresponds to the following configuration file:
NETID_AUTHORITATIVE=FALSE
SERVICES_AUTHORITATIVE=FALSE
SETENT_BATCH_READ=FALSE
This page is part of release 5.05 of the Linux man-pages project. A
description of the project, information about reporting bugs, and the latest
version of this page, can be found at https://www.kernel.org/doc/man-pages/.


KindTrust is a decentralized crowdfunding platform built using a Solidity smart contract that is deployed on the Ethereum blockchain. Users can analyze, donate to, and rate crowdfunding projects. Organizations can create projects and transfer donated funds to registered suppliers. Everything is decentralized, which produces five major benefits over traditional crowdfunding platforms.
On the backend there is a Solidity smart contract that maintains state for organizations, crowdfunding projects, suppliers, purchases, donors, and the platform itself (e.g. total money donated). Images and long descriptions are stored on IPFS, and their corresponding hashes are stored in the blockchain.
The frontend consists of mobile apps that integrate with the backend via web3 and IPFS.
Concepting
Kindtrust was created to address current problems in the crowdfunding space, as well as act complentary to government and nonprofit aid. It is a platform, as well as a vehicle to change how the world gives and receives. Our value proposition is as follows:
User Personas
An interview of 20 individuals, both donors and campaign-starters, was conducted to collect data about sentiments concerning crowdfunding. Example questions were as such:
Through this information, several user personas were constructed to emobody the key motivations of individuals who have used crowdfunding platforms. Most donors noted the lack of transparency on current platforms with no tools to ensure accountability. Others were shut out completely by the lack of accessibility to crowdfunding as most platforms only operate in ~14 Western countries. Most importantly, users' main motivation was 'ownership', whether they were a donor or campaign-starter. Donors wanted to see the direct impact of their money, and campaign-starters desired immediate relief in time-sensitive situations.
User Scenario Map for Demo
For World Virtual Govhack, a user scenario map was created to outline the steps that best exemplify Kindtrust's value proposition.
Wireframes
From there, wireframes were constructed to not only lay the baseline for our platform, but also generate new features and better UI for the crowdfunding experience. While wireframes were initially created for desktops, we later decided to showcase our demo on a phone to display the accessibility and real-time application of Kindtrust.
Mockups & Prototyping
Finally, mockups and a working prototype were created to help our users truly visualize the experience of Kindtrust. This prototype was intended for smartphones, but we understand that not everyone in need has access to technology. By creating a browser platform in conjunction to an SMS app, we believe we can reach areas that are already employing mobile banking despite other technological barriers, i.e. Nigeria, South Africa, Kenya, etc.


Provides a set of responsive widgets built on top of jQuery UI and styled with Bootstrap 3. Use RichWidgets to bring rich and complex functionality to your web applications!
Learn More


Text2Process
We are generating your Petrinet.
What is Text2Process?
It generates a Workflow Petrinet based on a plain text description!
This is a Demo of a Functionality in the
WoPeD
tool
Try it out. Type a Text, that describes a business process and click generate.


If you're new to Mesos
See the getting started page for more information about downloading, building, and deploying Mesos.
If you'd like to get involved or you're looking for support
See our community page for more details.
Supporting Container Images in Mesos Containerizer
Motivation
Mesos currently supports several containerizers, notably the Mesos containerizer and the Docker containerizer. Mesos containerizer uses native OS features directly to provide isolation between containers, while Docker containerizer delegates container management to the Docker engine.
Maintaining two containerizers is hard. For instance, when we add new features to Mesos (e.g., persistent volumes, disk isolation), it becomes a burden to update both containerizers. Even worse, sometimes the isolation on some resources (e.g., network handles on an agent) requires coordination between two containerizers, which is very hard to implement in practice. In addition, we found that extending and customizing isolation for containers launched by Docker engine is difficult, mainly because we do not have a way to inject logics during the life cycle of a container.
Therefore, we made an effort to unify containerizers in Mesos (MESOS-2840, a.k.a. the Universal Containerizer). We improved Mesos containerizer so that it now supports launching containers that specify container images (e.g., Docker/Appc images).
Getting Started
To support container images, we introduced a new component in Mesos containerizer, called image provisioner. Image provisioner is responsible for pulling, caching and preparing container root filesystems. It also extracts runtime configurations from container images which will then be passed to the corresponding isolators for proper isolation.
There are a few container image specifications, notably Docker, Appc, and OCI (future). Currently, we support Docker and Appc images. More details about what features are supported or not can be found in the following sections.
NOTE: container image is only supported on Linux currently.
Configure the agent
To enable container image support in Mesos containerizer, the operator
will need to specify the --image_providers
agent flag which tells
Mesos containerizer what types of container images are allowed. For
example, setting --image_providers=docker
allow containers to use
Docker images. The operators can also specify multiple container image
types. For instance, --image_providers=docker,appc
allows both
Docker and Appc container images.
A few isolators need to be turned on in order to provide proper
isolation according to the runtime configurations specified in the
container image. The operator needs to add the following isolators to
the --isolation
flag.
filesystem/linux
: This is needed because supporting container images involves changing filesystem root, and onlyfilesystem/linux
support that currently. Note that this isolator requires root permission.docker/runtime
: This is used to provide support for runtime configurations specified in Docker images (e.g., Entrypoint/Cmd, environment variables, etc.). See more details about this isolator in Mesos containerizer doc. Note that if this isolator is not specified and--image_providers
containsdocker
, the agent will refuse to start.
In summary, to enable container image support in Mesos containerizer, please specify the following agent flags:
$ sudo mesos-agent \
--containerizers=mesos \
--image_providers=appc,docker \
--isolation=filesystem/linux,docker/runtime
Framework API
We introduced a new protobuf message Image
which allow frameworks to
specify container images for their containers. It has two types right
now: APPC
and DOCKER
, representing Appc and Docker images
respectively.
For Appc images, the name
and labels
are what described in the
spec.
For Docker images, the name
is the Docker image reference in the
following form (the same format expected by docker pull
):
[REGISTRY_HOST[:REGISTRY_PORT]/]REPOSITORY[:TAG|@DIGEST]
message Image {
enum Type {
APPC = 1;
DOCKER = 2;
}
message Appc {
required string name = 1;
optional Labels labels = 3;
}
message Docker {
required string name = 1;
}
required Type type = 1;
// Only one of the following image messages should be set to match
// the type.
optional Appc appc = 2;
optional Docker docker = 3;
}
The framework needs to specify MesosInfo
in ContainerInfo
in order
to launch containers with container images. In other words, the
framework needs to set the type to ContainerInfo.MESOS
, indicating
that it wants to use the Mesos containerizer. If MesosInfo.image
is
not specified, the container will use the host filesystem. If
MesosInfo.image
is specified, it will be used as the container
image when launching the container.
message ContainerInfo {
enum Type {
DOCKER = 1;
MESOS = 2;
}
message MesosInfo {
optional Image image = 1;
}
required Type type = 1;
optional MesosInfo mesos = 5;
}
Test it out!
First, start the Mesos master:
$ sudo sbin/mesos-master --work_dir=/tmp/mesos/master
Then, start the Mesos agent:
$ sudo GLOG_v=1 sbin/mesos-agent \
--master=<MASTER_IP>:5050 \
--isolation=docker/runtime,filesystem/linux \
--work_dir=/tmp/mesos/agent \
--image_providers=docker \
--executor_environment_variables="{}"
Now, use Mesos CLI (i.e., mesos-execute) to launch a Docker container
(e.g., redis). Note that --shell=false
tells Mesos to use the
default entrypoint and cmd specified in the Docker image.
$ sudo bin/mesos-execute \
--master=<MASTER_IP>:5050 \
--name=test \
--docker_image=library/redis \
--shell=false
Verify if your container is running by launching a redis client:
$ sudo docker run -ti --net=host redis redis-cli
<IP_ADDRESS>:6379> ping
PONG
<IP_ADDRESS>:6379>
Docker Support and Current Limitations
Image provisioner uses Docker v2 registry
API to fetch Docker
images/layers. The fetching is based on curl
, therefore SSL is
automatically handled. For private registries, the operator needs to
configure curl
accordingly so that it knows where to find the
additional certificate files.
Fetching requiring authentication is supported through the
--docker_config
agent flag. Starting from 1.0, operators can use
this agent flag to specify a shared docker config file, which is
used for pulling private repositories with authentication. Per
container credential is not supported yet (coming soon).
Operators can either specify the flag as an absolute path pointing to
the docker config file (need to manually configure
.docker/config.json
or .dockercfg
on each agent), or specify the
flag as a JSON-formatted string. See configuration
documentation for detail. For example:
--docker_config=file:///home/vagrant/.docker/config.json
or as a JSON object,
--docker_config="{ \
\"auths\": { \
\"https://index.docker.io/v1/\": { \
\"auth\": \"xXxXxXxXxXx=\", \
\"email\"<EMAIL_ADDRESS>\
} \
} \
}"
Private registry is supported either through the --docker_registry
agent flag, or specifying private registry for each container using
image name <REGISTRY>/<REPOSITORY>
(e.g.,
localhost:80/gilbert/inky:latest
). If <REGISTRY>
is included as
a prefix in the image name, the registry specified through the agent
flag --docker_registry
will be ignored.
If the --docker_registry
agent flag points to a local directory
(e.g., /tmp/mesos/images/docker
), the provisioner will pull Docker
images from local filesystem, assuming Docker archives (result of
docker save
) are stored there based on the image name and tag. For
example, the operator can put a busybox:latest.tar
(the result of
docker save -o busybox:latest.tar busybox
) under
/tmp/mesos/images/docker
and launch the agent by specifying
--docker_registry=/tmp/mesos/images/docker
. Then the framework can
launch a Docker container by specifying busybox:latest
as the name
of the Docker image.
If the --switch_user
flag is set on the agent and the framework
specifies a user (either CommandInfo.user
or FrameworkInfo.user
),
we expect that user exists in the container image and its uid and gids
matches that on the host. User namespace and capabilities are not
supported yet.
Only host network is supported. We will add bridge network support soon using CNI support in Mesos (MESOS-4641).
More agent flags
--docker_registry
: The default URL for pulling Docker images. It
could either be a Docker registry server URL (i.e:
https://registry.docker.io
), or a local path (i.e:
/tmp/docker/images
) in which Docker image archives (result of
docker save
) are stored. The default value is
https://registry-1.docker.io
.
--docker_store_dir
: Directory the Docker provisioner will store
images in. All the Docker images are cached under this directory. The
default value is /tmp/mesos/store/docker
.
--docker_config
: The default docker config file for agent. Can
be provided either as an absolute path pointing to the agent local
docker config file, or as a JSON-formatted string. The format of
the docker config file should be identical to docker’s default one
(e.g., either $HOME/.docker/config.json
or $HOME/.dockercfg
).
Appc Support and Current Limitations
Currently, only the root filesystem specified in the Appc image is supported. Other runtime configurations like environment variables, exec, working directory are not supported yet (coming soon).
For image discovery, we current support a simple discovery mechanism.
We allow operators to specify a URI prefix which will be prepend to
the URI template {name}-{version}-{os}-{arch}.{ext}
. For example, if
the URI prefix is file:///tmp/appc/
and the Appc image name is
example.com/reduce-worker
with version:1.0.0
, we will fetch the
image at file:///tmp/appc/example.com/reduce-worker-1.0.0.aci
.
More agent flags
appc_simple_discovery_uri_prefix
: URI prefix to be used for simple
discovery of appc images, e.g., http://
, https://
,
hdfs://<hostname>:9000/user/abc/cde
. The default value is http://
.
appc_store_dir
: Directory the appc provisioner will store images in.
All the Appc images are cached under this directory. The default value
is /tmp/mesos/store/appc
.
Provisioner Backends
A provisioner backend takes a set of filesystem layers and stacks them
into a root filesystem. Currently, we support the following backends:
copy
, bind
, overlay
and aufs
. Mesos will validate if the
selected backend works with the underlying filesystem (the filesystem
used by the image store --docker_store_dir
or --appc_store_dir
)
using the following logic table:
+---------+--------------+------------------------------------------+
| Backend | Suggested on | Disabled on |
+---------+--------------+------------------------------------------+
| aufs | ext4 xfs | btrfs aufs eCryptfs |
| overlay | ext4 xfs | btrfs aufs overlay overlay2 zfs eCryptfs |
| bind | | N/A(`--sandbox_directory' must exist) |
| copy | | N/A |
+---------+--------------+------------------------------------------+
The provisioner backend can be specified through the agent flag
--provisioner_image_backend
. If not set, Mesos will select the best
backend automatically for the users/operators. The selection logic is
as following:
1. Use `overlay` backend if the overlayfs is available.
2. Use `aufs` backend if the aufs is available and overlayfs is not supported.
3. Use `copy` backend if none of above is selected.
Copy
The Copy backend simply copies all the layers into a target root directory to create a root filesystem.
Bind
This is a specialized backend that may be useful for deployments using large (multi-GB) single-layer images and where more recent kernel features such as overlayfs are not available. For small images (10’s to 100’s of MB) the copy backend may be sufficient. Bind backend is faster than Copy as it requires nearly zero IO.
The bind backend currently has these two limitations:
The bind backend supports only a single layer. Multi-layer images will fail to provision and the container will fail to launch!
The filesystem is read-only because all containers using this image share the source. Select writable areas can be achieved by mounting read-write volumes to places like
/tmp
,/var/tmp
,/home
, etc. using theContainerInfo
. These can be relative to the executor work directory. Since the filesystem is read-only,--sandbox_directory
and/tmp
must already exist within the filesystem because the filesystem isolator is unable to create it (e.g., either the image writer needs to create the mount point in the image, or the operator needs to set agent flag--sandbox_directory
properly).
Overlay
The reason overlay backend was introduced is because the copy backend will waste IO and space while the bind backend can only deal with one layer. The overlay backend allows containizer to utilize the filesystem to merge multiple filesystems into one efficiently.
The overlay backend depends on support for multiple lower layers, which requires Linux kernel version 4.0 or later. For more information of overlayfs, please refer to here.
AUFS
The reason AUFS is introduced is because overlayfs support hasn’t been merged until kernel 3.18 and Docker’s default storage backend for ubuntu 14.04 is AUFS.
Like overlayfs, AUFS is also a unioned file system, which is very stable, has a lot of real-world deployments, and has strong community support.
Some Linux distributions do not support AUFS. This is usually because AUFS is not included in the mainline (upstream) Linux kernel.
For more information of AUFS, please refer to here.
Executor Dependencies in a Container Image
Mesos has this concept of executors. All tasks are launched by an executor. For a general purpose executor (e.g., thermos) of a framework (e.g., Aurora), requiring it and all its dependencies to be present in all possible container images that a user might use is not trivial.
In order to solve this issue, we propose a solution where we allow the
executor to run on the host filesystem (without a container image).
Instead, it can specify a volume
whose source is an Image
. Mesos
containerizer will provision the image
specified in the volume
,
and mount it under the sandbox directory. The executor can perform
pivot_root
or chroot
itself to enter the container root
filesystem.
References
For more information on the Mesos containerizer filesystem, namespace, and isolator features, visit Mesos Containerizer. For more information on launching Docker containers through the Docker containerizer, visit Docker Containerizer.


The illusion of reusability be a harsh mistress
Reusable libraries are often created to reduce development workload across multiple teams.
Reusable items in the library can be used in an almost-infinite combination of scenarios (both currently known & possible new future scenarios), which presents a unique challenge - how do we design to accommodate for all scenarios?
And on top of the scenario challenge, devs also need to ensure the library consumers can actually use it without having to make unreasonable tradeoffs. Flexibility. That way it presents an attractable alternative in project plans.
To solve both the scenario & flexibility challenges, library devs often intentionally make the reusable items simpler, & defer extra behaviour/options to the consumer (e.g.: Facebook has done a fantastic job of Reacts’ composition vs inheritance).
This post explores an example of reusable library development hell - a reusable front-end component library.
Simple example
You are part of the dev team that needs to deliver 1 component - a button:
<button>My button</button>
No requirement for padding or margin yet.
The devs huddle around, & decide to maximize consumer dev speed by hard-coding options. In this case, the devs (us/we) have decided to hard-code padding & margin:
- Green = padding
- Orange = margin
Now the consumers can just copy-paste the component, right? They dont even need to set padding or margin themselves - what a time saver!
At the moment, it only needs to be used in 1
product with 3
specific scenarios.
We cross-check with wireframes The UI team sent us, just to ensure our button can be re-used in the necessary scenarios:
Wrapper elements beside & below our button
Wrapper element beside our button
2 wrapper elements above our button, with vertical spacing between (to be consistent with the bottom margin of our button)
It seems our consumers can use our reusable button in all 3 scenarios.
- We deliver the component library.
- The consumers copy-paste the button in their 1 product.
- Our component, great success! Pop the champagne!
No probs with the hard-coding the margin or padding.
In fact… the UI team praises how easy it was to use & how much time it saved them. Salary raises for all!
Fast forward a year. Now the company wants to ship a new product. Its competing against a potential competitor product, so time-to-market for this new product is critical. The UI & our (dev) teams choose our fancy reusable library (with our button) to speed things up. We just had a pleasant experience with it, why not?.
Once again, the UI team sends us wireframes, & we cross-verify them to ensure our reusable button is still re-usable. Analysis finds that our reusable button now needs to work with 1 additional product, containing 3 NEW scenarios:
Button is used inside an element with padding. Due to both the buttons bottom margin & wrapper bottom padding, we have this weird extra gap between the button & the bottom of the wrapper.
Our "reusable" button is re-used twice & placed side-by-side. There is 2x the expected space between them.
The consumer wants to have a slightly thinner button (a real-world example of this is using a re-usable button with different inner text). Since the padding & margin is hard-coded, we see our button with larger-than-life spacing. "Way too much whitespace" the UI team says.
 Our button can’t be re-used in these 3 new scenarios!
Eventually, the UI team gives feedback about not being able to use our so-called “reusable” component in the new concepts properly. Something about “ugly & inconsistent spacing”.
 Due to us hard-coding external & internal spacing (in an attempt to improve the reusability of the button), our consumers are forced to apply hacky workarounds that severely deplete the technical debt capacity of the entire company. Even projects not using this library may still be negatively impacted, especially if they need the staff resources which are now blocked on our current button issue.
When a reusable library cannot be reasonably reused, its possible that using it poses more downside than upside, thus making it not reusable.
If our consumers cant use our reusable button in a pleasing way, will they:
- Continue using the library going forward into future products?
- Is it adding tech debt each time they use it? Are there complaints in the UI team that isn’t being sent to us? (the dev team)
- Will the risk of company turnover in the UI department now increase due to our flaw?
- If someone chooses to use our library in their product, does it increase their schedule risk?
- Is our library actually a blocker? Perhaps this flaw is just getting started…
- If a consumer uses our library, is the cost worse than the potential benefit?
- And many other questions, including questioning the technical intelligence of our team.
As you can see, this is a very critical design flaw. Imagine a structural engineer designing a skyscraper, but it has a design flaw, such as misjudging the structural integrity of the base, exposing it to potential collapse & making it inhabitable. In this case, the consumers (inhabitants) won’t be able to inhabit the building…
Illusions
Depending on the type of mission-critical software you develop, the structural analogy above may be understating or overexaggerated. However the analogy still stands - our library design flaw definitely has a serious flaw.
We tried our best & attempted to maximize reusability by allowing consumers to copy-paste our component and have it work “out of the box”. Just like a plug-n-play Xbox controller with a PC.
We maximized reusability initially, but it was all an illusion. Our approach started backfiring when the 2nd product had to be supported. The problem, you see, is that our approach to reusability design isn’t scalable. And because of this unforeseen matter, we now need to re-write our component, re-deploy, re-test both products etc.
It gets even worse. In reality, reusable components are used in more than 2
products (6
scenarios). Developing successful reusable libraries is hard work, a tricky mistress. And we just created a prison without knowing it, & our team is now trapped inside, chewing on stale moldy bread & banging empty metal mugs against prison railings.
Prison break
If you recall, the 2 challenges our team had to overcome were:
- Support all necessary scenarios (current known future ones, as well as future unknown scenarios)
- Support consumers so that they can work at their best potential (i.e.: flexibility + productivity + creativity)
And we tried to overcome both challenges by hard-coding spacing. But due to our flawed approach to reusability design, we failed to overcome both challenges. It is, however, indeed possible to overcome both challenges SCALABLY.
Brilliance encased in simplicity
Think of Bootstrap. It is the epitome of reusable component web libraries (excluding native platform SDK’s). The components the library provides are super-simple. In fact, the components are so simple, it sometimes gets questionnable.
They’re so…. simple, right? They’re just basic wrappers around HTML elements with a tiny CSS class slapped on to provide a default styling “out of the box”. Stupid?  In fact, the simplicity is ABSOLUTELY brilliant.
Challenge #1: “Support all necessary scenarios (current known future ones, as well as future unknown scenarios)”
By having stupidly simple components, Bootstrap components are so flexible that they can be used in the significant majority of scenarios.
Challenge #2: “Support consumers so that they can work at their best potential (i.e.: flexibility + productivity + creativity)”
And since the html structure & styling is simple, consumers can apply their own styling to achieve their needs quickly. Need a different colour? A different font style? Different spacing? Different border? Different box sizing model? Bam, easy peasy.
Judging by the significant commercial adoption of Bootstrap, i’d say the Facebook devs used the CORRECT approach in designing reusable libraries, a truly scalable approach!
I didn’t hear no bell
Us & our team have been forced into a difficult situation - we now NEED to rewrite our reusable UI button to unblock our UI team, so that our company can beat the competitor to the market:
- With this new scalable reusability design approach in mind, lets approach the button design differently.
- Instead, we will make our button simpler, & defer extra options to consumers.
With this approach, we are hoping to overcome the 2 challenges in an inexpensive manner.
Again, lets revisit the 3 scenarios our button received complaints about:
Unscalable approach: Button is used inside an element with padding. Due to both the buttons bottom margin & wrapper bottom padding, we have this weird extra gap between the button & the bottom of the wrapper.
Scalable approach: our button no longer has extra bottom padding. The consumer has to write some extra lines of CSS, but they can use the button the exact way they want. They can now ACTUALLY USE our button!
Unscalable approach: Our "reusable" button is re-used twice & placed side-by-side. There is 2x the expected space between them.
Scalable approach: our button no longer specifies margin. The buttons neatly sit side-by-side & the UI team is relieved
Unscalable approach: The consumer wants to have a slightly thinner button (a real-world example of this is using a re-usable button with different inner text). Since the padding & margin is hard-coded, we see our button with larger-than-life spacing. "Way too much whitespace" the UI team says.
Scalable approach: our button no longer specifies padding or margin. The consumer is able to decrease the button width, & is able to define the button’s padding & margin in several ways to achieve their exact vision (e.g.: percentage of REM based on the button’s wrapper width)
Pats on the back for everyone. The consumers need to write a bit of extra code, but that overhead is so tiny considering the significant productivity advantage our “new” button provides. Now THATS a smart tradeoff. What a cracker!
We were able to apply our new scalable approach to reusability & overcome both challenges. Thank god!
“Whew, that was a close one!”
If consumers start facing serious business or technical issues, the library obviously has a critical design flaw. It needs to be addressed at some point, before it spirals out of control. If you caught onto the design issue early, good on you. And if you have the time to fix it today, then even better.
But ignoring the importance of design flaws like this can lead to…
Absolute disaster!
So what happens if critical design flaws are misunderstood & treated as “not important”?
1. Staff cant do their job to the best of their ability
Developers just end up creating their own reusable library, usually as a Skunkworks project, & start migrating over to it. Often, they are just frustrated by the business expense & take things into their own hands.
It can turn out surprisingly well (ignoring the business expense, stress from late nights & potential turnover). Then the old reusable library just gets left in the dust because it becomes an unattractive alternative during project planning.
Example: if a front-end “shared” component library requires designers to change their workflow, the time “saved” by developers using the reusable library is actually just shifted onto the designers. In this case, the reusable library does NOT actually save effort (because it just shifts extra work to someone else). From the library developers perspective, it saves time. From everyone elses perspective, its an absolute catastrophe! The responsibility unfortunately lies on the engineers in this case, which intentionally put those design flaws in place & let it be.
2. The technical debt eventually become too visible, & starts hindering development agility to the point where all current projects get dropped
Put simply, the reusable library gets thrown out & redone:
- Re-architect
- Re-design
- Re-write
- Re-integrate
- Re-test
- Re-deploy
Plus all those:
- meetings
- turnover
- ad-hoc dev chats
- the inevitable political pressure from upper management.
Conclusion
“There’s only a few problems so far, so lets keep going in this direction!”
If you ever hear this, keep in mind that its important to think long & hard on design decisions that can be potentially expensive in the future.
An approach of intentionally pushing design flaws to the side because “it makes my life easier” isn’t an acceptable approach. Companies rely on developers to be responsible & to act in the best interest of the company…
- Software is hard.
- Engineers make mistakes all the time.
- That is fine, it happens. I make mistakes too.
But intentionally making mistakes isn’t a responsible approach to development, ESPECIALLY if it comes at the expense of other teams, your company, & all your other colleagues that rely & put faith in you.


Changing your way of energizing the world!
-
#Be with us
You can allow us to install some pieces on your environment and make your office more sustainable!
-
#more friends
Proud to announce the partner CloudForest. Now new frontiers are going to appear, but we're growing to you.
-
#Run Henergi run
Henergi is now providing energy to racing track lighting on the biggest event of runners in Brazil, the São Silvestre one.


Changes recommended for winter grazing practices
by New Zealand GovernmentChanges recommended for winter grazing practices
Hon Damien O’Connor
Agriculture
A Taskforce has made 11 recommendations to improve animal welfare in intensive winter grazing farm systems, the Minister of Agriculture Damien O’Connor confirmed today.
“I established the Winter Grazing Taskforce in response to concerns about the impacts on animal welfare of some intensive winter grazing practices”, Mr O’Connor said.
“I asked the Taskforce to do a stocktake of the multiple initiatives that are already under way to promote good winter grazing and identify where we might work more together to improve practices.
The recommendations include:
• More work to understand and mitigate the long-term animal welfare consequences of intensive winter grazing practices
• Expand knowledge of barriers to adopting improved animal welfare practices
• More active surveillance to ensure animal welfare standards are being met
• The establishment of a pan-sector action group to implement the recommendations
“Winter crop grazing is necessary in some parts of the country to provide enough feed for stock at a time when there’s not a lot of pasture, but we must ensure farmers have the right tools and advice to ensure animal welfare.
“As a Government, we’re committed to working alongside farmers to maintain their ability to export on our valuable New Zealand brand and open up new trading markets. Our international reputation depends on getting this sort of thing right, as does our social licence to operate within New Zealand.
“Some farmers manage this system very well but for those who don’t – we’ve got to find a way of doing it better and help them do so.
“Following the taskforce’s report, I’ve asked the Ministry for Primary Industries (MPI) to work with farmers and industry groups to ensure farmers get the help they need.
“I know that many farmers are already changing and adapting their practice and I thank them for the effort. We want to help in that work.
“The next step will be the establishment of an action group to begin implementing the recommendations so we can see some progress next winter and beyond”.
Notes for editors
The recommendations made in the Taskforce report can be read in full on MPI’s website.
Taskforce members:
• Independent Chair: Dr John Hellstrom, ONZM
• Dr Arnja Dale, Chief Scientific Adviser, SPCA
• Dr Helen Beattie, Chief Veterinary Officer, NZ Veterinary Association
• Dr Stephen Hopkinson, dairy cattle vet & NZ Veterinary Association
• Ewen Mathieson, dairy farmer, Southland
• Pania King, sheep & beef farmer, Gisborne
• Dave Harrison, Beef+Lamb NZ
• Elaine Cook, Dairy NZ
• Dr Ross Monaghan, Senior Scientist, AgResearch
• Angus Robson, environment campaigner


"BAT" The Hebrew word (atalleph’) so rendered (Leviticus 11:19; Deuteronomy 14:18) implies “flying in the dark.” The bat is reckoned among the birds in the list of unclean animals. To cast idols to the “moles and to the bats” means to carry them into dark caverns or desolate places to which these animals resort (Isaiah 2:20), i.e., to consign them to desolation or ruin.
"BAT" The Hebrew word (atalleph’) so rendered (Leviticus 11:19; Deuteronomy 14:18) implies “flying in the dark.” The bat is reckoned among the birds in the list of unclean animals. To cast idols to the “moles and to the bats” means to carry them into dark caverns or desolate places to which these animals resort (Isaiah 2:20), i.e., to consign them to desolation or ruin.


First page Back Continue Last page Overview Image
WASM - Why
- Compact: has a binary format that is fast to transmit by being smaller than typical text or native code formats.
- Modular: programs can be split up in smaller parts that can be transmitted, cached, and consumed separately.
- Efficient: can be decoded, validated, and compiled in a fast single pass, equally with either just-in-time (JIT) or ahead-of-time (AOT) compilation.
- Streamable: allows decoding, validation, and compilation to begin as soon as possible, before all data has been seen.
- Parallelizable: allows decoding, validation, and compilation to be split into many independent parallel tasks.
- Portable: makes no architectural assumptions that are not broadly supported across modern hardware.
- https://webassembly.github.io/spec/core/intro/introduction.html#design-goals
3.


Demonstrating the method .htmlPrint using deeplearnjs
Using the code
Passing the variables: TheDiv, TheTitle, Table or Flattened, Fixed Decimals, Print html to console
Setup a Dynamic Tensor
const myWeights = new myTensor([],
,
[])
Then HTML Print Tensor
myWeights.htmlPrint('myDiv02',
,
,
)
Main page at https://hpssjellis.github.io/deeplearnjs-javascript-examples/
by Jeremy Ellis
Twitter https://twitter.com/rocksetta
Website http://rocksetta.com
Use at your own risk!


Variable Scope
When and Where to Use What and Why
1-10-2015
This week I learned all about variable scope. It was a concept that I had come across once or twice in my reading during Phase 0 thus far, but I hadn't paid it too much attention. Up until now, we were mostly using local and instance variables (I'll get into those in a bit), so I was familiar with those. Now, though, we were learning about global, class and constant variables. Two different kinds of variables I can handle no problem, but now there are five? I'll go through these variables one at a time, letting you know when to use each kind and why.
The first kind of variable we'll go over is probably the most often used, and that's a local variable. Local variables are only accessible inside the code construct in which they are declared. For example, a local variable declared in a method or within a loop cannot be accessed outside of that method or loop. Local variable names must always begin either with a lower case letter or an underscore. For example:
While the second two options are both acceptable, the first one is preferable for its readability. Most of the time, when you are defining a variable outside of a method or class, you are going to use a local variable. This variable will stay true for the duration of the program, as long as you call it outside of a method or class or redefine the variable.
local_variable = 5
_localvariable = 5
_LocalVariable = 5
The next kind of variable we'll discuss is the class variable. A class variable is one that is shared among all instances of a class. This means that only one variable value exists for all objects created from this class. If one object instance changes the value of the variable, that new value will change for all other instances of the object. Class variables are always declared by typing "@@" before the name of the variable. They should also begin with a lowercase letter after the @@ signs. For example:
Class variables are not nearly as common as instance variables, which we'll learn about next.
@@class_variable = 5 (acceptable)
@@Class_variable = 5 (unacceptable)
Instance variables are similar to class variables, except that their values are local to specific instances of an object. Instance variables are always declared by typing "@" before the name of the variable. They should also begin with a lowercase letter. For example:
In the case that a class contains an instance variable called @sum, if one instance of the object changes the current value of @sum, then the change is local to only the object that made the change. Other objects of the same class have their own local copies of the variable, which are independent of changes made in any other objects. Instance variables are used much more inside methods and classes than class variables are. As local variables are the ones most used outside of methods or classes, instance variables are the ones most used inside methods or classes.
@sum = 5 (acceptable)
@Sum = 5 (unacceptable)
Global variables in Ruby are accessible from anywhere in the life of a Ruby program, regardless of where they are declared. Global variables are declared by putting a dollar sign ($) in front of the variable name. For example:
The usage of global variables in highly discouraged. The problem with global variables is, not only are the visible anywhere in the code for a program, they can also be changed from anywhere in the application. This can make tracking bugs extremely difficult, because the programmer won't know where to look for the bug to fix.
$sum = 5 (acceptable)
$Sum = 5 (unacceptable)
The last kind of variable we'll discuss in this post is the constant variable. Constants in Ruby are variables which, once assigned a value, should not be changed. Unlike most other languages, a constant variable CAN be changed in Ruby, but the terminal will issue a warning message when the user attempts to change a constant variable. Constant variables assigned inside a class or module can be accessed only inside that class or module, while a constant variable assigned outside a class or module will take on the scope of a global variable. Constants may not be defined inside of methods. Constants are defined by using all capital letters. For example:
As with global variables, the use of constants is not advised. Like I mentioned before, local and instance variables will be the most commonly used.
CONSTANT = 10 (acceptable)
constant = 10 (unacceptable)
Throughout development, you are going to encounter several different types of variables, all with a different scope of when and where they should be used. Becoming familiar with the variables and what they can do will make your life as a developer much easier. Happy coding!


| write.ml {SparkR} | R Documentation |
Save the Bernoulli naive Bayes model to the input path.
Save the AFT survival regression model to the input path.
Save the generalized linear model to the input path.
Save the k-means model to the input path.
write.ml(object, path, ...) ## S4 method for signature 'NaiveBayesModel,character' write.ml(object, path, overwrite = FALSE) ## S4 method for signature 'AFTSurvivalRegressionModel,character' write.ml(object, path, overwrite = FALSE) ## S4 method for signature 'GeneralizedLinearRegressionModel,character' write.ml(object, path, overwrite = FALSE) ## S4 method for signature 'KMeansModel,character' write.ml(object, path, overwrite = FALSE)
object |
A fitted Bernoulli naive Bayes model |
path |
The directory where the model is saved |
overwrite |
Overwrites or not if the output path already exists. Default is FALSE which means throw exception if the output path exists. |
object |
A fitted AFT survival regression model |
path |
The directory where the model is saved |
overwrite |
Overwrites or not if the output path already exists. Default is FALSE which means throw exception if the output path exists. |
object |
A fitted generalized linear model |
path |
The directory where the model is saved |
overwrite |
Overwrites or not if the output path already exists. Default is FALSE which means throw exception if the output path exists. |
object |
A fitted k-means model |
path |
The directory where the model is saved |
overwrite |
Overwrites or not if the output path already exists.


BC Registries and Online Services are currently down for system maintenance. We apologize
for this temporary interruption in service. Please try again later.
In the meantime, you can find out more about BC Registries and Online Services by visiting
the Business Registry's website
.


Ghana's Nasiru Mohammed returns to Levski Sofia training after injury recovery
Ghana midfielder Nasiru Mohammed has returned Levski Sofia training after recovering from a minor injury.
Mohammed has been nursing an injury before the Bulgarian league was put on hold for the international break.
The 25-year-old however made a quick return to training on Wednesday ahead of their duel against Tsarskoe Selo on Sunday.
Mohammed joined the capital-based outfit on a three-year deal in the summer after spending eight successful years with Swedish side Hacken BK.
He has performed poorly at the club which has prompted the club’s decision to offload him in the forthcoming winter transfer window.


Metaverse
Please enjoy the augmented reality game that we've developed using the Metaverse platform, especially made fro this conference!
The objective of the game is simple: solve three puzzles and unlock a reward. Good luck!
Instructions
Please enjoy the augmented reality game that we've developed using the Metaverse platform, especially made for this conference!
The objective of the game is simple: solve three puzzles and unlock a reward. Good luck!
1. Download: Get the Metaverse app (see links below)
2. Scan or Search: In Metaverse, use the QR code on our lobby banner or search 'Adapting New Technology'
3. Play: Solve the three puzzles to unlock a reward!*
*Please note that only phones that support ARCore or ARKit technologies are compatible with this game. If you are unsure, just launch and play the game; it contains an in-game compatibility checker. If your phone is incompatible, you will not be able to complete the game (unless you use a little bit of magic).


SVM
Duality, KKT, Hard Margin, Soft Margin, SMO.
Decision Tree
A decision tree is a decision support tool that uses a tree-like model of decisions and their possible consequences.
PCA, SVD, PCoA, PPCA
Understand Dimensionality Reduction
KNN
K-nearest Neighbor algorithm (k-NN) is a non-parametric method used for classification and regression.


Audio I/O demonstration
Welcome to the prototype audio control panel! Sorry about the
formatting, but this will be fixed sooner or later ...
General information
This application controls the Sun Audio device. By default, the
Ptolemy universe that created it configures the device to run stereo
at 44.1 kHz with 16-bit linear encoding. This is the simplest (and
most useless!) real-time audio demonstration we have -- it just
demonstrates that the audio works.
Controls
- Input and output selectors
- The input and output selectors do the obvious thing. Or, at least,
they would if they worked. We haven't gotten around to this
yet. Really, buttons would be nicer than check-boxes -- what do you
think?
- Rec
- Controls the gain on the input. For CD source, this should really
be down quite low to avoid clipping.
- Bal
- Controls the balance of the output signal. Negative numbers are
left, positive are right (we think...)
- Gain
- Controls the output gain. Again, if it's too high or there's too
much gain in a filter (in other applications), you'll get nasty
noises. We really need an amplitude-limiting star to prevent this...
Shortcuts
- Start -- Control-g
- Pause -- Control-p
- Resume -- Control-r
- Stop -- Control-s
- Close -- Control-x k
Tycho Home Page
Copyright © 1997-1998, The Regents of the University of California.
All rights reserved.
Last updated: 05/07/98,
comments to: tycho@eecs.berkeley.edu


ML Tuning: model selection and hyperparameter tuning
\[
\newcommand{\R}{\mathbb{R}}
\newcommand{\E}{\mathbb{E}}
\newcommand{\x}{\mathbf{x}}
\newcommand{\y}{\mathbf{y}}
\newcommand{\wv}{\mathbf{w}}
\newcommand{\av}{\mathbf{\alpha}}
\newcommand{\bv}{\mathbf{b}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\id}{\mathbf{I}}
\newcommand{\ind}{\mathbf{1}}
\newcommand{\0}{\mathbf{0}}
\newcommand{\unit}{\mathbf{e}}
\newcommand{\one}{\mathbf{1}}
\newcommand{\zero}{\mathbf{0}}
\]
This section describes how to use MLlib’s tooling for tuning ML algorithms and Pipelines. Built-in Cross-Validation and other tooling allow users to optimize hyperparameters in algorithms and Pipelines.
Table of contents
Model selection (a.k.a. hyperparameter tuning)
An important task in ML is model selection, or using data to find the best model or parameters for a given task. This is also called tuning.
Tuning may be done for individual Estimator
s such as LogisticRegression
, or for entire Pipeline
s which include multiple algorithms, featurization, and other steps. Users can tune an entire Pipeline
at once, rather than tuning each element in the Pipeline
separately.
MLlib supports model selection using tools such as CrossValidator
and TrainValidationSplit
.
These tools require the following items:
Estimator
: algorithm orPipeline
to tune- Set of
ParamMap
s: parameters to choose from, sometimes called a “parameter grid” to search over Evaluator
: metric to measure how well a fittedModel
does on held-out test data
At a high level, these model selection tools work as follows:
- They split the input data into separate training and test datasets.
- For each (training, test) pair, they iterate through the set of
ParamMap
s:- For each
ParamMap
, they fit theEstimator
using those parameters, get the fittedModel
, and evaluate theModel
’s performance using theEvaluator
.
- For each
- They select the
Model
produced by the best-performing set of parameters.
The Evaluator
can be a RegressionEvaluator
for regression problems, a BinaryClassificationEvaluator
for binary data, or a MulticlassClassificationEvaluator
for multiclass problems. The default metric used to choose the best ParamMap
can be overridden by the setMetricName
method in each of these evaluators.
To help construct the parameter grid, users can use the ParamGridBuilder
utility.
By default, sets of parameters from the parameter grid are evaluated in serial. Parameter evaluation can be done in parallel by setting parallelism
with a value of 2 or more (a value of 1 will be serial) before running model selection with CrossValidator
or TrainValidationSplit
.
The value of parallelism
should be chosen carefully to maximize parallelism without exceeding cluster resources, and larger values may not always lead to improved performance. Generally speaking, a value up to 10 should be sufficient for most clusters.
Cross-Validation
CrossValidator
begins by splitting the dataset into a set of folds which are used as separate training and test datasets. E.g., with $k=3$
folds, CrossValidator
will generate 3 (training, test) dataset pairs, each of which uses 2/3 of the data for training and 1/3 for testing. To evaluate a particular ParamMap
, CrossValidator
computes the average evaluation metric for the 3 Model
s produced by fitting the Estimator
on the 3 different (training, test) dataset pairs.
After identifying the best ParamMap
, CrossValidator
finally re-fits the Estimator
using the best ParamMap
and the entire dataset.
Examples: model selection via cross-validation
The following example demonstrates using CrossValidator
to select from a grid of parameters.
Note that cross-validation over a grid of parameters is expensive.
E.g., in the example below, the parameter grid has 3 values for hashingTF.numFeatures
and 2 values for lr.regParam
, and CrossValidator
uses 2 folds. This multiplies out to $(3 \times 2) \times 2 = 12$
different models being trained.
In realistic settings, it can be common to try many more parameters and use more folds ($k=3$
and $k=10$
are common).
In other words, using CrossValidator
can be very expensive.
However, it is also a well-established method for choosing parameters which is more statistically sound than heuristic hand-tuning.
Refer to the CrossValidator
Scala docs for details on the API.
import org.apache.spark.ml.Pipeline
import org.apache.spark.ml.classification.LogisticRegression
import org.apache.spark.ml.evaluation.BinaryClassificationEvaluator
import org.apache.spark.ml.feature.{HashingTF, Tokenizer}
import org.apache.spark.ml.linalg.Vector
import org.apache.spark.ml.tuning.{CrossValidator, ParamGridBuilder}
import org.apache.spark.sql.Row
// Prepare training data from a list of (id, text, label) tuples.
val training = spark.createDataFrame(Seq(
(0L, "a b c d e spark", 1.0),
(1L, "b d", 0.0),
(2L, "spark f g h", 1.0),
(3L, "hadoop mapreduce", 0.0),
(4L, "b spark who", 1.0),
(5L, "g d a y", 0.0),
(6L, "spark fly", 1.0),
(7L, "was mapreduce", 0.0),
(8L, "e spark program", 1.0),
(9L, "a e c l", 0.0),
(10L, "spark compile", 1.0),
(11L, "hadoop software", 0.0)
)).toDF("id", "text", "label")
// Configure an ML pipeline, which consists of three stages: tokenizer, hashingTF, and lr.
val tokenizer = new Tokenizer()
.setInputCol("text")
.setOutputCol("words")
val hashingTF = new HashingTF()
.setInputCol(tokenizer.getOutputCol)
.setOutputCol("features")
val lr = new LogisticRegression()
.setMaxIter(10)
val pipeline = new Pipeline()
.setStages(Array(tokenizer, hashingTF, lr))
// We use a ParamGridBuilder to construct a grid of parameters to search over.
// With 3 values for hashingTF.numFeatures and 2 values for lr.regParam,
// this grid will have 3 x 2 = 6 parameter settings for CrossValidator to choose from.
val paramGrid = new ParamGridBuilder()
.addGrid(hashingTF.numFeatures, Array(10, 100, 1000))
.addGrid(lr.regParam, Array(0.1, 0.01))
.build()
// We now treat the Pipeline as an Estimator, wrapping it in a CrossValidator instance.
// This will allow us to jointly choose parameters for all Pipeline stages.
// A CrossValidator requires an Estimator, a set of Estimator ParamMaps, and an Evaluator.
// Note that the evaluator here is a BinaryClassificationEvaluator and its default metric
// is areaUnderROC.
val cv = new CrossValidator()
.setEstimator(pipeline)
.setEvaluator(new BinaryClassificationEvaluator)
.setEstimatorParamMaps(paramGrid)
.setNumFolds(2) // Use 3+ in practice
.setParallelism(2) // Evaluate up to 2 parameter settings in parallel
// Run cross-validation, and choose the best set of parameters.
val cvModel = cv.fit(training)
// Prepare test documents, which are unlabeled (id, text) tuples.
val test = spark.createDataFrame(Seq(
(4L, "spark i j k"),
(5L, "l m n"),
(6L, "mapreduce spark"),
(7L, "apache hadoop")
)).toDF("id", "text")
// Make predictions on test documents. cvModel uses the best model found (lrModel).
cvModel.transform(test)
.select("id", "text", "probability", "prediction")
.collect()
.foreach { case Row(id: Long, text: String, prob: Vector, prediction: Double) =>
println(s"($id, $text) --> prob=$prob, prediction=$prediction")
}
Refer to the CrossValidator
Java docs for details on the API.
import java.util.Arrays;
import org.apache.spark.ml.Pipeline;
import org.apache.spark.ml.PipelineStage;
import org.apache.spark.ml.classification.LogisticRegression;
import org.apache.spark.ml.evaluation.BinaryClassificationEvaluator;
import org.apache.spark.ml.feature.HashingTF;
import org.apache.spark.ml.feature.Tokenizer;
import org.apache.spark.ml.param.ParamMap;
import org.apache.spark.ml.tuning.CrossValidator;
import org.apache.spark.ml.tuning.CrossValidatorModel;
import org.apache.spark.ml.tuning.ParamGridBuilder;
import org.apache.spark.sql.Dataset;
import org.apache.spark.sql.Row;
// Prepare training documents, which are labeled.
Dataset<Row> training = spark.createDataFrame(Arrays.asList(
new JavaLabeledDocument(0L, "a b c d e spark", 1.0),
new JavaLabeledDocument(1L, "b d", 0.0),
new JavaLabeledDocument(2L,"spark f g h", 1.0),
new JavaLabeledDocument(3L, "hadoop mapreduce", 0.0),
new JavaLabeledDocument(4L, "b spark who", 1.0),
new JavaLabeledDocument(5L, "g d a y", 0.0),
new JavaLabeledDocument(6L, "spark fly", 1.0),
new JavaLabeledDocument(7L, "was mapreduce", 0.0),
new JavaLabeledDocument(8L, "e spark program", 1.0),
new JavaLabeledDocument(9L, "a e c l", 0.0),
new JavaLabeledDocument(10L, "spark compile", 1.0),
new JavaLabeledDocument(11L, "hadoop software", 0.0)
), JavaLabeledDocument.class);
// Configure an ML pipeline, which consists of three stages: tokenizer, hashingTF, and lr.
Tokenizer tokenizer = new Tokenizer()
.setInputCol("text")
.setOutputCol("words");
HashingTF hashingTF = new HashingTF()
.setNumFeatures(1000)
.setInputCol(tokenizer.getOutputCol())
.setOutputCol("features");
LogisticRegression lr = new LogisticRegression()
.setMaxIter(10)
.setRegParam(0.01);
Pipeline pipeline = new Pipeline()
.setStages(new PipelineStage[] {tokenizer, hashingTF, lr});
// We use a ParamGridBuilder to construct a grid of parameters to search over.
// With 3 values for hashingTF.numFeatures and 2 values for lr.regParam,
// this grid will have 3 x 2 = 6 parameter settings for CrossValidator to choose from.
ParamMap[] paramGrid = new ParamGridBuilder()
.addGrid(hashingTF.numFeatures(), new int[] {10, 100, 1000})
.addGrid(lr.regParam(), new double[] {0.1, 0.01})
.build();
// We now treat the Pipeline as an Estimator, wrapping it in a CrossValidator instance.
// This will allow us to jointly choose parameters for all Pipeline stages.
// A CrossValidator requires an Estimator, a set of Estimator ParamMaps, and an Evaluator.
// Note that the evaluator here is a BinaryClassificationEvaluator and its default metric
// is areaUnderROC.
CrossValidator cv = new CrossValidator()
.setEstimator(pipeline)
.setEvaluator(new BinaryClassificationEvaluator())
.setEstimatorParamMaps(paramGrid)
.setNumFolds(2) // Use 3+ in practice
.setParallelism(2); // Evaluate up to 2 parameter settings in parallel
// Run cross-validation, and choose the best set of parameters.
CrossValidatorModel cvModel = cv.fit(training);
// Prepare test documents, which are unlabeled.
Dataset<Row> test = spark.createDataFrame(Arrays.asList(
new JavaDocument(4L, "spark i j k"),
new JavaDocument(5L, "l m n"),
new JavaDocument(6L, "mapreduce spark"),
new JavaDocument(7L, "apache hadoop")
), JavaDocument.class);
// Make predictions on test documents. cvModel uses the best model found (lrModel).
Dataset<Row> predictions = cvModel.transform(test);
for (Row r : predictions.select("id", "text", "probability", "prediction").collectAsList()) {
System.out.println("(" + r.get(0) + ", " + r.get(1) + ") --> prob=" + r.get(2)
+ ", prediction=" + r.get(3));
}
Refer to the CrossValidator
Python docs for more details on the API.
from pyspark.ml import Pipeline
from pyspark.ml.classification import LogisticRegression
from pyspark.ml.evaluation import BinaryClassificationEvaluator
from pyspark.ml.feature import HashingTF, Tokenizer
from pyspark.ml.tuning import CrossValidator, ParamGridBuilder
# Prepare training documents, which are labeled.
training = spark.createDataFrame([
(0, "a b c d e spark", 1.0),
(1, "b d", 0.0),
(2, "spark f g h", 1.0),
(3, "hadoop mapreduce", 0.0),
(4, "b spark who", 1.0),
(5, "g d a y", 0.0),
(6, "spark fly", 1.0),
(7, "was mapreduce", 0.0),
(8, "e spark program", 1.0),
(9, "a e c l", 0.0),
(10, "spark compile", 1.0),
(11, "hadoop software", 0.0)
], ["id", "text", "label"])
# Configure an ML pipeline, which consists of tree stages: tokenizer, hashingTF, and lr.
tokenizer = Tokenizer(inputCol="text", outputCol="words")
hashingTF = HashingTF(inputCol=tokenizer.getOutputCol(), outputCol="features")
lr = LogisticRegression(maxIter=10)
pipeline = Pipeline(stages=[tokenizer, hashingTF, lr])
# We now treat the Pipeline as an Estimator, wrapping it in a CrossValidator instance.
# This will allow us to jointly choose parameters for all Pipeline stages.
# A CrossValidator requires an Estimator, a set of Estimator ParamMaps, and an Evaluator.
# We use a ParamGridBuilder to construct a grid of parameters to search over.
# With 3 values for hashingTF.numFeatures and 2 values for lr.regParam,
# this grid will have 3 x 2 = 6 parameter settings for CrossValidator to choose from.
paramGrid = ParamGridBuilder() \
.addGrid(hashingTF.numFeatures, [10, 100, 1000]) \
.addGrid(lr.regParam, [0.1, 0.01]) \
.build()
crossval = CrossValidator(estimator=pipeline,
estimatorParamMaps=paramGrid,
evaluator=BinaryClassificationEvaluator(),
numFolds=2) # use 3+ folds in practice
# Run cross-validation, and choose the best set of parameters.
cvModel = crossval.fit(training)
# Prepare test documents, which are unlabeled.
test = spark.createDataFrame([
(4, "spark i j k"),
(5, "l m n"),
(6, "mapreduce spark"),
(7, "apache hadoop")
], ["id", "text"])
# Make predictions on test documents. cvModel uses the best model found (lrModel).
prediction = cvModel.transform(test)
selected = prediction.select("id", "text", "probability", "prediction")
for row in selected.collect():
print(row)
Train-Validation Split
In addition to CrossValidator
Spark also offers TrainValidationSplit
for hyper-parameter tuning.
TrainValidationSplit
only evaluates each combination of parameters once, as opposed to k times in
the case of CrossValidator
. It is, therefore, less expensive,
but will not produce as reliable results when the training dataset is not sufficiently large.
Unlike CrossValidator
, TrainValidationSplit
creates a single (training, test) dataset pair.
It splits the dataset into these two parts using the trainRatio
parameter. For example with $trainRatio=0.75$
,
TrainValidationSplit
will generate a training and test dataset pair where 75% of the data is used for training and 25% for validation.
Like CrossValidator
, TrainValidationSplit
finally fits the Estimator
using the best ParamMap
and the entire dataset.
Examples: model selection via train validation split
Refer to the TrainValidationSplit
Scala docs for details on the API.
import org.apache.spark.ml.evaluation.RegressionEvaluator
import org.apache.spark.ml.regression.LinearRegression
import org.apache.spark.ml.tuning.{ParamGridBuilder, TrainValidationSplit}
// Prepare training and test data.
val data = spark.read.format("libsvm").load("data/mllib/sample_linear_regression_data.txt")
val Array(training, test) = data.randomSplit(Array(0.9, 0.1), seed = 12345)
val lr = new LinearRegression()
.setMaxIter(10)
// We use a ParamGridBuilder to construct a grid of parameters to search over.
// TrainValidationSplit will try all combinations of values and determine best model using
// the evaluator.
val paramGrid = new ParamGridBuilder()
.addGrid(lr.regParam, Array(0.1, 0.01))
.addGrid(lr.fitIntercept)
.addGrid(lr.elasticNetParam, Array(0.0, 0.5, 1.0))
.build()
// In this case the estimator is simply the linear regression.
// A TrainValidationSplit requires an Estimator, a set of Estimator ParamMaps, and an Evaluator.
val trainValidationSplit = new TrainValidationSplit()
.setEstimator(lr)
.setEvaluator(new RegressionEvaluator)
.setEstimatorParamMaps(paramGrid)
// 80% of the data will be used for training and the remaining 20% for validation.
.setTrainRatio(0.8)
// Evaluate up to 2 parameter settings in parallel
.setParallelism(2)
// Run train validation split, and choose the best set of parameters.
val model = trainValidationSplit.fit(training)
// Make predictions on test data. model is the model with combination of parameters
// that performed best.
model.transform(test)
.select("features", "label", "prediction")
.show()
Refer to the TrainValidationSplit
Java docs for details on the API.
import org.apache.spark.ml.evaluation.RegressionEvaluator;
import org.apache.spark.ml.param.ParamMap;
import org.apache.spark.ml.regression.LinearRegression;
import org.apache.spark.ml.tuning.ParamGridBuilder;
import org.apache.spark.ml.tuning.TrainValidationSplit;
import org.apache.spark.ml.tuning.TrainValidationSplitModel;
import org.apache.spark.sql.Dataset;
import org.apache.spark.sql.Row;
Dataset<Row> data = spark.read().format("libsvm")
.load("data/mllib/sample_linear_regression_data.txt");
// Prepare training and test data.
Dataset<Row>[] splits = data.randomSplit(new double[] {0.9, 0.1}, 12345);
Dataset<Row> training = splits[0];
Dataset<Row> test = splits[1];
LinearRegression lr = new LinearRegression();
// We use a ParamGridBuilder to construct a grid of parameters to search over.
// TrainValidationSplit will try all combinations of values and determine best model using
// the evaluator.
ParamMap[] paramGrid = new ParamGridBuilder()
.addGrid(lr.regParam(), new double[] {0.1, 0.01})
.addGrid(lr.fitIntercept())
.addGrid(lr.elasticNetParam(), new double[] {0.0, 0.5, 1.0})
.build();
// In this case the estimator is simply the linear regression.
// A TrainValidationSplit requires an Estimator, a set of Estimator ParamMaps, and an Evaluator.
TrainValidationSplit trainValidationSplit = new TrainValidationSplit()
.setEstimator(lr)
.setEvaluator(new RegressionEvaluator())
.setEstimatorParamMaps(paramGrid)
.setTrainRatio(0.8) // 80% for training and the remaining 20% for validation
.setParallelism(2); // Evaluate up to 2 parameter settings in parallel
// Run train validation split, and choose the best set of parameters.
TrainValidationSplitModel model = trainValidationSplit.fit(training);
// Make predictions on test data. model is the model with combination of parameters
// that performed best.
model.transform(test)
.select("features", "label", "prediction")
.show();
Refer to the TrainValidationSplit
Python docs for more details on the API.
from pyspark.ml.evaluation import RegressionEvaluator
from pyspark.ml.regression import LinearRegression
from pyspark.ml.tuning import ParamGridBuilder, TrainValidationSplit
# Prepare training and test data.
data = spark.read.format("libsvm")\
.load("data/mllib/sample_linear_regression_data.txt")
train, test = data.randomSplit([0.9, 0.1], seed=12345)
lr = LinearRegression(maxIter=10)
# We use a ParamGridBuilder to construct a grid of parameters to search over.
# TrainValidationSplit will try all combinations of values and determine best model using
# the evaluator.
paramGrid = ParamGridBuilder()\
.addGrid(lr.regParam, [0.1, 0.01]) \
.addGrid(lr.fitIntercept, [False, True])\
.addGrid(lr.elasticNetParam, [0.0, 0.5, 1.0])\
.build()
# In this case the estimator is simply the linear regression.
# A TrainValidationSplit requires an Estimator, a set of Estimator ParamMaps, and an Evaluator.
tvs = TrainValidationSplit(estimator=lr,
estimatorParamMaps=paramGrid,
evaluator=RegressionEvaluator(),
# 80% of the data will be used for training, 20% for validation.
trainRatio=0.8)
# Run TrainValidationSplit, and choose the best set of parameters.
model = tvs.fit(train)
# Make predictions on test data. model is the model with combination of parameters
# that performed best.
model.transform(test)\
.select("features", "label", "prediction")\
.show()


This project will begin by making available instruction in Chinese (Mandarin) at 6th grade level this Fall in three diverse Center City Public Schools. In subsequent years, the plan is to add one grade of language classes each year until at least grades 6 through 8 have the option of such a program. If this initiative can be proven successful in these initial locations, further roll-out may be on a school-by-school basis, or system-wide. The project has been formed by a collaborative group including the respective Principals, Home & School and Neighborhood associations, as well as other interested entities.
McCall, which has a signiﬁcant population of native mandarin speakers and greatly valued the language program it had in place before losing funding for this program. A great resource for the international city that Philadelphia is increasingly becoming; it has a massive catchment area, which means that even though it’s located at 5th and Pine, it’s the local school for Chinatown. McCall’s principal, Carol Domb, is an important voice in driving and focusing our efforts in Mandarin. 49.6% economically disadvantaged students.
Meredith, very much a local school in lower grades, with students largely coming from its quite small geographic catchment in the Queen Village and Bella Vista neighborhoods of South Philly, but openings in middle-school grades make this a high demand choice for kids from all over the city at that age. Meredith’s principal, Cindy Farlino, was the inspiration for this project, when she highlighted language studies as a vital missing piece in local middle schools. 49.1% economically disadvantaged students.
Nebinger, is a rising school, whose principal, Ralph Burnley was awarded the Lindback Award last year, located deeper in South Philadelphia. It’s the only public elementary school in Philadelphia with resources for autism-spectrum students, with a great reputation in this and other areas. 85.3% economically disadvantaged students
To implement an effective program which provides a functional model for language instruction at Philadelphia Public K-8 Schools. Foreign language education has broad beneﬁts in enabling more positive academic outcomes in successful testing in all areas, while global competency is a vital element of modern education. The complete lack of formal language instruction in this city’s public K-8 schools isolates students in both educational system and worldview. In addition, this program may well provide a path for accessing and implementing instructional resources in other missing educational areas, beyond language, at Philadelphia Public Schools.
This program is focused on ensuring that each student has the opportunity participate in two in-school Chinese classes each week. While some Philadelphia public Elementary Schools currently facilitate “out of school” lessons, after school hours, these require payment and are not speciﬁcally overseen by the school’s administration. The classes envisioned by this program will be taught by foreign graduate students enrolled in Philadelphia universities, using a curriculum formed by the Main Line Chinese Cultural Center, a non-proﬁt entity with proven success in this model, that will also administer the program. The respective classes will be overseen by teachers who are fully qualiﬁed employees of the Philadelphia School District, and success vetted and facilitated by active and involved principals. A special and important aspect of this program is that it works with the public school system to add strength to the endemic institutions of learning rather than attempting to bypass public schools or existing teacher infrastructure. In the current environment, where a lack of available funds makes every Philadelphia Public School a disadvantaged school, new models must be found for adding resources that cannot be taken away. It is our hope that the project described here may be a successful model for doing exactly this.
| Gold | yischon | $500.00 | 10/22/2012 | |
| Bronze | Nathan Solomon | $65.00 | 10/5/2012 | |
| Bronze | Steve and Sue Cheng | $50.00 | 10/8/2012 | |
| Bronze | Jeff Hornstein | $50.00 | 10/11/2012 | |
| jun huangpu | $25.00 | 10/5/2012 | ||
| Libby J. Goldstein | $25.00 | 10/11/2012 | ||
| andy toy | $25.00 | 10/13/2012 | ||
| Merle Becker | $25.00 | 10/15/2012 | ||
| tctimlin | $25.00 | 10/17/2012 | ||
| bradoyler | $10.00 | 10/8/2012 |
For your pledge and referring friends, below are the levels of recognition.


Carousel Sliders
Get Attention with Carousel Sidebars
Humans are demonstrably attracted to motion, which bootstrap 5 carousels deliver well, but we can use them more than just for the big hero sections of our site. They work really well in sidebars to display a lot of content. It's time to Apply.
Introduction
The typical bootstrap carousel cycles through a series of images and is almost always used at the top of a page with big hero images. But if you take a look at my site, you can see that I'm also using them to call attention to some content on the sidebar.
Carousel Review
Key Properties
- ID
slide
,carousel-fade
data-bs-ride
- Indicators
You can insert as many carousels as you want using Bootstrap 5 as long as you include an individual id for each one. Although they will work without the ID most of the time, some of the interface elements like controls and indicators will get confused.
If you add a slide
class, then the carousel will slide from one slide to another. If you want to fade one slide to the other, you can add a carousel-fade
class in addition to the slide
class..
There is a critical data class called data-bs-ride
that activates that animation. Without this, JavaScript won't know that it needs to control this carousel.
Carousel Images
carousel-inner
carousel-item
active
All of the images go in a carousel-inner
container
Inside their own carouse-item
container.
The first image gets an extra class called active
. That lets you control which image is showing when the carousel shows up.
Captions
carousel-caption
carousel-item
active
This part is going to be important for us. The captions go in a container called carousel-caption
with a d-block
class.
I want these carousels to link to other sites, so I'm adding a link to a headline. It's actually an anchor tag with a class of h5, which makes it look like a level 5 headline.
Controls
- ID
data-bs-target
data-bs-slide="prev"
data-bs-slide="next"
Finally, we have the controls, which are the buttons to move back and forth through the items.
They have to have the proper ID
The left arrow has the data-bs-slide
attribute with a prev
value
The right arrow has the data-bs-slide
attribute with a next
value
Aligning the Carousel
#carouselSidebar {
display: inline-block;
float: right;
width: 400px;
}
I have a slightly different version of this carousel where I've added some text to the layout so we can see how we'd fit this on the side. To do that we're going to float our Carousel to the right of that text.
You could use columns to position the sidebar, but this way it will move with the content in the article.
Equalizing Proportions
#carouselSidebar .carousel-item img {
object-fit: cover;
object-position: center;
overflow: hidden;
height: 210px;
}
You might notice that the images aren't the same proportions and therefore heights...so I'm going to use a trick that I covered in the previous episode of this series.
Using object-fit and object-position with the overflow:hidden
property makes the images center with the same proportions. I can also set the height of the image to whatever I need.
Fixing the Overlay Text
That's useful, but as you can see the sidebar's text is being displayed on top of the image. That's not good for our sidebar, but all we have to do is remove the caption-caption
from the caption container.
Arrows and Indicators
#carouselSidebar .carousel-control-prev,
#carouselSidebar .carousel-control-next {
align-items: flex-start;
top: 80px;
}
#carouselSidebar .carousel-indicators {
align-items: flex-start;
top: 180px;
}
The arrows indicators you can use to go to the previous and next image appear to be gone. They're still there, but since they're centered, they happen to be in the area with the text.
To fix these, we need to position them manually based on the size of our image.
This will place the image and the arrows in the proper place. You need to calculate these manually and make sure that you adjust the height and margin; otherwise they will run on top of the text, but it's not a big deal.
Stretched Links
Slide 01
One of the newer features in Bootstrap is the ability to take a link in a component and stretch it so that it cover it's container. You can take advantage of that feature in our carousel and that way you don't have to make a link for both the image and the headline.
All you have to do is add a stretched-link
class to the link and it will travel up to a container that has a position: relative
property. This is working well with our carousel, but remember that sometimes you have to add that manually.
If you don't add the text-decoration-none
, because it's a link it will have an underline and the text-secondary
class gives it a gray tint instead of the loud blue color.


---
layout: post
title: Hiding "Permission denied" errors with `find`
date: '2007-05-08T07:35:00.000-05:00'
author: Don Seiler
tags:
- linux
modified_time: '2010-11-19T22:48:46.563-06:00'
blogger_id: tag:blogger.com,1999:blog-7032512792942232766.post-6776156070368314581
blogger_orig_url: http://www.seiler.us/2007/05/hiding-denied-errors-with-find.html
---
Jon Emmons over at Life After Coffee, a blog of linux tips and tricks, has posted some tips for the "find" command. Nothing new for myself, although his tip of redirecting STDERR to /dev/null to avoid having my terminal polluted with "Permission denied" errors is something that brightened my day, so I thought I'd share it with YOU. <3


Computers in the classroom include any digital technology used to enhance, supplement, or replace a traditional educational curriculum. As computers have become more accessible, inexpensive, and powerful, the demand for this technology has increased, leading to more frequent use of computer resources within classes, and a decrease in the student-to-computer ratio within schools.
The world is constantly changing and ways in which we function at home, work and school are also changing. The speed at which technology has developed plays a major role in these changes. From e-mail to on-line classes, computers are definitely influential in our lives, and can enhance the learning process in schools in various ways. With the increasing popularity of computer technology, it is essential for administrators to support and encourage computer technology in our education systems.
[Reference: wiki]


{% load humanize %}
The first time you do the task, a tutorial will teach you how to do the task. You only have to do the tutorial once.
We will show you a series of points in an image. Your job is to click on the points that are on a transparent surface or a mirror. "Transparent" surfaces includes things like glass and clear plastic, as well as semi-transparent things such as foggy glass and thin curtains. If a point is in the sky, that counts as "transparent" as well.
{% comment %}Each HIT has {{ num_contents }} point{{ num_contents|pluralize }}. Don't worry; we will show you large groups of points at a time.
{% endcomment %}Don't worry; many photos will have no points to click on.
We are building a large database of objects and materials from images on the web.
This is part of ongoing research at Cornell University. Thank you for participating!


Trebizondo Culpeper snorted. His was a mighty snort, caused on this occasion by his reading, in the Standard, of the well-known science lecturer Dr. J. Q. Rumball's theory that the origin of the potato disorder was of an electrical nature.
Trebizondo Culpeper gathered about him a buzz of acolytes, keen young Trebizondo Culpeperists with bright eyes and intriguingly windswept hairstyles.
“Hark!” boomed Trebizondo Culpeper, waving the newspaper aloft, “Rumball is spouting forth his electrical theory of the origin of the potato disorder. Never has it been clearer to me that it is wholly and utterly a matter of gas! Fan out, now, youngsters, fan out and spread the word!”
And so the Trebizondo Culpeperists went each to his own cubicle, and took up his stylus, and scraped on flat sheets of gleaming Trebizondoculpeperite™ screeds to the Standard, and to other newspapers, and to magazines and journals and important institutions, discrediting Rumball and his theory and making the case for a gas origin of the potato disorder.
In his eyrie, Trebizondo Culpeper beamed with glee. He ground the Standard under his boot, and he poked pins into a waxen doll of Dr. J. Q. Rumball, and he unscrewed the nozzle on his canister, and put the siphon to his plumpish bulbous lips, and he took a deep, deep draught of the gas.
And when he exhaled, all about him shrivelled and withered and died. He clapped his hands, and called to an acolyte to bring him a platter of newly disordered potatoes.