Solar Panel Output (Watts): What's the Average, and How Do They ...
The average solar panels have watt-peaks ranging from about 175 W to about . vetting process use high quality solar panels from a variety of manufacturers.
http://howsolarworks.1bog.org/solar-panel-output/
Treatment for Herniated or Bulging Discs
Sunforce 39305 650-Watt High-Efficiency Polycrystalline Solar
High-efficiency polycrystalline solar cells from Sharp provide advanced power output; Weatherproof solar cells feature durable aluminum frames with tempered .
http://tinyurl.com/sunforce-solar-panels
1,800 Watt Portable Home Solar Battery Backup System
The high efficiency 90-watt mono crystalline solar panel allows for quick system recharges, and its adjustable frame allows you to position it for maximum .
http://www.wholesalesolar.com/backup/1800-watt-home-solar-battery-backup-system.html
high watt solar panels Herniated or Bulging Discs
Buy Solar Panels - Kyocera, Mitsubishi, Sanyo, Sharp, REC Solar ...
Astronergy Solar panels, Key Points: Tight power tolerance Rigorously tested high efficiency panels View all Astronergy Solar Panels .
http://www.wholesalesolar.com/solar-panels.html
Basic Solar Math - REC
If a solar panel produces 100 watts for 1 hour, it has produced 100 . In areas with high irradiation, a properly oriented panel that produces 100 Watts at noon on .
http://www.recgroup.com/en/aboutsolar/basic-solar-maths/
200 - 229 Watt Large Solar Panels | Grid-Tie Solar Panels ...
200 - 229 Watt Solar Panels. These high wattage solar panels are excellent for home and commercial applications where high power density is required.
http://www.ecodirect.com/200-Watt-Solar-Panels-s/29.htm
Official Impairment Listing for Spinal Disorders
Nature Power Solar Battery Chargers- High Output- 130 Watt ...
Product Description: Nature Power Solar Battery Chargers- High Output- 130 Watt. Nature Power Monocrystalline Solar Panels take the sun s energy and turns it .
http://shopping.yahoo.com/876932067-nature-power-solar-battery-chargers-high-output-130-watt/
- chintz stacking teapot sets (narrowing of the spine)
BatteryStuff Articles | Everything You Need to Know About Solar ...
Sep 11, 2012 . Solar Info: The Down Low on Everything Up High. . In most case where a 6-watt or larger solar panel is installed use of a charger controller is .
http://www.batterystuff.com/tutorial_solar.htmlAmazon.com: Solar Panel 20 Watt High-efficiency Mono-crystalline ...
Our new high quality and economically priced 20 watt framed solar panel is perfect for charging batteries or other small solar applications. Specifications:Max .
http://www.amazon.com/Solar-Panel-Watt-High-efficiency-Mono-crystalline/dp/B000NP3G08
UL, CEC certified 245 watt solar panel Grade A
The 245 watt solar panels professionally made from 60 6"X6" high efficiency mono crystalline solar cells are ideal for grid tied solar power generation. This is the .
http://www.everbrightsolar.net/245w-solar-pa245.html
Kaneka G-SA060 60 watt 48v solar panel. Lead-free. High efficiency
The Kaneka G-SA060 60 watt solar panel. . Because of its high voltage, the Kaneka G-SA060 is best suited for grid-tie and water pumping applications. And .
http://www.wholesalesolar.com/products.folder/module-folder/kaneka/kaneka60.html
Medical-Vocational Allowance for Herniated Disc
Trans Marine Pro - Solar Panels - Marine Renewable Energy
KD 135 Watt 12V-7.63A Solar Panel Kyocera Solar - Trans Marine Pro - Marine . Sharp's NE-170U1 photovoltaic modules offer high-powered performance and .
http://www.transmarinepro.com/solar-panels.html
SW-S30P SunWize Solar Panel
A good panels for battery charging, the SunWize 30-watt solar module can be . The SunWize SW-S30P's are high quality 30-watt solar modules suitable for a .
http://www.wholesalesolar.com/products.folder/module-folder/SunWize/SW30.html
High Power Solar Panels - Over 100 Watts
Solar panels that we have available in the 100 watt and higher range. Solar panels come in many sizes, up 350+ watts. Smaller panels are easier to handle and .
http://www.solar-electric.com/hiposopa.html
Appealing a Denial of Benefits
Go Power 95 Watt RV Solar Kit
A great 95 watt rv solar kit by go power. this is the perfect kit for all your RV applications. 5.4 amps of solar . you need it! 95 Watt High Efficency Solar Panel .
http://www.outsidesupply.com/go-power-rv-95-watt-solar-kit.aspx
High Quality Solar Panel, Monocrystalline, 2 to 100 Watt Size PV ...
High Quality Solar Panel, Monocrystalline, 5 to 100 Watt Size, Peak Power Up to 50% Above Cheap Import Panels | 2454.
http://www.ledtronics.com/Products/ProductsDetails.aspx?WP=2454


FALLOCATE
Section: Linux Programmer's Manual (2)
Updated: 2014-07-08
Index
Return to Main Contents
NAME
fallocate - manipulate file space
SYNOPSIS
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <fcntl.h>
int fallocate(int fd, int mode, off_t offset, off_t len);
DESCRIPTION
This is a nonportable, Linux-specific system call.
For the portable, POSIX.1-specified method of ensuring that space
is allocated for a file, see
posix_fallocate(3).
fallocate()
allows the caller to directly manipulate the allocated disk space
for the file referred to by
fd
for the byte range starting at
offset
and continuing for
len
bytes.
The
mode
argument determines the operation to be performed on the given range.
Details of the supported operations are given in the subsections below.
Allocating disk space
The default operation (i.e.,
mode
is zero) of
fallocate()
allocates the disk space within the range specified by
offset
and
len.
The file size (as reported by
stat(2))
will be changed if
offset+len
is greater than the file size.
Any subregion within the range specified by
offset
and
len
that did not contain data before the call will be initialized to zero.
This default behavior closely resembles the behavior of the
posix_fallocate(3)
library function,
and is intended as a method of optimally implementing that function.
After a successful call, subsequent writes into the range specified by
offset
and
len
are guaranteed not to fail because of lack of disk space.
If the
FALLOC_FL_KEEP_SIZE
flag is specified in
mode,
the behavior of the call is similar,
but the file size will not be changed even if
offset+len
is greater than the file size.
Preallocating zeroed blocks beyond the end of the file in this manner
is useful for optimizing append workloads.
Because allocation is done in block size chunks,
fallocate()
may allocate a larger range of disk space than was specified.
Deallocating file space
Specifying the
FALLOC_FL_PUNCH_HOLE
flag (available since Linux 2.6.38) in
mode
deallocates space (i.e., creates a hole)
in the byte range starting at
offset
and continuing for
len
bytes.
Within the specified range, partial filesystem blocks are zeroed,
and whole filesystem blocks are removed from the file.
After a successful call,
subsequent reads from this range will return zeroes.
The
FALLOC_FL_PUNCH_HOLE
flag must be ORed with
FALLOC_FL_KEEP_SIZE
in
mode;
in other words, even when punching off the end of the file, the file size
(as reported by
stat(2))
does not change.
Not all filesystems support
FALLOC_FL_PUNCH_HOLE;
if a filesystem doesn't support the operation, an error is returned.
The operation is supported on at least the following filesystems:
- *
-
XFS (since Linux 2.6.38)
- *
-
ext4 (since Linux 3.0)
- *
-
Btrfs (since Linux 3.7)
- *
-
tmpfs (since Linux 3.5)
Collapsing file space
Specifying the
FALLOC_FL_COLLAPSE_RANGE
flag (available since Linux 3.15) in
mode
removes a byte range from a file, without leaving a hole.
The byte range to be collapsed starts at
offset
and continues for
len
bytes.
At the completion of the operation,
the contents of the file starting at the location
offset+len
will be appended at the location
offset,
and the file will be
len
bytes smaller.
A filesystem may place limitations on the granularity of the operation,
in order to ensure efficient implementation.
Typically,
offset
and
len
must be a multiple of the filesystem logical block size,
which varies according to the filesystem type and configuration.
If a filesystem has such a requirement,
fallocate()
will fail with the error
EINVAL
if this requirement is violated.
If the region specified by
offset
plus
len
reaches or passes the end of file, an error is returned;
instead, use
ftruncate(2)
to truncate a file.
No other flags may be specified in
mode
in conjunction with
FALLOC_FL_COLLAPSE_RANGE.
As at Linux 3.15,
FALLOC_FL_COLLAPSE_RANGE
is supported by
ext4 (only for extent-based files)
and XFS.
Zeroing file space
Specifying the
FALLOC_FL_ZERO_RANGE
flag (available since Linux 3.14)
in
mode
zeroes space in the byte range starting at
offset
and continuing for
len
bytes.
Within the specified range, blocks are preallocated for the regions
that span the holes in the file.
After a successful call, subsequent
reads from this range will return zeroes.
Zeroing is done within the filesystem preferably by converting the range into
unwritten extents.
This approach means that the specified range will not be physically zeroed
out on the device (except for partial blocks at the either end of the range),
and I/O is (otherwise) required only to update metadata.
If the
FALLOC_FL_KEEP_SIZE
flag is additionally specified in
mode,
the behavior of the call is similar,
but the file size will not be changed even if
offset+len
is greater than the file size.
This behavior is the same as when preallocating space with
FALLOC_FL_KEEP_SIZE
specified.
Not all filesystems support
FALLOC_FL_ZERO_RANGE;
if a filesystem doesn't support the operation, an error is returned.
The operation is supported on at least the following filesystems:
- *
-
XFS (since Linux 3.14)
- *
-
ext4, for extent-based files (since Linux 3.14)
RETURN VALUE
On success,
fallocate()
returns zero.
On error, -1 is returned and
errno
is set to indicate the error.
ERRORS
- EBADF
-
fd
is not a valid file descriptor, or is not opened for writing.
- EFBIG
-
offset+len
exceeds the maximum file size.
- EINTR
-
A signal was caught during execution.
- EINVAL
-
offset
was less than 0, or
len
was less than or equal to 0.
- EINVAL
-
mode
is
FALLOC_FL_COLLAPSE_RANGE
and the range specified by
offset
plus
len
reaches or passes the end of the file.
- EINVAL
-
mode
is
FALLOC_FL_COLLAPSE_RANGE,
but either
offset
or
len
is not a multiple of the filesystem block size.
- EINVAL
-
mode
contains both
FALLOC_FL_COLLAPSE_RANGE
and other flags;
no other flags are permitted with
FALLOC_FL_COLLAPSE_RANGE.
- EINVAL
-
mode
is
FALLOC_FL_COLLAPSE_RANGE
or
FALLOC_FL_ZERO_RANGE,
but the file referred to by
fd
is not a regular file.
- EIO
-
An I/O error occurred while reading from or writing to a filesystem.
- ENODEV
-
fd
does not refer to a regular file or a directory.
(If
fd
is a pipe or FIFO, a different error results.)
- ENOSPC
-
There is not enough space left on the device containing the file
referred to by
fd.
- ENOSYS
-
This kernel does not implement
fallocate().
- EOPNOTSUPP
-
The filesystem containing the file referred to by
fd
does not support this operation;
or the
mode
is not supported by the filesystem containing the file referred to by
fd.
- EPERM
-
The file referred to by
fd
is marked immutable (see
chattr(1)).
Or:
mode
specifies
FALLOC_FL_PUNCH_HOLE
or
FALLOC_FL_COLLAPSE_RANGE
and
the file referred to by
fd
is marked append-only
(see
chattr(1)).
- ESPIPE
-
fd
refers to a pipe or FIFO.
- ETXTBSY
-
mode
specifies
FALLOC_FL_COLLAPSE_RANGE,
but the file referred to by
fd
is currently being executed.
VERSIONS
fallocate()
is available on Linux since kernel 2.6.23.
Support is provided by glibc since version 2.10.
The
FALLOC_FL_*
flags are defined in glibc headers only since version 2.18.
CONFORMING TO
fallocate()
is Linux-specific.
SEE ALSO
fallocate(1),
ftruncate(2),
posix_fadvise(3),
posix_fallocate(3)
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- Allocating disk space
-
- Deallocating file space
-
- Collapsing file space
-
- Zeroing file space
-
- RETURN VALUE
-
- ERRORS
-
- VERSIONS
-
- CONFORMING TO
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.
Time: 02:54:50 GMT, September 18, 2014


This site is developed as a part of Udacity Full Stack Web developer Nanodegree project. It showcases my projects developed throughout this Nano degree.
Contact:
Name: Md Kamrul Hasan Pulok
Expertise: Full Stack Web Developer
Email: hvpulok@gmail.com


organizing idea share
What would justice look like?
For you? For your communities? For communities you may ally with? (For the answer to that last one, you don't know yourself; you'd have to learn from someone else.)


A channel to discuss trading. For useful links and more info click the pinned messages to the right.
100 messages
Before 05-Dec-19 12:00 AM
snowdamn21-Sep-18 11:20 AM
when McAfee lose dick?
haha
probably does lol
hey, why delete?
actionslacks21-Sep-18 11:21 AM
#metoo mcafee
ComputerGenie 👴👴👴21-Sep-18 11:22 AM
because some things are meant for only those present at the time
snowdamn21-Sep-18 11:22 AM
ok
actionslacks21-Sep-18 11:22 AM
# = pound
ComputerGenie 👴👴👴21-Sep-18 11:22 AM
I try to keep my text "clean" in certain rooms
snowdamn21-Sep-18 11:22 AM
BTC gains $200-300 and happy days!!!
actionslacks21-Sep-18 11:23 AM
don't worry, it will crash soon
1
ComputerGenie 👴👴👴21-Sep-18 11:23 AM
lol
actionslacks21-Sep-18 11:23 AM
take your profits kids
ComputerGenie 👴👴👴21-Sep-18 11:24 AM
I still don't understand how BTC at any price over $4200 is a "crash"
takes his 13x at $6200 and walks away happy
actionslacks21-Sep-18 11:25 AM
"but my ripple just got accepted by 6 million more financial institutions"
ComputerGenie 👴👴👴21-Sep-18 11:26 AM
"Slurp 'N Gulp" isn't a "financial institution"
snowdamn21-Sep-18 11:27 AM
XRP pump after New Years was out of this world, not a HODLer unfortunately
actionslacks21-Sep-18 11:28 AM
financial institutions are just office buildings full of tax policy subsidized useful idiots
much like parking lots
which are subsidized as well
ComputerGenie 👴👴👴21-Sep-18 11:29 AM
None of it counts until the hooker down the block takes it as payment
1
actionslacks21-Sep-18 11:32 AM
well hookers inherently have bad judgement
i blame bad marketing
ComputerGenie 👴👴👴21-Sep-18 11:33 AM
well hookers inherently have bad judgement
not compared to sluts who give it away for free
1
actionslacks21-Sep-18 11:34 AM
dont go talking shit about sluts
love is a battlefield
we all use the the weapons available
ComputerGenie 👴👴👴21-Sep-18 11:37 AM
Great!   For 2019 being 'the year of the DEX', the bear market couldnt have come at a worse time
ComputerGenie 👴👴👴21-Sep-18 11:52 AM
that and one of the downfalls is that most folks became "complacent" (for want of a better word) with jl being the only LP and "nobody trading" has stopped others from being LPs(edited)
actionslacks21-Sep-18 11:52 AM
well for there to be a "year of the dex" there needs to be more than one that actually works
Cryptoon21-Sep-18 11:53 AM
sure
But atm I'm only buying more with fiat, and hyperdex cant help me with that
ComputerGenie 👴👴👴21-Sep-18 11:54 AM
doesn't have good enough internet to use HyperDEX
actionslacks21-Sep-18 11:54 AM
judging by the dapp traffic on ethereum they cant handle much more transaction volume
heady days my friends
Cryptoon21-Sep-18 11:54 AM
@ComputerGenie 👴👴👴 not good enough internet?
ComputerGenie 👴👴👴21-Sep-18 12:04 PM
LOL
actionslacks21-Sep-18 12:05 PM
get ready for the baby grenades
snowdamn21-Sep-18 12:05 PM
you need the VPS more than me
ComputerGenie 👴👴👴21-Sep-18 12:05 PM
I was honestly surprised when they didn't show up shortly after I started mining and our barn was 80F in one corner all winter and our electric bill went up 10x
Issuance of tether (USDT), the controversial stablecoin, has had no meaningful impact on the price of bitcoin, a newly published academic study found.
ComputerGenie 👴👴👴21-Sep-18 12:08 PM
I bought tether at 92 cents, sold it at $1.14, and never looked at it again
passcombo.com 🏴☠🏴21-Sep-18 12:09 PM
USDT is nice to trade for 1 reason - taxes. IF you exchange USD fot BTC you need to tax, if for USDT - it's crypto:crypto exchange. Do I get it right?
@KomodoWorld It seems like you need and order (or even 2 orders) of magnitute less money (then total CAP) to significantly move price. I'm not sure but it can be like 10% of current BTC calue in USD to move price up 100% or so... might be... so in that terms USDT is significant(edited)
bishop21-Sep-18 12:11 PM
@passcombo.com 🏴☠🏴 not in the USA
ComputerGenie 👴👴👴21-Sep-18 12:11 PM
in the US, if you trade x for y (in some CEX or KYC platform), you pay the taxable amount of the USD value of the trade, no matter what x or y is
passcombo.com 🏴☠🏴21-Sep-18 12:11 PM
ok I hope it's not the case in EU
1
ComputerGenie 👴👴👴21-Sep-18 12:13 PM
is still waiting for the IRS to tell him the USD taxable value of TESTCOINA...
passcombo.com 🏴☠🏴21-Sep-18 12:13 PM
@ComputerGenie 👴👴👴 that means for every trade you need to make a log / save it properly
ComputerGenie 👴👴👴21-Sep-18 12:13 PM
yes
passcombo.com 🏴☠🏴21-Sep-18 12:13 PM
lots of accounting
actionslacks21-Sep-18 12:14 PM
btw its perfectly legal to grow weed here in PNW
passcombo.com 🏴☠🏴21-Sep-18 12:14 PM
it's a constant like 1% of overall trade or what?
@actionslacks is it also legal to send/trade it?(edited)


In this post we will create custom collector that can be used with Java 8 Stream API.
We will start by familiarising ourselves with the Collector
interface:
Before we move to explaining what each method should return, let’s see how
they are used in a simplified version of Stream::collect
:
After seeing it usage we may describe Collector
interface in more detail.
Let’s start with generic parameters used in declaration Collector<T,A,R>
:
T
- type of stream elementsA
- type of a helper object that will be used to keep partial results ofcollect
operation. I will call this helper object an accumulator objectR
- type ofcollect
operation result
Now we can move to describe methods required by Collector
interface:
supplier()
- Method should return instance ofSupplier
that will be used to create accumulator object(s). For parallel stream returned supplier may be used to create many accumulator objects e.g. one per threadaccumulator()
- This is the most important method of the interface. It should return instance ofBiConsumer
that will be used to incorporate current stream element into accumulator object. For example forsum()
collectorBiConsumer
will be responsible for adding current number to the partial sum kept in the accumulator objectfinisher()
- This method should returnFunction
that will transform accumulator object into final resultcombiner()
- For parallel stream more than one accumulator object may be used in singlecollect
operation. This method returnsBinaryOperator
that can be used to “merge” two accumulator objects into one. For example forsum()
collectorBinaryOperator
should just add partial sums contained in accumulator objectscharacteristics()
- This method should returnSet
of characteristics that describe current collector. The safe default is to return an empty set. Since this is an important topic we now move to describe it in more detail
Every collector can have any combination of the following characteristics:
-
Characteristics.CONCURRENT
- This means that accumulator object returned bysuppier().get()
can be modified from many threads concurrently. Basically this flag means that during singlecollect
operation parallel stream may use a single accumulator object and modify it from as many threads as it wants instead of creating many accumulator objects (one per thread) and then merging them viacombiner
-
Characteristics.UNORDERED
- Specify this characteristics when result of thecollect
operation doesn’t depend on the order of stream elements (or more mathematically when collector is comutative). For exampletoSet()
collector has this characteristics because resultingSet
doesn’t depend on order of the stream elements. On the other handtoList()
collector returns list that preserves order of elements in the original stream so it is ordered.
We must be careful when specifying this flag, for example at first you may say thatsum()
collector should beUNORDERED
but when we take under account floating point overflow behaviour (+Infinity) it turns out thatsum()
must be ordered.
This characteristics is mostly useful when working with parallel streams.UNORDERED
collector allows for more optimizations to be done during splitting stream into parts -
Characteristics.IDENTITY_FINISH
- This characteristics means thatFunction
returned byfinisher()
is identity and we may cast accumulator object straight to the result type
Now it’s time to write some code! We will create simple MinMaxCollector
that
will compute both min and max element of the stream at the same time:
Some remarks:
- In our example methods that were responsible for computing min/max were defined on accumulator object. Some people don’t like this approach, instead they define all logic inside lambda expressions and use accumulator object to only keep data. For me this is just a mater of taste
- For simple collectors like
sum()
you don’t need to define a new accumulator object class,new long[1]
will do the job
Finally let’s see how we may use our newly created collector:
That’s all, thanks for reading!


|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.numericalmethod.suanshu.analysis.integration.univariate.riemann.Romberg
public class Romberg
Romberg's method computes an integral by generating a sequence of estimations of the integral values and then extrapolation. The estimations are extrapolated to where the discretization is 0.
For example, Simpson's rule is a special case of Romberg's method, with the number of points for extrapolation is equal to 2.
This implementation does not assume any particular integrator,
other than that the integrator is an IterativeIntegrator
.
The user may combine Romberg's method with his favorite iterative integrator.
| Constructor Summary | |
|---|---|
Romberg(IterativeIntegrator integrator)
Construct an integrator by extending an IterativeIntegrator using Romberg's method. |
| Method Summary | |
|---|---|
double |
integrate(UnivariateRealFunction f,
double a,
double b)
Integrate function f from a to b . |
double |
precision()
Get the convergence threshold. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Romberg(IterativeIntegrator integrator)
IterativeIntegrator
using Romberg's method.
Note that the iterative integrator must do at least 2 steps in order to carry out any extrapolation.
integrator
- an iterative integrator| Method Detail |
|---|
public double integrate(UnivariateRealFunction f, double a, double b)
Integrator
f
from a
to b
.
/ b
| f(x) dx
/ a
integrate
in interface Integrator
f
- a univariate functiona
- lower limitb
- upper limit
public double precision()
Integrator
For example, for an IterativeIntegrator
,
the integral is considered converged
if the relative error of two successive sums is less than the threshold.
precision
in interface Integrator
|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


---
description: 'The About Page'
template: main
protocol: all
published: true
name: About
url: /about
---
We're On a Mission to Make eCommerce Better.
And we're doing that by building a more flexible, modern, easier to use and higher performance eCommerce platform.
Learn more


|
NetworkRegistrationHelper |
class NetworkRegistrationHelper
This checks the config.certificatesDirectory for certificates required to connect to a Corda network.
If the certificates are not found, a PKCS10CertificationRequest will be submitted to Corda network permissioning server using NetworkRegistrationService.
This process will enter a polling loop until the request has been approved, and then
the certificate chain will be downloaded and stored in Keystore reside in config.certificatesDirectory.
|


--- title: Improving Your Data Analysis in R author: Steve Pederson date: '2020-09-21' slug: improving-your-data-analysis-in-r Description: '' tags: ["R Projects", "R Markdown", "tidyverse"] categories: [] DisableComments: no ---
The ecosystem of tools and packages for R has seen incredible growth over the last decade. Whilst many of these enable simpler interaction with R, finding the best way forward can be a challenge. Having a seen a few analyses at this point in my career, this session intends to show a few simple strategies for keeping your analysis and data well-organised. The aim is that today we can learn enough of the basic strategies to enable you to begin compiling an analysis which is easy to follow, and eventually publishable.
For today, there is a combination of reading and actions. I’ve encased the actions in their own blocks to help make it clear.
This means you will need to do something
Alternatively, R code to be executed will be shown in a “code chunk” like so
1 + 1
Before we go any further, we’ll need to ensure we’re working on a system that is ready to go. Please make sure you have
To make sure you have the packages you need, please copy and paste the following into your Console. There’s no real need to understand this, but essentially we’re checking that today’s packages are installed, then installing anything that’s missing.
req <- c("here", "tidyverse", "rmarkdown", "pander")
needed <- setdiff(req, rownames(installed.packages()))
if (length(needed)) {
msg <- sprintf("Couldn't find the package %s. Preparing to install.\n", needed)
message(msg)
install.packages(needed)
}
If you ended up installing packages, you will usually be asked if you wish to update one or more packages.
If this appears now, just enter n
as these updates can take a while and we’d like to keep things tight for this session.
Keeping your data well organised is fundamental to any analysis. It usually takes minimal effort, but can end up saving considerable time in the long run. Additionally, simple strategies for keeping your data organised can go a long way to making your analysis reproducible and transferable between computers or collaborators. R Studio enables this to be managed simply via R Projects. These are nothing mysterious or magical, but simply provide you with a framework for avoiding common mistakes.
Let’s create a new R Project to make sure we’re all on the same page.
Using the drop-down menu in R Studio, choose: File > New R Project
.
You may be asked if you’d like to save your R workspace at this point, and this decision is up to you. If you have an active analysis, then maybe choose yes if that’s you’re usual approach, if you’re already in a new session, then there will be no need.
This will bring another few options so please choose:
This should bring up the following form:
On UNIX systems such as Linux or MacOS, your home directory is often referred to using the ~
symbol as a shortcut.
This should also appear on Windows machines, but represents a different directory for each user.
For me on my laptop, this is /home/steve
but on my University (SOE) Desktop it’s U:/
.
For today we’ll create our R Project in our home directory.
Please enter: “Improving-R
” as the Directory name
in this form, then click Create Project.
I, along with most other bioinformaticians, have a dislike for directories with spaces in the name, so please note I’ve used the dash to separate the words Improving
and R
.
To ensure we’re all using the same directories, please do the same.
At this point, you should find yourself in a clean R Session.
When we initialised our R Project, the file Improving-R.Rproj
was created.
This enables R Studio to define settings like whether you save the Workspace or not.
This file also gives you something you can click-on, and the resultant R Studio session will always open in the project directory!
If you have multiple analyses, you simply create a new project for each analysis and treat the main project directory as the parent (or root) directory for the entire analysis.
This way, you can keep each analysis separate and well-organised.
Beyond this file’s existence, we’re not really going to look at it any further.
If you have multiple projects on your computer, R Studio will also keep a list of these projects in a drop-down menu at the top-right of your session. (ADAPT doesn’t seem to do this though). To jump between projects, you simply select the one you want to open and you’re there. By default, both R and the Files pane will open in your project’s root directory.
We can easily generate and work with large numbers of files, so organising your directory can be very advantageous.
One useful trick might be to create a data
directory within each R project, and use this to hold the data-files you’re analysing for the project.
Depending on the analysis, you may have multiple subdirectories within this.
An example view of one of my analyses currently underway on phoenix
is shown below.
data/
├── aligned
│ ├── bam
│ └── dedup_bam
├── raw
│ ├── fastq
│ ├── FastQC
│ └── SampleSheet.csv
└── trimmed
├── discarded
├── fastq
├── FastQC
└── logs
In the above, I have all data files from the start of the analysis (data/raw/fastq
) to the final alignments I’m working with (data/aligned/dedup_bam
).
Many intermediate files (e.g. FastQC reports, discarded reads and trimming logs) are also in an easy to find location, but are out of the way of my main working directory (i.e. project folder).
A good trick may be to have a separate directory for bam files, another for bed files, another for RNA-Seq counts etc..
It’s easy to underestimate how beneficial this can be.
When you you’re not drowning in files, you can feel far more in control of your analysis.
We’re going to keep everything pretty simple today, but let’s create a data
directory within your project root directory.
Look in the Files pane and click on the icon at the top-left of this pane.
Name the directory data
.
Save this file into your newly created directory.
The file we’ve just downloaded is the output of an example analysis comparing skeletal muscle and brain samples from mouse, using RNA-Seq.
This is the exact output generate by the tool featureCounts
, which you may be familiar with.
here::here()
to Locate FilesKnowing where we are, and which directory R
is currently looking is also an important concept.
The most classic way of seeing which directory we are in us to use the function getwd()
getwd()
Everyone’s output from this function will be different, but the final directory should be Improving-R
.
This is where R
is currently looking on your hard-drive.
If you export a plot, this is where R will write it by default.
Likewise, if you want to import any data, this is where R
will be looking.
We can check the contents of this directory using.
list.files()
We can also list the files in the data
directory
list.files("data")
Importantly, we were only able to see inside the data
directory, because it was in our current folder.
We can see it relative to where R
is currently looking.
Formally, this is known in computational circles as a relative path.
We can change where R
is looking by using the Files pane.
Let’s tell R
to look in the data
directory by default.
In the Files pane, click the data
directory icon to look in the directory.
Then click on the More
drop-down menu in the Files pane, finally selecting Set As Working Directory
.
This has set your R session to now be looking the data
directory.
Try the following commands and see what you get.
getwd()
list.files()
list.files("data")
Hopefully you can see the differences in this output to what we had before.
Knowing where R
is looking, and knowing where your data is located is a fundamental step that many people either overlook, or get confused by.
Now let’s return to our project root directory.
In the top-right of the Files pane, click the small R-project symbol, and this will return you to the project root directory.
Once you’re there, use the More
drop-down menu to set this back to be the Working Directory.
Double-check, using getwd()
to make sure your R
session is looking in the correct location.
An alternative strategy for making sure you can find your files is the use the function here()
, provided in the package here
.
As a few packages have a function called here()
, I tend to call this directly from the package using the command here::here()
.
This syntax is defined as packageName::functionName()
and tells R explicitly to use the function here()
from the here
package.
This is also known as using the package Namespace to call the function.
It’s a good way to manage things when using a function which has been defined by multiple packages, such as rename()
or filter()
.
here::here()
This function looks in your current directory for an .Rproj file and returns that directory. If no file file is found, it steps up a directory and keeps going recursively until the system root is encountered. When working within an R project, this is an excellent, but deceptively simple way to always look within project subdirectories.
here::here("data")
list.files(here::here())
list.files(here::here("data"))
Notice that in the above lines of code, we’ve looked inside different folders just like we did earlier using list.files()
and list.files("data")
.
However, this time we did it using our R Project file as the reference point.
It’s still a relative path, but it’s anchored to a file.
This is a very useful trick as your analyses grow more complicated, and in particular, using this strategy makes using R Markdown far more straight-forward.
Many of the analyses I’ve seen use the classic R
script to store your commands.
These are just plain text files which we commonly add the suffix .R
to, and contain commands to be executed within the R Console.
Any plain text we generally comment out using the #
symbol, which tells R
to ignore the rest of the line.
A far more flexible, and increasingly common strategy is to use R Markdown
to perform an analysis, as this allows the combination of formatted text using paragraphs, along with embedded R
code.
The most common approach is to have descriptions and methods written in formatted text, and the code written in “code chunks”.
We can then compile the document from R Markdown
to html, a pdf, or even a MS Word/PowerPoint document.
Today we’ll stick with html.
The R
code is always executed when you compile the document, so this can quickly alert you to any problems in your code.
Let’s form a simple document and get familiar with the format.
Every time we create a new R Markdown document, R Studio gives us an example one as a starting template. I usually delete nearly all of this immediately, but for us today it’s going to be most helpful.
Using the main drop-down menu, choose: File > New File > R Markdown
and a new dialog box will appear.
Change the title to something like “RMarkdown Tutorial” and add your name as the Author.
Click OK
.
Save the file as RMarkdownTutorial.Rmd
By default this should have been saved into the project root directory, so check the Files pane to make sure everything is as it should be.
Just to make things a little easier today, click the settings icon next to the Knit button at the top of the RMarkdown document, and check the Preview in Viewer Pane
menu item.
This last step will make sure the output shows in the Viewer tab, within the lower-right pane of R Studio.
Click the Knit button and an html document will appear in the Viewer Pane
R Markdown is an extension of generic Markdown that is able to execute R code, as well as using the standard formatting options of Markdown. This has now become so powerful and flexible that people literally write books using R Markdown. As we go through the different features of this document, we’ll try and denote which is generic markdown, and which features are specific to R Markdown.
The first 6 lines are the header, which uses a syntax known as YAML.
In short, each field is named and a semi-colon denotes the end of the name and the start of the value.
YAML is extremely common, can be used with Markdown and the deeper you go, the more you learn about it.
For today, there’s not much to learn besides noticing the title:
, author:
and other fields.
You edit these freely if you care, however, the starting and ending ---
lines are vital and denote the region of this file constituting the header.
Lines 8-10 are a “code chunk”.
Code chunks always start with ```{r}
and are closed again with another ```
.
Anything between these is code that will be executed.
This first chunk is very uninteresting, but the one starting on line 18 is far more relevant.
This chunk prints a summary of the object cars
which lives by default as a hidden R
object in every session.
Notice the word cars
within the chunk header.
This is a chunk name and naming chunks is extremely good practice.
We can use these to navigate documents using the menu on the right.
Clearly, this is a trivial document and careful use of chunk names can be extremely helpful with longer analyses.
Chunks can be executed interactively in your Console by clicking the green “play” arrow in each chunk. A shortcut for the less click-inclined is to use Ctrl+Alt+C when the cursor is inside the chunk. Ctrl+Alt+N moves to and executes the next chunk, which can be very helpful for stepping through an analysis.
The header line of chunks can contain many arguments with the one being demonstrated in line 26 being echo = FALSE
.
This hides the R code in that chunk, and if you look at the compiled document you’ll see the plot shown, but with no code visible.
This is quite different to the cars
chunk where we can see both the code and the output.
Notice that a figure caption has now been placed under the plot.
The standard markdown formatting for section headers is to use the hash symbol (#
).
Increasing the number of hashes, moves from Title (#
) to Section (##
) to Sub-Section (###
) and so on.
This is very important for users of R Scripts.
Inside a code chunk, you can still write comments using any number of #
, whilst outside of code chunks, these denote headings.
The text outside of code chunks (or any inline code) is not executed, so there is no need for comments in the main body of the text.
Beyond section headers, formatting tricks for Markdown can be see in the R Markdown guide.
To open the R Markdown guide: Help > Markdown Quick Reference
Here you can see how to make a word render in italics or bold (see the word Knit on line 16 of your R Markdown).
Additionally, this shows you how to create bullet points, insert images etc, etc.
Anything which doesn’t execute R
code here is generic Markdown.
Try adding some random changes to your RMarkdown document and see how fancy you can make it.

We’re going to load our counts using the function read_tsv()
provided in the package readr
as part of the tidyverse.
The tidyverse
is really a simple wrapper which installs several packages when used inside install.packages("tidyverse")
and when called inside library(tidyverse)
, loads the packages ggplot2
, dplyr
, stringr
, readr
and a few others which we’ll ignore today.
I like to load my packages at the top of every R Markdown file, so directly under the setup
chunk, form a new one by clicking the Insert icon at the top-right.
Name the chunk packages
.
Inside the chunk, type library(tidyverse)
and recompile the document.
This is a very “chatty” command which prints our some “informative” messages. Frankly, no-one cares, so let’s hide these.
Inside the setup
chunk, place a comma after echo = TRUE
and add the command: message = FALSE
.
Recompile the document.
These options inside knitr::opts_chunk$set()
set the default behaviour of every chunk, and these are passed to every subsequent chunk header.
These options can be over-ruled in any chunk header, but sometimes it’s just easier to set them here.
We’ve now told R
to hide “informative messages”, because they’re usually not.
I prefer using the tidyverse
(i.e. readr
) functions for loading data for a few reasons.
tibble
which are like data.frame
objects, but just a little nicer to work with (mostly)The main functions are read_csv()
and read_tsv()
Data from featureCounts
is tab-delimited, with the first line being a header row.
We can have a sneak peak using the readLines()
function.
fl <- "data/counts.out"
readLines(fl, n = 3)
We can see here that:
#
) and contains the executed codeYou can see the tab-delimiter as \t
in every line, confirming that read_tsv()
is the best option.
Replace the readLines(...)
line with the following
counts <- read_tsv(fl, comment = "#")
Notice the informative messages! These are actually helpful when running interactively, but aren’t required when compiling the document.
Re-compile the document to check the messages are hidden
Most of you will have seen the chunk output appear “inline” in your R Markdown document. Many people prefer this (e.g. all of my PhD Students), but I don’t. I prefer all output to be in the Console, and all plots to be in the Plots pane. You can change this by checking “Chunk Output in Console” in the settings menu for each R Markdown document. This can also be set using Global Options if you prefer.
Now that we’ve loaded a file, a good plan might be to explain what we’ve done and provide some informative output.
After your data import chunk, add:
Counts were loaded as a
tibble
usingread_tsv()
, for 55450 genes and 8 samples.
These values were obtained by me manually running dim(counts)
on the object while I wrote this, but we can obtain this data directly from our object.
Change the number 55450 to `r nrow(counts)`
and recompile.
Now change the number 8 to `r ncol(counts) - 1`
If we really wanted to format that nicely, we can add the package library(scales)
to the packages
chunk, and wrap nrow(counts)
inside the function comma()
So far, we’ve just loaded a file, but in reality many analyses will become complicated with numerous R Markdown files.
It might be a sensible idea to put them in their own folder, so let’s form a directory called analysis
in our project root.
Close the RMarkdown and move it into the analysis
folder.
Try to compile and see what happens.
This is where here::here()
becomes helpful again.
By default, R Markdown documents compile from the folder they are located in, so if we change the line fl <- "data/counts.out"
to fl <- here::here("data/counts.out")
, we’ll have solved the problem.
This is the best way to approach file paths in R.
here::here()


Twisted Internet is a collection of compatible event-loops for Python.
It contains the code to dispatch events to interested observers and a portable
API so that observers need not care about which event loop is running. Thus,
it is possible to use the same code for different loops, from Twisted's basic,
yet portable, select
-based loop to the loops of various GUI
toolkits like GTK+ or Tk.
Twisted Internet contains the various interfaces to the reactor
API, whose usage is documented in the low-level chapter. Those APIs
are IReactorCore
,
IReactorTCP
,
IReactorSSL
,
IReactorUNIX
,
IReactorUDP
,
IReactorTime
,
IReactorProcess
,
IReactorMulticast
and IReactorThreads
.
The reactor APIs allow non-persistent calls to be made.
Twisted Internet also covers the interfaces for the various transports,
in ITransport
and friends. These interfaces allow Twisted network code to be written without
regard to the underlying implementation of the transport.
The IProtocolFactory
dictates how factories, which are usually a large part of third party code, are
written.


For every good design, even greater code follows!
Here’s a collection of ongoing faux code projects that would be listed on a portfolio site. Enjoy!
----------------------------
“Vision is the art of seeing the invisible” -Jonathan Swift
Here are is a collection of faux design projects would be featured on a real portfolio site.
----------------------------


Chapter 4 Individual Differences
Audience: Individuals familiar with cognitive science that would think music is good way to talk about cognitive abilites
Eventually i will say that * WMC is really governing a lot of this work and people need to control for this pre-existing difference * ## Introduction
hile musical ability is perhaps more affected by training than the other measures that were of interest to Spearman (i.e. language and mathematics), the relationship between musical and cognitive ability, and the factors that mediate their relationship still has yet to be fully understood.
- Current state suggests that in some cases, musicians tend to do better than non musical peers
- Okada and Slevc see this as explained by three possible hypotheses
- Music makes you smarter
- Smarter People take music lessons
- Higher functioning people tend to take music lessons and music training amplifys already pre-existing differences.
It’s important to get at this issue because if there were any causal elements found, this would have big implications since enhancing cognitive abilities would bring along with it the other benefits like X Y Z While this might be a nice side fiding, important to note that even if a causal link were to be established, tethering music engagement to its ability to make someone smarter is a bad idea for numerous reasons probably given by schellenberg.
Really the interesting reason to look into this relationship is that music, unlike other stimuli, provides a unique insight into looking things like gf and wmc bc no semantic information For example, if what is more likley the third hypothesis is true and there are just pre-existing differences that do not change but are mabye amplified with music lessons, this would have serious implications for a lot of the findings in the music psychology literature.
4.1 Overview of Experiment (cross sectional design)
4.1.1 Participants
Two hundred fifty-four students enrolled at Louisiana State University completed the study. We recruited students, mainly in the Department of Psychology and the School of Music. The criteria for inclusion in the analysis were no self-reported hearing loss, not actively taking medication that would alter cognitive performance, and univariate outliers (defined as individuals whose performance on any task was greater than 3 standard deviations from the mean score of that task). Using these criteria, eight participants were not eligible due to self reporting hearing loss, one participant was removed for age, and six participants were eliminated as univariate outliers due to performance on one or more of the tasks of working memory capacity. Thus, 239 participants met the criteria for inclusion. The eligible participants were between the ages of 17 and 43 (M = 19.72, SD = 2.74; 148 females). Participants volunteered, received course credit, or were paid $20.
4.1.2 Materials
Cognitive Measures
All variables used for modeling approximated normal distributions. Processing errors for each task were positively skewed for the complex span tasks similar to Unsworth, Redick, Heitz, Broadway, and Engle (2009). Positive and significant correlations were found between recall scores on the three tasks measuring working memory capacity (WMC) and the two measuring general fluid intelligence (Gf). The WMC recall scores negatively correlated with the reported number of errors in each task, suggesting that rehearsal processes were effectively limited by the processing tasks (Unsworth et al., 2009).
<IP_ADDRESS> Measures
<IP_ADDRESS>.1 Goldsmiths Musical Sophistication Index Self Report (Gold-MSI)
Participants completed a 38-item self-report inventory and questions consisted of free response answers or choosing a selection on a likert scale that ranged from 1-7. (Müllensiefen, et al., 2014). The complete survey with all questions used can be found at goo.gl/dqtSaB.
<IP_ADDRESS>.2 Tone Span (TSPAN)
Participants completed a two-step math operation and then tried to remember three different tones in an alternating sequence (based upon Unsworth et al., 2005). We modelled the three tones after Li, Cowan, Saults (2005) paper using frequencies outside of the equal tempered system (200Hz, 375Hz, 702Hz). The same math operation procedure as OSPAN was used. The tones was presented aurally for 1000ms after each math operation. During tone recall, participants were presented three different options H M and L (High, Medium, and Low), each with its own check box. Tones were recalled in serial order by clicking on each tone’s box in the appropriate order. Tone recall was untimed. Participants were provided practice trials and similar to OSPAN, the test procedure included three trials of each list length (3-7 tones), totalling 75 letters and 75 math operations.
<IP_ADDRESS>.3 Operation Span (OSPAN)
Participants completed a two-step math operation and then tried to remember a letter (F, H, J, K, L, N, P, Q, R, S, T, or Y) in an alternating sequence (Unsworth et al., 2005). The same math operation procedure as TSPAN was used. The letter was presented visually for 1000ms after each math operation. During letter recall, participants saw a 4 x 3 matrix of all possible letters, each with its own check box. Letters were recalled in serial order by clicking on each letter’s box in the appropriate order. Letter recall was untimed. Participants were provided practice trials and similar to TSPAN, the test procedure included three trials of each list length (3-7 letters), totalling 75 letters and 75 math operations.
<IP_ADDRESS>.4 Symmetry Span (SSPAN)
Participants completed a two-step symmetry judgment and were prompted to recall a visually-presented red square on a 4 X 4 matrix (Unsworth et al., 2005). In the symmetry judgment, participants were shown an 8 x 8 matrix with random squares filled in black. Participants had to decide if the black squares were symmetrical about the matrix’s vertical axis and then click the screen. Next, they were shown a “yes” and “no” box and clicked on the appropriate box. Participants then saw a 4 X 4 matrix for 650 ms with one red square after each symmetry judgment. During square recall, participants recalled the location of each red square by clicking on the appropriate cell in serial order. Participants were provided practice trials to become familiar with the procedure. The test procedure included three trials of each list length (2-5 red squares), totalling 42 squares and 42 symmetry judgments.
<IP_ADDRESS>.5 Gold-MSI Beat Perception
Participants were presented 18 excerpts of instrumental music from rock, jazz, and classical genres (Müllensiefen et al., 2014). Each excerpt was presented for 10 to 16s through headphones and had a tempo ranging from 86 to 165 beats per minute. A metronomic beep was played over each excerpt either on or off the beat. Half of the excerpts had a beep on the beat, and the other half had a beep off the beat. After each excerpt was played, participants answered if the metronomic beep was on or off the beat and provided their confidence: “I am sure”, “I am somewhat sure”, or “I am guessing”. The final score was the proportion of correct responses on the beat judgment.
<IP_ADDRESS>.6 Gold-MSI Melodic Memory Test
Participants were presented melodies between 10 to 17 notes long through headphones (Müllensiefen et al., 2014). There were 12 trials, half with the same melody and half with different melodies. During each trial, two versions of a melody were presented. The second version was transposed to a different key. In half of the second version melodies, a note was changed a step up or down from its original position in the structure of the melody. After each trial, participants answered if the two melodies had identical pitch interval structures.
<IP_ADDRESS>.7 Number Series
Participants were presented with a series of numbers with an underlying pattern. After being given two example problems to solve, participants had 4.5 minutes in order to solve 15 different problems. Each trial had 5 different options as possible answers (Thurstone, 1938).
<IP_ADDRESS>.8 Raven’s Advanced Progressive Matrices
Participants were presented a 3 x 3 matrix of geometric patterns with one pattern missing (Raven et al., 1998). Up to eight pattern choices were given at the bottom of the screen. Participants had to click the choice that correctly fit the pattern above. There were three blocks of 12 problems, totalling 36 problems. The items increased in difficulty across each block. A maximum of 5 min was allotted for each block, totalling 15 min. The final score was the total number of correct responses across the three blocks.
4.1.3 Procedure
Participants in this experiment completed eight different tasks, lasting about 90 minutes in duration. The tasks consisted of the Gold-MSI self-report inventory, coupled with the Short Test of Musical Preferences, and a supplementary demographic questionnaire that included questions about socioeconomic status, aural skills history, hearing loss, and any medication that might affect their ability to perform on cognitive tests. Following the survey they completed three WMC tasks: a novel Tonal Span, Symmetry span, and Operation span task; a battery of perceptual tests from the Gold-MSI (Melodic Memory, Beat Perception, Sound Similarity) and two tests of general fluid intelligence (Gf): Number Series and Raven’s Advanced Progressive Matrices.
Each task was administered in the order listed above on a desktop computer. Sounds were presented at a comfortable listening level for the tasks that required headphones. All participants provided informed consent and were debriefed. Only measures used in modeling are reported below.
4.1.4 Results
<IP_ADDRESS> Descriptive, Data Screening, Correlational
The goal of the analyses was to examine the relationships among the measures and constructs of WMC, general fluid intelligence, musical sophistication (operationalized as the General score from the Gold-MSI), in relation to the two objective listening tests on the Gold-MSI. Before running any sort of modeling, we inspected our data to ensure in addition to outlier issues as mentioned above, the data exhibited normal distributions. We report both our correlation values, as well as visually displaying our distributions in Figure 1.
Before running any modeling, we checked our data for assumptions of normality since violations of normality can strongly affect the covariances between items. While some items in Figure 1 displayed a negative skew, many of the individual level items from the self report scale exhibited high levels of Skew and Kurtosis beyond the generally accepted ± 2 (Field, Miles, & Field, 2012), but none of the items with the unsatisfactory measures are used in the general factor.
<IP_ADDRESS> Modeling
<IP_ADDRESS>.1 Measurement Model
We then fit a measurement model to examine the underlying structure of the variables of interest used to assess the latent constructs (general musical sophistication, WMC, general fluid intelligence) by performing a confirmatory factor analysis (CFA) using the lavaan package (Rosseel, 2013) using R (R Core Team, 2017). Model fits in can be found in Table 3. For each model, latent factors were constrained to have a mean of 0 and variance of 1 in order to allow the latent covariances to be interpreted as correlations. Since the objective measures were on different scales, all variables were converted to z scores before running any modeling.
- MODEL HERE
Variables are defined as follows: gen: general factor latent variable; wmc: working memory capacity; gf: general fluid intelligence; zIS: “Identify What is Special”; zHO: “Hear Once Sing Back”; zSB: “Sing Back After 2-3”; zDS: “Don’t Sing In Public”; zSH: “Sing In Harmony”; zJI:”Join In”; zNI: “Number of Instrumetns”; zRP:”Regular Practice”; zNCS: “Not Consider Self Musician”; zNcV: “Never Complimented”; zST: “Self Tonal”; zCP: “Compare Performances”; zAd: “Addiction”; zSI: “Search Internet”; zWr: “Writing About Music”; zFr: “Free Time”; zTP: “Tone Span”; zMS: “Symmetry Span”; zMO: “Operation Span”; zRA: “Ravens”; zAN: “Number Series”.
<IP_ADDRESS> Structural Equation Models
Following the initial measurement model, we then fit a series of SEMs in order to investigate both the degree to which factor loadings changed when variables were removed from the model as well as the model fits. We began with a model incorporating our three latent variables (general musical sophistication, WMC, general fluid intelligence) predicting our two objective measures (beat perception and melodic memory scores) and then detailed steps we took in order to improve model fit. For each model, we calculated four model fits: χ2 , comparative fit index (CFI), root mean square error (RMSEA), and Tucker Lewis Index (TLI). In general, a non-significant χ2 indicates good model fit, but is overly sensitive to sample size. Comparative Fit Index (CFI) values of .95 or higher are considered to be indicative of good model fits as well as Root Mean Square Error (RMSEA) values of .06 or lower, Tucker Lewis Index (TLI) values closer to 1 indicate a better fit. (Beajean, 2014).
After running the first model (Model 1), we then examined the residuals between the correlation matrix the model expects and our actual correlation matrix looking for residuals above .1. While some variables scored near .1, two items dealing with being able to sing (“I can hear a melody once and sing it back after hearing it 2 – 3 times” and “I can hear a melody once and sing it back”) exhibited a high level of correlation amongst the residuals (.41) and were removed for Model 2 and model fit improved significantly (χ2 (41)=123.39, p < . 001).
After removing the poorly fitting items, we then proceeded to examine if removing the general musical sophistication self-report measures would significantly improve model fit for Model 3. Fit measures for Model 3 can be seen in Table 3 and removing the self-report items resulted in a significantly better model fit (χ2 (171)=438.8, p < . 001). Following the rule of thumb that at least 3 variables should be used to define any latent-variable (Beajuean, 2014) we modelled WMC as latent variable and Gf as a composite average of the two tasks administered in order to improve model fit. This model resulted in significant improvement to the model (χ2 (4)=14.37, p < . 001). Finally we examined the change in test statistics between Model 2 and a model that removed the cognitive measures– a model akin to one of the original models reported in Müllensiefen et al., (2014)– for Model 5. Testing between the two models resulted in a significant improvement in model fit (χ2 (78)=104.75, p < . 001). Figure 3 displays Model 4, our nested model with the best fit indices.
TABLE HERE
ALL FIGURES OF MODELS
4.1.5 Discussion
<IP_ADDRESS>.1 Measurement Model
After running a confirmatory factor analysis on the variables of interest, the model fit was below the threshold of what is considered a “good model fit” as shown in Table 1 with references to above model fits. This finding is to be expected since no clear theoretical model has been put forward that would suggest that the general musical sophistication score, when modelled with two cognitive measures should have a good model fit. This model was run to create a baseline measurement.
<IP_ADDRESS>.2 Structural Equation Model Fitting
Following a series of nested model fits, we were able to improve model fits on a series of SEMs that incorporated both measures of WMC and measures of general fluid intelligence. Before commenting on new models, it is worth noting that the Model 5 does not seem to align with the findings from the original 2014 paper by Müllensiefen et al. While the correlation between the objective tasks is the same (r = .16), the factor loadings from this paper suggest lower values for both Beat Perception (.37 original, .27 this paper) as well as Melodic Memory (.28 original, .18 this paper). Note that two items were removed dealing with melody for memory for this model; when those items were re-run with the data, the factor loadings did not deviate from these numbers.
The first two models we ran resulted in minor improvements to model fit. While difference in models was significant (χ2 (41)=123.39, p < . 001 ), probably due to the number of parameters that were now not constrained, the relative fit indices of the models did not change drastically. It was not until the self-report measures were removed from the model, and then manipulated according to latent variable modeling recommendations, was there a marked increase in the relative fit indices. Fitting the model with only the cognitive measures, we were able to enter the bounds of acceptable relative fit indices that were noted above. In order to find evidence that the cognitive models (Models 3 and 4) were indeed a better fit than using the General factor, we additionally ran a comparison between our adjusted measurement model and a model with only the self report. While both of our nested models were significantly different, the cognitive models exhibited superior relative fit indices. Lastly, turning to Figure 3, we note that our latent variable of WMC exhibited much larger factor loadings predicting the two objective, perceptual tests than our measure of general fluid intelligence. We also note that the factor loading predicting the Beat Perception task (.36) was higher than that of the Melodic Memory task (.21). These rankings mirror that of the original Müllensiefen et al., (2014) paper and merit further examination in order to disentangle what processes are contributing to both tasks.
These results align with predictions made with Process Overlap Theory (Kovacs & Conway, 2016), which predict that higher executive loads are needed for tasks of perception. While we failed to predict which task would load higher –we assumed that the ability to maintain and manipulate information in the Melodic Memory task would be better predicted by WMC than the Beat Perception task– this might be due to the fact that performing well in a melodic memory task demands a certain amount of musical training that is not captured by either cognitive measure. In the future, we are interested in exploring more theoretically-driven models that use specific, task oriented predictors in order to explain the relationships between the perceptual tasks and the cognitive measures. Given the results here that suggest that measures of cognitive ability play a significant role in tasks of musical perception, we suggest that future research should consider taking measures of cognitive ability into account, so that other variables of interest are able to be shown to contribute above and beyond baseline cognitive measures.
In this paper we fit a series of structural equation models in order to investigate the degree to which baseline cognitive ability was able to predict performance on a musical perception task. Our findings suggest that measures of WMC are able to account for a large amount of variance beyond that of self report in tasks of musical perception.


Examples
RESTful API documentation
Open Source Code
MCTS-seq: Aptamer Generation Service
RESTful API server for sampling aptamers of target protein
with random forest classifier and tree-search
Submit Sampling


Sample program:
program demo_transpose
implicit none
integer,save :: xx(3,5)= reshape([&
1, 2, 3, 4, 5, &
10, 20, 30, 40, 50, &
11, 22, 33, 44, -1055 &
],shape(xx),order=[2,1])
call print_matrix_int(xx array:,xx)
call print_matrix_int(xx array transposed:,transpose(xx))
contains
subroutine print_matrix_int(title,arr)
! print small 2d integer arrays in row-column format
implicit none
character(len=*),intent(in) :: title
integer,intent(in) :: arr(:,:)
integer :: i
character(len=:),allocatable :: biggest
write(*,*)trim(title) ! print title
biggest= ! make buffer to write integer into
! find how many characters to use for integers
write(biggest,(i0))ceiling(log10(real(maxval(abs(arr)))))+2
! use this format to write a row
biggest=(" > [",*(i//trim(biggest)//:,","))
! print one row of array at a time
do i=1,size(arr,dim=1)
write(*,fmt=biggest,advance=no)arr(i,:)
write(*,(" ]"))
enddo
end subroutine print_matrix_int
end program demo_transpose
Results:
xx array:
> [ 1, 2, 3, 4, 5 ]
> [ 10, 20, 30, 40, 50 ]
> [ 11, 22, 33, 44, -1055 ]
xx array transposed:
> [ 1, 10, 11 ]
> [ 2, 20, 22 ]
> [ 3, 30, 33 ]
> [ 4, 40, 44 ]
> [ 5, 50, -1055 ]


{% from "govuk-jinja-components/button/macro.jinja" import govukButton -%} {% extends "base.html" %} {% block title %}What happened?{% endblock %} {% block top %}


Akamai\Open\EdgeGrid\Authentication\Timestamp
Generates an Akamai formatted Date for each request
Synopsis
class Timestamp
{
- // members
- protected DateTimeImmutable $timestamp;
- protected string $validFor = 'PT10S';
- // methods
- public void __construct()
- public bool isValid()
- public $this setValidFor()
- public string __toString()
Coverage
| Methods | 100% | 4 / 4 |
| Lines | 100% | 7 / 7 |
Members
protected
- $timestamp — \DateTimeImmutable
- $validFor — \Akamai\Open\EdgeGrid\Client\Authentication\string
Methods
public
- __construct() — Signing Timestamp
- __toString() — Return the timestamp when cast to string
- isValid() — Return true is timestamp is less than 10s old
- setValidFor() — Set how long the current timestamp is considered valid


Before Change
enable_codegen=request.enable_codegen,
),
)
for sources_field, snapshot in zip(all_sources_fields, all_snapshots)
)
all_snapshots = (stripped_snapshot.snapshot for stripped_snapshot in stripped_snapshots)
result = await Get(Snapshot, MergeDigests(snapshot.digest for snapshot in all_snapshots))
return SourceFiles(result)
After Change
all_snapshots: Iterable[Snapshot] = (*full_snapshots.values(), *snapshot_subsets)
result = await Get(Snapshot, MergeDigests(snapshot.digest for snapshot in all_snapshots))
unrooted_files = all_unrooted_files.intersection(result.files)
return SourceFiles(result, tuple(sorted(unrooted_files)))
def rules():


--- layout: post title: TokuDB engine first impressions date: type: post published: false status: draft categories: - MySQL tags: - Open Source - TokuDB meta: _edit_last: '2' author: login: shlomi email<EMAIL_ADDRESS>display_name: shlomi first_name: Shlomi last_name: Noach ---
Highpages: startup and shutdown
This is an unconventional behavior, though not unlike InnoDB failing to load on non-matching transaction log files.
Naming conventions
Using MySQL internal names for tables, which makes incomprehensible file names (cannot deduce table name from file name) and need INFORMATION_SCHEMA tables to map table names to file names
File locations
All in the datadir. I would love to see table+index files placed within related schemas/directories
Compression
Anti-compression?!
You have normal compression and aggressive compression. Aggressive compression at about twice as space efficient than normal compression. However: when ALTER TABLE ENGINE=TokuDB and then ALTER TABLE ENGINE=TokuDB ROW_FORMAT=..., table size on disk does not decrease. So go directly from InnoDB to aggressive compression.


FROM THE DESK OF: MR.WANG QIN HANG SENG BANK LTD. DES VOEUX RD.BRANCH CENTRAL HONG KONG HONG KONG. I am Mr.Wang Qin, credit officer of Hang Seng Bank Ltd. I have an urgent and very confidential business proposition for you. On June 6, 1998, a British Oil consultant/contractor with the Chinese Solid Minerals Corporation, Mr. Smith Lawrence made a numbered time (Fixed) Deposit for twelve calendar months, valued at $48,000,000.00 (Forty-eight Million American Dollars only) in my branch. Upon maturity,I sent a routine notification to his forwarding address but got no reply. After a month, we sent a reminder and finally we discovered from his contract employers, the Hong Kong Solid Minerals Corporation that Mr. Smith Lawrence died from an auto-mobile accident. On further investigation, I found out that he died without making a WILL,and all attempts to trace his next of kin was fruitless. I therefore made further investigation and discovered that Mr.Smith Lawrence did not declare any kin or relations in all his official documents,including his Bank Deposit paperwork in my Bank.This sum of $48,000,000.00 is still sitting in my Bank and the interest is being rolled over with the principal sum at the end ofeach year. No one will ever come forward to claim it. According to Laws of Hong Kong, at the expiration of (five) years,the money will revert to the ownership of the Hong Kong Government if nobody applies to claim the fund. Consequently, my proposal is that I will like you as a foreigner to stand in as the next of kin to Mr. Smith Lawrence so that the fruits of this old man's labor will not get into the hands of some corrupt government officials. This is simple, I will like you to provide immediately your full names and address so that the attorney will prepare the necessary documents and affidavits that will put you in place as the next of kin.We shall employ the services of an attorney for drafting and notarization of the WILL and to obtain the necessary documents and letter of probate/administration in your favor for the transfer. A bank account in any part of the world that you will provide the will, then facilitate the transfer of this money to you as the beneficiary/next of kin. The money will be paid into your account for us to share in the ratio of 70%for me and 25% for you and 5% for Expenses Incurred in the course of the transaction . There is no risk at all as all the paperwork for this transaction will be done by the attorney and with my position as the credit officer guarantees the successful execution of this transaction. If you are interested, please reply immediately to my email box. Upon your response, I shall then provide you with more details and relevant documents that will help you understand the transaction. Please send me your confidential telephone and fax numbers for easy communication. You should observe utmost confidentiality, and rest assured that this transaction would be most profitable for both of us because I shall require your assistance to invest my share in your country. For confidentiality Reasons, I advice that to respond strictly to this email<EMAIL_ADDRESS>Aaiting your response. Regards, Wang Qin Reply Strictly to: w_qin@fastermail.com


Information of Movie Ticket
Aladdin
Godzilla
The secret life of Pets
Man in Black 2
Late Night
Shaft
John Wick 3
Dark Phoenix
My Age
Day of playtime
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
We don't have that days in list!
9:00 am
11:00 am
1:00 pm
3:00 pm
5:00 pm
7:00 pm
9:00 pm
Display my Price!
these are your ticket price information:
Movie title:
Your age:
Day of play:
Time:
Your price:


Jordan Brand Nods to Famous 1985 Commercial With Air Jordan 1 Retro High OG "Bloodline"
Releasing on Black Friday.
by Ross DwyerJordan Brand has big plans for the ultra-popular Air Jordan 1 during the holiday season, and one piece of the multi-shoe puzzle is the Air Jordan 1 Retro High OG “Bloodline.” Featuring a reimagined take on a familiar color scheme and inspired by a famous Air Jordan ad from 1985 that showed Michael Jordan soaring through the air for a death-defying dunk, the “Bloodline” is a fresh nod to an early piece of brand history.
The design is centered around a recognizable mix of white, black and red, with the upper constructed of a pliable tumbled leather. The toebox, quarter and throat are dressed in a stark white, with a murky black appearing on the overlays, midfoot Swoosh, mudguard and collar. This effective yin and yang is given new life by a plentiful helping of red piping and trim that surrounds the borders of each and every piece, seemingly adding an extra layer to the classic style.
However, the embellishment that gives the shoe its nom de guerre is somewhat concealed. It’s present on the insole, which states “Who said man was not meant to fly” in bold red block letters for a direct call out to the tagline of the ad that inspired the design. A white midsole and red outsole finalize the look.
The Air Jordan 1 Retro High OG “Bloodline” will release via Nike SNKRS on November 29 — Black Friday. The MSRP is set at $160 USD.
Take a look at the original ad below, and for more upcoming retro releases from Jordan Brand, check out the Air Jordan 4 “What The,” a shoe that blends styles from four OG AJ4 colorways.
Air Jordan 1 Retro High OG “Bloodline”
Release Date
November 29, 2019 - 10:00 am EST (TBC)
Price
160 USD


# Copyright (C) 2013 by
# Alex Roper<EMAIL_ADDRESS># Copyright (C) 2017 by
# Aric Hagberg<EMAIL_ADDRESS># Dan Schult<EMAIL_ADDRESS># Pieter Swart<EMAIL_ADDRESS>#
# All rights reserved.
# BSD license.
#
# Author: Alex Roper<EMAIL_ADDRESS>"""Algorithms for finding the lowest common ancestor of trees and DAGs."""
from collections import defaultdict, Mapping, Set
from itertools import chain, count
import networkx as nx
from networkx.utils import arbitrary_element, not_implemented_for, \
UnionFind, generate_unique_node
__all__ = ["all_pairs_lowest_common_ancestor",
"tree_all_pairs_lowest_common_ancestor",
"lowest_common_ancestor"]
[docs]@not_implemented_for("undirected")
@not_implemented_for("multigraph")
def tree_all_pairs_lowest_common_ancestor(G, root=None, pairs=None):
r"""Yield the lowest common ancestor for sets of pairs in a tree.
Parameters
----------
G : NetworkX directed graph (must be a tree)
root : node, optional (default: None)
The root of the subtree to operate on.
If None, assume the entire graph has exactly one source and use that.
pairs : iterable or iterator of pairs of nodes, optional (default: None)
The pairs of interest. If None, Defaults to all pairs of nodes
under `root` that have a lowest common ancestor.
Returns
-------
lcas : generator of tuples `((u, v), lca)` where `u` and `v` are nodes
in `pairs` and `lca` is their lowest common ancestor.
Notes
-----
Only defined on non-null trees represented with directed edges from
parents to children. Uses Tarjan's off-line lowest-common-ancestors
algorithm. Runs in time $O(4 \times (V + E + P))$ time, where 4 is the largest
value of the inverse Ackermann function likely to ever come up in actual
use, and $P$ is the number of pairs requested (or $V^2$ if all are needed).
Tarjan, R. E. (1979), "Applications of path compression on balanced trees",
Journal of the ACM 26 (4): 690-715, doi:10.1145/322154.322161.
See Also
--------
all_pairs_lowest_common_ancestor (similar routine for general DAGs)
lowest_common_ancestor (just a single pair for general DAGs)
"""
if len(G) == 0:
raise nx.NetworkXPointlessConcept("LCA meaningless on null graphs.")
elif None in G:
raise nx.NetworkXError("None is not a valid node.")
# Index pairs of interest for efficient lookup from either side.
if pairs is not None:
pair_dict = defaultdict(set)
# See note on all_pairs_lowest_common_ancestor.
if not isinstance(pairs, (Mapping, Set)):
pairs = set(pairs)
for u, v in pairs:
for n in (u, v):
if n not in G:
msg = "The node %s is not in the digraph." % str(n)
raise nx.NodeNotFound(msg)
pair_dict[u].add(v)
pair_dict[v].add(u)
# If root is not specified, find the exactly one node with in degree 0 and
# use it. Raise an error if none are found, or more than one is. Also check
# for any nodes with in degree larger than 1, which would imply G is not a
# tree.
if root is None:
for n, deg in G.in_degree:
if deg == 0:
if root is not None:
msg = "No root specified and tree has multiple sources."
raise nx.NetworkXError(msg)
root = n
elif deg > 1:
msg = "Tree LCA only defined on trees; use DAG routine."
raise nx.NetworkXError(msg)
if root is None:
raise nx.NetworkXError("Graph contains a cycle.")
# Iterative implementation of Tarjan's offline lca algorithm
# as described in CLRS on page 521.
uf = UnionFind()
ancestors = {}
for node in G:
ancestors[node] = uf[node]
colors = defaultdict(bool)
for node in nx.dfs_postorder_nodes(G, root):
colors[node] = True
for v in (pair_dict[node] if pairs is not None else G):
if colors[v]:
# If the user requested both directions of a pair, give it.
# Otherwise, just give one.
if pairs is not None and (node, v) in pairs:
yield (node, v), ancestors[uf[v]]
if pairs is None or (v, node) in pairs:
yield (v, node), ancestors[uf[v]]
if node != root:
parent = arbitrary_element(G.pred[node])
uf.union(parent, node)
ancestors[uf[parent]] = parent
[docs]@not_implemented_for("undirected")
@not_implemented_for("multigraph")
def lowest_common_ancestor(G, node1, node2, default=None):
"""Compute the lowest common ancestor of the given pair of nodes.
Parameters
----------
G : NetworkX directed graph
node1, node2 : nodes in the graph.
default : object
Returned if no common ancestor between `node1` and `node2`
Returns
-------
The lowest common ancestor of node1 and node2,
or default if they have no common ancestors.
Notes
-----
Only defined on non-null directed acyclic graphs.
Takes n log(n) time in the size of the graph.
See `all_pairs_lowest_common_ancestor` when you have
more than one pair of nodes of interest.
See Also
--------
tree_all_pairs_lowest_common_ancestor
all_pairs_lowest_common_ancestor
"""
ans = list(all_pairs_lowest_common_ancestor(G, pairs=[(node1, node2)]))
if ans:
assert len(ans) == 1
return ans[0][1]
else:
return default
[docs]@not_implemented_for("undirected")
@not_implemented_for("multigraph")
def all_pairs_lowest_common_ancestor(G, pairs=None):
"""Compute the lowest common ancestor for pairs of nodes.
Parameters
----------
G : NetworkX directed graph
pairs : iterable of pairs of nodes, optional (default: all pairs)
The pairs of nodes of interest.
If None, will find the LCA of all pairs of nodes.
Returns
-------
An iterator over ((node1, node2), lca) where (node1, node2) are
the pairs specified and lca is a lowest common ancestor of the pair.
Note that for the default of all pairs in G, we consider
unordered pairs, e.g. you will not get both (b, a) and (a, b).
Notes
-----
Only defined on non-null directed acyclic graphs.
Uses the $O(n^3)$ ancestor-list algorithm from:
M. A. Bender, M. Farach-Colton, G. Pemmasani, S. Skiena, P. Sumazin.
"Lowest common ancestors in trees and directed acyclic graphs."
Journal of Algorithms, 57(2): 75-94, 2005.
See Also
--------
tree_all_pairs_lowest_common_ancestor
lowest_common_ancestor
"""
if not nx.is_directed_acyclic_graph(G):
raise nx.NetworkXError("LCA only defined on directed acyclic graphs.")
elif len(G) == 0:
raise nx.NetworkXPointlessConcept("LCA meaningless on null graphs.")
elif None in G:
raise nx.NetworkXError("None is not a valid node.")
# The copy isn't ideal, neither is the switch-on-type, but without it users
# passing an iterable will encounter confusing errors, and itertools.tee
# does not appear to handle builtin types efficiently (IE, it materializes
# another buffer rather than just creating listoperators at the same
# offset). The Python documentation notes use of tee is unadvised when one
# is consumed before the other.
#
# This will always produce correct results and avoid unnecessary
# copies in many common cases.
#
if (not isinstance(pairs, (Mapping, Set)) and pairs is not None):
pairs = set(pairs)
# Convert G into a dag with a single root by adding a node with edges to
# all sources iff necessary.
sources = [n for n, deg in G.in_degree if deg == 0]
if len(sources) == 1:
root = sources[0]
super_root = None
else:
G = G.copy()
super_root = root = generate_unique_node()
for source in sources:
G.add_edge(root, source)
# Start by computing a spanning tree, and the DAG of all edges not in it.
# We will then use the tree lca algorithm on the spanning tree, and use
# the DAG to figure out the set of tree queries necessary.
spanning_tree = nx.dfs_tree(G, root)
dag = nx.DiGraph((u, v) for u, v in G.edges
if u not in spanning_tree or v not in spanning_tree[u])
# Ensure that both the dag and the spanning tree contains all nodes in G,
# even nodes that are disconnected in the dag.
spanning_tree.add_nodes_from(G)
dag.add_nodes_from(G)
counter = count()
# Necessary to handle graphs consisting of a single node and no edges.
root_distance = {root: next(counter)}
for edge in nx.bfs_edges(spanning_tree, root):
for node in edge:
if node not in root_distance:
root_distance[node] = next(counter)
# Index the position of all nodes in the Euler tour so we can efficiently
# sort lists and merge in tour order.
euler_tour_pos = {}
for node in nx.depth_first_search.dfs_preorder_nodes(G, root):
if node not in euler_tour_pos:
euler_tour_pos[node] = next(counter)
# Generate the set of all nodes of interest in the pairs.
pairset = set()
if pairs is not None:
pairset = set(chain.from_iterable(pairs))
for n in pairset:
if n not in G:
msg = "The node %s is not in the digraph." % str(n)
raise nx.NodeNotFound(msg)
# Generate the transitive closure over the dag (not G) of all nodes, and
# sort each node's closure set by order of first appearance in the Euler
# tour.
ancestors = {}
for v in dag:
if pairs is None or v in pairset:
my_ancestors = nx.dag.ancestors(dag, v)
my_ancestors.add(v)
ancestors[v] = sorted(my_ancestors, key=euler_tour_pos.get)
def _compute_dag_lca_from_tree_values(tree_lca, dry_run):
"""Iterate through the in-order merge for each pair of interest.
We do this to answer the user's query, but it is also used to
avoid generating unnecessary tree entries when the user only
needs some pairs.
"""
for (node1, node2) in pairs if pairs is not None else tree_lca:
best_root_distance = None
best = None
indices = [0, 0]
ancestors_by_index = [ancestors[node1], ancestors[node2]]
def get_next_in_merged_lists(indices):
"""Returns index of the list containing the next item
Next order refers to the merged order.
Index can be 0 or 1 (or None if exhausted).
"""
index1, index2 = indices
if (index1 >= len(ancestors[node1]) and
index2 >= len(ancestors[node2])):
return None
elif index1 >= len(ancestors[node1]):
return 1
elif index2 >= len(ancestors[node2]):
return 0
elif (euler_tour_pos[ancestors[node1][index1]] <
euler_tour_pos[ancestors[node2][index2]]):
return 0
else:
return 1
# Find the LCA by iterating through the in-order merge of the two
# nodes of interests' ancestor sets. In principle, we need to
# consider all pairs in the Cartesian product of the ancestor sets,
# but by the restricted min range query reduction we are guaranteed
# that one of the pairs of interest is adjacent in the merged list
# iff one came from each list.
i = get_next_in_merged_lists(indices)
cur = ancestors_by_index[i][indices[i]], i
while i is not None:
prev = cur
indices[i] += 1
i = get_next_in_merged_lists(indices)
if i is not None:
cur = ancestors_by_index[i][indices[i]], i
# Two adjacent entries must not be from the same list
# in order for their tree LCA to be considered.
if cur[1] != prev[1]:
tree_node1, tree_node2 = prev[0], cur[0]
if (tree_node1, tree_node2) in tree_lca:
ans = tree_lca[tree_node1, tree_node2]
else:
ans = tree_lca[tree_node2, tree_node1]
if not dry_run and (best is None or
root_distance[ans] > best_root_distance):
best_root_distance = root_distance[ans]
best = ans
# If the LCA is super_root, there is no LCA in the user's graph.
if not dry_run and (super_root is None or best != super_root):
yield (node1, node2), best
# Generate the spanning tree lca for all pairs. This doesn't make sense to
# do incrementally since we are using a linear time offline algorithm for
# tree lca.
if pairs is None:
# We want all pairs so we'll need the entire tree.
tree_lca = dict(tree_all_pairs_lowest_common_ancestor(spanning_tree,
root))
else:
# We only need the merged adjacent pairs by seeing which queries the
# algorithm needs then generating them in a single pass.
tree_lca = defaultdict(int)
for _ in _compute_dag_lca_from_tree_values(tree_lca, True):
pass
# Replace the bogus default tree values with the real ones.
for (pair, lca) in tree_all_pairs_lowest_common_ancestor(spanning_tree,
root,
tree_lca):
tree_lca[pair] = lca
# All precomputations complete. Now we just need to give the user the pairs
# they asked for, or all pairs if they want them all.
return _compute_dag_lca_from_tree_values(tree_lca, False)


| 1147 | (A) | Now tuke Titus to consayłłe the town to assayle |
| 1150 | (C) | Now tytus counceyle hatħ take . þe town to assayle |
| 1133 | (D) | ¶ Now titus counceiłł hath take þe toun to assaile |
| 1110 | (E) | Now tytus aȝen gooth . þe town for-to assayle |
| (Ex) | ---- no text ---- | |
| 1171 | (L) | Now titus conseil haþ take þe toun to assayle |
| (P) | ---- no text ---- | |
| 1122 | (U) | Now Titus counseil hatħ tane / the toun to assaile |
| 211 | (V) | Nowe Titus councełł has tane . þe towne to assaile |


I am a undergraduate student of Tsinghua. And I study computer science and technology at Tsinghua.
Experience
Jun 2016
to
Sep 2016
Intern researcher, Carnegie Mellon University
Robotics Institution, Computer Vision Group
Jul 2015
to
Dec 2015
Intern researcher, Sensetime
Computer Vision
Sep 2013
to