#include <dr_tools.h>
Data Fields | |
| int | version |
| bool | x64 |
| int | linkcount_size |
Binary trace dump format: the file starts with a tracedump_file_header_t then, for each trace: struct _tracedump_trace_header if num_bbs > 0 # tracedump_origins foreach bb: app_pc tag; int bb_code_size; byte code[bb_code_size]; endif foreach exit: struct _tracedump_stub_data if linkcount_size > 0 linkcount_type_t count; # sizeof == linkcount_size endif if separate from body (i.e., exit_stub < cache_start_pc || exit_stub >= cache_start_pc+code_size): byte stub_code[15]; # all separate stubs are 15 endif endfor byte code[code_size]; if the -tracedump_threshold option (deprecated) was specified: int num_below_treshold linkcount_type_t count_below_threshold endif
Size of the linkcount (linkcounts are deprecated).
The DynamoRIO version that created the file.
Whether a 64-bit DynamoRIO library created the file.


CONTROL QUESTIONS
{{ ", ".join(form.proposer.errors)}}
{{form.proposer.label}}
{{form.proposer}}
{{ ", ".join(form.responder.errors)}}
{{form.responder.label}}
{{form.responder}}
{{ ", ".join(form.proposer_responder.errors)}}
{{form.proposer_responder.label}}
{{form.proposer_responder}}
{{ ", ".join(form.money_division.errors)}}
{{form.money_division.label}}
{{form.money_division}}
Follow the link to begin the task, complete it and then enter the completion code below. If you do not see the link it is because you have answered incorrectly to one or more of the CONTROL questions above. Please read the instructions once again to understand the task adequately. Thanks for your effort!
{{ ", ".join(form.code_resp_prop.errors)}}
{{form.code_resp_prop.label}}
{{(form.code_resp_prop) }}
{{ ", ".join(form.test.errors)}}
{{form.test.label}}
{{form.test}}
{{form.feedback.label}}
{{form.feedback(rows='3', cols='100')}}


Below is some editable content:
The cabbage is a popular cultivar of a the species Brassica oleracea Linne (Capitata Group) of the Family Brassicaceae (or Cruciferae), and is used as a leafy green vegetable. It is a herbaceous, biennial, dicotyledonous flowering plant distinguished by a short stem upon which is crowded a mass of leaves, usually green but in some varieties red or purplish, which while immature form a characteristic compact, globular cluster (cabbagehead). This is some area to type.
Select something in the editable area above. Click on the "Save selection" button. Now click somewhere on the page to destroy the selection, and then press "Restore selection".


Plugin Information |
|---|
View Sauce OnDemand on the plugin site for more information. |
This plugin allows you to integrate Sauce Selenium Testing with Jenkins. Specifically, you can:
- Automate the setup and tear down of Sauce Connect
- Integrate the Sauce Labs result videos per test
Configuration
After installing a plugin, specify your Sauce Labs access credentials in the system configuration page as follows:
Once this is set, on each job configuration page, you can tell Jenkins to launch a Sauce Connect instance for the duration of the build. For more details about the concept of SSH tunnel in the context of Sauce Labs, see the documentation.
Embedded Test Reports
You can show an embedded Sauce Labs test report on the test result pages in Jenkins. To enable this, check 'Embed Sauce OnDemand reports' as part of the 'Publish JUnit test result report section'.
In addition, you will need to output the following line to your for each test that is run using Sauce Labs:
SauceOnDemandSessionID=YOUR_SESSION_ID job-name=YOUR_JOB_NAME
where YOUR_SESSION_ID is the SeleniumRC/WebDriver session id and YOUR_JOB_NAME is the name of the test being executed.
Issue Tracking
Please raise any issues you find with the plugin or requests for additional features within the plugin's Jira instance.
Changelog
See https://github.com/saucelabs/jenkins-sauce-ondemand-plugin/blob/master/CHANGELOG.md
Attachments:
jobconfig.png (image/png)
embedded-report-configuration.png (image/png)
sauceondemand-passed-test.png (image/png)
sauce-job-settings.png (image/png)


AWS Billing and Cost Management Budget TimePeriod
The TimePeriod
property type specifies the period of time covered by a Billing and Cost Management
budget.
TimePeriod
is a property of the AWS Billing and Cost Management Budget BudgetData property type.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
Properties
Start
-
The start date for a budget. If you create your budget and don't specify a start date, AWS defaults to the start of your chosen time period (i.e. DAILY, MONTHLY, QUARTERLY, ANNUALLY). For example, if you create your budget on January 24th 2018, choose
DAILY
, and don't set a start date, AWS sets your start date to01/24/18 00:00 UTC
. If you chooseMONTHLY
, AWS sets your start date to01/01/18 00:00 UTC
. The defaults are the same for the AWS Billing and Cost Management console and the API.You can change your start date with the
UpdateBudget
API operation.Required: No
Type: String
Update requires: No interruption
End
-
The end date for a budget. If you don't specify an end date, AWS sets your end date to
06/15/2087 00:00 UTC
. The defaults are the same for the AWS Billing and Cost Management console and the API.After the end date, AWS deletes the budget and all associated notifications and subscribers.
Required: No
Type: String
Update requires: No interruption


Waunakee police respond to crash between pedestrian, vehicle, dispatch says
by Stephanie FryerWAUNAKEE, Wis. - A 16-year-old Waunakee High School student is recovering from injuries after he was hit by a car Thursday morning, police said.
The crash happened around 8 a.m. at the South Century Avenue and 8th Street intersection, according to Dane County dispatchers.
Officials with the Waunakee Police Department say the teenager was crossing in a crosswalk when he was hit. A school crossing guard was present at the time.
The teen was taken to a local hospital with non life-threatening injuries.
The Waunakee Police Department is leading the investigation. Officials say the driver is cooperating, and that drugs or alcohol are not believed to be involved.


Gary Lineker sends message to Tottenham after Mauricio Pochettino sacking
Spurs legend Gary Lineker has his say on Tottenham's decision to sack Mauricio Pochettino this week
by The Sport Review staffGary Lineker has taken to social media to reveal his surprise that Tottenham Hotspur opted to sack Mauricio Pochettino this week – before replacing him with Jose Mourinho.
The north London side decided to make a change eight days into the international break after Spurs drew 1-1 with Sheffield United at the Tottenham Hotspur Stadium last time out.
Mourinho was officially confirmed as Spurs’ new manager on Wednesday morning soon after the Lilywhites announced the departure of Pochettino on Tuesday night.
The Lilywhites have made a poor start to the Premier League season as key players such as Harry Kane, Christian Eriksen, Dele Alli and Hugo Lloris struggle to find form.
Tottenham are in 14th position in the Premier League table and 11 points behind defending champions Manchester City, who occupy the final Champions League qualification spot.
Spurs reached their first-ever Champions League final last season before the north London outfit suffered a 2-0 loss to domestic rivals Liverpool FC in the final.
Pochettino steered Tottenham to a top-four finish in their last four seasons under the former Southampton boss.
Tweeting before Mourinho’s appointment on Wednesday morning, former Spurs striker Lineker had his say on the north London club’s decision to sack Pochettino.
Lineker wrote on Twitter: “Mauricio Pochettino has been sacked by
@SpursOfficial. He helped the club to punch massively above their weight for years. Good luck with finding a better replacement….ain’t gonna happen.”
Tottenham have never won the Premier League title despite challenging for the top-flight crown twice under Pochettino.
Spurs will return to Premier League action with a trip to bitter London rivals West Ham United at the London Stadium on Saturday.


{% load static %}
Name: {{ course.name }} Description: {{ course.description.description }}
No | Yes! I want to delete this


U2 debut new track ‘Ahimsa’ with AR Rahman ahead of first show in India
"This is an invitation to a high location..."
U2 have teamed up with AR Rahman on new track ‘Ahimsa’, ahead of playing their first ever show in India.
The track is the first new offering from the Irish rock icons since 2017’s ‘Songs of Innocence’ and it sees the band heading in an increasingly spiritual direction.
“This is an invitation/to a high location/For someone who wants to belong,” Bono sings on the track.
In an interview with Rolling Stone, Jai Ho composer Rahman explained that the track was all about the eponymous concept of non-violence.
“The concept of ‘ahimsa’ or non-violence — it’s Indian, it’s South Asian, it’s Buddhist… and sometimes we have to remind people about love, about ahimsa,” he said.
“It takes a lot of courage to be non-violent. It takes a lot of power. It’s not a weakness, it’s more power than showing might; it’s going beyond that, believing in something else which is not present… something that’s only in your spirit.”
It comes as U2 continue their New Zealand ‘Joshua Tree’ tour – which sees the band performing their seminal 1987 album in full.
In July, U2 fans also unearthed what is believed to be the oldest recording from one of the band’s earliest live shows.


The domain is use to host Hyerty Catalog
You need enter domain url
Discover a sample of one use rethink
Go tryReady to start your next project with us? That's great! Give us a call or send us an email and we will get back to you as soon as possible!
+351 21 4225700


Fill in all missing case labels on a switch statement with an enumerated type as its switch expression.


Preparation time
overnight
Cooking time
over 2 hours
Serves
Serves 4
Preheat oven to 140C/285F/Gas 1.
Place the flour and meat in a polythene bag and shake to coat the meat.
Heat half the butter in a deep casserole and fry the meat until golden and crusty all over. Remove the meat and set aside.
Add the remaining butter to the same pan and fry the bacon until crispy. Add the onions, thyme and bay leaves and cook until the onion has softened. Add any remaining flour and stir to combine.
Pour in the Guinness and stir vigorously.
Return the beef to the pan; stir to combine, add remaining ingredients and bring to the boil.
Cover the casserole with a lid and place in the oven.
Cook for at least four hours (or preferably overnight) until the meat is very tender.
For the suet dumplings, combine the first five ingredients, mixing well. Work to a paste with cold beef stock, adding just enough to bind all the ingredients. Season to taste.
Heat the remaining beef stock in a saucepan and bring to the boil. Shape the paste into 2cm/¾in dumplings and drop them into boiling beef stock. Cook until light and puffed up. This should take about 30 minutes.
Remove from the stock and add to your beef casserole.
For the mashed potato, simmer the potatoes in salted water for 12-15 minutes. Drain, then put the colander over the pan on a low heat for two minutes to dry the potatoes.
Return the potatoes to the saucepan with a pinch of salt and ground white pepper and mash until smooth.
Fold in the butter and warm milk and beat until combined. Check seasoning.
Serve the beef and dumplings with a dollop of mashed potato.


RT @kittylyst: And here's the official blog post: http://bit.ly/2IM3eUw
3/13/2020, 2:26:12 PM
Favs: 0
Retweets: 0
link--- layout: tweet ---
RT @kittylyst: And here's the official blog post: http://bit.ly/2IM3eUw
3/13/2020, 2:26:12 PM
Favs: 0
Retweets: 0
link


Connect your wallet to get an overview of your assets, collectibles and transactions.
No Asset or Transactions
No Collectibles


Fall Japanese Curry
October 12, 2019
It’s finally fall break! With classes and most of my responsibilities on a halt, this break has been nothing short of relaxation aka cooking & baking all the things I know have time to cook & bake.
Recently, I asked everyone what they wanted to see more of on Brad & Butter and one of the responses was more lifestyle content as well as my everyday eats & drinks. I loved the idea of sharing recipes that might be more accessible to everyone in terms of ingredients, complexity, and seasonality. Thus, this fall-inspired curry was born.
Growing up, my grandmother used to make this delicious curry soup that I would indulge in week after week. The secret ingredient to her recipe was the one and only japanese golden curry roux cubes. You can find these pre-made curry roux blocks in any asian grocery and they are packed with flavor. Of course, you can make your own with just butter, flour, curry powder, garam masala, and cayenne, but as a student I often don’t have the time to start from scratch. If you’re in a pinch for time, the pre-made stuff is more than magical.
Japanese curry tends to be slightly sweeter than traditional southeast asian curries, which is why I have a soft spot for the variety. And if you haven’t noticed already, I’m a bit of a health geek — hence the butternut squash in place of potatoes in this dish. Sure, potatoes are awesome, but the butternut squash adds a natural sweetness along with the pears and honey that really complement the mild spice of the curry. I chose pork shoulder as the protein for my curry because pork is probably my favorite cut of meat. It’s relatively inexpensive, packed with flavor, and super easy to cook with. Feel free to substitute with any other cut of meat, but pork is prince. I would also highly suggest throwing some bones in the curry as it simmers so you can max out on depth of flavor, because nobody can say no to rich bone broth.
Happy cooking and let me know what you think in the comments below!
Recipe
Ingredients (serves 5-6)
- 1.5 lb bone-in pork shoulder (cut into chunks)
- 2 cloves garlic (minced)
- 1 tbsp. fresh ginger (minced)
- 1 onion (cut into chunks)
- 2 carrots (cut into chunks)
- 1 butternut squash (cubed)
- 1 bartlett pear (cubed)
- 110g golden curry medium hot curry roux
- 1 litre beef stock
- 2 tsp. szechuan peppercorns
- 1 tbsp. honey
- 1/4 cup soy milk
- salt (to taste)
How to make
- Heat 1 tbsp. of oil in a large saucepot over medium-high heat. Brown the cubed pork shoulder pieces for approxiamtely 5 minutes on each side, including the bone if using.Remove from the saucepot, reserving any fat and liquid that rendered out from the pork.
- Add the minced garlic and ginger to the sauce pot and season with a pinch of salt. Cook until slightly softened and fragrant. Add the butternut squash, onion, carrot, and another pinch of salt. Cook for approxaimtely 5-7 minutes or until vegetables are slightly softened.
- Place all the browned pork, including the bone if using back into the saucepot along with the beef stock and szechuan peppercorns. Bring to a simmer and add the curry roux and cubed pears, and honey. Reduce the heat to low and simmer for 35-45 minutes uncovered or until desired consistency is reached.
- Stir in soy milk until fully incorporated and season with salt to taste. Serve with steamed rice, japanese pickled ginger, and chopped scallions if desired.
- Enjoy!
Meet the brad behind the butter...
Hello and welcome to you new home!  Here on Brad & Butter, I bake, shake, style, and snap tot tell inspiring stories. This blog is a manifestation of all the things in life at have inspired me to act upon something. And in turn, I hope that whatever I wrtie, bake, or shake can inspire other people. Click here to learn about me...
Read More
leave a reply


When designing a machine to perform a computation, we would often prefer to arrange for components to be shared by different parts of the computation rather than duplicate the components. Consider a machine that includes two GCD computations—one that finds the GCD of the contents of registers a and b and one that finds the GCD of the contents of registers c and d. We might start by assuming we have a primitive gcd operation, then expand the two instances of gcd in terms of more primitive operations. Figure \ref{fig:gcd-machine-1} shows just the GCD portions of the resulting machine's data paths, without showing how they connect to the rest of the machine. The figure also shows the corresponding portions of the machine's controller sequence. \begin{figure}[H] \centering
list(..., "gcd-1", test(list(op("="), reg("b"), constant(0))), branch(label("after-gcd-1")), assign("t", list(op("rem"), reg("a"), reg("b"))), assign("a", reg("b")), assign("b", reg("t")), go_to(label("gcd-1")), "after-gcd-1", ... "gcd-2", test(list(op("="), reg("d"), constant(0))), branch(label("after-gcd-2")), assign("s", list(op("rem"), reg("c"), reg("d"))), assign("c", reg("d")), assign("d", reg("s")), go_to(label("gcd-2")), "after-gcd-2", ...\caption{Portions of the data paths and controller sequence for a machine with two GCD computations.} \label{fig:gcd-machine-1} \end{figure}
This machine has two remainder operation boxes and two boxes for testing equality. If the duplicated components are complicated, as is the remainder box, this will not be an economical way to build the machine. We can avoid duplicating the data-path components by using the same components for both GCD computations, provided that doing so will not affect the rest of the larger machine's computation. If the values in registers a and b are not needed by the time the controller gets to gcd-2 (or if these values can be moved to other registers for safekeeping), we can change the machine so that it uses registers a and b, rather than registers c and d, in computing the second GCD as well as the first. If we do this, we obtain the controller sequence shown in figure \ref{fig:gcd-machine-2}.
We have removed the duplicate data-path components (so that the data paths are again as in figure \ref{fig:gcd-machine}), but the controller now has two GCD sequences that differ only in their entry-point labels. It would be better to replace these two sequences by branches to a single sequence—a gcd subroutine—at the end of which we branch back to the correct place in the main instruction sequence. We can accomplish this as follows: Before branching to gcd, we place a distinguishing value (such as 0 or 1) into a special register, continue. At the end of the gcd subroutine we return either to after-gcd-1 or to after-gcd-2, depending on the value of the continue register. Figure \ref{fig:gcd-machine-2cont} shows the relevant portion of the resulting controller sequence, which includes only a single copy of the gcd instructions. \begin{figure}[H] \centering
list(..., "gcd-1", test(list(op("="), reg("b"), constant(0))), branch(label("after-gcd-1")), assign("t", list(op("rem"), reg("a"), reg("b"))), assign("a", reg("b")), assign("b", reg("t")), go_to(label("gcd-1")), "after-gcd-1", ... "gcd-2", test(list(op("="), reg("b"), constant(0))), branch(label("after-gcd-2")), assign("t", list(op("rem"), reg("a"), reg("b"))), assign("a", reg("b")), assign("b", reg("t")), go_to(label("gcd-2")), "after-gcd-2", ...\caption{Portions of the controller sequence for a machine that uses the same data-path components for two different GCD computations.} \label{fig:gcd-machine-2} \end{figure} \begin{figure}[H] \centering
list(..., "gcd", test(list(op("="), reg("b"), constant(0))), branch(label("gcd-done")), assign("t", list(op("rem"), reg("a"), reg("b"))), assign("a", reg("b")), assign("b", reg("t")), go_to(label("gcd")), "gcd-done", test(list(op("="), reg("continue"), constant(0))), branch(label("after-gcd-1")), go_to(label("after-gcd-2")), ... // Before branching to "gcd" from the first place where // it is needed, we place 0 in the "continue" register assign("continue", constant(0)), go_to(label("gcd")), "after-gcd-1", ... // Before the second use of "gcd", we place 1 in the // "continue" register assign("continue", const(1)), go_to(label("gcd")), "after-gcd-2", ...)\caption{Using a continue register to avoid the duplicate controller sequence in figure \ref{fig:gcd-machine-2}.} \label{fig:gcd-machine-2cont} \end{figure} \begin{figure}[H] \centering
list(..., "gcd", test(list(op("="), reg("b"), constant(0))), branch(label("gcd-done")), assign("t", list(op("rem"), reg("a"), reg("b"))), assign("a", reg("b")), assign("b", reg("t")), go_to(label("gcd")), "gcd-done", go_to(reg("continue")), ... // Before calling "gcd", we assign to "continue" // the label to which "gcd" should return. assign("continue", label("after-gcd-1"))), go_to(label("gcd")), "after-gcd-1", ... // Here is the second call to "gcd", with a different continuation. assign("continue", label("after-gcd-2")), go_to(label("gcd")), "after-gcd-2", ...)\caption{Assigning labels to the continue register simplifies and generalizes the strategy shown in figure \ref{fig:gcd-machine-2cont}.} \label{fig:gcd-mach-2labels} \end{figure}
This is a reasonable approach for handling small problems, but it would be awkward if there were many instances of GCD computations in the controller sequence. To decide where to continue executing after the gcd subroutine, we would need tests in the data paths and branch instructions in the controller for all the places that use gcd. A more powerful method for implementing subroutines is to have the continue register hold the label of the entry point in the controller sequence at which execution should continue when the subroutine is finished. Implementing this strategy requires a new kind of connection between the data paths and the controller of a register machine: There must be a way to assign to a register a label in the controller sequence in such a way that this value can be fetched from the register and used to continue execution at the designated entry point.
To reflect this ability, we will extend the assign instruction of the register-machine language to allow a register to be assigned as value a label from the controller sequence (as a special kind of constant). We will also extend the go_to instruction to allow execution to continue at the entry point described by the contents of a register rather than only at an entry point described by a constant label. Using these new constructs we can terminate the gcd subroutine with a branch to the location stored in the continue register. This leads to the controller sequence shown in figure \ref{fig:gcd-mach-2labels}.
A machine with more than one subroutine could use multiple continuation registers (e.g., gcd-continue, factorial-continue) or we could have all subroutines share a single continue register. Sharing is more economical, but we must be careful if we have a subroutine (sub1) that calls another subroutine (sub2). Unless sub1 saves the contents of continue in some other register before setting up continue for the call to sub2, sub1 will not know where to go when it is finished. The mechanism developed in the next section to handle recursion also provides a better solution to this problem of nested subroutine calls.


What Are You Playing This Weekend?
by Riley MacLeodThe weekend is for baking a cake. I think I could stand to eat a whole cake.
I haven’t got very far in The Outer Worlds, so I’d like to spend more time with that.
What about you? What are you playing?


Backend Service
List of all available properties for a 'Backend Service'
manifest.
# Your service name will be used in naming your resources like log groups, ECS services, etc.
name: api
# Your service is reachable at "http://{{.Name}}.${COPILOT_SERVICE_DISCOVERY_ENDPOINT}:{{.Image.Port}}" but is not public.
type: Backend App
image:
# Path to your service's Dockerfile.
build: ./api/Dockerfile
# Or instead of building, you can specify an existing image name.
location: aws_account_id.dkr.ecr.region.amazonaws.com/my-svc:tag
# Optional. Port exposed through your container to route traffic to it.
port: 8080
#Optional. Configuration for your container healthcheck.
healthcheck:
# The command the container runs to determine if it's healthy.
command: ["CMD-SHELL", "curl -f http://localhost:8080 || exit 1"]
interval: 10s # Time period between healthchecks. Default is 10s if omitted.
retries: 2 # Number of times to retry before container is deemed unhealthy. Default is 2 if omitted.
timeout: 5s # How long to wait before considering the healthcheck failed. Default is 5s if omitted.
start_period: 0s # Grace period within which to provide containers time to bootstrap before failed health checks count towards the maximum number of retries. Default is 0s if omitted.
# Number of CPU units for the task.
cpu: 256
# Amount of memory in MiB used by the task.
memory: 512
# Number of tasks that should be running in your service.
count: 1
variables: # Optional. Pass environment variables as key value pairs.
LOG_LEVEL: info
secrets: # Optional. Pass secrets from AWS Systems Manager (SSM) Parameter Store.
GITHUB_TOKEN: GITHUB_TOKEN # The key is the name of the environment variable, the value is the name of the SSM parameter.
# Optional. You can override any of the values defined above by environment.
environments:
prod:
count: 2 # Number of tasks to run for the "prod" environment.
name
String
The name of your service.
type
String
The architecture type for your service. Backend Services are not reachable from the internet, but can be reached with service discovery from your other services.
image
Map
The image section contains parameters relating to the Docker build configuration and exposed port.
image.build
String or Map
If you specify a string, Copilot interprets it as the path to your Dockerfile. It will assume that the dirname of the string you specify should be the build context. The manifest:
image:
build: path/to/dockerfile
$ docker build --file path/to/dockerfile path/to
You can also specify build as a map:
image:
build:
dockerfile: path/to/dockerfile
context: context/dir
target: build-stage
cache_from:
- image:tag
args:
key: value
$ docker build --file path/to/dockerfile --target build-stage --cache-from image:tag --build-arg key=value context/dir
.
You can omit fields and Copilot will do its best to understand what you mean. For example, if you specify context
but not dockerfile
, Copilot will run Docker in the context directory and assume that your Dockerfile is named "Dockerfile." If you specify dockerfile
but no context
, Copilot assumes you want to run Docker in the directory that contains dockerfile
.
All paths are relative to your workspace root.
image.location
String
Instead of building a container from a Dockerfile, you can specify an existing image name. Mutually exclusive with image.build
.
The location
field follows the same definition as the image
parameter in the Amazon ECS task definition.
image.port
Integer
The port exposed in your Dockerfile. Copilot should parse this value for you from your EXPOSE
instruction.
If you don't need your Backend Service to accept requests from other services, you can omit this field.
image.healthcheck
Map
Optional configuration for container health checks.
image.healthcheck.command
Array of Strings
The command to run to determine if the container is healthy.
The string array can start with CMD
to execute the command arguments directly, or CMD-SHELL
to run the command with the container's default shell.
image.healthcheck.interval
Duration
Time period between health checks, in seconds. Default is 10s.
image.healthcheck.retries
Integer
Number of times to retry before container is deemed unhealthy. Default is 2.
image.healthcheck.timeout
Duration
How long to wait before considering the health check failed, in seconds. Default is 5s.
image.healthcheck.start_period
Duration
Grace period within which to provide containers time to bootstrap before failed health checks count towards the maximum number of retries. Default is 0s.
cpu
Integer
Number of CPU units for the task. See the Amazon ECS docs for valid CPU values.
memory
Integer
Amount of memory in MiB used by the task. See the Amazon ECS docs for valid memory values.
count
Integer or Map
If you specify a number:
count: 5
Alternatively, you can specify a map for setting up autoscaling:
count:
range: 1-10
cpu_percentage: 70
memory_percentage: 80
count.range
String
Specify a minimum and maximum bound for the number of tasks your service should maintain.
count.cpu_percentage
Integer
Scale up or down based on the average CPU your service should maintain.
count.memory_percentage
Integer
Scale up or down based on the average memory your service should maintain.
variables
Map
Key-value pairs that represent environment variables that will be passed to your service. Copilot will include a number of environment variables by default for you.
secrets
Map
Key-value pairs that represent secret values from AWS Systems Manager Parameter Store that will be securely passed to your service as environment variables.
environments
Map
The environment section lets you override any value in your manifest based on the environment you're in. In the example manifest above, we're overriding the count parameter so that we can run 2 copies of our service in our prod environment.


| Type | Key | Summary | Fix Version |
|---|---|---|---|
| Bug | SLING-7581 | Using data-sly-use with two classes with same name will generate uncompilable code | Scripting HTL Java Compiler 1.0.26-1.4.0, HTL Maven Plugin 1.1.8-1.4.0 |
| New Feature | SLING-7681 | HTL 1.4 support | Scripting HTL Engine 1.0.54-1.4.0, Scripting HTL Testing 1.0.10-1.4.0, Scripting HTL Testing Content 1.0.10-1.4.0, HTL Maven Plugin 1.1.6-1.4.0, Scripting HTL Compiler 1.0.22-1.4.0, Scripting HTL Java Compiler 1.0.24-1.4.0 |
| Sub-task | SLING-7745 | [HTL] Update the htl-maven-plugin | HTL Maven Plugin 1.1.6-1.4.0 |
| Improvement | SLING-7406 | Provide HTL specification version info in artifact names | Scripting HTL Java Compiler 1.0.22-1.3.1, HTL Maven Plugin 1.1.4-1.3.1, Scripting HTL Compiler 1.0.20-1.3.1, Scripting HTL Engine 1.0.48-1.3.1, Scripting HTL Testing 1.0.6-1.3.1, Scripting HTL Testing Content 1.0.8-1.3.1 |
| Bug | SLING-7287 | htl-maven-plugin:validate fails with windows path names | HTL Maven Plugin 1.1.2 |
| Improvement | SLING-7155 | htl-maven-plugin: Add option to precompile the HTL scripts | HTL Maven Plugin 1.1.0 |
| Improvement | SLING-6651 | Improve documentation for htl-maven-plugin | HTL Maven Plugin 1.0.8 |
| Improvement | SLING-7026 | htl-maven-plugin: Namespace all user properties | HTL Maven Plugin 1.0.8 |
| Bug | SLING-7025 | htl-maven-plugin: Correctly state default values for include parameter | HTL Maven Plugin 1.0.8 |
| Bug | SLING-6445 | HTL scripts do not compile on Windows if the compiler needs to generate any warnings | Scripting HTL Compiler 1.0.6, HTL Maven Plugin 1.0.6 |
| Bug | SLING-6230 | The SightlyCompiler reports errors and warnings with an offset by one for the line count | Scripting HTL Compiler 1.0.4, HTL Maven Plugin 1.0.4 |
| Improvement | SLING-6084 | htl-maven-plugin should provide skip parameter | HTL Maven Plugin 1.0.2 |
| Improvement | SLING-6083 | htl-maven-plugin should not fail when source directory not found | HTL Maven Plugin 1.0.2 |
| Improvement | SLING-5863 | Make the sightly-maven-plugin m2e compatible | HTL Maven Plugin 1.0.0 |
| New Feature | SLING-5788 | Implement a Sightly Maven Plugin | HTL Maven Plugin 1.0.0 |


If progress stops, go back and try again. Completed tasks will be cached. Errored tasks will be cleared from the cache. It may take up to 30 min to complete a full 96-well plate. If you have trouble, please email {{ settings.ADMIN_EMAIL }} .


Multi purpose business landing page
Software and analytics services will render your chunks into meaningful data.
Welcome to array, where data matters.
We’ll Deliver the best stories and ideas on the topics you care about most straight to your homepage, app, or inbox.
Responsive
Deliver the best stories and ideas on the topics you care about most straight to you.
Responsive
Deliver the best stories and ideas on the topics you care about most straight to you.
Responsive
Deliver the best stories and ideas on the topics you care about most straight to you.
User Friendly
Deliver the best stories and ideas on the topics you care about most straight to you.
AI Algorithms
Deliver the best stories and ideas on the topics you care about most straight to you.
Built-in Camera
Deliver the best stories and ideas on the topics you care about most straight to you.
Build better landing pages
When you get staright to the point the presentation looks attractive on your web pages. Keep it simple and clean always.
Dynamic charts.
When you get staright to the point the presentation looks attractive on your web pages.
Know moreMobile Analytics.
When you get staright to the point the presentation looks attractive on your web pages.
Know moreWelcome to array, where data matters.
We’ll Deliver the best analytics and graphs you care about most straight to your dashboard, app, or inbox.
Get Started-
Client Support
Team hangouts and instant text messaging right from the dashboard.
-
Secure Servers
Team hangouts and instant text messaging right from the dashboard.
-
Product Feedback
Team hangouts and instant text messaging right from the dashboard.
Customers say nice things
We have very fair pricing policy that would benefit you and us at the same time. Get the free plan & if you need more - pay.
"We have very fair pricing policy that would benefit you and us at the same time. Choose what price you're willing to pay. Get the free plan & if you need more - pay."
"We have very fair pricing policy that would benefit you and us at the same time. Choose what price you're willing to pay. Get the free plan & if you need more - pay."
"We have very fair pricing policy that would benefit you and us at the same time. Choose what price you're willing to pay. Get the free plan & if you need more - pay."
Pricing Plans.
Our plans are designed to meet the requirements of both beginners
and
players.
Get the right plan that suits you.
Freemium
$0.00- First basic feature
- Second feature goes here
- Any other third feature
Beginner
$24.99- First premium feature
- Second premium one goes here
- Third premium feature here
GRAB ARRAY FOR BEST PRICE TODAY
Start now and turn your online business into a profitable route.
Register now14-day free trial and no credit card required.


{% extends 'layouts/skeleton.html' %} {% block title %}Error 500{% endblock %} {% block heading %}
Sorry, we were unable to do that for you. A representative has been informed to fix it.


The web is composed of 3 major elements. The user or the browser which is operated by the user, the interner and the servers which communicate with the Interner via the http protocol.
HTML stands for Hypertext Markup Languages and can be broken down into 4 main categories:
Html documents are also made of tags and elements. ''< b >'' for example is an opening tag (wihtout the spaces) and is closed by the closing tag ''< /b >''. Whatever is written inbetween the two tags is the content and will be displayed as bold in this specific example. The whole thing, ''< b > content < /b >'' is called an element.
To create whitespace it is necessary to use elements, we can use either < br > which stands for break and this doesn't need a closing tag as it will just break the line in the point where it is placed. Breaks are inline elements, like < b >, < a >, etc. which means they don't really occupy a ''physical'' space in the website, what was referred to as a ''box'' in the videos.
This is what happens when we're using block elements, they occupy a physical space, so for example if we use < pr >, which stands for paragraph, it automatically creates whitespace around itself, but in this case we will need to close the element putting the closing tag < /pr > at the end of the paragraph.
Front end Development is a great place to start learning about programming as it is inherently visual, any changes made to the code will result in a visual effect making learning more effective.
Unlike a language like python which doesn’t immediately translate to something as accessible as a webpage, and needs an understanding of the language to be accessible or shared with others.
Html, CSS and JS are the three languages that web development is based on, each one has different purposes, but in this course we’ll cover only Html and CSS.
Html and CSS change over time, but learning their basic principles will allow us to learn new techniques much faster as they tend not to change over time.
HTML files are the structure of a webpage, imagine the walls of our home. CSS files define the Style, or what color the walls are in our analogy. Javascript files are the interactive components.
Some browser, specifically Chrome have some built in futures called Developer Tools that allow us to see, and modify if we want, the structure of a webpage in Html and CSS code. We can also inspect whatever element we want on the website, and the browser will highlight which code generates that element in the developer tool.
DOM or Document Object Model, are the tree structure of a webpage or how the browser interprets code to actually create the webpage structure.
HTML being the language of the web, has its specific syntax and rules, the basic word in the html language is a tag, which the browser turns into elements that then form the DOM tree.
A tag can also have attributes with values.
CSS has also syntax and rules, but does not impact the structure of the website but the rules, for example we can specify that every element belonging to a specific class ‘’x’’ will have a specific color and so on.
The structure of a website is entirely composed of boxes. This is easy to identify when playing arounf with the developer tool in the browser, highliting an element will highlight the entire box.
No matter what shape it contains, it can be a circle like the example in the lesson, the form of the element and the space it occupies in the webpage is a box or a rectangle.
All of these boxes put together compose the structure of the website.
We can either assign a style through CSS to any HTML element like h1, h2, p etc. which will then be the ''selectors'', and this is fine if we want every one of a certain element to have the same style but if we want to have h1's with different styles we will have to use classes, in which case we will be dealing with class selectors.
There are 3 methods for this but I will only note down 2 because the third is messy and complicated, I don't need that.
The first method is to write it directly in the ''head'' of our HTML file by opening a ''style'' tag.
The second method and the one that seems to make more sense to me, also because it's cleaner, is to have a separate CSS file containing the CSS code, which is then linked to our HTML file.
It is good to build a habit of defining sizes in percentages rather than pixels, that way the boxes can resize themselves depending on the situation.
To position them, we have the option of using, display: flex
which will override CSS's default behaviour and position the boxes next to each other.


Preparation time
less than 30 mins
Cooking time
less than 10 mins
Serves
Serves 4
For the glazed grapefruit salad, remove the skins from the pink and white grapefruits, then segment them, catching any excess juice in a bowl (reserve the juice).
Arrange the segments alternately in a hollow circle around the edge of four serving plates.
Using a chefs' blow torch or a hot grill, heat the grapefruit segments until slightly coloured, then set aside.
In a large mixing bowl, whisk together five tablespoons of the reserved grapefruit juice with the caster sugar, white wine vinegar, Dijon mustard and the vanilla seeds until well combined. (Any remaining juice will not be required for this recipe.)
Gradually whisk in the extra virgin olive oil in a thin stream, until it is well incorporated into the salad dressing. Season, to taste, with salt and freshly ground black pepper.
Place the salad leaves into a bowl, add a little of the salad dressing, to taste, then mix well until the leaves are coated. Divide the salad and place equally into the centre of each of the serving plates.
For the fish, heat a griddle pan over a medium heat until hot. Rub the oil all over the salmon and sea bream fillets. Season on both sides, to taste, with salt and freshly ground black pepper.
Place the salmon fillet into the hot griddle pan. Fry for 60 seconds on each side.
Add the sea bream fillet, skin-side down, and fry for 45-60 seconds on each side.
To serve, place one piece of salmon fillet on top of each portion of salad, then place one piece of sea bream fillet on top. Drizzle over the remaining salad dressing.


Reflexes Project page.
This project was supported by NSF Award Number 0720652, CSR-EHS:
High-throughput Real-time Stream Processing in Java.
Overview: here
C version of the Audio player application is (audio.c)
Reflex sources include benchmark programs and the Ovm RTJVM (tgz)
Papers
2010
Pizlo, Blanton, Hosking, Maj,
Vitek, Ziarek. Schism: Fragmentation-Tolerant
Real-Time Garbage Collection. PLDI
Pizlo Ziareck, Blanton, Maj,
Vitek, High-level
Programming of Embedded Hard Real-Time Devices. EuroSys
2009
Spring, Pizlo, Privat,
Guerraoui, Vitek. Reflexes: Abstractions
for Integrating Highly Responsive Tasks into Java Applications. TECS
Vitek. Workshop
on Java Technologies for Real-time Systems (JTRES) ACM
DL
Cunei, Guerraoui, Spring,
Privat, Vitek. High-Performance Transactional
Event Processing. COORDINATION
Kalibera, Hagelberg,
Pizlo, Plsek, Titzer, Vitek. CDx:
A Family of Real-time Java Benchmarks. JTRes
2008
Auerbach, Bacon, Guerraoui,
Spring, Vitek. Flexible Task Graphs: A Unified
Restricted Thread Programming Model for Java. LCTES
Pizlo, Vitek. Memory
Management for Real-time Java: State of the Art. ISORC
2007
Spring, Privat, Guerraoui,
Vitek. StreamFlex: High-throughput Stream
Programming in Java. OOPSLA
Pizlo, Hosking, Vitek. Hierarchical
Real-time Garbage Collection. LCTES
Spring, Pizlo, Guerraoui,
Vitek. Reflexes: Abstractions for Highly
Responsive Systems. VEE
Kalpka, Guerraoui,
Vitek. STMBench7: A Benchmark for Software
Transactional Memory. EUROSYS


nothing to see here, just a placeholder tweet 🐦— Matthew A Moreno (@MorenoMatthewA) October 21, 2018
nothing to see here, just a placeholder tweet 🐦


Coming soon to a comic shop near you:
The Mavellator is a random comic name generator, written by this guy. It is not affiliated with Marvel Comics (as if there was any doubt in your mind).
Life Imitates Art, or, "things the Marvellator has produced that, oddly, actually exist":
Adventures of Tiny Rorschach | Transgender Justice League


|
TFKaldi
|
Class that can read features from a Kaldi archive and process them (cmvn and splicing) More...
Public Member Functions | |
| def | __init__ (self, scpfile, cmvnfile, utt2spkfile, context_width, max_input_length) |
| create a FeatureReader object More... | |
| def | get_utt (self) |
| read the next features from the archive, normalize and splice them More... | |
| def | next_id (self) |
| only gets the ID of the next utterance More... | |
| def | prev_id (self) |
| only gets the ID of the previous utterance More... | |
| def | split (self) |
| split of the features that have been read so fa | |
Public Attributes | |
| reader | |
| reader_cmvn | |
| utt2spk | |
| context_width | |
| max_input_length | |
Class that can read features from a Kaldi archive and process them (cmvn and splicing)
| def processing.feature_reader.FeatureReader.__init__ | ( | self, | |
| scpfile, | |||
| cmvnfile, | |||
| utt2spkfile, | |||
| context_width, | |||
| max_input_length | |||
| ) |
create a FeatureReader object
| scpfile | path to the features .scp file |
| cmvnfile | path to the cmvn file utt2spkfile:path to the file containing the mapping from utterance ID to speaker ID |
| context_width | context width for splicing the features |
| max_input_length | the maximum length of all the utterances in the scp file |
| def processing.feature_reader.FeatureReader.get_utt | ( | self | ) |
read the next features from the archive, normalize and splice them
| def processing.feature_reader.FeatureReader.next_id | ( | self | ) |
only gets the ID of the next utterance
moves forward in the reader
| def processing.feature_reader.FeatureReader.prev_id | ( | self | ) |
only gets the ID of the previous utterance
moves backward in the reader


Bilal Sarimeseli
About
Portfolio
Contact
Portfolio
Word Guess
Crystals Collector Game
Trivia
Psychic Game
Giftastic
Train Schedule Firebase
SHOW ME AROUND PROJECT
Friend Finder App
LIRI BOT
Calculator
Constructor Word Game
Flappy Bird
MySql_node.js_bamazon
Eat-da-Burger


public @interface Grapes
For example:
@Grapes([@Grab(module='m1'), @Grab(module='m2')])
class AnnotatedClass { ... }
You can override an implicit transitive dependency by providing an explicit one. E.g. htmlunit 2.6 normally uses xerces 2.9.1 but you can get 2.9.0 as follows:
Obviously, only do this if you understand the consequences.@Grapes
([@Grab
('net.sourceforge.htmlunit:htmlunit:2.6'),@Grab
('xerces#xercesImpl;2.9.0') ])
You can also remove transitive dependencies altogether (provided you
know you don't need them) using @GrabExclude
.
For example, here is how we would not grab the logkit
and
avalon-framework
transitive dependencies for Apache POI:
It is also sometimes also useful to use@Grapes
([@Grab
("org.apache.poi#poi;3.5-beta6"),@GrabExclude
("logkit:logkit"),@GrabExclude
("avalon-framework#avalon-framework") ]) import org.apache.poi.hssf.util.CellReference assert new CellReference(0, 0, false, false).formatAsString() == 'A1' assert new CellReference(1, 3).formatAsString() == '$D$2'
@GrabConfig
to further adjust how dependencies
are grabbed. See @GrabConfig
for further information.| Modifier and Type | Required Element and Description |
|---|---|
Grab[] |
value |
| Modifier and Type | Optional Element and Description |
|---|---|
boolean |
initClass
This will be pushed into the child grab annotations if the value is not
set in the child annotation already.
|
public abstract Grab[] value
public abstract boolean initClass
This results in an effective change in the default value, which each @Grab can still override


# Create a numeric and a character variable
a <- 5
class(a) # a is a numeric variable
[1] "numeric"
a
[1] 5
b <- "Yay stats class"
class(b) # b is a string variable
[1] "character"
b
[1] "Yay stats class"
Save your script, and re-open it to make sure your changes are still there.
# Create a vector
my.vector <- c(10,-7,99,34,0,-5) # a vector
my.vector
[1] 10 -7 99 34 0 -5
length(my.vector) # how many elements?
[1] 6
# subsetting
my.vector[1] # 1st vector element
[1] 10
my.vector[-1] # all elements but the 1st
[1] -7 99 34 0 -5
my.vector[2:4] # the 2nd to the 4th elements
[1] -7 99 34
my.vector[c(2,5)] # 2nd and 5th element
[1] -7 0
my.vector[length(my.vector)] # the last element
[1] -5
# delete variable 'a' from workspace
rm(a)
# delete everything from workspace
rm(list=ls())
# create a matrix
# type help("matrix") into the console and press ENTER
# read Description, Usage and Arguments
my.matrix1 <- matrix(data = c(1,2,30,40,500,600), nrow = 3, ncol = 2, byrow = TRUE,
dimnames = NULL)
my.matrix2 <- matrix(data = c(1,2,30,40,500,600), nrow = 2, ncol = 3, byrow = FALSE)
# How are the matrices different?
my.matrix1
[,1] [,2]
[1,] 1 2
[2,] 30 40
[3,] 500 600
my.matrix2
[,1] [,2] [,3]
[1,] 1 30 500
[2,] 2 40 600
# subsetting a matrix
my.matrix1[1,2] # element in row 1 and column 2
[1] 2
my.matrix1[2,1] # element in row 2 and column 1
[1] 30
my.matrix1[,1] # 1st column only
[1] 1 30 500
my.matrix1[1:2,] # rows 1 to 2
[,1] [,2]
[1,] 1 2
[2,] 30 40
my.matrix1[c(1,3),] # rows 1 and 3
[,1] [,2]
[1,] 1 2
[2,] 500 600
Packages are user-generated pieces of code that expand the basic options of R. R is a very flexible language, that allows to go way beyond the base options.
install.packages("texreg") # Creates tables both in ASCII text, LaTeX or Word, similar to outreg
install.packages("lmtest") # Provides different tests of linear models
install.packages("readxl") # Opens and writes Excel files
install.packages("sandwich") # Calculates heteroskedasticity consistent SEs
install.packages("car") # General functions to run regressions and manage data
install.packages("plm") # Panel data models
install.packages("dplyr") # General data manipulation
install.packages("tidyr") # Further data manipulations
install.packages("ggplot2") # Advanced graphical machine
install.packages("effects")
In some cases, we want to install previous versions of packages. In this case, we will install Zelig, a comprehensive package that we will use to estimate and plot predicted probabilities. We will install the same version we are using to teach the MSc students:
install.packages("https://cran.r-project.org/src/contrib/Archive/Zelig/Zelig_4.2-1.tar.gz",
repos=NULL,
type="source")
Once packages are installed, they need to be loaded. The reason is that some packages have overlapping functions with others, so we usually care about the order in which we load them
library(foreign) ## comes with the basic installation and allows us to open files in other formats such as Stata, SPSS or SAS
library(car)
library(readxl)
library(texreg)
Version: 1.35
Date: 2015-04-25
Author: Philip Leifeld (University of Konstanz)
Please cite the JSS article in your publications -- see citation("texreg").
library(Zelig)
Loading required package: boot
Attaching package: 'boot'
The following object is masked from 'package:car':
logit
Loading required package: MASS
Loading required package: sandwich
ZELIG (Versions 4.2-1, built: 2013-09-12)
+----------------------------------------------------------------+
| Please refer to http://gking.harvard.edu/zelig for full |
| documentation or help.zelig() for help with commands and |
| models support by Zelig. |
| |
| Zelig project citations: |
| Kosuke Imai, Gary King, and Olivia Lau. (2009). |
| ``Zelig: Everyone's Statistical Software,'' |
| http://gking.harvard.edu/zelig |
| and |
| Kosuke Imai, Gary King, and Olivia Lau. (2008). |
| ``Toward A Common Framework for Statistical Analysis |
| and Development,'' Journal of Computational and |
| Graphical Statistics, Vol. 17, No. 4 (December) |
| pp. 892-913. |
| |
| To cite individual Zelig models, please use the citation |
| format printed with each model run and in the documentation. |
+----------------------------------------------------------------+
Attaching package: 'Zelig'
The following object is masked from 'package:utils':
cite
library(sandwich)
library(plm)
Loading required package: Formula
library(effects)
Attaching package: 'effects'
The following object is masked from 'package:car':
Prestige
library(ggplot2)
library(tidyr)
Attaching package: 'tidyr'
The following object is masked from 'package:texreg':
extract
library(lmtest)
Loading required package: zoo
Attaching package: 'zoo'
The following objects are masked from 'package:base':
as.Date, as.Date.numeric
library(dplyr)
Attaching package: 'dplyr'
The following object is masked from 'package:plm':
between
The following objects are masked from 'package:Zelig':
combine, summarize
The following object is masked from 'package:MASS':
select
The following objects are masked from 'package:stats':
filter, lag
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
To set up your working directory, you need to use the setwd()
function. E.g.:
setwd("~/R seminar")
One traditional format of data as CSV. These files do not contain any metadata, but they are usually compatible with any statistical software. The way to load a dataset is assigning it to an object (of class dataframe
).  Median Mean 3rd Qu. Max. NA's
-10.0000 -7.0000 -1.0000 0.2319 8.0000 10.0000 3
# now lets check if western countries were more democratic than the other countries in 1946
table(my.data$nato, my.data$polity2)
-10 -9 -8 -7 -6 -5 -4 -3 -1 0 1 2 3 4 5 7 8 10
0 4 7 3 3 4 3 2 5 3 1 1 5 1 1 3 2 2 8
1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 9
# descriptive summary stats of polity variable by nato membership
summary(my.data$polity2[my.data$nato==0]) # not in nato
Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
-10.000 -7.000 -3.000 -1.207 4.750 10.000 3
summary(my.data$polity2[my.data$nato==1]) # nato member
Min. 1st Qu. Median Mean 3rd Qu. Max.
-9.000 10.000 10.000 7.818 10.000 10.000
## illustration
boxplot(my.data$polity2 ~ as.factor(my.data$nato),
frame = FALSE,
main = "Polity IV Scores of NATO founders vs others in 1946",
xlab = "NATO member",
ylab = "Polity Score")
We can use the read_excel
function from the readxl
package to open Excel files. However, unlike with what we did for CSV files, the read_excel
function does not directly download files, so we need to save them into our working directory.
Download 'High School and Beyond' Dataset
Make sure you save it into your working directory and then run:
student_data <- read_excel("hsb2.xlsx")
head(student_data)
Source: local data frame [6 x 11]
id female race ses schtyp prog read write math science socst
1 70 0 4 1 1 1 57 52 41 47 57
2 121 1 4 2 1 3 68 59 53 63 61
3 86 0 4 3 1 1 44 33 54 58 31
4 141 0 4 3 1 3 63 44 47 53 56
5 172 0 4 2 1 2 47 52 57 53 61
6 113 0 4 2 1 2 44 52 51 63 61
To open Stata files, we can use the read.dta()
function:
world.data <- read.dta("http://uclspp.github.io/PUBLG100/data/QoG2012.dta")
head(world.data)
h_j wdi_gdpc undp_hdi wbgi_cce wbgi_pse former_col lp_lat_abst
1 -5 628.4074 NA -1.5453584 -1.9343837 0 0.3666667
2 -5 4954.1982 0.781 -0.8538115 -0.6026081 0 0.4555556
3 -5 6349.7207 0.704 -0.7301510 -1.7336243 1 0.3111111
4 NA NA NA 1.3267342 1.1980436 0 0.4700000
5 -5 2856.7517 0.381 -1.2065741 -1.4150945 1 0.1366667
6 NA 13981.9795 0.800 0.8624368 0.7084046 1 0.1892222
We will start looking at the student_data
dataset:
mean(student_data$science) # Mean
[1] 51.865
sd(student_data$science) # Standard deviation
[1] 9.936824
sd(student_data$science)^2 # Variance
[1] 98.74048
median(student_data$science) # Median
[1] 53
range(student_data$science) # Minimum and Maximum value
[1] 26 77
summary(student_data$science)
Min. 1st Qu. Median Mean 3rd Qu. Max.
26.00 44.00 53.00 51.86 58.00 77.00
hist(student_data$science, main = "Histogram of Science Scores", xlab = "Science Score")
Now let's suppose we wanted to find out the highest score in science and also wanted to see the ID of the student who received the highest score.
The max()
function tells us the highest score, and which.max()
tells us the row number of the student who received it.
max(student_data$science)
[1] 77
which.max(student_data$science)
[1] 74
In addition to the median, the 25th percentile (also known as the lower quartile) and 75th percentile (or the upper quartile) are commonly used to describe the distribution of values in a number of fields including standardized test scores, income and wealth statistics and healthcare measurements such as a baby's birth weight or a child's height compared to their respective peer group.
We can calculate percentiles using the quantile()
function in R. For example, if we wanted to see the science scores in the 25th, 50th and 75th percentiles, we would call the quantile()
function with c(0.25, 0.5, 0.75)
as the second argument.
quantile(student_data$science, c(0.25, 0.5, 0.75))
25% 50% 75%
44 53 58
Obtaining the mode is slightly more difficult, but it takes only a couple of extra steps. We will use a categorical variable, such as race
from the student_data
file.
The High School and Beyond dataset that we've been using contains categorical variable such as race, gender and socioeconomic status that are coded as numeric data and must be converted to factor variables.
We'll use the following code book to create categorical variables for gender, race, and socioeconomic status.
| Categorical Variable | New Factor Variable | Levels |
|---|---|---|
| female | gender | 0 - Male 1 - Female |
| ses | socioeconomic_status | 1 - Low 2 - Middle 3 - High |
| race | racial_group | 1 - Black 2- Asian 3 - Hispanic 4 - White |
We can convert categorical variables to factor variables using the factor()
function. The factor()
function needs the categorical variable and the distinct labels for each category (such as "Male", "Female") as the two arguments for creating factor variables.
student_data$sex <- factor(student_data$female, labels = c("Male", "Female"))
student_data$socioeconomic_status <- factor(student_data$ses, labels = c("Low", "Middle", "High"))
student_data$racial_group <- factor(student_data$race, labels = c("Black", "Asian", "Hispanic", "White"))
Based on this, let's get the mode
race_table <- table(student_data$racial_group) # This tabulates the frequency per value
race_table
Black Asian Hispanic White
24 11 20 145
sort(race_table, decreasing = TRUE)
White Black Hispanic Asian
145 24 20 11
Now that we've created factor variables for our categorical data, we can run crosstabs on these newly created factor variables . We know that our dataset has 200 observations, but let's see how many are male students and how many are female students.
table(student_data$sex)
Male Female
91 109
Next, let's see how the different socioeconomic groups (Low, Middle, High) are represented in our dataset.
table(student_data$socioeconomic_status)
Low Middle High
47 95 58
Finally, we can run two-way crosstabs to see how the different racial groups are distributed over the three socioeconomic levels.
table(student_data$socioeconomic_status, student_data$racial_group)
Black Asian Hispanic White
Low 9 3 11 24
Middle 11 5 6 73
High 4 3 3 48
Let's move on to some visualizations starting with a bar chart of socioeconomic status and let's take advantage of the factor variable we created above. Since socioeconomic_status
is a factor variable, R automatically knows how to draw bars for each factor and label them accordingly.
# bar charts
barplot(table(student_data$socioeconomic_status))
In addition to being able to correctly group and label a bar chart with distinct categories, factor variables can also be used to create box plots automatically with the plot()
function. The plot()
function understands that we are interested in a box plot when we pass it a factor variable for the x-axis.
We can use the par()
function to change graphical parameters and instruct R to create a figure with 1 row and 3 columns using the mfrow=c(1,3)
option. Once the graphical parameters are set, the three plots for gender, race and socioeconomic status variables will be created side-by-side in a single figure.
We would like to rotate the x-axis labels 90 degrees so that they are perpendicular to the axis. Most graphics functions in R support a label style las
option for rotating axis labels. The las
option can take these 4 values:
| Value | Axis Labels |
|---|---|
| 0 | Always parallel to the axis [default] |
| 1 | Always horizontal |
| 2 | Always perpendicular to the axis |
| 3 | Always vertical |
To rorate the axis labels 90 degrees, we'll use las = 2
when calling the plot()
function.
# science score by gender, race and socioeconomic status
par(mfrow=c(1,3))
# categorical variables are plotted as boxplots
plot(student_data$sex, student_data$science, main = "Gender", las = 2)
plot(student_data$racial_group, student_data$science, main = "Race", las = 2)
plot(student_data$socioeconomic_status, student_data$science, main = "Socioeconomic Status", las = 2)
Now let's see if we can visually examine the relationship between science and math scores using a scatter plot. Before we call the plot()
function we need to reset the graphical parameters to make sure that our figure only contains a single plot by calling the par()
function and using the mfrow=c(1,1)
option.
par(mfrow=c(1,1))
plot(student_data$math, student_data$science)
apply()
FunctionSuppose we wanted to create a new variable called english
which represented the average of each student's reading and writing scores. We could call the mean()
function manually for each student and update the english
variable but that would be inefficient and extremely time consuming. Fortunately, R provide us built-in support for tasks like this with the apply()
function. The appropriately named apply()
function allows us to 'apply' any function to either the rows or the columns of a matrix or a data frame in a single call.
Here is a list of arguments the apply()
function expects and their descriptions:
apply(x, margin, function)
| Argument | Description |
|---|---|
x |
The first argument is the dataset that we want the apply function to operate on. Since we're averaging over reading and writing scores, we select only the read and write columns. |
margin |
The second argument tells apply() to either apply the function row-by-row (1) or column-by-column (2). We need to apply the mean function to each row by specifying the second argument as 1 . |
function |
The third argument is simply the function to be applied to each row, or mean in our case. |
Let's take a look at apply()
in action:
student_data$english <- apply(student_data[c("read", "write")], 1, mean)
Let's use head()
to inspect our dataset with the english scores.
head(student_data)
Source: local data frame [6 x 15]
id female race ses schtyp prog read write math science socst sex
1 70 0 4 1 1 1 57 52 41 47 57 Male
2 121 1 4 2 1 3 68 59 53 63 61 Female
3 86 0 4 3 1 1 44 33 54 58 31 Male
4 141 0 4 3 1 3 63 44 47 53 56 Male
5 172 0 4 2 1 2 47 52 57 53 61 Male
6 113 0 4 2 1 2 44 52 51 63 61 Male
Variables not shown: socioeconomic_status (fctr), racial_group (fctr),
english (dbl)
One of the default packages in R called stats
provides a number of functions for drawing random samples from a distribution.
The rnorm()
function, for example, can be used to draw from a normal distribution.
normal_dist <- rnorm(1000, mean = 0, sd = 1)
head(normal_dist)
[1] -1.6149516 0.7550053 -1.2067655 1.0701133 0.1216741 1.9004983
hist(normal_dist)
The runif()
function can be used to draw from a uniform distribution. For example, we can simulate rolling a 6-sided die with the following code.
num_rolls <- 10 # number of times to roll the dice
rolls <- as.integer(runif(num_rolls, min = 1, max = 7))
rolls
[1] 4 1 5 4 1 2 1 3 1 1
The basic function for fitting linear models is lm()
. It is always recommended to create an object with the results from the lm()
function and then summarise it. The way in which it works is:
model1 <- lm(DV ~ IV1 + IV2, data)
summarise(model1)
The arguments are:
| Argument | Description |
|---|---|
| Formula | DV ~ IV |
| data | The dataset where the variables are contained |
# load the communities datasets
communities <- read.csv("http://uclspp.github.io/PUBLG100/data/communities.csv")
communities_employment <- read.csv("http://uclspp.github.io/PUBLG100/data/communities_employment.csv")
It seems that state
and communityname
are common to both datasets so we can use them to do the merge.
Now let's use the merge()
function to merge these two datasets together. There are three arguments that we need to provide to the merge()
function so it knows what we are trying to merge and how.
merge(x, y, by)
| Argument | Description |
|---|---|
x |
The first dataset to merge. This is the communities dataset in our case. |
y |
The second dataset to merge. This is the communities_employment dataset. |
by |
Name of the column or columns that are common in both datasets. We know that state and communityname are common to both datasets so we'll pass them as a vector by combining the two names together. |
For more information on how the merge()
function works, type help(merge)
in R.
# merge the two datasets
communities <- merge(communities, communities_employment, by = c("state", "communityname"))
# explore dataset
names(communities)
[1] "state" "communityname" "county"
[4] "community" "fold" "population"
[7] "householdsize" "racepctblack" "racePctWhite"
[10] "racePctAsian" "racePctHisp" "agePct12t21"
[13] "agePct12t29" "agePct16t24" "agePct65up"
[16] "numbUrban" "pctUrban" "medIncome"
[19] "pctWWage" "pctWFarmSelf" "pctWInvInc"
[22] "pctWSocSec" "pctWPubAsst" "pctWRetire"
[25] "medFamInc" "perCapInc" "whitePerCap"
[28] "blackPerCap" "indianPerCap" "AsianPerCap"
[31] "OtherPerCap" "HispPerCap" "NumUnderPov"
[34] "PctPopUnderPov" "PctLess9thGrade" "PctNotHSGrad"
[37] "PctBSorMore" "PctUnemployed" "PctEmploy"
[40] "PctEmplManu" "PctEmplProfServ" "PctOccupManu"
[43] "PctOccupMgmtProf"
View(communities)
Since our dataset has more columns than we need, let's select only the ones we're interested in and rename them with meaningful names. One approach would be to use either the subset()
function or the square bracket [ ]
extraction operator for selecting the columns we're interested in. But the easiest way to accomplish this is with the dplyr select()
function that allows us select the columns we need and rename them at the same time.
communities <- select(communities,
state,
Community = communityname,
UnemploymentRate = PctUnemployed,
NoHighSchool = PctNotHSGrad,
White = racePctWhite)
Now that we've merged the dataset and renamed the columns the way we want, let's try to visualize the data.
plot(communities$NoHighSchool, communities$UnemploymentRate,
xlab = "Adults without High School education (%)",
ylab = "Unemployment Rate")
Now we can run the bivariate model:
model1 <- lm(UnemploymentRate ~ NoHighSchool, data = communities)
summary(model1)
Call:
lm(formula = UnemploymentRate ~ NoHighSchool, data = communities)
Residuals:
Min 1Q Median 3Q Max
-0.42347 -0.08499 -0.01189 0.07711 0.56470
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.078952 0.006483 12.18 <2e-16 ***
NoHighSchool 0.742385 0.014955 49.64 <2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.1352 on 1992 degrees of freedom
Multiple R-squared: 0.553, Adjusted R-squared: 0.5527
F-statistic: 2464 on 1 and 1992 DF, p-value: < 2.2e-16
Now let's plot the regression line with our observations using the abline()
function.
plot(communities$NoHighSchool, communities$UnemploymentRate,
xlab = "Adults without High School education (%)",
ylab = "Unemployment Rate")
abline(model1, col = "red")
Let's take a look at how to display the output of a regression model on the screen using the screenreg()
function from texreg
.
screenreg(model1)
=========================
Model 1
-------------------------
(Intercept) 0.08 ***
(0.01)
NoHighSchool 0.74 ***
(0.01)
-------------------------
R^2 0.55
Adj. R^2 0.55
Num. obs. 1994
RMSE 0.14
=========================
*** p < 0.001, ** p < 0.01, * p < 0.05
Now, let's fit a multiple regression model and use screenreg()
to display both models side by side. We can also use htmlreg()
to create a Word file with the models:
model2 <- lm(UnemploymentRate ~ NoHighSchool + White, data = communities)
summary(model2)
Call:
lm(formula = UnemploymentRate ~ NoHighSchool + White, data = communities)
Residuals:
Min 1Q Median 3Q Max
-0.37864 -0.08488 -0.01502 0.07402 0.57313
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.24477 0.01477 16.57 <2e-16 ***
NoHighSchool 0.64318 0.01649 39.01 <2e-16 ***
White -0.16954 0.01368 -12.39 <2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.1303 on 1991 degrees of freedom
Multiple R-squared: 0.585, Adjusted R-squared: 0.5846
F-statistic: 1403 on 2 and 1991 DF, p-value: < 2.2e-16
screenreg(list(model1, model2))
======================================
Model 1 Model 2
--------------------------------------
(Intercept) 0.08 *** 0.24 ***
(0.01) (0.01)
NoHighSchool 0.74 *** 0.64 ***
(0.01) (0.02)
White -0.17 ***
(0.01)
--------------------------------------
R^2 0.55 0.58
Adj. R^2 0.55 0.58
Num. obs. 1994 1994
RMSE 0.14 0.13
======================================
*** p < 0.001, ** p < 0.01, * p < 0.05
htmlreg(list(model1, model2), file="models.doc")
The table was written to the file 'models.doc'.
We will use the ggplot2
package to plot the predicted values of the linear model. ggplot2
works on the basis of layers. We first create the base layer that contains the data, and then we add the other layers using +
g <- ggplot(data = communities, aes(y = UnemploymentRate, x = NoHighSchool))
g + geom_smooth(method = "lm")
g + geom_point() + geom_smooth(method = "lm") +
labs(title = "Model1", x = "Not on High School", y = "Unemployment Rate")
This option is limited to bivariate regressions and not to multiple models. The Zelig
package allows us to estimate the confidence intervals for multiple models. This package requires that we re-estimate the models using their own function (zelig()
), which is very similar to lm()
but it also works for other regression models. We then need to define the values of X that we want to plot, and then we can simulate in order to get the confidence intervals
z.out <- zelig(UnemploymentRate ~ NoHighSchool + White, data = communities,
model = "ls", cite=FALSE)
summary(z.out)
Call:
lm(formula = formula, weights = weights, model = F, data = data)
Residuals:
Min 1Q Median 3Q Max
-0.37864 -0.08488 -0.01502 0.07402 0.57313
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.24477 0.01477 16.57 <2e-16 ***
NoHighSchool 0.64318 0.01649 39.01 <2e-16 ***
White -0.16954 0.01368 -12.39 <2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.1303 on 1991 degrees of freedom
Multiple R-squared: 0.585, Adjusted R-squared: 0.5846
F-statistic: 1403 on 2 and 1991 DF, p-value: < 2.2e-16
x.out <- setx(z.out, White = seq(0, 1, 0.1))
s.out <- sim(z.out, x=x.out)
summary(s.out)
Expected Values: E(Y|X)
mean sd 50%
[NoHighSchool=0.38332998996991, White=0] 0.4912850 0.010690577 0.4911525
[NoHighSchool=0.38332998996991, White=0.1] 0.4739565 0.009237769 0.4741268
[NoHighSchool=0.38332998996991, White=0.2] 0.4571479 0.007881687 0.4571415
[NoHighSchool=0.38332998996991, White=0.3] 0.4402735 0.006979485 0.4399915
[NoHighSchool=0.38332998996991, White=0.4] 0.4233113 0.005436500 0.4233914
[NoHighSchool=0.38332998996991, White=0.5] 0.4066605 0.004499378 0.4068849
[NoHighSchool=0.38332998996991, White=0.6] 0.3895672 0.003402581 0.3896112
[NoHighSchool=0.38332998996991, White=0.7] 0.3725541 0.003109003 0.3725742
[NoHighSchool=0.38332998996991, White=0.8] 0.3555850 0.002876609 0.3554357
[NoHighSchool=0.38332998996991, White=0.9] 0.3387187 0.003604380 0.3387380
[NoHighSchool=0.38332998996991, White=1] 0.3217179 0.004380531 0.3217305
2.5% 97.5%
[NoHighSchool=0.38332998996991, White=0] 0.4709020 0.5119803
[NoHighSchool=0.38332998996991, White=0.1] 0.4559409 0.4926629
[NoHighSchool=0.38332998996991, White=0.2] 0.4420286 0.4720256
[NoHighSchool=0.38332998996991, White=0.3] 0.4266798 0.4538857
[NoHighSchool=0.38332998996991, White=0.4] 0.4120841 0.4337639
[NoHighSchool=0.38332998996991, White=0.5] 0.3978156 0.4152649
[NoHighSchool=0.38332998996991, White=0.6] 0.3831149 0.3957922
[NoHighSchool=0.38332998996991, White=0.7] 0.3665391 0.3786593
[NoHighSchool=0.38332998996991, White=0.8] 0.3501994 0.3612224
[NoHighSchool=0.38332998996991, White=0.9] 0.3317173 0.3455965
[NoHighSchool=0.38332998996991, White=1] 0.3127192 0.3301088
Predicted Values: Y|X
mean sd 50%
[NoHighSchool=0.38332998996991, White=0] 0.4912850 0.010690577 0.4911525
[NoHighSchool=0.38332998996991, White=0.1] 0.4739565 0.009237769 0.4741268
[NoHighSchool=0.38332998996991, White=0.2] 0.4571479 0.007881687 0.4571415
[NoHighSchool=0.38332998996991, White=0.3] 0.4402735 0.006979485 0.4399915
[NoHighSchool=0.38332998996991, White=0.4] 0.4233113 0.005436500 0.4233914
[NoHighSchool=0.38332998996991, White=0.5] 0.4066605 0.004499378 0.4068849
[NoHighSchool=0.38332998996991, White=0.6] 0.3895672 0.003402581 0.3896112
[NoHighSchool=0.38332998996991, White=0.7] 0.3725541 0.003109003 0.3725742
[NoHighSchool=0.38332998996991, White=0.8] 0.3555850 0.002876609 0.3554357
[NoHighSchool=0.38332998996991, White=0.9] 0.3387187 0.003604380 0.3387380
[NoHighSchool=0.38332998996991, White=1] 0.3217179 0.004380531 0.3217305
2.5% 97.5%
[NoHighSchool=0.38332998996991, White=0] 0.4709020 0.5119803
[NoHighSchool=0.38332998996991, White=0.1] 0.4559409 0.4926629
[NoHighSchool=0.38332998996991, White=0.2] 0.4420286 0.4720256
[NoHighSchool=0.38332998996991, White=0.3] 0.4266798 0.4538857
[NoHighSchool=0.38332998996991, White=0.4] 0.4120841 0.4337639
[NoHighSchool=0.38332998996991, White=0.5] 0.3978156 0.4152649
[NoHighSchool=0.38332998996991, White=0.6] 0.3831149 0.3957922
[NoHighSchool=0.38332998996991, White=0.7] 0.3665391 0.3786593
[NoHighSchool=0.38332998996991, White=0.8] 0.3501994 0.3612224
[NoHighSchool=0.38332998996991, White=0.9] 0.3317173 0.3455965
[NoHighSchool=0.38332998996991, White=1] 0.3127192 0.3301088
plot(s.out, main = "Model 2")
To test for heteroskedasticity we use the Breusch-Pagan test, with the bptest()
function from the lmtest
package:
bptest(model2)
studentized Breusch-Pagan test
data: model2
BP = 135.02, df = 2, p-value < 2.2e-16
vcov(model2) # This function displays the variance-covariance matrix from model1
(Intercept) NoHighSchool White
(Intercept) 0.0002181035 -0.0001867714 -0.0001830833
NoHighSchool -0.0001867714 0.0002718532 0.0001095398
White -0.0001830833 0.0001095398 0.0001871970
In order to recalculate the standard errors, we use the coeftest()
function from the lmtest
package to display the coefficients and their t-tests. One option of this function is that we can replace the variance-covariance matrix with a different (corrected) one. We will use the vcovHC()
function from the sandwich
package to estimate the new matrix.
coeftest(model2) # Shows the coefficients and their corresponding t-tests
t test of coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.244768 0.014768 16.574 < 2.2e-16 ***
NoHighSchool 0.643176 0.016488 39.009 < 2.2e-16 ***
White -0.169542 0.013682 -12.392 < 2.2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
coeftest(model2, vcov=vcovHC(model2))
t test of coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.244768 0.016054 15.247 < 2.2e-16 ***
NoHighSchool 0.643176 0.018532 34.706 < 2.2e-16 ***
White -0.169542 0.015406 -11.005 < 2.2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
We will use the Quality of Government data using four variables:
| Variable | What is measures |
|---|---|
undp_hdi |
Human development index. Higher values, better quality of life. |
wbgi_cce |
Control of corruption. Higher values, better control of corruption. |
former_col |
A former colony or not. 1 indicates former colonies. |
wdi_gdpc |
GDP/captia in $US. Larger values more average income. |
rm(list=ls()) # To clean our environment
# load quality of government institute 2015 dataset
world.data <- read.dta("http://uclspp.github.io/PUBLG100/data/QoG2012.dta")
# we remove NA's
world.data <- na.omit(world.data)
# let's transform the former_col variable into a factor
world.data$former_col <- factor(world.data$former_col, levels=c(0,1), labels = c("No", "Yes"))
# run the multiple regression
m1 <- lm(undp_hdi ~ wbgi_cce + former_col, data = world.data)
# regression table
screenreg(m1)
=========================
Model 1
-------------------------
(Intercept) 0.78 ***
(0.02)
wbgi_cce 0.10 ***
(0.01)
former_colYes -0.13 ***
(0.02)
-------------------------
R^2 0.57
Adj. R^2 0.56
Num. obs. 158
RMSE 0.12
=========================
*** p < 0.001, ** p < 0.01, * p < 0.05
Now let's run the interaction term:
m2 <- lm(undp_hdi ~ wbgi_cce * former_col, data = world.data)
summary(m2)
Call:
lm(formula = undp_hdi ~ wbgi_cce * former_col, data = world.data)
Residuals:
Min 1Q Median 3Q Max
-0.39546 -0.04167 0.00794 0.06415 0.29011
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.79211 0.01710 46.315 < 2e-16 ***
wbgi_cce 0.07467 0.01333 5.603 9.44e-08 ***
former_colYes -0.13429 0.02162 -6.211 4.70e-09 ***
wbgi_cce:former_colYes 0.05600 0.02078 2.695 0.00783 **
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.1202 on 154 degrees of freedom
Multiple R-squared: 0.587, Adjusted R-squared: 0.579
F-statistic: 72.97 on 3 and 154 DF, p-value: < 2.2e-16
# F-test
anova(m1, m2)
Analysis of Variance Table
Model 1: undp_hdi ~ wbgi_cce + former_col
Model 2: undp_hdi ~ wbgi_cce * former_col
Res.Df RSS Df Sum of Sq F Pr(>F)
1 155 2.3318
2 154 2.2269 1 0.10499 7.2607 0.00783 **
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# regression table
screenreg(list(m1, m2))
==============================================
Model 1 Model 2
----------------------------------------------
(Intercept) 0.78 *** 0.79 ***
(0.02) (0.02)
wbgi_cce 0.10 *** 0.07 ***
(0.01) (0.01)
former_colYes -0.13 *** -0.13 ***
(0.02) (0.02)
wbgi_cce:former_colYes 0.06 **
(0.02)
----------------------------------------------
R^2 0.57 0.59
Adj. R^2 0.56 0.58
Num. obs. 158 158
RMSE 0.12 0.12
==============================================
*** p < 0.001, ** p < 0.01, * p < 0.05
Plotting the interaction terms:
# Using the plot function with the effects package
plot(effect(term= "wbgi_cce:former_col", mod=m2, x.var = "wbgi_cce"), multiline = TRUE)
# Using ggplot2
g <- ggplot(world.data, aes(x = wbgi_cce, y = undp_hdi, group = former_col, colour = former_col))
g + geom_smooth(method="lm")
# Using Zelig
z.out <- zelig(undp_hdi ~ wbgi_cce * former_col, data = world.data, model="ls", cite=FALSE)
# set covariates for countries that weren't colonised
x.out1 <- setx(z.out, former_col = "No", wbgi_cce = -3:2)
# set covariates for colonised countries
x.out2 <- setx(z.out, former_col = "Yes", wbgi_cce = -3:2)
# simulate
s.out <- sim(z.out, x = x.out1, x1 = x.out2)
summary(s.out)
Expected Values: E(Y|X)
mean sd 50% 2.5%
[former_col=No, wbgi_cce=-3] 0.5657329 0.04883139 0.5636010 0.4730275
[former_col=No, wbgi_cce=-2] 0.6422917 0.03717294 0.6413977 0.5690822
[former_col=No, wbgi_cce=-1] 0.7173848 0.02425738 0.7181697 0.6693696
[former_col=No, wbgi_cce=0] 0.7920908 0.01706827 0.7926531 0.7589231
[former_col=No, wbgi_cce=1] 0.8672700 0.01706872 0.8666629 0.8337371
[former_col=No, wbgi_cce=2] 0.9428224 0.02505369 0.9430139 0.8929875
97.5%
[former_col=No, wbgi_cce=-3] 0.6624020
[former_col=No, wbgi_cce=-2] 0.7143001
[former_col=No, wbgi_cce=-1] 0.7647348
[former_col=No, wbgi_cce=0] 0.8261120
[former_col=No, wbgi_cce=1] 0.9023111
[former_col=No, wbgi_cce=2] 0.9923169
Expected Values: E(Y|X1)
mean sd 50% 2.5%
[former_col=No, wbgi_cce=-3] 0.2681871 0.04352305 0.2692041 0.1851014
[former_col=No, wbgi_cce=-2] 0.3972183 0.03076959 0.3963034 0.3395343
[former_col=No, wbgi_cce=-1] 0.5276009 0.01617994 0.5281814 0.4962307
[former_col=No, wbgi_cce=0] 0.6576996 0.01286766 0.6579711 0.6318326
[former_col=No, wbgi_cce=1] 0.7889627 0.02423962 0.7887719 0.7430038
[former_col=No, wbgi_cce=2] 0.9181464 0.03939396 0.9179150 0.8416299
97.5%
[former_col=No, wbgi_cce=-3] 0.3526553
[former_col=No, wbgi_cce=-2] 0.4582696
[former_col=No, wbgi_cce=-1] 0.5583652
[former_col=No, wbgi_cce=0] 0.6835169
[former_col=No, wbgi_cce=1] 0.8337421
[former_col=No, wbgi_cce=2] 0.9952081
Predicted Values: Y|X
mean sd 50% 2.5%
[former_col=No, wbgi_cce=-3] 0.5657329 0.04883139 0.5636010 0.4730275
[former_col=No, wbgi_cce=-2] 0.6422917 0.03717294 0.6413977 0.5690822
[former_col=No, wbgi_cce=-1] 0.7173848 0.02425738 0.7181697 0.6693696
[former_col=No, wbgi_cce=0] 0.7920908 0.01706827 0.7926531 0.7589231
[former_col=No, wbgi_cce=1] 0.8672700 0.01706872 0.8666629 0.8337371
[former_col=No, wbgi_cce=2] 0.9428224 0.02505369 0.9430139 0.8929875
97.5%
[former_col=No, wbgi_cce=-3] 0.6624020
[former_col=No, wbgi_cce=-2] 0.7143001
[former_col=No, wbgi_cce=-1] 0.7647348
[former_col=No, wbgi_cce=0] 0.8261120
[former_col=No, wbgi_cce=1] 0.9023111
[former_col=No, wbgi_cce=2] 0.9923169
Predicted Values: Y|X1
mean sd 50% 2.5%
[former_col=No, wbgi_cce=-3] 0.2681871 0.04352305 0.2692041 0.1851014
[former_col=No, wbgi_cce=-2] 0.3972183 0.03076959 0.3963034 0.3395343
[former_col=No, wbgi_cce=-1] 0.5276009 0.01617994 0.5281814 0.4962307
[former_col=No, wbgi_cce=0] 0.6576996 0.01286766 0.6579711 0.6318326
[former_col=No, wbgi_cce=1] 0.7889627 0.02423962 0.7887719 0.7430038
[former_col=No, wbgi_cce=2] 0.9181464 0.03939396 0.9179150 0.8416299
97.5%
[former_col=No, wbgi_cce=-3] 0.3526553
[former_col=No, wbgi_cce=-2] 0.4582696
[former_col=No, wbgi_cce=-1] 0.5583652
[former_col=No, wbgi_cce=0] 0.6835169
[former_col=No, wbgi_cce=1] 0.8337421
[former_col=No, wbgi_cce=2] 0.9952081
First Differences: E(Y|X1) - E(Y|X)
mean sd 50% 2.5%
[former_col=No, wbgi_cce=-3] -0.29754587 0.06626938 -0.29740263 -0.4368443
[former_col=No, wbgi_cce=-2] -0.24507341 0.04918845 -0.24486657 -0.3369883
[former_col=No, wbgi_cce=-1] -0.18978386 0.02915835 -0.18975274 -0.2448669
[former_col=No, wbgi_cce=0] -0.13439119 0.02097508 -0.13467539 -0.1751177
[former_col=No, wbgi_cce=1] -0.07830729 0.02953520 -0.07852311 -0.1359753
[former_col=No, wbgi_cce=2] -0.02467595 0.04724487 -0.02521982 -0.1170963
97.5%
[former_col=No, wbgi_cce=-3] -0.16834027
[former_col=No, wbgi_cce=-2] -0.15098995
[former_col=No, wbgi_cce=-1] -0.13249598
[former_col=No, wbgi_cce=0] -0.09232021
[former_col=No, wbgi_cce=1] -0.02127745
[former_col=No, wbgi_cce=2] 0.06427530
plot(s.out)
# plot of relationship b/w income & the human development index
plot( undp_hdi ~ wdi_gdpc,
data = world.data,
xlim = c( xmin = 0, xmax = 65000),
ylim = c( ymin = 0, ymax = 1),
frame = FALSE,
xlab = "World Bank GDP/captia",
ylab = "Human Development Index",
main = "Relationship b/w Income and Quality of Life")
# add the regression line
abline(lm(undp_hdi ~ wdi_gdpc, data = world.data))
# lowess line
lines(lowess(world.data$wdi_gdpc, world.data$undp_hdi), col="red")
To estimate the square effect, we need to use the I()
index option
# we include a quadradic term for income
m3 <- lm(undp_hdi ~ wdi_gdpc + I(wdi_gdpc^2),
data = world.data)
# regression output
summary(m3)
Call:
lm(formula = undp_hdi ~ wdi_gdpc + I(wdi_gdpc^2), data = world.data)
Residuals:
Min 1Q Median 3Q Max
-0.261986 -0.070042 -0.003689 0.090414 0.222661
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 5.202e-01 1.305e-02 39.856 <2e-16 ***
wdi_gdpc 2.549e-05 1.777e-06 14.345 <2e-16 ***
I(wdi_gdpc^2) -3.534e-10 3.815e-11 -9.264 <2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.1059 on 155 degrees of freedom
Multiple R-squared: 0.6776, Adjusted R-squared: 0.6734
F-statistic: 162.9 on 2 and 155 DF, p-value: < 2.2e-16
We can plot the quadratic relationship
# Easiest way is with Zelig
z.out <- zelig(undp_hdi ~ wdi_gdpc + I(wdi_gdpc^2),
data = world.data, model = "ls", cite = F)
# setting covariates; GDP/captia is a sequence from 0 to 45000 by steps of 1000
x.out <- setx(z.out, wdi_gdpc = seq(0, 60000, 1000))
# simulate using our model and our covariates
s.out <- sim(z.out, x = x.out)
# plot the results
plot(s.out)
On some occasions you might want to order a data set according to several criteria. arrange()
from dplyr let's you do that. The default order is ascending. To change to descending, use desc()
.
# we order by ex-colony and then hdi
head(arrange(world.data, former_col, undp_hdi))
h_j wdi_gdpc undp_hdi wbgi_cce wbgi_pse former_col lp_lat_abst
1 1 550.5092 0.359 -0.50416088 -1.3376564 No 0.0888889
2 -5 907.1852 0.504 -0.27502340 -1.5360656 No 0.3111111
3 1 2140.4829 0.668 0.08207824 1.0622551 No 0.5111111
4 -5 1178.8358 0.671 -1.06050229 -1.3677230 No 0.4333333
5 1 1904.1436 0.681 -0.93192887 -0.1513168 No 0.5222222
6 -5 1556.3955 0.701 -0.80801731 -1.0340041 No 0.4555556
# note: to change the data set you would have to assign it:
# world.data <- arrange(world.data, former_col, undp_hdi)
# the default order is ascending, for descending use:
head(arrange(world.data, desc(former_col, undp_hdi)))
h_j wdi_gdpc undp_hdi wbgi_cce wbgi_pse former_col lp_lat_abst
1 -5 6349.7207 0.704 -0.7301510 -1.7336243 Yes 0.3111111
2 -5 2856.7517 0.381 -1.2065741 -1.4150945 Yes 0.1366667
3 -5 8584.8857 0.853 -0.7264611 -1.0361214 Yes 0.3777778
4 -5 24506.4883 0.843 0.9507225 0.2304108 Yes 0.2888889
5 -5 947.5254 0.509 -1.0845362 -0.8523579 Yes 0.2666667
6 1 19188.6406 0.888 1.3267342 1.0257839 Yes 0.1455556


As promised, here's the first prototype release of Transit Authority.
For those unacquainted, Transit Authority is a casual simulation game where the object is to build and run metro systems in cities around the world.
With your feedback, once the mechanics and basic workings are solidified, I'll be finding a designer/art director to get the level of visual polish to what it needs to be.
I'd love to hear your thoughts! Did you understand the game? What confused you? Is it a weird concept for a game? What would make it more fun? Should it be more realistic? Less? What cities would you like to see featured in it? What direction would you take it in?
Thanks!
Dan
MAJOR KNOWN ISSUES
- Handicap ramp upgrade does nothing.
- There is no limit to the amount of debt your agency can take on.
- Can scroll outside the map. Crash when placing things outside the map.
- Tracks are straight lines. In the real game, they'll be curvy!
- No saving or restoring games for now.
- No way to change the number of trains running at night
- Weird pixel cracks when you zoom and scroll
MAJOR OPEN QUESTIONS
- What is the sense of progression? How does the player grow between cities? What do we unlock/discover?
- Should there be disasters/strikes/delays? What does the player do to prevent them? How do they respond to them?
- Should finance be a lesser aspect of the game? Are subsidies superflous? Should operational costs be surfaced and explored better?
- What sort of stats and analytics should be available, and how should they be presented?


Indicates if listview should support selecting of multiple items.
Boolean, default = true
If .multiselect property is set to true, the listview will allow for
multiple items selection.
This property can be defined during the listview creation:
Or any time after the listview has been created:


Node, React, Express, Pug, Sinatra, Unity, HTML, CSS, AWS, Bootstrap, Sass, Phaser, Adobe Suite, NPM, Google AdSence, Google Analytics, GTW, Terminal/Command Line & Git/GitHub


Hello, world!
This is a simple Connect Four game, Made with only jquery and bootstrap as for the purpose of practicing these skill.
It is a very simple version of traditional connect 4 game. you can only win by connecting your 4 dice in column and row.
Connect Four (also known as Captain's Mistress, Four Up, Plot Four, Find Four, Four in a Row, Four in a Line and Gravitrips (in Soviet Union)) is a two-player connection game in which the players first choose a color and then take turns dropping colored discs from the top into a seven-column, six-row vertically suspended grid. The pieces fall straight down, occupying the next available space within the column. The objective of the game is to be the first to form a horizontal, vertical, or diagonal line of four of one's own discs. Connect Four is a solved game. The first player can always win by playing the right moves..


This week, we got to learn how to create a class and everything that comes with it, like an instance variable. You can think of a class like a blueprint from which individual objects are created. For instance, a String is a class for "Hi" or "word" and a Fixnum is a class for a number.
First thing you want to do when creating a class, is define it. You can do so like you would "def" a method, the main difference is you must capitalize the class Name. Once you name your class, you need to define a method "initialize", which is the constructor. This allows you to create a new instance of your class. We can now define other instance methods to do something for our class. If you look at my example below, I've created the class "Dog", defined a method "initialize" which will take in a name for my dog, and created a method for my dog to "bark".class Dog def initialize(name) @name = name end def bark puts "Ruff-Ruff!" end end
fido = Dog.new("Fido") fido.bark
There are a ton of things you can do with classes and be very flexible with instance methods/variables. Although this was a small example, I hope this was helpful to you in some way of undestanding how classes work. Practice makes perfect and coding is no exception, so my best advice with classes is to simply practice writing them and instantiating between them!


Returns true if the given number is odd.
Install with npm:
$ npm install --save is-odd
var isOdd = require('is-odd');
isOdd(0);
//=> false
isOdd('1');
//=> true
isOdd(2);
//=> false
isOdd('3');
//=> true
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
| Commits | Contributor |
|---|---|
| 8 | jonschlinkert |
| 2 | noformnocontent |
| 1 | Semigradsky |
(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)
To generate the readme, run the following command:
$ npm install -g verbose/verb#dev verb-generate-readme && verb
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
$ npm install && npm test
Jon Schlinkert
Copyright © 2017, Jon Schlinkert. Released under the MIT License.
This file was generated by verb-generate-readme, v0.6.0, on May 27, 2017.


BLOCK REDUCER
Online
General
Block Charts
Price Chart
Volume Chart
VWAP Chart
Current Trade Chart
User management
OHLC Chart
Hidden Order
Day Chart
Year Chart
Volatility Chart
Market Sentiment Chart
Market Sentiment Chart2
Exchange Information
Deribit Information
Options1
Options2
Options3
User account
User
Sign out


Freeze increases in tuition for the next five years
$15 minimum wage for all employees of Temple University
RCM denies our colleges and schools necessary, equitable allocations and needs to be repealed
Greater transparency and accountability regarding university spending


Pages
Add New
Published
(0)
Published
(0)
Published
(0)
×
Article Deleted.
×
Pages Deleted.
-
/
Prev
Next
Status
Title
Categories
Tags
Author
Date
Views
Status
Title
|
|
Author
yyyy/mm/dd (E)
0
Edit
×
Delete Pages
Are you sure you want to delete?
Confirm


[% server.ip %] will be deleted from the pool system on [% server.deletion_on.strftime("%B %d, %Y") %]. The IP will stop being in rotation about two weeks prior to this date.
Return to overview page


Hi, I currently live in Austin and specialize in system administration of both windows and linux systems. I work with companies on their cloud deployments, maintenance, and migrations.
In my spare time I enjoy flying in in my PA-22 and playing frisbee.


References¶
GitHub. (2017). drivendata/cookiecutter-data-science. [online] Available at: `https://github.com/drivendata/cookiecutter-data-science`_ [Accessed 23 Oct. 2017]. GitHub. (2017). ffmmjj/luigi_data_science_project_cookiecutter. [online] Available at: `https://github.com/ffmmjj/luigi_data_science_project_cookiecutter`_ [Accessed 23 Oct. 2017]. GitHub. (2017). tdeboissiere/cookiecutter-deeplearning. [online] Available at: `https://github.com/tdeboissiere/cookiecutter-deeplearning`_ [Accessed 23 Oct. 2017]. Ropensci.github.io. (2017). Reproducibility Guide. [online] Available at: `http://ropensci.github.io/reproducibility-guide/sections/introduction/`_ [Accessed 23 Oct. 2017]. Conda.io. (2017). Conda — Conda documentation. [online] Available at: `https://conda.io/docs/index.html`_ [Accessed 23 Oct. 2017]. GitHub. (2017). theskumar/python-dotenv. [online] Available at: `https://github.com/theskumar/python-dotenv`_ [Accessed 23 Oct. 2017].


Before Change
f"{linters_with_multiple_reports}. The option `--lint-reports-dir` only works if "
f"each linter has a single result. {suggestion}"
)
reports = itertools.chain.from_iterable(linter_to_reports.values())
merged_reports = await Get(Digest, MergeDigests(report.digest for report in reports))
workspace.write_digest(merged_reports, path_prefix=lint_subsystem.reports_dir)
logger.info(f"Wrote lint result files to {lint_subsystem.reports_dir}.")
After Change
)
// We consolidate all results for each linter into a single `LintResults`.
all_results = tuple(
LintResults(
itertools.chain.from_iterable(
per_target_results.results for per_target_results in all_linter_results
),
linter_name=linter_name,
)
for linter_name, all_linter_results in itertools.groupby(
all_per_target_results, key=lambda results: results.linter_name
)
)
else:
all_results = await MultiGet(
Get(LintResults, LintRequest, lint_request) for lint_request in valid_requests
)
all_results = tuple(sorted(all_results, key=lambda results: results.linter_name))
reports = list(itertools.chain.from_iterable(results.reports for results in all_results))
if reports:
// TODO(/): Tolerate when a linter has multiple reports.
linters_with_multiple_reports = [
results.linter_name for results in all_results if len(results.reports) > 1
]
if linters_with_multiple_reports:
if lint_subsystem.per_target_caching:
suggestion = "Try running without `--lint-per-target-caching` set."
else:
suggestion = (
"The linters likely partitioned the input targets, such as grouping by Python "
"interpreter compatibility. Try running on fewer targets or unset "
"`--lint-reports-dir`."
)
raise InvalidLinterReportsError(
"Multiple reports would have been written for these linters: "
f"{linters_with_multiple_reports}. The option `--lint-reports-dir` only works if "
f"each linter has a single result. {suggestion}"
)
merged_reports = await Get(Digest, MergeDigests(report.digest for report in reports))
workspace.write_digest(merged_reports)
logger.info(f"Wrote lint result files to {lint_subsystem.reports_dir}.")
exit_code = 0
if all_results:
console.print_stderr("")
for results in all_results:
if results.skipped:
sigil = console.yellow("-")
status = "skipped"
elif results.exit_code == 0:
sigil = console.green("✓")
status = "succeeded"
else:
sigil = console.red("𐄂")
status = "failed"
exit_code = results.exit_code
console.print_stderr(f"{sigil} {results.linter_name} {status}.")
return Lint(exit_code)


Darrell Clarke: Walsall draw a fair result
Walsall manager Darrell Clarke has admitted the 0-0 draw with Stevenage was a ‘fair result’ after a game of two halves.
by Liam KeenAlthough neither side created a plethora of chances in the first 45 minutes, Stevenage edged the performance and had most of the possession.
But after introducing James Hardy and Danny Guthrie at half time, the Saddlers were far more effective in the second half, going close on several occasions.
Guthrie had a free-kick that rattled off the bar in injury time but the teams shared the points.
And Clarke felt the result was fair in the end.
“I thought we were very poor first half,” he said.
“I made a couple changes to freshen things up a little bit because I don’t think we ever got going first half.
“They slightly edged the first half.
“Second half, barring a goalmouth scramble they had, they didn’t really cause us any problems.
“We’ve had plenty of opportunities to score a goal.
“In reflection of the game, it’s probably a fair result.
“They’re the fine lines of the game.
“I’ve watched four or five Stevenage games and they’ve been in every game, their form of late has picked right up.
“I think they’ll soon clear themselves away from the danger zone.
“With ourselves, I thought we needed a little bit more life in the second half and we got that.
“A bit of quality in the final third but it was good defending from both teams to be honest.
“Our back four and goalkeeper defended very well and some of their lads had a good game defensively.
“A game where defenders were on top.”
Experienced midfielder Guthrie, who put in a superb 45 minute showing, expressed his frustration after the final whistle as the Saddlers failed to score a winning goal.
“We are frustrated,” he said.
“We want to win every game at home.
“Another clean sheet which is a positive, they had chances to be fair to them.
“We had chances to win the game but we take a point and we’re five unbeaten.”