This analysis was conducted on passengers traveling aboard the Titanic during its maiden voyage in April 1912. The key objective was to identify any possible variables that may have had an impact on survival.
Multiple variables were found to be associated with survival aboard the titanic, notably sex, age, and class. The analysis identified that women and children traveling in either 1st or 2nd class were the most likely to survive. Adult men and 3rd class passengers of all ages and sexes were the least likely to survive.
The results found within the Discussion section below represent a subset of the complete analysis. Additional details on how the data was prepared and a more comprehensive investigation of individual variables can be found in Appendix A and Appendix B.
Please note that this analysis was performed as an academic exercise and additional analysis is required to draw any truly meaningful conclusions. This study did not include an inferential investigation, nor did it explore causality though experimentation.
This analysis was conducted on a retrospective study of 891 Titanic passengers. The data was provided from Kaggle as part of the Udacity Nanodegree Program. The purpose of this investigation is to identify correlations in the data related to life and death aboard the Titanic. Specifically, whether sex, age, or money influenced survival on the Titanic.
%pylab inline
import numpy as np
import pandas as pd
import seaborn as sns
from dataworkflow.data import get_data
from dataworkflow.visualize import (freq1_display, freq2_display, freq3_display, freq4_display,
freq1_store, freq2_store, freq3_store, freq4_store,
ez_bar, ez_graph1, ez_graph2, ez_graph3)
titanic = get_data()
sex_a = freq2_store(titanic['Sex'], titanic['age_group'])
sex_tab1 = sex_a[2].ix[['female', 'male'],['Child','Adult','RowTotals']]
sex_tab1.index = ['Female', 'Male']
sex_tab1.columns = ['Child','Adult','Population']
sex_tab1
sex_tab2 = sex_a[1].ix[['female', 'male', 'Totals'], ['Child', 'Adult', 'Unknown']]
sex_tab2.index = ['Female', 'Male', 'Population']
sex_tab2.columns = ['Child', 'Adult', 'Age Unknown']
sex_tab2.transpose()
Figure 1a: (1) Frequency table depicting the percentages of males and females within each age group (Child < 18, Adult => 18), as well as the general population. (2) Frequency table depicting the percentage of children and adults within each of the passenger sexes. The overall percentage of adults and children in the population has also been included for comparison.
Note: The ship's population consisted of 65% male and 35% female passengers. Male passengers also made up the majority of both adults (66%) and children (51%). Children made up a larger percentage of female passengers (18%) than male passengers (10%). Each sex had roughly the same percentage of adults – female: 66%, male: 68%.
sex_c = freq2_store(titanic['Sex'],
titanic['Pclass'])[1][['1st','2nd', '3rd']]*100
sex_c.index = ['Female','Male', 'Population']
ez_bar(sex_c, 'Class Distribution', '% of Total')
sex_c.transpose()/100
Figure 1b: Frequency table and bar graph showing how each sex and the overall population were spread across the 3 classes on the Titanic.
Notes: The majority of both sexes traveled in 3rd class, followed by 1st and then 2nd. The same pattern can be seen in the general population as well. Female passengers were fairly evenly spread across class, with the largest portion in 3rd class (45%). Male passengers were more skewed towards 3rd class. In fact, there were more male passengers in 3rd class than both the 1st and 2nd combined.
sex_surv = freq2_store(titanic['Survived'],
titanic['Sex'])[2].ix[['Died', 'Lived']]*100
sex_surv.columns = ['Female', 'Male', 'Population']
ez_bar(sex_surv.transpose(), 'Death & Survival Rates', '% of Total')
sex_surv/100
Figure 1c: Frequency table & bar graph depicting passenger survival & death rates for both sexes and the overall population.
Notes: On whole, female passengers (74%) had more than 3x higher survival rates than male passengers (19%). Roughly, 3/4 of female passengers survived aboard the titanic, compared to only 1/5 of male passengers.
#frq = freq2_store(titanic['Sex'],titanic['Survived'])[2].ix[:-1]
sex_s = freq2_store(titanic['Survived'],
titanic['Sex'])[1][['female','male']]*100
sex_s.index = ['Died', 'Lived', 'Population']
sex_s.columns = ['Female','Male']
ez_bar(sex_s, 'Distribution of Sexes', '% of Total')
sex_s.transpose()/100
Figure 1d: Frequency table & bar graph depicting the percentage of each sex who died, survived, and traveled aboard the Titanic.
Notes: Male passengers represented 65% of passengers aboard the Titanic, and only 32% of the survivors. Female passengers made up 35% of the population, but accounted for 68% of all surviving passengers.
ez_graph1(titanic['Sex'],titanic['Pclass'], titanic['Survived'],'1st', iVals=['Female', 'Male', 'Population'])
ez_graph1(titanic['Sex'],titanic['Pclass'], titanic['Survived'],'2nd', iVals=['Female', 'Male', 'Population'])
ez_graph1(titanic['Sex'],titanic['Pclass'], titanic['Survived'],'3rd', iVals=['Female', 'Male', 'Population'])
Figure 1e: Bar graphs depicting survival rates across each class for the sexes and general population.
Note: Female passengers had the highest survival rates in each class. Male passengers faced low survival rates across all classes, however 1st class male passengers were more than twice as likely to survive compared to those traveling in 2nd or 3rd class. The data on class survival rates for the female population is also very interesting. It shows that female passengers located in the 1st (97%) and 2nd (92%) classes were almost certain to survive, while 3rd class travelers lost 50% of their population. The impact of class on survival will be explored further in Section 3.
Female passengers were found to have higher survival rates across all measured categorizations of the data. Female passengers were also represented in the surviving group at nearly twice the rate they existed in the general population. This evidence strongly suggests that females were more likely than males to survived. Therefore, the conclusion of this analysis is that sex did play a role in survival aboard the Titanic.
sns.boxplot(data=titanic['Age'])
ylabel('Passenger Age')
Figure 2a: Box & whisker plot of Titanic passenger ages.
Notes: The average age of passenger on the titanic was 30. Passenger's ages ranged from just under 6 months to 80 years old.
age_sex = freq2_store(titanic['age_group'],
titanic['Sex'])[2].ix[['Child','Adult','Unknown'],['female','male','RowTotals']]*100
age_sex.index = ['Child', 'Adult', 'Age Unknown']
age_sex.columns = ['Female','Male', 'Population']
ez_bar(age_sex.transpose(), 'Sex Distribution', '% of Total')
age_sex/100
Figure 2b: Stacked bar graph depicting the percentage of each age group across the sexes and general population.
Notes: Adults (18+) made up 67% of the population, children (under 18) made up 13%, and 20% of the passenger's ages were unknown. We know from the previous section that the majority of adults were male (66%) and that children were split more evenly between females (49%) and males (51%).
age_cls = freq2_store(titanic['age_group'],
titanic['Pclass'])[1].ix[[0,1,3],
['1st', '2nd', '3rd']]*100
age_cls.index = ['Child', 'Adult', 'Population']
ez_bar(age_cls, 'Class Distribution', '% of Total')
print('Class Dsitribution')
age_cls.transpose()/100
Figure 2c: Frequency table and stacked bar graph depicting the class distribution of each age group and of the overall population.
Notes: The majority of adults and children traveled in 3rd class. There were more than twice as many children in 3rd class (69%) than in the 1st (11%) and 2nd (20%) classes combined. Adults were distributed across the classes in a pattern similar to the general population, with the majority in 3rd (46%) class followed by 1st (29%) and then 2nd (25%).
age_surv = freq2_store(titanic['Survived'], titanic['age_group'])
pt = age_surv[2].ix[['Died','Lived'],['Child','Adult','RowTotals']]
pt.columns = ['Child', 'Adult', 'Population']
print('Death & Survival Rates')
pt
ag =age_surv[1][['Child', 'Adult', 'Unknown']].transpose()
ag.columns = ['Died','Lived','Population']
print('Age Group Distributions')
ag
Figure 2d: Frequency tables depicting (1) death and survival rates for each age group and (2) distribution of age groups across dead & surviving passengers. Population statistics were added to each table for comparison.
_Notes: On average, children had higher survival rates (54%) than adults (38%). Surviving passengers were made up of 18% children, 67% adults, and 15% of an unknown age. Adults were represented in both the dead and surviving passengers at approximately the same rate as they existed in the general population. (~67%) Children were overrepresented in the surviving group (~5%) and underrepresented in the dead. (~3%)
#create tables
tab = freq3_store(titanic['Survived'],titanic['Pclass'], titanic['age_group'])[1]
tot_by_class = freq2_store(titanic['Survived'], titanic['Pclass'])[2].ix[['Died', 'Lived'],['1st', '2nd', '3rd']]
#1st class
tab_1st = tab['1st'].ix[['Died','Lived'],['Child','Adult']]*100
tab_1st.index.name = None
tab_1st.columns.name = None
tab_1st['Population'] = tot_by_class['1st']*100
#2nd class
tab_2nd = tab['2nd'].ix[['Died','Lived'],['Child','Adult']]*100
tab_2nd.index.name = None
tab_2nd.columns.name = None
tab_2nd['Population'] = tot_by_class['2nd']*100
#3rd class
tab_3rd = tab['3rd'].ix[['Died','Lived'],['Child','Adult']]*100
tab_3rd.index.name = None
tab_3rd.columns.name = None
tab_3rd['Population'] = tot_by_class['3rd']*100
#stacked bar graphs
ez_bar(tab_1st.transpose(), '1st Class Death & Survival Rates', '% of Total')
ez_bar(tab_2nd.transpose(), '2nd Class Death & Survival Rates', '% of Total')
ez_bar(tab_3rd.transpose(), '3rd Class Death & Survival Rates', '% of Total')
Figure 2e: Stacked bar graphs displaying death and survival rates by class for each age group and population.
Notes: Children had the highest rates of survival in each class. The largest gap in survival statistics between age groups was found in the upper classes, where adults were more than 4 times as likely to die. The lowest rates of survival for both adults and children existed in 3rd class. Interestingly, the same pattern emerges for children as seen previously with female passengers. Children traveling in the upper classes had a ~91% rate of survival, while those traveling in 3rd class experienced a significantly lower survival rate of 37%. The impact of class will be explored further in section 3.
age_sex_surv = freq3_store(titanic['Survived'],
titanic['age_group'], titanic['Sex'])
fem_ch = age_sex_surv[1]['Child'].ix[['Died', 'Lived'], ['female']]
fem_a = age_sex_surv[1]['Adult'].ix[['Died', 'Lived'], ['female']]
fem_total = freq2_store(titanic['Survived'],
titanic['Sex'])[2].ix[['Died', 'Lived'], ['female']]
fem_surv = pd.concat([fem_ch, fem_a, fem_total], axis=1)*100
fem_surv.columns = ['Child', 'Adult', 'Population']
fem_surv.index.name = None
ez_bar(fem_surv.transpose(), 'Female Death & Survival Rates', '% of Total')
'----------------------------------------------'
male_ch = age_sex_surv[1]['Child'].ix[['Died', 'Lived'], ['male']]
male_a = age_sex_surv[1]['Adult'].ix[['Died', 'Lived'], ['male']]
male_total = freq2_store(titanic['Survived'],
titanic['Sex'])[2].ix[['Died', 'Lived'], ['male']]
mal_surv = pd.concat([male_ch, male_a, male_total], axis=1)*100
mal_surv.columns = ['Child', 'Adult', 'Population']
mal_surv.index.name = None
ez_bar(mal_surv.transpose(), 'Male Survival & Death Rates', '% of Total')
Figure 2f: Stacked bar graphs depicting male and female survival rates within each age group. The survival & death rates for each population have also been included for comparison.
Notes: The data on the male population shows that children (40%) had higher survival rates than adults (18%), which is consistent with the previous findings in this analysis. Surprisingly, the data from the female population breaks this trend and provides the first example of adults (77%) with higher survival rates than children (69%). This will be explored further below.
data = freq4_store(titanic['Survived'],titanic['Pclass'],titanic['Sex'], titanic['age_group'])[1]
data_totals = freq3_store(titanic['Survived'], titanic['Pclass'], titanic['Sex'])[1]
for sex in ['female', 'male']:
for val in ['1st','2nd','3rd']:
#create data table
table = data[val][sex].ix[['Died', 'Lived'],['Child', 'Adult']]
table['Population'] = data_totals[val][sex]
table.index.name = None
table.columns.name = None
table*100
graph = ez_bar(table.transpose(), '{} Class, {} Death & Survival Rates'.format(val.capitalize(),
sex.capitalize()), '% of Total')
Figure 2g: Bar graphs of death & survival rates for age groups within each class/sex grouping. The death and survival rates for each class/sex population are also included.
Note: The data shows children had the highest rates of survival in each sex/class population, with the exception of 1st class, female passengers. Figure 2f revealed that on average, female adults had higher survival rates than female children. However, we now see that this only occurred within the 1st class population.
The numbers also show that children and adults traveling in 3rd class had the lowest rates of survival, with the exception of adult males. Adult male passengers traveling in 2nd class had lower survival rates than those in 3rd class, which expands on the findings concerning male averages in Figure 1e.
data = freq3_store(titanic['Pclass'],
titanic['Sex'],titanic['age_group'])
counts = data[0]['female'].ix[['1st', '2nd', '3rd', 'All'], ['Child', 'Adult']]
perc = data[1]['female'].ix[['1st', '2nd', '3rd', 'All'], ['Child', 'Adult']]
perc.columns = ['% of Children', '% of Adults']
table = pd.concat((counts['Child'], perc['% of Children'], counts['Adult'], perc['% of Adults']), axis=1)
table.index.name = None
table
fem_data = freq4_store(titanic['Pclass'],
titanic['Sex'], titanic['Survived'],
titanic['age_group'])[0]['female']
child = fem_data['Died']['Child']
child_death = child / table['Child']
adult = fem_data['Died']['Adult']
adult_death = adult / table['Adult']
ftable = pd.concat((child, child_death, adult, adult_death), axis=1)
ftable.columns = ['Child Deaths', 'Death Rate', 'Adult Deaths', 'Death Rate']
ftable
Figure 2h: (1) Frequency table depicting the class distribution of female adults and children. Values have been listed in counts and as a percent of the total. (2) Frequency table depicting the number of dead passengers and overall death rates of female adults and children in each class.
Note: There were almost 4 times as many female adults as children aboard the Titanic. Adult females in first class outnumbered children at nearly 10 to 1. This explains the higher adult female survival rates seen in Figure 2g. With only 8 total female children in first class, a single death dropped the overall survival rate by 13%. While 2 deaths out of 77 total adults decreased the survival rate by only 3%.
Female adults were spread fairly even across each class, while children were primarily located in 3rd class. Females traveling in 3rd class from both age groups experienced the highest death rates by a wide margin. The numbers show that 67% of the overall survival rate for adult females was calculated based on 1st & 2nd class survival rates (+90%), while 63% of the overall children’s survival rate was calculated on 3rd class survival rates (54%). These differences in population distributions and the lopsided survival rates explain why we saw higher survival rates for adult females in Figure 2f._
On average, passengers under the age of 18 were more likely to survive than adults (18+). Children represented 18% of survivors, while only representing 13% of the population. Children experienced higher survival rates across each sub-division of the population, with the exception of one. Upon further examination, the exception can be traced to a small sample size and lurking variable (i.e. class). The conclusion of these findings are that passengers under the age of 18 (i.e. children) were more likely to survive aboard the Titanic.
tab_class = freq1_store(titanic['Pclass'])[1].ix[['1st','2nd','3rd'], ['Count']]
tab_class.index.name = None
print('\n Titanic Class Distribution')
tab_class
Figure 3a: Frequency table displaying percentage of population located within each class.
Note: Passengers aboard the titanic were separated into 3 classes. The majority of passengers traveled in 3rd class (55%) followed by 1st (24%) and 2nd (21%). Previously, we saw that 3rd class also contained the largest proportion of men (60%), women (46%), children (69%) and adults (46%).
graph_data = (freq2_store(titanic['Survived'],titanic['Pclass'])
[1][['1st', '2nd', '3rd']])*100
graph_data.index = ['Died', 'Lived', 'Population']
ez_bar(graph_data, 'Class Distribution', '% of total')
graph_data.transpose()
Figure 3b: Frequency table & bar graph showing class distribution within the dead & surviving populations. The class breakdown for the entire population has been included for comparison.
Note: The majority of passengers who died aboard the titanic were traveling in 3rd class (68%). When comparing the dead & surviving passenger distributions to the population we see that 3rd class passengers accounted for a larger portion of the dead (+13%) and a smaller portion of the living (-20%). 1st and 2nd class followed the exact opposite pattern, accounting for less of the dead (-9%, -3%) and more of the survivors. (+16%, +4%)
tb = freq2_store(titanic['Pclass'],
titanic['Survived'])[1][['Died','Lived']]*100
tb.index = ['1st', '2nd', '3rd', 'Population']
ez_bar(tb,'Death & Survival Rates', '% of total')
tb.transpose()/100
Figure 3c: Frequency table & bar graph depicting death & survival rates for each class and the overall population.
Note: Passengers traveling in 1st class were most likely to survive (63%) and passengers traveling 3rd class were least likely to survive (24%). Death rates for 3rd class passengers (76%) were slightly more than double that of 1st class passengers (37%). A familiar trend appears when comparing class rates against the population, 3rd class passengers have lower survival and higher death rates, while 1st and 2nd class passengers experience the opposite.
ez_graph3(titanic['Survived'],
titanic['age_group'],titanic['Pclass'],
'Child', 'Child Survival & Death Rates')
ez_graph3(titanic['Survived'],
titanic['Sex'],titanic['Pclass'],
'female', 'Female Survival & Death Rates')
ez_graph3(titanic['Survived'],
titanic['age_group'],titanic['Pclass'],
'Adult', 'Adult Survival & Death Rates')
ez_graph3(titanic['Survived'],
titanic['Sex'],titanic['Pclass'],
'male', 'Male Survival & Death Rates')
Figure 3d: Bar graphs depicting death and survival rates across classes within each sex and age group. The population rates for each sex and age group were also added for comparison.
_Note: Again we see that 3rd class passengers experienced the lowest survival rates across each sex and age groups. The largest imblance is found within children, who survived at rates of 92% (1st) and 91%(2nd) in the upper classes and just 37% in 3rd class. A similar trend is seen in the female population, with 1st and 2nd class survival rates of 97% & 92%, respectively, compared to only 50% in 3rd class. Adult data followed suit, with survival rates of 64% in 1st class, 41% in 2nd, and 20% in 3rd. Interestingly, the male passenger data slighty deviated from this pattern. The highest survival rates still belonged to 1st class passengers (37%), however the survival rates for 2nd class (16%) were nearly as low as 3rd class (14%).__
ez_graph2(titanic['Pclass'],
titanic['age_group'], titanic['Survived'],
'Adult', 'Adult Class Distribution')
ez_graph2(titanic['Pclass'],
titanic['age_group'], titanic['Survived'],
'Child', 'Child Class Distribution')
ez_graph2(titanic['Pclass'],
titanic['Sex'], titanic['Survived'],
'male', 'Male Class Distribution')
ez_graph2(titanic['Pclass'],
titanic['Sex'], titanic['Survived'],
'female', 'Female Class Distribution')
Figure 3E: Frequency tables & bar graphs depicting the class distribution of passengers who died, survived, and existed within each sex and age group.
Note: The numbers show the majority of dead passengers from each group were traveling in 3rd class - adults (59%), children (94%), males (64%), females (88%). When comparing these numbers to the population statistics, we see that 3rd class passengers were overrepresented in each case. The most lopsided numbers are found with children, whose 3rd class travelers accounting for 94% of the dead and only 68% of the population.
The data also shows that 1st class passengers made up the largest portion of surviving adults (48%) and females (39%). In both cases, first class passengers appeared at higher percentages than they did in their respective populations. Men on the other hand had nearly as many 1st (41%) and 3rd (43%) class survivors. However, this is misleading as there were nearly 3 times as many male passengers traveling in 3rd class (60%) as there were in 1st (21%). The majority of surviving children were traveling in 2nd (34%) and 3rd (48%) class, but this too is misleading. In comparison to the rate they appeared in the population, both 1st (+7%) and 2nd (+14%) class survivors were overrepresented, while 3rd class (-21%) survivors were underrepresented.
#Death & Survival rates by class for each Sex/Age Group
data = freq4_store(titanic['Survived'],titanic['age_group'],titanic['Sex'],titanic['Pclass'])[1]
data_totals = freq3_store(titanic['Survived'], titanic['age_group'], titanic['Sex'])[1]
for sex in ['female', 'male']:
for val in ['Child', 'Adult']:
#create data table
table = data[val][sex].ix[['Died', 'Lived'],['1st', '2nd', '3rd']]
table['Population'] = data_totals[val][sex]
table.index.name = None
table.columns.name = None
table*100
print ("\n\n {} ({}) Death & Survival Rates \n\n".format(sex.capitalize(),val), table)
Figure 3f: Frequency table of death & survival rates by class for each sex/age group pairing. The death and survival rates for each population is also included for comparison.
Note: The 3rd class passengers from each sex/age grouping experienced higher than average death rates and lower than average survival rates in comparison to their populations. The 1st class passengers from each of these groups experienced the opposite, with below average death rates and above average survival rates.
Upper class (1st & 2nd) passengers experienced the highest survival rates across each sex/age grouping, with the exception of adult males. This is line with our findings from Figure 3d. However, we now see the reason male passengers didn't fit the pattern was due to the high mortality rate of 2nd class, adult males. In fact, this is the only instance where 3rd class passengers had higher survival rates than 2nd class. The effect of this on the overall male population was partially offset by the children, whose survival rates along class lines matched the trend seen in the other population sub-groups.
#Death/Survival Rates Per Sex/Age Group
data = freq4_store(titanic['Pclass'], titanic['Sex'], titanic['age_group'],titanic['Survived'])[1]
totals = freq3_store(titanic['Pclass'], titanic['Sex'], titanic['age_group'])[1]
for sex in ['female', 'male']:
for val in ['Child', 'Adult']:
#create data table
table = data[sex][val].ix[['1st', '2nd', '3rd']]
table['Population'] = totals[sex][val]
table.index.name = None
table.columns.name = None
table*100
print ("\n Class Distribution of {} ({}) Passengers \n\n".format(sex.capitalize(),val), table)
Figure 3G: Frequency tables depicting class distribution of the dead and surviving passengers for each sex/age grouping. The class distribution for each sex/age groups population has also been included for comparison.
Note: Passengers from 3rd class represent a larger portion of the dead and smaller portion of the survivors than they do in their respective populations for each of the sex/age groupings. The most dramatic swing is seen in the adult female population, whose 3rd class passengers accounted for 83% of the dead and only 33% of the population. The data for 1st class passengers in each sex/age group was reversed. They accounted for a smaller percentage of the dead and larger percentage of the survivors than existed in their entire populations. The largest discrepancy was found in adult males, with 51% of the survivors traveling in 1st class compared to only 25% of the overall population.
A clear pattern emerged along class lines when analyzing the data set. In nearly every instance, we saw the highest chances of survival existed in 1st class, followed by 2nd, and then 3rd. We also saw that 1st and 2nd class passengers represented a larger percentage of survivors and a lower percentage of the dead than they did in the population. While the 3rd class passengers experienced the opposite, they were underrepresented in the survivors and overrepresented in the dead compared to their population rates. This data indicates that class played a major role in survival aboard the titanic. The 1st and 2nd classes yielded much higher chances for survival, while traveling in 3rd class resulted in a higher likelihood of death.
While the findings in this study were interesting, additional analysis is required to validate the assumption included in this report. The results will need to be tested for statistical significance and expirementation will be required to confirm which (if any) of the variables identified in this analysis are causal.
There were also limitations in the dataset provided, which may have impacted the outcome. For example, we did not have passenger ages for about 20% of the population. I elected to seperate these passengers into their own category for analysis, but there are alternative approaches for handling these situations and each decision may influence results.
Lastly, the data provided did not include all possible variables surrounding death and survival aboard the titanic. It would have been useful to know details on how the ship sank, where passengers were located at the time of sinking, and whether passengers made it on to a lifeboat, to name a few.
Of the 891 passengers in this dataset, 549 (62%) perished aboard the Titanic. The analysis of this data determined that living and dying was largely dependent on the passengers age, sex, and class. Passengers who were female, under the age of 18, or traveling in 1st class were much more likely to survive than their counterparts. Adult males and passengers traveling in 3rd class were the least likely to survive aboard the Titanic. The next step. required for this analysis is to identify if any of these findings are statistically significant. Any results found to be statistically significant will require further testing/experimentation to assess causation.
path = '/Users/jco/Desktop/data_science/Udacity/project_2/Titanic/train.csv'
titanic = pd.read_csv(path)
Dimension/Type
titanic.shape
titanic.info()
Sample
titanic.head()
Summary Stats
#Numerical Summary
titanic.describe()
#Categorical Summary
cat_data = titanic.dtypes[titanic.dtypes == 'object'].index
titanic[cat_data].describe()
PassangerID
Decision: Delete
titanic['PassengerId'].describe()
Survived
Decision: Modify convert to category, replace nums with text (Died, Lived)
titanic['Survived'].describe()
Pclass
Decision: Modify convert to ordered category, replace nums with text (1st, 2nd, 3rd)
titanic['Pclass'].describe()
Name
Decision: Delete
titanic['Name'].describe()
Sex
Decision: Modify keep values, convert dtype to category
titanic['Sex'].describe()
titanic['Sex'].dtype
Age
Decision: Transform keep current vals, keep missing data empyt for now, Create new variable for Child, Adults(>18), and Unknown
titanic['Age'].describe()
SibSp
Decision: Merge combine with Parch to create new variables identifying passengers traveling with family and how many
titanic['SibSp'].describe()
Parch
Decision: Merge combine with SibSp to create new var identifying passengers w/ fam & count
titanic['Parch'].describe()
Ticket
Decision: Delete
titanic['Ticket'].describe()
titanic['Ticket'].head(15)
Fare
Decision: Keep
titanic['Fare'].describe()
Cabin
Decision: Delete
titanic['Cabin'].describe()
titanic['Cabin'].head(15)
Embarked
Decision: Modify keep values, update dtype to category
titanic['Embarked'].describe()
titanic['Embarked'].dtype
Numerical Category Data
#Survived
new_survived = pd.Categorical(titanic['Survived'])
new_survived = new_survived.rename_categories(['Died', 'Lived'])
new_survived.describe()
#Pclass
new_pclass = pd.Categorical(titanic['Pclass'], ordered=True)
new_pclass = new_pclass.rename_categories(['1st','2nd','3rd'])
new_pclass.describe()
#Replace with categorical data
titanic['Survived'] = new_survived
titanic['Pclass'] = new_pclass
#sanity check
print (titanic['Survived'].dtype, titanic['Pclass'].dtype)
Update dtype
titanic['Sex'] = pd.Series(titanic['Sex'], dtype='category')
titanic['Embarked'] = pd.Series(titanic['Embarked'], dtype='category')
#sanity check
print(titanic['Sex'].dtype, titanic['Embarked'].dtype)
titanic['Sex'].unique()
titanic['Sex'].cat.categories
Create New Variables
#Family Count
titanic['FamilyTot'] = titanic['SibSp'] + titanic['Parch']
#Single or Family Variable
bins = [-1,0,np.inf]
labels = ['Single','Family']
fam_status = pd.cut(titanic['FamilyTot'], bins, labels=labels)
fam_status.describe() #sanity check
#Add FamStatus
titanic['FamStatus'] = fam_status
#Adult (>18) or Child (<18) Var
bins = [0, 17, 1000, np.inf]
labels = ['Child', 'Adult', 'Unknown']
age_groups = pd.cut(titanic['Age'], bins, labels=labels)
age_groups.describe() #sanity check
#Add age_groups
titanic['age_group'] = age_groups
titanic.head() #sanity check
# Remove PassengerId, Name, Ticket, Cabin
titanic.drop(['PassengerId', 'Name', 'Ticket', 'Cabin'], axis=1, inplace=True)
titanic.head() #sanity
This appendix contains the exploration of relationships between different variables. The majority of the analysis was centered on the search for correlations to death and/or survival. The dataworkflow.visualize module contains the majority of the functions used in this section for manipulating and displaying the data.
The majority of functions used for manipulating and displaying data in this analysis were created in the dataworkflow.visualize module.
titanic = get_data()
titanic.head(10) #sanity
Survival
Sex v. Survival
Age_Group v. Survival
Class v. Survival
FamilyStatus v. Survival
Port v. Survival
Fare v. Survival
Class & Sex v. Survival
AgeGroup & Sex v. Survival
Class & AgeGroup v. Survival
Class, AgeGroup, Sex v. Survival
titanic['Survived'].describe()
titanic['Survived'].unique()
freq1_display(titanic['Survived'])
_Survived by Sex__
freq2_display(titanic['Survived'], titanic['Sex'])
Sex & Class
freq2_display(titanic['Sex'], titanic['Pclass'])
Sex & Age Group
freq2_display(titanic['Sex'], titanic['age_group'])
Survived by AgeGroup
freq2_display(titanic['Survived'], titanic['age_group'])
Class & Age Group
freq2_display(titanic['Pclass'], titanic['age_group'])
Survived by Age
lived_age = titanic['Age'][titanic['Survived'] == 'Lived'].reset_index(drop=True)
died_age = titanic['Age'][titanic['Survived'] == 'Died'].reset_index(drop=True)
print('--------Lived------\n', lived_age.describe(), end='\n\n')
print('--------Died--------\n',died_age.describe())
sns.boxplot(data=[lived_age, died_age])
_Survival by Class
freq2_display(titanic['Survived'], titanic['Pclass'])
Survival by FamilyStatus
freq2_display(titanic['Survived'], titanic['FamStatus'])
Survival by Port
freq2_display(titanic['Survived'], titanic['Embarked'])
Survival by Fare
lived_fares = titanic['Fare'][titanic['Survived']=='Lived'].reset_index(drop=True)
died_fares = titanic['Fare'][titanic['Survived']=='Died'].reset_index(drop=True)
print('\n--------------Lived-----------\n', lived_fares.describe())
print('\n--------------Died-------------\n', died_fares.describe())
sns.boxplot(data=[lived_fares, died_fares])
sns.distplot(lived_fares, rug=True)
sns.distplot(died_fares, rug=True)
Survival by Class & Sex
freq3_display(titanic['Survived'],titanic['Pclass'],titanic['Sex'])
Survival by AgeGroup & Sex
freq3_display(titanic['Survived'], titanic['age_group'], titanic['Sex'])
Survival by Class & AgeGroup
freq3_display(titanic['Survived'], titanic['Pclass'], titanic['age_group'])
Survival by Class, Sex, AgeGroup
freq4_display(titanic['Survived'],titanic['Pclass'],titanic['age_group'],titanic['Sex'])
surv_class_sex_age = freq4_store(titanic['Survived'],titanic['Pclass'],titanic['age_group'],titanic['Sex'])
surv_class_sex_age[1]['1st']/surv_class_sex_age[1]['1st'].ix['All']
surv_class_sex_age[1]['2nd']/surv_class_sex_age[1]['2nd'].ix['All']
surv_class_sex_age[1]['3rd']/surv_class_sex_age[1]['3rd'].ix['All']


AG Pullamsetti
Molecular Mechanisms of Pulmonary Vascular Diseases
Diese Informationen sind derzeit nur in englischer Sprache verfügbar.
Prof. Dr. Soni Savai Pullamsetti is a principle investigator at the Max Planck Institute for Heart and Lung Research, Bad Nauheim, and professor at the Department of Internal Medicine, Justus Liebig University Giessen, Germany. Prof. Dr. Pullamsetti received her undergraduate degree from Osmania University, and Master of Science in Biotechnology from Central University, India. After finishing her PhD and postdoctoral work at Justus Liebig University, from 2011, she is appointed as a Principal Investigator in the Department of Lung Development and Remodeling at the Max Planck Institute for Heart and Lung Research in Bad Nauheim. Prof. Dr. Pullamsetti serves as a co-area leader in the “Excellence Cluster for Cardio Pulmonary System (ECCPS II)”, a program committee member of the American Thoracic Society (ATS), and as a project leader and member of German Lung Center (DZL), and collaborative research center on lung diseases (UGMLC). Prof. Dr. Pullamsetti published in well-renowned scientific journals such as Nature Medicine, Science Translational Medicine, Journal of Clinical Investigation, American Journal of Respiratory and Critical Care Medicine, Circulation, International Journal of Cardiology and Molecular Biology of the Cell (Publications list Pullamsetti). She serves as a reviewer for well-renowned scientific journals. Currently she is serving at the editorial board of Scientific Reports and Pulmonary Vascular Research Institute (PVRI).
Scientific Focus
Prof. Dr. Pullamsetti has long standing interest in understanding the molecular mechanisms underlying Pulmonary Hypertension and Pulmonary Fibrosis with the goal of developing novel therapeutic strategies.Understanding the molecular mechanisms underlying Pulmonary Hypertension
Pulmonary Hypertension is a progressive disease of multifactorial etiology, which has a poor prognosis and results in right heart failure. Based on histopathological appearance and treatment modalities, five subclasses of chronic Pulmonary Hypertension have been defined. However, to date, current therapies provide symptomatic relief and improves prognosis, but falls short of re-establishing structural and functional lung vascular integrity, and thus, handicap-free long-term survival. Prof. Dr. Pullamsetti's group contributed to the discovery of tyrosine kinases and phosphodiesterases involvement in the neoplastic nature of the remodeled pulmonary vasculature of Pulmonary Hypertension and parenchymal remodeling underlying Pulmonary Fibrosis. She has studied these signaling pathways in great detail and explored their therapeutic potential for PH treatment successfully and forwarding therapeutic concepts from “Bench to Bedside”. Recently, Prof. Dr. Pullamsetti's group research has focused to delineate the role of central downstream molecules, with a major focus on transcription factors (FoxO, Beta-catenin, HIF) and epigenetic mechanisms to different forms of Pulmonary Hypertension and to develop novel therapeutic strategies to reverse this devastating disease.Specific projects:
Forkhead box O (FoxO) transcription factors role in the pathogenesis of Pulmonary Hypertension and Right Ventricular Remodeling Beta-Catenin role in the pathogenesis of Pulmonary Hypertension and Right Ventricular Remodeling Hippo signaling family: Role and regulation in Pulmonary Hypertension Genome-wide mapping of epigenetic landscape in human Pulmonary Hypertension Role and regulation of class I and IIa HDACs in Pulmonary Hypertension Role of Jumonji domain containing proteins in Pulmonary Hypertension Histological and molecular characterization of distal vascular remodeling in Chronic Thromboembolic Pulmonary Hypertension Understanding the molecular mechanisms underlying Pulmonary Fibrosis Idiopathic Pulmonary Fibrosis (IPF) belongs to the family of Idiopathic Interstitial Pneumonias (IIPs), representing the most aggressive form of a diffuse parenchymal lung disease and affecting up to 500.000 patients in the western world. With the exception of Pirfenidone and Nintedanib, there are currently no approved therapies for IPF, and IPF is still a disease with significant morbidity and mortality. Unraveling the molecular basis behind the remodeling events in the lung parenchyma, resulting in the loss of gas exchange units and the deposition of scar tissue in lung fibrosis, is desirable.
Specific projects:
Forkhead box O (FoxO) transcription factors role in the pathogenesis of Pulmonary Fibrosis Role and regulation of class IIa HDACs in Pulmonary Fibrosisepsum factorial
Epsum factorial nonp quid pro quo hic escorol. Olypian quarrels et gorcongolium onp quid sic ad nauseum. Souvlaki ignitus
olypian quarrels
Epsum factorial nonp quid pro quo hic escorol. Olypian quarrels et gorcongolium onp quid sic ad nauseum. Souvlaki ignitus.
epsum factorial
Epsum factorial nonp quid pro quo hic escorol. Olypian quarrels et gorcongolium onp quid sic ad nauseum. Souvlaki ignitus.


Adrian Dubel
Software Quality Test Engineer with experience in the industry and strong understanding of Software Development Life Cycle (SDLC), experience in Software Testing using Automation and Manual Testing Techniques. Testing of new features by creating test plans, high level scenarios, test cases utilizing QA best practices and standards, working closely with development. Performed Functional Testing, Regression Testing, User Acceptance Testing (UAT). Execute automation test scripts mainly using Cypress and Selenium, Python. Worked in Agile environment, with an ability to accommodate and test the newly proposed changes at any point of time during the release. Blog author www.cypress-world.pl


| I l@ve RuBoard |
This chapter surveys three completely different subjects that don't really fit together, but don't belong anywhere else either:
Serial communications, otherwise known as your COM port
Remote access services, a set of Windows functions for configuring, making, and breaking dial-up connections to another computer
Sockets, the interface to the TCP/IP protocol and the layer on top of which the various Internet protocols such as FTP and HTTP are built
Each is a subject in its own right, and the techniques are not specific to Python. We'll show enough to get you started with the right Python extensions and features and try to point you at some of the right sources to learn more.
| I l@ve RuBoard |


Backbone.bind.js array property example
Person items
first name
color
married
employed
Person edit
id:
first name:
color:
Yellow
Pink
married:
employed:
Yes
No
pets
name
type


---
layout: default
title: Components
slug: components
---
{% include components/utility-bar.html %}
{% include components/logo.html %}
{% include components/warwick-site-links.html %}
{% include components/search.html %}
{% include components/site-title.html %}
{% include components/navigation.html %}
{% include components/footer.html %}
{% include components/next-previous-links.html %}
{% include components/koan-spinners.html %}


Suppose we have a random variable and we are interested in how much information we get when is measured. If the event is highly improbable we have more information than if it is highly probable. Information is given by a quantity that is a function of the probability distribution . If two events are observed and unrelated the total information will be the sum of information in both events:
We see that information depends on the logarithm of the probability distribution. For a discrete we have
The expectation of this quantity is what we call entropy
of the variable ,
If there’s no chance o observing , i.e. , then we get no information .
As an example, suppose we observe the throw of a fair 8-sided dice and we want to transmit the information about the expectation:
import numpy as np
H = -8*(1/8)*np.log2(1/8)
H
>>> 3.0
This is measured in bits
. In this case we need at least a 3 bits
number to transmit the information, no less than that. When is continuous it is common to use the natural logarithm and the unit becomes nats
instead of bits.
Let us see an example of three distributions with the same mean but different standard deviation.
p1 = np.array([0.2,0.2,0.2,0.2,0.2])
p2 = np.array([0.1,0.15,0.5,0.15,0.1])
p3 = np.array([0.0,0.005,0.99,0.005,0.0])
Define a function to compute entropy:
def H(p):
return np.sum([-val*np.log(val) if val > 0 else 0 for val in p])
H(p1),H(p2),H(p3)
(1.6094, 1.3762, 0.0629)
The narrower distribution has a smaller entropy. This is because the uncertainty about its expectation is smaller. If some all other , uncertainty is zero and we get no information .
We can use a continuous distribution, and the discrete sum becomes an integral and the entropy is usually called differential entropy
:
We can now use Lagrange multipliers
to find a distribution which maximizes the differential entropy. To do that we need to constrain the first and second moments of :
Setting the variational derivative
to zero we get as solution . Using substitution we get:
The Gaussian distribution is the one that maximizes differential entropy which is:
This result agrees with what we found earlier, the entropy increases as the distribution becomes broader, i.e., increases.
Suppose now we have a joint distribution and have an observation of . It is possible to compute the additional information needed to specify the corresponding observation of with Thus the average additional information to specify , called conditional entropy
of given , is:
Using we get:
Suppose we have an unknown distribution and we are using another distribution to model it. We can compute the additional amount of information needed to specify when we observe :
This relative entropy
is called Kullback-Leibler Divergence
or simply KL Divergence
and is a measure of dissimilarity between two distributions. Note that it is anti-symmetric,
To accomplish the task of approximating to we may observe a finite number of times, , use as a parametric function, and use the expectation of
For a function its expectation is and for a number of observations it becomes a finite sum:
For the KL divergence we have:
The first therm is the negative log likelihood
for under distribution . Because of that people usually say that minimizing the KL divergence is equivalent to maximizing the likelihood function
.
As an exercise we can find where and .
where .
The KL divergence is the most famous function of a broader family called f-Divergences
, more generally defined as:
where is a continuous real parameter, . Some special cases are:
and the Hellinger distance
Since we only work with distributions with compact support , again it is zero if and only if .
For a joint distribution the KL divergence can be used to quantify how close the two variables are to be independent, i.e., , this is called mutual information
between and :
.
and and are independent.
Mutual information can be written with conditional entropy:
.
Written on October 19th, 2019 by Junior A. Koch


Note: Internet Explorer 8, and earlier versions, does not support .wav files. Try to rename the file to "horse.mp3" to test the example in these versions of IE.


GrabFood celebrates first anniversary in PH by highlighting growth of merchant-partners
For Grabfood, success isn't measured by numbers alone. It’s equally important to consider the impact it has brought to the lives of their fellow Filipinos.
by Rappler.comSatisfy your cravings by getting the food you love from your favorite restaurants. GrabFood is now available in selected areas of BGC, Makati, Ortigas, San Juan, Mandaluyong, QC, Manila, Pasay and will be expanding quickly to other areas soon


+
Create Project
Logout
×
Create Project
Upload File
Choose
classification
multiclass classification
segmentation
localization
Labels
Cancel
Upload
Logout
Not Authorised


PLab - Group Documentation 183 - Haddock report
Haddock output
Haddock coverage:
100% ( 30 / 30) in 'LI11718'
100% ( 2 / 2) in 'Main'
Warning: LI11718: could not find link destinations for:
Int Enum succ pred toEnum fromEnum enumFrom enumFromThen enumFromTo enumFromThenTo Eq == Bool /= Read readsPrec ReadS readList readPrec ReadPrec readListPrec Show showsPrec ShowS show String showList Double Maybe
Warning: Main: could not find link destinations for:
IO
Haddock errors
Haddock documentation
haddock


title = "Specials" url = "/specials" layout = "default" hidden = "1" ==
We have specials all the time to help you provide the classroom experience you want.


1. Introduction
This section is non-normative.
Media is used extensively today on the web to play a variety of different types of content. It is often used to play music, podcasts and radio content. At other times web media is used to provide background music, sound effects, notification sounds and to render WebRTC media stream content.
When playing media on the web, developers are currently forced to adopt a single default platform modality for playing all media content. On the other hand, native applications can access much richer media integration options with an underlying platform. On mobile devices, native application developers can request many different forms of media integration with the platform to obtain access to headphone buttons, lock screens and notification areas as needed. On desktop devices, native applications have access to keyboard media key events. Native application developers can specify the conditions in which media content should pause or duck on audio interruptions (i.e. pause or lower the volume for the duration of an interruption), continue playing out when application focus is lost or the device screen is switched off and interface with internal and external remote controllers.
This specification provides these platform media integration features for web media. By allowing web developers to express the intended usage of their media content, user agents can supply the most suitable platform-level interactions for that content and enforce logical interoperation behavior on the current platform between any number of different sources of media.
This specification describes the mechanism that allows web developers to specify the most appropriate category for their media content and for user agents to then use these supplied hints to enforce how different sources of web media should interact with each other, other native media content and the underlying platform.
2. Conformance
All diagrams, examples, and notes in this specification are non-normative, as are all sections explicitly marked non-normative. Everything else in this specification is normative.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119. For readability, these words do not appear in all uppercase letters in this specification. [RFC2119]
Requirements phrased in the imperative as part of algorithms (such as "strip any leading space characters" or "return false and terminate these steps") are to be interpreted with the meaning of the key word ("must", "should", "may", etc) used in introducing the algorithm.
Conformance requirements phrased as algorithms or specific steps may be implemented in any manner, so long as the end result is equivalent. (In particular, the algorithms defined in this specification are intended to be easy to follow, and not intended to be performant.)
User agents may impose implementation-specific limits on otherwise unconstrained inputs, e.g. to prevent denial of service attacks, to guard against running out of memory, or to work around platform-specific limitations.
When a method or an attribute is said to call another method or attribute, the user agent must invoke its internal API for that attribute or method so that e.g. the author can’t change the behavior by overriding attributes or methods with custom properties or functions in JavaScript.
Unless otherwise stated, string comparisons are done in a case-sensitive manner.
3. Dependencies
The IDL fragments in this specification must be interpreted as required for conforming IDL fragments, as described in the Web IDL specification. [WEBIDL]
4. Media sessions
A media session represents one or more audio-producing objects within the same top-level browsing context that share the same media session category. Each media session then defines the interactions of its audio-producing objects with both the underlying platform and other audio-producing objects belonging to other media sessions within the user agent.
A media session may have a media remote controller that provides access to media remote controls. A media remote controller can be used to request particular media key access and respond to hardware or software remote control events. Such events may be triggered by e.g. keyboard media keys, headphone buttons, remote controller buttons or notification and lock screen media buttons.
A media session may have associated media session metadata that can consist of title, artist name, album name, artwork URL and artwork resource.
To create a media session, given a media session category,
run these steps:
- Let media session be a new media session.
-
Set media session’s current media session type to the
corresponding media session type of media session
category. If no corresponding media session type can be found
for the provided
media session category or media session category is
empty, then set media session’s
current media session type to "
content
". -
If media session’s current media session type is
"
content
", then create a new media remote controller for media session. (Otherwise media session has no media remote controller.) -
Set media session’s current state to
idle
. - Return media session.
4.1. States
A media session has a current state that describes its current status with respect to any platform-level interactions and interactions with other media sessions. The possible values are as follows:
-
idle
- The media session does not have any platform-level media focus nor is it in a suspended state.
-
active
- The media session currently has platform-level media focus.
-
interrupted
- The media session is currently suspended from having platform-level media focus and its audio-producing participants are either paused or ducked based on the media session’s current media session type.
4.2. Types
A media session category is a keyword that maps to a well-defined interaction state for a media session – called its media session type – that user agents use to enforce platform-specific interaction and interoperation between media content.
A media session has a current media session type that is set when a new media session is created.
The following table lists the available media session categories keywords and their corresponding media session type states — the keywords in the left column map to the states in the cell in the second column on the same row as the keyword. Media session categories and media session types should be used based on their preferred definitions in the table’s third and fourth columns.
| Category | State | Definition | Examples |
|---|---|---|---|
"content "
| Content |
| Music, podcasts, radio streams. |
"transient "
| Transient |
| Notification sounds. Spoken driving directions where playback of music in the background is acceptable. |
"transient-solo "
| Transient Solo |
| Playback of driving directions. Other spoken notifications. |
"ambient "
| Ambient |
| UI sounds. In-game sound effects and background music. |
" " (empty
string)
| Default |
| Legacy media content |
4.3. Participants
An audio-producing object is any object or element that is capable of emitting sound within the user agent and is therefore also potentially capable of interacting with the media focus system available in different underlying platforms.
An audio-producing object may have a current media session, which is a media session. When an audio-producing object is created, the user agent must set its current media session to the current top-level browsing context’s media session.
A media session may have one or more audio-producing objects attached to it; called its audio-producing participants. A media session must keep a list of its audio-producing participants that consists of zero of more audio-producing objects.
A media session has a resume list that is used internally to restore audio-producing participants at the end of an interruption that were playing, or were otherwise running, when that interruption started. The resume list may consist of zero or more audio-producing objects that must also be present in the media session’s list of audio-producing participants. When a new media session is created its resume list must be empty.
When the user agent is to pause a given audio-producing object it must run the following steps:
-
If audio-producing object is an
HTMLMediaElement
object, then pause media element audio-producing object and terminate these steps. -
If audio-producing object is an
AudioContext
object, then suspend web audio object audio-producing object and terminate these steps.
When the user agent is to indefinitely pause a given audio-producing object, the user agent must pause audio-producing object and, then proceed to remove it from its current media session’s list of audio-producing participants.
When the user agent is to unpause a given audio-producing object it must run the following steps:
-
If audio-producing object is an
HTMLMediaElement
object, then unpause media element audio-producing object and terminate these steps. -
If audio-producing object is an
AudioContext
object, then resume web audio object audio-producing object and terminate these steps.
When an audio-producing object is to duck the user agent must ensure its output volume is lowered.
When an audio-producing object is to unduck the user agent should restore its output volume to the same level that was observed prior to the original corresponding duck request.
When an audio-producing object is ducked any reduction in volume applied by the user agent is not intended to be observable to web pages.
4.4. Resources
The fetch steps for a given media session media session are:
- If media session metadata’s artwork URL is empty, then terminate these steps.
-
If the platform supports displaying media artwork, let request be
a new request whose method is "
GET
", url is media session metadata’s artwork URL, context is "image
", context frame type is "none
", origin is the current entry settings object’s origin, forceOrigin
header flag is set, and referrer is no referrer. Otherwise, if the platform does not support displaying media artwork, terminate these steps. -
Fetch request.
Then, in parallel:
- Wait for the response.
- If the response’s internal response’s type is default, attempt to decode the resource as image.
- If the image format is supported, set media session’s artwork resource to the decoded resource. (Otherwise media session has no artwork resource.)
4.5. Lifecycle
When creating a new media session a media
session’s current state is initially set to idle
.
When the media session invocation algorithm is run a media
session’s current state may be set from idle
to
active
.
When the media session interruption algorithm is run a media
session’s current state may be set from
active
to either idle
or interrupted
depending on its associated media
session category.
When the media session continuation algorithm is run a media
session’s current state may be set from interrupted
to active
.
When the media session release algorithm is run a media session’s
current state
may be set from either active
or interrupted
to
idle
.
4.5.1. Activating a media session
The media session invocation algorithm takes one argument, media session, and consists of the following steps:
-
If media session is already
active
, then return success. -
Optionally, based on platform conventions, request the most appropriate
platform-level media focus for media session based on its
current media session type.
If this step is run and platform-level media focus can not be obtained for any reason, then return failure.
-
Run these substeps:
-
If media session’s current media session type is
Content
-
- Optionally, based on platform conventions, the user agent may show an ongoing media interface in the underlying platform’s notifications area and/or show an ongoing media interface in the underlying platform’s lock screen area for media session based on its media remote controller, if any, and using any available media session metadata.
- Optionally, based on platform conventions, the user agent may allow hardware and/or software media keys to control playback of media session’s audio-producing participants based on its media remote controller, if any.
-
If media session’s current media session type is
Transient
orTransient Solo
-
The user agent should not provide user access to any hardware or
software media keys and not display any ongoing media interface in the
underlying platform’s notifications area or show any ongoing media
interface in the underlying platform’s lock screen area for
Transient
orTransient Solo
-based media sessions. -
If media session’s current media session type is
Ambient
-
If media session’s top-level browsing context is not
at least partially visible on at least one screen, then return failure.
The user agent should not provide user access to any hardware or software media keys and not display any ongoing media interface in the underlying platform’s notifications area or show any ongoing media interface in the underlying platform’s lock screen area for
Ambient
-based media sessions.
-
If media session’s current media session type is
- Set media session’s resume list to an empty list.
-
Set media session’s current state to
active
, then return success.
4.5.2. Interrupting a media session
A media session may be interrupted at any time after its media session invocation algorithm has been run. This typically occurs when another application or another media session requests and is granted a level of platform media focus that affects the media session based on its current media session type.
Interruptions can be both transient or permanent. A transient interruption means we can either choose to duck our media content and continue playing it out at a reduced volume for the duration of the interruption; or pause our media content for the duration of the interruption and, then, resume playback when that interruption ends. A permanent interruption means we must pause our media content indefinitely.
When a start-of-interruption notification event is received from the platform, then the user agent must run the media session interruption algorithm against all known media sessions, passing in each media session as media session.
The media session interruption algorithm takes one argument, media session, and consists of the following steps.
-
If media session’s current state is not
active
, then terminate these steps. -
Let interrupting media session category be the media session
category that triggered this interruption. If this interruption has no
known
media session category, let interrupting media session
category be
Default
. -
Run these substeps:
-
If interrupting media session category is
Content
-
-
If media session’s current media session type is
Default
orContent
then indefinitely pause all of media session’s audio-producing participants and set media session’s current state toidle
.This implies that the next time the media session invocation algorithm is run against media session that we will re-request media focus according to the steps defined in that algorithm.
- Optionally, based on platform conventions, the user agent must remove any previously established ongoing media interface in the underlying platform’s notifications area and any ongoing media interface in the underlying platform’s lock screen area for media session, if any.
- Optionally, based on platform conventions, the user agent must prevent any hardware and/or software media keys from controlling playback of media session’s audio-producing participants.
-
If media session’s current media session type is
-
If interrupting media session category is
Transient
-
-
If media session’s current media session type is
not
Default
orContent
, then terminate these steps. -
For each audio-producing object in media
session’s list of audio-producing participants:
- If audio-producing object is not currently playing, or is not otherwise running, then terminate these substeps and continue at the next available audio-producing object.
- Duck audio-producing object.
- Add audio-producing object to media session’s resume list.
-
Set media session’s current state to
interrupted
.This implies that the next time the media session continuation algorithm is run for media session that we will re-activate this media session according to the steps defined in that algorithm.
-
If media session’s current media session type is
not
-
If interrupting media session category is
Transient Solo
-
-
If media session’s current media session type is
not
Default
,Content
,Transient
orTransient Solo
, then terminate these steps. -
For each audio-producing object in media
session’s list of audio-producing participants:
- If audio-producing object is not currently playing, or is not otherwise running, then terminate these substeps and continue at the next available audio-producing object.
- Pause audio-producing object.
- Add audio-producing object to media session’s resume list.
-
Set media session’s current state to
interrupted
.This implies that the next time the media session continuation algorithm is run for media session that we will re-activate this media session according to the steps defined in that algorithm.
-
If media session’s current media session type is
not
-
If interrupting media session category is
When an end-of-interruption notification event is received from the platform, then the user agent must run the media session continuation algorithm against all known media sessions, passing in each media session as media session.
The media session continuation algorithm takes one argument, media session, and consists of the following steps.
-
If media session’s current state is not
interrupted
, then terminate these steps. -
Let interrupting media session category be the media session
category that initially triggered this interruption. If this
interruption has no known media session category, let
interrupting media session category be
Default
. -
Run these substeps:
-
If interrupting media session category is
Transient
-
-
If media session’s current media session type is
not
Default
orContent
, then terminate these steps. - Unduck each audio-producing object in media session’s resume list.
- Set media session’s resume list to an empty list.
-
Set media session’s current state to
active
.
-
If media session’s current media session type is
not
-
If interrupting media session category is
Transient Solo
-
-
If media session’s current media session type is
not
Default
,Content
,Transient
, orTransient Solo
, then terminate these steps. - Unpause each audio-producing object in media session’s resume list.
- Set media session’s resume list to an empty list.
-
Set media session’s current state to
active
.
-
If media session’s current media session type is
not
-
If interrupting media session category is
After a visibilitychange
event [PAGE-VISIBILITY] has been fired at a
top-level browsing context, known as the browsing context, the
user agent must run the following steps:
-
If
visibilityState
is not "hidden
" or "visible
" [PAGE-VISIBILITY], then terminate these steps. -
For each media session in the browsing context with a
current media session type of
Ambient
run the following substeps:- Let s be the current media session.
-
If
visibilityState
is "hidden
" [PAGE-VISIBILITY] and s’s current state isactive
, then run the following substeps:-
For each audio-producing object in s’s list of
audio-producing participants, run the following substeps:
- If audio-producing object is not currently playing, or is not otherwise running, then terminate these substeps and continue at the next available audio-producing object.
- Pause audio-producing object.
- Add audio-producing object to media session’s resume list.
-
Set s’s
current state to
interrupted
. - Terminate these substeps and continue at the next available media session.
-
For each audio-producing object in s’s list of
audio-producing participants, run the following substeps:
-
If
visibilityState
is "visible
" [PAGE-VISIBILITY] and s’s current state isinterrupted
, then run the following substeps:- Unpause each audio-producing object in s’s resume list.
- Set s’s resume list to an empty list.
-
Set s’s current state to
active
. - Terminate these substeps and continue at the next available media session.
4.5.3. Releasing a media session
The media session release algorithm takes one argument, media session, and consists of the following steps.
-
If media session’s current state is
idle
, then terminate these steps. - If media session still has one or more audio-producing participants, then terminate these steps.
- Optionally, based on platform conventions, the user agent must release any currently held platform media focus for media session.
- Optionally, based on platform conventions, the user agent must remove any previously established ongoing media interface in the underlying platform’s notifications area and any ongoing media interface in the underlying platform’s lock screen area for media session, if any.
-
Optionally, based on platform conventions, the user agent must prevent any
hardware and/or software media keys from controlling playback of
media session’s audio-producing participants.
If the algorithm reaches this step then media session can not have any remaining audio-producing participants.
-
Set media session’s current state to
idle
.This implies that the next time the media session invocation algorithm is run against media session that we will re-request media focus according to the steps defined in that algorithm.
5. API
5.1. The MediaSession
interface
[Constructor(optional MediaSessionKind kind)] interface MediaSession { readonly attribute MediaSessionKind kind; readonly attribute MediaRemoteControls? controls; void setMetadata(MediaMetadata metadata); void release(); }; enum MediaSessionKind { "content", "transient", "transient-solo", "ambient" }; dictionary MediaMetadata { DOMString title = ""; DOMString artist = ""; DOMString album = ""; USVString artwork; };
MediaSession
objects are simply known as media sessions.
5.1.1. Garbage collection
A MediaSession
object must not be garbage collected while its corresponding
media session is attached to at least one audio-producing object.
Additionally, a MediaSession
object must not be garbage collected while it
has a media remote controller and that object has an event
listener whose type is previoustrack
or
nexttrack
.
5.1.2. Constructors
-
session = new MediaSession([kind])
-
Returns a new
MediaSession
object.
The MediaSession(kind) constructor, when invoked, must run these steps:
- Let media session be the result of creating a media session given kind.
-
Let s be a new
MediaSession
object associated with media session. - Return s.
5.1.3. Object members
-
session .
kind
- Returns the media session category of the media session.
The kind
attribute must return the media session category of the media
session that was set when the object was created.
-
session .
controls
- Returns the media remote controller assigned to the media session, if any.
The controls
attribute must return the media remote controller that was assigned to a
media session when it was created. If kind
is not
"content
", then this
attribute should return null.
-
session .
setMetadata(metadata)
-
Provides the user agent with meta data to use when a media session is
showing media control interfaces (e.g. in an OS-level notification area or
on a lock screen).
The metadata argument allows for setting a media session’s current meta data via object members. These are the object members that can be used:
-
title
- The title to display for the media session, if any.
-
artist
- The artist name to display for the media session, if any.
-
album
- The album name to display for the media session, if any.
-
artwork
- The artwork URL for an image resource to display for the media session, if any.
-
When the setMetadata(metadata)
method is invoked, the user agent must run the following steps:
- Let media session be the current media session.
- Let baseURL be the API base URL specified by the entry settings object.
-
Set media session’s title to
metadata’s
title
. -
Set media session’s artist name to metadata’s
artist
. -
Set media session’s album name to metadata’s
album
. -
If metadata’s
artwork
is present, parse it using baseURL, and if that does not return failure, set media session’s artwork URL to the return value. (Otherwise artwork URL is not set.) - Run the fetch steps for media session.
-
session .
release()
-
Releases platform-level media focus, sets the media session’s
current state to
idle
and applies any changes necessary to its audio-producing participants.
When the release()
method is invoked, the user agent
must run the following steps:
- Let media session be the current media session.
- Indefinitely pause all of media session’s audio-producing participants.
- Set media session’s resume list to an empty list.
- Set media session’s audio-producing participants to an empty list.
- Run the media session release algorithm for media session.
5.2. The MediaRemoteControls
interface
interface MediaRemoteControls : EventTarget { attribute boolean previousTrackEnabled; attribute boolean nextTrackEnabled; // Event handlers attribute EventHandler onprevioustrack; attribute EventHandler onnexttrack; };
Objects implementing the MediaRemoteControls
interface are simply known as
media remote controls.
5.2.1. Object members
-
controls .
previousTrackEnabled
- Determines if a user can interact with a 'previous track' button.
-
controls .
nextTrackEnabled
- Determines if a user can interact with a 'next track' button.
The previousTrackEnabled
attribute is intended to provide a hint that the user agent should enable a
'previous track' button for users in all applicable hardware or software remote
control interfaces. By default, this attribute is false.
The nextTrackEnabled
attribute is intended to provide a hint that the user agent should enable a
'next track' button for users in all applicable hardware or software remote
control interfaces. By default, this attribute is false.
While the attributes above can be set at any time they must only be read by
the user agent during the media session invocation algorithm in order
to correctly configure any connected remote control interfaces at the point
they become active
.
5.2.2. Event handlers
The following are the event handlers (and their corresponding event
handler event types) that must be supported, as IDL attributes, by all
objects implementing the MediaRemoteControls
interface:
| Event handler | Event handler event type |
|---|---|
onprevioustrack
|
previoustrack
|
onnexttrack
|
nexttrack
|
The task source for the tasks listed in this section is the DOM manipulation task source.
When the user presses the MediaPlayPause
media key, or an equivalent key, on
any hardware or software interface (e.g. on a keyboard or OS-level button) then
the user agent must, for each media session known by the user agent, run
the following steps:
- Let m be the media session.
-
If m’s current media session type
is not
Default
orContent
; or m’s current state is notactive
, then terminate these steps. - For each audio-producing participant in m, called active element, run the following substeps:
When the user presses the MediaTrackPrevious
media key, or an equivalent
key, on any hardware or software interface (e.g. on a keyboard or OS-level
button), then the user agent must, for each
Content
-based media session
that is currently active
,
has a media remote controller with its
previousTrackEnabled
attribute set to true,
queue a task to fire a simple event named previoustrack
at its media remote
controller.
When the user presses the MediaTrackNext
media key, or an equivalent key, on
any hardware or software interface (e.g. on a keyboard or OS-level button) then
the user agent must, for each Content
-based media session that is currently active
, has a media remote
controller with its nextTrackEnabled
attribute set
to true, queue a task to
fire a simple event named nexttrack
at its media remote controller.
5.2.3. Events summary
This section is non-normative.
The following events fire on media remote controllers as part of the processing model described above:
| Event name | Interface | Fired when... | Preconditions |
|---|---|---|---|
previoustrack
|
Event
| The user presses the 'previous track' media key or button on any hardware or software media interface. |
current media session type is Content , current state is active and
previousTrackEnabled is true.
|
nexttrack
|
Event
| The user presses the 'next track' media key or button on any hardware or software media interface. |
current media session type is Content , current state is active and
nextTrackEnabled is true.
|
6. Media element extensions
This section describes how a web developer can assign a media session to a media element and how, once attached, the media element can control state of a media session.
6.1. Extensions to the
HTMLMediaElement
interface
partial interface HTMLMediaElement { // media session attribute MediaSession? session; };
-
media .
[ =session
session
] -
Returns the current media session for the media element, if
any; returns null otherwise.
Can be set, to set an explicit
MediaSession
.
The session
attribute on a media element, on
getting, must return the element’s current media session, if any, or null
otherwise. On setting, the user agent must run the following steps:
- Let m be the media element in question.
- Let old media session be m’s current media session, if it has one, and null otherwise.
- Let m’s current media session be the new value or the top-level browsing context’s media session if the new value is null.
- Let new media session be m’s current media session.
- Update media sessions: If old media session and new media session are the same (whether both null or both the same media session), then terminate these steps.
- If m is an audio-producing participant of old media session, then pause m and remove m from old media session’s list of audio-producing participants.
- If old media session is not null and no longer has one or more audio-producing participants, then run the media session release algorithm for old media session.
6.2. Media elements and the media session lifecycle
6.2.1. Activating a
media session from an HTMLMediaElement
object
When the play()
method on a media element is invoked from script —
or a media element is otherwise played from the web page (e.g. via its
controls
) — and that media element’s paused
attribute is true
and its readyState
attribute has the value
HAVE_FUTURE_DATA
or HAVE_ENOUGH_DATA
then the user agent must run the
following steps, passing in media element as media element:
- Let media session be the value of media element’s current media session.
- If media element is not currently in media session’s list of audio-producing participants, then append media element to this list.
- Let activated be the result of running the media session invocation algorithm for media session.
- If activated is failure, pause current media element.
6.2.2. Interrupting a
media session from an HTMLMediaElement
object
When the user agent is to pause a media element for a given media element it must run that media element’s internal pause steps.
After thepause()
method on a media element has been invoked — or a
media element is otherwise paused from the web page (e.g. via its
controls
) — and that media element has a current media session
type set to Transient
or
Transient Solo
, then the
user agent must immediately run the media session release algorithm for
media element’s
current media session. Then, for all other media sessions, the
user agent must run the media session continuation algorithm, passing in
each media session as media session.
Transient
or
Transient Solo
-based
media sessions from indefinitely blocking the continuation of other
interrupted
media
sessions when they are indefinitely paused.
After we have completed this process, the original Transient
or
Transient Solo
-based
media session will have a current state of idle
and all interrupted
media sessions
will have returned to a current state of active
.
When the user agent is to unpause a media element for a given
media element it must invoke that media element’s play()
method.
6.2.3. Releasing a
media session from an HTMLMediaElement
object
When a media element’s playback has ended, the user agent must release media element from its media session.
Any time a media element’s load algorithm is run by the user agent, it must release media element from its media session.
When a media element is removed
from a Document
and is not attached to another Document
,
then release media element from its media session.
When the user agent is to release media element from its media session for a given media element it must run the following steps:
- Let media session be the value of media element’s current media session.
- If media element is not currently in media session’s list of audio-producing participants, then terminate these steps.
- If media element is in media session’s resume list then remove it from this list.
- Remove media element from media session’s list of audio-producing participants.
- Run the media session release algorithm for media session.
7. Web Audio extensions
This section describes how a web developer can assign a media session to
an AudioContext
object and how, once attached, the AudioContext
can
control state of a media session.
7.1. Extensions to the
AudioContext
interface
partial interface AudioContext { // media session attribute MediaSession? session; };
-
context .
[ =session
session
] -
Returns the current media session for the
AudioContext
object, if any; returns null otherwise.Can be set, to set an explicit
MediaSession
.
The session
attribute on an AudioContext
object, on getting, must return the object’s
current media session, if any, or null otherwise. On setting, the user
agent must run the following steps:
-
Let m be the
AudioContext
object in question. - Let old media session be m’s current media session, if it has one, and null otherwise.
- Let m’s current media session be the new value or the top-level browsing context’s media session if the new value is null.
- Let new media session be m’s current media session.
- Update media sessions: If old media session and new media session are the same (whether both null or both the same media session), then terminate these steps.
- If m is an audio-producing participant of old media session, then pause m and remove m from old media session’s list of audio-producing participants.
- If old media session is not null and no longer has one or more audio-producing participants, then run the media session release algorithm for old media session.
7.2. Web Audio and the media session lifecycle
7.2.1. Activating a
media session from an AudioContext
object
When the resume()
method on an AudioContext
object is invoked from
script and that AudioContext
object’s state
attribute is
"suspended" then the user agent must run the following steps:
-
Let audio object be the current
AudioContext
object. - Let media session be the value of audio object’s current media session.
- If audio object is not currently in media session’s list of audio-producing participants, then append audio object to this list.
- Let activated be the result of running the media session invocation algorithm for media session.
- If activated is failure, pause audio object.
7.2.2. Interrupting a
media session from an AudioContext
object
When the user agent is to suspend a web audio object for a given
AudioContext
object it must invoke that AudioContext
object’s
suspend()
method.
After the suspend()
method on an AudioContext
object has been invoked
and that AudioContext
object has a current media session type set to
Transient
or
Transient Solo
, then the
user agent must immediately run the media session release algorithm for
AudioContext
object’s
current media session. Then, for all other media sessions, the
user agent must run the media session continuation algorithm, passing in
each media session as media session.
Transient
or
Transient Solo
-based
media sessions from indefinitely blocking the continuation of other
interrupted
media
sessions when they are indefinitely paused.
After we have completed this process, the original Transient
or
Transient Solo
-based
media session will have a current state of idle
and all interrupted
media sessions
will have returned to a current state of active
.
When the user agent is to resume a web audio object for a given
AudioContext
object it must invoke that AudioContext
object’s
resume()
method.
7.2.3. Releasing a media
session from an AudioContext
object
When an AudioContext
object’s state
attribute transitions to
"closed", the user agent must release web audio object from its
media session.
When an AudioContext
object is removed from a Document
and is not attached to
another Document
, then release web audio object from its media
session.
When the user agent is to release web audio object from its media
session for a given AudioContext
object it must run the following
steps:
-
Let audio object be the current
AudioContext
object. - Let media session be the value of audio object’s current media session.
- If audio object is not currently in media session’s list of audio-producing participants, then terminate these steps.
- If audio object is in media session’s resume list then remove it from this list.
- Remove audio object from media session’s list of audio-producing participants.
- Run the media session release algorithm for media session.
8. Examples
This section and all its subsections are non-normative.
8.1. Setting up a media session
As both audio
and video
elements implement the HTMLMediaElement
interface, these element’s
session
attribute can be set via JavaScript to associate
that audio
or video
element to a media session:
var myAudio = document.createElement("audio"); myAudio.src = "podcast.mp3"; var mySession = new MediaSession("content"); myAudio.session = mySession; myAudio.play(); // Go!
A media session can also be assigned to one or more audio
and video
elements by setting their respective session
attributes to
the same MediaSession
object in JavaScript:
var myAudio = document.createElement("audio"); myAudio.src = "track1_audio.mp3"; var myVideo = document.createElement("audio"); myVideo.src = "track1_video.mp3"; var mySession = new MediaSession(); myAudio.session = mySession; myVideo.session = mySession; myAudio.play(); // Go! myVideo.play(); // Go!
An AudioContext
object’s session
attribute can be set
via JavaScript to associate that object to a media session:
var audioCtx = new AudioContext(); audioCtx.session = new MediaSession("ambient"); audioCtx.resume(); // Go!
It is also possible to add multiple HTMLMediaElement
and AudioContext
objects to a single media session:
var myAudio = document.createElement("audio"); myAudio.src = "track1_audio.mp3"; var audioCtx = new AudioContext("transient-solo"); myAudio.session = mySession; audioCtx.session = mySession; myAudio.play(); // Go! audioCtx.resume(); // Go!
8.2. Setting media session meta data
When a Content
-based media
session is active
it may
be possible to display meta data within platform-level interfaces. Media session
meta data can be added at any time to update these interfaces:
// Set some media session metadata // to display to the user mySession.setMetadata({ title: "Demo Track 1", artwork: "/resources/cover1.png" }); // ... time passes ... // Change the media session metadata // to display to the user mySession.setMetadata({ title: "Demo Track 2", artwork: "/resources/cover2.png" });
8.3. Responding to media remote control events
Before a Content
-based media
session becomes active
a
web developer must set which remote control keys they want to enable:
var mySession = new MediaSession("content"); // Enable previous and next track media key inputs if (mySession.controls) { mySession.controls.nextTrackEnabled = true; mySession.controls.previousTrackEnabled = true; } // ... assign media session to an audio object and play/resume // that object to activate the media session ...
When a Content
-based media
session then becomes active
it is possible to listen for any interaction with the
registered remote control keys and respond appropriately to those inputs in a
web application:
// Respond to previous and next track media key inputs if (mySession.controls) { mySession.controls.addEventListener('nexttrack', function() { // Play next track if (myAudio.src === "track1.mp3") { myAudio.src = "track2.mp3"; myAudio.play(); // Set appropriate meta data for track 2 mySession.setMetadata({ title: "Demo Track 2", artwork: "/resources/cover2.png" }); } }, false); mySession.controls.addEventListener('previoustrack', function() { // Play previous track if (myAudio.src === "track2.mp3") { myAudio.src = "track1.mp3"; myAudio.play(); // Set appropriate meta data for track 1 mySession.setMetadata({ title: "Demo Track 1", artwork: "/resources/cover1.png" }); } }, false); }
Acknowledgments
The editor would like to thank Paul Adenot, Jake Archibald, Tab Atkins, Jonathan Bailey, Marcos Caceres, Domenic Denicola, Ralph Giles, Anne van Kesteren, Tobie Langel, Michael Mahemoff, Jer Noble, Elliott Sprehn, Chris Wilson, and Jörn Zaefferer for their participation in technical discussions that ultimately made this specification possible.
Special thanks go to Philip Jägenstedt and David Vest for their help in designing every aspect of media sessions and for their seemingly infinite patience in working through the initial design issues; Jer Noble for his help in building a model that also works well within the iOS audio focus model; and Mounir Lamouri and Anton Vayvod for their early involvement, feedback and support in making this specification happen.
This standard is written by Rich Tibbett (Opera, richt@opera.com).
Per CC0, to the extent possible under law, the editors have waived all copyright and related or neighboring rights to this work.


{% extends "layout.html" %} {% block body %}
Here you can have a look to our guides, it's an important step to understand how to works grampus


data class RequestCountApi
Class that represents a Request Count by api. |
|
data class RequestCountCode
Class that represents a Request Count by code. |
|
data class RequestCountErrors
Class that represents a Request Count by Success or Failure |
|
data class RequestCountModule
Class that represents a Request Count by module. |
|
data class RequestResponse
Represents a request. |
|
data class RequestsOptionalParameters
Class that contains information about all the optional parameters the Request module requests can have. Every request of this module is a GET request and can have a query to get requests between dates. It also knows how to properly construct the url. |


[% INCLUDE js_templates/map_legend.js %]
| Circuit Endpoint | Unused Endpoint | Endpoint Being Viewed | Endpoint Being Looped | Endpoint Under Maintenance | ||
| Primary Path | Secondary Path | Available Link | Maintenance Link | Down Link | Multiple Links Majority Down | Mutliple Links Majority/Half Up |


Santy is a Colombian Latin music artist who mixes elements of reggae, cumbia, dancehall, music from the caribbean islands and electronics, producing innovative and rythmic music. recognized by several Colombian magazines as one of the youngest new artist in Colombia.


This is your SAP Cloud Platform Cloud Foundry TomEE application powered by the SAP S/4HANA Cloud SDK.
application/src/main/java/
.
mvn package tomee:run
within the application
directory.
application/src/main/webapp/
.
For more information and tutorials, visit https://sap.com/s4sdk.


{% extends "global/Page.html" %} {% load otree %} {% block title %} Results of round {{ subsession.round_number }} of {{ Constants.num_rounds }} {% endblock %} {% block content %}
Round {{ subsession.round_number }} has now concluded.
Your assigned type in this round was {{ player.int_pref }}.
Your reported type in this round was {{ player.exp_pref }}.
Your neighbours' reported types in this round were:
{% if player.id_in_group == 1 %}- Participant number 2 reported {{ exp_pref_2 }}.
- Participant number 3 reported {{ exp_pref_3 }}.
- Participant number 4 reported {{ exp_pref_4 }}.
- Participant number 6 reported {{ exp_pref_6 }}.
{% endif %} {% if player.id_in_group == 2 %}- Participant number 1 reported {{ exp_pref_1 }}.
- Participant number 3 reported {{ exp_pref_3 }}.
- Participant number 4 reported {{ exp_pref_4 }}.
- Participant number 5 reported {{ exp_pref_5 }}.
{% endif %} {% if player.id_in_group == 3 %}- Participant number 1 reported {{ exp_pref_1 }}.
- Participant number 2 reported {{ exp_pref_2 }}.
- Participant number 5 reported {{ exp_pref_5 }}.
{% endif %} {% if player.id_in_group == 4 %}- Participant number 1 reported {{ exp_pref_1 }}.
- Participant number 2 reported {{ exp_pref_2 }}.
- Participant number 6 reported {{ exp_pref_6 }}.
{% endif %} {% if player.id_in_group == 5 %}- Participant number 2 reported {{ exp_pref_2 }}.
- Participant number 3 reported {{ exp_pref_3 }}.
{% endif %} {% if player.id_in_group == 6 %}- Participant number 1 reported {{ exp_pref_1 }}.
- Participant number 4 reported {{ exp_pref_4 }}.
{% endif %}Your earnings for this round are therefore {{ player.payoff }}.
Your total earnings so far are {{ total_payoff }}.
{% if subsession.round_number == Constants.num_rounds %}Please click on the "Next" button below to proceed to the survey which will collect your demographic information.
Once you have completed this survey, your cash payoff (i.e. the amount of money (in US $) you have earned from participating in this experiment) will be revealed to you.
{% endif %} {% next_button %} {% endblock %}


Building style guides with kss-node
This software is a Node.js implementation of Knyle Style Sheets (KSS), "a documentation syntax for CSS" that's intended to have syntax readable by humans and machines. Hence, the kss-node software can be used to create a "living style guide".
- Write human-readable documentation using "KSS syntax" comments. Can be added to CSS, Sass, LESS, or any other CSS Preprocessor files.
- Have the
kss
tool automatically build a style guide from your stylesheets.
Here's an example KSS comment:
/*
Button
Your standard button suitable for clicking.
:hover - Highlights when hovering.
.shiny - Do not press this big, shiny, red button.
Markup: button.html
Style guide: components.button
*/
.button {
...
}
.button.shiny {
...
}
For more information on how to write KSS comments, see the KSS spec.
kss demo
This site is built with the kss
command-line tool and parses the KSS documentation found in this demo project.
The styling of this site is a demo of kss-node's default style guide builder. By using the site navigation to the left (or above), you can see how your documentation would look with the default builder. Note that alternate builders are available.
Quick start guide
Documentation on how to get started with kss-node (and with Node.js' npm) is available on the kss-node wiki.
JavaScript API
If you don't wish to use the default style guide builder, you can either:
- write your own builder that uses the KssBuilderBaseHandlebars class, or
- write your own builder and class that extends KssBuilderBase, or
- use the JavaScript object representation of the style guide, KssStyleGuide.
For more information on how to integrate kss-node with your own JavaScript, see the JavaScript API documentation.
Project homepage
Check out the project on Github for more information about the code.


Tags: nan
Style: Muralism
Artist: Rivera Diego
Title: Alliance of the Peasant and the Industrial Worker
Year: 1924
Genre: allegorical painting
Categories: book_jacket (30.9%); comic_book (10.3%); fire_screen (4.9%); street_sign (3.2%); shield (2.5%)
<< previous image next image >>


Please Enter Your Details For Our Dating Website!


io.sbk.*
-
"-"
"class"
"-class"
"Storage Benchmark Kit"
"help"
"-help"
"sbk"
"sbk.appHome"
"sbk.applicationName"
"sbk.className"
"\nPlease report issues at https://github.com/kmgowda/SBK"
"io.sbk"
"https://github.com/kmgowda/SBK"
-
public static final long
1099511627776L
public static final int
1024
public static final int
1048576
public static final int
180000
public static final int
0
public static final int
5
public static final long
9223372036854775L
public static final int
1000
public static final int
3
public static final int
8
public static final long
2305843009213693951L
public static final int
1000
public static final int
1000000
public static final int
1000
public static final int
1
public static final int
60000
public static final int
1000
public static final int
1000
public static final int
1000000
public static final long
1000000000L
"0.##"
public static final long
4611686018427387903L
-
public static final int
1
public static final int
2
public static final int
0
-
public static final int
1
-
public static final int
2
public static final int
5
public static final int
4
public static final int
1
public static final int
3
-
public static final int
1
public static final int
0
public static final int
2


This tool will help you configure the setup required to send invites using Webex Experience
Management. Start by selecting a dispatch created in Experience Management and setup all required
modules below. Please refresh the page to update the list of Dispatches and update any recent changes made to dispatches.
No dispatch
available. Please check and create dispatch in WXM and try again.
Please wait while we get the details...
Channels Setup
The selected dispatch uses the following channels to send invites. Please provide channel vendor
details to ensure the invites are sent out correctly.
Update Custom SMTP Setting
You can update the master Custom SMTP settings as stored in the central database below. Please make
any change carefully as updating these details may impact any other dispatch using this SMTP. To
ensure
things do not break, please check all other dispatches configured to use this SMTP.
Update Custom SMS Setting
You can update the master Custom SMS settings as stored in the central database below. Please make
any change carefully as updating these details may impact any other dispatch using this SMS Vendor. To
ensure things do not break, please check all other dispatches configured to use this Custom SMS.
MessageBird
You can update the master MessageBird SMS settings as stored in the central database below. Please make
any change carefully as updating these details may impact any other dispatch using this SMS Vendor. To
ensure things do not break, please check all other dispatches configured to use this Message Bird.
Spark Post
You can update the master Spark Post settings as stored in the central database below. Please make
any change carefully as updating these details may impact any other dispatch using this Email Vendor. To
ensure things do not break, please check all other dispatches configured to use this Spark Post.
Edit Super Admin Notifications
All error and failures that are not linked to any specific dispatch will be sent as account level super admin notifications.