I Alone Level-up: Chapter 31
“Yes, all of the prisoners are C-rank, but the HSD Hunter is a B-rank, so there’s nothing to worry about . ”
Kim Sangshik relented and nodded . It was a basic theory that you needed at least 10 C-rank Hunters to defeat a single B-ranker . If such a B-ranker was offering to not only watch the prisoners but also help with the Raid, there was nothing to complain about .
‘A single B-ranker and three C-rankers…’
Jinwoo stared at the HSD Hunter and the prisoners with confusion .
‘Something’s weird . ’
There was a strange killing intent spilling forth from one of them . Was this an effect of the sense stat, or was he just imagining things out of worry? Whatever it was, Jinwoo could not help but feel uneasy .
He whispered to Juhee,
“Juhee-ssi, please don’t go on this Raid . ”
She looked around then responded,
“What about you?”
He answered her question with a question,
“If I go?”
“Then I’m also going . ”
Her face was determined to follow him .
‘I understand you’re worried about me, but…’
Having experienced her stubbornness in the past, Jinwoo relented .
‘I suppose everything should be alright if I’m there . ’
After all, he had single handedly defeated Hwang Dongseok’s party, which included 5 C-rankers .
Jinwoo nodded,
“Alright . Alright . ”
The HSD Hunter finished with the documents then appeared before all the Hunters .
“I’m Kang Taeshik of the Hunter Surveillance Department . I’m sure you’ve already heard the situation . I’ll be keeping a close eye on them, so don’t worry about those bastards . ”
He gestured towards the prisoners, and they came to him and held out their cuffed hands . One by one, Kang Taeshik uncuffed them .
“Aw man, that was really uncomfortable . ”
“You can’t drag us around like this . We’re not slaves, ya know?”
The freed prisoners rubbed their wrists and complained . Ignoring them, Kang Taeshik turned toward the Hunters .
“Who’ll be leading the Raid today?”
Having taken the responsibility normally, Song Chiyeol half-heartedly raised his hand .
Kang Taeshik nodded,
“Understood”
With Song Chiyeol in front, the Hunters started entering the Gate .
“Let’s go . ”
Jinwoo and Juhee also stood before the Gate . Remember her last trip into a Dungeon, Juhee lightly held on to Jinwoo’s sleeves as they entered .
. .
The Dungeon this time was filled with goblins . Faced against the weakest humanoid type magic beasts, the Raid was a lot easier than expected .
screech!
scree-!
Even before he had powered up, Jinwoo could take on these bizarre looking things . He carefully defeated of them one by one . His combat prowess surprised Juhee and Song Chiyeol, who had not remembered him like this .
“Whoa~”
Jinwoo was using the bare minimum power required, as to not get noticed, but the difference between his old self was still noticeable .
Juhee approached him and asked,
“Have-have you been learning somewhere?”
“That’s er… I’ve been running every day . ”
“Running?”
Juhee was confused, but it wasn’t exactly a lie .
‘But… I’m not getting any experience points…’
screech!
| The enemy’s level was too low . You’ve gained no experience points . . |
screech!
| The enemy’s level was too low . You’ve gained no experience points . . |
Jinwoo was disappointed . All he kept getting was the message that the goblins’ levels were too low .
‘At this rate…’
Even worse, the magic cores from the goblins were the lowest tier possible . Jinwoo looked around . Excited at the freedom of movement after a long time, the prisoners were going all out on the goblins .
screech!
screeee!
It was hard to tell who was the human and who was the beast .
‘Looks like I don’t have to do that much . ’
Still, he wasn’t getting experience or good income . This concerned Jinwoo,
‘If it’s going to be like this all the time, should I just leave the Association?’
The Raids under the Association were mostly D-rank or E-rank Gates, and if he was not getting any experience points in those low-level Dungeons, there was no point to staying with the Association .
‘And at this point, I can easily take care of mother’s hospital bills…’
He could leave the Association whenever he wanted . This was why having money was good . It allowed Jinwoo more freedom in the paths that he could take .
While he was lost in thought, the party had ventured deep into the Dungeon .
“Huh?”
“Hmm…”
They came across three different paths . Kang Taeshik suggested to Song Chiyeol,
“The Dungeon’s difficulty is rather low . Shall we split up here?”
“Sounds good . ”
Song Chiyeol agreed . Jinwoo closed his eyes and focused his senses .
‘Now which path leads to the boss?’
He had hoped at least the boss would give him some small amount of experience . Soon, the energy of the various lifeform in the Dungeon entered his senses . Opening his eyes, Jinwoo told Song Chiyeol,
“Ahjussi, let’s go to the left path . ”
“Alright . ”
Jinwoo, Juhee and Song Chiyeol chose the left path . Kang Taeshik and the prisoners chose the right path . The remaining two went down the middle path .
Jinwoo’s heartbeat increased slightly .
‘The boss is at the end of this path . ’
It couldn’t be called strong, but it definitely gave off a tougher presence than the goblins . Jinwoo wanted to get to the boss quickly . But just after taking few steps into the left path, a group of goblins appeared and blocked their way .
“Kikik . ”
“Kiriririk . ”
“Kiiik . ”
There was about ten of them . Holding wooden clubs, wooden swords and wooden staves, the goblins gave absolutely no sense of danger to Jinwoo .
‘Aren’t they tired of this?’
Jinwoo scrunched his face in annoyance . These worthless things that ran at him with no experience points or money were just a thorn at his sides .
“There are ten of them…”
“What should we do? Should we group with the others and come back?”
However, the other two with him were taking it much more seriously .
“Well, since they’re just goblins, we should just give it a go . ”
“Hmm… Okay . ”
A fireball appeared in Song Chiyeol’s hand and Juhee began preparing her healing magic .
‘Now that I think about it, I’ve never been this relaxed in a Dungeon before…’
Was it because he had become incomparably stronger? Applied to a familiar situation from his old life, Jinwoo finally began to feel the changes that he was undergoing .
Song Chiyeol interrupted his thoughts,
“Sung-ssi, are you ready?”
“Yes . ”
Jinwoo matched the pace of his teammates and slowly stepped up towards the goblins . Suddenly, a scream rang forth from somewhere .
“Uwaaaak!”
“Ahhhh!”
It wasn’t goblin . It was a human scream . Jinwoo and co . looked at each other . Just as they thought the screams had died out, another one rang forth .
“Ahhhhhh!”
Song Chiyeol’s face hardened,
“Let’s go check it out . ”
The three Hunters quickly ran towards the direction of the scream . Jinwoo could’ve easily went ahead of the two but decided to match their speed for their safety . After running for some time, they came across the source .
Juhee discovered someone and shouted,
“Over there! Someone is…”
The HSD Hunter Kang Taeshik was kneeling on the ground, covered in blood . He shouted at the approaching party,
“B-be careful! Those bastards are still around somewhere!”
Appearing to have shouted with the last bit of his strength, Kang Taeshik collapsed face-down onto the ground . Unable to ignore him, Juhee quickly ran toward his body .
“I’ll heal him!”
Even after everything she had gone through, Juhee still held pride as a B-rank Healer . Even if there were enemies around, her healing would be quick . She concluded that it would be best to heal Kang Taeshik before they could attack .
“Please just wait .
It was in that moment, Kang Taeshik shot up from the ground and stretched a hand filled with magic power toward Juhee’s throat .
woosh!
Before his hand could reach Juhee’s throat, someone grabbed his wrist in the nick of time .
grab!
“Ah…!”
Taking few steps backwards in surprise, Juhee fell onto the ground .
Kang Taeshik was surprised .
‘Someone stopped my attack at this distance?’
It was easy for a higher-ranking Hunter to dispose of a lower-ranking one . That’s why his first target was the female Hunter, who was a B-ranker like him . Fortunately for him, she was a noncombat-class Hunter, so he had expected to take care of her easily through a surprise attack .
But his attack… was stopped .
The efforts he put toward acting disappeared in a puff of smoke .
Kang Taeshik’s eyes followed the hand holding his wrist to Jinwoo’s face . Jinwoo’s eyes were filled with murderous intent .
Kang Taeshik’s other fist flew towards Jinwoo’s face, but the man easily turned his head and dodged the attack .
‘What?’
Kang Taeshik threw aside Jinwoo’s grip with strength .
“What?”
Jinwoo was also surprised . It was a strength worthy of a high-ranking Hunter .
Having freed himself from Jinwoo’s hands, Kang Taeshik rained his fists upon him mercilessly . Not losing to his speed, Jinwoo dodged and counterattacked .
Hit! Strike! Woosh! Bam! Pow!
The two men ceaselessly traded and evaded each other’s blows . Neither of them backed off .
While they were fighting, Song Chiyeol grabbed Juhee and pulled her away from the danger .
“A-ahjussi…”
Juhee could not speak, stunned . Song Chiyeol was even more surprised than her .
‘How is this possible…?’
Their offense and defense were happening at an unbelievable speed . It was too fast even to track with his own eyes . The high-ranking Hunter’s movements made sense, but Sung Jinwoo was not the man he had remembered . The young man was keeping up with the B-ranker .
‘His speed is too fast even for this C-ranker’s eyes!’
He was correct on his feelings earlier . The Jinwoo that was fighting before him was not the same weak E-ranker from before .
Having traded dozens of exchanges in a blink of an eye, the two fighters backed away from each other to catch their breath .
Jinwoo looked at Kang Taeshik with narrowed eyes,
“The blood on your clothes… It’s not yours, is it?”
Kang Taeshik rubbed his wrists replied,
“That’s right . It’s those fuckers’ blood . Putting that aside, to think that I’d meet a Hunter like you here . ”
He was truly awed . He had no idea that there was an Association-affiliated Hunter that was a high-ranker .
‘This is not good . ’
He had thought that today was the best opportunity to act, but Jinwoo’s appearance had thrown a wrench in his plans .
Kang Taeshik asked out of curiosity,
“Who are you? What’s your ranking?”
Jinwoo summoned Casaka’s Poisoned Fang in his hand and answered .
“Sung Jinwoo . E-rank . ”


My name is Summer Poissonnier and I am a junior at Florida Atlantic University. I am currently studying at the College of Engineering to get my Bachelor's Degree in Computer Science.
I dual-enrolled at Palm Beach State College during my junior and senior years of high school. I graduated from Jupiter High School in 2019.
Education
- High School Diploma, Jupiter High School 2019
- Dual Enrollment, Palm Beach State College
Work Experience
- Babysitter 2012-2020
- Sales Associate, Spirit Halloween 2018
- Sales Associate, Spirit Halloween 2019
Clubs and Organizations
Future Career Choices:
| Jobs | Description |
|---|---|
| Software Developer | Develop applications and systems |
| Computer System Analyst | Evaluates computer systems |
| Cyber Security | Protect networks, programs, and devices from cyber attacks |


More our Project Websites you can search in Internet!
contact info
To learn more about this free Project designed by TurboPlayFlower Inc.
contact form
Main Department:Phone: 1-518-312-4162
To learn more about this free Project designed by TurboPlayFlower Inc.


---
layout: landing-page
---
{% include JB/setup %}
Oops!
Sh
it
{% if page.tagline %}
Error 404
{% endif %}
We can't seem to find the page you're looking for.Error code: 404
The page you've tried to find does not exist or has been removed. We apologize greatly for the inconvenience! Here some usefull links.


--- title: Downloading PDFs for Roll Call votes keywords: fastai sidebar: home_sidebar summary: "The roll call votes of the plenary of the EU parliament are stored freely available online. So let's go and collect them with `requests` and `bs4`." description: "The roll call votes of the plenary of the EU parliament are stored freely available online. So let's go and collect them with `requests` and `bs4`." nb_path: "nbs/00_downloading_pdfs.ipynb" ---
TODO:
Defining the site where everything is stored
Identifying the links
%%time
rcv_pdfs, vot_pdfs = identify_links_for_pdfs(URL)
%%time
link = rcv_pdfs[0]
download_file(link)
Collecting all files
%%time
collect_multiple_files(rcv_pdfs, dt=.01)


Include CSS
First, include CSS files into your HTML head:
Include Javascript
Include file t-scroll.min.js
into the footer.
Set HTML
if you need setTimeout
, you need insert the container attribute data-t-show="..."
Or you want to 'data-t-show'
run see first screen. You have to add '.t-animated'
Call the function


COM6507 Software and Hardware Verification
| Summary |
This module introduces state-of-the-art software and
hardware verification techniques which nowadays are widely
used in industry. They are particularly important in
safety-critical applications, where system failures can not
be tolerated. Designing high quality dependable computing
systems is widely believed to be the main challenge in
computer science. Particular focus is on protocol
verification and hardware design verification by model
checking and program verification by formalisms such as
Hoare logics. These techniques presume formal system
specifications and use automated tools for analysing whether
a system satisfies the properties required or imposed. Students should be aware that there are limited places available on this course. |
| Session |
Spring 2018/19 |
| Credits |
15 |
| Assessment |
Exam 100% |
| Lecturer(s) |
Prof. Georg Struth |
| Resources |
|
| Aims |
- To develop an understanding of hardware design and
protocol verification by model checking as well as
program verification by formalisms such as Hoare logics
and separation logic.
- To study model checking concepts such as temporal
logic formulas, state space, reachability algorithms,
automata theory, BDD algorithms, principles of hardware
verification, and examine case studies with Promela and
SPIN.
- To study program development and verification
concepts like: assertions (pre- and post-conditions,
invariants), Hoare logics and simple programming
constructs, partial and total correctness, separation
logic.
- To discuss current research topics in hardware and
software verification.
|
| Objectives |
By the end of this module, a candidate will be able to
- Understand the fundamental theory underlying hardware
and software verification
- Appreciate the scope, potential and limitations of
hardware and software specification and verification
- Be able to construct formal specifications for
hardware and software systems, develop appropriate
verification mechanisms and algorithms
- Utilise adequate tools and languages to formally
verify hardware and software systems
- Develop his/her capacity to specify, analyse, verify
and reason about different computing systems
- Have an understanding of current hardware and software
verification research problems and topics
|
| Content |
- Week 1: Introduction and automata-theoretic background
- Week 2-5: Automata-based and symbolic model checking
(linear temporal logic, Buchi automata, BDDs, model
checking algorithms)
- Week 6-10: Program verification based on theorem
proving (Hoare logic, partial and total correctness
semantics, interactive theorem proving, refinement,
separation logic)
|
| Teaching Method |
2 formal lectures plus 1 exercise/tutorial session per week. |
| Feedback |
Weekly feedback is provided in the exercise/tutorial sessions. |
| Recommended Reading |
A long list of reading material is available from the course web site. |
|


--- layout: page ---
Come celebrate the birth of Christ at our candle light Christmas Eve service.
7pm Dec 24th
At Providence Hall High School 4550 W Mount Ogden Peak Dr Herriman, UT 84096


Select additional folders that contain the source code files of the job. Since the plugin also reads the affected source code files it needs to copy these files from the agent to the controller. If these files are not part of the workspace (or checked out into a sub folder of the workspace) they are not automatically found. So you can add one or more source code directories where the plugin tries to find these files. You can add relative paths in the workspace root, absolute paths, or expressions using the glob or regexp syntaxes that are supported by the Java FileSystem#getPathMatcher implementation. Note, that due to security restrictions additional paths outside the workspace need to be registered in Jenkins system configuration before they can be used here.
Examples for the syntax and pattern property:submodule/src/main/java
in the Jenkins workspace.
src/main/java
.
sources
and end with the text src/main/java
.


Gauteng police condemn a case of mob justice after domestic dispute
by Canny MaphangaGauteng police have condemned a case of mob justice after a domestic dispute which occurred in Vanderbijlpark on Monday morning.
Members of the public allegedly attacked a man who is accused of trying to murder his partner.
"She is in a critical condition in the intensive care unit [ICU] after sustaining third degree burns. The community only called the police after attacking the man," police spokesperson Brigadier Mathapelo Peters said in a statement on Tuesday.
News24 earlier reported the woman was set alight in an alleged domestic dispute and her suspected attacker was assaulted by members of the public at a block of flats in Becquerel Road.
ALSO READ: Woman set alight, alleged attacker assaulted by public in Vanderbijlpark
The 48-year-old was subsequently arrested for attempted murder.
"It is alleged that the suspect doused the woman with flammable liquid and set her alight. The woman was rushed to hospital and immediately admitted in the ICU after sustaining third degree burns," Peters added.
The suspect, who is currently under police guard, was admitted to hospital following the attack by members of the public.


{{ feature.title }}
{{ feature.content }}
--- intro: header: Cybersecurity consulting and implementation for compliance-heavy organizations subheader: > Nick McLarty Technologies specializes in cyber and information security program reviews, assessing organizational compliance with industry and governmental standards, and developing comprehensive solutions to fully implement administrative, operational and technical controls to achieve full compliance with most common information security standards. action: Learn More portfolio: header: Portfolio of Services featured: - title: Compliance Assessments content: > We have the expertise to perform comprehensive compliance assessments against nearly any documented standard. image_url: images/thumbs/compliance.jpg - title: Cybersecurity Program Development content: > We will develop a customized, ready-to-implement cybersecurity program tailor-made to your organization's policy and operational requirements. image_url: images/thumbs/program-dev.jpg - title: Technical Gap Analysis content: > We can work with your staff to identify areas for improving line of business efficiency while maintaining compliance with applicable standards. image_url: images/thumbs/refresh.jpg contact: header: Get in Touch subheader: > The first step in pursuing an engagement is to contact us with a brief description of your organization and the work you are seeking. We will work with you to craft a custom-fit solution to meet your requirements. ---
{{ page.intro.subheader }}
{{ feature.content }}
{{ page.contact.subheader }}


Using Subtests and Sub-benchmarks in Go
Oct 22, 2016In this post we will walk through an example of how to use the new subtests and sub-benchmarks functionality introduced in Go 1.7.
 For example, if we wanted to test the function:
func Double(n int) int {
return n * 2
}
Then we could write a table driven test as follows:
func TestDouble(t *testing.T) {
testCases := []struct {
n int
want int
}{
{2, 4},
{4, 10},
{3, 6},
}
for _, tc := range testCases {
got := Double(tc.n)
if got != tc.want {
t.Errorf("fail got %v want %v", got, tc.want)
}
}
}
Note: The test case {4, 10} is present to make the test fail, 4 * 2 != 10 😃.
If we run this test, we get the following output:
$ go test -v
=== RUN TestDouble
--- FAIL: TestDouble (0.00s)
example_test.go:25: fail got 8 want 10
FAIL
exit status 1
FAIL example 0.005s
The problem here is that we don’t know which table test case failed. It would be better, if we could identify a table test case, and display its name in the output if it fails.
This is what subtests in GO 1.7 allow us to do. The testing.T type now has a Run method, were the first argument is a string (the name of the test). And the second argument is a function. Below we re-implement the above test, using the Run method:
func TestDouble(t *testing.T) {
testCases := []struct {
n int
want int
}{
{2, 4},
{4, 10},
{3, 6},
}
for _, tc := range testCases {
t.Run(fmt.Sprintf("input_%d", tc.n), func(t *testing.T) {
got := Double(tc.n)
if got != tc.want {
t.Errorf("fail got %v want %v", got, tc.want)
}
})
}
}
A few things to note here are that one, we are setting the name of the test to the ‘n’ value of the test case. So our tests are named “input_2”, “input_3” and “input_4”. And two, for the second parameter we are passing in a closure which has the same method signature as a normal test.
If we run this test, we get the following output:
$ go test -v
=== RUN TestDouble
=== RUN TestDouble/input_2
=== RUN TestDouble/input_3
=== RUN TestDouble/input_4
--- FAIL: TestDouble (0.00s)
--- PASS: TestDouble/input_2 (0.00s)
--- PASS: TestDouble/input_3 (0.00s)
--- FAIL: TestDouble/input_4 (0.00s)
example_test.go:43: fail got 8 want 10
FAIL
exit status 1
FAIL example 0.006s
This time we get a more detailed output, we can see that “input_4” was the failing test case from the table. And the pass/fail status of each individual table test case.
We can run a subset of our table tests, by matching the unique names set for them (the first parameter to the Run method), as follows:
$ go test -v -run="TestZap/input_2"
=== RUN TestZap
=== RUN TestZap/input_2
--- PASS: TestZap (0.00s)
--- PASS: TestZap/input_2 (0.00s)
PASS
ok example 0.008s
Running many tests, by matching the test names:
$ go test -v -run="TestZap/input_[1-3]"
=== RUN TestZap
=== RUN TestZap/input_2
=== RUN TestZap/input_3
--- PASS: TestZap (0.00s)
--- PASS: TestZap/input_2 (0.00s)
--- PASS: TestZap/input_3 (0.00s)
PASS
ok example 0.006s
Here “input[1-3]” matched _“input2” and _“input3” but not _“input4”.
Sub-benchmarks
Unlike table driven testing there was no equal approach for benchmarking. But now in Go 1.7, we have the ability to create table driven benchmarks. Imagine we need to benchmark the following function:
func AppendStringN(s string, n int) {
a := make([]string, 0)
for i := 0; i < n; i++ {
a = append(a, s)
}
}
We can define a top-level benchmark function like this:
func BenchmarkAppendStringN(b *testing.B) {
benchmarks := []struct {
fruit string
n int
}{
{fruit: "apple", n: 10},
{fruit: "pear", n: 20},
{fruit: "mango", n: 40},
{fruit: "berry", n: 60},
{fruit: "banana", n: 80},
{fruit: "orange", n: 100},
}
for _, bm := range benchmarks {
b.Run(bm.fruit, func(b *testing.B) {
for i := 0; i < b.N; i++ {
AppendStringN(bm.fruit, bm.n)
}
})
}
}
The Run methods signature is the same as described above. But for the testing.B type, rather than the testing.T type. Our benchmark names are set to “apple”, “pear”, “mango”, etc…
If we run this benchmark, we get the following output:
$ go test -v -run="xxx" -bench=.
BenchmarkAppendStringN/apple-8 3000000 495 ns/op
BenchmarkAppendStringN/pear-8 2000000 713 ns/op
BenchmarkAppendStringN/mango-8 1000000 1101 ns/op
BenchmarkAppendStringN/berry-8 1000000 1156 ns/op
BenchmarkAppendStringN/banana-8 1000000 1803 ns/op
BenchmarkAppendStringN/orange-8 1000000 1153 ns/op
PASS
ok example_test 9.428s
An important thing to note is that, each time b.Run is invoked it creates a separate benchmark. The outer benchmark function (BenchmarkAppendStringN) is only run once and it is not measured.
One last thing to mention is that, like subtests. You can run individual benchmarks by there set unique names. Below, we run just the “berry” benchmark:
$ go test -v -run="xxx" -bench="/berry"
BenchmarkAppendStringN/berry-8 1000000 1143 ns/op
PASS
ok subtestbench 1.165s
I hope you have found this blog post helpful.
Fin.


No news, as the title and aphorism declare, is often good news. Like many internet users, reading the news online has become a passive activity for me. I find myself checking news sites when I have 30 seconds to kill, for no reason in particular. When the actual news airs on television, on the few occasions when I happen to catch it, I find myself secretly enjoying that I am so “plugged in” the news is ancient history by the time the TV gets ahold of it.
I read it all: HuffPo to Drudge, Al Jazeera to Haaretz, Google News to /r/worldnews, and everything in between. I don’t favor right wing or left, American or European, I read it all. It’s been so bad that I’ve even read British tabloids.
It is what I do.
Rather, it is what I did.
In one of my recent news binges - sometimes they last hours - I had read the tragic story of Aaron Swartz, a story that ends with a young man taking his own life. I had never met this man, nor did I know much about him, but the articles touted him as a co-founder of one of my favorite hangouts on the internet: reddit. I don’t want to delve too far into his story here, but I would encourage you to research it if you are not familiar with it already. I do, however, want to talk about one essay I stumbled across while feeding my news binge with every thing I could learn about this troubled young man.
The essay I read was: I Hate the News, a piece Aaron had written in October of 2006.
It hit me in the gut.
While the entire essay is worth reading, multiple times, things really started to hit home when he began to persuade that the news is actually harmful, if by no other means than wasting my time.
With the time people waste reading a newspaper every day, they could have read an entire book about most subjects covered and thereby learned about it with far more detail and far more impact than the daily doses they get dribbled out by the paper. But people, of course, wouldn’t read a book about most subjects covered in the paper, because most of them are simply irrelevant.
Another way to look at this would be: if I replaced the time I waste everyday reading about inconsequential things and instead spent that time learning, I could greatly impact my life with new knowledge. Instead of reading about some politician’s errant tweets on CNN, I could be learning about hydrodynamics. Well, maybe.
Reading the news everyday does not make me a better human. It does not make me a happier one, either. The news is depressing, and it is that way by design. We like reading about homicides, thefts, wars, and riots; if we did not, they would not print it. Aaron continues:
The news’s obsession with having a little bit of information on a wide variety of subjects means that it actually gets most of those subjects wrong. (One need only read the blatant errors reported in the corrections page to get some sense of the more thorough-going errors that must lie beneath them. And, indeed, anyone who has ever been in the news will tell you that the news always gets the story wrong.) Its obsession with the criminal and the deviant makes us less trusting people. Its obsession with the hurry of the day-to-day makes us less reflective thinkers. Its obsession with surfaces makes us shallow.
Subjecting myself to hours of tiny morsels of psuedo-facts dipped in sociopathic hollandaise is no way to live. I am not saying all news is bad news, but after thinking about this for a while, it is obvious I could cut back. The news does not help my creativity, happiness, health, wellness, or mental stability. Instead of being a passive activity, confronting the news should have a time and place.
Enter NoNews - the browser extension to save my (and your) happiness.
I’ve flirted with the idea of creating a browser extension for Google Chrome for quite some time. After realizing my new found desire to avoid reading news sites would directly clash with my lack of will power, I decided to do what any lazy programmer would do: make some software to do it for me!
Once installed, NoNews filters the sites visited by your browser, and issues a warning page whenever you attempt to view a news site. For me, passive browsing has introduced me to countless depressing stories that have little direct impact on my life - I just click, read, rinse, and repeat. NoNews is designed to break this vicious cycle, reminding the user that this behavior is potentially harmful.
Recognizing that not all news is bad news, or unavoidable, I did include a couple of overrides. First of all, every warning page has the ability to continue on to the news source using a one time pass. The other option is the snooze bar, which disables the NoNews filter for 15 minutes, allowing unbridled access to all the news that is news.
Screenshot of blocked URL with red bypass button and snooze bar popup open.
Just like the news, NoNews is free. Unlike the news, I hope it makes you happy. You can get NoNews in the Google Chrome Web Store (free), or check out the source code on GitHub. If you are a developer, stay tuned, the next blog post is (planned to be) all about the NoNews source code.
 For the past couple of weeks I have been leaving NoNews activated in my browser while I have been developing it on the side. I really expected this project to be a learning experience in building browser extensions, and not really yield a product I would use. I picked the news blocker as a way to create something small, open source, and meaningful as a tribute to someone who contributed so much to the online world I sometimes take for granted. What I have found is that using NoNews actually works for me, and I plan to leave it on and installed. I now pick and choose my news more carefully, and limit the amount of time I spend reading about the latest war, riot, or scandal. I think it has contributed to my overall happiness, productivity, and focus - I hope it does for you also.
comments powered by Disqus
Related Posts
- 3 Day Startup San Antonio at Geekdom (Summer 2013)
- Introduction to Graph Databases using Neo4j
- The day the music went blind
- Darth Vader Dreams of Electric Sheep
- Homemade Ginger Ale that is so easy (even a 7 year old can do it)
- HTML5 Snake source code walkthrough
- My first game - HTML5 lightcycles
- NoNews Part II - The Source
- Jekyll is just what the doctor ordered


Encapsulation
Inheritance
Implementation Inheritance
: Means that data and methods defined on a parent class are available on objects created from classes that inherit from those parent classes.Prototypal Inheritance
: Means that JS uses prototype objects to make its implementation inheritance
actually work.class Charity {}
class Business {
toString() {
return "Give us your money.";
}
}
class Restaurant extends Business {
toString() {
return "Eat at Joe's!";
}
}
class AutoRepairShop extends Business {}
class Retail extends Business {
toString() {
return "Buy some stuff!";
}
}
class ClothingStore extends Retail {}
class PhoneStore extends Retail {
toString() {
return "Upgrade your perfectly good phone, now!";
}
}
console.log(new PhoneStore().toString()); // 'Upgrade your perfectly good phone, now!'
console.log(new ClothingStore().toString()); // 'Buy some stuff!';
console.log(new Restaurant().toString()); // 'Eat at Joe\'s!'
console.log(new AutoRepairShop().toString()); // 'Give us your money.'
console.log(new Charity().toString()); // [object object]
The nuts and bolts of prototypal inheritance
class Parent {
constructor() {
this.name = "PARENT";
}
toString() {
return `My name is ${this.name}`;
}
}
class Child extends Parent {
constructor() {
super();
this.name = "CHILD";
}
}
const parent = new Parent();
console.log(parent.toString()); // my name is Parent
const child = new Child();
console.log(child.toString()); // my name is Child
Polymorphism
SOLID is an anagram for:
The Single-Responsibility Principle
The Open-Close Principle
The Liskov Substitution Principle
The Interface Segregation Principle
The Dependency Inversion Principle
Single-Responsibility Principle
A class should do one thing and do it well
The Liskov Substitution Principle
Subtype Requirement: Let ϕ(x) be a property provable about objects x of type T. Then ϕ(y) should be true for objects y of type S where S is a subtype of T.
You can substitute child class objects for parent class objects and not cause errors.
The Other Three
The remaining three principles are important for languages that have static typing
- which means a variable can have only one kind of thing in it.
Open-Close Principle
A class is open for extension and closed for modification.
Interface Segregation Principle
Method names should be grouped together into granular collections called “interfaces”.
Dependency Inversion Principle
Functionality that your class depends on should be provided as parameters to methods rather than using new in the class to create a new instance.
Coupling
: The degree of interdependence between two or more classes.Here is the formal definition:
A method of an object can only invoke the methods (or use the properties) of the following kind of objects:
You cannot cheat by seperating extra calls onto different lines.
When to ignore the Law of Demeter


--- layout: default title: "About us" permalink: /about/ ---
In 2014 the University of Heidelberg and the Max Planck Institute for Astronomy (MPIA) together with the Santander Bank organised a summer school, "Reaching the limits of the sky, astronomical instrumentation in the 21st Century".
This summer school addressed recent developments in adaptive optics and interferometry with an emphasis on VLTI and E-ELT instrumentation. Over the course of two weeks, eighteen students from Europe and Latin America gathered in Santiago, Chile, to learn from experts, socialise and learn about other areas of instrumentation from each other. In addition they were given a guided tour of the ESO facilities at Paranal observatory.
Attendees and organisers of the 2014 Summer School, "Reaching the limits of the sky, astronomical instrumentation in the 21st Century".
In 2015, half of the students met in Heidelberg to give talks, socialise and visit the facilities at MPIA and the Landessternewarte, Heidelberg, Germany. Following this first unofficial meeting, the idea grew to start a yearly gathering for instrumentation graduates and early postgraduates to network, visit institutes involved in instrumentation for astrophysics and learn about other fields within astronomical instrumentation.
We therefore built NYRIA for Network of Young Researchers in Instrumentation for Astrophysics. This network focuses on ground-based instrumentation in the visible-infrared domain.
The next generation of telescopes and instruments will be built by large international consortia. Therefore, it is essential that the next generation of astronomical instrumentalists get to know each other in preparation for working in these groups. To this end we aim to make these meetings annual and hope that the network of early career researchers grow and strengthen. This will allow us to update our research and findings, exchange ideas and discuss recent developments in everyone’s field. The topics will span from hardware and software, to topics as diverse as wavefront sensing, coronagraphy, spectroscopy, fiber optics, and post-processing techniques to reach the limit of current and future instruments.


Backgrounder |
- I am an artist, designer, and engineer based in San Mateo, California, just south of San Francisco.
- I started out as an artist, studied industrial design, worked as a computer animator, went into management, then became a web designer and engineer.
- Now, I run some web stores and contract out for web projects and computer art.
|
|
Things I Like |
- Linux/Apache
- Java/JSP, Perl/Mason
- EMACS
- TextPad
- 77 Columns
- Animation
- Sub Division Modeling
- Procedural Shaders
- Particle Systems
- Special Effects
- Writing
- Making Furniture
- Sunny Days
- Relaxing
|
|
What I've Learned |
- Process is the key to consistent success
- Practice, reflection, and persistence will make you effective in any endeavour
- Design for the solution, not yourself
- The data is the hierarchy
- Make time for yourself and others
- All things will pass
- Only one thing is that important - everything else, is just some version of the same thing
|
|
|


Hello! Welcome to the trivia page. We will have the great trivia about the great and legendary Principalz! The first person to get all 15 questions correct will be the receiver will get $10. Good luck!


 Please allow up to 20 working days for processing. You can see the status of the application on the dashboard and view a read-only version of the application details. You may receive requests for amendments to the application, at which point you will be able to modify the content and resubmit.
{% if show_invoice %}Note that if your licence requires payment, the invoice must be paid before the licence can be issued. You can download the invoice from the links below.
{% endif %}Once processing is complete, you will be notified via email and a PDF copy of the licence will be attached.
Should you need to contact the Department of Parks and Wildlife with regard to your licence application, please cite the lodgement number shown below.
{{ application.licence_type.name }}
{{ application.lodgement_number }}-{{ application.lodgement_sequence }}
{{ application.lodgement_date|date:'d/m/Y' }}
{% if show_invoice %} {% endif %}


{{ partial "header.html" . }} {{ partial "navbar.html" . }}
Get your tickets early and guarantee your entrance to the largest Go conference in the world.
Ensure that 2016 is the best to date and become a sponsor.


Credits - Observable Markov models
by Will Paul Project | Docs
License Simplified BSD
Copyright (c) 2015, Will Paul
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

Content
Most of what I know about Markov processes is from Jurafsky and Martin's NLP textbook:
Daniel Jurafsky and James H. Martin. 2000. Speech and Language Processing: An Introduction to Natural Language Processing, Computational Linguistics, and Speech Recognition (1st ed.). Prentice Hall PTR, Upper Saddle River, NJ, USA.
Libraries
-
D3.js, "D3.js is a JavaScript library for manipulating documents based on data."
- Implements the math/physics for the force layout, but none of the rendering.
- Some convenience methods for manipulating data (e.g. color and linear scales)
- Light abstraction around events (e.g. combining touch and click events)
-
Lodash.js, "A JavaScript utility library delivering consistency, modularity, performance, & extras."
- Used wherever you see the `_` function, fixes problems with JavaScripts collection methods. I primarily use it to make array/object methods chainable and to take a little more functional approach to writing loops.
Borrowed code/ideas
The Point object is modeled after Processing's PVector and Paper's Point.
The arrows at the tips of the quadratic curves used this guy on Stackoverflow's math.
Animating on Bezier curves (quadratic and cubic) uses De Casteljau's algorithm, as proposed by this guy on Stackoverflow. Also Pomax's interactive Bezier intro was very useful at helping me just wrap my mind around how Beziers work.
The efficiently delete all children of a given DOM node code I borrowed from Stackoverflow
This code lets you have variable length argument lists:
vals = 1 <= arguments.length ? slice.call(arguments, 0) : [];
// Somewhere later...
app.some_function.apply(some_scope, vals);
Using `void 0` instead of `undefined` is a safer since it is a statement (that always returns undefined) and thus cannot be overwritten (undefined can). Discussion here
Scope management for your IFFEs:
// IFFE with:
(function() {}).call(this)
// Instead of
(function() {})()


The default LCID for this page is: 1033
The Date format for the above LCID is: 8/6/2021
The Currency format for the above LCID is: $350.00
The LCID is now changed to: 1036
The Date format for the above LCID is: 06/08/2021
The Currency format for the above LCID is: 350,00 €
The LCID is now changed to: 3079
The Date format for the above LCID is: 06.08.2021
The Currency format for the above LCID is: € 350,00
The LCID is now changed to: 2057
The Date format for the above LCID is: 06/08/2021
The Currency format for the above LCID is: £350.00


Example of html template that imports and executes composite template
Templates can contain parts (chunks, components) of templates string, template functions or template promises.
Everythng between template expressions will be ignored and expressions will be returned in array that can be destructed.
See template /app/views/components/composed-template.html
.
Usage example:
${
() => {
let [part1, part2, part3] = this.template.import("composite!views/components/composed-template.html")(args);
this.compontent1 = part1;
this.compontent2 = part2(1, 2);
// etc
}
}
View location:
/app/views/components/composite-template.html
This example contains two text templates, one function template and one promise template which is returned after one second.
Because of that, this entire view is rendered after one second.
${() => {
let [part1, part2, part3, part4] = this.template.import("composite!views/components/composed-template.html")();
this.compontent1 = part1;
this.compontent2 = part2;
this.compontent3 = part3;
this.compontent4 = part4;
}}
compontent1:
${() => this.compontent1}
compontent2:
${() => this.compontent2}
compontent3:
${() => this.compontent3("Simple component 3", "template function")}
${() => this.compontent4("Simple component 4", "template promise function")}


--- title: A quick introduction and tutorial on a cool social network analysis model for influence author: '' date: '2018-08-02' slug: social-network-analysis-model-for-influence categories: [r, walkthrough] tags: [SNA] description: Influence models seem complex but are actually just regressions. meta_img: /_media/images/msurbanstem-soc.png ---
Social network is increasingly common in education (Sweet, 2016). Very often, social network analysis is used to create sociograms, or depictions of a network. I did this in a paper I recently co-authored (here is a pre-print), we worked hard to create this figure:
Such figures (we thought–and I think) look nice and they are often useful for understanding the characteristics of a network and the relations that are part of it. And to be sure, algorithms - models, in a sense - are used to place the nodes/vertices (the “points”) in the graph. But we want to go further by using models for specific patterns in the data, namely:
In this post, I wanted to share a bit on the second type, or an influence model. I first wrote this about a year ago and so had to stare at it for awhile until it makes sense (at least a bit–I take responsibility for any mistakes, glaring or otherwise), but I want to try to break this down, because I think it contains some cool ideas about influence:
\[ { y }_{ it2 }\quad =\quad \rho \sum _{ i'\quad =\quad 1 }^{ n }{ { w }_{ ii' }^{ } } { y }_{ i't1 }^{ }\quad +\quad { \gamma }_{ it1 }^{ }\quad +\quad { \varepsilon }_{ i }^{ } \]
Some outcome measured at a second time point (i.e., after a school year) for individual \(i\):
\[ { y }_{ it2 } \]
Is predicted by that individual’s first time point measure:
\[ { \gamma }_{ 1it_1 }^{ } \] A residual term:
\[ { \varepsilon }_{ i }^{ } \] And, importantly, an influence term:
\[ \sum _{ i'\quad =\quad 1 }^{ n }{ { w }_{ ii' }^{ } } { y }_{ i't1 }^{ }\quad \]
This behemoth needs more breaking down. \(\rho\) is just the coefficient, like \(\beta\) in a regression equation.
This part says something like, for individual \(i\), find all of the other individuals they have some relationship with.
\[ \sum _{ i'\quad =\quad 1 }^{ n } \]
From \(i' = 1\), or the first individual, up to, for an individual with ten relationships, so \(n = 10\) for example, to \(i' = 10\), do this:
\[ { { w }_{ ii' }^{ } } { y }_{ i't1 }^{ } \]
Multiply the weight, \(w\) of the relationship (i.e., how strong the relationship is or how many interactions there were) between \(i\) and \(i'\) by \(i'\)’s value on the outcome at time 1.
That’s really the (key to) the whole thing. The idea is that the influence term “captures” how your interactions with someone, over some period of time (between the first and second time points) impact some outcome. This model accounts for an individual’s initial report of the outcome, i.e., their time 1 prior value, so it is a model for change in some outcome.
It’s a big, highly-confusing model, but one that is super cool, because you can quantify “the network effect.” It’s also fundamentally a regression. That’s really it. All the work goes into calculating the influence term.
With Sarah Galey, I wrote a little code with an example. That code is below. In another post, I’d like to try to dive into this more, and maybe in another write about the other type of model I mentioned above, one for exploring who has relationships with whom (or a selection model), related to a project focused around the #NGSSchat hashtag.
library(dplyr) # need to install with install.packages("dplyr") if not already installed (just need to do first time)
#>
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
#> The following objects are masked from 'package:base':
#>
#> intersect, setdiff, setequal, union
data1 <- data.frame(nominator = c(2, 1, 3, 1, 2, 6, 3, 5, 6, 4, 3, 4),
nominee = c(1, 2, 2, 3, 3, 3, 4, 4, 4, 5, 6, 6),
relate = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1))
data2 <- data.frame(nominee = c(1, 2, 3, 4, 5, 6),
yvar1 = c(2.4, 2.6, 1.1, -0.5, -3, -1))
data3 <- data.frame(nominator = c(1, 2, 3, 4, 5, 6),
yvar2 = c(2, 2, 1, -0.5, -2, -0.5))
# merge data1 and data2
# note: we want the nominee's indegree because this is who the nominator is being exposed to
data <- left_join(data1, data2, by = "nominee")
data$nominee <- as.character(data$nominee) # this makes merging later easier
# calculate indegree in tempdata and merge with data
tempdata <- data.frame(table(data$nominee))
names(tempdata) <- c("nominee", "indegree") # rename the column "nominee"
tempdata$nominee <- as.character(tempdata$nominee) # makes nominee a character data type, instead of a factor, which can cause problems
data <- left_join(data, tempdata, by = "nominee")
# Calculating exposure and an exposure term that uses indegree, exposure_plus
data$exposure <- data$relate * data$yvar1
data$exposure_plus <- data$exposure * (data$indegree + 1)
# Calculating mean exposure
mean_exposure <-
data %>%
group_by(nominator) %>%
summarize(exposure_mean = mean(exposure))
mean_exposure_plus <-
data %>%
group_by(nominator) %>%
summarize(exposure_plus_mean = mean(exposure_plus))
# need a final data set with mean_exposure, mean_exposure_plus, degree, yvar1, and yvar2 added
mean_exposure_terms <- dplyr::left_join(mean_exposure, mean_exposure_plus, by = "nominator")
names(data2) <- c("nominator", "yvar1") # rename nominee as nominator to merge these
final_data <- dplyr::left_join(mean_exposure_terms, data2, by = "nominator")
final_data <- dplyr::left_join(final_data, data3, by = "nominator") # data3 already has nominator, so no need to change
# regression (linear models)
model1 <- lm(yvar2 ~ yvar1 + exposure_mean, data = final_data)
summary(model1)
#>
#> Call:
#> lm(formula = yvar2 ~ yvar1 + exposure_mean, data = final_data)
#>
#> Residuals:
#> 1 2 3 4 5 6
#> 0.02946 -0.09319 0.09429 -0.02730 -0.02548 0.02222
#>
#> Coefficients:
#> Estimate Std. Error t value Pr(>|t|)
#> (Intercept) 0.11614 0.03445 3.371 0.0434 *
#> yvar1 0.67598 0.02406 28.092 9.9e-05 ***
#> exposure_mean 0.12542 0.03615 3.470 0.0403 *
#> ---
#> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#>
#> Residual standard error: 0.08232 on 3 degrees of freedom
#> Multiple R-squared: 0.9984, Adjusted R-squared: 0.9974
#> F-statistic: 945.3 on 2 and 3 DF, p-value: 6.306e-05
model2 <- lm(yvar2 ~ yvar1 + exposure_plus_mean, data = final_data)
summary(model2)
#>
#> Call:
#> lm(formula = yvar2 ~ yvar1 + exposure_plus_mean, data = final_data)
#>
#> Residuals:
#> 1 2 3 4 5 6
#> -0.0057048 -0.0627961 0.1191432 -0.0432021 -0.0084312 0.0009909
#>
#> Coefficients:
#> Estimate Std. Error t value Pr(>|t|)
#> (Intercept) 0.10281 0.03514 2.926 0.061206 .
#> yvar1 0.66444 0.02636 25.205 0.000137 ***
#> exposure_plus_mean 0.05053 0.01446 3.494 0.039658 *
#> ---
#> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#>
#> Residual standard error: 0.08187 on 3 degrees of freedom
#> Multiple R-squared: 0.9984, Adjusted R-squared: 0.9974
#> F-statistic: 955.8 on 2 and 3 DF, p-value: 6.203e-05


{% if page.title == 'home' %}
Friends Of Cake is a group of dedicated CakePHP developers working together to provide the CakePHP community with high caliber CakePHP plugins and resources.


Name is too short.
Name is too long.
Your name is required.
Code is too short.
Code is too long.
Your code is required.
Organization code is required.


This document outlines a state synchronization problem between the Generic JTAPI Framework and some TelephonyProvider implementations, and proposes a solution architecture. Support for weak synchronization, as well as any support framework architecture, is currently subject to debate and discussion and may, in the future, be dropped or altered. Feedback is always valuable.
The Generic JTAPI Framework takes on the responsibility for:The concept is to concentrate implementation-independent funcionality into a re-usable core and reduce the responsibilities of a particular telephony provider to:
- Mapping JTAPI calls to a smaller TelephonyProvider interface
- Tracking listener and observer registrations
- Receiving state and event information from a TelephonyProvider implementation
- Mapping of complex telephony commands into a smaller-set of primitive commands.
- Providing threaded handling of events
- Provide a simple capabilities framework
- Provide a media service framework that delgates media calls off to a simpler media interface
- implementation of a small set of simple telephony/media commands
- reporting of state information
The latter responsibility, however, may cause problems for some Telephony implementations. In particular, some implementations may manage a large domain with a great deal of activity. Collecting and reporting state changes for all domain objects may, therefore, become prohibitively expensive due to:
- Implementation monitoring costs. Some platforms may have significant costs associated with monitoring line or channel behaviour. Invoking this cost in order to retrieve information that may never be used may not be pratical.
- Memory size. If thousands of Calls must be maintained in memory with associated state, Connection and TerminalConnection information, the JVM memory requirements may get very significant.
- Processing. Receiving and thousands of call events per second may strain the JVM implementations and lead to poor performance of unacceptable command latency.
- Network cost. If a TelephonyProvider proxy exists between the telephony platform and the Generic JTAPI server, then all state update events must be serialized across the network pipe. This may add significant network load, including increased collisions, and may cause latency and responsiveness degradation.
We are, therefore, left with two options: limit the intended domain of the Generic JTAPI Framework to small and medium-sized systems with moderate activity levels; or provide a lazy state synchronization mechanism.This paper outlines a design change for the Generic JTAPI Framework and its TelephonyProvider API that will allow for the optional lazy reporting of call state information.
Note that we do not require that the framework analyze dynamic access patterns in order to change the caching mechanisms of the fly (as HotSpot does with JVMs to optimize calls that are frequently being called).
The problem of maintaining an object-hierarchy that is not fully in-memory is reminiscent of the techniques that are used in Object-Oriented databases to allow for the flushing in of objects from a persistent store. Usually such systems allow for a tree of objects to be "trimmed" such that only a certain depth of the tree is returned and the rest of the tree is replaced with a placeholder that allows for later flusing out if that part of the tree is traversed. The cost trade-off here is between memory usage and initial "fetch" expense versus latter traversal lazy fetching.In particular, the pre-Java GemStone Smalltalk framework from GemStone Systems Inc. Not only did GemStone allow for object hierarchies to be managed in a persistent cache that allowed for some to be replaced by lazy-access placeholders, but GemStone provided a distribution framework that allowed these object trees to be sent to a client with tree-trimming and lazy traversing. Unfortunately GemStone/S is a Smalltalk product that is not available within our Java context, let alone free. Furthermore it uses a Smalltalk feature ("becomes") that is not available directly in Java.
None-the-less, GemStone/S is a successful product with large implementations and as such can give us some ideas on how to implement a lazy tree-traversal framework.
First, we should look at the JTAPI architecture that must be managed. The following diagram presents the relationship between the Provider and it's Addresses, Terminals and Calls (Connections being associations between Addresses and Calls and TerminalConnections being the association between Connections and Terminals.
Figure 1: Basic Generic JTAPI class diagram From the JTAPI specification, we can see that the following are the access methods:
We note that we basically have two sets of dynamically loadable information:
Accessor Accessed Method Type Provider Address getAddresses() throws ResourceUnavailableExceptiongetAddress(String name)Domain Provider Terminal getTerminals() throws ResourceUnavailableExceptiongetTermnal(String name)Domain Provider Call getCalls() throws ResourceUnavailableExceptionCall Address Connection getConnections()Call Address Terminal getTerminals()Domain Terminal TerminalConnection getTerminalConnections()Call Terminal Address getAddresses() Domain The following diagram shows these two sets as blocks within the object domain.Domain (Address <-> Terminal)
These are the sets of Addresses and Terminals that make up the provider's domain. An application may ask for all the Addresses or Terminals, or look them up by name. As well, Each Address may have a number of Terminals associated with it and each Terminal will have one or more Addresses associated with it. These are static to the domain.Call
This is transient information about current call activity. Each Address may have any number of Connections associated with it (which are basically Address to Call association objects). Similarily a Terminal my have zero or more TerminalConnections associated with it.
Figure 2: Object Groupings and Accessors We would like to keep these two dynamic sets separate. So, for instance, one TelephonyProvider implementation may be able to give a purely static set of Addresses and Terminals which is of a manageable size, but may not want to automatically incur the cost of reporting all call events on these sets.
Thus we see that we have two dynamic "fetching" scenarios:
From Figure 2 we can also note some other things of importance:
- Domain Object Interrogation. Here the Provider is asked for its set of Addresses or Terminals, or for an Address or Terminal by name. In the above diagram, the FreeAddress and FreeTerminal classes are requested. The API allows the implementation to return "ResourceUnavailableException" to the set accessors but not the name-lookups. It would make sense to have a Provider that allows "DynamicDomain" to throw the ResourceUnavailableException and then allow lazy look-ups of individual Terminals and Addresses.
- Call Interrogation. Here the Provider asks for the set of all Calls or the Address or Terminal asks for its set of associated calls (through the Connection or TerminalConnection association objects). Here the bottom three classes, FeeCall, FreeConnection and FreeTerminalConnection, are requested. The API allos the implementation to return "ResourceUnavailableException" to the global call set accessor, but not the Address or Terminal call set accessors.
- Terminals and Addresses may be looked up by name or by association with each other and are also referenced by any active calls that are associated with them. Therefore it is not sufficient to refetch an Address or Terminal each time it is looked up, since this may corrupt object identity if there is already another copy of this object in the system.
- Note that Addresses and Terminals are related, with a Terminal knowing all the Addresses on it, and an Address knowing all Terminals that contain it. There are two possibilities for paging in the cross references between Addresses and Terminals:
- Assume that the Terminal-Address graph is not too large. When an Address name is returned from the TelephonyProvider that is not currently cached in our system, we perform a recursive search until all newly reachable Addresses and Terminals have been returned.
- Don't assume that the Address - Terminal sub-graphs are of moderate size since this may not be a valid assumption. Say an Address is available on every one of 400 Terminals in a call centre sub-department. Furthermore, some of these Terminals also hold Addresses on other distant Address groups. Theoretically there is no reason that doing a full graph flush may not result in a large number of TelephonyProvider calls and the flushing out of information on every Address and Terminal in the domain, if they are all reachable. Instead we should, for Address, track all of its Terminal names and only use these names to look up Terminals when the name is traversed. Delaying the graph traversal until first needed may add some initial lookup time, but will reduce Address lookup, memory requirements and TelephonyProvider invocations.
- Calls and their Connections and TerminalConnections cannot expand without bound across the whole TelephonyProvider's Call domain, unless there is only one call currently active. Active calls tend to have a limited number of Connections associated with them.
Paradigm
The Generic JTAPI Framework will maintain both Domain and Call information either statically (by default) or dynamically, based on TelephonyProvider Capabilities. If looked up dynamically, the reference will be "softly" or "weakly" held in a reference cache so that the reference may be cleared once no longer directly accessed by a strong link. Strong links may include Listeners (since if a listener is registered on a Call, we want to to get it's state updates and keep the call in memory), application code, or other directly held dynamic objects (An Address referenced by a Call that is held by an application).Class Diagram
Reference Determination
The following table indicates two things:
- The TelephonyCapabilities property that triggers the use of dynamic lookup and weak caching
- The type of cache used. SoftCaches release softly-reachable items before a MemoryOutOfError exception is thrown. WeakCaches release weakly-reachable items during the next garbage collection.
Accessors Dynamic trigger Cache Style when dynamic Domain Provider->AddressProvider->TerminalResourceUnavailableException during initialization SoftCache
(These are domain objects and are likely to be looked up again once initially active) Address->TerminalTerminal->AddressSoftCache Call Address->ConnectionTerminal->TerminalConnectionthrottle = t WeakCache
(These are transient domain objects that are not as likely to be accessed in the future)Ease of Implementation
The addition of dynamic state synchronization to the Generic JTAPI Framework should not impose undue burden on TelephonyProviders that support static state updates (i.e. that report all state transitions on all Domain objects and all Calls). To accomplish this, the following is a requirement of the new TelephonyProvider changes:
- The new methods may be implemented as NO-OPs if the provider does not throw ResourceUnavailableException for getAddresses() and does not have "throttle" set to true.
- A new abstract TelephonyProvider will be provided that remove the additional methods from the list of methods a class must implement. TelephoyProviders may choose to extend this abstract class.
Additions to Telephony Provider API
The following additions must be made to the TelephonyProvider interface:As well, some new helper object will be needed for transporting :
- String[] getAddresses(String termName). This gets an array of Address names for the given terminal name.
- CallData[] getCallsForAddress(String AddrName). This gets a Call information object for an Address that can be used to dynamically create the Call, Connection and TerminalConnection information as needed.
public class CallData { public int callState; public ConnData[] connections; }public class ConnectionData { public int connState; public String address; public TCData[] terminalConnections; }public class TCData { public int tcState; public String terminal; public String[] terminals; }


Music Collector
Search in collections
Type
Select a type:
Vinyls
Cassettes
Tapes
Artist
Select an artist:
Chris Cornell
Guns n roses
Bruce Springsteen
Album
Select an album:
some
some
some
Rarity
Select the rarity:
1 appearance
2 appearances
3 appearances
Type
Artists
Album
Diameter(inch)
Rotational speed(rpm)
Number of audio chanels
Weight(g)
Seniority
Quality
Vinyl Collection
some
some
12
8 1/3
mono
120
new
low


KindEditor Event Test
outer event:
none
click
mousedown
mouseover
mouseout
contextmenu
inner event:
none
click
mousedown
mouseover
mouseout
contextmenu
keyup
event method:
none
stopPropagation
preventDefault
stop


@* * Copyright 2019 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *@ @import play.api.Configuration @import uk.gov.hmrc.agentoverseasapplicationfrontend.controllers.routes @import uk.gov.hmrc.agentoverseasapplicationfrontend.models.AmlsDetails @import uk.gov.hmrc.play.views.html.helpers.{form, input, errorSummary} @(trnForm: Form[String])(implicit messages: Messages, request: Request[_], configuration: Configuration) @uk.gov.hmrc.agentoverseasapplicationfrontend.views.html.main_template(title = error_prefix(trnForm) + Messages("addTrn.title")) { @Messages("button.back") @if(trnForm.hasErrors) { @errorSummary(Messages("error.summary.heading"),trnForm, Seq.empty, Some("add-trn")) } @form(action = routes.TaxRegController.submitAddTaxRegNo, 'class -> "form js-form") {
} }


Bapu Ki Kutia, established in 1964 by Late Shri Shyamdas Sujwani, is a chain of vegetarian fine-dine restaurants located in Bhopal and Indore. We are focused on delivering quality food to all our customers all over the state. Started under still standing Palm tree which has shed shadow on us for more than 50 years is believed to be the tree under which every person in the city have had the meal and is still enjoying. We specialize in North Indian Cuisines and deliver the taste, all India recognize.
"Food was excellent as well as the service. Staff is super friendly and accommodating."
"Everyone was kind, friendly and very attentive. Food was exceptional."
"It’s pleasant to go to Bapu Ki Kutia for lunch. The staff is lovely. The lunch is very fresh to order. I can’t say that anything is my favorite because everything is delicious."
"I had a wonderful meal- all the food was excellent as well as many in the past."
As always, the service was wonderful. Staff was gracious and delightful to see again.


NZ Wheels to buy Swire Pacific unit's Mercedes-Benz dealership in Malaysia
by BloombergKUALA LUMPUR (Nov 15): A unit of Swire Pacific Ltd. is exiting its business to sell Mercedes-Benz cars in Malaysia to focus on its core market in Taiwan, says Taikoo Motors Group, Swire’s trading and industrial arm.
* Taikoo will sell assets of Auto Commerz Sdn to an existing dealer with help from Mercedes-Benz in Malaysia, spokeswoman says in an emailed response
* The buyer is NZ Wheels Sdn Bhd, says Mercedes-Benz Malaysia
* Cycle & Carriage Bintang, another Mercedes-Benz dealer in Malaysia, received privatization offer from major shareholder Jardine Cycle & Carriage due to intensifying competition, lower consumer spending and strict lending guidelines
* Sales of Mercedes-Benz dropped 26% y/y in first 9 months of 2019 in Malaysia
* Swire’s trading and industrial arm accounts for 11% of net income in 2018, the second-largest contributor after the property business that accounts for 94.8%
* Swire, which holds majority stake in Cathay Pacific, has been selling its non-core assets over the past 2 years


Savas Labs
Web redesign proposal
Meet the team!
Your goals
- Showcase the full scope of our research endeavors
- Showcase the breadth and excellence of our training programs
- Increase/capture higher-caliber applicants to our training program
- Messaging will support overall Department mission, vision and goals
- Site design will be uncluttered, contemporary, and visually appealing
- Ease of CMS administration
Our process
- Discovery phase
- Weekly meetings
- Iterate, stage, and prioritize.
Proposal highlights
- Aggressive timeline as proposed
- We're excited to work with Tracey
- Copywriting and photography services available
Hunter Boots
http://us.hunterboots.com/
Questions?
Savas Labs


Image 01
Image 02
Image 03
Image 04
Image 05
Image 06
Gero
menu
Home
home
Sign in
Email
Password
Sign in
Not Have Account ?


NIMS Browser
Browse
This page allows you to view and make changes to your data.
Hide Trash
Show Trash
Trash Only
Trash
Download
${name}
${name}
${name}
${name}


{% extends "account/base.html" %} {% load external_url from constants_tags %} {% load i18n %} {% block head_title %}{% trans "Verify your email address" %}{% endblock %} {% block content %}
{% blocktrans %}We have sent you a confirmation email. Please follow the link in the email to verify your email address.{% endblocktrans %}
Please contact us if you do not receive an email within 10 minutes.
{% endblock %}


class: center, middle, inverse, title-slide # Data and visualization
📉 --- layout: true
  class website
 --- class: center, middle # Exploratory data analysis --- ## What is EDA? - Exploratory data analysis (EDA) is an aproach to analyzing data sets to summarize its main characteristics. - Often, this is visual. That's what we're focusing on today. - But we might also calculate summary statistics and perform data wrangling/manipulation/transformation at (or before) this stage of the analysis. That's what we'll focus on next. --- class: center, middle # Data visualization --- ## Data visualization > *"The simple graph has brought more information to the data analyst’s mind than any other device." — John Tukey* - Data visualization is the creation and study of the visual representation of data. - There are many tools for visualizing data (R is one of them), and many approaches/systems within R for making data visualizations (**ggplot2** is one of them, and that's what we're going to use). --- ## ggplot2 `\(\in\)` tidyverse .pull-left[ ![](img/grammar-of-graphics.png) ] .pull-right[ - **ggplot2** is tidyverse's data visualization package - The `gg` in "ggplot2" stands for Grammar of Graphics - It is inspired by the book **Grammar of Graphics** by Leland Wilkinson † - A grammar of graphics is a tool that enables us to concisely describe the components of a graphic ] .footnote[ † Source: [BloggoType](http://bloggotype.blogspot.com/2016/08/holiday-notes2-grammar-of-graphics.html) ] --- .question[ What are the functions doing the plotting? What is the dataset being plotted? Which variable is on the x-axis and which variable is on the y-axis? What does the warning mean? ] ```r ggplot(data = starwars, mapping = aes(x = height, y = mass)) + geom_point() + labs(title = "Mass vs. height of Starwars characters", x = "Height (cm)", y = "Weight (kg)") ``` ``` ## Warning: Removed 28 rows containing missing values (geom_point). ```  --- .question[ What does `geom_smooth()` do? What else changed between the previous plot and this one? ] ```r ggplot(data = starwars, mapping = aes(x = height, y = mass)) + geom_point() + * geom_smooth() + labs(title = "Mass vs. height of Starwars characters", x = "Height (cm)", y = "Weight (kg)") ```  --- ## Hello ggplot2! - `ggplot()` is the main function in ggplot2 and plots are constructed in layers - The structure of the code for plots can often be summarized as ```r ggplot + geom_xxx ``` or, more precisely .small[ ```r ggplot(data = [dataset], mapping = aes(x = [x-variable], y = [y-variable])) + geom_xxx() + other options ``` ] - To use ggplot2 functions, first load tidyverse ```r library(tidyverse) ``` - For help with the ggplot2, see [ggplot2.tidyverse.org](http://ggplot2.tidyverse.org/) --- class: center, middle # Visualizing Star Wars --- ## Dataset terminology .question[ What does each row represent? What does each column represent? ] ```r starwars ``` ``` ## # A tibble: 87 x 14 ## name height mass hair_color skin_color eye_color birth_year gender homeworld species films ## <chr> <int> <dbl> <chr> <chr> <chr> <dbl> <chr> <chr> <chr> <lis> ## 1 Luke~ 172 77 blond fair blue 19 male Tatooine Human <chr~ ## 2 C-3PO 167 75 <NA> gold yellow 112 <NA> Tatooine Droid <chr~ ## 3 R2-D2 96 32 <NA> white, bl~ red 33 <NA> Naboo Droid <chr~ ## 4 Dart~ 202 136 none white yellow 41.9 male Tatooine Human <chr~ ## 5 Leia~ 150 49 brown light brown 19 female Alderaan Human <chr~ ## 6 Owen~ 178 120 brown, gr~ light blue 52 male Tatooine Human <chr~ ## 7 Beru~ 165 75 brown light blue 47 female Tatooine Human <chr~ ## 8 R5-D4 97 32 <NA> white, red red NA <NA> Tatooine Droid <chr~ ## 9 Bigg~ 183 84 black light brown 24 male Tatooine Human <chr~ ## 10 Obi-~ 182 77 auburn, w~ fair blue-gray 57 male Stewjon Human <chr~ ## # ... with 77 more rows, and 3 more variables: vehicles <list>, starships <list>, ## # hair_color2 <fct> ``` - Each row is an **observation** - Each column is a **variable** --- ## What's in the Star Wars data? Take a `glimpse` at the data: ```r glimpse(starwars) ``` ``` ## Rows: 87 ## Columns: 14 ## $ name <chr> "Luke Skywalker", "C-3PO", "R2-D2", "Darth Vader", "Leia Organa", "Owe... ## $ height <int> 172, 167, 96, 202, 150, 178, 165, 97, 183, 182, 188, 180, 228, 180, 17... ## $ mass <dbl> 77.0, 75.0, 32.0, 136.0, 49.0, 120.0, 75.0, 32.0, 84.0, 77.0, 84.0, NA... ## $ hair_color <chr> "blond", NA, NA, "none", "brown", "brown, grey", "brown", NA, "black",... ## $ skin_color <chr> "fair", "gold", "white, blue", "white", "light", "light", "light", "wh... ## $ eye_color <chr> "blue", "yellow", "red", "yellow", "brown", "blue", "blue", "red", "br... ## $ birth_year <dbl> 19.0, 112.0, 33.0, 41.9, 19.0, 52.0, 47.0, NA, 24.0, 57.0, 41.9, 64.0,... ## $ gender <chr> "male", NA, NA, "male", "female", "male", "female", NA, "male", "male"... ## $ homeworld <chr> "Tatooine", "Tatooine", "Naboo", "Tatooine", "Alderaan", "Tatooine", "... ## $ species <chr> "Human", "Droid", "Droid", "Human", "Human", "Human", "Human", "Droid"... ## $ films <list> [<"Revenge of the Sith", "Return of the Jedi", "The Empire Strikes Ba... ## $ vehicles <list> [<"Snowspeeder", "Imperial Speeder Bike">, <>, <>, <>, "Imperial Spee... ## $ starships <list> [<"X-wing", "Imperial shuttle">, <>, <>, "TIE Advanced x1", <>, <>, <... ## $ hair_color2 <fct> blond, NA, NA, Other, brown, Other, brown, NA, black, Other, blond, Ot... ``` --- ## What's in the Star Wars data? .question[ How many rows and columns does this dataset have? What does each row represent? What does each column represent? ] Run the following **in the Console** to view the help ```r ?starwars ```  --- ## Mass vs. height ```r ggplot(data = starwars, mapping = aes(x = height, y = mass)) + geom_point() ``` ``` ## Warning: Removed 28 rows containing missing values (geom_point). ```  --- ## What's that warning? - Not all characters have height and mass information (hence 28 of them not plotted) ``` ## Warning: Removed 28 rows containing missing values (geom_point). ``` - Going forward I'll supress the warning to save room on slides, but it's important to note it --- ## Mass vs. height .question[ How would you describe this relationship? What other variables would help us understand data points that don't follow the overall trend? Who is the not so tall but really chubby character? ] .small[ ```r ggplot(data = starwars, mapping = aes(x = height, y = mass)) + geom_point() + * labs(title = "Mass vs. height of Starwars characters", * x = "Height (cm)", y = "Weight (kg)") ```  ] --- ## Jabba!  --- ## Additional variables We can map additional variables to various features of the plot: - aesthetics - shape - colour - size - alpha (transparency) - faceting: small multiples displaying different subsets --- class: center, middle # Aesthetics --- ## Aesthetics options Visual characteristics of plotting characters that can be **mapped to a specific variable** in the data are - `color` - `size` - `shape` - `alpha` (transparency) --- ## Mass vs. height + gender ```r ggplot(data = starwars, mapping = aes(x = height, y = mass, color = gender)) + geom_point() ```  --- ## Mass vs. height + gender Let's map the size to birth_year: ```r ggplot(data = starwars, mapping = aes(x = height, y = mass, color = gender, * size = birth_year )) + geom_point() ```  --- ## Mass vs. height + gender Let's now increase the size of all points **not** based on the values of a variable in the data: ```r ggplot(data = starwars, mapping = aes(x = height, y = mass, color = gender)) + * geom_point(size = 2) ```  --- ## Aesthetics summary - Continuous variable are measured on a continuous scale - Discrete variables are measured (or often counted) on a discrete scale aesthetics | discrete | continuous ------------- | ------------------------ | ------------ color | rainbow of colors | gradient size | discrete steps | linear mapping between radius and value shape | different shape for each | shouldn't (and doesn't) work - Use aesthetics for mapping features of a plot to a variable, define the features in the geom for customization **not** mapped to a variable --- class: center, middle # Faceting --- ## Faceting options - Smaller plots that display different subsets of the data - Useful for exploring conditional relationships and large data .small[ ```r ggplot(data = starwars, mapping = aes(x = height, y = mass)) + * facet_grid(. ~ gender) + geom_point() + labs(title = "Mass vs. height of Starwars characters", * subtitle = "Faceted by gender", x = "Height (cm)", y = "Weight (kg)") ```  ] --- ## Dive further... .question[ In the next few slides describe what each plot displays. Think about how the code relates to the output. ] --

 .alert[ The plots in the next few slides do not have proper titles, axis labels, etc. because we want you to figure out what's happening in the plots. But you should always label your plots! ] --- ```r ggplot(data = starwars, mapping = aes(x = height, y = mass)) + geom_point() + facet_grid(gender ~ .) ```  --- ```r ggplot(data = starwars, mapping = aes(x = height, y = mass)) + geom_point() + facet_grid(. ~ gender) ```  --- ```r ggplot(data = starwars, mapping = aes(x = height, y = mass)) + geom_point() + facet_wrap(~ eye_color) ```  --- ## Facet summary - `facet_grid()`: - 2d grid - `rows ~ cols` - use `.` for no split - `facet_wrap()`: 1d ribbon wrapped into 2d --- ##  `AE 03 - Starwars` - Go to [RStudio Cloud](https://rstudio.cloud/project/1240308) and make a copy of the application exercise project and launch it. - Open and knit the R Markdown document --- class: center, middle # Identifying variables --- ## Number of variables involved * Univariate data analysis - distribution of single variable * Bivariate data analysis - relationship between two variables * Multivariable data analysis - relationship between many variables at once, usually focusing on the relationship between two while conditioning for others --- ## Types of variables - **Numerical variables** can be classified as **continuous** or **discrete** based on whether or not the variable can take on an infinite number of values or only non-negative whole numbers, respectively. - If the variable is **categorical**, we can determine if it is **ordinal** based on whether or not the levels have a natural ordering. --- class: center, middle # Visualizing numerical data --- ## Describing shapes of numerical distributions * shape: * skewness: right-skewed, left-skewed, symmetric (skew is to the side of the longer tail) * modality: unimodal, bimodal, multimodal, uniform * center: mean (`mean`), median (`median`), mode (not always useful) * spread: range (`range`), standard deviation (`sd`), inter-quartile range (`IQR`) * unusal observations --- ## Histograms .small[ ```r ggplot(data = starwars, mapping = aes(x = height)) + geom_histogram(binwidth = 10) ``` ``` ## Warning: Removed 6 rows containing non-finite values (stat_bin). ```  ] --- ## Density plots .small[ ```r ggplot(data = starwars, mapping = aes(x = height)) + geom_density() ``` ``` ## Warning: Removed 6 rows containing non-finite values (stat_density). ```  ] --- ## Side-by-side box plots .small[ ```r ggplot(data = starwars, mapping = aes(y = height, x = gender)) + geom_boxplot() ``` ``` ## Warning: Removed 6 rows containing non-finite values (stat_boxplot). ```  ] --- class: center, middle # Visualizing categorical data --- ## Bar plots .small[ ```r ggplot(data = starwars, mapping = aes(x = gender)) + geom_bar() ```  ] --- ## Segmented bar plots, counts .small[ ```r ggplot(data = starwars, mapping = aes(x = gender, fill = hair_color)) + geom_bar() ```  ] --- ## Segmented bar plots, proportions .small[ ```r ggplot(data = starwars, mapping = aes(x = gender, fill = hair_color)) + geom_bar(position = "fill") + labs(y = "proportion") ```  ] --- ## Which bar plot is more appropriate? .question[ Which bar plot is a more useful representation for visualizing the relationship between gender and hair color? ] ```r starwars <- starwars %>% mutate(hair_color2 = fct_other(hair_color, keep = c("black", "brown", "brown", "blond"))) ```


---
title: Crushing I.T. with Big Data
author: David Brewer
date: '2020-03-29'
slug: crushing-it-with-big-data
categories:
- Statistics
tags:
- R
- Statistics
subtitle: ''
summary: ''
authors: []
lastmod: '2020-03-29T17:54:22-06:00'
featured: no
image:
caption: ''
focal_point: ''
preview_only: no
projects: []
---
In Feb. 2015, I was an undergraduate student at the University of Montana and I signed up for a five week seminar course taught by John Chandler called “Crushing I.T. with Big Data”….pun intended.
He taught how to code Python from the command line and IDLE….
IDLE is that “GUI” Python installs “which has been bundled with the default implementation of the language since 1.5.2b1” according to the Wikipedia page.
So what better way to start this blog than to revisit an example from Dataclysm and the OKCupid blog.
“I’m 6 feet tall”The chart below shows the heights of men reported on OKCupid and the heights of men in the U.S. in general (no source given).
REALITY: People are two inches shorter
“Almost universally guys like to add a couple inches to their height. You can also see a more subtle vanity at work: starting at roughly 5’ 8”, the top of the dotted curve tilts even further rightward. This means that guys as they get closer to six feet round up a bit more than usual, stretching for that coveted psychological benchmark."
\(\mu\) is the mean of the distribution
\(\sigma\) is the standard deviation
\(\sigma^2\) is the variance
This article helps to understand the probability density function for a normal distribution in the context of the 68-95-99.7 Rule.
“A probability density function (PDF) is used to specify the probability of the random variable falling within a particular range of values, as opposed to taking on any one value. This probability is given by the integral of this variable’s PDF over that range — that is, it is given by the area under the density function but above the horizontal axis and between the lowest and greatest values of the range.”
The PDF can be re-written this way:
And then simplified assuming \(\mu\) = 0 and \(\sigma\) = 1
Here is how this looks coded in Python using numpy:
import numpy as np
constant = 1.0 / np.sqrt(2*np.pi)
pdf_normal_distribution = constant * np.exp((-x**2) / 2.0)
Basically this is what is going on under the hood of the dnorm
function in R which I will use below to complete this analysis.I discovered an interesting longitudinal dataset of heights across nearly 100 countries collected by the DHS Program and made available on their website here but unfortunately the U.S. is not included in these data.
So for now I will just skip finding actual height data and assume Christian’s source is good.
Unfortunately I don’t own a successful nationwide dating site with a database I can mine to satisfy my own curiosity, so I needed to find a publicly available dataset of self reported heights.
I found such a source in the CDC’s national survey via the Behavioral Risk Factor Surveillance System (BRFSS).When reporting heights during the BRFSS questionnaire we might expect respondents to have less incentive to ‘stretch’ the truth because the height information will only be used as part of this anonymous survey rather than posted on an online dating profile like OKCupid heights.
Filtering the dataframe to the height and gender fields of interest
heights_df <- data.frame(heights3 = brfss2013$height3
, sex = brfss2013$sex)
The height field requires some data wrangling
#remove missing values
heights_df <- heights_df %>%
na.omit()
#remove the metric measurements
heights_df <-
heights_df[heights_df$heights3 <= 9000,]
#create a total_inches numeric variable for analysis
heights_df <- data.frame(sex = heights_df$sex
, heights3 = heights_df$heights3
, feet = substring(heights_df$heights3, 0, 1)
, inches = substring(heights_df$heights3, 2, 3)
, stringsAsFactors = FALSE)
heights_df$feet <- as.numeric(heights_df$feet)
heights_df$inches <- as.numeric(heights_df$inches)
heights_df$total_inches <- (heights_df$feet * 12) + heights_df$inches
#I will also need a formatted variable for heights
# so my height of 68 inches would be 5'8"
heights_df$label <- paste(heights_df$feet, "\'"
, heights_df$inches, "\"", sep="")
Summary statistics for the total_inches variable
heights_df_summary <- heights_df %>%
group_by(sex) %>%
summarize(mean = mean(total_inches)
, sd = sd(total_inches))
add_row <- heights_df %>%
summarize(mean = mean(total_inches)
, sd = sd(total_inches)) %>%
mutate(sex="both") %>%
select(sex, mean, sd)
heights_df_summary <- rbind(heights_df_summary, add_row)
| sex | mean | sd |
|---|---|---|
| Male | 70.12518 | 3.050811 |
| Female | 64.23973 | 2.835569 |
| both | 66.65604 | 4.116204 |
#Calculate the percent of the sample for each height seperated by gender
heights_label_merge <- data.frame(total_inches = heights_df$total_inches
, label = heights_df$label)
heights_label_merge <- unique.data.frame(heights_label_merge)
heights_df_table_by_label <- data.frame(label = character(0)
, count = numeric(0)
, percent = numeric(0))
for(n in 1:length(unique(heights_df$sex))){
sex_for_analysis <- unique(heights_df$sex)[n]
heights_df_filtered <- heights_df[heights_df$sex == sex_for_analysis,]
add_row <- as.data.frame(table(heights_df_filtered$label))
names(add_row) <- c("label", "count")
add_row$sex <- sex_for_analysis
add_row$percent <- add_row$count / sum(add_row$count)
heights_df_table_by_label <- rbind(heights_df_table_by_label, add_row)}
First look at the heights of males
#Filter the analysis for males
sex_for_analysis <- "Male"
heights_df_table_by_label_merged <- merge(heights_df_table_by_label
, heights_label_merge
, by = "label")
#Create a dataframe with the actual data to be used for the plot
df <-
heights_df_table_by_label_merged[
heights_df_table_by_label_merged$sex == sex_for_analysis,]
df$percent <- round(df$percent*100, 0)
df <- df[order(df$total_inches), ]
df <- df[df$total_inches > 54
& df$total_inches < 84,]
Generate expected height data given a normal distribution
#create a dataframe with the expected data given a normal distribution
df_test <- df[c("total_inches", "percent", "label")]
df_test$cond <- "actual"
set.seed(1983)
mean <- as.numeric(
heights_df_summary[heights_df_summary$sex == sex_for_analysis, "mean"])
sd <- as.numeric(
heights_df_summary[heights_df_summary$sex == sex_for_analysis, "sd"])
xseq<-seq(55,83,1)
densities<-dnorm(xseq
, mean = mean
, sd = sd)
add_row <- data.frame(total_inches = xseq
, percent = densities
, cond = "dnorm")
add_row <- merge(add_row, heights_label_merge, by = "total_inches")
add_row$percent <- round(add_row$percent*100, 0)
df_test <- rbind(df_test, add_row)
Generate U.S. height data given a normal distribution from OKCupid chart
set.seed(1983)
mean <- 69
sd <- 3
xseq<-seq(55,83,1)
densities<-dnorm(xseq
, mean = mean
, sd = sd)
add_row <- data.frame(total_inches = xseq
, percent = densities
, cond = "us_men")
add_row <- merge(add_row, heights_label_merge, by = "total_inches")
add_row$percent <- round(add_row$percent*100, 0)
df_test <- rbind(df_test, add_row)
Use ggplot2 to create the viz similar to OKCupid theme
#create the plot
ggplot(data = subset(df_test, cond == "dnorm")
, aes(x=label, y=percent, group = 1, colour = cond)) +
geom_point(data = subset(df_test, cond == "dnorm")
, aes(x=label, y=percent)
, size=1) +
geom_line(col="purple"
, size=1) +
geom_point(data = subset(df_test, cond == "actual")
, aes(x=label, y=percent)
, size=.5) +
geom_line(data = subset(df_test, cond == "actual")
, aes(x=label, y=percent)
, col="black"
, linetype="dotted"
, size=.5) +
geom_point(data = subset(df_test, cond == "us_men")
, aes(x=label, y=percent)
, size=1) +
geom_line(data = subset(df_test, cond == "us_men")
, aes(x=label, y=percent)
, col="dark grey") +
scale_color_manual(values = c("black", "purple", "dark grey")
, name=""
, labels=c("BRFSS", "BRFSS Implied", "U.S.")) +
scale_x_discrete(name =""
, breaks = df_test$label[seq(0,length(df$label),2)]
, labels = as.character(
df_test$label[seq(0,length(df$label),2)])
, limits = df_test$label[df_test$cond== "dnorm"]) +
scale_y_continuous(breaks=seq(min(df_test$percent)
,max(df_test$percent),4)
, labels = function(x) paste0(x, "%")) +
theme(axis.text.x = element_text(angle=90, colour = "black")
, axis.title.y=element_blank()
, axis.text.y = element_text(colour = "black")
, panel.background = element_rect(fill = "white",
colour = "white")
, axis.line = element_line(size = 0.5, linetype = "solid",
colour = "grey")
, legend.direction = "vertical"
, legend.position = "right"
, legend.key = element_blank(),
legend.background = element_rect(fill = "white"
, colour = "white")) +
guides(linetype=guide_legend(keywidth = 3, keyheight = 1)
, colour=guide_legend(keywidth = 3, keyheight = 1)) +
ggtitle("Male Height Distribution in BRFSS 2013 Dataset")
Thanks,
DAVE