3
1 My son, do not forget the lessons I have taught you.
Keep my commands inside of you, as important guidance for how you will live,
2 because they will help you live a long life, measured in either days or years,
and they will bring you peace in addition to all the lessons they teach you.
3 Treat others with tenderness and always speak the truth to them.
Let tenderness and truth guide you in every relationship,
as if they both were on a necklace you wear, a necklace that guides you in everything you say.
4 Then you will experience God's delight in you,
and people will also approve of you.
5 Put all your trust in Yahweh,
and do not take action because you made up your mind what you should do;
6 but in every choice and decision, look to Yahweh,
and he will show you how you must live.
7 Do not think you are wise enough to direct your life,
give Yahweh the reverence he deserves,
and when evil invites you in, turn aside from it.
8 Giving Yahweh reverence will make your body healthy
and it will give your bones the food it needs.
9 When you gain money, honor Yahweh by giving him the tithe;
give him the first portion of what you received, to remember it all came from him.
10 If you honor Yahweh, your storerooms will be so full that they will overflow,
and your barrels will be bursting with all the wine you have made.
11 My son, do not hate it when Yahweh corrects you,
and when he rebukes you, do not resent it,
12 for Yahweh only corrects those he loves,
just like parents correct their children whom they love.
13 Those who get wisdom are fortunate;
with her they also get understanding.
14 Wisdom gives you a better profit than owning silver,
and she will give you something that is much more valuable than gold.
15 Being wise is more precious than jewels
and there is nothing you desire that is worth as much as wisdom.
16 Wisdom can make you able to live a long life, if you do what she teaches;
she is also ready to make you wealthy and to persuade other people to honor you.
17 Wisdom is known by how kind she is,
and she always directs you to the place where you will find peace.
18 Wisdom is like a tree whose fruit gives life to those who hold on to it,
and Yahweh gives happiness to those who hold on to it.
19 By his wisdom Yahweh laid out the earth from the very beginning,
and by his understanding he put everything in the heavens exactly where they should be.
20 The deepest part of the oceans broke open according to Yahweh's design,
and in the same way, he made the dew so it would fall from the clouds above.
21 My son, hold on to good sense in the decisions you make,
and do not take your eye off of them.
22 They will bring life to you,
and a sign of Yahweh's blessings on your life
that people can see by your good judgment.
23 Your good decisions will take you where you are going in safety,
and they will keep you from taking a wrong step on the way.
24 When you lie down to sleep, you will not have any fear,
and your sleep will be refreshing.
25 Do not let a disaster fill you with terror,
and do not let the wicked fill you with fear when they come for you.
26 Yahweh takes your side to defend you,
he will not allow any trap to catch and hold you.
27 Give good gifts to those who deserve it,
when you can, help them.
28 Do not say to your neighbor, "Come back later;
perhaps I will help you tomorrow,"
when you have the money with you and can help them now.
29 Do not make plans to harm anyone you know,
especially those who live close to you and trust you.
30 If a person has done nothing to you,
do not argue with him or say he has done something to you, when he has not.
31 Do not envy a person who does violence to others,
and do not imitate anything he does.
32 A lying person is hated by Yahweh for what he does,
but Yahweh is a close friend to anyone who lives rightly.
33 Yahweh promises punishment to the families of those who do evil things.
but he makes happy the families of the good.
34 Yahweh makes fools of those who treat others with disrespect,
but he gives his kindness to people who are humble.
35 Those who are wise will be honored,
but foolish people will become well known for their dishonor.


Copyright (c) 2021 Celso Dell Anhol Ubaldo
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FuscaBR on GitHub(Click anywhere to close)


ELUX FOR MEN
🖤AN INSTANT CLASSIC 🖤
Your everyday shirts should make you feel comfortable and look stylish wherever you are.
🖤 🖤 🖤
🖤 PROMOTION 🖤
🖤 THANKS 🖤
In Singapore, it’s summer all year round. One way to beat the heat is to dress for the part. Add some colours and subtle prints in your wardrobe, it’ll help you feel positive the moment you dress up, setting an optimistic intent for the day.
🖤 Here are some of ELUX summer must-haves, making dressing up in the morning a breeze. 🖤
🖤 🖤 🖤
⚫ ⚫ ⚫ ⚫ ⚫ ⚫ ⚫ ⚫ ⚫


A B C D E F G H I L M N O P R S T U V W X Y
All Classes All Packages
All Classes All Packages
All Classes All Packages
C
- center - Variable in class shapes.Circle
- centerOfLine() - Method in class shapes.Line
-
Return center of line.
- choosenEdgeColor - Variable in class controller.DrawingController
- choosenInteriorColor - Variable in class controller.DrawingController
- Circle - Class in shapes
-
Class that represent circle shape.
- Circle() - Constructor for class shapes.Circle
- Circle(Point, int, Color, Color) - Constructor for class shapes.Circle
- clone() - Method in class adapter.HexagonAdapter
-
Make new instance of this class.
- clone() - Method in class shapes.Circle
-
Create new instance of this circle.
- clone() - Method in class shapes.Line
-
Create new instance of this line.
- clone() - Method in class shapes.Point
-
Create new instance of this point.
- clone() - Method in class shapes.Rectangle
-
Create new instance of this rectangle.
- clone() - Method in class shapes.Square
-
Create new instance of this square.
- closeDialog() - Method in class dialogs.DlgLogParser
-
Method that closes this dialog.
- CmdAddShape - Class in commands
-
Class that represent command for add new shape to the draw.
- CmdAddShape(Shape, DrawingModel) - Constructor for class commands.CmdAddShape
- CmdBringToBack - Class in commands
-
Class that represent command to bring some shape to the back.
- CmdBringToBack(DrawingModel, Shape) - Constructor for class commands.CmdBringToBack
- CmdBringToFront - Class in commands
-
Class that represent command to bring some shape to the front.
- CmdBringToFront(DrawingModel, Shape, int) - Constructor for class commands.CmdBringToFront
- CmdRemoveShape - Class in commands
-
Class that represent command for remove existing shape from the draw.
- CmdRemoveShape(ArrayList<Shape>, DrawingModel) - Constructor for class commands.CmdRemoveShape
- CmdRemoveShape(Shape, DrawingModel) - Constructor for class commands.CmdRemoveShape
- CmdSelectShape - Class in commands
-
Class that represent command to set shape to selected or unselected state.
- CmdSelectShape(Shape, boolean) - Constructor for class commands.CmdSelectShape
- CmdToBack - Class in commands
-
Class that represent command for bring some shape one position to the back.
- CmdToBack(DrawingModel, Shape) - Constructor for class commands.CmdToBack
- CmdToFront - Class in commands
-
Class that represent command for bring some shape one position to the front.
- CmdToFront(DrawingModel, Shape) - Constructor for class commands.CmdToFront
- CmdUpdateCircle - Class in commands
-
Class that represent command for update existing circle from the draw.
- CmdUpdateCircle(Circle, Circle) - Constructor for class commands.CmdUpdateCircle
- CmdUpdateHexagon - Class in commands
-
Class that represent command for update existing hexagon from the draw.
- CmdUpdateHexagon(HexagonAdapter, HexagonAdapter) - Constructor for class commands.CmdUpdateHexagon
- CmdUpdateLine - Class in commands
-
Class that represent command for update existing line from the draw.
- CmdUpdateLine(Line, Line) - Constructor for class commands.CmdUpdateLine
- CmdUpdatePoint - Class in commands
-
Class that represent command for update existing point from the draw.
- CmdUpdatePoint(Point, Point) - Constructor for class commands.CmdUpdatePoint
- CmdUpdateRectangle - Class in commands
-
Class that represent command for update existing rectangle from the draw.
- CmdUpdateRectangle(Rectangle, Rectangle) - Constructor for class commands.CmdUpdateRectangle
- CmdUpdateSquare - Class in commands
-
Class that represent command for update existing square from the draw.
- CmdUpdateSquare(Square, Square) - Constructor for class commands.CmdUpdateSquare
- color - Variable in class dialogs.DlgLine
- color - Variable in class dialogs.DlgPoint
- color - Variable in class frame.DrawingFrame
- color - Variable in class shapes.Shape
- Command - Interface in commands
-
Represent inferface for all commands in the application.
- commands - package commands
- commands - Variable in class controller.DrawingController
- compareTo(Shape) - Method in class adapter.HexagonAdapter
-
Compares two hexagons depend on their radius.
- compareTo(Shape) - Method in class shapes.Circle
-
Compare two circles by radius length.
- compareTo(Shape) - Method in class shapes.Line
-
Compare two lines depend by length.
- compareTo(Shape) - Method in class shapes.Point
-
Compare two points depend on their distance.
- compareTo(Shape) - Method in class shapes.Square
-
Compares two squares depend on their surface.
- confirmed - Variable in class dialogs.DlgCircle
- confirmed - Variable in class dialogs.DlgHexagon
- confirmed - Variable in class dialogs.DlgLine
- confirmed - Variable in class dialogs.DlgPoint
- confirmed - Variable in class dialogs.DlgRectangle
- confirmed - Variable in class dialogs.DlgSquare
- containsClick(int, int) - Method in class adapter.HexagonAdapter
-
Check if hexagon is clicked.
- containsClick(int, int) - Method in class shapes.Circle
-
Determine if circle contains click.
- containsClick(int, int) - Method in class shapes.Line
-
Determine if this line contains user click.
- containsClick(int, int) - Method in class shapes.Point
-
Determine if this point contains user click.
- containsClick(int, int) - Method in class shapes.Rectangle
- containsClick(int, int) - Method in class shapes.Shape
-
Abstract method that must implements all shapes to determine if is selected.
- containsClick(int, int) - Method in class shapes.Square
-
Check if this square contains user click.
- contentPanel - Variable in class dialogs.DlgLogParser
- controller - package controller
- controller - Variable in class frame.DrawingFrame
- controller - Variable in class strategy.FileLog
- counterOfSelectedShapes - Variable in class controller.DrawingController
All Classes All Packages


{% extends "squadbox/base.html" %} {% block customcss %} {% endblock %} {% block content %}
{{ group_info.group.mod_rules }}
{% if group_info.admin %}| Select | Joined | {% endif %}|
|---|---|---|
| {{ member.email }} | {% if flavour != "mobile" %}{{ member.joined }} | {% endif %} {% endif %} {% endfor %} {% for member in group_info.members_pending %}|
| {{ member.email }} (pending) | {% if flavour != "mobile" %}{{ member.joined }} | {% endif %}
The whitelist is for trusted senders. Emails from them will be automatically approved.
| Select | {% endif %}Added | {% endif %}|
|---|---|---|
| {% endif %} | {{ w.email }} | {% if flavour != "mobile" %}{{ w.timestamp }} | {% endif %}
The blacklist is for known harassers. Emails from them will be automatically rejected.
| Select | Added | {% endif %}|
|---|---|---|
| {{ b.email }} | {% if flavour != "mobile" %}{{ b.timestamp }} | {% endif %}


My issues description.
Issue number
Issue title
Project name
DueDate
{{myIssues.Id}}
{{myIssues.Title}}
{{myIssues.Project.Name}}
{{myIssues.DueDate}}
Issue description: {{myIssues.Description}}
Issue DueDate: {{myIssues.DueDate}}
Issue assigned by: {{myIssues.Assignee.Username}}
Issue author: {{myIssues.Author.Username}}
Issue key: {{myIssues.IssueKey}}
Issue status: {{myIssues.Status.Name}}
Issue priority: {{myIssues.Priority.Name}}
Issue Labels: {{myIssues.Labels}}


Account: http_guest
Server: <* = getServerName() *>
Host:
Port: <* = getServerPort() *>
Players: <* = getPlayerCount() *>/<* = getMaxPlayers() *>


Wolves boss Nuno is calm on Joao Moutinho deal
Wolves boss Nuno Espirito Santo is not worried that Joao Moutinho is still yet to have signed a new contract, insisting: “Everything is OK.”
by Joe EdwardsThe 33-year-old midfielder, whose deal expires at the end of the season, was thought to be in advanced talks over fresh terms.
The matter has since gone quiet, but Nuno said on the man who won Euro 2016 with Portugal: “Moutinho is here.
“When something is official, for sure you will know. But everything is OK.”
Moutinho has been a revelation since arriving from Monaco for £5million in the summer of 2018.
He has continued to be a regular starter this season – starting 11 of the 12 Premier League games for Wolves, who are playing at Bournemouth tomorrow.
On if Moutinho will be tied down soon, Nuno said: “I hope so. I think everything has its time.
“There is a moment of discussion and a moment of understanding.
“Everything is natural.”
And Nuno had a similar response when asked if Wolves have firm plans in place for the transfer window in January.
“Everything will take its natural course and things will happen naturally,” he said.
Fans would like to see some fresh faces in the new year to bolster Wolves’ small squad.
A fair few of the group have just returned from international duty, and Nuno added: “We’re pleased with all the players that went away during the international break.
"I think it was very important for them as they had competition.
“If you have a time to compete for your country and return healthy, you are ready to go.”


Interpretation for ITA
- More than 55 [VERY FAIR]
- 42 to 55 [FAIR]
- 29 to 41 [MEDIUM]
- 11 to 28 [DARK]
- -29 to 10 [BROWN]
- Less than or = -30 [BLACK]
Instructions
- Take a closeup view of sun exposed area (example: face) using camera icon. INCLUDE ONLY THE SKIN IN THE FRAME.
- Wait till an ITA value is displayed. (Takes upto 2 minutes)
- Assign It to Exposed Area by clicking 'Exposed' Button
- Repeat the process for an area not usually exposed to sun.(Example: inner arm) and click 'UnExposed' button.
- Tan will be displayed for positive ITA values. (1 = No Tan, Higher the value, higher the Tan)
- Uploads photo to server(Data Charges Apply).
- Uploaded images will be used for improving algorithm.
- Read Terms of Use and Instructions at http://gulfdoctor.net/charm


A jarjar ant task is available. You just need to replace your usual jar task with jarjar. Depending on the complexity of your project, you will then have different parameters. Here's an example:
<jarjar jarfile="${temp directory}/easymockclassextension.jar"> <fileset dir="tmp" includes="org/easymock/classextension/*.class org/easymock/classextension/internal/*.class"/> <zipfileset src="lib/objenesis-${project.version}.jar"/> <rule pattern="org.objenesis.**" result="org.easymock.classextension.internal.objenesis.@1"/> </jarjar>
For jarjar, multiple unofficial plugins exist (here, here and here). However, you can use the antrun plugin to call the jarjar ant task.
Or you can use the maven-shade-plugin. Here's an example:
<plugin> <artifactId>maven-shade-plugin</artifactId> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> </execution> </executions> <configuration> <keepDependenciesWithProvidedScope>true</keepDependenciesWithProvidedScope> <artifactSet> <includes> <include>org.objenesis:objenesis</include> </includes> </artifactSet> <relocations> <relocation> <pattern>org.objenesis</pattern> <shadedPattern>org.easymock.classextension.internal.objenesis</shadedPattern> </relocation> </relocations> </configuration> </plugin>


In many countries operating under Well-designed central Banks, the interest rates are mainly determined by the real economical conditions. One of the most influential economics tool the central Bank has under its exclusive control is the ability to regulate these interest rates indirectly via its monetary policy. The central Bank carries out monetary policy by influencing specially short-term interest rates. It does this by raising and lowering the target for the overnight rate(Canada) or discount rate(USA) .
An important question is how much trust can be placed on such "target for the overnight rate" or "discount rate" to influence really interest rates in an economy?
Our quantitative analysis uses a set of mathematical models to evaluate the historical interest rates in public databases for patterns that help to answer the question in terms of numerical values. These numerical values are presented into a form guided by this statement "Translating and analyzing big data using charts, graphics, and images is becoming more and more necessary for decision-making." promoted by the Association of Public Data Users.
We provide:
Interactive Charting features the temporal dynamics of the considered interest rates in this work and to facilitate their comparisons. To find out more about the temporal dynamic of a specific interest rate, a double click on its name in the legend creates
its associated curve and then add up for multiple comparisons.
Interest Rates Network is the results of our mathematical modeling and subsequent computation to study the numerical behavior of these interest rates. The obtained numerical values are used to explore and gain new insights into the impact of the temporal decision that determined them and to estimate and highlight specific interconnection levels between them. If there exist groups of interest rates highly interconnected but with few links to other interest rates. This kind of structure carry out much information about the network to answer our question quantitatively.
Random Walks on Interest Rates Network, by considering the interest rates network as a Graph (discrete mathematics), the theory of random walk on this graph help to extract basic properties determined by the spectrum of the graph as its community structures and stationary distribution.
Interpretation of stationary distribution values
More the stationary distribution value of a given interest rate is higher more this interest rate is affecting significantly the values of the considered interest rates. The interest rates in the lowest stationary distribution class have more difficulty to influence significantly other interest rates values than the interest rates in the highest stationary distribution class.
In the case of USA, the medium term interest rates( 3 months, 6 months, 1 to 3 years) are more influence-able than the effective Federal Funds Rate(FF), FF is moderately influencing other interest rates. The second surprising fact, the interest rates related to Moody's AAA/BAA Bond are blunt and are mathematically just a derivation of the other interest rates.
While in Canada, the Bank Rate and Target Rate have less-prominent role to influence significantly the interest rates than the medium term interest rates, one year to 5 years.


welcome to flexwork.io.
your credential information
E-Mail
{{client.email}}
Password
{{password}}
login now
*after first login you can change your password
This message was sent to {{client.name}} {{client.surname}}, {{client.companyname}}
made by flexwork.io technology centre • emil-figge-strasse 76-80 • 44227 dortmund - germany


Optimization and Vectorization
Contents
8. Optimization and Vectorization¶
8.1. Optimization and profiling¶
Till now we have not paid much attention to speed and possible optimization possibilities inherent in the various compilers. We have compiled and linked as
c++ -c mycode.cpp
c++ -o mycode.exe mycode.o
For Fortran replace with for example gfortran or ifort. This is what we call a flat compiler option and should be used when we develop the code. It produces normally a very large and slow code when translated to machine instructions. We use this option for debugging and for establishing the correct program output because every operation is done precisely as the user specified it.
It is instructive to look up the compiler manual for further instructions by writing
man c++
8.2. More on optimization¶
We have additional compiler options for optimization. These may include procedure inlining where performance may be improved, moving constants inside loops outside the loop, identify potential parallelism, include automatic vectorization or replace a division with a reciprocal and a multiplication if this speeds up the code.
c++ -O3 -c mycode.cpp
c++ -O3 -o mycode.exe mycode.o
This (other options are -O2 or -Ofast) is the recommended option.
8.3. Optimization and profiling¶
It is also useful to profile your program under the development stage. You would then compile with
c++ -pg -O3 -c mycode.cpp
c++ -pg -O3 -o mycode.exe mycode.o
After you have run the code you can obtain the profiling information via
gprof mycode.exe > ProfileOutput
When you have profiled properly your code, you must take out this option as it slows down performance. For memory tests use valgrind. An excellent environment for all these aspects, and much more, is Qt creator.
8.4. Optimization and debugging¶
Adding debugging options is a very useful alternative under the development stage of a program. You would then compile with
c++ -g -O0 -c mycode.cpp
c++ -g -O0 -o mycode.exe mycode.o
This option generates debugging information allowing you to trace for example if an array is properly allocated. Some compilers work best with the no optimization option -O0.
Other optimization flags.
Depending on the compiler, one can add flags which generate code that catches integer overflow errors. The flag -ftrapv does this for the CLANG compiler on OS X operating systems.
8.5. Other hints¶
In general, irrespective of compiler options, it is useful to
avoid if tests or call to functions inside loops, if possible.
avoid multiplication with constants inside loops if possible
Here is an example of a part of a program where specific operations lead to a slower code
k = n-1;
for (i = 0; i < n; i++){
a[i] = b[i] +c*d;
e = g[k];
}
A better code is
temp = c*d;
for (i = 0; i < n; i++){
a[i] = b[i] + temp;
}
e = g[n-1];
Here we avoid a repeated multiplication inside a loop. Most compilers, depending on compiler flags, identify and optimize such bottlenecks on their own, without requiring any particular action by the programmer. However, it is always useful to single out and avoid code examples like the first one discussed here.
8.6. Vectorization and the basic idea behind parallel computing¶
Present CPUs are highly parallel processors with varying levels of parallelism. The typical situation can be described via the following three statements.
Pursuit of shorter computation time and larger simulation size gives rise to parallel computing.
Multiple processors are involved to solve a global problem.
The essence is to divide the entire computation evenly among collaborative processors. Divide and conquer.
Before we proceed with a more detailed discussion of topics like vectorization and parallelization, we need to remind ourselves about some basic features of different hardware models.
8.7. A rough classification of hardware models¶
Conventional single-processor computers are named SISD (single-instruction-single-data) machines.
SIMD (single-instruction-multiple-data) machines incorporate the idea of parallel processing, using a large number of processing units to execute the same instruction on different data.
Modern parallel computers are so-called MIMD (multiple-instruction-multiple-data) machines and can execute different instruction streams in parallel on different data.
8.9. Different parallel programming paradigms¶
Task parallelism: the work of a global problem can be divided into a number of independent tasks, which rarely need to synchronize. Monte Carlo simulations represent a typical situation. Integration is another. However this paradigm is of limited use.
Data parallelism: use of multiple threads (e.g. one or more threads per processor) to dissect loops over arrays etc. Communication and synchronization between processors are often hidden, thus easy to program. However, the user surrenders much control to a specialized compiler. Examples of data parallelism are compiler-based parallelization and OpenMP directives.
8.10. Different parallel programming paradigms¶
Message passing: all involved processors have an independent memory address space. The user is responsible for partitioning the data/work of a global problem and distributing the subproblems to the processors. Collaboration between processors is achieved by explicit message passing, which is used for data transfer plus synchronization.
This paradigm is the most general one where the user has full control. Better parallel efficiency is usually achieved by explicit message passing. However, message-passing programming is more difficult.
8.11. What is vectorization?¶
Vectorization is a special case of Single Instructions Multiple Data (SIMD) to denote a single instruction stream capable of operating on multiple data elements in parallel. We can think of vectorization as the unrolling of loops accompanied with SIMD instructions.
Vectorization is the process of converting an algorithm that performs scalar operations (typically one operation at the time) to vector operations where a single operation can refer to many simultaneous operations. Consider the following example
for (i = 0; i < n; i++){
a[i] = b[i] + c[i];
}
If the code is not vectorized, the compiler will simply start with the first element and then perform subsequent additions operating on one address in memory at the time.
8.12. Number of elements that can acted upon¶
A SIMD instruction can operate on multiple data elements in one single instruction.
It uses the so-called 128-bit SIMD floating-point register.
In this sense, vectorization adds some form of parallelism since one instruction is applied
to many parts of say a vector.
The number of elements which can be operated on in parallel range from four single-precision floating point data elements in so-called Streaming SIMD Extensions and two double-precision floating-point data elements in Streaming SIMD Extensions 2 to sixteen byte operations in a 128-bit register in Streaming SIMD Extensions 2. Thus, vector-length ranges from 2 to 16, depending on the instruction extensions used and on the data type.
IN summary, our instructions operate on 128 bit (16 byte) operands
4 floats or ints
2 doubles
Data paths 128 bits vide for vector unit
8.13. Number of elements that can acted upon, examples¶
We start with the simple scalar operations given by
for (i = 0; i < n; i++){
a[i] = b[i] + c[i];
}
If the code is not vectorized and we have a 128-bit register to store a 32 bits floating point number, it means that we have \(3\times 32\) bits that are not used. For the first element we have
| 0 | 1 | 2 | 3 |
|---|---|---|---|
| a[0]= | not used | not used | not used |
| b[0]+ | not used | not used | not used |
| c[0] | not used | not used | not used |
8.14. Operation counts for scalar operation¶
The code
for (i = 0; i < n; i++){
a[i] = b[i] + c[i];
}
has for \(n\) repeats
one load for \(c[i]\) in address 1
one load for \(b[i]\) in address 2
add \(c[i]\) and \(b[i]\) to give \(a[i]\)
store \(a[i]\) in address 2
8.15. Number of elements that can acted upon, examples¶
If we vectorize the code, we can perform, with a 128-bit register four simultaneous operations, that is we have
for (i = 0; i < n; i+=4){
a[i] = b[i] + c[i];
a[i+1] = b[i+1] + c[i+1];
a[i+2] = b[i+2] + c[i+2];
a[i+3] = b[i+3] + c[i+3];
}
displayed here as
| 0 | 1 | 2 | 3 |
|---|---|---|---|
| a[0]= | a[1]= | a[2]= | a[3]= |
| b[0]+ | b[1]+ | b[2]+ | b[3]+ |
| c[0] | c[1] | c[2] | c[3] |
8.16. Number of operations when vectorized¶
For \(n/4\) repeats assuming floats or integers
one vector load for \(c[i]\) in address 1
one load for \(b[i]\) in address 2
add \(c[i]\) and \(b[i]\) to give \(a[i]\)
store \(a[i]\) in address 2
8.17. A simple test case with and without vectorization¶
We implement these operations in a simple c++ program that computes at the end the norm of a vector.
#include <cstdlib>
#include <iostream>
#include <cmath>
#include <iomanip>
#include "time.h"
using namespace std; // note use of namespace
int main (int argc, char* argv[])
{
// read in dimension of square matrix
int n = atoi(argv[1]);
double s = 1.0/sqrt( (double) n);
double *a, *b, *c;
// Start timing
clock_t start, finish;
start = clock();
// Allocate space for the vectors to be used
a = new double [n]; b = new double [n]; c = new double [n];
// Define parallel region
// Set up values for vectors a and b
for (int i = 0; i < n; i++){
double angle = 2.0*M_PI*i/ (( double ) n);
a[i] = s*(sin(angle) + cos(angle));
b[i] = s*sin(2.0*angle);
c[i] = 0.0;
}
// Then perform the vector addition
for (int i = 0; i < n; i++){
c[i] += a[i]+b[i];
}
// Compute now the norm-2
double Norm2 = 0.0;
for (int i = 0; i < n; i++){
Norm2 += c[i]*c[i];
}
finish = clock();
double timeused = (double) (finish - start)/(CLOCKS_PER_SEC );
cout << setiosflags(ios::showpoint | ios::uppercase);
cout << setprecision(10) << setw(20) << "Time used for norm computation=" << timeused << endl;
cout << " Norm-2 = " << Norm2 << endl;
// Free up space
delete[] a;
delete[] b;
delete[] c;
return 0;
}
8.18. Compiling with and without vectorization¶
We can compile and link without vectorization using the clang c++ compiler
clang -o novec.x vecexample.cpp
and with vectorization (and additional optimizations)
clang++ -O3 -Rpass=loop-vectorize -o vec.x vecexample.cpp
The speedup depends on the size of the vectors. In the example here we have run with \(10^7\) elements. The example here was run on an IMac17.1 with OSX El Capitan (10.11.4) as operating system and an Intel i5 3.3 GHz CPU.
Compphys:~ hjensen$ ./vec.x 10000000
Time used for norm computation=0.04720500000
Compphys:~ hjensen$ ./novec.x 10000000
Time used for norm computation=0.03311700000
This particular C++ compiler speeds up the above loop operations with a factor of 1.5 Performing the same operations for \(10^9\) elements results in a smaller speedup since reading from main memory is required. The non-vectorized code is seemingly faster.
Compphys:~ hjensen$ ./vec.x<PHONE_NUMBER>
Time used for norm computation=58.41391100
Compphys:~ hjensen$ ./novec.x<PHONE_NUMBER>
Time used for norm computation=46.51295300
We will discuss these issues further in the next slides.
8.19. Compiling with and without vectorization using clang¶
We can compile and link without vectorization with clang compiler
clang++ -o -fno-vectorize novec.x vecexample.cpp
and with vectorization
clang++ -O3 -Rpass=loop-vectorize -o vec.x vecexample.cpp
We can also add vectorization analysis, see for example
clang++ -O3 -Rpass-analysis=loop-vectorize -o vec.x vecexample.cpp
or figure out if vectorization was missed
clang++ -O3 -Rpass-missed=loop-vectorize -o vec.x vecexample.cpp
8.20. Automatic vectorization and vectorization inhibitors, criteria¶
Not all loops can be vectorized, as discussed in Intel’s guide to vectorization
An important criteria is that the loop counter \(n\) is known at the entry of the loop.
for (int j = 0; j < n; j++) {
a[j] = cos(j*1.0);
}
The variable \(n\) does need to be known at compile time. However, this variable must stay the same for the entire duration of the loop. It implies that an exit statement inside the loop cannot be data dependent.
8.21. Automatic vectorization and vectorization inhibitors, exit criteria¶
An exit statement should in general be avoided. If the exit statement contains data-dependent conditions, the loop cannot be vectorized. The following is an example of a non-vectorizable loop
for (int j = 0; j < n; j++) {
a[j] = cos(j*1.0);
if (a[j] < 0 ) break;
}
Avoid loop termination conditions and opt for a single entry loop variable \(n\). The lower and upper bounds have to be kept fixed within the loop.
8.22. Automatic vectorization and vectorization inhibitors, straight-line code¶
SIMD instructions perform the same type of operations multiple times. A switch statement leads thus to a non-vectorizable loop since different statemens cannot branch. The following code can however be vectorized since the if statement is implemented as a masked assignment.
for (int j = 0; j < n; j++) {
double x = cos(j*1.0);
if (x > 0 ) {
a[j] = x*sin(j*2.0);
}
else {
a[j] = 0.0;
}
}
These operations can be performed for all data elements but only those elements which the mask evaluates as true are stored. In general, one should avoid branches such as switch, go to, or return statements or if constructs that cannot be treated as masked assignments.
8.23. Automatic vectorization and vectorization inhibitors, nested loops¶
Only the innermost loop of the following example is vectorized
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
a[i][j] += b[i][j];
}
}
The exception is if an original outer loop is transformed into an inner loop as the result of compiler optimizations.
8.24. Automatic vectorization and vectorization inhibitors, function calls¶
Calls to programmer defined functions ruin vectorization. However, calls to intrinsic functions like \(\sin{x}\), \(\cos{x}\), \(\exp{x}\) etc are allowed since they are normally efficiently vectorized. The following example is fully vectorizable
for (int i = 0; i < n; i++) {
a[i] = log10(i)*cos(i);
}
Similarly, inline functions defined by the programmer, allow for vectorization since the function statements are glued into the actual place where the function is called.
8.25. Automatic vectorization and vectorization inhibitors, data dependencies¶
One has to keep in mind that vectorization changes the order of operations inside a loop. A so-called read-after-write statement with an explicit flow dependency cannot be vectorized. The following code
double b = 15.;
for (int i = 1; i < n; i++) {
a[i] = a[i-1] + b;
}
is an example of flow dependency and results in wrong numerical results if vectorized. For a scalar operation, the value \(a[i-1]\) computed during the iteration is loaded into the right-hand side and the results are fine. In vector mode however, with a vector length of four, the values \(a[0]\), \(a[1]\), \(a[2]\) and \(a[3]\) from the previous loop will be loaded into the right-hand side and produce wrong results. That is, we have
a[1] = a[0] + b;
a[2] = a[1] + b;
a[3] = a[2] + b;
a[4] = a[3] + b;
and if the two first iterations are executed at the same by the SIMD instruction, the value of say \(a[1]\) could be used by the second iteration before it has been calculated by the first iteration, leading thereby to wrong results.
8.26. Automatic vectorization and vectorization inhibitors, more data dependencies¶
On the other hand, a so-called write-after-read statement can be vectorized. The following code
double b = 15.;
for (int i = 1; i < n; i++) {
a[i-1] = a[i] + b;
}
is an example of flow dependency that can be vectorized since no iteration with a higher value of \(i\) can complete before an iteration with a lower value of \(i\). However, such code leads to problems with parallelization.
8.27. Automatic vectorization and vectorization inhibitors, memory stride¶
For C++ programmers it is also worth keeping in mind that an array notation is preferred to the more compact use of pointers to access array elements. The compiler can often not tell if it is safe to vectorize the code.
When dealing with arrays, you should also avoid memory stride, since this slows down considerably vectorization. When you access array element, write for example the inner loop to vectorize using unit stride, that is, access successively the next array element in memory, as shown here
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
a[i][j] += b[i][j];
}
}
8.28. Memory management¶
The main memory contains the program data
Cache memory contains a copy of the main memory data
Cache is faster but consumes more space and power. It is normally assumed to be much faster than main memory
Registers contain working data only
Modern CPUs perform most or all operations only on data in register
Multiple Cache memories contain a copy of the main memory data
Cache items accessed by their address in main memory
L1 cache is the fastest but has the least capacity
L2, L3 provide intermediate performance/size tradeoffs
Loads and stores to memory can be as important as floating point operations when we measure performance.
8.29. Memory and communication¶
Most communication in a computer is carried out in chunks, blocks of bytes of data that move together
In the memory hierarchy, data moves between memory and cache, and between different levels of cache, in groups called lines
Lines are typically 64-128 bytes, or 8-16 double precision words
Even if you do not use the data, it is moved and occupies space in the cache
Many of these performance features are not captured in most programming languages.
8.30. Measuring performance¶
How do we measure performance? What is wrong with this code to time a loop?
clock_t start, finish;
start = clock();
for (int j = 0; j < i; j++) {
a[j] = b[j]+b[j]*c[j];
}
finish = clock();
double timeused = (double) (finish - start)/(CLOCKS_PER_SEC );
8.31. Problems with measuring time¶
Timers are not infinitely accurate
All clocks have a granularity, the minimum time that they can measure
The error in a time measurement, even if everything is perfect, may be the size of this granularity (sometimes called a clock tick)
Always know what your clock granularity is
Ensure that your measurement is for a long enough duration (say 100 times the tick)
8.32. Problems with cold start¶
What happens when the code is executed? The assumption is that the code is ready to execute. But
Code may still be on disk, and not even read into memory.
Data may be in slow memory rather than fast (which may be wrong or right for what you are measuring)
Multiple tests often necessary to ensure that cold start effects are not present
Special effort often required to ensure data in the intended part of the memory hierarchy.
8.33. Problems with smart compilers¶
If the result of the computation is not used, the compiler may eliminate the code
Performance will look impossibly fantastic
Even worse, eliminate some of the code so the performance looks plausible
Ensure that the results are (or may be) used.
8.34. Problems with interference¶
Other activities are sharing your processor
Operating system, system demons, other users
Some parts of the hardware do not always perform with exactly the same performance
Make multiple tests and report
Easy choices include
Average tests represent what users might observe over time
8.35. Problems with measuring performance¶
Accurate, reproducible performance measurement is hard
Think carefully about your experiment:
What is it, precisely, that you want to measure?
How representative is your test to the situation that you are trying to measure?
8.36. Thomas algorithm for tridiagonal linear algebra equations¶
8.37. Thomas algorithm, forward substitution¶
The first step is to multiply the first row by \(a_0/b_0\) and subtract it from the second row. This is known as the forward substitution step. We obtain then
and
At this point the simplified equation, with only an upper triangular matrix takes the form
8.38. Thomas algorithm, backward substitution¶
The next step is the backward substitution step. The last row is multiplied by \(c_{N-3}/b_{N-2}\) and subtracted from the second to last row, thus eliminating \(c_{N-3}\) from the last row. The general backward substitution procedure is
and
All that ramains to be computed is the solution, which is the very straight forward process of
8.39. Thomas algorithm and counting of operations (floating point and memory)¶
| Operation | Floating Point |
|---|---|
| Memory Reads | $14(N-2)$ |
| Memory Writes | $4(N-2)$ |
| Subtractions | $3(N-2)$ |
| Multiplications | $3(N-2)$ |
| Divisions | $4(N-2)$ |
// Forward substitution
// Note that we can simplify by precalculating a[i-1]/b[i-1]
for (int i=1; i < n; i++) {
b[i] = b[i] - (a[i-1]*c[i-1])/b[i-1];
f[i] = g[i] - (a[i-1]*f[i-1])/b[i-1];
}
x[n-1] = f[n-1] / b[n-1];
// Backwards substitution
for (int i = n-2; i >= 0; i--) {
f[i] = f[i] - c[i]*f[i+1]/b[i+1];
x[i] = f[i]/b[i];
}
8.40. Example: Transpose of a matrix¶
#include <cstdlib>
#include <iostream>
#include <cmath>
#include <iomanip>
#include "time.h"
using namespace std; // note use of namespace
int main (int argc, char* argv[])
{
// read in dimension of square matrix
int n = atoi(argv[1]);
double **A, **B;
// Allocate space for the two matrices
A = new double*[n]; B = new double*[n];
for (int i = 0; i < n; i++){
A[i] = new double[n];
B[i] = new double[n];
}
// Set up values for matrix A
for (int i = 0; i < n; i++){
for (int j = 0; j < n; j++) {
A[i][j] = cos(i*1.0)*sin(j*3.0);
}
}
clock_t start, finish;
start = clock();
// Then compute the transpose
for (int i = 0; i < n; i++){
for (int j = 0; j < n; j++) {
B[i][j]= A[j][i];
}
}
finish = clock();
double timeused = (double) (finish - start)/(CLOCKS_PER_SEC );
cout << setiosflags(ios::showpoint | ios::uppercase);
cout << setprecision(10) << setw(20) << "Time used for setting up transpose of matrix=" << timeused << endl;
// Free up space
for (int i = 0; i < n; i++){
delete[] A[i];
delete[] B[i];
}
delete[] A;
delete[] B;
return 0;
}
8.41. Matrix-matrix multiplication¶
This the matrix-matrix multiplication code with plain c++ memory allocation. It computes at the end the Frobenius norm.
#include <cstdlib>
#include <iostream>
#include <cmath>
#include <iomanip>
#include "time.h"
using namespace std; // note use of namespace
int main (int argc, char* argv[])
{
// read in dimension of square matrix
int n = atoi(argv[1]);
double s = 1.0/sqrt( (double) n);
double **A, **B, **C;
// Start timing
clock_t start, finish;
start = clock();
// Allocate space for the two matrices
A = new double*[n]; B = new double*[n]; C = new double*[n];
for (int i = 0; i < n; i++){
A[i] = new double[n];
B[i] = new double[n];
C[i] = new double[n];
}
// Set up values for matrix A and B and zero matrix C
for (int i = 0; i < n; i++){
for (int j = 0; j < n; j++) {
double angle = 2.0*M_PI*i*j/ (( double ) n);
A[i][j] = s * ( sin ( angle ) + cos ( angle ) );
B[j][i] = A[i][j];
}
}
// Then perform the matrix-matrix multiplication
for (int i = 0; i < n; i++){
for (int j = 0; j < n; j++) {
double sum = 0.0;
for (int k = 0; k < n; k++) {
sum += B[i][k]*A[k][j];
}
C[i][j] = sum;
}
}
// Compute now the Frobenius norm
double Fsum = 0.0;
for (int i = 0; i < n; i++){
for (int j = 0; j < n; j++) {
Fsum += C[i][j]*C[i][j];
}
}
Fsum = sqrt(Fsum);
finish = clock();
double timeused = (double) (finish - start)/(CLOCKS_PER_SEC );
cout << setiosflags(ios::showpoint | ios::uppercase);
cout << setprecision(10) << setw(20) << "Time used for matrix-matrix multiplication=" << timeused << endl;
cout << " Frobenius norm = " << Fsum << endl;
// Free up space
for (int i = 0; i < n; i++){
delete[] A[i];
delete[] B[i];
delete[] C[i];
}
delete[] A;
delete[] B;
delete[] C;
return 0;
}
8.42. How do we define speedup? Simplest form¶
Speedup measures the ratio of performance between two objects
Versions of same code, with different number of processors
Serial and vector versions
Try different programing languages, c++ and Fortran
Two algorithms computing the same result
8.43. How do we define speedup? Correct baseline¶
The key is choosing the correct baseline for comparison
For our serial vs. vectorization examples, using compiler-provided vectorization, the baseline is simple; the same code, with vectorization turned off
For parallel applications, this is much harder:
Choice of algorithm, decomposition, performance of baseline case etc.
8.44. Parallel speedup¶
For parallel applications, speedup is typically defined as
Speedup \(=T_1/T_p\)
Here \(T_1\) is the time on one processor and \(T_p\) is the time using \(p\) processors.
Can the speedup become larger than \(p\)? That means using \(p\) processors is more than \(p\) times faster than using one processor.
8.45. Speedup and memory¶
The speedup on \(p\) processors can be greater than \(p\) if memory usage is optimal! Consider the case of a memorybound computation with \(M\) words of memory
If \(M/p\) fits into cache while \(M\) does not, the time to access memory will be different in the two cases:
\(T_1\) uses the main memory bandwidth
\(T_p\) uses the appropriate cache bandwidth
8.46. Upper bounds on speedup¶
Assume that almost all parts of a code are perfectly parallelizable (fraction \(f\)). The remainder, fraction \((1-f)\) cannot be parallelized at all.
That is, there is work that takes time \(W\) on one process; a fraction \(f\) of that work will take time \(Wf/p\) on \(p\) processors.
What is the maximum possible speedup as a function of \(f\)?
8.47. Amdahl’s law¶
On one processor we have
On \(p\) processors we have
resulting in a speedup of
As \(p\) goes to infinity, \(fW/p\) goes to zero, and the maximum speedup is
meaning that if if \(f = 0.99\) (all but \(1\%\) parallelizable), the maximum speedup is \(1/(1-.99)=100\)!


| Class and Description |
|---|
| CodeGenerator
A code generator is responsible for generating the Java source code required
to complete the implementation of an abstract template.
|
| Class and Description |
|---|
| ClassGenerator.BlockType |
| DirectExpression
Encapsulates a Java expression, defined as anything that is
valid in the following code:
(expr) |
| Class and Description |
|---|
| BatchReference
Holder class that contains batch naming, batch and record index.
|
| ClassGenerator |
| ClassGenerator.BlkCreateMode |
| ClassGenerator.BlockType |
| ClassGenerator.HoldingContainer
Represents a (Nullable)?(Type)Holder instance.
|
| CodeGenerator
A code generator is responsible for generating the Java source code required
to complete the implementation of an abstract template.
|
| DebugStringBuilder
Utility class to build a debug string for an object
in a standard format.
|
| DirectExpression
Encapsulates a Java expression, defined as anything that is
valid in the following code:
(expr) |
| DrillFunc |
| DrillFuncHolderExpr
Represents the call of a function within a query and includes
the actual arguments and a reference to the function declaration (as a
"function holder.")
|
| DrillSimpleFunc |
| EscapeTest1.EH |
| EscapeTest1.Monkey |
| EscapeTest1.RR |
| EscapeTest1.Timer |
| FilterPredicate |
| HiveFuncHolderExpr |
| StatisticsProvider |
| ValueVectorReadExpression
Wraps a value vector field to be read, providing metadata about the field.
|
| ValueVectorWriteExpression |
| Class and Description |
|---|
| ClassGenerator |
| ClassGenerator.BlockType |
| ClassGenerator.HoldingContainer
Represents a (Nullable)?(Type)Holder instance.
|
| DrillFunc |
| DrillSimpleFunc |
| Class and Description |
|---|
| DrillAggFunc
Aggregate function interface.
|
| DrillFunc |
| DrillSimpleFunc |
| Class and Description |
|---|
| DrillFunc |
| DrillSimpleFunc |
| Class and Description |
|---|
| DrillSimpleFunc |
| ValueVectorReadExpression
Wraps a value vector field to be read, providing metadata about the field.
|
| Class and Description |
|---|
| DrillAggFunc
Aggregate function interface.
|
| DrillFunc |
| DrillSimpleFunc |
| Class and Description |
|---|
| ClassGenerator |
| CodeGenerator
A code generator is responsible for generating the Java source code required
to complete the implementation of an abstract template.
|
| Class and Description |
|---|
| FilterPredicate |
| Class and Description |
|---|
| ClassGenerator |
| Class and Description |
|---|
| ClassGenerator |
| Class and Description |
|---|
| ClassGenerator |
| Class and Description |
|---|
| AbstractExecExprVisitor |
| ValueVectorReadExpression
Wraps a value vector field to be read, providing metadata about the field.
|
| ValueVectorWriteExpression |
| Class and Description |
|---|
| ClassGenerator |
| CodeGenerator
A code generator is responsible for generating the Java source code required
to complete the implementation of an abstract template.
|
| Class and Description |
|---|
| FilterPredicate |
| Class and Description |
|---|
| DrillFunc |
| DrillSimpleFunc |
| Class and Description |
|---|
| DrillFunc |
| DrillSimpleFunc |
| Class and Description |
|---|
| DrillFunc |
| DrillSimpleFunc |
| Class and Description |
|---|
| DrillAggFunc
Aggregate function interface.
|
| DrillFunc |
| DrillSimpleFunc |
| Class and Description |
|---|
| ClassGenerator |
| Class and Description |
|---|
| DrillFunc |
| DrillSimpleFunc |
Copyright © 2021 The Apache Software Foundation. All rights reserved.


Overview for Total Gasoline All Sales
U.S. oil production has transformed fundamentally in the past decade. After two decades of steady decline, domestic crude oil production grew by nearly 75 percent between 2008 and 2014, and each month since October 2013 production has exceeded net imports, which hadn’t happened since the mid‐1990s. While developments in oil production have been widely reported and appreciated, far less attention has been paid to the remarkable and surprising decline in U.S. petroleum consumption relative to both recent levels and past projections. This page identifies the mechanisms behind the surprising decline. Quantifying the underlying causes improves understanding of why the consumption path has changed, and how it might evolve in the future.
Primary gasoline Sales distribution
The choropleth map shows us the distribution of gasoline consumption distribution by US states from 1983 to 2013. From this map, we could see that California and Texas usually have the most gas consumption in the United States. However, there is less consumption in the North west region. Other states vary over the years.
Hover over the clock and choose the year you are interested in, the map will show you gas sales distribution. Click on the "Streets" button the map will show streets layer for you. Default layer will be in grayscale. Click on the state, the map will zoom in to see map clearer.


Instantaneous voting on anything
Code:
Thank you for voting {{ results.username }}!
Please view the results in real-time, below.
Below are the results:
{{key}}


{{ blood_samples_imported|intcomma }} imported / {{ blood_samples_cnt }} blood samples
{{no_of_files_uploaded|intcomma}} file(s) are uploaded with {{ manifest_imported|intcomma }} number of new manifest records
{{ receipt_imported|intcomma }} number of blood samples are received
{{ processed_imported|intcomma }} number of blood samples are processed


They said what?! Pros react to Charles Oliveira’s KO of Jared Gordon at UFC Sao Paulo
by Lucas RezendeCharles Oliveira did it again.
After picking up his first ever UFC knockout win in his last outing, ‘Do Bronx’ followed that up with another one at UFC Sao Paulo, making quick work of Jared Gordon, only a minute and 20 seconds into the first round. On Twitter, pro fighters enjoyed the fight.


Oops!
Well, this is unexpected…
Error code: 500
An error has occurred and we're working to fix the problem! We’ll be up and running shortly.


Enter a 64 digit (256bit) haxadecimal to compute on:
^--- Least significant bit Check the log for progress


Initializing our API...
Which Company would you like to analize?
Or maybe you would like to choose company that's already in our database?
You can test our current functionality on your left side.
Initializing our API...
You can test our current functionality on your left side.


Teacher/Developer
Indiana, USA
<EMAIL_ADDRESS>+1-260-589-6128
Teaching English as a sencond language to kids in Vietnam is fun! We practice English conversations while we play games. The students love to sing songs and watch videos as they learn English. Sometimes we play 'stop the bus' or 'slap the board'.


| DOSE: |
10 mg |
oral |
2C-T-7 |
(powder / crystals) |
I ingested 10 mg of 2C-T-7 orally at aproximately 3:30 pm at a friend's apartment. The onset took about 2.5 - 3 hours. During the onset, about an hour into it, I began to feel slightly nervous, and tense. My body temperature fluctuated, and I found myself sweating on a few occasions, and feeling cold at other times.
Once peak effects had begun we went for a walk around town. I felt less body temperature irregularities, although I had tightness in my chest and stomach. This tightness got worse when laying down, and when I sat up abruptly, it almost turned to nausea. Sitting up for a while and walking around helped with this. As far as visual phenomena, it was fairly mild. I perceived some things to be closer than they actually were, and when staring at a ceiling, the surface of the ceiling appeared to shift around in various ways.
One prominent effect throughout the trip was a reduced ability to use higher reasoning functions (language, problem solving). I felt confused on occasion, and wondered if things I was saying were making sense. At one point, I was looking at a patch of tulips, and said 'hey, look at the pretty roses'. Yes, I am usually fully capable of distinguishing between a rose and a tulip, and after being told that they were tulips, and inspecting them again, I realized my mistake. This may not sound significant, but it illustrates the kinds of things that were disrupted in my cognitive abilities.
I was at baseline at about 7 hours after ingestion, and the only remaining aspect was a pounding headache.
The overall experience was mildly interesting, and had there not been so many physical side-effects, it may have been worth repeating. I could deal with the body load, but I just don't want to. Also, such a significant physical aspect to the chemical indicates to me that there may be something toxic at work. So I'd rather not try my chances with it again.
I am not currently taking any prescription, over the counter, or herbal medications.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


Basic
Dialog body text
Action 2
Action 1
Actions
By setting the dialogAction="my-action" attribute on any element projected into
mwc-dialog, you can close the dialog by clicking on that element. The
dialog will then fire a non-bubbling "closing" event and a non-bubbling
"closed" event with an event detail of {action: "my-action"}
This has action
this does not
Scrollable
Really long text will scroll. Really long text will scroll. Really long text will scroll. Really
long text will scroll. Really long text will scroll. Really long text will scroll. Really long text
will scroll. Really long text will scroll. Really long text will scroll. Really long text will
scroll. Really long text will scroll. Really long text will scroll. Really long text will scroll.
Really long text will scroll. Really long text will scroll. Really long text will scroll. Really
long text will scroll. Really long text will scroll. Really long text will scroll. Really long text
will scroll. Really long text will scroll. Really long text will scroll. Really long text will
scroll. Really long text will scroll. Really long text will scroll. Really long text will scroll.
Really long text will scroll. Really long text will scroll. Really long text will scroll. Really
long text will scroll. Really long text will scroll. Really log text will scroll. Really log text
will scroll. Really log text will scroll. Really log text will scroll. Really log text will scroll.
Really log text will scroll. Really log text will scroll. Really log text will scroll. Really log
text will scroll. Really log text will scroll. Really log text will scroll. Really log text will
scroll. Really log text will scroll. Really log text will scroll. Really log text will scroll.
Really log text will scroll. Really log text will scroll. Really log text will scroll. Really log
text will scroll. Really log text will scroll. Really log text will scroll. Really log text will
scroll. Really log text will scroll. Really log text will scroll. Really log text will scroll.
Really log text will scroll. Really log text will scroll. Really log text will scroll. Really log
text will scroll. Really log text will scroll. Really log text will scroll. Really log text will
scroll. Really log text will scroll. Really log text will scroll. Really log text will scroll.
Really log text will scroll. Really log text will scroll. Really log text will scroll. Really log
text will scroll. Really log text will scroll. Really log text will scroll. Really log text will
scroll. Really log text will scroll. Really log text will scroll. Really log text will scroll.
Really log text will scroll. Really log text will scroll. Really log text will scroll. Really log
text will scroll. Really log text will scroll. Really log text will scroll. Really log text will
scroll. Really log text will scroll. Really log text will scroll. Really log text will scroll.
Really log text will scroll. Really log text will scroll. Really log text will scroll. Really log
text will scroll. Really log text will scroll. Really log text will scroll. Really log text will
scroll. Really log text will scroll. Really log text will scroll. Really log text will scroll.
Really log text will scroll. Really log text will scroll. Really log text will scroll. Really log
text will scroll. Really log text will scroll. Really log text will scroll. Really log text will
scroll. Really log text will scroll. Really log text will scroll. Really log text will scroll.
Really log text will scroll. Really log text will scroll. Really log text will scroll. Really log
text will scroll. Really log text will scroll. Really log text will scroll. Really log text will
scroll. Really log text will scroll. Really log text will scroll. Really log text will scroll.
Really log text will scroll. Really log text will scroll. Really log text will scroll. Really log
text will scroll. Really log text will scroll. Really log text will scroll. Really log text will
scroll. Really log text will scroll. Really log text will scroll. Really log text will scroll.
Really log text will scroll. Really log text will scroll. Really log text will scroll. Really log
text will scroll. Really log text will scroll. Really log text will scroll. Really log text will
scroll. Really log text will scroll. Really log text will scroll. Really log text will scroll.
Really log text will scroll. Really log text will scroll. Really log text will scroll. Really log
text will scroll. Really log text will scroll. Really log text will scroll. Really log text will
scroll. Really log text will scroll. Really log text will scroll. Really log text will scroll.
Really log text will scroll. Really log text will scroll. Really log text will scroll. Really log
text will scroll. Really log text will scroll. Really log text will scroll. Really log text will
scroll. Really log text will scroll. Really log text will scroll. Really log text will scroll.
Really log text will scroll. Really log text will scroll. Really log text will scroll. Really log
text will scroll. Really log text will scroll. Really log text will scroll. Really log text will
scroll. Really log text will scroll. Really log text will scroll. Really log text will scroll.
Really log text will scroll. Really log text will scroll. Really log text will scroll.
Close this!
Hide Actions
If you don't have actions, you may want to set the "hideActions" property.
This property will remove extra whitespace at the bottom of this dialog.
This button will toggle that whitespace:
Toggle hideActions
mwc-dialog.hideActions is currently:
false
Styled
These are the current styles applied to this dialog
--mdc-theme-surface: orange;
--mdc-dialog-scrim-color: rgba(35, 47, 52, .32);
--mdc-dialog-heading-ink-color: #232F34;
--mdc-dialog-content-ink-color: #232F34;
--mdc-dialog-scroll-divider-color: transparent;
--mdc-dialog-min-width: 500px;
--mdc-dialog-max-width: 700px;
--mdc-dialog-max-height: 350px;
--mdc-dialog-shape-radius: 0px;
/* color buttons */
--mdc-theme-primary: green;
Too stylish for me!
Stacked
This is what happens when you set the stacked property on mwc-dialog.
Notice that the primary action is now on top.
Primary
Secondary
Initial Focus
In this example we set "dialogInitialFocus" on the mwc-textfield.
When this dialog opens, it is auto-focused.
Primary
Secondary


Home
Events
{% load static %}
{{ event.title }}
{{ event.desc }}
Date and Time
{{ event.startDate }}
Location or Venue
{{ event.venue }}
Cost
{{ event.price }}


Application that pulled data from QuickBase using the QuickBase API to make inventory management smoot and easy.
View ProjectApplication that took surveys built on QuickBase and displayed them on mobile so that they can easily and quickly be completed, reviewed, and submitted to QuickBase using QuickBase API
View ProjectTest given by AlzCare Labs to test AngularJS and Angular Material ability.
View ProjectsWhen a trip is assigned from clients QuickBase application, a text message is sent to a driver with a link containing the trip's information. At which time, a driver can choose to accept or reject the trip with the resulting answer sent and updated on the QuickBase application.
View Project


Data Structures | |
| struct | workqueue_task |
| Task to be run from a work queue. More... | |
| struct | workqueue |
| Work queue. More... | |
| struct | nested_workqueue |
| Nested Work Queue. More... | |
Typedefs | |
| typedef void(* | workqueue_func_t )(struct workqueue_task *task) |
| Work queue worker function. | |
Functions | |
| bool | workqueue_add_task (struct workqueue *queue, struct workqueue_task *task) |
| Add task to work queue. | |
| static void | workqueue_init (struct workqueue *queue) |
| Initialize a work queue. | |
| static void | workqueue_task_set_work_func (struct workqueue_task *task, workqueue_func_t worker_func) |
| Change the worker function of a task. | |
| static void | workqueue_task_init (struct workqueue_task *task, workqueue_func_t worker_func) |
| Initialize a work queue task. | |
| static bool | workqueue_is_empty (struct workqueue *queue) |
| Check if a work queue is empty. | |
| static bool | workqueue_task_is_queued (struct workqueue_task *task) |
| Check if a work queue task has been queued. | |
| static struct workqueue_task * | workqueue_pop_task (struct workqueue *queue) |
| Remove task from front of work queue. | |
| static void | workqueue_run_task (struct workqueue_task *task) |
| Run a work queue task. | |
Variables | |
| struct workqueue | main_workqueue |
| The main work queue. | |
| struct workqueue | main_workqueue |
| The main work queue. | |
Nested Workqueues | |
Nested workqueues are workqueues specific to certain shared resources, for example a bus driver which can only handle one request at a time. Such drivers may create a workqueue for keeping track of tasks wanting to use the shared resource, and move them one by one into the main workqueue. | |
| bool | nested_workqueue_add_task (struct nested_workqueue *nwq, struct workqueue_task *task) |
| Add task to nested work queue. | |
| void | nested_workqueue_next_task (struct nested_workqueue *nwq) |
| Switch to the next task in a nested work queue. | |
| static void | nested_workqueue_init (struct nested_workqueue *wq) |
| Initialize a nested workqueue. |
This is a workqueue designed to simplify and formalize sequential execution of tasks. It provides a low overhead structure that can replace or extend the use of threads in simple applications.
| typedef void(* workqueue_func_t)(struct workqueue_task *task) |
Work queue worker function.
| task | The work queue task which is currently being executed |
Definition at line 63 of file workqueue.h.
| bool nested_workqueue_add_task | ( | struct nested_workqueue * | nwq, | |
| struct workqueue_task * | task | |||
| ) |
Add task to nested work queue.
This adds task to the nested work queue nwq. If there is no task currently active, i.e. nwq->current is NULL, the new task is immediately made active by moving it to the main workqueue and assigning it to nwq->current.
| nwq | A nested workqueue | |
| task | Task to be added to the nested work queue |
| true | The task was successfully queued | |
| false | The task has already been queued, so nothing was done |
Referenced by spi_request_bus().
| static void nested_workqueue_init | ( | struct nested_workqueue * | wq | ) | [inline, static] |
Initialize a nested workqueue.
| wq | Nested workqueue to inititalize |
Definition at line 255 of file workqueue.h.
References nested_workqueue::current, workqueue_init(), and nested_workqueue::wq.
| void nested_workqueue_next_task | ( | struct nested_workqueue * | nwq | ) |
Switch to the next task in a nested work queue.
This removes the task at the head of the nested work queue nwq, if any, and makes it current by adding it to the main workqueue and assigning it to nwq->current. If nwq is empty, nwq->current is set to NULL.
| nwq | A nested workqueue |
Referenced by spi_release_bus().
| bool workqueue_add_task | ( | struct workqueue * | queue, | |
| struct workqueue_task * | task | |||
| ) |
Add task to work queue.
This function adds a task to a work queue. The task structure must be initialized by the caller, and only a pointer to it is stored in the queue. The caller must make sure the task struct is kept intact while in the queue and if necessary freed after running the task. The task is removed from the queue before the worker function is called, so it is safe to free or re-queue the task from the worker function.
If task has already been added to some work queue, or task is NULL, this function does nothing.
| queue | Work queue | |
| task | Task to be added to queue |
| true | The task was successfully queued | |
| false | The task has already been queued, or is NULL, so nothing was done |
Referenced by dataflash_detect(), dataflash_submit_buf_list(), spi_poll(), spi_polled_sched_next_buffer(), spi_polled_sched_poll(), touch_calibrate_task_handler(), and win_queue_event().
| static void workqueue_init | ( | struct workqueue * | queue | ) | [inline, static] |
Initialize a work queue.
| queue | The work queue to be initialized |
Definition at line 109 of file workqueue.h.
References assert, slist_init(), and workqueue::task_list.
Referenced by nested_workqueue_init().
| static bool workqueue_is_empty | ( | struct workqueue * | queue | ) | [inline, static] |
Check if a work queue is empty.
| queue | Work queue |
Definition at line 161 of file workqueue.h.
References assert, slist_is_empty(), and workqueue::task_list.
Referenced by workqueue_pop_task().
| static struct workqueue_task* workqueue_pop_task | ( | struct workqueue * | queue | ) | [static, read] |
Remove task from front of work queue.
This function removes one task from the front of a work queue and returns a pointer to that item. The memory allocated to the item struct will not be freed. If the queue is empty, a NULL pointer will be returned.
| queue | Work queue |
Definition at line 198 of file workqueue.h.
References assert, cpu_irq_is_enabled, slist_node::next, workqueue_task::node, slist_pop_head, workqueue::task_list, and workqueue_is_empty().
Referenced by mainloop_run().
| static void workqueue_run_task | ( | struct workqueue_task * | task | ) | [inline, static] |
Run a work queue task.
| task | The work queue task to be run |
Definition at line 222 of file workqueue.h.
References workqueue_task::worker.
Referenced by mainloop_run().
| static void workqueue_task_init | ( | struct workqueue_task * | task, | |
| workqueue_func_t | worker_func | |||
| ) | [inline, static] |
Initialize a work queue task.
This function initialize a work queue task. It should be used before adding the task to any workqueue.
| task | Work queue task to be initialized | |
| worker_func | Function implementing the task |
Definition at line 144 of file workqueue.h.
References slist_node::next, workqueue_task::node, and workqueue_task_set_work_func().
Referenced by dataflash_prepare_req(), and spi_polled_buf_list_init().
| static bool workqueue_task_is_queued | ( | struct workqueue_task * | task | ) | [inline, static] |
Check if a work queue task has been queued.
| true | task has already been added to a workqueue | |
| false | task has not been added to any workqueue |
Definition at line 175 of file workqueue.h.
References slist_node::next, and workqueue_task::node.
| static void workqueue_task_set_work_func | ( | struct workqueue_task * | task, | |
| workqueue_func_t | worker_func | |||
| ) | [inline, static] |
Change the worker function of a task.
It is safe to call this function on tasks that have already been queued.
| task | Task to be updated | |
| worker_func | New worker function for the task |
Definition at line 127 of file workqueue.h.
References workqueue_task::worker.
Referenced by workqueue_task_init().
| struct workqueue main_workqueue |
The main work queue.
This is the main work queue of the application. The main loop will pull tasks from this and execute them one by one. It can be considered a queue of tasks waiting to use the CPU resource; other workqueues will typically contend for some other resource, e.g. a SPI bus or flash device.
Definition at line 47 of file workqueue.c.
Referenced by dataflash_detect(), dataflash_submit_buf_list(), spi_poll(), spi_polled_sched_next_buffer(), spi_polled_sched_poll(), touch_calibrate_task_handler(), and win_queue_event().
| struct workqueue main_workqueue |
The main work queue.
This is the main work queue of the application. The main loop will pull tasks from this and execute them one by one. It can be considered a queue of tasks waiting to use the CPU resource; other workqueues will typically contend for some other resource, e.g. a SPI bus or flash device.
Definition at line 47 of file workqueue.c.
Referenced by dataflash_detect(), dataflash_submit_buf_list(), spi_poll(), spi_polled_sched_next_buffer(), spi_polled_sched_poll(), touch_calibrate_task_handler(), and win_queue_event().


WATCH | Goods worth R100,000 stolen as gunmen tail car from OR Tambo International Airport
by Iavan PijoosTwo people were attacked and robbed at gunpoint in a car as it parked in a driveway after being followed from OR Tambo International Airport in Johannesburg at the weekend.
Police spokesperson Brig Mathapelo Peters said an e-hailing taxi service was transporting a man from the airport to Morningside in Sandton on Sunday evening.
He had reportedly arrived from the United Kingdom and was being dropped off at a hotel.
“When the security opened the gate, they were attacked and robbed of their belongings,” said Peters.
The gang opened the car's doors and rifled through the boot, stealing goods worth more than R100,000.
The suspects fled the scene in a waiting car. No arrests were made.
By 4.30pm Monday afternoon, police spokeswoman Colonel Brenda Muridili said no arrests were made. A task team was investigating the matter.


Home
(current)
Contact Us
SignIn/Up
Sign Up
Sign In
Rick and Morty Vaders
How to play:
Use Arrow keys to move left and right
Use space key to shoot


Last updated: 2018-08-03
workflowr checks: (Click a bullet for more information) ✔ R Markdown file: up-to-date
Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.
✔ Environment: empty
Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.
✔ Seed:
set.seed(20180731)
The command set.seed(20180731)
was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.
✔ Session information: recorded
Great job! Recording the operating system, R version, and package versions is critical for reproducibility.
✔ Repository version: 6e130ac
wflow_publish
or wflow_git_commit
). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:
Ignored files:
Ignored: .DS_Store
Ignored: .Rhistory
Ignored: .Rproj.user/
Ignored: data/.DS_Store
Ignored: inst/.DS_Store
Ignored: inst/doc/.DS_Store
Ignored: vignettes/.DS_Store
Untracked files:
Untracked: analysis/figure/
Untracked: analysis/hidden_heterogeneity_glioblastoma.Rmd
Untracked: output/Lawlor_Islets_Alpha_Doublets_Figure2_ABCD.pdf
Untracked: output/Lawlor_Islets_Alpha_Doublets_SV2_Genes_rsqcutoff0.3.txt
Untracked: output/Lawlor_Islets_Alpha_Doublets_SV2_Genes_rsqcutoff0.6.txt
Untracked: output/Lawlor_Islets_Alpha_iasva_SV2Markers_rsqcutoff0.3_pheatmap_iasvaV0.95.pdf
Untracked: output/Lawlor_Islets_Alpha_iasva_SV2Markers_rsqcutoff0.6_pheatmap_iasvaV0.95.pdf
Unstaged changes:
Deleted: analysis/about.Rmd
Modified: analysis/license.Rmd
Modified: output/Clustering_analyses_figure2.pdf
Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.
The iasva package can be used to detect hidden heterogenity within bulk or single cell sequencing data. To illustrate how to use the iasva package for heterogenity detection, we use real-world single cell RNA sequencing (scRNA-Seq) data obtained from human pancreatic islet samples (Lawlor et. al., 2016). This dataset is included in a R data package (“iasvaExamples”) containing data examples for IA-SVA (https://github.com/dleelab/iasvaExamples). To install the package, follow the instruction provided in the GitHub page.
#devtools
library(devtools)
#iasva
devtools::install_github("UcarLab/iasva")
#iasvaExamples
devtools::install_github("dleelab/iasvaExamples")
rm(list=ls())
library(irlba) # partial SVD, the augmented implicitly restarted Lanczos bidiagonalization algorithm
library(iasva)
library(iasvaExamples)
library(sva)
library(SCnorm)
Warning: package 'SCnorm' was built under R version 3.5.1
library(Rtsne)
library(pheatmap)
library(corrplot)
library(DescTools) #pcc i.e., Pearson's contingency coefficient
library(RColorBrewer)
library(SummarizedExperiment)
color.vec <- brewer.pal(9, "Set1")[c(1,9)]
# Normalization.
normalize <- function(counts)
{
normfactor <- colSums(counts)
return(t(t(counts)/normfactor)*median(normfactor))
}
data("Lawlor_Islet_scRNAseq_Read_Counts")
data("Lawlor_Islet_scRNAseq_Annotations")
ls()
[1] "color.vec" "Lawlor_Islet_scRNAseq_Annotations"
[3] "Lawlor_Islet_scRNAseq_Read_Counts" "normalize"
counts <- Lawlor_Islet_scRNAseq_Read_Counts
anns <- Lawlor_Islet_scRNAseq_Annotations
dim(anns)
[1] 638 26
dim(counts)
[1] 26542 638
summary(anns)
run cell.type COL1A1 INS
Length:638 Length:638 Min. :1.00 Min. :1.000
Class :character Class :character 1st Qu.:1.00 1st Qu.:1.000
Mode :character Mode :character Median :1.00 Median :1.000
Mean :1.03 Mean :1.414
3rd Qu.:1.00 3rd Qu.:2.000
Max. :2.00 Max. :2.000
PRSS1 SST GCG KRT19
Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000
1st Qu.:1.000 1st Qu.:1.000 1st Qu.:1.000 1st Qu.:1.000
Median :1.000 Median :1.000 Median :1.000 Median :1.000
Mean :1.038 Mean :1.039 Mean :1.375 Mean :1.044
3rd Qu.:1.000 3rd Qu.:1.000 3rd Qu.:2.000 3rd Qu.:1.000
Max. :2.000 Max. :2.000 Max. :2.000 Max. :2.000
PPY num.genes Cell_ID UNOS_ID
Min. :1.000 Min. :3529 10th_C1_S59 : 1 ACCG268 :136
1st Qu.:1.000 1st Qu.:5270 10th_C10_S104: 1 ACJV399 :108
Median :1.000 Median :6009 10th_C11_S96 : 1 ACEL337 :103
Mean :1.028 Mean :5981 10th_C13_S61 : 1 ACIW009 : 93
3rd Qu.:1.000 3rd Qu.:6676 10th_C14_S53 : 1 ACCR015A: 57
Max. :2.000 Max. :8451 10th_C16_S105: 1 ACIB065 : 57
(Other) :632 (Other) : 84
Age Biomaterial_Provider Gender Phenotype
Min. :22.00 IIDP : 45 Female:303 Non-Diabetic :380
1st Qu.:29.00 Prodo Labs:593 Male :335 Type 2 Diabetic:258
Median :42.00
Mean :39.63
3rd Qu.:53.00
Max. :56.00
Race BMI Cell_Type Patient_ID
African American:175 Min. :22.00 INS :264 P1 :136
Hispanic :165 1st Qu.:26.60 GCG :239 P8 :108
White :298 Median :32.95 KRT19 : 28 P3 :103
Mean :32.85 SST : 25 P7 : 93
3rd Qu.:35.80 PRSS1 : 24 P5 : 57
Max. :55.00 none : 21 P6 : 57
(Other): 37 (Other): 84
Sequencing_Run Batch Coverage Percent_Aligned
12t : 57 B1:193 Min. :1206135 Min. :0.8416
4th : 57 B2:148 1st Qu.:2431604 1st Qu.:0.8769
9th : 57 B3:297 Median :3042800 Median :0.8898
10t : 56 Mean :3160508 Mean :0.8933
7th : 55 3rd Qu.:3871697 3rd Qu.:0.9067
3rd : 53 Max. :5931638 Max. :0.9604
(Other):303
Mitochondrial_Fraction Num_Expressed_Genes
Min. :0.003873 Min. :3529
1st Qu.:0.050238 1st Qu.:5270
Median :0.091907 Median :6009
Mean :0.108467 Mean :5981
3rd Qu.:0.142791 3rd Qu.:6676
Max. :0.722345 Max. :8451
ContCoef(table(anns$Gender, anns$Cell_Type))
[1] 0.225969
ContCoef(table(anns$Phenotype, anns$Cell_Type))
[1] 0.1145096
ContCoef(table(anns$Race, anns$Cell_Type))
[1] 0.3084146
ContCoef(table(anns$Patient_ID, anns$Cell_Type))
[1] 0.5232058
ContCoef(table(anns$Batch, anns$Cell_Type))
[1] 0.3295619
The annotations describing the islet samples and experimental settings are stored in “anns” and the read counts information is stored in “counts”.
To illustrate how IA-SVA can be used to detect hidden heterogeneity within a homogenous cell population (i.e., alpha cells), we use read counts of alpha cells from healthy (non-diabetic) subjects (n = 101).
# Selected T2D patients/GCG cell type
counts <- counts[, (anns$Phenotype!="Non-Diabetic")&(anns$Cell_Type=="GCG")]
anns <- subset(anns, (Phenotype!="Non-Diabetic")&(Cell_Type=="GCG"))
dim(counts)
[1] 26542 101
dim(anns)
[1] 101 26
anns <- droplevels(anns)
prop.zeros <- sum(counts==0)/length(counts)
prop.zeros
[1] 0.6952497
# filter out genes that are sparsely and lowly expressed
filter = apply(counts, 1, function(x) length(x[x>5])>=3)
counts = counts[filter,]
dim(counts)
[1] 14384 101
prop.zeros <- sum(counts==0)/length(counts)
prop.zeros
[1] 0.4520968
## count-depth relationship for all genes
Conditions = rep(c(1), each=101)
countDeptEst <- plotCountDepth(Data = counts, Conditions = Conditions,
FilterCellProportion = .1, NCores=8)
DataNorm <- SCnorm(Data = counts, Conditions = Conditions,
PrintProgressPlots = FALSE,
FilterCellNum = 10,
NCores=8)
Setting up parallel computation using 8 cores
Gene filter is applied within each condition.
1223 genes in condition 1 will not be included in the normalization due to
the specified filter criteria.
A list of these genes can be accessed in output,
see vignette for example.
Finding K for Condition 1
Trying K = 1
Trying K = 2
Trying K = 3
Trying K = 4
Trying K = 5
Trying K = 6
Trying K = 7
Trying K = 8
Done!
counts <- SingleCellExperiment::normcounts(DataNorm)
summary(colSums(counts))
Min. 1st Qu. Median Mean 3rd Qu. Max.
1274488 1315313 1332682 1358957 1386293 1650415
It is well known that the number of detected genes in each cell explains a very large portion of variability in scRNA-Seq data (Hicks et. al. 2015 BioRxiv, McDavid et. al. 2016 Nature Biotechnology). Frequently, the first principal component of log-transformed scRNA-Seq read counts is highly correlated with the number of detected genes (e.g., r > 0.9). Here, we calculate the number of detected genes for islet cells, which will be used as an known factor in the IA-SVA analyses.
Num_Detected_Genes <- colSums(counts>0)
Geo_Lib <- colSums(log(counts+1))
summary(Num_Detected_Genes)
Min. 1st Qu. Median Mean 3rd Qu. Max.
5787 7043 7925 7881 8652 10188
summary(Geo_Lib)
Min. 1st Qu. Median Mean 3rd Qu. Max.
16571 20527 24507 24349 27475 33830
barplot(Num_Detected_Genes, xlab="Cell", las=2,
ylab = "Number of detected genes")
lcounts <- log(counts + 1)
# PC1 and Geometric library size correlation
pc1 = irlba(lcounts - rowMeans(lcounts), 1)$v[,1] ## partial SVD
cor(Num_Detected_Genes, pc1)
[1] 0.9778019
cor(Geo_Lib, pc1)
[1] 0.99461
Here, we run IA-SVA using Patient_ID and Geo_Lib_Size as known factors and identify five hidden factors. SVs are plotted in a pairwise fashion to uncover which SVs can seperate cell types.
set.seed(4543535)
Patient_ID <- anns$Patient_ID
mod <- model.matrix(~Patient_ID+Geo_Lib)
summ_exp <- SummarizedExperiment(assays = counts)
iasva.res<- iasva(summ_exp, mod[,-1],verbose=FALSE, permute=FALSE, num.sv=5) ##irlba
IA-SVA running...
SV 1 Detected!
SV 2 Detected!
SV 3 Detected!
SV 4 Detected!
SV 5 Detected!
# of significant surrogate variables: 5
iasva.sv <- iasva.res$sv
plot(iasva.sv[,1], iasva.sv[,2], xlab="SV1", ylab="SV2")
Cluster <- as.factor(iasva.sv[,2] < 0.1)
levels(Cluster)=c("Cell1","Cell2")
table(Cluster)
Cluster
Cell1 Cell2
6 95
# We identified 6 outlier cells based on SV2 that are marked in red
pairs(iasva.sv, main="IA-SVA", pch=21, col=color.vec[Cluster],
bg=color.vec[Cluster], oma=c(4,4,6,12)) #4,4,6,12
legend("right", levels(Cluster), fill=color.vec, bty="n")
plot(iasva.sv[,1:2], main="IA-SVA", pch=21, xlab="SV1", ylab="SV2",
col=color.vec[Cluster], bg=color.vec[Cluster])
cor(Num_Detected_Genes, iasva.sv[,2])
[1] 0.1571675
cor(Geo_Lib, iasva.sv[,2])
[1] 0.2009796
corrplot(cor(iasva.sv))
As shown in the above figure, SV2 clearly separates alpha cells into two groups: 6 outlier cells (marked in red) and the rest of the alpha cells (marked in green). SV3 and SV4 also capture outlier cells. However, we will focus on SV2 in the rest of the analyses.
Here, using the find_markers() function we find marker genes (n=105 genes) that are significantly associated with SV2 (multiple testing adjusted p-value < 0.05, default significance cutoff, and R-squared value > 0.3, default R-squared cutoff).
# try different R2 thresholds
pdf("output/Clustering_analyses_figure2.pdf")
r2.results <- study_R2(summ_exp, iasva.sv, selected.svs=2, no.clusters=2)
# of markers (): 396
total # of unique markers: 396
# of markers (): 237
total # of unique markers: 237
# of markers (): 177
total # of unique markers: 177
# of markers (): 143
total # of unique markers: 143
# of markers (): 108
total # of unique markers: 108
# of markers (): 93
total # of unique markers: 93
# of markers (): 72
total # of unique markers: 72
# of markers (): 58
total # of unique markers: 58
# of markers (): 47
total # of unique markers: 47
# of markers (): 35
total # of unique markers: 35
# of markers (): 27
total # of unique markers: 27
# of markers (): 22
total # of unique markers: 22
# of markers (): 12
total # of unique markers: 12
# of markers (): 8
total # of unique markers: 8
# of markers (): 4
total # of unique markers: 4
# of markers (): 2
total # of unique markers: 2
# of markers (): 1
total # of unique markers: 1
dev.off()
quartz_off_screen
2
marker.counts <- find_markers(summ_exp, as.matrix(iasva.sv[,2]), rsq.cutoff = 0.6)
# of markers (): 27
total # of unique markers: 27
marker.counts.long <- find_markers(summ_exp, as.matrix(iasva.sv[,2]), rsq.cutoff = 0.3)
# of markers (): 108
total # of unique markers: 108
nrow(marker.counts)
[1] 27
rownames(marker.counts)
[1] "PMEPA1" "LINC00152" "MIR4435-1HG" "ENG" "ITGA5"
[6] "TMEM233" "PRDM1" "C8orf4" "ERG" "THBS1"
[11] "MEF2C" "LGALS1" "CD93" "ELTD1" "COL4A1"
[16] "COL4A2" "HBEGF" "SPARC" "SPARCL1" "RAPGEF5"
[21] "KDR" "GNG11" "CD9" "PODXL" "PLVAP"
[26] "IFI16" "RHOJ"
nrow(marker.counts.long)
[1] 108
anno.col <- data.frame(Cluster=Cluster, SV2=iasva.sv[,2])
rownames(anno.col) <- colnames(marker.counts)
head(anno.col)
Cluster SV2
4th-C63_S30 Cell2 -0.02724532
4th-C66_S36 Cell2 -0.02091476
4th-C18_S31 Cell2 -0.01190674
4th-C57_S18 Cell1 0.23502845
4th-C56_S17 Cell2 -0.03704850
4th-C68_S41 Cell2 -0.03570599
cluster.col <- color.vec[1:2]
names(cluster.col) <- as.vector(levels(Cluster))
anno.colors <- list(Cluster=cluster.col)
anno.colors
$Cluster
Cell1 Cell2
"#E41A1C" "#999999"
pheatmap(log(marker.counts+1), show_colnames =FALSE,
clustering_method = "ward.D2",cutree_cols = 2,annotation_col = anno.col,
annotation_colors = anno.colors)
cor(Num_Detected_Genes, iasva.sv[,2])
[1] 0.1571675
cor(Geo_Lib, iasva.sv[,2])
[1] 0.2009796
pdf(file="output/Lawlor_Islets_Alpha_Doublets_Figure2_ABCD.pdf", width=5, height=6)
layout(matrix(c(1,2,3,4), nrow=2, ncol=2, byrow=TRUE))
plot(iasva.sv[,1:2], main="IA-SVA", pch=21, xlab="SV1", ylab="SV2", col=color.vec[Cluster], bg=color.vec[Cluster])
legend("topright", levels(Cluster), border="white", fill=color.vec, bty="n")
plot(pca.res[,2:3], main="PCA", pch=21, xlab="PC2", ylab="PC3", col=color.vec[Cluster], bg=color.vec[Cluster])
plot(sva.res[,1:2], main="USVA", xlab="SV1", ylab="SV2", pch=21, col=color.vec[Cluster], bg=color.vec[Cluster])
plot(tsne.res$Y, main="tSNE", xlab="Dimension 1", ylab="Dimension 2", pch=21, col=color.vec[Cluster], bg=color.vec[Cluster])
dev.off()
quartz_off_screen
2
anno.col <- data.frame(Cluster=Cluster)
rownames(anno.col) <- colnames(marker.counts)
head(anno.col)
Cluster
4th-C63_S30 Cell2
4th-C66_S36 Cell2
4th-C18_S31 Cell2
4th-C57_S18 Cell1
4th-C56_S17 Cell2
4th-C68_S41 Cell2
cluster.col <- color.vec
names(cluster.col) <- as.vector(levels(Cluster))
anno.colors <- list(Cluster=cluster.col)
anno.colors
$Cluster
Cell1 Cell2
"#E41A1C" "#999999"
pheatmap(log(marker.counts+1), show_colnames =FALSE,
clustering_method = "ward.D2",cutree_cols = 2,annotation_col = anno.col,
annotation_colors = anno.colors,
filename="output/Lawlor_Islets_Alpha_iasva_SV2Markers_rsqcutoff0.6_pheatmap_iasvaV0.95.pdf",
width=6, height=5)
pheatmap(log(marker.counts.long+1), show_colnames =FALSE,
clustering_method = "ward.D2",cutree_cols = 2,annotation_col = anno.col,
annotation_colors = anno.colors,
filename="output/Lawlor_Islets_Alpha_iasva_SV2Markers_rsqcutoff0.3_pheatmap_iasvaV0.95.pdf",
width=6, height=14)
write.table(as.data.frame(rownames(marker.counts)),
file="output/Lawlor_Islets_Alpha_Doublets_SV2_Genes_rsqcutoff0.6.txt", quote=F,
row.names=F, col.names=F, sep=" ")
write.table(as.data.frame(rownames(marker.counts.long)),
file="output/Lawlor_Islets_Alpha_Doublets_SV2_Genes_rsqcutoff0.3.txt", quote=F,
row.names=F, col.names=F, sep=" ")
sessionInfo()
R version 3.5.0 (2018-04-23)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Sierra 10.12.6
Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] parallel stats4 stats graphics grDevices utils datasets
[8] methods base
other attached packages:
[1] SummarizedExperiment_1.10.1 DelayedArray_0.6.1
[3] matrixStats_0.53.1 Biobase_2.40.0
[5] GenomicRanges_1.32.3 GenomeInfoDb_1.16.0
[7] IRanges_2.14.10 S4Vectors_0.18.3
[9] BiocGenerics_0.26.0 RColorBrewer_1.1-2
[11] DescTools_0.99.24 corrplot_0.84
[13] pheatmap_1.0.10 Rtsne_0.13
[15] SCnorm_1.2.1 sva_3.28.0
[17] BiocParallel_1.14.2 genefilter_1.62.0
[19] mgcv_1.8-23 nlme_3.1-137
[21] iasvaExamples_1.0.0 iasva_0.99.3
[23] irlba_2.3.2 Matrix_1.2-14
[25] workflowr_1.0.1 rmarkdown_1.9
loaded via a namespace (and not attached):
[1] bitops_1.0-6 bit64_0.9-7
[3] rprojroot_1.3-2 tools_3.5.0
[5] backports_1.1.2 R6_2.2.2
[7] DBI_1.0.0 lazyeval_0.2.1
[9] colorspace_1.3-2 tidyselect_0.2.4
[11] moments_0.14 bit_1.1-14
[13] compiler_3.5.0 git2r_0.21.0
[15] quantreg_5.36 expm_0.999-2
[17] SparseM_1.77 labeling_0.3
[19] scales_0.5.0 mvtnorm_1.0-8
[21] stringr_1.3.1 digest_0.6.15
[23] foreign_0.8-70 R.utils_2.6.0
[25] XVector_0.20.0 pkgconfig_2.0.1
[27] htmltools_0.3.6 manipulate_1.0.1
[29] limma_3.36.2 rlang_0.2.1
[31] RSQLite_2.1.1 bindr_0.1.1
[33] dplyr_0.7.5 R.oo_1.22.0
[35] RCurl_1.95-4.10 magrittr_1.5
[37] GenomeInfoDbData_1.1.0 Rcpp_0.12.17
[39] munsell_0.4.3 R.methodsS3_1.7.1
[41] stringi_1.2.2 whisker_0.3-2
[43] yaml_2.1.19 MASS_7.3-50
[45] zlibbioc_1.26.0 plyr_1.8.4
[47] grid_3.5.0 blob_1.1.1
[49] lattice_0.20-35 splines_3.5.0
[51] annotate_1.58.0 knitr_1.20
[53] pillar_1.2.3 boot_1.3-20
[55] reshape2_1.4.3 XML_3.98-1.11
[57] glue_1.2.0 evaluate_0.10.1
[59] data.table_1.11.4 MatrixModels_0.4-1
[61] gtable_0.2.0 purrr_0.2.5
[63] assertthat_0.2.0 ggplot2_<IP_ADDRESS>00
[65] xtable_1.8-2 survival_2.42-3
[67] SingleCellExperiment_1.2.0 tibble_1.4.2
[69] AnnotationDbi_1.42.1 memoise_1.1.0
[71] bindrcpp_0.2.2 cluster_2.0.7-1
This reproducible R Markdown analysis was created with workflowr 1.0.1


{{partial "header.html" .}}
Hadoop is released as source code tarballs with corresponding binary tarballs for convenience. The downloads are distributed via mirror sites and should be checked for tampering using GPG or SHA-512.
| Version | Release date | Source download | Binary download | Release notes |
|---|---|---|---|---|
| {{.File.BaseFileName }} | {{dateFormat "2006 Jan 2 " .Date}} | source (checksum signature) |
binary
(checksum
signature)
{{ if .File.BaseFileName | replaceRE "^([0-9]+.[0-9]+).*" "$1" | float | le 3.3 }}
binary-aarch64 (checksum signature) {{ end }} |
Announcement |


Middendorp: The Trophy Belongs To Sundowns
by Soccer LadumaPrior to the Soweto Derby between Kaizer Chiefs and Orlando Pirates at the weekend, coach Ernst Middendorp, coach of log leaders Amakhosi, honoured reigning champions Mamelodi Sundowns in their absence.
Read: Rulani: If You Look At The Numbers
During a photo opportunity for the media Middendorp decided against posing with the Absa Premiership trophy at the Killarney Country Club and explained the reason behind his actions moments later to the press.
“I don’t know, I thought leave it and respect in a way that if you have it at the end of the season then you can touch it for the next 12 months. I am not superstitious at all, it is just to show a little bit of respect that this trophy currently belongs to Mamelodi Sundowns and that’s it. It’s just my opinion, if you ask me,” the coach said.
Chiefs went on to win the Soweto Derby 3-2 on Saturday afternoon, with Amakhosi opening a 10-point gap at the top of the standings, while Sundowns suffered defeat by the same scoreline to Golden Arrows a day later.
Read: Billiat On 'Great' Middendorp
Download The Soccer Laduma Social Media App & Earn Airtime for Selfies!


---
layout: post
title: Kindling
date: 2011-03-24 00:00:00
categories: interfaces-&-interaction mobile personal
---
Things I love about my Kindle:
- Its weaknesses feel like strengths. The web browser is rubbish. It's comforting to have one there for emergencies, but I've hardly ever used it;
- The cheapo leather case. It feels like one of the books my dad would use for display in his shop. The kindle is a well-loved, treasured item;
- No multitasking - yay! No multitasking means fewer distractions means more reading;
- One-click ordering, frictionless flow of financibits between my pocket and Mr Bezos;
- The unboxing experience was a glorious slap in the face to Cupertino: recycled cardboard instead of glossy white; welcoming me by name instead of inviting into the Cupertino fan-club;
- Synchronisation between devices: reading a few pages on my phone updates my place on the Kindle.
Things I hate about my Kindle:
- The bizarrely WIMPy UI, completely unsuited to using with cursor keys. Who cares about windows and cursors? Why not use the left/right paging metaphor here?
- 90% of my keyboard use is typing numbers, to go to specific pages. Numbers are the hardest thing to type (I have to pop up the symbol keyboard);
- Organising large numbers of books and documents is icky. Collections are a start but a year in, I'm going to hate this aspect of it;
- Why not more use of book recommendations? Feed me more books and I'll buy them, this thing is addictive;
It's strange how warm I feel towards this device, shocking and pleasing at the same time. After my mobile phone, it's the first thing I carry with me: it's cheap enough for me to worry less about damage or theft, and I don't feel like I'm showing off if I get it out on the train (as I do with iPad).


Holds the games scenes in a stack structure running the top scene every frame. Handles switching state for scenes and popping/pushing new scenes on top of one another. Allows the current scene to access other scenes.
More...
|
| | SceneStack () |
| | Initializes a new instance of the T:MB2D.Scenes.SceneStack class. More...
|
| |
| void | Push (Scene scene) |
| | Pushes a new scene to the top of the stack. Calls the new scenes Initialize method and the previous scenes Pause method More...
|
| |
|
void | Draw (SpriteBatch spriteBatch, SpriteBatch uiSpriteBatch) |
| |
| void | Update () |
| | Updates the scene at the top of the stack and handles any state transitions if they've been called. For any transitions or scene logic to function correctly this must be called once per frame. More...
|
| |
| void | Pop () |
| | Pops the top scene off the stack, calling its Exit method and calls the Resume method of the next scene on the stack if it exists. More...
|
| |
| void | ResetTo (Scene scene) |
| | Resets the scene stack to the specified scene, clearing all other scenes from the stack. Use this in most scenarios instead of Push to save memory by not keeping scenes allocated if unnecessary. More...
|
| |
| Scene | SceneAt (int index) |
| | Gets the scene located at the specific index in the stack More...
|
| |
Holds the games scenes in a stack structure running the top scene every frame. Handles switching state for scenes and popping/pushing new scenes on top of one another. Allows the current scene to access other scenes.
§ SceneStack()
| MB2D.Scenes.SceneStack.SceneStack |
( |
| ) |
|
|
inline |
Initializes a new instance of the T:MB2D.Scenes.SceneStack class.
§ Pop()
| void MB2D.Scenes.SceneStack.Pop |
( |
| ) |
|
|
inline |
Pops the top scene off the stack, calling its Exit method and calls the Resume method of the next scene on the stack if it exists.
§ Push()
| void MB2D.Scenes.SceneStack.Push |
( |
Scene |
scene | ) |
|
|
inline |
Pushes a new scene to the top of the stack. Calls the new scenes Initialize method and the previous scenes Pause method
- Parameters
-
§ ResetTo()
| void MB2D.Scenes.SceneStack.ResetTo |
( |
Scene |
scene | ) |
|
|
inline |
Resets the scene stack to the specified scene, clearing all other scenes from the stack. Use this in most scenarios instead of Push to save memory by not keeping scenes allocated if unnecessary.
- Parameters
-
§ SceneAt()
| Scene MB2D.Scenes.SceneStack.SceneAt |
( |
int |
index | ) |
|
|
inline |
Gets the scene located at the specific index in the stack
- Returns
- The T:MB2D.Scenes.Scene.
- Parameters
-
§ Update()
| void MB2D.Scenes.SceneStack.Update |
( |
| ) |
|
|
inline |
Updates the scene at the top of the stack and handles any state transitions if they've been called. For any transitions or scene logic to function correctly this must be called once per frame.
§ Bottom
| Scene MB2D.Scenes.SceneStack.Bottom |
|
get |
Gets the scene at the bottom of the stack.
The bottom scene.
§ LastIndex
| int MB2D.Scenes.SceneStack.LastIndex |
|
get |
Gets the upper bounds of the indexes of the stack
The last index.
§ Size
| int MB2D.Scenes.SceneStack.Size |
|
get |
Gets the current size of the stack
The size.
§ Top
| Scene MB2D.Scenes.SceneStack.Top |
|
get |
Gets the scene at the top of the stack.
The scene at the top of the stack.
The documentation for this class was generated from the following file:
- MB2D/src/Scene/SceneStack.cs


A number is a Jumping number if the adjacent digits inside the number differ by 1. The difference between 9 and 0 is not considered as 1. Single-digit numbers are considered Jumping numbers. For example, 78987, and 4343456 are Jumping numbers, but 796 and 89098 are not.
In this stage, we will also remove the limitation on pending properties in a request. The program knows how to calculate ten properties of numbers, and it would be strange to limit the query to just two properties. Let's remove this limitation. Let the program indicate all properties for all numbers in the request.
Your program should process the user requests. In this stage, your program should:
In the current stage, the property names include even
, odd
, buzz
, duck
, palindromic
, gapful
, spy
, square
, sunny
, and jumping
. The test won't check the order of properties, their indentation, and spaces. You may format numbers as you like.
Supported requests:
- enter a natural number to know its properties;
- enter two natural numbers to obtain the properties of the list:
* the first parameter represents a starting number;
* the second parameter shows how many consecutive numbers are to be printed;
- two natural numbers and properties to search for;
- separate the parameters with one space;
- enter 0 to exit.
The first parameter should be a natural number or zero.
The second parameter should be a natural number.
The property [SUN] is wrong.
Available properties: [EVEN, ODD, BUZZ, DUCK, PALINDROMIC, GAPFUL, SPY, SQUARE, SUNNY, JUMPING]
The properties [HOT, SUN] are wrong.
Available properties: [EVEN, ODD, BUZZ, DUCK, PALINDROMIC, GAPFUL, SPY, SQUARE, SUNNY, JUMPING]
The request contains mutually exclusive properties: [SQUARE, SUNNY]
There are no numbers with these properties.
The greater-than symbol followed by a space (>
) represents the user input. Note that it's not part of the input.
Example 1:
Welcome to Amazing Numbers!
Supported requests:
- enter a natural number to know its properties;
- enter two natural numbers to obtain the properties of the list:
* the first parameter represents a starting number;
* the second parameter shows how many consecutive numbers are to be processed;
- two natural numbers and properties to search for;
- separate the parameters with one space;
- enter 0 to exit.
Enter a request: ><PHONE_NUMBER>
Properties of 1,234,567,890
buzz: false
duck: true
palindromic: false
gapful: true
spy: false
square: false
sunny: false
jumping: false
even: true
odd: false
Enter a request: ><PHONE_NUMBER> 4
1,234,567,890 is duck, gapful, even
1,234,567,891 is odd
1,234,567,892 is even
1,234,567,893 is gapful, odd
Enter a request: ><PHONE_NUMBER> 4 jumping
1,234,567,898 is jumping, even
2,101,010,101 is duck, jumping, odd
2,101,010,121 is buzz, duck, gapful, jumping, odd
2,101,010,123 is duck, jumping, odd
Enter a request: > 5000 5 duck spy
The request contains mutually exclusive properties: [DUCK, SPY]
There are no numbers with these properties.
Enter a request: > 5000 5 duck jumping
10,101 is buzz, duck, palindromic, jumping, odd
10,121 is duck, jumping, odd
10,123 is duck, jumping, odd
12,101 is duck, jumping, odd
21,010 is duck, jumping, even
Enter a request: > 999 6 jumping odd palindromic
10,101 is buzz, duck, palindromic, jumping, odd
12,121 is palindromic, jumping, odd
12,321 is palindromic, square, jumping, odd
32,123 is buzz, palindromic, jumping, odd
32,323 is palindromic, jumping, odd
34,343 is palindromic, jumping, odd
Enter a request: 1 5 hot sunny
The property [HOT] is wrong.
Available properties: [BUZZ, DUCK, PALINDROMIC, GAPFUL, SPY, SQUARE, SUNNY, JUMPING, EVEN, ODD]
Enter a request: exit
The first parameter should be a natural number or zero.
Enter a request: 0
Goodbye!
Process finished with exit code 0