this is a big bad example that culminates all that you've learned so far. put your thinking caps on. we're going to cover HTML, CSS, PHP, MySQL, AJAX, etc. (actually i'm not sure about javascript.)
we are going to make a blog ourselves. none of that wordpress crap. let's do this by hand. that's how cool we are.
A blog is just a place you write stuff on the web! I mean, that's mostly what it is, right?
the first step to making a blog - or any project! - is to seriously consider what it is
I'd argue that one of the paramount reasons you have a developer around is to think about the whole process as opposed to segmenting pieces of it to different people. Yes, you can do this with a project manager or a creative director, but far too often those people don't actually do anything. As a developer, you should be able to see the whole thing through, and cry your own tears and pour your own sweat into it.
(Not saying that it's the only way to do things - I'm just saying that it's what a good web developer should be capable of and why they're valuable.)
so back to the question, or more specifically, what makes up a blog? well...
So here we have some ideas about what makes up a blog. The pieces.
Now, let's refine it more. What parts are data and what parts are function and what parts are aesthetic? And how do they mesh together?
For example, a post is a piece of data. But it also will have a page for every post, so we need to consider what it'll look like. And how do we retrieve the post? That's a functional decision.
So break each piece down even further: a post, as data, has a title, the body content, an author, a date, and maybe some tags associated with it.
An author can have posts attributed to them, a name, a join date, maybe we hold onto their email address.
The first page we see would probably have a list of the latest posts - what could that look like? what data would we like to be on that page?
See how we need to break everything down? We haven't written any code, nor should we be thinking in those terms yet. The planning stage is merely conceptual.
the skill here is to employ critical thinking to break down a series of problems (in the form of feature-requests and concepts) into smaller, manageable parts.
I always find the data to be the easiest to start with. (Well, maybe not easiest, but it's a useful foundation.) What's the data needed for this to work well?
A good exercise is to go onto your favorite blog (you have a favorite blog, right?) and see what data is available to you.
Let's think on the per-post level: you'll probably see a post title, a body of text, an author name, a date of publication, some tags, and some comments.
But how would we structure that in a database? Let's say we'll use a traditional MySQL database. What would that model or schema of information look like?
Ok so that's a schema and it's fairly straightforward so far - but wait, that comments column doesn't really make sense. We'd make a separate table for those, right?
Here in this conceptual stage is when we try to break down everything into what will be discreet data models. posts is one model, comments is a separate one. the two are related, but they are not the same.
So there we've separated them and created a relation between the comments and the posts by using the post_id in the comments_tbl. This is the process of normalizing the data.
We can already normalize it even more! Take out the author columns and replace them with an author_id and an authors_tbl
Okay, but the tags column would be better served if we normalized that, too. What would we have planned on putting in that column -- a comma-separated list? No way, we can normalize it better than that.
Wow. Well, we just turned one table into four. Congrats. That's what normalization will do to you. So in terms of these tables, for every post, we'd expect one author, potentially multiple comments, and potentially multiple tags.
You could draw that out if you wanted. Literally draw a web of possible information. It's helpful to do so when you need to manage large amounts of possible schemas. Draw boxes for tables, and arrows to illustrate how they are related by what columns.
At this stage you can be even more picky about what data you want to include, but we'll just use this for now. This looks good.
Well - wait a minute. We want some way to make sure that only authorized people can make posts. How would we do that? One possible way would be to password protect the ability to post.
Go ahead an add one column to the authors_tbl called password. We'll talk about how to actually use this later. But for now, just know that we will treat an author as a user account on the site, and we'll store that information in the authors_tbl
after you have a good idea of what data you expect to have, it's useful to think about how you'll need to use that data. on a blog, you can usually do the following with this data:
these are merely functions - they're operations - they're actions. when you actually write the code for them, each will probably be made up of several functions.
you could also refer to that list as a list of features. it's important that you never get too overburdened by a list of features. part of being a good web developer is being able to know what features are functionally important to demonstrate the site.
for example, maybe four of those are critical to really see a blog in action: the list of latest posts, an individual post, adding a post, and commenting on a post. those would be the core features to be concerned about first.
because when you think about it, once you've written how to add a post, the next step of editing a post will probably use the same form - just with pre-filled data.
also, when you think about it, searching, whether it's by author or tag, would use the same kind of general searching function, so writing one (searching by author) would make the other (searching by tag) easier.
that process - seeing what features are merely branches off of existing features - is key to narrowing down what you need to write first, and what's most important.
You'll be writing these functions in scripts. In this case, I'll use PHP as the example language.
now that you have a good idea of what will need to be presented and the actions a user will take on the site, you can begin to effectively design some pages.
and don't worry about making them super-pretty from the get-go, any good web developer will get the functionality done before really worrying about how fancy it looks.
Again, a developer doesn't toil over anything! Well, we do, two things specifically:
ahahaha... anyway
open up notepad (or whatever, you may have moved on to use something like Espresso or Coda or TextMate by now (i use coda religiously)) and work out some functional designs in HTML and CSS.
Some pages will be purely functional so they'll just be PHP, but most will be a mix of HTML and PHP eventually. for now you can write your HTML/CSS and just inject the PHP later.
so what kind of pages do you need? sometimes designers like to think about what views you need, and what experiences the user will have. this is neat and sometimes useful.
for example, what's a page versus a view? a view can be a piece of a page, like an individual comment in a series of comments. how should individual comments look? that's a kind of view. or an individual blog post, which is both a view and a page, because while there will be an individual page per post, the post will also exist in a list of posts. it's important to realize this to keep consistency.
and experiences is what it sounds like: what do you want the user to do when they go to your page? do you want them to click on your first post? how do you increase the chances of that? (make the first post's title bigger than the others? make its background-color slightly different?)
anyway, think of the pages you need. they align kind of nicely with the list of functions:
Sketching out (with paper and then, in the next section, with HTML/CSS) these pages and views is important. Take your time in doing so.
By now you should have a good idea about the data you'll use, the functions you need to make happen, and the pages they will be used on. I'd say start actually building things by writing some HTML and CSS.
Let's start with a basic list of posts. For now we should just use some dummy content that we'll replace later with actual data-retrieval. (Using "dummy data" or "filler data" is very common, just to sketch out an idea that looks real-world-ish.)
Call this file index.php and put it in a new directory on your web server. (You should have some kind of web server from the PHP guide.)

<title>our awesome blog</title>
<link rel="stylesheet" href="main.css" />

our awesome blog!

A post title!

by cyle, posted on 6-13-2011

post content goes here!

Another post title!

by cyle, posted on 6-12-2011

post content goes here!

Okay so there's our index.php file. We'll end it with a .php extension because we'll put some PHP in there soon. We need the main.css file we mentioned in that code.
But first, notice the structure: we have an h1 tag which holds our blog's title. we have a div with the id posts that'll hold our individual posts. and then inside there we have individual divs for each post, each with the class post. this'll make CSS rules easy to do.
There's also a class called small for the attribution and date line under the individual post titles. here's what I'll do for CSS, but you could do anything you want:
* {
padding: 0;
margin: 0;
}
body, #posts {
margin: 50px;
}
body {
font-family: Verdana, Arial, sans-serif;
font-size: 14px;
}
#posts .post {
margin-bottom: 20px;
}
.small {
font-size: 0.75em;
}
That's all I'll do... very simple. Notice some conventions you may not have known before:
Put those two files in the same directory if you haven't already. Awesome. If you load the page in your browser, it'll probably look pretty basic. That's fine. It looks good enough (I guess).
So now we need to set up MySQL with our databases as I described above. Can you do that? I hope so, but I'll show you some example queries anyway. Honestly, if you want to use phpMyAdmin to create the tables, I wouldn't blame you.
But here are the raw SQL statements, because I want you to understand how they work. Make sure you replace the password with an actual password.
CREATE DATABASE theblog;
CREATE USER 'blog_user'@'localhost' IDENTIFIED BY 'password';
GRANT ALL ON theblog.* TO 'blog_user'@'localhost';
USE theblog;
CREATE TABLE posts_tbl (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
title VARCHAR(255) NOT NULL,
content TEXT NOT NULL,
pubdate DATETIME NOT NULL,
author_id INT NOT NULL
);
CREATE TABLE comments_tbl (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
content TEXT NOT NULL,
pubdate DATETIME NOT NULL,
author_id INT NOT NULL,
post_id INT NOT NULL
);
CREATE TABLE authors_tbl (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255) NOT NULL,
joindate DATETIME NOT NULL,
email VARCHAR(255) NOT NULL,
password VARCHAR(255) NOT NULL
);
CREATE TABLE tags_tbl (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
tagtext VARCHAR(255) NOT NULL,
post_id INT NOT NULL
);
So that sets up the tables for you. Basically there's no data that is allowed to be null, haha.
From here you have two options... you can put some dummy data directly into the database, or you can build how you'll add posts as a page.
Let's go the first way. It's easier, I think. Use dummy data so you can at least establish the bridge between PHP and MySQL. Here's how we'd insert some data, the same way we learned in the MySQL guide:
INSERT INTO authors_tbl
(name, joindate, email, password)
VALUES
('cool kid', NOW<EMAIL_ADDRESS>SHA1('password'));
Ok so I'll stop right there and note that you're using the SHA1 MySQL function to store the person's password as a hash instead of in plain text. I mean, who would store people's passwords as plain text? haha. A hash is the least you can do to protect a person's password.
A hash function simply scrambles data so that it can't be read anymore. However, if you scramble the same string again, it'll come out with the same hash. It's a consistent one-way encryption. This'll come in handy later.
You're also using MySQL's NOW() function to get the current date and time. That's useful.
Anyway, continuing. I'm breaking these up into multi-line stuff so you can read it easier, but MySQL doesn't care, it'll understand it as only one line until it reaches the semicolon.
 We now have a database with one author and three posts in it. Now we need to use PHP to bridge the database into the page we've set up.
Let's put into index.php the means for it to get the latest posts from the database. This part of the process is us adding functionality to views or pages we've laid out.
it looks a little somethin' like this...

<?php
?>

A post title!

by cyle, posted on 6-13-2011

post content goes here!

Another post title!

by cyle, posted on 6-12-2011

post content goes here!

Or at least that sets the stage. The rest of the code will go between those <?php ?> tags.
mysql_connect('localhost', 'blog_user', 'password');
mysql_select_db('theblog');
So here you can see we're connecting to MySQL using the username and password we set up before.  And then we select the blog's database.
$get_posts_query = mysql_query('SELECT posts_tbl.*, authors_tbl.name FROM posts_tbl, authors_tbl WHERE authors_tbl.id=posts_tbl.author_id ORDER BY posts_tbl.pubdate DESC');
That's the next line. It uses PHP's built-in mysql_query() function to make a query, which returns a Resource, which is a data type the same way Number or String is, which we capture within the $get_posts_query variable.
while ($post_row = mysql_fetch_assoc($get_posts_query)) {
}
Okay that's an empty while loop because I want to tell you about it first. What does this do? It'll keep doing the while loop until $post_row is false. And $post_row will be false when there's no rows left.
The mysql_fetch_assoc() function will get the next row and return it as an associative array, which is very useful. We give that function the query we ran so it knows what rows to fetch!
Okay, so inside the while loop:
while ($post_row = mysql_fetch_assoc($get_posts_query)) {
echo '
';
echo '
'.$post_row['title'].'
';
echo '
by '.$post_row['name'].', posted on '.date('m-d-Y', strtotime($post_row['pubdate'])).'
';
echo '
'.$post_row['content'].'
';
echo '
';
}
Okay there are a few important things to digest here:
yes, you can digest all that from that small code snippet. it amazes me, too. if you understood all of it, then awesome! you're learning fast. if you don't get it, that's fine, because it's a lot of information. read through it again, and try to follow along in the code with the bullet points.
Once that's in index.php, upload the file, and go to in your browser.
if you go to the index.php page and see the three posts from your database, go ahead and delete the entries you had manually written in your index.php files.
So by the end, your php file should look something like this:

<title>our awesome blog</title>
<link rel="stylesheet" href="main.css" />

our awesome blog!

<?php
mysql_connect('localhost', 'blog_user', 'password');
mysql_select_db('theblog');
$get_posts_query = mysql_query('SELECT posts_tbl.*, authors_tbl.name FROM posts_tbl, authors_tbl WHERE authors_tbl.id=posts_tbl.author_id ORDER BY posts_tbl.pubdate DESC');
while ($post_row = mysql_fetch_assoc($get_posts_query)) {
echo '
';
echo '
'.$post_row['title'].'
';
echo '
by '.$post_row['name'].', posted on '.date('m-d-Y', strtotime($post_row['pubdate'])).'
';
echo '
'.$post_row['content'].'
';
echo '
';
}
?>

So we have PHP code inside an HTML structure. If you load that in your browser and look at the source, notice you'll never see the PHP code. Only the results of it! Magic.
I'll butt in right now with a quick tip: PHP makes it very easy to reduce redundancy, I think, simply by separating your most-used things (functions, etc) into separate files.
For example, mysql_connect() and mysql_select_db() will be used anywhere we want to do something with the database. We have two choices:
The second option also has the advantage of keeping those functions in only one place. Imagine if we needed to change the name of the database. In the first scenario, we'd need to change every single place we put that function. In the second, we'd only need to change it in that one file.
So to do this, just start another file, call it dbconnection.php and put it in the same directory. It'll look like this:
<?php
mysql_connect('localhost', 'blog_user', 'password');
mysql_select_db('theblog');
?>
Now take out those two functions from where they were in the index.php file! Now you only need to require this new file, like so:
require('dbconnection.php');
Put that where the functions were, and use that line once in a file to gain access to the database (you don't need to add that more than once per file).
The require() function is built in to PHP and will make sure that file is loaded, or else it'll throw an error. Very useful. It only takes one argument: a string of the path to the file. In this case, it's in the same directory, so we only need to put in its filename.
Now you have a super simple blog. All it does is fetch the latest posts from a database. Step one was the concept stage, step two was breaking ground. It gets easier from here, I think. It's time we figured out how to add posts.
Let's make a new file called add_post.php (note that i'm really not going for any standardized file-naming convention here, usually somebody will come up with one. i really don't care.)

<title>posting adding mechanism page</title>
<link rel="stylesheet" href="main.css" />

add a post!

<form method="post" action="insert_post.php">

Title: <input type="text" name="post_title" />

Content:
<textarea name="post_content"></textarea>

<input type="submit" value="add post" />

</form>

That's pretty simple. We won't put any PHP in here yet. Here will just be the form.
Forms are HTML, and when you hit the submit button, it'll send the form data to whatever you specify in the form tag's action attribute. In this case, we want the form data to go to insert_post.php
Notice the other attribute of the form tag: the method attribute. This determines whether the form should send the data as GET or POST variables. Remember those from PHP? You're on the right track. Use POST, because it's more secure.
Using GET will put it in the next page's query string, which might not be compatible with your browser, and is just generally muddy unless you're doing it for a specific reason.
Now we have to actually insert this form data into the database. Let's start that insert_post.php file like so, just to demonstrate something:
<?php
print_r($_POST);
?>
Okay upload that and go back to the add_post.php page. Enter some stuff into the form and hit add post!
Oh dear, we see our data! The print_r() function (and the var_dump() function) is very useful because it shows you the contents of a variable. In this case, we want to see the $_POST superglobal variable. That variable holds all of the POST data that is sent to the script.
In this case, we've told the form in our add_post.php page to send its form data as POST data to the insert_post.php script. So in the insert_post.php script, we access that data through the $_POST variable. Get it? This just describes how data is handed between pages.
Each form field has a name attribute. That name attribute will be the name of the key inside the $_POST associative array. See? In this case, we named one field post_title and the other one post_content. The print_r() function will show these two keys and their values.
Cool cool cool. Let's actually handle the data. Delete that print_r() function call. First of all, we want to make sure the right variables are set. Let's start with making sure the post title is set:
if (!isset($_POST['post_title'])) {
die('you forgot to write a post title!');
}
What did that do!? Let's break it down! First, it's just an if statement. The expression that it checks is whether the variable $_POST['post_title'] exists, that's what the isset() function does. It sees if a variable has been set.
But what about that exclamation mark before it? This is a shortcut that asks if the result is false. We could've written it this way:
if (isset($whatever) == false) { }
The ! before a variable or function does the same thing as that. It just checks to see if it returns false!
The die() function is as dramatic as it sounds: it stops the script dead in its tracks and prints out whatever is within the first argument.
So all we've done so far is check to see if the post_title key exists... but what if it's an empty string? It's still set, no matter what its value. So we should also make sure to check for that:
if (!isset($_POST['post_title']) || trim($_POST['post_title']) == '') {
die('you forgot to write a post title!');
}
All we added is an or and another expression inside the if statement.
The two pipe characters || mean or! (Likewise, two ampersand characters && between expressions means and.) So in plain english this if statement is saying:
If the $_POST['post_title'] variable is not set, or if the trimmed value of $_POST['post_title'] is an empty string, stop everything!
We've successfully stopped someone from adding this blog post if it has no title.
Okay so... I want you to do the same thing for post_content... I'll wait. Haha. Make sure you change the text inside the die() function, too.
Moving right along: so now that we know the data is set, we want to add it to the database! But first there are a few things you should always do.
Okay so first we need to require() the dbconnection.php file. Do so, and put it after the two if statements.
Next we want to make sure the data is parsed if we need to parse it. In this case, I think we should, because right now you could write any text into those text input fields, and whatever comes out will be rendered.
So imagine this: if we put some


INSTINCT (Touchstone) Starring: Anthony Hopkins, Cuba Gooding Jr., Donald Sutherland, Maura Tierney, John Ashton, George Dzundza. Screenplay: Gerald DiPego, based on the novel _Ishmael_ by Daniel Quinn. Producers: Michael Taylor and Barbara Boyle. Director: Jon Turtletaub. MPAA Rating: R (violence, profanity, adult themes) Running Time: 124 minutes. Reviewed by Scott Renshaw.
There was a sense of deja-vu developing long before I actually saw INSTINCT, inspired by the presentation of the basic premise in the trailers. Here was Anthony Hopkins, playing a brilliant scientist turned hair-trigger madman, turning the tables on a confident young interviewer trying to get inside his head...I couldn't help but think I'd seen this somewhere before. Then I saw the film, and it all became clear. This wasn't just a case of Hopkins flexing his Hannibal Lecter muscles again before taking on the film version of Thomas Harris' recently-published sequel to THE SILENCE OF THE LAMBS. He was simply keeping pace with a story that slaps together characters, situations and exact shots from dozens of other films.
INSTINCT is a sloppy, derivative drama focusing on the interaction between primatologist Dr. Ethan Powell (Hopkins) and psychiatric resident Dr. Theo Caulder (Cuba Gooding Jr.). Powell, a once-noted expert on gorillas, is now a mute inmate in a prison psychiatric ward after murdering two men in the jungle of Rwanda; Caulder, an ambitious up-and-comer, sees interviewing Powell for a compentency evaluation as his ticket to professional stardom. Powell eventually does open up to Caulder, but only because he has a message to relate. In flashback we see Powell becoming ever more connected to the family of gorillas he is studying until he is accepted as one of them. His experience leads him to a realization about the nature of human behavior in the world, a lesson he intends to impart on his impromptu pupil Caulder.
You could spend a productive day doing little more than ticking off the films from which INSTINCT cribs: ONE FLEW OVER THE CUCKOO'S NEST, GORILLAS IN THE MIST, TARZAN, THE SHAWSHANK REDEMPTION and even DEAD POETS SOCIETY in addition to THE SILENCE OF THE LAMBS. Gerald DiPego's script plods along, dropping its familiar cinematic tropes like bread crumbs leading the audience to its responses.  There's even a scene of confounding idiocy in which we, the knee-jerking audience, are supposed to cheer for Caulder irresponsibly whipping a room full of jailed psychotics into a rebellious frenzy. INSTINCT is so gruellingly predictable that you may be surprised momentarily when Powell's daughter (Maura Tierney) doesn't become a love interest for Caulder, until you realize that this is just a slightly different, more insulting cliche: a black man and a white woman are allowed to be "just friends."
Somehow, in the midst of so much uninspired tripe, Anthony Hopkins still manages to come through with a performance that's invigorating to watch. Sure, it's a spin on Hannibal Lecter, but it's more fiercely intelligent than anything the rest of the film can deliver. You can't help but lean forward when you hear that seductive baritone; you can't help but shudder when Caulder's neck hinges on the correct answer to a very tricky question. Hopkins makes INSTINCT better. He also makes it worse, because everything else looks even more workmanlike, notably Cuba Gooding Jr.'s performance. Gooding is all facial twitches and exposition explaining the tremendous change in his life wrought by Powell. A little economy and subtlety -- skills Hopkins demonstrates even when playing a wild man -- could have served Gooding well.
Sadly, subtlety is one thing INSTINCT has in very short supply. Even viewers prepared to sympathize with the film's fuzzy embrace of the state of nature will find this more a philosophical tract (albeit one with remarkably realistic animatronic apes by Stan Winston) than a compelling drama. We all know man bad/animals good, which makes the decision to turn the humans into cartoonish villains even more perplexing. If there were a moment of real insight into a character, the rest of INSTINCT's brainless cinematic thievery might have been more tolerable. Instead, it lets breathing plot devices gab at one another for two hours between unnervingly familiar situations. Thank heavens for the entertainment value of Anthony Hopkins' gloss on film's best-known cannibal. It's only fitting in a film that does plenty of cannibalizing of its own.
On the Renshaw scale of 0 to 10 Hannibal lectures: 4.
Visit Scott Renshaw's Screening Room http://www.inconnect.com/~renshaw/ *** Subscribe to receive new reviews directly by email! See the Screening Room for details, or reply to this message with subject "Subscribe".
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


Chapter 9: Hello totals¶
In some ways, your database is no different from a human source. Getting a good story requires careful, thorough questioning. In this section we will move ahead by conducting an interview with pandas to pursue our quest of finding out the biggest donors to Proposition 64.
Using tricks we learned as far back as chapter three, we can start off by answering a simple question: What is the total sum of Proposition 64 contributions that have been reported?
Summing a column¶
To answer that let’s start by getting our hands on amount, the column from the contributions DataFrame with the numbers in it. We can do that just as we did with other columns above.
merged.amount
Now we can add up the column’s total using the pandas method sum, just as we did when we were first getting started with pandas.
merged.amount.sum()
And printed out below your cell, there’s our answer.
We’ve completed our first piece of analysis and discovered the total amount spent on this proposition.
Time to run off to Twitter and publish our results to the world, right?
Wrong.
How not to be wrong¶
The total we generated is not the overall total raised in the campaign, and is guaranteed to be lower than the totals reported in the media and by the campaigns.
Why?
In California, campaigns are only required to disclose the names of donors who give over $100, so our data is missing all of the donors who gave less than that amount.
The cutoff varies, and there are some exceptions, but the same thing is true in other states and also at the federal level in races for Congress and the White House.
The overall totals are instead reported on cover sheets included with disclosure reports that lump together all the smaller contributions as part of a grand total. Those are the records most commonly cited to total up a campaign’s fundraising.
The result is that an itemized list of contributions, like the one we have, cannot be used to calculate a grand total. That’s true in California and virtually anywhere else you work with campaign data. Overlooking that limitation is a rookie mistake routinely made by analysts new to this field.
But that doesn’t mean our data is worthless. We just have to use it responsibly. In many cases, professional campaign reporters will refer to an analysis drawn from a list like ours as applying only to “large donors.”
Since large donors typically account for most of the money, the results are still significant. And the high level of detail included in each record — like the donor’s name, employer and occupation — makes the limitations worth working through.
Which side got more large donations?¶
Adding up a big total is all well and good. But we’re aiming for something more nuanced.
We want to separate the money spent supporting the proposition from the money opposing it. Then we want to find out who raised more.
To answer that question, lets return to the filtering technique we learned in chapter seven.
First let’s look at the column we’re going to filter by, committee_position.
merged.committee_position.value_counts()
Now let’s filter our merged table down using that column and the pandas filtering method that combines a column, an operator and the value we want to filter by. Let’s stick the result in a variable.
support = merged[merged.committee_position == 'SUPPORT']
Now let’s repeat all that for opposing contributions. First the filter into a new variable.
oppose = merged[merged.committee_position == 'OPPOSE']
Now sum up the total disclosed contributions to each for comparison. First the opposition.
oppose.amount.sum()
Then the supporters.
support.amount.sum()
The support is clearly larger. But what percent is it of the overall disclosed total? We can find out by combined two sum
calculations using the division operator.
support.amount.sum() / merged.amount.sum()


--- layout: post title: Article in Waste Advantage magazine date: 2011-05-23 18:02:09.000000000 -05:00 type: post published: true status: publish categories: - Python tags: [] meta: _wpas_done_fb: '1' _wpas_done_twitter: '1' _edit_last: '15714693' author: login: broberts65 email<EMAIL_ADDRESS>display_name: Bob Roberts first_name: '' last_name: '' ---
So today I am excited as I just found out the my Solid Waste Route Optimization paper is going to be published in the July edition of Waste Advantage magazine. Does this make me a routing expert? Absolutely not! This just means that they are looking for content for their magazine!
That being said, I am excited to get my information out there for the world to see. There have been a lot of readers that have downloaded my Solid Waste routing paper and that in itself makes me feel good that I have possibly assisted somebody that needed help!
As always, I appreciate my readers and if you ever have any questions or comments then fell free to express them!
BR


| 1 | /* =========================================================== | |
| 2 | * JFreeChart : a free chart library for the Java(tm) platform | |
| 3 | * =========================================================== | |
| 4 | * | |
| 5 | * (C) Copyright 2000-2009, by Object Refinery Limited and Contributors. | |
| 6 | * | |
| 7 | * Project Info: http://www.jfree.org/jfreechart/index.html | |
| 8 | * | |
| 9 | * This library is free software; you can redistribute it and/or modify it | |
| 10 | * under the terms of the GNU Lesser General Public License as published by | |
| 11 | * the Free Software Foundation; either version 2.1 of the License, or | |
| 12 | * (at your option) any later version. | |
| 13 | * | |
| 14 | * This library is distributed in the hope that it will be useful, but | |
| 15 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | |
| 16 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | |
| 17 | * License for more details. | |
| 18 | * | |
| 19 | * You should have received a copy of the GNU Lesser General Public | |
| 20 | * License along with this library; if not, write to the Free Software | |
| 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, | |
| 22 | * USA. | |
| 23 | * | |
| 24 | * [Java is a trademark or registered trademark of Sun Microsystems, Inc. | |
| 25 | * in the United States and other countries.] | |
| 26 | * | |
| 27 | * -------------------------------------------- | |
| 28 | * DynamicDriveToolTipTagFragmentGenerator.java | |
| 29 | * -------------------------------------------- | |
| 30 | * (C) Copyright 2003-2009, by Richard Atkinson and Contributors. | |
| 31 | * | |
| 32 | * Original Author: Richard Atkinson; | |
| 33 | * Contributors: David Gilbert (for Object Refinery Limited); | |
| 34 | * Fawad Halim - bug 2690293; | |
| 35 | * | |
| 36 | * Changes | |
| 37 | * ------- | |
| 38 | * 12-Aug-2003 : Version 1 (RA); | |
| 39 | * 04-Dec-2007 : Escape tool tip text to fix bug 1400917 (DG); | |
| 40 | * 19-Mar-2009 : Escape apostrophes - see bug 2690293 with fix by FH (DG); | |
| 41 | * | |
| 42 | */ | |
| 43 | ||
| 44 | package org.jfree.chart.imagemap; | |
| 45 | ||
| 46 | /** | |
| 47 | * Generates tooltips using the Dynamic Drive DHTML Tip Message | |
| 48 | * library (http://www.dynamicdrive.com). | |
| 49 | */ | |
| 50 | public class DynamicDriveToolTipTagFragmentGenerator | |
| 51 | implements ToolTipTagFragmentGenerator { | |
| 52 | ||
| 53 | /** The title, empty string not to display */ | |
| 54 | protected String title = ""; | |
| 55 | ||
| 56 | /** The style number */ | |
| 57 | protected int style = 1; | |
| 58 | ||
| 59 | /** | |
| 60 | * Blank constructor. | |
| 61 | */ | |
| 62 | public DynamicDriveToolTipTagFragmentGenerator() { | |
| 63 | super(); | |
| 64 | } | |
| 65 | ||
| 66 | /** | |
| 67 | * Creates a new generator with specific title and style settings. | |
| 68 | * | |
| 69 | * @param title title for use in all tooltips, use empty String not to | |
| 70 | * display a title. | |
| 71 | * @param style style number, see http://www.dynamicdrive.com for more | |
| 72 | * information. | |
| 73 | */ | |
| 74 | public DynamicDriveToolTipTagFragmentGenerator(String title, int style) { | |
| 75 | this.title = title; | |
| 76 | this.style = style; | |
| 77 | } | |
| 78 | ||
| 79 | /** | |
| 80 | * Generates a tooltip string to go in an HTML image map. | |
| 81 | * | |
| 82 | * @param toolTipText the tooltip. | |
| 83 | * | |
| 84 | * @return The formatted HTML area tag attribute(s). | |
| 85 | */ | |
| 86 | public String generateToolTipFragment(String toolTipText) { | |
| 87 |
1
1. generateToolTipFragment : mutated return of Object value for org/jfree/chart/imagemap/DynamicDriveToolTipTagFragmentGenerator::generateToolTipFragment to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return " onMouseOver=\"return stm(['" |
| 88 | + ImageMapUtilities.javascriptEscape(this.title) + "','" | |
| 89 | + ImageMapUtilities.javascriptEscape(toolTipText) + "'],Style[" | |
| 90 | + this.style + "]);\"" + " onMouseOut=\"return htm();\""; | |
| 91 | } | |
| 92 | ||
| 93 | } | |
Mutations | ||
| 87 |
1.1 |


|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xml.utils.SystemIDResolver
public class SystemIDResolver
This class is used to resolve relative URIs and SystemID strings into absolute URIs.
This is a generic utility for resolving URIs, other than the fact that it's declared to throw TransformerException. Please see code comments for details on how resolution is performed.
| Constructor Summary | |
|---|---|
SystemIDResolver()
|
| Method Summary | |
|---|---|
private static java.lang.String |
getAbsolutePathFromRelativePath(java.lang.String relativePath)
Return an absolute path from a relative path. |
static java.lang.String |
getAbsoluteURI(java.lang.String systemId)
Take a SystemID string and try to turn it into a good absolute URI. |
static java.lang.String |
getAbsoluteURI(java.lang.String urlString,
java.lang.String base)
Take a SystemID string and try to turn it into a good absolute URI. |
static java.lang.String |
getAbsoluteURIFromRelative(java.lang.String localPath)
Get an absolute URI from a given relative URI (local path). |
static boolean |
isAbsolutePath(java.lang.String systemId)
Return true if the local path is an absolute path. |
static boolean |
isAbsoluteURI(java.lang.String systemId)
Return true if the systemId denotes an absolute URI . |
private static boolean |
isWindowsAbsolutePath(java.lang.String systemId)
Return true if the local path is a Windows absolute path. |
private static java.lang.String |
replaceChars(java.lang.String str)
Replace spaces with "%20" and backslashes with forward slashes in the input string to generate a well-formed URI string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SystemIDResolver()
| Method Detail |
|---|
public static java.lang.String getAbsoluteURIFromRelative(java.lang.String localPath)
The relative URI is a local filesystem path. The path can be absolute or relative. If it is a relative path, it is resolved relative to the system property "user.dir" if it is available; if not (i.e. in an Applet perhaps which throws SecurityException) then we just return the relative path. The space and backslash characters are also replaced to generate a good absolute URI.
localPath
- The relative URI to resolve
private static java.lang.String getAbsolutePathFromRelativePath(java.lang.String relativePath)
relativePath
- A relative path
public static boolean isAbsoluteURI(java.lang.String systemId)
systemId
- The systemId string
public static boolean isAbsolutePath(java.lang.String systemId)
systemId
- The path string
private static boolean isWindowsAbsolutePath(java.lang.String systemId)
systemId
- The path string
private static java.lang.String replaceChars(java.lang.String str)
str
- The input string
public static java.lang.String getAbsoluteURI(java.lang.String systemId)
systemId
- A URI string, which may be absolute or relative.
public static java.lang.String getAbsoluteURI(java.lang.String urlString, java.lang.String base) throws javax.xml.transform.TransformerException
urlString
- SystemID stringbase
- The URI string used as the base for resolving the systemID
javax.xml.transform.TransformerException
- thrown if the string can't be turned into a URI.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


Client()¶
-
class
Client
(client_id, pipe=0, loop=None, handler=None)¶ Creates the RPC client ready for usage.
Parameters: - client_id (str) – OAuth2 App ID (found at https://discordapp.com/developers/applications/me)
- pipe (int) – Pipe that should be used to connect to the Discord client. Defaults to 0, can be 0-9
- loop (asyncio.BaseEventLoop) – Your own event loop (if you have one) that PyPresence should use. One will be created if not supplied. Information at https://docs.python.org/3/library/asyncio-eventloop.html
- handler (function) – The exception handler pypresence should send asynchronous errors to. This can be a coroutine or standard function as long as it takes two arguments (exception, future). Exception will be the exception to handle and future will be an instance of asyncio.Future
start
()¶Initializes the connection - must be done in order to run RPC commands.
Return type: pypresence.Response
close
()¶Closes the connection.
Used to authenticate a new client with your app. By default this pops up a modal in-app that asks the user to authorize access to your app.
Parameters:
- client_id (str) – OAuth2 application id
- scopes (list) – a list of OAuth scopes as strings
- rpc_token (str) – one-time use RPC token
- username (str) – username to create a guest account with if the user does not have Discord
Return type: pypresence.Response
All the different scopes can be found here
authenticate
(token)¶Used to authenticate an existing client with your app.
Parameters: token (int) – OAuth2 access token Return type: pypresence.Response
get_guilds
()¶Used to get a list of guilds the client is in.
Return type: pypresence.Response
get_channels
()¶Used to get a guild’s channels the client is in.
Return type: pypresence.Response
channel_id
()¶Used to get a channel the client is in.
Parameters: channel_id (str) – id of the channel to get Return type: pypresence.Response
set_user_voice_settings
(user_id, **options)¶Used to get a channel the client is in.
Parameters:
- user_id (str) – user id
- pan_left (float) – left pan of the user
- pan_right (float) – right pan of the user
- volume (int) – the volume of user (defaults to 100, min 0, max 200)
- mute (bool) – the mute state of the user
Return type: pypresence.Response
select_voice_channel
(channel_id)¶Used to join and leave voice channels, group dms, or dms.
Parameters: channel_id (str) – channel id to join (or None
to leave)Return type: pypresence.Response
get_selected_voice_channel
()¶Used to get the client’s current voice channel.
Return type: pypresence.Response
select_text_channel
(channel_id)¶Used to join and leave text channels, group dms, or dms.
Parameters: channel_id (str) – channel id to join (or None
to leave)Return type: pypresence.Response
set_activity
(**options)¶Used to set the activity shown on Discord profiles and status of users. Takes the following as parameters.
Parameters:
- pid (int) – the process id of your game
- state (str) – the user’s current status
- details (str) – what the player is currently doing
- start (int) – epoch time for game start
- end (int) – epoch time for game end
- large_image (str) – name of the uploaded image for the large profile artwork
- large_text (str) – tooltip for the large image
- small_image (str) – name of the uploaded image for the small profile artwork
- small_text (str) – tootltip for the small image
- party_id (str) – id of the player’s party, lobby, or group
- party_size (list) – current size of the player’s party, lobby, or group, and the max in this format:
[1,4]
- join (str) – unique hashed string for chat invitations and ask to join
- spectate (str) – unique hashed string for spectate button
- match (str) – unique hashed string for spectate and join
- instance (bool) – marks the match as a game session with a specific beginning and end
Return type: pypresence.Response
clear_activity
(pid=os.getpid())¶Clear the activity.
Parameters:
- pid (int) – the process id of your game
- state (str) – the user’s current status
- details (str) – what the player is currently doing
- start (int) – epoch time for game start
- end (int) – epoch time for game end
- large_image (str) – name of the uploaded image for the large profile artwork
- large_text (str) – tooltip for the large image
- small_image (str) – name of the uploaded image for the small profile artwork
- small_text (str) – tootltip for the small image
- party_id (str) – id of the player’s party, lobby, or group
- party_size (list) – current size of the player’s party, lobby, or group, and the max in this format:
[1,4]
- join (str) – unique hashed string for chat invitations and ask to join
- spectate (str) – unique hashed string for spectate button
- match (str) – unique hashed string for spectate and join
- instance (bool) – marks the match as a game session with a specific beginning and end
Return type: pypresence.Response
subscribe
(event, args={})¶Used to subscribe to events.
Parameters:
- event (str) – event name to subscribe to
- args (dict) – any args to go along with the event
Return type: pypresence.Response
unsubscribe
(event, args={})¶Used to unsubscribe from events.
Parameters:
- event (str) – event name to unsubscribe from
- args (dict) – any args to go along with the event
Return type: pypresence.Response
get_voice_settings
()¶Get the user’s voice settings.
Return type: pypresence.Response
set_voice_settings
(**options)¶Set the user’s voice settings.
Parameters:
- _input (dict) – input settings
- output (dict) – output settings
- mode (dict) – voice mode settings
- automatic_gain_control (bool) – state of automatic gain control
- echo_cancellation (bool) – state of echo cancellation
- noise_suppression (bool) – state of noise suppression
- qos (bool) – state of voice quality of service
- silence_warning (bool) – state of silence warning notice
- deaf (bool) – state of self-deafen
- mute (bool) – state of self-mute
Return type: pypresence.Response
capture_shortcut
(action)¶Used to capture a keyboard shortcut entered by the user.
Parameters: action (string) – capture action, either 'START'
or'STOP'
Return type: pypresence.Response
send_activity_join_invite
(user_id)¶Used to accept an Ask to Join request.
Parameters: user_id (str) – user id Return type: pypresence.Response
close_activity_request
(user_id)¶Used to reject an Ask to Join request.
Parameters: user_id (str) – user id Return type: pypresence.Response
register_event
(event, func, args={})¶Hook an event to a function. The function will be called whenever Discord sends that event. Will auto subscribe to it.
Parameters:
- event (str) – the event to hook
- func (function) – the function to pair with the event
- args (dict) – optional args used in subscription
Return type: pypresence.Response
unregister_event
(event, args={})¶Unhook an event from a function. Will auto unsubscribe from the event as well.
Parameters:
- event (str) – the event to unhook
- args (dict) – optional args used in unsubscription
Return type: pypresence.Response


Kiana Nazminia
Republican
Strategy And Development - Strive Health Clinical Operations and Innovation - DaVita, Inc Procurement - Vail Resorts, Inc. Corporate Social Responsibility - Vail Resorts Development-Wish of A Lifetime Foundation
BA- Economics
80210
N/A
Leadership Program of the Rockies, Denver Metro Young Republicans
N/A
I am passionate about the governance of Colorado. As a proud Native of the state, I am committed to Colorado’s voters and our values.
I am a professional and have worked in the private sector my whole career. It requires objectivity, collaboration, and compromise to be effective. While my political beliefs are personally sound, I am proudly objective and fair and have complete confidence in my ability to be impartial.
I worked as a data analyst for several years and perform at a high level in the private sector to solve problems and create solutions to complex issues every single day.
Female


\chapter*{
\addcontentsline{toc}{chapter}{References}
References
Abelson, Harold, Andrew Berlin, Jacob Katzenelson,
William McAllister,
Guillermo Rozas, Gerald Jay Sussman, and Jack Wisdom. 1992. The
Supercomputer Toolkit: A general framework for special-purpose
computing.
International Journal of High-Speed Electronics
3(3):337-361.
3(3):337-361.
Allen, John. 1978.
Anatomy of Lisp. New York: McGraw-Hill.
New York: McGraw-Hill.
ANSI X3.226-1994.
American National Standard for Information
Systems—Programming Language—Common Lisp.
Appel, Andrew W. 1987. Garbage collection can be faster than stack
allocation.
Information Processing Letters 25(4):275-279. 25(4):275-279.
Backus, John. 1978. Can programming be liberated from the von
Neumann style?
Communications of the ACM 21(8):613-641. 21(8):613-641.
Baker, Henry G., Jr. 1978. List processing in real time on a serial
computer.
Communications of the ACM 21(4):280-293. 21(4):280-293.
Batali, John, Neil Mayle, Howard Shrobe, Gerald Jay Sussman, and
Daniel Weise. 1982. The Scheme-81 architecture—System and chip.
In
Proceedings of the MIT Conference on Advanced Research in
VLSI, edited by Paul Penfield, Jr. Dedham, MA: Artech House. edited by Paul Penfield, Jr. Dedham, MA: Artech House.
Borning, Alan. 1977. ThingLab—An object-oriented system for
building simulations using constraints. In
Proceedings of the 5th
International Joint Conference on Artificial Intelligence.
Borodin, Alan, and Ian Munro. 1975.
The Computational
Complexity of Algebraic and Numeric Problems. New York: American
Elsevier. New York: American
Elsevier.
Chaitin, Gregory J. 1975. Randomness and mathematical proof.
Scientific American 232(5):47-52. 232(5):47-52.
Church, Alonzo. 1941.
The Calculi of Lambda-Conversion.
Princeton, N.J.: Princeton University Press.
Princeton, N.J.: Princeton University Press.
Clark, Keith L. 1978. Negation as failure. In
Logic and Data
Bases. New York: Plenum Press, pp. 293-322. New York: Plenum Press, pp. 293-322.
Clinger, William. 1982. Nondeterministic call by need is neither
lazy nor by name. In
Proceedings of the ACM Symposium on Lisp and
Functional Programming, pp. 226-234. pp. 226-234.
Clinger, William, and Jonathan Rees. 1991. Macros that work. In
Proceedings of the 1991 ACM Conference on Principles of
Programming Languages, pp. 155-162. pp. 155-162.
Colmerauer A., H. Kanoui, R. Pasero, and P. Roussel. 1973. Un système
de communication homme-machine en franÇais. Technical report,
Groupe Intelligence Artificielle, Université d'Aix Marseille,
Luminy.
Cormen, Thomas, Charles Leiserson, and Ronald Rivest. 1990.
Introduction to Algorithms. Cambridge, MA: MIT Press. Cambridge, MA: MIT Press.
Darlington, John, Peter Henderson, and David Turner. 1982.
Functional Programming and Its Applications. New York: Cambridge
University Press. New York: Cambridge
University Press.
Dijkstra, Edsger W. 1968a. The structure of the
THE
multiprogramming system.
Communications of the ACM
11(5):341-346.
11(5):341-346.
Dijkstra, Edsger W. 1968b. Cooperating sequential processes. In
Programming Languages, edited by F. Genuys. New York: Academic Press, pp.
43-112., edited by F. Genuys. New York: Academic Press, pp.
43-112.
Dinesman, Howard P. 1968.
Superior Mathematical Puzzles. New
York: Simon and Schuster.. New
York: Simon and Schuster.
deKleer, Johan, Jon Doyle, Guy Steele, and Gerald J. Sussman. 1977.
AMORD: Explicit control of reasoning. In
Proceedings of the ACM
Symposium on Artificial Intelligence and Programming Languages, pp.
116-125. pp.
116-125.
Doyle, Jon. 1979. A truth maintenance system.
Artificial
Intelligence 12:231-272. 12:231-272.
Feigenbaum, Edward, and Howard Shrobe. 1993. The Japanese National
Fifth Generation Project: Introduction, survey, and evaluation. In
Future Generation Computer Systems, vol. 9, pp. 105-117. vol. 9, pp. 105-117.
Feeley, Marc. 1986. Deux approches à l'implantation du
language Scheme. Masters thesis, Université de Montréal.
Feeley, Marc and Guy Lapalme. 1987. Using closures for code
generation.
Journal of Computer Languages 12(1):47-66. 12(1):47-66.
Feller, William. 1957.
An Introduction to Probability Theory
and Its Applications, volume 1. New York: John Wiley \& Sons. volume 1. New York: John Wiley \& Sons.
Fenichel, R., and J. Yochelson. 1969. A Lisp garbage collector for
virtual memory computer systems.
Communications of the ACM
12(11):611-612.
12(11):611-612.
Floyd, Robert. 1967. Nondeterministic algorithms.
JACM, 14(4):636-644. 14(4):636-644.
Forbus, Kenneth D., and Johan deKleer. 1993.
Building Problem
Solvers. Cambridge, MA: MIT Press. Cambridge, MA: MIT Press.
Friedman, Daniel P., and David S. Wise. 1976. CONS should not
evaluate its arguments. In
Automata, Languages, and Programming:
Third International Colloquium, edited by S. Michaelson and R.
Milner, pp. 257-284. edited by S. Michaelson and R.
Milner, pp. 257-284.
Friedman, Daniel P., Mitchell Wand, and Christopher T. Haynes. 1992.
Essentials of Programming Languages. Cambridge, MA: MIT
Press/McGraw-Hill. Cambridge, MA: MIT
Press/McGraw-Hill.
Gabriel, Richard P. 1988. The Why of
Y.
Lisp Pointers
2(2):15-25.
2(2):15-25..
Lisp Pointers
2(2):15-25.
Goldberg, Adele, and David Robson. 1983.
Smalltalk-80: The
Language and Its Implementation. Reading, MA: Addison-Wesley. Reading, MA: Addison-Wesley.
Gordon, Michael, Robin Milner, and Christopher Wadsworth. 1979.
Edinburgh LCF. Lecture Notes in Computer Science, volume 78. New
York: Springer-Verlag. Lecture Notes in Computer Science, volume 78. New
York: Springer-Verlag.
Gray, Jim, and Andreas Reuter. 1993.
Transaction Processing:
Concepts and Models. San Mateo, CA: Morgan-Kaufman. San Mateo, CA: Morgan-Kaufman.
Green, Cordell. 1969. Application of theorem proving to problem
solving. In
Proceedings of the International Joint Conference on
Artificial Intelligence, pp. 219-240. pp. 219-240.
Green, Cordell, and Bertram Raphael. 1968. The use of
theorem-proving techniques in question-answering systems. In
Proceedings of the ACM National Conference, pp. 169-181. pp. 169-181.
Griss, Martin L. 1981. Portable Standard Lisp, a brief overview.
Utah Symbolic Computation Group Operating Note 58, University of Utah.
Guttag, John V. 1977. Abstract data types and the development of
data structures.
Communications of the ACM 20(6):397-404. 20(6):397-404.
Hamming, Richard W. 1980.
Coding and Information Theory.
Englewood Cliffs, N.J.: Prentice-Hall.
Englewood Cliffs, N.J.: Prentice-Hall.
Hanson, Christopher P. 1990. Efficient stack allocation for
tail-recursive languages. In
Proceedings of ACM Conference on
Lisp and Functional Programming, pp. 106-118. pp. 106-118.
Hanson, Christopher P. 1991. A syntactic closures macro facility.
Lisp Pointers, 4(3). 4(3).
Hardy, Godfrey H. 1921. Srinivasa Ramanujan.
Proceedings of
the London Mathematical Society XIX(2). XIX(2).
Hardy, Godfrey H., and E. M. Wright. 1960.
An Introduction to
the Theory of Numbers. 4th edition. New York: Oxford University
Press. 4th edition. New York: Oxford University
Press.
Havender, J. 1968. Avoiding deadlocks in multi-tasking systems.
IBM Systems Journal 7(2):74-84. 7(2):74-84.
Hearn, Anthony C. 1969. Standard Lisp. Technical report AIM-90,
Artificial Intelligence Project, Stanford University.
Henderson, Peter. 1980.
Functional Programming: Application and
Implementation. Englewood Cliffs, N.J.: Prentice-Hall. Englewood Cliffs, N.J.: Prentice-Hall.
Henderson. Peter. 1982. Functional Geometry. In
Conference Record
of the 1982 ACM Symposium on Lisp and Functional Programming,
pp. 179-187.
pp. 179-187.
Hewitt, Carl E. 1969. PLANNER: A language for proving theorems in
robots. In
Proceedings of the International Joint Conference on
Artificial Intelligence, pp. 295-301. pp. 295-301.
Hewitt, Carl E. 1977. Viewing control structures as patterns of
passing messages.
Journal of Artificial Intelligence
8(3):323-364.
8(3):323-364.
Hoare, C. A. R. 1972. Proof of correctness of data representations.
Acta Informatica 1(1). 1(1).
Hodges, Andrew. 1983.
Alan Turing: The Enigma. New York: Simon
and Schuster. New York: Simon
and Schuster.
Hofstadter, Douglas R. 1979.
Gödel, Escher, Bach: An Eternal
Golden Braid. New York: Basic Books. New York: Basic Books.
Hughes, R. J. M. 1990. Why functional programming matters. In
Research Topics in Functional Programming, edited by David Turner.
Reading, MA: Addison-Wesley, pp. 17-42., edited by David Turner.
Reading, MA: Addison-Wesley, pp. 17-42.
IEEE Std 1178-1990. 1990.
IEEE Standard for the Scheme
Programming Language.
Ingerman, Peter, Edgar Irons, Kirk Sattley, and Wallace Feurzeig;
assisted by M. Lind, Herbert Kanner, and Robert Floyd. 1960. THUNKS:
A way of compiling procedure statements, with some comments on
procedure declarations. Unpublished manuscript. (Also, private
communication from Wallace Feurzeig.)
Kaldewaij, Anne. 1990.
Programming: The Derivation of
Algorithms. New York: Prentice-Hall. New York: Prentice-Hall.
Kohlbecker, Eugene Edmund, Jr. 1986. Syntactic extensions in the
programming language Lisp. Ph.D. thesis, Indiana University.
Konopasek, Milos, and Sundaresan Jayaraman. 1984.
The TK!Solver
Book: A Guide to Problem-Solving in Science, Engineering, Business,
and Education. Berkeley, CA: Osborne/McGraw-Hill. Berkeley, CA: Osborne/McGraw-Hill.
Knuth, Donald E. 1973.
Fundamental Algorithms. Volume 1 of
The Art of Computer Programming. 2nd edition. Reading, MA:
Addison-Wesley. 2nd edition. Reading, MA:
Addison-Wesley. Volume 1 of
The Art of Computer Programming. 2nd edition. Reading, MA:
Addison-Wesley.
Knuth, Donald E. 1981.
Seminumerical Algorithms. Volume 2 of
The Art of Computer Programming. 2nd edition. Reading, MA:
Addison-Wesley. 2nd edition. Reading, MA:
Addison-Wesley. Volume 2 of
The Art of Computer Programming. 2nd edition. Reading, MA:
Addison-Wesley.
Kowalski, Robert. 1973. Predicate logic as a programming language.
Technical report 70, Department of Computational Logic, School of
Artificial Intelligence, University of Edinburgh.
Kowalski, Robert. 1979.
Logic for Problem Solving. New York:
North-Holland. New York:
North-Holland.
Lamport, Leslie. 1978. Time, clocks, and the ordering of events in a
distributed system.
Communications of the ACM 21(7):558-565. 21(7):558-565.
Lampson, Butler, J. J. Horning, R. London, J. G. Mitchell, and G. K.
Popek. 1981. Report on the programming language Euclid. Technical
report, Computer Systems Research Group, University of Toronto.
Landin, Peter. 1965. A correspondence between Algol 60 and Church's
lambda notation: Part I.
Communications of the ACM
8(2):89-101.
8(2):89-101.
Lieberman, Henry, and Carl E. Hewitt. 1983. A real-time garbage
collector based on the lifetimes of objects.
Communications of
the ACM 26(6):419-429. 26(6):419-429.
Liskov, Barbara H., and Stephen N. Zilles. 1975. Specification
techniques for data abstractions.
IEEE Transactions on Software
Engineering 1(1):7-19. 1(1):7-19.
McAllester, David Allen. 1978. A three-valued truth-maintenance
system. Memo 473, MIT Artificial Intelligence Laboratory.
McAllester, David Allen. 1980. An outlook on truth maintenance.
Memo 551, MIT Artificial Intelligence Laboratory.
McCarthy, John. 1960. Recursive functions of symbolic expressions
and their computation by machine.
Communications of the ACM
3(4):184-195.
3(4):184-195.
McCarthy, John. 1967. A basis for a mathematical theory of
computation. In
Computer Programing and Formal Systems, edited
by P. Braffort and D. Hirschberg. North-Holland., edited
by P. Braffort and D. Hirschberg. North-Holland.
McCarthy, John. 1978. The history of Lisp. In
Proceedings of
the ACM SIGPLAN Conference on the History of Programming Languages.
McCarthy, John, P. W. Abrahams, D. J. Edwards, T. P. Hart, and M. I.
Levin. 1965.
Lisp 1.5 Programmer's Manual. 2nd edition.
Cambridge, MA: MIT Press. 2nd edition.
Cambridge, MA: MIT Press.
McDermott, Drew, and Gerald Jay Sussman. 1972. Conniver reference
manual. Memo 259, MIT Artificial Intelligence Laboratory.
Miller, Gary L. 1976. Riemann's Hypothesis and tests for primality.
Journal of Computer and System Sciences 13(3):300-317. 13(3):300-317.
Miller, James S., and Guillermo J. Rozas. 1994. Garbage collection is
fast, but a stack is faster. Memo 1462, MIT Artificial Intelligence
Laboratory.
Moon, David. 1978. MacLisp reference manual, Version 0. Technical
report, MIT Laboratory for Computer Science.
Moon, David, and Daniel Weinreb. 1981. Lisp machine manual.
Technical report, MIT Artificial Intelligence Laboratory.
Morris, J. H., Eric Schmidt, and Philip Wadler. 1980. Experience
with an applicative string processing language. In
Proceedings
of the 7th Annual ACM SIGACT/SIGPLAN Symposium on the Principles of
Programming Languages.
Phillips, Hubert. 1934.
The Sphinx Problem Book. London: Faber
and Faber.. London: Faber
and Faber.
Pitman, Kent. 1983. The revised MacLisp Manual (Saturday evening
edition). Technical report 295, MIT Laboratory for Computer Science.
Rabin, Michael O. 1980. Probabilistic algorithm for testing primality.
Journal of Number Theory 12:128-138. 12:128-138.
Raymond, Eric. 1993.
The New Hacker's Dictionary. 2nd edition.
Cambridge, MA: MIT Press. 2nd edition.
Cambridge, MA: MIT Press.
Raynal, Michel. 1986.
Algorithms for Mutual Exclusion.
Cambridge, MA: MIT Press.
Cambridge, MA: MIT Press.
Rees, Jonathan A., and Norman I. Adams IV. 1982. T: A dialect of Lisp
or, lambda: The ultimate software tool. In
Conference Record of
the 1982 ACM Symposium on Lisp and Functional Programming, pp.
114-122. pp.
114-122.
Rees, Jonathan, and William Clinger (eds). 1991. The revised$^4$
report on the algorithmic language Scheme.
Lisp Pointers, 4(3). 4(3).
Rivest, Ronald, Adi Shamir, and Leonard Adleman. 1977. A method for
obtaining digital signatures and public-key cryptosystems. Technical
memo LCS/TM82, MIT Laboratory for Computer Science.
Robinson, J. A. 1965. A machine-oriented logic based on the
resolution principle.
Journal of the ACM 12(1):23. 12(1):23.
Robinson, J. A. 1983. Logic programming—Past, present, and future.
New Generation Computing 1:107-124. 1:107-124.
Sagade, Y. 2015. \href{http://www.ysagade.nl/2015/04/12/sicp-change-growth/}{SICP exercise 1.14}
Spafford, Eugene H. 1989. The Internet Worm: Crisis and aftermath.
Communications of the ACM 32(6):678-688. 32(6):678-688.
Steele, Guy Lewis, Jr. 1977. Debunking the
expensive procedure
call
myth. In
Proceedings of the National Conference of the
ACM, pp. 153-62. pp. 153-62.
Steele, Guy Lewis, Jr. 1982. An overview of Common Lisp. In
Proceedings of the ACM Symposium on Lisp and Functional Programming,
pp. 98-107.
pp. 98-107.
Steele, Guy Lewis, Jr. 1990.
Common Lisp: The Language. 2nd
edition. Digital Press. 2nd
edition. Digital Press.
Steele, Guy Lewis, Jr., and Gerald Jay Sussman. 1975. Scheme: An
interpreter for the extended lambda calculus. Memo 349, MIT
Artificial Intelligence Laboratory.
Steele, Guy Lewis, Jr., Donald R. Woods, Raphael A. Finkel, Mark R.
Crispin, Richard M. Stallman, and Geoffrey S. Goodfellow. 1983.
The Hacker's Dictionary. New York: Harper
\& Row. New York: Harper
\& Row.
Stoy, Joseph E. 1977.
Denotational Semantics. Cambridge, MA:
MIT Press. Cambridge, MA:
MIT Press.
Sussman, Gerald Jay, and Richard M. Stallman. 1975. Heuristic
techniques in computer-aided circuit analysis.
IEEE Transactions
on Circuits and Systems CAS-22(11):857-865. CAS-22(11):857-865.
Sussman, Gerald Jay, and Guy Lewis Steele Jr. 1980. Constraints—A
language for expressing almost-hierarchical descriptions.
AI
Journal 14:1-39. 14:1-39.
Sussman, Gerald Jay, and Jack Wisdom. 1992. Chaotic evolution of the
solar system.
Science 257:256-262. 257:256-262.
Sussman, Gerald Jay, Terry Winograd, and Eugene Charniak. 1971.
Microplanner reference manual. Memo 203A, MIT Artificial Intelligence
Laboratory.
Sutherland, Ivan E. 1963. SKETCHPAD: A man-machine graphical
communication system. Technical report 296, MIT Lincoln Laboratory.
Teitelman, Warren. 1974. Interlisp reference manual. Technical
report, Xerox Palo Alto Research Center.
Thatcher, James W., Eric G. Wagner, and Jesse B. Wright. 1978.
Data type specification: Parameterization and the power of
specification techniques. In
Conference Record of the Tenth Annual ACM
Symposium on Theory of Computing, pp. 119-132.
Turner, David. 1981. The future of applicative languages. In
Proceedings of the 3rd European Conference on Informatics, Lecture
Notes in Computer Science, volume 123. New York: Springer-Verlag, pp.
334-348. Lecture
Notes in Computer Science, volume 123. New York: Springer-Verlag, pp.
334-348., pp. 119-132.
Turner, David. 1981. The future of applicative languages. In
Proceedings of the 3rd European Conference on Informatics, Lecture
Notes in Computer Science, volume 123. New York: Springer-Verlag, pp.
334-348.
Wand, Mitchell. 1980. Continuation-based program transformation
strategies.
Journal of the ACM 27(1):164-180. 27(1):164-180.
Waters, Richard C. 1979. A method for analyzing loop programs.
IEEE Transactions on Software Engineering 5(3):237-247. 5(3):237-247.
Winograd, Terry. 1971. Procedures as a representation for data in a
computer program for understanding natural language. Technical report
AI TR-17, MIT Artificial Intelligence Laboratory.
Winston, Patrick. 1992.
Artificial Intelligence. 3rd edition.
Reading, MA: Addison-Wesley.. 3rd edition.
Reading, MA: Addison-Wesley.
Zabih, Ramin, David McAllester, and David Chapman. 1987.
Non-deterministic Lisp with dependency-directed backtracking.
AAAI-87, pp. 59-64., pp. 59-64.
Zippel, Richard. 1979. Probabilistic algorithms for sparse
polynomials. Ph.D. dissertation, Department of Electrical Engineering
and Computer Science, MIT.
Zippel, Richard. 1993.
Effective Polynomial Computation.
Boston, MA: Kluwer Academic Publishers.
Boston, MA: Kluwer Academic Publishers.
97references97 References


# -*- coding: utf-8 -*-
"""
Autogenerated IBEISController functions
TemplateInfo:
autogen_time = 11:34:25 2016/01/05
autogen_key = annotmatch
ToRegenerate:
python -m wbia.templates.template_generator --key annotmatch --Tcfg with_web_api=False with_api_cache=False with_deleters=True no_extern_deleters=True --diff
python -m wbia.templates.template_generator --key annotmatch --Tcfg with_web_api=False with_api_cache=False with_deleters=True no_extern_deleters=True --write
"""
from __future__ import absolute_import, division, print_function, unicode_literals
import functools # NOQA
import six # NOQA
from six.moves import map, range, zip # NOQA
from wbia import constants as const
import utool as ut
from wbia.control import controller_inject
from wbia.control import accessor_decors # NOQA
print, rrr, profile = ut.inject2(__name__)
# Create dectorator to inject functions in this module into the IBEISController
CLASS_INJECT_KEY, register_ibs_method = controller_inject.make_ibs_register_decorator(
__name__
)
register_api = controller_inject.get_wbia_flask_api(__name__)
[docs]def testdata_annotmatch(defaultdb='testdb1'):
import wbia
ibs = wbia.opendb(defaultdb=defaultdb)
config2_ = None # qreq_.qparams
return ibs, config2_
ANNOTMATCH_CONFIDENCE = 'annotmatch_confidence'
ANNOTMATCH_POSIXTIME_MODIFIED = 'annotmatch_posixtime_modified'
ANNOTMATCH_REVIEWER = 'annotmatch_reviewer'
ANNOTMATCH_ROWID = 'annotmatch_rowid'
ANNOTMATCH_TAG_TEXT = 'annotmatch_tag_text'
ANNOTMATCH_EVIDENCE_DECISION = 'annotmatch_evidence_decision'
ANNOTMATCH_META_DECISION = 'annotmatch_meta_decision'
ANNOTMATCH_COUNT = 'annotmatch_count'
ANNOT_ROWID1 = 'annot_rowid1'
ANNOT_ROWID2 = 'annot_rowid2'
# FIXME: finish rename
# ANNOTMATCH_TRUTH = ANNOTMATCH_EVIDENCE_DECISION
@register_ibs_method
def _get_all_annotmatch_rowids(ibs):
r""" all_annotmatch_rowids <- annotmatch.get_all_rowids()
Returns:
list_ (list): unfiltered annotmatch_rowids
TemplateInfo:
Tider_all_rowids
tbl = annotmatch
Example:
>>> # ENABLE_DOCTEST
>>> from wbia.control.manual_annotmatch_funcs import * # NOQA
>>> ibs, config2_ = testdata_annotmatch()
>>> ibs._get_all_annotmatch_rowids()
"""
all_annotmatch_rowids = ibs.db.get_all_rowids(const.ANNOTMATCH_TABLE)
return all_annotmatch_rowids
[docs]@register_ibs_method
@register_api('/api/match/', methods=['POST'])
def add_annotmatch(
ibs,
aid1_list,
aid2_list,
annotmatch_evidence_decision_list=None,
annotmatch_meta_decision_list=None,
annotmatch_confidence_list=None,
annotmatch_tag_text_list=None,
annotmatch_reviewer_list=None,
annotmatch_posixtime_modified_list=None,
anotmatch_count_list=None,
):
r"""
Returns:
returns annotmatch_rowid_list of added (or already existing annotmatchs)
TemplateInfo:
Tadder_native
tbl = annotmatch
"""
n_input = len(aid1_list)
# Rectify inputs
if annotmatch_evidence_decision_list is None:
annotmatch_evidence_decision_list = [None] * n_input
if annotmatch_meta_decision_list is None:
annotmatch_meta_decision_list = [None] * n_input
if annotmatch_confidence_list is None:
annotmatch_confidence_list = [None] * n_input
if annotmatch_tag_text_list is None:
annotmatch_tag_text_list = [None] * n_input
if annotmatch_reviewer_list is None:
annotmatch_reviewer_list = [None] * n_input
if annotmatch_posixtime_modified_list is None:
annotmatch_posixtime_modified_list = [None] * n_input
if anotmatch_count_list is None:
anotmatch_count_list = [0] * n_input
# Associate input lists with columns
cols_to_lists = [
(ANNOT_ROWID1, aid1_list),
(ANNOT_ROWID2, aid2_list),
(ANNOTMATCH_EVIDENCE_DECISION, annotmatch_evidence_decision_list),
(ANNOTMATCH_META_DECISION, annotmatch_meta_decision_list),
(ANNOTMATCH_CONFIDENCE, annotmatch_confidence_list),
(ANNOTMATCH_TAG_TEXT, annotmatch_tag_text_list),
(ANNOTMATCH_REVIEWER, annotmatch_reviewer_list),
(ANNOTMATCH_POSIXTIME_MODIFIED, annotmatch_posixtime_modified_list),
(ANNOTMATCH_COUNT, anotmatch_count_list),
]
colnames = ut.take_column(cols_to_lists, 0)
params_iter = zip(*ut.take_column(cols_to_lists, 1))
get_rowid_from_superkey = ibs.get_annotmatch_rowid_from_superkey
# FIXME: encode superkey paramx
superkey_paramx = (0, 1)
annotmatch_rowid_list = ibs.db.add_cleanly(
const.ANNOTMATCH_TABLE,
colnames,
params_iter,
get_rowid_from_superkey,
superkey_paramx,
)
return annotmatch_rowid_list
[docs]@register_ibs_method
def delete_annotmatch(ibs, annotmatch_rowid_list):
r""" annotmatch.delete(annotmatch_rowid_list)
delete annotmatch rows
Args:
annotmatch_rowid_list
Returns:
int: num_deleted
TemplateInfo:
Tdeleter_native_tbl
tbl = annotmatch
Example:
>>> # DISABLE_DOCTEST
>>> from wbia.control.manual_annotmatch_funcs import * # NOQA
>>> ibs, config2_ = testdata_annotmatch()
>>> annotmatch_rowid_list = ibs._get_all_annotmatch_rowids()[:2]
>>> num_deleted = ibs.delete_annotmatch(annotmatch_rowid_list)
>>> print('num_deleted = %r' % (num_deleted,))
"""
# from wbia.algo.preproc import preproc_annotmatch
# NO EXTERN IMPORT
if ut.VERBOSE:
print('[ibs] deleting %d annotmatch rows' % len(annotmatch_rowid_list))
# Prepare: Delete externally stored data (if any)
# preproc_annotmatch.on_delete(ibs, annotmatch_rowid_list, config2_=config2_)
# NO EXTERN DELETE
# Finalize: Delete self
ibs.db.delete_rowids(const.ANNOTMATCH_TABLE, annotmatch_rowid_list)
num_deleted = len(ut.filter_Nones(annotmatch_rowid_list))
return num_deleted
[docs]@register_ibs_method
@accessor_decors.getter_1to1
def get_annotmatch_aid1(ibs, annotmatch_rowid_list, eager=True, nInput=None):
r""" aid1_list <- annotmatch.aid1[annotmatch_rowid_list]
gets data from the "native" column "aid1" in the "annotmatch" table
Args:
annotmatch_rowid_list (list):
Returns:
list: aid1_list
TemplateInfo:
Tgetter_table_column
col = aid1
tbl = annotmatch
Example:
>>> # ENABLE_DOCTEST
>>> from wbia.control.manual_annotmatch_funcs import * # NOQA
>>> ibs, config2_ = testdata_annotmatch()
>>> annotmatch_rowid_list = ibs._get_all_annotmatch_rowids()
>>> eager = True
>>> aid1_list = ibs.get_annotmatch_aid1(annotmatch_rowid_list, eager=eager)
>>> assert len(annotmatch_rowid_list) == len(aid1_list)
"""
id_iter = annotmatch_rowid_list
colnames = (ANNOT_ROWID1,)
aid1_list = ibs.db.get(
const.ANNOTMATCH_TABLE,
colnames,
id_iter,
id_colname='rowid',
eager=eager,
nInput=nInput,
)
return aid1_list
[docs]@register_ibs_method
@accessor_decors.getter_1to1
def get_annotmatch_aid2(ibs, annotmatch_rowid_list, eager=True, nInput=None):
r""" aid2_list <- annotmatch.aid2[annotmatch_rowid_list]
gets data from the "native" column "aid2" in the "annotmatch" table
Args:
annotmatch_rowid_list (list):
Returns:
list: aid2_list
TemplateInfo:
Tgetter_table_column
col = aid2
tbl = annotmatch
Example:
>>> # ENABLE_DOCTEST
>>> from wbia.control.manual_annotmatch_funcs import * # NOQA
>>> ibs, config2_ = testdata_annotmatch()
>>> annotmatch_rowid_list = ibs._get_all_annotmatch_rowids()
>>> eager = True
>>> aid2_list = ibs.get_annotmatch_aid2(annotmatch_rowid_list, eager=eager)
>>> assert len(annotmatch_rowid_list) == len(aid2_list)
"""
id_iter = annotmatch_rowid_list
colnames = (ANNOT_ROWID2,)
aid2_list = ibs.db.get(
const.ANNOTMATCH_TABLE,
colnames,
id_iter,
id_colname='rowid',
eager=eager,
nInput=nInput,
)
return aid2_list
[docs]@register_ibs_method
@accessor_decors.getter_1to1
def get_annotmatch_confidence(ibs, annotmatch_rowid_list, eager=True, nInput=None):
r""" annotmatch_confidence_list <- annotmatch.annotmatch_confidence[annotmatch_rowid_list]
gets data from the "native" column "annotmatch_confidence" in the "annotmatch" table
Args:
annotmatch_rowid_list (list):
Returns:
list: annotmatch_confidence_list
TemplateInfo:
Tgetter_table_column
col = annotmatch_confidence
tbl = annotmatch
Example:
>>> # ENABLE_DOCTEST
>>> from wbia.control.manual_annotmatch_funcs import * # NOQA
>>> ibs, config2_ = testdata_annotmatch()
>>> annotmatch_rowid_list = ibs._get_all_annotmatch_rowids()
>>> eager = True
>>> annotmatch_confidence_list = ibs.get_annotmatch_confidence(annotmatch_rowid_list, eager=eager)
>>> assert len(annotmatch_rowid_list) == len(annotmatch_confidence_list)
"""
id_iter = annotmatch_rowid_list
colnames = (ANNOTMATCH_CONFIDENCE,)
annotmatch_confidence_list = ibs.db.get(
const.ANNOTMATCH_TABLE,
colnames,
id_iter,
id_colname='rowid',
eager=eager,
nInput=nInput,
)
return annotmatch_confidence_list
[docs]@register_ibs_method
@accessor_decors.getter_1to1
def get_annotmatch_posixtime_modified(
ibs, annotmatch_rowid_list, eager=True, nInput=None
):
r""" annotmatch_posixtime_modified_list <- annotmatch.annotmatch_posixtime_modified[annotmatch_rowid_list]
gets data from the "native" column "annotmatch_posixtime_modified" in the "annotmatch" table
Args:
annotmatch_rowid_list (list):
Returns:
list: annotmatch_posixtime_modified_list
TemplateInfo:
Tgetter_table_column
col = annotmatch_posixtime_modified
tbl = annotmatch
Example:
>>> # ENABLE_DOCTEST
>>> from wbia.control.manual_annotmatch_funcs import * # NOQA
>>> ibs, config2_ = testdata_annotmatch()
>>> annotmatch_rowid_list = ibs._get_all_annotmatch_rowids()
>>> eager = True
>>> annotmatch_posixtime_modified_list = ibs.get_annotmatch_posixtime_modified(annotmatch_rowid_list, eager=eager)
>>> assert len(annotmatch_rowid_list) == len(annotmatch_posixtime_modified_list)
"""
id_iter = annotmatch_rowid_list
colnames = (ANNOTMATCH_POSIXTIME_MODIFIED,)
annotmatch_posixtime_modified_list = ibs.db.get(
const.ANNOTMATCH_TABLE,
colnames,
id_iter,
id_colname='rowid',
eager=eager,
nInput=nInput,
)
return annotmatch_posixtime_modified_list
[docs]@register_ibs_method
@accessor_decors.getter_1to1
def get_annotmatch_reviewer(ibs, annotmatch_rowid_list, eager=True, nInput=None):
r""" annotmatch_reviewer_list <- annotmatch.annotmatch_reviewer[annotmatch_rowid_list]
gets data from the "native" column "annotmatch_reviewer" in the "annotmatch" table
Args:
annotmatch_rowid_list (list):
Returns:
list: annotmatch_reviewer_list
TemplateInfo:
Tgetter_table_column
col = annotmatch_reviewer
tbl = annotmatch
Example:
>>> # ENABLE_DOCTEST
>>> from wbia.control.manual_annotmatch_funcs import * # NOQA
>>> ibs, config2_ = testdata_annotmatch()
>>> annotmatch_rowid_list = ibs._get_all_annotmatch_rowids()
>>> eager = True
>>> annotmatch_reviewer_list = ibs.get_annotmatch_reviewer(annotmatch_rowid_list, eager=eager)
>>> assert len(annotmatch_rowid_list) == len(annotmatch_reviewer_list)
"""
id_iter = annotmatch_rowid_list
colnames = (ANNOTMATCH_REVIEWER,)
annotmatch_reviewer_list = ibs.db.get(
const.ANNOTMATCH_TABLE,
colnames,
id_iter,
id_colname='rowid',
eager=eager,
nInput=nInput,
)
return annotmatch_reviewer_list
[docs]@register_ibs_method
@accessor_decors.getter_1to1
def get_annotmatch_rowid(ibs, annotmatch_rowid_list, eager=True, nInput=None):
r""" annotmatch_rowid_list <- annotmatch.annotmatch_rowid[annotmatch_rowid_list]
gets data from the "native" column "annotmatch_rowid" in the "annotmatch" table
Args:
annotmatch_rowid_list (list):
Returns:
list: annotmatch_rowid_list
TemplateInfo:
Tgetter_table_column
col = annotmatch_rowid
tbl = annotmatch
Example:
>>> # ENABLE_DOCTEST
>>> from wbia.control.manual_annotmatch_funcs import * # NOQA
>>> ibs, config2_ = testdata_annotmatch()
>>> annotmatch_rowid_list = ibs._get_all_annotmatch_rowids()
>>> eager = True
>>> annotmatch_rowid_list = ibs.get_annotmatch_rowid(annotmatch_rowid_list, eager=eager)
>>> assert len(annotmatch_rowid_list) == len(annotmatch_rowid_list)
"""
id_iter = annotmatch_rowid_list
colnames = (ANNOTMATCH_ROWID,)
annotmatch_rowid_list = ibs.db.get(
const.ANNOTMATCH_TABLE,
colnames,
id_iter,
id_colname='rowid',
eager=eager,
nInput=nInput,
)
return annotmatch_rowid_list
[docs]@register_ibs_method
def get_annotmatch_rowid_from_superkey(
ibs, aid1_list, aid2_list, eager=True, nInput=None
):
r""" annotmatch_rowid_list <- annotmatch[aid1_list, aid2_list]
Args:
superkey lists: aid1_list, aid2_list
Returns:
annotmatch_rowid_list
TemplateInfo:
Tgetter_native_rowid_from_superkey
tbl = annotmatch
"""
colnames = (ANNOTMATCH_ROWID,)
# FIXME: col_rowid is not correct
params_iter = zip(aid1_list, aid2_list)
andwhere_colnames = [ANNOT_ROWID1, ANNOT_ROWID2]
annotmatch_rowid_list = ibs.db.get_where_eq(
const.ANNOTMATCH_TABLE,
colnames,
params_iter,
andwhere_colnames,
eager=eager,
nInput=nInput,
)
return annotmatch_rowid_list
[docs]@register_ibs_method
@accessor_decors.getter_1to1
def get_annotmatch_tag_text(ibs, annotmatch_rowid_list, eager=True, nInput=None):
r""" annotmatch_tag_text_list <- annotmatch.annotmatch_tag_text[annotmatch_rowid_list]
gets data from the "native" column "annotmatch_tag_text" in the "annotmatch" table
Args:
annotmatch_rowid_list (list):
Returns:
list: annotmatch_tag_text_list
TemplateInfo:
Tgetter_table_column
col = annotmatch_tag_text
tbl = annotmatch
Example:
>>> # ENABLE_DOCTEST
>>> from wbia.control.manual_annotmatch_funcs import * # NOQA
>>> ibs, config2_ = testdata_annotmatch()
>>> annotmatch_rowid_list = ibs._get_all_annotmatch_rowids()
>>> eager = True
>>> annotmatch_tag_text_list = ibs.get_annotmatch_tag_text(annotmatch_rowid_list, eager=eager)
>>> assert len(annotmatch_rowid_list) == len(annotmatch_tag_text_list)
"""
id_iter = annotmatch_rowid_list
colnames = (ANNOTMATCH_TAG_TEXT,)
annotmatch_tag_text_list = ibs.db.get(
const.ANNOTMATCH_TABLE,
colnames,
id_iter,
id_colname='rowid',
eager=eager,
nInput=nInput,
)
return annotmatch_tag_text_list
[docs]@register_ibs_method
@accessor_decors.getter_1to1
def get_annotmatch_evidence_decision(ibs, annotmatch_rowid_list, eager=True, nInput=None):
r"""
gets data from the "native" column "annotmatch_evidence_decision" in the "annotmatch" table
Args:
annotmatch_rowid_list (list):
Returns:
list: annotmatch_evidence_decision_list
TemplateInfo:
Tgetter_table_column
col = annotmatch_evidence_decision
tbl = annotmatch
Example:
>>> # ENABLE_DOCTEST
>>> from wbia.control.manual_annotmatch_funcs import * # NOQA
>>> ibs, config2_ = testdata_annotmatch()
>>> annotmatch_rowid_list = ibs._get_all_annotmatch_rowids()
>>> eager = True
>>> decisions = ibs.get_annotmatch_evidence_decision(annotmatch_rowid_list, eager=eager)
>>> assert len(annotmatch_rowid_list) == len(decisions)
"""
id_iter = annotmatch_rowid_list
colnames = (ANNOTMATCH_EVIDENCE_DECISION,)
annotmatch_evidence_decision_list = ibs.db.get(
const.ANNOTMATCH_TABLE,
colnames,
id_iter,
id_colname='rowid',
eager=eager,
nInput=nInput,
)
return annotmatch_evidence_decision_list
[docs]@register_ibs_method
@accessor_decors.getter_1to1
def get_annotmatch_count(ibs, annotmatch_rowid_list, eager=True, nInput=None):
id_iter = annotmatch_rowid_list
colnames = (ANNOTMATCH_COUNT,)
return ibs.db.get(
const.ANNOTMATCH_TABLE,
colnames,
id_iter,
id_colname='rowid',
eager=eager,
nInput=nInput,
)
[docs]@register_ibs_method
@accessor_decors.setter
@register_api('/api/match/confidence/', methods=['PUT'])
def set_annotmatch_confidence(
ibs, annotmatch_rowid_list, annotmatch_confidence_list, duplicate_behavior='error'
):
r""" annotmatch_confidence_list -> annotmatch.annotmatch_confidence[annotmatch_rowid_list]
Args:
annotmatch_rowid_list
annotmatch_confidence_list
TemplateInfo:
Tsetter_native_column
tbl = annotmatch
col = annotmatch_confidence
"""
id_iter = annotmatch_rowid_list
ibs.db.set(
const.ANNOTMATCH_TABLE,
(ANNOTMATCH_CONFIDENCE,),
annotmatch_confidence_list,
id_iter,
duplicate_behavior=duplicate_behavior,
)
[docs]@register_ibs_method
@accessor_decors.setter
def set_annotmatch_posixtime_modified(
ibs,
annotmatch_rowid_list,
annotmatch_posixtime_modified_list,
duplicate_behavior='error',
):
r""" annotmatch_posixtime_modified_list -> annotmatch.annotmatch_posixtime_modified[annotmatch_rowid_list]
Args:
annotmatch_rowid_list
annotmatch_posixtime_modified_list
TemplateInfo:
Tsetter_native_column
tbl = annotmatch
col = annotmatch_posixtime_modified
"""
id_iter = annotmatch_rowid_list
colnames = (ANNOTMATCH_POSIXTIME_MODIFIED,)
ibs.db.set(
const.ANNOTMATCH_TABLE,
colnames,
annotmatch_posixtime_modified_list,
id_iter,
duplicate_behavior=duplicate_behavior,
)
[docs]@register_ibs_method
@accessor_decors.setter
@register_api('/api/match/user/', methods=['PUT'])
def set_annotmatch_reviewer(
ibs, annotmatch_rowid_list, annotmatch_reviewer_list, duplicate_behavior='error'
):
r""" annotmatch_reviewer_list -> annotmatch.annotmatch_reviewer[annotmatch_rowid_list]
Args:
annotmatch_rowid_list
annotmatch_reviewer_list
TemplateInfo:
Tsetter_native_column
tbl = annotmatch
col = annotmatch_reviewer
"""
id_iter = annotmatch_rowid_list
colnames = (ANNOTMATCH_REVIEWER,)
ibs.db.set(
const.ANNOTMATCH_TABLE,
colnames,
annotmatch_reviewer_list,
id_iter,
duplicate_behavior=duplicate_behavior,
)
[docs]@register_ibs_method
@accessor_decors.setter
@register_api('/api/match/tags/', methods=['PUT'], __api_plural_check__=False)
def set_annotmatch_tag_text(
ibs, annotmatch_rowid_list, annotmatch_tag_text_list, duplicate_behavior='error'
):
r""" annotmatch_tag_text_list -> annotmatch.annotmatch_tag_text[annotmatch_rowid_list]
Args:
annotmatch_rowid_list
annotmatch_tag_text_list
TemplateInfo:
Tsetter_native_column
tbl = annotmatch
col = annotmatch_tag_text
"""
id_iter = annotmatch_rowid_list
colnames = (ANNOTMATCH_TAG_TEXT,)
ibs.db.set(
const.ANNOTMATCH_TABLE,
colnames,
annotmatch_tag_text_list,
id_iter,
duplicate_behavior=duplicate_behavior,
)
[docs]@register_ibs_method
@accessor_decors.setter
@register_api('/api/match/decision/evidence/', methods=['PUT'])
def set_annotmatch_evidence_decision(
ibs,
annotmatch_rowid_list,
annotmatch_evidence_decision_list,
duplicate_behavior='error',
):
id_iter = annotmatch_rowid_list
colnames = (ANNOTMATCH_EVIDENCE_DECISION,)
ibs.db.set(
const.ANNOTMATCH_TABLE,
colnames,
annotmatch_evidence_decision_list,
id_iter,
duplicate_behavior=duplicate_behavior,
)
[docs]@register_ibs_method
@accessor_decors.setter
@register_api('/api/match/count/', methods=['PUT'])
def set_annotmatch_count(
ibs, annotmatch_rowid_list, annotmatch_count_list, duplicate_behavior='error'
):
id_iter = annotmatch_rowid_list
colnames = (ANNOTMATCH_COUNT,)
ibs.db.set(
const.ANNOTMATCH_TABLE,
colnames,
annotmatch_count_list,
id_iter,
duplicate_behavior=duplicate_behavior,
)
if __name__ == '__main__':
"""
CommandLine:
xdoctest -m wbia.control.manual_annotmatch_funcs
"""
import xdoctest
xdoctest.doctest_module(__file__)


The basics of understanding CNC, one chapter at a time
In 2011, Edward designed and released Project Shapeoko via Kickstarter. Shapeoko has become one of the most popular desktop CNC machines on the market and continues to be a market leader and trendsetter.
In 2014, Edward co-founded Carbide 3D - a company that specializes in the design and production of desktop manufacturing equipment such as the Shapeoko and Nomad lines of CNC machines.
At Carbide 3D, Edward leads the Shapeoko product line and develops other great desktop manufacturing software and equipment.


In general, the format of a source line is as follows:
[label[:]] [repeat] [operation [operands]] [comment]
The fields should be separated by spaces or tabs.
Labels should start in the first column and are case-sensitive: 'Start' is different from 'start'. The : (colon) is ignored.
In general, labels must not be used with assembler commands. Putting a label before IF, IFDEF, DEFINE, MACRO, WHILE, REPEAT, ENDMACRO, ENDWHILE, INCLUDE and so on will make Sjasm not recognize the command.
The repeat field is used to specify how many times the operation should be executed and should be specified within square brackets ('[' and ']'). The default is one time. Most assembler commands do not allow a repeat count.
The operation is an instruction mnemonic or an assembler command and must not start in the first column. The operation should be in the same case: 'add' and 'ADD' are recognized, but 'Add' is not.
Most instructions and commands operate on one or more operands, which should be separated by commas most of the times.
The following example uses all fields:
MulBy8: [3] add a, a ; a=a*8
The assembler ignores comments. Sjasm supports two kinds of comments: line based and block based. A line based comment starts with a ; (semicolon) or a C++-like // (double slash) and ends at the end of the line. A comment may start anywhere on the source line, also on column one:
; comment ld a,7 // comment
The C-like block comment uses /* to indicate the start and */ to indicate the end of a comment. These block comments may be nested and expanded over more lines. Block comments are replaced with a space character. Some examples:
ld /* comment */ a,80 /* /* nested comment */ */ ld/* this will be ld a,3 */a,3
The \ (backslash) is used as line operator. If it is placed at the end of a line (but before the comment field), the next line extends the current line:
MulBy8: \ [3] \ add \ ; backslash at the end of a line, as comments are ignored a, a ; a=a*8
When the \ is used in the middle of a line, it indicates the start of a new line:
Maal8: add a,a\ add a,a\ add a,a ; a=a*8
Note the space after the backslash; it is needed here because the operation field must not start in column one.
The >< (angle brackets) operator removes any spaces or tabs:
l >< d a,3
becomes:
ld a,3
To use this operator inside strings, precede the string with a @ (at):
byte @'hi >< mom!'
becomes:
byte 'himom!'
This is useful for use in macros, to generate label names.
When you want to repeat an instruction a couple of times, you can specify how many times the instruction should be executed within square brackets ('[' and ']').
So instead of this:
inc hl inc hl add a,a add a,a add a,a add a,a
you could program this:
[2] inc hl [4] add a,a
You can use % (percent sign) to get the current iteration, starting with 0.
So
[4] add a,%
is the same as:
add a,0 add a,1 add a,2 add a,3
% Might be more useful when you use it to define data.
You can repeat the repeat field, and use %%, %%% and so on the get the repeat count of the outer loops:
[2][3]byte %,%%
is the same as:
byte 0,0 byte 1,0 byte 2,0 byte 0,1 byte 1,1 byte 2,1


Click on the buttons in order to show or hide the details and tips of the challenge ideas.
{{challenge.about}}


Move over
Google Calendar adds the ability to move events between calendars
Currently rolling out via a server-side switch.
by Jason EnglandWhat you need to know
- The ability to copy an event from one calendar to another is rolling out to Google Calendar.
- Previously, you had the options to copy or duplicate but that required deleting the original event.
- It is a server-side change, but some have had luck triggering it by force quitting the app and clearing the cache.
Managing multiple calendars with the Google Calendar Android app has always posed a bit of a challenge when needing to move an event from one to the other. Previously, if you had an event you wanted to move, you could copy or duplicate it to the other calendar. While that was convenient, it still required the extra step of deleting the original event.
Thankfully, that's all about to change, thanks to a new update that is currently rolling out for the app. With the ability to move the event, you'll no longer need to take this extra step in the future. Simply move the event from one calendar to the next, and move on with your day. For example, if you manage your work and personal calendar from your phone, you'll now be able to move an event from one to the other.
Buy one Galaxy S10 or Note 10 and get one free at Verizon
The update is being rolled out via a server-side switch, meaning it is not currently live for all users, even if you have the latest version of the app. However, once it has rolled out to your phone, you'll be able to move events from one calendar to the next by following these steps.
Source: Android Police
- Choose the event you want to move
- Tap the edit button
- Use the calendar picker under the title to move the event
For anyone who has to manage multiple calendars, this will be a small change that makes using Google Calendar much more convenient. Even though it is currently rolling out via a server-side switch, you can try to speed up the process by force quitting the app and clearing its cache. Android Police notes that helped trigger the change on some devices for them, but most likely you'll have to be patient and wait for the feature to roll out.
Google Calendar: Everything you need to know!
We may earn a commission for purchases using our links. Learn more.


Visual Analysis Tool of Qualitative Eligibility Criteria of Clinical Studies (VATEC)
{% endblock %}
{%block body%}
Analyzing, please wait (normally within 30 seconds)...
{% if distribution_numeric_features %}
Condition: {{disease}} Number of UMLS terms: {{num_cui_with_disease}} Number of Clinical Trials: {{num_trials_with_disease}}
Filter applied on Clinical Trials:
{% for key in filter_dict %}
{{key}}: {{filter_dict[key]}}
{% endfor %}
UMLS term
CUI
Semantic group
Semantic type
Frequency
{% for name, sty, cui, freq,sty_desc,group in distribution_numeric_features %}


Man’s body found in Creek in Oregon
PORTLAND, Ore. (AP) - Authorities are investigating the death of a man whose body was found in an Oregon creek.
KOIN-TV reports Washington County Sheriff’s Office deputies responded to Cedar Mill Creek in the Beaverton area where the body was found Saturday afternoon.
The Sheriff’s Office says the deceased man was found about 100 feet downstream of a waterfall.
The body was recovered from the creek.
Official say it’s unclear foul play was involved in the man’s death.
The medical examiner’s office is working to determine the cause and manner of death, as well as identify the body.
Information from: KOIN-TV, http://www.koin.com/
Sign up for Daily Newsletters
Copyright © 2019 The Washington Times, LLC.
Please read our comment policy before commenting.


MadelineMadeline grew up in Seattle. She moved to Dallas, Texas for a journalism internship and ended up staying there for four years. After gaining skills in storytelling, photojournalism and videography she applied to work at Apple retail the day after Steve Jobs passed. She started working as a technician but soon became a trainer, working with other people and their creative projects, facilitating workshops and kids field trips. Now that she is back home she wants to help improve software for people with accessibility needs and continue to expose more kids to coding.
Valor
Our Mission
Project Valor is a tool built for the veterans of Washington State and can act as a resource for the Washington State Department of Veteran's Affairs. Valor can be used to locate the nearest facilities to the veteran's location and displays average wait times of each facility. We did this with publicly accessible information from the VA.
This tool can be used to make sure veterans, no matter where they live, have the information to choose the location that best serves their needs. Whether it is the nearest location or the lowest wait time.
Valor can show where facilities are understaffed, where the size of the facility is not enough for the needs of veterans, and where new facilities should be built to be able to positively impact the most veterans in need.
Locations
Enter your zip code in the box below to find the nearest facility to you.
Resources
Below is a quick list of resources that are available to you or your family. Click on the link to go to the page.
PTSD
Some VA centers have specialty programs for PTSD.
https://www.ptsd.va.gov/public/treatment/therapy-med/finding-a-therapist.aspCourage Beyond (formerly Not Alone) is a national non-profit organization that provides confidential, no-cost programs and services to warriors and their families facing post traumatic stress disorder (PTSD) and combat stress.
www.couragebeyond.orgWounded Warrior Project® (WWP) serves veterans and service members who incurred a physical or mental injury, illness, or wound, co-incident to their military service on or after September 11, 2001 and their families.
https://www.woundedwarriorproject.org/programs/combat-stress-recovery-program
MST
Military sexual trauma (MST) is the term that the Department of Veterans Affairs uses to refer to sexual assault or repeated, threatening sexual harassment that occurred while the Veteran was in the military.
https://www.mentalhealth.va.gov/msthome.aspWounded Warrior Project® (WWP) serves veterans and service members who incurred a physical or mental injury, illness, or wound, co-incident to their military service on or after September 11, 2001 and their families.
https://www.woundedwarriorproject.org/mst-resourcesNeed help? Call 800.656.HOPE (4673) to be connected with a trained staff member from a sexual assault service provider in your area.
https://www.rainn.org/about-national-sexual-assault-telephone-hotline
TBI
BrainLineMilitary.org provides military-specific information and resources on traumatic brain injury to veterans, service members in the Army, Navy, Air Force, Marines, National Guard, Reserve, and their families.
www.brainlinemilitary.orgDVBIC's mission is to serve active-duty military, their beneficiaries, and veterans with traumatic brain injury through state-of-the-science clinical care, innovative clinical research initiatives and educational programs, and support for force health protection services
http://dvbic.dcoe.mil/As part of the Military Health System, Defense Centers of Excellence for Psychological Health and Traumatic Brain Injury improves the lives of our nation's service members, veterans and their families by advancing excellence in psychological health and traumatic brain injury prevention and care. The DCoE offers resources for health care providers, service members, veterans and military families.
http://www.militaryonesource.mil/footer?content_id=287825
Depression and Suicide Prevention
The caring responders at the Veterans Crisis Line are specially trained and experienced in helping Veterans of all ages and circumstances. Some of the responders are Veterans themselves and understand what Veterans and their families and friends have been through and the challenges Veterans of all ages and service eras face.
https://www.veteranscrisisline.net/Resources/Additional-Information.aspxStop Soldier Suicide provides support and resources to all past and present military and their families. We do not provide direct clinical services or therapy, nor are we a crisis center.
http://stopsoldiersuicide.org/The Veterans Crisis Line connects Veterans in crisis and their families and friends with qualified, caring Department of Veterans Affairs responders through a confidential toll-free hotline, online chat, or text.
https://www.veteranscrisisline.net/
About Us
Ian My name is Ian Waites - I came to Code Fellows to learn JavaScript! So far it has been an amazing experience. When I am not at Code Fellows I love spending time with my fiance and my dogs.
Kyle Hello, my name is Kyle Richmond. I was born in Fort Wayne, IN and have lived in Seattle for 4 years. I have a background in organizational leadership and supervision with a focus on training and development. I was running 3 tax offices for a little over 3 years. My offices were closed by corporate headquarters due to the advent of being able to do taxes yourself on your mobile device. It is tough to compete with software that allows you to file your taxes by taking pictures of your documents and having a tax software do all of the work for you. I decided that maybe I needed to learn those skills and make them work for me. I found Code Fellows and have started a new path as a full stack software developer.


Ethnologue puts the number of native speakers at almost 1.2 billion native speakers, roughly a billion of whom speak Mandarin — but there is no doubt of its clout. If you wish to learn a language that one in six people in the world speak, this is the one for you.
Donec ullamcorper nulla non metus auctor fringilla. Vestibulum id ligula porta felis euismod semper. Praesent commodo cursus magna, vel scelerisque nisl consectetur. Fusce dapibus, tellus ac cursus commodo.
The relative ease with which English can be picked up (especially compared with Chinese) and the pervasive soft power of US culture mean that English will continue to dominate the world stage. For many who live in abject poverty, it is the ticket to, and symbol of, a better life.
Spoken mainly in northern India and parts of Pakistan, Hindi uses devnagri script while Urdu uses Persian notation. At the time of writing, the debate about its role in Indian education and society has once again flared up: Prime Minister Narendra Modi, a Hindu nationalist, is seeking to have Hindi displace English in the southern Indian states as the primary language of official communication and education, a strategy that has met with resistance.
Modern Standard Arabic is a primarily written form, closely related to the Classical Arabic of the Quran. However, the spoken forms of Arabic in, say, Oman and Morocco are so different that a couple of philosophy professors from these countries might be able to discuss the finer points of the ancient texts while struggling to order lunch.
Avid Portuguese traders and conquerors brought their language to 215 million native speakers, in Brazil, Goa, Angola, Mozambique, Cape Verde, Guinea-Bisseau, São Tomé and Príncipe, and Macau. They also brought the ability to do wonderful things with a soccer ball.
The Partition of Bengal by the British in 1947 divided (mainly Hindu) West Bengal, now part of India, from its (mainly Muslim) counterpart East Bengal, now Bangladesh.
With roughly 170 million native speakers as of 2010, Russian is the eighth most spoken language in the world. Famed for its inscrutable grammar and quite lovely Cyrillic script, it remains one of the six languages spoken in the UN.
Japanese boasts two distinct writing systems, hirogana and katakana, as well making extensive use of Chinese Kanji characters. The largest groups living outside Japan can be found in the US, the Philippines, and Brazil.


n
E
X
T
Be Productive
Download
Documentation
Github
Download for MacOS
Linux Port Under Development
Download Source