DfE enquiries
Central newsdesk 020 7783 8300
General enquiries 0370 000 2288
Press release
Michael Gove gives green light to 102 more free schools that will create more than 50,000 extra school places when full.
Education Secretary Michael Gove today approved 102 new free school applications to open in 2014 and beyond, delivering around 50,000 new school places.
There are already 81 open free schools, with a further 109 aiming to open in September and beyond. In total, all currently approved free schools would deliver 130,000 new school places when full.
Free schools are state-funded schools independent of local authority control. They are run by teachers - not local or central government bureaucrats. They have the freedom to decide the length of the school day and term, the curriculum, and how they reward their teachers and spend their money.
Many of the free schools approved today will be based in areas of deprivation, or where there is a shortage of school places, like the schools open or approved before them:
Among the free school proposals approved today are:
A secondary school for 1,100 students that will specialise in English. It has been proposed by inspirational headteacher, Rachel De Souza. The school will have a focus on cultural literacy and traditional academic subjects, with every pupil studying a language until 16 years of age, with the option to study Latin.
NAS has had 2 schools for children and young people with autism approved today. One, for 60 pupils, will be in east Cheshire and the other, for 78 pupils, will be in Lambeth. This builds on NAS’s first free school that is due to open in Reading in September.
A music school for 16- to 19-year-olds in Tower Hamlets. The school is the brainchild of Will Kennard, one half of production duo Chase and Status, who wants to give talented students from deprived areas the opportunity to be successful.
Will brought together a group of talented and innovative teachers and professionals with experience of education. With the support of the music industry they created a vision for ELAM, a school where any pupil with potential can realise success. Sir Nick Williams, former headteacher of the BRIT School, is supporting the school.
A 700-pupil 14 to 19 free school proposed by the local Weston FE College. The free school will deliver a full curriculum, with an emphasis on STEM subjects. At KS4, all students will be entered for the English Baccalaureate and additional GCSEs, or will combine their core subjects with vocational level 2 subjects.
In total, 70 of the applications approved today are from teachers, existing schools, and educational organisations. Twenty-four of the approved free schools – 8 special free schools and 16 alternative provision free schools – will serve the most vulnerable children and young people. This adds to the 5 special and 12 alternative provision free schools that are on course to open from September 2013, and Harmonize Academy, an alternative provision free school, that opened in April this year. Of the 81 free schools already open, 6 are alternative provision free schools and 3 are special free schools.
There are fewer schools approved this year with a faith designation or ethos. Fifteen will be faith designated, compared with 20 last year. Ten will have a faith ethos, compared with 13 last year.
Today’s announcement underlines the continuing demand for free schools. More local communities want a different or better school to meet the needs of their children and to help drive up standards in their local area.
Education Secretary Michael Gove said:
There are many innovators in local communities set on raising standards of education for their children. I am delighted to approve so many of their high-quality plans to open a free school.
Free schools are extremely popular with parents and are delivering strong discipline and teaching excellence across the country.
The groups will now finalise their plans in readiness to open from September 2014. Chief among their tasks will be to secure their site. The department has co-developed a website - www.gov.uk/find-government-property - with the Cabinet Office that lists all surplus government property available to buy or rent, including those suitable for free schools.
Changes to planning laws at the end of May 2013 will also make it easier for free schools to move into their preferred site.
The list of approved schools will be published on the department’s website. Notable examples include:
This secondary free school is the latest to be set up by the excellent Perry Beeches Academy Trust. The trust has a strong track record with their first school, Perry Beeches I improving pupils’ key stage 4 attainment from 20% 5 or more A* to C including English and maths in 2006 to 75% by 2011.
This proposal aims to provide an outstanding traditional education, with a strong emphasis on behaviour, academic achievement, and smart appearance of pupils.
Perry Beeches has links with a number of key figures in Birmingham who will teach students about the city’s rich history and enrich their school experience.
It is one of the oldest independent schools in Lancashire and will join the non-selective state sector. The proposal is supported by Jack Straw.
The ethos of the school will be maintained through high aspirations allied with academic breadth and challenge. It will be based on the national curriculum, (and in the foundation stage on the early years statutory framework), with a strong emphasis on developing high levels of literacy and numeracy.
There will be a wide programme of enrichment for all students delivered by well-trained specialist teachers, with 64% possessing a 2.1 or first class degree. The school’s rich co-curricular life will be maintained through a newly designed extended day and on-going Saturday sporting programme.
This will be a creative arts primary free school established by LIPA and Edge Hill University. LIPA was co-founded in 1996 by its lead patron, Sir Paul McCartney, and principal, Mark Featherstone-Witty.
The LIPA Free School will immerse children in the creative arts to enrich teaching and learning in the early development of literacy and numeracy. Younger pupils will use the art work at Tate Liverpool as the stimulus for creative writing and older pupils will work with the Everyman Theatre and use their ticket sales data as a real life maths resource.
This is a teacher-led proposal drawing on the practices of charter schools in the USA. XP will aim to prepare pupils to be successful in the adult world by facilitating authentic, real world experiences. As well as mastery of subject knowledge, the pupils will gain skills critical to readiness for further/higher education and lifelong success, such as; literacy, numeracy problem-solving, critical thinking, collaboration, creativity, persistence toward excellence and active citizenship.
All projects will be rigorously mapped to the national curriculum in terms of standards, content and skills at both key stage 3 (KS3), and an appropriate programme of GCSEs and A levels. This will be tracked across each project, and across each year, to prevent gaps and ensure breadth and balance.
This will be a 5 to 14 alternative provision free school for children with complex psychological, family and mental health problems. Combining teaching with elements from the most up-to-date CAMHS practice (including the use of multi-family groups), the Family School will both ease behavioural and mental health-related blocks to learning and provide learning opportunities that will keep pace, day-by-day, with the pupil’s ability to learn and achieve.
A central feature of the programme will be that children will remain pupils, in a school context that is non-stigmatising. Treatments, whether individual, family or multi-family in nature, will for the most part be delivered either in the Family School itself or in the mainstream school.
This is a teacher-led proposal for post-16 students. ELAM will work in conjunction with the British music industry to educate through the music. The school will bring world class music provision to the heart of east London.
The proposal is supported by Sir Nick Williams, the former principal of the BRIT School, who will be a governor of ELAM. ELAM will develop young musical talents into industry-ready professionals. It is designed to specifically improve the outcomes of young people from the diverse backgrounds found within these east London.
This proposal is for 14- to 19-year-olds from all backgrounds and abilities, who can benefit from the partnership with employers and universities. Its focus will be on high-quality teaching with an emphasis on STEM subjects. Student will benefit from practical sessions and enrichment activities and apply them to real life situations. Work placements will be built into their timetable so they gain valuable experience and skills which will give them an advantage in future job and university applications.
The ethos of the college is designed to prepare students for the world of work and higher education. It will operate in business hours and a longer working year of 39 weeks. Students will wear business dress and work on live-project briefs set by employers.
This secondary free school will specialise in English. It has been proposed by an existing academy sponsor, East Norfolk Academies Trust, led by Rachel De Souza, its CEO and an inspirational school leader with a track record in transforming schools.
The college will follow the national curriculum, with an emphasis on traditional academic subjects, and pupils will take GCSEs and the English Baccalaureate. There will be a focus on high academic achievement and cultural literacy and pupils will have the option to study Latin. The college will have a joint sixth-form with the Sir Isaac Newton Sixth Form Free School, which is opening in September 2013.
These are 2 proposals from the NAS for 4- to 19-year-olds with autism. The NAS already has a free school set to open in Reading in September 2013.
They will focus on core subjects - English, maths, science and ICT – and will offer GCSEs and A Levels, as well as AQA and ASDAN functional skills qualifications. Pupils will also be taught life skills and social communication.
This will be a co-educational, Sikh school in Coventry for 4- to 16-year-olds. The proposer group, the Sevak Education Trust was formed by a group of parents and community members who have lived and studied in Coventry. The group aims to deliver excellent educational development through a framework supporting the wellbeing of all pupils.
They plan to follow the national curriculum in English and science at key stages 1 and 2. They will deliver the ‘Math in Focus’ curriculum - the Singaporean model used to great effect by Ark Schools. At key stage 3 they will deliver an ‘enhanced national curriculum’ over 2 years which will allow them to focus on GCSEs (including the EBacc) and BTEC courses for 3 years. The school will also offer catch up sessions for pupils who fall behind and Saturday enrichment and extra-curricular activities for all pupils
Central newsdesk 020 7783 8300
General enquiries 0370 000 2288
Published: 22 May 2013


Contents
- Get the README
- Get contents
- Create a file
- Update a file
- Delete a file
- Get archive link
- Custom media types
These API methods let you retrieve the contents of files within a repository as Base64 encoded content. See media types for requesting the raw format or rendered HTML (when supported).
Get the README
This method returns the preferred README for a repository.
GET /repos/:owner/:repo/readme
READMEs support custom media types for retrieving the raw content or rendered HTML.
Parameters
| Name | Type | Description |
|---|---|---|
ref |
string |
The name of the commit/branch/tag. Default: the repository’s default branch (usually master ) |
Response
Status: 200 OK
{
"type": "file",
"encoding": "base64",
"size": 5362,
"name": "README.md",
"path": "README.md",
"content": "encoded content ...",
"sha": "3d21ec53a331a6f037a91c368710b99387d012c1",
"url": "https://api.github.com/repos/octokit/octokit.rb/contents/README.md",
"git_url": "https://api.github.com/repos/octokit/octokit.rb/git/blobs/3d21ec53a331a6f037a91c368710b99387d012c1",
"html_url": "https://github.com/octokit/octokit.rb/blob/master/README.md",
"download_url": "https://raw.githubusercontent.com/octokit/octokit.rb/master/README.md",
"_links": {
"git": "https://api.github.com/repos/octokit/octokit.rb/git/blobs/3d21ec53a331a6f037a91c368710b99387d012c1",
"self": "https://api.github.com/repos/octokit/octokit.rb/contents/README.md",
"html": "https://github.com/octokit/octokit.rb/blob/master/README.md"
}
}
Get contents
This method returns the contents of a file or directory in a repository.
GET /repos/:owner/:repo/contents/:path
Files and symlinks support a custom media type for retrieving the raw content or rendered HTML (when supported). All content types support a custom media type to ensure the content is returned in a consistent object format.
Note:
- To get a repository's contents recursively, you can recursively get the tree.
- This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the Git Trees API.
- This API supports files up to 1 megabyte in size.
Parameters
| Name | Type | Description |
|---|---|---|
path |
string |
The content path. |
ref |
string |
The name of the commit/branch/tag. Default: the repository’s default branch (usually master ) |
Response if content is a file
Status: 200 OK
{
"type": "file",
"encoding": "base64",
"size": 5362,
"name": "README.md",
"path": "README.md",
"content": "encoded content ...",
"sha": "3d21ec53a331a6f037a91c368710b99387d012c1",
"url": "https://api.github.com/repos/octokit/octokit.rb/contents/README.md",
"git_url": "https://api.github.com/repos/octokit/octokit.rb/git/blobs/3d21ec53a331a6f037a91c368710b99387d012c1",
"html_url": "https://github.com/octokit/octokit.rb/blob/master/README.md",
"download_url": "https://raw.githubusercontent.com/octokit/octokit.rb/master/README.md",
"_links": {
"git": "https://api.github.com/repos/octokit/octokit.rb/git/blobs/3d21ec53a331a6f037a91c368710b99387d012c1",
"self": "https://api.github.com/repos/octokit/octokit.rb/contents/README.md",
"html": "https://github.com/octokit/octokit.rb/blob/master/README.md"
}
}
Response if content is a directory
The response will be an array of objects, one object for each item in the directory.
When listing the contents of a directory, submodules have their "type" specified as "file". Logically, the value should be "submodule". This behavior exists in API v3 for backwards compatibility purposes. In the next major version of the API, the type will be returned as "submodule".
Status: 200 OK
[
{
"type": "file",
"size": 625,
"name": "octokit.rb",
"path": "lib/octokit.rb",
"sha": "fff6fe3a23bf1c8ea0692b4a883af99bee26fd3b",
"url": "https://api.github.com/repos/octokit/octokit.rb/contents/lib/octokit.rb",
"git_url": "https://api.github.com/repos/octokit/octokit.rb/git/blobs/fff6fe3a23bf1c8ea0692b4a883af99bee26fd3b",
"html_url": "https://github.com/octokit/octokit.rb/blob/master/lib/octokit.rb",
"download_url": "https://raw.githubusercontent.com/octokit/octokit.rb/master/lib/octokit.rb",
"_links": {
"self": "https://api.github.com/repos/octokit/octokit.rb/contents/lib/octokit.rb",
"git": "https://api.github.com/repos/octokit/octokit.rb/git/blobs/fff6fe3a23bf1c8ea0692b4a883af99bee26fd3b",
"html": "https://github.com/octokit/octokit.rb/blob/master/lib/octokit.rb"
}
},
{
"type": "dir",
"size": 0,
"name": "octokit",
"path": "lib/octokit",
"sha": "a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d",
"url": "https://api.github.com/repos/octokit/octokit.rb/contents/lib/octokit",
"git_url": "https://api.github.com/repos/octokit/octokit.rb/git/trees/a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d",
"html_url": "https://github.com/octokit/octokit.rb/tree/master/lib/octokit",
"download_url": null,
"_links": {
"self": "https://api.github.com/repos/octokit/octokit.rb/contents/lib/octokit",
"git": "https://api.github.com/repos/octokit/octokit.rb/git/trees/a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d",
"html": "https://github.com/octokit/octokit.rb/tree/master/lib/octokit"
}
}
]
Response if content is a symlink
If the requested :path
points to a symlink, and the symlink's target is a normal file in the repository, then the API responds with the content of the file (in the format shown above).
Otherwise, the API responds with an object describing the symlink itself:
Status: 200 OK
{
"type": "symlink",
"target": "/path/to/symlink/target",
"size": 23,
"name": "some-symlink",
"path": "bin/some-symlink",
"sha": "452a98979c88e093d682cab404a3ec82babebb48",
"url": "https://api.github.com/repos/octokit/octokit.rb/contents/bin/some-symlink",
"git_url": "https://api.github.com/repos/octokit/octokit.rb/git/blobs/452a98979c88e093d682cab404a3ec82babebb48",
"html_url": "https://github.com/octokit/octokit.rb/blob/master/bin/some-symlink",
"download_url": "https://raw.githubusercontent.com/octokit/octokit.rb/master/bin/some-symlink",
"_links": {
"git": "https://api.github.com/repos/octokit/octokit.rb/git/blobs/452a98979c88e093d682cab404a3ec82babebb48",
"self": "https://api.github.com/repos/octokit/octokit.rb/contents/bin/some-symlink",
"html": "https://github.com/octokit/octokit.rb/blob/master/bin/some-symlink"
}
}
Response if content is a submodule
The submodule_git_url
identifies the location of the submodule repository, and the sha
identifies a specific commit within the submodule repository.
Git uses the given URL when cloning the submodule repository, and checks out the submodule at that specific commit.
If the submodule repository is not hosted on github.com, the Git URLs (git_url
and _links["git"]
) and the github.com URLs (html_url
and _links["html"]
) will have null values.
Status: 200 OK
{
"type": "submodule",
"submodule_git_url": "git://github.com/jquery/qunit.git",
"size": 0,
"name": "qunit",
"path": "test/qunit",
"sha": "6ca3721222109997540bd6d9ccd396902e0ad2f9",
"url": "https://api.github.com/repos/jquery/jquery/contents/test/qunit?ref=master",
"git_url": "https://api.github.com/repos/jquery/qunit/git/trees/6ca3721222109997540bd6d9ccd396902e0ad2f9",
"html_url": "https://github.com/jquery/qunit/tree/6ca3721222109997540bd6d9ccd396902e0ad2f9",
"download_url": null,
"_links": {
"git": "https://api.github.com/repos/jquery/qunit/git/trees/6ca3721222109997540bd6d9ccd396902e0ad2f9",
"self": "https://api.github.com/repos/jquery/jquery/contents/test/qunit?ref=master",
"html": "https://github.com/jquery/qunit/tree/6ca3721222109997540bd6d9ccd396902e0ad2f9"
}
}
Create a file
This method creates a new file in a repository
PUT /repos/:owner/:repo/contents/:path
Parameters
| Name | Type | Description |
|---|---|---|
path |
string |
Required. The content path. |
message |
string |
Required. The commit message. |
content |
string |
Required. The new file content, Base64 encoded. |
branch |
string |
The branch name. Default: the repository’s default branch (usually master ) |
Optional Parameters
You can provide an additional committer
parameter, which is an object containing
information about the committer. Or, you can provide an author
parameter, which
is an object containing information about the author.
The author
section is optional and is filled in with the committer
information if omitted. If the committer
information is omitted, the authenticated
user's information is used.
You must provide values for both name
and email
, whether you choose to use
author
or committer
. Otherwise, you'll receive a 422
status code.
Both the author
and committer
parameters have the same keys:
| Name | Type | Description |
|---|---|---|
name |
string |
The name of the author (or committer) of the commit |
email |
string |
The email of the author (or committer) of the commit |
Example Input
{
"message": "my commit message",
"committer": {
"name": "Scott Chacon",
"email"<EMAIL_ADDRESS>},
"content": "bXkgbmV3IGZpbGUgY29udGVudHM="
}
Response
Status: 201 Created
{
"content": {
"name": "hello.txt",
"path": "notes/hello.txt",
"sha": "95b966ae1c166bd92f8ae7d1c313e738c731dfc3",
"size": 9,
"url": "https://api.github.com/repos/octocat/Hello-World/contents/notes/hello.txt",
"html_url": "https://github.com/octocat/Hello-World/blob/master/notes/hello.txt",
"git_url": "https://api.github.com/repos/octocat/Hello-World/git/blobs/95b966ae1c166bd92f8ae7d1c313e738c731dfc3",
"download_url": "https://raw.githubusercontent.com/octocat/HelloWorld/master/notes/hello.txt",
"type": "file",
"_links": {
"self": "https://api.github.com/repos/octocat/Hello-World/contents/notes/hello.txt",
"git": "https://api.github.com/repos/octocat/Hello-World/git/blobs/95b966ae1c166bd92f8ae7d1c313e738c731dfc3",
"html": "https://github.com/octocat/Hello-World/blob/master/notes/hello.txt"
}
},
"commit": {
"sha": "7638417db6d59f3c431d3e1f261cc637155684cd",
"url": "https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd",
"html_url": "https://github.com/octocat/Hello-World/git/commit/7638417db6d59f3c431d3e1f261cc637155684cd",
"author": {
"date": "2014-11-07T22:01:45Z",
"name": "Scott Chacon",
"email"<EMAIL_ADDRESS>},
"committer": {
"date": "2014-11-07T22:01:45Z",
"name": "Scott Chacon",
"email"<EMAIL_ADDRESS>},
"message": "my commit message",
"tree": {
"url": "https://api.github.com/repos/octocat/Hello-World/git/trees/691272480426f78a0138979dd3ce63b77f706feb",
"sha": "691272480426f78a0138979dd3ce63b77f706feb"
},
"parents": [
{
"url": "https://api.github.com/repos/octocat/Hello-World/git/commits/1acc419d4d6a9ce985db7be48c6349a0475975b5",
"html_url": "https://github.com/octocat/Hello-World/git/commit/1acc419d4d6a9ce985db7be48c6349a0475975b5",
"sha": "1acc419d4d6a9ce985db7be48c6349a0475975b5"
}
]
}
}
Update a file
This method updates a file in a repository
PUT /repos/:owner/:repo/contents/:path
Parameters
| Name | Type | Description |
|---|---|---|
path |
string |
Required. The content path. |
message |
string |
Required. The commit message. |
content |
string |
Required. The updated file content, Base64 encoded. |
sha |
string |
Required. The blob SHA of the file being replaced. |
branch |
string |
The branch name. Default: the repository’s default branch (usually master ) |
Optional Parameters
You can provide an additional committer
parameter, which is an object containing
information about the committer. Or, you can provide an author
parameter, which
is an object containing information about the author.
The author
section is optional and is filled in with the committer
information if omitted. If the committer
information is omitted, the authenticated
user's information is used.
You must provide values for both name
and email
, whether you choose to use
author
or committer
. Otherwise, you'll receive a 422
status code.
Both the author
and committer
parameters have the same keys:
| Name | Type | Description |
|---|---|---|
name |
string |
The name of the author (or committer) of the commit |
email |
string |
The email of the author (or committer) of the commit |
Example Input
{
"message": "my commit message",
"committer": {
"name": "Scott Chacon",
"email"<EMAIL_ADDRESS>},
"content": "bXkgdXBkYXRlZCBmaWxlIGNvbnRlbnRz",
"sha": "329688480d39049927147c162b9d2deaf885005f"
}
Response
Status: 200 OK
{
"content": {
"name": "hello.txt",
"path": "notes/hello.txt",
"sha": "95b966ae1c166bd92f8ae7d1c313e738c731dfc3",
"size": 9,
"url": "https://api.github.com/repos/octocat/Hello-World/contents/notes/hello.txt",
"html_url": "https://github.com/octocat/Hello-World/blob/master/notes/hello.txt",
"git_url": "https://api.github.com/repos/octocat/Hello-World/git/blobs/95b966ae1c166bd92f8ae7d1c313e738c731dfc3",
"download_url": "https://raw.githubusercontent.com/octocat/HelloWorld/master/notes/hello.txt",
"type": "file",
"_links": {
"self": "https://api.github.com/repos/octocat/Hello-World/contents/notes/hello.txt",
"git": "https://api.github.com/repos/octocat/Hello-World/git/blobs/95b966ae1c166bd92f8ae7d1c313e738c731dfc3",
"html": "https://github.com/octocat/Hello-World/blob/master/notes/hello.txt"
}
},
"commit": {
"sha": "7638417db6d59f3c431d3e1f261cc637155684cd",
"url": "https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd",
"html_url": "https://github.com/octocat/Hello-World/git/commit/7638417db6d59f3c431d3e1f261cc637155684cd",
"author": {
"date": "2014-11-07T22:01:45Z",
"name": "Scott Chacon",
"email"<EMAIL_ADDRESS>},
"committer": {
"date": "2014-11-07T22:01:45Z",
"name": "Scott Chacon",
"email"<EMAIL_ADDRESS>},
"message": "my commit message",
"tree": {
"url": "https://api.github.com/repos/octocat/Hello-World/git/trees/691272480426f78a0138979dd3ce63b77f706feb",
"sha": "691272480426f78a0138979dd3ce63b77f706feb"
},
"parents": [
{
"url": "https://api.github.com/repos/octocat/Hello-World/git/commits/1acc419d4d6a9ce985db7be48c6349a0475975b5",
"html_url": "https://github.com/octocat/Hello-World/git/commit/1acc419d4d6a9ce985db7be48c6349a0475975b5",
"sha": "1acc419d4d6a9ce985db7be48c6349a0475975b5"
}
]
}
}
Delete a file
This method deletes a file in a repository
DELETE /repos/:owner/:repo/contents/:path
Parameters
| Name | Type | Description |
|---|---|---|
path |
string |
Required. The content path. |
message |
string |
Required. The commit message. |
sha |
string |
Required. The blob SHA of the file being replaced. |
branch |
string |
The branch name. Default: the repository’s default branch (usually master ) |
Optional Parameters
You can provide an additional committer
parameter, which is an object containing
information about the committer. Or, you can provide an author
parameter, which
is an object containing information about the author.
The author
section is optional and is filled in with the committer
information if omitted. If the committer
information is omitted, the authenticated
user's information is used.
You must provide values for both name
and email
, whether you choose to use
author
or committer
. Otherwise, you'll receive a 422
status code.
Both the author
and committer
parameters have the same keys:
| Name | Type | Description |
|---|---|---|
name |
string |
The name of the author (or committer) of the commit |
email |
string |
The email of the author (or committer) of the commit |
Example Input
{
"message": "my commit message",
"committer": {
"name": "Scott Chacon",
"email"<EMAIL_ADDRESS>},
"sha": "329688480d39049927147c162b9d2deaf885005f"
}
Response
Status: 200 OK
{
"content": null,
"commit": {
"sha": "7638417db6d59f3c431d3e1f261cc637155684cd",
"url": "https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd",
"html_url": "https://github.com/octocat/Hello-World/git/commit/7638417db6d59f3c431d3e1f261cc637155684cd",
"author": {
"date": "2014-11-07T22:01:45Z",
"name": "Scott Chacon",
"email"<EMAIL_ADDRESS>},
"committer": {
"date": "2014-11-07T22:01:45Z",
"name": "Scott Chacon",
"email"<EMAIL_ADDRESS>},
"message": "my commit message",
"tree": {
"url": "https://api.github.com/repos/octocat/Hello-World/git/trees/691272480426f78a0138979dd3ce63b77f706feb",
"sha": "691272480426f78a0138979dd3ce63b77f706feb"
},
"parents": [
{
"url": "https://api.github.com/repos/octocat/Hello-World/git/commits/1acc419d4d6a9ce985db7be48c6349a0475975b5",
"html_url": "https://github.com/octocat/Hello-World/git/commit/1acc419d4d6a9ce985db7be48c6349a0475975b5",
"sha": "1acc419d4d6a9ce985db7be48c6349a0475975b5"
}
]
}
}
Get archive link
This method will return a 302
to a URL to download a tarball
or zipball archive for a repository. Please make sure your HTTP framework
is configured to follow redirects or you will need to use the Location
header
to make a second GET
request.
Note: For private repositories, these links are temporary and expire quickly.
GET /repos/:owner/:repo/:archive_format/:ref
Parameters
| Name | Type | Description |
|---|---|---|
archive_format |
string |
Can be either tarball or zipball . Default: tarball
|
ref |
string |
A valid Git reference. Default: the repository’s default branch (usually master ) |
Response
Status: 302 Found
Location: https://codeload.github.com/me/myprivate/legacy.zip/master?login=me&token=thistokenexpires
To follow redirects with curl, use the -L
switch:
$curl -L https://api.github.com/repos/octokit/octokit.rb/tarball > octokit.tar.gz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 206k 100 206k 0 0 146k 0 0:00:01 0:00:01 --:--:-- 790k
Custom media types
READMEs, files, and symlinks support the following custom media types:
application/vnd.github.VERSION.raw
application/vnd.github.VERSION.html
Use the .raw
media type to retrieve the contents of the file.
For markup files such as Markdown or AsciiDoc, you can retrieve the rendered HTML using the .html
media type. Markup languages are rendered to HTML using our open-source Markup library.
All objects support the following custom media type:
application/vnd.github.VERSION.object
Use the object
media type parameter to retrieve the contents in a consistent object format regardless of the content type. For example, instead of an array of objects
for a directory, the response will be an object with an entries
attribute containing the array of objects.
You can read more about the use of media types in the API here.


Born on 7th of September 1939 near
Vladivostok in Russia to a WW2 aircraft fighter
father and a nurse mother.
He enrolled at Kiev Higher Engineering
Radio-Technical College and after graduating in 1972,
joined the Soviet Air Defence Forces.
In the early 1970s, he was assigned to the
organization that oversaw the new early warning
system intended to detect ballistic missile attacks
from NATO countries.
He received no reward. According to him, this was
because the incident and other bugs found in the
missile detection system embarrassed his superiors
and the scientists who were responsible for it, so
that if he had been officially rewarded, they would
have had to be punished.


This utility allows you to lookup all of the Forks of a Github Repository and sort them by popularity. It uses's Github's v4 GraphQL API & the OAuth Application Webflow, which means you'll have to give the site permission to lookup Repositories on your behalf.
Authorize via Github


High Scores
Ready to display your true coding genius?
Whatever it takes!
Your score:
Save Score
Rematch


The Indian Premier League is a professional Twenty20 cricket league in India contested during March or April and May of every year by eight teams representing eight different cities or states in India.
The league was founded by the Board of Control for Cricket in India in 2008.
Hello and Welcome!


Planned maintenance
The Digital Marketplace is unavailable because of planned maintenance. It’ll be available again soon.
If you need help urgently, email<EMAIL_ADDRESS>The Digital Marketplace is unavailable because of planned maintenance. It’ll be available again soon.
If you need help urgently, email enquiries@digitalmarketplace.service.gov.uk.


{%- include snippets/get-sources.html -%} {%- assign _sources = __return -%} {%- include snippets/get-nav-url.html path="/assets/search.js" -%} {%- assign _paths_search_js = __return -%}


Hello guys this is Anas Jawad , Ex Journalist and also I worked for many years in the management and operation field, I worked in many different cities between Jordan and UAE I was dealing as well with many companies from China, Japan, Germany, Italy…etc.
I visited more than 25 countries between Europe and Asia.
I have friends from many cultures different backgrounds and countries from there I learned how to respect other cultures and learn something useful.
The top ten Series and movies for me
- Vikings
- Game of Thrones
- La Casa de papel
- Forrest Gump
- The Last Kingdom
- Titanic
- Bohemian Rhapsody
- Narcos
- Gone Girl
- Lucifer


(G)I-DLE drops MV teaser for 'Lion'
by olmal(G)I-DLE has revealed a stunning music video teaser for their song 'Lion'.
The group has recently stunned the audience with their performance of 'Lion' on 'Queendom', and this teaser is another stunner. The full music video will be released on November 4 at 12 AM KST.
In the meantime, check the teaser out above!


client-side SQLite?
It began with a seemingly-simple question: How can I query my database
without having to run a database server on my server?
The most straightforward answer to the question is to make clients download the whole database and query it, which becomes impractical as the database grows.
My solution is, using sql.js (SQLite compiled to JavaScript through Emscripten), download the database as the database file is accessed. Laziness is achieved by HTTP Range requests.
I think the real significance of this project is how it reduces the cost of running a service that requires a database. Given the prevalence of free static file hosting services (e.g. GitHub pages, Netlify), the need for renting a server for the database server is eliminated.
Decentralised networks such as IPFS can also benefit from client-side databases for the same reasons stated above. "Client"-side database access fits closer to the peer-to-peer toppology of such networks as opposed to a client-server model of the (traditional) Web.
While the solution presented here is much more efficient (in terms of data transfer) than pushing the whole database to the clients, it is still significantly less efficient than returning the results of a query only. Though it must be noted that subsequent queries often do not need more to be downloaded so on average it shall compensate.
File system access will still be faster, so if your intended use case is to retrieve rows by their unique identifiers, you might want to consider using a directory structure where rows are represented as files and are identified by the information embedded in their path.
sql.js is still not mature enough to be fully reliable, so its use is discouraged for critical services. You might also encounter problems with large databases (> 1 GiB, approximately) for reasons currently unknown.
Lastly, this offers a read-only access to the database so modifications would not be possible.
I've already submitted a PR! =) See kripken/sql.js#278. Also feel free to take a peek at the source code of this.
Feel free to contact me if you need further help: bora et boramalper dot org
Bora M. Alper, me, a computer science student in The University of Edinburgh. Developed in Bodrum using the excess sunlight.
Also see my GitHub: https://github.com/boramalper


CALENDAR(1) BSD General Commands Manual CALENDAR(1) NAME calendar — reminder service SYNOPSIS calendar [-ab] [-A num] [-B num] [-l num] [-w num] [-f calendarfile] [-t [[[cc]yy]mm]dd] DESCRIPTION The calendar utility checks the current directory or the directory speci‐ fied by the CALENDAR_DIR environment variable for a file named calendar and displays lines that begin with either today's date or tomorrow's. On Fri‐ days, events on Friday through Monday are displayed. The options are as follows: -A num Print lines from today and next num days (forward, future). Defaults to one. (same as -l) -a Process the “calendar” files of all users and mail the results to them. This requires superuser privileges. -B num Print lines from today and previous num days (backward, past). -b Enforce special date calculation mode for KOI8 calendars. -l num Print lines from today and next num days (forward, future). Defaults to one. (same as -A) -w num Print lines from today and next num days, only if today is Friday (forward, future). Defaults to two, which causes calendar to print entries through the weekend on Fridays. -f calendarfile Use calendarfile as the default calendar file. -t [[[cc]yy]mm]dd Act like the specified value is “today” instead of using the cur‐ rent date. If yy is specified, but cc is not, a value for yy between 69 and 99 results in a cc value of 19. Otherwise, a cc value of 20 is used. To handle calendars in your national code table you can specify “LANG=<locale_name>” in the calendar file as early as possible. To handle national Easter names in the calendars, “Easter=<national_name>” (for Catholic Easter) or “Paskha=<national_name>” (for Orthodox Easter) can be used. A special locale name exists: ‘utf-8’. Specifying “LANG=utf-8” indicates that the dates will be read using the C locale, and the descriptions will be encoded in UTF-8. This is usually used for the distributed calendar files. The “CALENDAR” variable can be used to specify the style. Only ‘Julian’ and ‘Gregorian’ styles are currently supported. Use “CALENDAR=” to return to the default (Gregorian). To enforce special date calculation mode for Cyrillic calendars you should specify “LANG=<local_name>” and “BODUN=<bodun_prefix>” where <local_name> can be ru_RU.KOI8-R, uk_UA.KOI8-U or by_BY.KOI8-B. Note that the locale is reset to the user's default for each new file that is read. This is so that locales from one file do not accidentally carry over into another file. Other lines should begin with a month and day. They may be entered in almost any format, either numeric or as character strings. If proper locale is set, national months and weekdays names can be used. A single asterisk (`*') matches every month. A day without a month matches that day of every week. A month without a day matches the first of that month. Two numbers default to the month followed by the day. Lines with leading tabs default to the last entered date, allowing multiple line specifications for a single date. “Easter” (may be followed by a positive or negative inte‐ ger) is Easter for this year. “Paskha” (may be followed by a positive or negative integer) is Orthodox Easter for this year. Weekdays may be fol‐ lowed by “-4” ... “+5” (aliases last, first, second, third, fourth) for moving events like “the last Monday in April”. By convention, dates followed by an asterisk (‘*’) are not fixed, i.e., change from year to year. Day descriptions start after the first <tab> character in the line; if the line does not contain a <tab> character, it isn't printed out. If the first character in the line is a <tab> character, it is treated as the con‐ tinuation of the previous description. The calendar file is preprocessed by cpp(1), allowing the inclusion of shared files such as company holidays or meetings. If the shared file is not referenced by a full pathname, cpp(1) searches in the current (or home) directory first, and then in the directory directory /etc/calendar, and finally in /usr/share/calendar. Empty lines and lines protected by the C commenting syntax (/* ... */) are ignored. Some possible calendar entries (a \t sequence denotes a <tab> character): LANG=C Easter=Ostern #include <calendar.usholiday> #include <calendar.birthday> 6/15\tJune 15 (if ambiguous, will default to month/day). Jun. 15\tJune 15. 15 June\tJune 15. Thursday\tEvery Thursday. June\tEvery June 1st. 15 *\t15th of every month. May Sun+2\tsecond Sunday in May (Muttertag) 04/SunLast\tlast Sunday in April, \tsummer time in Europe Easter\tEaster Ostern-2\tGood Friday (2 days before Easter) Paskha\tOrthodox Easter FILES calendar File in current directory. ~/.calendar Directory in the user's home directory (which calendar changes into, if it exists). ~/.calendar/calendar File to use if no calendar file exists in the current directory. ~/.calendar/nomail calendar will not send mail if this file exists. calendar.all International and national calendar files. calendar.birthday Births and deaths of famous (and not-so-famous) peo‐ ple. calendar.christian Christian holidays (should be updated yearly by the local system administrator so that roving holidays are set correctly for the current year). calendar.computer Days of special significance to computer people. calendar.croatian Croatian calendar. calendar.discord Discordian calendar (all rites reversed). calendar.fictional Fantasy and fiction dates (mostly LOTR). calendar.french French calendar. calendar.german German calendar. calendar.history Miscellaneous history. calendar.holiday Other holidays (including the not-well-known, obscure, and really obscure). calendar.judaic Jewish holidays (should be updated yearly by the local system administrator so that roving holidays are set correctly for the current year). calendar.music Musical events, births, and deaths (strongly oriented toward rock n' roll). calendar.openbsd OpenBSD related events. calendar.pagan Pagan holidays, celebrations and festivals. calendar.russian Russian calendar. calendar.space Cosmic history. calendar.ushistory U.S. history. calendar.usholiday U.S. holidays. calendar.world World wide calendar. SEE ALSO at(1), cal(1), cpp(1), mail(1), cron(8) STANDARDS The calendar program previously selected lines which had the correct date anywhere in the line. This is no longer true: the date is only recognized when it occurs at the beginning of a line. COMPATIBILITY The calendar command will only display lines that use a <tab> character to separate the date and description, or that begin with a <tab>. This is dif‐ ferent than in previous releases. The -t flag argument syntax is from the original FreeBSD calendar program. The -l and -w flags are Debian-specific enhancements. Also, the original calendar program did not accept 0 as an argument to the -A flag. Using ‘utf-8’ as a locale name is a Debian-specific enhancement. HISTORY A calendar command appeared in Version 7 AT&T UNIX. BUGS calendar doesn't handle all Jewish holidays or moon phases. BSD October 8, 2016 BSD


This page list events for the set of .NET user group meetups that we found on meetup.com. We hope that you find this list helpful, particularly if you are looking for a local user group. If you would like your group's events listed here (even if not on meetup), please contact us, either by twitter or the "Contact" button on the right-hand side of this page.
You can see the list of user groups that we found on meetup, by taking a look at the dotnet meetup account. We also maintain a much larger list of .NET meetup groups on twitter. Once again, please contact us if your group should be on either of those lists.


Health Now
Health signs are in normal range.
Mike Smith
96
beats per minute
78
body temperature
90 | 60
mmHg
10
breaths per minute
16
percent body fat
190
body weight
5'9
body height
85
percent hydration
5,870,980
total eng consumption


THE VIRGIN SUICIDES A film review by David N. Butterworth Copyright 2000 David N. Butterworth
***1/2 (out of ****)
When Sofia Coppola landed the key role as Mary Corleone in the final chapter of her father Francis Ford Coppola's legendary "Godfather" trilogy, the cries of nepotism could be heard as far away as the Hollywood Hills. Overt familial favoritism notwithstanding, the greater outcry was that Sofia simply wasn't good enough and for many, single-handedly ruined the picture.
In the ten years since "The Godfather: Part III," the 29-year-old actress has had few film roles--she's appeared as Cindy in "Inside Monkey Zetterland," as herself in Dad's documentary "Hearts of Darkness: A Filmmaker's Apocalypse," and as Saché in last year's "Star Wars" prequel to name the sum-total. In short, she's done very little and failed to make much of an impression.
But with "The Virgin Suicides," all that is about to change.
Switching to behind the camera as both writer and director, Coppola might well have found her niche. Skeptics will be quick to question just how much of the finished product is Sofia's handiwork, given her bloodline and insider connections, but the film plays very much *unlike* a Francis Ford Coppola movie and in some ways that's a finer compliment than calling her a chip off the old block.
"The Virgin Suicides" is a deliberately-paced (or "slow" if you're predisposed to cynicism) gothic fantasy about the ill-fated Lisbon sisters--Cecilia, Bonnie, Lux, Mary, and Therese--told from the vantage of the neighborhood boys who worshipped them from afar. It's a fragile and delicate affair, as fragile and delicate as the teenage female condition it examines. The film shimmers, breathes, and moves both on air and with Air, since it's scored by the French avant-pop duo with a sparing insistence.
The film is all the better for posing more questions than answers, since its theme--the universal dilemma of young women struggling with their blossoming sexuality--is not easily concluded. The five young actresses, among them Kirsten Dunst as the bold Lux, are fabulous, as are veterans James Woods and a surrealistically frumpy-looking Kathleen Turner as their parents. Woods, especially, is remarkable since he rarely plays soft and his Mr. Lisbon is a treasure of paternal quirks and insecurities.
Behind the lens, Coppola's direction is sure-footed, her pacing perfect. And the power, wit, and calculated efficacy of her insightful screenplay (based on the novel by Jeffrey Eugenides) can best be summed up by a single line of dialogue. Shortly after her first failed suicide attempt, the youngest Lisbon daughter tells a male caregiver who falsely assumes that everything is OK now "obviously, doctor, you've never been a 13-year-old girl."
Watching the splendid "The Virgin Suicides," it's quite obvious that Sofia Coppola has.
-- David N. Butterworth<EMAIL_ADDRESS>Got beef? Visit "La Movie Boeuf" online at http://members.dca.net/dnb
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


int Directory Reference
Files | |
| file | arithmetic.cc [code] |
| file | basic.cc [code] |
| file | bool.cc [code] |
| file | channel.cc [code] |
| file | circuit.cc [code] |
| file | count.cc [code] |
| file | distinct.cc [code] |
| file | dom.cc [code] |
| file | element.cc [code] |
| file | extensional.cc [code] |
| file | gcc.cc [code] |
| file | linear.cc [code] |
| file | mm-arithmetic.cc [code] |
| file | mm-bool.cc [code] |
| file | mm-count.cc [code] |
| file | mm-lin.cc [code] |
| file | mm-rel.cc [code] |
| file | rel.cc [code] |
| file | scheduling.cc [code] |
| file | sorted.cc [code] |
| file | unshare.cc [code] |


Hi, I am Rijul, presently pursuing my Masters in Data Science at the University of Southern California. I am a huge fan of making computers learn complex tasks. My interests range from machine learning, Natural Language Processing, and creating a knowledge base through information retrieval, entity resolution.
I would be happy to connect with you to talk about Machine Learning, Deep Learning, Natural Language Processing, Knowledge Graphs or AI in general.
Table Linker: Entity Linking System for linking tables to Wikidata
1. Developed algorithm for candidate generation for entities in a table. Improved recall from 0.905 to 0.986
2. Trained and tuned Pairwise Contrastive Loss Neural Network for Candidate Ranking
3. Achieved top 1 score of 0.902 on T2DV2 tables and 0.87 on Semtab Round 4 tables
Harmonize:
1. Worked on creating a linked data source for Drugs using Wikidata and RxNorm
2. Developed a pipeline to generate RDF triples and load them to Blazegraph, containerized application using Docker
3. Indexed entities of the drug subgraph using ElasticSearch, and used it for string search based on exact match and fuzzy match
4. Indexed 92 million data items from wikidata, wikipedia using Elasticsearch
5. Contributed to open source projects: KGTK and table-linker
FAIRification of Data:
1. Cleaned dirty transaction data by developing Linked Master Data Management using Wikibase infrastructure.
2. Optimized reconciliation using OpenRefine. Achieved speedup by 50%.
3. Achieved an overall precision of 85% on linking parsed entities to Q nodes in Wikidata using Wikidata-Wikifier
4. Streamlined reconciliation process for data curators by integrating Wikidata-Wikifier backend with OpenRefine UI.
5. Devised pipeline to validate shape of new entities that are added to Wikibase allowing manual curation.
Business Open Knowledge Network:
1. Developed broad crawler to crawl 100,000 company’s webpage extracting information about Mergers and Acquisition.
2. Achieved recall of 69% on extracting names of target and acquirer companies.
3. Extracted customer relations from Capital IQ database for 20 years(2000 - 2020) using Snorkel. Achieved an F1 score of 68.1%
Worked on project to predict the wheat yield in 5 states of the United States.
1. Data Collection: Collected Tabular data, independent variables were mostly weather parameters and dependent variable was yield. Dataset collected was for counties in 5 states of the United States.
2. Data Exploration: Got insight of data using python libraries - pandas, matplotlib.
3. Feature Engineering: Engineered new features based on insights gained from data exploration step. Fabricated new features using statistical techniques.
4. Model Building: Established and compared performance of Machine Learning models - Random Forest Regressor, Gradient Boosting Regressor and Artificial Neural Network. GBM gave best performance.
1. Built a Knowledge Graph for Video Games and the System Requirements.
2. Designed a scoring function to do entity linking between Games extracted from different data sources.
3. Also worked on recommending games to the user based on not only the games the user likes
but also based on what the user can actually run on his system. Used fastText word vectors
for the recommendation systems.
4. The KG also links the online platform where the game can be found for the cheapest price.
1. This is a self learning task to learn and implement different architectures of Seq2Seq model used for Machine Translation
2. The machine translation task worked on was to convert text in German language to English
3. Till now, I have experimented with vanilla Seq2Seq model using LSTM, implemented
Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translation and
used Attention for the task
1. This was a Kaggle Competition namely Career Con 2019. It involved prdicting the surface on which the robot is standing.
2. The link for the competition is: https://www.kaggle.com/c/career-con-2019/overview.
3. You can also read more about the project here: .
This work involves extracting the educational institutions where an actor completed his/her education. The corpus used for this relation extraction task is the crawled biography of cast from IMDB.
View ProjectThis work crawls information about movies from the IMDB site. The crawler is written using Scrapy in Python
View ProjectThis task involves entity resolution of movies from the IMDB database and AFI database. It creates a node for each movie in IMDB and adds properties for the same movie from the AFI database.
This task also involves creating RDF triples for the resulting dataset.
View ProjectThis was a Kaggle Competition. Although I could not participate in the competition while it was running but I worked out on the problem later. The problem is multi-classification problem wherein we have to predict the surface on which the robot is standing.
View BlogThis blog aims at explaining everything about convolutionl neural networks. Have fun reading it and do let me know if you have any comments.
View Blog


|
Island Racer
1.0
A small qt-based Racegame
|
Creates a car with interact methods. More...
#include <car.h>
Public Slots | |
| void | setToResetPos () |
| void | setCarPixmap (int carIndex) |
Signals | |
| void | playCarSound () |
| Signal to start car sound. More... | |
| void | playWaterSound () |
| Signal to start water sound. More... | |
| void | startUnderwaterEffect (int index) |
| Signal to start the underwater effect if user drove into water. More... | |
| void | stopCarSound () |
| Signal to stop car sound. More... | |
Public Member Functions | |
| Car (b2World *world, Track *track) | |
| Fill the world with car object. More... | |
| ~Car () | |
| void | render () |
| Show the car on screen. More... | |
| void | killOrthogonalVelocity (b2Body *targetBody) |
| Let wheels only roll "forward". More... | |
| void | computeDriving () |
| Compute the driving force. More... | |
| void | computeSteering () |
| Compute the joint motor torque. More... | |
| void | computeSwirl () |
| Compute angular velocity for swirl animation. More... | |
| void | computeUserInput (enum InputState input) |
| Compute events on which key pressed. More... | |
| void | computeUndergroundImpact (int index) |
| Compute the different impact to the car. More... | |
| void | updatePosition (int index, bool underwaterAnimationActive) |
| New car position for each time step is calculated. More... | |
| void | setPosition (int x, int y, double angle) |
| New car is created and set to position. More... | |
| void | setPosition (WorldPosition position) |
| Set car to position. More... | |
| void | setCarParams (int speedValue, int accelerationValue, int handlingValue) |
| Calculate parameter with "garage" values that impact car values. More... | |
Creates a car with interact methods.
| Car::Car | ( | b2World * | world, |
| Track * | track | ||
| ) |
Fill the world with car object.
| Car::~Car | ( | ) |
| void Car::computeDriving | ( | ) |
Compute the driving force.
| void Car::computeSteering | ( | ) |
Compute the joint motor torque.
| void Car::computeSwirl | ( | ) |
Compute angular velocity for swirl animation.
| void Car::computeUndergroundImpact | ( | int | index | ) |
Compute the different impact to the car.
| index | Number of player (1 or 2) |
| void Car::computeUserInput | ( | enum InputState | input | ) |
Compute events on which key pressed.
| void Car::killOrthogonalVelocity | ( | b2Body * | targetBody | ) |
Let wheels only roll "forward".
|
signal |
Signal to start car sound.
|
signal |
Signal to start water sound.
| void Car::render | ( | ) |
Show the car on screen.
| void Car::setCarParams | ( | int | speedValue, |
| int | accelerationValue, | ||
| int | handlingValue | ||
| ) |
Calculate parameter with "garage" values that impact car values.
| speedValue | Garage value for topspeed |
| accelerationValue | Garage value for acceleration |
| handlingValue | Garage value for handling |
|
slot |
| void Car::setPosition | ( | int | x, |
| int | y, | ||
| double | angle | ||
| ) |
New car is created and set to position.
| x | x-coordinate |
| y | y-coordinate |
| angle | rotation angle |
| void Car::setPosition | ( | WorldPosition | position | ) |
Set car to position.
|
slot |
|
signal |
Signal to start the underwater effect if user drove into water.
|
signal |
Signal to stop car sound.
| void Car::updatePosition | ( | int | index, |
| bool | underwaterAnimationActive | ||
| ) |
New car position for each time step is calculated.
| index | Number of player (1 or 2) ! |
| underwaterAnimationActive | underwater effect running state |


NOTICE: This software (or technical data) was produced for the U.S. Government under contract, and is subject to the Rights in Data-General Clause 52.227-14, Alt. IV (DEC 2007). Copyright 2023 The MITRE Corporation. All Rights Reserved.
Introduction
This guide covers the derivative media feature, which allows users to create pipelines where a component in one of the initial stages of the pipeline generates one or more derivative (aka child) media from the source (aka parent) media. A common scenario is to extract images from PDFs or other document formats. Once extracted, the Workflow Manager (WFM) can perform the subsequent pipeline stages on the source media (if necessary) as well as the derivative media. This differs from typical pipeline execution, which only acts on one or more pieces of source media.
Component actions can be configured to only be performed on source media or derivative media. This is often necessary
because the source media has a different media type than the derivative media, and therefore different actions are
required to process each type of media. For example, PDFs are assigned the UNKNOWN
media type (since the WFM is not
designed to handle them in any special way), while the images extracted from a PDF are assigned the IMAGE
media type.
An action for the TikaTextDetection component can process the UNKNOWN
source media to generate TEXT
tracks by
detecting the embedded raw character data in the PDF itself, while an action for the TesseractOCRTextDetection component
can process the IMAGE
derivative media to generate TEXT
tracks by detecting text in the image data.
Text Detection Example
Consider the following diagram which depicts a pipeline to accomplish generating TEXT
tracks for PDFs which contain
embedded raw character data and embedded images with text:
Each block represents a single action performed in that stage of the pipeline. (Technically, a pipeline consists of
tasks executed in sequence, but in this case each task consists of only one action, so we just show the actions.)
Actions that have SOURCE MEDIA ONLY
in their name have the SOURCE_MEDIA_ONLY
property set to TRUE
, which will
result in completely skipping that action for derivative media. The component associated with the action will not
receive sub-job messages and there will be no representation of the action being executed on derivative media in the
JSON output object.
Similarly, actions that have DERIVATIVE MEDIA ONLY
in their name have the DERIVATIVE_MEDIA_ONLY
property set
to TRUE
, which will result in completely skipping that action for source media. Note that setting both properties
to TRUE
will result in skipping the action for both derivative and source media, which means it will never be
executed. Not setting either property will result in executing the action on both source and derivative media, as you
see in the diagram with the KEYWORD TAGGING
action.
Note that the actions shown in the source media flow and derivative media flow are not executed at the same time. The flows are shown in different rows in the diagram to illustrate the logical separation, not to illustrate concurrency. To be clear, each action in the pipeline is executed sequentially. If an action is missing from a flow it just means that no sub-job messages are generated for that kind of media during that stage of the pipeline. If an action is shown in both flows then sub-jobs will be performed on both the source and derivative media during that stage.
To break down each stage of this pipeline:
TIKA IMAGE DETECTION ACTION
: The TikaImageDetection component will extract images from PDFs (or other document formats) and place them in$MPF_HOME/share/tmp/derivative-media/<job-id>
. OneMEDIA
track will be generated for each image and it will haveDERIVATIVE_MEDIA_TEMP_PATH
andPAGE_NUM
track properties.- If remote storage is enabled, the WFM will upload the objects to the object store after this action is performed. Refer to the Object Storage Guide for more information.
- The WFM will perform media inspection on the images at this time.
- Each piece of derivative media will have a parent media id set to the media id value of the source media. It will
appear as
media.parentMediaId
in the JSON output object. For source media the value will be -1. - Each piece of derivative media will have a
media.mediaMetadata
property ofIS_DERIVATIVE_MEDIA
set toTRUE
. The metadata will also contain thePAGE_NUM
property. TIKA TEXT DETECTION SOURCE MEDIA ONLY ACTION
: The TikaTextDetection component will generateTEXT
tracks by detecting the embedded raw character data in the PDF.EAST TEXT DETECTION DERIVATIVE MEDIA ONLY ACTION
: The EastTextDetection component will generateTEXT REGION
tracks for each text region in the extracted images.TESSERACT OCR TEXT DETECTION (WITH FF REGION) DERIVATIVE MEDIA ONLY ACTION
: The TesseractOCRTextDetection component will generateTEXT
tracks by performing OCR on the text regions passed forward from the previous EAST action.KEYWORD TAGGING (WITH FF REGIONS) ACTION
: The KeywordTagging component will take theTEXT
tracks from the previousTIKA TEXT
andTESSERACT OCR
actions and perform keyword tagging. This will add theTAGS
,TRIGGER_WORDS
, andTRIGGER_WORDS_OFFSET
properties to each track.OCV GENERIC MARKUP DERIVATIVE MEDIA ONLY ACTION
: The Markup component will take the keyword-taggedTEXT
tracks for the derivative media and draw bounding boxes on the extracted images.
Task Merging
The large blue rectangles in the diagram represent tasks that are merged together. The purpose of task merging is to consolidate how tracks are represented in the JSON output object by hiding redundant track information, and to make it appear that the behaviors of two or more actions are the result of a single algorithm.
For example, keyword tagging behavior is supplemental to the text detection behavior. It's more important that TEXT
tracks are associated with the algorithm that performed text detection than the KEYWORDTAGGING
algorithm. Note that in
our pipeline only the KEYWORD TAGGING
action has the OUTPUT_MERGE_WITH_PREVIOUS_TASK
property set to TRUE
. It has
a similar effect in the source media flow and derivative media flow.
In the source media flow the TIKA TEXT
action is at the start of the merge chain while the KEYWORD TAGGING
action is
at the end of the merge chain. The tracks generated by the action at the end of the merge chain inherit the algorithm
and track type from the tracks at the beginning of the merge chain. The effect is that in the JSON output object the
tracks from the TIKA TEXT
action will not be shown. Instead that action will be listed under TRACKS MERGED
. The
tracks from the KEYWORD TAGGING
action will be shown with the TIKATEXT
algorithm and TEXT
track type:
"output": {
"TRACKS MERGED": [
{
"source": "+#TIKA IMAGE DETECTION ACTION#TIKA TEXT DETECTION SOURCE MEDIA ONLY ACTION",
"algorithm": "TIKATEXT"
}
],
"MEDIA": [
{
"source": "+#TIKA IMAGE DETECTION ACTION",
"algorithm": "TIKAIMAGE",
"tracks": [ ... ]
}
],
"TEXT": [
{
"source": "+#TIKA IMAGE DETECTION ACTION#TIKA TEXT DETECTION SOURCE MEDIA ONLY ACTION#KEYWORD TAGGING (WITH FF REGION) ACTION",
"algorithm": "TIKATEXT",
"tracks": [ ... ]
}
]
}
In the derivative media flow the TESSERACT OCR
action is at the start of the merge chain while the KEYWORD TAGGING
action is at the end of the merge chain. The effect is that in the JSON output object the tracks from
the TESSERACT OCR
action will not be shown. The tracks from the KEYWORD TAGGING
action will be shown with
the TESSERACTOCR
algorithm and TEXT
track type:
"output": {
"NO TRACKS": [
{
"source": "+#EAST TEXT DETECTION DERIVATIVE MEDIA ONLY ACTION#TESSERACT OCR TEXT DETECTION (WITH FF REGION) DERIVATIVE MEDIA ONLY ACTION#KEYWORD TAGGING (WITH FF REGION) ACTION#OCV GENERIC MARKUP DERIVATIVE MEDIA ONLY ACTION",
"algorithm": "MARKUPCV"
}
],
"TRACKS MERGED": [
{
"source": "+#EAST TEXT DETECTION DERIVATIVE MEDIA ONLY ACTION#TESSERACT OCR TEXT DETECTION (WITH FF REGION) DERIVATIVE MEDIA ONLY ACTION",
"algorithm": "TESSERACTOCR"
}
],
"TEXT": [
{
"source": "+#EAST TEXT DETECTION DERIVATIVE MEDIA ONLY ACTION#TESSERACT OCR TEXT DETECTION (WITH FF REGION) DERIVATIVE MEDIA ONLY ACTION#KEYWORD TAGGING (WITH FF REGION) ACTION",
"algorithm": "TESSERACTOCR",
"tracks": [ ... ]
}
],
"TEXT REGION": [
{
"source": "+#EAST TEXT DETECTION DERIVATIVE MEDIA ONLY ACTION",
"algorithm": "EAST",
"tracks": [ ... ]
}
]
}
Note that a MARKUP
action will never generate new tracks. It simply fills out the media.markupResult
field in the
JSON output object (not shown above).
Output Last Task Only
If you want to omit all tracks from the JSON output object but the respective TEXT
tracks for the source and
derivative media, then in you can also set the OUTPUT_LAST_TASK_ONLY
job property to TRUE
. Note that the WFM only
considers tasks that use DETECTION
algorithms as the final task, so MARKUP
is ignored. Setting this property will
result in the following JSON for the source media:
"output": {
"TRACKS SUPPRESSED": [
{
"source": "+#TIKA IMAGE DETECTION ACTION",
"algorithm": "TIKAIMAGE"
},
{
"source": "+#TIKA IMAGE DETECTION ACTION#TIKA TEXT DETECTION SOURCE MEDIA ONLY ACTION",
"algorithm": "TIKATEXT"
}
],
"TEXT": [
{
"source": "+#TIKA IMAGE DETECTION ACTION#TIKA TEXT DETECTION SOURCE MEDIA ONLY ACTION#KEYWORD TAGGING (WITH FF REGION) ACTION",
"algorithm": "TIKATEXT",
"tracks": [ ...  ]
}
]
}
Developing Media Extraction Components
The WFM is not limited to working only with the TikaImageDetection component. Any component can be designed to generate
derivative media. The requirement is that it must generate MEDIA
tracks, one piece of derivative media per track.
Minimally, each track must have a DERIVATIVE_MEDIA_TEMP_PATH
property set to the location of the media. By convention,
the media should be placed in a top-level directory of the form $MPF_HOME/share/tmp/derivative-media/<job-id>
. When
the job is done running, the media will be moved to persistent storage in $MPF_HOME/share/derivative-media/<job-id>
if
remote storage is not enabled.
Specifically, TikaImageDetection uses paths of the
form $MPF_HOME/share/tmp/derivative-media/<job-id>/tika-extracted/<guid>/image<index>.<ext>
. The <guid>
part ensures
that the results of two different actions executed within the same job on the same source media, or actions executed
within the same job on different source media files, do not conflict with each other. A new <guid>
is generated for
each invocation of GetDetections()
on the component.
Your media extraction component can optionally include other track properties. These will get added to the derivative
media metadata. For example, TikaImageDetection adds the PAGE_NUM
property.
Note that although this guide only talks about derivative images, your component can generate any kind of media. Be sure that components in the subsequent pipeline stages can handle the media type detected by WFM media inspection.
Default Pipelines
OpenMPF comes with some default pipelines for detecting text in documents and other pipelines for detecting faces in documents. Refer to the TikaImageDetection descriptor.json
.


Sponsorchain
Create, Invest, Collaborate
Log In With Google
Sponsorchain
Log Out
Register New Creator
Channel Name
Contact
Fee Rate / View
Max Views / Week
Payment Details
Amount
Message (Add your promotion details and link here)
Update Details
Channel Name: Lorem Ipsum
Fee Rate ( ETH / View )
Max Views / Week
Cancel
Discover
Channel Name
Latest Videos


The Shopping Cart is a highly customizable, single-step, mobile-ready checkout solution for your website. The Shopping Cart includes features such as support for discount codes, customizable fields, subscription payments, PayPal, multiple currencies and languages, customer account creation and more.
Click the button to see Shopping Cart in action. Keep reading for more details on how to customize it to meet your needs.
To place a test payment, you can use the payment details below:
You can create links manually using the documentation provided below, or even easier, use the Link Builder tool.
Shopping Cart allows a number of customizations, such as:
To set your preferences, login to your account, go to Apps> Shopping Cart. Click on the arrow next to "Launch" and select "Settings" and "Style"
Below are several examples, you can mix and match parameters to provide the options you want.
Add a product to the cart
{{data.src}}/#/cart?product_id:{{data.product.product_id || data.product_id}}
Add a product to the cart, specify the quantity
{{data.src}}/#/cart?product_id:{{data.product.product_id || data.product_id}}=2
Add multiple products to the cart
{{data.src}}/#/cart?product_id:{{data.product.product_id || data.product_id}}&product_id:{{data.product_2.product_id || data.product_id_2}}
You can provide an unlimited number of products in a single URL
Add multiple products to the cart, specify the quantity for each
{{data.src}}/#/cart?product_id:{{data.product.product_id || data.product_id}}=1&product_id:{{data.product_2.product_id || data.product_id_2}}=2
Add a product to the cart, remove any existing items already in the cart
{{data.src}}/#/cart?product_id:{{data.product.product_id || data.product_id}}&empty_cart=true
Specify a promotion code
{{data.src}}/#/cart?product_id:{{data.product.product_id || data.product_id}}&promotion_code=xxx
You can create promotion codes in Store> Promotions
Provide customer details
{{data.src}}/#/cart?product_id:{{data.product.product_id ||<EMAIL_ADDRESS>Provide referrer data
{{data.src}}/#/cart?product_id:{{data.product.product_id || data.product_id}}&referrer=my-custom-value
Allows you to specify custom data that will help you know where the sale came from. The value you provide will be recorded with the cart and completed order.
Define the payment currency
{{data.src}}/#/cart?currency=EUR&product_id:{{data.product.product_id || data.product_id}}
Generally you don't need to specify the currency. If not supplied, the best currency for the customer will be automatically selected and the customer is able to change the currency in the cart.
Provide custom data
{{data.src}}/#/cart?product_id:{{data.product.product_id || data.product_id}}&this=that&more=stuff
Any parameters you specify will be stored with the cart and completed order, for your reference. You can supply up to 2048 characters of custom data.


TLogRoute class.
TLogRoute is the base class for all log route classes. A log route object retrieves log messages from a logger and sends it somewhere, such as files, emails. The messages being retrieved may be filtered first before being sent to the destination. The filters include log level filter and log category filter.
To specify level filter, set Levels property, which takes a string of comma-separated desired level names (e.g. 'Error, Debug'). To specify category filter, set Categories property, which takes a string of comma-separated desired category names (e.g. 'System.Web, System.IO').
Level filter and category filter are combinational, i.e., only messages satisfying both filter conditions will they be returned.
Located in /Util/TLogRouter.php (line 166)
TComponent | --TApplicationComponent | --TLogRoute
| Class | Description |
|---|---|
| TFileLogRoute | TFileLogRoute class. |
| TEmailLogRoute | TEmailLogRoute class. |
| TBrowserLogRoute | TBrowserLogRoute class. |
| TDbLogRoute | TDbLogRoute class |
| TFirePhpLogRoute | TFirePhpLogRoute class. |
Retrieves log messages from logger to log route specific destination.
Formats a log message given different fields.
Initializes the route.
Processes log messages and sends them to specific destination.
Derived child classes must implement this method.
Inherited From TApplicationComponent
TApplicationComponent::getApplication()
TApplicationComponent::getRequest()
TApplicationComponent::getResponse()
TApplicationComponent::getService()
TApplicationComponent::getSession()
TApplicationComponent::getUser()
TApplicationComponent::publishAsset()
TApplicationComponent::publishFilePath()
Inherited From TComponent
TComponent::addParsedObject()
TComponent::attachEventHandler()
TComponent::canGetProperty()
TComponent::canSetProperty()
TComponent::createdOnTemplate()
TComponent::detachEventHandler()
TComponent::evaluateExpression()
TComponent::evaluateStatements()
TComponent::getEventHandlers()
TComponent::getSubProperty()
TComponent::hasEvent()
TComponent::hasEventHandler()
TComponent::hasProperty()
TComponent::raiseEvent()
TComponent::setSubProperty()
TComponent::__get()
TComponent::__set()
Documentation generated on Mon, 22 Feb 2010 12:18:09 +0000 by phpDocumentor 1.3.0RC4


Intermediate Tasks
Interation 3
Fizz buzz it!
Iteration 4
Divide it!
Strings 4
Triple it!
DOM 1
Create it!
Enter words:
Edit it!
Delete it!
JSON 1
request it!
JSON 2
Enter search term:
Search it!


{% extends "layouts/base.html" %}
{% block body %}
{% include "header.html" %}
{{ govukPhaseBanner({
classes: "app-phase-banner govuk-width-container",
tag: {
text: "beta"
},
html: 'This is a new service – your feedback will help us to improve it.'
}) }}
{% include "nav.html" %}


Replicated from Metasploit below. Manual:
curl --header "Content-Type: application/soap+xml;charset=UTF-8" http://<IP_ADDRESS>:5985/wsman -X POST --data "asdfasdf" -v
< HTTP/1.1 401
< Server: Microsoft-HTTPAPI/2.0
< WWW-Authenticate: Negotiate
< WWW-Authenticate: Basic realm="WSMAN"
< WWW-Authenticate: CredSSP
< Date: Tue, 13 Nov 2018 18:22:28 GMT
< Connection: close
< Content-Length: 0
<
* Closing connection 0
Seeing what Metasploit is doing:
def winrm_poke(timeout = 20)
send_winrm_request(Rex::Text.rand_text_alpha(8), timeout)
end
def send_winrm_request(data, timeout=20)
opts = {
'uri' => datastore['URI'],
'method' => 'POST',
'data' => data,
'username' => datastore['USERNAME'],
'password' => datastore['PASSWORD'],
'ctype' => "application/soap+xml;charset=UTF-8"
}
send_request_cgi(opts,timeout)
end
resp = winrm_poke
return nil if resp.nil?
if resp.code == 401 and resp.headers['Server'] and resp.headers['Server'].include? "Microsoft-HTTPAPI"
methods = parse_auth_methods(resp)
desc = resp.headers['Server'] + " Authentication Methods: " + methods.to_s
report_service(
:host => ip,
:port => rport,
:proto => 'tcp',
:name => 'winrm',
:info => desc
)
print_good "#{ip}:#{rport}: Negotiate protocol supported" if methods.include? "Negotiate"
print_good "#{ip}:#{rport}: Kerberos protocol supported" if methods.include? "Kerberos"
print_good "#{ip}:#{rport}: Basic protocol supported" if methods.include? "Basic"
else
print_error "#{ip}:#{rport} Does not appear to be a WinRM server


18
Calculator
Description
This version of the calculator is substantially more complex than previous versions. Major changes
include control constructs such as
if-else
and
while
. In addition a syntax tree is constructed during
parsing. After parsing we walk the syntax tree to produce output. Three versions of the tree walk
routine are supplied:
•
an interpreter that executes statements during the tree walk
•
a compiler that generates code for a hypothetical stack-based machine
•
a version that generates a syntax tree of the original program
To make things more concrete, here is a sample program,
x = 0;
while (x < 3) {
print x;
x = x + 1;
}
with output for the interpretive version,
0
1
2
an output for the compiler version,
push 0
pop x
L000:
push x
push 3
compLT
jz L001
push x
print
push
x
push
1
add
pop
x
jmp
L000
L001:


We monetize solutions!
- synergize mission-critical content
- synthesize customized models
- generate collaborative content
- synergize granular communities
- optimize rich convergence
- morph enterprise infomediaries
- utilize clicks-and-mortar vortals
- orchestrate intuitive paradigms
- enhance bleeding-edge platforms
- expedite seamless vortals
- redefine world-class interfaces


Back to top
Blog example is © Taken from bootstrap, personalized by Juana Valentina Mendoza Santamaría.
Full Stack Subject - To see the source code visit
2021-01


Secrets
In this exercise, we'll learn how to manage secrets and see different use cases where secrets present a secure and straightforward solution.
In this exercise, we'll deploy an application that include two services:
- a Postgres service
- a user interface service to manage the database service
In order to access and manage the database in a secure way, we'll pass sensitive information to the db
service via secrets. We'll do this within a Docker Swarm, then within a Kubernetes cluster.
Using Secrets with a Docker Stack
Setting up the Stack
Secrets are managed in Docker by Swarm's management consensus; as such, initialize a swarm on
ucp-manager
:[centos@ucp-manager ~]$ docker swarm init
On the swarm manager
ucp-manager
, create astack.yml
with the following content:version: '3.7' services: db: image: postgres environment: POSTGRES_USER: admin POSTGRES_PASSWORD_FILE: /run/secrets/postgres_pwd secrets: - postgres_pwd ui: image: adminer ports: - 8080:8080 secrets: postgres_pwd: external: true
Our stack includes the two services mentioned above:
db
is based on apostgres
image. It requires credentials: a user which valueadmin
is hardcoded in the yaml file, and a password that we'll pass in a secret file.ui
is based on a database management interface calledadminer
. This service exposes port 8080.
Additionally, our
stack.yml
includes a secret set to an external resource, which means this secret should be already defined when we deploy the stack. So let's create the secret in the next step.Create a secret to securely register and distribute our password:
[centos@ucp-manager ~]$ echo "mysecretpassword" | docker secret create \ postgres_pwd -
Deploying the Stack
Now from the directory where
stack.yml
resides, deploy the stack:[centos@ucp-manager ~]$ docker stack deploy -c stack.yml my_stack Creating network my_stack_default Creating service my_stack_db Creating service my_stack_adminer
In your browser, visit
<ucp-manager public IP>:8080
to see the login page provided by Adminer./
Enter the necessary information:
- System: PosgreSQL
- Username: admin
- Password: mysecretpassword (or the password you entered above)
Then click on Login.
If everything is set correctly, you should be able to see a page similar to the following screenshot, where you can explore existing default databases and you can create a new database.
/
Clean up by deleting your stack:
[centos@ucp-manager ~]$ docker stack rm my_stack
Using Secrets in Kubernetes
In this second part, we'll use secrets in a Kubernetes deployment in the same context we had in the previous section.
Prerequisites
For the next tasks, we need a kubernetes cluster where we're able to schedule pods on at least one of the cluster nodes. We can again use Minikube on our infra
node.
Setting up the Deployment
Let's start by making a directory and cd'ing into it:
ubuntu@infra:~$ mkdir my-secrets; cd my-secrets
We start by creating a secret:
Create a file
secret.yml
with folowing content:apiVersion: v1 kind: Secret metadata: name: postgres-pwd type: Opaque data: password: mysecretpassword
This will create a secret called
postgres-pwd
that includes a password data.Note: Of course it's not recommended to store the secret data in plain text. We do this here only for the exercise purpose.
Run following command to create the secret:
ubuntu@infra:~/my-secrets$ kubectl apply -f secret.yml
Create a file
kube.yml
that defines the deploymentmyapp
which includes 2 containersdb
andui
:apiVersion: extensions/v1beta1 kind: Deployment metadata: name: myapp labels: app: myapp spec: replicas: 1 selector: matchLabels: app: myapp template: metadata: labels: app: myapp spec: containers: - name: db image: postgres env: - name: "POSTGRES_USER" value: admin - name: "POSTGRES_PASSWORD" valueFrom: secretKeyRef: name: postgres-pwd key: password - name: ui image: adminer ports: - containerPort: 8080
db
is is based on the imagepostgres
and requires two environment variables (user and password). The user is passed in plain text, while the password gets its value from the secretpostgres-pwd
.ui
is based on the imageadminer
and exposes the port 8080. To expose this port externally, we will create a NodePort service later.
Deploying the Application
Run the deployment:
ubuntu@infra:~/my-secrets$ kubectl create -f kube.yml
Check whether the pods are started correctly:
ubuntu@infra:~/my-secrets$ watch kubectl get pods
After a while you should see something similar to this:
NAME READY STATUS RESTARTS AGE myapp-fffbc69-c5ngz 2/2 Running 0 66s
Exit with
CTRL+C
.Now let's make our application accessible to the outside world:
ubuntu@infra:~/my-secrets$ kubectl expose deployment myapp \ --type=NodePort --name=my-service
Get the node port being used for port exposure:
ubuntu@infra:~/my-secrets$ kubectl get services my-service
You should see an output similar to this:
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE my-service NodePort <IP_ADDRESS> <none> 8080:30130/TCP 11s
The port node in my case in
30130
.Visit the Adminer UI in your browser on following address
<ucp-manager>:<service-port>
. You should see the login form:/
Both container
db
andui
are running in the same pod. That means they can communicate usinglocalhost
. The default TCP port exposed in our case is5432
. Now you can login using following information:- System: PosgreSQL
- Server: localhost:5432
- Username: admin
- Password: mysecret (or the password you entered above)
Then click on Login.
You should be able to see the existing databases.
Clean up:
ubuntu@infra:~/my-secrets$ kubectl delete secret postgres-pwd ubuntu@infra:~/my-secrets$ kubectl delete deployment myapp ubuntu@infra:~/my-secrets$ kubectl delete service my-service
Optional: Using Secrets with a GitHub Access Token
In this exercise, we'll build an app that consumes GitHub's API. In order to make authenticated requests, we'll provision the app with an auth token protected by Docker's secrets functionality.
The project folder for this exercise is ~/ddev-labs/secrets
.
Setting up a demo
Inspect
secrets/app.py
, a minimal Flask app to send a request to GitHub's API:from flask import Flask, render_template import requests, json, os app = Flask(__name__, template_folder='.') @app.route('/') def homepage(): r = requests.get( 'https://api.github.com/user/repos' ) return render_template('repos.html', repos=json.loads(r.text)) if __name__ == '__main__': app.run(host='<IP_ADDRESS>', debug=True)
repos.html
dumps whatever it is handed to a webpage:<html> <body> <div>{{repos}}</div> </body> </html>
Dockerfile
contains the minimal steps necessary to stand up your Flask app:FROM python:2.7-alpine RUN mkdir /app WORKDIR /app COPY requirements.txt /app/ RUN pip install -r requirements.txt COPY . /app CMD python app.py
Build and run your new image and expose port 5000:
ubuntu@infra:~/ddev-labs/secrets$ docker image build -t myimage:1.0 . ubuntu@infra:~/ddev-labs/secrets$ docker container run -p 5000:5000 myimage:1.0
then in another terminal visit it at
http://localhost:5000
:ubuntu@infra:~/ddev-labs/secrets$ curl localhost:5000
We get a 'requires authentication' complaint. We don't ever want sensitive information like login credentials written to an image, so we'll use Docker's secrets functionality to securely provision them.
Getting GitHub access credentials
Login to GitHub
Go to the following link: https://github.com/settings/tokens/new
Name your token
secret-demo
Check the
public_repo
box. This token will only be authorized to interact with public repos.Click "Generate Token". Your token is created and presented; make sure to save this before navigating away from the page, as there is no way to get it back afterwards.
Creating and using a Secret
init
a new Swarm on yourinfra
node, if you haven't already.Place your secret access token in a file called
mytoken.dat
.Create a secret to be encrypted and managed by the swarm:
ubuntu@infra:~/ddev-labs/secrets$ docker secret create access_token mytoken.dat
Modify
app.py
to set the Authorization header.app.py
should look like this:from flask import Flask, render_template import requests, json, os app = Flask(__name__, template_folder='.') @app.route('/') def homepage(): authtoken = open(os.environ['AUTHTOKEN'], 'r').readline().strip() headers = { "Authorization": "token " + authtoken } r = requests.get( 'https://api.github.com/user/repos', headers=headers ) return render_template('repos.html', repos=json.loads(r.text)) if __name__ == '__main__': app.run(host='<IP_ADDRESS>', debug=True)
Note our application logic is looking for the auth token it needs in a file at the path indicated by the environment variable
AUTHTOKEN
, which we will have to define as part of our application configuration (see below).Since you are starting the service in a swarm, the image has to be reachable from any node. Rebuild your image, and call it
<DockerID>/git_secret
:ubuntu@infra:~/ddev-labs/secrets$ docker image build -t <DockerID>/git_secret .
Push the image to Docker hub after you build it:
ubuntu@infra:~/ddev-labs/secrets$ docker image push <DockerID>/git_secret
Launch your application as a service, mount your secret into it, and define the environment variable your application expects:
[centos@ucp-manager ~]$ docker service create \ --secret access_token \ -e AUTHTOKEN='/run/secrets/access_token' \ -p 5000:5000 <DockerID>/git_secret
Visit your application at
localhost:5000
. This time, the application successfully authenticates and a json description of all your repositories is presented.Stop your service.
Mocking Secrets
As we saw above, secrets are mounted by the Swarm manager into a file inside your container at /run/secrets/secret_name
. During development, we might not run Docker Swarm Mode on our development laptop, and therefore need to mock the presence of a secret in a container locally.
Turn off swarm mode on
infra
:ubuntu@infra:~$ docker swarm leave --force
Write a
docker container run...
command to run yourgit_secret
image as a single container with the secret it expects mocked. Think about what you know about mounting files inside a container's filesystem to achieve this. Once the container is running, make sure you get the behavior you expect.Delete the container once it is working correctly.
Using Secrets in Kubernetes
Open the file
kube.yaml
andkube-ns.yaml
and analyze their content. Specifically pay attention to how the secret is defined.Build and push an image based on the Dockerfile in the
secrets
directory (make sure you're logged in to Docker Hub):ubuntu@infra:~/ddev-labs/secrets$ export DOCKER_ID=<your DOCKER ID> ubuntu@infra:~/ddev-labs/secrets$ docker image build \ -t ${DOCKER_ID}/ddev-secrets-kube:1.0 . ubuntu@infra:~/ddev-labs/secrets$ docker push ${DOCKER_ID}/ddev-secrets-kube:1.0
Use
kubectl
to create the namespace on Minikube:ubuntu@infra:~/ddev-labs/secrets$ kubectl create -f kube-ns.yaml
Use
kubectl
to create the secret:ubuntu@infra:~/ddev-labs/secrets$ kubectl create -n ddev secret generic github-token \ --from-file=./mytoken.dat
Create the application using the secret on Minikube:
ubuntu@infra:~/ddev-labs/secrets$ kubectl create -f kube.yaml
Test the application:
ubuntu@infra:~/ddev-labs/secrets$ export KUBE_IP=$(minikube ip) ubuntu@infra:~/ddev-labs/secrets$ export APP_PORT=$(kubectl get -n ddev svc/app \ --template '{{range .spec.ports}}{{.nodePort}}{{end}}') ubuntu@infra:~/ddev-labs/secrets$ curl ${KUBE_IP}:${APP_PORT}
you should see a list of your GitHub repositories formatted as JSON string.
Cleanup:
ubuntu@infra:~/ddev-labs/secrets$ kubectl delete ns/ddev
On GitHub, navigate to
https://github.com/settings/tokens
and delete the dummy token you made for this exercise.
Conclusion
In this exercise, you created a simple application that needs sensitive information in the form of an auth token. You provisioned this auth token without ever including it in your image via Docker's secrets functionality, and saw a typical pattern of using secrets in application logic:
- Application logic consumes secret from a file with path set in an environment variable
$FOO
$FOO
is set to/run/secrets/secret_name
in the service definition (at the command line as above, or in adocker-compose.yml
), since this is where the Swarm manager will mount the secret calledsecret_name
.
By following this pattern, you can use Docker to store encrypted secrets in the Swarm manager group, and pass them encrypted over the network to the containers that need them at runtime.
Next, you saw a typical pattern for mocking secrets in development. Simply place your secret in a file, mount it in the container at the same route the Swarm manager would, and your application logic can consume it in the same way.
All enterprise grade orchestrators provide similar secrets functionality; secrets can be provisioned in much the same way in Kubernetes as they were in a Swarm.


--- title: The Protocol layout: default menu: pkts.html active_element: pktsio pktsio_version: 3.0.2 ---
pkts.io is a pure java library for reading and writing pcaps. It's primary purpose is to manipulate/analyze existing pcaps, allowing you to build various tools around pcaps.
Example, load a pcap from file and print the content of each UDP packet to standard out.
{% highlight java %} final Pcap pcap = Pcap.openStream("my_traffic.pcap"); pcap.loop(new PacketHandler() { @Override public void nextPacket(final Packet packet) throws IOException { if (packet.hasProtocol(Protocol.UDP)) { System.out.println(packet.getPacket(Protocol.UDP).getPayload()); } } }); {% endhighlight %}View gist which also contains comments.
Pkts.io also contains a higher level of abstraction – streams. Quite often you may want to manipulate a stream of related messages and by using the stream support offered by pkts.io, you can do so. What a stream represents depends on the underlying protocol. E.g., for UDP, a stream is all the messages that is sent/received from the same local and remote port-pair. If you deal with SIP, all SIP messages that belongs to the same SIP Dialog are considered to belong to the same stream.
Example, load a pcap from file and consume all SIP Streams.
{% highlight java %} final Pcap pcap = Pcap.openStream("my_traffic.pcap"); final StreamHandler streamHandler = new DefaultStreamHandler(); streamHandler.addStreamListener(new StreamListenerView gist which also contains comments.
pkts.io is available through Maven Central so just include the following Maven artifact and you are good to go:
{% highlight xml %}Or if you want to use the stream support, then just include the following:
{% highlight xml %}Javadocs for all releases are hosted by our friends at javadoc.io and the current release of pkts.io is accessed through the following links:
The pkts-examples contains a bunch of different examples showing the various features of the raw frame handling as well as the higher abstraction of streams. Please see the pkts.io example repository on github.com/aboutsip/pkts for the examples.
Contributions are more than welcome and highly encouraged. Everything in pkts.io are following the general guidelines of Maven so if you are familiar with Maven you should have no problem getting started.
Most Java IDE:s are capable of importing Maven based projects, allowing for a smooth integration with the IDE and Maven. Remember, Maven is the source of truth so please do not check in any IDE specific files (such as .project and .classpath for Eclipse).
So, you have succerssfully loaded all the code so what is the next steps. Well, check out the readme files under each sub-project to get a description of what that module is supposed to do and how to get started with the project. If you want to contribute to any project, please read the section about contribution, specifially, please checkout the section about coding principles and the style guide.
If you have ideas of your own, please file a ticket so when you do submit a pull request, we know what the intent of this feature is, this also gives us a way of communicating about features.
If you just want to get your hands dirty then feel free to check out the open issues. If there is anything you would like to start tackling, just assign the task to yourself and get cranking.
At aboutsip, we try to follow these general principles and by adhering to these simple guidelines, we feel that our code is more readable, easier to follow and is testable (even though we can always do better so please give us constructive feedback):
Please follow the style already in place. If you are an Eclipse user, follow the guidelines for Eclipse below and please load the formatting template and then you won't even have to think about it, Eclipse will do it for you.
In general, the aboutsip code base is following regular java style convention but here are the more important points (and some differences)
pkts.io and all projects under aboutsip.com are released under the terms of the MIT license


Community-driven.
Community, driven.
Submit your own sentence to be revised by community members:
mode_edit
Submit
See submissions, submit revisions
Original: "I went bald years ago, and my game has never fully recovered."
mode_edit
Submit
"Hair gone, lonely nights."
thumb_up


How can EnzymeML help you to publish results and to exchange data?
EnzymeML is a flexible data model for biocatalysis and enzymology capable to completely describe an experiment in a machine-readable format. In order to handle and integrate EnzymeML in your database, we provide our software solution PyEnzyme, which can be either installed locally or reached via several endpoints of our REST-API.
Currently implemented functionalities
Validation of minimal requirements and upload to SABIO-RK
PyEnzyme as well as our REST-API provide an interface to validate incoming EnzymeML documents to comply with the minimal requirements necessary for a succesful upload to your database. Besides that, we also offer a complete validation report, such that you are able to provide all the important informations to your user if a dataset does not comply. With our long-term partner database SABIO-RK we already established a workflow to perform validation and subsequent upload to the database. The validation is performed in conjunction with a template decribing all mandatory as well as optional EnzymeML fields required for #a successfull upload.
In order to integrate EnzymeML validation to your database, please follow our instructions:
- Download our EnzymeML-Validation template
- Use given fields and dropdown menues to specify your minimal requirements
- Upload your template to our Validation-Template conversion page
- Download the resulting JSON template and deploy it on your server
- On validation using our REST-API or PyEnzyme provide the URL to your JSON template
Creation of a dataset in an EnzymeML Dataverse
Dataverse installations provide a modern and modular approach to databases, offering flexibility and stability at the same time. Hence, we developed a Dataverse compliant metadata-block schema, such that you can easily integrate EnzymeML to your own Dataverse installation. In collaboration with FoKUS-Team from the University of Stuttgart, we already established a seamless process chain from an EnzymeML archive to a dataverse entry. Our REST-API offers an automatic upload to your dataverse in conjunction with out validation interface.
You provide a dataverse installation and want to integrate EnzymeML? Please feel free to contact our support in order to assist you.
Future Developments
Collaboration with SABIO-RK, STRENDA DB, UniProt/Enzyme Portal, Dataverse