text:
# Keystroke Countdown

This is the source for a static site generator that generates my personal blog,
[keystrokecountdown.com](http://keystrokecountdown.com). It uses [metalsmith.io](http://metalsmith.io) as its
engine. The site generates HTML files from Markdown text files and IPython notebook files. For rendering, I use:

* [Remarkable](https://github.com/jonschlinkert/remarkable) for Markdown processing
* [notebookjs](https://github.com/jsvine/notebookjs) for IPython processing
* [KaTex](https://github.com/Khan/KaTeX) for math typesetting (faster than MathJax)

The inclusion of KaTex allows me to embed math equations in a Markdown post. This can be done in two ways, as a
separate block or inline in Markdown text. First, separate block:

```
$$
y = \frac{\sum x^2}{\sum (x - \bar x)^2}
$$
```
Next, inline math: \\\\(E = mc^2\\\\). The above should render something like:

![](images/blockMath.png)

The line with the inline math should look something like this:

![](images/inlineMath.png)

Sorry for the images, but Github's own [markup](https://github.com/github/markup/issues/274) code base does not
support math typesetting at this time.

## Thanks

I heavily borrowed from what others were doing in this area. In particular, I learned much from two blogs with
Github repos:

* [blakeembrey.com](http://blakeembrey.com)
* [mrkiffie.com](http://mrkiffie.com)

And though at times I had to jump into code in `./node_modules` to see what was going on, a big thanks to
the developers of [metalsmith.io](http://metalsmith.io) and the developers of the various Metalsmith plugins I
use.

Feel free to fork this repo and reuse what you want for your own blog.

# Installation

The blog building script (`build`) is in Javascript so it requires [Node](https://nodejs.org) to run. It should
work with the latest version, but I'm currently using v9.5.0 on macOS High Sierra (10.13.3). The only other
dependdency is on the [ImageMagick](http://formulae.brew.sh/formula/imagemagick@6) image manipulation software
since the blog building script depends on the
[imagemagick-native](https://www.npmjs.com/package/imagemagick-native) NPM package for scaling images embedded
in the posts. For now, I must use v6 of ImageMagick as the NPM package does not support v7.

# New Posts

In my blog, all posts are under the `src/articles` directory. I first create a new directory to host the
posting, then I create a new `index.md` within the new directory (can be named anything ending with an `md`
extension ). If necessary, I add image files to the directory and then reference them without any path info in
the Markdown text. For example:

```
This is my new car: ![new car](newCar.jpg)
```

In the `index.md` file, I populate the preamble that contains the metadata that describes the new post. Here is
the preamble for one of my posts:

```
---
title: Power of Optimal Algorithm Design
description: A brief look at how a simple choice in algorithm implementation can greatly affect performance.
date: 2016-05-01 12:18:02+01:00
author: Brad Howes
tags: Algorithms
layout: post.hbs
image: power.png
---
```

# Generating Site

To generate static pages from what is found in `src`, do

```sh
node build
```

After generating the pages, this will start up a simple web server at `localhost:7000` at which you can connect
via a browser to view the blog site. To just build without the server, use `-n` option. Also, there is a
*production* build mode which is subtly different than the normal *development* build. This happens with the
addition of the `-p` option.

## Rebuilding on File Change

There is an existing plugin -- [metalsmith-watch](https://www.npmjs.com/package/metalsmith-watch) -- which will
instantiate a rebuild of generated artifacts when source elements change. Unfortunately, it does this in the
same context as the initial build. As a result, one must be careful with plugins and one's own processing and
discard any previous state. I was encountering problems with this -- specifically, the conversion from IPython
to HTML was creating clones during each rebuild -- so I opted for a much simpler approach: rebuild everything in
a new context. To do so, I simply refactored `build.js` to contain everything inside a `run` function. Next, I
used a [gazer](https://www.npmjs.com/package/gazer) to watch for changes in a set of paths. When `gazer`
detected a change in one or more files, the code stages a new call to the `run` function.

```javascript
.use(ifFirstTime(function(files, metalsmith, done) {

    // Watch for changes in the source files.
    //
    var paths = [
        "src/**/*.+(ipynb|md)", // HTML source files
        "src/css/**/*",         // CSS and font files
        "src/js/**/*",          // Javascript files
        "templates/**/*"        // Handlebar templates and partials
    ];

    if (typeof metalsmith["__gazer"] == "undefined") {

        // Need to create a new file watcher
        //
        var pendingUpdate = false;
        var updateDelay = 100; // msecs

        console.log("-- watcher: starting");
        metalsmith.__gazer = new Gaze(paths);
        metalsmith.__gazer.on("all", function(event, path) {
            console.log("-- watcher:", path, event);
            if (pendingUpdate) {
                clearTimeout(pendingUpdate);
            }
            pendingUpdate = setTimeout(function() {
                console.log("-- watcher: rebuilding");
                run(false);
                console.log("-- watcher: done");
            }, updateDelay);
        });
    }

    return done();
}))
```

This works fine, but it is of course expensive to do when there are many files to rebuild. However, the watching
is only useful to me for development of the site, and a subset of sources could always be had if rebuild times
were becoming too large.

# Data Model

When the `metalsmith.io` processing engine runs, it propagates a `data` object for each Markdown (`*.md`) or
IPython notebook (`*.ipynb`) file it finds under `./src`. The `data` object contains metadata accrued during the
various processing steps. One of the last processing steps involves converting
[Handlebars](https://github.com/wycats/handlebars.js/) templates into HTML files.

All of these templates take information from the `data` metadata object that corresponds to the Markdown or
IPython source file. They also use information found in the `site` object that contains metadata associated with
the blog site itself. Here are the specific items that are referenced:

From the `site` definition:

| Name | Definition |
| ---- | ---------- |
| `site.url` | URL for the site (`http://keystroke.com`) |
| `site.title` | The title of the site (Keystroke Countdown) |
| `site.description` | Short description of the blog site |
| `site.author.name` | My name (Brad Howes) |
| `site.author.bio` | Short description of myself |
| `site.author.image` | An image file for the author, shown in a circle at the bottom of the page |
| `site.author.location` | Where I am currently located (Paris, France) |
| `site.author.website` | I use this to show my LinkedIn link |

From the source document's metadata:

| Name | Definition |
| ---- | ---------- |
| `title` | The `title` metadata from the preamble of the soure file. Sets both the browser window **and** the first heading of the page |
| `date` | When the article was written |
| `formattedDate` | Formatted representation of the `date` value (in MONTH DAY, YEAR format) |
| `image` | Optional relative URL pointing to a JPEG or PNG file to use as the banner for the page |
| `layout` | Handlebars template to use for rendering |
| `description` | Used to set the `<meta name "description">` HTML tag in the generated HTML file |
| `tags` | Comma-separated list of tags associated with the article |
| `contents` | The body of the article or IPython notebook |
| `relativeURL` | The partial URL of the page (minus the `hostname:port`). Always starts with a `/` character |
| `absoluteURL` | Concatenation of the `site.url` and the `relativeURL` |
| `url` | Same as `relativeURL`. This is used by the RSS feed generator |
| `snippet` | Optional text that contains the first 280 or so characters from the source material |

Most of the above have defaults that will be used, or alternatively the generated HTML will account for a
missing value.

## Collections

The [metalsmith-collections](https://www.npmjs.com/package/metalsmith-collections) plugin generates an ordered
list of postings (sorted by date), and updates article `data` objects with `previous` and `next` links to each
other. The plugin also creates a `collections.articles` object which the `./templates/archive.hbs` uses to show
the reverse chronological list of articles and their links.

## Tags

The [metalsmith-tags](https://www.npmjs.com/package/metalsmith-tags) plugin scans the set of articles for `tag`
metadata and generates a mapping of tag values to articles. For each tag, it also creates a new build object
with a URL specific for the tag (e.g. `topics/foobar.html` for the tag `foobar`).

Presumably, this second group of build objects matching the pattern `topics/*.html` could be collected using the
`metalsmith-collections` object, but I opted instead to do this step myself with the following snippet taken
from the `build.js` file:

```javascript
.use(function(files, metalsmith, done) {

    // Generate an array of tag objects alphabetically ordered in case-insensitive manner. Also, add to
    // each tag object an `articleCount` with the number of articles containing the tag, and a `tag`
    // attribute containing the tag value.
    //
    var sortedTags = [];
    var tags = metalsmith.metadata()["tags"];
    Object.keys(tags).forEach(function(tag) {
        var count = tags[tag].length;
        tags[tag].articleCount = count;
        tags[tag].tag = tag;
        sortedTags.push([tag.toLowerCase(), tags[tag]]);
    });

    // Sort the lower-case tags
    //
    sortedTags.sort(function(a, b) {return a[0].localeCompare(b[0]);});

    // Save the array of tag objects that are properly ordered
    //
    metalsmith.metadata()["sortedTags"] = sortedTags.map(function(a) {return a[1];});

    // Revise article metadata so that each tag is the tag object, and if there is no image, use
    // a default one from the home page.
    //
    Object.keys(files).forEach(function(file) {
        var data = files[file];
        if (! data["image"]) {
            data["image"] = "/computer-keyboard-stones-on-grass-background-header.jpg";
        }

        if (data["tags"] && data["tags"].length) {
            data["tags"] = data["tags"].map(function(a) {return tags[a];});
        }
    });

    return done();
})
```

# Templates

For the site, there are five distinct page styles, each one with their own template:

* `./templates/about.hbs` -- generates a web page that talks about me
* `./templates/archive.hbs` -- generates a web page that shows a chronological list of articles starting with the
  most recent
* `./templates/post.hbs` -- generates an article from a Markdown file or IPython notebook
* `./templates/tag.hbs` -- shows a list of articles associated with one tag
* `./templates/tags.hbs` -- shows all of the tags found in the article metadata

## Partials

There is some duplication among the Handlebar templates, but most of the common HTML material is found in the
`./templates/partials` directory. These are snippets of template code that can be shared amoung the template
files. To use them, one uses the Handlebar include construct:

```
{{>foo}}
```

where `foo` is the name of the partial to insert.

There are currently seven partials:

| Name | Definition |
| ---- | ---------- |
| `author.hbs` | Shows information about the author (me) as well as links for sharing of the post on social media sites |
| `footer.hbs` | Shows copyright info at the bottom of the page |
| `header.hbs` | Shows banner image and navigation menu |
| `html-head.hbs` | Defines the page's metadata (`meta` tags) and CSS stylesheets to use |
| `navigation.hbs` | Defines the contents of the navigation menu shown on the right of the page |
| `scripts.hbs` | Contains the Javascript files to load after the HTML body contents |
| `title.hbs` | Generates the first heading of the page that contains the article's title |

## Helpers

Nearly all of the data necessary for HTML generation is available from the above `data` or `site` sources.
However, there are a few cases where one must dynamically determine content. I only need the services of three
Handlebar helpers -- functions that Handle bar will invoke when requested to assist in generating HTML output.

| Name | Definition |
| ---- | ---------- |
| `encode` | Run `encodeURIComponent` on a given URL fragment |
| `date` | Format a date value, either one that is given or the current time when generating HTML |
| `asset` | Generate a relative URL for a given CSS or Javascript file |

# Remarkable Customizations

The [Remarkable](https://github.com/jonschlinkert/remarkable)  processor for Markdown  is great utility,  but it
does have  some limitations. First, the  'fence' processing was  too limiting for  my taste -- in  particular, I
could not easily adapt  it to use [Prism](https://prismjs.com) for highlighting code or  console output. I could
get it to  run OK from within the  user's browser, but the whole point  of having a static site  was to minimize
amount of processing done by the browser.

Here is the snippet of code that initializes the Remarkable object that does the Markdown processing:

```javascript
const md = new Remarkable("full", markdownOptions)
  .use(katexPlugin)
  .use(require("./codeFence.js"))
  .use(require("./consoleFence.js"))
  .use(require("./graphFence.js"));
```

The three custom `use` injections are described below.

## Custom Static Prism Highlighting

Below is my adaptation of the `fence` function that resides in Remarkable. It simply enables highlighing of
fenced text before adding it to the rendered output. Since it usually involves code, I put it in the
`codeFence.js` file, but this is more of a misnomer since it applies to all fence blocks that are not handled by
another fence type handler (see below).

```javascript
const escapeHtml = require("./escapeHtml.js");

// Tweaked version of stock Remarkable code fence renderer that works with Prism as a highlighter.
//
module.exports = (md, options) => {
  md.renderer.rules.fence = (tokens, idx, options, env, instance) => {
    const token = tokens[idx];
    const langPrefix = options.langPrefix;

    let langName = '', fences, langClass = '';
    if (token.params) {

      // ```foo bar
      //
      // Try custom renderer "foo" first. That will simplify overwrite for diagrams, latex, and any other fenced
      // block with custom look
      //
      fences = token.params.split(/\s+/g);
      if (instance.rules.fence_custom.hasOwnProperty(fences[0])) {
        return instance.rules.fence_custom[fences[0]](tokens, idx, options, env, instance);
      }

      langName = fences.join(' ');
      langClass = ' class="' + langPrefix + langName + '"';
    }

    let highlighted;
    if (options.highlight) {
      highlighted = options.highlight.apply(options.highlight, [ token.content ].concat(fences))
        || escapeHtml(token.content);
    } else {
      highlighted = escapeHtml(token.content);
    }

    return '
' + highlighted + '
\n';
  };

  return md;
};
```

## Console Output

I have a need to show Unix commands and their output in my blog postings. Prism and friends have a nice way to
do this -- though not without some customization on my part:
see [Formatting Console Output](https://keystrokecountdown.com/articles/console/index.html).

```javascript
const escapeHtml = require("./escapeHtml.js");

// Custom fence block render used when 'prompt' follows the beginning of the block -- ```prompt
//
// Emits the contents of the fence block wrapped in <pre> and <code> elements. The <pre> element has classes
// `command-line` and `language-console` in order to take advantage of the `command-line` plugin from Prism code
// colorizing library. Additional text after the `prompt` tag will appear in the <pre> tag as attributes,
// presumably ones that `command-line` understands.
//
module.exports = (md, options) => {
  md.renderer.rules.fence_custom.console = (tokens, idx, options, env, instance) => {
    const token = tokens[idx];
    const body = token.content.replace(/(^\s+|\s+$)/g,''); // strip leading/trailing whitespace
    let lines = body.split('\n');
    const bits = token.params.split(/\s+/g);
    let args = bits.length > 1 ? bits.slice(1) : [];
    if (args.length > 0) args = args[0].split(',');

    let demo = false;
    if (args.length > 0 && args[0] == "-d") {
      args = args.slice(1);
      demo = true;
    }

    const prompt = args.length > 0 ? args[0] : '%';
    const lang = 'language-' + (args.length > 1 ? args[1] : 'console');

    const promptOut = '<span data-prompt="' + prompt + '"></span>';
    let output = '<pre class="' + lang + '"><code class="' + lang + '"><span class="command-line-prompt">';

    for (let i = 0; i < lines.length; ++i) {
      const line = lines[i];
      if (demo) {
        if (args.length == 1 || i == 0) {
          output = output + promptOut;
        }
        else {
          output = output + '<span data-prompt=" "></span>';
        }
      }
      else if (line.slice(0, prompt.length) == prompt) {
        lines[i] = '<span class="command-line-command">' + escapeHtml(line.slice(prompt.length + 1)) +
          '</span>';
        output = output + promptOut;
      }
      else {
        lines[i] = escapeHtml(line);
        output = output + '<span data-prompt=" "></span>';
      }
    }

    return output + '</span>' + lines.join('\n') + '</code></pre>';
  };

  return md;
};
```

## Embedded SVG Graphics

Sometimes, I wish to draw something in a textual form that I can then render as a pretty picture. Editing the
text is fairly easy whereas editing a graphic is much more cumbersome to get into a format that is suitable for
the web. Enter the `viz.js` package (or hack per the author) which brings the power
[Graphviz](http://www.graphviz.org) to browsers and static site generators.

An older version worked just fine, but recent updates made it difficult to use with Remarkable due to how it
manages asynchronicity. However, I was able to get it working reasonably well by adding some Promise support to
Remarkable and my `build.js` script. I added a `addPromise` method to the Remarkable instance which records
promises of future rendering output. These are stored under `placeholder` token which is also injected into the
rendered HTML output.

```javascript const Viz = require('viz.js'); const { Module, render } =
require('viz.js/full.render.js');

// Custom fence processor for "```graph" blocks.
//
module.exports = (md, options) => {
  md.renderer.rules.fence_custom.graph = (tokens, idx, options, env, instance) => {
    const token = tokens[idx];
    const title = token.params.split(/\s+/g).slice(1).join(' ');
    const viz = new Viz({ Module, render });
    const promise = viz.renderString(token.content);
    const placeholder = instance.addPromise(token.content, promise);
    return '
' + placeholder + '
' + title + '

';
  };

  return md;
};
```

In the `processMarkdown` function of my `build.js` file, I process all promises with the following:

```javascript
// Generate HTML from the Markdown.
//
var contents = md.render(data.contents.toString());

// If the rendering left any promises, allow them to update the content with their resolved value.
//
for (let [placeholder, promise] of Object.entries(md.renderer.promises)) {
  promise.then(value => {
    contents = contents.replace(placeholder, value);
    return value;
  });
}

// Finally, when all promises are done, we update the metadata and signal Metalsmith to continue.
//
let allPromise = Promise.all(Object.values(md.renderer.promises));
allPromise.then(value => {
  data.contents = Buffer.from(contents);
  delete files[file];
  files[htmlPath] = data;
  done();
});
```

First, we replace each placeholder value with the actual value from the promise. Next, we wait for all promises
to be resolved, and then we update the Metalsmith records with the new HTML output. Finally, we signal Metalsmith
that we are done by calling the Metalsmith `done` sentinal function.

# Examples

## Home/Archive Page (/index.html)

Shows a list of articles in reverse chronological order.

![Home/Archive Page](images/Archive.png)

## About Me Page (/about/index.html)

Vanity page.

![About Me](images/About.png)

## IPython Import

Example of HTML generated from an IPython notebook.

![IPython](images/IPython.png)

# License

MIT


text:
1) Darn. I bet he was counting on it, too!
2) Flooding. Blizzards. Earthquakes in Indiana. The surest sign of the apocalypse? UConn lost in women's basketball!
3) He won't be boch.
4) MEMO
TO Texas
Get a fucking clue, already, will ya?
5) Neo-Cons will soon get a taste of their own medicine. Foaming up anti-Islam hate will always backfire.
6) It's hard to believe Haley Barbour is actually getting praise for this.
7) It's funny how she hasn't been able to conjure up proof of her non-denial denials.
8) Cenk Uygur: troublemaker. God bless him.
9) What a fucking idiot.
10) This may be taking the green debate to a whole new level. It's really shaving off nits.
1) Since when do three unnamed "sources" who, if they exist, have a clear axe to grind, become a major news item? Since the conservatives in America want to rape the working guy. Again.
2) Did I just blow your mind? DID I??????
3) How ridiculous are the folks protesting the Ground Zero cultural center? They've targeted Justin Bieber!
4) *crossing legs tightly*
5) Two women have served a total of 32 years for stealing $11. Gov. Haley Barbour has magnanimously granted them clemency. So long as one donates a kidney.
The Year In Rearview
Look, for my part, the year 2010 cannot go away fast or far enough.
Between the crappy cynical pandering by Teabaggers to the lowest common denominator of a minority of the American electorate to the health issues I dealt with to the fact that my mom is racing the end of the year to end first, this has been a pretty shitty ride.
So in my inimitable fashion, fuck the bad, let's focus on the good stuff!
1) Healthcare reform -- it was nasty business, it was exceedingly poorly handled, a blind kindergartener could have done a better job of promoting the benefits, but America joined the civilized world.
Sort of. There's a lot of room for improvement there, and one hopes in 2013, we will see it roll in.
2) The laughable joke that passes for "populism" -- From The Wicked Witch Of The West(ern Delaware) to Sharon Angle, the Teabaggers, while generally successful in electing minor candidates to federal posts, had an epic fail in terms of persuading the population that they are a serious political force to be reckoned with. My suspicion is they have blown their only real chance, however it's possible they may end up shooting the GOP in the foot. Sarah Palin, while moderately successful with her carefully chosen endorsements, was not the game changed she hoped to be and her final throes in 2010, trying to refudiate saying "refudiate" while gobs of tape proved her a self-involved liar, only served to nail the coffin shut on her presidential aspirations, such as they were.
3) Jon Stewart/Stephen Colbert and The Rally To Restore Sanity And/Or Fear -- A more delightful event could not have been planned by anyone else. While remaining strictly-- perhaps frustratingly-- non-partisan and entertaining...maybe the opening performance by The Roots could have been shorter, but there was probably some stuff going on that we didn't know about...Stewart and to an extent Colbert brought to the near-undivided attention of Americans the, um, divide that presents itself upon the electorate.
Some of this was necessary. Some of it smacked of patronization and even condescension (the attempt to make an equivalence between the teeth-bared partisanship of FOX with the balance of MSNBC was a little discomfiting from Stewart) but the entire event was at once eye-opening, refreshing and reassuring. We are America. We are Americans. From the Muslim selling the newspaper to the Sikh running the dry cleaner to the Korean driving the taxi to the Jewish doctor and Presbyterian lawyer, to the bald guy in the SUV with the gun rack driving next to the soccer mom in her Volvo in the Holland Tunnel, what unites us is truly more important than what divides us, and we ought to honor that.
4) The San Francisco Giants -- I don't plug baseball on my blog much but I am an huge fan of the game, and the Giants were a real American story: cast-offs and has-beens let go by other teams for a song played above their heads and collectively went from mutts to pedigrees. That they play for the gayest city in America is just a plus.
5) The repeal of DADT -- Well, what can I say? Harry Reid found his balls, and gave thousands of soldiers back theirs. And those are just the women!
6) Chilean Mine Rescue -- Really, why did it take a "third world" nation to show us in America how it's done? Good grief, it's CHILE! I know, I know, Chile is actually one of the most progressive nations on the planet, nevermind South America, and has much to show for themselves, but come ON!
7) The World Cup -- South Africa, indeed the entire African continent, deserves high marks for hosting the quadrennial meeting of men in shorts. Not only were the games held safely and securely, not only were old animosities put aside...I'm looking at you, Portugal and Spain!...not only were the Americans embarassed once again in a sport that the rest of the world deems "it", but the energy of the audiences and the nation were stunning enough that you could safely ignore the vuvuzelas.
From time to time.
Y'know, the temptation to round this out to a Top Ten list is strong, so I think story number 8 for good news this year is that I stopped the list at story number 7.
Wait...what?
Have a Happy New Year, my friends, my readers!
Some Shorters
Shorter Gary Bauer:
If America was a Muslim state, Muslims would still suck.
Shorter Tucker Carlson...seriously, can you GET shorter than TC? Anyway...
A President who supports dogkillers like Michael Vick ought to get the dogkiller killed. Right? But it's OK when I fuck up because I'm a Christian. Like Michael Vick.
An Abject Lesson
There's a follow up to the Northeastern Blizzard of 2010: cuts in services followed by deep unhappiness over, um, services:
With no snowplows in sight, stranded passengers vented their rage at Mayor Bloomberg.
"He should have gotten those plows out here," said Cynthia Jones, 43, a nurse unable to get to work. "The mayor may not need his paycheck, but we need ours. I lost two days' pay."
Sharon Tahir, 40, shivered at Archer Ave. and Sutphin Blvd. in Jamaica, Queens, because her Q60 bus route was shortened before her normal stop. The home health aide was waiting for her son to pick her up.
"It's too cold to walk the rest of the way," she said. "Many sidewalks aren't shoveled. My feet are cold."
Transit executives also expressed frustration with the city's street-clearing efforts.
"I've never seen it this bad," one executive said, speaking on the condition of anonymity. "They left us in the lurch."
MTA Chairman Jay Walder said the agency would do a full review of how it handled the blizzard. Officials want to probe why heavier hybrid buses struggled in the snow, whether buses had appropriate tires and whether more tires should have been covered in chains.
Now, before I get to the meat of my point, let me dispense with a few conditional factors involved. The storm hit the Sunday after what was pretty much a universal three day holiday weekend with many drivers on the road to visit family or celebrate Christmas. Many people who were coming home were racing to beat the storm, assuming that there would be a work day, albeit a difficult one, the next morning. In addition, many of those people were the very people who would be manning the snow removal efforts, the emergency services, and other vital functions required to get a city the size of New York up on its feet.
Too, I noted an unusual number of cars abandoned in the middle of the street. It's hard to get a plow down a street with a ton of metal between the plow and the other end. We citizens only have our fellow citizens to blame for those.
As I pointed out the other day, the timing of this storm could not have been much worse. Had it happened on Christmas day, a Saturday and a day typical for heavy snowfalls in the city for some odd reason (I blame HAARP, myself), there would have been another 24 hours prep time for the opening curtain to the work week.
Well, to sum up my point in a nutshell, we asked for lower taxes, we got lower taxes, and here's the price we pay. Mayor Bloomberg has been at the forefront of cutting property taxes, business income taxes, lowering city revenues as far as he possibly can, and cutting services to compensate. 300 Department of Sanitation drivers were "retired" during this recent budget slashing to help cover the shortfall. That's 150 snowplows that could have been on the street.
Ironically, the people who benefited the least from the tax cuts are the ones who suffered the most from the budget cuts: the poor and working classes. Just as with the inevitable health complications of this storm...imagine triaging in a major city? It happened!...the people who will suffer the most are the most disenfranchised.
In fairness to Mayor Mike, NYC is under a constitutional requirement for a balanced budget, a leftover from the dark days of the 1970s, when NYC teetered on the brink of bankruptcy. Instead of restoring some of the tax cuts, since NYC was not as hard hit by the real estate meltdown as other areas of the country, Bloomberg opted for the coward's way out, trying to right-wing the budget into balance.
There's plenty of blame to go around, of course. The MTA, the folks running the trains and buses, probably could have been more proactive in clearing the tracks, although the blizzard conditions during and after the snowfall made any effort troublesome. People who live here could have take that tax cut and bought a snowblower or invested in a private plowing service for their sidewalks and curbs, and maybe thrown a little extra in the kitty for the street to be cleared.
After all, the function of a government is, according to the Teabaggers, as minimalist as possible, meaning protection of its citizenry and that's it. You may recall the uproar over the fire department that refused to put out a blaze for a house where the residents hadn't paid a stinking $50 annual bill. This is that story, writ large, except we're talking streets plowed, not buildings burned.
The next, obvious step up the ladder will be a statewide crisis. Maybe the levees in California, after all the storming and stuff there, will fill with salt water, depriving 25 million people of drinking water. And after that, we face a national crisis that could have been prevented if taxes weren't so goddamn low...
Buried in this article is a very interesting line of thought for liberals:
Compare these circumstances to those of 1911, a century ago. Even in the wealthier countries, the average person had little formal education, worked six days a week or more, often at hard physical labor, never took vacations, and could not access most of the world's culture. The living standards of Carnegie and Rockefeller towered above those of typical Americans, not just in terms of money but also in terms of comfort. Most people today may not articulate this truth to themselves in so many words, but they sense it keenly enough. So when average people read about or see income inequality, they don't feel the moral outrage that radiates from the more passionate egalitarian quarters of society. Instead, they think their lives are pretty good and that they either earned through hard work or lucked into a healthy share of the American dream. (The persistently unemployed, of course, are a different matter, and I will return to them later.) It is pretty easy to convince a lot of Americans that unemployment and poverty are social problems because discrete examples of both are visible on the evening news, or maybe even in or at the periphery of one's own life. It's much harder to get those same people worked up about generalized measures of inequality.
This is why, for example, large numbers of Americans oppose the idea of an estate tax even though the current form of the tax, slated to return in 2011, is very unlikely to affect them or their estates. In narrowly self-interested terms, that view may be irrational, but most Americans are unwilling to frame national issues in terms of rich versus poor. There's a great deal of hostility toward various government bailouts, but the idea of "undeserving" recipients is the key factor in those feelings. Resentment against Wall Street gamesters hasn't spilled over much into resentment against the wealthy more generally. The bailout for General Motors' labor unions wasn't so popular either—again, obviously not because of any bias against the wealthy but because a basic sense of fairness was violated. As of November 2010, congressional Democrats are of a mixed mind as to whether the Bush tax cuts should expire for those whose annual income exceeds $250,000; that is in large part because their constituents bear no animus toward rich people, only toward undeservedly rich people.
The question is, what is "undeservedly rich"?
Warren Buffet and United For a Fair Economy posit that all wealth is derived from society, and indeed, there is much truth there. A business cannot sell unless there is a collection of consumers ready to buy. That business relies on the population for its workers. It relies on the resources of that society, the infrastructure, and the raw materials that it or its suppliers need to produce goods which ultimately are provided for free by Mother Earth...indeed, it is estimated that a fair price for those raw materials, like air and water and minerals, would equal the cumulative gross domestic product of every economy on the planet, thus making world net profit precisely zero.
Clearly, one can make the case that between the raw materials and labor pool, society should devolve the majority of revenues from any business (the value-added tax is an attempt to put this into practice, however marginally). In practice, the individual entrepreneur is the one who stands to most benefit from commerce. In truth, he risks an awful lot too, but that's a different article. We're talking here about the ones who succeed.
I think we'd all agree that a guy who opens up a shoe repair shop and works long hard hours for little money building his business is entitled to some kind of payoff for his hard work. In practice, the truth is very different: success usually occurs more from sheer blind luck than from hard work. You can work really hard and make nothing of a company, but add a little luck, and you have success.
And I think we'd all agree that the guy who makes megamillions from his raw talent at hitting a ball with a bat is probably less deserving. Except we forget he had to work really hard and yes, he plays a game but he plays it well enough to attract fans who pay the club even more money than he pays (here we're back to society as customer), and the money would either go to him or the even richer fellow (or woman) who owns the club.
In truth, both the shoe mogul and the ballplayer owe us a debt, and it is when they do not pay that debt that we get angry. Bailout a banker and we get mad, especially when a banker pays that loan back in a much shorter time that expected. Why did he need bailing out?
And yet, there's this curious construct that has us blaming the guy next door for taking a chance similar to the banker and biting off more than he could chew. The homeowner with the ubermortgage doesn't have the ability to take a loss on his house (like the banker, he can deduct interest off his bottom line, however). If the banker sells a house for less than he mortgaged it out, he can deduct that loss. If a homeowner sells a house for less than his mortgage, not only is he still in hock to the lender, but he can't even deduct the loss off his taxes.
Yet, we blame the homeowner and rant about bailing him out, but the banker may get our contempt, but we still enrich him with the use of his bank and his credit cards!
Tyler Cowen, the author of the article cited above, posits that the people who should be getting our contempt are the people who play with other people's money, and yet we tend to cut them slack because they are more removed from our day-to-day perspectives, yet they make enormous sums of money off our backs with very little risk.
From the mergermania of the 1980s to the recent housing bubble, these speculators have made trillions of dollars doing nothing but playing with our lives, our fortunes and our sacred honors.
You say you want a revolution? I know where to begin.
Snow Joke
Yea, I know...an oldie but very appropriate today.
By now, you no doubt are aware that NYC woke this morning under a blanket of snow. It's not the most snow we've ever had, not even the worst snow we've had in the past three years, but it was, by far, the worst storm we've had in the past decade.
Not so much the snowfall amounts. A foot, foot and a half was the average around the area, with one or two places checking in with closer to two feet.
It wasn't the cold. In fact, it was practically balmy during the day. I was wearing a sweatshirt and jeans to shovel.
It wasn't even so much the wind, which while sustained and gusts averaged into the 40 mph range, was not the worst we've had during a snow storm in this century.
The worst part?
The timing.
It started Sunday afternoon. The day after Christmas, a time when people were hunkered down in holiday hangover, watching football or making a hot meal for the family. The snow started in the late morning, slowly, maybe an inch every two hours. That was easy to keep up with, no problem.
It wasn't until later in the afternoon that the worst of the snow started, coupled with the wind. By five PM, the snowfall rates had doubled and even tripled. I had been trying to stay ahead of the storm by shoveling every two hours. By nine PM, I threw in the towel (you can visit my Flickr account for photos from last night and this morning), literally.
I had already shoveled about six inches of snow, the very fine sugar powder that we rarely get on the east coast during a coastal storm.
I went to bed, confident that I had tackled sufficient amounts of snow to make Monday morning a lot easier.
Fool that I am.
I woke up around 4:30, and looked out the window.
Or rather, I tried. The window was coated with wind-blown snow. I put on some slippers and walked down to the sidewalk. I opened the front door to the building.
There was about a foot and a half of snow piled up against it, drifted in from the vicious wind that was still howling outside.
I closed the door and shuddered, walked back upstairs, had a hot coffee and got dressed. By five I was in my shoveling gear. The tempratures were much colder, well below freezing, and the wind was unabated.
I stepped into the fray. Another eighteen inches had, in fact, drifted onto the sidewalk, and the curious rules of NYC snow removal is, sidewalks have to be clear (that's to the curb, by definition) by eleven AM. Worse, my office had not closed, despite my fervent wishes and frequent curses. I had to go to work. And to add a note of comedy, there was a gas leak in the street, Con Ed had been working on it until the crew deemed it was too dangerous to finish, and so the stench of gas permeated the air around me.
The comedy bit? Some asshat had tried to drive down the street and gotten stuck, preventing the plows from getting thru, preventing Con Ed from returning. I kept thinking it was a good thing I won't need an ambulance, and if there is a God, that driver will get arrested for some crime or other.
So there I am, sniffing air that smelled like it belonged in a fraternity house, shoveling enough snow that I created a mound seven feet high, and still had barely done half the job. In two hours. I was going to be late for work. And I hadn't tackled the really tough job of digging out my garage.
See, in NYC, garage space is hard to come by, and expensive. Landlords know they have it over the renters and are under no obligations to provide snow removal (private-yet-communal driveways off-street). A driver has to dig his own car out if he rents a garage. To top that off, none of the communal landlords ever had the birght idea to pool money and get a plowing service to just sweep thru, thus making what would be a commonsense but free market decision to take care of the problem in one fell swoop.
By eight I had finished the sidewalk. By nine I had another hot coffee and grabbed my shoveling gear and headed to the garage. I was going to be late for work, of course, and called in to let them know. I left a voicemail.
As I climbed over snowbank after snowbank to get to the garage, I had the sinking feeling that, in fact, no one had shoveled any of the garages out, which means even if I did clear mine, I'd never get my car out until spring thaw. Sadly, this was true, but more sadly, I needed to dig my garage out anyway, because it will only get worse as the week drags out, as asshat after asshat drives over the snow (if they even can!) reducing it to solid ice. I won't need a shovel. I'll need a chisel.
By ten thirty, I had finished my work. By noon, I was in the office, doped on oxycodone and still without breakfast.
All for want of a boss with a heart, a storm with a better sense of timing, and me, without the good sense to have moved to the tropics.
Christmas Music Blogging+
It was Christmas Eve babe
In the drunk tank
An old man said to me, won't see another one
And then he sang a song
The Rare Old Mountain Dew
I turned my face away
And dreamed about you
Got on a lucky one
Came in at ten to one
I've got a feeling
This year's for me and you
So Happy Christmas
I can see a better time
When all our dreams come true
They've got cars big as bars
They've got rivers of gold
But the wind goes right through you
It's no place for the old
When you first took my hand
On a cold Christmas Eve
You promised me
Broadway was waiting for me
You were handsome
You were pretty
Queen of New York City
When the band finished playing
They howled out for more
Sinatra was swinging,
All the drunks they were singing
We kissed on a corner
Then danced through the night
The boys of the NYPD choir
Were singing "Galway Bay"
And the bells were ringing out
For Christmas day
You're a bum
You're a punk
You're an old slut on junk
Lying there almost dead on a drip in that bed
You scumbag, you maggot
You cheap lousy faggot
Happy Christmas your arse
I pray God it's our last
Still singing "Galway Bay"
I could have been someone
Well so could anyone
You took my dreams from me
When I first found you
I kept them with me babe
I put them with my own
Can't make it all alone
I've built my dreams around you
And the bells are ringing out
Merry Christmas to you, my dear friends and readers. Thank you for making this year better.
An Outgoing Paean
Y'know, we bitch and moan about Democrats, but compared to Republicans, they can actually get shit done:
The outgoing 111th Congress is among the most productive in history, in spite of its reputation for gridlock and 13 percent approval rating. Democrats controlled the House and the Senate, and used their large majorities to push through landmark legislation with barely any GOP support.
The post-election lame-duck session – typically a mopping-up operation to get out of town – also made history, passing key pieces of legislation, often with greater input from Republicans than had earlier been the case. People can argue the merits of what Congress did, but it's hard to quibble with the scope of the undertaking.
Granted, much of the legislation runs antithetical to the interests and values of liberals, and we should note that too. But a lot of what was done was good for a progressive agenda. Let's take a look, in chronologic order:
1) The American Recovery and Re-Investment Act -- Everyone points to the "stimulus" portion of the bill, but the largest part of the bill was a tax cut for you and me. 98% of Americans saw a tax break out of this bill, incremental and therefore obscured by just sloppy minimalism. Too, the roll-out of the spending portion of this bill, which favored pet liberal projects like education, came down the road a bit and the agenda had already been co-opted by Teabaggers. But we ought to make note of the true progressive nature of the stimulus package.
2) Patient Protection And Affordable Care Act -- Healthcare reform. It was nasty, it was ugly, and the ultimate law was a shamble of progressive and conservative philosophies, but it got done and it's a first step in a highly charged and volatile conservative atmosphere.
3) Financial Regulatory Reform -- Want to know how progressive this bill is? It's been priority targeted for budget cuts in the new Republican Congress.
4) Tax Cut Extension Plus Stimulus Spending -- Sadly, when liberals want spending, we usually force ourselves to raise taxes. Here was an instance where the evil of Republicanism, tax cutting, forced liberals to actually borrow to spend. I know, odious, right? But we got the ok to spend to try to get some jobs created, and that's good. It's all about jobs, this economy. We have to get to work on that.
5) DADT -- Nuff said.
6) START Treaty -- This is a great achievement in ratcheting down the threat of mutual annihilation. I don't think anyone...well, after 1962, at any rate...seriously believed any nuclear power would use nukes in any capacity. Until those weapons started to spread to countries who will be less than scrupulous in their use. With both Russia and the US in accord on this issue, we can now turn to those nations and start asking them to dismantle them, with the full authority of speaking on behalf of the rest of the world. What happens then is a different story, but we accomplished a step towards world peace.
Could there have been more? Oh hell yes, and that's where I think most liberals get upset. It took so long to get the modest healthcare reform we did get and that vote alone probably took the wind out of the sails for a true energy policy, for carbon trading, and for any number of other progressive items that we could have easily obtained with supermajorities in both houses.
I blame Obama for not taking the lead on his initiatives, but I also blame Harry Reid for having little stomach for beating up his constituency.
The Haunting Specter
I need to digest some of what he said yesterday, but Arlen Specter left a flaming bag of poop on the Senate doorstep:
Partisanship, a quest for ideological purity, and the "abuse" of procedural rules have bled collegiality from the U.S. Senate and mired "the world's greatest deliberative body" in gridlock, Specter said.
This was not the usual flowery goodbye and trip down memory lane.
There's some merit to his point of view, and Specter lays out his case like the prosecutor he was, but is it correct? Is too partisan a bad thing?
Forget the chicken-egg argument. It really doesn't matter who started the partisanship ball rolling. We can track echoes of it back to the McCarthy hearings, to Watergate, to any number of incidents that brought us incrementally to where we are.
Is the legislative process compromised when, well, there is no compromise?
My first observation is that Harry Reid finally seems to have grown a set. So much legislation has been passed in the last few weeks, it's hard to keep track of it all, including the showcase piece, the repeal of DADT. Why he squandered this forcefulness over the past two years will go down in history as one of the greatest blunders a Senate Majority Leader could ever make.
(side note: Imagine if Hillary Clinton had not accepted the Secretary of State post, instead focusing on rallying the troops for the 2006 election and then lobbying for the Senate Majority Leadership job...)
In the next Senate, Reid will have to contend with a Republican House that will have a large element of combativeness in its arsenal. Reid squeaked out a win this year against a nutcase who put her foot in her mouth more times than a yogi with a toe fetish. Reid's Senate may not be so lucky next time around if Reid doesn't carefully extract the good from his dilemma while shirking the bad off onto someone else.
A formidable job even for a deft politician with muscle. For Reid, a real challenge.
The twin questions of ideological purity and abuse of procedural rules seem to go hand in hand, in my opinion, and I delineate them differently from simple party line distinctions. Voting along party lines is expected, which is why I'm not sure the last Congress, or even the Congresses under Bush, were "too partisan".
The difference, noticeable over the past twenty years, but in particular a problem during the Clinton administration, has been the severe punishments proferred to a maverick. It has gone from shunnings over minor quibbles, to outright hostility. I've never seen so many incumbents face primary challenges in which fellow Senators and other national party figures have actively campaigned to remove a fellow party incumbent.
This, in my view, is unhealthy, and guess what? For every Lisa Murkowski in the Republican ranks we have a Joe Lieberman in the Democratic camp. It's not a right wing problem only. There's a bubbling undercurrent in this pressure cooker that threatens to explode the entire process, causing entropy at best and chaos at worst, but of much more impact will be the quiet before the storm. The attempt to keep a lid on it.
It started in the 1990s, of course, when the GOP leadership suddenly decided to put a thumb on the scale of negotiation and compromise, forcing their Senators to toe a party line first, and only clear compromises second. It was aided and abetted by the right wing blast fax/talk radio Golem, which spewed venom left and right...ok, mostly left...and forced legislators to either deal with the voters (and others outside their districts) or deal with the leadership. The only way to keep things quiet was to memorize talking points, spew them on cue, and vote Republican only.
That wasn't enough, even tho Republicans were generally pretty successful with this strategy. As the Congress did nothing through the first Bush administration, and people watched their savings and jobs drift away on this tide or that, Democrats started to put together two and two and actually come up with five when it came to winning an election or two.
The clamps in the GOP tightened. In response, clamps were applied in the Democratic party as well. The Fifty State Strategy of Howard Dean's DNC tenure really had two effects: it welcomed moderates and even conservatives while at the same time tried to get them to come to some consensus on issues so that Democrats could present a unified front on issues that people wouldn't be too embarassed by in Wyoming or Utah.
This pissed off everyone, from conservative Blue Dog Dems to us liberals.
In Congress, procedural rules became a weapon, rather than a tool. The use of the filibuster is the most notable, and both sides have gone to that trough healthily. I include, however, reconciliation votes in this. It was used to shove Bush's tax cuts down our throats, and some aspects of healthcare reform also utilized this. Here, a bill is deemed passed already for purposes of making cosmetic budgetary amendments to it, which only require a 51 vote majority and no filibusters allowed.
I'm sure in caucus, worse abuses of procedures occured.
Specter comes off as a bit of a whiner in his speech, but he does point out the signal changes in protocol and custom over the past thirty years, mourning the loss.
But things change, Arlen. One can't expect the world to freeze just because you're in the Senate. And one might point out that there were plenty of moments when you could have shown great courage, opting instead to hew to the party line.
But among his "why mes?" he has made several very cogent and valid points. Go read his speech.
Waits & Measures
Another year over, another year deeper in debt.
Our lives are a constant stream of measurements, of statistics.
How much do you make? Were you on time? You weigh what? Did you get enough? Twelve inches in a foot. 100 pennies in a dollar. 60 seconds in a minute. Four cups to a quart.
It's funny how we've allowed our world, our culture, to be defined by one measurement after another. It's all weights and measures. We've trivialized measurement so much that, when we really need it, we can't have it.
"Give me the odds, doc? Fifty-fifty? Worse?"
You'll never get a straight answer to that from any doctor who cares about his malpractice insurance premium (yet another measurement derived from the measurement of his vulnerability to a lawsuit). Some court will decide-- will measure-- his judgement and hold him accountable if things don't go the way you want them to.
Our world has become a yardstick. We even measure the unmeasurable: The Beatles are better than Led Zeppellin, but "Stairway To Heaven" is the greatest rock song ever written.
Who the hell decided that? Why was it even necessary? Both bands make great music, and you could stack "Hey Jude" up against "Stairway" anyday and derive enormous pleasure from either or both.
Worse yet is how we measure each other. It's one thing to hold yourself up to a standard of your choosing. That's how we grow and pursue happiness, that delectable intangible that the American Founders thought so important as to enumerate it amongst our God-given rights.
For example, I write better today than I did when I started this blog more than six years ago (!!!) I take better photographs for taking a course, and just shooting photos. These are demonstrable facts in my view. This is growth. I know these are facts because I like my writing and photos better today than I ever have.
It's when we apply these measurements to other people that trouble begins.
Exhibit A -- "You're just like my ex!"
That's your basic unfavorable expression, no matter the context, and serves as a warning.
Exhibit B -- "You should do this."
Friends of mine who've spent any time talking to me will tell you, I think "should" is the most dangerous word in the English language. It's so loaded with value measurements and personal opinion that it ought to be banned, except for parents talking to young children and priests talking to novitiates.
You can try this exercise on your own, I won't bore you with myriad examples.
We hold people up to a light, and look thru them as if they lived in a tiny glass orb and examine them. Instead of accepting them for who they are, we pull out a clipboard and a checklist and begin to tick off measurements: She's hot, he's getting C's, she's Jewish, he's an only child, she has money, he's a gambler. All these are added together and some arbitrary denominator is applied to adjudge good or bad.
None of this is about who that person or those people are, but about how those values fit in with ours.
How they add to our lives.
These can be applied situationally: "I need to get laid," means that "she's hot" can override the fact that she's only sixteen or a crack addict. That one measure derives the most immediate reward.
But in exploiting her, you exploit yourself.
"He's getting C's" means an Ivy League school is probably out of the question, so you lower your sights and adjust your parenting.
Our world isn't full of men and women, our brothers and sisters. It's filled with competitors, all of whom we gauge on a scale, on a ruler, to assess how we're doing. For some weird reason, it matters to us where we are on the ruler, without any consideration given at all to the possibility that maybe we shouldn't even be on the ruler!
Are we happier for this ruler? I think not.
How can you measure the value of a sister or brother? Of the homeless guy down the street? Of the undocumented worker selling portraits in Times Square? All contribute to our lives each day, some in directly noticeable ways, others in ways that filter through to us from a maze of convolutions and twists: six degrees of separation, and all that.
What numerical analysis leads us to the inescapable conclusion that Bill Gates made billions of dollars using the sweat and labor of hundreds of millions of people, who developed and used his products and gave him feedback, thus improving computers? Similarly, what is his responsibility back to society? According to the measurerists, there ought to be some way for him to pay us back beyond the distinctly unmeasurable "he sells us software." And yet, these measurerists are the same folks who bridle at the "death tax", which is really just a way for society to extract from a person's body of work that portion of which can be attributed to the advantages of living in that society.
We can't measure the important things in our lives. What is love? How much did my mother love me? How much do I love my lover? How much do I love ice cream? How happy am I? How happy can I be? How afraid am I? How healthy am I?
We can tally nearly everything in our lives, and still not discover our place on the ruler.
Some would choose to ignore the unmeasurable (helloooooooooooo, conservatives!) If it can't be measured, it doesn't matter. There is no meaning unless we can study, allocate and quantify precisely the effort we need to expend in order to feel comfortable with that unmeasurable. I'd bet that many marriages and relationships fail under the delusion that somehow a husband or wife need only put in de minimis effort and get a satisfactory return.
It is this same pointed choice to ignore the unmeasurable that we fail to act in a timely fashion on a whole raft of problems, from global climate change to foreign relations to the decline of the electric grid, and we chastise those who can logically put two diverse facts together to come to a conclusion that is not readily apparent or immediately measurable.
Jimmy Carter, for example, is reviled by the right as the worst president of the 20th century (on a technicality, it's possible: George Bush the Junior did not serve until the 21st). Yet the man had vision. As an example, he foresaw out of the OPEC crises that America would need a more permanent solution to its energy problems and tried to shift the focus from cheaper oil to learning to live with more expensive oil while working on the technology necessary to solve a vexing problem. He created the Departments of Education and Energy (funny how conservatives howl about the one but embrace the latter). He gave the Panama Canal back to Panama, thus stifling American imperialism in Latin and Central America, and opened the door for democracy in South America.
And now, South America is emerging as a world power in its own right.
All of these looked at the time like bad decisions made by a weak President, but how much would you give to go back to 1977 armed with video of $3 a gallon gasoline, at a time when it retailed for 35 cents a gallon?
We only act when there is demonstrable damage to be done to an objective measurement. This is why so often the arguments for a policy come down to the economic cost/benefit analysis. Those arguments get your attention, when you can show that investing a dollar now can save you a buck three-eighty next year. This is why it took a blackout in 2003 to even start a dailogue about the electric grid. and why it took an attack on the World Trade Center to get us to pay real attention as a people to the plight of the Muslim world and our role in it.
Ironically, that economic argument may get your attention but it never wins the argument. Usually, the unmeasurables win the argument.
Think about it: healthcare ought to be an inalienable right for every American. It's part of that whole delectable intangible in the Declaration I alluded to earlier, the inalienable right of life. Yet the arguments now and have for a while focused on the cost of the program.
Can you measure a life's value? Can you measure the value of good health in leading a productive, happy life? How much freer are we for having good health? I'd argue a lot. Does society have a duty to look after all its people? Does your health affect mine?
Those are winning arguments in any civilized society, it seems to me. Right now, we're not at that stage, but once we get there, we will have healthcare for Americans, of Americans, and by Americans.
We just have to wait.
How are you measuring time?
Now Is The Winter Of Our Discontent...
It's a matter of evolution:
The new Congress hasn't been seated yet but signs of a rift are already beginning to emerge between Republican leaders and Tea Party groups who were a driving force propelling many unknown candidates to victory last month.
There are many ways to characterize this. I prefer to think of it as the chickens come home to roost.
The Republicans have had a forty year "Southern Strategy" which has yielded some pretty impressive political victories and some pretty shameful defeats. On the one hand, this strategy was most directly responsible for the election of Ronald Reagan and George W. Bush, as well as the takeover of Congress in 1994, and the House in 2010.
On the other hand, it was directly responsible for the corrupt Congresses that ensued, the rape of the American budget, the tax hikes needed to compensate for the spending by Republicans on credit, as well as war without end and a terror attack that will go down in history as one of America's weakest moments, bought and paid for by the GOP.
This strategy divided the nation into three groups: economic royalists, socially conservative Christians, and the rest of us. Power within the GOP rested firmly in the economic royalty camp, with the occasional intruder like Pat Robertson allowed a seat at the table primarily because he could speak both lingoes fluently. The Christian Coalition was allowed to rant and rave and was allowed loose in the neighborhood every two years (especially during presidential elections) to foam at the mouth about "teh gehys" or dead pre-babies or "war on Christmas" or what have you.
The Tea Party is a curious admixture of both camps. There's a strain of "I got mine Jack, now you get yours" that economic royalists have attuned to like a 50,000 watt radio station next door, but there's also a deep strain of social conservatism that infests the movement, too.
It's basically the rank-and-file saying "Help us, finally, dammit!" to the powers that be that dictate policy that helps the wealthy without assisting the middle class and poor from losing ground.
Sadly, they still see the "free" market as the solution to the problem, when as I've pointed out consistently, the government is better poised to help them.
Worse for the GOP, there's really no way to placate all forms of the movement:
In a sense, identifying with the Tea Party movement was like catching Beatlemania in the 1960s. People were drawn in for different reasons — the beat, the haircuts, the lyrics — and great gulfs of taste divided the John fans from the Paul fans, the George fans from the Ringo fans.
Smashing success broke the Beatles apart. As 2010 closes, there is no bigger question in U.S. politics than whether the Tea Party will go the same way. The pressures on this already divided movement will be enormous. As long as the far-flung elements of the Tea Party were shoulder to shoulder against Obama, it was easy to keep them together. But now, the party that argued so effectively for smaller government is headed to Washington, where so many other waves have broken and receded. Having remade Congress and with a GOP presidential nomination up for grabs, the Tea Party is about to learn that rallying against its enemies is easier than choosing among its allies.
Effectively, the Tea Party is a movement without a leader and many people vying for that leadership. But it may be too late: success happened so quickly for the chaotic movement that even early adopters like Dick Armey have had trouble herding the kittens.
Diogenes once famously searched for an honest man.
Remember that parable as this story unfolds.
We're all aware, possibly too aware, of the phrase "death with dignity". We heard it often enough during the Terri Schiavo case, when Sen. Majority Leader Bill Frist magically diagnosed a patient in a vegetative state from a thousand miles away using remote viewing. This stream of consciousness is not about that case. That, believe it or not, was too cut and dried to really interest me, beyond the asshatical way the Republicans rode to her "rescue".
No, the conundrum I'm thinking of is even more difficult, even more visceral.
The question before you all is, when does "death with dignity" cross the line into suicide, assisted or not?
Let's say the patient has a living will, in which he refuses all invasive medical procedures except pain relief. Let's say further this living will can only be triggered in three cases: 1) The patient is non-responsive (unconscious), 2) the patient is terminal, or 3) the patient is conscious but has incurred brain damage sufficient to render them non-responsive.
Now, let's say this patient is admitted to the hospital after a fall. Broken clavicle, nothing too serious, but his age (ed. note 85) and general health make releasing him immediately a risk. The patient then spikes a fever as he's being treated for the fracture. The hospital decides to admit him after more than 24 hours in the ER. The healthcare proxy is admitted and submits the form, and begins consultation. Seems like a routine treatment scheme, so that proxy agrees with treatment.
As he arrives at his room, the patient's BP begins to spike as well. The hospital gives him appropriate medicines and he begins to stabilize.
Now the fun begins. His O2 saturation levels, which for any normal person are in the mid-90% range, start to decline. The pain of the fracture makes taking a deep breath difficult, and the general health-- obesity, fluid build up associated with congestive heart failure, and so on-- make pumping blood through the body difficult. Fluid begins to build up on the lungs, further complicating matters.
The patient is offered an O2 mask, which he refuses, violently. since it's a non-invasive procedure, the hospital sedates him and slips on one of them nasal-thingies. The sat rate stabilizes, but shortly thereafter, begins to decline.
A partial pressure mask is offered. The patient again violently refuses, and again, since it's non-invasive the hospital sedates and now restrains the patient, and places the mask.
The O2 sat rate still isn't responding. The healthcare proxy is notified, and asked if intubation for ventilation (forcing air into the lungs) would be ok. After ascertaining the dilemma, and with the reassurance that the intubation would be brief at most, the proxy agrees.
Now the fun starts. The patient is being weaned off his sedation, since the lungs need to start working on their own for him to be taken off intubation. The patient awakens, furious.
At no time prior to the intubation was the patient ever unconscious (except to sleep, of course). The "knock out" was necessary, presumably, to place the tube in. The patient, a stubborn cuss, simply refused to answer any questions, despite clearly being conscious and aware of his surroundings. This is why the proxy was consulted. He immediately rushes to the hospital, living will in hand, because he never figured he'd need this for a fracture. Silly proxy!
The proxy now insists the tubes be taken out. The doctors refuse. In fact, the doctors ask to be another tube in, a central line, since the patients veins in his arms are collapsing from all the O2 blood tests. The proxy refuses, at first. The proxy, in front of the doctors, asks the patient "Do you need any medicines? Do you want anymore tubes inserted? Do you want these tubes taken out?"
The patient answers, in sum, no more.
The proxy turns to the doctors, who had been unable to get any kind of response from the stubborn patient, and says "Well? What are you waiting for?"
The doctors mention that it will take a while to initiate the procedure: first, there's paperwork, then a behaviorist must be consulted, then the medical board of the hospital has to authorize it.
The proxy says, "Yea. And...?" The necessary forms are presented.
A little while later, the ethicist sits with the proxy and asks for some background details. The patient is clearly depressed, and has been for some time (e.g. all his life). The proxy mentions that the patient has been trying to commit suicide by, errr, proxy, refusing to take his medications, refusing to see doctors unless they come to him, refusing to be admitted to either a nursing home or assisted living facility and basically slowly withering away in his apartment, since he can't walk the stairs anymore.
The ethicist consoles the proxy about the difficulty of the decision and the need to remove the tubes, but, as she puts it, "the hospital is not in the business of assisting suicides".
Making the proxy feel guilty about the decision to intubate, of course.
The ethicist then makes the following offer: Give the doctors time to get the tubes out safely, with the satisfaction that she might breathe on her own after consultation with an intensive care specialist, if in return the patient agrees to be more cooperative.
Here comes Diogenes. She then says to the proxy, "I'll see if I can lie to her into believing that it will only take a day or so".
A lying ethicist. Interesting.
The patient has made it clear he wants to die with dignity. The proxy supports this decision, and not reluctantly, but made the mistake of trusting the doctors who said intubing the patient would only be for a short while, until he could breathe on his own.
...which, by the way, turns out he can, since after this discussion, the ventilator was turned off and the CPAP function turned on (air is not forced in, but is maintained at a higher pressure than normal to assist in breathing). The lungs are functioning OK, and the O2 sat rate is stable at 94%. Hours later, the ventilator is turned back on in order to allow the patient some rest and to let his lungs have a break overnight.
The doctors still believe it's a suicide request, and are probably not being fully forthcoming with the patient or proxy.
So now...is the patient requesting to commit suicide or for the chance to die with dignity?
Thoughts? And as a bonus question, what would you do next?
UPDATE: Things took a turn for the worse yesterday. The O2 sat rate dipped, and the ventilator was kept on. After an examination by the intensivist and a neurologist (low oxygen = brain damage, just a matter of how much), and a negotiation between the proxy and the medical staff, it was agreed that if the patient did not show improvement by this morning, the hospital would agree to terminate life support.
It shouldn't have been a negotiation, in my book, nor should the proxy have had to be consulted, except as to the timing of the withdrawal.
I understand the conditions of the hospital. For every patient they screw up on, it costs five more patients appropriate care in terms of time, resources and scared doctors. The policies and the procedures they follow are designed to avert risk.
Still, I can't help but think this was a situation where everyone, even the doctors, had clear-cut instructions, and that the care of the patient is primarily medical but secondarily about the quality of his life.
Shortfall
Hey all.
I've got a family issue that I have to take care of today, so I'll be scarce. I didn't have much to say except we got the tax bill we earned, but didn't deserve. Sad, innit?
History shows us that progress comes against great friction to remain in place. Remaining in place, however, always loses.
We will prevail, eventually. Keep the faith, friends!
Why We Will Never Have To Worry About A Palin Presidency
Item: Sarah Palin Still Thinks She Was Wronged by Katie Couric's Reading Question
A little over two years ago, one of Sarah Palin's first interviews after being tapped as John McCain's running mate was a multipart chat with CBS's Katie Couric. And it was a disaster. To this day, Palin still has a chip on her shoulder about one question she was asked in particular: What does she read?
Since then, Palin has been asked the question repeatedly, and has come up with something approaching a stock answer.
Said "stock answer's" shorter?
I can see books from my bedstand!
Seriously, how thin skinned is this broad? Two years after she bungles an interesting-but-inocuous question, she's still fuming about it!
"Because of that one episode, that one episode, that would turn an issue into what it has become over the last two years. I think that's ridiculous," Palin told Walters. "That's one of those things, where that issue…that I don't read, or that I'm not informed, it's one of those questions where I like to turn that around and ask the reporters, 'Why would it be that there is that perception that I don't read?'"
Um, cuz you couldn't answer the question "what newspapers or magazines do you read?"
It was only asked three times. You were a cypher, altho the answer to that question defined you in so many ways. Not just that you couldn't give an answer (George Bush, for example, claimed not to read the paper, full stop, and no one made it a defining moment for him, altho it should have been in hindsight) but that you stumbled so badly NOT answering it, that you came off as a bubble-headed moron-- perfect to lead the Teabagging "movement" I might add-- and that you took umbrage at such a simple question, an attempt to understand you better and to allow voters to get to know you better.
Hell, I've asked tougher questions on first dates!
If she was a different kind of woman-- independent, tough-minded, intelligent-- she might have caught a glimpse of her future and been mad at herself for blowing a simple chance, turning what would have been a minor piece of the puzzle into a keystone of her entire political career. I'd argue that question may turn out to be the defining moment of her life, from birth to death, but that's running neck and neck with the SNL parody by Tina Fey. Of course, that moment was preceded by this, and opened the door to the perception that Sarah Palin is a brainless stooge.
But she's not that insightful witty intellect. She's Sarah Palin, so her anger is misplaced and outerdirected to the people who "harmed" her: Katie Couric, with le dernier coup applied by Fey three nights later. She didn't hurt herself by being an idiot, no, those folks were out to get her, see? They laid a boobytrap in front of her and it exploded right in her face!
Um, deft politicians see a booby trap a mile away and step aside.
One can only wonder what perception people will walk away from even the 2012 primary season if Sarah Palin is dumb enough to do anything but endorse minor Congressional candidates. She'll be pilloried from the right and left-- she's already incurred the wrath of Karl Rove and that wing of the neo-cons, and the mantra of "running against the boy's club" will only go so far when the knives really come out. She'll be expected to defend herself vigorously or face all kinds of charges of being weak.
Even her TLC show about Alaska has drawn fire from the very people you'd think would favor her: hunters! Her "skills" with a rifle seem to be sorely lacking for someone who brags about bagging moose from a helicopter, or whatever the hell she claims.
Her skin would be flayed off after March in the primaries.
I do acknowledge one thing: to her handlers' credit, she hasn't gone after Tina Fey.
Yet. But my suspicion is she is seething inside and given her inability to let this go, she's likely going to try to exact her revenge at some point.
I pity her. Fey will mop the floor with her. Again.
...or does anyone else miss Bill Clinton?
I'm going to break with tradition here and rant on a Friday.
1) What's it going to take????
When are we as a people, we as liberals, going to finally sit up and say "I've had enough!"
When are we going to go from compromise to this? When do we finally start making our government fear us by storming a barricade and threatening the establishment, if only figuratively?
The Teabaggers are right about one thing: this nation has gotten away from we, the people, and we want it back. Or we ought to.
It's not that the Teabagger message is wrong, at its face. It's that the message has been manipulated and distorted beyond anything any reasonable person could get angry about.
Teabaggers want taxes reduced. It sounds noble, but taxes are already at historic lows and we can't afford to keep them this low. Not if we're going to pay for a war and a half. Not if we're going to keep pumping money into a defense infrastructure that has shown itself to be inadequate to the wars we face. And nevermind the burden of Social Security and Medicare, programs I think are worth paying for.
Teabaggers want the defict reduced, and that too is a noble goal, but they blame Democrats who want to prudently cover our spending with more tax income, as opposed to Republicans who want to keep borrowing to spend.
It's not the nation that's gotten away from us; it's politics that has. We get the government we deserve and right now, we don't seem to be very deserving.
Have we gotten complacent? Have the programs liberals have enacted in the Nineteenth and Twentieth centuries made us so complacent, so smug in the rightness of our cause, that we've forgotten how hard we had to fight for those things? Like the end of slavery. Like the vote for women and minorities. Like the end of Jim Crow. Like clean air and clean water. Like the end of the Vietnam War.
Have we forgotten how much blood we shed to achieve these?
Four dead in Ohio. The Little Rock Nine. Jim Zwerg. John Lewis. James Chaney, Andrew Goodman, and Michael Schwerner. Dr. Martin Luther King. Sojourner Truth. Rosa Parks. Elizabeth Cady Stanton. Susan B. Anthony. We can trace a line through all these liberals to our world today, great men and women, Democrat and Republican alike, yet liberal and progressive to the core.
We are placated and mollified into submission, too timid to voice our concerns, lest we be painted "liberal" or worse. We've allowed a small core of spokespeople to advocate for us, but they are too easily mocked and ignored. Too, I suspect, they've allowed themselves to be bought out with the illusion of power and influence. Yes, I'm looking at you, Great Orange Satan, Atrios, Firedoglake, and other members of the professional left.
When in the HELL are you going to start speaking FOR us, not TO us????? When are you going to go on Olbermann or, yes, FOX and instead of mocking the other side or trying to smugly explain our side in a cool logical terms, PUT UP A FUCKING FIGHT!?
We WANT this fight, goddammit! Bush said to Al Qaeda, "Bring it on!"
I say to the right wing, "I'm right here, and if you're too scared to bring it on, let me bring it to you." Bring the pain. Bring the truth. Tear the veil away, and show the world how this nation is being taken from us not by the good people in the rank and file of the right, OR the left, but by the stultified ruling class.
I look at this nation this way: America is a three legged stool. One leg represents free enterprise, truly free enterprise, that enriches the nation as it serves the people. Another represents proportionate and representative government, selected by the people to protect their interests as the individual governors see fit and who make laws that both govern and encourage business under that premise. The final leg is we, the people, who provide the energy for business and the intellect and passion for governance.
So long as those three are in balance, the chair will not fall over if you try to sit on it. So long as they remain separate and equal, we have a balanced and vibrant society.
Cut one leg short, though, and you have chaos. You have a nation about to tip over. Worse, you have the other two legs about to help it tip.
We are that short leg, my friends. We are the weakest link.
I am a liberal. To me, government should be as big as it needs to be to protect me from harm that I have no control over: harm from foreign military powers, harm from those who would wish to see me illed, harm from products and services that can harm me without my knowledge.
I don't bungee jump. I don't expect the government to protect me from bungee jumping, but I do expect them to establish safe standards for bungee jumping that ensures some reasonable control over those who enjoy the activity, and who, by staying out of the hospital, help contain my medical insurance premiums.
That's not a fucking lot to ask, is it? IS IT?
I am a liberal. To me, government ought to be big enough to keep up with Big Business, whose amoral capitalism is practically designed to harm those weaker than it is. Competition is good, but it forces companies to focus on economic return at the expense of being a good citizen.
And ever since government has colluded with business to determine that, indeed, it is a citizen of the United States, business ought to be forced to obey the same laws in kind that I am.
First, harm no one's quiet enjoyment of their lives, liberties and pursuits of happiness. Second, keep things clean around you. Third, pay your taxes.
Since Big Business has chosen not to behave in a neighborly fashion, government ought to step in and punish it, and not with "just a fine" but with real and effective criminal penalties.
I am a liberal. To me, no one should have the right to make obscene profits or take home enormous bonuses just because I was sick. If that means government provides for my healthcare coverage, so be it. I'm willing to pay a little more in taxes to them than a enormous unaffordable premium to some HMO.
I am a liberal. To me, the government ought not to declare war on any nation unless that nation has proven that it intends to do us harm. The responsible use of force is a sign of maturity. We train our policemen, and apart from a few yahoos, we train them very effectively, in how NOT to pull a gun on anyone. Our government ought to be that mature, too.
I am a liberal. To me, government's first and major concern should be the citizenry and the people living under it. We are the powerless ones, the ones who created a government to represent us against all enemies, foreign and domestic, real or a legal construct. Unions arose in this nation to battle the ever-growing Corporate Entity. That entity successfully colluded with friends in government, mostly Republican and exemplified by Ronald Reagan, to defang, deconstruct and destroy unions, which were the only obstacle to raping the American people.
I am a liberal. To me, it's an absolute atrocity on the order of slavery to realize that wages over the past thirty years, since that Reagan administration, have declined against purchasing power. A buck today does not buy as much as it used to, and that's OK, but that your salary hasn't even kept up with the devaluation of that dollar is hideous.
I am a liberal. To me, it is horrendous that all (wo)men are not created equal in a nation where that very phrase is the quintessential self-evident truth. We would deprive significant portions of our populace the God-given right to love and be loved by whomever they choose without harm or repercussion. Without having to hide it in a closet.
I am a liberal. To me, government ought to be just big enough to knock down illegitimate barriers to the rights and blessings we have secured for our progeny. No one's asking for a hand out, or even a hand up, but dammit, sirs, level the playing field! And if that means that, temporarily, someone is given an extra special chance at a job above me because of the hardships his ancestors endured in this nation, I choose to remain in this nation and abide by that history. It's called "patriotism". I love my country, and looking around me, I love my country more than those who would slam doors on immigrants and the poor and deprived because they fear for their own security.
To my friends on the right who oppose DREAMing or affirmative action, I say this: up your game, or up yours. Period. It's called "competition" and its what this nation was founded upon and if you think it only works for you, you are sadly mistaken.
I am a liberal. To me, religious freedom and tolerance means that we must not fear those who bring new ideas to the table, new traditions and new ways of describing God (or the lack thereof). It is government's job, just as it was in Selma and Birmingham, to remind the Christian majority that they are not being particularly Christian.
I'm sure there's more, a lot more inside me to rail about, but I need to close this and not monopolize bandwidth. I couold rant for hours, days, and still not get to the heart of the matter here: government no longer expresses what I feel in my heart.
I leave you with this:
Man, I'm losing sound and sight
Of all those who can tell me wrong from right
When all things beautiful and bright
Sink in the night
Yet there's still something in my heart
That can find a way
To make a start
To turn up the signal
Wipe out the noise - Peter Gabriel Signal To Noise
Why We Will Never Have To Worry About A Palin Pres...

redpajama_set_name: RedPajamaCommonCrawl


The cosmetic consultation is your first step in obtaining your perfect smile, and is an opportunity to meet us in a friendly and relaxed environment.
During the consultation we will discuss the problems you have relating to your teeth and assess your treatment needs. All treatment options we offer will be fully explained to you and you will be advised of the costs for your treatment.
We will then show you the anticipated results of treatment by using computer imaging. We take your photo and then using computer graphics we simulate how you can expect the changes to look. With your input we can design your perfect smile.
A treatment plan will then be drawn up detailing all costs and appointments involved in your treatment. After that it's entirely up to you whether you wish to proceed with the proposed treatment.


Splendent bella lucite bench bella lucite bench at home acrylic lucite benches lucite bench legs. First square tapered acrylic chaise lounge from furnitureon upholstered long rectangular acrylic lucite bench with buttontufted seat upholstered long rectangular acrylic lucite bench. Congenial fur lucite vanity bench tov luxe sheepskin lucite bench tov luxe sheepskin lucite bench lucite bench. Modish luxe sheepskin fur lucite bench luxe sheepskin fu..


With an extensive assortment of flavours and textures within the Fancy Feast Classic range, catering to your cat's unique tastes has never been easier. Choose from delicious grilled fillets of tuna, salmon, turkey and chicken, and gourmet varieties that include pate, liver, mixed seafood and casserole. There's also a selection of great dry food varieties to satisfy your cat made from real seafood, chicken and turkey. Fancy Feast has been specially formulated by nutritionists to provide your cat with essential vitamins, minerals and proteins. And because kittens have their own special dietary requirements, we have their needs covered with formulas designed to give them the best start in life.


text:
Q: ResNet50 : TypeError: Failed to convert object of type  to Tensor Trying to implement resnet 50 over poly-u dataset.
what i am trying to do over here is that i want to make a model which classifies the palm print of individuals into seperate identities , i found that resnet is working best for this kind of problems
cant seems to get over this error tried many solutions online but cant resolve for some reason :
TypeError: Failed to convert object of type <class 'tensorflow.python.framework.sparse_tensor.SparseTensor'> to Tensor. Contents: SparseTensor(indices=Tensor("DeserializeSparse:0", shape=(None, 2), dtype=int64), values=Tensor("DeserializeSparse:1", shape=(None,), dtype=float32), dense_shape=Tensor("stack:0", shape=(2,), dtype=int64)). Consider casting elements to a supported type.

identity block
import keras
def identity_block(X,f,filters):

#     retrieve filters
    F1,F2,F3 = filters
    X_shortcut = X

#     first layer
    X = Conv2D(filters = F1, kernel_size = (1,1),strides= (1,1),padding ='valid') (X)
    X = BatchNormalization(axis = 3 )(X)
    X = Activation('relu')(X)

#     second layer
    X = Conv2D(filters = F2, kernel_size = (f,f),strides= (1,1),padding ='same') (X)
    X = BatchNormalization(axis = 3 )(X)
    X = Activation('relu')(X)

#     third layer
    X = Conv2D(filters = F3, kernel_size = (1,1),strides= (1,1),padding ='valid') (X)
    X = BatchNormalization(axis = 3 )(X)

#     final step > adding shortcut value through relu activation
#     X = Add()([X,X_shortcut])
    X = tf.keras.layers.Add()([X,X_shortcut])
#     X =  keras.layers.concatenate() ([X,X_shortcut])
    X = Activation('relu')(X)

    return X

convolution block
def convolutional_block(X,f,filters,s =2):

#     retrieve filters
    F1,F2,F3 = filters

#     save the input values
    X_shortcut = X

#     first layer
    X = Conv2D(F1,(1,1),strides=(s,s))(X)
    X = BatchNormalization(axis =3)(X)
    X = Activation('relu')(X)

#     second layer
    X = Conv2D(filters = F2,kernel_size =(f,f),strides = (1,1), padding ="same")(X)
    X = BatchNormalization(axis =3)(X)
    X = Activation('relu')(X)

#     third layer
    X = Conv2D(filters = F3,kernel_size =(1,1),strides =(1,1), padding ="valid")(X)
    X = BatchNormalization(axis = 3 )(X)

#     shortcut path

    X_shortcut = Conv2D(filters = F3,kernel_size =(1,1),strides = (s,s),padding ='valid')(X_shortcut)
    X_shortcut = BatchNormalization( axis =3)(X_shortcut)

#     final step > adding shortcut value through relu activation
#     X = ADD()([X,X_shortcut])
    X = tf.keras.layers.Add()([X,X_shortcut])
#     X =  keras.layers.concatenate() ([X,X_shortcut])
    X = Activation('relu')(X)

    return X

resnet50 architecture
def Resnet50(input_shape= (224,224,3),classes = 309 ):

#     implementing the resnet 50 achitechture over here

#     define the input with shape input_shape
    X_input = Input(input_shape)

#     zero padding
    X = ZeroPadding2D((3,3))(X_input)

#     stage 1
    X = Conv2D(64,(7,7),strides = (2,2))(X)
    X = BatchNormalization(axis =3 )(X)
    X = Activation('relu')(X)
    X = MaxPooling2D((3,3),strides =(2,2))(X)

#     stage 2
    X = convolutional_block(X,f=3 , filters = [64,64,256],s=1)

#     these line of code are the conv laters from convolution block function
#     X = Conv2d(F1,(1,1),strides=(s,s))(X)
#     X = Conv2D(filters = F2,kernel_size =(f,f),strides = (1,1), padding ="same")(X)
#     X = conv2D(F3 ,(1,1),strides = (s,s),name = conv_name_base +'2a')(X)

    X = identity_block(X ,3,[ 64, 64, 256])
#     same line from identity block

    X = identity_block(X, 3, [ 64, 64,256])
#     same line from identity block

#     stage 3
    X = convolutional_block(X,f =3 , filters = [128,128,512],s=2)
    X = identity_block(X,3,[128,128,512])
    X = identity_block(X,3,[128,128,512])
    X = identity_block(X,3,[128,128,512])

#     stage 4
    X = convolutional_block(X,f = 3 , filters = [ 256, 256, 1024], s = 2 )
    X = identity_block(X,3,[256,256,1024])
    X = identity_block(X,3,[256,256,1024])
    X = identity_block(X,3,[256,256,1024])
    X = identity_block(X,3,[256,256,1024])
    X = identity_block(X,3,[256,256,1024])

#     stage 5
    X = convolutional_block(X, f = 3 ,filters = [512,512,2048], s = 2 )
#     X = identity_block(X,3 , [512,512,1024])
#     X = identity_block(X,3 , [512,512,1024])

#     AVGPOOL
    X =  AveragePooling2D((2,2),name='avg_pool')(X)

#     achitech complete

#     output
    X = Flatten()(X)
    X = Dense (classes, activation = 'softmax',name = 'fc'+str(classes),kernel_initializer = glorot_uniform(seed = 0))(X)

#     Create model
    model = Model(inputs = X_input , outputs =X , name='Resnet50')

    return model

model = Resnet50(input_shape = (224,224,3), classes=309)
model.compile(optimizer = 'adam', loss='categorical_crossentropy', metrics = ['accuracy'])
model.fit(train_x,train_y,epochs= 10 , batch_size =32)

A: Looking at your resnet50 it seems your missing the last two identity blocks of stage 5
X = convolutional_block(X, f = 3 ,filters = [512,512,2048], s = 2 )
X = identity_block(X,3,[512,512,2048]]) # this part seems missing
X = identity_block(X,3,[512,512,2048]])

Btw you can just use keras applications for a shortcut
import tensorflow as tf
tf.keras.applications.ResNet50(include_top=True, classes=200, weights=None)

redpajama_set_name: RedPajamaStackExchange


Well meaning friends can sometimes say hurtful comments. Yes, it's true. It may not be their intention and I believe they love us. But there are times when their words and actions can cut through our hearts rather than heal.
Whether we accept it or not, people seem to pity those who have kids with disabilities. Perhaps it is human nature to pity what we do not know. For friends close to us, their pity might come from caring about us. They know, and we know, that raising a child with a disability entails challenges and sacrifice. Of course they love us and they don't want to see us and our child struggling.
But pity is not what we need. We need empathy.
We need friends who can feel what we feel; friends who will be moved by love to help us; friends who will respect the efforts and sacrifices we make for our child; friends who will be there no matter what.
Pity rarely moves people to action. Some people might pity homeless people, but how many of those are intentional to help them turn their lives around? We may pity those who were affected by natural disasters in other countries, but how many of us have really actively participated in a work that will help them rebuild their lives?
We are not in a pitiable state. Our child is not to be pitied — nor us his parents. Yes, we may have difficult challenges to face, but we're not in a depressing situation where we are merely existing. We are still living our lives to the full and for this, we are happy.
Yes, our child may have limitations, but he doesn't deserve to be pitied. He needs love and understanding. Most importantly, he needs respect.
So please, don't pity us. We are OK.
What a great post to get these words out there and let people know how it feels to be pitied. Everyone should just share love and respect and happiness.
It's such a thin line between pity and compassion and I think it's so hard for people in an "outside" situation to know how to help. It's unfortunate though that with "pity" come stigmatizims and that is what we do not need ! Believe, love, Faith and support is what we need .
I agree with everything you said. This is why it helps for parents like me of special children to speak up so others can understand how we feel. Thank you so much for taking time to read this post. It means a lot!
Nice post. I can relate, as I have a son with special needs. I actually wrote a few post with about people pitying my son. Please read it you can.
Hi Charlene. Thanks for sharing your posts with me. Yes, we think alike and we feel the same. I like your post on how to show empathy and compassion to parents of children with special needs. Please keep in touch!
I agree with @inthesestilettos. Such a thin line the world has created. I would never wish anything ill favored on someone else but it is very difficult to understand when you have no clue on what they are going through. I love that you have spoken out and shed light on a subject most wouldn't. My daughter has learning disabilities that make her feel less than confident in many situations. And sadly, not everyone knows her struggle so they only judge what they see. This was such a great post! Thank you for sharing!
What a great reminder! We so often look at the strained end of things instead of the blessing that our challenges can be. I am so glad you posted this – it's a reminder we all need!
I certainly do not pity you. I admire you!
Sometimes people just don't know what to say and say what they feel or what they can put into words, you are right. I agree no one deserves pity, but respect and empathy.
We should all treat others with more empathy no matter the situation. After all, children with disabilities are first and foremost people.
I don't feel pity to those. They are human like us. I think we should behave the way we want to be treated. Every one out there is same. I admire you.
I absolutely love this post! I have a physical disability one of my pet peeves is when people pity me because of it.


text:
The Battle of Franklin | 152 Years Ago
The Battle of Franklin: 152 Years Ago Today
From Winstead Hill
4023 Columbia Ave, Franklin, TN 37064
The once mighty Army of Tennessee was brought to it's knees in the late afternoon of November 30th, 1864. From Winstead Hill south of Franklin, Lt. Gen. John Bell Hood launched a frontal attack on U.S. Army entrenched troops, that was far worse than Pickett's Charge at Gettysburg the previous year. This 2 mile long frontal assault killed more General Officers than any other battle in American History.
Six generals were killed, including Patrick Cleburne, one of the Confederate army's finest division commanders. Another five were wounded, one more captured, and 60 of Hood's 100 regimental commanders were killed or wounded.
Experience the 2 mile long landscape along Columbia Pike in this Virtual Tour. This battlefield is under constant development†, so this is probably the last imagery of a portion of it about halfway from Winstead Hill to the Carter House.
A full screen option is in the tool bar at the bottom of the panorama. For more virtual tours, visit the battleofnashville.com
© Bob Henderson | Athens-South.com
† the city of Franklin has reclaimed many parcels of core battlefield property, and has plans for adding more.
Landmark Booksellers "One of a Kind"


"U.S. Will Have Minority Whites Sooner, Says Demographer" - NPR. 6/27/2011.
Bill Frey's recent analysis of census and demographic data shows that minorities now comprise a majority of babies in the U.S. Here Frey discusses what the trend means, and whether predictions that the U.S. will become a "minority majority" by 2050 are too conservative.