Preston So has designed and developed websites since 2001 and built them in Drupal since 2007. He is Development Manager of Acquia Labs at Acquia and co-founder of the Southern Colorado Drupal User Group (est. 2008). Previously, Preston was Technical Lead of Entertainment Weekly at Time Inc.
GraphQL is a declarative query language and an application-level protocol.
React is a view-based JavaScript framework that uses a Virtual DOM to save application state and rerenders components of the view based on diffed states.
Relay is a framework that juxtaposes data fetching needs and React components in the same place; in other words, Relay connects view logic to queries in the back end.
GraphQL is a query language that enables transport- and storage-agnostic communication and returns data according to the same structure as the request query.
Instead of placing data fetching logic in some other part of the client application – or embedding this logic in a custom endpoint on the server – we instead co-locate a declarative data-fetching specification alongside the React component.
—Nick Shrock
Let’s take a React application that needs to fetch some fields adhering to a certain structure, such as a list of articles, each alongside the following information.
React consists of components, which are rendered through JSX templates and comprise view hierarchies.
var articleListItem = React.createClass({
render: function () {
return (
{this.props.article.title}
{this.props.article.author.name}
from {this.props.article.author.location}
);
}
});
With GraphQL, this structure can be easily mirrored on the server in both query and response.
var articleListItem = React.createClass({
statics: {
queries: {
article: function () {
return graphql`
{
article {
title
path
author {
name
location
}
}
}
`;
}
}
}
// render: function () { ...
});
There's a lot of power in this approach ...
{
article {
title
path
author {
name
location
}
}
}
... because the server’s response really does mirror the client’s desired query.
{
"article": {
"title": "Gang Jailed: Hoverboard Rampage Destroys Courthouse",
"path": "http://usatoday.com/article/gang-jailed-hoverboard-rampage",
"author": {
"name": "Compu-Fax",
"location": "Hill Valley, CA"
}
}
}
Endpoints are specific to individual views or ill-suited for trees of related resources, leading to bespoke or ad-hoc endpoints.
Due to a REST API’s changing requirements, clients that only need limited data may have to deal with increasingly large payloads destined for other clients.
GET /users/:id
GET /groups/:id
GET /groups/:id/users/:id
If what is fetched for your view is complex and relational, multiple client-server round trips and corresponding bootstraps will be required, delaying render.
REST APIs are versioned and by nature obsolescent as client needs evolve. Queries must be rewritten against the new API.
REST APIs with custom endpoints usually lack a native schema or formalized type system, making client-side tooling and validation difficult.
A shared endpoint can resolve GraphQL queries into root calls and send back a single, unified response.
Client-driven queries mean that the response is catered to the demands of the client rather than the limitations of the API.
A GraphQL server returns a single response to match the request structure, which is flexible enough to accommodate many possible relationships.
No matter what version your most current API, your client can provide the same query to multiple versions and expect a common response.
GraphQL has a native and highly extensible schema and type system.
GraphQL is a query language that is a common vernacular between server and client, similar enough to JSON to be easy for onboarding.
GraphQL accelerates the arrival of your query’s response by preventing unneeded requests or bootstraps of the back end.
GraphQL is an application-layer protocol agnostic to both its transport (the HTTP protocol is only one of many ways queries can be transmitted) and the database queried (schemas need not match).
Different requirements for views can be satisfied by provisioning additional REST endpoints for small subsets of data. But this arbitrarily adds more endpoints.
HTTP can handle multiple parallel network requests. But HTTP/1.1 recommends only two, while Chrome accepts six. HTTP/2 may mitigate this.
Content negotiation in HTTP allows clients to request multiple versions of a document at a single path. This resolves the issue of requests against API versions at differing paths.
HTTP has a built-in content type system that is analogous to GraphQL’s native type system and can accompany standards such as JSON Schema.
Rising Stack’s GraphQL server is implemented in Node.js and has MongoDB integration: github.com/RisingStack/graphql-server
GraphQL models two types of operations.
query {
# Read-only fetch
}
mutation {
# Write then fetch
}
These operations can have names, which are case-sensitive.
query getUser {
# Read-only fetch
}
mutation changeUser {
# Write then fetch
}
Anonymous queries have a shorthand.
{
# Read query
}
Selection sets are made up of \n
-separated fields, which are discrete pieces of information.
{
firstName
lastName
email
}
Selection sets are made up of \n
-separated fields, which are discrete pieces of information.
{
"firstName": "Marty",
"lastName": "McFly",
"email"<EMAIL_ADDRESS>}
Fields can describe relationships with other data.
{
# Top-level fields are typically globally accessible.
user {
firstName
lastName
email
location {
city
country
}
}
}
Fields can describe relationships with other data.
{
"user": {
"firstName": "Marty",
"lastName": "McFly",
"email"<EMAIL_ADDRESS>"location": {
"city": "Hill Valley",
"country": "USA"
}
}
}
Fields are like functions insofar as they return values and can carry arguments.
{
user(id: 3) {
firstName
lastName
email
avatar(height: 72)
}
}
Fields are like functions insofar as they return values and can carry arguments.
{
"user": {
"firstName": "Marty",
"lastName": "McFly",
"email"<EMAIL_ADDRESS>"avatar": "http://cdn.mcfly.net/img/marty-72x72.jpg"
}
}
More than one argument is possible in an arbitrary order.
{
user(id: 3) {
firstName
lastName
email
avatar(height: 72, width: 72)
}
}
Fields can be aliased.
{
admin:user(id: 1) {
firstName
lastName
email
avatar(height: 72, width: 72)
}
}
Fields can be aliased.
{
"admin": {
"firstName": "Doc",
"lastName": "Brown",
"email"<EMAIL_ADDRESS>"avatar": "http://assets.docbrown.com/i/doc-72x72.jpg"
}
}
Aliases are also useful for disambiguating identically named fields.
{
admin:user(id: 1) {
firstName
lastName
email
thumbnail:avatar(height: 72, width: 72)
image:avatar(height: 250, width: 250)
}
}
Aliases are also useful for disambiguating identically named fields.
{
"admin": {
"firstName": "Doc",
"lastName": "Brown",
"email"<EMAIL_ADDRESS>"thumbnail": "http://assets.docbrown.com/i/avatar-72x72.jpg",
"image": "http://assets.docbrown.com/i/avatar-250x250.jpg"
}
}
Fragments allow for field reuse to keep your document clean. Fields in fragments are added at the same level of invocation as adjacent fields.
{
article:node(id: 992) {
title
...content
}
}
fragment content on Page {
body
}
Fragments allow for field reuse to keep your document clean. Fields in fragments are added at the same level of invocation as adjacent fields.
{
"article": {
"title": "Gang Jailed: Hoverboard Rampage Destroys Courthouse",
"body": "Reckless hoverboarders careened into Hill Valley's City Courthouse late yesterday afternoon, causing serious damage to the structure."
}
}
Fragments must declare types, which facilitate conditionally applied fields. When the object selected by the query is a Teaser, the body is excluded, and the image is shrunken.
{
article:node(id: 992) {
title
...content
}
}
fragment content on Page {
image(width: 960)
body
}
fragment content on Teaser {
image(width: 100)
}
Fragments must declare types, which facilitate conditionally applied fields. When the object selected by the query is a Teaser, the body is excluded, and the image is shrunken.
// Type is Page
{
"article": {
"title": "Gang Jailed: Hoverboard Rampage Destroys Courthouse",
"image": "http://i.usatoday.com/img/gang-jailed-hoverboard-rampage-960x250.jpg",
"body": "Reckless hoverboarders careened into Hill Valley's City Courthouse late yesterday afternoon, causing serious damage to the structure."
}
}
// Type is Teaser
{
"article": {
"title": "Gang Jailed: Hoverboard Rampage Destroys Courthouse",
"image": "http://i.usatoday.com/img/gang-jailed-hoverboard-rampage-100x100.jpg"
}
}
Fragments can be nested.
{
article:node(id: 992) {
title
...content
}
}
fragment content on Page {
...mainImage
body
}
fragment mainImage on Page {
image(width: 960)
}
Fragments can be nested.
{
"article": {
"title": "Gang Jailed: Hoverboard Rampage Destroys Courthouse",
"image": "http://i.usatoday.com/img/gang-jailed-hoverboard-rampage-960x250.jpg",
"body": "Reckless hoverboarders careened into Hill Valley's City Courthouse late yesterday afternoon, causing serious damage to the structure."
}
}
Fragments can be inline to improve code legibility.
{
article:node(id: 992) {
title
...content on Page {
body
image(width: 960)
}
...content on Teaser {
image(width: 100)
}
}
}
Inline fragments can also be nameless.
{
article:node(id: 992) {
title
... on Page {
body
image(width: 960)
}
... on Teaser {
image(width: 100)
}
}
}
Variables can be used to maximize a query’s reusability. They must be defined at the top of each operation, which also encompasses their scope.
query getArticle($imageSize: Int) {
article:node(id: 992) {
title
image(width: $imageSize)
... on Page {
body
}
}
}
Directives alter execution behavior and can be used to conditionally include or exclude fields.
query getArticle($hasBody: Boolean) {
article:node(id: 992) {
title
... @include(if: $hasBody) {
body
image(width: 960)
}
}
}
Directives alter execution behavior and can be used to conditionally include or exclude fields.
// $hasBody resolves to false
{
"article": {
"title": "Gang Jailed: Hoverboard Rampage Destroys Courthouse"
}
}
// $hasBody resolves to true
{
"article": {
"title": "Gang Jailed: Hoverboard Rampage Destroys Courthouse",
"body": "Reckless hoverboarders careened into Hill Valley's City Courthouse late yesterday afternoon, causing serious damage to the structure.",
"image": "http://i.usatoday.com/img/gang-jailed-hoverboard-rampage-960x250.jpg"
}
}
The GraphQL spec recommends supporting @skip
and @include
.
query getArticle($hasBody: Boolean, $hasAuthor: Boolean) {
article:node(id: 992) {
title
author @skip(if: $hasAuthor)
... @include(if: $hasBody) {
body
image(width: 960)
}
}
}
In both queries and mutations, all fields apart from top-level mutation fields resolve idempotently.
mutation favoriteArticle {
favoriteArticle(id: 992) {
node {
favoriteCount
}
}
}
In both queries and mutations, all fields apart from top-level mutation fields resolve idempotently.
// Server performs favoriteArticle write.
{
"node": {
"favoriteCount": 1022
}
}
This mutation supplies a new title to a particular node before fetching the new title.
mutation setTitle {
setTitle(title: "Gang Jailed: Hoverboard Rampage Destroys Courthouse") {
node(id: 992) {
title
}
}
}
This mutation supplies a new title to a particular node before fetching the new title.
// Before setTitle mutation
{
"node": {
"title": "Youth Jailed: Marty McFly Junior Arrested for Theft"
}
}
// After setTitle mutation
{
"node": {
"title": "Gang Jailed: Hoverboard Rampage Destroys Courthouse"
}
}
In GraphQL, schemas define the capabilities of your GraphQL server — which types and directives it supports — and validate your queries.
A GraphQL server should generally support these scalar types at minimum.
Int
Float
String
Boolean
ID
(serialized as String
)Types are objects that are validated against and represent the full breadth of selectable fields.
type Node {
title: String
body: String
image: Url
}
Types can refer to other types you have created.
type Node {
title: String
body: String
image: Url
author: User
related: Node
}
If a type object is nested within another, some field within the nested object must be selected. Therefore this query is valid.
{
title
related {
title
}
}
But this one is not.
{
title
related
}
Field arguments are defined by expressing all possible arguments and expected input types.
type Node {
title: String
body: String
image(height: Int, width: Int): Url
}
Once this type object is defined, these queries are valid.
{
image(height: 100)
}
# New query
{
image(height: 100, width: 100)
}
Interfaces are implemented by GraphQL objects to ensure a field is always present.
interface Titled {
title: String
}
type Node implements Titled {
title: String
body: String
}
type TaxonomyTerm implements Titled {
title: String
vocabulary: Vocabulary
}
Types invoked within type objects can refer to interfaces.
type Metadata {
entity: Titled
created: Timestamp
changed: Timestamp
}
This allows for introspection.
{
entity {
title
}
created
}
If Titled is a Node, you can access its properties using a fragment.
{
entity {
title
... on Node {
body
}
}
}
Unions in GraphQL are objects that could be one of multiple types, such as a search result.
Union Result = Node | TaxonomyTerm
type Node {
title: String
body: String
}
type TaxonomyTerm {
title: String
vocabulary: Vocabulary
}
type Search {
response: Result
}
This allows for us to set type-based conditions in our queries, since Result can be either type.
query searchQuery {
response {
# The following field is only valid if all Result types have title.
title
... on Node {
body
}
... on TaxonomyTerm {
vocabulary
}
}
}
GraphQL allows for exhaustive introspection of the schema. For example, take Node.
type Node {
title: String
body: String
image: Url
}
We can build a query selecting the built-in field __type
.
{
__type(name: "Node") {
name
fields {
name
type {
name
}
}
}
}
This returns a hierarchy of the type object.
{
"__type": {
"name": "Node",
"fields": [
{
"name": "title",
"type": { "name": "String" }
},
{
"name": "body",
"type": { "name": "String" }
},
{
"name": "image",
"type": { "name": "Url" }
}
]
}
}
You can also use the __schema
field to access default types.
{
__schema {
types {
name
}
}
}
Sebastian Siemssen (fubhy) was featured in the Barcelona Driesnote and is currently working on a GraphQL implementation on Drupal within the native entity system.


Distance between points
Click on the map to select a point.
Double-click to end.
The tool displays the distance in km or meters between each point and the total distance between the first and last point.
Initial point
Long {{$parent.clientMeasure.initialPoint.lon}}°, Lat {{$parent.clientMeasure.initialPoint.lat}}°
Distance
{{distance.measurement.toFixed(3)}} {{distance.units}}
Point
Long {{distance.lonLat.lon}}°, Lat {{distance.lonLat.lat}}°
Total: {{$parent.clientMeasure.totalClientMeasurement}} {{$parent.clientMeasure.totalClientMeasurementUnits}}


J.S. Peterson
About
Portfolio
Contact
About
Portfolio
Contact
Contact
First name
Last name
Email address
Your Message
Connect with Me


In this chapter we’ll create a new book from scratch together. The book will be fake but the process will be the exact same process you’d use for your own work. This is a follow along chapter, so please get your computer ready and join the journey by replicating the same steps on your own.
Each book needs to live in it’s own folder on your computer. You can place this folder wherever you want, but ideally you’d place it somewhere safe and make backups often.
To begin, create a folder called sample-book
. All the files and folders we create in this tutorial chapter will be placed inside this folder.
In the previous chapter we spent a long time exploring the Book Configuration File. It could cause people to imagine that that file is the most important file in our book, but that is a mistake. The most important part is always your content, your manuscript. All the rest is just extra steps to make sure your content is in a good shape to delight your readers.
Our sample book will have four chapters in total — one for frontmatter, two for fake content, one for backmatter — and we’ll begin by creating them all. Most of your time will always be spent writing and revising your manuscript. If you need help with that process, I recommend you check out the following resources:
Create a file called 00-frontmatter.md
and place the following content into it.
> _"Peaches Are Yummy" — Some Important Author_
# Acknowldgements
I just want to say thanks to the important author who inspired me to really enjoy eating peaches.
Content files are written in Markdown, if this is looking a bit odd to you, you might want to learn a bit more about Markdown before continuing.
Create a file called 01-first.md
. The names are not really important because what matters will be the order we’ll place them in the Book Configuration File, still naming the file with a zero-padded number at the front will help your computer show the files in the correct order when you look at them. For our first chapter, do something like:
# The opening sequence
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Be aware that I just copied and pasted this lorem-ipsum placeholder text from the Web. Use whatever content you want there. This sample book is fake but it is yours, you should play with it.
Create a file called 02-second.md
. You could just copy and paste from the first chapter and make some alterations:
# The sequence after the opening sequence
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Create a file called 03-backmatter.md
, and add your important Author’s note
# Author's Notes
My favourite note is F sharp.
Now that we’re happy with our content, it is time to create a very minimal Book Configuration File. That file should be named Book.toml
, that is the file that Little Webby Press will look for, if you name it something different, Little Webby Press won’t be able to find it and won’t be able to work with your book.
[metadata]
title = "A Sample Book"
subtitle = "Not a real book"
date = 2021-06-15T12:00:00Z
identifier = "https://example.com/not-a-real-book"
cover = "images/cover.png"
[author]
name = "An Aspiring Author"
bio = """
An author that loves peaches.
"""
[publisher]
name = "Little Webby Press"
[site]
blurb = """
A book that will change your life.
"""
[book]
frontmatter = [
"00-frontmatter.md"
]
chapters = [
"01-first.md",
"02-second.md"
]
backmatter = [
"03-backmatter.md"
]
Notice that we can enclose text with quotes like "my text"
or if we want to write multi-line text, we can enclose it in triple-double-quotes, like:
bio = """
this is a multi-level
content
"""
This is good for when you’re writing the author bio or the marketing blurb.
Be aware that our configuration is declaring a book cover in images/cover.png
, which doesn’t exist. So create a folder called images
and place any image inside it named cover.png
. Once you do that, we’re ready!
As I mentioned a couple times before, Little Webby Press will generate both an eBook and a Website for your book. There are two action buttons in the interface, one to generate the book, another to generate the site. The site includes a link to download the eBook, so pressing generate site will also generate the eBook if you haven’t assembled it yet.
Open Little Webby Press and use the Select Manuscript Folder to select your sample-book
folder. You can also simply drag and drop that folder on top of Little Webby Press interface, it will change letting you know if it can accept the drop. Once you loaded your Manuscript Folder and it correctly processed your Book Configuration File, you’ll see the familiar Little Webby Press tabbed interface.
Clicking Generate Site will assemble both the Website and the eBook. You can click the downwards arrow in the Products Tab to download the Website once the process is done.
Unpack the zip file to see the contents, you should have the following files:
Opening index.html
will show you the website for our sample book, and clicking Free To Read Online will let you read the amazing insight and clever prose inside that book. You’ll notice that there is an EPUB3 file called A-Sample-Book.epub
there as well. This was added so that the download buttons on the Website work. You can open that file on your favourite eReader device or app.
The way you work with Little Webby Press is by changing the files on disk, and when needed reloading the Little Webby Press Web Application and opening your Manuscript Folder again. Personally, I prefer simply to drag and drop it again on the interface. Once it is reloaded, you can use the action buttons to assemble new versions of the eBook or Website.


Start
Prev
Next
References
ArchivesSpace REST API
Python 3 Docs
urllib tutorial
JSON module
YouTube Developer Screencasts
I relied allot of this before the documentation was available


|
cds
2.3.1
|
MSPriorityQueue statistics. More...
#include <cds/intrusive/mspriority_queue.h>
Public Types | |
| typedef Counter | event_counter |
| Event counter type. | |
Data Fields | |
| event_counter | m_nPushCount |
| Count of success push operation. | |
| event_counter | m_nPopCount |
| Count of success pop operation. | |
| event_counter | m_nPushFailCount |
| Count of failed ("the queue is full") push operation. | |
| event_counter | m_nPopFailCount |
| Count of failed ("the queue is empty") pop operation. | |
| event_counter | m_nPushHeapifySwapCount |
| Count of item swapping when heapifying in push. | |
| event_counter | m_nPopHeapifySwapCount |
| Count of item swapping when heapifying in pop. | |
| event_counter | m_nItemMovedTop |
Count of events when push() encountered that inserted item was moved to top by a concurrent pop() | |
| event_counter | m_nItemMovedUp |
Count of events when push() encountered that inserted item was moved upwards by a concurrent pop() | |
| event_counter | m_nPushEmptyPass |
| Count of empty pass during heapify via concurrent operations. | |
MSPriorityQueue statistics.


Unlike other digital book clubs, The Book Club is totally free.
The Book Club offers a lot of categories and one of them is educational books.
If you want to request a book, write it to us!
The Book Club were only available in the library.
The Book Club Meet & Greet is a group of bookloving people who meet for a chat about books.
The first website was created for people who couldn't attend the book club. It was a website where you could communicate together about the book
This is where The Book Club is right now. A website where it's free to read books. It is suppose to help students with studies, get children to sleep with bedtime stories or just a book to read on the train.


Please consult the the tutorial.html file under the doc directory for an introduction on how to use this class.
Parms
- tf
- An instance of the class Proteins, a frame id or PFrame.
- all_forms
- Keyword, When True, then return the DNA binding sites of modified forms and subunits of tf as well.
Parms
- reg_frame
- An instance of class Regulation, a frame id or PFrame
Parms
- g1
- An instance of class Genes, a frame id or PFrame.
- g2
- An instance of class Genes, a frame id or PFrame.
Parms
- protein
- An instance of the class Proteins, a frame id or PFrame.
Parms
- type
- Keyword, A type as taken from the argument to fn enzyme. Defaults to ‘chemical-change’.
Parms
- protein
- An instance of the class Proteins, a frame id or PFrame.
Parms
- class_name
- Keyword, The class Regulation or a subclass. It defaults to Regulation-of-Transcription-Initiation.
- allow_modified_forms
- Keyword, A boolean value. If True, modified and unmodified forms of the protein are returned. If false, then only unmodified forms of the proteins are returned. The default value is True.
Parms
- selector
- Selects whether all pathways, or just small-molecule metabolism base pathways. Can take either ‘all’ or ‘small-molecule’. Defaults to ‘all’.
- base
- If this boolean argument is True, only includes base pathways. Otherwise, all pathways, including superpathways, will be returned.
Parms
- gene
- An instance of class Genes, a frame id or PFrame.
Parms
- filter
Keyword, The type of protein complexes to return. The argument must be one of the following values:
- ‘all’
- Return all protein complexes.
- ‘hetero’
- Return all heteromultimers.
- ‘homo’
- Return all homomultimers.
Parms
- type
The type of reaction to return. Defaults to ‘metab-smm’. The possible values are:
- ‘all’
- All reactions.
- ‘metab-pathways’
- All reactions found within metabolic pathways. Includes reactions that are pathway holes. May include a handfull of reactions whose substrates are macromolecules, e.g., ACP. Excludes transport reactions.
- ‘metab-smm’
- All reactions of small molecule metabolism, whether or not they are present in a pathway. Subsumes metab-pathways.
- ‘metab-all’
- All enzyme-catalyzed reactions. Subsumes metab-smm.
- ‘enzyme’
- All enzyme-catalyzed reactions (i.e., instances of either EC-Reactions class or Unclassified-Reactions class).
- ‘transport’
- All transport reactions.
- ‘small-molecule’
- All reactions whose substrates are all small molecules, as opposed to macromolecules. Excludes transport reactions.
- ‘protein-small-molecule-reaction’
- One of the substrates of the reaction is a macromolecule, and one of the substrates of the reaction is a small molecule.
- ‘protein-reaction’
- All substrates of the reaction are proteins.
- ‘trna-reaction’
- One of the substrates of the reaction is a tRNA.
- ‘spontaneous’
- Spontaneous reactions.
- ‘non-spontaneous’
- Non-spontaneous reactions that are likely to be enzyme catalyzed. Some reactions will be returned for type non-spontaneous that will not be returned by enzyme.
Parms
- rxns
- A list of reaction PFrames or frame ids.
Parms
- from_compartment
- Keyword, The compartment that the chemical is coming from (see Cellular Component Ontology).
- to_compartment
- Keyword, The compartment that the chemical is going to (see Cellular Component Ontology).
- primary_only
- Keyword, If True, filter out common transport compounds, such as protons and Na+.
Parms
- membranes
- Keyword, Either all or a list of instances of the class. Defaults to all CCO-MEMBRANE.
- method
- Keyword, Either ‘location’ or ‘reaction-compartments’. ‘location’ will check the locations slot, while ‘reaction-compartments’ will examine the compartments of reaction substrates. Default value is ‘location’.
Parms
- protein
- An instance frame of class Proteins, a frame id or PFrame.
Parms
- p
- An instance of the class Proteins, a frame id or PFrame.
- exclude_small_molecules
- Keyword, If nil, then small molecule components are also returned. Default value is True.
Parms
- tu
- An instance of the class DNA-Binding-Sites, a frame id or PFrame.
Parms
- bsite
- An instance of class DNA-Binding-Sites, a frame id or PFrame.
Parms
- promoter, a frame id or PFrame.
- An instance of class DNA-Binding-Sites or mRNA-Binding-Sites.
Parms
- gene
- An instance of the class Genes, a frame id or PFrame.
Parms
- gene
- An instance of class Genes, a frame id or PFrame.
Parms
- item, a frame id or PFrame
- An instance of class All-Genes, Transcription-Units, Promoters, Terminators, Misc-Features, or DNA-Binding-Sites.
Parms
- tu
- An instance of the class Transcription-Units, a frame id or PFrame.
Parms
- enzrxn
- An instance of the class Enzymatic-Reactions, a frame id or PFrame.
Parms
- rxn
- An instance of the class Reactions, that is, a frame id or PFrame.
- default
- Keyword, The default compartment for reactions without any compartment annotations on their substrates. The default value is CCO-CYTOSOL.
Parms
- rxn
- An instance of the class Reactions, a frame id or PFrame.
- sides
- Keyword, The slots of the reaction to consider. The default value is (LEFT RIGHT).
- default_compartment
- Keyword, The default compartment, as determined by the function (default-compartment), which currently is set to CCO-CYTOSOL.
Parms
- frame
- a frame id or PFrame.
Parms
- pwy
- An instance of the class Pathways, a frame id or PFrame.
Parms
- protein
- An instance of the class Proteins, a frame id or PFrame.
- exclude_self
- Keyword, If True, then protein will not be included in the return value.
Parms
- site, a frame id or PFrame.
- An instance of class Transcription-Units, mRNA-Binding-Sites, DNA-Binding-Sites, Promoters, Genes, or Terminators.
Parms
- site, a frame id or PFrame.
- An instance of class Transcription-Units, mRNA-Binding-Sites, DNA-Binding-Sites, Promoters, Genes, or Terminators.
Parms
- gene
- An instance of class Genes, a frame id or PFrame
Create all the required PFrames for the given frameids. If a PFrame already exist for a frameid on the PGDB, reuse that PFrame, otherwise create a PFrame. No data is transferred from Pathway Tools.
Parms
- cpds
- An instance or list of instances of class Compounds, a frame id or PFrame.
- mode
- Keyword, Represents the type of regulation. Can take on the values of “+”, “-”, or None.
- mechanisms
- Keyword, Keywords from the mechanism slot of the corresponding sub-class of the class Regulation. If True, only regulation objects with mechanisms in this list will be explored for regulated objects.
- phys_relevant
- Keyword, If True, then only return inhibitors that are associated with Regulation instances that have the physiologically-relevant? slot set to True.
- slots
- Keyword, A list of enzymatic reaction slots.
Parms
- item
- A frame id or PFrame.
Parms
- item
- A frame id or PFrame.
Parms
- item
- A frame id or PFrame.
- filter_fn
- Keyword, A predicate used to filter the regulation objects used to find the regulators.
Parms
- gene
- A frame id or PFrame.
Parms
- er
- An instance of the class Enzymatic-Reactions, a frame id or PFrame.
- phys_relevant_only
- Keyword, If True, then only return activators that are associated with Regulation instances that have the physiologically-relevant? slot set to True.
Parms
- er
- An instance of the class Enzymatic-Reactions, a frame id or PFrame.
- phys_relevant_only
- Keyword, If True, then only return inhibitors that are associated with Regulation instances that have the physiologically-relevant? slot set to True.
Parms
- enzyme
- An instance of the class Proteins, that is, a frame id or a PFrame.
- reaction
- Keyword, An instance of the class Reactions.
Parms
- protein
- An instance of the class Proteins, a frame id or PFrame.
- type
Keyword, Can take on one of the following values to select more precisely what is meant by an “enzyme”:
- ‘any’
- Any protein that catalyzes a reaction is considered an enzyme.
- ‘chemical-change’
- If the reactants and products of the catalyzed reactin differ, and not just by their cellular location, then the protein is considered an enzyme.
- ‘small-molecule’
- If the reactants of the catalyzed reaction differ and are small molecules, then the protein is considered an enzyme.
- ‘transport’
- If the protein catalyzes a transport reaction.
- ‘non-transport’
- If the protein only catalyzes non-transport reactions.
Parms
- gene
- An instance of class Genes, a frame id or PFrame.
Parms
- pwy
- An instance of the class Pathways, a frame id or PFrame.
- species
- Keyword, A list of species, such that in a multi-organism PGDB such as MetaCyc, only proteins found in those organisms will be returned. This list can include valid org-ids, children of class Organisms, and strings. Please see the documentation for the species slot-unit for more information.
- experimental_only
- Keyword, When True, only return enzymes that have a non-computational evidence code associated with it.
- sorted
- Keyword, If True, the enzymes are sorted in the order in which the corresponding reaction occurrs in the sequence of the pathway.
Parms
- rxn
- An instance of the class Reactions, a frame id or PFrame.
- species
- Keyword, A list of species, such that in a multi-organism PGDB such as MetaCyc, only proteins found in those organisms will be returned. This list can include valid org-ids, children of class Organisms, and strings. Please see the documentation for the species slot-unit for more information. Default value is nil.
- experimental_only
Keyword, When True, only return enzymes that havea non-computational evidence code associated with it.
- local_only
- Keyword, When True, only return enzymes that catalyze the specific form of the reaction, as opposed to enzymes that are known to catalyze a more general form (i.e., class) of the reaction.
Parms
- enzyme
- An instance of the class Proteins, that is, a frame id or a PFrame.
- use_frame_name
- Keyword, If True, then the frameid of the enzyme instance is used in computing the enzyme name. Defaults to True.
- name
- Keyword, A string that bypasses the function, and will be returned as the value of the function.
- activity_names
- Keyword, A provided list of strings, that represent the names of the known catalytic activities of enzyme.
Parms
- genes
- A list of instances of class Genes, a frame id or PFrame.
- max_gap
- Keyword, An integer representing the number of genes any pair from genes can be from one another. Default value is 10.
Parms
- item
- a frame id or PFrame.
Parms
- gene
- An instance of class Genes, a frame id or PFrame
Parms
- gene
- An instance of class Genes, a frame id or PFrame.
Parms
- pwy
- An instance of the class Pathways, a frame id or PFrame.
- sorted?
- Keyword, If True, the genes are sorted in the order in which the corresponding reaction occurrs in the sequence of the pathway.
Parms
- protein
- An instance of the class Proteins, a frame id or PFrame.
Parms
- protein
- A list of instances of the class Proteins, a frame id or PFrame.
Parms
- rxn
- An instance of the class Reactions, a frame id or PFrame.
Parms
- gene
- An instance of the class Genes, a frame id or PFrame.
Parms
- protein
- An instance of the class Proteins, a frame id or PFrame.
Parms
- gene
- An instance of the class Genes, a frame id or PFrame.
Get all instances of the given class name for this PGDB. ClassName must be exactly as Pathway Tools expect the name of the class, no conversion is applied.
Retrieve the class slots and their values, creating a PFrame for the class. Retrieve also the list of instances from Pathway Tools and create a PFrame for each instance. Store the list of PFrames in attribute ‘instances’ of the class object. If getInstancesData is True, get also all instances slots and their data.
realClassName, a string, the real name of the class to retrieve. attr, a string, the name used by the caller to retrieve that class. getInstancesData, boolean, True => get the slots and data of all instances.
For each frame id of the list frameids, retrieve the slots and their data. Reuse the PFrame of frameid if it already exist for this PGDB, otherwise create one and attach it to this PGDB.
Get from Pathway Tools the classes Reactions, Pathways, Genes, Compounds, Proteins, and all their instances with their data. This method is very time consuming has several ten of thousands of frames need to be transferred from Pathway Tools and the corresponding PFrames need to be created.
Parms
- item
- A frame id or PFrame.
- rxn_eqn_as_name
- Keyword, If True, then we use the reaction equation in string form as the name of the reaction. Defaults to True.
- rxn_common_name_as_name
- Keyword, If True, then we use the reaction’s common name as the name of the reaction.
- direction
- Keyword, An argument of ‘l2r’ or ‘r2l’ can be given to specify the desired reaction orientiation when printed in reaction equation form. If this is not provided, then the reaction direction will be determined using pathway evidence.
- name_slot
- Keyword, The specified slotunit frame name, as a symbol, will be used for extracting the name of the frame.
- strip_html
- Keyword, Remove any HTML mark-up from the string form of the object name.
- include_species_strain_name
- Keyword, Provide proper italicization for the organism strain name.
- italicize_species
- Keyword, Provide proper italicization for the organism species name.
- short_name
- Keyword, If the ABBREV-NAME slot is populated for the frame, then its value will be used.
- species_initials
- Keyword, Print the name of the organism as initials.
- primary_class
- Keyword, Specify explicitly the primary class of the given frame. This can be used to override the internal reasoning of this function, and you can give a suggestion to the function to treat the frame as another class.
Parms
- rxn
- An instance of the class Reactions, a frame id or PFrame.
- pwy
- A child of the class Pathways.
Return the single slot value of a frame object. Parms
- frameid
- a string representing the unique identifier for a frame object.
- slotName
- a string representing the slot of the frame object.
Return the slot values of a frame object. Parms
- frameid
- a string representing the unique identifier for a frame object.
- slotName
- a string representing the slot of the frame object.
where meta is a variable bound to a PGDB object.
Parms
- rxn
- An instance of the class Reactions, a frame id or PFrame.
- pwy
- A child of the class Pathways.
Parms
- protein
- An instance of the class Proteins, a frame id or PFrame.
- exclude_self
- Keyword, If True, then protein will not be included in the return value.
Parms
- reg_frame
- An instance of class Regulation, a frame id or PFrame
Verify that className is a known class in Pathway Tools. Return the real name of that class because the className may have been transformed by fn class-name-p to generate the closest real class name.
Similar to method is_a_class_name but for frame objects (instances). If frame id is a real frame id of an object of this PGDB, returns it as is. If not, try to convert it to a real frame id by transforming cases of letters and underscores to dashes.
- Parm
- frameid, a string.
- Returns
- a string representing an existing frame in the PGDB.
Parms
- protein
- An instance of the class Proteins, a frame id or PFrame.
Parms
- protein
- An instance of the class Proteins, a frame id or PFrame.
Parms
- protein
- An instance of the class Proteins, a frame id or PFrame.
Parms
- protein
- An instance of the class Proteins, a frame id or PFrame.
- exclude_self
- Keyword, If True, then protein will not be included in the return value.
- all_variants
- Keyword, If True, and protein is a modified form, then we return all of the modified forms of the unmodified forms of protein.
Parms
- p
- An instance of the class Proteins, a frame id or PFrame.
- coefficients
- Keyword, If True, then the second return value of the function will be a list of monomer coefficients. Defaults to True.
- unmodify
- Keyword, If True, obtain the monomers of the unmodified form of p.
Parms
- g1
- An instance of class Genes, a frame id or PFrame.
- g2
- An instance of class Genes, a frame id or PFrame.
- n
- Keyword, An integer representing the number of genes g1 and g2 can be from one another. Default value is 10.
Parms
- gene
- An instance of class Genes, a frame id or PFrame.
Parms
- pwy
- An instance of the class Pathways, a frame id or PFrame.
Parms
- rxn
- An instance of the class Reactions, that is, a frame id or PFrame.
Parms
- gene
- An instance of class Genes, a frame id or PFrame
Parms
- pwy
- An instance of the class Pathways, a frame id or PFrame.
- rxn
- An instance of the class Reactions, a frame id or PFrame.
- enzrxn
- An instance of the class Enzymatic-Reactions, a frame id or PFrame.
- single_species
- Keyword, An instance of the class Organisms If set, then enzrxn has the further stricture that it must be an enzymatic reaction present in the organism specified by the value passed to single-species.
Parms
- pwy, a frame id or PFrame.
- An instance of the class Pathways, which is not a super-pathway (i.e., does not have any entries in its sub-pathways slot).
- rxn_list
- Keyword, The list of reactions to use as the starting list of connected component clusters. Defaults to the content of slot reaction-list in pwy.
- pred_list
- Keyword, The list of reaction predecessors to iterate from in order to cluster the reactions in rxn-list. Defaults to list in slot predecessors of pwy.
Parms
- rxn
- An instance of the class Reactions, a frame id or PFrame.
- hole_if_any_gene_without_position
- Keyword, If True, then genes without specified coordinates for the current organism’s genome are not counted when determining the status of the reaction.
Parms
- cpd
- An instance of class Compounds, a frame id or PFrame.
- non-specific_too
- Keyword, If True, returns all generic reactions where cpd, or a parent of cpd, appears as a substrate.
- modulators
- Keyword, If True, returns pathways where cpd appears as a regulator as well.
- phys-relevant
- Keyword, If True, then only return inhibitors that are associated with Regulation instances that have the physiologically-relevant? slot set to True.
- include-rxns
- Keyword, If True, then return a list of reaction-pathway pairs.
Parms
- enzrxn
- An instance of the class Enzymatic-Reactions, a frame id or PFrame.
- include_super_pwys
- Keyword, If True, then not only will the direct pathways in which enzrxn is associated in be returned, but also any enclosing super-pathways. If enzrxn is associated with a reaction that is directly associated with a super-pathway, then the function might return super-pathways even if this option is nil.
Parms
- gene
- An instance of class Genes, a frame id or PFrame.
- include_super_pwys
- Keyword, If True, then not only will the direct pathways in which gene encodes an enzyme be returned, but also any enclosing super-pathways. If gene is associated with a reaction that is directly associated with a super-pathway, then the function might return super-pathways even if this option is nil.
Parms
- gene
- An instance of the class Genes, a frame id or PFrame.
Parms
- protein
- An instance of the class Proteins, a frame id or PFrame.
Parms
- gene
- An instance of class Genes, a frame id or PFrame.
Parms
- promoter
- An instance of class Promoters, a frame id or PFrame.
Parms
- gene
- An instance of the class Genes, a frame id or PFrame.
Parms
- rxn
- An instance of the class Reactions, a frame id or PFrame.
- compartments
- A list of cellular compartments, as defined in the Cellular Components Ontology. See frame CCO.
- default_ok
- Keyword, If True, then we return True if the reaction has no associated compartment information, or one of its associated locations is a super-class of one of the members of the compartments argument.
- pwy
- Keyword, a frame id or PFrame. If supplied, the search for associated enzymes of the argument rxn is limited to the given child of Pathways.
- loose
- Keyword, If True, then the compartments CCO-CYTOPLASM and CCO-CYTOSOL are treated as being the same compartment.
Parms
- protein
- An instance of the class Proteins, a frame id or PFrame.
- exclude_self
- Keyword, If True, then protein will not be included in the return value.
Parms
- frame
- a frame id or PFrame.
Parms
- gene
- An instance of the class Genes, a frame id or PFrame.
Modify the slot value of a frame object with the given val. Val is a single value (e.g., not a list).
Modify the slot values of a frame object with the given val. Val is typically a list of objects.
Parms
- rxn
- An instance of the class Reactions, that is, a frame id or PFrame.
- direction
Keyword, Can take on the following values:
- ‘L2R’
- The reaction direction goes from ‘left to right’, as described in the Reactions instance.
- ‘R2L’
- The reaction direction goes from ‘right to left’; the opposite of what is described in the Reactions instance.
- pwy
- Keyword, An instance of the class Pathways, a frame id or PFrame.
Parms
- rxn
- An instance of the class Reactions, a frame id or PFrame.
A string from the following list:
Parms
- cpd, a frame id or PFrame.
- A child of class Compounds.
- non_specific_too
- Keyword, If True, returns all generic reactions where cpd, or a parent of cpd, appears as a substrate.
- transport_only
- Keyword, If True, return only transport reactions.
- compartment
- Keyword, If True, return only reactions within the specified compartment.
- enzymatic
- Keyword, If True, return only enzymatic reactions.
Parms
- protein
- An instance of the class Proteins, a frame id or PFrame.
- kb
- Keyword, The KB object of the KB in which to find the associated reactions. Defaults to self.
- include_specific_forms
- Keyword, When True, specific forms of associated generic reactions are also returned. Default value is True.
Parms
- gene
- An instance of class Genes, a frame id or PFrame.
Parms
- protein
- An instance of the class Proteins, a frame id or PFrame.
- check_protein_components?
- Keyword, If True, check all components of this protein for catalyzed reactions. Defaults to True.
- check_protein_containers?
- Keyword, If True, check the containers and modified forms of the protein for catalyzed reactions.
Parms
- prots
- A list of instances of the class Proteins, a frame id or PFrame.
- debind
- Keyword, When True, the proteins are further simplified by obtaining the unbound form of the protein, if it is bound to a small molecule.
Parms
- reg_frame
- An instance of the class Regulation-of-Transcription, a frame id or PFrame.
Parms
- protein
- An instance frame of class Proteins, a frame id or PFrame.
- class
- A subclass of Regulation.
Parms
- tu
- An instance of the class Transcription-Units, a frame id or PFrame.
Parms
- gene
- An instance of the class Genes, a frame id or PFrame.
- by_function
- Keyword, If True, then return two values: a list of activator proteins and a list of inhibitor proteins.
Parms
- operon_list
- A list of instances of the class Transcription-Units, a frame id or PFrame.
- by_function
- Keyword, If True, then return two values: a list of activator proteins and a list of inhibitor proteins.
Parms
- protein
- An instance frame of class Proteins, a frame id or PFrame.
Parms
- gene
- An instance of the class Genes, a frame id or PFrame.
In PythonCyc there is a run_fba method defined globally in the pythoncyc module and there is this version which is run under a specific PGDB. Notice though that the FBA input file provided will decide which organism is used for running FBA and may override this PGDB.
Parms
- rxn
- An instance of the class Reactions, a frame id or PFrame.
- compartments
- A list of cellular compartments, as defined in the Cellular Components Ontology. See frame CCO.
- default_ok
- Keyword, If True, then we return True if the reaction has no associated compartment information, or one of its associated locations is a super-class of one of the members of the compartments argument.
- pwy
- Keyword, a frame id or PFrame. If supplied, the search for associated enzymes of the argument rxn is limited to the given child of Pathways.
- loose
- Keyword, boolean. If True, then the compartments CCO-CYTOPLASM and CCO-CYTOSOL are treated as being the same compartment.
Parms
- rxn
- An instance of the class Reactions, that is, a frame id or PFrame.
Parms
- specific_rxn
- A child of the class Reactions, that is, a frame id or PFrame.
- generic_rxn
- A child of the class Reactions, that is, a frame id or PFrame.
Parms
- rxn
- An instance of the class Reactions, a frame id or PFrame.
Parms
- rxn
- An instance of the class Reactions, that is, a frame id or PFrame.
- complete
- Keyword, if True, the predicate will return True when there is any associated gene without a sequence. If False, the predicate will return True when all associated genes are without a sequence.
Parms
- rxn1
- An instance of the class Reactions, a frame id or PFrame.
- rxn2
- An instance of the class Reactions, a frame id or PFrame.
- pwy
- An instance of the class Pathways, a frame id or PFrame.
Parms
- rxns
- Keyword, A list of instances of the class Reactions. Defaults to the result of (all-rxns :enzyme).
Parms
- rxns
- Keyword, A list of instances of the class Reactions. Defaults to the result of (all-rxns :enzyme).
Save a PGDB that has been modified in the running Pathway Tools server. The PGDB that will be saved is based on the orgid of this PGDB object.
Send a PGDB query to Pathway Tools based on function fn and arguments args and kwargs (keyword args) and return the result. Note that if multiple values are returned by the fn, the Pathway Tools Python server transforms them into a list.
Send a PGDB query to Pathway Tools that will return a Bool value. This method takes care of translating no value or an empty list to False.
Send a PGDB query to Pathway Tools that will return a List value. This method takes care of translating no value or False to an empty list.
Send a query for a specific PGDB using its orgid. Use the macro with-organism for the Lisp Python server.
Parms
- protein
- An instance of the class Proteins, a frame id or PFrame.
Parms
- protein
- A list of instances of the class Proteins, a frame id or PFrame.
Parms
- rxn
- A child of the class Reactions, that is, a frame id or PFrame.
Parms
- cpd
- An instance of class Compounds, a frame id or PFrame.
- rxn
- An instance of class Reactions, a frame id or PFrame.
Parms
- pwy
- An instance of the class Pathways, a frame id or PFrame.
Parms
- rxn
- An instance of the class Reactions, a frame id or PFrame.
Parms
- gene
- A frame id or PFrame.
Parms
- gene
- An instance of class Genes, a frame id or PFrame
Parms
- cpd
- An instance of class Compounds, a frame id or PFrame.
- include_inactive
- Keyword, If True, then the inactive form of the protein is also checked. See the function transcription-factor? for more information.
Parms
- protein
- An instance of the class Proteins, a frame id or PFrame.
Parms
- tfs, a frame id or PFrame.
- An instance of the class Proteins.
Parms
- tfs, a frame id or PFrame or a list of these.
- An instance or a list of instances of the class Proteins. If tfs is not the active form, then the active form is determined automatically.
- mode
- One of the following values: ‘activator’, ‘inhibitor’, or ‘both’.
Parms
- protein
- An instance frame of class Proteins, a frame id or PFrame.
- include_inactive
- Keyword, If True, then the function checks to see if any of its components or containers is a transcription factor as well.
Parms
- tu
- An instance of the class Transcription-Units, a frame id or PFrame.
Parms
- tu
- An instance of the class Transcription-Units, a frame id or PFrame.
Parms
- tu
- An instance of the class Transcription-Units, a frame id or PFrame.
Parms
- tu
- An instance of the class Transcription-Units, a frame id or PFrame.
Parms
- tu
- An instance of the class Transcription-Units, a frame id or PFrame.
Parms
- tu
- An instance of the class Transcription-Units, a frame id or PFrame.
Parms
- tu
- An instance of the class Transcription-Units, a frame id or PFrame.
Parms
- tu
- An instance of the class Transcription-Units, a frame id or PFrame.
Parms
- tu
- An instance of the class Transcription-Units, a frame id or PFrame.
Parms
- tu
- An instance of the class Transcription-Units, a frame id or PFrame.
Parms
- tu
- An instance of the class Transcription-Units, a frame id or PFrame.
Parms
- operon
- An instance of the class Transcription-Units, a frame id or PFrame.
Parms
- tu
- An instance of the class Transcription-Units, a frame id or PFrame.
Parms
- promoter
- An instance of class Promoters, a frame id or PFrame.
Parms
- protein
- An instance of the class Proteins, a frame id or PFrame.
Parms
- rxn
- An instance of the class Reactions, a frame id or PFrame.
- side
- Keyword, The side of the reaction from which to return the transported compound.
- primary_only
- Keyword, If True, then filter out common exchangers (currently defined as (PROTON NA CPD-1)+). If True, and the only transported compounds are in this list, then the filter doesn’t apply.
- from_compartment
- Keyword, A compartment (child of class CCO). If specified, then only return compounds transported from that compartment.
- to_compartment
- Keyword, A compartment (child of class CCO). If specified, then only return compounds transported to that compartment.
- show_compartment
- Keyword, A compartment (child of class CCO). If specified, and the compound is modified during transport, then only return the form of the compound as found in this compartment.
Parms
- protein
- An instance of the class Proteins, a frame id or PFrame.
Parms
- gene
- An instance of class Genes, a frame id or PFrame.
Parms
- gene
- An instance of class Genes, a frame id or PFrame.
Parms
- protein
- An instance of the class Proteins, a frame id or PFrame.
Convert the arg into an acceptable quoted object for Python server running on Pathway Tools. Note that any list is converted to a quoted Lisp list.
A simple function to convert a string into a Lisp keyword.
Prepare all arguments and keyword arguments for a function call to Pathway Tools. Arguments
fn, a string, the name of the Lisp function to call. args, list of arguments kwargs, list of keyword arguments
This module handles basic operations for receiving and sending messages via a network socket to Pathway Tools.
No major class is defined in this file, but only toplevel functions and some simple classes for errors handling.
Bases: exceptions.Exception
Error generated when Pathway Tools send an error due to its own Lisp execution.
Bases: exceptions.Exception
Error generated by one of the module of PythonCyc due to an incorrect use of its methods or functions.
Receive the entire message sent by Pathway Tools on socket s. The message starts with a single character type, which is either ‘A’ or ‘L’. The ‘A’ time is used without providing a length but can take longer to receive because it uses a timeout technique to read the entire message. The ‘L’ type assumes that the length of the message, in characters, is given on the next 10 characters as an integer. The message length is the number of characters after these 10 characters.
Receive a fixed length message on socket s. Parm
- lengthMsg, an integer, which is the length in characters of the
- message to receive.
Receive a message of unknown length on socket. While receiving a message, if no more characters are sent on socket after timeOut seconds, it is assumed that the message has ended. Therefore, it will always, whatever the lenght of the message, take at least timeOut seconds to execute this method. If no character is received after 60 seconds, this method returns with an empty message.
socket, an open network socket. timeOut, number of seconds before timing out between fragments of the received
message.
Please consult the the tutorial.html file under the doc directory for an introduction on how to use this class.
PFrame is a class to represent Pathway Tools’ frames. A PFrame can represent a class frame (e.g., Reactions) as well as an instance frame (e.g., RXN-9000).
The required parameters to create a PFrame are the frame id (a string) and a PGDB object. For example, assuming that ‘meta’ is bound to a PGDB object, the following create a PFrame to represent the reaction RXN-9000,
PFrame(‘RXN-9000’, meta)
By default, an instance PFrame (not a class PFrame) is created. To create a PGDB object, use class PGDB, or call method pythoncyc.so.
A few methods were written to display frames using HTML in IPython. Naturally, this functionality is only defined when using IPython as a Python interpreter.
Please consult the the tutorial.html file under the doc directory for an introduction on how to use this class.
Retrieve the frame data from Pathway Tools, that is, all slots and their values for this PFrame are retrieved and stored locally. For a class, the instances are not retrieved by this method. Instead, use method get_class_data applied to a PGDB object.
This class can be used to represent Lisp symbols in PythonCyc. For example, Symbol(‘trp’) represents the symbol trp. It is mainly used to ensure that some arguments of methods are interpreted as symbols and not as strings during the translation to send a request to Pathway Tools.
This module can be used to set various parameters for PythonCyc, in particular to set debug on or off, the host name and port number of the running Pathway Tools’ Python server. By default, the Pathway Tools Python server is running locally on port 5008.
Turn off debug mode for PythonCyc. Turning off debugging should turn off all output tracings of the communications between PythonCyc and Pathway Tools.
This module is part of PythonCyc, a Python interface module to Pathway Tools. This code has been tested with Python 2.6.
Pathway Tools (version 18.5 and up) must be running on some machine with at least the option ‘-python’. It is also recommended to start Pathway Tools with the option -lisp, so that the connection can be monitored:
./pathway-tools -lisp -python
The global functions defined in this init file can be called before any PGDB (an organism database in Pathway Tools) has been selected. In fact, two of these functions, select_organism and its synonym so, are needed to “select” a PGDB by creating a PGDB object. See class PGDB in PGDB.py for information about how to use a PGDB object.
Please consult the tutorial.html file, under directory doc, for more information about how to use PythonCyc.
Returns all organism unique ids (orgids) available from the current running Pathway Tools.
Execute a BioVelo query and return the result.
The function run_fba does not need to have an organism selected before being used because the FBA input file provided as input can specify the organism.
For the documentation of this function, see method run_fba in file PGDB.py.


School districts in Queens had the greatest percent of schools offering arts education in all four subject areas—dance, music, theater and visual arts—during the 2017-18 school year, according to the annual Arts Report. The data from the Arts Report covers schools serving grades 1-5 and is distributed by the New York City Department of Education each year.
School District 28 in Queens had the highest percent of elementary schools with arts instruction in all four areas, 78%, while School District 23 in Brooklyn reported 0% of their schools had arts instruction in all four areas.
According to PhD Candidate Elias Gross, continuing broad arts education into later years is a necessary step to better access to the arts.
"The bar to entering an orchestra is so astronomically high that you're basically just like waiting for someone to die," he said, encouraging public schools to offer arts education programs beyond elementary school to combat this issue.


--- layout: post authors: ["Greg Wilson"] title: "Nature Interview with Kaitlin Thaney" date: 2014-09-03 time: "21:00:00" tags: ["Noticed"] ---
Nature has just published a short interview about Software Carpentry with Kaitlin Thaney, the director of the Mozilla Science Lab, and two bootcamp attendees (Harvard's Rebecca Perry and USNIDA's Brian Sadacca). As always, version control seems to have been one of their big take-aways, but as Kaitlin says, two days isn't enough for people to become proficient: our bootcamps really are just the first step.


Our privacy policy is simple: we don’t collect
or share any of your personal information.
We don’t store your search history. We therefore have nothing
to sell to advertisers that track you across the internet.
Other search engines track your searches even when you’re
in private browsing mode. We don’t track you — period.
No tracking, no ad targeting, just searching.


×
×
×
×
×
Adobe Color
HTML Color Codes
CSS URL
×
HTML
CSS
|
<!DOCTYPE html>
<
html
>
<
head
>
<
meta
charset
=
"utf-8"
/>
<
meta
name
=
"viewport"
content
=
"width=device-width, initial-scale=1"
/>
<
title
>
</
title
>
<
style
type
=
"text/css"
>
</
style
>
</
head
>
</
html
>


TIC TAC TOE
A game of wits
Current Player:
X
Start Over
WON!!!
IN YO FACE.
TIE GAME!!!


About me
I love writing code and it gives me intense pleasure while doing so. Therefore, I’m going to
give a brief history of how it led to the development of this interest in me. Since I was a
kid, I was fascinated by computers. When I was 3, I started to play games on the computer by
executing DOS commands. By the time I reached my teens I was very sure of entering the world
of software and do programming. Throughout my childhood, my toys were mechanical building
things with metallic parts and attaching all those together.  The reason my parents gifted me these? They knew that
I had a huge interest in technical stuff. Fast forward to me being 16, I had tried multiple
times now and had failed to learn to program on my own. I finally got my hands on a C
programming book and out of interest, I started learning C programming by typing out the
programs on the ancient Turbo C compiler. I finally had started to learn to program and I
continued to learn different languages and learnt different techniques. I, later on, developed
a lot of interest in learning the different programming paradigms. I also still am interested
in different paradigms, philosophies and principles on which different languages are based.
Also, I’m interested in theoretical computer science and learning new things with respect to
computer science.
Just being interested in programming does not satisfy me. I love to be creative and try to
work on my own personal project. I have worked on quite a lot of my own/personal projects and
learnt a lot of new things. And no, this is not about the past, I still do work on personal
projects. I believe that mastering different frameworks and tools can be done in this way.
Also, something innovative can be made in this way. And it is fun when you having complete
control on whatever you're coding, this helps in having fun while coding. Apart from just
making personal projects, I like to write and talk. I’m also very interested in other science
and technology, mainly physics and astronomy. I watch a lot of videos about science online and
read some posts. No matter what field you work in creativity is very much needed in order to do
something amazing in that field.
Other than the technical things that I do in my life, I love to go out and spend time in
nature, explore different places. Also, there is something special about getting special
pleasures from small things in life. It can be something as small as getting a cup of coffee on
a small tea stall on a cold morning or having a small evening walk. Listening to music which is
happy or which is sad can have a really nice effect on the mood. I'm right now learning to play
the guitar. Even though I'm from a very scientific background, I appreciate art a lot. There
is something from the universe that is embedded in the art that makes it look so natural and
beautiful.


Rayna
Harris graduated from the University of Texas in
Austin with a PhD in Cell and Molecular Biology.
She enjoys particpating in the Software Carpentry community
to spread best practices for research and open education.
Instructor Trainer, Maintainer
Steering Committee (2016 Member, 2017 Secretary)


Advanced installation instructions¶
There are different ways to get scikit-learn installed:
- Install the version of scikit-learn provided by your operating system or Python distribution. This is the quickest option for those who have operating systems that distribute scikit-learn.
- Install an official release. This is the best approach for users who want a stable version number and aren’t concerned about running a slightly older version of scikit-learn.
- Install the latest development version. This is best for users who want the latest-and-greatest features and aren’t afraid of running brand-new code.
Note
If you wish to contribute to the project, you need to install the latest development version.
Installing an official release¶
Scikit-learn requires:
- Python (>= 2.6 or >= 3.3),
- NumPy (>= 1.6.1),
- SciPy (>= 0.9).
Mac OSX¶
Scikit-learn and its dependencies are all available as wheel packages for OSX:
pip install -U numpy scipy scikit-learn
Linux¶
At this time scikit-learn does not provide official binary packages for Linux so you have to build from source if you want the lastest version. If you don’t need the newest version, consider using your package manager to install scikit-learn. it is usually the easiest way, but might not provide the newest version.
installing build dependencies¶
installing from source requires you to have installed the scikit-learn runtime dependencies, python development headers and a working c/c++ compiler. under debian-based operating systems, which include ubuntu, if you have python 2 you can install all these requirements by issuing:
sudo apt-get install build-essential python-dev python-setuptools \
python-numpy python-scipy \
libatlas-dev libatlas3gf-base
if you have python 3:
sudo apt-get install build-essential python3-dev python3-setuptools \
python3-numpy python3-scipy \
libatlas-dev libatlas3gf-base
on recent debian and ubuntu (e.g. ubuntu 13.04 or later) make sure that atlas is used to provide the implementation of the blas and lapack linear algebra routines:
sudo update-alternatives --set libblas.so.3 \
/usr/lib/atlas-base/atlas/libblas.so.3
sudo update-alternatives --set liblapack.so.3 \
/usr/lib/atlas-base/atlas/liblapack.so.3
Note
in order to build the documentation and run the example code contains in this documentation you will need matplotlib:
sudo apt-get install python-matplotlib
Note
the above installs the atlas implementation of blas (the basic linear algebra subprograms library). ubuntu 11.10 and later, and recent (testing) versions of debian, offer an alternative implementation called openblas.
using openblas can give speedups in some scikit-learn modules, but can freeze joblib/multiprocessing prior to openblas version 0.2.8-4, so using it is not recommended unless you know what you’re doing.
if you do want to use openblas, then replacing atlas only requires a couple of commands. atlas has to be removed, otherwise numpy may not work:
sudo apt-get remove libatlas3gf-base libatlas-dev
sudo apt-get install libopenblas-dev
sudo update-alternatives --set libblas.so.3 \
/usr/lib/openblas-base/libopenblas.so.0
sudo update-alternatives --set liblapack.so.3 \
/usr/lib/lapack/liblapack.so.3
on red hat and clones (e.g. centos), install the dependencies using:
sudo yum -y install gcc gcc-c++ numpy python-devel scipy
building scikit-learn with pip¶
this is usually the fastest way to install or upgrade to the latest stable release:
pip install --user --install-option="--prefix=" -u scikit-learn
the --user
flag asks pip to install scikit-learn in the $home/.local
folder therefore not requiring root permission. this flag should make pip
ignore any old version of scikit-learn previously installed on the system while
benefiting from system packages for numpy and scipy. those dependencies can
be long and complex to build correctly from source.
the --install-option="--prefix="
flag is only required if python has a
distutils.cfg
configuration with a predefined prefix=
entry.
from source package¶
download the source package from pypi, , unpack the sources and cd into the source directory.
this packages uses distutils, which is the default way of installing python modules. the install command is:
python setup.py install
or alternatively (also from within the scikit-learn source folder):
pip install .
Warning
packages installed with the python setup.py install
command cannot
be uninstalled nor upgraded by pip
later. to properly uninstall
scikit-learn in that case it is necessary to delete the sklearn
folder
from your python site-packages
directory.
windows¶
first, you need to install numpy and scipy from their own official installers.
wheel packages (.whl files) for scikit-learn from pypi can be installed with the pip utility. open a console and type the following to install or upgrade scikit-learn to the latest stable release:
pip install -u scikit-learn
if there are no binary packages matching your python, version you might to try to install scikit-learn and its dependencies from christoph gohlke unofficial windows installers or from a python distribution instead.
third party distributions of scikit-learn¶
some third-party distributions are now providing versions of scikit-learn integrated with their package-management systems.
these can make installation and upgrading much easier for users since the integration includes the ability to automatically install dependencies (numpy, scipy) that scikit-learn requires.
the following is an incomplete list of python and os distributions that provide their own version of scikit-learn.
macports for mac osx¶
the macports package is named py<xy>-scikits-learn
,
where xy
denotes the python version.
it can be installed by typing the following
command:
sudo port install py26-scikit-learn
or:
sudo port install py27-scikit-learn
arch linux¶
arch linux’s package is provided through the official repositories as
python-scikit-learn
for python 3 and python2-scikit-learn
for python 2.
it can be installed by typing the following command:
# pacman -s python-scikit-learn
or:
# pacman -s python2-scikit-learn
depending on the version of python you use.
fedora¶
the fedora package is called python-scikit-learn
for the python 2 version
and python3-scikit-learn
for the python 3 version. both versions can
be installed using yum
:
$ sudo yum install python-scikit-learn
or:
$ sudo yum install python3-scikit-learn
building on windows¶
to build scikit-learn on windows you need a working c/c++ compiler in addition to numpy, scipy and setuptools.
picking the right compiler depends on the version of python (2 or 3)
and the architecture of the python interpreter, 32-bit or 64-bit.
you can check the python version by running the following in cmd
or
powershell
console:
python --version
and the architecture with:
python -c "import struct; print(struct.calcsize('p') * 8)"
the above commands assume that you have the python installation folder in your path environment variable.
32-bit python¶
for 32-bit python it is possible use the standalone installers for microsoft visual c++ express 2008 for python 2 or microsoft visual c++ express 2010 or python 3.
once installed you should be able to build scikit-learn without any particular configuration by running the following command in the scikit-learn folder:
python setup.py install
64-bit python¶
for the 64-bit architecture, you either need the full visual studio or the free windows sdks that can be downloaded from the links below.
the windows sdks include the msvc compilers both for 32 and 64-bit
architectures. they come as a grmsdkx_en_dvd.iso
file that can be mounted
as a new drive with a setup.exe
installer in it.
- for python 2 you need sdk v7.0: ms windows sdk for windows 7 and .net framework 3.5 sp1
- for python 3 you need sdk v7.1: ms windows sdk for windows 7 and .net framework 4
both sdks can be installed in parallel on the same host. to use the windows
sdks, you need to setup the environment of a cmd
console launched with the
following flags (at least for sdk v7.0):
cmd /e:on /v:on /k
then configure the build environment with:
set distutils_use_sdk=1
set mssdk=1
"c:\program files\microsoft sdks\windows\v7.0\setup\windowssdkver.exe" -q -version:v7.0
"c:\program files\microsoft sdks\windows\v7.0\bin\setenv.cmd" /x64 /release
finally you can build scikit-learn in the same cmd
console:
python setup.py install
replace v7.0
by the v7.1
in the above commands to do the same for
python 3 instead of python 2.
replace /x64
by /x86
to build for 32-bit python instead of 64-bit
python.
building binary packages and installers¶
the .whl
package and .exe
installers can be built with:
pip install wheel
python setup.py bdist_wheel bdist_wininst -b doc/logos/scikit-learn-logo.bmp
the resulting packages are generated in the dist/
folder.
using an alternative compiler¶
it is possible to use mingw (a port of gcc to windows os) as an alternative to msvc for 32-bit python. not that extensions built with mingw32 can be redistributed as reusable packages as they depend on gcc runtime libraries typically not installed on end-users environment.
to force the use of a particular compiler, pass the --compiler
flag to the
build step:
python setup.py build --compiler=my_compiler install
where my_compiler
should be one of mingw32
or msvc
.
bleeding edge¶
see section Retrieving the latest code on how to get the development version. then follow the previous instructions to build from source depending on your platform.
testing¶
testing scikit-learn once installed¶
testing requires having the nose library. after installation, the package can be tested by executing from outside the source directory:
$ nosetests -v sklearn
under windows, it is recommended to use the following command (adjust the path
to the python.exe
program) as using the nosetests.exe
program can badly
interact with tests that use multiprocessing
:
c:\python34\python.exe -c "import nose; nose.main()" -v sklearn
this should give you a lot of output (and some warnings) but eventually should finish with a message similar to:
ran 3246 tests in 260.618s
ok (skip=20)
otherwise, please consider posting an issue into the bug tracker or to the Mailing List including the traceback of the individual failures and errors. please include your operation system, your version of numpy, scipy and scikit-learn, and how you installed scikit-learn.
testing scikit-learn from within the source folder¶
scikit-learn can also be tested without having the package installed. for this you must compile the sources inplace from the source directory:
python setup.py build_ext --inplace
test can now be run using nosetests:
nosetests -v sklearn/
this is automated by the commands:
make in
and:
make test
you can also install a symlink named site-packages/scikit-learn.egg-link
to the development folder of scikit-learn with:
pip install --editable .


Double click a word to see its translation
We sat there, while he digested this.  I made no plans this time. I expected nothing. I was just quietly hopeful that, after the racing debacle, Will was still prepared to leave the annexe. His friend, the violinist, sent us the promised free tickets, with an information leaflet on the venue attached. It was forty minutes’ drive away. I did my homework, checked the location of the disabled parking, rang the venue beforehand to assess the best way to get Will’s chair to his seat. They would seat us at the front, with me on a folding chair beside Will. ‘It’s actually the best place to be,’ the woman in the box office said, cheerfully. ‘You somehow get more of an impact when you’re right in the pit near the orchestra. I’ve often been tempted to sit there myself.’ She even asked if I would like someone to meet us in the car park, to help us to our seats. Afraid that Will would feel too conspicuous, I thanked her and said no. As the evening approached, I don’t know who grew more nervous about it, Will or me. I felt the failure of our last outing keenly, and Mrs Traynor didn’t help, coming in and out of the annexe fourteen times to confirm where and when it would be taking place and what exactly we would be doing. Will’s evening routine took some time, she said. She needed to ensure someone was there to help. Nathan had other plans. Mr Traynor was apparently out for the evening. ‘It’s an hour and a half minimum,’ she said. ‘And it’s incredibly tedious,’ Will said. I realized he was looking for an excuse not to go. ‘I’ll do it,’ I said. ‘If Will tells me what to do. I don’t mind staying to help.’ I said it almost before I realized what I was agreeing to. ‘Well, that’s something for us both to look forward to,’ Will said grumpily, after his mother had left.   ‘Yes, because that makes the whole idea of going out so much more attractive.’ And then there was the wardrobe problem. I didn’t know what to wear. I had worn the wrong thing to the races. How could I be sure I wouldn’t do so again? I asked Will what would be best, and he looked at me as if I were mad. ‘The lights will be down,’ he explained. ‘Nobody will be looking at you. They’ll be focused on the music.’ ‘You know nothing about women,’ I said. I brought four different outfits to work with me in the end, hauling them all on to the bus in my Dad’s ancient suit carrier. It was the only way I could convince myself to go at all. Nathan arrived for the teatime shift at 5.30pm, and while he saw to Will I disappeared into the bathroom to get ready. First I put on what I thought of as my ‘artistic’ outfit, a green smock dress with huge amber beads stitched into it. I imagined the kind of people who went to concerts might be quite arty and flamboyant. Will and Nathan both stared at me as I entered the living room. ‘No,’ said Will, flatly. ‘That looks like something my mum would wear,’ said Nathan. ‘You never told me your mum was Nana Mouskouri,’ Will said. I could hear them both chuckling as I disappeared back into the bathroom. The second outfit was a very severe black dress, cut on the bias and stitched with white collar and cuffs, which I had made myself. It looked, I thought, both chic and Parisian. ‘You look like you’re about to serve the ice creams,’ Will said. ‘Aw, mate, but you’d make a great maid,’ Nathan said, approvingly. ‘Feel free to wear that one in the daytime. Really.’ ‘You’ll be asking her to dust the skirting next.’ ‘It is a bit dusty, now you mention it.’ ‘You,’ I said, ‘are both going to get Mr Muscle in your tea tomorrow.’ I discarded outfit number three – a pair of yellow wide-legged trousers – already anticipating Will’s Rupert Bear references, and instead put on my fourth option, a vintage dress in dark-red satin. It was made for a more frugal generation and I always had to say a secret prayer that the zip would make it up past my waist, but it gave me the outline of a 1950s starlet, and it was a ‘results’ dress, one of those outfits you couldn’t help but feel good in. I put a silver bolero over my shoulders, tied a grey silk scarf around my neck, to cover up my cleavage, applied some matching lipstick, and then stepped into the living room. ‘Ka-pow,’ said Nathan, admiringly. Will’s eyes travelled up and down my dress. It was only then that I realized he had changed into a shirt and suit jacket. Clean-shaven, and with his trimmed hair, he looked surprisingly handsome. I couldn’t help but smile at the sight of him. It wasn’t so much how he looked; it was the fact that he had made the effort. ‘That’s the one,’ he said. His voice was expressionless and oddly measured. And as I reached down to adjust my neckline, he said, ‘But lose the jacket.’ He was right. I had known it wasn’t quite right. I took it off, folded it carefully and laid it on the back of the chair. ‘And the scarf.’ My hand shot to my neck. ‘The scarf? Why?’ ‘It doesn’t go. And you look like you’re trying to hide something behind it.’ ‘But I’m … well, I’m all cleavage otherwise.’ ‘So?’ he shrugged. ‘Look, Clark, if you’re going to wear a dress like that you need to wear it with confidence.  But I took the scarf off. Nathan went to pack Will’s bag. I was working out what I could add about how patronizing he was, when I turned and saw that he was still looking at me. ‘You look great, Clark,’ he said, quietly. ‘Really.’ With ordinary people – what Camilla Traynor would probably call ‘working-class’ people – I had observed a few basic routines, as far as Will was concerned. Most would stare. A few might smile sympathetically, express sympathy, or ask me in a kind of stage whisper what had happened. I was often tempted to respond, ‘Unfortunate falling-out with MI6,’ just to see their reaction, but I never did. Here’s the thing about middle-class people. They pretend not to look, but they do. They were too polite to actually stare. Instead, they did this weird thing of catching sight of Will in their field of vision and then determinedly not looking at him. Until he’d gone past, at which point their gaze would flicker towards him, even while they remained in conversation with someone else. They wouldn’t talk about him, though. Because that would be rude. As we moved through the foyer of the Symphony Hall, where clusters of smart people stood with handbags and programmes in one hand, gin and tonics in the other, I saw this response pass through them in a gentle ripple which followed us to the stalls. I don’t know if Will noticed it. Sometimes I thought the only way he could deal with it was to pretend he could see none of it. We sat down, the only two people at the front in the centre block of seats. To our right there was another man in a wheelchair, chatting cheerfully to two women who flanked him. I watched them, hoping that Will would notice them too. But he stared ahead, his head dipped into his shoulders, as if he were trying to become invisible. This isn’t going to work, a little voice said. ‘Do you need anything?’ I whispered. ‘No,’ he shook his head. He swallowed. ‘Actually, yes. Something’s digging into my collar.’ I leant over and ran my finger around the inside of it; a nylon tag had been left inside. I pulled at it, hoping to snap it, but it proved stubbornly resistant. ‘New shirt. Is it really troubling you?’ ‘No. I just thought I’d bring it up for fun.’ ‘Do we have any scissors in the bag?’ ‘I don’t know, Clark. Believe it or not, I rarely pack it myself.’ There were no scissors. I glanced behind me, where the audience were still settling themselves into their seats, murmuring and scanning their programmes. If Will couldn’t relax and focus on the music, the outing would be wasted. I couldn’t afford a second disaster. ‘Don’t move,’ I said. ‘Why –’ Before he could finish, I leant across, gently peeled his collar from the side of his neck, placed my mouth against it and took the offending tag between my front teeth. It took me a few seconds to bite through it, and I closed my eyes, trying to ignore the scent of clean male, the feel of his skin against mine, the incongruity of what I was doing. And then, finally, I felt it give. I pulled back my head and opened my eyes, triumphant, with the freed tag between my front teeth. ‘Got it!’ I said, pulling the tag from my teeth and flicking it across the seats. Will stared at me. ‘What?’ I swivelled in my chair to catch those audience members who suddenly seemed to find their programmes absolutely fascinating. Then I turned back to Will. ‘Oh, come on, it’s not as if they’ve never seen a girl nibbling a bloke’s collar before.’ I seemed to have briefly silenced him. Will blinked a couple of times, made as if to shake his head. I noticed with amusement that his neck had coloured a deep red. I straightened my skirt. ‘Anyway,’ I said, ‘I think we should both just be grateful that it wasn’t in your trousers.’ And then, before he could respond, the orchestra walked out in their dinner jackets and cocktail dresses and the audience hushed. I felt a little flutter of excitement despite myself. I placed my hands together on my lap, sat up in my seat. They began to tune up, and suddenly the auditorium was filled with a single sound – the most alive, three-dimensional thing I had ever heard.  Will looked sideways at me, his face still carrying the mirth of the last few moments. Okay, his expression said. We’re going to enjoy this. The conductor stepped up, tapped twice on the rostrum, and a great hush descended. I felt the stillness, the auditorium alive, expectant. Then he brought down his baton and suddenly everything was pure sound. I felt the music like a physical thing; it didn’t just sit in my ears, it flowed through me, around me, made my senses vibrate. It made my skin prickle and my palms dampen. Will hadn’t described any of it like this. I had thought I might be bored. It was the most beautiful thing I had ever heard. And it made my imagination do unexpected things; as I sat there, I found myself thinking of things I hadn’t thought of for years, old emotions washing over me, new thoughts and ideas being pulled from me as if my perception itself were being stretched out of shape. It was almost too much, but I didn’t want it to stop. I wanted to sit there forever. I stole a look at Will. He was rapt, suddenly unselfconscious. I turned away, unexpectedly afraid to look at him. I was afraid of what he might be feeling, the depth of his loss, the extent of his fears. Will Traynor’s life had been so far beyond the experiences of mine. Who was I to tell him how he should want to live it? Will’s friend left a note asking us to go backstage and see him afterwards, but Will didn’t want to. I urged him once, but I could see from the set of his jaw that he would not be budged. I couldn’t blame him. I remembered how his former workmates had looked at him that day – that mixture of pity, revulsion and, somewhere, deep relief that they themselves had somehow escaped this particular stroke of fate. I suspected there were only so many of those sorts of meetings he could stomach. We waited until the auditorium was empty, then I wheeled him out, down to the car park in the lift, and loaded Will up without incident. I didn’t say much; my head was still ringing with the music, and I didn’t want it to fade. I kept thinking back to it, the way that Will’s friend had been so lost in what he was playing. I hadn’t realized that music could unlock things in you, could transport you to somewhere even the composer hadn’t predicted. It left an imprint in the air around you, as if you carried its remnants with you when you went. For some time, as we sat there in the audience, I had completely forgotten Will was even beside me. We pulled up outside the annexe. In front of us, just visible above the wall, the castle sat, floodlit under the full moon, gazing serenely down from its position on the top of the hill. ‘So you’re not a classical music person.’ I looked into the rear-view mirror. Will was smiling. ‘I didn’t enjoy that in the slightest.’ ‘I could tell.’ ‘I especially didn’t enjoy that bit near the end, the bit where the violin was singing by itself.’ ‘I could see you didn’t like that bit.  I grinned back at him. ‘I really loved it,’ I said. ‘I’m not sure I’d like all classical music, but I thought that was amazing.’ I rubbed my nose. ‘Thank you. Thank you for taking me.’ We sat in silence, gazing at the castle. Normally, at night, it was bathed in a kind of orange glow from the lights dotted around the fortress wall. But tonight, under a full moon, it seemed flooded in an ethereal blue. ‘What kind of music would they have played there, do you think?’ I said. ‘They must have listened to something.’ ‘The castle? Medieval stuff. Lutes, strings. Not my cup of tea, but I’ve got some I can lend you, if you like. You should walk around the castle with it on earphones, if you really wanted the full experience.’ ‘Nah. I don’t really go to the castle.’ ‘It’s always the way, when you live close by somewhere.’ My answer was non-committal. We sat there a moment longer, listening to the engine tick its way to silence. ‘Right,’ I said, unfastening my belt. ‘We’d better get you in. The evening routine awaits.’ ‘Just wait a minute, Clark.’ I turned in my seat. Will’s face was in shadow and I couldn’t quite make it out. ‘Just hold on. Just for a minute.’ ‘Are you all right?’ I found my gaze dropping towards his chair, afraid some part of him was pinched, or trapped, that I had got something wrong. ‘I’m fine. I just … ’ I could see his pale collar, his dark suit jacket a contrast against it. ‘I don’t want to go in just yet. I just want to sit and not have to think about … ’ He swallowed. Even in the half-dark it seemed effortful. ‘I just … want to be a man who has been to a concert with a girl in a red dress. Just for a few minutes more.’ I released the door handle. ‘Sure.’ I closed my eyes and lay my head against the headrest, and we sat there together for a while longer, two people lost in remembered music, half hidden in the shadow of a castle on a moonlit hill. My sister and I never really talked about what happened that night at the maze. I’m not entirely sure we had the words. She held me for a bit, then spent some time helping me find my clothes, and then searched in vain in the long grass for my shoes until I told her that it really didn’t matter. I wouldn’t have worn them again, anyway. And then we walked home slowly – me in my bare feet, her with her arm linked through mine, even though we hadn’t walked like that since she was in her first year at school and Mum had insisted I never let her go. When we got home, we stood on the porch and she wiped at my hair and then at my eyes with a damp tissue, and then we unlocked the front door and walked in as if nothing had happened. Dad was still up, watching some football match. ‘You girls are a bit late,’ he called out. ‘I know it’s a Friday, but still … ’ ‘Okay, Dad,’ we called out, in unison. Back then, I had the room that is now Granddad’s. I walked swiftly upstairs and, before my sister could say a word, I closed the door behind me. I chopped all my hair off the following week. I cancelled my plane ticket. I didn’t go out with the girls from my old school again. Mum was too sunk in her own grief to notice, and Dad put any change in mood in our house, and my new habit of locking myself in my bedroom, down to ‘women’s problems’. I had worked out who I was, and it was someone very different from the giggling girl who got drunk with strangers. It was someone who wore nothing that could be construed as suggestive. Clothes that would not appeal to the kind of men who went to the Red Lion, anyway. Life returned to normal. I took a job at the hairdresser’s, then The Buttered Bun and put it all behind me. I must have walked past the castle five thousand times since that day. But I have never been to the maze since.


The Amzi! Prolog compiler transforms Prolog source code files (.pro) into object code files (.plm). Source files must be plain text with no embedded control characters other than the newline.
The Compiler (and Linker) are automatically invoked in the IDE when you select Project | Rebuild Project or Project | Rebuild All. It is also invoked when you run or debug a compiled Prolog Projec.t
The net result of all of this work is that compiled code can run twenty or thirty times faster than equivalent interpreted code, occupies less space in memory and consumes much less space to execute.
We strongly recommend that as much code as possible be compiled once it has been developed.
The compiler does not, by default (no discontiguous or multifile specified), accomodate split definitions of predicates. It compiles the separated clusters of continguous clauses as separate chunks of compiled code, each with the same name. So when you try to load the compiled program, when the loader reaches the second definition of a predicate you will get an error message indicating you have attempted to redefine a compiled predicate.
There are also directives for defining a collection of predicates with a public interface called a module--see Modules for details.
Any compilation problems will be added to the Tasks View.
When you click on an error in the Tasks View the editor will position the cursor in the source file where the error was found.
acmp [source], [object], [listing] [source] the name of the source file (.pro) [object] the name of the object file to be created (.plm) [listing] the name of the optional listing file (PAL)To use compile in prompting mode, do not specify any arguments.
c> acmp source file [.PRO] : object file [.PLM] : listing file [.PAL] :For example:
c> acmp Amzi! Prolog Compiler Copyright (c) 1987-2000 Amzi! inc. All Rights Reserved. Source Code [.PRO]: duck2 Object Code [duck2.PLM]: Listing File [NULL.PAL]: duck2 Compiling duck2.pro |- main / 0 |- go / 0 |- go / 0 |- go / 0 [CodeSize 410 Bytes, Compile time 11 seconds.]or
c> acmp duck1 ...
|- Name / Arity_Pred_1_Clause_1 |- Name / Arity_Pred_2_Clause_2 |- ...If an error occurs a message will be printed to the screen and the error handler will be invoked. Most errors will be syntax errors. In the case of a syntax error, the offending term will be listed along with the error message.
Note that when the compiler reads in clauses it does so by reading in all clauses for a given predicate and the first clause of the following predicate. Thus it is possible for a read error to occur in a clause which is not in the predicate being compiled but is in the next predicate to be compiled.
Errors in a clause will cause the compilation of that clause to be skipped; compilation continues with the next clause.
The compiler output is especially useful for tracking down errors due to unintentional split-definition clauses, or "missing" predicates lost by a misplaced period. By viewing the listing you can see if all the clause definitions are contiguous, and if all the predicates you thought were in the file actually were.
You might also run into difficulties loading programs that contain predicates with large numbers of clauses. The .cfg file parameters maxclauses, destbuf and srcbuf can all be used to increase the capacity of the Prolog engine when loading a compiled program.
The compiler optimizes its processing of clauses with only one or zero goals in the body. This permits such clauses to be compiled more quickly. This optimization has no effect on the resulting compiled code (it just arrives at it sooner).
The downside of this is a slight chance that such a clause will cause a stack to overflow on compilation. This is usually due to having very complex clauses, e.g.,
options( [option1, ..], [option2, ..], ... [option30, ..] ).To resolve this problem, cast the clause in the following form:
options(X1, X2, .., X30) :- X1 = [option1,..], ... X30 = [option30,..].By forcing the clause to have a more complex body (and a simpler head) the optimization technique described above will not be used by the compiler.
Where it is a problem try dividing predicates into two or more predicates, e.g.,
head1 :- body1. head1 :- body2. .. head1 :- body100.can be replaced with a slight performance penalty by:
head1 :- body1. .. head1 :- body50. head1 :- head2. % New link to remaining clauses head2 :- body51. .. head2 :- body100.
main :- run_user_program.
Then when the application loads it will immediately try to prove the user-written predicate run_user_program.
Copyright ©1987-2011 Amzi! inc. All Rights Reserved. Amzi! is a registered trademark and Logic Server is a trademark of Amzi! inc.


For each of the 365 days in a year, our website will present you with a different daily challenge. Believe it or not, there are national and/or international holidays on each day of the year!
Depending on what day it is, you'll find a different daily challenge that relates to that day's holiday. Some challenges are fun and silly, while others are designed to raise awareness about important social issues in our communities. Ultimately, these challenges are designed to expose you to different things and present you with some daily trivia. We encourage you to attempt these challenges and let us know if you have any suggestions!


You've just bought a print of some amazing art, and you want to put it up on the wall. You can look round the hardware store but the frames are all the wrong size. What you need is a mounting board for the image.
To size this up, take the frame apart and measure the height and width in millimeters. Measure the height and width of the print too. You can adjust the sizes and colour to find something that will look pleasing to the eye. There's a zoom function if you find your image getting too big.
This lets you work out the suitable size for a mounting board for your picture.
Finally, tape the print into the mount, then assumble it into the fram and hang on your wall.


{% extends 'base.html' %} {% block title %} Log In · GeoConcert {% endblock title %} {% block content %}
GeoConcert allows you to find future concerts from your favorite artists on a map.


Go to the survey in Figure 2.5.2, and identify the survey questions that gather data of the following types:
Quantitative
Nominal
Ratio
Interval
Categorical
Ordinal
Go to the survey in Figure 2.5.2, and identify the survey questions that gather data of the following types:
Quantitative
Nominal
Ratio
Interval
Categorical
Ordinal


--- layout: documentation title: HTTPClientRequestType ---
The HTTPClientRequestType field captures the details of an HTTP client request.
| Field Name | Type | Description |
|---|---|---|
| HTTP_Request_Line0..1 | HTTPRequestLineType |
The HTTP_Request_Line field specifies the HTTP request line of the HTTP client request. |
| HTTP_Request_Header0..1 | HTTPRequestHeaderType |
The HTTP_Request_Header field specifies all of the HTTP header fields that may be found in the HTTP client request. |
| HTTP_Message_Body0..1 | HTTPMessageType |
The HTTP_Message_Body field specifies the optional message body that may be included in the HTTP client request. |


---
layout: archive
---
Some posts about my life as a data scientist. Postings prior to
2017, not all of which are included here, are hosted on my old
Wordpress.com blog.
{{ site.data.ui-text[site.locale].recent_posts | default: "Recent Posts" }}
{% for post in paginator.posts %}
{% include archive-single.html %}
{% endfor %}
{% include paginator.html %}


Analytics: data custom view HTML bookmarklet installation
Drag and drop the above link to your browser bookmark bar:
AnalyticsDataHTML
Return to
README


Prompted by his recent piece in The Dabbler, I decided to improve my ornithological knowledge by reading Tim Birkhead's The Wisdom Of Birds. And lo! that is how I began my Easter Sunday on this sunny morning, to the sound of cawing crows outside.
I am afraid to say I am ready to hurl the book across the room in exasperation. This is an expensive and lavishly-produced Bloomsbury book, and by page 18 I have fought my way past no fewer than three howling typos: a missing indefinite article on page 2, “who” for “how” on page 6, and “know” for “known” on page 18. This is proofreading-by-spellcheck, and it simply isn't good enough.
I shall persevere, for the time being. But this slipshod approach fatally undermines the pleasure of reading, for me. Tim Birkhead has been ill-served by his publishers. I'd insist on getting the whole print-run pulped and starting again, with a competent copy editor.
UPDATE : Still on page 18, and another one!—“principle” where what is meant is “principal”.


--- title: Contact layout: default bodyClass: page-contact ---
I would love to hear your ideas to make Clearwater a wonderful place to live.
Kathleen Beckman for City Council P.O. Box 8574 Clearwater, FL 33758


Toggle navigation
Protected Resource
Edit User Profile
Jobs
Get All Jobs
Add Job
Blogs
Add Blog
Blogs Waiting For Approval
Blogs Approved
Friends
Suggested Users
Friends
Pending Requests
{{notificationCount}}
Blog titled "
{{notification.blogTitle}} "
approval status is updated
No More New Notifications
{{pendingRequestsCount}}
You Have Friend Request from"
{{pendingRequest.fromid.email}}"
No More New Friend Requests
WELCOME {{user.email}}
Chat
Sign Up
Sign In
Sign out