|
AEDA-T07G09
|
Inherited by Manager [private]
, and Programmer [private]
.
Public Member Functions | |
| User (string name, string birth, string email) | |
| Date | getBirth () const |
| string | getEmail () const |
| vector< Project * > | getProjects () const |
| string | getName () const |
| unsigned int | getRanking (string projectName) const |
| unsigned int | getRanking (string initialDate, string finalDate) const |
| void | operation () |
| virtual double | getSalary () |


Class Barcode
Barcode
- Passbook\Pass\Barcode implements Passbook\Pass\BarcodeInterface
Namespace: Passbook\Pass
Author: Eymen Gunay<EMAIL_ADDRESS>Located at Passbook/Pass/Barcode.php
Author: Eymen Gunay<EMAIL_ADDRESS>Located at Passbook/Pass/Barcode.php
public
|
|
public
|
|
public
string
|
|
public
|
|
public
string
|
|
public
|
|
public
string
|
|
public
|
|
public
string
|
protected
string
|
$format |
|
#
Barcode format. Must be one of the following values: PKBarcodeFormatQR, PKBarcodeFormatPDF417, PKBarcodeFormatAztec. |
protected
string
|
$message |
|
#
Message or payload to be displayed as a barcode. |
protected
string
|
$messageEncoding |
|
#
Message or payload to be displayed as a barcode. |
protected
string
|
$altText |
|
#
Text encoding that is used to convert the message from the string representation to a data representation to render the barcode. |


Searching for Duke alumni and staff
The University Archives at Duke contain many resources for finding family members who have attended or worked at Duke. Here are a few tips to start your search:
- To find past students, try looking at the digitized yearbooks (Chanticleer), the digitized student newspaper (The Duke Chronicle), and student groups' collections.
- To find past faculty, you could also start your search with Chanticleer and The Duke Chronicle, or just do a simple search for their names in the catalog and collection guides. You could also browse the different record groups in University Archives. "Record groups" are what they sound like--groups of records. Many different collections have been organized into larger groups so that it is easier to understand and navigate the archives as a whole. In the case of searching for faculty and staff, it may be helpful to browse Papers of Faculty, Staff, and Associates record group.
- To find family members who worked at Duke as laborers and non-faculty, you will probably have to perform a more thorough search of the archives, and you may not find anything at all. Sometimes Chanticleer included some pictures of these workers (with and without captions). As part of a few projects at Duke, researchers have tried to find the names of past workers by going through old account books. Visit the Stone by Stone website to view a list of workers who built the Duke Chapel.


In my recent transition, I’ve had to become even more intimate with Excel as a tool of my job. Previously I’ve used Excel
in crazy ways, as a data source for an ODBC connection or a pass thru between disconnected services, but now it’s
something to run the business on. That’s a knife that cuts both ways though.
The Current State
Excel is an extremely useful app and the learning curve on it is fairly low. Things you would typically do are easily
found via Google and most C-level folks have been mashing up formulas for a good hunk of time. I can safely say there
are some companies of significant size that are run off of Excel spreadsheets that are passed around via email
(don’t even get me started on the lack of Dropbox use). It works fairly well and, while seemingly creating only a small
amount of overhead, gets the job done. But there’s a big problem underlying this behavior.
The Problem
New people. Ok, so the new people aren’t the actual problem but they surface the start of the problem. When data is pulled from a
source system into Excel it can be sliced, diced, and manipulated until it says what you need it to but that’s it. It’s
done. And it was almost always manual. Rarely is the manipulation reproducible by anyone other than the person who just
did it because that would require the use of macros and VBScript and stuff that only developers really grok. Strike #1.
Manipulated data is dead in Excel, like those dead tree requirements docs we have all decided were a less
than ideal way to do things. You can’t pull new data into the existing spreadsheet and have it follow the transformation to add
to the output. No, instead you pull new data and start back at square one. Strike #2.
Did you want to use that data in some other system or feed it back into the one that it originally came from? No joy
here. The data cannot be consumed in as easy a fashion as it was put into Excel.
Maybe they’re able to string together a set of Excel sheets that refer to each other and use the data between them but
that’s a tangled and fragile web. And given the prior two issues, we know what sort of overhead maintaining that is
going to be when it comes time to update with new data. Strike #3.
Conclusions
I’m not against using Excel, heck, I do it on a pretty regular basis. I’m against it’s overuse; the crutch that it
becomes when folks just want a one off thing (until it isn’t), for just a few people (until there’s more), and won’t
need again (until they do). When you need something more, step up and move out of your comfort zone, find a tool that
supports what you need and isn’t a three strike offender.


--- layout: page title: About me ---
I like to code and I like the feeling of code lines coming out of my fingertips. I try to build the simplest and most usable solutions to make awesome.


Home
Contact
How it works
HammerPricer
Predicting auction prices for Abstract Expressionist art
Evaluate
Landscape With Dunes (1963)
Helen Frankenthaler
Deux Personnages (1969)
Karel Appel
http://www.wright20.com/auctions/2014/09/art-design/121


#include <system.h>
Public Attributes | |
| TPoint | where |
| ulong | eventFlags |
| ulong | controlKeyState |
| uchar | buttons |
This structure holds the data that characterizes a mouse event: button number, whether double-clicked, and the coordinates of the point where the click was detected.
Definition at line 114 of file system.h.
|
|
This variable reports the status of the mouse buttons when the event happened. It's a combination of the following constants:
Flag Value Meaning mbLeftButton 0x01 Set if left button was pressed mbRightButton 0x02 Set if right button was pressed These constants are useful when examining the buttons data member. For example:
if ((event.what == evMouseDown) && (event.buttons == mbLeftButton)) doLeftButtonDownAction(); Note: you can swap left and right buttons by setting variable TEventQueue::mouseReverse to True. See the `demo' program for more information. |
|
|
This bitmap variable stores the status of the control keys when the event happened. The following values define keyboard states, and can be used when examining the keyboard shift state:
Flag Value Meaning kbRightShift 0x0001 Set if the Right Shift key is currently down kbLeftShift 0x0002 Set if the Left Shift key is currently down kbCtrlShift 0x0004 Set if the Ctrl key is currently down kbAltShift 0x0008 Set if the Alt key is currently down kbScrollState 0x0010 Set if the keyboard is in the Scroll Lock state kbNumState 0x0020 Set if the keyboard is in the Num Lock state kbCapsState 0x0040 Set if the keyboard is in the Caps Lock state kbInsState 0x0080 Set if the keyboard is in the Ins Lock state Its value is 0 if none of these keys was pressed. Warning: this information is not reliable. Its value depends on your operating system and libraries (gpm, ncurses). Usually only a subset of these flags are detected. See file `system.cc' for details. |
|
|
Helps to specify the event. This bitmap variable is set to meDoubleClick if a double-click event happened. If the mouse is simply moved its value is meMouseMoved. Otherwise its value is 0.
Flag Value Meaning meMouseMoved 0x01 Set if mouse is moved meDoubleClick 0x02 Set if a button was double clicked |
|
|
This is the position where the event happened. |


Random thoughts about my first week as a developer at thoughtbot:
- I have much to learn about design patterns. The GoF book will be my close friend for a while.
- I know more about metaprogramming than I thought, I just needed the terminology.
- Pairing is an amazing way to transfer knowledge and should be done frequently. I learned a ton during and after because I took notes and then researched and practiced concepts new to me.
- thoughtbot invests a huge amount of time (and therefore money) improving the skills of its developers. It shows.
- osx is a fine desktop environment, but the amount of crap you need to wade through to set it up as a ruby development environment (as compared to debian / ubuntu) is kind of hilarious. That said, it's working fine now and it wasn't particularly hard, it just didn't feel "native" like it does on linux. I could take or leave osx, but it'd be hard to stop using a retina display - text is absolutely gorgeous.
- I don't know what I'd do without homebrew.
- thoughtbot dotfiles are great, and the vim set up was very similar to my own but with significant additional refinements. Use them.


In this game, students use their knowledge of ones, and tens to where players need to select either one or two numbers from the grid to complete the subtraction calculation. They strengthen their number sense as they apply their computation skills in subtraction to find missing addends.


STRATEGIES AND TACTICS TO ACCESS INTUITION: A LOOK AT THE MOMENT OF SOLUTION
by Linda E. Mormis Dissertation submitted to the Faculty of the Virginia Polytechnic Institute and State University
in partial fulfillment of the requirements for the degree of
DOCTOR OF EDUCATION
Adult Continuing Education
~_> approver. VV atic— Ie Hee u& alae —
Dr. Marcie Boucouvalas, Chairperson
Nl cha lefe < OC —
Dr. Neal E. Chalofsky . Dr. Hugo A. Keesing o/t Ke Quin Wie Dr. Ronald L. McKeen Dr. Orion F. White March 1, 1990
Blacksburg, Virginia


Are you sure you want to delete this item? This action can't be made undone!
Your personal movie database!


JavaScript is disabled on your browser.
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes
A
B
C
D
E
F
G
H
I
K
L
M
N
O
P
R
S
T
U
V
W
X
M
MachineGun
- Class in
spriteProperties
Created by davidyan on 4/9/16.
MachineGun()
- Constructor for class spriteProperties.
MachineGun
MachineGun(String)
- Constructor for class spriteProperties.
MachineGun
main
- package main
Main
- Class in
application
Main()
- Constructor for class application.
Main
main(String[])
- Static method in class application.
Main
main(String[])
- Static method in class authoringEnvironment.
SubclassEnumerator
main(String[])
- Static method in class exampledata.
xmlMaker
main(String[])
- Static method in class main.
MainVooga
MainAuthoringWindow
- Class in
authoringEnvironment
MainAuthoringWindow()
- Constructor for class authoringEnvironment.
MainAuthoringWindow
MainVooga
- Class in
main
MainVooga()
- Constructor for class main.
MainVooga
makeButton(String, EventHandler<? super MouseEvent>)
- Static method in class gameplayer.
ButtonFactory
makeDisplay(File)
- Method in class gameplayer.
GameEditingFileScreen
makeDisplay(File)
- Method in class gameplayer.
GameFileScreen
makeDisplay(File)
- Method in class gameplayer.
GamePlayingFileScreen
makeGoal(GoalProperties)
- Method in class gameElements.
GoalFactory
makeTextInputBox(Parameter, Field)
- Static method in class authoringEnvironment.settingsWindow.
VisualFactory
marshal(Object, HierarchicalStreamWriter, MarshallingContext)
- Method in class exampledata.XStreamHandlers.
AbstractPropertyConverter
marshal(Object, HierarchicalStreamWriter, MarshallingContext)
- Method in class exampledata.XStreamHandlers.
ViewSpriteConverter
Model
- Class in
authoringEnvironment
Model(String)
- Constructor for class authoringEnvironment.
Model
move(Sprite)
- Method in class gameElements.
MoveExpand
move(Sprite)
- Method in class gameElements.
MoveHorizontally
move(Sprite)
- Method in class gameElements.
Movement
move(Sprite)
- Method in class gameElements.
MoveTurn
move(Sprite)
- Method in class gameElements.
MoveVertically
MoveExpand
- Class in
gameElements
MoveExpand(Actor)
- Constructor for class gameElements.
MoveExpand
MoveHorizontally
- Class in
gameElements
MoveHorizontally(Actor)
- Constructor for class gameElements.
MoveHorizontally
Movement
- Class in
gameElements
Movement(Sprite)
- Constructor for class gameElements.
Movement
MoveTurn
- Class in
gameElements
MoveTurn(Actor)
- Constructor for class gameElements.
MoveTurn
MoveVertically
- Class in
gameElements
MoveVertically(Actor)
- Constructor for class gameElements.
MoveVertically
myAngleProperty()
- Method in class authoringEnvironment.
SpriteProperties
myHeightProperty()
- Method in class authoringEnvironment.
SpriteProperties
myNumBulletsProperty()
- Method in class spriteProperties.
WeaponProperty
myWidthProperty()
- Method in class authoringEnvironment.
SpriteProperties
myXProperty()
- Method in class authoringEnvironment.
SpriteProperties
myYProperty()
- Method in class authoringEnvironment.
SpriteProperties
A
B
C
D
E
F
G
H
I
K
L
M
N
O
P
R
S
T
U
V
W
X
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes


Frameworks are very powerful! but.. they come at a cost
How you use them and depend on them. That's what's important
Showing you how to unleash the power of not just 1 framework, but many!
How that benefits you, your team and your project
Power is defined by:
Vendor lock-in! (technical debt)
This means:
Limited technology stack
Limited team experience
Limited POWER!!!
Step 1: customer tells you what they want (kind of)
Step 2: you choose a framework/toolkit that suits that project
Step 3: you build it
Step 4: customer changes their mind on what they want
Step 5: the tool you chose in the beginning, is no longer the most relevant one
Step 6: you can't switch because you're locked into that vendor
Step 7: you stick with the tool because it's too difficult to switch to the correct tool
Existing frameworks force a 1-to-1 relationship between your app and the framework vendor.
You are tightly coupled to the framework that your app was built on.
You can't move your code between your Symfony apps and Laravel apps
You're not psychic! You cannot predict the future
but, you can prepare for it :-)
PPI will help you with this
PPI prepares you for change. It's DESIGNED for change.
Why?
Your app code belongs to you, not to your framework.
You're in charge!
Hmm... what does PPI stand for? Not much, but let's try!
It's not a framework
but, you can use it like a framework
Really, it's a framework delivery engine
It delivers core parts of frameworks to your app
Individually, to the modules of your app
An engine that you can boot() up.
This engine can be called as middleware from inside existing apps
i.e: wordpress, other framework apps
A command line app
A micro-framework
A full-stack framework to dispatch() HTTP requests
A friendly environment for swappable 3rd-party components.
Components may be PSR-ready or potential candidates (Router).
Spearhead PHP-FIG concepts and ideas with a real-life POC for these standards.
No added abstraction on top of existing framework.
We made a routing interoperability layer (Routing PSR?).
Mediate routing and request information from PPI to Aura (for example).
If a Routing PSR is created, we get to throw away a lot of code
21st century. Use composer:
Step 1:
$ composer create-project -sdev --no-interaction \
ppi/skeleton-app /var/www/skeleton
and for your convenience:
Step 2
$ vagrant up ppi-lamp
and now...
composer.json
"ppi/smarty-module": "dev-master",
"ppi/twig-module": "dev-master",
"ppi/mustache-module": "dev-master"
"ppi/datasource-module": "dev-master", // LaravelDB, Eloquent, Doctrine ..etc
"ppi/cache-module": "dev-master",
<?php
$app->loadConfig('config/app.php'); // Raw PHP
$app->loadConfig('config/app.yml'); // Symfony goodness
ZF-like configuration
app.php
<?php
$config = array();
$config['framework'] = array(
'templating' => array(
'engines' => array('php', 'smarty', 'twig'),
),
'skeleton_module' => array(
'path' => './utils/skeleton_module'
)
);
$config['datasource'] => array(
'connections' = require __DIR__ . '/datasource.php'
);
$config['modules'] = require __DIR__ . 'modules.php';
return $config;
Symfony-power!
app.yml
imports:
- { resource: datasource.yml }
- { resource: modules.yml }
framework:
templating:
engines: ["php", "smarty", "twig"]
skeleton_module:
path: "./utils/skeleton_module"
monolog:
handlers:
main:
type: stream
path: %app.logs_dir%/%app.environment%.log
level: debug
public/index.php
<?php
// Setup autoloading and include PPI
require_once 'app/init.php';
// Set the environment
$env = getenv('PPI_ENV') ?: 'dev';
$debug = getenv('PPI_DEBUG') !== '0' && $env !== 'prod';
// Create and configure the Application
$app = new PPI\Framework\App(array(
'environment' => $env,
'debug' => $debug,
'rootDir' => realpath(__DIR__.'/../app')
));
$app->loadConfig($app->getEnvironment().'/app.php');
// Handle requests
$app->run();
Application
|
├── Module.php
├── resources
│ ├── config
│ │ └── config.yml
│ ├── routes
│ │ ├── aura.php
│ │ └── symfony.yml
│ └── views
│ └── index
│ ├── index.html.mustache
│ ├── index.html.php
│ ├── index.html.smarty
│ └── index.html.twig
└── src
├── Classes
│ └── CommunityHelper.php
├── Controller
│ ├── Index.php
│ └── Shared.php
class Module extends AbstractModule implements ModuleInterface
{
public function getRoutes() {
return $this->getSymfonyRoutes();
// or
return $this->getAuraRoutes();
}
public function getAuraRoutes() {
return $this->loadAuraRoutes(__DIR__ . '/resources/routes/aura.php');
}
public function getSymfonyRoutes() {
return $this->loadYamlRoutes(__DIR__ . '/resources/routes/symfony.yml');
}
public function getConfig() {
return $this->loadConfig(__DIR__ . '/resources/config/config.yml');
}
PPI is ready for you to build projects in.
We're looking to launch 2.1.0, but we want your feedback first
PPI prepares you for change. It's DESIGNED for change.
Questions?


EMMA A film review by Steve Rhodes Copyright 1996 Steve Rhodes
RATING (0 TO ****): ***
EMMA is a delightful film about manners, marrying, letters, and gentility. It is the most inconsequential of all of the recent Jane Austin books to reach the big screen (PERSUASION and SENSE AND SENSIBILITY) or the little screen ("Pride and Prejudice"). I am not sure if its lightweight stems from the novel itself or the adaptation, but it is nevertheless a sweet little film and well worth seeing. For the record, my favorite Jane Austin movie remains PERSUASION which was also my favorite of all the 118 films I saw last year. Finally, I should note that last year's CLUELESS was a modernized and loose adaptation of "Emma."
Gwyneth Paltrow (THE PALLBEARER and SEVEN) plays Emma Woodhouse.  Most of her energies are devoted to her close friend Harriet Smith (played by Toni Collette from MURIEL'S WEDDING and THE PALLBEARER), but she helps others as well. As Miss Woodhouse explains to Mrs. Weston (Greta Scacchi from JEFFERSON IN PARIS and A MAN IN LOVE), "The most beautiful thing in the world is a match well made."
Miss Woodhouse has a close male friend, Mr. Knightley (played by Jeremy Northam from CARRINGTON and WUTHERING HEIGHTS), whom she sometimes refers to as her brother. He is troubled that she imposes her will on her friends, saying, "vanity working on a weak mind produces all kinds of mischief." He admonishes her, "better to be without sense than misapply it as you do." He feels he has a right to give her unsolicited advice since, "is it not a brother's job to find fault with his sister?"
A key aspect of the show is the reverence that is shown to letters. Upon receiving a letter, they pass them around with comments on everything from the words to the handwriting. When Miss Smith gets a letter proposing marriage she inquires of Miss Woodhouse, "Is it a good letter or too short?"
At the core of the show is the early nineteenth century obsession with excessive manners. When Rev. Elton (Alan Cumming) annoys Miss Woodhouse at a party by fawning over her wondering if she is too cold or too hot, she tells him without meaning it, "thank you for being so thoughtful." To which he retorts in a cloying sweet voice, "thank you for thinking I was being so thoughtful." It is amazing that the whole country did not die from a massive diabetic attach given the level of excessive sweetness in the land.
The pretense of affection is frequently used as a shield as when Miss Woodhouse decides to throw a party from Mrs. Elton (Juliet Stevenson). Miss Woodhouse declares, "I must throw a party otherwise everyone will see clearly how much I despise her." By the way, you may remember Juliet Stevenson. She was wonderful as Flora Matlock in the British TV show "The Politician's Wife" shown earlier this year on PBS.
The sets (Totty Whately) are sumptuous, and the cinematography (Ian Wilson) is warm and radiant. The gowns and the headbands (Ruth Myers) are elegant but so repetitive that the women look like they all go to some parochial school where gowns are the uniforms. A little more variety would have been welcome. The music (Rachel Portman) is dreamy, and the sound (Chris Munro) is full of happily chirping birds.
The acting is all pleasant enough, but there is no depth to any of it. Since other Austin novels have had more dramatically drawn characters, my guess is that director Douglas McGrath was trying to keep the show at an ethereal level. He also did the novel adaptation for the screen which I liked better than his directing. A thoroughly enjoyable show, but it could have been better.
I did have a problem with Toni Collete's performance. She was playing a ditzy woman, but she let her intelligence come through and made her characterization somewhat unbelievable. She was much more successful in MURIEL'S WEDDING, where she was brilliant.
EMMA runs a well paced 1:58. It was not yet rated when I saw it at the press screening, but my guess is that it will be rated PG. There is no nudity, violence, or bad language. There is not sex unless you want to count the three brief kisses at the end. It is a show that deserves a G rating, but I bet they put in a single bad word somewhere that I missed so they would avoid the less bankable G rating. The show would be fine for any kids old enough to be interested in a show about manners and marrying. My guess is that they would have to be 8 or 9 to be interested, but if you want your 2 year old to see it, there is nothing to offend. I recommend EMMA to you and give it ***.
**** = One of the top few films of this or any year. A must see film. *** = Excellent show. Look for it. ** = Average movie. Kind of enjoyable. * = Poor show.  Totally unbearable.
REVIEW WRITTEN ON: June 29, 1996
Opinions expressed are mine and not meant to reflect my employer's.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Airflow basics¶
What is Airflow?¶
Airflow is a Workflow engine which means:
Manage scheduling and running jobs and data pipelines
Ensures jobs are ordered correctly based on dependencies
Manage the allocation of scarce resources
Provides mechanisms for tracking the state of jobs and recovering from failure
It is highly versatile and can be used across many many domains:
Basic Airflow concepts¶
Task: a defined unit of work (these are called operators in Airflow)
Task instance: an individual run of a single task. Task instances also have an indicative state, which could be “running”, “success”, “failed”, “skipped”, “up for retry”, etc.
DAG: Directed acyclic graph, a set of tasks with explicit execution order, beginning, and end
DAG run: individual execution/run of a DAG
Debunking the DAG
The vertices and edges (the arrows linking the nodes) have an order and direction associated to them
each node in a DAG corresponds to a task, which in turn represents some sort of data processing. For example:
Node A could be the code for pulling data from an API, node B could be the code for anonymizing the data. Node B could be the code for checking that there are no duplicate records, and so on.
These ‘pipelines’ are acyclic since they need a point of completion.
Dependencies
Each of the vertices has a particular direction that shows the relationship between certain nodes. For example, we can only anonymize data once this has been pulled out from the API.
Idempotency¶
This is one of the most important characteristics of good ETL architectures.
When we say that something is idempotent it means it will produce the same result regardless of how many times this is run (i.e. the results are reproducible).
Reproducibility is particularly important in data-intensive environments as this ensures that the same inputs will always return the same outputs.
Airflow components¶
There are 4 main components to Apache Airflow:
Web server¶
The GUI. This is under the hood a Flask app where you can track the status of your jobs and read logs from a remote file store (e.g. Azure Blobstorage).
Scheduler¶
This component is responsible for scheduling jobs. This is a multithreaded Python process that uses the DAGb object to decide what tasks need to be run, when and where.
The task state is retrieved and updated from the database accordingly. The web server then uses these saved states to display job information.
Executor¶
The mechanism that gets the tasks done.
Metadata database¶
Powers how the other components interact
Stores the Airflow states
All processes read and write from here
Workflow as a code¶
One of the main advantages of using a workflow system like Airflow is that all is code, which makes your workflows maintainable, versionable, testable, and collaborative.
Thus your workflows become more explicit and maintainable (atomic tasks).
Not only your code is dynamic but also is your infrastructure.
Defining tasks¶
Tasks are defined based on the abstraction of Operators
(see Airflow docs here) which represent a single idempotent task.
The best practice is to have atomic operators (i.e. can stand on their own and do not need to share resources among them).
You can choose among;
BashOperator
PythonOperator
EmailOperator
SimpleHttpOperator
MySqlOperator
(and other DB)
Examples:
t1 = BashOperator(task_id='print_date',
bash_command='date,
dag=dag)
def print_context(ds, **kwargs):
pprint(kwargs)
print(ds)
return 'Whatever you return gets printed in the logs'
run_this = PythonOperator(
task_id='print_the_context',
provide_context=True,
python_callable=print_context,
dag=dag,
)
Comparing Luigi and Airflow¶
Luigi¶
Created at Spotify (named after the plumber)
Open sourced in late 2012
GNU make for data
Airflow¶
Airbnb data team
Open-sourced mud 2015
Apache incubator mid-2016
ETL pipelines
Similarities¶
Python open source projects for data pipelines
Integrate with a number of sources (databases, filesystems)
Tracking failure, retries, success
Ability to identify the dependencies and execution
Differences¶
Scheduler support: Airflow has built-in support using schedulers
Scalability: Airflow has had stability issues in the past
Web interfaces
| Airflow | Luigi |
| ———————————————— | —————————————————————————— |
| Task are defined bydag_id
defined by user name | Task are defined by task name and parameters |
| Task retries based on definitions | Decide if a task is done via input/output |
| Task code to the worker | Workers started by Python file where the tasks are defined |
| Centralized scheduler (Celery spins up workers) | Centralized scheduler in charge of deduplication sending tasks (Tornado based) |


Error
×
Error password or path to file!!!
Welcome back
Enter your password to continue
Create new keys file
Create keys file
×
Nickname:
Password:
Creating... Wait a minute!
×
Keys file was successfully created!!!
You can find it on your desktop.
Error
×
Incorect name or public key!!!
Error
×
This name already exists!!!
Error
×
Incorect Name!!!
IMOVI Encryption
Friends List
My public key
Encrypt
Decrypt
Friends List
Nickname
Public Key
Add Friend
Nickname
Delete Friend
Nickname
Public Key
×
Your public key copied to clipboard!!!
Your Public Key
Copy
Error
×
Encryption Error!!!
Encrypt Text
Message:
Public Key:
Encrypt
--- Your Ciphertext Here ---
Error
×
Decryption Error!!!
Decrypt Ciphertext
Ciphertext:
Decrypt
--- Your Message Here ---


Chapter 1 Data Manipulation using dplyr
Learning Objectives
- Select columns in a data frame with the
dplyr
functionselect
.- Select rows in a data frame according to filtering conditions with the
dplyr
functionfilter
.- Direct the output of one
dplyr
function to the input of another function with the ‘pipe’ operator%>%
.- Add new columns to a data frame that are functions of existing columns with
mutate
.- Understand the split-apply-combine concept for data analysis.
- Use
summarize
,group_by
, andcount
to split a data frame into groups of observations, apply a summary statistics for each group, and then combine the results.- Join two tables by a common variable.
Manipulation of data frames is a common task when you start exploring your data in R and dplyr
is a package for making tabular data manipulation easier.
Brief recap: Packages in R are sets of additional functions that let you do more stuff. Functions like
str()
ordata.frame()
, come built into R; packages give you access to more of them. Before you use a package for the first time you need to install it on your machine, and then you should import it in every subsequent R session when you need it.
If you haven’t, please install the tidyverse
package.
install.packages("tidyverse")
tidyverse
is an “umbrella-package” that installs a series of packages useful for data analysis which work together well. Some of them are considered core packages (among them tidyr
, dplyr
, ggplot2
), because you are likely to use them in almost every analysis. Other packages, like lubridate
(to work wiht dates) or haven
(for SPSS, Stata, and SAS data) that you are likely to use not for every analysis are also installed.
If you type the following command, it will load the core tidyverse
packages.
library("tidyverse") ## load the core tidyverse packages, incl. dplyr
If you need to use functions from tidyverse
packages other than the core packages, you will need to load them separately.
1.1 What is dplyr
?
dplyr
is one part of a larger tidyverse
that enables you to work
with data in tidy data formats. “Tidy datasets are easy to manipulate, model and visualise, and have a specific structure: each variable is a column, each observation is a row, and each type of observational unit is a table.” (From Wickham, H. (2014): Tidy Data https://www.jstatsoft.org/article/view/v059i10)
The package dplyr
provides convenient tools for the most common data manipulation
tasks. It is built to work directly with data frames, with many common tasks
optimized by being written in a compiled language (C++). An additional feature is the
ability to work directly with data stored in an external database. The benefits of
doing this are that the data can be managed natively in a relational database,
queries can be conducted on that database, and only the results of the query are
returned.
This addresses a common problem with R in that all operations are conducted in-memory and thus the amount of data you can work with is limited by available memory. The database connections essentially remove that limitation in that you can have a database of many 100s GB, conduct queries on it directly, and pull back into R only what you need for analysis.
To learn more about dplyr
after the workshop, you may want to check out the handy data transformation with dplyr
cheatsheet.
1.2 Subsetting columns and rows
Let’s begin with loading our sample data into a data frame.
We will be working a small subset of the data from the Stanford Open Policing Project. It contains information about traffic stops for blacks and whites in the state of Mississippi during January 2013 to mid-July of 2016.
<- read_csv("data/MS_trafficstops_bw_age.csv") stops
#> Parsed with column specification:
#> cols(
#> id = col_character(),
#> stop_date = col_date(format = ""),
#> county_name = col_character(),
#> county_fips = col_double(),
#> police_department = col_character(),
#> driver_gender = col_character(),
#> driver_birthdate = col_date(format = ""),
#> driver_race = col_character(),
#> officer_id = col_character(),
#> driver_age = col_double(),
#> violation = col_character()
#> )
stops
#> # A tibble: 211,211 x 11
#> id stop_date county_name county_fips police_departme… driver_gender
#> <chr> <date> <chr> <dbl> <chr> <chr>
#> 1 MS-2… 2013-01-01 Jones 28067 Mississippi Hig… male
#> 2 MS-2… 2013-01-01 Lauderdale 28075 Mississippi Hig… male
#> 3 MS-2… 2013-01-01 Pike 28113 Mississippi Hig… male
#> 4 MS-2… 2013-01-01 Hancock 28045 Mississippi Hig… male
#> 5 MS-2… 2013-01-01 Holmes 28051 Mississippi Hig… male
#> 6 MS-2… 2013-01-01 Jackson 28059 Mississippi Hig… female
#> 7 MS-2… 2013-01-01 Jackson 28059 Mississippi Hig… female
#> 8 MS-2… 2013-01-01 Grenada 28043 Mississippi Hig… female
#> 9 MS-2… 2013-01-01 Holmes 28051 Mississippi Hig… male
#> 10 MS-2… 2013-01-01 Holmes 28051 Mississippi Hig… male
#> # … with 211,201 more rows, and 5 more variables: driver_birthdate <date>,
#> # driver_race <chr>, officer_id <chr>, driver_age <dbl>, violation <chr>
You may have noticed that by using read_csv
we have generated an object
of class tbl_df
, also known as a “tibble.” Tibble’s data
structure is very similar to a data frame. For our purposes the only differences
are that
- columns of class
character
are never converted into factors1,
- columns of class
- it tries to recognize and
date
types
- it tries to recognize and
- the output displays the data type of each column under its name, and
- it only prints the first few rows of data and only as many columns as
fit on one screen. If we wanted to print all columns we can use the print command, and set the
width
parameter toInf
. To print the first 6 rows for example we would do this:print(my_tibble, n=6, width=Inf)
.
- it only prints the first few rows of data and only as many columns as
fit on one screen. If we wanted to print all columns we can use the print command, and set the
To select columns of a
data frame with dplyr
, use select()
. The first argument to this function is the data
frame (stops
), and the subsequent arguments are the columns to keep.
select(stops, police_department, officer_id, driver_race)
#> # A tibble: 211,211 x 3
#> police_department officer_id driver_race
#> <chr> <chr> <chr>
#> 1 Mississippi Highway Patrol J042 Black
#> 2 Mississippi Highway Patrol B026 Black
#> 3 Mississippi Highway Patrol M009 Black
#> 4 Mississippi Highway Patrol K035 White
#> 5 Mississippi Highway Patrol D028 White
#> 6 Mississippi Highway Patrol K023 White
#> 7 Mississippi Highway Patrol K032 White
#> 8 Mississippi Highway Patrol D021 White
#> 9 Mississippi Highway Patrol R021 White
#> 10 Mississippi Highway Patrol R021 White
#> # … with 211,201 more rows
It is worth knowing that dplyr
is backed by another package with a number of helper functions, which provide convenient functions to select columns based on their names. For example:
select(stops, starts_with("driver"))
#> # A tibble: 211,211 x 4
#> driver_gender driver_birthdate driver_race driver_age
#> <chr> <date> <chr> <dbl>
#> 1 male 1950-06-14 Black 63
#> 2 male 1967-04-06 Black 46
#> 3 male 1974-04-15 Black 39
#> 4 male 1981-03-23 White 32
#> 5 male 1992-08-03 White 20
#> 6 female 1960-05-02 White 53
#> 7 female 1953-03-16 White 60
#> 8 female 1993-06-14 White 20
#> 9 male 1947-12-11 White 65
#> 10 male 1984-07-14 White 28
#> # … with 211,201 more rows
Check out the tidyselect reference for more.
To subset rows based on specific criteria, we use filter()
:
filter(stops, county_name == "Yazoo")
#> # A tibble: 3,528 x 11
#> id stop_date county_name county_fips police_departme… driver_gender
#> <chr> <date> <chr> <dbl> <chr> <chr>
#> 1 MS-2… 2013-01-02 Yazoo 28163 Mississippi Hig… male
#> 2 MS-2… 2013-01-02 Yazoo 28163 Mississippi Hig… female
#> 3 MS-2… 2013-01-02 Yazoo 28163 Mississippi Hig… male
#> 4 MS-2… 2013-01-02 Yazoo 28163 Mississippi Hig… female
#> 5 MS-2… 2013-01-02 Yazoo 28163 Mississippi Hig… male
#> 6 MS-2… 2013-01-03 Yazoo 28163 Mississippi Hig… male
#> 7 MS-2… 2013-01-03 Yazoo 28163 Mississippi Hig… male
#> 8 MS-2… 2013-01-04 Yazoo 28163 Mississippi Hig… male
#> 9 MS-2… 2013-01-04 Yazoo 28163 Mississippi Hig… male
#> 10 MS-2… 2013-01-04 Yazoo 28163 Mississippi Hig… female
#> # … with 3,518 more rows, and 5 more variables: driver_birthdate <date>,
#> # driver_race <chr>, officer_id <chr>, driver_age <dbl>, violation <chr>
Here are some other ways to subset rows:
- by row number:
slice(stops, 1:3) # rows 1-3
- rows with highest or lowest values of a variable:
slice_min(stops, driver_age) # likewise slice_max()
- random rows:
slice_sample(stops, n = 5) # number of rows to select
slice_sample(stops, prop = .0001) # fraction of rows to select
To sort rows by variables use the arrange
function:
arrange(stops, county_name, stop_date)
#> # A tibble: 211,211 x 11
#> id stop_date county_name county_fips police_departme… driver_gender
#> <chr> <date> <chr> <dbl> <chr> <chr>
#> 1 MS-2… 2013-02-09 Adams 28001 Mississippi Hig… male
#> 2 MS-2… 2013-03-02 Adams 28001 Mississippi Hig… female
#> 3 MS-2… 2013-03-16 Adams 28001 Mississippi Hig… female
#> 4 MS-2… 2013-03-20 Adams 28001 Mississippi Hig… female
#> 5 MS-2… 2013-04-06 Adams 28001 Mississippi Hig… female
#> 6 MS-2… 2013-04-13 Adams 28001 Mississippi Hig… female
#> 7 MS-2… 2013-04-19 Adams 28001 Mississippi Hig… female
#> 8 MS-2… 2013-04-21 Adams 28001 Mississippi Hig… female
#> 9 MS-2… 2013-04-24 Adams 28001 Mississippi Hig… male
#> 10 MS-2… 2013-04-24 Adams 28001 Mississippi Hig… male
#> # … with 211,201 more rows, and 5 more variables: driver_birthdate <date>,
#> # driver_race <chr>, officer_id <chr>, driver_age <dbl>, violation <chr>
1.3 Pipes
What if you wanted to filter and select on the same data? For example, lets find drivers over 85 years and only keep the violation and gender columns. There are three ways to do this: use intermediate steps, nested functions, or pipes.
- Intermediate steps:
With intermediate steps, you essentially create a temporary data frame and use that as input to the next function. This can clutter up your workspace with lots of objects.
<- filter(stops, driver_age > 85)
tmp_df select(tmp_df, violation, driver_gender)
- Nested functions
You can also nest functions (i.e. placce one function inside of another). This is handy, but can be difficult to read if too many functions are nested as things are evaluated from the inside out.
select(filter(stops, driver_age > 85), violation, driver_gender)
- Pipes!
The last option, called “pipes.” Pipes let you take
the output of one function and send it directly to the next, which is useful
when you need to do many things to the same dataset. Pipes in R look like
%>%
and are made available via the magrittr
package, which is installed automatically with dplyr
. If you use RStudio, you can type the pipe with Ctrl
+ Shift + M if you have a PC or Cmd +
Shift + M if you have a Mac.
%>%
stops filter(driver_age > 85) %>%
select(violation, driver_gender)
In the above, we use the pipe to send the stops
data first through
filter()
to keep rows where driver_race
is Black, then through select()
to keep only the officer_id
and stop_date
columns. Since %>%
takes
the object on its left and passes it as the first argument to the function on
its right, we don’t need to explicitly include it as an argument to the
filter()
and select()
functions anymore.
If we wanted to create a new object with this smaller version of the data, we could do so by assigning it a new name:
<- stops %>%
senior_drivers filter(driver_age > 85) %>%
select(violation, driver_gender, driver_race)
senior_drivers
#> # A tibble: 3 x 3
#> violation driver_gender driver_race
#> <chr> <chr> <chr>
#> 1 Seat belt male White
#> 2 Speeding male White
#> 3 Seat belt male Black
Note that the final data frame is the leftmost part of this expression.
Challenge
Using pipes, subset the
stops
data to include stops in Tunica county only and retain the columnsstop_date
,driver_age
, andviolation
. Bonus: sort the table by driver age.
1.4 Add new columns
Frequently you’ll want to create new columns based on the values in existing columns or. For this we’ll use mutate()
. We can also reassign values to an existing column with that function.
Be aware that new and edited columns will not permanently be added to the existing data frame – unless we explicitly save the output.
So here is an example using the year()
function from the lubridate package to extract the year of the drivers’ birthdate:
library(lubridate)
%>%
stops mutate(birth_year = year(driver_birthdate))
We can keep adding columns like this:
%>%
stops mutate(birth_year = year(driver_birthdate),
birth_cohort = floor(birth_year/10)*10)
We are beginning to see the power of piping. Here is a slightly expanded example, where we select the column birth_cohort
that we have created and send it to plot:
%>%
stops mutate(birth_year = year(driver_birthdate),
birth_cohort = floor(birth_year/10)*10,
birth_cohort = factor(birth_cohort)) %>%
select(birth_cohort) %>%
plot()
Mutate can also be used in conjunction with logical conditions. For example, we could create a new column, where we assign everyone born after the year 2000 to a group “millenial” and overyone before to “pre-millenial.”
In order to do this we take advantage of the ifelse
function:
ifelse(a_logical_condition, if_true_return_this, if_false_return_this)
In conjunction with mutate, this works like this:
%>%
stops mutate(cohort = ifelse(year(driver_birthdate) < 2000, "pre-millenial", "millenial")) %>%
select(driver_birthdate, cohort)
#> # A tibble: 211,211 x 2
#> driver_birthdate cohort
#> <date> <chr>
#> 1 1950-06-14 pre-millenial
#> 2 1967-04-06 pre-millenial
#> 3 1974-04-15 pre-millenial
#> 4 1981-03-23 pre-millenial
#> 5 1992-08-03 pre-millenial
#> 6 1960-05-02 pre-millenial
#> 7 1953-03-16 pre-millenial
#> 8 1993-06-14 pre-millenial
#> 9 1947-12-11 pre-millenial
#> 10 1984-07-14 pre-millenial
#> # … with 211,201 more rows
More advanced conditional recoding can be done with case_when()
.
Challenge
Create a new data frame from the
stops
data that meets the following criteria: contains only theviolation
column for female drivers of age 50 that were stopped on a Sunday. For this add a new column to your data frame calledweekday_of_stop
containing the number of the weekday when the stop occurred. Use thewday()
function fromlubridate
(Sunday = 1).Think about how the commands should be ordered to produce this data frame!
1.5 What is split-apply-combine?
Many data analysis tasks can be approached using the split-apply-combine paradigm: split the data into groups, apply some analysis to each group, and then combine the results.
dplyr
makes this possible through the use of the group_by()
function.
group_by()
is often used together with summarize()
, which collapses each
group into a single-row summary of that group. group_by()
takes as arguments
the column names that contain the categorical variables for which you want
to calculate the summary statistics. So to view the mean age for black and white drivers:
%>%
stops group_by(driver_race) %>%
summarize(mean_age = mean(driver_age, na.rm=TRUE))
#> `summarise()` ungrouping output (override with `.groups` argument)
#> # A tibble: 3 x 2
#> driver_race mean_age
#> <chr> <dbl>
#> 1 Black 34.2
#> 2 White 36.2
#> 3 <NA> 34.5
If we wanted to remove the line with NA
we could insert a filter()
in the chain:
%>%
stops filter(!is.na(driver_race)) %>%
group_by(driver_race) %>%
summarize(mean_age = mean(driver_age, na.rm=TRUE))
#> `summarise()` ungrouping output (override with `.groups` argument)
#> # A tibble: 2 x 2
#> driver_race mean_age
#> <chr> <dbl>
#> 1 Black 34.2
#> 2 White 36.2
Recall that is.na()
is a function that determines whether something is an NA
. The !
symbol negates the result, so we’re asking for everything that is not an NA
.
You can also group by multiple columns:
%>%
stops filter(!is.na(driver_race)) %>%
group_by(county_name, driver_race) %>%
summarize(mean_age = mean(driver_age, na.rm=TRUE))
#> `summarise()` regrouping output by 'county_name' (override with `.groups` argument)
#> # A tibble: 163 x 3
#> # Groups: county_name [82]
#> county_name driver_race mean_age
#> <chr> <chr> <dbl>
#> 1 Adams Black 36.2
#> 2 Adams White 40.0
#> 3 Alcorn Black 34.6
#> 4 Alcorn White 33.6
#> 5 Amite Black 37.5
#> 6 Amite White 42.1
#> 7 Attala Black 36.4
#> 8 Attala White 38.6
#> 9 Benton Black 34.7
#> 10 Benton White 32.0
#> # … with 153 more rows
Once the data are grouped, you can also summarize multiple variables at the same time (and not necessarily on the same variable). For instance, we could add a column indicating the minimum age in each group (i.e. county):
%>%
stops filter(!is.na(driver_race)) %>%
group_by(county_name, driver_race) %>%
summarize(mean_age = mean(driver_age, na.rm=TRUE),
min_age = min(driver_age, na.rm=TRUE))
#> `summarise()` regrouping output by 'county_name' (override with `.groups` argument)
#> # A tibble: 163 x 4
#> # Groups: county_name [82]
#> county_name driver_race mean_age min_age
#> <chr> <chr> <dbl> <dbl>
#> 1 Adams Black 36.2 16
#> 2 Adams White 40.0 16
#> 3 Alcorn Black 34.6 17
#> 4 Alcorn White 33.6 15
#> 5 Amite Black 37.5 17
#> 6 Amite White 42.1 15
#> 7 Attala Black 36.4 8
#> 8 Attala White 38.6 15
#> 9 Benton Black 34.7 18
#> 10 Benton White 32.0 18
#> # … with 153 more rows
1.6 Tallying
When working with data, it is also common to want to know the number of
observations found for categorical variables. For this, dplyr
provides count()
. For example, if we wanted to see how many traffic stops each officer recorded:
%>%
stops count(officer_id)
Bu default, count will name the column with the counts n
. We can change this by explicitly providing a value for the name
argument:
%>%
stops count(officer_id, name = "n_stops")
We can optionally sort the results in descending order by adding sort=TRUE
:
%>%
stops count(officer_id, name = "n_stops", sort = TRUE)
count()
calls group_by()
transparently before counting the total number of records for each category. Similarly, we can count subgroups within groups:
%>%
stops count(officer_id, violation, name = "n_stops")
Alternatives:
%>%
stops group_by(officer_id) %>%
tally(sort = TRUE) # tally() requires group_by before counting
%>%
stops group_by(officer_id) %>%
summarize(n = n()) %>% # n() is useful when the count is needed within a calculation
arrange(desc(n))
Challenge
Which 5 counties were the ones with the most stops in 2013? Hint: use the year() function from lubridate.
1.7 Joining two tables
It is not uncommon that we have our data spread out in different tables and need to bring those together for analysis. In this example we will combine the numbers of stops for black and white drivers per county together with the numbers of the black and white total population for these counties. The population data are the estimated values of the 5 year average from the 2011-2015 American Community Survey (ACS):
<- read_csv("data/MS_acs2015_bw.csv") acs
#> Parsed with column specification:
#> cols(
#> County = col_character(),
#> FIPS = col_double(),
#> black_pop = col_double(),
#> white_pop = col_double(),
#> bw_pop = col_double()
#> )
acs
#> # A tibble: 82 x 5
#> County FIPS black_pop white_pop bw_pop
#> <chr> <dbl> <dbl> <dbl> <dbl>
#> 1 Jones 28067 19711 47154 66865
#> 2 Lauderdale 28075 33893 43482 77375
#> 3 Pike 28113 21028 18282 39310
#> 4 Hancock 28045 4172 39686 43858
#> 5 Holmes 28051 15498 3105 18603
#> 6 Jackson 28059 30704<PHONE_NUMBER>90
#> 7 Grenada 28043 9417 11991 21408
#> 8 Scott 28123 10562 16920 27482
#> 9 Wayne 28153 8015 12154 20169
#> 10 Bolivar 28011 21648 11197 32845
#> # … with 72 more rows
In a first step we count all the stops per county.
%>%
stops count(county_name, name = "n_stops")
#> # A tibble: 82 x 2
#> county_name n_stops
#> <chr> <int>
#> 1 Adams 942
#> 2 Alcorn 3345
#> 3 Amite 2921
#> 4 Attala 4203
#> 5 Benton 214
#> 6 Bolivar 4526
#> 7 Calhoun 1658
#> 8 Carroll 1788
#> 9 Chickasaw 3869
#> 10 Choctaw 613
#> # … with 72 more rows
We will then pipe this into our next operation where we bring the two tables together. We will use left_join
, which returns all rows from the left table, and all columns from the left and the right table. As ID, which uniquely identifies the corresponding records in each table we use the County names.
%>%
stops count(county_name, name = "n_stops") %>%
left_join(acs, by = c("county_name" = "County"))
#> # A tibble: 82 x 6
#> county_name n_stops FIPS black_pop white_pop bw_pop
#> <chr> <int> <dbl> <dbl> <dbl> <dbl>
#> 1 Adams 942 28001 17757 12856 30613
#> 2 Alcorn 3345 28003 4281 31563 35844
#> 3 Amite 2921 28005 5416 7395 12811
#> 4 Attala 4203 28007 8194 10649 18843
#> 5 Benton 214 28009 3078 5166 8244
#> 6 Bolivar 4526 28011 21648 11197 32845
#> 7 Calhoun 1658 28013 3991 10103 14094
#> 8 Carroll 1788 28015 3470 6702 10172
#> 9 Chickasaw 3869 28017 7549 9522 17071
#> 10 Choctaw 613 28019 2596 5661 8257
#> # … with 72 more rows
Now we can, for example calculate the stop rate, i.e. the number of stops per population in each county.
Challenge
Which county has the highest and which one the lowest stop rate? Use the snippet from above and pipe into the additional operations to do this.
dplyr
join functions are generally equivalent to merge
from the base command, but there are a few advantages:
- rows are kept in existing order
- it runs faster
- tells you what keys you’re merging by (if you don’t supply them)
- also works with database tables.
https://groups.google.com/d/msg/manipulatr/OuAPC4VyfIc/Qnt8mDfq0WwJ
See ?dplyr::join
for all the possible joins.
This is now also true for the base
read.csv
starting with R version 4.↩


Play hanging edge
Download "Hanging edge":
MP3
Ogg Vorbis
Sorry, your browser doesn't support HTML5 video.
Your browser does not support HTML5 canvas. Try using Chrome, Firefox, Safari or MS Edge.


Session 2
Girl Develop It is here to provide affordable and accessible programs to learn software through mentorship and hands-on instruction.
Some "rules":
Thank you to our wonderful TAs!
Course website:
Instructor contact info:
Your Content
+ HTML: Structure
+ CSS: Presentation
= Your Website
A website is a way to present your content to the world, using HTML to structure that content, and CSS to make it look good.
All colored text, positioning, sizes

This paragraph should have red text.

p {
color: red;
}
This paragraph should have red text.
Without CSS, your HTML pages would look boring ☺
selector {
property: values;
}
You can add multiple property-value pairs to a rule, each ending with a semicolon:
body {
color: lightblue;
background-color: black;
text-transform: uppercase;
}
Just like HTML, CSS ignores whitespace. All you need is for each rule to be in the correct format.
Best: ✔
p {
font-size: 22px;
text-align: center;
color: red;
}
Decent:
p{font-size:22px;text-align:center;color:red;}
Not-so-great:
p {
font-size:22px;
text-align : center;
color: red;
}
The base format of a rule is selector{property:value;}
It doesn't matter where whitespace goes, as long as the format is correct
3 ways
1. Inline

Some text.

2. Embedded

3. External

<link rel="stylesheet" href="css/styles.css" />

3. External
Now we can begin styling!
Enter the element's tag name to target those elements:
p {
color: aqua;
}
p { } in CSS corresponds to

 in HTML
The following selects all image elements:
img {
width: 600px;
}
img { } in CSS corresponds to  in HTML
The color property changes the color of the text.
p {
color: red;
color: #ff0000;
color: rgb(255, 0, 0);
color: rgba(255, 0, 0, 0.7);
}
Options:
There are 140 reserved color names, including: black, blue, aqua, fuchsia, grey, green, lime, maroon, navy, olive, purple, red, and teal
See a full list »
The background-color property changes the color of the background
body {
background-color: black;
background-color: #000000;
background-color: rgb(0, 0, 0);
background-color: rgba(0, 0, 0, 0.7);
}
To target elements that are descended from another element, use a selector for the ancestor, then a space, then a selector for the descendant:
HTML:

Buy one get one
free

Offer valid
today
only

CSS:
div strong {
background-color: yellow;
color: blue;
}
Result:
Offer valid today only
Let's get stylin'
The font-family property defines which font is used
body {
font-family: Helvetica;
font-family: "Helvetica Neue";
font-family: Arial;
font-family: sans-serif;
}
If a font name is more than one word, it goes in quotation marks (like "Helvetica Neue").
Preferred ✔: Use a prioritized list. The page will load whichever font it recognizes first in the list:
body {
font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
}
Helpful site: CSSFontStack.com »
The font-size property specifies the size of the font.
p {
font-size: 16px;
font-size: 1em;
font-size: 100%;
}
Options include:
The default  size is 16px
Usually 16px = 1em = 100%
px versus em versus %
Pixels are a fixed-size unit — they don't change relative to their ancestor's font size. Percentages and "em"s are scalable and relative to their ancestor's font size.
The font-style property sets italic styling for text
The font-weight property sets text boldness
h4 {
font-style: normal;
font-style: italic;
font-style: oblique;
font-weight: normal;
font-weight: bold;
}
Use font-variant to make small-caps text
h1 {
font-variant: normal;
font-variant: small-caps;
}
An Example of 'small-caps' Text
The line-height property specifies text line height
p {
font-size: 10px;
line-height: 20px;
line-height: 2em;
line-height: 2;
}
Use text-transform to make text lowercase, capitalized, or uppercase
h1 {
text-transform: lowercase;
text-transform: capitalize;
text-transform: uppercase;
}
an Example of 'lowercase' Text
an Example of 'capitalize' Text
an Example of 'uppercase' Text
The text-align property aligns text to the left, right, or center
p {
text-align: left;
text-align: right;
text-align: center;
}
Let's style some text elements with:
Enter a period (.)
followed directly by the class attribute's value
to target all elements with that class:
HTML:

Lorem ipsum

Dolor sit amet

CSS:
.warning {
color: red;
}
Result:
Lorem ipsum
Dolor sit amet
.red { } in CSS corresponds to <tagname class="red"></tagname> in HTML
Using Multiple Classes
Assign multiple classes to an element by separating each class with a space in the HTML:
HTML:

Cowabunga!

said Michaelangelo

CSS:
.green {
color: green;
}
.bordered {
border-width: 3px;
border-style: dashed;
border-color: fuchsia;
}
Result:
Cowabunga!
said Michaelangelo
Since the first

 element is targeted by both the .green and .bordered CSS rules, it is both green and bordered.
To target elements with a specific ID, use the hashtag (#), followed by the ID attribute's value:
HTML:

The One Featured Search Result's Title

A description of this search result

CSS:
#featured {
background-color: #F5E17F;
}
You can assign multiple classes to an element, but ...
ID should only apply to one element on the page
Why? IDs are unique
A Practical Example
Using Classes or IDs
The descendant and ancestor selectors don't have to be tag names; they can be classes, IDs, etc.
HTML:

We are an
amazing
team of developers

Located in
beautiful
Cambridge, MA

CSS:
#intro .fancy-text {
background-color: yellow;
color: blue;
font-style: italic;
}
Result:
To select an element with a specific class and tag name, use the tag name, followed by a period (.), then the class attribute's value:
HTML:

Lorem ipsum

Dolor sit amet
CSS:
span.red {
color: red;
}
Result:
Lorem ipsum
Dolor sit amet
Make sure there are no spaces in between your tag name, period, and class!
Why are these three rules so different?
.class div {
color: red;
}
div .class {
color: green;
}
div.class {
color: orange;
}
What does the cascading in Cascading Style Sheets mean?
Styles "cascade" down until changed
HTML:

Paragraph 1

Paragraph 2

Paragraph 3

CSS:
p{
color: blue;
font-family: Impact;
}
.red{
color: red;
}
#special{
font-family: Arial;
}
Result:
Paragraph 1
Paragraph 2
Paragraph 3
Coding Page Layouts — Beyond The Basics
We'll also start working on our project!
If you haven't already, try to use each of the properties and selectors discussed in the lecture today and save your HTML and CSS files.


--- sort_order: 226 tei_id: rdx_v6wj5.p.idm140456917781040 annotation_count: 0 images: small-thumbnail: https://readux.ecds.emory.edu/books/readux:v5mxs/pages/readux:v6wj5/mini-thumbnail/ json: https://readux.ecds.emory.edu/books/readux:v5mxs/pages/readux:v6wj5/info/ full: https://readux.ecds.emory.edu/books/readux:v5mxs/pages/readux:v6wj5/fs/ page: https://readux.ecds.emory.edu/books/readux:v5mxs/pages/readux:v6wj5/single-page/ thumbnail: https://readux.ecds.emory.edu/books/readux:v5mxs/pages/readux:v6wj5/thumbnail/ title: Page 222 number: 222 permalink: "/pages/222/" ---


for param_name in self.penalties:
self.penalties[param_name].value(self.int_params[param_name])
def get_penalty_gradients(self):
Get the gradients of the penalties.
float: the value of the penalty functions
pen = {param_name:
self.penalties[param_name].value(self.int_params[param_name])
for param_name in self.penalties}
return pen
def get_penalty_gradients(self):


--- layout: post title: "My Week in Review" date: 2019-03-17 17:50:00 +0000 image: https://s3.amazonaws.com/audreywatters/2019-03-17-shamrock.jpg imagecredits: https://www.flickr.com/photos/andywithcamera/5609477708 ---
I’m getting back into the swing of things – slowly. That April 1 deadline is looming.
HEWN, No. 309 via substack.com
I attended a virtual meeting about privacy, technology, and higher ed (and it was great to see so many faces of folks I miss dearly).
This past week: Nope. Upcoming week: Kin and I are planning a quick getaway, via ferry, next weekend. (I love living in Seattle.)
I’m watching the new season of Queer Eye as well as the new season of American Gods.
Icon credits: The Noun Project


Lab 2: Awk/Python Scripting
Lab Submission instructions
Checkout your subversion directory:
svn co https://phoenixforge.cs.uchicago.edu/svn/cnetid-cs162-win-15
and create a directory for Lab 1
cd cnetid-cs162-win-15
mkdir lab1
svn add lab1 # make it a working copy
cd lab1
touch README # README is now a working copy
svn add README
and then you can start working.
You get two 24-hour lab extensions this quarter, email me: [my last name] at
cs dot
uchicago dot
edu for them. Make sure that you run
svn commit -m "update"
frequently as you work on the lab so that you will definitely have a submission come the midnight deadline. Late submissions are not accepted: the time-stamp counts. The code should be able to run without fault on the lab computers.
The README file
This should contain your name, a list of files you are submitting, and at least a sentence or two about each file.
Additionally make sure to add comments to your code explaining each of the procedures you use.
Lab text
This weeks lab can be downloaded here. There are associated lab files here. You can decompress the lab2 files using tar -xzvf lab2Files.tgz
.


A place to find all the information about the events and highlights at a lightning-speed.
A host for all the fun games and activities.
A platform to connect with the professionals to gain those brownie points.
An announcer for all the marvelous events we organize!
A reservoir of endless inspirational stories and learning resources that become the guiding light for many.
A buddy who never fails to navigate, period.


#include <types.h>
acknowledge number
Definition at line 121 of file types.h.
checksum
Definition at line 124 of file types.h.
destination port number
Definition at line 119 of file types.h.
offset /flags
Definition at line 122 of file types.h.
sequence number
Definition at line 120 of file types.h.
source port number
Definition at line 118 of file types.h.
urgent pointer
Definition at line 125 of file types.h.
window
Definition at line 123 of file types.h.


|
Height: Weight: Are you allergic to pencillin? Are there any other pharmaceuticals that you are allergic to, or have experienced adverse from using? Do you have any other known allergy? (i.e. Pets, Pollen) Do you have renal dysfunction? Do you have, or have had in the past, any serious health problem or disease? (i.e. High Blood Pressure, Dibetics) Are you currently using any prescription drugs? Are you smoking? Other medical information that you think could be useful for the doctor? |
|
Treatment / Drug Name: Dose: Treatment / Drug Name: Disease: Physicial: Health Center: |


PIZZA IN
Deep-dish Pizza
Bagel pizza
Neopolitan pizza
Cheese Pizza
Magherita
Pepperonia
Macon BBQ Pizza
Meat Deluxe pizza
Chicken Hawaiian pizza


What it is
SQL Draw is a database modeling application, based on the Entity - Relationship Model, which is a high-level conceptual model used in database design. SQL Draw offers a range of tools so that users can create Entity - Relationship diagrams describing databases. Also, SQL Draw can convert an ER diagram to PostgreSQL code.
How to use
About
SQL Draw was developed by Irene Papadopoulou as a thesis project for the undergraduate degree of the Department of Electrical and Computer Engineering, University of Thessaly, Greece. For more info about the project you can contact me at<EMAIL_ADDRESS>Developed by: Irene Papadopoulou, eirini.p09@gmail.com


JSON Editor supports these popular CSS frameworks:
JSON Editor supports these popular icon libraries:


|
| def | __init__ (self, visual_observation, vector_observation, text_observations, memory=None, reward=None, agents=None, local_done=None, vector_action=None, text_action=None, max_reached=None, action_mask=None, custom_observations=None) |
| |
| def | merge (self, other) |
| |
◆ __init__()
| def envs.brain.BrainInfo.__init__ |
( |
|
self, |
|
|
|
visual_observation, |
|
|
|
vector_observation, |
|
|
|
text_observations, |
|
|
|
memory = None , |
|
|
|
reward = None , |
|
|
|
agents = None , |
|
|
|
local_done = None , |
|
|
|
vector_action = None , |
|
|
|
text_action = None , |
|
|
|
max_reached = None , |
|
|
|
action_mask = None , |
|
|
|
custom_observations = None |
|
) |
| |
Describes experience at current step of all agents linked to a brain.
◆ from_agent_proto()
| def envs.brain.BrainInfo.from_agent_proto |
( |
|
agent_info_list, |
|
|
|
brain_params |
|
) |
| |
|
static |
Converts list of agent infos to BrainInfo.
◆ merge()
| def envs.brain.BrainInfo.merge |
( |
|
self, |
|
|
|
other |
|
) |
| |
◆ merge_memories()
| def envs.brain.BrainInfo.merge_memories |
( |
|
m1, |
|
|
|
m2, |
|
|
|
agents1, |
|
|
|
agents2 |
|
) |
| |
|
static |
◆ process_pixels()
| def envs.brain.BrainInfo.process_pixels |
( |
|
image_bytes, |
|
|
|
gray_scale |
|
) |
| |
|
static |
Converts byte array observation image into numpy array, re-sizes it,
and optionally converts it to grey scale
:param gray_scale: Whether to convert the image to grayscale.
:param image_bytes: input byte array corresponding to image
:return: processed numpy array of observation from environment
◆ action_masks
| envs.brain.BrainInfo.action_masks |
◆ agents
| envs.brain.BrainInfo.agents |
◆ custom_observations
| envs.brain.BrainInfo.custom_observations |
◆ local_done
| envs.brain.BrainInfo.local_done |
◆ max_reached
| envs.brain.BrainInfo.max_reached |
◆ memories
| envs.brain.BrainInfo.memories |
◆ previous_text_actions
| envs.brain.BrainInfo.previous_text_actions |
◆ previous_vector_actions
| envs.brain.BrainInfo.previous_vector_actions |
◆ rewards
| envs.brain.BrainInfo.rewards |
◆ text_observations
| envs.brain.BrainInfo.text_observations |
◆ vector_observations
| envs.brain.BrainInfo.vector_observations |
◆ visual_observations
| envs.brain.BrainInfo.visual_observations |
The documentation for this class was generated from the following file:


Ocean [ay33], ocean, in The Inner Sea
Last updated Turn #82
Ocean [ay33], ocean, in The Inner Sea
------------------------------------------------------------------------
26: The Savvy Aardvark [ha5r], ship, 2 hulls, 1 rowing port, 6 sails,
26: 2% damaged, arrived from Ocean [ay32], owner:
26: Phantasm [n4b], Imperial Empire, duke, with eight sailors
26: Jupiter [m8j], Imperial Empire, accompanied by:
26: Odin [y5z], Imperial Empire
26: Zeus [y7k], Imperial Empire, the High Priest of the Church
26: of Kireus [156]
26: Hera [g3f], Imperial Empire
26: Thor [r4g], Imperial Empire
26: Apollo [b5e], Imperial Empire
26: Helios [p6i], Imperial Empire
26: Eos [a2t], Imperial Empire
26: Aryon [t6i], Imperial Empire
26: Lanthara [r4v], Imperial Empire
26: Licia [i1l], Imperial Empire
26: Thrix [n3v], Imperial Empire
26: Amanda [s7m], Imperial Empire
26: Klaus [u5x], Imperial Empire
27: The Savvy Aardvark [ha5r], ship, 2 hulls, 1 rowing port, 6 sails,
27: 2% damaged, departed for Ocean [ay34].
Routes leaving Ocean:
North, to Ocean [ax33], 6 days
East, to Ocean [ay34], 6 days
South, to Ocean [az33], 6 days
West, to Ocean [ay32], 6 days


| 858 | (A) | The kynge was payede & þe prynce if þe pepiłł walde |
| 863 | (C) | The kynge was plesed with þe prince . & þe pepułł alle |
| 849 | (D) | The kyng is payed as þe prince & þe peple wold |
| 826 | (E) | the kyng was payed witħ his wurdes . & his princes alle . |
| (Ex) | ---- no text ---- | |
| 879 | (L) | apaied as þe prince & þe peple wolde |
| (P) | ---- no text ---- | |
| 834 | (U) | The kyng is paid os his prince / and os his puple wolde |
| (V) | ---- no text ---- |


In this exercise, you'll add code to the so that you can actually watch the videos on the page.
Either start with your code from the jQuery workshop, or download the starter file.
In the body of your HTML, create a
 to hold the video player, either below or to the side of the list, and give it an id.
In the script tag that you were working in before, create a thumbnailify() function that takes a single argument.
Move the code that is currently inside your for loop into that thumbnailify() function.
Change the contents of your function so that it uses a single argument, which is a jQuery object that represents an , rather than an array of elements.
Move the for loop so that it occurs after you define thumbnailify()
Call thumbnailify() from inside your for loop.
Make sure your player first works like it did before. Hint: you should only reference an array index from inside of the for loop.
Now, in the thumbnailify() function, add a click listener
to the link. We recommend using a named function for the callback (not an anonymous function). Put a console.log inside the callback to make sure it works.
In the click listener callback, you will be using the "create and store, manipulate, inject" pattern to display an embedded video in the DIV you created.
To find out what the code for an embedded Youtube video looks like, go to Youtube.com and find any embed code
for a video.
You can use youtube.generateEmbedUrl() from the youtube.js library to generate an embed URL.
Use string concatenation, .html(), or other jQuery method of your choice to assemble and insert the embedded video element.
Check your work! Try all your video links. Is there anything you need to change?
As a bonus, try to make the video watcher
 fade in using jQuery.
Make sure that you use your browser developer tools to make debugging easier
while working on this. Check for errors, and use console.log() to figure out
how far your code makes it, and what the values of your variables are along the way.
<!doctype html>

<meta charset="utf-8">
<title>Video Watcher</title>
<link rel="stylesheet" type="text/css" href="http://www.teaching-materials.org/common/bootstrap.css">

Best Videos Ever ❤

Trip through the 80s

Otters Holding Hands

The Ooooh Cat


Class: Aws::Waiters::Waiter
| Relationships & Source Files | |
| Inherits: | Object |
| Defined in: | aws-sdk-core/lib/aws-sdk-core/waiters/waiter.rb |
Instance Attribute Summary
- #delay ⇒ Float (also: #interval) rw
-
#interval
rw
Alias for #delay.
- #max_attempts ⇒ Integer rw
Instance Method Summary
-
#before_attempt {|attempts| ... }
Register a callback that is invoked before every polling attempt.
-
#before_wait {|attempts, response| ... }
Register a callback that is invoked after an attempt but before sleeping.
- #wait(options)
Instance Attribute Details
#delay ⇒ Float
(rw)
Also known as: #interval
[ GitHub ]
24
# File 'aws-sdk-core/lib/aws-sdk-core/waiters/waiter.rb', line 24
attr_accessor :delay
#interval (rw)
Alias for #delay.
26
# File 'aws-sdk-core/lib/aws-sdk-core/waiters/waiter.rb', line 26
alias interval delay
#max_attempts ⇒ Integer
(rw)
[ GitHub ]
21
# File 'aws-sdk-core/lib/aws-sdk-core/waiters/waiter.rb', line 21
attr_accessor :max_attempts
Instance Method Details
#before_attempt {|attempts| ... }
Register a callback that is invoked before every polling attempt. Yields the number of attempts made so far.
waiter.before_attempt do |attempts|
puts "#{attempts} made, about to make attempt #{attempts + 1}"
end
Throwing :success
or :failure
from the given block will stop
the waiter and return or raise. You can pass a custom message to the
throw:
# raises Aws::Waiters::Errors::WaiterFailed
waiter.before_attempt do |attempts|
throw :failure, 'custom-error-message'
end
# cause the waiter to stop polling and return
waiter.before_attempt do |attempts|
throw :success
end
51 52 53
# File 'aws-sdk-core/lib/aws-sdk-core/waiters/waiter.rb', line 51
def before_attempt(&block) @before_attempt << Proc.new end
#before_wait {|attempts, response| ... }
Register a callback that is invoked after an attempt but before sleeping. Yields the number of attempts made and the previous response.
waiter.before_wait do |attempts, response|
puts "#{attempts} made"
puts response.error.inspect
puts response.data.inspect
end
Throwing :success
or :failure
from the given block will stop
the waiter and return or raise. You can pass a custom message to the
throw:
# raises Aws::Waiters::Errors::WaiterFailed
waiter.before_attempt do |attempts|
throw :failure, 'custom-error-message'
end
# cause the waiter to stop polling and return
waiter.before_attempt do |attempts|
throw :success
end
82 83 84
# File 'aws-sdk-core/lib/aws-sdk-core/waiters/waiter.rb', line 82
def before_wait(&block) @before_wait << Proc.new end
#wait(options)
88 89 90 91 92 93 94 95
# File 'aws-sdk-core/lib/aws-sdk-core/waiters/waiter.rb', line 88
def wait() catch(:success) do failure_msg = catch(:failure) do return poll() end raise Errors::WaiterFailed.new(failure_msg || 'waiter failed') end || true end


Select a geometry type
point
multipoint
line
polyline
freehand polyline
polygon
extent
freehand polygon
rectangle
triangle
ellipse
circle
arrow
down arrow
left arrow
right arrow
up arrow
Clear
SQL
SRID
Same as map (3857 / 102100)
WA State Plane South (2927)
Add
Fork me on GitHub


NoSQL Databases
My topic today is NoSQL databases.
First off, I need to warn you. I am no specialist and the explanations below reflect my current understanding of noSQL database and its environment. By no means, this should be used as a reference.
NoSQL databases provides a way to store and retrieve data which cannot be kept into a tabular relations used in relational databases.
NoSQL systems are also sometimes called "Not only SQL" because they may support SQL-like query languages. At first, they were called "non SQL" or "non relational” databases.
It has been around for quite sometimes but it is with the coming of Big Data and real-time applications that there popularity and use became quite important. The structure of NoSQL databases is more adapted to the need of Big Data and real time apps because the data can no longer reside onto one computer but is distributed amongst several machines interconnected (referred as clusters of machines).
It is said that NoSQL database design is simpler and permits finer control over availability of machines. therefore, it does favor availability of machines, continuance of process even if there is a communication errors between machines, and speed over consistency. Consistency means that the data created is valid in a sense that it follows all the rules within the database. Instead, most NoSQL databases offer a concept of "eventual consistency" in which database changes are propagated to all machines "eventually" (typically within milliseconds) so queries for data might not return updated data immediately or might result in reading data that is not accurate.
From Wikipedia, I got this regarding types of NoSQL databases:
“There have been various approaches to classify NoSQL databases, each with different categories and subcategories, some of which overlap. A basic classification based on data model, with examples:
- Column: Accumulo, Cassandra, Druid, HBase, Vertica
- Document: Apache CouchDB, Clusterpoint, Couchbase, DocumentDB, HyperDex, Lotus Notes, MarkLogic, MongoDB, OrientDB, Qizx, RethinkDB
- Key-value: Aerospike, CouchDB, Dynamo, FairCom c-treeACE, FoundationDB, HyperDex, MemcacheDB, MUMPS, Oracle NoSQL Database, OrientDB, Redis, Riak
- Graph: Allegro, InfiniteGraph, MarkLogic, Neo4J, OrientDB, Virtuoso, Stardog
- Multi-model: Alchemy Database, ArangoDB, CortexDB, FoundationDB, MarkLogic, OrientDB”
Again from Wikipedia:
Most “…NoSQL databases lack ability to joins in queries There are three main techniques for handling relational data in a NoSQL database.
- Multiple queries
- Caching/replication/non-normalized data
- Nesting data
Instead of retrieving all the data with one query, it's common to do several queries to get the desired data. NoSQL queries are often faster than traditional SQL queries so the cost of having to do additional queries may be acceptable. If an excessive number of queries would be necessary, one of the other two approaches is more appropriate.
Instead of only storing foreign keys, it's common to store actual foreign values along with the model's data. For example, each blog comment might include the username in addition to a user id, thus providing easy access to the username without requiring another lookup. When a username changes however, this will now need to be changed in many places in the database. Thus this approach works better when reads are much more common than writes.
With document databases like MongoDB it's common to put more data in a smaller number of collections. For example, in a blogging application, one might choose to store comments within the blog post document so that with a single retrieval one gets all the comments. Thus in this approach a single document contains all the data you need for a specific task.”
I personally realize that noSQL databases are very important and, considering our data centric world, is here to stay. Will there be evolution of it? I am sure,….. but for now, it seems to be doing what it should.
That’s it for today!


Memfis
Mutual Fund
Maintain Exclusive Fund
Copy
Fund Selection
*Fund:
...
*Applicable To:
Specific MF Account
Specific Customer Category
All Customers
Account Selection
MF Accounts
MF Account:
...
Add To List
MF Account Lists
MF Account
1111111111
1111111111
1111111111
Remove
Service Provider Selection
Service Provider
Service Provider:
-Select-
Service Provider Name:
Tax ID:
Expense Ratio %:
Add To List
List Service Provider
Service Provider
Service Provider Name
Tax ID
Expense Ratio %
Remove


Do Exciting Research and
Get Paid for It
(Payment is in the form of credit toward the
purchase of CDs)
Most of you know about the project to put
Did you know that there is a way that you
can get your own
Join the team of volunteers who research
selected records on CDs and extract and type valuable information for
themselves and other researchers. Here
is an example: Identify a year in
The results of your research are sent to me
by e-mail where they are added to the website and collected to produce a CD of
obituaries.
In addition to receiving your free CD, you can
also be paid for your work. You can
receive credit at a rate of $.50 per obituary toward the purchase of additional
CDs of your choosing. This is
particularly attractive to serious researchers who want to collect several of
these valuable
[Note:
An earlier option in which participants could elect to be paid in cash
at the rate of $.25 per obituary is no longer available.]
If you are interested in exploring this
opportunity further, please e-mail me at<EMAIL_ADDRESS>I will send you additional information on
this exciting program.
The number of positions for this exciting
research may be limited. So, don t
wait. E-mail today!
R.E. Harrington,
Webmaster
Click here for the Short-Cut Table of Contents


‘Mike Bloomberg’ crashes debate stage in ‘SNL’ sketch
by Mark MooreMichael Bloomberg — portrayed by former cast member Fred Armisen — crashed the Democratic presidential debate while sipping on a Big Gulp during a sketch on “Saturday Night Live.”
As each of the Democratic candidates were making their case during the presidential campaign parody, Bloomberg suddenly appeared on stage following Will Ferrell as billionaire Tom Steyer.
“Did somebody say billionaire?” Armisen’s Bloomberg asked.
MSNBC host Rachel Maddow, played by Melissa Villasenor, asked how he got into the debate.
“I tipped the doorman $30 million,” Bloomberg said.
Maddow then asked if that meant he was officially entering the race.
“I don’t know. Maybe. Maybe not. I’d be hard to beat,” said Armisen, who returned to the role he played when Bloomberg was mayor.
“I’d love to see those Trump supporters come up with a conspiracy theory about a Jewish billionaire with his own media company. Good luck making that stick!”
He made another cameo appearance later in the skit – this time holding two Big Gulps.
“Is there time for me to come in late and ruin everything,” he said about 12 hours before the former mayor officially entered the 2020 presidential race.
Told the candidates must begin making their closing statements, Bloomberg said he had to “throw in some Spanish.”
“Miguel Bloomberg is en fuego,” he said.


---
sort_order: 86
tei_id: rdx_b5j2m.p.idp142856656
annotation_count: 0
images:
small-thumbnail: http://readux.library.emory.edu/books/emory:b5j2m/pages/emory:p768w/mini-thumbnail/
json: http://readux.library.emory.edu/books/emory:b5j2m/pages/emory:p768w/info/
full: http://readux.library.emory.edu/books/emory:b5j2m/pages/emory:p768w/fs/
page: http://readux.library.emory.edu/books/emory:b5j2m/pages/emory:p768w/single-page/
thumbnail: http://readux.library.emory.edu/books/emory:b5j2m/pages/emory:p768w/thumbnail/
title: Page 86
number: 86
---
{% raw %}82 MRS. H. BEECHER STOWE's " UNCLE TOM."{% endraw %}
{% raw %}no man can live long anywhere without feeling some{% endraw %}
{% raw %}attachment to the soil on which he labours.{% endraw %}
{% raw %}It was about the middle of September, and by nine{% endraw %}
{% raw %}o'clock all was ready. It was a dark, moonless night,{% endraw %}
{% raw %}when we got into the little skiff, in which I had{% endraw %}
{% raw %}induced a fellow-slave to set us across the river. It{% endraw %}
{% raw %}was an anxious moment. We sat still as death. In{% endraw %}
{% raw %}the middle of the stream the good fellow said to me,{% endraw %}
{% raw %}" It will be the end of me if this is ever found out;{% endraw %}
{% raw %}but you won't be brought back alive, Sie, will you?"{% endraw %}
{% raw %}"Not if I can help it," I replied ; and I thought of{% endraw %}
{% raw %}the pistols and knife I had bought some time before{% endraw %}
{% raw %}of a poor white. "And if they're too many for you,{% endraw %}
{% raw %}and you get seized, you'll never tell my part in this{% endraw %}
{% raw %}business ? " " Not if I'm shot through like a sieve."{% endraw %}
{% raw %}" That's all," said he, " and God help you." Heaven{% endraw %}
{% raw %}reward him. He, too, has since followed in my steps;.{% endraw %}
{% raw %}and many a time in a land of freedom have we talked{% endraw %}
{% raw %}over that dark night on the river.{% endraw %}
{% raw %}In due time we landed on the Indiana shore. A{% endraw %}
{% raw %}hearty, grateful farewell was spoken, such as none{% endraw %}
{% raw %}but companions in danger can utter, and I heard the{% endraw %}
{% raw %}oars of the skiff propelling him home. There I{% endraw %}
{% raw %}stood in the darkness, my dear ones with me, and{% endraw %}
{% raw %}the dim unknown future before us. But there was{% endraw %}
{% raw %}little time for reflection. Before daylight should{% endraw %}
{% raw %}come on, we must put as many miles behind us as{% endraw %}
{% raw %}possible, and be safely hidden in the woods. We{% endraw %}
{% raw %}had no friends to look to for assistance, for the{% endraw %}
{% raw %}population in that section of the country was then{% endraw %}
{% raw %}bitterly hostile to the fugitive. If discovered, we{% endraw %}
{% raw %}should be seized and lodged in jail. In God was our{% endraw %}


Start Mounting Point Attachment Process
In the following steps, you will attach a mounting point to the distal end of the socket.
Select Area
Using the selection tool that is now active, mark the region on the bottom of the socket
where the mounting point should be attached. Press "Accept" to import the mounting point.
Position Mounting Point
If the mounting point is positioned correctly relative to the socket, continue to the next step. Otherwise, use the arrows
to move the mounting point to an appropriate position. Make sure the distal end of the socket does not overlap through the mounting point.
Position Cutting Plane
In this step, you will cut away part of the outer shell of the socket, which will allow the socket and mounting point to be automatically connected to each other.
If the plane position is appropriate, continue to the next step. Otherwise, use the arrows to position it before continuing.


Today's Random Meal
Home
About the Team
Recipe-Box
Your random recipe is:
Ingredients:
Instructions:


title = "Download | Mac OS" url = "/download/osx" layout = "download" description = "Mac OS download page" is_hidden = 0 == == {% put downloads %}
{% endput %} {% put mono_downloads %} {% endput %} {% put instructions %}You can also get it with Homebrew.
brew cask install godot


{% extends 'base.html' %} {% block title %}About{% endblock title %} {% block main_content %}
The QSIC is a curated improv cooperative, constantly seeking to add the best indie improv teams and performers in NYC to its show lineups.
The Queen's Secret Improv Club is an improv comedy collective, comprised of invited indie teams and QSIC auditioned House teams. Performing regularly in the burgeoning comedy capital of Queens known as Long Island City, the QSIC's mission is to collect and exhibit only the finest specimens in the genus of live, spontaneous comedy. The QSIC offers club memberships to theater-goers in lieu of individually ticketed shows. Members of The Club enjoy free admission to shows, as well as access to drink specials.
To reach Frank Angelini (Artistic Director), please email<EMAIL_ADDRESS>To reach Lauren Brickman (Executive Administrator) Athos Cakiades (Special Projects and Development), or Paul Logston (Website Administrator), please email<EMAIL_ADDRESS>To book shows online, please click here.


src.plotting.process.
correlation
Function to plot stock price correlation b/w two stocks
stock1 (stock) – First stock
stock2 (stock) – Second stock
value (str) – Stock Price to use “Open”/”High”/”Low”/”Close”
None
time_series
Plot stock price time series
stock (stock) – Stock to plot
value (type) – Stock price to use “Open”/”High”/”Low”/”Close”
src.plot package
src.read_data package


For everyone who is familiar with Machine Learning, k-means must be one of his first several algorithms that have learned. However, do you know k-means actually is just a special case of EM Algorithm? So, in this post, let me talk about EM algorithm and how it relates to k-means clustering.
1. EM Algorithm
EM algorithm is an efficient iterative procedure to compute the Maximum Likelihood Estimate in the process of missing or hidden data.
Normally, EM algorithm is used to solve the Finite Mixture Model parameter estimation problems. A finite mixture model is a distribution with density of the form: $$\pi(x) = \sum_{k=1}^{K}c_{k}p(x|\theta_{k})$$ where $c_k$ represents the relative cluster proportion, $\sum_{k=1}^{K}c_{k}=1$; $\theta_k$ is the model parameter in the $k^{th}$ cluster.
Since it is a parametric problem, we naturally think to use MLE to obtain the parameter $c_k$ and $\theta_k$. However, easily can be shown that it is analytically infeasible (And also MLE will not tell us which cluster generates the data).
Then it comes EM algorithm.
1.1 Overview
After knowing why we need EM algorithm, let us again explicit our goal: Estimate $c_k$ and $\theta_k$ without using MLE directly, at the same time knowing which cluster each data belongs to.
We solve this question by tactfully create a latent variable called (hard) assignment variable $M_{i}$. Basically, $M_{i}$ is like a one-hot encoding label that labels 1 if the data belongs to that cluster, 0 otherwise. If we know this variable, our problem can then be easily solved:
- calculate $c_k = \frac{\# \ data \ in \ C_k}{n}$ since we know which cluster the data belongs to
- Use MLE to calculate $\theta_k$ in each cluster. For example, we will calculate $\mu_k$ and $\Sigma_k$ by using MLE if the cluster belongs to Gaussian Distribution.
Ok, now we know our ultimate goal: estimating the assignment variable.
1.2 Model Structure
There are two steps within EM algorithm. Basically, we assign the data point to the cluster that has a highest density value; and then re-calculate the parameter in each cluster.
E-step:
Based on what we now know about $c_k$ and $\theta_k$ (need to be initialized), calculate the likelihood of this data belongs to each cluster:
$$\begin{align*}
a_{ik} &= P(M_{i} = k|x_i) = \frac{p(M_i = k, x_i)}{p(x_i)} \\ &= \frac{p(x_i|M_i = k)p(M_i=k)}{p(x_i)} \\ &= \frac{p(x_i|\theta_k)c_k}{\sum_{l=1}^{K}p(x|\theta_{l})c_{l}}
\end{align*}$$
We call $a_i$ soft assignment variable, since it give us the probability of the data belongs to each cluster. and:
$$m_i := \arg \max_k a_{ik}$$
In a word, we calculate the posterior probability of the data belongs to each cluster in E-step.
M-step:
After re-assign the data point, we then perform MLE to re-estimate $c_k$ and $\theta_k$, where $$c_k = \frac{\sum_{i=1}^{n}a_{ik}}{n}$$ and then use soft assignment to calculate $\theta_k$ (weighted mean and covariance)
These two steps are iterated repeatedly, until the likelihood or some parameter not even change. The convergence is assured since the algorithm is guaranteed to increase the likelihood at each iteration.
1.3 Some Notice
- EM algorithm can only find the local maximum, so we should restart EM with different initial values.
- We could calculate log-likelihood $\sum_i log \pi(x_i|c,\theta)$ to compare the goodness of two EM algorithms' output
2. K-means Clustering
2.1 Relation between EM and K-means
Then let us talk about k-means. How it relates to EM algorithm?
First let me make an assumption: suppose each cluster belongs to Gaussian density with the unit covariance: $p(x|\mu_k,I)$.
For E-step
Remember, k-means tries to minimize the total within cluster's variance: $$\sum_{k=1}^{K}\sum_{i \in C_k}(x_i-\mu_k)^2$$ which means, at each iteration, it tries to assign the data to the nearest centroid's cluster.
By comparison, EM assigns $x_i$ to the cluster that has the highest density value. Since the Gaussians have identical covariance (spherical), then the density $P(x_i|\mu_k,I)$ is largest for the mean $\mu_k$ which is closest to $x_i$ in Euclidean distance. So, in E-step, they are identical.
For M-step
It is very clear these two methods are also identical. They both use MLE to calculate:
$$\hat{\mu_k} = \frac{1}{|i \in C_k|}\sum_{i \in C_k}x_i$$
So, now we could say that k-means is a special case of EM algorithm if we make some assumptions. But how these assumptions influence k-means?
2.2 Assumptions for K-means
K-means do make some very strong assumptions to simplify the EM algorithm. Here are the assumptions:
- All variables have the same variance
- The prior probability for all k clusters are the same (each cluster has roughly equal number of observations)
- The variance of the distribution of each variable is spherical (proportionate to the identity)
Thus, there is no doubt that these assumptions can be easily violated. (Notice to scale the data before using k-means)
2.3 How to find the optimal k
Since it is an unsupervised learning method, so how to find the cluster number k is a problem that cannot be learned from data but needs to be decided from the user. Normally there are following several ways:
The Elbow method:
The elbow method looks at the percentage of variance explained as a function of the number of clusters. Percentage of variance explained is the ratio of the between-group variance to the total variance. Here \[𝑆𝑆𝐸_{between}=\sum_{k=1}^Kn_k(\bar{x_k} - \bar{x})^2 \]
where \(n_k\) is the number of observations assigned to cluster \(k\), \(\bar{x_k}\) is the centroid for cluster \(k\), and \(\bar{x}\) is the overall mean of the data. And total variance is: \[SSE = \sum_{i=1}^{n}(x_i-\bar{x})^2\]
Information Criterion Approach The k-means model is "almost" a gaussian mixture model and we can calculate likelihood for each data point and also determine information criterion values
3. K-medoids
There is another method that is very similar to k-means. The difference is that we will choose the observation to work as the centroid to minimize the pairwise distance. Here are the comparisons:
- K-medoids is more flexible. Since we can use different similarity measure.
- K-medoids is more robust. Since the median is more robust to outliers than the arithmetic mean
- K-medoids is more expensive. Since we need to calculate the pairwise distance everytime to find the centroid.
4. Model Implementation
Then let me construct K-means model from scratch. As normal, I will compare my result with sklearn.cluster.KMeans
in the end. Here is the plot of my model:
And here is the link of Jupyter Notebook For K-means
Reference:
Book: An Introduction to Statistical Learning
https://www.cs.utah.edu/~piyush/teaching/EM_algorithm.pdf
https://stackoverflow.com/questions/21619794/what-makes-the-distance-measure-in-k-medoid-better-than-k-means https://stats.stackexchange.com/questions/133656/how-to-understand-the-drawbacks-of-k-means


TODO List
Loading ...
Filter
All
Active
Complete
{{ todo.text }}
Delete
Update
Complete
{{ completeItems }} / {{ todoList.length }} items complete.
Delete Completed Items
{{errorText}}


Mlb hardware registers. More...
#include <component_mlb.h>
Public Attributes | |
| __IO uint32_t | MLB_MLBC0 |
| (Mlb Offset: 0x000) MediaLB Control 0 Register More... | |
| __I uint32_t | Reserved1 [2] |
| __IO uint32_t | MLB_MS0 |
| (Mlb Offset: 0x00C) MediaLB Channel Status 0 Register More... | |
| __I uint32_t | Reserved2 [1] |
| __IO uint32_t | MLB_MS1 |
| (Mlb Offset: 0x014) MediaLB Channel Status1 Register More... | |
| __I uint32_t | Reserved3 [2] |
| __IO uint32_t | MLB_MSS |
| (Mlb Offset: 0x020) MediaLB System Status Register More... | |
| __I uint32_t | MLB_MSD |
| (Mlb Offset: 0x024) MediaLB System Data Register More... | |
| __I uint32_t | Reserved4 [1] |
| __IO uint32_t | MLB_MIEN |
| (Mlb Offset: 0x02C) MediaLB Interrupt Enable Register More... | |
| __I uint32_t | Reserved5 [3] |
| __IO uint32_t | MLB_MLBC1 |
| (Mlb Offset: 0x03C) MediaLB Control 1 Register More... | |
| __I uint32_t | Reserved6 [1] |
| __I uint32_t | Reserved7 [15] |
| __IO uint32_t | MLB_HCTL |
| (Mlb Offset: 0x080) HBI Control Register More... | |
| __I uint32_t | Reserved8 [1] |
| __IO uint32_t | MLB_HCMR [2] |
| (Mlb Offset: 0x088) HBI Channel Mask 0 Register More... | |
| __I uint32_t | MLB_HCER [2] |
| (Mlb Offset: 0x090) HBI Channel Error 0 Register More... | |
| __I uint32_t | MLB_HCBR [2] |
| (Mlb Offset: 0x098) HBI Channel Busy 0 Register More... | |
| __I uint32_t | Reserved9 [8] |
| __IO uint32_t | MLB_MDAT [4] |
| (Mlb Offset: 0x0C0) MIF Data 0 Register More... | |
| __IO uint32_t | MLB_MDWE [4] |
| (Mlb Offset: 0x0D0) MIF Data Write Enable 0 Register More... | |
| __IO uint32_t | MLB_MCTL |
| (Mlb Offset: 0x0E0) MIF Control Register More... | |
| __IO uint32_t | MLB_MADR |
| (Mlb Offset: 0x0E4) MIF Address Register More... | |
| __I uint32_t | Reserved10 [182] |
| __IO uint32_t | MLB_ACTL |
| (Mlb Offset: 0x3C0) AHB Control Register More... | |
| __I uint32_t | Reserved11 [3] |
| __IO uint32_t | MLB_ACSR [2] |
| (Mlb Offset: 0x3D0) AHB Channel Status 0 Register More... | |
| __IO uint32_t | MLB_ACMR [2] |
| (Mlb Offset: 0x3D8) AHB Channel Mask 0 Register More... | |
Mlb hardware registers.
| __I uint32_t Mlb::Reserved1[2] |
| __I uint32_t Mlb::Reserved10[182] |
| __I uint32_t Mlb::Reserved11[3] |
| __I uint32_t Mlb::Reserved2[1] |
| __I uint32_t Mlb::Reserved3[2] |
| __I uint32_t Mlb::Reserved4[1] |
| __I uint32_t Mlb::Reserved5[3] |
| __I uint32_t Mlb::Reserved6[1] |
| __I uint32_t Mlb::Reserved7[15] |
| __I uint32_t Mlb::Reserved8[1] |
| __I uint32_t Mlb::Reserved9[8] |


Survey
How did you like the center ?


WITNESS LIST Environmental Regulation Committee May 18, 2005-8:00A SB 93 On: Eden, Dan (Tx Comm on Environmental Quality) SB 785 For: de la Pena, Patricia (Self) Ahmed, Aglaia (Self) Brown, Chris (Self) Carter, Susie (Self and Hays County Precinct 2) Clements, Shilo (Self) Cunningham, Dr. Sid (Self) Dean, Eric (Self) Fitzgerald, Dr. Robert (Medina County Environmental Action Association) Froehlich, James (Self) Haley, Bill (Self) Holder, Kathleen (Self) Kay, Charles (Self) Lambert, Reagan (Self) McSpadden, Diane (Self) Ortiz, Halley Wallingford (Self) OConnor, Mike (Acme Brick and Southwest Brick Institute) Read, Bill (Self) Reed, Cyrus (Lone Star Chapter, Sierra Club) Rutherford, Quillian (Self) Schneider, Richard (Self) Selger, Steven (Self) Sikoski, John (Self) Simmons, John (Self) Sorrell, Cliff (Self) Stewart, Michael (Tx Aggregates & Concrete Assoc.) Stone, Mary (Self) Walker, Patricia (Self) On: Gould, Michael (Tx Comm. on Environmental Quality) SB 1858 For: Earl, David (Self) Gunn, III, William T. (Self) Halty, Scott (San Antonio Water System) Irion, Terry (Tx Landowners Conservancy) Perez, Richard (City of San Antonio) Wheelus, C. Daniel (Self) Willatt, Mike (Self) Against: Alles, Richard (Self and Greater Edwards Aquifer Alliance) Huffman, Laura (City of Austin) Kramer, Ken (Lone Star Chapter, Sierra Club) Rockwell, Brad (Greater Edwards Aquifer Alliance) Ross, Lauren (Greater Edwards Aquifer Alliance) Rutherford, Mike (Self) On: Fitzgerald, Robert T. (Medina County Environmental Action Association)


GeauxVote Mobile app and Voter Portal are working after brief outage
by Brad GinsbergMONROE, La. (KNOE) - The GeauxVote Mobile app and Voter Portal stopped working for a short period of time on Election Day.
Secretary of State Kyle Ardoin announced the problem on his Facebook page around 3:20 p.m. They started working about 30 minutes after the problem was announced.
Officials have not said what caused the app and Voter Portal to stop working correctly.
Because the GeauxVote Mobile app and Voter Portal were down, people could not look up information like voting locations or a sample ballot. Polls close at 8 p.m.
If you need assistance, contact the Elections Division at<PHONE_NUMBER>.