the and asymptomatic that for are (.–.) individuals infection infections epidemic number model {background SARS-CoV- symptomatic from with have The time values margin this ;():–. data proportion rate {border-style []. social spread there distancing not px;} #ffffff;} measures all four size Fig This also these high New coronavirus has infected more will epidemics might our peak people some than who cases course different states study were California, asymptomatics can estimated patients rapid relative reproduction role ;:–. COVID- China SARS Texas United basic between both but effect epidemic, epidemic. fit individuals, individuals. low parameter px; was {font-family (bottom Florida, Med York driven each font-size found includes infectivity large novel parameters shown studies testing transmission where (upper ./d California Florida January Medicine While Wuhan, York, disease double; early infections. infectious left), models shows they through use virus when which while County, Data Dis. Health Infections Med. Respiratory Sciences assume become been border-color border-width case cases. compartmental constant could cumulative death determined given here human indicating left likely locations only pandemic, particular pathogens reopening solid; start states. symptomatically threshold total two unreported using well {font-style {font-weight (/d) ./NEJMc America China. CoV Coronaviruses Engl For Geographical Infection Infectious Medical North People Presymptomatic Results SARS-CoV-, States States: [], bold case-fatality cases, change combinations coronavirus: courier; current date dead due during em; estimates far faster health hospitalized how indicate individual initiated intervals isolation larger lead limited lower mathematical modeling part places pre-symptomatic pt;} rate. re-opening recovered remaining respiratory result sciences see since spike states, stay-at-home suggesting symptom their within would


[gecode-users] consistency level for relations in MiniModel
Guido Tack
tack at gecode.org
Thu Mar 24 09:08:50 CET 2011
Kish Shen wrote:
> Hi,
>
> I am now looking at updating the ECLiPSe's gecode interface to the latest version of gecode.
>
> I have been using gecode 3.3 for the ECLiPSe interface because I have been using the old facilities for LinRel and LinExpr, by breaking down user's expression (which may be non-linear) into subexpressions and posting them. It looks like this can now all be done by using the relation facilities of MiniModel, so I do not need to break the expressions down myself.
>
> However, I am not very clear if I can specify the consistency level for relations and expressions I post using expr() and rel() of MiniModel. In my current code, where linear relations are posted using post, I am able to specify the consistency level. This allowed me to let the user (at the ECLiPSe level) to specify a consistency level for their (possibly non-linear) expressions and relations, with the understanding that the consistency level might not be achieved for parts of the expression (e.g. the non-linear parts).
>
> I have been looking at the current Modelling and Programming with Gecode, in particular the MiniModel chapter, and it is not clear to me that you can specify a consistency level for rel (and expr). Can the consistency level be specified?
Yes, no problem:
http://www.gecode.org/doc-latest/reference/group__TaskModelMiniModelPost.html
> On a related point, the MiniModel chapter show example of specifying the expressions and relations directly in C++. In my code, I will be translating user specified relations/expressions to gecode data structures. In the existing code, LinExpr and LinRel are constructed
> in my C++ code, and I will need to be able to do the same thing with IntExpr. I cannot find IntExpr in the (web-based) Gecode Reference Documentation, probably because I don't know where to look. I looked in the "Direct modelling support" page in the Programming models section,
> but I found only the linear relations and expressions that I am already using.
The problem is that there's no class called IntExpr. In the code it's separated into LinExpr and NonLinExpr. We'll have to fix that (either renaming LinExpr to IntExpr or adapting the docs). So what you have to do is construct a LinExpr, just like before, and then post it using expr or rel, which accept an IntConLevel argument.
> I guess my first question (about consistency level) is also because I don't know which section in the reference documentation to look up the rel/expr facilities described in the MiniModel chapter.
Right, the links are missing, sorry for that and thanks for the pointer. I'll update MPG accordingly. For the complete MiniModel reference, it's best to start from the MiniModel overview page:
http://www.gecode.org/doc-latest/reference/group__TaskModelMiniModel.html
Cheers,
Guido
--
Guido Tack, http://people.cs.kuleuven.be/~guido.tack/
More information about the users
mailing list


To learn Rust, we recommend
You should aim to read these entirely, and you should ask for help (during classes, by email, on Piazza, by talking to friends, …)


#!chuck_extends "not-really-a-base.html" #!chuck_renders content The big MOOOOOH has pwned you! #!end


May your Perl PDQs be PDQ pearls.
Blown away by PDQ. You get instant feedback for topology and optimization changes.
I went to the grocery store this week and discovered that I will never look at a grocery checkout lane the same again!


{% extends '../layouts/template.html' %} {% block title %}Check my State Pension - {{mvpversion}}{% endblock %} {% block serviceName %}Check your State Pension{% endblock %} {% block main %}
In the past you’ve been part of one or more contracted out pension schemes, such as workplace or personal pension schemes.
When you were contracted out:
Your workplace or personal pension scheme should include an amount of pension which will, in most cases, be equal to the additional State Pension you would have been paid. We call this amount your Contracted Out Pension Equivalent (COPE). Your COPE estimate is shown below.
The COPE amount is paid as part of your other pension schemes, not by the government. The total amount of pension paid by your workplace or personal pension scheme will depend on the scheme and on any investment choices.
Your COPE estimate is £30.50 a week.
The COPE amount is paid as part of your other pension schemes, not by the government.
You were part of contracted out pension schemes in these periods. Tax years run from April to April
| From | To |
|---|---|
| 2009-10 | 2015-16 |
| 2006-07 | 2008-09 |
| 2003-04 | 2003-04 |
View your National Insurance record to find out more about your contributions.
More about contracting out and the COPE amount (opens in new tab).


--- layout: page title: "The \"about\" URI Scheme" description: "This document describes the \"about\" URI scheme, which is widely used by Web browsers and some other applications to designate access to their internal resources, such as settings, application information, hidden built-in functionality, and so on." ---
| Document Name: | RFC 6694 |
|---|---|
| Document URI: |
urn:ietf:rfc:6694
|
| Online Version: |
https://datatracker.ietf.org/doc/html/rfc6694
|
| Organization: | Internet Engineering Task Force (IETF) |
| Series: | Request for Comments (RFC) |
| Abstract: | This document describes the "about" URI scheme, which is widely used by Web browsers and some other applications to designate access to their internal resources, such as settings, application information, hidden built-in functionality, and so on. |
about
Return to ( Series | Organization | all Specifications )


WITNESS LIST Health & Human Services Committee April 16, 1997-8:00A SB 55 Registering, but not testifying: On: Baker, Dennis E. (Texas Dept. of Health), Austin Kohout, Sharon (Texas Dept. of Health), Austin Steeg, Susan (Texas Dept. of Health), Austin SB 118 For: Magruder, Mary Jo (Plan. Coun. Dev. Disab.), Austin Registering, but not testifying: For: Brown, Laura (Coal. Tex. with Disab.), Austin Cernoch, Jennifer (Tx. Respit. Resou. Net.), San Antonio Graves, Tim (Texas Health Care Assn.), Austin Markland, Barrett (Advocacy, Inc.), Austin Schwartz, Jonas (Uni. Cereb. Pals. Texas), Austin Sperry, Bryan (Child. Hosp. Assn. Tx.), Austin On: Cowan, Tom (Texas Education Agency), Austin McKinney, Gerald (Hlth. Hum. Svcs. Comsn.), Austin Montoya, Yolanda (Hlth. Hum. Svcs. Comsn.), Austin Penfield, Susan (Texas Dept. of Health), Austin SB 940 For: Lovelace, Joe (Tx. Allian. Ment. Ill), Dallas Against: Hiser, Deborah C. (Advocacy, Inc.), Austin Registering, but not testifying: For: Locklin, Charles (Tx. Allian. Ment. Ill), Austin McClure, Spencer (Tx. Commun. MHMR Cent.), Austin On: Alexander, Cindy (Comptroller Pub. Accts.), Austin Gilbert, Don (Texas Dept. MHMR), Austin Liebler, Andy (Comptroller Pub. Accts.), Austin SB 975 Against: Atwell, Stuart (Records Deposition Svc.), Dallas Fallon, Howard (Records Deposition Svc.), Dallas Registering, but not testifying: For: Benavidez, Teresa (Htlh. Info. Mgmt. Assn.), Austin Benich, Barbara (Htlh. Info. Mgmt. Assn.), Austin Colovas, Cynthia (Hlth. Info. Mgmt. Assn.), Austin Kneeland, Carole (Tx. Assn. Broadcasters), Austin Montgomery, Steve (Harris Meth. Hlth. Sys.), Fort Worth Samuels, Marc (Tx. Org. Rur. Com. Hsp.), Austin Taylor, Carol (Tx. Trial Lawyers Assn.), Austin Wall, Matthew (Texas Hospital Assn.), Austin SB 1163 Registering, but not testifying: On: Baumgartner, Eric (Texas Dept. of Health), Austin Hudson, Lynne (Texas Dept. of Health), Austin Moore, Frank (self), San Antonio Penfield, Susan (Texas Dept. of Health), Austin Rush, Carl (Family Health Foundati.), San Antonio SB 1164 Registering, but not testifying: On: Baumgartner, Eric (Texas Dept. of Health), Austin Hudson, Lynne (Texas Dept. of Health), Austin Penfield, Susan (Texas Dept. of Health), Austin SB 1165 Registering, but not testifying: On: Baumgartner, Eric (Texas Dept. of Health), Austin Hudson, Lynne (Texas Dept. of Health), Austin Penfield, Susan (Texas Dept. of Health), Austin Sperry, Bryan (Child. Hosp. Assn. Tx.), Austin SB 1245 For: Farrow, Larry (Texas Hospice Organiza.), Austin Redford, Albert (PCS Health Systems), Fort Worth Registering, but not testifying: On: Baker, Dennis (Texas Dept. of Health), Austin Dodson, Gay (Tx. St. Bd. of Pharmacy), Austin Hatcher, Johnny (Tx. Dept. Public Safety), Austin SB 1246 For: Casey, Denise (Peterson Reg. Healthca.), Kerrville Durr, Jerry (Hill Country Mem. Hosp.), Fredricksburg Rosson, Dorothy (Texas Medical Assn.), Kerrville Talley, Sheri (Tx. Acad. Family Physi.), Fort Stockton On: Hamilton, Tyrette (Texas Dept. of Insur.), Austin Hilgers, David (Texas Medical Assn.), Austin Jordan, Laura (Cent. Rural Hlth. Init.), Austin Kloster, Jeff (Texas HMO Association), Austin Registering, but not testifying: For: Alexander, Troy (Texas Rural Htlh. Assn.), Austin Boucher, Terry (Tx. Osteop. Med. Assn.), Austin Cole, Marvin (Fayette Memorial Hosp.), La Grange DaSilva, Joe (Texas Hospital Assn.), Austin Haas, John (SW Tx. Rural Hlth. All.), San Antonio Jackson, Ed (Tx. Hosp. Home Hlth.), Austin McMurry, Ron (Tx. Acad. Family Physi.), Jasper Samuels, Marc (Tx. Assn. Surg. Cent.), Austin On: McKinney, Mike (Hlth. Hum. Svcs. Comsn.), Austin SB 1297 Registering, but not testifying: For: Boucher, Terry (Tx. Osteop. Med. Assn.), Austin Francisco, C.J. (Texas Medical Assn.), Austin Weitz, Timothy (Texas Acupucture Assn.), Austin On: Levy, Bruce (Tx. St. Bd. Med. Exam.), Austin SB 1347 For: Hunke, Phil (Tx. Acad. Pediat. Dent.), McAllen Seale, Suzi (Tx. Acad. Pediat. Dent.), Dallas Tate, Albert M. (Tx. Pediatr. Dent. Asn.), Austin Against: Colbert, Paul (Tx. Dent. Hygenist Asn.), Houston Registering, but not testifying: On: Beran, Douglas A. (St. Bd. Dental Exam.), Austin Hill, Jeffry (St. Bd. Dental Exam.), Austin Lopez, G.M. Nana (Texas Dept. of Health), Austin SB 1403 For: Barber, Elaine (Prevent Blindness Tx.), Houston Registering, but not testifying: For: Ingram, Diane (Prevent Blindness Tx.), Austin Riddering, Hannah (self), Austin Schwartz, Marilyn (Tx. Soc. to Prev. Blin.), Austin On: Embree, Glenda (Tx. Comm. for the Blind), Austin Murphy, Terry (Tx. Comm. for the Blind), Austin SB 1539 For: Wynn, Ester (Tx. Lic. Childcare Asn.), Houston Registering, but not testifying: On: Baldwin, Howard (Dept. Prot. Reg. Svcs.), Austin SB 1566 Registering, but not testifying: For: Boucher, Terry (Tx. Osteop. Med. Assn.), Austin Francisco, C.J. (Texas Medical Assn.), Austin Stone, Sam (Tx. Acad. Phys. Assts.), Austin Weitz, Timothy (Texas Acupucture Assn.), Austin On: Levy, Bruce (Tx. St. Bd. Med. Exam.), Austin SB 1607 Registering, but not testifying: On: Levy, Bruce (Tx. St. Bd. Med. Exam.), Austin SB 1699 Registering, but not testifying: For: Boucher, Terry (Tx. Osteop. Med. Assn.), Austin Francisco, C.J. (Texas Medical Assn.), Austin Riddering, Hannah (Tx. Natl. Org. Women), Austin On: Hurwitz, Ivan (Tx. St. Bd. Med. Exam.), Austin Levy, Bruce (Tx. St. Bd. Med. Exam.), Austin


US Marshals
A Review by Fred M. Hung
I should have known what to expect when I saw the director, Stuart Baird, whose last work was Executive Decision, a mildly entertaining but mostly formulaic and uneven Die Hard in air. In US Marshals, Sam Gerard is again on the hunt for Sheridan, a former Marine, Special Forces. Robert Downey, Jr., DSS Special Agent John Royce, is a new addition to the team.
The first Fugitive was a remake of the old TV series, and no one had more doubts than I about its effectiveness. Yet the sheer unrelenting pace and amazingly strong characters made the film so much more than the sum of its parts. Tommy Lee Jones was riveting, full of energy resolve, and professionalism. Many will complain that US Marshals suffers because it lacks Harrison Ford, but Ford's performance, though solid, was not particularly out of his narrow range. In fact, you can supplant Ford's President from Air Force One with Dr. Richard Kimble and one could scarcely tell the difference. What made Fugitive truly great was the combination of Tommy Lee Jones' Sam Gerard, a noble Wyatt Earp who, though chasing our hero Harrison Ford, is difficult to dismiss, and impossible to hate.
US Marshals is disappointing, but not in the material, in the editing. In a film class I took back in college, we were taught that editing creates continuity, and thus makes the story of the film. The blame, therefore, must fall on Baird. In fact, all the elements of a good film are present in US Marshals, action, plots and subplots, bad guys, and noble good guys. Unfortunately, nothing successfully gels these components. Even Jerry Goldsmith, whose musical scores are usually quite engrossing, produces a nondescript and absolutely nonemotive effort.
Like Executive Decision, US Marshals suffers from moments of intensity, to great lulls in rhythm. The plane crash where Snipe's Sheridan escapes is preceded by a very tepid formal where Gerard's superior orders him to take vacation. In addition, The supporting cast blends too easily in the background to be noticeable. The chemistry between Sam Gerard and his men in the Fugitive created levity in the moments when they interacted. In the US Marshals Baird attempts to mimic these moments, but they too seem forced.
While certainly disappointing, US Marshals is not a horrible film, but audience expectation is so much greater. I can think about a dozen directors, namely Michael Bay, Tony Scott, John McTiernan, and certainly Andrew Davis (although Chain Reaction was pretty lackluster) that could have made more of this solid cast. What a waste of talent.
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


19 January 1998
Disease Outbreak Reported
The Department of Health reported on 19 January that there were no new cases of influenza A (H5N1). The total number of cases remains 18 confirmed and one suspected cases. Ten of the 18 confirmed cases have been discharged from hospital, and six were fatal. The health status of the remaining two cases hospitalized was unchanged critical for one and satisfactory for the other. Preliminary tests results were negative for a 26-year-old female admitted to hospital on 18 January with influenza-like illness.


Submissions from day 1 are ignored as there was an outage at unlock.
Return to index
Last updated Mon Dec 5 10:01:01 EST 2022


Owning goals with OKRs
Goals are a vital ingredient for us to carry out a set of tasks in an efficient manner. A goal is the purpose for your actions. Without a goal, why are you doing what you’re doing? Its when we fully understand and internalize our goals that we create a sense of purpose and self worth. That our actions are bringing us closer to an objective and in turn, have meaning and value. Our efforts are then not fruitless, as mundane as they may sometimes appear.
You might be one of many that sometimes lose grasp of your own life goals, career goals, fitness, financial, relationship, whatever it may be goals. When that happens we lose grasp of direction and then potentially even spiral down into a loss of aspiration, self worth and so on. The same can be seen when your manager or lead fails to communicate and form agreeance of common or personal goals. So no wonder you may have disdain for your job. You don’t know why you’re doing your immediate task, or you may not even know why your job exists in the first place! Eekkk.
The process of setting goals is extremely important. Goals need to be well defined, obtainable, clearly communicated and understood. Once individuals start seeing the goal posts being setup, and the point of the goal posts, they will internalize the reason for the how. The how being the steps or actions needed to get to that goalpost.
I hope to detail the importance of goals and techniques I’ve used in setting, communicating, getting team members to own and strive to achieving the goals laid out. We’ll start off by reviewing the tool, then get into the techniques, then the findings and discussions.
OKRs
OKRs: Objectives and Key Results 1. Its a nice acronym for basically coming up with some overarching goals and then breaking out measurable deliverables that would independently contribute to the success of that objective. Let’s start by taking an example of an objective:
“Increase Code Quality”
Pretty straight forward. The objective is to heighten the quality of code. A little open ended yes, but that is the objective. Code that is pre-existing or about to get into the codebase, needs to be of a higher quality than what preexisted. You’re wondering now, “okay, but that doesn’t give anyone any idea as to what exactly needs to be done?” This is where key results come into it. Let me break this down into a format now for which you may present to a direct.
Objective: Increase Code Quality Key Results:
- All PR’s (pull requests) to have minimum of 90% code coverage
- 10 PR’s to be conducted with TDD
- Pair on 5 stories, start to finish, with a team member outside of our team
- Review 20 PR’s in and outside of the team
- Create 8 improvement cards
So first off. What you see above are key results. Key results are quantifiable. You should imagine your key results as a slider. Did I or did the individual get 80% of the goal, 120% of the goal etc. Each set of key results is to be placed on the same timeline as the objectives. That way all key results can be measured fairly without any time bias. It also allows you to create key results in a way that is almost like a perfect recipe for achieving the objective.
The timeline
The OKRs I set up with my directs are revisited and adjusted every 3 months. Reviewing OKRs however occurs on a weekly basis. This duration I find to work quite well. Its a target that the individual can visualise and work back from. They might have some personal activities or events coming up at work that they can take into account and factor in to how they might approach it. This cadence also allows for objectives and key results to be tweaked. Keeping goals and deliverable targets somewhat agile and pragmatic in the project’s development.
Reflection and visualization are tools I strongly encourage you as a member to look into. I find having a weekly cadence is a great way to enforce reflection and also trigger visualization motions to come into play. I will get into that more later however in communicating OKRs.
How to define an objective
First of all, as a manager, your job is aligning your team in a way that will successfully achieve whatever the wider goals may be, hopefully with longevity of the team at mind. With this said, coming up with objectives should be structured on an individual basis. It is very much circumstantial to the strengths, weaknesses and personal goals of the individual. Ensure both short-term and longterm goals are factored in here, as it should not just be the goals of the immediate project that the objectives are catered to. Instead longer term career aspirations and developmental objectives should be factored in also.
Some examples of objectives:
- Swim faster
- Understand Jazz
- Start a potluck for the office
- Find a new office manager
- Be Amazing
These are objectives remember. Not goals. We strive to improve on our objectives, but we strive to achieve our key results. Thus our goals are to achieve our individual key results so that we are working towards our objectives and in turn the goals of the team are realized. It’s a meta way of breaking down team goals down into traits, categories or objectives. From objectives we find success metrics upon various tasks and or deliverables that contribute to the goal of the objective. See how that bubbles up? But how do we break it down? How do you identify what components would makeup the success or advancement of an objective? Let’s examine the KR’s, the key results.
Key results
Now we step into the actual definitions of goals and expected outcomes. The key result are tangible deliverables you are able to accurately track. Whether it be measured in terms of a “delivered x” number of things, or the ability to put in place a quality metric. Whatever metric is selected to measure the key result, it most certainly needs to be clearly defined and without any grey area as to its measurement.
OKR’s can be boolean yes. However as a manager really if you are finding that the KR’s you’re defining are trending to be all boolean and similar in nature, perhaps you are actually defining the objective and not key results? Key results work best when there is a particular target of multiple observations. This also enables the ability to set key results up in the sense of stretch goals. So in the very nature if you feel a developer can achieve reviewing 10 pull requests a week, why not try setting that number to 15 and seeing how performance tracks. If you set a target, at least you will be able to see how people are tracking against the target. This may sound a bit unrealistic, however please see the next section for how to communicate key results.
So for some examples that I give my senior developers. Three categories stand out: Delivery, Influence, Quality:
Delivery
- Deliver 3 Pr’s a week. 36 in Total
- Do 10 PR’s with TDD
- Assist with 3 Platform Items
Influence
- Attend 80% of Developer Demos
- Present 3 Developer Demos
- Run 2 Standup/Grooming/Planning Sessions
- Check in with another member of another team 5 times for at least 30mins
- Find 4 PR’s that need help and sit with the individual to refactor/fix
- In our 1:1’s demo 5 areas of improvement
Quality
- Review 30 PR’s
- Pair on 7 Stories - Start to Finish
- Present clean code findings in 5 1:1’s
- Generate 10 Improvement cards
- Write 3 forum or blog posts on technical areas of interest
Implementing & communicating OKRs
When I first kicked off OKRs as a tool for setting individual goals it was quite interesting. At first I got a lot of confusion from my directs. They felt that they were being tracked to a tee of their delivery. They felt that this was going to relate directly to their performance reviews. If they didn’t nail their OKRs, of which both of us had visibility on, that then they would see less monetary value at the end of the year.
I approached this somewhat interesting circumstance by decoupling it immediately. Instead I highlighted that the OKRs are nothing but a tool for you to reflect and visualize your next week. I had to stress that they were only a tool I had set up for the individual that split out an objective into a means for which the individual could get more focus on. It was merely a way to break down a somewhat overbearing goal into managable chunks.
Once it was established this was just a tool at their disposal they immediately fell in love with the power it gave them. It provided insight into how they were tracking against their objectives. Some directs took so much ownership on their OKRs they started mini self retro’s on their Trello board. Saying what worked well and what didn’t work well in relation to the objectives in their OKRs, and how they failed to meet some key results they previously thought they would of achieved that week.
They reflected, and they visualized how the next week would work. This is the exact feedback cycle I had hoped to create in my 1:1’s; yet it was now coming from within the team members.
Using OKR’s in 1:1’s
A mentioned above, Objectives and the key results were tweaked every 3 months. Key results however were reviewed every week and discussed in detail during 1:1’s. I wanted to get insight into how the direct felt they were going upon reflecting on their key results. Why didn’t they get their target? Also more alarmingly and I guess more rewardingly is why are some key results not moving at all. This fast feedback cycle allowed both of us to calibrate how the next week would pan out. What I could do as a manager to open up opportunities or formulate the teams activities in a way that could best achieve these objectives.
To begin with we used to walk down the key results together. It felt a little micromanaging at first but it was a neccessity to getting both of us comfortable using the tool. It also proved to build trust between both of us as blame was never put on the individual if results weren’t being met, instead ways to look to the future on how to achieve the objectives was far more beneficial.
But what about performance
I hear you asking:
So if you don’t uphold poor delivery on the key results, then what is the point?
Well let’s think of it this way. If you as a manager have set up your OKR’s correctly and if you are giving constant feedback on performance (not related to the OKRs) then really, those key results should be moving on their own.
It all comes down to feedback; and you monitoring the individual’s performance outside of the key results you’ve put forward. Is the person focused? Is product or the project manager promoting opportunities for the individual to be productive and achieving previously agreed goals. if the team is healthy and the individual is productive, then you should be seeing results against the objectives you have set out.
Final thoughts
OKRs are only a tool. Its not a tool for performance reviews. Its a tool to break down a broad and complex objective, into targets that can be visible and understandable to the human brain. Its an amazing tool for individuals to get reflection in 1:1’s on the week they just had and the week they’re about to head into. They’re fine grained enough to tap into peoples strengths and improve upon people’s weaknesses whilst still allowing the project’s goals to be kept in mind.
OKRs are difficult at first to implement. Especially if your team feels like a previous manager was a bit micromanagey. But build the trust that they won’t be upheld to the key results. Instead use your feedback on performance and areas of improvement without having the OKRs out on the table.


class MathSpec extends Specification {
def "maximum of two numbers"() {
expect:
// exercise math method for a few different inputs
Math.max(1, 3) == 3
Math.max(7, 4) == 7
Math.max(0, 0) == 0
}
}
def "test if vector still works"() {
given:
def vector = new Vector<String>()
def elem = "element"
when:
vector.add(elem)
then:
!vector.empty
vector.size() == 1
vector.get(0) == elem
}
class MathSpec extends Specification {
def "maximum of two numbers"() {
expect:
// exercise math method for a few different inputs
Math.max(1, 3) == 3
Math.max(7, 4) == 7
Math.max(0, 0) == 0
}
}
def obj = new ClassUnderSpecification()
@Shared
def res = new VeryExpensiveResource()
def setup() {} // run before every feature method
def cleanup() {} // run after every feature method
def setupSpec() {} // run before the first feature method
def cleanupSpec() {} // run after the last feature method
def "pushing an element on the stack"() {
// blocks go here
}
class MathSpec extends Specification {
def "maximum of two numbers"() {
expect: """You can even put some text here.
Text that makes sense!"""
// exercise math method for a few different inputs
Math.max(1, 3) == 3
Math.max(7, 4) == 7
Math.max(0, 0) == 0
}
}
class MathSpec extends Specification {
def "maximum of two numbers"() {
expect: "You can even put some text that makes sense in here"
// exercise math method for a few different inputs
Math.max(1, 3) == 3
Math.max(7, 4) == 7
Math.max(0, 0) == 0
}
}
class MathSpec extends Specification {
def "maximum of two numbers"() {
expect: "You can even put some text that makes sense in here"
// exercise math method for a few different inputs
Math.max(1, 3) == 3
Math.max(7, 4) == 7
Math.max(0, 0) == 0
}
}
def "charAt non existing char index"() {
given:
def aString = '0123'
when:
aString.charAt(5)
then:
thrown(StringIndexOutOfBoundsException)
}
class MathSpec extends Specification {
def "maximum of two numbers"() {
expect: "You can even put some text that makes sense in here"
// exercise math method for a few different inputs
Math.max(1, 3) == 3
Math.max(7, 4) == 7
Math.max(0, 0) == 0
}
}
class MathSpec extends Specification {
@Unroll
def "maximum of #a and #b is #c"() {
expect:
Math.max(a, b) == c
where:
a | b | c
1 | 3 | 3
7 | 4 | 4
0 | 0 | 0
}
}
def "test db"(String name, int age, String gender) {
given:
when:
then:
where:
[name, age, gender] = sql.execute("""
select name, age, sex from customer
""")
}
// "dynamic" style
def subscriber = Mock(Subscriber)
// "static" style
Subscriber subscriber = Mock()
given:
PersonRepository personRepository = Mock(PersonRepository)
personRepository.findByInss(83021805793) >> new Person("Koen", "Ongena")
when:
String result = personService.getFirstName(83021805793)
then:
result == "Koen"
then:
// optional interactions
subscriber.isAlive() >> true
// required interactions
1 * subscriber.receive(event)
// exactly n times
n * subscriber.receive(event)
// at least n times
(n.._) * subscriber.receive(event)
// at most n times
(_..n) * subscriber.receive(event)
// no arguments
subscriber.receive()
// any argument
subscriber.receive(_)
// any non-null argument
subscriber.receive(!null)
// any argument equal to event
subscriber.receive(event)
// any argument not equal to event
subscriber.receive(!event)
// any argument that is-a Message (null is not allowed)
subscriber.receive(_ as Message)
// custom constraint
subscriber.receive( { it.priority >= 5 } )
// For methods that take multiple arguments:
// any argument
mock.foo(_, _, _)
// same as above
mock.foo(*_)
// any first arg, second arg non-null, third arg custom
mock.foo(_, !null, { it ==~ /a*b/ })
// single return value, repeated indefinitely
subscriber.isAlive() >> true
// multiple return values (anything that Groovy can iterate over),
// last one repeated indefinitely
subscriber.isAlive() >>> [true, false, true]
// custom action
subscriber.isAlive() >> { throw new TimeoutException() }
// depending on arguments
subscriber.isEventSupported(_) >> { args[0] instanceof ... }
// no (more) method call on any mock
0 * _._
// interaction ordering
then:
1 * subscriber.isAlive() >> true
then:
1 * subscriber.isEventSupported(_) >> true
then:
1 * subscriber.receive(event)


Are you someone who is fuelled by the inner fire of curiosity combined with inherent genius??
Have you crossed new frontiers into the uncharted territories of science and technology??
At Tremors 13.0 we can give this unassailable spirit of inquisitiveness and intellect of yours what it needs – an amazing platform to showcase your research & vision.
Intellection, the technical paper presentation contest of Tremors 13.0, will more importantly be an event where sharing of knowledge takes place among the intellectuals.
The basic idea behind the competition is to throw light on the basic knowledge and new ideas on topics of substance, interest and relevance under the following areas of technical research:
Computer science
Information technology
Electrical
Electronics and communication
Mechanical and automation
TEAM SPECIFICATIONS:
Maximum 3 members per team
EVENT FORMAT
ROUND 1 – Abstract Submission
1. Each team will be required to submit an abstract about their topic chosen in not more than 1000 words.
2. The abstract must be sent as a PDF file to<EMAIL_ADDRESS>before 10th March positively.
3. Teams will be short listed for the next round on the basis of the abstracts they submit.
ROUND 2 – Presentation
1. The shortlisted teams from Round 1 will participate in Presentation Round.
2. In this round, the teams will have to present their paper to a panel of judges.
3. Each team will get 8+2 minutes for their presentation after which there shall be negative marking.
4. There will be a 2 minute interjection from the panel of judges/ audience
RULES AND REGULATIONS
1. The teams must first register online.
2. The papers must comply with the IEEE format.
3. The e-mail with abstract submission should contain:
- Title of the paper.
- Name of all the authors.
- Contact numbers of all the authors.
- E-mail IDs of all the authors.
4. All the teams short listed for Round 2 will have to confirm their registrations within 2 days of notifying.
5. The organizers reserve all rights to change any or all of the above rules as they deem of it.
6. All changes will be highlighted on the website and registered participants shall be informed by email.
7. The decision of the judges and the organizers will be final and binding.
8. All the references should be clearly mentioned in your abstract.
9. If at any stage, your Technical paper is being found copied from somewhere then your team will be immediately disqualified.
10. Students from different educational institutes can form a team.
11. 3 hard copies should be brought on the day of Presentation.
JUDGING CRITERIA
Round 1- Abstract submission
• Choice of Topic
• Technical Content
• Grammar and Spelling
• Paper Appearance and format
Round 2- Presentation
• Content
• Quality of Presentation
• Speaker Mechanics
• Question and Answer
PRIZES
Enthralling prizes are sure to attract you to this event. Cash prizes and vouchers will be awarded to the winners.
For any queries write us at formaleventstremors13@gmail.com


Mauricio Pochettino's Tottenham Amazon documentary concerns as Jose Mourinho steps in
Mauricio Pochettino has been sacked by Tottenham and replaced by Jose Mourinho, with fans now eagerly awaiting the release of their Amazon Prime documentary
by Liam Prenderville, http://www.facebook.com/mirrorfootballMauricio Pochettino had admitted his concerns about Tottenham's Amazon Prime documentary before his sacking.
Pochettino was axed on Tuesday night with Jose Mourinho having now been confirmed as his successor.
It adds a stunning new storyline to the fly-on-the-wall documentary series, that will adopt a similar format to those at Manchester City , Leeds and Sunderland.
It remains to be seen how Mourinho will deal with the cameras on him but Pochettino admitted he was a little uneasy when asked about the programme last month.
“When the club agreed the deal with Amazon, of course we were worried about it. Because it is not easy, not easy," he said.
"It is tough to have the camera in your office, and then how you handle the situation to have the capacity to say: ‘OK, I am not in a good mood, but sometimes the camera is going to be there.’ It is so complicated, it is another thing to worry about and of course that adds a lot.
“If we were busy, now we are super busy. To plan every day, everything, is not an easy job. That is why, when I told you I feel that I am not any more a manager, I am a coach, now I am like a producer. Being coach, manager and producer.”
Pochettino even suggested there was a 'risk' that came with such programmes if fortunes didn't improve on the pitch - as they haven't.
“It’s going to be the reality. It is like when we started to do the book [Inside Pochettino’s Spurs] one season. It was the same risk.
"The most important is to live the reality, not to try to generate something that is fake or not real.
"And then what you are going to love, what the people are going to love to see, is that we are normal people working. We can win, we can lose.
“Like the book, I hope there is a happy ending. But if not, you are going to see another point of view, from a different vision.”


Ensuring that you can upgrade your applications easily and smoothly is important to us. That’s why we only break compatibility at major release milestones. You might be familiar with semantic versioning, which is the general guideline we use on all CakePHP projects. In short, semantic versioning means that only major releases (such as 2.0, 3.0, 4.0) can break backwards compatibility. Minor releases (such as 2.1, 3.1, 3.2) may introduce new features, but are not allowed to break compatibility. Bug fix releases (such as 2.1.2, 3.0.1) do not add new features, but fix bugs or enhance performance only.
Note
CakePHP started following semantic versioning in 2.0.0. These rules do not apply to 1.x.
To clarify what changes you can expect in each release tier we have more detailed information for developers using CakePHP, and for developers working on CakePHP that helps set expectations of what can be done in minor releases. Major releases can have as many breaking changes as required.
For each major and minor release, the CakePHP team will provide a migration guide. These guides explain the new features and any breaking changes that are in each release. They can be found in the Appendices section of the cookbook.
If you are building your application with CakePHP, the following guidelines explain the stability you can expect.
Outside of major releases, interfaces provided by CakePHP will not have any existing methods changed. New methods may be added, but no existing methods will be changed.
Classes provided by CakePHP can be constructed and have their public methods and properties used by application code and outside of major releases backwards compatibility is ensured.
Note
Some classes in CakePHP are marked with the @internal
API doc tag. These
classes are not stable and do not have any backwards compatibility
promises.
In minor releases, new methods may be added to classes, and existing methods may have new arguments added. Any new arguments will have default values, but if you’ve overridden methods with a differing signature you may see fatal errors. Methods that have new arguments added will be documented in the migration guide for that release.
The following table outlines several use cases and what compatibility you can expect from CakePHP:
| If you... | Backwards compatibility? |
|---|---|
| Typehint against the class | Yes |
| Create a new instance | Yes |
| Extend the class | Yes |
| Access a public property | Yes |
| Call a public method | Yes |
| Extend a class and... | |
| Override a public property | Yes |
| Access a protected property | No [1] |
| Override a protected property | No [1] |
| Override a protected method | No [1] |
| Call a protected method | No [1] |
| Add a public property | No |
| Add a public method | No |
| Add an argument to an overridden method | No [1] |
| Add a default argument value to an existing method argument | Yes |
If you are helping make CakePHP even better please keep the following guidelines in mind when adding/changing functionality:
In a minor release you can:
| In a minor release can you... | |
|---|---|
| Classes | |
| Remove a class | No |
| Remove an interface | No |
| Remove a trait | No |
| Make final | No |
| Make abstract | No |
| Change name | Yes [2] |
| Properties | |
| Add a public property | Yes |
| Remove a public property | No |
| Add a protected property | Yes |
| Remove a protected property | Yes [3] |
| Methods | |
| Add a public method | Yes |
| Remove a public method | No |
| Add a protected method | Yes |
| Move to parent class | Yes |
| Remove a protected method | Yes [3] |
| Reduce visibility | No |
| Change method name | Yes [2] |
| Add a new argument with default value | Yes |
| Add a new required argument to an existing method. | No |
| Remove a default value from an existing argument | No |
| [1] | (1, 2, 3, 4, 5) Your code may be broken by minor releases. Check the migration guide for details. |
| [2] | (1, 2) You can change a class/method name as long as the old name remains available. This is generally avoided unless renaming has significant benefit. |
| [3] | (1, 2) Avoid whenever possible. Any removals need to be documented in the migration guide. |


MR. Samuel George known as (Daddy Kham) has compiled a PDF guide that will help you to do the following, check the below list. This is a guide to beginners who no nothing about coding, the step by step guide will manually teach you how to code lin |
|
1 Create A Blog 2 Setting Up A Blog 3 Integrating TLD 4 Publish Your First Post 5 Activate Ads 6 Add Site Map 7 Create A Unique Blog Logo 8 Coding 10 Conclusion |
The PDF (E-book) Consists of all the above items, and step by step guide to help you understand how each section works. The vedios also will help you to understand how to code with Html and CSS. This is a pure guide for beginners. see you there.


- Legal
- Assistance
- Agreement
- Standard hourly rate, multiplied by the number of hours spent in providing the services.
- Specific
- Assignments
- In case of certain specific assignments for which you would like to have a fee estimate from the beginning, we may agree, prior to commencing work, upon a fixed fee to be charged for the services to be rendered under the project.
- Help-desk
- Arrangement
- For monthly collaboration. Under this collaboration understanding, I will provide you legal services on low complexity matters, occurring in the company’s day-to-day business. The legal assistance consists in telephone advice on specific issues, followed by brief e-mail responses. nfirming the verbal advice, or directly in e-mail responses, depending on the business specific needs. Not within the scope of help-desk services will be assistance with review and drafting of contracts, contract negotiations, legal opinions, assistance in court, drafting of due diligence reports, as well as advice and assistance on high complexity issues (which, for example, exceed 3 hours of the attorney’s time to respond/handle).
- For the help-desk arrangement, I propose a monthly subscription fee, computed based on the number of hours allocated monthly, multiplied by the standard hourly rate. If the monthly time spent exceeds the allocated hours for the month, unless otherwise agreed, I will invoice any additional work based on an hourly rate agreed beforehand.
- The fees are out of VAT and out-of-pocket expenses (travel, accommodation, administrative fees, etc.) that will be separately invoiced to the company, at cost.


predictaventure
Features
Case Study
Methodology
About Us
Login
About Us
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent auctor feugiat consequat.


TsaiHsuan Rosa Yang
EXPERIENCE
Titanium Plus Auto Parts Inc. City of Industry, CA
IT Department, Software Engineer
08/2017 - PRESENT
- Developed and directed software system validation and testing methods.
- Working closely with clients and cross-functional departments to communicate project statuses and proposals.
- Maintained warehouse management system (WMS).
Developed, refined functions to company built, existing WMS with C# and MS SQL.
- API integration with WMS to make order fulfillment accurately and efficiently.
Responsible for developing, maintaining Amazon MWS, eBay, Walmart, Magento API functionalities.
- Currently developing web-end version of WMS with .NET MVC framework with Angularjs.
California State Polytechnic University- Pomona - Pomona, CA
Digital Service & Technology Department, Student Programmer
02/2016 - 06/2017
- Build a system for school graduate thesis format checking using Java.
- The system is able to detect format errors correctly and efficiently: for a 100 pages document, the system takes less than 10 seconds to finish the process, and can detect about 90% formatting errors.
EDUCATION
California State Polytechnic University-Pomona
Pomona, CA — Master of Computer Science
09/2015 - 06/2017
National Taiwan Normal University
Taipei, Taiwan — Bachelor of Computer Science and Information Engineering
09/2011 - 06/2015
SKILLS
C#, Java, Python, SQL, C/C++, MVC framework, HTML, XML, Amazon EC2, Cloud 9, Git/GitHub
You may download my resume
here


About us
DIME is the impact evaluation unit of the World Bank Research Group. Part of DIME’s mission is to intensify the production of and access to public goods that improve the quantity and quality of global development research, while lowering the costs of doing IE for the entire research community. This Library is developed and maintained by the DIME Analytics team, a new initiative to provide data quality assurance to all DIME impact evaluations.


d3.layout.narrative = function(){
d3.layout.narrative()
The constructor takes no arguements. All relevant object properties should be set using the setter functions.
d3.layout.narrative = function(){
jLouvian is a open source (MIT) javascript implementation of the Louvian method of community detection.
import 'vendor/jLouvian/jLouvian.js';
Define all the variables.
var narrative,
scenes, characters, introductions, links,
size, orientation, pathSpace, scale,
labelSize, labelPosition, groupMargin, scenePadding,
groups;
Set some defaults.
size = [1,1];
scale = 1;
pathSpace = 10;
labelSize = [100,15];
labelPosition = 'right';
scenePadding = [0,0,0,0];
groupMargin = 0;
orientation = 'horizontal';
The narrative object which is returned and exposes the public API.
narrative = {};
narrative.scenes([array])
Set or get the scenes array. If an array is passed, sets the narrative’s scenes to the passed array, else returns the scenes array.
narrative.scenes = function(_) {
if (!arguments.length) {
return scenes;
}
scenes = _;
return narrative;
};
narrative.characters([array])
Set or get the characters array. If an array is passed, sets the narrative’s characters array, otherwise returns the characters array.
narrative.characters = function(_) {
if (!arguments.length) {
return characters;
}
characters = _;
return narrative;
};
narrative.size([array])
Set or get the size of the layout. A two element array [width,height]
. Note
that this is considered a guide for the layout algorithm.
See narrative.extent()
for getting the final size of the layout.
narrative.size = function(_) {
if (!arguments.length) {
return size;
}
size = _;
return narrative;
};
narrative.orientation([orientation])
Incomplete: Only the default (horizontal) option is fully supported.
Set the orientation to use for the layout. The choices are 'horizontal'
(default)
or 'vertical'
. In a horizontal orientation ‘time’ runs from left to right
and in vertical, top to bottom.
narrative.orientation = function(_) {
if (!arguments.length) {
return orientation;
}
orientation = _;
return narrative;
};
narrative.extent()
Get the extent of the space used by the layout. This is useful for adjusting the size of the containing element after the layout has been calculated.
Despite being able to set the size (see narrative.size()
), it’s not always
possible to contain the chart in the available space. This function will
provide a [width,height]
array of the layout extent after the layout has
run.
narrative.extent = function(){
return scenes.concat(introductions).reduce(function(max, d){
var bounds = d.bounds();
if (bounds[1][1] > max[1]) {
max[1] = bounds[1][1];
}
if (bounds[1][0] > max[0]) {
max[0] = bounds[1][0];
}
return max;
}, [0,0]);
};
narrative.pathSpace = function(_) {
if (!arguments.length) {
return pathSpace;
}
pathSpace = _;
return narrative;
};
narrative.groupMargin([margin])
The characters are divided into groups based on the strength of their relationships (i.e. co-appearances in scenes). These groups are then arranged in a way designed to reduce congestion in the centre of the chart. To give thelayout a more open feel, a group margin can be set.
narrative.groupMargin = function(_) {
if (!arguments.length) {
return groupMargin;
}
groupMargin = _;
return narrative;
};
narrative.scenePadding([array])
By default scenes have a height equal to character height × character count
and a width of zero. You may want to allow for extra space around scenes so
collisions with labels can be avoided. To set a padding pass an array of values
matching the CSS padding argument order [top, right, bottom, left]
.
narrative.scenePadding = function(_) {
if (!arguments.length) {
return scenePadding;
}
scenePadding = _;
return narrative;
};
narrative.labelSize([array])
Set or get the default space to allocate in the layout for character labels.
Must be a two element array [width,height]
. Label sizes specific to each
character which will override these defaults can be set by defining height
and width
properties on individual character objects.
narrative.labelSize = function(_) {
if (!arguments.length) {
return labelSize;
}
labelSize = _;
return narrative;
};
narrative.labelPosition([string])
Set or get the default label position for character labels. Valid options are
above
, below
, left
, right
. This can be overridden by setting defining
a labelPosition
property on individual character objects.
narrative.labelPosition = function(_) {
if (!arguments.length) {
return labelPosition;
}
labelPosition = _;
return narrative;
};
narrative.links()
Returns an array of links. Each link is consecutive appearances for a given
character. Links are an object with source
and target
properties which
are both appearance objects.
narrative.links = function() {
return links;
};
narrative.link()
Returns a function for generating path strings for links.
Links are objects with source
and target
properties which each contain
an x
and y
property. In the context of the narrative chart these are
either character apperance or introduction nodes.
narrative.link = function() {
var curvature = 0.5;
link([object])
This function should be used to set the path
attribute of links when
displaying the narrative chart. It accepts an object and returns a path
string linking the two.
function link(d) {
var x0,x1,y0,y1,cx0,cy0,cx1,cy1,ci;
Set path end positions.
x0 = (d.source.scene) ? d.source.scene.x + d.source.x : d.source.x;
y0 = (d.source.scene) ? d.source.scene.y + d.source.y : d.source.y;
x1 = (d.target.scene) ? d.target.scene.x + d.target.x : d.target.x;
y1 = (d.target.scene) ? d.target.scene.y + d.target.y : d.target.y;
Set control points.
if (orientation === 'vertical') {
ci = d3.interpolateNumber(y0, y1);
cx0 = x0;
cy0 = ci(curvature);
cx1 = x1;
cy1 = ci(1-curvature);
} else {
ci = d3.interpolateNumber(x0, x1);
cx0 = ci(curvature);
cy0 = y0;
cx1 = ci(1-curvature);
cy1 = y1;
}
return "M" + x0 + "," + y0 +
"C" + cx0 + "," + cy0 +
" " + cx1 + "," + cy1 +
" " + x1 + "," + y1;
}
link.curvature([number])
Set or get the curvature which should be used to generate links. Should be in the range zero to one.
link.curvature = function(_) {
if (!arguments.length) {
return curvature;
}
curvature = _;
return link;
};
return link;
};
narrative.introductions()
Get an array of character introductions for plotting on the graph. Introductions are nodes (usually with labels) displayed before the first scene in which each character appears.
narrative.introductions = function() {
return introductions;
};
narrative.layout()
Compute the narrative layout. This should be called after all options and data have been set and before attempting to use the layout’s output for display purposes.
narrative.layout = function() {
computeSceneCharacters();
computeCharacterGroups();
setSceneGroups();
computeGroupAppearances();
sortGroups();
computeGroupPositions();
computeCharacterGroupPositions();
sortGroupAppearances();
computeSceneTiming();
computeAppearancePositions();
computeScenePositions();
createIntroductionNodes();
computeIntroductionPositions();
createLinks();
return narrative;
};
Return the public API.
return narrative;
Populate the scenes with characters from the characters array. This method also cleanses the data to exclude characters which appear only once and scenes with fewer than two characters.
function computeSceneCharacters() {
var appearances, finished;
Create a map of scenes to characters (i.e. appearances).
appearances = [];
scenes.forEach(function(scene){
scene.characters.forEach(function(character) {
If the character isn’t an object assume it’s an index from the characters array.
character = (typeof character === 'object') ? character : characters[character];
Note forced character positions and sizes.
character._x = character.x || false;
character._y = character.y || false;
character._width = character.width || false;
character._height = character.height || false;
Add this appearance to the map.
appearances.push({character: character, scene: scene});
Setup some properties on the character and scene that we’ll need later.
scene.appearances = [];
scene.bounds = getSceneBounds;
character.appearances = [];
});
note forces scene positions.
scene._x = scene.x || false;
scene._y = scene.y || false;
});
Recursively filter appearances so we ultimately only include characters with more than a single appearance and scenes with more than a single character.
while(!finished) {
finished = true;
appearances = appearances.filter(filterAppearances);
}
Filter appearances.
TODO: this could probably be more efficient (maybe with an index https://gist.github.com/AshKyd/adc7fb024787bd543fc5)
function filterAppearances(appearance){
var counts, keep;
counts = appearances.reduce(function(c, a){
if (appearance.character === a.character) {
c[0]++;
}
if (appearance.scene === a.scene) {
c[1]++;
}
return c;
}, [0,0]);
keep = counts[0] >= 1 && counts[1] >= 1;
finished = finished && keep;
return keep;
}
Re-construct characters
and scenes
arrays with filtered appearances.
characters = [];
scenes = [];
appearances.forEach(function(appearance){
Cross reference scenes and characters based on appearances.
appearance.scene.appearances.push(appearance);
appearance.character.appearances.push(appearance);
if (characters.indexOf(appearance.character) === -1) {
characters.push(appearance.character);
}
if (scenes.indexOf(appearance.scene) === -1) {
scenes.push(appearance.scene);
}
});
}
Cluster characters based on their co-occurence in scenes
function computeCharacterGroups() {
var nodes, edges, clusters, partitioner, groupsMap, initGroups;
An array of character indexes.
nodes = characters.map(function(d,i){return i;});
initGroups = characters.reduce(function(g,d,i){
if (d.initialgroup) {
g[i] = +d.initialgroup;
}
return g;
},{});
Calculate the edges based on a character’s involvement in scenes.
edges = [];
scenes.forEach(function(scene){
edges = edges.concat(sceneEdges(scene.appearances));
});
Consolidate edges into a unique set of relationships with a weighting based on how often they appear together.
edges = edges.reduce(function(result, edge) {
var resultEdge;
resultEdge = result.filter(function(resultEdge){
return (resultEdge.target === edge[0] || resultEdge.target === edge[1]) &&
(resultEdge.source === edge[0] || resultEdge.source === edge[1]);
})[0] || {source: edge[0], target: edge[1], weight: 0};
resultEdge.weight++;
if (resultEdge.weight === 1) {
result.push(resultEdge);
}
return result;
}, []);
Generate the groups.
partitioner = jLouvain().nodes(nodes).edges(edges);
if (initGroups) {
partitioner.partition_init(initGroups);
}
clusters = partitioner();
Put all characters in groups with bi-directional reference.
groups = [];
groupsMap = {};
characters.forEach(function(character, i){
var groupId, group;
groupId = clusters[i];
group = groupsMap[groupId];
if (!group) {
group = {id: groupId, characters: []};
groups.push(group);
groupsMap[groupId] = group;
}
group.characters.push(character);
character.group = group;
});
Creates a single link between each pair of characters in a scene.
function sceneEdges(list) {
var i, j, matrix;
matrix = [];
for (i=list.length;i--;){
for (j=i;j--;){
matrix.push([characters.indexOf(list[i].character),characters.indexOf(list[j].character)]);
}
}
return matrix;
}
}
Each scene is assigned to a group based on the median character group for characters appearing in that scene. Note: “median” here is a mistake, it should be mode.
function setSceneGroups() {
scenes.forEach(function(scene){
var groupCounts, groupCountsMap, medianGroup;
groupCounts = [];
groupCountsMap = {};
scene.appearances.forEach(function(appearance){
var count, index;
index = groups.indexOf(appearance.character.group);
count = groupCountsMap[index];
if (!count) {
count = {groupIndex: index, count: 0};
groupCountsMap[index] = count;
groupCounts.push(count);
}
count.count++;
});
groupCounts.sort(function(a,b){
return a.count-b.count;
});
medianGroup = groups[groupCounts.pop().groupIndex];
While we’re here record how many scenes this group is the modal group for.
medianGroup.medianCount = medianGroup.medianCount || 0;
medianGroup.medianCount++;
scene.group = medianGroup;
});
}
Assign unique set of characters to each group based on appearances in scenes belonging to that group.
function computeGroupAppearances() {
scenes.forEach(function(scene){
var characters;
characters = scene.appearances.map(function(a){
return a.character;
});
scene.group.appearances = scene.group.appearances || [];
scene.group.appearances = scene.group.appearances.concat(characters.filter(function(character){
return scene.group.appearances.indexOf(character) === -1;
}));
});
}
Sort the array of groups so groups which are most often the median are at the extremes of the array. The centre most group should be the group which is least often the median group of a scene.
function sortGroups() {
var alt, sortedGroups, group, i;
First sort by the group’s medianCount property (the number of times the group is the median group in a scene).
groups.sort(function(a,b){
return b.medianCount-a.medianCount;
});
Specify order property and shuffle out groups into an ordered array.
sortedGroups = [];
i = 0;
while (groups.length) {
group = (alt) ? groups.pop() : groups.shift();
group.order = i;
i++;
sortedGroups.push(group);
alt = !alt;
}
groups = sortedGroups;
}
Compute the actual min and max y-positions of each group.
function computeGroupPositions() {
var max;
max = 0;
groups.forEach(function(group){
group.min = max;
group.max = max = characterGroupHeight(group.appearances.length) + group.min;
max += groupMargin;
});
}
Compute the position of each character within its group.
function computeCharacterGroupPositions() {
characters.forEach(function(character){
var sum, count;
sum = count = 0;
character.appearances.forEach(function(appearance) {
count++;
sum += groups.indexOf(appearance.scene.group);
});
character.averageScenePosition = sum/count;
});
groups.forEach(function(group){
group.characters.sort(function(a,b){
var diff;
Average scene position.
diff = a.averageScenePosition - b.averageScenePosition;
if (diff !== 0) {
return diff;
}
return characters.indexOf(a)-characters.indexOf(b);
});
});
}
Group appearances (group.appearances
) is an array
of all characters which appear in scenes assigned to this group.
function sortGroupAppearances() {
groups.forEach(function(group){
group.appearances.sort(function(a,b){
var diff;
Try simple group order.
diff = a.group.order-b.group.order;
if (diff !== 0) {
return diff;
}
Average scene position.
diff = a.averageScenePosition - b.averageScenePosition;
if (diff !== 0) {
return diff;
}
Array position.
return characters.indexOf(a)-characters.indexOf(b);
});
});
}
function computeSceneTiming() {
var duration = 1;
scenes.forEach(function(scene){
scene.start = scene.start || duration;
scene.duration = scene.duration || 1;
duration += scene.duration;
});
scale = ((orientation === 'vertical') ? size[1]-labelSize[1] : size[0]-labelSize[0])/duration;
}
Compute the position of characters within a scene.
function computeAppearancePositions() {
scenes.forEach(function(scene){
scene.appearances.sort(function(a,b){
var diff;
Try simple group order.
diff = a.character.group.order-b.character.group.order;
if (diff !== 0) {
return diff;
}
For characters in the same group use average scene position.
diff = a.character.averageScenePosition - b.character.averageScenePosition;
if (diff !== 0) {
return diff;
}
All else failing use main characters array order to keep things consistent.
return characters.indexOf(a.character)-characters.indexOf(b.character);
});
scene.appearances.forEach(function(appearance,i) {
if (orientation === 'vertical') {
appearance.y = scenePadding[0];
appearance.x = characterPosition(i) + scenePadding[3];
} else {
appearance.y = characterPosition(i) + scenePadding[0];
appearance.x = scenePadding[3];
}
});
});
}
Compute the actual x and y positions for each scene.
function computeScenePositions() {
scenes.forEach(function(scene) {
var sum, avg, appearances;
scene.height = characterGroupHeight(scene.appearances.length) + scenePadding[0] + scenePadding[2];
scene.width = scenePadding[1] + scenePadding[3];
appearances = scene.appearances.filter(function(appearance){
return appearance.character.group !== scene.group;
});
if (!appearances.length) {
appearances = scene.appearances;
}
sum = appearances.reduce(function(total, appearance){
return total += characterPosition(scene.group.appearances.indexOf(appearance.character)) + scene.group.min;
}, 0);
avg = sum/appearances.length;
if (orientation === 'vertical') {
scene.x = scene._x || Math.max(0, Math.min(size[0], avg - scene.width/2));
scene.y = scene._y || Math.max(0, Math.min(size[1], scale * scene.start + labelSize[1]));
} else {
scene.x = scene._x || Math.max(0, Math.min(size[0], scale * scene.start + labelSize[0]));
scene.y = scene._y || Math.max(0, Math.min(size[1], avg - scene.height/2));
}
});
}
Create a collection of character ‘introduction’ nodes. These are nodes which are displayed before the first appearance of each character.
function createIntroductionNodes() {
var appearances;
appearances = characters.map(function(character){
return character.appearances[0];
});
introductions = [];
appearances.forEach(function(appearance){
var introduction, x, y;
Create the introduction object.
introduction = {
character: appearance.character,
bounds: getLabelBounds
};
Set the default position.
if (orientation === 'vertical') {
x = appearance.scene.x + appearance.x;
y = appearance.scene.y - 0.5 * scale;
Move x-axis position to the dedicated label space if it makes sense. if (x-labelSize[0] < labelSize[0]) { x = labelSize[0]; }
} else {
x = appearance.scene.x - 0.5 * scale;
y = appearance.scene.y + appearance.y;
Move x-axis position to the dedicated label space if it makes sense.
if (x-labelSize[0] < labelSize[0]) {
x = labelSize[0];
}
}
if (orientation === 'vertical') {
introduction.x = appearance.character._x || Math.max(0 + labelSize[0]/2, Math.min(size[0]-labelSize[0]/2, x));
introduction.y = appearance.character._y || Math.max(0, Math.min(size[1]-labelSize[1], y));
} else {
introduction.x = appearance.character._x || Math.max(0, Math.min(size[0]-labelSize[0], x));
introduction.y = appearance.character._y || Math.max(0 + labelSize[1]/2, Math.min(size[1]-labelSize[1]/2, y));
}
introduction.width = appearance.character._width || labelSize[0];
introduction.height = appearance.character._height || labelSize[1];
appearance.character.introduction = introduction;
introductions.push(introduction);
});
}
Layout the introduction nodes so that wherever possible they don’t overlap scenes or each other.
function computeIntroductionPositions() {
var collidables, intros;
Get a list of things introductions can collide with.
collidables = introductions.concat(scenes);
Use a copy of the introductions array so we can sort it without changing the main array’s order.
intros = introductions.slice();
Sort by y-axis position top to bottom.
intros.sort(function(a,b){
return a.y-b.y;
});
Attempt to resolve collisions.
intros.forEach((orientation === 'vertical') ? resolveCollisionsVertical : resolveCollisionsHorizontal);
Resolve collisions with horizontal layout.
function resolveCollisionsHorizontal(introduction){
var moveOptions, collisionBounds, introBounds, move, _y, collisions, movable;
Get the full list of items this introduction collides with
collisions = collidesWith(introduction);
No need to continue if there are no collisions.
if (!collisions){
return;
}
Move colliding items out of the way if possible.
movable = collisions.filter(function(collision){ return (collision.character); });
movable.forEach(moveCollision);
Now only consider immovables (i.e. scene nodes).
collisions = collisions.filter(function(collision){ return !(collision.character); });
No need to continue if there are no collisions.
if (!collisions){
return;
}
Get a bounding box for all remaining colliding nodes.
collisionBounds = bBox(collisions);
introBounds = introduction.bounds();
Record the original y-axis position so we can revert if a move is a failure.
_y = introduction.y;
Calculate the two move options (up or down).
moveOptions = [collisionBounds[1][1] - introBounds[0][1], collisionBounds[0][1] - introBounds[1][1]];
Sort by absolute distance. Try the smallest move first.
moveOptions.sort(function(a,b){
return Math.abs(a)-Math.abs(b);
});
Try the move options in turn.
while (move = moveOptions.shift()) {
introduction.y += move;
collisions = collidesWith(introduction);
if (collisions) {
if (move > 0 && collisions.every(isMovable)) {
collisions.forEach(moveCollision);
break;
} else {
introduction.y = _y;
}
} else {
break;
}
}
Move the colliding nodes.
function moveCollision(collision) {
collision.y += introduction.bounds()[1][1] - collision.bounds()[0][1];
}
}
Resolve collisions with vertical layout.
function resolveCollisionsVertical(introduction){
var moveOptions, collisionBounds, introBounds, move, _y, collisions, movable;
Get the full list of items this introduction collides with
collisions = collidesWith(introduction);
No need to continue if there are no collisions.
if (!collisions){
return;
}
Move colliding items out of the way if possible.
movable = collisions.filter(function(collision){ return (collision.character); });
movable.forEach(moveCollision);
Now only consider immovables (i.e. scene nodes).
collisions = collisions.filter(function(collision){ return !(collision.character); });
No need to continue if there are no collisions.
if (!collisions){
return;
}
Get a bounding box for all remaining colliding nodes.
collisionBounds = bBox(collisions);
introBounds = introduction.bounds();
Record the original y-axis position so we can revert if a move is a failure.
_y = introduction.y;
Calculate the two move options (up or down).
moveOptions = [collisionBounds[1][1] - introBounds[0][1], collisionBounds[0][1] - introBounds[1][1]];
Sort by absolute distance. Try the smallest move first.
moveOptions.sort(function(a,b){
return Math.abs(a)-Math.abs(b);
});
Try the move options in turn.
while (move = moveOptions.shift()) {
introduction.y += move;
collisions = collidesWith(introduction);
if (collisions) {
if (move > 0 && collisions.every(isMovable)) {
collisions.forEach(moveCollision);
break;
} else {
introduction.y = _y;
}
} else {
break;
}
}
Move the colliding nodes.
function moveCollision(collision) {
collision.y += introduction.bounds()[1][1] - collision.bounds()[0][1];
}
}
Is the supplied node movable?
function isMovable(collision) {
return (collision.character);
}
Create a bounding box around a collection of nodes.
function bBox(arr) {
var x0,x1,y0,y1;
x0 = d3.min(arr, function(d){
return d.bounds()[0][0];
});
x1 = d3.max(arr, function(d) {
return d.bounds()[1][0];
});
y0 = d3.min(arr, function(d){
return d.bounds()[0][1];
});
y1 = d3.max(arr, function(d) {
return d.bounds()[1][1];
});
return [[x0,y0],[x1,y1]];
}
Gets a list of all other nodes that this introduction collides with.
function collidesWith(introduction) {
var i, ii, collisions;
collisions = [];
for (i=0,ii=collidables.length;i<ii;i++) {
if (introduction !== collidables[i] && collides(introduction.bounds(), collidables[i].bounds())) {
collisions.push(collidables[i]);
}
}
return (collisions.length) ? collisions : false;
}
Check for overlap between two bounding boxes.
function collides(a,b) {
return !(
Verticals.
a[1][0] <= b[0][0] ||
b[1][0] <= a[0][0] ||
Horizontals.
a[1][1] <= b[0][1] ||
b[1][1] <= a[0][1]);
}
}
Create a collection of links between appearances.
function createLinks() {
links = [];
characters.forEach(function(character){
var i;
Links to intro nodes.
links.push({
character: character,
source: character.introduction,
target: character.appearances[0]
});
Standard appearance links.
for (i=1;i<character.appearances.length;i++) {
links.push({
character: character,
source: character.appearances[i-1],
target: character.appearances[i]
});
}
});
}
Get the actual y-axis position of a character with the given (zero based) index.
function characterPosition(index) {
return index * pathSpace + pathSpace / 2;
}
Get the actual height of a group based on a character count.
function characterGroupHeight(count) {
return characterPosition(count) - pathSpace/2;
}
This is attached to all scene objects as scene.bound
and returns the bounds
for the scene node.
function getSceneBounds(){
return [[this.x,this.y],[this.x+this.width,this.y+this.height]];
}
This is attached to all character objects as character.bounds
and returns
the bounds of the character’s introduction label.
function getLabelBounds(){
switch(labelPosition) {
case('left'):
return [[this.x-this.width,this.y-this.height/2],[this.x,this.y+this.height/2]];
case('above'):
return [[this.x-this.width/2,this.y-this.height],[this.x+this.width/2,this.y]];
case('right'):
return [[this.x,this.y-this.height/2],[this.x+this.width,this.y+this.height/2]];
case('below'):
return [[this.x-this.width/2,this.y],[this.x+this.width/2,this.y+this.height]];
}
}
};


HL0014-1.png
Vaccinations
Tambu Sut
Vaksinasi
Las Vacunas
Health
Kesehatan
Salud
The material in this booklet was borrowed with permission from the book
"Yu Tu i Ken Daunim Sik Long Ples"
originally published by Liklik Buk Information Centre
Free Mail Bag
Unitech, LAE
Illustrations adapted by Anis Ka'abu
9980-0-1858-5
http://creativecommons.org/licenses/by-nc/3.0/
Copyright SIL Papua New Guinea 1996
HL0014-1.png
en
The material in this booklet was borrowed with permission from the book
"Yu Tu i Ken Daunim Sik Long Ples"
originally published by Liklik Buk Information Centre
Free Mail Bag
Unitech, LAE
Illustrations adapted by Anis Ka'abu
The material in this booklet was borrowed with permission from the book
"Yu Tu i Ken Daunim Sik Long Ples"
originally published by Liklik Buk Information Centre
Free Mail Bag
Unitech, LAE
Illustrations adapted by Anis Ka'abu
Copyright SIL Papua New Guinea 1996


Patterns & Anomalies
Possisble anomalies in:
cluster6 track number significantly higher than average (152 > 73 )
cluster5 hostiliy higher than average (25% > 18%)
cluster4 avg. track distance higher than average (57Km > 42Km)
cluster2 hostiliy higher than average (25% > 18%)
cluster2 avg. track distance higher than average (72Km > 42Km)


Mark Your Reading
To Continue
To Review
Quick Mark
Labels:
Music
Business
Work
Current
Add
Add to Marker


Class Transaction
LMDB Transaction. A thread can only use one transaction at a time, plus any child transactions. Each transaction belongs to one thread.
Implements
Inherited Members
Namespace: KdSoft.Lmdb
Assembly: KdSoft.Lmdb.dll
Syntax
public class Transaction : IDisposable
Remarks
There can be multiple simultaneously active read-only transactions but only one that can write. Once a single read-write transaction is opened, all further attempts to begin one will block until the first one is committed or aborted. This has no effect on read-only transactions, however, and they may continue to be opened at any time.
Constructors
Transaction(IntPtr, Transaction, Action<IntPtr>)
Constructor.
Declaration
protected Transaction(IntPtr txn, Transaction parent, Action<IntPtr> disposed)
Parameters
| Type | Name | Description |
|---|---|---|
| IntPtr | txn | Native transaction handle. |
| Transaction | parent | Parent transaction. Can be |
| Action<IntPtr> | disposed | Callback when transaction gets disposed. |
Properties
Environment
Environment that owns the transaction.
Declaration
public LmdbEnvironment Environment { get; }
Property Value
| Type | Description |
|---|---|
| LmdbEnvironment |
Id
Transaction Id.
Declaration
public IntPtr Id { get; }
Property Value
| Type | Description |
|---|---|
| IntPtr |
IsDisposed
Returns if Transaction handle is closed/disposed.
Declaration
public bool IsDisposed { get; }
Property Value
| Type | Description |
|---|---|
| Boolean |
Parent
Parent transaction.
Declaration
public Transaction Parent { get; }
Property Value
| Type | Description |
|---|---|
| Transaction |
Methods
Abort()
Abandon all the operations of the transaction instead of saving them. Same as Dispose(). The transaction handle is freed. It and its cursors must not be used again after this call, except with mdb_cursor_renew(). Note: Earlier documentation incorrectly said all cursors would be freed. Only write-transactions free cursors.
Declaration
public void Abort()
CheckDisposed()
Returns Transaction handle. Throws if Transaction handle is already closed/disposed of.
Declaration
protected IntPtr CheckDisposed()
Returns
| Type | Description |
|---|---|
| IntPtr |
Commit()
Commit all the operations of a transaction into the database. The transaction handle is freed. It and its cursors must not be used again after this call, except with mdb_cursor_renew(). Note: Earlier documentation incorrectly said all cursors would be freed. Only write-transactions free cursors.
Declaration
public void Commit()
Committed()
Called at end of commit, at this point the transaction is already closed/disposed.
Declaration
protected virtual void Committed()
Dispose()
Abandon all the operations of the transaction instead of saving them. Same as Abort(). The transaction handle is freed.It and its cursors must not be used again after this call, except with mdb_cursor_renew(). Note: Earlier documentation incorrectly said all cursors would be freed. Only write-transactions free cursors.
Declaration
public void Dispose()
Dispose(Boolean)
Implementation of Dispose() pattern. See Dispose().
Declaration
protected virtual void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| Boolean | disposing |
|
ReleaseManagedResources(Boolean)
Releases/closes managed resources - like cursors - owned by the transaction. Thread-safe. Part of Dispose() pattern.
Declaration
protected virtual void ReleaseManagedResources(bool forCommit = false)
Parameters
| Type | Name | Description |
|---|---|---|
| Boolean | forCommit |
|


--- layout: page title: About header-img: "img/about-bg.png" ---
Lives in Sydney, the heart of Australia


"""implement functions to build, start, stop and clean up containers
"""
import subprocess
from pathlib import Path, PosixPath
from typing import Union
import logging
import time
import uuid
import pandas as pd
from sqlalchemy import create_engine
import docker
from docker.errors import NotFound
CONTAINER_NAMES = {
"hive-metastore": "docker-hive_hive-metastore_1",
"datanode": "docker-hive_datanode_1",
"namenode": "docker-hive_namenode_1",
"hive-server": "docker-hive_hive-server_1",
"presto_coordinator": "docker-hive_presto-coordinator_1",
"hive-metastore-postgresql": "docker-hive_hive-metastore-postgresql_1"
}
LOCAL_FILE_STORE_NODE = "hive-server"
PRESTO_URL = "presto://localhost:8080"
[docs]class Container:
"""contains method to control and examine hive/presto container used for test
"""
def __init__(self, docker_folder: Union[PosixPath, str]):
self.docker_folder = Path(docker_folder).resolve()
self.client = docker.from_env()
self.api_client = docker.APIClient()
[docs] def start(self, until_started=True):
"""start docker containers.
:return: None
"""
command = "docker-compose up -d"
process = subprocess.Popen(command, cwd=self.docker_folder, shell=True, stdout=subprocess.PIPE)
process.wait()
if until_started:
maximum_wait = 40
sleep = 3
while maximum_wait >= 0 and not self.is_healthy():
time.sleep(sleep)
maximum_wait -= sleep
if maximum_wait < 0 and not self.is_healthy():
raise RuntimeError("docker is not started in time")
[docs] def stop(self):
"""stop containers
:return:
"""
command = f"docker-compose stop"
process = subprocess.Popen(command, cwd=self.docker_folder, shell=True, stdout=subprocess.PIPE)
process.wait()
[docs] def is_started(self) -> bool:
"""check if container has properly started.
:return:
"""
for component, name in CONTAINER_NAMES.items():
container = self.client.containers.get(name)
if container.status != "running":
logging.debug(f"[{component}] {name} is not running")
return False
return True
[docs] def is_healthy(self) -> bool:
"""check if container is healthy. if exited containers are contained not healthy. if health condition is not
configured, the container is considered healthy. A healthy container is read to take request such as presto
queries.
:return: whether container is healthy or not.
"""
if not self.is_started():
return False
for component, name in CONTAINER_NAMES.items():
# Get health info. if container not up. return empty dict
state = self.api_client.inspect_container(name)["State"]
if "Health" in state:
status = state["Health"]["Status"]
if status != "healthy":
logging.debug(f"[{component} {name} is not healthy. got {status}")
return False
return True
[docs] def is_presto_started(self) -> bool:
"""examine if presto server has properly started. This will try 5 times before determining that the server
cannot be connected. It will sleep 5 seconds between retries.
:return: whether presto server is started.
"""
presto_client = create_engine(PRESTO_URL, connect_args={"protocol": "http"})
attempts = 5
sleep = 5
while attempts > 0:
try:
with presto_client.connect() as con:
pd.read_sql("SELECT * FROM system.runtime.nodes LIMIT 1", con=con)
return True
except:
attempts -= 1
time.sleep(sleep)
return False
[docs] def reset(self, allow_table_modification=False, autostart=False, until_started=False):
"""remove created container. This will clear all data and metastore and restore the container to factory state.
:param allow_table_modification: reset and allow presto connector to modify hive tables
:param autostart: restart container after reset
:param until_started: wait until completed restarted. if True, container will be force autostarted.
:return: None
"""
self.stop()
# start reset container
for name, container in CONTAINER_NAMES.items():
try:
container = self.client.containers.get(container)
logging.debug(f"removing container {container} ({container.id})")
self.api_client.remove_container(container.id)
except NotFound:
continue
if until_started:
# force autostart if requested to complete start
autostart = True
if allow_table_modification:
self.start()
self.enable_table_modification()
# table access require docker restart
self.stop()
if autostart:
self.start(until_started)
[docs] def copy_from_local(self, from_local: Union[PosixPath, str], to_container: Union[PosixPath, str],
container_name: str=CONTAINER_NAMES[LOCAL_FILE_STORE_NODE]):
"""copy folder or file from host to container
:param from_local: target folder or file to be copied.
:param to_container: container path where the folder or file will be copied to.
:param container_name: name of the container containing the target file `to_container`
:return: None
"""
command = f"docker cp {from_local} {container_name}:{to_container}"
self.execute_command(command)
[docs] def download_from_container(self, from_container, to_local,
container_name: str=CONTAINER_NAMES[LOCAL_FILE_STORE_NODE]):
"""download target folder or file to host
:param from_container: target folder or file to be downloaded to host.
:param to_local: location on host.
:param container_name: name of the container containing the target file `from_container`
:return: None
"""
command = f"docker cp {container_name}:{from_container} {to_local}"
self.execute_command(command)
[docs] def delete(self, target, container_name: str=CONTAINER_NAMES[LOCAL_FILE_STORE_NODE]):
"""call rm -rf command on `target` inside datanode container
:param target: target folder or file
:param container_name: name of the container containing the target file
:return: None
"""
command = f"docker exec {container_name} rm -rf {target}"
self.execute_command(command)
[docs] def execute_command(self, command, exception=RuntimeError):
"""execute a command as subprocess, raise specific type of exception if any error occurs.
:param command: a string of terminal command
:param exception: type of exception raised when any error happends.
:return: None
"""
process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
process.wait()
res = process.communicate()
stdout, stderr = res[0].decode('ascii'), res[1].decode('ascii')
if stderr != '' or 'permission denied' in stdout.lower():
raise exception(f"STDOUT: {stdout}. STDERR: {stderr}")
return stdout
[docs] def upload_temp_table_file(self, local_file, container_name: str=CONTAINER_NAMES[LOCAL_FILE_STORE_NODE]):
"""return a context manager to upload the file to a temp file in container. See `TempContainerFile` for details
:example:
>>> with self.upload_temp_table_file('local_file', 'target_container') as f:
... # do something with f where f is the temporary file name in the container.
"""
return TempContainerFile(self, local_file, container_name)
[docs] def append_file(self, container_name, file, text, skip_if_exists=True, user='root', from_new_line=True):
"""append a line to target `file` in target `container_name`. You can choose to skip (by default) if the text
already exists in target file. you may change user in the docker by specifying `user`. If `from_new_line` is
True, the text will always be appended in a new line. otherwise directly appended at EOF.
:param container_name: name of the container the target file is contained in.
:param file: target file in the container.
:param text: content to append.
:param skip_if_exists: if text already exists in file, do not append duplicate. the checking will strip white
space.
:param user: user used to execute the operation. e.g. 'root', '1000'
:param from_new_line: if True, the text will always be appended from a new line.
:return: None
"""
if skip_if_exists:
command_check_if_exists = f"""docker exec -u 1000 -t {container_name} grep "{text.strip()}" {file}"""
result = self.execute_command(command_check_if_exists)
if result != '':
return
line_break = "\n" if from_new_line else ""
command_append = f"""docker exec -u {user} -t {container_name} bash -c 'echo \"{line_break}{text}\" >> {file}'"""
self.execute_command(command_append)
[docs] def enable_table_modification(self):
"""edit hive.properties file in presto connector server so that hive table can be modified in presto.
note that this may fail if presto server version changes
:return: None
"""
properties = [
"hive.allow-drop-table=true",
"hive.allow-rename-table=true",
"hive.allow-add-column=true"
]
catalog_path = "/opt/presto-server-0.181/etc/catalog/hive.properties"
for property in properties:
self.append_file(container_name=CONTAINER_NAMES["presto_coordinator"],
file=catalog_path,
text=property,
user='root',
from_new_line=False)
[docs]class TempContainerFile:
"""a context manager class used to upload file to temporary file in target container. You need to pass a Container
object and target `container_name`. The temporary file will be removed at exit. Note that the temporary file in
target container will have the same permission as `local_file`.
"""
def __init__(self, container: Container, local_file: Union[PosixPath, str],
container_name: str=CONTAINER_NAMES[LOCAL_FILE_STORE_NODE]):
self.container = container
self.container_name = container_name
self.local_file = local_file
self.temp_file = None
def __enter__(self):
self.temp_file = Path("/tmp") / str(uuid.uuid4())
self.container.copy_from_local(self.local_file, self.temp_file, self.container_name)
return self.temp_file
def __exit__(self, exc_type, exc_val, exc_tb):
self.container.delete(self.temp_file, self.container_name)


Home
Sales
Questionaire
Merch
Salmon Cookies
All About the Cookies
All shops are open from 9:00AM to 5:00PM
Each cookie is made with swag
Free Cookies for kids on Tuesdays!
Don't be shy stop on by!!


You may want to execute some JavaScript when an inline form is added or removed
in the admin change form. The formset:added
and formset:removed
jQuery
events allow this. The event handler is passed three arguments:
event
is the jQuery
event.$row
is the newly added (or removed) row.formsetName
is the formset the row belongs to.The event is fired using the django.jQuery namespace.
In your custom change_form.html
template, extend the
admin_change_form_document_ready
block and add the event listener code:
{% extends 'admin/change_form.html' %}
{% load static %}
{% block admin_change_form_document_ready %}
{{ block.super }}
<script type="text/javascript" src="{% static 'app/formset_handlers.js' %}"></script>
{% endblock %}
(function($) {
$(document).on('formset:added', function(event, $row, formsetName) {
if (formsetName == 'author_set') {
// Do something
}
});
$(document).on('formset:removed', function(event, $row, formsetName) {
// Row removed
});
})(django.jQuery);
Two points to keep in mind:
admin/change_form.html
or it won’t be rendered in the final HTML.{{ block.super }}
is added because Django’s
admin_change_form_document_ready
block contains JavaScript code to handle
various operations in the change form and we need that to be rendered too.Sometimes you’ll need to work with jQuery
plugins that are not registered
in the django.jQuery
namespace. To do that, simply change how the code
listens for events. Instead of wrapping the listener in the django.jQuery
namespace, just listen to the event triggered from there. For example:
{% extends 'admin/change_form.html' %}
{% load static %}
{% block admin_change_form_document_ready %}
{{ block.super }}
<script type="text/javascript" src="{% static 'app/unregistered_handlers.js' %}"></script>
{% endblock %}
django.jQuery(document).on('formset:added', function(event, $row, formsetName) {
// Row added
});
django.jQuery(document).on('formset:removed', function(event, $row, formsetName) {
// Row removed
});
Oct 01, 2019


Xolotl (pronounced "szho-low-till") is a recombinant pattern generator where
rhythm, pitch, velocity, duration and controller patterns are specified separately.
If these patterns have the same length they combine in the same order on each iteration.
If they have differing lengths they recombine into different combinations on each iteration.
For example if the rhythm pattern is "Q E E" (A quarter note followed by two eighth notes)
and the pitch pattern is a four note C major arpeggio "C0 E0 G0 C1" the interaction between
rhythm and pitch is:
Q E E C0 E0 G0 iteration 0 Q E E C1 C0 E0 iteration 1 Q E E G0 C1 C0 iteration 2 Q E E E0 G0 C1 iteration 3There are two independent sequences (A and B) with separate MIDI channels, rhythm, hold,
The two sequences A and B share a common clock.
By default this is a global internal clock. Provisions for
an external MIDI clock are provided but have not been
tested. One caveat, when using an external clock, you
must tell Xolotl what the tempo is. The clock resolution is
24 ticks per quarter note.
Tempo may be set between 20 and 300 BPM
Each instance of Xolotl contains two independent sequences:
A and B. With exception of the clock source, tempo and
current program, these two sequences are completely independent.
The parameters for A and B are nearly identical.
The only exception is that sequence A has parameters
related to jumping to another Xolotl program after a
predetermined number of iterations.
Each sequence has independent MIDI input and output channels.
MIDI input is used for three purposes:
A and B may have different input channels. Program changes on either input channel will change the program for both A and B.
MIDI output channel sets the channel on which the sequence transmits events.
The input and output channels should not be the
same as this may set up a feedback situation. A small warning message
appears whenever the input and output channels are identical.
This value should not be confused with the Xolotl
program number. Briefly the Xolotl program number sets the
current configuration of Xolotl. This value causes a program
change event to be transmitted to select a synth patch.
The rhythm pattern defines the rhythmic motif and is the
master sequence pattern. The rhythm editor shares common
features with the hold, pitch, velocity, and controller editor.
The general rules are:
Rhythm values are based on a clock resolution of 24 beats
per quarter note. A quarter note followed by two eighth notes
is specified either numerically by '24 12 12' or symbolically
by "Q E E".
The following rhythmic values are recognized:
The two controls immediately below Sequence A rhythm pattern set
iteration count and jump location.
If the jump location is greater then -1
then after the indicated repetitions of the rhythm pattern Xolotl
jumps to the indicated program.
The hold pattern determines how each note is articulated. A hold value of 1.00 gives a note it's entire duration. Values greater then 1.0 cause notes to sustain over succeeding notes. Hold values less then 1.0 produce a staccato effect.
In the example the single 'Q' rhythm pattern produces an endless stream of quarter notes. The hold pattern of '1.00 0.5' causes alternate notes to be shortened by 50%
Pitches are specified as MIDI key number offsets and may be expressed numerically or symbolically. The reference pitch is derived form the transpose value and/or external MIDI key events with the default being 60 (middle C).
Pitch values have a range between ±48. Symbolic pitch names have
the form 'PO' or 'PMO' where:
Rest have a value of -1000 and are indicated by 'R'
Chords are produced by enclosing notes in square brackets.
The pattern 'C0 E0 G0 [A0 C1 E1]' produces a 3 note c-major arpeggio
followed by an a-minor chord. The controls to the left of the pitch
editor allow chords to be strummed. The delay time is in milliseconds and
the four radio buttons select how notes are selected. The strum modes
are:
The illustration shows a 3 element rhythm pattern 'Q E E' and a four element pitch pattern 'C0 E0 G0 C1', these combine to produce a 12-note pattern.
There are three different methods for selecting pitches
There is a bug which causes repeated notes to not be articulated correctly. As a fix Xolotl attempts to shift repeated notes by an octave. This is not 100% effective as notes within a chord are not detected. Another situation which is not detected is when both sequence A and B are transmitting on the same channel and produce the same note.
The velocity and controller patterns are similar to the hold pattern
except are specified as integers between 0 and 127 inclusive. The velocity
pattern has the same selection options as the pitch pattern. The two
controls below the controller pattern editors select the MIDI controller
number. A value of -1 turns the controller off.
A Shift
Register is a device composed of a number of memory cells connected in
series.
Each cell holds either a 0 or 1 and upon reception of a clock pulse the cell contents
are shifted into the cell to the right. The
illustration below shows a simple 4 bit shift register.
Periodically a '1' is inserted into the left most cell which then propagates through the
remaining cells.
Shift registers have both serial and parallel aspects. Bits are shifted serially through the
array and may be picked up or 'tapped' at any point along the register. Alternately the cells
may be read in parallel to form a single value. An n-bit register may have values up to 2(n-1).
The number on the right shows the parallel value of the register.
The initial register value is called the 'seed' and in the following illustrations the seed is 1
for the first cell and 0 for all other cells. If the final cell is tapped and fed back to the initial
cell the register is made to endlessly cycle through a series of values based on the initial seed.
Things get interesting when more then one feedback tap is used. Many different schemes may
be employed to derive the feedback signal. The rule used by Xolotl is to first count the number
of feedback taps which are 1. If this sum is odd the feedback value is 1, if the sum is even the
feedback is 0. The next animation shows a shift register with feedback from taps 3 and 4.
This combination produces a sequence of 15 values, or has a period of 15.
[1000] 1 [0100] 2 [0010] 4 [1001] 9 [1100] 3 [0110] 6 [1011] 13 [0101] 10 [1010] 5 [1101] 11 [1110] 7 [1111] 15 [0111] 14 [0011] 12 [0001] 8
In general an n-length shift register with linear feedback has a maximum period of 2n. Most tap
combinations do not produce a maximum period. In order to produce the maximum period it is
necessary, but not sufficient, that the tap positions are relatively prime. In a music context however
shorter periods are often more desirable then longer ones, which tend to sound random.
The Xolotl shift-register has a maximum length of 12 bits and has three sets of controls.
The tap and seed buttons do pretty much what you expect. The mask buttons selects which stages
contribute to the register's value. They may be used to shorten the register by selecting all
buttons up to the desired length and unselecting all buttons above the length.
The inject button forms part of the feedback signal. If selected inject adds 1 to the feedback count.
This not only alters the generated pattern but it also ensures the register never freezes by entering
an all-zero state.
The Pattern? button is informational only. Clicking it causes the register to cycle through a complete
period with output sent to the terminal. Pattern? does change the registers state so it may be desirable to click
Reset after clicking Pattern?.
The output of the shift-register is not used directly as it will typically have a greater range then the number of
elements to be selected. Instead what happens is the register values is taken modulo to the length of the pattern it
is being applied to.
The Xolotl program bank stores up to 128 sequencer
configurations and may be saved to an external file.
The three components below the program list are for storing
the current program into the bank. The spinner selects
the destination slot number between 0 and 127.


I am recent graduate of the Full-Stack Flex boot as taught by the Georgia
Institute of Technology. Although I did not have prior experience in web
development, I am a highly motivated individual as well as a naturally
adept problem-solver; these qualities account for two very important
characteristics of any qualified candidate, but are especially
critical for a web developer. As a former Hospitality professional,
I'll use my leadership skills and keen eye for detail to transition
into the dynamic field of
Full Stack Web Development.