{% if topologies_by_model|length and not allowed_path_deletion_topology %}
Warning!
{% blocktrans %}You can't delete {{ object }}, some topologies are linked with this path. Modify these topologies before deleting this path.{% endblocktrans %}
{% else %}
Warning!
{% blocktrans %}Do you really wish to delete {{ object }} ?{% endblocktrans %}
{% endif %}
{% if allowed_path_deletion_topology or not topologies_by_model|length %}
{% endif %}
{% if topologies_by_model|length %}
{% trans 'Different topologies are linked with this path' %} :
{% endif %}
{% for model, topologies in topologies_by_model.items %}


Background
Bluetooth Low-Energy (BLE), also know as Bluetooth Smart, has become a core technology in the world of mobile devices. BLE has enabled the expansion of wearable sensors and wireless connectivity.
Objective
To develop firmware for an extended range Bluetooth Low-Energy module (BLE121LR) to collect and process data from sensors, and relay them to a compatible Android device.
Conclusion
Successfully designed firmware to communicate sensor data via the BLE module to an Android device. In addition, we designed and fabricated a prototype printed circuit board.
Approach & Methodology


| Percentage of Schools with Less Than 50% Special Education | For the first cental tendency, I found the number of schools using filter() for less than 50%. | |
| Average Number of Students Per School | For the second cental tendency, I used reduce() to find the total number of students and then divided it by the number of schools. | |
| Total Number of Hispanic Students in Schools | For the second cental tendency, I used reduce() to find the total number of hispanic students. |
Data From here.


| 1 | package nl.tudelft.jpacman.ui; | |
| 2 | ||
| 3 | import java.awt.BorderLayout; | |
| 4 | import java.awt.Container; | |
| 5 | import java.util.Map; | |
| 6 | import java.util.concurrent.Executors; | |
| 7 | import java.util.concurrent.ScheduledExecutorService; | |
| 8 | import java.util.concurrent.TimeUnit; | |
| 9 | ||
| 10 | import javax.swing.JFrame; | |
| 11 | import javax.swing.JPanel; | |
| 12 | ||
| 13 | import nl.tudelft.jpacman.game.Game; | |
| 14 | import nl.tudelft.jpacman.ui.ScorePanel.ScoreFormatter; | |
| 15 | ||
| 16 | /** | |
| 17 | * The default JPacMan UI frame. The PacManUI consists of the following | |
| 18 | * elements: | |
| 19 | * | |
| 20 | *
 | |
| 21 | *
A score panel at the top, displaying the score of the player(s). | |
| 22 | *
A board panel, displaying the current level, i.e. the board and all units | |
| 23 | * on it. | |
| 24 | *
A button panel, containing all buttons provided upon creation. | |
| 25 | *
 | |
| 26 | * | |
| 27 | * @author Jeroen Roosen | |
| 28 | * | |
| 29 | */ | |
| 30 | public class PacManUI extends JFrame { | |
| 31 | ||
| 32 | /** | |
| 33 | * Default serialisation UID. | |
| 34 | */ | |
| 35 | private static final long serialVersionUID = 1L; | |
| 36 | ||
| 37 | /** | |
| 38 | * The desired frame rate interval for the graphics in milliseconds, 40 | |
| 39 | * being 25 fps. | |
| 40 | */ | |
| 41 | private static final int FRAME_INTERVAL = 40; | |
| 42 | ||
| 43 | /** | |
| 44 | * The panel displaying the player scores. | |
| 45 | */ | |
| 46 | private final ScorePanel scorePanel; | |
| 47 | ||
| 48 | /** | |
| 49 | * The panel displaying the game. | |
| 50 | */ | |
| 51 | private final BoardPanel boardPanel; | |
| 52 | ||
| 53 | /** | |
| 54 | * Creates a new UI for a JPac-Man game. | |
| 55 | * | |
| 56 | * @param game | |
| 57 | * The game to play. | |
| 58 | * @param buttons | |
| 59 | * The map of caption-to-action entries that will appear as | |
| 60 | * buttons on the interface. | |
| 61 | * @param keyMappings | |
| 62 | * The map of keyCode-to-action entries that will be added as key | |
| 63 | * listeners to the interface. | |
| 64 | * @param sf | |
| 65 | * The formatter used to display the current score. | |
| 66 | */ | |
| 67 | public PacManUI(final Game game, final Map<String, Action> buttons, | |
| 68 | final Map<Integer, Action> keyMappings, ScoreFormatter sf) { | |
| 69 | super("JPac-Man"); | |
| 70 | assert game != null; | |
| 71 | assert buttons != null; | |
| 72 | assert keyMappings != null; | |
| 73 | | |
| 74 |
1
1. |
setDefaultCloseOperation(EXIT_ON_CLOSE); |
| 75 | ||
| 76 | PacKeyListener keys = new PacKeyListener(keyMappings); | |
| 77 |
1
1. |
addKeyListener(keys); |
| 78 | ||
| 79 | JPanel buttonPanel = new ButtonPanel(buttons, this); | |
| 80 | ||
| 81 | scorePanel = new ScorePanel(game.getPlayers()); | |
| 82 |
1
1. |
if (sf != null) { |
| 83 |
1
1. |
scorePanel.setScoreFormatter(sf); |
| 84 | } | |
| 85 | | |
| 86 | boardPanel = new BoardPanel(game); | |
| 87 | | |
| 88 | Container contentPanel = getContentPane(); | |
| 89 |
1
1. |
contentPanel.setLayout(new BorderLayout()); |
| 90 |
1
1. |
contentPanel.add(buttonPanel, BorderLayout.SOUTH); |
| 91 |
1
1. |
contentPanel.add(scorePanel, BorderLayout.NORTH); |
| 92 |
1
1. |
contentPanel.add(boardPanel, BorderLayout.CENTER); |
| 93 | ||
| 94 |
1
1. |
pack(); |
| 95 | } | |
| 96 | ||
| 97 | /** | |
| 98 | * Starts the "engine", the thread that redraws the interface at set | |
| 99 | * intervals. | |
| 100 | */ | |
| 101 | public void start() { | |
| 102 |
1
1. start : removed call to nl/tudelft/jpacman/ui/PacManUI::setVisible → SURVIVED |
setVisible(true); |
| 103 | ||
| 104 | ScheduledExecutorService service = Executors | |
| 105 | .newSingleThreadScheduledExecutor(); | |
| 106 | ||
| 107 | service.scheduleAtFixedRate(new Runnable() { | |
| 108 | ||
| 109 | @Override | |
| 110 | public void run() { | |
| 111 |
1
1. run : removed call to nl/tudelft/jpacman/ui/PacManUI::access$000 → SURVIVED |
nextFrame(); |
| 112 | } | |
| 113 | }, 0, FRAME_INTERVAL, TimeUnit.MILLISECONDS); | |
| 114 | ||
| 115 | } | |
| 116 | ||
| 117 | /** | |
| 118 | * Draws the next frame, i.e. refreshes the scores and game. | |
| 119 | */ | |
| 120 | private void nextFrame() { | |
| 121 |
1
1. nextFrame : removed call to nl/tudelft/jpacman/ui/BoardPanel::repaint → SURVIVED |
boardPanel.repaint(); |
| 122 |
1
1. nextFrame : removed call to nl/tudelft/jpacman/ui/ScorePanel::refresh → SURVIVED |
scorePanel.refresh(); |
| 123 | } | |
| 124 | } | |
Mutations | ||
| 74 |
1.1 |
|
| 77 |
1.1 |
|
| 82 |
1.1 |
|
| 83 |
1.1 |
|
| 89 |
1.1 |
|
| 90 |
1.1 |
|
| 91 |
1.1 |
|
| 92 |
1.1 |
|
| 94 |
1.1 |
|
| 102 |
1.1 |
|
| 111 |
1.1 |
|
| 121 |
1.1 |
|
| 122 |
1.1 |


Blog
String Reverser
How long is your 1 second?
Palettes - grabbed from everywhere
By 某不知名少侠木 .{^~^}.
Well, to be continued..


Philippians 4:6
Do not be anxious about anything, but in every situation,
by prayer and petition, with thanksgiving, present your
requests to God.
If you are seeing this, we were unable to fetch the actual
Bible Verse of the Day. If this continues to happen, feel free to
contact me through the Chrome Extension Store.
🙏


_Mat i syn_ A Film Review by Cynthia A. Bussiere Copyright 1998 Cynthia A. Bussiere (1998)
(US title: _Mother and Son_) (UK title: _Mother & Son_)
1997 - Russia / Germany In Russian with English subtitles
PARTIAL PRODUCTION CREDITS Producer: Thomas Kufus Director: Aleksandr Sokurov Writer: Yuri Arabov Cinematographer: Alexei Fyodorov Editor: Leda Semyonova Music: Glinka, Nussio, Verdi
CAST CREDITS Mother: Gudrun Geyer Son: Alexei Ananischnov
_Mat' i syn_ is a 73-minute meditation on the extraordinarily close and compassionate relationship between a dying woman and her adult son. Described by Nancy Ramsey of "The New York Times" as a "reverse Pieta," the film portrays part of a day in the shared life of the two characters.
The mother and the son, who have no given names, share a dacha in the woods somewhere in 19th century Russia. Suffering from an unspecified terminal illness, and occasionally in great pain, the mother is too weak to walk or to feed or otherwise care for herself. Her son carries and feeds her. When she is thirsty, he gives her liquids from a baby bottle.
The pair shares an unusual physical closeness and a deeply spiritual bond.  Thus, when she naps, he lies down on her bed and naps with her. He also holds, embraces, and caresses her, much as one holds and cuddles a baby. Spiritually, the two are so close that they dream the same dreams.
Despite the mother's total dependence on the son, and the resulting constant proximity of the two, their relationship is characterized by a profound mutual respect. From their conversations, which comprise the film's only dialogue, one learns that even though their relationship has always been close on many levels, it has not always been without its difficulties.
Apart from the gentle and touching nature of the story and its characters, the beauty of this film lies in its pace, its photography, and its sound. Paced very slowly indeed, the story plays out gently, poetically, and almost in real time. This careful, deliberate pacing lends the film what J. Hobel of "The Village Voice" has called its "incredible stillness." The pace also imbues the film with a great reverence for its characters and their relationship. Both the pacing and its substantive effects on the film are reminiscent of Tarkovsky's similarly slow-paced work (for example, _The Sacrifice_ and _Nostalghia_).
Photographically, the film alternates between tight shots of its characters and wide, expansive eye-level and aerial shots of the countryside and the sea. The film is in color, but its colors are subdued and often washed out. Interestingly, a number of scenes are shot through mirrors.  The resulting mild distortion and blurriness give the film its dreamlike and painterly qualities which, in turn, add further to the film's qualities of stillness and other-worldliness. Indeed, Sokurov apparently deliberately sought to evoke the style and natural imagery of Caspar David Friedrich, the 19th century German romantic painter. In its expansive exterior shots, the photography is also reminiscent of Angelopoulos' films (for example, _Ulysses' Gaze_).
In terms of sound, the film contrasts the low and quiet speaking tones of its characters with heightened and amplified sounds of nature--- the rush of wind through trees, the gurgle and babble of a running creek, the breaking of waves on the seashore. Against this great, natural, outer world, life in the small, inner world of the mother and son plays out.
The film's two actors bring an unusually high degree of understated authenticity to their roles. Such an accomplishment is all the more unusual in light of the fact that these actors are not "professionals," in the sense that they don't make their primary livings as actors. Geyer works in documentary films in Germany. Ananischnov, whose family Sokurov has known for a long time, manages a Pepsi plant in St. Petersburg. Ananischnov also appeared in Sokurov's 1988 film _Dni Zatmeniya_ (_The Days of Eclipse_). Regardless, or perhaps because, of their "non-professional" backgrounds, both actors bring a depth and sensitivity, together with a complete absence of sentimentality, to their portrayals that is rarely seen in films, especially in films of such little conventional action and dialogue as this one.
There are no characters in the film other than the mother and the son. Yet there are indications of human life outside the little world of the dacha and its immediate environs: A long shot of a train periodically crossing a valley in the distance, and an aerial view of a three-masted schooner in full sail just off the coastline. By this visual contrast of the ongoing course of life in the outside world with the small, private world of mother and son, the film articulates one of its opening lines and perhaps one of its themes. As the film opens, the son is recounting to his mother a dream in which he was searching, unsuccessfully, for some words. The mother supplies the words which are, in effect: "God only exists in my consciousness. He does not extend outward to the world in the ordinary course of things. This imperfection makes my heart heavy."
Like many of the films of Alain Resnais, especially _Providence_, _Mat' i syn_ is a filmmaker's film. It comprises a story that cannot be told in its entirety and completeness in any medium other than film. For this reason, the very act of watching the film is an immensely pleasing and deeply satisfying aesthetic experience.
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


- Full Name
-
Ecaterina
Moraru (Valicã)
http://www.risherry.ro
- Position
- Senior Product Designer
- Current Location
- Iaşi, Romania 47.331377 27.347717
I'm an Interaction Designer, designing and developing for Open Source communities, like XWiki.org and Open Source Design.
Specialized in Prototyping and Usability. Passionate about User Experience, Human-Computer Interaction, Standards Compliance, Web Technologies and Software Engineering.


| Up | TOC | Index | |||||
| << 7 Included Tools | < 8.29 Euphoria Database (EDS) | Up: 8 API Reference | 8.31 Flags > | 9 Release Notes >> |
8.30 Prime Numbers
8.30.1 Routines
<IP_ADDRESS> calc_primes
include std/primes.e namespace primes public function calc_primes(integer approx_limit, atom time_limit_p = 10)
returns all the prime numbers below a threshold, with a cap on computation time.
Parameters:
- approx_limit : an integer, This is not the upper limit but the last prime returned is the next prime after or on this value.
- time_out_p : an atom, the maximum number of seconds that this function can run for. The default is 10 (ten) seconds.
Returns:
A sequence, made of prime numbers in increasing order. The last value is the next prime number that falls on or after the value of approx_limit.
Comments:
- The approx_limit argument does not represent the largest value to return. The largest value returned will be the next prime number on or after
- The returned sequence contains all the prime numbers less than its last element.
- If the function times out, it may not hold all primes below approx_limit, but only the largest ones will be absent. If the last element returned is less than approx_limit then the function timed out.
- To disable the timeout, simply give it a negative value.
Example 1:
? calc_primes(1000, 5) -- On a very slow computer, you may only get all primes up to say 719. -- On a faster computer, the last element printed out will be 1009. -- This call will never take longer than 5 seconds.
See Also:
<IP_ADDRESS> next_prime
include std/primes.e namespace primes public function next_prime(integer n, object fail_signal_p = - 1, atom time_out_p = 1)
returns the next prime number on or after the supplied number.
Parameters:
- n : an integer, the starting point for the search
- fail_signal_p : an integer, used to signal error. Defaults to -1.
Returns:
An integer, which is prime only if it took less than one second to determine the next prime greater or equal to n.
Comments:
The default value of -1 will alert you about an invalid returned value, since a prime not less than n is expected. However, you can pass another value for this parameter.
Example 1:
? next_prime(997) -- On a very slow computer, you might get -997, but 1009 is expected.
See Also:
<IP_ADDRESS> prime_list
include std/primes.e namespace primes public function prime_list(integer top_prime_p = 0)
returns a list of prime numbers.
Parameters:
- top_prime_p : The list will end with the prime less than or equal to this value. If top_prime_p is zero, the current list of calculated primes is returned.
Returns:
An sequence, a list of prime numbers from 2 to <= top_prime_p
Example 1:
sequence pList = prime_list(1000) -- pList will now contain all the primes from 2 up to the largest less than or -- equal to 1000, which is 997.
See Also:


Known specifications
Horizontal issues trackers
This page lists all specifications known to the horizontal review system.


Ikhwan Maftuh Web Developer
Skills
- Skillful in
- Bussiness Logic & Database Design, System Development Life Cycle, Testing, Debugging & Documenting, User Training & Support
Framework
Codeigniter
Laravel
Twitter Bootstrap
jQuery
Database/DBMS
MariaDB
MySQL
SQLite
Ms. Access
Operating System
Linux
OS X
Windows
Android


WITNESS LIST Environmental Regulation Committee March 11, 1997-2:00P HB 1007 For: Bartley, Joe (himself) Carman, Neil (Sierra Club) Christianson, Don E. (himself) Coffey, Carrie (SWAT) Horton, Norma G. (SWAT) Hubener, Ann (herself) Jones, Rep. Jesse (himself) Massey, Cheryl (herself) Paduch, Kristen (herself) Phillips, Kim (Texas PTA) Pittman, Susan S. (The Chemical Connection) Pope, Sue (herself) Richards, Judy (City of Duncanville) Risinger, Mary (herself) Rivers, Jeanne M. (herself) Roten, Merle (himself) Schermbeck, Jim (Downwinders at Risk) Shaw, Larry (City of Duncanville) Thomason, Wade (Am. Lung Assn. of Tx.) Tinker, Dierdre (Cockrell Hill Elem. PTA) Vacoby, Charline (herself) Williams, Margaret M. (herself) Against: Fisher, Jon (Texas Chemical Council) Jones, D.R. (Randy) (Texas Industries) Mayes, Greg L. (Texas Industries) Miksa, Mary (TABCC) Stewart, Mike (Tx Aggregate & Concrete) Tiemeyer, Eric (Texas Industries) On: Saitas, Jeff (TNRCC) Shafford, William J. (TNRCC) Wiersema, JoAnn (TNRCC) Registering, but not testifying: For: Anderson, LaNell (herself) Castella, Patricia (herself) Fraser, Paul (City of New Braunfels) James, Reggie (Consumers Union) Land, Jewell C. (himself) Lott, Linda (herself) Marsden, Julia (League of Women Voters) Massey, Acacia (herself) Sampedro, George (himself) Sampedro, Madeline (Downwinders at Risk) Smith, Tom Smitty (Public Citizen) Watson, Kirk (himself) HB 1008 For: Carman, Neil (Sierra Club) Christianson, Don E. (himself) Jones, Rep. Jesse (himself) Phillips, Kim (Texas PTA) Pittman, Susan S. (The Chemical Connection) Richards, Judy (City of Duncanville) Rivers, Jeanne M. (herself) Schermbeck, Jim (Downwinders at Risk) Shaw, Larry (City of Duncanville) Thomason, Wade (Am. Lung Assn. of Tx.) Against: Fisher, Jon (Texas Chemical Council) Jones, D.R. (Randy) (Texas Industries) Mayes, Greg L. (Texas Industries) Miksa, Mary (TABCC) Stewart, Mike (Tx Aggregate & Concrete) Tiemeyer, Eric (Texas Industries) On: Saitas, Jeff (TNRCC) Shafford, Wiliam J. (TNRCC) Wiersema, JoAnn (TNRCC) Registering, but not testifying: For: Anderson, LaNell (herself) Castella, Patricia (herself) Fraser, Paul (City of New Braunfels) James, Reggie (Consumers Union) Sampedro, George (himself) Sampedro, Madeline (Downwinders at Risk) Smith, Tom Smitty (Public Citizen) HB 1228 On: Duncan, David (TNRCC) Kelly, Mary E. (TCPS) HB 1239 For: Fisher, Jon (Texas Chemical Council) Miksa, Mary (TABCC) HB 1369 For: Fisher, Jon (Texas Chemical Council) Miksa, Mary (TABCC) Against: Carman, Neil (Sierra Club) Pittman, Susan S. (The Chemical Connection) On: Duncan, David (TNRCC) Kelly, Mary E. (TCPS) HB 1578 For: Uher, Representative (himself) Against: Anderson, LaNell (herself) Barret, Rob (Harris County) Barton, Bob (himslf) Carman, Neil (Sierra Club) Haseman, Roger A (Harris County DA) Kelly, Mary (TCPS) Lenz, Carol J. (Harris County) Pittman, Susan S. (The Chemical Connection) Rawlins, Diana Peoins (herself) Starns, Judy (herself) Wiley, Cameron P. (himself) On: Vogel, Joe (TNRCC) Registering, but not testifying: Against: Alston, Warren G. (himself) James, Reggie (Consumers Union) Marsden, Julia (League of Women Voters) Sisk, Cathy (Harris County) Smith, Tom Smitty (Public Citizen)


Discrete notes
About
Archive
Start
24 Sep 2018
Hello. The start of the new blog.
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus


Create, install, and summarise data packages that follow the Open Knowledge Foundation's Data Package Protocol.
| Version: | 0.1.9 |
| Imports: | digest, httr, jsonlite, magrittr, rio |
| Suggests: | devtools, testthat |
| Published: | 2016-03-07 |
| Author: | Christopher Gandrud [aut, cre], Yann-Ael Le Borgne [ctb] |
| Maintainer: | Christopher Gandrud <christopher.gandrud at gmail.com> |
| BugReports: | https://github.com/christophergandrud/dpmr/issues |
| License: | GPL-3 |
| URL: | http://cran.r-project.org/package=dpmr |
| NeedsCompilation: | no |
| Materials: | README NEWS |
| CRAN checks: | dpmr results |
| Reference manual: | dpmr.pdf |
| Package source: | dpmr_0.1.9.tar.gz |
| Windows binaries: | r-devel: dpmr_0.1.9.zip, r-release: dpmr_0.1.9.zip, r-oldrel: dpmr_0.1.9.zip |
| OS X binaries: | r-release: dpmr_0.1.9.tgz, r-oldrel: dpmr_0.1.9.tgz |
| Old sources: | dpmr archive |
Please use the canonical form https://CRAN.R-project.org/package=dpmr to link to this page.


title = "About us" url = "/about-us" layout = "main" is_hidden = 0 meta_title = "About us" [carousel] id = 1 [members] pageNumber = 0 membersPerPage = 0 noMembersMessage = "No posts found" sortOrder = "priority asc" ==


---
title: Welcome
description: Fimero Open Source Tools
---
Fimero
Companion site to Software Engineering in Finance
We use Mercurial, a free, distributed source control system written in Python and C. Mercurial is quick, scalable and easy to learn. Mercurial uses an HTTP-based protocol by default.
Code review is considered complimentary to testing and has been shown to be effective at improving software quality. We use the excellent ReviewBoard code review application.
learn more...In software engineering, continuous integration (CI) implements continuous processes of applying quality control — small pieces of effort, applied frequently.
learn more...Sonar is a web-based software metrics application. Rules, alerts, thresholds, exclusions, and settings can be configured online. Sonar keeps historical measures of development progress.
learn more...OpenGrok is a fast and usable source code search and cross reference engine. It helps you search, cross-reference and navigate your source tree. It can understand various program file formats and version control histories.
learn more...When code has been reviewed, tested and measured, it's ready for deployment. A central artifact repository ensures that all downstream processes use the right artifacts in their deployments.
learn more...


class ProgressBar
- ProgressBar
- Reference
- Object
Overview
Have a long running command? Keep your users updated on the progress by displaying a progress bar
require "progress_bar.cr/progress_bar"
# simple
pb = ProgressBar.new
# print empty progress bar
pb.init
10.times do
sleep 0.1 # very time intense!
pb.tick # increase bar progress by 1
end
# => [##########]
Defined in:
progress_bar.crConstant Summary
-
CHARSETS =
{default: [" ", "#"], line: [" ", "-"], equals: [" ", "="], bar: ["▒", "█"]}
Class Method Summary
-
.new(ticks = 10, charset = :default, chars = [] of String, show_percentage = false, completion_message : String? = nil)
initializes the progress bar with necessary information:
ticks = 10 # number of increments (bar size)
charset = :default # can also be :line, :equals, :bar (what characters to use for bar)
chars = [] # you can give two custom strings [empty_string, filled_string] to print instead of using a predefined charset
completion_message: nil # string to display after loading is done
ProgressBar.new(chars: [" ", "x"])
Instance Method Summary
- #complete
- #complete?
- #count : Int32
-
#init
initiate progressbar => print empty bar of specified length
-
#progress(by add = 1)
progresses the bar by a specified amount
-
#reset
resetting the progress bar (emptying it)
- #set(count)
- #set?(count)
-
#tick
increment progress by one
-
#with_progress(&block)
yields and returns block return value resetting the progress bar after completion
Class Method Detail
initializes the progress bar with necessary information:
ticks = 10 # number of increments (bar size)
charset = :default # can also be :line, :equals, :bar (what characters to use for bar)
chars = [] # you can give two custom strings [empty_string, filled_string] to print instead of using a predefined charset
completion_message: nil # string to display after loading is done
ProgressBar.new(chars: [" ", "x"])
Instance Method Detail
yields and returns block return value resetting the progress bar after completion


Bayesian inference¶
Inference for age structured compartment models using the diffusion approximation (via the van Kampen expansion). See our preprint for more details on the method.
There are two ways to do inference: manifold method (sec 3.3 in the report) and tangent space method (sec 3.4 in the report). In various degrees of less robust but fast to more robust but slow:
tangent space method.
manifold method with few internal steps and fast integration method (det_method = RK2, lyapunov_method = euler).
manifold method with large number of internel steps and robust integration method (solve_ivp from scipy library).
Methods for full data |
|
|---|---|
infer_parameters |
Infers epidemiological parameters given all information. |
infer_control |
Infers control parameters. |
obtain_minus_log_p |
Computes -log(p) of a fully observed trajectory. |
compute_hessian |
Computes the Hessian of -log(p). |
nested_sampling_inference |
Compute the log-evidence and weighted samples. |
Methods for partial data |
|
|---|---|
latent_infer_parameters |
Infers parameters and initial conditions. |
latent_infer_control |
Infers control parameters. |
minus_logp_red |
Computes -log(p) of a partially observed trajectory. |
compute_hessian_latent |
Computes the Hessian of -log(p). |
nested_sampling_latent_inference |
Compute the log-evidence and weighted samples. |
Sensitivity analysis |
|
|---|---|
FIM |
Computes the Fisher Information Matrix of the stochastic model. |
FIM_det |
Computes the Fisher Information Matrix of the deterministic model. |
sensitivity |
Computes the normalized sensitivity measure |
Helper function |
|
|---|---|
integrate |
A wrapper around ‘simulate’ in pyross.deterministic. |
set_params |
Sets parameters. |
set_det_method |
Sets the integration method of the deterministic equation |
set_lyapunov_method |
Sets the integration method of the Lyapunov equation |
set_det_model |
Sets the internal deterministic model |
set_contact_matrix |
Sets the contact matrix |
fill_params_dict |
Fills and returns a parameter dictionary |
get_mean_inits |
Constructs full initial conditions from the prior dict |
The functions are documented under the parent class SIR_type.
SIR_type¶
-
class
pyross.inference.
SIR_type
¶ Parent class for inference for all SIR-type classes listed below
All subclasses use the same functions to perform inference, which are documented below.
-
FIM
()¶ Computes the Fisher Information Matrix (FIM) of the stochastic model.
- Parameters
obs (2d numpy.array) – The observed trajectories with reduced number of variables (number of data points, (age groups * observed model classes))
fltr (2d numpy.array) – A matrix of shape (no. observed variables, no. total variables), such that obs_{ti} = fltr_{ij} * X_{tj}
Tf (float) – Total time of the trajectory
contactMatrix (callable) – A function that takes time (t) as an argument and returns the contactMatrix
map_dict (dict) – Dictionary returned by infer_parameters
tangent (bool, optional) – Set to True to use tangent space inference. Default is False.
eps (float or numpy.array, optional) – Step size for numerical differentiation of the process mean and its full covariance matrix with respect to the parameters. If not specified, the array of square roots of the machine epsilon of the MAP estimates is used. Decreasing the step size too small can result in round-off error.
- Returns
FIM – The Fisher Information Matrix
- Return type
2d numpy.array
-
FIM_det
()¶ Computes the Fisher Information Matrix (FIM) of the deterministic model.
- Parameters
obs (2d numpy.array) – The observed trajectories with reduced number of variables (number of data points, (age groups * observed model classes))
fltr (2d numpy.array) – A matrix of shape (no. observed variables, no. total variables), such that obs_{ti} = fltr_{ij} * X_{tj}
Tf (float) – Total time of the trajectory
contactMatrix (callable) – A function that takes time (t) as an argument and returns the contactMatrix
map_dict (dict) – Dictionary returned by infer_parameters
eps (float or numpy.array, optional) –
- Step size for numerical differentiation of the process mean and its full covariance matrix with respect
to the parameters. If not specified, the array of square roots of the machine epsilon of the MAP estimates is used. Decreasing the step size too small can result in round-off error.
measurement_error (float, optional) – Standard deviation of measurements (uniform and independent Gaussian measurement error assumed). Default is 1e-2.
- Returns
FIM_det – The Fisher Information Matrix
- Return type
2d numpy.array
-
compute_hessian
()¶ Computes the Hessian of the MAP estimate.
- Parameters
x (2d numpy.array) – Observed trajectory (number of data points x (age groups * model classes))
Tf (float) – Total time of the trajectory
contactMatrix (callable) – A function that takes time (t) as an argument and returns the contactMatrix
map_dict (dict) – Dictionary returned by infer_parameters.
eps (float or numpy.array, optional) – The step size of the Hessian calculation, default=1e-3
fd_method (str, optional) – The type of finite-difference scheme used to compute the hessian, supports “forward” and “central”.
- Returns
hess – The Hessian
- Return type
2d numpy.array
-
compute_hessian_latent
()¶ Computes the Hessian over the parameters and initial conditions.
- Parameters
x (2d numpy.array) – Observed trajectory (number of data points x (age groups * model classes)).
Tf (float) – Total time of the trajectory.
contactMatrix (callable) – A function that takes time (t) as an argument and returns the contactMatrix.
map_dict (dict) – Dictionary returned by latent_infer_parameters.
eps (float or numpy.array, optional) – The step size of the Hessian calculation, default=1e-3.
fd_method (str, optional) – The type of finite-difference scheme used to compute the hessian, supports “forward” and “central”.
- Returns
hess – The Hessian over (flat) parameters and initial conditions.
- Return type
numpy.array
-
fill_params_dict
()¶ Returns a full dictionary for epidemiological parameters with some changed values
- Parameters
keys (list of String) – A list of names of parameters to be changed.
params (numpy.array of list) – An array of the same size as keys for the updated value.
- Returns
full_parameters – A dictionary of epidemiological parameters. For parameter names specified in keys, set the values to be the ones in params; for the others, use the values stored in the class.
- Return type
dict
-
get_mean_inits
()¶ Construct full initial conditions from the prior dict
- Parameters
init_priors (dict) – A dictionary for priors for initial conditions. Same as the init_priors passed to latent_infer_parameters. In this function, only takes the mean.
obs0 (numpy.array) – Observed initial conditions.
fltr0 (numpy.array) – Filter for the observed initial conditons.
- Returns
x0 – Full initial conditions.
- Return type
numpy.array
-
infer_control
()¶ Compute the maximum a-posteriori (MAP) estimate of the change of control parameters for a SIR type model in lockdown. The lockdown is modelled by scaling the contact matrices for contact at work, school, and other (but not home). This function infers the scaling parameters (can be age dependent) assuming that full data on all classes is available (with latent variables, use latent_infer_control).
- Parameters
x (2d numpy.array) – Observed trajectory (number of data points x (age groups * model classes))
Tf (float) – Total time of the trajectory
generator (pyross.contactMatrix) – A pyross.contactMatrix object that generates a contact matrix function with specified lockdown parameters.
prior_dict (dict) – Priors for intervention parameters. Same format as the prior_dict for epidemiological parameters in infer_parameters function.
intervention_fun (callable, optional) – The calling signature is intervention_func(t, **kwargs), where t is time and kwargs are other keyword arguments for the function. The function must return (aW, aS, aO), where aW, aS and aO are (2, M) arrays. The contact matrices are then rescaled as \(aW[0]_i CW_{ij} aW[1]_j\) etc. If not set, assume intervention that’s constant in time. See contactMatrix.constant_contactMatrix for details on the keyword parameters.
tangent (bool, optional) – Set to True to use tangent space inference. Default is false.
verbose (bool, optional) – Set to True to see intermediate outputs from the optimizer.
ftol (double) – Relative tolerance of logp
eps (double) – Disallow paramters closer than eps to the boundary (to avoid numerical instabilities).
global_max_iter (int, optional) – Number of global optimisations performed.
local_max_iter (int, optional) – Number of local optimisation performed.
global_atol (float) – The absolute tolerance for global optimisation.
enable_global (bool, optional) – Set to True to enable global optimisation.
enable_local (bool, optional) – Set to True to enable local optimisation.
cma_processes (int, optional) – Number of parallel processes used for global optimisation.
cma_population (int, optional) – The number of samples used in each step of the CMA algorithm.
- Returns
output_dict – Dictionary of MAP estimates, containing the following keys for users:
- map_dict: dict
Dictionary for MAP estimates of the control parameters.
- -logp: float
Value of -logp at MAP.
- Return type
dict
-
infer_parameters
()¶ Infers the MAP estimates for epidemiological parameters
- Parameters
x (np.array) – The full trajectory.
Tf (float) – The total time of the trajectory.
contactMatrix (callable) – A function that returns the contact matrix at time t (input).
prior_dict (dict) – A dictionary containing priors. See examples.
tangent (bool, optional) – Set to True to use tangent space inference. Default is False.
verbose (bool, optional) – Set to True to see intermediate outputs from the optimization algorithm. Default is False.
enable_global (bool, optional) – Set to True to perform global optimization. Default is True.
enable_local (bool, optional) – Set to True to perform local optimization. Default is True.
global_max_iter (int, optional) – The maximum number of iterations for the global algorithm.
global_atol (float, optional) – Absolute tolerance of global optimization. Default is 1.
cma_processes (int, optional) – Number of parallel processes used in the CMA algorithm. Default is to use all cores on the computer.
cma_population (int, optional) – he number of samples used in each step of the CMA algorithm. Should ideally be factor of cma_processes.
local_max_iter (int, optional) – The maximum number of iterations for the local algorithm.
ftol (float, optional) – The relative tolerance in -logp value for the local optimization.
- Returns
output – Contains the following keys for users:
- map_dict: dict
A dictionary for MAPs. Keys are the names of the parameters and the corresponding values are its MAP estimates.
- -logp: float
The value of -logp at MAP.
- Return type
dict
Examples
An example of prior_dict to set priors for alpha and beta, where alpha is age dependent and we want to infer its scale parameters rather than each component individually. The prior distribution is assumed to be log-normal with the specified mean and standard deviation.
>>> prior_dict = { 'alpha':{ 'mean': [0.5, 0.2], 'infer_scale': True, 'scale_factor_std': 1, 'scale_factor_bounds': [0.1, 10] }, 'beta':{ 'mean': 0.02, 'std': 0.1, 'bounds': [1e-4, 1] } }
-
integrate
()¶ An light weight integrate method similar to simulate in pyross.deterministic
- Parameters
x0 (np.array) – Initial state of the given model
t1 (float) – Initial time of integrator
t2 (float) – Final time of integrator
steps (int) – Number of time steps for numerical integrator evaluation.
maxNumSteps – The maximum number of steps taken by the integrator.
- Returns
sol – The state of the system evaulated at the time point specified. Only used if det_method is set to ‘solve_ivp’.
- Return type
np.array
-
latent_infer_control
()¶ Compute the maximum a-posteriori (MAP) estimate of the change of control parameters for a SIR type model in lockdown with partially observed classes. The unobserved classes are treated as latent variables. The lockdown is modelled by scaling the contact matrices for contact at work, school, and other (but not home) uniformly in all age groups. This function infers the scaling parameters.
- Parameters
obs – Observed trajectory (number of data points x (age groups * observed model classes)).
fltr (boolean sequence or array) – True for observed and False for unobserved classes. e.g. if only Is is known for SIR with one age group, fltr = [False, False, True]
Tf (float) – Total time of the trajectory
generator (pyross.contactMatrix) – A pyross.contactMatrix object that generates a contact matrix function with specified lockdown parameters.
param_priors (dict) – A dictionary for param priors. See infer_parameters for further explanations.
init_priors (dict) – A dictionary for priors for initial conditions. See latent_infer_parameters for further explanations.
intervention_fun (callable, optional) – The calling signature is intervention_func(t, **kwargs), where t is time and kwargs are other keyword arguments for the function. The function must return (aW, aS, aO), where aW, aS and aO are (2, M) arrays. The contact matrices are then rescaled as \(aW[0]_i CW_{ij} aW[1]_j\) etc. If not set, assume intervention that’s constant in time. See contactMatrix.constant_contactMatrix for details on the keyword parameters.
tangent (bool, optional) – Set to True to use tangent space inference. Default is false.
verbose (bool, optional) – Set to True to see intermediate outputs from the optimizer.
ftol (double) – Relative tolerance of logp
global_max_iter (int, optional) – Number of global optimisations performed.
local_max_iter (int, optional) – Number of local optimisation performed.
global_atol (float) – The absolute tolerance for global minimisation.
enable_global (bool, optional) – Set to True to enable global optimisation.
enable_local (bool, optional) – Set to True to enable local optimisation.
cma_processes (int, optional) – Number of parallel processes used for global optimisation.
cma_population (int, optional) – The number of samples used in each step of the CMA algorithm.
- Returns
output_dict – A dictionary containing the following keys for users:
- map_params_dict: dict
dictionary for MAP estimates for control parameters
- map_x0: np.array
MAP estimates for the initial conditions
- -logp: float
Value of -logp at MAP.
- Return type
dict
-
latent_infer_parameters
()¶ Compute the maximum a-posteriori (MAP) estimate of the parameters and the initial conditions of a SIR type model when the classes are only partially observed. Unobserved classes are treated as latent variables.
- Parameters
obs (np.array) – The partially observed trajectory.
fltr (2d np.array) – The filter for the observation such that \(F_{ij} x_j (t) = obs_i(t)\)
Tf (float) – The total time of the trajectory.
contactMatrix (callable) – A function that returns the contact matrix at time t (input).
param_priors (dict) – A dictionary that specifies priors for parameters. See infer_parameters for examples.
init_priors (dict) – A dictionary that specifies priors for initial conditions. See below for examples.
tangent (bool, optional) – Set to True to use tangent space inference. Default is False.
verbose (bool, optional) – Set to True to see intermediate outputs from the optimization algorithm. Default is False.
enable_global (bool, optional) – Set to True to perform global optimization. Default is True.
enable_local (bool, optional) – Set to True to perform local optimization. Default is True.
global_max_iter (int, optional) – The maximum number of iterations for the global algorithm.
global_atol (float, optional) – Absolute tolerance of global optimization. Default is 1.
cma_processes (int, optional) – Number of parallel processes used in the CMA algorithm. Default is to use all cores on the computer.
cma_population (int, optional) – he number of samples used in each step of the CMA algorithm. Should ideally be factor of cma_processes.
local_max_iter (int, optional) – The maximum number of iterations for the local algorithm.
ftol (float, optional) – The relative tolerance in -logp value for the local optimization.
- Returns
output – Contains the following keys for users:
- map_params_dict: dict
A dictionary for the MAP estimates for parameter values. The keys are the names of the parameters.
- map_x0: np.array
The MAP estimate for the initial conditions.
- -logp: float
The value of -logp at MAP.
- Return type
dict
Examples
Here we list three examples, one for inferring all initial conditions along the fastest growing linear mode, one for inferring the initial conditions individually and a mixed one.
First, suppose we only observe Is out of (S, Ia, Is) and we wish to infer all compartmental values of S and Ia independently. For two age groups with population [2500, 7500],
>>> init_priors = { 'independent':{ 'fltr': [True, True, True, True, False, False], 'mean': [2400, 7400, 50, 50], 'std': [200, 200, 200, 200], 'bounds': [[2000, 2500], [7000, 7500], [0, 400], [0, 400]] } }
In the ‘fltr’ entry, we need a boolean array indicating which components of the full x0 = [S0[0], S0[1], Ia0[0], Ia0[1], Is0[0], Ia0[1]] array we are inferring. By setting fltr = [True, True, True, True, False, False], the inference algorithm will know that we are inferring all components of S0 and Ia0 but not Is0. Similar to inference for parameter values, we also assume a log-normal distribution for the priors for the initial conditions.
Next, if we are happy to assume that all our initial conditions lie along the fastest growing linear mode and we will only infer the coefficient of the mode, the init_priors dict would be,
>>> init_priors = { 'lin_mode_coeff':{ 'fltr': [True, True, True, True, False, False], 'mean': 100, 'std': 100, 'bounds': [1, 1000] } }
Note that the ‘fltr’ entry is still the same as before because we still only want to infer S and Ia, and the initial conditions for Is is fixed by the observation.
Finally, if we want to do a mixture of both (useful when some compartments have aligned with the fastest growing mode but others haven’t), we need to set the init_priors to be,
>>> init_priors = { 'lin_mode_coeff': { 'fltr': [True, True, False, False, False, False], 'mean': 100, 'std': 100, 'bounds': [1, 1000] }, 'independent':{ 'fltr': [False, False, True, True, False, False], 'mean': [50, 50], 'std': [200, 200], 'bounds': [0, 400], [0, 400] } }
-
log_G_evidence
()¶ Compute the evidence using a Laplace approximation at the MAP estimate.
- Parameters
x (2d numpy.array) – Observed trajectory (number of data points x (age groups * model classes))
Tf (float) – Total time of the trajectory
contactMatrix (callable) – A function that takes time (t) as an argument and returns the contactMatrix
map_dict (dict) – MAP estimate returned by infer_parameters
eps (float or numpy.array, optional) – The step size of the Hessian calculation, default=1e-3
fd_method (str, optional) – The type of finite-difference scheme used to compute the hessian, supports “forward” and “central”.
- Returns
log_evidence – The log-evidence computed via Laplace approximation at the MAP estimate.
- Return type
float
-
log_G_evidence_latent
()¶ Compute the evidence using a Laplace approximation at the MAP estimate.
- Parameters
x (2d numpy.array) – Observed trajectory (number of data points x (age groups * model classes))
Tf (float) – Total time of the trajectory
contactMatrix (callable) – A function that takes time (t) as an argument and returns the contactMatrix
map_dict (dict) – MAP estimate returned by infer_parameters
eps (float or numpy.array, optional) – The step size of the Hessian calculation, default=1e-3
fd_method (str, optional) – The type of finite-difference scheme used to compute the hessian, supports “forward” and “central”.
- Returns
log_evidence – The log-evidence computed via Laplace approximation at the MAP estimate.
- Return type
float
-
minus_logp_red
()¶ Computes -logp for a latent trajectory
- Parameters
parameters (dict) – A dictionary of parameter values, same as the ones required for initialisation.
x0 (numpy.array) – Initial conditions
obs (numpy.array) – The observed trajectory without the initial datapoint
fltr (boolean sequence or array) – True for observed and False for unobserved. e.g. if only Is is known for SIR with one age group, fltr = [False, False, True]
Tf (float) – The total time of the trajectory
contactMatrix (callable) – A function that returns the contact matrix at time t (input).
tangent (bool, optional) – Set to True to do inference in tangent space (might be less robust but a lot faster). Default is False.
- Returns
minus_logp – -log(p) for the observed trajectory with the given parameters and initial conditions
- Return type
float
-
nested_sampling_inference
()¶ Compute the log-evidence and weighted samples of the a-posteriori distribution of the parameters of a SIR type model using nested sampling as implemented in the nestle Python package. This function assumes that full data on all classes is available.
This function provides a computational alterantive to log_G_evidence and infer_parameters. It does not use the Laplace approximation to compute the evidence and, in addition, returns a set of representative samples that can be used to compute a posterior mean estimate (insted of the MAP estimate). This approach approach is much more resource intensive and typically only viable for small models or tangent space inference.
- Parameters
x (2d numpy.array) – Observed trajectory (number of data points x (age groups * model classes))
Tf (float) – Total time of the trajectory
contactMatrix (callable) – A function that returns the contact matrix at time t (input).
prior_dict (dict) – A dictionary for the priors for the parameters. See infer_parameters for examples.
tangent (bool, optional) – Set to True to do inference in tangent space (might be less robust but a lot faster). Default is False.
verbose (bool, optional) – Set to True to see intermediate outputs from the nested sampling procedure.
queue_size (int) – Size of the internal queue of samples of the nested sampling algorithm. The log-likelihood of these samples is computed in parallel (if queue_size > 1).
max_workers (int) – The maximal number of processes used to compute samples.
npoints (int) – Argument of nestle.sample. The number of active points used in the nested sampling algorithm. The higher the number the more accurate and expensive is the evidence computation.
method (str) – Nested sampling method used int nestle.sample, see their documentation. Default is single, for multimodel posteriors, use multi.
max_iter (int) – Maximum number of iterations of the nested sampling algorithm.
dlogz (float, optional) – Stopping threshold for the estimated error of the log-evidence. This option is mutually exclusive with decline_factor.
decline_factor (float, optional) – Stop the iteration when the weight (likelihood times prior volume) of newly saved samples has been declining for decline_factor * nsamples consecutive samples. This option is mutually exclusive with dlogz.
- Returns
log_evidence – The nested sampling estimate of the log-evidence.
(samples, weights) – A set of weighted samples approximating the posterios distribution.
-
nested_sampling_latent_inference
()¶ Compute the log-evidence and weighted samples of the a-posteriori distribution of the parameters of a SIR type model with latent variables using nested sampling as implemented in the nestle Python package.
This function provides a computational alterantive to latent_infer_parameters. It computes an estimate of the evidence and, in addition, returns a set of representative samples that can be used to compute a posterior mean estimate (insted of the MAP estimate). This approach approach is much more resource intensive and typically only viable for small models or tangent space inference.
- Parameters
obs (2d numpy.array) – The observed trajectories with reduced number of variables (number of data points, (age groups * observed model classes))
fltr (2d numpy.array) – A matrix of shape (no. observed variables, no. total variables), such that obs_{ti} = fltr_{ij} * X_{tj}
Tf (float) – Total time of the trajectory
contactMatrix (callable) – A function that returns the contact matrix at time t (input).
param_priors (dict) – A dictionary for priors for the model parameters. See infer_parameters for further explanations.
init_priors (dict) – A dictionary for priors for the initial conditions. See latent_infer_parameters for further explanations.
tangent (bool, optional) – Set to True to do inference in tangent space (might be less robust but a lot faster). Default is False.
verbose (bool, optional) – Set to True to see intermediate outputs from the nested sampling procedure.
queue_size (int) – Size of the internal queue of samples of the nested sampling algorithm. The log-likelihood of these samples is computed in parallel (if queue_size > 1).
max_workers (int) – The maximal number of processes used to compute samples.
npoints (int) – Argument of nestle.sample. The number of active points used in the nested sampling algorithm. The higher the number the more accurate and expensive is the evidence computation.
method (str) – Nested sampling method used int nestle.sample, see their documentation. Default is single, for multimodel posteriors, use multi.
max_iter (int) – Maximum number of iterations of the nested sampling algorithm.
dlogz (float, optional) – Stopping threshold for the estimated error of the log-evidence. This option is mutually exclusive with decline_factor.
decline_factor (float, optional) – Stop the iteration when the weight (likelihood times prior volume) of newly saved samples has been declining for decline_factor * nsamples consecutive samples. This option is mutually exclusive with dlogz.
- Returns
log_evidence – The nested sampling estimate of the log-evidence.
(samples, weights) – A set of weighted samples approximating the posterios distribution.
-
obtain_minus_log_p
()¶ Computes -logp of a full trajectory :param parameters: A dictionary for the model parameters. :type parameters: dict :param x: The full trajectory. :type x: np.array :param Tf: The time duration of the trajectory. :type Tf: float :param contactMatrix: A function that takes time (t) as an argument and returns the contactMatrix :type contactMatrix: callable :param tangent: Set to True to use tangent space inference. :type tangent: bool, optional
- Returns
minus_logp – Value of -logp
- Return type
float
-
robustness
()¶ Robustness analysis in a two-dimensional slice of the parameter space, revealing neutral spaces as in https://doi.org/10.1073/pnas.1015814108.
- Parameters
FIM (2d numpy.array) – Fisher Information matrix of a stochastic model
FIM_det (2d numpy.array) – Fisher information matrix of the corresponding deterministic model
map_dict (dict) – Dictionary returned by infer_parameters
param_pos_1 (int) – Position of ‘parameter 1’ in map_dict[‘flat_map’] for x-axis
param_pos_2 (int) – Position of ‘parameter 2’ in map_dict[‘flat_map’] for y-axis
range_1 (float) – Symmetric interval around parameter 1 for which robustness will be analysed. Absolute interval: ‘parameter 1’ +/- range_1
range_2 (float) – Symmetric interval around parameter 2 for which robustness will be analysed. Absolute interval: ‘parameter 2’ +/- range_2
resolution_1 (int) – Resolution of the meshgrid in x direction.
resolution_2 (int) – Resolution of the meshgrid in y direction. Default is resolution_2=resolution_1.
- Returns
ff (2d numpy.array) – shape=resolution_1 x resolution_2, meshgrid for x-axis
ss (2d numpy.array) – shape=resolution_1 x resolution_2, meshgrid for y-axis
Z_sto (2d numpy.array) – shape=resolution_1 x resolution_2, expected quadratic coefficient in the Taylor expansion of the likelihood of the stochastic model
Z_det (2d numpy.array) – shape=resolution_1 x resolution_2, expected quadratic coefficient in the Taylor expansion of the likelihood of the deterministic model
——-
Example
from matplotlib import pyplot as plt from matplotlib import cm
# positions 0 and 1 of map_dict[‘flat_map’] correspond to a scale parameter for alpha, and beta, respectively. ff, ss, Z_sto, Z_det = estimator.robustness(FIM, FIM_det, map_dict, 0, 1, 0.5, 0.01, 20) cmap = plt.cm.PuBu_r levels=11 colors=’black’
c = plt.contourf(ff, ss, Z_sto, cmap=cmap, levels=levels) # heat map for the stochastic coefficient plt.contour(ff, ss, Z_sto, colors=’black’, levels=levels, linewidths=0.25) plt.contour(ff, ss, Z_det, colors=colors, levels=levels) # contour plot for the deterministic model plt.plot(map_dict[‘flat_map’][0], map_dict[‘flat_map’][1], ‘o’,
color=”#A60628”, markersize=6) # the MAP estimate
plt.colorbar(c) plt.xlabel(r’$lpha$ scale’, fontsize=20, labelpad=10) plt.ylabel(r’$eta$’, fontsize=20, labelpad=10) plt.show() ——-
-
sensitivity
()¶ Computes the normalized sensitivity measure as defined in https://doi.org/10.1073/pnas.1015814108.
- Parameters
FIM (2d numpy.array) – The Fisher Information Matrix
- Returns
T_j – Normalized sensitivity measure for parameters to be estimated. A larger entry translates into greater anticipated model sensitivity to changes in the parameter of interest.
- Return type
numpy.array
-
set_contact_matrix
()¶ Sets the internal contact matrix
- Parameters
contactMatrix (callable) – A function that returns the contact matrix given time, with call signature contactMatrix(t).
-
set_det_method
()¶ Sets the method used for deterministic integration for the SIR_type model
- Parameters
det_method (str) – The name of the integration method. Choose between ‘LSODA’, ‘RK45’, ‘RK2’ and ‘euler’.
-
set_det_model
()¶ Sets the internal deterministic model with given epidemiological parameters
- Parameters
parameters (dict) – A dictionary of parameter values, same as the ones required for initialisation.
-
set_lyapunov_method
()¶ Sets the method used for deterministic integration for the SIR_type model
- Parameters
det_method (str) – The name of the integration method. Choose between ‘LSODA’, ‘RK45’, ‘RK2’ and ‘euler’.
-
set_params
()¶ Sets epidemiological parameters used for evaluating -log(p)
- Parameters
parameters (dict) – A dictionary containing all epidemiological parameters. Same keys as the one used to initialise the class.
Notes
Can use fill_params_dict to generate the full dictionary if only a few parameters are changed
-
Spp¶
-
class
pyross.inference.
Spp
¶ User-defined epidemic model.
To initialise the Spp model,
- Parameters
model_spec (dict) – A dictionary specifying the model. See Examples.
parameters (dict) – A dictionary containing the model parameters. All parameters can be float if not age-dependent, and np.array(M,) if age-dependent
M (int) – Number of age groups.
fi (np.array(M) or list) – Fraction of each age group.
Omega (int) – Total population.
steps (int) – The number of internal integration steps performed between the observed points (not used in tangent space inference). The minimal is 4, as required by the cubic spline fit used for interpolation. For robustness, set steps to be large, det_method=’LSODA’, lyapunov_method=’LSODA’. For speed, set steps to be 4, det_method=’RK2’, lyapunov_method=’euler’. For a combination of the two, choose something in between.
det_method (str, optional) – The integration method used for deterministic integration. Choose one of ‘LSODA’, ‘RK45’, ‘RK2’ and ‘euler’. Default is ‘LSODA’.
lyapunov_method (str, optional) – The integration method used for the integration of the Lyapunov equation for the covariance. Choose one of ‘LSODA’, ‘RK45’, ‘RK2’ and ‘euler’. Default is ‘LSODA’.
See SIR_type for a table of all the methods
Examples
An example of model_spec and parameters for SIR class with a constant influx
>>> model_spec = { "classes" : ["S", "I"], "S" : { "constant" : [ ["k"] ], "infection" : [ ["I", "-beta"] ] }, "I" : { "linear" : [ ["I", "-gamma"] ], "infection" : [ ["I", "beta"] ] } } >>> parameters = { 'beta': 0.1, 'gamma': 0.1, 'k': 1, }
-
FIM_sym
()¶ Does the FIM based off symbolic expressions. In development,
-
adj_RHS_mean
()¶ RHS function for the adjoint gradient calculation of the time evolution operator.
-
construct_A_spp
()¶ construct Spp A. x is a sympy matrix
-
construct_B_spp
()¶ constructs Spp B. x is a sympy array
-
construct_J_spp
()¶ constructs Spp J. x is a sympy matrix
-
construct_l
()¶ constructs sympy l. x is a sympy matrix
-
dAd
()¶ constructs Spp B. param is a string or sympy symbol. Most likely you’ll wish to use ‘all’ string keys can be passed as a integer 0,1 numpy array which selects the parameters to be used for FIM calculation p is a sympy array which contains epi parameters. nParams*M due to age dependence [dAdp]_ij = dA_j/dp_i
-
dBd
()¶ constructs Spp B. param is a string or sympy symbol. Most likely you’ll wish to use ‘all’ string keys can be passed as a integer 0,1 numpy array which selects the parameters to be used for FIM calculation p is a sympy array which contains epi parameters. nParams*M due to age dependence [dBdp]_ijk = dB_jk/dp_i
-
lambdify_derivative_functions
()¶ Create python functions from sympy expressions
SppQ¶
-
class
pyross.inference.
SppQ
¶ User-defined epidemic model with quarantine stage.
To initialise the SppQ model,
- Parameters
model_spec (dict) – A dictionary specifying the model. See Examples.
parameters (dict) – A dictionary containing the model parameters. All parameters can be float if not age-dependent, and np.array(M,) if age-dependent
testRate (python function) – number of tests per day and age group
M (int) – Number of age groups.
fi (np.array(M) or list) – Fraction of each age group.
Omega (int) – Total population.
steps (int) – The number of internal integration steps performed between the observed points (not used in tangent space inference). The minimal is 4, as required by the cubic spline fit used for interpolation. For robustness, set steps to be large, det_method=’LSODA’, lyapunov_method=’LSODA’. For speed, set steps to be 4, det_method=’RK2’, lyapunov_method=’euler’. For a combination of the two, choose something in between.
det_method (str, optional) – The integration method used for deterministic integration. Choose one of ‘LSODA’, ‘RK45’, ‘RK2’ and ‘euler’. Default is ‘LSODA’.
lyapunov_method (str, optional) – The integration method used for the integration of the Lyapunov equation for the covariance. Choose one of ‘LSODA’, ‘RK45’, ‘RK2’ and ‘euler’. Default is ‘LSODA’.
See SIR_type for a table of all the methods
Examples
An example of model_spec and parameters for SIR class with a constant influx, random testing (without false positives/negatives), and quarantine
>>> model_spec = { "classes" : ["S", "I"], "S" : { "infection" : [ ["I", "-beta"] ] }, "I" : { "linear" : [ ["I", "-gamma"] ], "infection" : [ ["I", "beta"] ] }, "test_pos" : [ "p_falsepos", "p_truepos", "p_falsepos"] , "test_freq" : [ "tf", "tf", "tf"] } >>> parameters = { 'beta': 0.1, 'gamma': 0.1, 'p_falsepos': 0 'p_truepos': 1 'tf': 1 }
SIR¶
-
class
pyross.inference.
SIR
¶ Susceptible, Infected, Removed (SIR)
Ia: asymptomatic
Is: symptomatic
To initialise the SIR class,
- Parameters
parameters (dict) –
Contains the following keys:
- alpha: float
Ratio of asymptomatic carriers
- beta: float
Infection rate upon contact
- gIa: float
Recovery rate for asymptomatic
- gIs: float
Recovery rate for symptomatic
- fsa: float
The fraction of symptomatic people who are self-isolating
M (int) – Number of age groups
fi (float numpy.array) – Number of people in each age group divided by Omega.
Omega (float, optional) – System size parameter, e.g. total population. Default to 1.
steps (int, optional) – The number of internal integration steps performed between the observed points (not used in tangent space inference). The minimal and the default value is 4, as required by the cubic spline fit used for interpolation. For robustness, set steps to be large, det_method=’LSODA’, lyapunov_method=’LSODA’. For speed, set steps to be 4, det_method=’RK2’, lyapunov_method=’euler’. For a combination of the two, choose something in between.
det_method (str, optional) – The integration method used for deterministic integration. Choose one of ‘LSODA’, ‘RK45’, ‘RK2’ and ‘euler’. Default is ‘LSODA’.
lyapunov_method (str, optional) – The integration method used for the integration of the Lyapunov equation for the covariance. Choose one of ‘LSODA’, ‘RK45’, ‘RK2’ and ‘euler’. Default is ‘LSODA’.
SEIR¶
-
class
pyross.inference.
SEIR
¶ Susceptible, Exposed, Infected, Removed (SEIR)
Ia: asymptomatic
Is: symptomatic
To initialise the SEIR class,
- Parameters
parameters (dict) –
Contains the following keys:
- alpha: float or np.array(M)
Fraction of infected who are asymptomatic.
- beta: float
Rate of spread of infection.
- gIa: float
Rate of removal from asymptomatic individuals.
- gIs: float
Rate of removal from symptomatic individuals.
- fsa: float
Fraction by which symptomatic individuals self isolate.
- gE: float
rate of removal from exposed individuals.
M (int) – Number of age groups
fi (float numpy.array) – Number of people in each compartment divided by Omega
Omega (float, optional) – System size, e.g. total population. Default is 1.
steps (int, optional) – The number of internal integration steps performed between the observed points (not used in tangent space inference). The minimal and default is 4, as required by the cubic spline fit used for interpolation. For robustness, set steps to be large, det_method=’LSODA’, lyapunov_method=’LSODA’. For speed, set steps to be 4, det_method=’RK2’, lyapunov_method=’euler’. For a combination of the two, choose something in between.
det_method (str, optional) – The integration method used for deterministic integration. Choose one of ‘LSODA’, ‘RK45’, ‘RK2’ and ‘euler’. Default is ‘LSODA’.
lyapunov_method (str, optional) – The integration method used for the integration of the Lyapunov equation for the covariance. Choose one of ‘LSODA’, ‘RK45’, ‘RK2’ and ‘euler’. Default is ‘LSODA’.
SEAIRQ¶
-
class
pyross.inference.
SEAIRQ
¶ Susceptible, Exposed, Asymptomatic and infected, Infected, Removed, Quarantined (SEAIRQ)
Ia: asymptomatic
Is: symptomatic
E: exposed
A: asymptomatic and infectious
Q: quarantined
To initialise the SEAIRQ class,
- Parameters
parameters (dict) –
Contains the following keys:
- alpha: float or np.array(M)
Fraction of infected who are asymptomatic.
- beta: float
Rate of spread of infection.
- gIa: float
Rate of removal from asymptomatic individuals.
- gIs: float
Rate of removal from symptomatic individuals.
- gE: float
rate of removal from exposed individuals.
- gA: float
rate of removal from activated individuals.
- fsa: float
fraction by which symptomatic individuals self isolate.
- tE: float
testing rate and contact tracing of exposeds
- tA: float
testing rate and contact tracing of activateds
- tIa: float
testing rate and contact tracing of asymptomatics
- tIs: float
testing rate and contact tracing of symptomatics
M (int) – Number of compartments
fi (float numpy.array) – Number of people in each compartment divided by Omega.
Omega (float, optional) – System size, e.g. total population. Default is 1.
steps (int, optional) – The number of internal integration steps performed between the observed points (not used in tangent space inference). The minimal and default is 4, as required by the cubic spline fit used for interpolation. For robustness, set steps to be large, det_method=’LSODA’, lyapunov_method=’LSODA’. For speed, set steps to be 4, det_method=’RK2’, lyapunov_method=’euler’. For a combination of the two, choose something in between.
det_method (str, optional) – The integration method used for deterministic integration. Choose one of ‘LSODA’, ‘RK45’, ‘RK2’ and ‘euler’. Default is ‘LSODA’.
lyapunov_method (str, optional) – The integration method used for the integration of the Lyapunov equation for the covariance. Choose one of ‘LSODA’, ‘RK45’, ‘RK2’ and ‘euler’. Default is ‘LSODA’.


Francesco was born in Padova in 1976. He received his D.Eng. degree (highest honors) from the University of Padova (Italy) in 2002. During the year 2002 he was a member of the UCLA Vision Lab as a visiting student under the supervision of Prof. Stefano Soatto, University of California Los Angeles. During this collaboration period he started a research activity in the field of computational vision and human motion tracking. In 2003 Francesco Nori started his Ph.D. under the supervision of Prof. Ruggero Frezza at the University of Padova, Italy. During this period the main topic of his research activity was modular control with special attention on biologically inspired control structures. Francesco Nori received his Ph.D. in Control and Dynamical Systems from the University of Padova (Italy) in 2005. In the year 2006 he moved to the University of Genova and started his PostDoc at the laboratory for integrated advanced robotics (LiraLab), beginning a fruitful collaboration with Prof. Giorgio Metta and Prof. Giulio Sandini. In 2007 Francesco Nori has moved to the Italian Institute of technology where in 2015 he was appointed Tenure Track Researcher of the Dynamic and Interaction Control research line. His research interests are currently focused on whole-body motion control exploiting multiple (possibly compliant) contacts. With Giorgio Metta and Lorenzo Natale he is one of the key researchers involved in the iCub development, with specific focus on control and whole-body force regulation exploiting tactile information. Francesco is currently coordinating the H2020-EU project An.Dy (id. 731540); in the past he has been involved in two FP7-EU projects: CoDyCo as coordinator and Koroibot as principal investigator. In 2017 Francesco joined Deepmind where he is collaborating with Martin Riedmiller, Jonas Buchli and Dan Belov. His current interests seamlessly span robotics and reinforcement learning, with applications in both manipulation and locomotion.


First, learn the principles on which the Council Toolkit has been founded. This is an important starting place for all people using the Toolkit for the first time.
Our time working with Councils, government, and other public sector clients has given us a good understanding of the principles needed to design and build successful digital projects for councils and their customers. These principles are heavily influenced by the GDS design principles.
User needs; not Council needs
We must design for the users of the website or application first. We must understand the user's needs well, through use of good research and data to back up design decisions.
Then act on what you've heard
Research shows when user needs are met, customer are satisfied and more likely to user our online services. That's digital by default.
Make it bite-sized, visual, interactive and shareable
While employing responsive design principles, we must build for content first, and device second. We should aim for content parity across all media and all devices.
Do the hard work - make something simple to use. That's good customer service
Where possible reduce complexity. This includes functionality, user experience and, above all, copywriting.
Accessible public services is good design
Build services that are as inclusive, legible and readable as possible. If we have to sacrifice elegance, so be it.
Be consistent, not uniform
Modularity is at the core of the Council Toolkit to enable re-use of the design system, patterns and, ultimately, the code.
Make it inclusive
The design templates should be agnostic to container width allowing placement across the design system allowing for future-friendly adoption by a myriad of screen sizes.
Avoid lock-in
The Council Toolkit should be technically agnostic, built on timeless principles and using core web standards and approaches.
Build it on an open source foundation
We've built the Toolkit on top of common open source systems, and our work is also free. With no fees to pay you can run (and run) with this.
Make it part of your processes
Through commissioning and development the Toolkit can be the de facto starting point for new site creation.


HTML, CSS, and Javascript for Web Developers
Home
Into to HTML
Into to CSS3
Restaurant Site
JavaScript Basics
JavaScript Application
Introduction to HTML
Essential HTML Tags
Heading Elements
Sematic Tags
Ordered & Unordered Lists
HTML Character Entity References
Internal & External Links
Image Element (img)


M Y N A M E I S J E F F
and that is why they took me
1st letter of each description
NO MORE CLUES ONLY MESSAGES
ERR
ERR
ERR
ERR


Make your way to space in the comfort of your own rocket, elevator or transporter.
Even if you're traveling tomorrow, you can still get tickets today. We have a number of conveniently located ports around the globe to service everyone.
If you need to get to space today, why not try out a transporter? Despite the claims, there are have been no deaths in the last 6 weeks!
For cheapest fares, catch the next RocketBus to the stars. Cheaper on your wallet, and easiest way to make friends.


{{Refimprove|date=February 2013}} {{Infobox food |name=Standing rib roast |image=BeefCutRib.svg |caption=Beef Cuts |type=Rib cut of beef |no_recipes=y |no_commons=y |alternate_name = prime rib, beef rib roast }} {{Steak}} A standing rib roast, also known as prime rib, is a cut of beef from the primal rib, one of the nine primal cuts of beef. While the entire rib section comprises ribs six through 12, a standing rib roast may contain anywhere from two to seven ribs.
It is most often roasted "standing" on the rib bones so that the meat does not touch the pan. An alternative cut removes the top end of the ribs for easier carving.

While often referred to as a “prime rib”, the USDA does not require the cut "to be derived from USDA Prime grade beef".<ref>USDA The Food Standards and Labeling Policy Book pg. 154</ref>
Contents |
A slice of standing rib roast will include portions of the so-called "eye" of the rib, as well as the outer, fat-marbled muscle (spinalis dorsi) known as the "lip" or "cap". The traditional preparation for a standing rib roast is to rub the outside of the roast with salt and seasonings and slow-roast with dry heat. It also may be grilled.
{{reflist}}
{{Cuts of beef}} {{Beef}}


Obtain parameters of Svensson's Method, including percentage agreement, systematic change and individual change. Also, the contingency table can be generated. Svensson's Method is a rank-invariant nonparametric method for the analysis of ordered scales which measures the level of change both from systematic and individual aspects. For the details, please refer to Svensson E. Analysis of systematic and random differences between paired ordinal categorical data [dissertation]. Stockholm: Almqvist & Wiksell International; 1993.
| Version: | 0.1.0 |
| Published: | 2017-08-03 |
| Author: | Yingyan Zhu [aut, cre] |
| Maintainer: | Yingyan Zhu <lexi.yy.zhu at gmail.com> |
| License: | GPL-3 |
| NeedsCompilation: | no |
| Materials: | README NEWS |
| CRAN checks: | svenssonm results |
| Reference manual: | svenssonm.pdf |
| Package source: | svenssonm_0.1.0.tar.gz |
| Windows binaries: | r-devel: svenssonm_0.1.0.zip, r-release: svenssonm_0.1.0.zip, r-oldrel: svenssonm_0.1.0.zip |
| OS X binaries: | r-release: svenssonm_0.1.0.tgz, r-oldrel: svenssonm_0.1.0.tgz |
Please use the canonical form https://CRAN.R-project.org/package=svenssonm to link to this page.


---
layout: default
title: "Legged Robot State Estimation With Dynamic Contact Event Information"
---
{{ page.title }}
IEEE Robotics and Automation Letters, published online, 2021
Joon-Ha Kim (1) Seungwoo Hong (1) Gwanghyeon Ji (1) Seunghun Jeon (1) Jemin Hwangbo (1) Jun-Ho Oh (1) Hae-Won Park (1)
(1) Korea Advanced Institute of Science and Technology
Abstract
This letter presents a state estimation algorithm for the legged robot
by defining the problem as a Maximum A Posteriori (MAP) estimation problem
and solving the problem with the Gauss-Newton algorithm. Moreover, marginalization
by the Schur Complement method is adopted to make a fixed size problem. Each
component of the cost function and its Jacobian are derived utilizing the SO(3)
manifold structure, while we reparameterize the state with nominal state and variation
to make linear algebra and vector calculus applied properly. Furthermore, a slip
rejection method is proposed to reduce the erroneous effect of fault modeling of
kinematics models. The proposed algorithm is verified by comparison with the
Invariant Extended Kalman Filter (IEKF) in real robot experiments on various environments.
@ARTICLE{LeggedStateDynamicKim2021,
author={Kim, Joon-Ha and Hong, Seungwoo and Ji, Gwanghyeon and Jeon, Seunghun and Hwangbo, Jemin and Oh, Jun-Ho and Park, Hae-Won},
journal={IEEE Robotics and Automation Letters},
title={Legged Robot State Estimation With Dynamic Contact Event Information},
year={2021},
volume={6},
number={4},
pages={6733-6740},
doi={10.1109/LRA.2021.3093876}
}


Dr. T And The Women
As a film critic you're sometimes faced with the dilemma of giving a movie a good review even when you know you could fault it for many things. I'm in such a situation right now with this review of "Dr. T And The Women," a dramedy by veteran filmmaker Robert Altman. It's one of those films you enjoy watching at the time but afterwards you realize it might not have been as good as you thought.
Normally I'd elaborate on what I mean when I use these amateur critic's phrases of mine, but I don't think it's necessary this time. Wouldn't you rather like to know what the film is about and what makes it good instead of another rhetorical rambling that sounds like something between a cross of a collegiate thesis and an excerpt from "Entertainment Weekly?"
Here's the deal, Richard Gere stars as Dr. Sully Travis, or "Dr. T" as he's known among his patients and friends. He's a wealthy gynecologist in Dallas who runs his own practice that's so popular the women in the waiting room argue over who gets to go next. Dr. T has a beautiful wife, two cute daughters and a nice house in the suburbs. He plays golf and goes hunting with his three buddies whenever he can. He's got it all doesn't he? Or he would at least if odd things didn't keep happening to him.
The first such incident comes early on in the film when we see his wife, daughters and their aunt shopping at a mall for daughter Dee Dee's wedding. Kate Hudson plays the bride-to-be, a Dallas Cowboy cheerleading-in-training who probably has gotten everything she's ever wanted. Tara Reid plays Connie, the younger sister who isn't such a snob and cares the most about her family. Laura Dern plays their passively alcoholic Aunt Peggy who has three little girls of her own and spoils all of them. Then there's Farrah Fawcett as Mrs. Katie Travis.
 But she's actually quite good in this role as a woman who reverts to the mindset of a three-year-old. She doesn't have much dialogue but she gives a good performance, especially in a scene later in the film when Sully comes to visit her and you don't know whether to laugh or cry.
The movie mostly involves the women in Dr. T's life and there are A LOT of them. Besides his family there's also his patients, his staff and a woman named Bree (Hunt) who fascinates him for reasons he can't fully understand. Dr. T spends most of his time around women, in a very personal matter at that, the only thing he's seemed to learn is that they're all unique in their own way.
If I was going to give this film a bad review this would be the part I criticize it for a semi-dramatic scene in which Gere delivers a line like that to Hunt while they're playing golf. But for some reason I can't hold Dr. T's naivety of the fairer sex against him. After all, he's a doctor of the body, not of the mind.
There isn't really a definite plot (this is an Altman movie we're talking about), it's mostly just an overlapping character study and Dr. T is the filter all of the characters go through. Looking at the movie poster you know it boasts some really big-name actresses and they all have their fair share of screen time and each character has importance in the big scheme of things.
In an Altman film you sometimes wonder why he's spending so much time on characters just being themselves instead of working towards some goal or overcoming a conflict. I wondered this myself as the film reached the third act but was pleased with the results. Dee Dee's wedding serves as the boiling point where a lot of truths are revealed in a pretty funny way. That's when you think "Oh, okay, now I see where he was going with that."
However, what I DIDN'T understand was the actual ending sequence which has nothing to do with the wedding or any of the characters or stories that had come before. It's all about Dr. T but it's just so out of place it's rid iculous. This is one of those endings that kind of freaks you out, not because it's a twist of the story but because it's so bizarre you know it must be some kind of brilliant allegory and you can't figure it out.
For the most part "Dr. T And The Women" succeeds as an interesting and sometimes funny character study if nothing else. There's quite a few things that make you raise an eyebrow and if you're not easily amused you won't like the film as a whole (or at least not as much). Still, I enjoyed watching it and was genuinely curious about where it was going.
GRADE: B
------------------------------------------------------------------------ You can also read this review at: http://www.epinions.com/mvie-review-7DA9-1FD5BB3D-39EB8D43-prod3 And other reviews on the same topic at: http://www.epinions.com/mvie Check out my profile page at: http://www.epinions.com/user-chad9976
***** Chad'z Movie Page is back! In-depth reviews of nearly all mainstream films playing at your local cineplex. There's also reviews of a few classic films and some of your personal favorites.
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


{% if ticket.assigned_to != request.user %}
Assign Yourself
{% endif %}
{% if ticket.assigned_to == request.user %}
Return Ticket
{% endif %}
Edit Ticket
{% if ticket.status != "INVALID" %}
Mark as Invalid
{% endif %}
{% if ticket.status != "COMPLETED" %}
Mark as Completed
{% endif %}


M1LO6 Demonstrate the use of basic HTML tags to create a simple Web page (HTML, this item should be specified once, describing how the file it is in meets this outcome)
M1LO7 Demonstrate the use of ordered lists (HTML)
M1LO8 Demonstrate the use of external style sheets (HTML, note the external style sheet must exist and contain CSS)
M1LO9 Demonstrate the use of inline images (HTML)
M1LO10 Demonstrate the use of special characters from extended character sets (HTML, use entities, not cut-and-pasted unicode characters)
M1LO12Create navigation using unordered lists (HTML)
M1LO13Demonstrate using 3 types of hyperlinks: site navigation, targeted location using ids, and external (HTML, this item should be specified 3 times, once on each type of link)
M2LO3Demonstrate style precedence and inheritance in CSS (CSS, this item should be specified 2 times, once where precedence is applied and once where inheritance is applied; see 2-3d Style Specificity and Precedence, and 2-3e Style Inheritance)
M2LO4 Demonstrate external, embedded, and inline styles (HTML, this item should be specified 2 times, once each for embedded and inline styles; note external was taken care of with M1LO8; see 2-3b Embedded Style Sheets, and 2-3c Inline Styles)
M2LO5 Demonstrate contextual selectors (CSS, specify 2 times, showing two different types of contextual selectors as shown in Figure 2-12, Contextual Selectors, of the textbook)
M2LO6 UPDATE got it to work--Demonstrate a CSS id and a CSS class selector (CSS, specify 2 times, show a use of id and a use of class, see 2-9b Attribute selectors)
M2LO7 FAILED to get working --Demonstrate a CSS attribute selector other than class or id (CSS, specify 1 time, see 2-9b Attribute selectors)
M2LO11Demonstrate a pseudo-classes and a pseudo-element selector (CSS, specify 2 times, show one pseudo-class and one pseudo-element, see 2-18 Using Pseudo-Classes and Pseudo-Elements)
M2LO12Demonstrate how CSS can change presentation of page elements (CSS, these are styles that impact page elements rather than impacting text on the page)
M2LO13Demonstrate how CSS can change presentation of textual elements (CSS, these are styles that impact text that is rendered on the page)
M2LO14Demonstrate and explain the use of progressive enhancement in CSS (CSS, see 2-6 Employing Progressive Enhancement)
M2LO15Apply colors using CSS (CSS, see 2-5 Working with Color in CSS)
V2 Module Level Objectives
M3LO1 Demonstrate the use of a CSS reset style sheet (CSS, note where you have CSS reset rules),
M3LO2 Demonstrate floating elements (CSS, note where you have specified a floating element and what its impact is)
M3LO3 Demonstrate a clearing floats (CSS, note where you have used a clear and what its impact is)
M3LO6 FAILED -- Demonstrate formatting a grid (CSS, note the CSS rules that do this and what their impact is on the HTML; this can be old div-class based grids, or new CSS3 grids)
M3LO8A Demonstrate absolute positioning (CSS, note use in your CSS and describe what its impact is on the HTML)
M3LO8B Demonstrate relative positioning (CSS, note use in your CSS and describe what its impact is on the HTML)
M3LO9 Demonstrate fixed, static, or inherited positioning (CSS, note explicit use of one of the three in your CSS and what the impact is on the HTML)
M3LO10 Demonstrate an overflow setting (CSS, note explicit use of an overflow setting in your CSS and what the impact is on the HTML)
M3LO11 FAILED -- Demonstrate -prefix- style browser extensions use in CSS (CSS note the use in your CSS and what the purpose is)
M4LO1 Demonstrate the use of figure boxes (HTML)
M4LO2 FAILED -- Demonstrate the use of background images (CSS)
M4LO3 Demonstrate the use of rounded corners for borders (CSS)
M4LO4 Demonstrate the use of gradients (CSS)
M4LO5 Demonstrate the use of text or box shadowing (CSS, note one of these two in your CSS and explain its impact on the HTML)
M4LO6 Demonstrate the use of opacity/transparency for images (see 4.2) (CSS)
M4LO7 FAILED -- Demonstrate the use of image maps, including determining x and y values (HTML)
M4LO8 FAILED --Demonstrate the use of transformations for 2D or 3D images (CSS, note one of these two in your CSS and explain its impact on the HTML)


GfxDriver3D
Parameters:
| driver -- display driver number to check, from 1 to CountGfxDrivers () |
Description:
| GfxDriver3D returns True if the specified graphics driver is 3D-capable.
GfxDriver3D is generally used after obtaining a list of available graphics drivers from a user's system via CountGfxDrivers (). You apply this to each driver in turn (or a selected driver) to see if it is 3D-capable. If this returns False, the driver can not perform 3D operations. On systems with more than one display driver, you can use this to check each for 3D capability before choosing one via the SetGfxDriver command. |
| For a = 1 To CountGfxDrivers () If GfxDriver3D (a) Print GfxDriverName (a) + " is 3D-capable" Else Print GfxDriverName (a) + " is NOT 3D-capable" EndIf Delay 100 Next |


{{ partial "header.html" . }}
Much of my time over the years has been spent merrily making and improving the sorts of websites and software utilities you see on this page. I used to build these for fun alongside my research software for many years, until one day they started paying the bills! If you’d like to learn more about or collaborate on any of these projects, I’d love to hear from you.
The following tools were originally created to solve simple problems I stumbled across. I am releasing their code in the hope that they will be helpful to you too.


SiteMonitR Sample
The SiteMonitR sample demonstrates how a Windows Azure Cloud Service and a Windows Azure Web Site can use SignalR to communicate in an asynchronous communication. The SiteMonitR Cloud Service pings all of the sites in a list of sites stored in Windows Azure Table Storage. As each site's status is obtained, it is sent over to a SignalR Hub housed in a Windows Azure Web Site. When the SignalR Hub receives notifications for a site, the Web Site's user interface is updated in real-time. The result is a web site monitoring application that provides up-to-date status of web sites, giving site administrators real-time data on how their sites are performing.
Prerequisites
Running the Sample Locally
To get the site and cloud service running locally on a development workstation execute the following steps.
- Open Visual Studio 2012 as an Administrator (the Windows Azure SDK requires elevated priveleges to run the Windows Azure Compute and Storage emulators)
- Open the SiteMonitR.sln solution
- Press the F5 key to run the Cloud Service and Web Site simultaneously
- Use the HTML form to add a URL (include the "http://" in the text box)
- Observe as the site is monitored
- Add any additional sites and observe how they are monitored in real time
Running the Sample in Windows Azure
To get the site and cloud service running in Windows Azure, execute the following steps. A more comprehensive walk-through on setting up the entire application, see the Getting Started document for this sample.
- Log in to the Windows Azure portal.
- Create a new storage account to be used by the application.
- Create a new Cloud Service to use as the background service for the SiteMonitR application.
- Create a new Web Site to use to as the front-end web site for the SiteMonitR application.
- Go into the dashboard for the new storage account you created and click the Manage Keys button at the bottom of the portal. Copy the storage account's key to the clipboard.
- In Visual Studio 2012, expand the SiteMonitR.Azure project's Roles node. Double-click the SiteMonitR.WorkerRole node to open up the role's settings pane.
- Select the Cloud option from the Service Configuration drop-down menu.
- Click the ellipse button next to the SiteMonitRConnectionString setting.
- Enter in the storage account name and primary access key copied from the portal.
- Click the OK button.
- Repeat the same steps to set the Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString setting.
- Change the GUI_URL setting to reflect the URL of the Windows Azure Web Site you created using the Windows Azure portal.
- Right-click the SiteMonitR.Azure project and select the Publish menu item from the context menu.
- If you haven't yet imported your publish settings, click the Sign in to download credentials link in the publish dialog.
- Your web browser will open up and browse to the Windows Azure publish profile download page. When the page tries to download the publish settings file, click the Save button to save the file to your local workstation.
- Go back to Visual Studio 2012. Click the Import button in the publish dialog. Then, browse to the publish settings file you just downloaded and select it.
- Click the Publish button to deploy the Cloud Service to Windows Azure.
- The Windows Azure Activity Log window should open to display the Cloud Service's publishing process happening.
- Go back to the Windows Azure portal. Click the web site you just created to load the site's dashboard page.
- Once the site's dashboard loads in the browser, click the Download publish profile link.
- When the browser tries to download the file, save it to your local workstation.
- Right-click the SiteMonitR.Web project in Visual Studio 2012. Then select the Publish menu item from the context menu.
- Click the Import button on the publish dialog. Then, find the web site publish settings file downloaded from the Windows Azure portal.
- Click the Publish button in the dialog to publish the web site to Windows Azure.
- Once the site has been published, go back to the site's dashboard page in the Windows Azure portal. Click the Configure tab.
- Change the default document from Default.htm to Default.html. Then delete the other options from the list of default pages. Then, click the Save button to save the site configuration.
- Click the Browse button at the bottom of the web site's dashboard to browse the site.
- The site will open and present you with a simple form you can use to provide URL's of sites you'd like to monitor.
- Type in a site URL and click the Add Site button. The site will be added to the list of sites you are monitoring.
- Add in as many sites as you would like. All of the sites are monitored by the Cloud Service. Their status will update in real-time as the sites are hit by the service and reported in the web site. To remove a site, click the X button and the site will be removed from the list of sites monitored by the application.
Detailed Instructions
For a more detailed walk-through on how to perform each of the individual tasks required to get this sample working in Windows Azure, see the sample's Getting Started document in the repository containing the code for the sample.


Auth
public enum Auth
The type containing the method and properties for managing a user’s authentication with Pinterest via their Oauth2 login process.
-
The client id which was defined for your app at https://developers.pinterest.com/apps/.
Declaration
Swift
public static var client_id: String?
-
The client secret which was defined for your app at https://developers.pinterest.com/apps/.
Declaration
Swift
public static var client_secret: String?
-
The privileges being requested of the user’s Pinterst account. By default, this property is configured to request all privileges.
Declaration
Swift
public static var scope = Scope.all
-
The user’s token used to make autenticated requests to Pinterest on behalf of the user. This property is nil if no user is currently logged in.
Note
The token is automatically stored toUserDefaults
and thus will be immediately available on successive app launches.Declaration
Swift
public private(set) static var token: String?
-
A property used to determine if a user is currently logged in. Returns
true
if there is currently a logged in user. Otherwise returnsfalse
. Usage:if Auth.ed { //logged in }
Declaration
Swift
public static var ed: Bool
-
The result of the most recent access token request. This property is nil until at least one request is completed.
The value of this property is the same as what is provided in the completion of
Auth.requestAccessToken(with:completion:)
. It is mirrored here for convenience.Declaration
Swift
public static var result: Result?
-
The various errors that can occur when authenticating with the Pinterest API.
See moreDeclaration
Swift
public enum Error: LocalizedError, CustomStringConvertible
-
The available privileges that may be requested of the user’s Pinterst account
See moreDeclaration
Swift
public enum Scope: String
-
The result of an access token request.
See moreDeclaration
Swift
public enum Result
-
The url where you will send users wishing to login with Pinterest. Usage:
UIApplication.shared.open(Auth.url)
Warning
You must setAuth.client_id
andAuth.client_secret
before using this property. Failure to do so is considered a programmer error and will result in a crash.Declaration
Swift
public static var url: URL
-
The method used to make the request for the logged in user’s token after they have returned from Pinterest.com. You call this method from your
AppDelegate
‘sopenUrl
method, passing in the url. This method checks the url to determine if it was intended for your app, returningtrue
orfalse
accordingly.If the url is the expected redirect from Pinterest login, the request for the user’s token is made and the provided
completion
is called with the result of the request, when finished. If the request is sucessful,Auth.token
will become available for use in your app for authenticated requests.Usage:
func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool { return Auth.requestAccessToken(with: url) { result in switch result { case .success: //Token is available case .failure(let error): //Handle the error } } }
Declaration
Swift
public static func requestAccessToken(with redirect: URL, completion: @escaping (_ result: Result) -> Void) -> Bool
Parameters
redirect
The url passed into your
AppDelegate
‘sopenUrl
method.completion
The completion handler for the token request.
result
The result of the token request passed into the
completion
.