Prestige Leaderboards
Note: Leaderboards may not be 100% accurate and do not accurately reflect ties.
Rankings:
#
Team Number
Team School
Prestige Points
1
112
Seven Lakes High School
35


nealalan.github.io github keybase venmo paypal.me linkedin freelancer hackerrank neonaluminum.com
$$\ $$\
$$ | $$ |
$$$$$$$\ $$$$$$\ $$$$$$\ $$ | $$$$$$\ $$ | $$$$$$\ $$$$$$$\ $$$$$$$\ $$$$$$\ $$$$$$\$$$$\
$$ __$$\ $$ __$$\ \____$$\ $$ | \____$$\ $$ | \____$$\ $$ __$$\ $$ _____|$$ __$$\ $$ _$$ _$$\
$$ | $$ |$$$$$$$$ | $$$$$$$ |$$ | $$$$$$$ |$$ | $$$$$$$ |$$ | $$ | $$ / $$ / $$ |$$ / $$ / $$ |
$$ | $$ |$$ ____|$$ __$$ |$$ |$$ __$$ |$$ |$$ __$$ |$$ | $$ | $$ | $$ | $$ |$$ | $$ | $$ |
$$ | $$ |\$$$$$$$\ \$$$$$$$ |$$ |\$$$$$$$ |$$ |\$$$$$$$ |$$ | $$ |$$\\$$$$$$$\ \$$$$$$ |$$ | $$ | $$ |
\__| \__| \_______| \_______|\__| \_______|\__| \_______|\__| \__|\__|\_______| \______/ \__| \__| \__|
biker snowboarder organizer maker fixer geocacher welder swimmer kayaker 3d printer woodworker
AWS Certified Solutions Architect (SAA) Linux Academy Evolve Security Academy Illinois State University
|


Toggle navigation
Home
(current)
Living
Activities
Services
Contact
First Name
Last Name
Phone Number
Email
Have questions? Ask them below.
Contact Us
(402) 488-8191
<EMAIL_ADDRESS>Contact Us
(402) 488-8191
<EMAIL_ADDRESS>First Name
Last Name
Phone Number
Email
Have questions? Ask them below.


This is an experimental interface to the audio collection of the Cornell Lab of Ornithology's Macaulay Library - the world's largest and oldest collection of biodiversity audio and video recordings. This project builds on metadata harvested by Ed Summers, and takes inspiration from Charlie Lloyd's animal name tweets. This list shows the 500 most frequent title terms, linking to about 115,000 individual records. Click a term to hear one of its tracks. Code is on Github.
by Mitchell Whitelaw | @mtchl


envo: Ontology Comparison Report
Files used:
- file 1 (old): envo-lastbuild.obo; data version: releases/2015-09-24
- file 2 (new): envo.obo; data version: releases/2015-10-16
New terms
Obsoletions
None
Term merges
None
Term changes
KEY: 'A' : added, 'D' : deleted, 'C' : changed (for properties with only one value)
| Term ID | comment | is_a | intersection_of | relationship |
|---|---|---|---|---|
| ENVO:00010505 aerosol |
C | 1 D, 1 A | ||
| ENVO:01000256 mineral material |
2 A | 1 A | ||
| ENVO:01000634 volcanic eruption |
2 A |
File Stats
| Ontology | Old file | New file | Change |
|---|---|---|---|
| ENVO |
2042 1454 (71.2%) defined |
2049 1459 (71.2%) defined |
+7 |
| Obsolete | 118 (5.5% of total) |
118 (5.4% of total) |
0 (0.0%) |
| Totals |
2042 1454 (71.2%) defined 2160 inc. obsoletes |
2049 1459 (71.2%) defined 2167 inc. obsoletes |
+7 (+0.3%) |
File Errors
Term splits
| Source term ID | Source term name | Split term ID | Split term name |
|---|---|---|---|
| ENVO:00000369 | brine pool | ENVO:01000060 | particulate matter |
| ENVO:01000005 | upwelling | ENVO:01000063 | planktonic material |


--- layout: default title: Pinter Double Bill - Productions - Fail Better Productions menu-item: productions submenu-item: pinter styles: - /css/colours.css - ../production.css # - ./styles.css styles-ie6: ../production-ie6.css ---
This production launched Fail Better and explored one of the company's on-going concerns - the relationship between memory and the self. Pinter's symbolic realism provides exceptional opportunities for actors and a tremendously moving experience for audiences. Both plays (presented together for the first time) are poetic and profound, focusing on specific situations as a metaphor for the human condition.
In these plays, one can see the massive influence of Beckett upon Pinter. Indeed, Fail Better Productions (so called after Beckett's profound lines "All of old. Nothing else ever. Ever tried. Ever failed. No matter. Try again. Fail again. Fail better."
Worstward Ho) also has its artistic roots in the Beckettian tradition.
This production played a variety of venues: the Royal Welsh College of Music and Drama, Cardiff; the Warwick Arts Centre; the Play in English Festival, Bratislava, Slovakia; the RSC Summerhouse, Stratford-Upon-Avon. The tour was highly successful and introduced Fail Better to a diversity of audiences. "A fine production"
Warwick Boar.


| IDR | J. Snijders |
| Internet-Draft | NTT |
| Intended status: Standards Track | D. Freedman |
| Expires: October 10, 2017 | Claranet |
| J. Heitz | |
| Cisco | |
| D. Sharp | |
| Cumulus | |
| April 8, 2017 |
BGP ADVISORY Message
draft-iops-idr-bgp-advisory-message-00
This document defines the BGP-4 ADVISORY Message and Support for ADVISORY Message Capability to facilitate the exchange of session-specific human-oriented information between network operators.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119].
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."
This Internet-Draft will expire on October 10, 2017.
Copyright (c) 2017 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
This document may contain material from IETF Documents or IETF Contributions published or made publicly available before November 10, 2008. The person(s) controlling the copyright in some of this material may not have granted the IETF Trust the right to allow modifications of such material outside the IETF Standards Process. Without obtaining an adequate license from the person(s) controlling the copyright in such materials, this document may not be modified outside the IETF Standards Process, and derivative works of it may not be created outside the IETF Standards Process, except to format it for publication as an RFC or to translate it into languages other than English.
This document defines the BGP-4 [RFC4271] ADVISORY Message and Support for ADVISORY Message Capability to facilitate the exchange of human-oriented information specific to the BGP session through which the ADVISORY message is transmitted. ADVISORY messages are intended to aid root cause analysis and bootstrapping of out-of-band communication between operators by allowing them to signal key information over the known (and potentially trusted) in-band communication channel that is an existing BGP session.
The BGP protocol extensions introduced in this document include the definition of a new BGP capability, named "Support for ADVISORY Message Capability", and the specification of the ADVISORY message.
The "Support for ADVISORY Message Capability" is a new BGP capability [RFC5492]. The Length field of this capability MUST be set to 1. The Capability value MUST be set to the highest version of the ADVISORY message supported by the BGP speaker. This document only defines ADVISORY version 1 messages.
By advertising this capability to a peer, a BGP speaker conveys to the peer that the speaker supports receiving ADVISORY messages, indicates what version of the ADVISORY message it supports, and indicates that it supports the related procedures described in this document.
An ADVISORY message is composed of an optional NOTICE, and optionally one or more ADVISE key-value pairs. An ADVISORY message MUST NOT contain more than 16 ADVISE key-value pairs. Each key and each value field MUST be preceded by a 1 octet Length field to indicate the length of the subsequent field. ADVISE key fields have a REQUIRED maximum length of 32 octets. ADVISE value fields have a REQUIRED maximum length of 128 octets. To support international characters, all string fields MUST be encoded using UTF-8. Fields are not NUL terminated. There is no significance to the order of key-value pairs.
In concept, ADVISE data is similar to the dissemination of plan files. When sending a new ADVISORY message to transmit a new NOTICE, the sender MUST repeat all configured ADVISE data. Phrased differently: a new ADVISORY message completely replaces any prior ADVISORY message.
A zero-length ADVISORY message can be send to clear any ADVISORY information on the remote side.
ADVISORY message format
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | N-length | \ +-+-+-+-+-+-+-+-+ / / NOTICE payload (max length 128) \ \ / +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ADVISE K-len | ADVISE key (max length 32) \ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ADIVSE V-len | / +-+-+-+-+-+-+-+-+ \ / ADVISE value (max length 128) / \ \ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ \ \ / ... additional ADVISE key-value pairs ... /
Each ADVISORY message contains either no NOTICE payload, or a single NOTICE payload. Optionally, up to 16 ADVISE key-value pairs can be encoded in the ADVISORY message.
To support international characters, fields MUST be encoded using UTF-8. A receiving BGP speaker MUST NOT interpret invalid UTF-8 sequences. Note that when a field contains multibyte characters, the number of characters will be less than the length value. Fields are not NUL terminated.
This section is not meant to drive UI design decisions, but rather as scaffold to further discussion.

Router B
RouterB# show bgp neighbor <IP_ADDRESS> advisory Most recent messages from <IP_ADDRESS> / AS 64496: Fri 31 Mar 04:38:00 2017 UTC NOTICE: V-NOC-2324248 is starting Fri 31 Mar 04:38:10 2017 UTC NOTICE: We are prepending announcements Fri 31 Mar 04:50:07 2017 UTC SHUTDOWN: rebooting, maint V-NOC-2324248 Fri 31 Mar 05:13:34 2017 UTC NOTICE: Maintenance over, restoring policies Advise: noc email<EMAIL_ADDRESS>24/7 phone : +1<PHONE_NUMBER> Service ID : USID 89024294 ADVISORY Message statistics: Sent Received 5 15 RouterB#
The following section assumes HARD error failure, but another option is to fail softly. For WG discussion.
This document defines a new NOTIFICATION error code: "ADVISORY Message Error". The following new error subcodes are defined:
| name | value |
|---|---|
| Invalid ADVISORY Message Length | TBD |
| Invalid ADVISORY NOTICE Length | TBD |
| Invalid ADVISORY ADVISE Key Length | TBD |
| Invalid ADVISORY ADVISE Value Length | TBD |
The error handling specified in this section is applicable only when a BGP speaker has received the "Support for ADVISORY Message Capability" from a peer.
All errors detected while processing the ADVISORY message MUST be indicated by sending the NOTIFICATION message with the Error Code ADVISORY Message Error. The error subcode elaborates on the specific nature of the error.
A zero-length ADVISORY message MUST NOT be considered malformed.
IANA is requested to assign value TBD1 (ADVISORY) in the "BGP Message Types" subregistry under the "Border Gateway Protocol (BGP) Parameters" registry.
IANA is requested to assign value TBD2 (ADVISORY Message Error) in the "BGP Error (Notification) Codes" subregistry under the "Border Gateway Protocol (BGP) Parameters" registry.
IANA is requested to create a new registry "ADVISORY Message Error subcodes" for error subcodes, under the "BGP Error Subcodes" subregistry under the "Border Gateway Protocol (BGP) Parameters" registry. The Registration Procedure for this new registry is "First Come First Served". IANA is requested to assign and register the values from Table 1 in this new error subcode registry.
IANA is requested to assign value TBD4 (Support for ADVISORY Message Capability) in the "Capability Codes" registry.
This specification uses UTF-8 encoding for certain fields of the ADVISORY message. Implementers would do well to incorporate recommendations from UNICODE TR36 [UTR36].
Use of this protocol enhancement has the same security considerations as [I-D.ietf-idr-shutdown].
| [RFC2119] | Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997. |
| [RFC4271] | Rekhter, Y., Li, T. and S. Hares, "A Border Gateway Protocol 4 (BGP-4)", RFC 4271, DOI 10.17487/RFC4271, January 2006. |
| [RFC5492] | Scudder, J. and R. Chandra, "Capabilities Advertisement with BGP-4", RFC 5492, DOI 10.17487/RFC5492, February 2009. |
| [I-D.ietf-idr-shutdown] | Snijders, J., Heitz, J. and J. Scudder, "BGP Administrative Shutdown Communication", Internet-Draft draft-ietf-idr-shutdown-07, March 2017. |
| [UTR36] | Davis, M. and M. Suignard, "Unicode Security Considerations", Unicode Technical Report #36, August 2010. |
The following people contributed to this document through their work on draft-ietf-idr-advisory-00 (the original "BGP Advisory Message"):
Tom Scholl Amazon Web Services Email<EMAIL_ADDRESS>Richard Turkbergen PacketFabric, Inc. Email<EMAIL_ADDRESS>John Scudder Juniper Networks Email<EMAIL_ADDRESS>The authors would like to gratefully acknowledge Peter van Dijk.
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | N-length: 31 | | +---------------+ + | | + NOTICE payload: "We are prepending announcements" + | | + + | | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | A1 length: 9 | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | | + ADVISE key: "noc email" + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | A-length: 11 | | +-+-+-+-+-+-+-+-+ + | | + ADVISE value<EMAIL_ADDRESS>+ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | A-length: 10 | | +-+-+-+-+-+-+-+-+ + | | + ADVISE key: "24/7 phone" +-+-+-+-+-+-+-+-+ | | A-length: 15 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | A-length: 15 | | +-+-+-+-+-+-+-+-+ + | | + ADVISE value: "+1<PHONE_NUMBER>" + | | + +-+-+-+-+-+-+-+-+ | | A-length: 10 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + ADVISE key: "service ID" + | | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | A-length: 13 | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | | + + | ADVISE value: "USID 89024294" | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
An example ADVISORY message:


See: Description
| Interface | Description |
|---|---|
| InvitationListener |
A listener that is fired anytime an invitation to join a MUC room is received.
|
| InvitationRejectionListener |
A listener that is fired anytime an invitee declines or rejects an invitation.
|
| ParticipantStatusListener |
A listener that is fired anytime a participant's status in a room is changed, such as the
user being kicked, banned, or granted admin permissions.
|
| SubjectUpdatedListener |
A listener that is fired anytime a MUC room changes its subject.
|
| UserStatusListener |
A listener that is fired anytime your participant's status in a room is changed, such as the
user being kicked, banned, or granted admin permissions.
|
| Class | Description |
|---|---|
| Affiliate |
Represents an affiliation of a user to a given room.
|
| DefaultParticipantStatusListener |
Default implementation of the ParticipantStatusListener interface.
|
| DefaultUserStatusListener |
Default implementation of the UserStatusListener interface.
|
| DiscussionHistory |
The DiscussionHistory class controls the number of characters or messages to receive
when entering a room.
|
| HostedRoom |
Hosted rooms by a chat service may be discovered if they are configured to appear in the room
directory .
|
| MultiUserChat |
A MultiUserChat room (XEP-45), created with
MultiUserChatManager.getMultiUserChat(String) . |
| MultiUserChatManager | |
| Occupant |
Represents the information about an occupant in a given room.
|
| RoomInfo |
Represents the room information that was discovered using Service Discovery.
|
| Enum | Description |
|---|---|
| MUCAffiliation |
XEP-0045: Multi-User-Chat - 5.2 Affiliations
|
| MUCRole |
XEP-0045: Multi User Chat - 5.1 Roles
|
| Exception | Description |
|---|---|
| MUCNotJoinedException |
Thrown if the requested operation required the MUC to be joined by the
client, while the client is currently joined.
|


Before Change
for i in xrange(Ndim):
// Find the rounding precision
try:
decimal = int(-np.log10(dedges[i].min())) + 6
except exceptions:
raise ValueError("The smallest edge difference is numerically 0.")
// Find which points are on the rightmost edge.
on_edge = np.where(np.around(sample[:, i], decimal) ==
After Change
for i in xrange(Ndim):
// Find the rounding precision
dedges_min = dedges[i].min()
if dedges_min == 0:
raise ValueError("The smallest edge difference is numerically 0.")
decimal = int(-np.log10(dedges_min)) + 6
// Find which points are on the rightmost edge.
on_edge = np.where(np.around(sample[:, i], decimal) ==
np.around(edges[i][-1], decimal))[0]
// Shift these points one bin to the left.


Full-time software person, and smalltime filmmaker/photographer, and recently a dad :).
I'm the CTO and co-founder at Kalvium. Previously I've worked at Google & Hackerrank.


Source code for torch.jit._trace
"""Tracing
This module contains functionality to support the JIT's tracing frontend, notably:
* torch.jit.trace
* torch.jit.trace_module
This is not intended to be imported directly; please use the exposed
functionalities in `torch.jit`.
"""
import torch
import copy
import os
import contextlib
import functools
import warnings
import inspect
import re
from typing import Any, Dict, List, Optional, Set
from torch.jit._state import _python_cu, _enabled
from torch.jit._script import ScriptModule, _CachedForward, script
from torch._jit_internal import _qualified_name, is_scripting, get_callable_argument_names
from torch.autograd import function
from torch.nn import Module
from torch.testing._comparison import default_tolerances
_flatten = torch._C._jit_flatten
_unflatten = torch._C._jit_unflatten
def _create_interpreter_name_lookup_fn(frames_up=1):
def _get_interpreter_name_for_var(var):
frame = inspect.currentframe()
if not frame:
raise RuntimeError("failed to inspect frame")
i = 0
while i < frames_up + 1:
frame = frame.f_back
if not frame:
raise RuntimeError("failed to get frame")
i += 1
f_locals = frame.f_locals
f_globals = frame.f_globals
for k, v in f_locals.items():
if isinstance(v, torch.Tensor) and var is v:
return k if k != "self" else ""
return ""
return _get_interpreter_name_for_var
def _unique_state_dict(module, keep_vars=False):
# since Parameter.detach() always creates a new torch.Tensor instance,
# id(v) doesn't work with it. So we always get the Parameter or Buffer
# as values, and deduplicate the params using Parameters and Buffers
state_dict = module.state_dict(keep_vars=True)
filtered_dict = type(state_dict)()
seen_ids: Set[int] = set()
for k, v in state_dict.items():
if id(v) in seen_ids:
continue
seen_ids.add(id(v))
if keep_vars:
filtered_dict[k] = v
else:
filtered_dict[k] = v.detach()
return filtered_dict
class ONNXTracedModule(torch.nn.Module):
def __init__(
self,
inner,
strict=True,
force_outplace=False,
return_inputs=False,
return_inputs_states=False,
):
super(ONNXTracedModule, self).__init__()
# inner may be a Module, or it may be an arbitrary callable
# If it's a Module, we get its parameters automatically, which lets
# us avoid a special casing functions versus modules.
self.inner = inner
self.strict = strict
self._force_outplace = force_outplace
self._return_inputs = return_inputs
self._return_inputs_states = return_inputs_states
def forward(self, *args: torch.Tensor):
in_vars, in_desc = _flatten(args)
# NOTE: use full state, because we need it for BatchNorm export
# This differs from the compiler path, which doesn't support it at the moment.
module_state = list(_unique_state_dict(self, keep_vars=True).values())
ret_inputs = []
inputs_states = []
outs = []
def wrapper(*args):
in_args: List[torch.Tensor] = []
for i in range(len(in_vars)):
if not isinstance(args[i], torch.Tensor):
raise RuntimeError('Expected Tensor argument')
in_args.append(args[i])
trace_inputs = _unflatten(in_args, in_desc)
ret_inputs.append(
tuple(x.clone(memory_format=torch.preserve_format) for x in args)
)
if self._return_inputs_states:
inputs_states.append(_unflatten(in_args, in_desc))
outs.append(self.inner(*trace_inputs))
if self._return_inputs_states:
inputs_states[0] = (inputs_states[0], trace_inputs)
out_vars, _ = _flatten(outs)
if len(out_vars) == 1:
return out_vars[0]
else:
return tuple(out_vars)
graph, out = torch._C._create_graph_by_tracing(
wrapper,
in_vars + module_state,
_create_interpreter_name_lookup_fn(),
self.strict,
self._force_outplace,
)
if self._return_inputs:
return graph, outs[0], ret_inputs[0]
if self._return_inputs_states:
return graph, outs[0], inputs_states[0]
else:
return graph, outs[0]
def _clone_inputs(args):
def clone_input(a):
if a is None:
return None
elif isinstance(a, torch.Tensor):
# TODO: figure out one liner to .clone() and set requires_grad
v = (
a.detach()
.clone(memory_format=None if a.is_mkldnn else torch.preserve_format)
.requires_grad_(a.requires_grad)
)
if a.grad is not None:
v.grad = clone_input(v.grad)
return v
else:
return a.clone(memory_format=torch.preserve_format)
return function._nested_map(
lambda x: isinstance(x, torch.Tensor), clone_input, condition_msg="tensors"
)(args)
# This is purely for developer debugging. We are not going to advertise it.
_JIT_TIME = os.environ.get("PYTORCH_JIT_TIME", False) # CUDA-only timing
_JIT_DISABLE = os.environ.get("PYTORCH_JIT_DISABLE", False)
_JIT_STATS = os.environ.get("PYTORCH_JIT_STATS", False)
@contextlib.contextmanager
def _time(trace_name, name, time=True):
if (not _JIT_TIME and not time) or not torch.cuda.is_available():
yield
return
stream = torch.cuda.current_stream()
start = torch.cuda.Event(enable_timing=True)
end = torch.cuda.Event(enable_timing=True)
stream.record_event(start)
try:
yield
finally:
stream.record_event(end)
end.synchronize()
print("{} {} time: {} ms".format(trace_name, name, start.elapsed_time(end)))
def verify(model, args, loss_fn=torch.sum, devices=None):
"""
Verify that a JIT compiled model has the same behavior as its uncompiled
version along with its backwards pass. If your model returns multiple
outputs, you must also specify a `loss_fn` to produce a loss for which
the backwards will be computed.
This function has side-effects (e.g., it executes your model / saves and loads
parameters), so don't expect the model to come out exactly the same as what
you passed in.
Args:
model (compiled torch.nn.Module or function): the module/function to be
verified. The module/function definition MUST have been decorated with
<EMAIL_ADDRESS>args (tuple or Tensor): the positional arguments to pass to the
compiled function/module to be verified. A non-tuple is assumed to
be a single positional argument to be passed to the model.
loss_fn (function, optional): the loss function to be applied to
the output of the model, before backwards is invoked. By default,
we assume that a model returns a single result, and we :func:`torch.sum`
before calling backwards; if this is inappropriate, you can pass your
own loss function. Note that if a model returns a tuple of results,
these are passed as separate positional arguments to `loss_fn`.
devices (iterable of device IDs, optional): the GPU devices which the
compiled module will be run on. This determines the RNG state we
must save when running both compiled and uncompiled versions of the model.
"""
# TODO: In principle, we track device information in our trace, so it
# should be possible to check if our execution actually obeyed the 'devices'
# the user provided.
# TODO: Consider adding a utility function to torch.jit to test
# for this case
if not isinstance(model, torch._C.CompiledFunction): # type: ignore[attr-defined]
raise TypeError(
"Cannot verify an uncompiled module. Add @torch.jit.compile to compile it"
)
is_module = isinstance(model, Module)
if not isinstance(args, tuple):
args = (args,)
saved_args = _clone_inputs(args)
if is_module:
saved_state = copy.deepcopy(model.state_dict())
def run_fwd_bwd(args, force_trace=False, assert_compiled=False):
params = list(model.parameters()) if is_module else []
in_vars, _ = _flatten((args, params))
# We use a special API to reset the trace and compile it from scratch.
compiled_fn = model
if force_trace:
compiled_fn.clear_cache()
if assert_compiled:
hits = compiled_fn.hits
out = model(*args)
if assert_compiled and compiled_fn.hits == hits:
raise RuntimeError("failed to use the compiled function")
if not isinstance(out, tuple):
out = (out,)
if loss_fn == torch.sum and len(out) != 1:
raise ValueError(
(
"Model returns {} outputs, but default loss function "
"(torch.sum) can only handle a single output"
).format(len(out))
)
out_vars, _ = _flatten(out)
saved_outs = [
v.detach().clone(memory_format=torch.preserve_format) for v in out_vars
]
loss = loss_fn(*out)
grads = torch.autograd.grad([loss], in_vars)
# TODO: I'm not sure if the clone here is necessary but it is safer
saved_grads = [
v.detach().clone(memory_format=torch.preserve_format) for v in grads
]
return (saved_outs, saved_grads)
with torch.random.fork_rng(devices, _caller="torch.jit.verify"):
uncompiled_outs, uncompiled_grads = run_fwd_bwd(args, force_trace=True)
assert model.has_trace_for(*args)
if is_module:
model.load_state_dict(saved_state)
compiled_outs, compiled_grads = run_fwd_bwd(args, assert_compiled=True)
_verify_equal(uncompiled_outs, compiled_outs)
_verify_equal(uncompiled_grads, compiled_grads)
def _verify_equal(xs, ys):
for x, y in zip(xs, ys):
if x.sub(y).abs().max() > 1e-6:
raise RuntimeError("JIT and real computation mismatch")
def indent(s):
return "\n".join(["\t" + line for line in s.splitlines()])
class TracingCheckError(Exception):
def __init__(self, graph_diff_error, tensor_compare_error, extra_msg=None):
self.message = "Tracing failed sanity checks!\n"
if extra_msg is not None:
self.message += extra_msg + "\n"
if graph_diff_error is not None:
self.message += "ERROR: Graphs differed across invocations!\n"
self.message += indent(graph_diff_error) + "\n"
if tensor_compare_error is not None:
self.message += (
"ERROR: Tensor-valued Constant nodes differed in value "
"across invocations. This often indicates that the tracer has"
" encountered untraceable code.\n"
)
self.message += indent(tensor_compare_error) + "\n"
super(TracingCheckError, self).__init__(self.message)
# Check the traced module against a set of user-provided validation inputs
@torch.no_grad()
def _check_trace(
check_inputs,
func,
traced_func,
check_tolerance,
strict,
force_outplace,
is_trace_module,
_module_class,
):
# Note: tracing is independent of optimizations, which consume the trace
for inputs in check_inputs:
if isinstance(inputs, torch.Tensor):
inputs = (inputs,)
if is_trace_module:
copied_dict = {}
for name, data in inputs.items():
copied_dict[name] = _clone_inputs(data)
check_mod = torch.jit.trace_module(
func.__self__ if hasattr(func, "__self__") else func,
copied_dict,
check_trace=False,
strict=strict,
_force_outplace=force_outplace,
_module_class=_module_class,
_compilation_unit=torch._C.CompilationUnit(),
)
check_mod_func = check_mod._c._get_method(traced_func.name)
inputs = inputs[traced_func.name]
if isinstance(inputs, (torch.Tensor, dict)):
inputs = (inputs,)
else:
check_mod = torch.jit.trace(
func,
_clone_inputs(inputs),
check_trace=False,
strict=strict,
_force_outplace=force_outplace,
_module_class=_module_class,
)
check_mod_func = check_mod
def graph_diagnostic_info():
mod_canonicalized = torch._C._jit_pass_canonicalize(traced_func.graph)
torch._C._jit_pass_inline(mod_canonicalized)
torch._C._jit_pass_erase_shape_information(mod_canonicalized)
mod_str = str(mod_canonicalized)
mod_str = re.sub(r"___torch_mangle_[0-9]+\.", "", mod_str)
check_canonicalized = torch._C._jit_pass_canonicalize(check_mod_func.graph)
torch._C._jit_pass_inline(check_canonicalized)
torch._C._jit_pass_erase_shape_information(check_canonicalized)
check_str = str(check_canonicalized)
check_str = re.sub(r"___torch_mangle_[0-9]+\.", "", check_str)
graph_diff_errors = None
if mod_str != check_str:
import difflib
graph_diff = difflib.ndiff(
mod_str.splitlines(True), check_str.splitlines(True)
)
graph_diff_errors = "Graph diff:\n" + indent("".join(graph_diff)) + "\n"
for n_mod, n_check in zip(
mod_canonicalized.nodes(), check_canonicalized.nodes()
):
if str(n_mod) != str(n_check):
graph_diff_errors += "First diverging operator:\n"
node_diff = difflib.ndiff(
str(n_mod).splitlines(True), str(n_check).splitlines(True)
)
source_printout = (
"Node diff:\n" + indent("".join(node_diff)) + "\n"
)
mod_stack = n_mod.sourceRange()
if mod_stack:
source_printout += (
"Trace source location:\n" + indent(mod_stack) + "\n"
)
check_stack = n_check.sourceRange()
if check_stack:
source_printout += (
"Check source location:\n" + indent(check_stack) + "\n"
)
graph_diff_errors += source_printout
break # For now, only print out the first pair of nodes that diverges
tensor_compare_errors = None
# Check Tensor-valued constant nodes
for n_mod, n_check in zip(
mod_canonicalized.nodes(), check_canonicalized.nodes()
):
if n_mod.kind() != n_check.kind():
break # Graphs have already diverged
if n_mod.kind() == "prim::Constant" and not (
n_mod.mustBeNone() or n_check.mustBeNone()
):
if not n_mod.hasAttribute("value"):
continue
if n_mod.kindOf("value") != "t" or n_check.kindOf("value") != "t":
continue
mod_tensor_val = n_mod.t("value")
check_tensor_val = n_check.t("value")
try:
torch.testing.assert_close(mod_tensor_val, check_tensor_val, equal_nan=True)
except (RuntimeError, AssertionError) as e:
if tensor_compare_errors is None:
tensor_compare_errors = ""
tensor_compare_errors += "Node:\n" + indent(str(n_mod)) + "\n"
compare_stack = n_mod.sourceRange()
if compare_stack:
tensor_compare_errors += (
"Source Location:\n" + indent(compare_stack) + "\n"
)
tensor_compare_errors += "Comparison exception: " + indent(
str(e)
)
break # For now, only print the first diverging pair
return graph_diff_errors, tensor_compare_errors
def wrap_retval(x):
return x if isinstance(x, tuple) else (x,)
def run_mod_and_filter_tensor_outputs(mod, inputs, running_what):
try:
outs = wrap_retval(mod(*_clone_inputs(inputs)))
outs = [out for out in outs if isinstance(out, torch.Tensor)]
return outs
except Exception as e:
graph_diff_errors, tensor_compare_errors = graph_diagnostic_info()
msg = f"encountered an exception while running the {running_what} with test inputs.\nException:\n{indent(str(e))}"
raise TracingCheckError(
graph_diff_errors,
tensor_compare_errors,
extra_msg=msg,
) from e
has_warned = [False]
def maybe_warn_nondeterministic():
if has_warned[0]:
return
has_warned[0] = True
nondeterm_ops = [
op for op in traced_func.graph.nodes() if op.isNondeterministic()
]
if len(nondeterm_ops) > 0:
nondeterministic_ops_warning = "Trace had nondeterministic nodes. "
nondeterministic_ops_warning += (
"Did you forget call .eval() on your model? Nodes:\n"
)
nondeterministic_ops_warning += "\n".join(
[indent(str(op)) for op in nondeterm_ops][:20]
)
nondeterministic_ops_warning += (
"\nThis may cause errors in trace checking. To disable trace checking,"
" pass check_trace=False to torch.jit.trace()"
)
warnings.warn(
nondeterministic_ops_warning, category=TracerWarning, stacklevel=5
)
def compare_outputs(original, reference, match_what):
all_ok = True
for i, (orig, ref) in enumerate(zip(original, reference)):
try:
if orig.is_quantized:
orig = orig.dequantize()
if ref.is_quantized:
ref = ref.dequantize()
if orig.is_mkldnn:
orig = orig.to_dense()
if ref.is_mkldnn:
ref = ref.to_dense()
if ref.is_complex() or orig.is_complex():
torch.testing.assert_close(
orig.to(torch.cdouble),
ref.to(torch.cdouble),
rtol=check_tolerance,
atol=default_tolerances(orig, ref)[1],
equal_nan=True,
)
else:
torch.testing.assert_close(
orig.double(),
ref.double(),
rtol=check_tolerance,
atol=default_tolerances(orig, ref)[1],
equal_nan=True,
)
except AssertionError as e:
maybe_warn_nondeterministic()
warnings.warn(
"Output nr "
+ str(i + 1)
+ ". of the traced function does not match "
"the corresponding output of the "
+ match_what
+ ". Detailed error:\n"
+ str(e),
category=TracerWarning,
stacklevel=4,
)
all_ok = False
return all_ok
traced_outs = run_mod_and_filter_tensor_outputs(traced_func, inputs, "trace")
fn_outs = run_mod_and_filter_tensor_outputs(func, inputs, "Python function")
if compare_outputs(traced_outs, fn_outs, "Python function"):
check_outs = run_mod_and_filter_tensor_outputs(
check_mod_func, inputs, "repeated trace"
)
compare_outputs(traced_outs, check_outs, "repeated trace")
diag_info = graph_diagnostic_info()
if any(info is not None for info in diag_info):
raise TracingCheckError(*diag_info)
class TracerWarning(Warning):
@staticmethod
def ignore_lib_warnings():
# We ignore warnings from all submodules excluding the JIT, because we need them e.g. for _check_trace
warnings.filterwarnings(
"ignore", category=TracerWarning, module="torch.(?!jit)"
)
# We ignore the tracer warnings coming form inside the library, because all our shape
# checks in nn will trigger them.
TracerWarning.ignore_lib_warnings()
torch._C._tracer_warn_use_python()
def make_tuple(example_inputs):
if isinstance(example_inputs, (torch.Tensor, dict)):
return (example_inputs,)
# done primarily so that weird iterables fail here and not pybind11 code
if not isinstance(example_inputs, tuple):
return tuple(example_inputs)
return example_inputs
def make_module(mod, _module_class, _compilation_unit):
if isinstance(mod, ScriptModule):
return mod
elif torch._jit_internal.module_has_exports(mod):
infer_methods_stubs_fn = torch.jit._recursive.make_stubs_from_exported_methods
return torch.jit._recursive.create_script_module(
mod,
infer_methods_stubs_fn,
share_types=False,
is_tracing=True
)
else:
if _module_class is None:
_module_class = TopLevelTracedModule
return _module_class(mod, _compilation_unit=_compilation_unit)
def wrap_check_inputs(check_inputs):
if check_inputs is None:
return None
return [{"forward": c} for c in check_inputs]
def trace(
func,
example_inputs,
optimize=None,
check_trace=True,
check_inputs=None,
check_tolerance=1e-5,
strict=True,
_force_outplace=False,
_module_class=None,
_compilation_unit=_python_cu,
):
"""
Trace a function and return an executable or :class:`ScriptFunction`
that will be optimized using just-in-time compilation. Tracing is ideal for
code that operates only on ``Tensor``\\s and lists, dictionaries, and
tuples of ``Tensor``\\s.
Using `torch.jit.trace` and `torch.jit.trace_module`, you can turn an
existing module or Python function into a TorchScript
:class:`ScriptFunction` or :class:`ScriptModule`. You must provide example
inputs, and we run the function, recording the operations performed on all
the tensors.
* The resulting recording of a standalone function produces `ScriptFunction`.
* The resulting recording of `nn.Module.forward` or `nn.Module` produces
`ScriptModule`.
This module also contains any parameters that the original
module had as well.
Warning:
Tracing only correctly records functions and modules which are not data
dependent (e.g., do not have conditionals on data in tensors) and do not have
any untracked external dependencies (e.g., perform input/output or
access global variables). Tracing only records operations done when the given
function is run on the given tensors. Therefore, the returned
`ScriptModule` will always run the same traced graph on any input. This
has some important implications when your module is expected to run
different sets of operations, depending on the input and/or the module
state. For example,
* Tracing will not record any control-flow like if-statements or loops.
When this control-flow is constant across your module, this is fine
and it often inlines the control-flow decisions. But sometimes the
control-flow is actually part of the model itself. For instance, a
recurrent network is a loop over the (possibly dynamic) length of an
input sequence.
* In the returned :class:`ScriptModule`, operations that have different
behaviors in ``training`` and ``eval`` modes will always behave as if
it is in the mode it was in during tracing, no matter which mode the
`ScriptModule` is in.
In cases like these, tracing would not be appropriate and
:func:`scripting <torch.jit.script>` is a better choice. If you trace
such models, you may silently get incorrect results on subsequent
invocations of the model. The tracer will try to emit warnings when
doing something that may cause an incorrect trace to be produced.
Args:
func (callable or torch.nn.Module): A Python function or `torch.nn.Module`
that will be run with `example_inputs`. `func` arguments and return
values must be tensors or (possibly nested) tuples that contain
tensors. When a module is passed `torch.jit.trace`, only the
``forward`` method is run and traced (see :func:`torch.jit.trace
<torch.jit.trace_module>` for details).
example_inputs (tuple or torch.Tensor): A tuple of example inputs that
will be passed to the function while tracing. The resulting trace
can be run with inputs of different types and shapes assuming the
traced operations support those types and shapes. `example_inputs`
may also be a single Tensor in which case it is automatically
wrapped in a tuple.
Keyword arguments:
check_trace (``bool``, optional): Check if the same inputs run through
traced code produce the same outputs. Default: ``True``. You might want
to disable this if, for example, your network contains non-
deterministic ops or if you are sure that the network is correct despite
a checker failure.
check_inputs (list of tuples, optional): A list of tuples of input
arguments that should be used to check the trace against what is
expected. Each tuple is equivalent to a set of input arguments that
would be specified in ``example_inputs``. For best results, pass in
a set of checking inputs representative of the space of shapes and
types of inputs you expect the network to see. If not specified,
the original ``example_inputs`` are used for checking
check_tolerance (float, optional): Floating-point comparison tolerance
to use in the checker procedure. This can be used to relax the
checker strictness in the event that results diverge numerically
for a known reason, such as operator fusion.
strict (``bool``, optional): run the tracer in a strict mode or not
(default: ``True``). Only turn this off when you want the tracer to
record your mutable container types (currently ``list``/``dict``)
and you are sure that the container you are using in your
problem is a ``constant`` structure and does not get used as
control flow (if, for) conditions.
Returns:
If `func` is `nn.Module` or ``forward`` of `nn.Module`, `trace` returns
a :class:`ScriptModule` object with a single ``forward`` method
containing the traced code. The returned `ScriptModule` will
have the same set of sub-modules and parameters as the original
``nn.Module``. If ``func`` is a standalone function, ``trace``
returns `ScriptFunction`.
Example (tracing a function):
.. testcode::
import torch
def foo(x, y):
return 2 * x + y
# Run `foo` with the provided inputs and record the tensor operations
traced_foo = torch.jit.trace(foo, (torch.rand(3), torch.rand(3)))
# `traced_foo` can now be run with the TorchScript interpreter or saved
# and loaded in a Python-free environment
Example (tracing an existing module)::
import torch
import torch.nn as nn
class Net(nn.Module):
def __init__(self):
super(Net, self).__init__()
self.conv = nn.Conv2d(1, 1, 3)
def forward(self, x):
return self.conv(x)
n = Net()
example_weight = torch.rand(1, 1, 3, 3)
example_forward_input = torch.rand(1, 1, 3, 3)
# Trace a specific method and construct `ScriptModule` with
# a single `forward` method
module = torch.jit.trace(n.forward, example_forward_input)
# Trace a module (implicitly traces `forward`) and construct a
# `ScriptModule` with a single `forward` method
module = torch.jit.trace(n, example_forward_input)
"""
if not _enabled:
return func
if optimize is not None:
warnings.warn(
"`optimize` is deprecated and has no effect. Use `with torch.jit.optimized_execution() instead"
)
if isinstance(func, torch.jit.ScriptModule):
# it is hard to trace it because the forward method on ScriptModule is already defined, so it
# would result in an error.
warnings.warn(
"The input to trace is already a ScriptModule, tracing it is a no-op. Returning the object as is."
)
return func
if isinstance(func, torch.nn.Module):
return trace_module(
func,
{"forward": example_inputs},
None,
check_trace,
wrap_check_inputs(check_inputs),
check_tolerance,
strict,
_force_outplace,
_module_class,
)
if (
hasattr(func, "__self__")
and isinstance(func.__self__, torch.nn.Module)
and func.__name__ == "forward"
):
return trace_module(
func.__self__,
{"forward": example_inputs},
None,
check_trace,
wrap_check_inputs(check_inputs),
check_tolerance,
strict,
_force_outplace,
_module_class,
)
# Special case for common case of passing a single Tensor
if isinstance(example_inputs, (torch.Tensor, dict)):
example_inputs = (example_inputs,)
# done primarily so that weird iterables fail here and not pybind11 code
elif not isinstance(example_inputs, tuple):
example_inputs = tuple(example_inputs)
var_lookup_fn = _create_interpreter_name_lookup_fn(0)
if hasattr(func, "__self__") and isinstance(func.__self__, torch.nn.Module):
raise AttributeError(
"trace doesn't support compiling individual module's functions.\n"
"Please use trace_module"
)
name = _qualified_name(func)
traced = torch._C._create_function_from_trace(
name,
func,
example_inputs,
var_lookup_fn,
strict,
_force_outplace,
get_callable_argument_names(func)
)
# Check the trace against new traces created from user-specified inputs
if check_trace:
if check_inputs is not None:
_check_trace(
check_inputs,
func,
traced,
check_tolerance,
strict,
_force_outplace,
False,
_module_class,
)
else:
_check_trace(
[example_inputs],
func,
traced,
check_tolerance,
strict,
_force_outplace,
False,
_module_class,
)
return traced
_trace_module_map: Optional[Dict[Any, Any]] = None
def trace_module(
mod,
inputs,
optimize=None,
check_trace=True,
check_inputs=None,
check_tolerance=1e-5,
strict=True,
_force_outplace=False,
_module_class=None,
_compilation_unit=_python_cu,
):
"""
Trace a module and return an executable :class:`ScriptModule` that will be optimized
using just-in-time compilation. When a module is passed to :func:`torch.jit.trace <torch.jit.trace>`, only
the ``forward`` method is run and traced. With ``trace_module``, you can specify a dictionary of
method names to example inputs to trace (see the ``inputs``) argument below.
See :func:`torch.jit.trace <torch.jit.trace>` for more information on tracing.
Args:
mod (torch.nn.Module): A ``torch.nn.Module`` containing methods whose names are
specified in ``inputs``. The given methods will be compiled
as a part of a single `ScriptModule`.
inputs (dict): A dict containing sample inputs indexed by method names in ``mod``.
The inputs will be passed to methods whose names correspond to inputs'
keys while tracing.
``{ 'forward' : example_forward_input, 'method2': example_method2_input}``
Keyword arguments:
check_trace (``bool``, optional): Check if the same inputs run through
traced code produce the same outputs. Default: ``True``. You might want
to disable this if, for example, your network contains non-
deterministic ops or if you are sure that the network is correct despite
a checker failure.
check_inputs (list of dicts, optional): A list of dicts of input arguments that should be used
to check the trace against what is expected. Each tuple
is equivalent to a set of input arguments that would
be specified in ``inputs``. For best results, pass in a
set of checking inputs representative of the space of
shapes and types of inputs you expect the network to see.
If not specified, the original ``inputs`` are used for checking
check_tolerance (float, optional): Floating-point comparison tolerance to use in the checker procedure.
This can be used to relax the checker strictness in the event that
results diverge numerically for a known reason, such as operator fusion.
Returns:
A :class:`ScriptModule` object with a single ``forward`` method containing the traced code.
When ``func`` is a ``torch.nn.Module``, the returned :class:`ScriptModule` will have the same set of
sub-modules and parameters as ``func``.
Example (tracing a module with multiple methods)::
import torch
import torch.nn as nn
class Net(nn.Module):
def __init__(self):
super(Net, self).__init__()
self.conv = nn.Conv2d(1, 1, 3)
def forward(self, x):
return self.conv(x)
def weighted_kernel_sum(self, weight):
return weight * self.conv.weight
n = Net()
example_weight = torch.rand(1, 1, 3, 3)
example_forward_input = torch.rand(1, 1, 3, 3)
# Trace a specific method and construct `ScriptModule` with
# a single `forward` method
module = torch.jit.trace(n.forward, example_forward_input)
# Trace a module (implicitly traces `forward`) and construct a
# `ScriptModule` with a single `forward` method
module = torch.jit.trace(n, example_forward_input)
# Trace specific methods on a module (specified in `inputs`), constructs
# a `ScriptModule` with `forward` and `weighted_kernel_sum` methods
inputs = {'forward' : example_forward_input, 'weighted_kernel_sum' : example_weight}
module = torch.jit.trace_module(n, inputs)
"""
if not _enabled:
return mod
if optimize is not None:
warnings.warn(
"`optimize` is deprecated and has no effect. Use `with torch.jit.optimized_execution() instead"
)
var_lookup_fn = _create_interpreter_name_lookup_fn(0)
if not isinstance(mod, torch.nn.Module):
raise AttributeError("expected torch.nn.Module as the first argument")
if not isinstance(inputs, dict):
raise AttributeError("expected a dictionary of (method_name, input) pairs")
old_module_map = torch.jit._trace._trace_module_map
try:
trace_module_map: Dict[Any, Any] = {}
def register_submods(mod, prefix):
for name, child in mod.named_children():
submod_qualname = prefix + "." + name
trace_module_map[child] = submod_qualname
register_submods(child, submod_qualname)
trace_module_map["__module"] = mod
torch.jit._trace._trace_module_map = trace_module_map
register_submods(mod, "__module")
module = make_module(mod, _module_class, _compilation_unit)
for method_name, example_inputs in inputs.items():
if method_name == "forward":
# "forward" is a special case because we need to trace
# `Module.__call__`, which sets up some extra tracing, but uses
# argument names of the real `Module.forward` method.
func = mod
forward_method = getattr(mod, method_name)
argument_names = get_callable_argument_names(forward_method)
else:
func = getattr(mod, method_name)
argument_names = get_callable_argument_names(func)
example_inputs = make_tuple(example_inputs)
module._c._create_method_from_trace(
method_name,
func,
example_inputs,
var_lookup_fn,
strict,
_force_outplace,
argument_names,
)
check_trace_method = module._c._get_method(method_name)
# Check the trace against new traces created from user-specified inputs
if check_trace:
if check_inputs is not None:
_check_trace(
check_inputs,
func,
check_trace_method,
check_tolerance,
strict,
_force_outplace,
True,
_module_class,
)
else:
_check_trace(
[inputs],
func,
check_trace_method,
check_tolerance,
strict,
_force_outplace,
True,
_module_class,
)
finally:
torch.jit._trace._trace_module_map = old_module_map
return module
[docs]def is_tracing():
"""
Returns ``True`` in tracing (if a function is called during the tracing of
code with ``torch.jit.trace``) and ``False`` otherwise.
"""
if is_scripting():
return False
return torch._C._is_tracing()
class TracedModule(ScriptModule):
_disable_script_meta = True
def __init__(self, orig, id_set=None, _compilation_unit=None):
# XXX: orig can be a nn.Module or a function!
super(TracedModule, self).__init__()
assert isinstance(orig, torch.nn.Module)
# Copy a subset of `orig` to a temporary nn.Module.
# This is a way to customize what will actually get compiled by create_script_module
id_set = set()
# This allows us to preserve the original module's qualified name by defining a new
# type with the attribute _jit_override_qualname. In torch._jit_internal._qualified_name
# we have a special case that will look up this attribute to override whatever qualname
# we would get from the python type system
class QualnameWrapper(torch.nn.Module):
pass
QualnameWrapper._jit_override_qualname = torch._jit_internal._qualified_name( # type: ignore[attr-defined]
type(orig)
)
tmp_module = QualnameWrapper()
def check_unique(param):
if param in id_set:
raise ValueError(
"TracedModules don't support parameter sharing between modules"
)
id_set.add(param)
tmp_module.training = orig.training
for name, param in orig._parameters.items():
if param is not None:
tmp_module._parameters[name] = param
check_unique(param)
for name, buf in orig._buffers.items():
if buf is not None:
tmp_module._buffers[name] = buf
check_unique(buf)
for name, val in orig.__dict__.items():
if (
torch._C._jit_is_script_object(val)
and name not in orig._parameters
and name not in orig._buffers
):
setattr(tmp_module, name, val)
if orig._backward_hooks:
raise ValueError(
"Modules that have backward hooks assigned can't be compiled: "
+ str(orig)
)
for name, submodule in orig._modules.items():
if submodule is None:
continue
tmp_module._modules[name] = make_module(
submodule, TracedModule, _compilation_unit=None
)
script_module = torch.jit._recursive.create_script_module(
tmp_module, lambda module: (), share_types=False, is_tracing=True
)
self.__dict__["_name"] = type(orig).__name__
self.__dict__["_actual_script_module"] = script_module
for name in ("_parameters", "_buffers", "_modules", "training"):
delattr(self, name)
def forward(self, *args, **kwargs):
raise RuntimeError("Trace submodules cannot be called.")
def __getattr__(self, attr):
if "_actual_script_module" not in self.__dict__:
return super(TracedModule, self).__getattr__(attr)
return getattr(self._actual_script_module, attr)
def __setattr__(self, attr, value):
if "_actual_script_module" not in self.__dict__:
return super(TracedModule, self).__setattr__(attr, value)
setattr(self._actual_script_module, attr, value)
def _get_name(self):
return self._name
def extra_repr(self):
return "original_name={}".format(self._name)
class TopLevelTracedModule(TracedModule):
forward = _CachedForward()
def _reconstruct(self, cpp_module):
"""
Re-construct an instance of TopLevelTracedModule using an instance of a C++ module.
Args:
cpp_module: The C++ module that this TopLevelTracedModule will be rebuilt around.
"""
self.__dict__["_actual_script_module"]._reconstruct(cpp_module)
def _script_if_tracing(fn):
@functools.wraps(fn)
def wrapper(*args, **kwargs):
if not is_tracing():
# Not tracing, don't do anything
return fn(*args, **kwargs)
compiled_fn = script(wrapper.__original_fn) # type: ignore[attr-defined]
return compiled_fn(*args, **kwargs)
wrapper.__original_fn = fn # type: ignore[attr-defined]
wrapper.__script_if_tracing_wrapper = True # type: ignore[attr-defined]
return wrapper
def _get_trace_graph(f, args=(), kwargs=None, strict=True, _force_outplace=False,
return_inputs=False, _return_inputs_states=False):
"""
.. warning::
This function is internal-only and should only be used by the ONNX
exporter. If you are trying to get a graph through tracing, please go
through the public API instead::
trace = torch.jit.trace(nn.LSTMCell(), (input, hidden))
trace_graph = trace.graph
Trace a function or model, returning a tuple consisting of the both the
*trace* of an execution, as well as the original return value. If return_inputs,
also returns the trace inputs as part of the tuple
Tracing is guaranteed not to change the semantics of the function/module
that is traced.
Args:
f (torch.nn.Module or function): the function or module
to be traced.
args (tuple or Tensor): the positional arguments to pass to the
function/module to be traced. A non-tuple is assumed to
be a single positional argument to be passed to the model.
kwargs (dict): the keyword arguments to pass to the function/module
to be traced.
Example (trace a cell):
.. testcode::
trace = torch.jit.trace(nn.LSTMCell(), (input, hidden))
"""
if kwargs is None:
kwargs = {}
if not isinstance(args, tuple):
args = (args,)
outs = ONNXTracedModule(f, strict, _force_outplace, return_inputs, _return_inputs_states)(*args, **kwargs)
return outs


We are the trust named (Gwalior Hospital Education & Charitable trust)established with the aim to Help Children Of India in the village Gwalior,India.
The trust is Founded by Dr Bal Krishna Sharma retired paediatric Surgeon in the NHS,UK.
Having seen the abandoned children on streets DR Bal Krishna Sharma started the trust to provide food & home for the needy in Gwalior,India.
The care home mostly has disabled, abandoned, homeless residents who otherwise would have been forced to live on streets with nobody else to support for food and shelter.
There are not many government or privately run organisation in Gwalior where they can receive proper education, training, and care.
Established in 2004, as a care home for the disabled, destitute, children and homeless women, where they live together as a family with love and dignity.
At present, there are 65 residents and we hope to to accommodate 200 in the near future."Snehalaya" is the name given the school and care home.
We started a school on "XXXDate" to educate children,special needs school and vocational training facilities for differently-abled in Gwalior,India.In addition we also help near by villages with
vaccination, nutrition for child and mother,electricity by supplying solar lanterns to school going children in villages of Gwalior,India
We give them a better life through our school & care home in Gwalior,India which is one of the least developed areas of central India
We started a mainstream school to educate them, to empower them, so that they can lead the life of their own choice and make it better not only for themselves, but also for their whole family and future generations.
With Special Needs facility and orphanage which has more than 60 disabled orphans,abandoned children and homeless women – most of whom have suffered neglect and abuse .
They all live together with carers inside cottage where they play and learn with their carers support.
In India especially in the state of Madhya Pradesh, almost 2.5 % of the total number of children are differently-abled. Because of illiteracy, myths and lack of awareness, these children are mostly neglected and abused. Most of such children are kept isolated in homes and are constantly looked down upon. They do not get an equal opportunity to education and vocational training. Many of them are abandoned on streets even by their parents, left to fend for themselves or on the mercy of society or government. There are not many government or privately run places where they can receive proper education, training, and care. Having been through a similar experience, and having seen the conditions of such children in government run mercy homes in Gwalior, we established our Snehalaya in Central India, to care for, to feed, to educate, and to train such children so that they can live a life with love and dignity and become independent as much possible."
Snehalaya in India has grown more and includes a main stream school, a health centre, Gaushala, Mobile rural clinics, solar installations, organic farming and much more, for details please visit https://www.snehalaya.org.uk and https://www.helpchildrenofindia.org) In our Snehalaya in India, 100% of the funds received (in fact more than 100%) are used to provide for these children only. Any help or support in kind or cash, howsoever small, is very much appreciated. It makes more than 100% impact as hundreds of our volunteers, trustees and advisors provide their time, skills as well money without any costs to charity. We welcome volunteers, including students and trainees, from all walks of life for any duration as per their convenience to work with us from their own place or on floor in our Snehalaya at Gwalior, Central India. For any questions, please feel free to write to me at<EMAIL_ADDRESS>For any questions or further information,Please write to Dr. Sharma at<EMAIL_ADDRESS>Bal Krishna Sharma is a retired paediatric Surgeon having worked in the NHS UK, India and Saudi Arabia
Founded a hospital and worked to improve many Children's lives in Gwalior through "Help Children Of India",Campaign
Please select "Snehalaya" among designated purpose of donation in the drop down menu while making your donation through IDRF


{{account.url}}
add | edit selected | delete selected
Details of the currently selected account
{{_ctrl.selected.alias}}
{{_ctrl.selected.name}}
{{_ctrl.selected.url}}
##### (hidden)
Add an account and key for retrieving Batch account data
Edit not implemented
Delete not implemented


After a tough morning at the office, you wander outside to get some fresh air. You decide to walk a little further this time, across the road and into a trail in the forest that you've always seen but never decided to actually walk. As you continue down the trail, things seem to get a little dark. Is it the dense trees or are you a little short of breath? It seems a little odd to you, but you see a large, rather fancy looking chair on the side of the trail. Hmm, maybe it's just a point for hikers to rest. Anyways, you decide to take a short break and...


Differentiate among various styles of system units
identify chips, adapter cards, and other components of a motherboard
Describe the components of a processor and how they complete a machine cycle
Identify the characteristics of various PC processors on the market today
Define a bit and decribe how a series of bits represent data
bit
byte
coding system
Differentiate among the various types of memory
Describe the purpose and types of expansion slots and adapter cards
Differentiate bewtween a port and a connector, and explain the diffence among the ports found on PCs
Describe the types of buses in a computer
Explain the purpose of a power supply and describe how it keeps cool
The system unit
The system unit is a case that contains electronic components of the computer used to process data
desktop
Storage is part of the sys unit
Laptop
Keyboard and pointing device are on top of the sys unit
MP3, smartphones
input and displays are built inot the system unit
Game consoles
Xbox
input and output are not part of the sys unit
Desktop
The sustem unit inisde of a desktop includes:
Drive bay
power supply
sound card
video card
processor
memory
Motherboard
The main circuit board in the system unit
It contains:
adapter cards
provide functions not built into the motherboard
processor chips
memory chips
It is also called system board
Chip
A small piece of semi conducting material (e.g. silicon) on which integrated circuirs are etched
integrated circuits (IC) contain many microscopic pathways capable of carrying electrical current
Chips are packaged so they can be attached to a circuit board (e.g. Printed circuit board(PCB))
Dual inline packages (DIP) hold memory chips
Pin grid array (PGA) holds processor chips
Processor
The processor, also called the central processing unit (CPU), interprets and carries out the basic instructions that operate a computer
contains a control unit and an arithmetic logic unit (ALU)
This forms a single core
Examples:
multi core processors
A multi core processor is a chip with 2 or more separate processors
Each processor on a dual-core or multicore chip generally runs at a slower clock speed, but increases overall performance
dual core processors
A dual core processor is a single chip that contains two separate processors
Intel core duo
65 nm
L1 data 32kb
L1 code 32kb
L2 4MB shared between boths cpus
First quad cores where 2 of these in the same package
AMD Athlon X2
quad core processors
Components of a CPU
Control unit
Directs and coordinates operations in computer
Arithmetic logic unit (ALU)
performs arithmetic, comparisons and logical operations
arithmetic = addition, subtraction etc
comparision = more than etc
logical = AND, NOR, XOR etc
Machine cycle
For every instruction, a processor repeats a set of four basic operations, which comprise a machine cycle
Steps:
Control unit will obtain program instructions or data item from memory
control unit will decode
translate instructions into commands
Arithmetic logic unit (ALUI) will execute
carry out the command
Control unit will store
write the result to memory
Pipelining
Improve a CPU’s performance through pipelining
most current personal computers support pipelining
Processor begins fetching a second instruction before it even completes the machine cycle for the first instruction
Registers
Temporary high speed storage area that holds data and instructions
Data register
stores data while ALU computes it
stores result of calculation
instruction register
stores instuction while it is being decoded
instruction address register
stores location from where instruction was fetched
address register
System clock
System clock controls the timing of all computer operations
Generates regular electronic pulses or ticks that set the operating pace of components of system unit
Each tick is a clock cycle
Pace of system clock is clock speed.
Most clock speeds are in the gigahertz (GHz) range ( 1GHz = one billion ticks of system clocks per second) some run at 3.8 GHz
Processor speed can also be measured in millions of instructaions per second (MIPS)
If Clock speed = 1 GHz = 1024MHz
Typically it could execute 1 instruction per clock tick
so it would execute 1024 million instructions per seconds = 1024 MIPS
Manufacturers
The leading manufacturers of personal computer chips are intel and AMD
Heat sinks and pipes
A processor chip generates heat that could cause the chip to burn up, hence it requires additonal cooling:
heat sink
A component with fins that cools the processor
Liquid cooling
uses a continuous flow of fluids to transfer heat away using oil or water
mainly used for servers
Heat pipes in notebook computers
A laptop’s CPU and GPU heatsinks and copper pipes transferring heat to an exhaust fan expelling hot air
The heat is expelled from a laptop by an exhaust fan
Parallel processing
Using multiple processors simultaneously to execute a program faster
Require special software to divide problem and bring results together
Data representation
Analog signals are continuous and vary in strength and quality
if signal is weak, picture is weak, lots of static
Digital are in one of the two states: on or off
As long as TV is receiving a signal, picture is perfect
Most computers are digital
The binary system uses 2 unique digits (0 and 1)
bits and bytes
Other numbers systems:
Hexadecimal
The hexadecimal numeral system, often shortened to “hex”, is a numeral system made up of 16 symbols (base 16).
Octal
The octal numeral system, or oct for short, is the base-8 number system, and uses the digits 0 to 7
decimal
Byte
Eight bits of 0’s and 1’s grouped together as a unit
All the number systems use the positional notation.
The position determins the weight of the number
Conversion template for converting binary numbers to decimal place
A byte provide enough different combinations of 0s and 1s to represent 256 individual charaters
Form a coding system
eight bit coding system
Coding system
Coding systems make it possible for humans to interact with computers that process only with bits
Need to input data
text
image
audio
video
Coding standards make it possible for computer components to communicate with each other succesfully
They need to talk using the same language (coding system)
3 popular coding systems
ASCII
American standard code for information interchange
EBCDIC
Extended Binary Coded Decimal Interchange code
Unicode-coding
Scheme capable of representing all world’s language
16bits per character
65536 symbols
Memory
Memory consist of electronic components that store:
instructions waiting to be executed by processor
data need by those instructions
the result of processing the data (information)
Stores 3 basic categories of items:
The operating system and other system software
Application programs
Data being processed and the resulting information
Each memory location has an address
an address is a unique number that identify the location of a byte of memory PC uses a byte addressable memory
Memory size is measured in:
Kilobytes KB = 210
Megabytes MB = 220
Gigabytes GB = 230
Terabytes TB = 240
The system unit consist of 2 types of memory
Volatile = temporary
loses its contents when power is turned off
RAM
Non- volatile = permanent
Does not lose contents when power is removed
ROM
Flash mem
CMOS
Random access memory
memory chips that can be read from and written to by processor
Also called main memory or primary storage
most RAM is volatile, it is lost when computer’s power is turned off
The more RAM a computer has, the faster it responds
Three basic types of RAM chips
Dynamic RAM (DRAM)
DRAM needs to be re-energized (refreshed) constantly
Static ram (SRAM)
faster
reliable
More expensive
Used for cache
Magnetoresistive ram (MRAM)
Newer
uses magnetic denser
uses less power
non-volatile
DRAM variations
SDRAM = synchronous DRAM
DDR SDRAM = double data rate SDRAM
DDR2
DDR3
DDR4
RDRAM = Rambus DRAM
Memory module
It is attached to small circuit board called memory module
Memory slots on motherboard hold memory modules
9 chips: parity check
8 chips: no parity check = newer
RAM modules 4 main types:
SIMM
Single inline memory module
pins on the opposite side form a single set of contacts
DIMM
Dual inline memory module
168 pins on opposite sides of the circuit board form separate connections
SODIMM
Small outline dual inline memory module
A much smaller form of memory 144pin
used in notebook computers and apple iMac desktops
RIMM
RAMbus inline memory module
comparable in size and pin configuration to DIMM but uses a special memory bus (RAMbus) to greatly increase speed
184-pin RIMM
Refreshing DRAM memory
This refresh operation is where Dynamic ram gets its name
Dyanamic ram has to be dynamically refreshed all the time of it forgets what it is holding
The downside of this is that refreshing takes time and slows down the memory
Parity checking
RAM may use parity checking
Odd parity
The parity bit will be forced to 1 if it is corresponding byte of data contains an even number of 1’s
if the byte contains an odd number of 1’s the parity bit is forced to 0 or turned off
Even parity
The parity bit is force to 0 if the byte contains an even number of 1’s
the parity bit is force to 1 if its corresponding byte of data contains an odd number of 1’s
Error Control
High-end servers often have a form of error checkiong known as error correction code (ECC)
Bits can be corrected after failure, however, if more than one bit is corrupted the entire byte of data is lost
Static RAM (SRAM)
Often used for casche memory
very fast and relaible because these chips do not have to be recharged as often as DRAM hence the term “static”
More expensive than DRAM
Cache
Cache memory (static ram) helps speed up the processor
Cache memory stores frequently used data and instructions
when the processor needs an instruction or data
it searches the memory in the order:
L1 cache
L2 cache
Then L3 if exist
Then DRAM
Static RAM L1,L2
Personal computers have 2 and perhaps 3 types of cache memory:
L1 level 1 cache 8KB to 128KB
L2 level 2 cache 64KB to 4MB
L2 advance transfer cache (ATC) on current microprocessors (built on the chip)
ATC allows for the L2 cache to reside entirely within the processor core and feature a 256 but wide bus. processors that use ATC perform at a much faster rate
Static RAM L3
L3 level 3 cache is cache separate from the microprocessor chip and is on the motherboard
L3 cache only exist on computers that use the L2 ATC
L3 may also be on the microprocessor chip as is the case with intel core i7 chip
Intel core i7 quad
45nm
L1 Data 32KB
L1 Code 32KB
L2 256 KB per core
L3 8MB shared with all cores
Read only memory (ROM)
Memory chips that store permanent data and instructions
non-volative memory, it is not lost when computer’s power is turned off
3 main types
ROM
Firmware
manufactured with permanently written data and instructions
mask programmable by chip manufacturer
non erasable
PROM
Programmable ROM
blank ROM chip onto which a programmer can write permanently
Write once, non erasable
EEPROM
Electrically erasable programmable ROM
Type of PROM containing microcode programmer can erase
erasable
rewritable
Flash memory
Flash memory can be erased electronically and rewritten
store data and program on many mobile computers and devices such as smart phones and digital camera
Flash memory is similar to EEPROM
it is used to hold the startup instructions
allows computer to update its contents easily
Access time is the amount of time it take for the processor to read from memory
Measure in nanoseconds
today’s memory has access time from 5 to 70ns
nano = 10-9
pico = 10-12
micro = 10-6
milli = 10-3
Access time can also be the time it takes for the storage device to locate the item on storage medium
Hard disk acccess time = 0.006 = 6 ms
RAM = 60ns
RAM is more than 100000 times faster than harddisk
Expansion slots and adapter cards
enhances the system unit or provides connections to external devices called peripherals
Also called expansion card
Expansion slots
An openingn or socket on the motherboard that can hold an adapter card
with plug and play, the computer automatically configures cards and other devices as you install them.


You will need to partner and coordinate with another COMP1950 student to complete this lab.
Create an alternate stylesheet for the homework # 1 homepage of your partner. Since you won’t have access to their FTP credentials, you will need to have them provide you with a copy of all relevant files (html, css, images, etc). Once you have created your new stylesheet send your partner a copy (and any other relevant files such as background images your CSS uses).
As much as possible, try to make your alternate stylesheet display your partner’s homepage as significantly different. Your stylesheet must style the page with different fonts/typesetting, color schemes, and possibly also layouts and background images. Make an effort to create a visually appealing style that is clearly distinct from the original.
Do not make changes to the HTML code of your partner’s homepage, other than adding the appropriate link tags to the head section. When you receive the styles your partner writes for your homepage, apply them as an alternate stylesheet. The title of your alternate stylesheet MUST include the fullname of your partner.
Demonstrate the following CSS techniques in your stylesheet:
You may optionally deploy additional CSS techniques at your discretion. Upload your completed work to the class server.
10 marks for meeting all specifications.
If your homepage is poorly developed, your partner will be unable to build a decent alternative stylesheet. If you or your instructor was unsatisfied with any aspect of your homepage, you should fix the issues or write a new one. The Firefox browser provides built in support for alternate stylesheets, accessible via the menu View Page Style. If you cannot find the text menus, right click on the Firefox title bar, and enable the ‘Menu Bar’
Once you have completed the homework use the below file uploader to include a zip file with all of your homework files


Chapman, Elizabeth Tebbutt
| Birth Name | Chapman, Elizabeth Tebbutt |
| Gender | female |
| Age at Death | 56 years, 5 months, 3 days |
Narrative
Elizabeth was a Widow when she married John Ashcroft.
She came to Australia on the "Nile" on 15/12/1801. Her father was Captain John Tebbett, they were free settlers, she was 9 years old. Elizabeth died on 18/1/1847 buried on 21/1/1847 aged 56 years, she was a Farmers wife from Campbelltown, she is buried in a Vault at St. Peters Church, Cambelltown. I went there many years ago. #1847/823 Vol32b.I have a photocopy of her marriage & death.
Events
| Event | Date | Place | Description | Sources |
|---|---|---|---|---|
| Birth | 1790-08-15 | Westminister London Eng | ||
|
|
||||
| Death | 1847-01-18 | Campbelltown NSW #823 Vol 32b | ||
|
|
||||
| Burial | 1847-01-21 | St Peters Vault, Cambelltown NSW | ||
|
|
Parents
| Relation to main person | Name | Birth date | Death date | Relation within this family (if not by birth) |
|---|---|---|---|---|
| Father | Tebbett, John (Captain) | |||
| Mother | Halfpenny, Ann | |||
| Chapman, Elizabeth Tebbutt | 1790-08-15 | 1847-01-18 |
Families
Family of Ashcroft, John and Chapman, Elizabeth Tebbutt |
|||||||||||||||||||||||||||||
| Married | Husband | Ashcroft, John ( * 1783-11-00 + 1855-01-18 ) | |||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||
| Narrative |
I have a P-copy of John & Elizabeth's Marriage Certificate #1818/2167 Vol 3a. on 20 Apr 1818. |
||||||||||||||||||||||||||||
| Children |
| Name | Birth Date | Death Date |
|---|---|---|
| Ashcroft, John | 1817-03-14 | 1909-03-06 |
| Ashcroft, Thomas | 1820-11-21 | 1867-12-12 |
| Ashcroft, James -(Ashcraft) | 1823-11-17 | 1893-06-09 |
| Ashcroft, Ann | 1825-01-23 | 1907-07-29 |
| Ashcroft, Henry “Harry” | 1827-02-21 | 1896-09-07 |
| Ashcroft, Edward | 1828-12-13 | 1896-07-19 |
| Ashcroft, Ellen | 1832-01-15 | 1866-10-13 |
| Ashcroft, George Edwin | 1834-10-03 | 1912-05-21 |
| Type | Value | Notes | Sources |
|---|---|---|---|
| _UID | 5AFEFA65E5C4D5119853B7EB0FA9CA6DC280 |
Family of , Mr. Chapman and Chapman, Elizabeth Tebbutt
| Type | Value | Notes | Sources |
|---|---|---|---|
| _UID | 8564D49A350DDB119522AFE4B0787F4BC15D |
Attributes
| Type | Value | Notes | Sources |
|---|---|---|---|
| _UID | 5EFEFA65E5C4D5119853B7EB0FA9CA6DC6C0 |


“It is the sublime inconsequence of a farm that I like, the confusion of noises, the sense of unreality that is given as a great and heavenly gift to human beings who live among thudding, moaning cattle, and tumbling milk-cans, and hens screeching underfoot and who, no matter how they try, can never coerce their lives into routine, but must always wait on the weather and market prices and the temperamental vagaries of their stock, and at one time spend idle weeks in the rain, and at another toil both day and night, and at yet another time waste precious hours chasing a cow which has got into the wrong field and which, in running away, impales itself eventually on the railings, or in segregating cock chickens of three weeks old who suddenly discover their sex and in one afternoon reduce each other to bleeding wisps of tow. That is what I like about a farm.”
Rayner Heppenstall, The Blaze Of Noon (1939)


Quoted
Settings
Quote Highlighting
None
Some
All
Quote highlighting disabled.
Remove Selected
Toggle Current Domain
Trusted Sources
Remove Selected
Toggle Current Domain
Untrusted Sources
Remove Selected
Toggle Current Domain
My Activity
Quote Lookup History
You haven't looked up any quotes yet.
Sign Out
Sign In
Sign Up


Finding, dating and settling down with the perfect mate is a lot easier with online dating tools. When you look for a potential match, maybe you only want a few details - like name and a list of interests. But as things get serious, you want to know more.
In the real and online world, you have lots of ways to learn more. But in the online data dating world, you really only have one - metadata.
And, well, our metadata makes it hard to commit…So we’re updating it.
You can read more below - but check out our new draft standard: - Draft Metadata Standard - Give us feedback on the draft standard (3 short questions!)

Metadata Dream Date
In my metadata dreamworld:
- Each required field would have a thoughtful and robust justification
- Fields would be easy to complete and populate (think drop downs and controlled vocabulary)
- The metadata would be in a friendly, portable file (think json)
- Our Socrata platform would include an automated dataset of datasets that included each metadata field for each dataset. And I would make charts and views of the dataset of datasets that summarized and tracked our performance in open data.
- Bonus feature! An API on the dataset of datasets that would let us create apps or feeds for recently updated, new datasets, etc!
Instead…
Our metadata (the data about our datasets) is more or less out of the box (see an example for business registered in SF). We have a handful of custom fields like Department and frequency, but we haven’t sat down and really thought through what fields we should include (and require) and why. And we’re inspired by metadata leadership from Open New York and Albuquerque.
How we’re tackling metadata in San Francisco

We’ve kicked off a working group to draft a metadata standard. The team includes some metadata experts, library scientists, and some of our biggest publishers on DataSF. Read our project document with background/motivation/major steps.
But before we kicked off the group, we surveyed the metadata landscape for existing practices. Some major findings:
- Alot of great work has been done in migrating existing frameworks to accommodate open data (Dublin Core, DCAT, and Common Core). Though we were surprised by some interesting gaps (e.g. data quality notes, field definitions).
- A balance is to be had in terms of making something required if a) you want compliance and b) you want to get data published. Alot of portals have metadata requirements, but compliance can by tricky.
Read our full document on Metadata: Existing Practices and Survey.
(And PS - you can always visit our Resources page for all of our metadata documents.)
Your Metadata Dream Date
And we want to hear from you: - Data publishers - What works and what doesn’t about metadata? - Data users - What elements and fields are essential? - What’s field elements are hard to do? Can we crowd source data dictionaries???
Drop us a line at datasf at sfgov dot org or check out our standard and give us feedback:
- Draft Metadata Standard
- Give us feedback on the draft standard (3 short questions!)


6 references to TranscribeCommandComplete
System.Management.Automation (6)
engine\hostifaces\MshHostUserInterface.cs (5)
374
TranscribeCommandComplete
(null);
523
TranscribeCommandComplete
(null);
555
TranscribeCommandComplete
(null);
566
TranscribeCommandComplete
(null);
928
context.InternalHost.UI.
TranscribeCommandComplete
(invocation);
engine\pipeline.cs (1)
204
hostInterface.
TranscribeCommandComplete
(invocation);


[gecode-users] Cloning problems
Christian Schulte
cschulte at kth.se
Fri Feb 13 16:38:21 CET 2009
Great! I always get nervous no matter how often we say that it can't be our fault ;-)
Christian
--
Christian Schulte, www.it.kth.se/~cschulte/
-----Original Message-----
From: Filip Konvička [mailto:filip.konvicka at logis.cz]
Sent: Friday, February 13, 2009 4:19 PM
Cc: public-cschulte-UNjuZkX4dYU at hugh.gmane.org; 'Luboš Moric'
Subject: Re: Cloning problems
Ha! One of our custom propagators (not a "standard" floatvar propagator)
returned __ES_SUBSUMED directly instead of calling the macro. So it is
exactly like you said.
Thanks very much for support!
As a side effect, we now have a nice description of what happens during
cloning that might be useful in the future.
Frankly, we're also glad that it was our fault in the end. We've been
tracing the cloning process in the debugger in both C++ and assembler
for quite some time, so we feel even more comfortable about Gecode now
that we've seen the internals.
Thanks again,
Filip
> Hi,
>
> we just discussed the very same idea. It seems that during cloning, an
> actor is present in the variable subscription list, but not in the
> Space::a_actors list, so we thought that maybe an actor disappeared
> without unsubscribing. We're using ES_SUBSUMED(this, home) everywhere in
> floatvar propagators to indicate entailment, I'll check whether that is
> done everywhere.
>
> Thanks,
> Filip
>
>> Hi Mikael and I just had one more thing you could check: the behaviour could
>> also be due to a propagator that says subsumption but does not delete all of
>> its dependencies via cancel.
>>
>> Christian
>>
>> --
>> Christian Schulte, www.ict.kth.se/~cschulte/
>>
>>
>> -----Original Message-----
>> From: Christian Schulte [mailto:cschulte at kth.se]
>> Sent: Friday, February 13, 2009 11:12 AM
>> To: 'Filip Konvička'; 'users at gecode.org'
>> Cc: 'Luboš Moric'
>> Subject: RE: [gecode-users] Cloning problems
>>
>> Hi,
>>
>> that sounds ugly ;-) Before I start with rambling about cloning, a tip:
>> Gecode supports unary branchings (with a single alternatiuve only). So you
>> could have a unary branching and don't have to have a mock-up empty branch.
>> The search engines even optimize that case. If you are looking for an
>> example, check the assign function in gecode/int.hh for assigning variables.
>>
>> Okay, cloning it is. So, there are two stages: copying and updating. During
>> copying you first create a new space and copy all actors. While copying all
>> actors you copy each variable and its domain used by an actor and collect a
>> list of all these variables (actually a list for each variable type). The
>> only thing that you do not do is copying the dependency array of a variable
>> (the array of pointers that point to propagators that depend on a variable).
>> Then in updating, you update the dependency arrays (and also deal with
>> advisors).
>>
>> Updating a dependency array just copies for each old entry the new entry
>> (stored via a forwarding pointer in each actor) and restore some information
>> for variables that has been stored in the copy of the dependency array.
>> After that you cleanup the space, the actors, and you are done.
>>
>> In VarImp<VIC>::enter, the --idx[0] makes room for an additional entry. Then
>> you keep moving actors to a free entry and by this create a new free entry
>> for the propagation condition i. When the loop is done, you know that there
>> is a free entry for propagation condition pc and that's where the propagator
>> is entered.
>>
>> Your guess about x->idx[0] in VarImp<VIC>::update is correct: this actually
>> stores the forwarding pointer for a variable implementation. Also your
>> suspicion about ActorLink::prev is correct: there the forwarding pointer for
>> actors is stored.
>>
>> Let me come up with some idea where the trouble could be:
>> - you forget to update a variable or view at some place. Either in your
>> branching, propagator, or model.
>> Then you can see an invalid pointer in the dependency array.
>> You might want to change the default constructor of VarBase in
>> gecode/kernel/var.icc and the default constructor
>> of VarViewBase in gecode/kernel/view.icc so that they set varimp to NULL
>> (actually, I just did that yesterday in the trunk as well). Then you will be
>> sure that when you forget to update, you'll see a NULL pointer.
>> - you commit a heinous crime in that you change the dependencies of a
>> variable with cancel/subscribe during
>> cloning. That is illegal and will for sure break everything. Note that
>> creating a propagator during
>> cloning will commit that crime, too.
>>
>> It is very very unlikely (but not impossible, of course) that the cloning in
>> Gecode has a snatch but, as said, very unlikely given that its used by
>> anything else.
>>
>> Hope that helps. Please do not hesitate to ask some more
>> Christian
>>
>> --
>> Christian Schulte, www.ict.kth.se/~cschulte/
>>
>>
>> -----Original Message-----
>> From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
>> Of Filip Konvicka
>> Sent: Thursday, February 12, 2009 2:21 PM
>> To: users at gecode.org
>> Cc: Luboš Moric
>> Subject: [gecode-users] Cloning problems
>>
>> Hi,
>>
>> [Sorry, this is a looong message...]
>>
>> we're hunting a serious bug that occurs during space cloning in 2.2.0.
>> The bug occurs very rarely, but we have a testcase that triggers this
>> behavior.
>>
>> We have many constraints in the problem instance and the solver should
>> post as many propagators as possible. We have a custom branching for
>> this, which posts one propagator at a time in commit(), while the
>> alternative is not to post the propagator (i.e. a no-op). Because we're
>> only looking for the first solution, in the case of a failure we no
>> longer need the path back to the root in the recomputation tree, so we
>> decided to use our own simple search engine for this. The standard DFS
>> search engine exhibits exactly the same behavior (both with
>> recomputation on and off), and we don't see any problems with our search
>> engine.
>>
>> Everything seems to work for the vast majority of the test cases, but
>> there are a few instances that cause problems (probably) during cloning
>> (can be probably also be caused by some earlier bad subscibe or
>> unsubscribe). From our point of view, there is nothing wrong or special
>> about the instances. The crashes occur at the same location both on
>> Linux and Windows, in both release and debug builds. Changing memory
>> management (e.g. never deleting Spaces in the search engine) can cause
>> the crash to occur at slightly different places (e.g. some propagation
>> during status() after clone() finishes).
>>
>> One particular case we're looking at now crashes at core.icc:2270, where
>> f[0] is a bad pointer (0xfeeefeee at Windows). We're not sure how this
>> can happen - we know that in this case n==2 at core.icc:2255, so idx[0]
>> is bad pointer at core.icc:2252. This is also what Valgrind says on
>> Linux (bad read of size 4).
>>
>> When we were trying to debug the other cases, we found out that the
>> subscription list in a variable in the cloned space contained an actor
>> link that was probably copied incorrectly as it seemed as a pure
>> ActorLink like Space::a_actors, having a totally different address than
>> the rest of the actors (probably belonging to the original space
>> object). When we tried to find out when this actor link entered the
>> list, we ended up in VarImp<VIC>::update again.
>>
>> We're (of course:-)) using FloatVars in the model, and we eliminated all
>> other kinds of variables and propagators. In our case, pc_max==1 and
>> free_bits==0.
>>
>> We find it difficult to understand what is happening during cloning. We
>> would appreciate if someone explaned the basic idea. We only have
>> floatvars, propagators and one branching (no advisors or other types of
>> actors/branchings/advisors).
>>
>> We know how VarImp<VIC>::resize works, that's easy. In
>> VarImp<VIC>::enter, we can't see why you do "--idx[0];" as the first
>> iteration of the for cycle overwrites it (as long as pc>0, of course).
>> May be just optimization of course. As for VarImp<VIC>::update, we only
>> guess...we suspect that a) the original x->idx[0] is destroyed somewhere
>> so it needs to get restored from a memcpy backup at idx[0], b)
>> ActorLink::_prev is probably used to map old actors to new ones (thus
>> the "->prev()". We did not dig deep enough to be sure though, so we'd
>> welcome some guidance here.
>>
>> Cheers,
>> Filip
>>
>>
>> _______________________________________________
>> Gecode users mailing list
>> users at gecode.org
>> https://www.gecode.org/mailman/listinfo/gecode-users
>>
>>
>
>
More information about the gecode-users
mailing list


First Name :
Last Name :
Date :
Gender :
Male
Female
Show gender :
Both
Female
Male
SHOW AGE
submit
Save
Load


| 002:104 Khan | : |
O you who believe! Say not (to the Messenger Peace be upon him ) Ra'ina but say Unzurna (Do make us understand) and hear. And for the disbelievers there is a painful torment. (See Verse 4:46) |
| 002:104 Maulana | : |
0 you who believe, say not Raina and say Unzur-na, and listen. And for the disbelievers there is a painful chastisement. |
| 002:104 Pickthal | : |
O ye who believe, say not (unto the Prophet): "Listen to us" but say "Look upon us," and be ye listeners. For disbelievers is a painful doom. |
| 002:104 Rashad | : |
O you who believe, do not say, "Raa'ena" (be our shepherd). Instead, you should say, "Unzurna" (watch over us), and listen. The disbelievers have incurred a painful retribution. |
| 002:104 Sarwar | : |
Believers, do not address the Prophet as ra'ina (whereby the Jews, in their own accent, meant: Would that you would never hear, but call him unzurna) (meaning: Please speak to us slowly so that we understand), and then listen. The unbelievers will face a painful torment. |
| 002:104 Shakir | : |
O you who believe! do not say Raina and say Unzurna and listen, and for the unbelievers there is a painful chastisement. |
| 002:104 Sherali | : |
O ye who believe, say not to the Prophet 'Ra'ina,' but say 'Unzurna' and hearken unto him. And for the disbelievers is a painful punishment. |
| 002:104 Yusufali | : |
O ye of Faith! Say not (to the Messenger) words of ambiguous import, but words of respect; and hearken (to him): To those without Faith is a grievous punishment. |
Concepts/Themes Covered: أركان الإسلام > التوحيد > الكافرون > صفات الكفار Pillars of Islam> Islamic> The Disbelievers> The Characteristics of the Disbelievers العمل > العمل الصالح > حسن السلوك Action(Work)> The Good Deeds>Good Conduct العمل > العمل الطالح > في القول > اللّي و النجوي بالإثم Action(Work)> Bad Deeds>In the Saying>Holding Sinful Secret Council الإنسان والعلاقات الأخلاقية > الأخلاق الحميدة > السلوك الحسن Man and The Moral Relations> Good Morals>Good Conduct
This tool uses eight English parallel translations for the Holy Quran imported from Mr. Clay Smith. You can also visit Qurany Concepts for browsing the Quran themes or topics. If you want to search the Holy Quran for keywords, please visit Qurany Keywords.


support.hh File Reference
(Revision: 7347)
#include "gecode/kernel.hh"
#include "gecode/int.hh"
#include "gecode/search.hh"
#include "examples/support/options.icc"
#include "examples/support/example.icc"
Go to the source code of this file.
Classes | |
| class | BaseOption |
| Base class for options. More... | |
| class | StringOption |
| String-valued option. More... | |
| class | StringOption::Value |
| Option value. More... | |
| class | UnsignedIntOption |
| Unsigned integer option. More... | |
| class | Options |
| Options for examples. More... | |
| class | SizeOptions |
| Options for examples with additional size parameter. More... | |
| class | Example |
| Base-class for Gecode examples. More... | |
Enumerations | |
| enum | ExampleMode { EM_SOLUTION, EM_TIME, EM_STAT } |
| Different modes for executing examples. More... |
Enumeration Type Documentation
| enum ExampleMode |
Different modes for executing examples.
- Enumerator:
-
EM_SOLUTION Print solution and some statistics. EM_TIME Measure average runtime. EM_STAT Print statistics for example.
Definition at line 57 of file support.hh.


Note: You'll need a webcam to run this project, and a colored object as a tracker to test the project. (Example of colored object is as shown in README.md)


Vue.js uses an HTML-based template syntax that allows you to declaratively bind the rendered DOM to the underlying Vue instance’s data. All Vue.js templates are valid HTML that can be parsed by spec-compliant browsers and HTML parsers.
To pase variable with template you have to use the "Mustache" syntax (double curly braces):
Message:{{ "{" + "{ textMsg }" + "}" }}
The mustache tag will be replaced with the value of the msg property on the corresponding data object. It will also be updated whenever the data object's msg property changes.
The double mustaches interprets the data as plain text, not HTML. In order to output real HTML, you will need to use the v-html directive:
{{ "{" + "{ rawHtml }" + "}" }}
{{ "<" }}{{ "span v-html=" }}{{ '"' }}{{ 'rowHtml' }}{{ '"' }}{{ ">" }}{{ "<"}}{{"/"}}{{"span"}}{{ ">" }}
The contents of the span will be replaced with the value of the rawHtml property, interpreted as plain HTML - data bindings are ignored. Note that you cannot use v-html to compose template partials, because Vue is not a string-based templating engine. Instead, components are preferred as the fundamental unit for UI reuse and composition.
Using mustaches: {{ rawHtml }}
Using v-html directive:
Mustaches cannot be used inside HTML attributes. Instead, use a v-bind directive:
{{ "<" }}{{ "span v-bind:disabled=" }}{{ '"' }}{{ 'isDisabled' }}{{ '"' }}{{ ">" }}{{ "<"}}{{"/"}}{{"span"}}{{ ">" }}
Disabled Value: {{ isDisabled }}
Using v-bind directive: This is the hide
So far we've only been binding to simple property keys in our templates. But Vue.js actually supports the full power of JavaScript expressions inside all data bindings:
{{ "<" }}{{ "p" }}{{ ">" }}{{ "{" + "{ incrementId + 1 }" + "}" }}{{ "<" }}{{ "/" }}{{ "p" }}{{ ">" }}
Number: {{ incrementId + 1 }}


30 October 2000
Disease Outbreak Reported
As of 30 October, the Ugandan Ministry of Health has reported cumulative figures of 224 cases, including 73 deaths.
In addition to all the participants mentioned in a previous report, the government of Japan is supporting the containment of the outbreak in Uganda by making available two clinicians from the National Institute of Infectious Diseases and from Sendai Quarantine Station who have arrived in Gulu to work with the case management team.


The tools listed here have been developed by: Clinical Metabolomics.
apLCMS, LC-MS metabolomics feature extraction
The apLCMS is used for preprocessing LC-MS data. The major improvements include the following aspects: the adaptive tolerance level searching, to apply non-parametric methods of fine-tune intensity grouping, to better preserve weak signals and the estimation method on peak intensities for absolute quantification. The algorithms are implemented in an R package apLCMS.
More about the tool: Yu, T., Park, Y., Johnson, J. M., and Jones, D. P. (2009). apLCMS—adaptive processing of high-resolution LC/MS data. Bioinformatics, 25(15), 1930-1936.
xMSanalyzer
xMSanalyzer is an automated pipeline for processing of metabolomics data which integrates with packages apLCMS and XCMS, but it could be also used to improve the data extraction steps performed by other software. It includes the following functions: data extraction, quality control assessment, detection of overlapping and unique metabolites in multiple datasets as well as batch annotation of metabolites.
Fig 1. xMSanalyzer workflow (Taken from Uppal et al. 2013)
More about the tool: Uppal, K., Soltow, Q. A., Strobel, F. H., Pittard, W. S., Gernert, K. M., Yu, T., &emp Jones, D. P. (2013). xMSanalyzer: automated pipeline for improved feature detection and downstream analysis of large-scale, non-targeted metabolomics data. BMC bioinformatics, 14(1), 15.
Mummichog
Mummichog is a method to post-process high-throughput metabolomics data, namely, metabolite identification . This software features a biological activity prediction method which is directly from mass spectrometry data without priori identification of metabolites. Both gene expression and metabolite identification confirmed the predicted results.
Fig 2. Workflow comparison between conventional methods VS Mummichog (Taken from Li et al. 2013)
More about the tool: Li, S., Park, Y., Duraisingham, S., Strobel, F. H., Khan, N., Soltow, Q. A., ... &emp Pulendran, B. (2013). Predicting network activity from high throughput metabolomics. PLoS computational biology, 9(7), e1003123.


Home
(current)
Link
Disabled
Search
Modify User
User Name
Email Address
Search
User Name
email ID
Role
Khairul
<EMAIL_ADDRESS>Admin


All content in Grow is stored as flat files in your pod's /content/
directory. Content is grouped into collections, and each collection contains a single blueprint and many documents. Blueprints describe the structure of all documents in the collection.
Grow makes it easy to separate content from presentation, but ultimately leaves the choice up to you. Content documents can be associated with URLs and with views (so they represent pages in your site), or not. Content documents without URLs are simply used internally, and can be referenced by other content documents.
Blueprints
Every content collection must have a blueprint. Blueprints define how content is structured, displayed, and served. Blueprints are stored as YAML files in your pod's content directory. For example, a blueprint for a collection "people" would be /content/people/_blueprint.yaml
path: /people/{slug}/ # The URL path format for content. view: /views/people.html # The template to use. localization: # Overrides localization from podspec.yaml. path: /{locale}/people/{slug}/ locales: - de - fr - it fields: # The content structure (currently unimplemented). - name: title: Name type: text - age: title: Age type: number categories: # Content categories (unimplemented). - Teachers - Students
path
Specifies the URL path format for all content in this collection. Documents inherit the path
specified in the blueprint. If path
is omitted, content in this collection will not be generated into pages, unless a document specifies its own $path
. If path
is specified, view
is a required field. See a list of path formatters.
path: /{root}/{base}/
view
Specifies which template should be used to render content in this collection. If view
is specified, path
is a required field.
# Documents in this collection will use the following template.
view: /views/pages.html
localization
Localization configuration for content in this collection.
path
Specifies a URL path format for localized content. By specifying both path
and localization:path
, you can use different formats for the URL paths for "root" and localized content.
path: /{locale}/people/{slug}/
locales
Specifies a list of locales that documents in this collection are available in. Each document's path will be expanded using locales to derive the URLs that the document is available at.
locales: - de - fr - it
categories
The categories
key contains a list of categories that documents inside the collection can fall into. A collection's categories can be used in conjunction with the g.categories
template function to iterate over the documents in the collection, grouped by category.