Mumford (R) *** Starring Loren Dean, Hope Davis Directed by Lawrence Kasdan A Review by Frankie Paiva
There are many different types of Hollywood productions. Some are loud and noisy, filling the screen with images of violence and heroes saving big breasted women.  These are simply the type of movies that studios like to make.
A psychiatrist named Mumford (Dean) moves to a town called Mumford where he is instantly greeted with plenty of patients with lots of interesting problems. He enjoys listening to people and hearing what they have to say. Now it just so happens (like in most movies) that the people in this small town are very eccentric and very strange. Mumford is called on various outings to try and help people all of the little city. But the two resident doctors of the town begin not to take a liking of him and think it's interesting that everyone who could confirm his graduation from school have tragically died.
Then he meets Sofie (Davis, playing somewhat of an extension of her character in Next Stop, Wonderland) in one second, he instantly falls in love. Now falling in love with a patient is a bad thing, especially if her mother is a bitchy Jane Adams, but there is another twist. It turns out Mumford isn't even a psychiatrist at all. He just thought it would be a good way to get away from his former life. I won't give you the full story, but basically he used to be on drugs and was sent to a rehab center run by monks. When they think that he has magically disappeared they run a segment looking for him on Unsolved Mysteries. So what should he do? Face what he has done? Or go into hiding once again?
And so Hollywood once again regains my trust that they can produce a quality feature film. Mumford is very modest, very quiet, and nothing really seems to happen but I still found myself enjoying it immensely. The ensemble cast (Ted Danson, Jane Adams, Jason Lee, Alfre Woodard, and others) are great.  Dean has an interesting smile, which could possibly become a trademark if he becomes a big star. Of course I have to congratulate Hope Davis, has she ever been bad in a movie? While not outstandingly great, Mumford is fun, and it gets *** stars.
The Young-Uns: Three views of breasts and naked female androids, plus medium language make up the film's bad content. Good Age 13 & Up
A Review by Frankie Paiva The 12 Year-Old Movie Reviewer E-Mail me at<EMAIL_ADDRESS>Visit my website here
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


TMX Group reports record revenue on higher derivatives trading
by The Canadian PressTORONTO — TMX Group Ltd. says earnings edged up in the third quarter as it hit record revenue for the period.
The owner of the Toronto Stock Exchange says it earned $61.7 million, or $1.9 per diluted share, for the three months ending Sept. 30, up from $57.5 million, or $1.02 per share, for the same stretch last year.
Adjusted earnings were $1.25 per diluted share for the quarter, up from $1.19 per share last year.
Revenue was $196.3 million, up from $192.8 million for the third quarter last year.
Analysts had expected earnings per share of $1.45, and revenue of $208.2 million, according to financial markets data firm Refinitiv.
The company says revenue was boosted by higher derivatives trading and clearing and by Trayport, its energy trading platform.


Old Password: Enter the current Password. If you use (normally) a different Password for the Console User "loxberry" and the Web-Administration-Access, please enter here the Password for the Console User "loxberry"! (By default both Passwords are identical.)
Username: The Username must be 3-20 characters long and consist of alphanumeric characters only (and _-).
Password: The Password must consist of Upper- and Lowercase characters and digits. Minumum length is 5. Only some special characters are allowed: -_,.;:!?&()?+ยง%=">


Auxiliary Commands
Auxiliary commands do not fit into any one category, but help manage set input and output. The following table describes auxiliary commands and their syntax.
|
Auxiliary Command |
Description and Syntax |
|
> |
Direct command output to a file. > filename command |
|
>> |
Append command output to a file. >> filename command |
|
add-attribute |
Creates a new attribute using the specified attribute expression. add_attribute attribute_name attribute_expression |
|
apply |
Applies the specified attributes to each entity or instance in the specified set, removing duplicate entities or instances. Returns a list of unique attribute values. apply attribute_name set_name |
|
apply_per_file |
Loads files as necessary, and unloads them when they are no longer needed. apply_per_file "string args” |
|
filter |
Return those members of the set for which attribute-expression, applied to that member, returns true. filter attribute-expression set_name |
|
foreach |
For every element in set, set var to the element and perform action. foreach var set { action } |
|
new_set |
Makes the specified set the current set (same as set_copy). new_set set_name |
|
|
Prints the entities contained in the specified set using the current print format. print set_name |
|
printformat |
Determines the format of printed output. printformat formatstring [attribute [attribute...]] |
|
size |
Returns the size of the specified set. size set |
|
sort |
Returns the specified set according to a specified sort attribute (default is alphabetical). sort [-a | -d] sort_attribute |


DropDown load Podcast Playlist: Select Podcast This Week in Tech A State of Trance Official Podcast BBC News Current Song of the Day Jay Mohr Sports The Nerdist Video Podcast: Ted Talk Video Podcast: France 24
-------------------------------------
------------------------------------- Play no. 2


Kneeling hip flexor stretch
Hold for 30-60 seconds each leg
Remember to create posterior pelvic tilt by rounding the lower back, sucking the navel in toward the spine, tucking the front of the pelvis up toward the chest, and bringing your buttocks underneath.


Total Points: {{totalScore}}
Comment of condition one. Comment of condition Two. Comment of condition Three. Comment of condition one. Comment of condition Two. Comment of condition Three. Comment of condition one. Comment of condition Two. Comment of condition Three. Comment of condition one. Comment of condition Two. Comment of condition Three. Comment of condition one. Comment of condition Two. Comment of condition Three. Comment of condition one. Comment of condition Two. Comment of condition Three. Comment of condition one. Comment of condition Two. Comment of condition Three. Comment of condition one. Comment of condition Two. Comment of condition Three. Comment of condition one. Comment of condition Two. Comment of condition Three. Comment of condition one. Comment of condition Two. Comment of condition Three.


igawk - gawk with include files
igawk [ all gawk options ] -f program-file [ -\^- ] file .^.^.
igawk [ all gawk options ] [ -\^- ] program-text file .^.^.
Igawk is a simple shell script that adds the ability to have ``include files'' to gawk (1).
AWK programs for igawk are the same as for gawk , except that, in addition, you may have lines like
@include getopt.awk
in your program to include the file getopt.awk from either the current directory or one of the other directories in the search path.
See gawk (1) for a full description of the AWK language and the options that gawk supports.
cat << EOF > test.awk @include getopt.awk BEGIN { while (getopt(ARGC, ARGV, "am:q") != -1) .^.^. } EOF igawk -f test.awk
gawk (1)
Effective AWK Programming , Edition 1.0, published by the Free Software Foundation, 1995.
Arnold Robbins


{% extends 'base.html' %} {% block user_defined %}
Record a Video |
< |
|
Record a Video |
< |
|
Record a Video |
< |


Would you like to continue the registration?
First name
Last name
Do you have a nick name? > No > Yes
data-form-label="nickname" data-form-input-marker="[name=nickname_input]">
Gender > Male > Female
Date of Birth dd 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 mm January February March April May June July August September October November December yyyy 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000
Email
Phone
Home Address and Direction <%= contacts.get('direction_address') %>
Subscriptions > Newsletter > Event schedule > Other request data-form-label="other request" data-form-input-marker="#other-request-input"> > Suggestion data-form-label="suggestion" data-form-input-other-name="suggestion" data-form-input-marker="#suggestion-input"> No, thanks.
Agreement > I have read and agreed the Terms and Conditions stated here.
The extra space below is intended for scrolling purpose only of the second fieldset for fields validation.


Vocab Memorization Tips
The following tips are for use with the vocab exercises on this website and should help you with memorizing the vocab for each lesson.
- After completing a vocab exercise, take a break, as this will help with reinforcing your memory. I recommend taking incrementally longer break periods between exercises. Starting at 5min breaks and increasing by 5min or 10min each time until you hit your personal limit, such as 60min, or until you feel you've memorized the vocab. After this you can take a break for the day and revisit the exercise tomorrow to see how well you remember the vocab.
- If you're having trouble memorizing readings, keep the furigana visible for at least the first 3 exercise sessions, then take it away and only display it when you cannot remember the reading AT ALL.
- Limit yourself to a set amount of words per day. Personally, I feel around 15-30 words to be the sweet spot, but everyone is different, so take it a little at a time and don't overwhelm yourself or rush.
- Find material to read that utilizes the vocab you're studying to help further aid with memorization. Fortunately, Genki offers material to read using the lesson's vocab in the dialogue and reading and writing sections, so you wont have to do much searching. You can also find example sentences by using this tool or jisho, or even websites such as twitter to see native examples. Adding ".pic" to a search on twitter also helps a ton with visualization.
I hope that these tips will aid you with your vocab studies! Additionally, if you have trouble with this method, I would highly recommend using Anki instead with the Genki decks.


This is basically an event website where. Students and Jkuat Stuff Members can get to view and register on Upcoming events. Learn More
Major Partner
A hub for research
For giving me the skills to persue this project
What could be easier? Get started fast with jkuat digitized events.
Because you don't have to Walk to the notice board.
Can View Videos on passed events
The Applicatio is easy to use.
Tested with a cople of students from Jkuat


This is a twelve column section in a row. Each of these includes a div.panel element so you can see where the columns are - it's not required at all for the grid.
Six columns
Six columns
Four columns
Four columns
Four columns
We're stoked you want to try Foundation! To get going, this file (index.html) includes some basic styles you can modify, play around with, or totally destroy to get going.
Once you've exhausted the fun in this document, you should check out:


Format¶
In Vega-Lite specifications you can customize the format of text marks, tooltips, and axis and legend labels.
Vega-Lite uses D3’s number format pattern for quantitative fields and D3’s time format pattern for time field. You can override the default formats in the config.
Formatting text marks and tooltips¶
Text marks and tooltips are formatted by setting the format
property of text or tooltip channel definitions.
For example, we can use Vega-Lite to show the average horsepower for cars from different origins. To format the number to have 2 digits of precisions, we can use the format .2f
.
Formatting tooltips or dates is done similarly.


ALTER DATABASE name [ [ WITH ] option [ ... ] ]
where option can be:
CONNECTION LIMIT connlimit
ALTER DATABASE name RENAME TO new_name
ALTER DATABASE name OWNER TO new_owner
ALTER DATABASE name SET TABLESPACE new_tablespace
ALTER DATABASE name SET configuration_parameter { TO | = } { value | DEFAULT }
ALTER DATABASE name SET configuration_parameter FROM CURRENT
ALTER DATABASE name RESET configuration_parameter
ALTER DATABASE name RESET ALL
ALTER DATABASE changes the attributes of a database.
The first form changes certain per-database settings. (See below for details.) Only the database owner or a superuser can change these settings.
The second form changes the name of the database. Only the database owner or a superuser can rename a database; non-superuser owners must also have the CREATEDB privilege. The current database cannot be renamed. (Connect to a different database if you need to do that.)
The third form changes the owner of the database. To alter the owner, you must own the database and also be a direct or indirect member of the new owning role, and you must have the CREATEDB privilege. (Note that superusers have all these privileges automatically.)
The fourth form changes the default tablespace of the database. Only the database owner or a superuser can do this; you must also have create privilege for the new tablespace. This command physically moves any tables or indexes in the database's old default tablespace to the new tablespace. Note that tables and indexes in non-default tablespaces are not affected.
The remaining forms change the session default for a run-time configuration variable for a PostgreSQL database. Whenever a new session is subsequently started in that database, the specified value becomes the session default value. The database-specific default overrides whatever setting is present in postgresql.conf or has been received from the postgres command line. Only the database owner or a superuser can change the session defaults for a database. Certain variables cannot be set this way, or can only be set by a superuser.
The name of the database whose attributes are to be altered.
How many concurrent connections can be made to this database. -1 means no limit.
The new name of the database.
The new owner of the database.
The new default tablespace of the database.
Set this database's session default for the specified configuration parameter to the given value. If value is DEFAULT or, equivalently, RESET is used, the database-specific setting is removed, so the system-wide default setting will be inherited in new sessions. Use RESET ALL to clear all database-specific settings. SET FROM CURRENT saves the session's current value of the parameter as the database-specific value.
See SET and Chapter 18 for more information about allowed parameter names and values.
It is also possible to tie a session default to a specific role rather than to a database; see ALTER ROLE. Role-specific settings override database-specific ones if there is a conflict.


All the parameters of a Material that you see in the inspector when viewing a material are accessible via script, giving you the power to change or animate how a material works at runtime.
This allows you to modify numeric values on the Material, change colours, and swap textures dynamically during gameplay. Some of the most commonly used functions to do this are:
| Function Name | Use |
|---|---|
| SetColor | Change the color of a material (Eg. the albedo tint color) |
| SetFloat | Set a floating point value (Eg. the normal map multiplier) |
| SetInt | Set an integer value in the material |
| SetTexture | Assign a new texture to the material |
The full set of functions available for manipulating materials via script can be found on the Material class scripting reference.
One important note is that these functions only set properties that are available for the current shader on the material. This means that if you have a shader that doesn’t use any textures, or if you have no shader bound at all, calling SetTexture will have no effect. This is true even if you later set a shader that needs the texture. For this reason it is recommended to set the shader you want before setting any properties, however once you’ve done that you can switch from one shader to another that use the same textures or properties and values will be preserved.
These functions work as you would expect for all simple shaders such as the legacy shaders, and the built-in shaders other than the Standard Shader (for example, the particle, sprite, UI and unlit shaders). For a material using the Standard Shader however, there are some further requirements which you must be aware of before being able to fully modify the Material.
The Standard Shader has some extra requirements if you want to modify Materials at runtime, because - behind the scenes - it is actually many different shaders rolled into one.
These different types of shader are called Shader Variants and can be thought of as all the different possible combinations of the shader’s features, when activated or not activated.
For example, if you choose to assign a Normal Map to your material, you activate that variant of the shader which supports Normal Mapping. If you subsequently also assign a Height Map then you activate the variant of the shader which supports Normal Mapping and Height Mapping.
This is a good system, because it means that if you use the Standard Shader, but do not use a Normal Map in a certain Material, you are not incurring the performance cost of running the Normal Map shader code - because you are running a variant of the shader with that code omitted. It also means that if you never use a certain feature combination (such as HeightMap & Emissive together), that variant is completely omitted from your build - and in practice you will typically only use a very small number of the possible variants of the Standard Shader.
Unity avoids simply including every possible shader variant in your build, because this would be a very large number, some tens of thousands! This high number is a result not only of each possible combination of features available in the material inspector, but also there are variants of each feature combination for differing rendering scenarios such as whether or not HDR is being used, lightmaps, GI, fog, etc. Including all of these would cause slow loading, high memory consumption, and increase your build size and build time.
Instead, Unity tracks which variants you’ve used by examining the material assets used in your project. Whichever variants of the Standard Shader you have included in your project, those are the variants which are included in the build.
This presents two separate problems when accessing materials via script that use the Standard Shader.
If you use scripting to change a Material that would cause it to use a different variant of the Standard Shader, you must enable that variant by using the EnableKeyword function. A different variant would be required if you start using a shader feature that was not initially in use by the material. For example assigning a Normal Map to a Material that did not have one, or setting the Emissive level to a value greater than zero, when it was previously zero.
The specific Keywords required to enable the Standard Shader features are as follows:
| Keyword | Feature |
|---|---|
| _NORMALMAP | Normal Mapping |
| _ALPHATEST_ON | “Cut out” Transparency Rendering Mode |
| _ALPHABLEND_ON | “Fade” Transparency Rendering Mode |
| _ALPHAPREMULTIPLY_ON | “Transparent” Transparency Rendering Mode |
| _EMISSION | Emission Colour or Emission Mapping |
| _PARALLAXMAP | Height Mapping |
| _DETAIL_MULX2 | Secondary “Detail” Maps (Albedo & Normal Map) |
| _METALLICGLOSSMAP | Metallic/Smoothness Mapping in Metallic Workflow |
| _SPECGLOSSMAP | Specular/Smoothness Mapping in Specular Workflow |
Using the keywords above is enough to get your scripted Material modifications working while running in the editor.
However, because Unity only checks for Materials used in your project to determine which variants to include in your build, it will not include variants that are only encountered via script at runtime.
This means if you enable the _PARALLAXMAP keyword for a Material in your script, but you do not have a Material used in your project matching that same feature combination, the parallax mapping will not work in your final build - even though it appears to work in the editor. This is because that variant will have been omitted from the build because it seemed to not be required.
To do this, you need to make sure Unity knows that you want to use that shader variant by including at least one Material of that type in your Assets. The material must be used in a scene or alternatively be placed in your Resources Folder - otherwise Unity will still omit it from your build, because it appeared unused.
By completing both of the above steps, you have the full ability to modify your Materials using the Standard Shader at runtime.
If you are interested in learning more about the details of shader variants, and how to write your own, read about Making multiple shader program variants here.


Persons of Interest
Laughing Nash Thatcher
Status:
Imprisoned
Relationship:
Enemy
Laughing Nash Thatcher
Status:
Imprisoned
Relationship:
Enemy
Laughing Nash Thatcher
Status:
Imprisoned
Relationship:
Enemy


About Us
If you have tried our award winning solventless hash, our potent and flavorfull
infused pre-rolls, or our hand trimmed premium flower, then you know we pride ourselves
in bringing Washington the highest quality cannabis.


--- layout: post status: publish published: true title: Can the Cubs Harvest the Farm? author: display_name: Corey Fineran login: Corey email<EMAIL_ADDRESS>url: '' author_login: Corey author_email<EMAIL_ADDRESS>wordpress_id: 10269 wordpress_url: http://ivyenvy.com/?p=10269 date: '2014-07-25 09:41:46 +0000' date_gmt: '2014-07-25 14:41:46 +0000' categories: - Prospects tags: - Baseball America - Michael Cotton - Prospect List comments: - id: 12104 author: Dawn Strand author_email: '' author_url: '' date: '2014-07-25 09:49:36 +0000' date_gmt: '2014-07-25 14:49:36 +0000' content: I had always assumed the Cardinals were consistently ranking with the best farm systems. They are nowhere in the top 5 for any of these years. Don't they always brag about their amazing home grown players? But, yes, this is very promising for the Cubbies! - id: 12105 author: Michael Cotton author_email: '' author_url: '' date: '2014-07-25 10:13:27 +0000' date_gmt: '2014-07-25 15:13:27 +0000' content: I was also surprised about the lack of Cardinals in the rankings. - id: 12106 author: Matt Veto author_email: '' author_url: '' date: '2014-07-25 13:54:50 +0000' date_gmt: '2014-07-25 18:54:50 +0000' content: "I'd like to see what the teams did with their top talent. Did they actually hold onto them to achieve this success? Or did they trade potential for talent? \nI'm also trying to find an explanation for the Cardinals. Perhaps it's their ability to draft quality guys deep. Their 40 man is regularly made up of between 60 percent and 70 percent original draft picks. You don't get to percentages that high with high-profile picks alone. They, too, have had their share of first-round fizzles over the last 10 years: Tyler Herron, Brett Wallace, Mark McCormick just to name a few from a few years ago." - id: 12130 author: Arty Bouchez author_email: '' author_url: '' date: '2014-07-28 16:43:58 +0000' date_gmt: '2014-07-28 21:43:58 +0000' content: Great article Michael! Representing us Cubs fans that live in Colorado. ---
This is a guest post from Michael Cotton. Michael is a freelance writer and a strong presence and frequent winner in our photo caption contests.
You can connect with Michael on Twitter - @cottonspew.
A lot has been made recently of the Chicago Cubs minor league system and the rise in rankings since Theo Epstein and company have started their version of the annual Cubs rebuilding process.
There seems to be some optimism building in Wrigleyville over this future influx of talent despite the big league club continuing to do its part to help management stockpile high draft picks. Of course, “There's always next year” is a common refrain in Cubdom, and for every optimist, there is a fan who cannot let themselves believe in these farm system saviors. Only the future will answer this question definitively, but I thought I would see if there were clues to be found in the past.
I decided to look back about 10 years to see how the top farm systems impacted their big league clubs over the following years. I used the Baseball America rankings for this article simply because all of their past rankings were easily available online. I will not be looking at whether individual players made it to the majors with their club because a good farm system can still affect the fortunes of the parent team through trades as well as bringing up home-grown talent.
For this article, I used the top five farm systems from 2004 to 2010 and compared that to the divisional and World Series champions from 2007 to 2013. The three year difference is there to allow time for the minor league to feed the major league club. Those teams, rankings, and champs are listed below this article.
After looking at the numbers, I'm happy to announce that Cubs fans can start to get excited. The correlation between having an organizational ranking in Baseball America's top five and winning a division or making a World Series appearance is very good. Out of 35 teams ranked in the top five over the seven year period, over 50 percent of the divisional champs were in this group.
The same is true for World Series appearances with seven of the 14 teams over the seven year period being in the top five lists prior to making the World Series. Of those seven teams, four became World Series champions. That is a pretty high percentage especially when you consider that some top five organizations were facing other organizations from the top five list in the playoffs or the World Series. Only four teams who made the top five list did not win a division championship in the following years, but one of those teams, the Rockies, did eventually make an appearance in the World Series via the Wild Card.
For everyone who wants to make the argument that these players will not have an impact any time soon, there are two instances in which the farm system made a definite impact on the big league team in the same year that the team made the World Series. In 2007 the Colorado Rockies had to rely heavily on rookies called up mid-season to go on a historic 21-1 run at the end of the season to make the Wild Card spot.
As a Wild Card team, they made it to the World Series only to lose to the Red Sox. In 2008, the Tampa Bay Rays also called on their farm system when they brought Evan Longoria up as a replacement for an injured Willy Aybar. The Rays eventually lost to the Phillies.
All of this is truly marginal analysis of a small sample size and there are a thousand different things that teams need to do in order to start winning divisions and making World Series appearances, but at least it does put the Cubs in good company. Another plus is that most of the teams that made the top five list won multiple division titles, which shows a positive correlation to extended success. Although the Cubs will need more than just a good farm system to become eventual champions, it does look like there is reason to have joy in Wrigleyville. Good things do seem to be coming our way.
Baseball America's Top Five Farm Systems 2004-2010.
Angels-Div. Champs '07, '08, '09
Athletics-Div. Champs '12, '13
Braves-No titles
Brewers-Div. Champs '11
Diamondbacks-Div. Champs '07, '11
Dodgers-Div. Champs '08,'09, '13
Giants-Div. Champs '10, '12 World Series Champs '10, '12
Indians-No Titles
Marlins-No Titles
Rangers-Div. Champs '10, '11 World Series Appearances '10, '11
Rays-Div. Champs '08, '10 World Series Appearance '08
Reds-Div. Champs '10, '12
Red Sox-Div. Champs '13 World Series Championship '13
Rockies-No titles. World Series Appearance '07
Twins-Div. Champs '09, '10
Yankees-Div. Champs '09, '11, '12 World Series Championship '09
NOTE: Red Sox did win the World Series in 2007, but I did not list it simply because their farm system rankings fell outside of the data set that I was using. Also, the Indians won a division in 2007, but that was before 2010 in which they were ranked in the top five according to this data set. These teams, as well as other teams that had success may have had top five farm systems in years earlier than 2004 when I started the data set for this article.


C Sample App Backend Tutorial
This page will walk you through how some of the queries may be constructed using the C SDK. The sample app uses the C API with a C++ JSON library (json-cpp), though you are free to use your own.
| This tutorial focuses on querying through N1QL and FTS rather than views. If you want information about using views, see 6.0@server:learn:views/views-intro.adoc. |
Walking Through the API
The following sections lead you through the primary functions of the sample application.
This shows you how to use the various features and services of Couchbase including: connecting to a cluster and bucket, key/value iteraction, document query through N1QL and full text searches.
Configure and Bootstrap the SDK
Relevant Documentation Topics: Managing Connections Using the C (libcouchbase) SDK with Couchbase Server
The first step is to let the application connect to your cluster and obtain a reference to a lcb_t
(the Bucket is the entry point for the whole storage API).
Connecting to a Bucket
lcb_t instance;
lcb_create_st options;
memset(&options, 0, sizeof options);
options.version = 3;
options.v.v3.connstr = "couchbase://localhost/travel-sample";
/* Username and password for Couchbase 5.0+ */
options.v.v3.username = "mark";
options.v.v3.passwd = "secret";
lcb_create(&instance, &options);
lcb_connect(instance);
lcb_wait(instance);
if (lcb_get_bootstrap_status(instance) != LCB_SUCCESS) {
printf("Error while bootstrapping: %s\n", lcb_strerror(NULL, lcb_get_bootstrap_status(instance)));
// .. handle error further..
}
You could make the bootstrap process safer by providing a list of hostnames/IPs to bootstrap from (in case the one node you provided for bootstrap is unavailable when creating the Cluster reference).
In production the best practice is to provide at least 3 nodes in the boostrap list.
You can separate the list of hostnames in the connection string using a comma, e.g.
couchbase://host1,host2,host3
|
The lcb_create
function creates the raw library handle.
The lcb_connect
function starts the connection attempt.
The lcb_wait
function must be called to actually wait for the connection to complete.
Finally, the status of the initial bootstrapping connection can be obtained using lcb_get_bootstrap_status
.
If successful, it will return LCB_SUCCESS
; otherwise a textual description of the error can be obtained using the lcb_strerror
function.
Manage Users using Key/Value API
Relevant Documentation Topics: CRUD Document Operations using the C (libcouchbase) SDK with Couchbase Server, Asynchronous Progamming Using the C (libcouchbase) SDK with Couchbase Server
Couchbase Server is a document-oriented database which provides access to your data both through its document ID (for high performance access), as well as through views, N1QL (as powerful query languages) and FTS.
Creating New Users
Next, prepare the content for the new user (as a JSON object) and the associated document (in order to give it an ID):
Json::Value doc(Json::objectValue);
std::string username = get_user();
doc["type"] = "user";
doc["name"] = username;
// make_pass_hash() is just a stub.
doc["password"] = make_pass_hash(password);
std::string docbuf(Json::FastWriter().write(doc));
std::string docid(std::string("user::") + username);
lcb_CMDSTORE scmd = { 0 };
LCB_CMD_SET_KEY(&scmd, docid.c_str(), docid.size());
LCB_CMD_SET_VALUE(&scmd, docbuf.c_str(), docbuf.size());
// Ensure you've set a callback using lcb_install_callback3(instance, LCB_CALLBACK_STORE, your_callback);
The "user::" prefix is arbitrary to this application, this is just a convention that the app uses to obtain unique keys and have additional information in it, but the key could have been anything (even sequence numbers or UUIDs).
|
Now it is time to use the Couchbase Server key/value API to store the document.
Note that you need to install a callback to check the result of the storage operation (using lcb_install_callback3
), in case it failed.
lcb_store3(instance, NULL, &scmd);
|
When it comes to storing a document, you have three choices of operation, which you can set using the
|
Checking Login by Getting the User’s Document
std::string docid(std::string("user::") + username);
lcb_CMDGET cmd = { 0 };
LCB_CMD_SET_KEY(&cmd, docid.c_str(), docid.size());
lcb_get3(instance, NULL, &cmd);
lcb_wait(instance);
Most of the action takes place in the callback:
static void get_callback(lcb_t, int, const lcb_RESPGET* resp) {
if (resp->rc == LCB_KEY_ENOENT) {
// User doesn't exist. Handle this!
} else if (resp->rc != LCB_SUCCESS) {
// Other error!?
}
Json::Value value;
const char *encoded = reinterpret_cast<const char *>(resp->value);
// Decode JSON
if (!Json::Reader().parse(encoded, encoded + resp->nvalue, value)) {
// Parse error!
}
std::string input_pass = get_input_pass(resp->cookie);
if (make_pass_hash(input_pass) != value["password"]) {
// Password doesn't match!
}
// More handling here
}
A First N1QL Query: Finding Airports
In the SDK, there is a lcb_n1ql_query
function that can issue N1QL queries against Couchbase.
The function accepts an lcb_CMDN1QL
structure which contains the encoded query.
You can use the lcb_N1QLPARAMS
structure and its associated functions to help you construct the encoded query.
If you’re using C++ (as the sample application is), it might be simpler to simply encode the query per the specification.
| N1QL is a super-set of SQL, so if you’re familiar with SQL you’ll feel at ease. |
Only the airport names are required for this part of the application, therefore just the airport name from relevant documents in the bucket should be selected. As the application needs to filter relevant document on a criteria that depends on the input length, the SELECT and FROM clauses are performed first:
std::string stmt("SELECT airportname FROM ");
stmt.append("`").append("travel-sample").append("`"); // Backticks, because '-' in the bucket name must be escaped
stmt.append(" WHERE ");
Then the correct fields can be chosen to look into, depending on the length of the input.
std::string query_arg;
if (params.size() == 3) {
stmt.append("faa = $1");
query_arg = params;
} else if (params.size() == 4) {
stmt.append("icao = $1");
query_arg = params;
} else {
stmt.append("airportname LIKE $1");
query_arg = "%" + params + "%";
}
// Now encode everything
Json::Value query(Json::objectValue);
query["statement"] = stmt;
query["args"].append(query_arg);
std::string encoded(Json::FastWriter().write(query));
Then the statement is actually executed:
lcb_CMDN1QL cmd = { 0 };
cmd.query = query.c_str();
cmd.nquery = query.size();
cmd.callback = query_callback; // We'll show this function soon
if (lcb_n1ql_query(instance, NULL, &cmd) != LCB_SUCCESS) {
// Handle error
}
lcb_wait(instance);
query_callback
then handles the results.
static void query_callback(lcb_t, int, const lcb_RESPN1QL *resp) {
if (resp->rc != LCB_SUCCESS) {
// Problem! Handle this
}
if (resp->rflags & LCB_RESP_F_FINAL) {
// Last response in sequence. All rows have already been received
}
// Normal response:
Json::Value json;
// Decode the row as JSON
Json::Reader().parse(resp->row, resp->row + resp->nrow, json);
std::cout << json["airportname"] << std::endl;
}
The query callback is invoked once for each result row received.
It is invoked one last time with the LCB_RESP_F_FINAL
flag set (in the response’s rflags
field) as a terminator to indicate that no more rows remain.
More Complex Queries: Finding Routes
Relevant Documentation Topics: N1QL Queries using the C (libcouchbase) SDK with Couchbase Server.
In this service, there are two more complex queries. The first aims at transforming the human-readable airport name for the departure and arrival airports to FAA codes:
SELECT faa AS fromAirport FROM `travel-sample` WHERE airportname = "Los Angeles Intl"
UNION SELECT faa AS toAirport FROM `travel-sample` WHERE airportname = "San Francisco Intl"
The second aims at constructing the result set of available flight paths that connect the two airports:
SELECT a.name, s.flight, s.utc, r.sourceairport, r.destinationairport, r.equipment
FROM `travel-sample` AS r
UNNEST r.schedule AS s
JOIN `travel-sample` AS a ON KEYS r.airlineid
WHERE r.sourceairport = "LAX" AND r.destinationairport = "SFO" AND s.day = 6
ORDER BY a.name ASC
A specificity of N1QL that can be seen in the second statement is UNNEST
.
It extracts a sub-JSON object and puts it at the same root level as the bucket, so its possible to do joins on each element in this sub-JSON as if they were entries in a left-hand side bucket.
Indexing the Data: N1QL & GSI
Index management is a bit more advanced (and is already done when loading the sample), so now that you’ve learned the bsaics of N1QL, you can have a look at it.
For N1QL to work, you must first ensure that at least a Primary Index
has been created.
For that you can issue the query:
CREATE PRIMARY INDEX ON `travel-sample`
Refer to the above example on how to execute this query from the SDK. You’ll still need a callback, though there will be no result rows (but the final callback will be invoked always).
You can also create secondary indexes on specific fields of the document, for better performance:
CREATE INDEX `def_username` ON `travel-sample`(username)
In this case, give a name to your index (def_username
), specify the target bucket (travel-sample
) AND the field(s) in the JSON to index (username
).
Full Text Search: Finding Hotels
Relevant Documentation Topics: Full Text Search (FTS) using the C (libcouchbase) SDK with Couchbase Server, Sub-Document Operations.
In this service, hotels are searched for using more fuzzy criterias, like the content of the address or the description of a hotel. This is done using Full Text Search (FTS). When some results match the specified criteria, only the relevant data for each result to be displayed in the UI is fetched using the subdocument API.
To find a hotel based on its location and its description, first a JSON query body is created:
Json::Value query(Json::objectValue);
query["query"]["conjuncts"] = Json::Value(Json::arrayValue);
Json::Value typeQuery(Json::objectValue);
typeQuery["term"] = "hotel";
typeQuery["field"] = "type";
query["query"]["conjuncts"].append(typeQuery)
A conjunction query allows you to combine multiple FTS queries into one, in an AND fashion.
This query always includes an exact match criteria that restricts it to the hotel
data type (as reflected in the type
field of the JSON document).
If the user provided a location keyword, a second component is added to the FTS query that will look for that keyword in several address-related fields of the document.
This is done in an OR fashion, using disjuncts
:
if (!location.empty() && location != "*") {
Json::Value locationQuery(Json::objectValue);
Json::Value disjuncts(Json::objectValue);
disjuncts["disjuncts"] = Json::Value(Json::arrayValue);
Json::Value matchPhrase(Json::objectValue);
matchPhrase["match_phrase"] = location
std::array<const char*, 4> fields({"country", "city", "state", "address"});
for (const auto ptr : fields) {
matchPhrase["field"] = ptr;
disjuncts.append(matchPhrase);
}
query["query"]["conjuncts"].append(disjuncts);
}
if (!description.empty() && description != "*") {
Json::Value disjuncts(Json::objectValue);
std::array<const char *, 2> fields({"description", "name"});
for (const auto field : fields) {
Json::Value matchPhrase(Json::objectValue);
matchPhrase["field"] = field;
matchPhrase["match_phrase"] = description;
}
query["query"]["conjuncts"].append(disjuncts);
}
Before the query is executed, you can limit the number of results to be returned:
query["size"] = 100;
The compound FTS query is now ready to be executed.
lcb_CMDFTS cmd = { 0 };
std::string buf(Json::FastWriter().write(query));
cmd.query = buf.c_str();
cmd.nquery = buf.size();
cmd.callback = search_callback; // Defined later
lcb_fts_query(instance, NULL, &cmd);
lcb_wait(instance);
The second step of working with hotels is done inside the callback. The callback is very similar to the N1QL callback.
The FTS are iterated over in the callback, and the document corresponding to each result is fetched. In actuality, only the parts of the document that will be displayed in the UI are required. This is where the sub-document API comes in.
The sub-document API allows you to fetch or mutate only a set of paths inside a JSON document, without having to send the whole document back and forth. This can save network bandwidth if the document is large and the parts that we’re interested in are small. The callback iterates over each result of the FTS search then triggers a subdoc call:
static void search_callback(lcb_t instance, int, const lcb_RESPFTS* resp) {
if (resp->rc != LCB_SUCCESS) {
// ...
}
if (resp->rflags & LCB_RESP_F_FINAL) {
// ...
}
Json::Value row;
Json::Reader().parse(resp->row, resp->row + resp->nrow, row);
std::string docid(row["id"]);
// Fetch the various subdoc fields:
std::vector<lcb_SDSPEC> specs;
std::array<const char *, 6> fields({"country", "city", "state", "address", "name", "description"});
for (auto field : fields) {
lcb_SDSPEC spec = { 0 };
spec.sdcmd = LCB_SDCMD_GET;
LCB_SDSPEC_SET_PATH(&spec, field, strlen(field));
specs.push_back(spec);
}
lcb_CMDSUBDOC cmd = { 0 };
LCB_CMD_SET_KEY(&cmd, docid.c_str(), docid.size());
cmd.specs = &specs[0];
cmd.nspecs = specs.size();
lcb_subdoc3(instance, NULL, &cmd);
// Note, the above requires that the subdoc callback has been installed.
}
static void subdoc_callback(lcb_t, int, const lcb_RESPSUBDOC *resp) {
if (resp->rc != LCB_SUCCESS) {
// Couldn't get hotel description!
}
// Fields are retrieved in order; so the first field is 'country',
// the second is 'city', and so on:
lcb_SDENTRY ent;
size_t iter = 0;
lcb_sdresult_next(resp, &ent, &iter);
printf("Country is: %.*s\n", ent.value, ent.nvalue);
// and so on..
}


class UsersRepository
Properties
| $message | ||
| $errors |
Methods
|
__construct(DvsUser $User)
|
||
| DvsUser |
retrieveCurrentUser()
Retrieve currently logged-in user object |
|
| Integer |
retrieveCurrentUserId()
Retrieve current user's id |
|
| Collection |
retrievePaginated()
Search for users |
|
| DeviseUser |
findById(int $id)
Find user by id |
|
| DeviseUser |
findByEmail(string $email)
Find user by email address |
|
| Collection |
users()
Paginated list of users |
|
| Boolean |
activate(object $user)
Activate user |
|
| String |
generateActivateCode(object $user, integer $length = 42)
Generate a random "activate_code" string |
Details
at line 12
public
__construct(DvsUser $User)
at line 22
public DvsUser
retrieveCurrentUser()
Retrieve currently logged-in user object
at line 32
public Integer
retrieveCurrentUserId()
Retrieve current user's id
at line 44
public Collection
retrievePaginated()
Search for users
at line 55
public DeviseUser
findById(int $id)
Find user by id
at line 66
public DeviseUser
findByEmail(string $email)
Find user by email address
at line 76
public Collection
users()
Paginated list of users
at line 87
public Boolean
activate(object $user)
Activate user
at line 102
public String
generateActivateCode(object $user, integer $length = 42)
Generate a random "activate_code" string


Which programming language should you learn?
Javascript, Ruby or C#! Find out here!
Which dog breed do you prefer?
Husky
Golden Doodle
In your opinion, which color is more beautiful?
Blue
Green
Would you rather hike Machu Picchu or Mt Everest?
Machu Picchu
Mt Everest
Do you prefer coffee or tea?
Coffee
Tea
What kind of music are you most likely to dance to?
Salsa
Hip-hop
Which language suits you well?
You should learn JavaScript!
You should learn Ruby!
You should learn C#!


I Shot Andy Warhol (R) *** Starring Lili Taylor, Jared Harris Directed by Mary Harron A Review by Frankie Paiva
Lili Taylor nabbed one of her first lead roles in this true life drama about Valerie Jean Solanas, the woman who shot Andy Warhol in 1968. But the film is more of a showcase to the ways of the 60s and the influence that Warhol and other artists had on the people at that time.
Valerie Jean Solanas (Taylor) is a lesbian feminist who as written a book called SCUM Manifesto, a book (which is now a classic) about the way that men (like disease, or so she says) have been ruling here for the millions of years before us. She tries to sell it on the street, and is thrilled when her drag queen friend is invited to Andy Warhol's pad. This is her chance to sell him not only on the book, but on some plays that she has been writing.
But Andy is just like all of the other men out there. When a publisher signs her to a fraud contract and a friend puts her on a television show discussing homosexuality where the host makes fun of her, she begins to think that Andy is all behind it. He's been constantly ignoring and making fun of her and she doesn't like it. Her increasing rage is about to bring on the deadliest of consequences.
Lili Taylor gives the performance of her career (at least so far) she puts every ounce that she can into this character and it's a great treat to watch. Flaws are abound however, most of the film is boring and needs something interesting to be put on the screen and the story was told harsher than it needs to be. Still, the film does a good job of examining the inner rage that overcame the woman and her actions thereafter. If your looking for a cool 60s noir piece, rent I Shot Andy Warhol, which gets *** stars.
The Young-Uns: The main character is lesbian and we see one lesbian encounter. She is also a prostitute and we see two (not very explicit) sex scenes of her servicing her customers. It also contains strong language and drug use. Good Age: 16 & Up
A Review by Frankie Paiva The 12 Year-Old Movie Reviewer E-Mail me at<EMAIL_ADDRESS>Visit my website at: http://expage.com/page/teenagemoviecritic
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


This is the website where you can results, scores, events, competitors and records for the Manchester Grammar School Senior Sports Day — all in real time!
The website is currently offline to build suspense for the final announcement...
Archived results are still available for previous years on Google Sheets. Please click the relevant year to view results:


--- layout: post status: publish published: true title: Blogger已被全面和谐 author: Leask author_login: leask author_email<EMAIL_ADDRESS>author_url: https://leaskh.com wordpress_id: 125 wordpress_url: http://leaskh.wordpress.com/2009/05/25/blogger%e5%b7%b2%e8%a2%ab%e5%85%a8%e9%9d%a2%e5%92%8c%e8%b0%90 date: '2009-05-25 06:33:37 +0800' date_gmt: '2009-05-25 06:33:37 +0800' categories: tags: [] comments: [] ---


About Netsearch
Netsearch is a search application developed by Iain Hendry, an MSc IT student at the University of Glasgow,
as part of a research project. The following Study Information must be understood and agreed to before participation
in this study:
- The application is powered by a popular search engine, and is intended to be used in place of your favourite
search engine for the duration of the experiment.
- As part of the study you will be asked to complete some optional questionnaires regarding your
demographics and experience with the application.
- The experiment will last for X days, beginning on X July, 2014.
- Participation in this study is voluntary, and you may withdraw consent to use the information you provided
at any time before the X of August, 2014.
- Your name will not appear on any published document in relation to this study.
- The time you spend on each query will be recorded for purposes of this experiment. Your specific queries
will not be recorded, nor will any URLs visited using this application.
- Your details will not be used for any purposes other than this experiment, and will not be passed on to
any third party.
- You are able to ask questions at any time before, during or after the experiment using the contact
details below.
If you would like to participate, please
register to begin searching.
If you have any questions or problems please contact Iain at:
<EMAIL_ADDRESS>or the project supervisor, Dr. Leif Azzopardi, at:
<EMAIL_ADDRESS>{% endblock %}


◆ __init__()
| def frac_step_solverQ.FracStepSolver.__init__ |
( |
|
self, |
|
|
|
model_part, |
|
|
|
p_model_part, |
|
|
|
domain_size |
|
) |
| |
◆ CalculateDistanceAndDiviedSet()
| def frac_step_solverQ.FracStepSolver.CalculateDistanceAndDiviedSet |
( |
|
self, |
|
|
|
domain_size |
|
) |
| |
◆ CalculateRadius()
| def frac_step_solverQ.FracStepSolver.CalculateRadius |
( |
|
self | ) |
|
◆ Clear()
| def frac_step_solverQ.FracStepSolver.Clear |
( |
|
self | ) |
|
◆ DistToH()
| def frac_step_solverQ.FracStepSolver.DistToH |
( |
|
self | ) |
|
◆ DistToH1()
| def frac_step_solverQ.FracStepSolver.DistToH1 |
( |
|
self | ) |
|
◆ DistToH2()
| def frac_step_solverQ.FracStepSolver.DistToH2 |
( |
|
self | ) |
|
◆ DistToH4()
| def frac_step_solverQ.FracStepSolver.DistToH4 |
( |
|
self | ) |
|
◆ FindNeighbours()
| def frac_step_solverQ.FracStepSolver.FindNeighbours |
( |
|
self | ) |
|
◆ Initialize()
| def frac_step_solverQ.FracStepSolver.Initialize |
( |
|
self | ) |
|
◆ Projections()
| def frac_step_solverQ.FracStepSolver.Projections |
( |
|
self | ) |
|
◆ Reactions()
| def frac_step_solverQ.FracStepSolver.Reactions |
( |
|
self | ) |
|
◆ Remesh2()
| def frac_step_solverQ.FracStepSolver.Remesh2 |
( |
|
self | ) |
|
◆ RemeshAux()
| def frac_step_solverQ.FracStepSolver.RemeshAux |
( |
|
self | ) |
|
◆ Solve()
| def frac_step_solverQ.FracStepSolver.Solve |
( |
|
self | ) |
|
◆ solve3()
| def frac_step_solverQ.FracStepSolver.solve3 |
( |
|
self | ) |
|
◆ solve4()
| def frac_step_solverQ.FracStepSolver.solve4 |
( |
|
self | ) |
|
◆ solve5() [1/2]
| def frac_step_solverQ.FracStepSolver.solve5 |
( |
|
self | ) |
|
◆ solve5() [2/2]
| def frac_step_solverQ.FracStepSolver.solve5 |
( |
|
self | ) |
|
◆ WriteRestartFile()
| def frac_step_solverQ.FracStepSolver.WriteRestartFile |
( |
|
self, |
|
|
|
FileName |
|
) |
| |
◆ activate_tau2
| frac_step_solverQ.FracStepSolver.activate_tau2 |
◆ box_corner1
| frac_step_solverQ.FracStepSolver.box_corner1 |
◆ box_corner2
| frac_step_solverQ.FracStepSolver.box_corner2 |
◆ CalculateNormDxFlag
| frac_step_solverQ.FracStepSolver.CalculateNormDxFlag |
◆ CalculateReactions
| frac_step_solverQ.FracStepSolver.CalculateReactions |
◆ compute_reactions
| frac_step_solverQ.FracStepSolver.compute_reactions |
◆ condition_neigh_finder
| frac_step_solverQ.FracStepSolver.condition_neigh_finder |
◆ domain_size
| frac_step_solverQ.FracStepSolver.domain_size |
◆ dynamic_tau
| frac_step_solverQ.FracStepSolver.dynamic_tau |
◆ echo_level
| frac_step_solverQ.FracStepSolver.echo_level |
◆ elem_neighbor_finder
| frac_step_solverQ.FracStepSolver.elem_neighbor_finder |
◆ fluid_neigh_finder
| frac_step_solverQ.FracStepSolver.fluid_neigh_finder |
◆ laplacian_form
| frac_step_solverQ.FracStepSolver.laplacian_form |
◆ mark_fluid_process
| frac_step_solverQ.FracStepSolver.mark_fluid_process |
◆ mark_outer_nodes_process
| frac_step_solverQ.FracStepSolver.mark_outer_nodes_process |
◆ max_press_its
| frac_step_solverQ.FracStepSolver.max_press_its |
◆ max_vel_its
| frac_step_solverQ.FracStepSolver.max_vel_its |
◆ Mesher
| frac_step_solverQ.FracStepSolver.Mesher |
◆ Mesher1
| frac_step_solverQ.FracStepSolver.Mesher1 |
◆ model_part
| frac_step_solverQ.FracStepSolver.model_part |
◆ neigh_finder
| frac_step_solverQ.FracStepSolver.neigh_finder |
◆ neighbour_search
| frac_step_solverQ.FracStepSolver.neighbour_search |
◆ node_erase_process
| frac_step_solverQ.FracStepSolver.node_erase_process |
◆ p_model_part
| frac_step_solverQ.FracStepSolver.p_model_part |
◆ particle_utils
| frac_step_solverQ.FracStepSolver.particle_utils |
◆ Pfem2_apply_bc_process
| frac_step_solverQ.FracStepSolver.Pfem2_apply_bc_process |
◆ Pfem2Utils
| frac_step_solverQ.FracStepSolver.Pfem2Utils |
◆ predictor_corrector
| frac_step_solverQ.FracStepSolver.predictor_corrector |
◆ press_toll
| frac_step_solverQ.FracStepSolver.press_toll |
◆ pressure_linear_solver
| frac_step_solverQ.FracStepSolver.pressure_linear_solver |
◆ ReformDofAtEachIteration
| frac_step_solverQ.FracStepSolver.ReformDofAtEachIteration |
◆ slip_conditions_initialized
| frac_step_solverQ.FracStepSolver.slip_conditions_initialized |
◆ solver
| frac_step_solverQ.FracStepSolver.solver |
◆ time_order
| frac_step_solverQ.FracStepSolver.time_order |
◆ timer
| frac_step_solverQ.FracStepSolver.timer |
◆ vel_toll
| frac_step_solverQ.FracStepSolver.vel_toll |
◆ velocity_linear_solver
| frac_step_solverQ.FracStepSolver.velocity_linear_solver |
The documentation for this class was generated from the following file:
- /home/runner/work/Documentation/Documentation/master/applications/PFEM2Application/python_scripts/frac_step_solverQ.py


Logout
Analysis
This week
27%
Your Analysis:
Calorie Per Day
loading...
Calorie Burn
loading...
Calorie Required
loading...
View other features
Features
BMI Calculator
Health Tips


--- layout: default title: The Workshop permalink: /the-workshop/ image: header.png --- {% include top-section.html %}
We are currently looking for talented and enthusiastic people. Check out our openings or contact us at careers@theworkshop.com.


Last updated: 2020-04-05
Checks: 7 0
Knit directory: 00_Supervised_Learning/
This reproducible R Markdown analysis was created with workflowr (version 1.6.1). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.
Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.
Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.
The command set.seed(20200328)
was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.
Great job! Recording the operating system, R version, and package versions is critical for reproducibility.
Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.
Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.
Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.
The results in this page were generated with repository version f3781f3. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.
Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish
or wflow_git_commit
). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:
Ignored files:
Ignored: .Rhistory
Ignored: .Rproj.user/
Untracked files:
Untracked: data/c1_cars_vars_full.rds
Untracked: data/c1_testing_full.rds
Untracked: data/c1_training_one_percent.rds
Untracked: data/cars2018.csv
Untracked: data/cars_lm_bt.rds
Untracked: data/cars_rf_bt.rds
Untracked: output/car_test.rds
Untracked: output/car_train.rds
Untracked: output/cars_lm_bt.rds
Untracked: output/cars_rf_bt.rds
Untracked: output/cars_vars2.rds
Untracked: output/fit_lm2.rds
Untracked: output/fit_rf.rds
Untracked: output/results_test.rds
Untracked: output/results_train.rds
Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.
These are the previous versions of the repository in which changes were made to the R Markdown (analysis/fuel-efficiency.Rmd
) and HTML (docs/fuel-efficiency.html
) files. If you’ve configured a remote Git repository (see ?wflow_git_remote
), click on the hyperlinks in the table below to view the files as they were in that past version.
| File | Version | Author | Date | Message |
|---|---|---|---|---|
| Rmd | f3781f3 | ogorodriguez | 2020-04-05 | Changed plot formula to use pivot_longer() |
| html | e99d6bd | ogorodriguez | 2020-04-04 | Build site. |
| Rmd | 660f0c2 | ogorodriguez | 2020-04-04 | Included graph to compare |
| html | 78a1303 | ogorodriguez | 2020-04-04 | Build site. |
| Rmd | dfc530b | ogorodriguez | 2020-04-04 | Fixed issue with testing model |
| html | 18308e8 | ogorodriguez | 2020-04-04 | Build site. |
| Rmd | 782548b | ogorodriguez | 2020-04-04 | Includes the bootstrap training model and revision of Bootstrapping |
| html | cf83543 | ogorodriguez | 2020-04-04 | Build site. |
| Rmd | c21823f | ogorodriguez | 2020-04-03 | wflow_git_commit(all = TRUE) |
| html | c21823f | ogorodriguez | 2020-04-03 | wflow_git_commit(all = TRUE) |
| Rmd | f453da9 | ogorodriguez | 2020-03-29 | wflow_git_commit(all = TRUE) |
| html | f453da9 | ogorodriguez | 2020-03-29 | wflow_git_commit(all = TRUE) |
| html | 4faa5fb | ogorodriguez | 2020-03-29 | Build site. |
| Rmd | b29089c | ogorodriguez | 2020-03-29 | Evaluation of linear reg and ranforest with yardstick |
| html | 24acf21 | ogorodriguez | 2020-03-29 | Build site. |
| Rmd | 4357344 | ogorodriguez | 2020-03-29 | Evaluation of linear reg and ranforest with yardstick |
| html | 05d430a | ogorodriguez | 2020-03-29 | Build site. |
| Rmd | 8246a7c | ogorodriguez | 2020-03-29 | First publishing of all files |
# Downloading packages needed
library(pacman)
p_load(tidyverse, tidymodels, caret)
In this module we will build a model that will help us predict the fuel efficiency of set of cars from the US.
The Data set to use will come from the US Department of Energy
# Show a glimpse of the data
cars2018 <- read_csv("data/cars2018.csv")
cars2018 %>%
glimpse()
#> Observations: 1,144
#> Variables: 15
#> $ Model <chr> "Acura NSX", "ALFA ROMEO 4C", "Audi R8 AW...
#> $ `Model Index` <dbl> 57, 410, 65, 71, 66, 72, 46, 488, 38, 278...
#> $ Displacement <dbl> 3.5, 1.8, 5.2, 5.2, 5.2, 5.2, 2.0, 3.0, 8...
#> $ Cylinders <dbl> 6, 4, 10, 10, 10, 10, 4, 6, 16, 8, 8, 8, ...
#> $ Gears <dbl> 9, 6, 7, 7, 7, 7, 6, 7, 7, 8, 8, 7, 7, 7,...
#> $ Transmission <chr> "Manual", "Manual", "Manual", "Manual", "...
#> $ MPG <dbl> 21, 28, 17, 18, 17, 18, 26, 20, 11, 18, 1...
#> $ Aspiration <chr> "Turbocharged/Supercharged", "Turbocharge...
#> $ `Lockup Torque Converter` <chr> "Y", "Y", "Y", "Y", "Y", "Y", "Y", "N", "...
#> $ Drive <chr> "All Wheel Drive", "2-Wheel Drive, Rear",...
#> $ `Max Ethanol` <dbl> 10, 10, 15, 15, 15, 15, 15, 10, 15, 10, 1...
#> $ `Recommended Fuel` <chr> "Premium Unleaded Required", "Premium Unl...
#> $ `Intake Valves Per Cyl` <dbl> 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 2,...
#> $ `Exhaust Valves Per Cyl` <dbl> 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 2,...
#> $ `Fuel injection` <chr> "Direct ignition", "Direct ignition", "Di...
cars2018 %>%
head()
#> # A tibble: 6 x 15
#> Model `Model Index` Displacement Cylinders Gears Transmission MPG Aspiration
#> <chr> <dbl> <dbl> <dbl> <dbl> <chr> <dbl> <chr>
#> 1 Acur~ 57 3.5 6 9 Manual 21 Turbochar~
#> 2 ALFA~ 410 1.8 4 6 Manual 28 Turbochar~
#> 3 Audi~ 65 5.2 10 7 Manual 17 Naturally~
#> 4 Audi~ 71 5.2 10 7 Manual 18 Naturally~
#> 5 Audi~ 66 5.2 10 7 Manual 17 Naturally~
#> 6 Audi~ 72 5.2 10 7 Manual 18 Naturally~
#> # ... with 7 more variables: `Lockup Torque Converter` <chr>, Drive <chr>, `Max
#> # Ethanol` <dbl>, `Recommended Fuel` <chr>, `Intake Valves Per Cyl` <dbl>,
#> # `Exhaust Valves Per Cyl` <dbl>, `Fuel injection` <chr>
Some of the column names have backsticks. This is the way R handles variable names with spaces. Let’s organize that by using the janitor packages that is used to clean the names of columns by normalizing them into lower case and using under scores.
cars2018 <- cars2018 %>%
janitor::clean_names()
cars2018 %>%
glimpse()
#> Observations: 1,144
#> Variables: 15
#> $ model <chr> "Acura NSX", "ALFA ROMEO 4C", "Audi R8 AWD"...
#> $ model_index <dbl> 57, 410, 65, 71, 66, 72, 46, 488, 38, 278, ...
#> $ displacement <dbl> 3.5, 1.8, 5.2, 5.2, 5.2, 5.2, 2.0, 3.0, 8.0...
#> $ cylinders <dbl> 6, 4, 10, 10, 10, 10, 4, 6, 16, 8, 8, 8, 8,...
#> $ gears <dbl> 9, 6, 7, 7, 7, 7, 6, 7, 7, 8, 8, 7, 7, 7, 7...
#> $ transmission <chr> "Manual", "Manual", "Manual", "Manual", "Ma...
#> $ mpg <dbl> 21, 28, 17, 18, 17, 18, 26, 20, 11, 18, 16,...
#> $ aspiration <chr> "Turbocharged/Supercharged", "Turbocharged/...
#> $ lockup_torque_converter <chr> "Y", "Y", "Y", "Y", "Y", "Y", "Y", "N", "Y"...
#> $ drive <chr> "All Wheel Drive", "2-Wheel Drive, Rear", "...
#> $ max_ethanol <dbl> 10, 10, 15, 15, 15, 15, 15, 10, 15, 10, 10,...
#> $ recommended_fuel <chr> "Premium Unleaded Required", "Premium Unlea...
#> $ intake_valves_per_cyl <dbl> 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 2, 2...
#> $ exhaust_valves_per_cyl <dbl> 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 2, 2...
#> $ fuel_injection <chr> "Direct ignition", "Direct ignition", "Dire...
The model to build will help predict the fuel efficiency of a car based on a number of parameters. The fuel efficiency is given by the varialbe mpg
in the previous set cars2018
. It refers to the number of miles a car can travel on a sigle gallon of gas.
mpg
is a numeric variable. This means that the model we will need will require a regression analysis since we need to predict a number.
Let’s explore more the data that we have in our hands. The variable we need to predict mpg
is our set. One good thing to do is to see how distributed is it. We can see this visually using the ggplot graph function.
cars2018 %>%
ggplot(aes(x = mpg)) +
geom_histogram(bins = 25) +
labs(title = "Fuel Efficiency Distribution",
x = "Fuel efficienty (mpg)",
y = "Number of cars") +
theme_light()
It helps to build the simplest model possible before going on to doing sophisticated ones. This will give us an idea of what may be going on with the data.
There is a linear model function in base R that can help us find some underlying relationships.
Two variables are not needed in our set since they are only unique identifiers Model and Model Year so we will remove them from our site.
cars_vars <- cars2018 %>%
select(-starts_with("model"))
cars_vars %>%
glimpse()
#> Observations: 1,144
#> Variables: 13
#> $ displacement <dbl> 3.5, 1.8, 5.2, 5.2, 5.2, 5.2, 2.0, 3.0, 8.0...
#> $ cylinders <dbl> 6, 4, 10, 10, 10, 10, 4, 6, 16, 8, 8, 8, 8,...
#> $ gears <dbl> 9, 6, 7, 7, 7, 7, 6, 7, 7, 8, 8, 7, 7, 7, 7...
#> $ transmission <chr> "Manual", "Manual", "Manual", "Manual", "Ma...
#> $ mpg <dbl> 21, 28, 17, 18, 17, 18, 26, 20, 11, 18, 16,...
#> $ aspiration <chr> "Turbocharged/Supercharged", "Turbocharged/...
#> $ lockup_torque_converter <chr> "Y", "Y", "Y", "Y", "Y", "Y", "Y", "N", "Y"...
#> $ drive <chr> "All Wheel Drive", "2-Wheel Drive, Rear", "...
#> $ max_ethanol <dbl> 10, 10, 15, 15, 15, 15, 15, 10, 15, 10, 10,...
#> $ recommended_fuel <chr> "Premium Unleaded Required", "Premium Unlea...
#> $ intake_valves_per_cyl <dbl> 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 2, 2...
#> $ exhaust_valves_per_cyl <dbl> 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 2, 2...
#> $ fuel_injection <chr> "Direct ignition", "Direct ignition", "Dire...
Now let us run the linear model and see the relationships therein.
fit_all <- lm(mpg ~ ., data = cars_vars)
summary(fit_all)
#>
#> Call:
#> lm(formula = mpg ~ ., data = cars_vars)
#>
#> Residuals:
#> Min 1Q Median 3Q Max
#> -8.5261 -1.6473 -0.1096 1.3572 26.5045
#>
#> Coefficients:
#> Estimate Std. Error t value
#> (Intercept) 44.539519 1.176283 37.865
#> displacement -3.786147 0.264845 -14.296
#> cylinders 0.520284 0.161802 3.216
#> gears 0.157674 0.069984 2.253
#> transmissionCVT 4.877637 0.404051 12.072
#> transmissionManual -1.074608 0.366075 -2.935
#> aspirationTurbocharged/Supercharged -2.190248 0.267559 -8.186
#> lockup_torque_converterY -2.624494 0.381252 -6.884
#> drive2-Wheel Drive, Rear -2.676716 0.291044 -9.197
#> drive4-Wheel Drive -3.397532 0.335147 -10.137
#> driveAll Wheel Drive -2.941084 0.257174 -11.436
#> max_ethanol -0.007377 0.005898 -1.251
#> recommended_fuelPremium Unleaded Required -0.403935 0.262413 -1.539
#> recommended_fuelRegular Unleaded Recommended -0.996343 0.272495 -3.656
#> intake_valves_per_cyl -1.446107 1.620575 -0.892
#> exhaust_valves_per_cyl -2.469747 1.547748 -1.596
#> fuel_injectionMultipoint/sequential ignition -0.658428 0.243819 -2.700
#> Pr(>|t|)
#> (Intercept) < 2e-16 ***
#> displacement < 2e-16 ***
#> cylinders 0.001339 **
#> gears 0.024450 *
#> transmissionCVT < 2e-16 ***
#> transmissionManual 0.003398 **
#> aspirationTurbocharged/Supercharged 7.24e-16 ***
#> lockup_torque_converterY 9.65e-12 ***
#> drive2-Wheel Drive, Rear < 2e-16 ***
#> drive4-Wheel Drive < 2e-16 ***
#> driveAll Wheel Drive < 2e-16 ***
#> max_ethanol 0.211265
#> recommended_fuelPremium Unleaded Required 0.124010
#> recommended_fuelRegular Unleaded Recommended 0.000268 ***
#> intake_valves_per_cyl 0.372400
#> exhaust_valves_per_cyl 0.110835
#> fuel_injectionMultipoint/sequential ignition 0.007028 **
#> ---
#> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#>
#> Residual standard error: 2.916 on 1127 degrees of freedom
#> Multiple R-squared: 0.7314, Adjusted R-squared: 0.7276
#> F-statistic: 191.8 on 16 and 1127 DF, p-value: < 2.2e-16
Let us see the results in a tidier manner using the broom
package.
broom::tidy(fit_all)
#> # A tibble: 17 x 5
#> term estimate std.error statistic p.value
#> <chr> <dbl> <dbl> <dbl> <dbl>
#> 1 (Intercept) 44.5 1.18 37.9 4.44e-203
#> 2 displacement -3.79 0.265 -14.3 9.95e- 43
#> 3 cylinders 0.520 0.162 3.22 1.34e- 3
#> 4 gears 0.158 0.0700 2.25 2.44e- 2
#> 5 transmissionCVT 4.88 0.404 12.1 1.21e- 31
#> 6 transmissionManual -1.07 0.366 -2.94 3.40e- 3
#> 7 aspirationTurbocharged/Supercharged -2.19 0.268 -8.19 7.24e- 16
#> 8 lockup_torque_converterY -2.62 0.381 -6.88 9.65e- 12
#> 9 drive2-Wheel Drive, Rear -2.68 0.291 -9.20 1.73e- 19
#> 10 drive4-Wheel Drive -3.40 0.335 -10.1 3.59e- 23
#> 11 driveAll Wheel Drive -2.94 0.257 -11.4 9.89e- 29
#> 12 max_ethanol -0.00738 0.00590 -1.25 2.11e- 1
#> 13 recommended_fuelPremium Unleaded Requ~ -0.404 0.262 -1.54 1.24e- 1
#> 14 recommended_fuelRegular Unleaded Reco~ -0.996 0.272 -3.66 2.68e- 4
#> 15 intake_valves_per_cyl -1.45 1.62 -0.892 3.72e- 1
#> 16 exhaust_valves_per_cyl -2.47 1.55 -1.60 1.11e- 1
#> 17 fuel_injectionMultipoint/sequential i~ -0.658 0.244 -2.70 7.03e- 3
# Let's see the measures in detail
# Use tidyr::pivot_longer() to get the results in column form.
broom::glance(fit_all) %>%
tidyr::pivot_longer(everything(), names_to = "measures", values_to = "values")
#> # A tibble: 11 x 2
#> measures values
#> <chr> <dbl>
#> 1 r.squared 7.31e- 1
#> 2 adj.r.squared 7.28e- 1
#> 3 sigma 2.92e+ 0
#> 4 statistic 1.92e+ 2
#> 5 p.value 8.58e-308
#> 6 df 1.70e+ 1
#> 7 logLik -2.84e+ 3
#> 8 AIC 5.71e+ 3
#> 9 BIC 5.80e+ 3
#> 10 deviance 9.58e+ 3
#> 11 df.residual 1.13e+ 3
Interpreting the results from this model quickly, we can see this model may do a good job predicting the fuel efficiency from the variables indicated in this dataset. Some key points for this argument are:
We have not yet tested the model and its quality in a real set of values. That is why in the next section we will use training and testing subsets of the data to train our model
caret
is a package used for working with machine learning trainig models. We will be using it together with other packages included in the tidymodels suite.
It is advisable to hold some of our data for testing purposes and use the rest to train our model. Then we can compare how the model performs on fresh data. This will give us more insights into the use of the model to propose. Linear model it is said may not be the most accurate nor sophisticated but in this case it will help internalize the concepts.
The package rsample
contains a function that will help us split the data into a proportion for training and another for testing.
car_split <- cars2018 %>%
rsample::initial_split(prop = 0.8,
strata = "aspiration")
The split within the set will be done at 80%, which means that the training set will be comprised of 80% of the data and the testing set of 20%. The split was done so that the data will be balanced according to the aspiration variable. Meaning, so that the both splits have a balanced inclusion of both types in them.
If we look at the object car_split
we can see it is a special class. and also its output is just sequence of numbers.
car_split %>%
class()
#> [1] "rsplit" "mc_split"
car_split
#> <916/228/1144>
This sequence of numbers indicate the amount of points used for training (916), followed by the amount used for testing (228) and then the total number of observations in our dataset (1144).
We can see this in a tidy way buy pulling out the tidy() function from broom and then using count from dplyr. The systmes labels Analysis the observation used for training and Assessment those used for testing.
broom::tidy(car_split) %>%
dplyr::count(Data, sort = TRUE)
#> # A tibble: 2 x 2
#> Data n
#> <chr> <int>
#> 1 Analysis 916
#> 2 Assessment 228
Let’s access both these sets using variables for training and testing.
car_training <- rsample::training(car_split)
car_testing <- rsample::testing(car_split)
The basic workflow here is: - Build the model with the testing data - Validate the model with validation data - Evaluate the model with testing data
In the previous section the notion of validation was introduced. Validation is needed when we are trying to assess several models and then choose the best one, or the most significant one, to evaluate. For this section it is not be necessary.
caret
has an engine that lets us plug in the model we would like to use our training data on. It contains various models, including the linear model one, or lm.
fit_lm <- caret::train(log(mpg) ~ .,
method = "lm",
data = car_training,
trContro = trainControl(method = "none") )
Let’s check the class of the fit_lm model.
fit_lm %>%
class()
#> [1] "train" "train.formula"
Let’s inspect the model.
fit_lm
#> Linear Regression
#>
#> 916 samples
#> 14 predictor
#>
#> No pre-processing
#> Resampling: Bootstrapped (25 reps)
#> Summary of sample sizes: 916, 916, 916, 916, 916, 916, ...
#> Resampling results:
#>
#> RMSE Rsquared MAE
#> 0.1606464 0.6040351 0.113699
#>
#> Tuning parameter 'intercept' was held constant at a value of TRUE
At first we can see that from the 916 observations of our training sample it identified 14 predictors. In comparison the lm() from base R identified 13. In this case the r_squared is less then in base R (0.6 compared to 0.7 in base R.)
The evaluation can be done also using the yardstick package.
I will practice again with a new dataset imported for this course.
cars_vars2 <- readr::read_rds("data/c1_cars_vars_full.rds") %>% janitor::clean_names()
cars_vars2 %>% glimpse()
#> Observations: 1,144
#> Variables: 13
#> $ displacement <dbl> 3.5, 1.8, 5.2, 5.2, 5.2, 5.2, 2.0, 3.0, 8.0...
#> $ cylinders <int> 6, 4, 10, 10, 10, 10, 4, 6, 16, 8, 8, 8, 8,...
#> $ gears <int> 9, 6, 7, 7, 7, 7, 6, 7, 7, 8, 8, 7, 7, 7, 7...
#> $ transmission <chr> "Manual", "Manual", "Manual", "Manual", "Ma...
#> $ mpg <int> 21, 28, 17, 18, 17, 18, 26, 20, 11, 18, 16,...
#> $ aspiration <chr> "Turbocharged/Supercharged", "Turbocharged/...
#> $ lockup_torque_converter <chr> "Y", "Y", "Y", "Y", "Y", "Y", "Y", "N", "Y"...
#> $ drive <chr> "All Wheel Drive", "2-Wheel Drive, Rear", "...
#> $ max_ethanol <int> 10, 10, 15, 15, 15, 15, 15, 10, 15, 10, 10,...
#> $ recommended_fuel <chr> "Premium Unleaded Required", "Premium Unlea...
#> $ intake_valves_per_cyl <int> 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 2, 2...
#> $ exhaust_valves_per_cyl <int> 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 2, 2...
#> $ fuel_injection <chr> "Direct ignition", "Direct ignition", "Dire...
car_split2 <- cars_vars2 %>%
rsample::initial_split(prop = 0.8,
strata = "aspiration")
car_train <- rsample::training(car_split2)
car_test <- rsample::testing(car_split2)
Let us fit the model
fit_lm2 <- caret::train(log(mpg) ~ .,
method = "lm",
data = car_train,
trControl = trainControl(method = "none"))
fit_lm2
#> Linear Regression
#>
#> 916 samples
#> 12 predictor
#>
#> No pre-processing
#> Resampling: None
Now let’s train a RandomForest model
fit_rf <- caret::train(log(mpg) ~ .,
method = "rf",
data = car_train,
trControl = trainControl(method = "none"))
fit_rf %>% class()
#> [1] "train" "train.formula"
fit_rf
#> Random Forest
#>
#> 916 samples
#> 12 predictor
#>
#> No pre-processing
#> Resampling: None
For the evaluation we will need to create a dataframe with both our train datasets that includes both our models and after that, run the metrics() function from the yardsticks package.
library(yardstick)
# The dataframe will be called results that will include the training set used to create the lm and the rf models
results_train <- car_train %>%
mutate(mpg_log = log(mpg),
lreg = predict(fit_lm2, car_train),
rfor = predict(fit_rf, car_train)) %>%
select(mpg, mpg_log, lreg, rfor, everything())
Let’s see this new dataset
results_train %>%
glimpse()
#> Observations: 916
#> Variables: 16
#> $ mpg <int> 21, 28, 17, 18, 17, 18, 26, 20, 11, 18, 16,...
#> $ mpg_log <dbl> 3.044522, 3.332205, 2.833213, 2.890372, 2.8...
#> $ lreg <dbl> 2.959295, 3.189499, 2.818505, 2.832572, 2.8...
#> $ rfor <dbl> 3.054315, 3.269829, 2.797044, 2.828388, 2.7...
#> $ displacement <dbl> 3.5, 1.8, 5.2, 5.2, 5.2, 5.2, 2.0, 3.0, 8.0...
#> $ cylinders <int> 6, 4, 10, 10, 10, 10, 4, 6, 16, 8, 8, 8, 8,...
#> $ gears <int> 9, 6, 7, 7, 7, 7, 6, 7, 7, 8, 8, 7, 7, 7, 7...
#> $ transmission <chr> "Manual", "Manual", "Manual", "Manual", "Ma...
#> $ aspiration <chr> "Turbocharged/Supercharged", "Turbocharged/...
#> $ lockup_torque_converter <chr> "Y", "Y", "Y", "Y", "Y", "Y", "Y", "N", "Y"...
#> $ drive <chr> "All Wheel Drive", "2-Wheel Drive, Rear", "...
#> $ max_ethanol <int> 10, 10, 15, 15, 15, 15, 15, 10, 15, 10, 10,...
#> $ recommended_fuel <chr> "Premium Unleaded Required", "Premium Unlea...
#> $ intake_valves_per_cyl <int> 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 2, 2...
#> $ exhaust_valves_per_cyl <int> 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 2, 2...
#> $ fuel_injection <chr> "Direct ignition", "Direct ignition", "Dire...
Now let’s evaluate the performance.
yardstick::metrics(results_train, truth = mpg_log, estimate = lreg)
#> # A tibble: 3 x 3
#> .metric .estimator .estimate
#> <chr> <chr> <dbl>
#> 1 rmse standard 0.0989
#> 2 rsq standard 0.812
#> 3 mae standard 0.0735
yardstick::metrics(results_train, truth = mpg_log, estimate = rfor)
#> # A tibble: 3 x 3
#> .metric .estimator .estimate
#> <chr> <chr> <dbl>
#> 1 rmse standard 0.0665
#> 2 rsq standard 0.918
#> 3 mae standard 0.0477
Let’s see hot these models do on the testing data.
results_test <- car_test %>%
mutate(mpg_log = log(mpg),
lreg = predict(fit_lm2, car_test),
rfor = predict(fit_rf, car_test)) %>%
select(mpg, mpg_log, lreg, rfor, everything())
yardstick::metrics(results_test, truth = mpg_log, estimate = lreg)
#> # A tibble: 3 x 3
#> .metric .estimator .estimate
#> <chr> <chr> <dbl>
#> 1 rmse standard 0.104
#> 2 rsq standard 0.783
#> 3 mae standard 0.0769
yardstick::metrics(results_test, truth = mpg_log, estimate = rfor)
#> # A tibble: 3 x 3
#> .metric .estimator .estimate
#> <chr> <chr> <dbl>
#> 1 rmse standard 0.0798
#> 2 rsq standard 0.870
#> 3 mae standard 0.0586
Now we are going to use methods to refine the model that a simple linear regression may not be so in tune for.
One of those is bootstrapping. Bootstrapping is simply getting a sample with replacement. The methods here in R may take longer since we can have as many samples as necessary. The system will run the model that number of times and will deliver an average result.
Due to the heavy load of the work, there is a reduced dataset already available in the course for us to work with with 1% of the data.
car_train_1p <- readr::read_rds("data/c1_training_one_percent.rds") %>% janitor::clean_names()
car_train_1p %>%
glimpse()
#> Observations: 93
#> Variables: 13
#> $ displacement <dbl> 2.0, 2.5, 2.0, 2.4, 2.7, 3.0, 6.4, 3.3, 2.0...
#> $ cylinders <int> 4, 4, 4, 4, 4, 6, 8, 6, 4, 6, 8, 6, 4, 4, 4...
#> $ gears <int> 7, 6, 8, 6, 6, 8, 8, 6, 6, 10, 7, 6, 6, 6, ...
#> $ transmission <chr> "Manual", "Manual", "Automatic", "Automatic...
#> $ mpg <int> 27, 22, 29, 23, 20, 23, 18, 20, 29, 19, 18,...
#> $ aspiration <chr> "Turbocharged/Supercharged", "Naturally Asp...
#> $ lockup_torque_converter <chr> "Y", "N", "Y", "Y", "Y", "Y", "Y", "Y", "Y"...
#> $ drive <chr> "All Wheel Drive", "2-Wheel Drive, Rear", "...
#> $ max_ethanol <int> 15, 10, 10, 15, 15, 10, 10, 85, 10, 15, 10,...
#> $ recommended_fuel <chr> "Premium Unleaded Recommended", "Regular Un...
#> $ intake_valves_per_cyl <int> 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2...
#> $ exhaust_valves_per_cyl <int> 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2...
#> $ fuel_injection <chr> "Direct ignition", "Direct ignition", "Dire...
Let’s run the models
cars_1p_lm_bt <- train(log(mpg) ~ .,
method = "lm",
data = car_train_1p,
trControl = trainControl(method = "boot"))
cars_1p_lm_bt
#> Linear Regression
#>
#> 93 samples
#> 12 predictors
#>
#> No pre-processing
#> Resampling: Bootstrapped (25 reps)
#> Summary of sample sizes: 93, 93, 93, 93, 93, 93, ...
#> Resampling results:
#>
#> RMSE Rsquared MAE
#> 0.09194264 0.8308545 0.0718651
#>
#> Tuning parameter 'intercept' was held constant at a value of TRUE
cars_1p_rf_bt <- train(log(mpg) ~ .,
method = "rf",
data = car_train_1p,
trControl = trainControl(method = "boot"))
cars_1p_rf_bt
#> Random Forest
#>
#> 93 samples
#> 12 predictors
#>
#> No pre-processing
#> Resampling: Bootstrapped (25 reps)
#> Summary of sample sizes: 93, 93, 93, 93, 93, 93, ...
#> Resampling results across tuning parameters:
#>
#> mtry RMSE Rsquared MAE
#> 2 0.11276294 0.8143914 0.08652538
#> 9 0.09281693 0.8322639 0.07181900
#> 16 0.09575833 0.8150113 0.07260717
#>
#> RMSE was used to select the optimal model using the smallest value.
#> The final value used for the model was mtry = 9.
Let’s compare the training models with bootstrapping in the dataset
results_train_1p_bt <- car_train_1p %>%
mutate(mpg_log = log(mpg),
lreg = predict(cars_1p_lm_bt, car_train_1p),
rfor = predict(cars_1p_rf_bt, car_train_1p)) %>%
select(mpg, mpg_log, lreg, rfor, everything())
results_train_1p_bt
#> # A tibble: 93 x 16
#> mpg mpg_log lreg rfor displacement cylinders gears transmission
#> <int> <dbl> <dbl> <dbl> <dbl> <int> <int> <chr>
#> 1 27 3.30 3.19 3.23 2 4 7 Manual
#> 2 22 3.09 3.19 3.17 2.5 4 6 Manual
#> 3 29 3.37 3.34 3.34 2 4 8 Automatic
#> 4 23 3.14 3.13 3.13 2.4 4 6 Automatic
#> 5 20 3.00 3.13 3.12 2.7 4 6 Automatic
#> 6 23 3.14 3.14 3.16 3 6 8 Automatic
#> 7 18 2.89 2.88 2.89 6.4 8 8 Automatic
#> 8 20 3.00 3.00 2.98 3.3 6 6 Automatic
#> 9 29 3.37 3.22 3.36 2 4 6 Automatic
#> 10 19 2.94 2.99 2.95 3.5 6 10 Automatic
#> # ... with 83 more rows, and 8 more variables: aspiration <chr>,
#> # lockup_torque_converter <chr>, drive <chr>, max_ethanol <int>,
#> # recommended_fuel <chr>, intake_valves_per_cyl <int>,
#> # exhaust_valves_per_cyl <int>, fuel_injection <chr>
Let’s check how efficient are the models
yardstick::metrics(results_train_1p_bt, truth = mpg_log, estimate = lreg)
#> # A tibble: 3 x 3
#> .metric .estimator .estimate
#> <chr> <chr> <dbl>
#> 1 rmse standard 0.0657
#> 2 rsq standard 0.910
#> 3 mae standard 0.0518
yardstick::metrics(results_train_1p_bt, truth = mpg_log, estimate = rfor)
#> # A tibble: 3 x 3
#> .metric .estimator .estimate
#> <chr> <chr> <dbl>
#> 1 rmse standard 0.0432
#> 2 rsq standard 0.965
#> 3 mae standard 0.0343
For the testing model we will use a testing data set already prepared for by the course and loaded into the data folder. The models also were pre-built with the full data set as well. Thsi is just for the sake of convenience since the models may take a long time to run due to the bootstrapping.
I will load them now into the environment now.
The dataset
cars_test_bt <- readr::read_rds("data/c1_testing_full.rds")
cars_test_bt %>%
glimpse()
#> Observations: 228
#> Variables: 13
#> $ Displacement <dbl> 6.2, 3.9, 2.0, 3.0, 2.0, 3.0, 6.5, 5.2, 2...
#> $ Cylinders <int> 8, 8, 4, 6, 4, 6, 12, 10, 4, 8, 8, 8, 12,...
#> $ Gears <int> 7, 7, 8, 8, 8, 6, 7, 7, 6, 7, 7, 7, 7, 6,...
#> $ Transmission <chr> "Manual", "Manual", "Automatic", "Automat...
#> $ MPG <int> 18, 18, 26, 23, 26, 18, 12, 15, 29, 17, 1...
#> $ Aspiration <chr> "Turbocharged/Supercharged", "Turbocharge...
#> $ `Lockup Torque Converter` <chr> "N", "N", "Y", "Y", "Y", "N", "Y", "Y", "...
#> $ Drive <chr> "2-Wheel Drive, Rear", "2-Wheel Drive, Re...
#> $ `Max Ethanol` <int> 10, 10, 15, 15, 15, 15, 15, 15, 10, 10, 1...
#> $ `Recommended Fuel` <chr> "Premium Unleaded Required", "Premium Unl...
#> $ `Intake Valves Per Cyl` <int> 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,...
#> $ `Exhaust Valves Per Cyl` <int> 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2,...
#> $ `Fuel injection` <chr> "Direct ignition", "Direct ignition", "Di...
Now I wil load the pre-made models
cars_lm_bt <- readr::read_rds("data/cars_lm_bt.rds")
cars_rf_bt <- readr::read_rds("data/cars_rf_bt.rds")
Now let’s build the results table
results_test_bt <- cars_test_bt %>%
mutate(log_mpg = log(MPG),
lm_mpg = predict(cars_lm_bt, cars_test_bt),
rf_mpg = predict(cars_rf_bt, cars_test_bt)) %>%
select(MPG, log_mpg, lm_mpg, rf_mpg, everything())
results_test_bt %>%
glimpse()
#> Observations: 228
#> Variables: 16
#> $ MPG <int> 18, 18, 26, 23, 26, 18, 12, 15, 29, 17, 1...
#> $ log_mpg <dbl> 2.890372, 2.890372, 3.258097, 3.135494, 3...
#> $ lm_mpg <dbl> 2.790370, 2.999073, 3.223341, 3.087742, 3...
#> $ rf_mpg <dbl> 2.807829, 2.880009, 3.269779, 3.111423, 3...
#> $ Displacement <dbl> 6.2, 3.9, 2.0, 3.0, 2.0, 3.0, 6.5, 5.2, 2...
#> $ Cylinders <int> 8, 8, 4, 6, 4, 6, 12, 10, 4, 8, 8, 8, 12,...
#> $ Gears <int> 7, 7, 8, 8, 8, 6, 7, 7, 6, 7, 7, 7, 7, 6,...
#> $ Transmission <chr> "Manual", "Manual", "Automatic", "Automat...
#> $ Aspiration <chr> "Turbocharged/Supercharged", "Turbocharge...
#> $ `Lockup Torque Converter` <chr> "N", "N", "Y", "Y", "Y", "N", "Y", "Y", "...
#> $ Drive <chr> "2-Wheel Drive, Rear", "2-Wheel Drive, Re...
#> $ `Max Ethanol` <int> 10, 10, 15, 15, 15, 15, 15, 15, 10, 10, 1...
#> $ `Recommended Fuel` <chr> "Premium Unleaded Required", "Premium Unl...
#> $ `Intake Valves Per Cyl` <int> 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,...
#> $ `Exhaust Valves Per Cyl` <int> 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2,...
#> $ `Fuel injection` <chr> "Direct ignition", "Direct ignition", "Di...
Now we can compare the models
yardstick::metrics(results_test_bt, truth = "log_mpg", estimate = "lm_mpg")
#> # A tibble: 3 x 3
#> .metric .estimator .estimate
#> <chr> <chr> <dbl>
#> 1 rmse standard 0.0934
#> 2 rsq standard 0.844
#> 3 mae standard 0.0728
yardstick::metrics(results_test_bt, truth = "log_mpg", estimate = "rf_mpg")
#> # A tibble: 3 x 3
#> .metric .estimator .estimate
#> <chr> <chr> <dbl>
#> 1 rmse standard 0.0690
#> 2 rsq standard 0.916
#> 3 mae standard 0.0503
I want to build a tbl for me to compare each metric one by one.
I will add column to each metric indicating the name of the model
lm_metric <- results_test_bt %>%
metrics(truth = "log_mpg", estimate = "lm_mpg") %>%
mutate(model = "linear model") %>%
select(-.estimator)
lm_metric
#> # A tibble: 3 x 3
#> .metric .estimate model
#> <chr> <dbl> <chr>
#> 1 rmse 0.0934 linear model
#> 2 rsq 0.844 linear model
#> 3 mae 0.0728 linear model
rf_metric <- results_test_bt %>%
metrics(truth = "log_mpg", estimate = "rf_mpg") %>%
mutate(model = "Random Forest") %>%
select(-.estimator)
rf_metric
#> # A tibble: 3 x 3
#> .metric .estimate model
#> <chr> <dbl> <chr>
#> 1 rmse 0.0690 Random Forest
#> 2 rsq 0.916 Random Forest
#> 3 mae 0.0503 Random Forest
Now let’s combine them in one tbl
bt_metrics <- bind_rows(lm_metric, rf_metric) %>%
pivot_wider(names_from = .metric,
values_from = .estimate)
bt_metrics
#> # A tibble: 2 x 4
#> model rmse rsq mae
#> <chr> <dbl> <dbl> <dbl>
#> 1 linear model 0.0934 0.844 0.0728
#> 2 Random Forest 0.0690 0.916 0.0503
The idea is to compare the models also graphically. To see how the points lie next to the line of best fit.
results_test_bt %>%
tidyr::pivot_longer(
cols = lm_mpg:rf_mpg,
names_to = "method",
values_to = "result"
) %>%
ggplot(aes(log_mpg, result, color = method)) +
geom_point(size = 1.5, alpha = 0.5) +
facet_wrap(~method) +
geom_abline(lty = 2, color = "gray50") +
geom_smooth(method = "lm")
sessionInfo()
#> R version 3.6.1 (2019-07-05)
#> Platform: x86_64-w64-mingw32/x64 (64-bit)
#> Running under: Windows 10 x64 (build 18362)
#>
#> Matrix products: default
#>
#> locale:
#> [1] LC_COLLATE=Spanish_Spain.1252 LC_CTYPE=Spanish_Spain.1252
#> [3] LC_MONETARY=Spanish_Spain.1252 LC_NUMERIC=C
#> [5] LC_TIME=Spanish_Spain.1252
#>
#> attached base packages:
#> [1] stats graphics grDevices utils datasets methods base
#>
#> other attached packages:
#> [1] caret_6.0-86 lattice_0.20-40 pacman_0.5.1 yardstick_0.0.5
#> [5] workflows_0.1.0 tune_0.0.1 rsample_0.0.5 recipes_0.1.10
#> [9] parsnip_0.0.5 infer_0.5.1 dials_0.0.4 scales_1.1.0
#> [13] broom_0.5.4 tidymodels_0.1.0 forcats_0.4.0 stringr_1.4.0
#> [17] dplyr_0.8.4 purrr_0.3.3 readr_1.3.1 tidyr_1.0.2
#> [21] tibble_2.1.3 tidyverse_1.3.0 ggplot2_3.2.1 workflowr_1.6.1
#>
#> loaded via a namespace (and not attached):
#> [1] readxl_1.3.1 backports_1.1.5 tidytext_0.2.2
#> [4] plyr_1.8.5 igraph_<IP_ADDRESS> lazyeval_0.2.2
#> [7] splines_3.6.1 crosstalk_1.0.0 listenv_0.8.0
#> [10] SnowballC_0.6.0 rstantools_2.0.0 inline_0.3.15
#> [13] digest_0.6.24 foreach_1.4.8 htmltools_0.4.0
#> [16] rsconnect_0.8.16 fansi_0.4.0 magrittr_1.5
#> [19] globals_0.12.5 modelr_0.1.5 gower_0.2.1
#> [22] matrixStats_0.55.0 xts_0.12-0 prettyunits_1.1.1
#> [25] colorspace_1.4-1 rvest_0.3.5 haven_2.2.0
#> [28] xfun_0.12 callr_3.4.2 crayon_1.3.4
#> [31] jsonlite_1.6.1 lme4_1.1-21 survival_3.1-8
#> [34] zoo_1.8-7 iterators_1.0.12 glue_1.3.1
#> [37] gtable_0.3.0 ipred_0.9-9 pkgbuild_1.0.6
#> [40] rstan_2.19.3 DBI_1.1.0 miniUI_<IP_ADDRESS>
#> [43] Rcpp_1.0.4 xtable_1.8-4 GPfit_1.0-8
#> [46] StanHeaders_2.21.0-1 stats4_3.6.1 lava_1.6.6
#> [49] prodlim_2019.11.13 DT_0.12 htmlwidgets_1.5.1
#> [52] httr_1.4.1 threejs_0.3.3 farver_2.0.3
#> [55] loo_2.2.0 pkgconfig_2.0.3 nnet_7.3-12
#> [58] dbplyr_1.4.2 janitor_1.2.1 utf8_1.1.4
#> [61] labeling_0.3 tidyselect_1.0.0 rlang_0.4.4
#> [64] DiceDesign_1.8-1 reshape2_1.4.3 later_1.0.0
#> [67] munsell_0.5.0 cellranger_1.1.0 tools_3.6.1
#> [70] cli_2.0.1 generics_0.0.2 ggridges_0.5.2
#> [73] evaluate_0.14 fastmap_1.0.1 yaml_2.2.1
#> [76] ModelMetrics_<IP_ADDRESS> processx_3.4.2 knitr_1.28
#> [79] fs_1.3.2 randomForest_4.6-14 future_1.16.0
#> [82] nlme_3.1-144 whisker_0.4 mime_0.9
#> [85] rstanarm_2.19.3 xml2_1.2.2 tokenizers_0.2.1
#> [88] compiler_3.6.1 bayesplot_1.7.1 shinythemes_1.1.2
#> [91] rstudioapi_0.11 reprex_0.3.0 tidyposterior_0.0.2
#> [94] lhs_1.0.1 stringi_1.4.6 ps_1.3.2
#> [97] Matrix_1.2-18 nloptr_1.2.1 markdown_1.1
#> [100] shinyjs_1.1 vctrs_0.2.3 pillar_1.4.3
#> [103] lifecycle_0.1.0 furrr_0.1.0 data.table_1.12.8
#> [106] httpuv_1.5.2 R6_2.4.1 promises_1.1.0
#> [109] gridExtra_2.3 janeaustenr_0.1.5 codetools_0.2-16
#> [112] boot_1.3-24 colourpicker_1.0 MASS_7.3-51.5
#> [115] gtools_3.8.1 assertthat_0.2.1 rprojroot_1.3-2
#> [118] withr_2.1.2 shinystan_2.5.0 parallel_3.6.1
#> [121] hms_0.5.3 grid_3.6.1 rpart_4.1-15
#> [124] timeDate_3043.102 minqa_1.2.4 class_7.3-15
#> [127] snakecase_0.11.0 rmarkdown_2.1 git2r_0.26.1
#> [130] pROC_1.16.1 tidypredict_0.4.5 shiny_1.4.0
#> [133] lubridate_1.7.4 base64enc_0.1-3 dygraphs_<IP_ADDRESS>


Grattan, Veronica Helen
| Birth Name | Grattan, Veronica Helen |
| Gender | female |
| Age at Death | 79 years, 5 months, 29 days |
Narrative
SMH -- IRISH, Veronica Helen -- 29 July, 1965, at hospital, Katoomba, late of 35 Neilson St, Granville, dearly loved wife of the late James Frederick Irish, loved mother of Veronica (dec), Allan, Coral, Dorothy & Norman, loving grandmother of their children. At rest. Aged 79 years.
FUNERAL -- The rels & friends of the late VERONICA HELEN IRISH, of 35 Neilson St, Granville, are invited to attend her Funeral, to leave our Chapel at Granville, This Friday, after a service at 2.30pm for the Church of England Cemetery, Rookwood.
Events
| Event | Date | Place | Description | Sources |
|---|---|---|---|---|
| Birth | 1886-01-30 | Paddington NSW #9568 | ||
|
|
||||
| Death | 1965-07-28 | Katoomba NSW #31192 | ||
|
|
||||
| Burial | 1965-07-30 | Church of England Cemetery, Rookwood | ||
|
|
Parents
| Relation to main person | Name | Birth date | Death date | Relation within this family (if not by birth) |
|---|---|---|---|---|
| Father | Gratton, Oriel L. | |||
| Mother | Bridges, Amelia Helen | |||
| Grattan, Veronica Helen | 1886-01-30 | 1965-07-28 | ||
| Brother | Gratton, Oriel | 1888 |
Families
Family of Irish, James Frederick and Grattan, Veronica Helen |
|||||||||||||||||||||||
| Married | Husband | Irish, James Frederick ( * 1881-11-05 + 1921-01-07 ) | |||||||||||||||||||||
|
|||||||||||||||||||||||
| Children |
| Name | Birth Date | Death Date |
|---|---|---|
| Irish, Veronica Helen | 1909-08-28 | 1942-02-18 |
| Irish, Allan James | 1913-03-18 | 2006-04-28 |
| Irish, Gwenneth Olive | 1915-01-09 | 1915-01-23 |
| Irish, Coral Grattan | 1916-01-06 | 2001-07-20 |
| Irish, Dorothy Gwendolyn | 1918-05-05 | 1991-12-05 |
| Irish, Norman Frederick | 1921-04-06 | 2004-09-08 |
| Type | Value | Notes | Sources |
|---|---|---|---|
| _UID | 4B098F9C582DD6119853F3B3BADA3A6EB887 |
Attributes
| Type | Value | Notes | Sources |
|---|---|---|---|
| _UID | 4A098F9C582DD6119853F3B3BADA3A6EB777 |


- You have unlimited time to work on puzzles
- You are not penalized for number of attempts
- You are not penalized for using hints (but kudos to you if you can solve all the puzzles without using any hints!)
- You are not penalized for trying all kinds of random things to try to figure out the solution, so be creative!
- You could cheat by looking at the code of the web page
- Please don't do that.
If you have any questions, feel free to
contact me!


BREAKING Jorge Masvidal wins BMF belt after Nate Diaz fight is stopped due to cut
Diaz and Masvidal met in the main event of UFC 244 at Madison Square in New York
by Martin Domin, https://www.facebook.com/mirrorfightingJorge Masvidal was crowned the Baddest Motherf***** in the UFC when his fight with Nate Diaz was stopped after the third round.
The cageside doctor ruled Diaz could not continue having suffered a bad cut over his eye in the opening minutes of the fight.
Both fighters were disappointed with the outcome and Masvidal - who won by TKO - promised Diaz an immediate rematch.
Masvidal began the fight by faking the same flying knee that knocked of Ben Askren in his last fight.
Diaz responded by rushing the Miami man but it was he who was hurt first as an elbow opened up a huge gash over his eye.
Diaz was then dropped but a wary Masvidal kept calm as he picked his shots before eventually allowing his opponent to his feet.
It was the No.3 ranked welterweight who ended the round on top as Diaz received treatment on his cut between rounds.
And Masvidal began the second session in the ascendancy as he looked to bring an early finish to the fight.
He landed successive right hands and then began to target the body as right kick forced Diaz to momentarily drop to the canvas.
Masvidal was proving himself yet again following his wins over Askren and Darren Till but Diaz hung in there in the third round, his best session of the fight thus far.
But Masvidal was able to return fire with fire and ended the stanza on top raining down punches.
Between rounds Diaz insisted he was fine to continue but the doctor ruled the fight could not continue.


Rangy Save / Restore Selection Module Demo
Please use your mouse and/or keyboard to make selections from the sample content below and use the buttons on the left hand size to save and restore the selection.
Association football is a sport played between two teams. It is usually called football, but in some countries, such as the United States, it is called soccer. In Japan, New Zealand, South Africa, Australia, Canada and Republic of Ireland, both words are commonly used.
Each team has 11 players on the field. One of these players is the goalkeeper, and the other ten are known as "outfield players." The game is played by kicking a ball into the opponent's goal. A match has 90 minutes of play, with a break of 15 minutes in the middle. The break in the middle is called half-time.
Competitions (this section is editable)
There are many competitions for football, for both football clubs and countries. Football clubs usually play other teams in their own country, with a few exceptions. Cardiff City F.C. from Wales for example, play in the English leagues and in the English FA Cup.
Who plays football (this section is editable and in pre-formatted text)
Football is the world's most popular sport. It is played in more countries than any other game. In fact, FIFA (the Federation Internationale de Football Association) has more members than the United Nations. It is played by both males and females.


Type of Work
- OurHouse - Client / Server
Mobile app to help coordinate social events, household chores, and payments among your fellow housemates. Built with a decoupled architecture using Angular and Ionic on the front end, Rails API on the back end. Leveraged Auth0 with Google+ and Venmo for decoupled OAuth, and Venmo API for payment feature.
- ck Album
Photo gallery built with Ruby on Rails. By logging in, admin is able to upload, create, update and delete albums and pictures within.
- ck Payment
Property management invoice web application. Users are able to create new invoices for their tenants and email them the pdf as an attachment
- League of Legends
Utililizing riot game’s league of legend API, created a personal rating checker to see how my teammates and friends play. It was built with ruby on sinatra using d3.js for data visualization.
- Survey Monkey Clone
Built a Survey Monkey clone with user registration, login/logout feature using Ruby with Sinatra, Ajax, Bootstrap, ActiveRecord, HTML5, CSS
- Twitter Clone
Developed a twitter clone using Ruby with Sinatra and Bootstrap. Utilized ActiveRecord for followers/followings association and database schema. Users can tweet, and see the tweets of who they are following.


@(message: String, style: String = "scala")
@defining(play.core.PlayVersion.current) { version =>
Build your quiry using the query blocks below.
Generated SPARQL query
SELECT ?
WHERE {
FILTER ()
TRANSFORM ( )
}
Currently not possible to:
- Edit the query, refresh to create anew.
- Declare star type (coming soon), add manually.
- Use literal objectsn use FILTER instead.


TrippleD
${name}
${name}
${age}
Kanye West
39
Remove
Rick Ashley
40
Name
My First Project
Test
My First Project
|
Jada
Coffee
I like my coffee hot!


int mb_eregi ( string $pattern , string $string [, array $regs ] )
Regular expression match ignoring case with multibyte support
Executes the regular expression match with multibyte support, and returns 1 if matches are found. If the optional regs parameter was specified, the function returns the byte length of matched part, and the array regs will contain the substring of matched string. The function returns 1 if it matches with the empty string. If no matches are found or an error happens, FALSE will be returned.


Body: detection & analysis results
optional processed canvas that can be used to draw input on screen
Face: detection & analysis results
Gesture: detection & analysis results
Hand: detection & analysis results
{@link Object}: detection & analysis results
global performance object with timing values for each operation
getter property that returns unified persons object
timestamp of detection representing the milliseconds elapsed since the UNIX epoch
Result interface definition for Human library
Contains all possible detection results


LEGEND
Tumours
Metastatic lymph nodes
Tumour of any size has spread to the chest wall, near the heart, diaphragm or other nearby organs, and has spread to nearby lymph nodes OR Tumour smaller than 5 cm has spread to lymph nodes AND
There may be one or more other tumours in the same lung.