Faster Mixture Models in PyMC3
ft. more penguins
In a previous post about clustering the palmer penguins using PyMC3, the mixture model was implemented in the model itself. Though this is great for understanding what is going on, it isn’t very efficient when sampling the model. Furthermore, observations (here penguins) were assigned to groups (here the species of penguin) using only one of the samples taken from the model, since we sample the model thousands of times it is a shame not to take all that data into account.
When acquiring more observations, you typically don’t want to re-run the entire sampling step (here it takes minutes but this could be hours or days for more complex mixtures or larger datasets). Ideally you can fit the model on some initial data and then predict the group using new, previously unseen, data. With the code in the previous post this was not possible, in the code below we’ll explore how this can be done using PyMC3.
So while we had a great model already, a few trick can still be used to further improve upon it. This GitHub repository contains all the code, which is based on the code discussed on the PyMC3 forums here and here. Both threads are interesting and worth checking out !
The new model
The data is all identical to the previous post, as is the code to prepare it (applying a StandardScaler
). Here
the explicit categories for each observation are replaced by pm.Mixture
which handles this far more efficiently.
Using Theano’s stack
function different distributions are combined into a larger tensor.
Also note that the sampling is done on a single core, this is because there is a bug in the sampling of Mixtures on Windows.
n_clusters = 3
data = scaled_penguin_df.drop(columns=["species"]).values
n_observations, n_features = data.shape
with pm.Model() as Model:
# Create a covariance matrix for each potential cluster which relates all features of our data
lower = tt.stack(
[
pm.LKJCholeskyCov(
"sigma_{}".format(k),
n=n_features,
eta=2.0,
sd_dist=pm.HalfNormal.dist(sd=1.0),
)
for k in range(n_clusters)
]
)
chol = tt.stack(
[pm.expand_packed_triangular(n_features, lower[k]) for k in range(n_clusters)]
)
# The center of each cluster
mus = tt.stack(
[
pm.Normal("mu_{}".format(k), 0.0, 1.5, shape=n_features)
for k in range(n_clusters)
]
)
# Create the multivariate normal distribution for each cluster
MultivariateNormals = [
pm.MvNormal.dist(mus[k], chol=chol[k], shape=n_features)
for k in range(n_clusters)
]
# Create the weights for each cluster which measures how much impact they have
w = pm.Dirichlet("w", np.ones(n_clusters) / n_clusters)
obs = pm.Mixture("obs", w=w, comp_dists=MultivariateNormals, observed=data)
trace = pm.sample(2000, cores=1, tune=2000, chains=1)
Sampling here is considerably faster than before, that already is a clear advantage (especially if you need to run the inference multiple times with different cluster sizes to determine how many there are). Though, there are still a few things to implement, as this model doesn’t provide a category/group to each observation.
Assigning groups to observations
From this model it is far less obvious how to get cluster assignments for all observations. The previous model
explicitly assigned a category to each observation, which is not the case here. We’ll have to check with each of
the MvNormals
in the Mixture which fits best with each observation. The code below does this for all sampled data
and returns the mean probability for each observation and each cluster.
Note that here we tackle multiple issues in one go as also new data can be passed in that was not used for
sampling. After scaling new data (look at .fit()
and .transform()
from StandardScaler
) it can simply
be passed in here and done!
def prob_weights(model_mixed, trace_mixed, ynew):
complogp = obs.distribution._comp_logp(theano.shared(ynew))
f_complogp = model_mixed.model.fastfn(complogp)
weight_ynew = []
ichain = 0 # just use the first chain, as groups can differ between chains you can't mix them
for point_idx in range(len(trace_mixed)):
point = trace_mixed._straces[ichain].point(point_idx)
point = {
k: v
for k, v in point.items()
if k.startswith("mu_") or "cholesky" in k or "w_stick" in k
} # We need to remove a number of un-necessary keys.
prob = np.exp(f_complogp(point))
prob /= prob.sum()
weight_ynew.append(prob)
weight_ynew = np.asarray(weight_ynew).squeeze()
return weight_ynew.mean(axis=0)
with Model:
weights = prob_weights(Model, trace, data)
This will give us an n_observations by n_clusters large matrix, with for each observation the probabilities it belongs to each cluster. With a few lines below we can get the best cluster for each observation.
weights_df = pd.DataFrame(
weights, columns=[f"Group {d+1}" for d in range(weights.shape[1])]
)
weights_df["Predicted Group"] = weights_df.apply(lambda x: x.idxmax(), axis=1)
weights_df
| Group 1 | Group 2 | Group 3 | Predicted Group | |
|---|---|---|---|---|
| 0 | 8.382822e-07 | 3.585496e-27 | 2.134100e-03 | Group 3 |
| 1 | 2.719038e-05 | 8.994132e-19 | 3.469642e-03 | Group 3 |
| 2 | 9.999582e-05 | 1.876578e-19 | 1.003150e-03 | Group 3 |
| 3 | 3.711145e-07 | 2.739789e-26 | 1.710354e-03 | Group 3 |
| 4 | 7.053319e-08 | 1.083051e-32 | 5.662282e-04 | Group 3 |
| … | … | … | … | … |
| 337 | 1.704825e-13 | 3.702778e-03 | 6.052112e-15 | Group 2 |
| 338 | 4.878579e-12 | 1.184303e-02 | 1.632105e-13 | Group 2 |
| 339 | 1.321670e-14 | 5.686282e-03 | 5.483161e-16 | Group 2 |
| 340 | 6.149976e-12 | 4.603352e-03 | 9.009127e-13 | Group 2 |
| 341 | 4.806522e-11 | 7.667016e-04 | 1.549001e-12 | Group 2 |
Final results
The clustering is on par, or even slightly better than before. By taking all samples from one chain into account we get a much more robust result. Only four observations are assigned in the wrong group here, which given how minor the differences are between some species (at least from these measurements, visually it is rather easy telling them apart) in this dataset is a rather nice result.
Conclusion
While the model itself isn’t much more complicated than in the previous post, not explicitly including categories (or groups or species) which can be extracted, makes the downstream analysis more involved. Though the advantages of this approach are clear; the model samples much faster in under two minutes (vs. 15+ minutes for the previous one), new observations can be assigned to a group without re-running the sampling and the final results are more robust as more data from the sampling is included.
References
- palmerpenguins: Palmer Archipelago (Antarctica) penguin data. Allison Marie Horst and Alison Presmanes Hill and Kristen B Gorman (2020).
Acknowledgements
Header photo by Cornelius Ventures on Unsplash
Liked this post ? You can buy me a coffee


Melting Butter
Check out this stylish and elegant travel site. The website isn't too cluttered and it's easy to navigate around in. I love the simple and attractive navigation bar. The home page has a lot of pictures but doesn't appear too cluttered. It has a clean look. The site contains many basic HTML elements and other attributes I haven't used before.


Archivo Black was designed to be used simultaneously in print and digital platforms. The technical and aesthetic characteristics of the font are both crafted for high performance typography.
Archivo is a grotesque sans serif typeface family from Omnibus-Type. It was originally designed for highlights and headlines. This family is reminiscent of late nineteenth century American typefaces. It includes Black and Narrow styles, and was derived from Chivo.
Updated December 10th 2012 to fix encoding tables and index (Thanks Theunis de Jong for his technical input.)
To contribute to the project contact Omnibus-Type.


--- layout: archive title: Zulip Chat Archive permalink: /stream/144837-PR-reviews/topic/.23510.20opposite.20categories.html ---
@Scott Morrison I saw you fixed some stuff, but Travis is still complaining... If you don't have time for this, just let me know, and I'll try to take a look.
Think I've got it now. That intermediate commit was just getting work from my office computer to my laptop.
@Mario Carneiro I get that you don't like the idea of making op
irreducible. So what is the best way forward? Just now I had to compose two arrows f
and g
, but f
lived in the opposite category... so Lean complained. I would love to just write f.unop
and move on. What do you think is the best solution?
you can have unop
without making op
irreducible
@Mario Carneiro Would you welcome a PR that puts op
and unop
throughout the library without making op
irreducible?
sure
Ok, #510 no longer actually makes opposite
irreducible. This PR has some useful cleanup in other category_theory files, as well.
It's hard to understand what is going on when reviewing a commit which contains a combination of substantial changes (like to op
), general cleanup, and new features.
Miscellaneous cleanup PRs are fine, but they shouldn't be mixed in with actual changes.
Did we come to the conclusion that opposite
should not be irreducible? Or are we just not changing it for now?
Mario does not want it to be irreducible. I have no clue what's good. And others seemed to not care very much (-;
So for now it won't be irreducible.
Hmm, but I see hom.op
and hom.unop
are irreducible?
Is that intentional?
and then sometimes they get made not irreducible
I guess I don't really understand what the plan is that involves introducing op
and unop
but not making opposite
irreducible (or even a structure). I feel like we don't have a good chance of putting op
/unop
in all the right spots if not forced to do so by irreducibility of opposite
, and then whatever problem we solve with op
/unop
will continue to show up later.
@Mario Carneiro What do you think about :up: ?
I think what we really want is a one-member structure with definitional eta, and this irreducible
thing is the closest approximation we can make
I wonder whether we need category.hom.op
at all
I've had breakage because Lean thought f
was in the opposite category and I wanted something in C
.
Or are you saying we only need unop
?
Okay, after some experimentation, removing category.hom.op
seems like a bad idea
But I'm not very happy about marking them as irreducible but then undoing that in various places.
I think all this hom.op
stuff doesn't address the real issue though
it's still easy to end up with goals like F.map g ≫ F.map f = F.map f ≫ F.map g
I think the right way to do this would be to give the hom sets the same treatment as the objects, but it seems to be impossible without splitting out the hom
field into its own class
which I think we may want to do anyways
For example, the definition of composition in the opposite category should not be λ _ _ _ f g, g ≫ f
but λ _ _ _ f g, (g.unop ≫ f.unop).op
I would also be willing to try just using a structure
In fact, maybe we can even reuse https://github.com/leanprover/mathlib/pull/538?
{% endraw %}Last updated: Apr 24 2020 at 19:02 UTC


| Top |
The GDBusObject type is the base type for D-Bus objects on both the service side (see GDBusObjectSkeleton) and the client side (see GDBusObjectProxy). It is essentially just a container of interfaces.
const gchar *
g_dbus_object_get_object_path (GDBusObject *object
);
Gets the object path for object
.
Since 2.30
GList *
g_dbus_object_get_interfaces (GDBusObject *object
);
Gets the D-Bus interfaces associated with object
.
(element-type GDBusInterface) (transfer full) : A list of GDBusInterface instances.
The returned list must be freed by g_list_free()
after each element has been freed
with g_object_unref()
.
Since 2.30
GDBusInterface * g_dbus_object_get_interface (GDBusObject *object
,const gchar *interface_name
);
Gets the D-Bus interface with name interface_name
associated with
object
, if any.
NULL
if not found, otherwise a
GDBusInterface that must be freed with g_object_unref()
.
[transfer full]
Since 2.30
struct GDBusObjectIface { GTypeInterface parent_iface; /* Virtual Functions */ const gchar *(*get_object_path) (GDBusObject *object); GList *(*get_interfaces) (GDBusObject *object); GDBusInterface *(*get_interface) (GDBusObject *object, const gchar *interface_name); /* Signals */ void (*interface_added) (GDBusObject *object, GDBusInterface *interface_); void (*interface_removed) (GDBusObject *object, GDBusInterface *interface_); };
Base object type for D-Bus objects.
GTypeInterface |
The parent interface. |
|
Returns the object path. See |
||
Returns all interfaces. See |
||
Returns an interface by name. See |
||
Signal handler for the “interface-added” signal. |
||
Signal handler for the “interface-removed” signal. |
Since 2.30
“interface-added”
signalvoid user_function (GDBusObject *object, GDBusInterface *interface, gpointer user_data)
Emitted when interface
is added to object
.
object |
The GDBusObject emitting the signal. |
|
interface |
The GDBusInterface that was added. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since 2.30
“interface-removed”
signalvoid user_function (GDBusObject *object, GDBusInterface *interface, gpointer user_data)
Emitted when interface
is removed from object
.
object |
The GDBusObject emitting the signal. |
|
interface |
The GDBusInterface that was removed. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since 2.30


| 048:012 Khan | : |
"Nay, but you thought that the Messenger (SAW) and the believers would never return to their families; and that was made fair-seeming in their hearts, and you did think an evil thought and you became a useless people going for destruction." |
| 048:012 Maulana | : |
Nay, you thought that the messenger and the believers would never return to their families, and that was made fair-seeming in your hearts, and your thought an evil thought, and you are a people doomed to perish. |
| 048:012 Pickthal | : |
Nay, but ye deemed that the messenger and the believers would never return to their own folk, and that was made fairseeming in your hearts, and ye did think an evil thought, and ye were worthless folk. |
| 048:012 Rashad | : |
You secretly believed that the messenger and the believers will be defeated and never come back to their families, and this was firmly established in your hearts. You harbored evil thoughts and turned into wicked people. |
| 048:012 Sarwar | : |
You thought the Messenger and the believers would never ever return to their families and this attracted your hearts and caused you to develop evil suspicions.  |
Concepts/Themes Covered: الجهاد > الغزوات > غزوة الحديبية وبيعة الرضوان Jihad> The Holy Battles> Al-Hudaibiah Battle and the Radwan Pledge of Allegiance الإنسان والعلاقات الاجتماعية > المجتمعات > الأعراب Man and The Social Relations>The Societies>The Bedouins
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.


--- ---
| Winged Light | Ancestor Spirit Wing Buffs | Wandering Spirit Wing Buffs | Total Winged Light | |
|---|---|---|---|---|
| Available | {%- assign stars = site.data.collectibles.stars.size -%} {%- assign ancestor_buffs = 47 -%} {%- assign wandering_buffs = 32 -%}||||
| Collected |
Location descriptions of Winged Lights are based on a hypothetical path from the primary entrance to the primary exit of the area within which the Winged Light is found.
The term "forward" refers to the direction along that path, "left" is to the left of the path, and "right" is to the right of the path.
The "Visit Order" of Winged Lights is a suggestion, and has no bearing upon the descriptions of other Winged Light in the area.
| Visit Order | Acquired | Realm | Area | Id | Location |
|---|---|---|---|---|---|
| {{ light.visit }} | {{ realm }} | {%- if area.subtitle -%} {{ area.subtitle }}: {%- endif -%} {{ area.name }} {%- if area.caption -%} {%- endif -%} | {{ id }} | {{ light.description }} |


Designed for PUC Minas’ Graduation Project, this work arose from a concern regarding the marginalization of those who decide to work with art in the suburbs,. My intention was to foster the development of the most diverse art forms, especially those originated in the suburbs.
The project consists of the articulation of two main propositions: one with a design character, in the form of a dynamic and itinerant object, which subsidizes the work of artists from the periphery; another as a collaborative mapping platform, an initiative that helps to identify the various artistic agents that remain hidden in the cultural scene.
The proposed object switches between two basic functions: A recording studio and a stage for performances.
This project was carried out in the ninth semester of the Architecture and Urbanism course of PUC-Minas, during the discipline of Executive Building Project under the guidance of Professor Clarissa Bastos. The program required the creation of an office tower, which also housed shops on the ground floor.
The project is a housing complex located in the city of Belo Horizonte. The resolution of the architectural problem was primarily based on the understanding and adaptation of built shape to the site in which it operates. It’s sharp relief caused the volume to be scaled at different levels.
The housing units were arranged in two blocks that run in the form of a "L", seeking greater use of different viewpoints offered by the land. The insertion of the building in the border turned out to generate a free space on the center, which features a large permeable area, and also includes a plateau which is the roof slab of the underground garage, created as a common space for residents. The horizontal movement takes place behind the building by means of ramps that leads to the units that offers accessibility to disabled users.
A series of "tears" were made on the built form, creating passages that cross the space and provide greater communication between the bordering areas and the houses. On those points there are plants responsible for acclimatizing the space that also works as some sort of shelter.
The housing units are diversified, providing solutions that can serve different user profiles and interests. On total there are 36 residential units, plus a commercial establishment. 21 of them are arranged in duplex, and vary in size and plant solution. The staggering of the building enabled the creation of large terraces that are integrated as part of the units located on the tops and on the volume tips. It was our intention to soften the individualistic character usually found in housing, creating spaces that may favor the greater communication and integration among the inhabitants.
Designed for PUC Minas’ Building Project discipline on the year of 2013.
This project was developed during the Eighth Semester of the Architecture and Urbanism course of PUCMinas, during the discipline of Interior Design under the guidance of Professor José Euzébio. It consisted of an architectural intervention on an old cinema active in the city of Belo Horizonte during the 60’s.
The "Cine Candelaria Concert Hall" is an intervention project on an old cultural theater located in Raul Soares Square, declared a Historical and Cultural Heritage of Belo Horizonte - Minas Gerais, Brazil.
The intent of this project was to rescue the cultural value and the assets that the cinema provided to this area of town. It consists of an auditorium for music performances evaluated on a “pilotis” that creates on the level below a location that serves as the public part of the project, that contains not only a bar but also a free space filled with benches designed to create a comfortable living space, opened to many different uses and people.
The object was inserted into the ruins that were left of the Cinema, and is connected to them by a balcony that runs through the ruin and extends the foyer of the auditorium to the outside, physically integrating the old and the current "Cine Candelaria". A large ramp protected by glass, makes the connection between the pilotis, the auditorium and the terrace, a third living space with gardens and benches, from where you can see the entire Raul Soares square.
Project developed during the Built Environment Intervention course at PUC Minas in the first half of 2012, under the guidance of Professor Claudio Bahia.


Teleflex (TFX) Presents At 2019 Stephens Nashville Investment Conference - Slideshow
by SA Transcripts, https://seekingalpha.com/author/sa-transcriptsThe following slide deck was published by Teleflex Incorporated in conjunction with this event.
The following slide deck was published by Teleflex Incorporated in conjunction with this event.


Practical Magic
As reviewed by James Brundage
Why do titles have to be so ironic? Not to say that Practical Magic is an oxy moron, some of the camera tricks that they have are nice and neat. But the movie itself is neither practical nor magic, which it would so much like us to believe. It's not a witchcraft movie, it's not a female bonding movie, or a family movie. It's not much of a romance, it's not much of a thriller. It's not much of a PG-13 horror, either. What it is is OK. Nothing more, nothing less. It's one of those movies that I kind of just sat through. I was a passive participant. I didn't even get to make my usual comments picking on it while I watched it (except for one). It's not a waste of your time, if you have time to kill. It's not a bad movie to take some witches to: I can say its religiously accurate. But what use is that?
You'd think it be great, or at least good, starring Nichole Kidman and Sandra Bullock, directed by Giffen Dunne (Addicted to Love). But instead its just mediocre. It's just OK. End of story. End of film. End of review.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Students
-
Julian FARAONE, Simplification Of Deep Neural Networks For Efficient Inference, PhD (under examination), 2021.
-
Rui TANG, Optimisation of residential battery integrated photovoltaics systems: analyses and new machine learning methods, PhD, 2021.
-
Nicholas FRASER, Algorithms and Architectures for High Performance Kernel Adaptive Filtering, PhD, 2020.
-
Stephen TRIDGELL, Low Latency Machine Learning on FPGAs, PhD, 2020.
-
Duncan MOSS, FPGA Architectures for Low Precision Machine Learning, PhD, 2018.
-
Andri MAHENDRA, Electronic Photonic Integrated Circuits and Control Systems, PhD, 2017.
-
Nguyen Cong DAO, Characterisation and modelling of bulk CMOS transistors over the 5-300K Temperature Range, PhD, 2017.
-
Thuy T. PHAM, Automated Classification for Biomedical Data: Machine Learning Approaches for Subject-Independent Settings, PhD, 2017.
-
Farzad NOORIAN, Risk Management using Model Predictive Control, PhD, 2016.
-
Michael FRECHTLING, Automated Dynamic Error Analysis Methods for Optimization of Computer Arithmetic Systems, PhD, 2015.
-
Lei LI, Rolling Window Time Series Prediction using MapReduce, MPhil, 2014.
-
Anthony Mihirana de SILVA, Grammar-based Feature Generation for Time Series Prediction, MPhil, (published by Springer here), 2013.
-
Chong Hau ANG, Delay-Based Pattern Recognition using Field-Programmable Gate Arrays, MPhil, 2013.
-
Chi Wai YU, Hybrid FPGA: Architecture and Interface, PhD 2010.
-
Chun Hok HO, Customisable and Reconfigurable Platform for Optimising Floating Point Computations, PhD 2009.
-
Chi Chiu TSANG, Error Reduction Techniques for a MEMS Accelerometer-based Digital Input Device, MPhil, 2008.
-
Kuen Hung TSOI, A Flexible Arithmetic System for Simulation, PhD, 2007.
-
C.T. Chow, A Single Chip Carbon Nanotube Sensor, MPhil, 2007.
-
Y.M. LAM, Speech Synthesis from Surface Electromyogram Signals, PhD, 2006.
-
C.K. WONG, A Decimated Electronic Cochlea on a Reconfigurable Platform, MPhil, 2006.
-
Brian M.H. LI, Variable Block Size Motion Estimation Hardware for Video Encoders, MPhil, 2006.
-
C.L. YUEN, Low Power Wireless Sensor Applications, MPhil, 2004.
-
Chun Hok HO, Automatic Synthesis and Optimization of Floating Point Hardware, MPhil, 2003.
-
Yuet Ming LAM, An Optimization Framework for Fixed-point Digital Signal Processing, MPhil, 2003.
-
Ocean Yu Hoi Cheung, Implementation of an FPGA based Accelerator for Virtual Private Networks, MPhil, 2002.
-
Kuen Hung TSOI, Cryptographic Primitives on Reconfigurable Platforms, MPhil, 2002.
-
Norris Monk Ping LEONG, FPGA Design Methologies for High Performance Applications, PhD, 2001.
-
Hiu Yung WONG, Matching Properties and Applications of Compatible Lateral Bipolar Transistors, MPhil, 2001.
-
Ivan Ka Ho LEUNG, A Microcoded Elliptic Curve Cryptographic Processor, MPhil, 2001.
-
Daniel Tak Tsung SUEN, Elliptic Curve Cryptography: Schoof’s Algorithm on Fields of Characteristic Two, MSc, 2000.


What is Blended Learning? Different Types of Learning Blocks
A great way of picturing Blended Learning is imagining a wall made of brightly coloured bricks. Likewise, Blended Learning is made up of a number of components which all contribute to successful learning transfer.
Design is very important when it comes to structuring a Blended Learning programme. While there are no hard and fast rules as to how this should be done, giving it enough careful consideration is important.
Design approaches can differ from programme to programme. Many organisations choose a structured end-to-end approach where their learners all experience the same journey together. Alternatively, there are also ways of allowing learners to choose their own journey through the content; accessing the learning as and when they need it. Others complete a learning diagnostic prior to the programme to help learners determine which elements of the learning they need most. It’s all down to professional preference.
Keeping the purpose in mind while designing is key. Define the required outcome early then build the rest of the learning components to support it. Your outcome is the base and the learning components form the bricks to build your wall.
While it is tempting to look at the options as a bit of a pick’n’mix or tasty array of goodies to throw into the programme, it is essential to focus on your purpose. Ask yourself; is this useful and relevant to the learners? Does it move us towards the desired outcome? If not, it doesn’t make the cut - be ruthless!
Let’s have a look at some of the components, the bricks to build the Blending Learning wall with.
Face to Face (F2F) Workshops
A staple in almost all learning scenarios, the option to include F2F workshops is common. These can consist of short bitesize workshops or longer, deep diving sessions that maximise having a group of people in a room together. This works best if travel time and cost are limited and people are co-located, or near-located to one another.
Virtual Workshops
Providing the same benefits as a F2F workshop, but minus the travel. Learners are giving the option to learn together, interacting, sharing ideas and working on challenges, but in a virtual, live platform such as Zoom, Cisco Webex or Microsoft Teams. This is best if learners are disparately located, to save on travel time, cost and carbon.
Webinars
Less intimate and interactive than a virtual workshop, webinars are less likely to explore the deeper levels of learning transfer yet can still be a useful medium in a Blended Learning programme. They can be recorded and broadcast on demand, with the option for participants to submit questions to their host.
Flipped Workshops
A flipped workshop is when learners consume provided content prior to a group workshop, using this time to then explore the content further and practice any techniques together. This can be done through either a F2F or virtual workshop and content can be consumed through a varied mix of mediums; video, reading, eLearning etc.
By having learners consume the content beforehand, it maximises the live practice time and discussion, also adding the benefit of learners being able to reflect on the content prior to putting it into practice.
“On the Go” Learning Apps
The number of learning applications is on the rise. They can be pre-programmed with super-short learning “sparks” that introduce, boost or recap on learning. They are great examples of micro-learning, creating a new division of learning that is ‘just in time’, allowing learners to access regularly and easily, whenever they want it.
A brilliant example of this is an up-coming company called Intao. Their Director, Alain van Gils, says “Learning is a journey, not a one-time event. In fact, it's something we all do all the time. Intao simply brings a little more awareness to the process with daily nudges, learning impulses and nuggets of wisdom. Essentially, it's about setting a clear intention to consciously grow and develop each day, and building a habit to match. Manage that and amazing things start to happen.”
You can check out their website here.
Virtual Expert
This can be a live opportunity to have an “expert”; be it an internal colleague in the organisation or an external expert/trainer. This works best done virtually, rather than having the colleagues travel for the event and learners are still able to spend time with them, asking live Q&A and learning directly from their experience.
Forums
A forum is a fantastic tool that learners can use to check in with each other, ask questions, share references and learning and just generally keep the conversation and learnings going throughout a programme. There is always the option to involve your experts in this too.
There are several apps available that can maximise this experience for learners; WhatsApp, Facebook, Yammer or even a platform like Discord. Often, even once the programme has ended, these channels often stay open.
Formal Qualification/Certification
Sometimes there is the option of giving your Blended Learning programme an accolade at the end. Ranging from a small achievement such as mastering a piece of software like Excel, all the way up to an apprenticeship scheme, university model or distance learning through the Open University. If you are unsure, there are many certifications that can be found online to give you some inspiration.
eLearning
For many, when they think of Blended Learning, they think of F2F programme supported by eLearning modules, and until recently this is what it was. eLearning can still play a helpful role in a Blended Learning programme as learners can use these modules to make progress in their own time at their own pace. This may, for example, make up some of the content consumed before a flipped workshop.
It is important however, like other methods on this list, that they are curated carefully, ensuring that they are relevant and aligned with the rest of the content. There are some great, creative, modern eLearning companies who are making great eLearning modules that have good impact.
Coaching
This block takes many forms. Learners can be allocated a coach to work with throughout the entire programme, or it could be that the overall programme has some coaching session built in. It doesn’t have to be F2F either; telephone/virtual coaching is becoming increasingly popular due to the instant availability and accessibility of it.
It doesn’t always have to be a qualified professional either; peer coaching and reverse skill coaching are also quickly gaining popularity and still produce good results.
Video
Talks on Google and Ted Talks are well known now, but a bit of digging on YouTube can throw up a host of useful talks and videos that your learners could benefit from.
Video is a popular and effective way of consuming content. According to a report by “Towards Maturity”, managers are doing most of their own learning on the way to and from work, which is why podcasts and video are an effective way of learning.
Podcasts
According to Ofcom, podcast listening is on the rise. For one, it is a convenient way to consume content whilst multitasking. Driving, running, walking the dog, cooking or commuting; listening to a podcast is fast becoming people’s go to.
In a Blended Learning programme, podcast listening could be curated to include pre-recorded content such as Ted Radio Hour or HBR Ideacast. You could even create your own internal podcast with interviews with internal experts or even advice and guidance on how to succeed in the programme.
Reading
There is a catch with offering reading as block to Blended Learning. Time. Everyone is so busy nowadays; time is in such demand that it can feel like a luxury to take time out to read an entire book. Many people enjoy reading for pleasure to unwind but may find that reading a business book puts a huge demand on their free time.
An interesting article was put together by Andrew Merle on the top 50 business books and just how long it can take to read them.
Supporting a Blended Learning programme with recommended reading is great if it is carefully curated. Is it necessary to read the whole book or will a specific chapter suffice? The same goes for articles. If it is a popular business book, is the information available in another format, such as a Ted Talk, podcast, or video?
If you do have a recommended reading as part of your programme, ensure that it is given time for discussion and use; people will feel resentful if they have given over valuable time to do reading that is then never referenced to.
Tasks/Mini Projects
The ongoing nature of Blended Learning programmes lends itself to learners being able to apply their learning in real situations throughout. This can then be debriefed, coached and built upon as part of the learning programme itself.
In a manager development programme, learners could be tasked with coaching a team member, or analysing the P&L report. For a graduate programme, learners might be asked to apply their learning in presentation skills by sharing a relevant presentation in a team meeting.
Manager Intervention
This can have a huge influence on learning transfers in any learning programme, blended or otherwise. Mary Broad and John Newstrom’s seminal 1991 publication “Transfer of Training” reported that “active engagement and participation in the development process by the line manager was essential is positive impact was to result. And managers need to do much more than simple provide support from the side-lines.”
Rather than just relying on managers taking an interest, discussing and supporting their team member through the programme, we can support managers by providing them with learner updates, key messages and high-level content covered. We can give them manager guides of what to do and when, and work with them to agree the expectations of the role that the manager will take throughout.
A Blended Learning programme can provide a varied choice of building blocks that can create a fulfilling and stable learning transfer. As long as we avoid the temptation to go crazy with the pick’n’mix and keep our objective firmly in mind, there is a wonderfully diverse spread of option available.
Provided the content is well curated, and everything remains relevant and applicable to your learners, there is no reason why Blended Learning can’t work for you. Take the time to construct and always remember; the objective and outcome is key.


a74
|
||||||
|
|
|
674
22 1000
Sequential I/OsNow look at the case of purely sequential I/O. Sequential I/O has a much better performance rate than random I/O because there is very little head movement involved in sequential I/O. This example looks specifically at the I/O rates of the log writer. For this example, assume the following specifications:
For this example, look at how long it takes to retrieve a block of data on average. For sequential I/O, the access time is determined by a much smaller number of seeks. The number of times you have to seek is determined by when you have to go to the next track on the disk. Here are some additional specifications for the example drive:
Because disk technology is very efficient, in a sequential I/O, the heads write or read the data to the same cylinder before moving on. For a disk with 63 sectors per track and 3 platters with 2 sides each, the total amount of data that can be written or read before a single track seek has to occur is determined as follows: 63 sectors/track * 3 platters * 2 tracks/platter * 512 bytes/sector = 193,536 bytes = 189 Kbytes Because the log writer writes the data in chunks of LOG_BUFFER_SIZE size (which is set to four times the size of the database block size), you can say that approximately 13 blocks are written before a seek must occur. This formula approximates the average time spent seeking: Average Seek Time = Single-Track Seek Time / 13 = 4 msec / 13 = 0.3 msecs As you can see, the average seek time does not come into play at all with sequential I/Os. But what about the rotational latency? There is a problem there. Because the log writer fills the log buffer and then writes it out in chunks, it is unlikely that the disk heads will always be over the proper place on the disk. Therefore, rotational latency is still relevant for sequential I/O. Now look at the sequential performance in terms of the number of I/Os per second the disk can sustain. Because the I/Os you are looking at now are 8K in size (because this is the size of the log buffer), the data transfer rate is calculated as follows: Seconds per log buffer = 0.133 milliseconds per KB * 8 KB per buffer = 1.06 milliseconds per block Heres the formula to determine the data transfer rate: Average Seek Time + Rotational Latency + Data Transfer Time + Queue Time For this example, the data transfer rate works out like this: 0.3 msec + 5 msec + 1.06 msec + 0 msec = 6.36 msec Therefore, the sequ f69 ential I/O rate for this particular disk drive is calculated as follows: I/O requests per second = 1 / seconds per I/O request = 1 / 6.36 msec per I/O = 1 / 0.00636 sec per I/O = 157 I/Os per sec Now assume that the log writer can use Asynchronous I/Os and can put enough requests in order to reduce the rotational latency. In that case, the number of I/Os increases significantly. The best possible case is one in which the log writer always writes enough data so that rotational latency is eliminated. You can do this by increasing the size of the log buffer or by enabling Asynchronous I/O on the LGWR. In this case, the maximum theoretical I/O rate is determined by using the following calculation: Average Seek Time + Rotational Latency + Data Transfer Time + Queue Time For this example, the calculation is as follows: 0.3 msec + 0 msec + 1.06 msec + 0 msec = 1.36 msec Then use this formula to calculate the number of sequential I/Os per second: I/O requests per second = 1 / seconds per I/O request = 1 / 1.36 msec per I/O = 1 / 0.00136 sec per I/O = 735 I/Os per sec This calculation gives the theoretical maximum number of sequential I/Os per second per disk as 735 I/Os per second per disk. Remember that these calculations are crude and dont take into account other factors that come into play as you near the limits of the capacity of the drives (factors such as queues and disk buffers). What is important to remember is the difference in performance you can achieve with sequential I/O versus random I/O. This performance difference is why it is so important to separate the log disks from the data disks. Because the redo log is so important to the operation of the RDBMS, you want to make sure that you can log as fast as necessary. Any delays in writing to the log volumes are reflected throughout the entire system. SummaryThis chapter explained how the physical disks operate and provided some calculations to show how the magic numbers on disk I/O rates are calculated. I want to reemphasize that these numbers are very rough and should be used as general guidelines. The actual I/O rates you achieve depend not only on the physical disks themselves but on the disk controllers, the bus, and the operating system. As newer disks are being developed, new features are being added to improve performance. It is important to note that the number of random I/Os you can achieve system wide depends on the number of disks you have in the system. Remember this when you are configuring your next system: Although disk drives are getting larger and faster, the increased speed does not compensate for the performance you can get with more disks. It is usually much better to get more smaller disks than fewer larger disks. For example, a 2 gigabyte SCSI disk with a rotational speed of 4,500 RPM and an average seek time of 10 msec can achieve approximately 60 I/Os per second per disk. A 4 gigabyte SCSI disk with a rotational speed of 7,000 RPM and an average seek time of 8 msec can achieve approximately 79 I/Os per second per disk. However, two 2 gigabyte drives can support 120 random I/Os per second (compared with only 79 I/Os per second for the 4 gigabyte drive). The next chapter takes these concepts a bit farther when you look at disk arrays.
|
| 702 |
|


Create offer
1
Car Details
Make:
Model:
Production year:
Fuel type:
Petrol
Diesel
Hybrid
Electric
2
Price
Original cost:
Selling price:
Publish
Make
Model
Year
Fuel
Price
New Price
-
Sold cars:
Make and model
Production year
Profit made
Profit made:
0.00
$


| Date | Artists | BPM | Key | Title | Tags | Genre | Editor | Year | Length | Actions |
|---|---|---|---|---|---|---|---|---|---|---|
| There are no tracks that meet your criteria. Please change your criteria and try again. | ||||||||||
| {{track.publishDate | string2Date | date: 'MM-dd-y'}} | {{track.artistPrimaryName}} | {{track.startBpm}} | {{track.inKey.camelotKey}} {{track.inKey.musicKey}} |
{{track.name}} ({{track.version}}) | {{track.cleanDirty?.name}} {{track.versionType?.name}} {{track.introType?.name}} {{track.outroType?.name}} | {{genre.name}} | {{track.editorPrimaryName}} | {{track.releaseYear}} | {{track.trackLength | seconds2time }} |


This test checks various characters that should always be zero width to ensure that they are. The WebKit text system ensures this in a way that's independent of the fonts installed on the system.
FAIL: Script did not run to completion.
ab


Getting Started
Overview
The getting started allows you to deploy Knative services using Knative Serving. This tutorial shows example of deploying a simple Greeter service in following languages,
-
Nodejs
-
Java
While deploying application in different languages demonstrates the polyglot capabilities as well as some key Knative concepts.
The completed solutions is available in the Solutions folder.
Environment
Its assumed that you have setup the minishift and deployed Knative serving. If not please vist setup section to do the same before proceeding further.
Sources
Clone the sources from https://github.com/redhat-developer-demos/knative-tutorial
git clone {repo-url}
For the rest of the document we call the cloned folder as $PROJECT_HOME
.
Create a directory under $PROJECT_HOME called build, you will be using this directory as your working directory.
mkdir -p $PROJECT_HOME/build
You can always refer to the Solutions if you need help.
Points to Ponder
After you have deployed the Java service, you would have noticed that it has triggered a new Kubernetes deployment something like greeter-00002-deployment
. Wondering the reason for it, lets compare the two service.yaml
that were deployed:
NodeJs service |
Java service |
|
|
If you observe the only diffrence between the two service deployments is the version of the Docker Image, which is a configuration change. Knative follows 12-factor application principles where in every configuration change leads to a new revision,
kubectl get configurations.serving.knative.dev (1)
kubectl get revisions.serving.knative.dev (2)
| 1 | Will return only one configuration called greeter |
| 2 | Will return two revisions something like greeter-00001 and greeter-00002 |
|
Each revision will trigger new deployments, and since the service is configured with runLatest it always serves the latest revision. Check Revisions and Configurations for more details on revisions, configurations and other possible revision rollout strategy. |


One in 50 'children in need' are not yet born
by Sean CoughlanAlmost one in 50 of those officially classified as "children in need" in England have not yet been born.
More than 7,000 of such vulnerable children have been put into this category before their birth, an analysis of government figures shows.
The number of "unborn" recorded in the total of vulnerable children has almost trebled in the last eight years.
The most common concerns were neglect or abuse - and that children were being born into "dysfunctional families".
Domestic violence
The Department for Education recently published annual figures showing there were 400,000 so-called "children in need".
These are children about whom there are concerns about their health or development, and who are at risk of being "significantly impaired" without extra support.
Domestic violence, parents with mental health problems, and drug and alcohol abuse are among the biggest factors.
This could lead to child protection plans or other interventions by social services or local authorities.
But a further analysis of the figures shows a continuing rise in the numbers of pre-birth children who are designated as being of concern.
The figures for 2018-19, show a new high of 7,360 children considered vulnerable before their birth. This figure has risen steadily over recent years from 2,630 in 2010-11.
While the odds might be stacked against some children from an early age, these figures show a sharp rise in those being officially monitored even before their birth.
The Department for Education says unborn children are put on this list because of concerns over their "safety or welfare", or because of the problems already facing their parents.
"For unborn children, social services will refer cases where there are concerns regarding the parents, carer or other adults in the household," said a DFE spokesman.
'Acute stress'
The most recent figures for unborn children in need show "abuse or neglect" to be the biggest concerns, along with "family dysfunction", "family in acute stress", "parents' disability or illness" and "low income".
"It is absolutely vital that councils are able to support families and help children who are at risk of significant harm, but it is also important that help is available before problems escalate to that point," said the Local Government Association.
More than 50% of children in need cases, over 200,000 incidents, involved domestic violence.
The Local Government Association also raised concerns about children in need for reasons "linked to faith or belief", which had risen by 320 to 1,950 cases, representing 0.4% of children in need.
The councils' group says that some cases could include beliefs in witchcraft or "spirit possession", but there was no breakdown to show how many.


Menu
Assets
View
Project
Debug
Run
Switch View
Map Editor
Tilesheet
Sprite Editor
...
Map
Load
Save
Clear
Delete
Undo
Redo
Map Settings
Name
Dimensions
Tilesheet
Layers
Units - ✓
Structures - ✓
Terrain - ⦰
...
Tools
Brush - D
Bucket - F
.
.
.
Switch View
Map Editor
Tilesheet
Sprite Editor
...
Tilesheet
Load
Delete
Tilesheet Settings
Name
Dimensions
Pixels per Tile


Puff Daddy's current name is: Love or Brother Love
Puff Daddy's name in the year was
(BETA) Predict Puff Daddy's name in the year :


Constructs an Estimator
instance from given keras model.
tf.compat.v2.keras.estimator.model_to_estimator
tf.keras.estimator.model_to_estimator( keras_model=None, keras_model_path=None, custom_objects=None, model_dir=None, config=None, checkpoint_format='checkpoint' )
For usage example, please see: Creating estimators from Keras Models.
keras_model
: A compiled Keras model object. This argument is mutually
exclusive with keras_model_path
.keras_model_path
: Path to a compiled Keras model saved on disk, in HDF5
format, which can be generated with the save()
method of a Keras model.
This argument is mutually exclusive with keras_model
.custom_objects
: Dictionary for custom objects.model_dir
: Directory to save Estimator
model parameters, graph, summary
files for TensorBoard, etc.config
: RunConfig
to config Estimator
.checkpoint_format
: Sets the format of the checkpoint saved by the estimator
when training. May be saver
or checkpoint
, depending on whether to
save checkpoints from tf.compat.v1.train.Saver
or tf.train.Checkpoint
.
The default is checkpoint
. Estimators use name-based tf.train.Saver
checkpoints, while Keras models use object-based checkpoints from
tf.train.Checkpoint
. Currently, saving object-based checkpoints from
model_to_estimator
is only supported by Functional and Sequential
models.An Estimator from given keras model.
ValueError
: if neither keras_model nor keras_model_path was given.ValueError
: if both keras_model and keras_model_path was given.ValueError
: if the keras_model_path is a GCS URI.ValueError
: if keras_model has not been compiled.ValueError
: if an invalid checkpoint_format was given.


rvm supports two ways of upgrading itself, one to the latest gem and the other to the latest repository source.
∴ rvm update
will install the latest gem and then run the rvm-install command.
∴ rvm update --head
will obtain the latest rvm repository source and run scripts/rvm-install from that repository.


--- layout: post title: 'Multi-Tenancy with WSO2 API Manager' url: http://apievangelist.com/2013/05/24/multi-tenancy-with-wso2-api-manager/ image: http://kinlane-productions.s3.amazonaws.com/api-evangelist-site/blog/wso2-multi-tenancy.png ---
I just had a demo of some of the new features in the WSO2 API Manager. Since WSO2 is one of my partners, I have a regular call with them to discuss the space and I often get demos of their new products and features.
Today's topic was multi-tenacy in their API Management platform, meaning you can easily deploy multiple API portals using the platform. Not every company will need more than one API portal, but for some companies that are further along, it provides a pretty sophisticated way to engage with API consumers.
When it comes to slicing and dicing your APIs, we usually segment our API resources by service level, apps and users. WSO2 introduces a fourth layer--by the domain. So now you can group API resources under domains, crafting different "API storefronts" for your consumers.
I'm still thinking through all of the opportunities with API management multi-tenancy, but at first thought, it will help me counteract many of the questions I get around a company's concern that APIs have to be public. Most companies have learned about APIs from the popularity of public APIs, so I spend a lot of time explaining the opportunities for internal or partner APis.
The WSO2 approach to API management multi-tenancy allows me to help companies understand that unlimited ways they can provide access to their valuable resources in not just public, private ways, but to any group, user base or target audience in a very organized and branded way.
You can hear me, and Chris Haddad VP, Technology Evangelism at WSO2 discuss multi-tenancy as part of the Your API Branding Strategy webinar on Thursday, June 13, 2013.
Disclosure: WSO2 is an API Evangelist partner


Chapter 13. Log Files
Log files are the primary sources of persistent information about
Squid's operation. In other words, they provide a
record of what Squid has been doing. This includes URIs requested by
users, objects that have been saved to disk, and various warnings and
errors. When Squid appears to be malfunctioning,
you'll want to check the log files first. By the end
of this chapter, you'll know how to interpret and
manage all of Squid's various log files.
Depending on your configuration, Squid maintains, at most, seven log files. The
three primary files are: cache.log,
access.log, and store.log.
Two optional log files, useragent.log and
referer.log, are similar to
access.log but contain additional information.
I'll also talk about the
swap.state and netdb_state
files. These are databases, used by Squid when it restarts.
Note that the filenames, such as access.log, are
the default values. You can change most of the log file names with
various squid.conf directives.
The following list contains a brief description of each log file:
- cache.log
-
This log file contains human-oriented, informational messages about
Squid's operation. The filename is defined by the
cache_log directive. Under normal conditions,
the file grows by about 10-100 KB per day.
- access.log
-
This log file contains an entry for every HTTP and (optionally) ICP
transaction made by Squid's clients. The filename is
defined by the cache_access_log directive. It
grows at a rate of 100-200 bytes per transaction.
- store.log
-
This log file contains low-level information about objects that enter
and leave the cache. The filename is defined by the
cache_store_log directive. It grows at a rate of
about 150 bytes per transaction.
- referer.log
-
This optional log file contains HTTP
Referer headers for each
client request. You must enable referer logging with the
—enable-referer-log option when running
./configure. The filename is defined by the
referer_log directive. It grows at a rate of
about 80 bytes per transaction.
- useragent.log
-
This optional log file contains HTTP User-Agent
headers for each client request. You must enable user-agent logging
with the —enable-useragent-log option when
running ./configure. The filename is defined by
the useragent_log directive. It grows at a rate
of about 75 bytes per transaction.
- swap.state
-
These files contain internal metadata about the objects stored on
disk. Squid uses them to reconstruct the cache upon startup. By
default, they are located in the cache_dir
directories. However, you can change the location with the
cache_swap_log directive. They grow at a rate of
100 bytes per cache miss.
- netdb_state
-
This file holds the contents of the Network Measurement Database (see
Section 10.5). It is always located in the first
cache_dir directory. Its size is determined by
the netdb_high value.
If Squid receives an error while writing a log file, it
doesn't silently continue. Instead, it exits with a
fatal error message to get your attention. Make sure that you
periodically rotate the log files, as described in
Section 13.7, to reduce the
possibility of filling your disks. For the same reason, I also
recommend placing your log files on a partition separate from any of
your cache directories.
|


Login Name
Email
Gender
Membership Level
registered member
Intermediate Member
Senior Member
Diamond membership
Super member
Member status
Actived
Limited
User profile
Add User
Cancel


Nashville mayor pledges to foster animals once a month
by WVLT NewsNASHVILLE, Tenn. (WVLT/WTVF) -- Nashville Mayor John Cooper has said he will foster an animal for a day each month at his downtown office.
Metro Animal Care and Control has made an initiative called the Bow Wow Breakout program in order to give these animals a break from shelter life.
Delilah, a 2-year-old brown Labrador retriever is set to be the first animal Mayor Cooper will foster.
"You never know, they might just find their forever home, and you might find yourself being rescued," Cooper told WTVF.
For more information on the Bow Wow Breakout Program, click here.


--- layout: default title: "" ---
Hi, my name is Chris and I'm currently addicted to off-road motorcycling.  I share some photos and videos on Instagram and some gps tracks on mytracks.co.
Before I discovered motorcycling, I spent my time solving the Rubik's Cube blindfolded (or less than 20 seconds), memorizing shuffled decks of cards, creating podcast episodes, or building other fun side projects on GitHub.
When I'm at home, I'm usually sitting in front of my computer building web applications. I currently work at Stripe, but have also built things for OmiseGO, Coinbase, GitHub, Square, Climate Corporation, Discourse, Apple, and the US Department of Defense.
If you'd like to contact me, the best way is email<EMAIL_ADDRESS>You can also find me on Instagram, Facebook, and Twitter. (resume)


Refer to the online documentation to create the configuration file.
bacmove.com/bacnet-hmi-hmi5-guide
This uses the BACnet port 47808.


Instructions
- You start out in the top left corner, represented by a circle.
- Your goal is to reach the square in the bottom right corner.
- Move by using the arrow keys on your keyboard. Mobile devices are not supported unfortunately.
Stats for Current Randomizer


HTML Emails are HTML tables that are being read in a rich text format within an email client’s rendering engine. The definition of HTML states:
“Hypertext Markup Language (HTML) is the standard markup language for documents designed to be displayed in a web browser.”
HTML has a set of rules, standards and methodologies that are overseen and maintained by W3C for web development purposes.
HTML Emails on the other hand do not have a set rules to follow, but instead email rendering clients have their own way of displaying an email;
Because of this, email client rendering engines display HTML very differently to web browsers (especially modern browsers). Email Developers need to create emails as if developing back in the 90s, using tables, deprecated HTML tags, embedded and inline CSS, with MSO tags (for MS Office rendered clients) in order to correctly render and display their emails across different email clients, devices and browsers. Additionally email clients do not allow the use of JavaScript, and restrict the size of the HTML email document and it’s images.
So sending an HTML Email is essentially hacking the rendering client and adding your code in a way for the rendering engine to recognize it, so it serves it up to as rich text.
So you’re asking yourself, ‘Why be an email designer or developer?”. My answer, " It challenges me, and I love it!!!”


Maritime Bulletin Daily Nov 15 – 16
by Mikhail VoytenkoAccidents
• Fuel leak in Rio Grande Port, Brazil
• Collision, fuel leak, Sabine Pass, Texas
• Dutch Captain reported medevaced in Portugal waters
• USS IWO JIMA fire, Mayport
• Aground and Not Under Command vessels Worldwide Alerts (1 ship)
Details only for subscribers.
Annual subscription $750. For annual subscription, contact<EMAIL_ADDRESS>Subscribe if you want to receive accidents news ASAP and in full.


This is documentation for Sage 10.1.
Documentations in other languages are available here.
|
A Tour of Sage
This is a tour of Sage that closely follows the tour of
Mathematica that is at the beginning of the Mathematica
Book.
|
PREP Tutorials
This set of tutorials takes the reader from very minimal
computer background to a good understanding of basic
undergraduate Sage functionality. It includes several
thematic "Quickstart" tutorials, and was originally
developed as professional development material for the MAA.
|
|
Tutorial
This tutorial is the best way to become familiar with Sage
in only a few hours.
|
Constructions
This document collects answers to some questions along the line "How
do I construct ... in Sage?" Try to find out how to see the Riemann zeta
function \(\zeta(s)\) along the line \(s=\frac{1}{2}+it\).
|
|
Thematic Tutorials
A collection of in-depth tutorials on specific topics. These
thematic tutorials are designed to help you get started on
Sage functionalities relating to topics such as coding
theory, combinatorics, cryptography, functional programming,
group theory, linear programming, etc. If you feel
uncomfortable consulting the reference manual, you are
encouraged to browse through these thematic tutorials.
|
FAQ
A collection of frequently asked questions, together with
answers to those questions. You are encouraged to read these
before asking questions on one of many Sage mailing lists.
|
|
Reference Manual
This is the reference manual for the Sage mathematics
software system. The reference manual contains many examples
that illustrate the usage of Sage. It consists primarily of
documentation that has been automatically generated from the
Sage source code. The examples are all tested with each
release of Sage, and should produce exactly the same output
as in this manual, except for line breaks.
|
|
|
Installation Guide
A guide on how to install Sage. You can install a Sage
source distribution or a binary distribution. Also covered
are topics relating to a system-wide installation of Sage,
and installing Sage for your own personal use.
|
Developer Guide
This document describes guidelines and policies regarding
Sage development. It explains how to write programs using Sage,
how to modify and extend the core Sage libraries, and how to
modify Sage's documentation. It also discusses how to share
your new and modified code with other Sage users.
|


open-source problem-based learning
OPEN-PBL APP is an open source software that manages problem-based learning experiences taken in vocational education. Schools can use the OPEN-PBL APP for free to ensure that their learning experiences are aligned with problem-based learning's theoretical framework and best practices. Small businesses can also take advantage of the problem-based learning approach's benefits by using OPEN-PBL APP for free in their employee training and development. What is PBL Problem-Based Learning (PBL) is a learning strategy adopted - wholly or partially - by some schools in their educational architecture. At PBL, students learn by solving problems and reflecting on their experiences. They work in small collaborative groups where they learn what they need to solve a problem presented. In this context, the teacher acts more as a facilitator to guide student learning than as the holder of knowledge, as in traditional learning approaches. Harvard, Minerva and the tech school '42' are some examples of successful initiatives of using PBL to develop professional higher skills. The strength of adopting the PBL strategy in vocational education lies in the pragmatism of their learning experiences, which helps to speed up students' employability gains in the labor market.
| CLASSICAL SCHOOL SYSTEMS | PBL TUTORIAL PROCESS |
|---|---|
Why using OPEN-PBL APP Despite the advantages of adopting PBL-based educational architectures, only few schools fully embrace the PBL approach because it requires more expensive academic resources as they are often scarce and poorly scalable. The OPEN-PBL APP helps schools and businesses address these constraints by providing a set of features for managing the execution of class trails to discuss problem-cases solving, such as business and medical case study classes, sessions for discussion of tech projects solutions and more. To ensure the integrity of the application of PBL tutorial process, OPENPBL APP:
| OPEN-PBL APP | ACTORS OF LEARNING PROCESS |
|---|---|
OPEN-PBL APP’s set of features enables schools and businesses to embrace the PBL strategy in their architecture and educational systems without the need of acquiring expensive and non scalable academic resources. Thus, they can ensure the proper application and measurement of the effectiveness of educational architectures to:
More details at:
The process of conceptualizing and outlining the architecture of OPEN-PBL APP originated from doctoral research from the Department of Informatics of PUC-Rio. Currently, code development is coordinated by OPEN-PBL.ORG, which is responsible for applying best international practices for the creation, versioning and licensing of free code. Universalization of PBL The primary mission of OPEN-PBL.ORG is to foster the use of PBL by social organizations, governments and small businesses that would otherwise not have access to the resources required for its adoption. Licensing The license to use OPEN-PBL APP is BSD. The code as well as all instructions for its secure deployment can be accessed at github.com/openpbl. Monitor of PBL practices OPEN-PBL.ORG maintains, in partnership with ”The Interdisciplinary Journal of Problem-Based Learning”, the publication of a monitor of new academic studies and PBL application cases. The content of PBL Monitor is aimed at teachers, educators, T&D professionals, and education executives interested in following developments and discussions about the PBL learning strategy. Support for social actions OPEN-PBL.ORG maintains a voluntary consultancy program for the free implementation of the OPEN-PBL application in educational initiatives promoted by municipal governments and non-profit organizations.
Virtual Learning Environments OPEN-PBL uses the virtual environment of the Google Classroom (GC) free application as the default interface for interacting with (and between) the actors involved in the learning process. The interaction is made in the following environments:
Instructional planning and design Key functionalities for instructional planning and execution provided by OPEN-PBL APP in the teacher and student interaction GC environments are:
Learning experiences Key features for managing learning experiences provided by OPEN-PBL APP in GC teacher and student interaction environments are:


Before Change
def show_triggers():
show triggers
show_qry("triggers", TRIGGERS_INFO_SQL)
print("\n\n")
print("--- %s ---" % "triggers bodies")
querystr1 = SELECT trigid, tabname, trigname
FROM systables, systriggers
WHERE tabtype="T"
After Change
def show_triggers():
show triggers
show_qry("triggers", TRIGGERS_INFO_SQL)
title = "triggers bodies"
print_start_info(title)
querystr1 = SELECT trigid, tabname, trigname
FROM systables, systriggers
WHERE tabtype="T"
AND systables.tabid >= 100
AND systables.tabid = systriggers.tabid
ORDER BY tabname, trigname
querystr2 = SELECT data FROM systrigbody
WHERE trigid=%s
AND (datakey = "D")
ORDER BY seqno
querystr3 = SELECT data FROM systrigbody
WHERE trigid=%s
AND (datakey = "A")
ORDER BY seqno
rs = select_qry(querystr1)
if rs:
for row in rs:
trigname = "trigger %s" % (row[2])
trigid = row[0]
for row in rs:
body_def = get_body(querystr2 % trigid)
body_txt = get_body(querystr3 % trigid)
output_line("\n\n -- >>> %s >>> --" % trigname)
output_line(body_def)
output_line(body_txt)
output_line("\n\n -- <<< %s <<< --" % trigname)
print_stop_info(title)
def get_info_filter():
result = ""


[1]
Control over color balance is light and clearer than theirs.
[2]
Control over color balance is light and clearer than most LC D 's who have friends who still say my bedroom where i miss is limited.


Shouldering many taxing academic burdens and pressures, college students often relegate their health to the margins. A study of more than 200 undergraduate students demonstrated that there is a significant decline in physical activity levels during the transition between high school and college. Many college students select their food based on convenience, taste, and time instead of nutritional value. In addition, the average students gets around 6 hours of sleep, well below the needed 7-9 hours of sleep.
This website encourages healthy habits by correlating input information to the growth and care of a virtual dog. Initially, the virtual pet starts out as a puppy and requires more care and time, specifically around two months which is the time it takes to form a new habit. Gathering data from the user’s phone health analytics app, the website tracks if the user has been meeting healthy goals. If so, the user’s dog will grow and thrive and show signs of it such as high levels of energy. The converse is true; the dog will display some symptoms of unhealthy choices like lack of energy or negative moods. Thus, the user has an incentive to in order not to harm their little doggo.
When students neglect the mentioned health factors, it can result in many severe consequences and risks including but not limited to: impaired brain development, poor coordination, increased negative feelings, increased risk of heart disease, stroke, type-2 diabetes, poor weight management, obesity, and hypertension. While on the other hand if students incoroporate good habits, they can reap the benefits including but not limited to improved grades, better memory, lowered risk of obesity, relieve stress, improve concentration, increased energy levels, and lower high cholesterol.


The Gamma: Expenditure Edition
This is a minimal sample page demonstrating the new expenditure data. In order for it to work, you need to host this service at <IP_ADDRESS>:10039!
Loading the visualization...
This is a minimal sample page demonstrating the new expenditure data. In order for it to work, you need to host this service at <IP_ADDRESS>:10039!


Enter Name
Input your name and select a greeting.
Enter your name:
Greeting select
Greetings
Hey
Hi
Hello
Long time no see
Yo
Howdy
Salutations
Hola
Aloha
Ahoy
Asuhhhh
Create greeting
Your personalized greeting:
Home
Project 1
Enter Name


This page has information about my employment history. And what positions that I have held in the past.
I have 3 years of experience in customer service. I spent almost an year working at Subway as an assistant manager in New Jersey. Then I went on to work 2 years at Dunkin Donuts in New York. These helped me build confidence in talking to customers and it also showed me all the hard work that goes into running a franchise store.
I worked at the IRS as a volunteer intern during my last semester at CUNY. It gave me good insights to tax accounting and some real-life scenarios with tax preparation. After my graduation I worked closer to a year at Wakefern Food Corporation as a Junior Associate Accountant. Wakefern was in the retail/supermarket space and gave me good insights to managing accounts receivable and payables.


{% extends "index.html" %} {% block body %}
1/01: Began recording data
2/12: Deployed site
2/20: Altered camera settings


Submitting your data through a third party.Back to Contents This step is only recommended if your preferred web host doesn't support PHP. Otherwise, use the php tutorials to get better control of your experiment, as well as more data from the user (there is also a concern that a third party service will inject some instability in your experiment by change its pricing plans, or quietly going out of business). First, make sure you have:
(as of June 2020) You will learn:
Because you are using a third party server to handle your data, you can do very little server side validation. Therefore you should never auto pay your participants on completion. You may come across tutorials which hack up a google form for use in their experiment, don't. To the best of my knowledge google has changed the layout of their forms in a way which makes this more difficult, and even if you work around it, they can change the names of their inputs which could lose data, as well as require you to completely rename everything in your experiment. For these code heavy tutorials, it is recommended to full screen the video and watch at 720p ResourcesThe changed files for this step can be found here. Note:
Proceed for a checklist to prepare your files for distribution. |


Kashiyatra 2020 will be held from 18th to 20th January. Gear up for the 3 most awesome days of 2020.
To paricipate in Kashiyatra'20 you need to register first.For each event you want to participate you need to regsiter seperately
The first step which you need to do participate in Kashiyatra is to generate your unique "KY ID". This allows you you to regsiter yourself and your team for different events of Kashiyatra 20.Also during your participation at IIT(BHU) Varanasi, you will be asked to show your KY ID.
Our registration desk will be setup at LIMBDI Hostel. You need to come there and go through the necessary procedure to avail accomodation at IIT(BHU) Varanasi.
Each paricipant must show his/her "Identity Card" which you have recieved from the "Registration Desk".This ID card has a unique number which is required before you paricipate in your event.Also, the event you want to take part in should be mentioned on your ID card by the coordinator at the Registration Desk.
You can go to the "Registration Desk" to get your Registration ID well before the start of your interested event.But doing this ensures that you are opting for "On-Spot Registration" which does not guarantee whither you will be getting a slot to paricipate or not. It is strongly recommended that you register only before coming to the festival to fix your participation.
On spot regsitartions may or may not be allowed depending on the number of already regsitered participants. We suggest you register online or with the campus ambassador as soon as possible.
Accomodations will be provided to boys and girls in well secured separate residential complexes in the campus of IIT(BHU).
No issues. You can take accomodation for those members as and when the arrive,you can book accomodation for them beforehand.
No. The accomodation charges dont include food. However,you can take food in hostel mess 100rs/- for all 3 meals of the day.Also, there will be food courts operational at the events venue during Kashiyatra to cater to food requirements.
Yes, ATMs are available.
Stay tuned to our Official Facebook page.
Preferably not. You just stood in a huge queue to see it live, why ruin it just to show it to others!
No you need to register for each event only once.


Arrays allow to define type of variables that can hold several data items of the same kind. Similarly structure is another user defined data type available in C that allows to combine data items of different kinds.
Structures are used to represent a record. Suppose you want to keep track of your books in a library. You might want to track the following attributes about each book −
To define a structure, you must use the struct statement. The struct statement defines a new data type, with more than one member. The format of the struct statement is as follows −
struct [structure tag] { member definition; member definition; ... member definition; } [one or more structure variables];
The structure tag is optional and each member definition is a normal variable definition, such as int i; or float f; or any other valid variable definition. At the end of the structure's definition, before the final semicolon, you can specify one or more structure variables but it is optional. Here is the way you would declare the Book structure −
struct Books { char title[50]; char author[50]; char subject[100]; int book_id; } book;
To access any member of a structure, we use the member access operator (.). The member access operator is coded as a period between the structure variable name and the structure member that we wish to access. You would use the keyword struct to define variables of structure type. The following example shows how to use a structure in a program −
#include <stdio.h> #include <string.h> struct Books { char title[50]; char author[50]; char subject[100]; int book_id; }; int main( ) { struct Books Book1; /* Declare Book1 of type Book */ struct Books Book2; /* Declare Book2 of type Book */ /* book 1 specification */ strcpy( Book1.title, "C Programming"); strcpy( Book1.author, "Nuha Ali"); strcpy( Book1.subject, "C Programming Tutorial"); Book1.book_id = 6495407; /* book 2 specification */ strcpy( Book2.title, "Telecom Billing"); strcpy( Book2.author, "Zara Ali"); strcpy( Book2.subject, "Telecom Billing Tutorial"); Book2.book_id = 6495700; /* print Book1 info */ printf( "Book 1 title : %s\n", Book1.title); printf( "Book 1 author : %s\n", Book1.author); printf( "Book 1 subject : %s\n", Book1.subject); printf( "Book 1 book_id : %d\n", Book1.book_id); /* print Book2 info */ printf( "Book 2 title : %s\n", Book2.title); printf( "Book 2 author : %s\n", Book2.author); printf( "Book 2 subject : %s\n", Book2.subject); printf( "Book 2 book_id : %d\n", Book2.book_id); return 0; }
When the above code is compiled and executed, it produces the following result −
Book 1 title : C Programming Book 1 author : Nuha Ali Book 1 subject : C Programming Tutorial Book 1 book_id : 6495407 Book 2 title : Telecom Billing Book 2 author : Zara Ali Book 2 subject : Telecom Billing Tutorial Book 2 book_id : 6495700
You can pass a structure as a function argument in the same way as you pass any other variable or pointer.
#include <stdio.h> #include <string.h> struct Books { char title[50]; char author[50]; char subject[100]; int book_id; }; /* function declaration */ void printBook( struct Books book ); int main( ) { struct Books Book1; /* Declare Book1 of type Book */ struct Books Book2; /* Declare Book2 of type Book */ /* book 1 specification */ strcpy( Book1.title, "C Programming"); strcpy( Book1.author, "Nuha Ali"); strcpy( Book1.subject, "C Programming Tutorial"); Book1.book_id = 6495407; /* book 2 specification */ strcpy( Book2.title, "Telecom Billing"); strcpy( Book2.author, "Zara Ali"); strcpy( Book2.subject, "Telecom Billing Tutorial"); Book2.book_id = 6495700; /* print Book1 info */ printBook( Book1 ); /* Print Book2 info */ printBook( Book2 ); return 0; } void printBook( struct Books book ) { printf( "Book title : %s\n", book.title); printf( "Book author : %s\n", book.author); printf( "Book subject : %s\n", book.subject); printf( "Book book_id : %d\n", book.book_id); }
When the above code is compiled and executed, it produces the following result −
Book title : C Programming Book author : Nuha Ali Book subject : C Programming Tutorial Book book_id : 6495407 Book title : Telecom Billing Book author : Zara Ali Book subject : Telecom Billing Tutorial Book book_id : 6495700
You can define pointers to structures in the same way as you define pointer to any other variable −
struct Books *struct_pointer;
Now, you can store the address of a structure variable in the above defined pointer variable. To find the address of a structure variable, place the '&'; operator before the structure's name as follows −
struct_pointer = &Book1;
To access the members of a structure using a pointer to that structure, you must use the → operator as follows −
struct_pointer->title;
Let us re-write the above example using structure pointer.
#include <stdio.h> #include <string.h> struct Books { char title[50]; char author[50]; char subject[100]; int book_id; }; /* function declaration */ void printBook( struct Books *book ); int main( ) { struct Books Book1; /* Declare Book1 of type Book */ struct Books Book2; /* Declare Book2 of type Book */ /* book 1 specification */ strcpy( Book1.title, "C Programming"); strcpy( Book1.author, "Nuha Ali"); strcpy( Book1.subject, "C Programming Tutorial"); Book1.book_id = 6495407; /* book 2 specification */ strcpy( Book2.title, "Telecom Billing"); strcpy( Book2.author, "Zara Ali"); strcpy( Book2.subject, "Telecom Billing Tutorial"); Book2.book_id = 6495700; /* print Book1 info by passing address of Book1 */ printBook( &Book1 ); /* print Book2 info by passing address of Book2 */ printBook( &Book2 ); return 0; } void printBook( struct Books *book ) { printf( "Book title : %s\n", book->title); printf( "Book author : %s\n", book->author); printf( "Book subject : %s\n", book->subject); printf( "Book book_id : %d\n", book->book_id); }
When the above code is compiled and executed, it produces the following result −
Book title : C Programming Book author : Nuha Ali Book subject : C Programming Tutorial Book book_id : 6495407 Book title : Telecom Billing Book author : Zara Ali Book subject : Telecom Billing Tutorial Book book_id : 6495700
Bit Fields allow the packing of data in a structure. This is especially useful when memory or data storage is at a premium. Typical examples include −
Packing several objects into a machine word. e.g. 1 bit flags can be compacted.
Reading external file formats -- non-standard file formats could be read in, e.g., 9-bit integers.
C allows us to do this in a structure definition by putting :bit length after the variable. For example −
struct packed_struct { unsigned int f1:1; unsigned int f2:1; unsigned int f3:1; unsigned int f4:1; unsigned int type:4; unsigned int my_int:9; } pack;
Here, the packed_struct contains 6 members: Four 1 bit flags f1..f3, a 4-bit type and a 9-bit my_int.
C automatically packs the above bit fields as compactly as possible, provided that the maximum length of the field is less than or equal to the integer word length of the computer. If this is not the case, then some compilers may allow memory overlap for the fields while others would store the next field in the next word.


Compressed resource data in 'dcmp' (0)
format,
as stored in compressed resources with header type 8
and decompressor ID 0
.
The 'dcmp' (0)
decompressor resource is included in the System file of System 7.0 and later.
This compression format is used for most compressed resources in System 7.0's files.
This decompressor is also included with and used by some other Apple applications,
such as ResEdit.
This compression format supports some basic general-purpose compression schemes, including backreferences to previous data, run-length encoding, and delta encoding. It also includes some types of compression tailored specifically to Mac OS resources, including a set of single-byte codes that correspond to entries in a hard-coded lookup table, and a specialized kind of delta encoding for segment loader jump tables.
Almost all parts of this compression format operate on units of 2 or 4 bytes. As a result, it is nearly impossible to store data with an odd length in this format. To work around this limitation, odd-length resources are padded with an extra byte before compressing them with this format. This extra byte is ignored after decompression, as the real (odd) length of the resource is stored in the compressed resource header.
The 'dcmp' (1)
compression format (see dcmp_1.ksy) is very similar to this format,
with the main difference that it operates mostly on single bytes rather than two-byte units.
This page hosts a formal specification of Compressed Macintosh resource data, Apple `'dcmp' (0)` format using Kaitai Struct. This specification can be automatically translated into a variety of programming languages to get a parsing library.
meta:
id: dcmp_0
title: Compressed Macintosh resource data, Apple `'dcmp' (0)` format
application: Mac OS
license: MIT
ks-version: "0.8"
imports:
- dcmp_variable_length_integer
endian: be
doc: |
Compressed resource data in `'dcmp' (0)` format,
as stored in compressed resources with header type `8` and decompressor ID `0`.
The `'dcmp' (0)` decompressor resource is included in the System file of System 7.0 and later.
This compression format is used for most compressed resources in System 7.0's files.
This decompressor is also included with and used by some other Apple applications,
such as ResEdit.
This compression format supports some basic general-purpose compression schemes,
including backreferences to previous data,
run-length encoding,
and delta encoding.
It also includes some types of compression tailored specifically to Mac OS resources,
including a set of single-byte codes that correspond to entries in a hard-coded lookup table,
and a specialized kind of delta encoding for segment loader jump tables.
Almost all parts of this compression format operate on units of 2 or 4 bytes.
As a result,
it is nearly impossible to store data with an odd length in this format.
To work around this limitation,
odd-length resources are padded with an extra byte before compressing them with this format.
This extra byte is ignored after decompression,
as the real (odd) length of the resource is stored in the compressed resource header.
The `'dcmp' (1)` compression format (see dcmp_1.ksy) is very similar to this format,
with the main difference that it operates mostly on single bytes rather than two-byte units.
doc-ref: 'https://github.com/dgelessus/python-rsrcfork/blob/f891a6e/src/rsrcfork/compress/dcmp0.py'
seq:
- id: chunks
type: chunk
repeat: until
repeat-until: _.tag == 0xff
doc: |
The sequence of chunks that make up the compressed data.
types:
chunk:
doc: |
A single chunk of compressed data.
Each chunk in the compressed data expands to a sequence of bytes in the uncompressed data,
except when `tag == 0xff`,
which marks the end of the data and does not correspond to any bytes in the uncompressed data.
Most chunks are stateless and always expand to the same data,
regardless of where the chunk appears in the sequence.
However,
some chunks affect the behavior of future chunks,
or expand to different data depending on which chunks came before them.
seq:
- id: tag
type: u1
doc: |
The chunk's tag byte.
This controls the structure of the body and the meaning of the chunk.
- id: body
type:
switch-on: |
tag >= 0x00 and tag <= 0x1f ? tag_kind::literal
: tag >= 0x20 and tag <= 0x4a ? tag_kind::backreference
: tag >= 0x4b and tag <= 0xfd ? tag_kind::table_lookup
: tag == 0xfe ? tag_kind::extended
: tag == 0xff ? tag_kind::end
: tag_kind::invalid
cases:
'tag_kind::literal': literal_body(tag)
'tag_kind::backreference': backreference_body(tag)
'tag_kind::table_lookup': table_lookup_body(tag)
'tag_kind::extended': extended_body
'tag_kind::end': end_body
doc: |
The chunk's body.
Certain chunks do not have any data following the tag byte.
In this case,
the body is a zero-length structure.
enums:
# Internal enum, only for use in the type switch above.
# This is a workaround for kaitai-io/kaitai_struct#489.
tag_kind:
-1: invalid
0: literal
1: backreference
2: table_lookup
3: extended
4: end
types:
literal_body:
doc: |
The body of a literal data chunk.
The data that this chunk expands to is stored literally in the body (`literal`).
Optionally,
the literal data may also be stored for use by future backreference chunks (`do_store`).
The length of the literal data is stored as a number of two-byte units.
This means that the literal data always has an even length in bytes.
params:
- id: tag
type: u1
doc: |
The tag byte preceding this chunk body.
seq:
- id: len_literal_div2_separate
type: u1
if: is_len_literal_div2_separate
doc: |
The length of the literal data,
in two-byte units.
This field is only present if the tag byte's low nibble is zero.
In practice,
this only happens if the length is 0x10 or greater,
because smaller lengths can be encoded into the tag byte.
- id: literal
size: len_literal
doc: |
The literal data.
instances:
do_store:
value: (tag & 0x10) != 0
doc: |
Whether this literal should be stored for use by future backreference chunks.
See the documentation of the `backreference_body` type for details about backreference chunks.
len_literal_div2_in_tag:
value: tag & 0x0f
doc: |
The part of the tag byte that indicates the length of the literal data,
in two-byte units.
If this value is 0,
the length is stored in a separate byte after the tag byte and before the literal data.
is_len_literal_div2_separate:
value: len_literal_div2_in_tag == 0
doc: |
Whether the length of the literal is stored separately from the tag.
len_literal_div2:
value: |
is_len_literal_div2_separate
? len_literal_div2_separate
: len_literal_div2_in_tag
doc: |
The length of the literal data,
in two-byte units.
In practice,
this value is always greater than zero,
as there is no use in storing a zero-length literal.
len_literal:
value: len_literal_div2 * 2
doc: |
The length of the literal data,
in bytes.
backreference_body:
doc: |
The body of a backreference chunk.
This chunk expands to the data stored in a preceding literal chunk,
indicated by an index number (`index`).
params:
- id: tag
type: u1
doc: |
The tag byte preceding this chunk body.
seq:
- id: index_separate_minus
type:
switch-on: tag
cases:
0x20: u1
0x21: u1
0x22: u2
if: is_index_separate
doc: |
The index of the referenced literal chunk,
stored separately from the tag.
The value in this field is stored minus 0x28.
If the tag byte is 0x21,
the value is also stored minus 0x100,
*on top of* the regular offset
(i. e. minus 0x128 in total).
In other words,
for tag bytes 0x20 and 0x21,
the index is actually 9 bits large,
with the low 8 bits stored separately and the highest bit stored in the lowest bit of the tag byte.
This field is only present if the tag byte is 0x20 through 0x22.
For higher tag bytes,
the index is encoded in the tag byte.
Values smaller than 0x28 cannot be stored in this field,
they must always be encoded in the tag byte.
instances:
is_index_separate:
value: tag >= 0x20 and tag <= 0x22
doc: |
Whether the index is stored separately from the tag.
index_in_tag:
value: tag - 0x23
doc: |
The index of the referenced literal chunk,
as stored in the tag byte.
index_separate:
value: |
index_separate_minus + 0x28 + (tag == 0x21 ? 0x100 : 0)
if: is_index_separate
doc: |
The index of the referenced literal chunk,
as stored separately from the tag byte,
with the implicit offset corrected for.
index:
value: |
is_index_separate ? index_separate : index_in_tag
doc: |
The index of the referenced literal chunk.
Stored literals are assigned index numbers in the order in which they appear in the compressed data,
starting at 0.
Non-stored literals are not counted in the numbering and cannot be referenced using backreferences.
Once an index is assigned to a stored literal,
it is never changed or unassigned for the entire length of the compressed data.
As the name indicates,
a backreference can only reference stored literal chunks found *before* the backreference,
not ones that come after it.
table_lookup_body:
doc: |
The body of a table lookup chunk.
This body is always empty.
This chunk always expands to two bytes (`value`),
determined from the tag byte using a fixed lookup table (`lookup_table`).
This lookup table is hardcoded in the decompressor and always the same for all compressed data.
params:
- id: tag
type: u1
doc: |
The tag byte preceding this chunk body.
seq: []
instances:
lookup_table:
value: |
[
[0x00, 0x00],
[0x4e, 0xba], [0x00, 0x08], [0x4e, 0x75], [0x00, 0x0c],
[0x4e, 0xad], [0x20, 0x53], [0x2f, 0x0b], [0x61, 0x00],
[0x00, 0x10], [0x70, 0x00], [0x2f, 0x00], [0x48, 0x6e],
[0x20, 0x50], [0x20, 0x6e], [0x2f, 0x2e], [0xff, 0xfc],
[0x48, 0xe7], [0x3f, 0x3c], [0x00, 0x04], [0xff, 0xf8],
[0x2f, 0x0c], [0x20, 0x06], [0x4e, 0xed], [0x4e, 0x56],
[0x20, 0x68], [0x4e, 0x5e], [0x00, 0x01], [0x58, 0x8f],
[0x4f, 0xef], [0x00, 0x02], [0x00, 0x18], [0x60, 0x00],
[0xff, 0xff], [0x50, 0x8f], [0x4e, 0x90], [0x00, 0x06],
[0x26, 0x6e], [0x00, 0x14], [0xff, 0xf4], [0x4c, 0xee],
[0x00, 0x0a], [0x00, 0x0e], [0x41, 0xee], [0x4c, 0xdf],
[0x48, 0xc0], [0xff, 0xf0], [0x2d, 0x40], [0x00, 0x12],
[0x30, 0x2e], [0x70, 0x01], [0x2f, 0x28], [0x20, 0x54],
[0x67, 0x00], [0x00, 0x20], [0x00, 0x1c], [0x20, 0x5f],
[0x18, 0x00], [0x26, 0x6f], [0x48, 0x78], [0x00, 0x16],
[0x41, 0xfa], [0x30, 0x3c], [0x28, 0x40], [0x72, 0x00],
[0x28, 0x6e], [0x20, 0x0c], [0x66, 0x00], [0x20, 0x6b],
[0x2f, 0x07], [0x55, 0x8f], [0x00, 0x28], [0xff, 0xfe],
[0xff, 0xec], [0x22, 0xd8], [0x20, 0x0b], [0x00, 0x0f],
[0x59, 0x8f], [0x2f, 0x3c], [0xff, 0x00], [0x01, 0x18],
[0x81, 0xe1], [0x4a, 0x00], [0x4e, 0xb0], [0xff, 0xe8],
[0x48, 0xc7], [0x00, 0x03], [0x00, 0x22], [0x00, 0x07],
[0x00, 0x1a], [0x67, 0x06], [0x67, 0x08], [0x4e, 0xf9],
[0x00, 0x24], [0x20, 0x78], [0x08, 0x00], [0x66, 0x04],
[0x00, 0x2a], [0x4e, 0xd0], [0x30, 0x28], [0x26, 0x5f],
[0x67, 0x04], [0x00, 0x30], [0x43, 0xee], [0x3f, 0x00],
[0x20, 0x1f], [0x00, 0x1e], [0xff, 0xf6], [0x20, 0x2e],
[0x42, 0xa7], [0x20, 0x07], [0xff, 0xfa], [0x60, 0x02],
[0x3d, 0x40], [0x0c, 0x40], [0x66, 0x06], [0x00, 0x26],
[0x2d, 0x48], [0x2f, 0x01], [0x70, 0xff], [0x60, 0x04],
[0x18, 0x80], [0x4a, 0x40], [0x00, 0x40], [0x00, 0x2c],
[0x2f, 0x08], [0x00, 0x11], [0xff, 0xe4], [0x21, 0x40],
[0x26, 0x40], [0xff, 0xf2], [0x42, 0x6e], [0x4e, 0xb9],
[0x3d, 0x7c], [0x00, 0x38], [0x00, 0x0d], [0x60, 0x06],
[0x42, 0x2e], [0x20, 0x3c], [0x67, 0x0c], [0x2d, 0x68],
[0x66, 0x08], [0x4a, 0x2e], [0x4a, 0xae], [0x00, 0x2e],
[0x48, 0x40], [0x22, 0x5f], [0x22, 0x00], [0x67, 0x0a],
[0x30, 0x07], [0x42, 0x67], [0x00, 0x32], [0x20, 0x28],
[0x00, 0x09], [0x48, 0x7a], [0x02, 0x00], [0x2f, 0x2b],
[0x00, 0x05], [0x22, 0x6e], [0x66, 0x02], [0xe5, 0x80],
[0x67, 0x0e], [0x66, 0x0a], [0x00, 0x50], [0x3e, 0x00],
[0x66, 0x0c], [0x2e, 0x00], [0xff, 0xee], [0x20, 0x6d],
[0x20, 0x40], [0xff, 0xe0], [0x53, 0x40], [0x60, 0x08],
[0x04, 0x80], [0x00, 0x68], [0x0b, 0x7c], [0x44, 0x00],
[0x41, 0xe8], [0x48, 0x41],
]
doc: |
Fixed lookup table that maps tag byte numbers to two bytes each.
The entries in the lookup table are offset -
index 0 stands for tag 0x4b, 1 for 0x4c, etc.
value:
value: lookup_table[tag - 0x4b]
doc: |
The two bytes that the tag byte expands to,
based on the fixed lookup table.
extended_body:
doc: |
The body of an extended chunk.
The meaning of this chunk depends on the extended tag byte stored in the chunk data.
seq:
- id: tag
type: u1
doc: |
The chunk's extended tag byte.
This controls the structure of the body and the meaning of the chunk.
- id: body
type:
switch-on: tag
cases:
0x00: jump_table_body
0x02: repeat_body(tag)
0x03: repeat_body(tag)
0x04: delta_encoding_16_bit_body
0x06: delta_encoding_32_bit_body
doc: |
The chunk's body.
types:
jump_table_body:
doc: |
The body of a jump table chunk.
This chunk generates parts of a segment loader jump table,
in the format found in `'CODE' (0)` resources.
It expands to the following data,
with all non-constant numbers encoded as unsigned 16-bit big-endian integers:
* `0x3f 0x3c` (push following segment number onto stack)
* The segment number
* `0xa9 0xf0` (`_LoadSeg` trap)
* For each address:
* The address
* `0x3f 0x3c` (push following segment number onto stack)
* The segment number
* `0xa9 0xf0` (`_LoadSeg` trap)
Note that this generates one jump table entry without an address before it,
meaning that this address needs to be generated by the preceding chunk.
All following jump table entries are generated with the addresses encoded in this chunk.
seq:
- id: segment_number_raw
type: dcmp_variable_length_integer
doc: |
Raw variable-length integer representation of `segment_number`.
- id: num_addresses_raw
type: dcmp_variable_length_integer
doc: |
Raw variable-length integer representation of `num_addresses`.
- id: addresses_raw
type: dcmp_variable_length_integer
repeat: expr
repeat-expr: num_addresses
doc: |
The addresses for each generated jump table entry,
stored as variable-length integers.
The first address is stored literally and must be in the range `0x0 <= x <= 0xffff`,
i. e. an unsigned 16-bit integer.
All following addresses are stored as deltas relative to the previous address.
Each of these deltas is stored plus 6;
this value needs to be subtracted before (or after) adding it to the previous address.
Each delta (after subtracting 6) should be positive,
and adding it to the previous address should not result in a value larger than `0xffff`,
i. e. there should be no 16-bit unsigned integer wraparound.
These conditions are always met in all known jump table chunks,
so it is not known how the original decompressor behaves otherwise.
instances:
segment_number:
value: segment_number_raw.value
doc: |
The segment number for all of the generated jump table entries.
Although it is stored as a variable-length integer,
the segment number must be in the range `0x0 <= x <= 0xffff`,
i. e. an unsigned 16-bit integer.
num_addresses:
value: num_addresses_raw.value
doc: |
The number of addresses stored in this chunk.
This number must be greater than 0.
repeat_body:
doc: |
The body of a repeat chunk.
This chunk expands to a 1-byte or 2-byte value repeated a number of times,
i. e. it implements a form of run-length encoding.
params:
- id: tag
type: u1
doc: |
The extended tag byte preceding this chunk body.
seq:
- id: to_repeat_raw
type: dcmp_variable_length_integer
doc: |
Raw variable-length integer representation of `to_repeat`.
- id: repeat_count_m1_raw
type: dcmp_variable_length_integer
doc: |
Raw variable-length integer representation of `repeat_count_m1`.
instances:
byte_count:
value: |
tag == 0x02 ? 1
: tag == 0x03 ? 2
: -1
doc: |
The length in bytes of the value to be repeated.
Regardless of the byte count,
the value to be repeated is stored as a variable-length integer.
to_repeat:
value: to_repeat_raw.value
doc: |
The value to repeat.
Although it is stored as a variable-length integer,
this value must fit into an unsigned big-endian integer that is as long as `byte_count`,
i. e. either 8 or 16 bits.
repeat_count_m1:
value: repeat_count_m1_raw.value
doc: |
The number of times to repeat the value,
minus one.
This value must not be negative.
repeat_count:
value: repeat_count_m1 + 1
doc: |
The number of times to repeat the value.
This value must be positive.
delta_encoding_16_bit_body:
doc: |
The body of a 16-bit delta encoding chunk.
This chunk expands to a sequence of 16-bit big-endian integer values.
The first value is stored literally.
All following values are stored as deltas relative to the previous value.
seq:
- id: first_value_raw
type: dcmp_variable_length_integer
doc: |
Raw variable-length integer representation of `first_value`.
- id: num_deltas_raw
type: dcmp_variable_length_integer
doc: |
Raw variable-length integer representation of `num_deltas`.
- id: deltas
type: s1
repeat: expr
repeat-expr: num_deltas
doc: |
The deltas for each value relative to the previous value.
Each of these deltas is a signed 8-bit value.
When adding the delta to the previous value,
16-bit integer wraparound is performed if necessary,
so that the resulting value always fits into a 16-bit signed integer.
instances:
first_value:
value: first_value_raw.value
doc: |
The first value in the sequence.
Although it is stored as a variable-length integer,
this value must be in the range `-0x8000 <= x <= 0x7fff`,
i. e. a signed 16-bit integer.
num_deltas:
value: num_deltas_raw.value
doc: |
The number of deltas stored in this chunk.
This number must not be negative.
delta_encoding_32_bit_body:
doc: |
The body of a 32-bit delta encoding chunk.
This chunk expands to a sequence of 32-bit big-endian integer values.
The first value is stored literally.
All following values are stored as deltas relative to the previous value.
seq:
- id: first_value_raw
type: dcmp_variable_length_integer
doc: |
Raw variable-length integer representation of `first_value`.
- id: num_deltas_raw
type: dcmp_variable_length_integer
doc: |
Raw variable-length integer representation of `num_deltas`.
- id: deltas_raw
type: dcmp_variable_length_integer
repeat: expr
repeat-expr: num_deltas
doc: |
The deltas for each value relative to the previous value,
stored as variable-length integers.
Each of these deltas is a signed value.
When adding the delta to the previous value,
32-bit integer wraparound is performed if necessary,
so that the resulting value always fits into a 32-bit signed integer.
instances:
first_value:
value: first_value_raw.value
doc: |
The first value in the sequence.
num_deltas:
value: num_deltas_raw.value
doc: |
The number of deltas stored in this chunk.
This number must not be negative.
end_body:
doc: |
The body of an end chunk.
This body is always empty.
The last chunk in the compressed data must always be an end chunk.
An end chunk cannot appear elsewhere in the compressed data.
seq: []