BATMAN RETURNS A film review by Mark R. Leeper Copyright 1992 Mark R. Leeper
Capsule review: Three angry costumed neurotics battle in a big, silly, lovable comic book on the screen. Two lesser villains from the comic turn out to be much more intriguing than the Joker on the wide screen. This is a terrific, surrealist film. Rating: high +2 (-4 to +4). Warning: minor plot spoilers in this review, almost all taken from the film's publicity.
A book may be very amusing with numerous errors, or it may be very dull without a single absurdity. Oliver Goldsmith, preface to THE VICAR OF WAKEFIELD
In 1983, for the 50th anniversary of KING KONG, engineers tried to inflate a fifty-foot gorilla balloon on the Empire State Building. It was a real fiasco. It never got more than half inflated, looked absurd, and became a real embarrassment. When asked what he thought of it, a Japanese tourist said, "I love it! It's so American! It's big, it's silly, and it doesn't work." BATMAN RETURNS is a film that could be made only in America. It's big; it's silly; it doesn't work. And above all it is lovable. It is a mammoth King Kong balloon of a film that is nearly as endearing for what doesn't work as for what does. It is one of those rare films that could end up appealing to art film fans and to Friday-night fun-seekers. It is genuinely one of the most bizarre films ever made. Its explosions of surrealism and its warped characters make its predecessor BATMAN seem pale and lukewarm. Rather than one villain, this film offers three and manages to make two of them much more interesting than Jack Nicholson was as The Joker. In BATMAN film the viewer knew how the Joker became the Joker. In this film the viewer goes the additional step of saying, "Yeah, if that happened to me, I think I'd become like the Penguin or Catwoman."
The film opens with a monster child being born to a rich household. Rather than keep this horrible little creature, his parents set him adrift in a basket in a sewer. There he is adopted by the penguins living in the sewer. ("What penguins in the sewer?" you ask. Shhh! Let Mr. Burton tell his story! Just accept it that there are a lot of intelligent penguins living in the sewer ... with the clowns.)
 (No, don't ask about that one either.) Max Shreck (played by Christopher Walken) is the industrialist and he is *really* nasty to his mousey, frumpy secretary Selina Kyle (played by Michelle Pfeiffer). Between him and her lackluster lifestyle, she is getting ready to explode. Selina comes home each night to her lonely apartment, calls, "Honey, I'm home," reminds herself that she is not married, feeds her cat, and listens to her mother's brow-beating phone messages. Eventually when circumstances make Shreck see Selina as a threat he throws her out a very high window. Miraculously she is not killed and in some mysterious way is rescued by alley cats. (Hey, look, if the sewer penguins can save a monster baby....) Selina completely makes herself over as the super-feminist, militant Catwoman, complete with skintight vinyl cat suit. ("Life's a bitch; now so am I!" she says.) Suddenly she is wreaking havoc with a bullwhip and doing amazing athletic flips. ("How come she can do that now?" you asked. Shhh! Now I've warned you.) VARIETY aptly calls her "a kitten with a whip." About this time the adult version of our monster baby emerges from the sewer with his army of clowns to make himself loved and to find his parents. He is nicknamed the Penguin (and played by Danny DeVito). Shreck decides to use the Penguin in a plan to discredit Batman and to have the Mayor ousted and replace him with the Penguin. He is going to create a crime wave and make the Mayor look so bad that the people will replace him with the Penguin. ("If that scheme works, how come Dinkins is still Mayor of New York?" you ask. Shhh! Now I'm not going to warn you again.) Catwoman and the Penguin team up, knowing that with the Mayor thrown out they will be sitting in the catbird seat. After that the plot gets strange and a little hard to believe.
To say there are gaps in the plotting of BATMAN RETURNS is a gross understatement. This is a film that somehow survives major lapses in logic. You never know what is going to turn up in the sewer next without rhyme or reason. There seem to be whole rooms of furniture, troops of clowns, and colonies of penguins. Also in this world anyone who dons a weird suit suddenly becomes an athlete ready for the Beijing Circus. We see Batman, the self-appointed vigilante, use lethal force on criminals in the street. Then later he lectures Catwoman on the importance of letting the law punish the bad. In another inconsistency Batman berates Alfred for revealing his identity to Vicki Vale, but carelessly allows Catwoman to learn who he is, and later intentionally reveals his identity to Max Shreck. (It is interesting that the film does go back and explain a plot hole from the previous film.) Other places the plot assumes impossible capabilities for the Batmobile (it can be wider on the inside than it is on the outside). Then it assumes that every family in Gotham would make the same mistake of leaving the same valuable unguarded.
And with all these gaffes there is a lot to like in the new Batman film. The late Anton Furst's set designs from the first film have been made more dreamlike and often given an EDWARD SCISSORHANDS feel by the new production designer Bo Welch. There are numerous allusions and touches in the film. The Batman character was initially inspired, at least in part, by the idea of a crime-fighter as stealthy, dark, and mysterious as Dracula, the original bat-man. The first screen adaptation of the novel DRACULA was the 1922 German classic NOSFERATU, in which the actor who played the animal-like vampire was Max Schreck (whose name was slightly modified for the allusion, but is still noticeable).
A rather nifty but probably nearly unnoticed allusion is a woman clown dressed in 18th Century French attire who delivers her lines in a sleepy monotone. Could this be an allusion to Glenda Jackson playing a manic- depressive playing Charlotte Corday in MARAT/SADE? There are multiple allusions to Burton's best previous film, EDWARD SCISSORHANDS. Much of the photography has very similar visual images. Statues in the snow, such as are shown at the old zoo, look a lot like Edward's topiary. The opening logo is over snow, not unlike the snow of the opening of EDWARD SCISSORHANDS. Danny Elfman, who scored all three films, in BATMAN RETURNS has borrowed themes from BATMAN, but also style from his EDWARD SCISSORHANDS score. Choral voices under the snow scenes show up a lot in this film as they did in EDWARD SCISSORHANDS. One almost wonders, incidentally, with all the Christmas imagery if this film was really intended for a summer release. One nice visual touch is that what looks like a line of virile Batmen standing in line in one scene is a closet of costumes. The only thing missing from the Batmen are chins. If Batman is a dramatic-looking figure in costume, it is the costume that looks so impressive, not him. You could put Rick Moranis in that costume and he would look dangerous.
Indeed, after all the discussion prior to the first film as to whether Michael Keaton could really play Batman, the role has once again turned out to be surprisingly undemanding. The suit gives Batman his stature, the script gives him a little complexity, and Keaton steps through the role fulfilling its demands without contributing anything extra. While that made him the best thing in the first installment, this time it just did not hack it. This is Pfeiffer's and DeVito's film. Living secretly in the sewers, hatching his plans, the Penguin clearly borrows heavily from THE PHANTOM OF THE OPERA. Yet at the same time he can turn hot and angry in seconds, like Joe Pesci's character in GOODFELLAS. He has not in my memory had a role that allows him such rage or such range.
Until now I have always considered Michelle Pfeiffer to be a marvelously sexy woman who wears a lot of make-up and who does not have a whole lot of talent. Sex appeal and make-up pulled her through DANGEROUS LIAISONS and THE FABULOUS BAKER BOYS, but not for one moment of her acting have I ever considered her impressive. However, I can no longer imagine anyone else being better as the Catwoman.  One moment she is pretending to be shocked that Batman would dare hit a woman, the next striking out at him for so much as daring to hesitate. Forget chivalry--this woman wants blood and will do whatever it takes!
As a side note: it is good to see Tim Burton taking a risk for a friend: Paul Reubens is back working again in spite of what is now rumored to be a rather unfair rap.
There is a surprising richness of themes in this film. Batman's own story is distorted and reflected in the two colorful villains. All three have their origins in pain. All three have donned their costumes to work out their own personal neuroses. All three characters seem to live by the motto that in rage and solitude there is strength. Even animals are compassionate compared to the brutal humans. The two tortured villains are each save in their moments of weakness by animals. The Penguin, like Edward Scissorhands, longs to be normal instead of a freak. Does Batman wear the animal costume to set himself apart from humanity and to make himself a freak?
To extent the sentiment of the Japanese tourist, BATMAN RETURNS could have been made only in the United States. Only in the United States could $80M be spent bringing a comic book story to the screen, unembarrassed. One need only look at BARBARELLA or the Perry Rhodan film MISSION STARDUST to see how it could have gone wrong. I think America still leads the world in big, brash, silly films. That may not be much, but it still something in which to take some pride.
While I thought the first Batman film rated only a 0, I'd give this one a high +2 on the -4 to +4 scale.
Mark R. Leeper att!mtgzy!leeper<EMAIL_ADDRESS>Copyright 1992 Mark R. Leeper .
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


this is the first paragraph
This is the second paragraph
this is a word marked as strong
this is a word marked as emphasized


Dear Admin,
{{ first_name }} {{ last_name }} is requesting to sign up as an employee for the Visitor Management System
Click on the following link to approve them as an employee:


Dynamic and driven professional with a love of coding and a desire to learn more. After working in finance and auditing for several years, I decided to transition my career to a newfound passion of mine, software development. I have dedicated that last year of my life to software engineering through University Programs, Prime Digital Academy (Bootcamp), and a variety of online courses and readings.
Prime Digital Academy is a 20 week full stack development bootcamp. To date, I have learned a variety of technologies at Prime beginning with languages like javascript and html but quickly transitioning to frameworks including React and AngularJS. Additionally, we are required to complete a weekend challenge at the end of each week to solidify the tools, concepts, and languages covered that week.
Currently, I am working on my solo project, a portfolio creator for software engineers that will utilize elements of the users GitHub account to produce an aesthetically appealing display of their projects. For this project I had to begin by scoping my idea and concept. This included drawing up wire-frames, Entity Relationship Diagrams, and a production schedule. This program is using React, Redux, Javascript, PostgreSQL, nodeJs, JSX, Material-UI, Sagas, and Express.
Demonstrated exceptional analytic and technical accumen by conducting employee audits, developing solutions in excel, and assisting development teams with quality assurance tests for new enterpirse software.
Trained and managed a team of finance specialists responsible for negotiating rate terms and analyzing consumer credit. Through time management and multitasking, maintained exceptional sales goals for the region while constantly going the extra mile for each customer to capture their current and continued business.
 I deeply enjoy painting, sculpting, photo-editing, and perfecting my flapjack technique.
Additionally, I like to frequently look to other people and places for inspiration. I follow a number of sci-fi and fantasy genre movies and television shows, take in local sites, and attend gatherings social gatherings in the tech community.
GitHero is a Full Stack Application that acts a quick and responsive portal for software engineers to create and house their personal portfolios. This application uses React, Redux, Sagas, Material UI, Express, Passport, node.js, PostgreSQL, Javascript, Html, and CSS Grid.
Project Repo"Gallery My Life" was my first React application and my first time using CSS Grid. Users can upload photos with descriptions, upvote photos they like, and delete unwanted photos.
Project Repo


Utilities¶
Contains
- refraction_angle
- deviation
- lens_makers_formula
- mirror_formula
- lens_formula
- hyperfocal_distance
-
sympy.physics.optics.utils.
refraction_angle
(incident, medium1, medium2, normal=None, plane=None)[source]¶ This function calculates transmitted vector after refraction at planar surface. \(medium1\) and \(medium2\) can be \(Medium\) or any sympifiable object.
If \(incident\) is an object of \(Ray3D\), \(normal\) also has to be an instance of \(Ray3D\) in order to get the output as a \(Ray3D\). Please note that if plane of separation is not provided and normal is an instance of \(Ray3D\), normal will be assumed to be intersecting incident ray at the plane of separation. This will not be the case when \(normal\) is a \(Matrix\) or any other sequence. If \(incident\) is an instance of \(Ray3D\) and \(plane\) has not been provided and \(normal\) is not \(Ray3D\), output will be a \(Matrix\).
Parameters: incident : Matrix, Ray3D, or sequence
Incident vector
medium1 : sympy.physics.optics.medium.Medium or sympifiable
Medium 1 or its refractive index
medium2 : sympy.physics.optics.medium.Medium or sympifiable
Medium 2 or its refractive index
normal : Matrix, Ray3D, or sequence
Normal vector
plane : Plane
Plane of separation of the two media.
Examples
>>> from sympy.physics.optics import refraction_angle >>> from sympy.geometry import Point3D, Ray3D, Plane >>> from sympy.matrices import Matrix >>> from sympy import symbols >>> n = Matrix([0, 0, 1]) >>> P = Plane(Point3D(0, 0, 0), normal_vector=[0, 0, 1]) >>> r1 = Ray3D(Point3D(-1, -1, 1), Point3D(0, 0, 0)) >>> refraction_angle(r1, 1, 1, n) Matrix([ [ 1], [ 1], [-1]]) >>> refraction_angle(r1, 1, 1, plane=P) Ray3D(Point3D(0, 0, 0), Point3D(1, 1, -1))
With different index of refraction of the two media
>>> n1, n2 = symbols('n1, n2') >>> refraction_angle(r1, n1, n2, n) Matrix([ [ n1/n2], [ n1/n2], [-sqrt(3)*sqrt(-2*n1**2/(3*n2**2) + 1)]]) >>> refraction_angle(r1, n1, n2, plane=P) Ray3D(Point3D(0, 0, 0), Point3D(n1/n2, n1/n2, -sqrt(3)*sqrt(-2*n1**2/(3*n2**2) + 1)))
-
sympy.physics.optics.utils.
deviation
(incident, medium1, medium2, normal=None, plane=None)[source]¶ This function calculates the angle of deviation of a ray due to refraction at planar surface.
Parameters: incident : Matrix, Ray3D, or sequence
Incident vector
medium1 : sympy.physics.optics.medium.Medium or sympifiable
Medium 1 or its refractive index
medium2 : sympy.physics.optics.medium.Medium or sympifiable
Medium 2 or its refractive index
normal : Matrix, Ray3D, or sequence
Normal vector
plane : Plane
Plane of separation of the two media.
Examples
>>> from sympy.physics.optics import deviation >>> from sympy.geometry import Point3D, Ray3D, Plane >>> from sympy.matrices import Matrix >>> from sympy import symbols >>> n1, n2 = symbols('n1, n2') >>> n = Matrix([0, 0, 1]) >>> P = Plane(Point3D(0, 0, 0), normal_vector=[0, 0, 1]) >>> r1 = Ray3D(Point3D(-1, -1, 1), Point3D(0, 0, 0)) >>> deviation(r1, 1, 1, n) 0 >>> deviation(r1, n1, n2, plane=P) -acos(-sqrt(-2*n1**2/(3*n2**2) + 1)) + acos(-sqrt(3)/3)
-
sympy.physics.optics.utils.
lens_makers_formula
(n_lens, n_surr, r1, r2)[source]¶ This function calculates focal length of a thin lens. It follows cartesian sign convention.
Parameters: n_lens : Medium or sympifiable
Index of refraction of lens.
n_surr : Medium or sympifiable
Index of reflection of surrounding.
r1 : sympifiable
Radius of curvature of first surface.
r2 : sympifiable
Radius of curvature of second surface.
Examples
>>> from sympy.physics.optics import lens_makers_formula >>> lens_makers_formula(1.33, 1, 10, -10) 15.1515151515151
-
sympy.physics.optics.utils.
mirror_formula
(focal_length=None, u=None, v=None)[source]¶ This function provides one of the three parameters when two of them are supplied. This is valid only for paraxial rays.
Parameters: focal_length : sympifiable
Focal length of the mirror.
u : sympifiable
Distance of object from the pole on the principal axis.
v : sympifiable
Distance of the image from the pole on the principal axis.
Examples
>>> from sympy.physics.optics import mirror_formula >>> from sympy.abc import f, u, v >>> mirror_formula(focal_length=f, u=u) f*u/(-f + u) >>> mirror_formula(focal_length=f, v=v) f*v/(-f + v) >>> mirror_formula(u=u, v=v) u*v/(u + v)
-
sympy.physics.optics.utils.
lens_formula
(focal_length=None, u=None, v=None)[source]¶ This function provides one of the three parameters when two of them are supplied. This is valid only for paraxial rays.
Parameters: focal_length : sympifiable
Focal length of the mirror.
u : sympifiable
Distance of object from the optical center on the principal axis.
v : sympifiable
Distance of the image from the optical center on the principal axis.
Examples
>>> from sympy.physics.optics import lens_formula >>> from sympy.abc import f, u, v >>> lens_formula(focal_length=f, u=u) f*u/(f + u) >>> lens_formula(focal_length=f, v=v) f*v/(f - v) >>> lens_formula(u=u, v=v) u*v/(u - v)
-
sympy.physics.optics.utils.
hyperfocal_distance
(f, N, c)[source]¶ Parameters: f: sympifiable
Focal length of a given lens
N: sympifiable
F-number of a given lens
c: sympifiable
Circle of Confusion (CoC) of a given image format
Example
>>> from sympy.physics.optics import hyperfocal_distance >>> from sympy.abc import f, N, c >>> round(hyperfocal_distance(f = 0.5, N = 8, c = 0.0033), 2) 9.47


Squared correlation and R-squared: When they are (NOT) the same thing?
In graduate school, I worked on a project in which I used neural signals to predict the forelimb EMG signals in rats. I built a linear model and I reported my prediction accuracy in two forms: the correlation coefficient () and the coefficient of determination (-squared or ).
Unfortunately, I received some criticism from a committee member during my defense and also from a reviewer when I submitted my paper. They told me that there was no need to report both and , because was simply the square of the . I searched this online and saw that a lot of people were saying the same thing: coefficent of determination is simply the squared correlation coefficient, namely !
My motivation in using and , of course, was to evaluate the similarity between actual and predicted EMG signals. generates a value between -1 and 1, and reflects if two signals covary, meaning if they increase or decrease together. doesn’t care about the signal amplitudes, i.e. it isn’t affected by the differences in the means. on the other hand, cares about the distances between points, and it can go to negative values pretty quickly (although most people believe that it ranges between 0 and 1 since it is a ratio and squared value!), if two signals have different means.
Obviously, there is a confusion. There are actually 3 different concepts here: 1.correlation coefficient () 2.squared correlation coefficient () and 3. coefficient of determination (). And yes, sometimes and are the same thing, but sometimes they are not. I tried to clarify this in my mind by applying these concepts on a dataset. I would like to share my insights with you.
When is equal to
I am going to use the cars data from the R library. There are 50 observations and 2 variables in this dataset, the speed and stopping distances of cars. Here is a quick summary:
summary(cars)
## speed dist
## Min. : 4.0 Min. : 2.00
## 1st Qu.:12.0 1st Qu.: 26.00
## Median :15.0 Median : 36.00
## Mean :15.4 Mean : 42.98
## 3rd Qu.:19.0 3rd Qu.: 56.00
## Max. :25.0 Max. :120.00
We already know that these are two different quantities with different measurement units, i.e. mph and ft. By examining the scatter plot, we see that these two variables are positively correlated:
Figure 1. Scatter plot
Remember that the correlation is a measure of the linear relationship between and , and defined as:
where denotes the mean of variable . Note that means are substracted to find the variances and the covarience. Now, lets recall the formulas used for computing the :
where is the Residual Sum of Squares, is the Total Sum of Squares, is the obervations, denotes the observation mean, and is the predictions.
Let’s use the cor()
and lm()
functions to compute the and , respectively:
attach(cars)
r = cor(dist,speed)
lm.fit = lm(dist~speed)
Rsquared = summary(lm.fit)$r.squared
# Print results
cat("Correlation coefficient = ", r)
## Correlation coefficient = 0.8068949
cat("Square of corr. coef. = ", r*r)
## Square of corr. coef. = 0.6510794
cat("Coefficient of determination= ", Rsquared)
## Coefficient of determination= 0.6510794
As you can see, and are exactly the same thing! We took the advantage of linear model object to fetch the , but we can verify the result using the formula:
y = dist
y_hat = fitted.values(lm.fit)
y_bar = mean(y)
RSS = sum((y-y_hat)^2)
TSS = sum((y-y_bar)^2)
Rsquared = 1 - RSS/TSS
cat("Coefficient of determination= ", Rsquared)
## Coefficient of determination= 0.6510794
Our goal was to measure the similarity between the variables (speed) and (distance), and we did that in two ways: First, finding the correlation between and and second, by modeling the linear relationship between and . We conclude that holds for simple linear regression and when the intercept term is included. By the way, this can not be generalized to Multiple Linear Regression (please see An Introduction to Statistical Learning for more).
When is NOT equal to
1. If there is no constant term (intercept)
Now, let’s exclude the intercept term and see what happens. Below is a picture of fitted lines with and without the intercept term:
Figure 2. Fitted line with and without the intercept
Let’s take a look at the one more time:
lm.fit = lm(dist ~ speed -1) # Linear fit without intercept
Rsquared = summary(lm.fit)$r.squared
cat("Coefficient of determination= ", Rsquared)
## Coefficient of determination= 0.8962893
It is different, and it is overestimated. Why? You can look here for a detailed discussion, but in simple terms, when intercept is excluded, the algorithm considers the observation mean ( ) as 0, and thus the term becomes larger leading to an increase in the value.
2. If you want to explain a variable using a second variable
Now, we are going to look at the same data from a different perspective.
I am going to use the same dist and speed variables, but in a hypothetical setting. Let’s assume that I have bunch of other drivers and attributes of those drivers. I trained a model that takes driver attributes as inputs and produces the time that driver spent in traffic as the output. I tested my model on a test set (50 cars) and recorded the predicted output (). I already know the actual output (). Now, I want to evaluate the performance of my model. Let’s assume that is identical to dist and is identical to speed.
In other words, I have an actual signal and a predicted signal which happen to have the same values as dist and speed, respectively. But, we will pretend that they both have the same unit (e.g. seconds):
y <- dist
y_hat <- speed
As the performance criteria, I decided to report the similarity between the actual signal and predicted signal. Which one should I pick, or ?
If we plot them on the same graph, we will see that they are quiet different from each other. Notice that x-axis is just the sample number:
x=1:50
plot(x, y, type="b", pch=19, col="red", xlab="sample no", ylab="time (min)")
lines(x, y_hat, type="b", pch=19, col="blue")
legend(1, 110, legend=c("actual", "predicted"), col=c("red", "blue"), lty=1:1)
Figure 3. Original and predicted vectors
And the is:
y_bar = mean(y)
RSS = sum((y-y_hat)^2)
TSS = sum((y-y_bar)^2)
Rsquared = 1 - RSS/TSS
cat("Coefficient of determination= ", Rsquared)
## Coefficient of determination= -0.8798069
As these two signals become more separated, the value will decrease while the value will stay the same. Let’s look at this in a picture form:
Figure 4. The and as a function of mean difference
gives us a measure on how much of the variation in the actual variable can be explained by the predicted variable . By switching their roles, we change the term, thus we obtain a different value.
y <- speed
y_hat <- dist
y_bar = mean(y)
RSS = sum((y-y_hat)^2)
TSS = sum((y-y_bar)^2)
Rsquared = 1 - RSS/TSS
cat("Coefficient of determination= ", Rsquared)
## Coefficient of determination= -43.64745
To put the above phenomena into a context, let’s say that we built a model using the training data we have. But, in actuality, the features are not capable of establishing a linear relationship to the output, and it turned out that our model did a terrible job in making predictions from unseen data. Let’s say the model produced a prediction that is hugely diverted from the true values. In theory, we can still have a moderate correlation between predicted and actual signals, however, will generate a very small or negative value depending on the differences in their means.
Conclusion
-
If we use Linear Regression to assess the similarity between and , the algorithm will use y and fitted values () to compute the . In that case, the the squared correlation and will be the same.
-
If we have two separate variables (e.g. actual signal vs. the model output) and we want to compare them, we should avoid using Linear Regression function
lm()
just because it automatically reports the . We are not interested in fitting two variables, but we want to know if our prediction is close to the actual data or not. In that case, we should directly implement the formula.


|
Our Friend, the SwastikaThe word swastika comes from the Sanskrit svastika: su meaning good, asti meaning to be, and ka a suffix.While it is natural to think the Swastika originates from deep within some Nazi advertising agency, concocted to strike fear and terror throughout the world, it is in fact thousands of years old, previously a talisman of power, good luck, and strength. Life provides many great ironies; this is one of the bigger ones. Imagine if the most popular guns and weapons had Hello Kitty etched on them; Hello Kitty would become the complete antithesis of what it was originally meant to represent (buying lots of meaningless Japanese crap).
Because the Third Reich was so good with public relations (or at least, getting the message out), the Swastika is basically an emotionally-charged symbol now, representing oppression, violence, Anti-Semitism, and mass murder. It's kind of unlikely to ever revert to its previous positive meaning any decade soon. This doesn't mean that people aren't trying, mind you; every once in a while someone comes along and gets a swastika tattooed on himself to show the world that it's a meaningful symbol with a glorious past. But, as you might expect, they are branded as a Nazi as quickly as they were branded with its symbol. Biker gangs are portrayed as wearing swastikas (and World War One-era pike helmets, too), but how much of that is actual Nazi fascination and how much of it is "man, those guys were badass" is left up as an exercise to the reader.  One side-effect of the Swastika's recent use is that there are coins, poetry and other ancient/old artifacts that have swastikas all OVER them, and chronologically-challenged folks have assumed that those people were Nazis too. This has no doubt caused some pretty caustic Letters to the Editor, that were hopefully tossed in the trash. The Raelians's original logo was a swastika combined with the Star of David. Charles Manson has a swastika carved on his forehead. The Isle of Man near Britain uses a swastika variant known as a triskelion. |


Chief Golem Craftsman Telson:
Welcome back! Well, Master Tobald came by a few days ago and was talking about you! He said that you'd be coming by today, and here you are! How strange!
Did you really finish the pilgrimage of tablets? You finished before Tobald! That's incredible!
"Now what?"


#include <uwgainfromdb.h>
Definition at line 51 of file uwgainfromdb.h.
◆ UnderwaterGainFromDb()
| UnderwaterGainFromDb::UnderwaterGainFromDb |
( |
| ) |
|
Constructor of UnderwaterMPhyBpskDb class.
Definition at line 58 of file uwgainfromdb.cpp.
◆ ~UnderwaterGainFromDb()
| virtual UnderwaterGainFromDb::~UnderwaterGainFromDb |
( |
| ) |
|
|
inlinevirtual |
Destructor of UnderwaterMPhyBpskDb class.
Definition at line 63 of file uwgainfromdb.h.
◆ command()
| int UnderwaterGainFromDb::command |
( |
int |
argc, |
|
|
const char *const * |
argv |
|
) |
| |
|
virtual |
TCL command interpreter.
It implements the following OTcl methods:
- Parameters
-
| argc | Number of arguments in argv. |
| argv | Array of strings which are the command parameters (Note that argv[0] is the name of the object). |
- Returns
- TCL_OK or TCL_ERROR whether the command has been dispatched successfully or not.
Reimplemented from UnderwaterPhysical.
Definition at line 76 of file uwgainfromdb.cpp.
◆ createNameFile()
| string UnderwaterGainFromDb::createNameFile |
( |
const int & |
_time, |
|
|
const int & |
_source_depth |
|
) |
| |
|
protectedvirtual |
Creates the name of the file to load.
- Parameters
-
- Returns
- The name of the file to load.
Definition at line 245 of file uwgainfromdb.cpp.
◆ getDepthRoughness()
| const int& UnderwaterGainFromDb::getDepthRoughness |
( |
| ) |
const |
|
inlineprotected |
Returns the depth_roughness_ parameter.
- Returns
- depth_roughness_
Definition at line 145 of file uwgainfromdb.h.
◆ getDistanceRoughness()
| const int& UnderwaterGainFromDb::getDistanceRoughness |
( |
| ) |
const |
|
inlineprotected |
Returns the distance_roughness_ parameter.
- Returns
- distance_roughness_
Definition at line 156 of file uwgainfromdb.h.
◆ getFrequencyCorrectionFactor()
| const double& UnderwaterGainFromDb::getFrequencyCorrectionFactor |
( |
| ) |
const |
|
inlineprotected |
Returns the frequency_correction_factor_ parameter.
- Returns
- frequency_correction_factor_
Definition at line 178 of file uwgainfromdb.h.
◆ getGain()
| double UnderwaterGainFromDb::getGain |
( |
const double & |
_time, |
|
|
const double & |
_source_depth, |
|
|
const double & |
_destination_depth, |
|
|
const double & |
_destination_distance |
|
) |
| |
|
protectedvirtual |
◆ getPER()
| double UnderwaterGainFromDb::getPER |
( |
double |
snr, |
|
|
int |
nbits, |
|
|
Packet * |
p |
|
) |
| |
|
protectedvirtual |
Returns the packet error rate by using the length of a packet and the information contained in the packet (position of the source and the destiantion.
- Parameters
-
| snr | Calculated by nsmiracle with the Urick model (unused). |
| nbits | length in bit of the packet. |
| p | Packet by witch the module gets information about source and destination. |
- Returns
- PER of the packet passed as parameter.
Reimplemented from UnderwaterPhysical.
Definition at line 94 of file uwgainfromdb.cpp.
◆ getTimeRoughness()
| const int& UnderwaterGainFromDb::getTimeRoughness |
( |
| ) |
const |
|
inlineprotected |
Returns the time_roughness_ parameter.
- Returns
- time_roughness_
Definition at line 134 of file uwgainfromdb.h.
◆ getTotalTime()
| const int& UnderwaterGainFromDb::getTotalTime |
( |
| ) |
const |
|
inlineprotected |
Returns the total_time_ parameter.
- Returns
- total_time_
Definition at line 167 of file uwgainfromdb.h.
◆ isZero()
| const bool UnderwaterGainFromDb::isZero |
( |
const double & |
value | ) |
const |
|
inlineprotected |
Evaluates is the number passed as input is equal to zero.
When C++ works with double and float number you can't compare them with 0. If the absolute value of the number is smaller than eplison that means that the number is equal to zero.
- Parameters
-
| double& | Number to evaluate. |
- Returns
- true if the number passed in input is equal to zero, false otherwise.
- See also
- std::numeric_limits<double>::epsilon()
Definition at line 226 of file uwgainfromdb.h.
◆ retriveGainFromFile()
| double UnderwaterGainFromDb::retriveGainFromFile |
( |
const string & |
_file_name, |
|
|
const int & |
_row_index, |
|
|
const int & |
_column_index |
|
) |
| const |
|
protectedvirtual |
◆ setDepthRoughness()
| void UnderwaterGainFromDb::setDepthRoughness |
( |
const int & |
_depth | ) |
|
|
protectedvirtual |
Sets the depth_roughness_ parameter.
- Parameters
-
| Roughness | of the depth samples. |
Definition at line 132 of file uwgainfromdb.cpp.
◆ setDistanceRoughness()
| void UnderwaterGainFromDb::setDistanceRoughness |
( |
const int & |
_distance | ) |
|
|
protectedvirtual |
Sets the distance_roughness_ parameter.
- Parameters
-
| Roughness | of the distance samples. |
Definition at line 140 of file uwgainfromdb.cpp.
◆ setFrequencyCorrectionFactor()
| void UnderwaterGainFromDb::setFrequencyCorrectionFactor |
( |
const double & |
_frequency_correction_factor | ) |
|
|
protectedvirtual |
Sets the frequency_correction_factor_ parameter.
- Parameters
-
| Frequency | correction factor. |
Definition at line 156 of file uwgainfromdb.cpp.
◆ setTimeRoughness()
| void UnderwaterGainFromDb::setTimeRoughness |
( |
const int & |
_time | ) |
|
|
protectedvirtual |
Sets the time_roughness_ parameter.
- Parameters
-
| Roughness | of the temporal samples. |
Definition at line 124 of file uwgainfromdb.cpp.
◆ setTotalTime()
| void UnderwaterGainFromDb::setTotalTime |
( |
const int & |
_total_time | ) |
|
|
protectedvirtual |
Sets the total_time_ parameter.
- Parameters
-
| Maximum | value of the temporal samples. |
Definition at line 148 of file uwgainfromdb.cpp.
◆ depth_roughness_
| int UnderwaterGainFromDb::depth_roughness_ |
|
private |
◆ distance_roughness_
| int UnderwaterGainFromDb::distance_roughness_ |
|
private |
◆ frequency_correction_factor_
| double UnderwaterGainFromDb::frequency_correction_factor_ |
|
private |
used to shift from a frequency value to another one.
Definition at line 243 of file uwgainfromdb.h.
◆ osstream_
| ostringstream UnderwaterGainFromDb::osstream_ |
|
protected |
◆ path_
| char* UnderwaterGainFromDb::path_ |
|
protected |
Name of the trace file writter for the current node.
Definition at line 231 of file uwgainfromdb.h.
◆ time_roughness_
| int UnderwaterGainFromDb::time_roughness_ |
|
private |
◆ token_separator_
| char UnderwaterGainFromDb::token_separator_ |
|
protected |
Token used to parse the elements in a line of the database.
Definition at line 232 of file uwgainfromdb.h.
◆ total_time_
| int UnderwaterGainFromDb::total_time_ |
|
private |
Maximum value of the temporal samples, after this limit the smilulation time will be reset to zero.
Definition at line 241 of file uwgainfromdb.h.
The documentation for this class was generated from the following files:


JACOB'S LADDER A review in the public domain by The Phantom<EMAIL_ADDRESS>The Phantom went into JACOB'S LADDER expecting something along the lines of FLATLINERS; a fairly standard mainstream thriller with some horror touches -- enough to give moviegoers a few thrills, possibly even a few gross-outs, but no more than an occasional slightly crazed look or boiled rabbit. After all, the director, Adrian Lyne, is a master of the mainstream, commercial film -- with FLASHDANCE, 9 1/2 WEEKS, and FATAL ATTRACTION to his credit, Mr. Lyne is nothing if not knowledgeable about what sells, and he of all people would know that while audiences do like the occasional scare, the real money is in making films that are, at heart, conventional and predictable above all else.
So imagine the Phantom's surprise when he found that JACOB'S LADDER is as close to a full-tilt serious high-tech monster psychological thriller as we are likely to get until MISERY opens this Christmas. As Lyne took the audience through his rollercoaster-ride of a film, the Phantom marveled at the camera work, the lighting, the eerie music, and all of the classic horror touches that abounded throughout the film. Despite what the studio wishes you to believe, JACOB'S LADDER is not another GHOST, and it's not another FATAL ATTRACTION. JACOB'S LADDER is a classic, traditional horror film the likes of which we haven't seen in a good long while.
That said, the Phantom should also point out that JACOB'S LADDER is not a hard-core horror film like BRAIN DEAD -- an excellent low-budget film that it resembles in more than a few ways. When all is said and done, horror gives way to explanation and resolution, and truth be told, the film's ending is embarrassingly bad. But the festival of exposition doesn't begin until the last ten minutes of the film (to kick it off, one character literally stands facing the camera and explains the entire film to an audience which Mr. Lyne and the studio apparently believe has been standing in line for popcorn for the preceding two hours). And by that time the Phantom was not only able to forgive Mr. Lyne for giving in to convention -- the quaint American cinematic tradition of supplying a sensible and rational ending to everything -- but also for directing two of the most awful films of the eighties (the Phantom wasn't a particular phan of FATAL ATTRACTION, but at least it didn't provide another nail for the coffin of cinematic intelligence as did his two prior efforts).
JACOB'S LADDER begins in Vietnam, where we first meet Jake as he and his platoon get involved in serious combat. But shortly Jake awakens on the subway, bound for the Bergen Street station and home. Was the Vietnam episode a dream? Is the dirty, ill-lit subway car a dream, and is Jake still in fact in Vietnam? Though this last possibility can be dismissed by any New Yorker, who would know only too well that Jake's "G" train was a real-life nightmare from which few Brooklyn-ites can awaken, much of JACOB'S LADDER proceeds in just this fashion. Much of the time we never really know whether Jake is awake or asleep, or if the demons and strange goings-on he sees are really happening. And just when we're sure that Jake is finally back in "reality," Lyne pulls the rug out from under us once again and we're off on another loop of the coaster ride.
For phans who have seen the excellent low-budget sleeper BRAIN DEAD, this will sound very familiar. But where BRAIN DEAD achieved many of its nightmarish effects through the use of graphic gore and a generous helping of red dye #2, in JACOB'S LADDER Lyne relies on chipping away at tiny bits of normality -- a very effective and disturbing technique. Instead of putting a headless zombie on the subway, Lyne strews trash all over the floor and lets the lights flicker just so. But the trash doesn't look like trash you would expect to see on the subway, and the lights have a tendency to go out at just the worst times. The train itself is deserted but for a woman and a homeless person sleeping on a bench, but the woman doesn't respond to Jake when he asks whether or not they've passed Bergen Street, and to be honest, she doesn't look quite right. In fact, she looks like she might have stumbled out of the theater auditorium next door, where she could plausibly have played an extra in NIGHT OF THE LIVING DEAD. And though Jake is prepared to ignore the homeless person entirely as he leaves the train, something on the bench moves. We just get a glimpse of it, and we don't know what it is -- but what it isn't is *right*.
There's a lot that's not *right* in Jake's life, and throughout the film we find Jake clinging desperately to what he believes is reality. Yet it is a reality that is built on a very shaky foundation -- Jake's mental health. The well-written script (by Bruce Joel Rubin, who wrote the immensely popular GHOST) hints at possibilities: Jake might be suffering from a mental breakdown. He might be suffering from the effects of his tour of duty in Vietnam. He might be hallucinating, possibly because of drugs he took -- or drugs that were given to him without his knowledge -- while in the Army. And finally, he might be dead. It is to both Rubin and Lyne's credit that they make the last possibility the most plausible, for throughout much of the film it appears that Jake may be slowly descending into hell, and the demons he sees appear at least as real as does Jake himself.
Of course, the Phantom would never give away just what exactly is happening (there is a definite "something," alas, for as the Phantom mentioned, unlike BRAIN DEAD, JACOB'S LADDER is at heart a mainstream film) -- guessing is half the fun. But suffice it to say that things are almost never what they appear to be, and that while Lyne has us on the rollercoaster he rarely misses an opportunity to unnerve us, to confound us, and every once in a while to just plain scare the popcorn out from under our seats. There is more than a little ERASERHEAD in this film, and Lyne sends shivers down our spines in just the way Lynch did: by creating a world in which stockings draped over a shower curtain rod can look sinister; in which people's heads shake back and forth much too quickly; in which a chiropractor might be an angel and a surgeon a devil; and in which almost nothing seems quite right.
Well, not true. Although in Jake's world everything seems just a little off, in our world there are more than a few things that are exactly right. For one, the music (by Maurice Jarre) is wonderful, eerie and atmospheric when it needs to be and a delight the rest of the time. Lyne uses sound and lighting effects to great advantage, but he never over indulges so that the audience becomes aware of his camera tricks. And his rips in reality -- the touches of horror that he sprinkles throughout the film -- brought tears of joy to the Phantom's jaded eyes. Phans who saw THE EXORCIST III remember that many of its "special effects" were perfectly ordinary objects used in a disturbing context. When George C. Scott hears that his friend was murdered by having all the blood drained out of his body, we are horrified both because the script is so rich and the description is so good, and because we see over a dozen small beakers, all neatly aligned on a tray, that are filled with blood. Lyne's effects are like that, and JACOB'S LADDER succeeds as a horror film where films like LEATHERFACE fail: while gore is easy, it is rarely scary. JACOB'S LADDER may not be a hard-core horror film like HELLRAISER, but in many ways Lyne shows us a more convincing vision of hell than Barker -- with his team of special effects technicians -- was able to.
The performances (especially Tim Robbin's as Jake) are convincing, the script is generally intelligent, well-written, and without too many pointless diversions (though there are some), and the film -- like all of Lyne's films -- looks great. It is not a horror film from first frame to last, and phans who sneak out of GRAVEYARD SHIFT and into JACOB'S LADDER expecting more of the same (though the Phantom would have difficulty understanding why anyone would *want* more of the same) will be disappointed. JACOB'S LADDER needs a little time and space to develop in its own way and at its own pace, but the Phantom thinks that phans who see it and are willing to accept its sometimes illogical twists and turns will be pleasantly surprised. And phans who enjoyed BRAIN DEAD will almost assuredly enjoy JACOB'S LADDER, for there but for the grace of a major studio and $20 million dollars is something very similar to Charles Beaumont's glorious Twilight Zone-like script.
Good psychological horror films are so few and far between that the Phantom urges phans to see JACOB'S LADDER while they wait for the giant rats to leave and MISERY to arrive. When Chucky returns this Friday for a rehash of the very clever and original CHILD'S PLAY, the Phantom will be in attendance, laughing and throwing popcorn with the rest of the audience. But he probably won't be scared or disturbed or even very intrigued; JACOB'S LADDER was able to do all of these things with remarkable skill, and so the Phantom recommends it very highly indeed.
: The Phantom<EMAIL_ADDRESS>: {cmcl2,uunet}!esquire!baumgart
.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Oak Bay police looking for missing 39-year-old man
by Jeff BellOak Bay police are concerned about Nicholas Hasanen, 39, who has not been seen for a couple of weeks.
He frequently sleeps in a tent in parks or on beaches.
Hasanen is described as six feet with a slender build.
Call Oak Bay police at<PHONE_NUMBER> with any information.


This chart shows the different ranges for electric cars. Some of these cars are electric and gas but only the range of its electric tank is displayed. Click on the icon on top of each lollipop to select the electric car of choice which will be used in the next map.
This map below shows the locations of all public electric car charging stations in the United States. When you hover over a station's point, it will expand its radius to the length of the range of the electric car you chose in the lollipop map above. This allows you to see if you can make it from a certain point to another by hopping between charging stations. When you hover, the charging station's information is also displayed for you to use if desired.


{% include head.html %}
{% include header.html %} {% include page_painting.html %} {% include page_life.html %} {% include page_human.html %} {% include page_view.html %} {% include page_flower.html %} {% include about.html %} {% include footer.html %} {% include modals.html %} {% include js.html %}


ServiceSquare provides Fast, reliable and professional plumbing services.
We follow strict quality standards to ensure best quality plumbing services
We will redo the work free of charge if the problem recurs within 7 days of service
We verify address and check criminal history for all service providers


--- layout: post title: Daily Poem 22 date: 2014-10-26 08:14:52.000000000 -05:00 categories: - Poetry tags: - 5-7-5 - haiku - poem - poetry status: publish type: post published: true meta: mkd_text: |- Head shaved except One spot.  What were you thinking,
Mister Cropped Top?


Llamando
{{personCalling}}
Finalizar Llamada
Screen Share Window
Device selection
Device:
Control Mode:
Lines:
Change Line
Remove Number
Connect
Force Registration:


FRONT-END DEVELOPER
Let's build awesome sites together
Hello There. Everyone calls me Lavanya and I would like to describe myself as one who has the chops to be a Wordpress and Front end developer. I like to keep honing my skills and take pleasure in creating experiences of visual and functional impact. I also care about making my pages Responsive. When not coding, one can find me juggling with being a Rockstar mom, a yoga fanatic and a foodie.
Looks great on any screen size!
Easy to edit and search engine friendly
Faster rendering is a job well done
W3 standards compliant and clean commented code
Email me if you have any questions :
lavanyaswm@gmail.com


Enjoy the great benefits that Dentca dentures have provided to patients and doctors alike all over the U.S. now available on 3D printable material which help further streamline the process and make denture making even simpler and faster.
By making our dentures fully CAD/CAM we are giving our customer truer to impression quality restorations that further reduce distortion and increase retention. The DENTCA 3D printable Denture Base and Teeth are made of several acrylates which have been previously applied to the dental field and glued before post-curing utilizing the same material used for printing thus improving material performance through chemical bonding. The CAD design of the teeth on a by block set allow for easy and accurate tooth mounting on the denture base, reducing the risk of tooth misalignment and tooth cut necessary when making the final restoration.
Digital back up files allow for easy recovery, duplication and remake of lost/old denture prosthesis.
Physical properties and biocompatibilities have passed the FDA requirements and are similar to conventional denture bases and acrylic teeth. The 3D Denture material is a type of acrylic similar to PMMA which has the same properties as conventional acrylic with the convenience of curing through UV light instead of temperature. Strength and performance remain the same however.
Contact us at<EMAIL_ADDRESS>to find a certified Dentca 3D laboratory near you.
Dentca provides digital denture design, laboratory digital scanners, 3D printers, 3D printable try in & 3D printable final tooth and base materials at an affordable cost. Tooth shades on final materials are available in A1, A2, A3, A3.5, B1 & B2 Vita equivalent. Final denture base available in Original Pink, Light Pink & Dark Pink shades..
Are you interested in acquiring this technology? Contact Dentca today by emailing us at info@dentca.com


the and (.) {background with for margin {border-style mental px;} that #ffffff;} health during were COVID- al., was has social about been disease have age from people The Yes are can lockdown participants present px; stress {font-family analysis font-size its loss population study â€" any between data double; effects evaluating final media not which Conception Dr. Elsevier article, border-color border-width critically current design giving human lockdown, manage same. solid; study, such travel will {font-style {font-weight (Brooks Financial acquiring acquisition associated bold centre correlation courier; distancing either em; fear impact indicated individuals lead long only pandemic pattern pt;} published quarantine resource respondents responses significant sleep they various who work years years,


Pre-Modern Japanese: Japan reformed their writing system in 1900, making all of their writing from 800-1900 unreadable to all but a handful of specially trained scholars. Thus many interesting and practically important documents such as the following guide on how to identify fish people are unreadable by the average Japanese person!
To help address this, we've built an ML system which can recognize the Japanese characters! Check out some results (blue is ground truth, green is predicted, errors are marked with a red X):


Presented by Zhiyuan "Jason" Zheng, PhD
American Cancer Society
Health, safty, economics, social distancing, and school reopenings
Latent Dirichlet Allocation (LDA): unsupervised learning for clusterings/topics
corona, #corona, coronavirus, #coronavirus, covid, #covid, covid19, #covid-19, sarscov2, #sarscov2, sars cov2, sars cov 2, covid_19, #covid_19, #ncov, ncov, #ncov2019, ncov2019, 2019-ncov, #2019-ncov, pandemic, #pandemic, #2019ncov, 2019ncov
Full tweet text and geo information
The process of ‘computationally’ determining whether a piece of writing is positive, negative or neutral. It’s also known as opinion mining.
A Python library for processing textual data, part of the natural language processing for part-of-speech tagging, noun phrase extraction, sentiment analysis, classification, translation, and more.
A subfield of linguistics, computer science, information engineering, and artificial intelligence concerned with the interactions between computers and human (natural) languages, in particular how to program computers to process and analyze large amounts of natural language data.
Before: "As Columbia County suffers a #COVID19 spike due to golfing events. ... a political golf event in Easton with NO MASKS and NO SOCIAL DISTANCING. #NewYork #MaskUp https://t.co/zeOe511KdM"
After: "columbia counti suffer #covid19 spike due golf event ... polit golf event easton mask social distanc #newyork #maskup http co zeoe511kdm"
1. School_reopening (n=8557): school play footbal back week season colleg kid player sport cancel fall team game health risk plan check children high concern big athlet year take wonder free open reopen confer
2. 2020_Election (n=7945): trump realdonaldtrump american vote respons peopl presid elect america kill countri mail help state million think unemploy relief world money economi order call democrat gop take biden lie fund hous
3. State_News_Economy (n=7184): test new time case death posit state thank today well number report job work amp result rate first back florida hospit quarantin neg
4. Policies_Mask_Safty (n=8650): amp like mask peopl wear feel social student commun work spread safe help real everyon post love distanc put great famili face
5.


Anamika Dubey
Assistant Professor (since Jan 2016). School of Electrical Engineering and Computer Science, Washington State University.
EME 23, EECS
355 NE Spekane St
Pullman, WA 99163
I am an Assistant Professor in the School of Electrical Engineering and Computer Science at Washington State University (WSU), Pullman, WA. I received my Ph.D. degree in Dec 2015 from University of Texas at Austin (EECS) under the supervision of Dr. Surya Santoso. I have 10+ years of research experience in the electric power industry, where my contributions are situated at the intersection of mathematical optimization techniques and cyber-physical electric power distribution systems. Specifically, research is focused on the model-based and data-driven methods for decision-support in large-scale electric power distribution systems for improved efficiency, operational flexibility, and resilience in response to the grid’s changing nature and extreme weather events.
- Research in the area of optimization and control of the electric power distribution systems with a focus on the integration of grid-edge technologies. Leading multiple high-impact projects – secured a total of $2.6 million U.S. dollars in research funding as the lead PI.
- Serving/served as PI/Co-PI for multiple research grants supported by National Science Foundation (NSF), Alfred P. Sloan Foundation, Department of Energy (DOE), Pacific Northwest National Laboratory, Power System Engineering Research Center, Schweitzer Engineering Laboratories.
- Recipient of NSF Career Award (2019), EECS Early Career Award (2020), Voiland College of Engineering and Architecture (VCEA) Jr. Faculty Research Award (2021).
- Associate Editor (IEEE Transactions on Power Systems, Power Engineering Letters, IEEE Access)
- PES Chapter Chair, IEEE Palouse Section PES Chapter,
- Secretary, IEEE PES Distribution Systems Analysis Subcommittee and IEEE PES University Education Subcommittees.
news
| Jan 15, 2016 | A simple inline announcement with Markdown emoji! |
|---|---|
| Nov 7, 2015 | A long announcement with details |
| Oct 22, 2015 | A simple inline announcement. |


Infinite Science
Login
Home
Biology
Physics
Environment
Outer Space
Test
Log in
Username
Password
Confirm Password
Login
Remember me
Cancel
Forgot password?


Chapter 13 – Loading and Preprocessing Data with TensorFlow
This notebook contains all the sample code and solutions to the exercises in chapter 13.
| Run in Google Colab |
Setup
First, let’s import a few common modules, ensure MatplotLib plots figures inline and prepare a function to save the figures. We also check that Python 3.5 or later is installed (although Python 2.x may work, it is deprecated so we strongly recommend you use Python 3 instead), as well as Scikit-Learn ≥0.20 and TensorFlow ≥2.0.
# Python ≥3.5 is required
import sys
assert sys.version_info >= (3, 5)
# Scikit-Learn ≥0.20 is required
import sklearn
assert sklearn.__version__ >= "0.20"
try:
# %tensorflow_version only exists in Colab.
%tensorflow_version 2.x
!pip install -q -U tfx==0.15.0rc0
print("You can safely ignore the package incompatibility errors.")
except Exception:
pass
# TensorFlow ≥2.0 is required
import tensorflow as tf
from tensorflow import keras
assert tf.__version__ >= "2.0"
# Common imports
import numpy as np
import os
# to make this notebook's output stable across runs
np.random.seed(42)
# To plot pretty figures
%matplotlib inline
import matplotlib as mpl
import matplotlib.pyplot as plt
mpl.rc('axes', labelsize=14)
mpl.rc('xtick', labelsize=12)
mpl.rc('ytick', labelsize=12)
# Where to save the figures
PROJECT_ROOT_DIR = "."
CHAPTER_ID = "data"
IMAGES_PATH = os.path.join(PROJECT_ROOT_DIR, "images", CHAPTER_ID)
os.makedirs(IMAGES_PATH, exist_ok=True)
def save_fig(fig_id, tight_layout=True, fig_extension="png", resolution=300):
path = os.path.join(IMAGES_PATH, fig_id + "." + fig_extension)
print("Saving figure", fig_id)
if tight_layout:
plt.tight_layout()
plt.savefig(path, format=fig_extension, dpi=resolution)
Datasets
X = tf.range(10)
dataset = tf.data.Dataset.from_tensor_slices(X)
dataset
Equivalently:
dataset = tf.data.Dataset.range(10)
for item in dataset:
print(item)
dataset = dataset.repeat(3).batch(7)
for item in dataset:
print(item)
dataset = dataset.map(lambda x: x * 2)
for item in dataset:
print(item)
dataset = dataset.apply(tf.data.experimental.unbatch())
dataset = dataset.filter(lambda x: x < 10) # keep only items < 10
for item in dataset.take(3):
print(item)
dataset = tf.data.Dataset.range(10).repeat(3)
dataset = dataset.shuffle(buffer_size=3, seed=42).batch(7)
for item in dataset:
print(item)
Split the California dataset to multiple CSV files
Let’s start by loading and preparing the California housing dataset. We first load it, then split it into a training set, a validation set and a test set, and finally we scale it:
from sklearn.datasets import fetch_california_housing
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler
housing = fetch_california_housing()
X_train_full, X_test, y_train_full, y_test = train_test_split(
housing.data, housing.target.reshape(-1, 1), random_state=42)
X_train, X_valid, y_train, y_valid = train_test_split(
X_train_full, y_train_full, random_state=42)
scaler = StandardScaler()
scaler.fit(X_train)
X_mean = scaler.mean_
X_std = scaler.scale_
For a very large dataset that does not fit in memory, you will typically want to split it into many files first, then have TensorFlow read these files in parallel. To demonstrate this, let’s start by splitting the housing dataset and save it to 20 CSV files:
def save_to_multiple_csv_files(data, name_prefix, header=None, n_parts=10):
housing_dir = os.path.join("datasets", "housing")
os.makedirs(housing_dir, exist_ok=True)
path_format = os.path.join(housing_dir, "my_{}_{:02d}.csv")
filepaths = []
m = len(data)
for file_idx, row_indices in enumerate(np.array_split(np.arange(m), n_parts)):
part_csv = path_format.format(name_prefix, file_idx)
filepaths.append(part_csv)
with open(part_csv, "wt", encoding="utf-8") as f:
if header is not None:
f.write(header)
f.write("\n")
for row_idx in row_indices:
f.write(",".join([repr(col) for col in data[row_idx]]))
f.write("\n")
return filepaths
train_data = np.c_[X_train, y_train]
valid_data = np.c_[X_valid, y_valid]
test_data = np.c_[X_test, y_test]
header_cols = housing.feature_names + ["MedianHouseValue"]
header = ",".join(header_cols)
train_filepaths = save_to_multiple_csv_files(train_data, "train", header, n_parts=20)
valid_filepaths = save_to_multiple_csv_files(valid_data, "valid", header, n_parts=10)
test_filepaths = save_to_multiple_csv_files(test_data, "test", header, n_parts=10)
Okay, now let’s take a peek at the first few lines of one of these CSV files:
import pandas as pd
pd.read_csv(train_filepaths[0]).head()
Or in text mode:
with open(train_filepaths[0]) as f:
for i in range(5):
print(f.readline(), end="")
train_filepaths
Building an Input Pipeline
filepath_dataset = tf.data.Dataset.list_files(train_filepaths, seed=42)
for filepath in filepath_dataset:
print(filepath)
n_readers = 5
dataset = filepath_dataset.interleave(
lambda filepath: tf.data.TextLineDataset(filepath).skip(1),
cycle_length=n_readers)
for line in dataset.take(5):
print(line.numpy())
Notice that field 4 is interpreted as a string.
record_defaults=[0, np.nan, tf.constant(np.nan, dtype=tf.float64), "Hello", tf.constant([])]
parsed_fields = tf.io.decode_csv('1,2,3,4,5', record_defaults)
parsed_fields
Notice that all missing fields are replaced with their default value, when provided:
parsed_fields = tf.io.decode_csv(',,,,5', record_defaults)
parsed_fields
The 5th field is compulsory (since we provided tf.constant([])
as the “default value”), so we get an exception if we do not provide it:
try:
parsed_fields = tf.io.decode_csv(',,,,', record_defaults)
except tf.errors.InvalidArgumentError as ex:
print(ex)
The number of fields should match exactly the number of fields in the record_defaults
:
try:
parsed_fields = tf.io.decode_csv('1,2,3,4,5,6,7', record_defaults)
except tf.errors.InvalidArgumentError as ex:
print(ex)
n_inputs = 8 # X_train.shape[-1]
@tf.function
def preprocess(line):
defs = [0.] * n_inputs + [tf.constant([], dtype=tf.float32)]
fields = tf.io.decode_csv(line, record_defaults=defs)
x = tf.stack(fields[:-1])
y = tf.stack(fields[-1:])
return (x - X_mean) / X_std, y
preprocess(b'4.2083,44.0,5.3232,0.9171,846.0,2.3370,37.47,-122.2,2.782')
def csv_reader_dataset(filepaths, repeat=1, n_readers=5,
n_read_threads=None, shuffle_buffer_size=10000,
n_parse_threads=5, batch_size=32):
dataset = tf.data.Dataset.list_files(filepaths).repeat(repeat)
dataset = dataset.interleave(
lambda filepath: tf.data.TextLineDataset(filepath).skip(1),
cycle_length=n_readers, num_parallel_calls=n_read_threads)
dataset = dataset.shuffle(shuffle_buffer_size)
dataset = dataset.map(preprocess, num_parallel_calls=n_parse_threads)
dataset = dataset.batch(batch_size)
return dataset.prefetch(1)
train_set = csv_reader_dataset(train_filepaths, batch_size=3)
for X_batch, y_batch in train_set.take(2):
print("X =", X_batch)
print("y =", y_batch)
print()
train_set = csv_reader_dataset(train_filepaths, repeat=None)
valid_set = csv_reader_dataset(valid_filepaths)
test_set = csv_reader_dataset(test_filepaths)
model = keras.models.Sequential([
keras.layers.Dense(30, activation="relu", input_shape=X_train.shape[1:]),
keras.layers.Dense(1),
])
model.compile(loss="mse", optimizer=keras.optimizers.SGD(lr=1e-3))
batch_size = 32
model.fit(train_set, steps_per_epoch=len(X_train) // batch_size, epochs=10,
validation_data=valid_set)
model.evaluate(test_set, steps=len(X_test) // batch_size)
new_set = test_set.map(lambda X, y: X) # we could instead just pass test_set, Keras would ignore the labels
X_new = X_test
model.predict(new_set, steps=len(X_new) // batch_size)
optimizer = keras.optimizers.Nadam(lr=0.01)
loss_fn = keras.losses.mean_squared_error
n_epochs = 5
batch_size = 32
n_steps_per_epoch = len(X_train) // batch_size
total_steps = n_epochs * n_steps_per_epoch
global_step = 0
for X_batch, y_batch in train_set.take(total_steps):
global_step += 1
print("\rGlobal step {}/{}".format(global_step, total_steps), end="")
with tf.GradientTape() as tape:
y_pred = model(X_batch)
main_loss = tf.reduce_mean(loss_fn(y_batch, y_pred))
loss = tf.add_n([main_loss] + model.losses)
gradients = tape.gradient(loss, model.trainable_variables)
optimizer.apply_gradients(zip(gradients, model.trainable_variables))
optimizer = keras.optimizers.Nadam(lr=0.01)
loss_fn = keras.losses.mean_squared_error
@tf.function
def train(model, n_epochs, batch_size=32,
n_readers=5, n_read_threads=5, shuffle_buffer_size=10000, n_parse_threads=5):
train_set = csv_reader_dataset(train_filepaths, repeat=n_epochs, n_readers=n_readers,
n_read_threads=n_read_threads, shuffle_buffer_size=shuffle_buffer_size,
n_parse_threads=n_parse_threads, batch_size=batch_size)
n_steps_per_epoch = len(X_train) // batch_size
total_steps = n_epochs * n_steps_per_epoch
global_step = 0
for X_batch, y_batch in train_set.take(total_steps):
global_step += 1
if tf.equal(global_step % 100, 0):
tf.print("\rGlobal step", global_step, "/", total_steps)
with tf.GradientTape() as tape:
y_pred = model(X_batch)
main_loss = tf.reduce_mean(loss_fn(y_batch, y_pred))
loss = tf.add_n([main_loss] + model.losses)
gradients = tape.gradient(loss, model.trainable_variables)
optimizer.apply_gradients(zip(gradients, model.trainable_variables))
train(model, 5)
Here is a short description of each method in the Dataset
class:
for m in dir(tf.data.Dataset):
if not (m.startswith("_") or m.endswith("_")):
func = getattr(tf.data.Dataset, m)
if hasattr(func, "__doc__"):
print("● {:21s}{}".format(m + "()", func.__doc__.split("\n")[0]))
The TFRecord
binary format
A TFRecord file is just a list of binary records. You can create one using a tf.io.TFRecordWriter
:
with tf.io.TFRecordWriter("my_data.tfrecord") as f:
f.write(b"This is the first record")
f.write(b"And this is the second record")
And you can read it using a tf.data.TFRecordDataset
:
filepaths = ["my_data.tfrecord"]
dataset = tf.data.TFRecordDataset(filepaths)
for item in dataset:
print(item)
You can read multiple TFRecord files with just one TFRecordDataset
. By default it will read them one at a time, but if you set num_parallel_reads=3
, it will read 3 at a time in parallel and interleave their records:
filepaths = ["my_test_{}.tfrecord".format(i) for i in range(5)]
for i, filepath in enumerate(filepaths):
with tf.io.TFRecordWriter(filepath) as f:
for j in range(3):
f.write("File {} record {}".format(i, j).encode("utf-8"))
dataset = tf.data.TFRecordDataset(filepaths, num_parallel_reads=3)
for item in dataset:
print(item)
options = tf.io.TFRecordOptions(compression_type="GZIP")
with tf.io.TFRecordWriter("my_compressed.tfrecord", options) as f:
f.write(b"This is the first record")
f.write(b"And this is the second record")
dataset = tf.data.TFRecordDataset(["my_compressed.tfrecord"],
compression_type="GZIP")
for item in dataset:
print(item)
A Brief Intro to Protocol Buffers
For this section you need to install protobuf. In general you will not have to do so when using TensorFlow, as it comes with functions to create and parse protocol buffers of type tf.train.Example
, which are generally sufficient. However, in this section we will learn about protocol buffers by creating our own simple protobuf definition, so we need the protobuf compiler (protoc
): we will use it to compile the protobuf definition to a Python module that we can then use in our code.
First let’s write a simple protobuf definition:
%%writefile person.proto
syntax = "proto3";
message Person {
string name = 1;
int32 id = 2;
repeated string email = 3;
}
And let’s compile it (the --descriptor_set_out
and --include_imports
options are only required for the tf.io.decode_proto()
example below):
!protoc person.proto --python_out=. --descriptor_set_out=person.desc --include_imports
!ls person*
from person_pb2 import Person
person = Person(name="Al", id=123<EMAIL_ADDRESS># create a Person
print(person) # display the Person
person.name # read a field
person.name = "Alice" # modify a field
person.email[0] # repeated fields can be accessed like arrays
<EMAIL_ADDRESS># add an email address
s = person.SerializeToString() # serialize to a byte string
s
person2 = Person() # create a new Person
person2.ParseFromString(s) # parse the byte string (27 bytes)
person == person2 # now they are equal
Custom protobuf
In rare cases, you may want to parse a custom protobuf (like the one we just created) in TensorFlow. For this you can use the tf.io.decode_proto()
function:
person_tf = tf.io.decode_proto(
bytes=s,
message_type="Person",
field_names=["name", "id", "email"],
output_types=[tf.string, tf.int32, tf.string],
descriptor_source="person.desc")
person_tf.values
For more details, see the tf.io.decode_proto()
documentation.
TensorFlow Protobufs
Here is the definition of the tf.train.Example protobuf:
syntax = "proto3";
message BytesList { repeated bytes value = 1; }
message FloatList { repeated float value = 1 [packed = true]; }
message Int64List { repeated int64 value = 1 [packed = true]; }
message Feature {
oneof kind {
BytesList bytes_list = 1;
FloatList float_list = 2;
Int64List int64_list = 3;
}
};
message Features { map<string, Feature> feature = 1; };
message Example { Features features = 1; };
# WARNING: there's currently a bug preventing "from tensorflow.train import X"
# so we work around it by writing "X = tf.train.X"
#from tensorflow.train import BytesList, FloatList, Int64List
#from tensorflow.train import Feature, Features, Example
BytesList = tf.train.BytesList
FloatList = tf.train.FloatList
Int64List = tf.train.Int64List
Feature = tf.train.Feature
Features = tf.train.Features
Example = tf.train.Example
person_example = Example(
features=Features(
feature={
"name": Feature(bytes_list=BytesList(value=[b"Alice"])),
"id": Feature(int64_list=Int64List(value=[123])),
"emails"<EMAIL_ADDRESS>b"c@d.com"]))
}))
with tf.io.TFRecordWriter("my_contacts.tfrecord") as f:
f.write(person_example.SerializeToString())
feature_description = {
"name": tf.io.FixedLenFeature([], tf.string, default_value=""),
"id": tf.io.FixedLenFeature([], tf.int64, default_value=0),
"emails": tf.io.VarLenFeature(tf.string),
}
for serialized_example in tf.data.TFRecordDataset(["my_contacts.tfrecord"]):
parsed_example = tf.io.parse_single_example(serialized_example,
feature_description)
parsed_example
parsed_example
parsed_example["emails"].values[0]
tf.sparse.to_dense(parsed_example["emails"], default_value=b"")
parsed_example["emails"].values
Putting Images in TFRecords
from sklearn.datasets import load_sample_images
img = load_sample_images()["images"][0]
plt.imshow(img)
plt.axis("off")
plt.title("Original Image")
plt.show()
data = tf.io.encode_jpeg(img)
example_with_image = Example(features=Features(feature={
"image": Feature(bytes_list=BytesList(value=[data.numpy()]))}))
serialized_example = example_with_image.SerializeToString()
# then save to TFRecord
feature_description = { "image": tf.io.VarLenFeature(tf.string) }
example_with_image = tf.io.parse_single_example(serialized_example, feature_description)
decoded_img = tf.io.decode_jpeg(example_with_image["image"].values[0])
Or use decode_image()
which supports BMP, GIF, JPEG and PNG formats:
decoded_img = tf.io.decode_image(example_with_image["image"].values[0])
plt.imshow(decoded_img)
plt.title("Decoded Image")
plt.axis("off")
plt.show()
Putting Tensors and Sparse Tensors in TFRecords
Tensors can be serialized and parsed easily using tf.io.serialize_tensor()
and tf.io.parse_tensor()
:
t = tf.constant([[0., 1.], [2., 3.], [4., 5.]])
s = tf.io.serialize_tensor(t)
s
tf.io.parse_tensor(s, out_type=tf.float32)
serialized_sparse = tf.io.serialize_sparse(parsed_example["emails"])
serialized_sparse
BytesList(value=serialized_sparse.numpy())
dataset = tf.data.TFRecordDataset(["my_contacts.tfrecord"]).batch(10)
for serialized_examples in dataset:
parsed_examples = tf.io.parse_example(serialized_examples,
feature_description)
parsed_examples
Handling Sequential Data Using SequenceExample
syntax = "proto3";
message FeatureList { repeated Feature feature = 1; };
message FeatureLists { map<string, FeatureList> feature_list = 1; };
message SequenceExample {
Features context = 1;
FeatureLists feature_lists = 2;
};
# WARNING: there's currently a bug preventing "from tensorflow.train import X"
# so we work around it by writing "X = tf.train.X"
#from tensorflow.train import FeatureList, FeatureLists, SequenceExample
FeatureList = tf.train.FeatureList
FeatureLists = tf.train.FeatureLists
SequenceExample = tf.train.SequenceExample
context = Features(feature={
"author_id": Feature(int64_list=Int64List(value=[123])),
"title": Feature(bytes_list=BytesList(value=[b"A", b"desert", b"place", b"."])),
"pub_date": Feature(int64_list=Int64List(value=[1623, 12, 25]))
})
content = [["When", "shall", "we", "three", "meet", "again", "?"],
["In", "thunder", ",", "lightning", ",", "or", "in", "rain", "?"]]
comments = [["When", "the", "hurlyburly", "'s", "done", "."],
["When", "the", "battle", "'s", "lost", "and", "won", "."]]
def words_to_feature(words):
return Feature(bytes_list=BytesList(value=[word.encode("utf-8")
for word in words]))
content_features = [words_to_feature(sentence) for sentence in content]
comments_features = [words_to_feature(comment) for comment in comments]
sequence_example = SequenceExample(
context=context,
feature_lists=FeatureLists(feature_list={
"content": FeatureList(feature=content_features),
"comments": FeatureList(feature=comments_features)
}))
sequence_example
serialized_sequence_example = sequence_example.SerializeToString()
context_feature_descriptions = {
"author_id": tf.io.FixedLenFeature([], tf.int64, default_value=0),
"title": tf.io.VarLenFeature(tf.string),
"pub_date": tf.io.FixedLenFeature([3], tf.int64, default_value=[0, 0, 0]),
}
sequence_feature_descriptions = {
"content": tf.io.VarLenFeature(tf.string),
"comments": tf.io.VarLenFeature(tf.string),
}
parsed_context, parsed_feature_lists = tf.io.parse_single_sequence_example(
serialized_sequence_example, context_feature_descriptions,
sequence_feature_descriptions)
parsed_context
parsed_context["title"].values
parsed_feature_lists
print(tf.RaggedTensor.from_sparse(parsed_feature_lists["content"]))
The Features API
Let’s use the variant of the California housing dataset that we used in Chapter 2, since it contains categorical features and missing values:
import os
import tarfile
import urllib
DOWNLOAD_ROOT = "https://raw.githubusercontent.com/ageron/handson-ml2/master/"
HOUSING_PATH = os.path.join("datasets", "housing")
HOUSING_URL = DOWNLOAD_ROOT + "datasets/housing/housing.tgz"
def fetch_housing_data(housing_url=HOUSING_URL, housing_path=HOUSING_PATH):
os.makedirs(housing_path, exist_ok=True)
tgz_path = os.path.join(housing_path, "housing.tgz")
urllib.request.urlretrieve(housing_url, tgz_path)
housing_tgz = tarfile.open(tgz_path)
housing_tgz.extractall(path=housing_path)
housing_tgz.close()
fetch_housing_data()
import pandas as pd
def load_housing_data(housing_path=HOUSING_PATH):
csv_path = os.path.join(housing_path, "housing.csv")
return pd.read_csv(csv_path)
housing = load_housing_data()
housing.head()
housing_median_age = tf.feature_column.numeric_column("housing_median_age")
age_mean, age_std = X_mean[1], X_std[1] # The median age is column in 1
housing_median_age = tf.feature_column.numeric_column(
"housing_median_age", normalizer_fn=lambda x: (x - age_mean) / age_std)
median_income = tf.feature_column.numeric_column("median_income")
bucketized_income = tf.feature_column.bucketized_column(
median_income, boundaries=[1.5, 3., 4.5, 6.])
bucketized_income
ocean_prox_vocab = ['<1H OCEAN', 'INLAND', 'ISLAND', 'NEAR BAY', 'NEAR OCEAN']
ocean_proximity = tf.feature_column.categorical_column_with_vocabulary_list(
"ocean_proximity", ocean_prox_vocab)
ocean_proximity
# Just an example, it's not used later on
city_hash = tf.feature_column.categorical_column_with_hash_bucket(
"city", hash_bucket_size=1000)
city_hash
bucketized_age = tf.feature_column.bucketized_column(
housing_median_age, boundaries=[-1., -0.5, 0., 0.5, 1.]) # age was scaled
age_and_ocean_proximity = tf.feature_column.crossed_column(
[bucketized_age, ocean_proximity], hash_bucket_size=100)
latitude = tf.feature_column.numeric_column("latitude")
longitude = tf.feature_column.numeric_column("longitude")
bucketized_latitude = tf.feature_column.bucketized_column(
latitude, boundaries=list(np.linspace(32., 42., 20 - 1)))
bucketized_longitude = tf.feature_column.bucketized_column(
longitude, boundaries=list(np.linspace(-125., -114., 20 - 1)))
location = tf.feature_column.crossed_column(
[bucketized_latitude, bucketized_longitude], hash_bucket_size=1000)
ocean_proximity_one_hot = tf.feature_column.indicator_column(ocean_proximity)
ocean_proximity_embed = tf.feature_column.embedding_column(ocean_proximity,
dimension=2)
Using Feature Columns for Parsing
median_house_value = tf.feature_column.numeric_column("median_house_value")
columns = [housing_median_age, median_house_value]
feature_descriptions = tf.feature_column.make_parse_example_spec(columns)
feature_descriptions
with tf.io.TFRecordWriter("my_data_with_features.tfrecords") as f:
for x, y in zip(X_train[:, 1:2], y_train):
example = Example(features=Features(feature={
"housing_median_age": Feature(float_list=FloatList(value=[x])),
"median_house_value": Feature(float_list=FloatList(value=[y]))
}))
f.write(example.SerializeToString())
def parse_examples(serialized_examples):
examples = tf.io.parse_example(serialized_examples, feature_descriptions)
targets = examples.pop("median_house_value") # separate the targets
return examples, targets
batch_size = 32
dataset = tf.data.TFRecordDataset(["my_data_with_features.tfrecords"])
dataset = dataset.repeat().shuffle(10000).batch(batch_size).map(parse_examples)
Warning: the DenseFeatures
layer currently does not work with the Functional API, see TF issue #27416. Hopefully this will be resolved before the final release of TF 2.0.
columns_without_target = columns[:-1]
model = keras.models.Sequential([
keras.layers.DenseFeatures(feature_columns=columns_without_target),
keras.layers.Dense(1)
])
model.compile(loss="mse",
optimizer=keras.optimizers.SGD(lr=1e-3),
metrics=["accuracy"])
model.fit(dataset, steps_per_epoch=len(X_train) // batch_size, epochs=5)
some_columns = [ocean_proximity_embed, bucketized_income]
dense_features = keras.layers.DenseFeatures(some_columns)
dense_features({
"ocean_proximity": [["NEAR OCEAN"], ["INLAND"], ["INLAND"]],
"median_income": [[3.], [7.2], [1.]]
})
TF Transform
try:
import tensorflow_transform as tft
def preprocess(inputs): # inputs is a batch of input features
median_age = inputs["housing_median_age"]
ocean_proximity = inputs["ocean_proximity"]
standardized_age = tft.scale_to_z_score(median_age - tft.mean(median_age))
ocean_proximity_id = tft.compute_and_apply_vocabulary(ocean_proximity)
return {
"standardized_median_age": standardized_age,
"ocean_proximity_id": ocean_proximity_id
}
except ImportError:
print("TF Transform is not installed. Try running: pip3 install -U tensorflow-transform")
TensorFlow Datasets
import tensorflow_datasets as tfds
datasets = tfds.load(name="mnist")
mnist_train, mnist_test = datasets["train"], datasets["test"]
print(tfds.list_builders())
plt.figure(figsize=(6,3))
mnist_train = mnist_train.repeat(5).batch(32).prefetch(1)
for item in mnist_train:
images = item["image"]
labels = item["label"]
for index in range(5):
plt.subplot(1, 5, index + 1)
image = images[index, ..., 0]
label = labels[index].numpy()
plt.imshow(image, cmap="binary")
plt.title(label)
plt.axis("off")
break # just showing part of the first batch
datasets = tfds.load(name="mnist")
mnist_train, mnist_test = datasets["train"], datasets["test"]
mnist_train = mnist_train.repeat(5).batch(32)
mnist_train = mnist_train.map(lambda items: (items["image"], items["label"]))
mnist_train = mnist_train.prefetch(1)
for images, labels in mnist_train.take(1):
print(images.shape)
print(labels.numpy())
datasets = tfds.load(name="mnist", batch_size=32, as_supervised=True)
mnist_train = datasets["train"].repeat().prefetch(1)
model = keras.models.Sequential([
keras.layers.Flatten(input_shape=[28, 28, 1]),
keras.layers.Lambda(lambda images: tf.cast(images, tf.float32)),
keras.layers.Dense(10, activation="softmax")])
model.compile(loss="sparse_categorical_crossentropy",
optimizer=keras.optimizers.SGD(lr=1e-3),
metrics=["accuracy"])
model.fit(mnist_train, steps_per_epoch=60000 // 32, epochs=5)
TensorFlow Hub
import tensorflow_hub as hub
hub_layer = hub.KerasLayer("https://tfhub.dev/google/tf2-preview/nnlm-en-dim50/1",
output_shape=[50], input_shape=[], dtype=tf.string)
model = keras.Sequential()
model.add(hub_layer)
model.add(keras.layers.Dense(16, activation='relu'))
model.add(keras.layers.Dense(1, activation='sigmoid'))
model.summary()
sentences = tf.constant(["It was a great movie", "The actors were amazing"])
embeddings = hub_layer(sentences)
embeddings


Contacts
A
Adam
Ade
Aisha
Ajoke
B
Basheer
Bamu
Bola
Batula
C
Cynthia
Caramel
Candy
Developed by
Salamah


Password Safe allows users to store all passwords in a single "safe" (password database), or to create multiple databases for different purposes (e.g., one for work, one for personal use). Each database is independent and can be moved and used on different systems, as long as the same version of Password Safe is installed. Databases are encrypted with an encryption key derived from the master password (the master password, however, is not kept in the database in any form).
If you are using Password Safe for the first time, press the "New..." button. You will be asked to choose the name and location of your password database (the default, "pwsafe.psafe3", is fine). Afterwards, you will be prompted to enter a master password that is used to encrypt and lock the contents of your new safe.
Password Safe works very hard to make sure you password information is saved properly. However, Password Safe cannot protect against physical damage or loss to your hard disk, laptop or PC. Therefore, we strongly recommend that you make regular copies of your password database 'off-line', that is, to another PC or disk. This can be done manually, or by using a cloud storage service such as DropBox, SugarSync or JungleDisk, to name a few.
Another thing you might want to consider is arranging for access to your password database by relatives or co-workers if you are no longer able to do so. Password Safe has no 'back door' or 'recovery password' mechanism by design. This means that you are responsible for making the master key available to others under the appropriate circumstances. This can be as simple as a sealed envelope in a drawer or safe-deposit box, or a more elaborate mechanism such as splitting the master password and giving different parts to different parties.
There are two ways that a new database can be created. By clicking New... from the Master Password Entry dialog when the program is started, or from the "File ? New..." menu once Password Safe has been opened. Using either method causes the Master Password Set Up dialog to appear.
On checking the "Show Master Password" box, the contents of old and new master passwords will be visible in clear and the confirmation edit box is disabled as no longer necessary.
Password Safe can work with a YubiKey device to provide "two factor authentication", that is, protecting your database by both something you know (your master passphrase), and something you have (the YubiKey device). If you do not have a YubiKey device, then the YubiKey-specific buttons and texts will not be displayed by Password Safe, and the YubiKey-specific instructions below do not apply.
If your YubiKey is connected to your PC, then a "Yubikey" button and text area will appear in the Master Password Entry and Setup windows, as show above. This allows you to use your YubiKey to access your Password Safe database, either in addition to, or instead of a master password. For maximum security, we recommend that your database be protected both by your YubiKey and a master password (this is known as two-factor authentication).
To use your configured YubiKey to protect your database:
To open a Password Safe database protected with your Yubikey:
To setup a master password in a secure way, you could use accented characters (e.g. on a German keyboard) such as ü, ß or similar. To realize the input of such characters, you would need a foreign keyboard. Such a keyboard is available as a virtual keyboard. This keyboard is then used to simulate all available foreign characters. The virtual keyboard can be shown by clicking on the symbol. Foreign characters, that are not available at the physical keyboard, can be put in in this way. So you can build your desired master password. Even pieces of the master password can be built this way.


Using the Synapse Python Client with SFTP data storage¶
Installation¶
Installing the extra libraries that the Python client uses to communication with SFTP servers may add a few steps to the installation process.
Installing on Unix variants¶
Building these libraries on Unix OS’s is straight forward, but you need the Python development headers and libraries. For example, in Debian or Ubuntu distributions:
sudo apt-get install python-dev
Once this requirement is met, sudo pip install synapseclient
should be able
to build pycrypto.
Installing on Windows¶
Binary distributions of pycrypto built for Windows is available from Michael Foord at Voidspace. Install this before installing the Python client.
After running the pycrypto installer, sudo pip install synapseclient
should work.
Another option is to build your own binary with either the free developer tools from Microsoft or the MinGW compiler.


|
GT RoboCup SSL
Soccer software, robot firmware
|
Allow access to an I2C-connected MCP23017 16-bit I/O extender chip. More...
Public Types | |
| enum | Register { IODIR = 0x00, IPOL = 0x02, GPINTEN = 0x04, DEFVAL = 0x06, INTCON = 0x08, IOCON = 0x0A, GPPU = 0x0C, INTF = 0x0E, INTCAP = 0x10, GPIO = 0x12, OLAT = 0x14 } |
| enum | ExpPinName { PinA0 = 0, PinA1 = 1, PinA2 = 2, PinA3 = 3, PinA4 = 4, PinA5 = 5, PinA6 = 6, PinA7 = 7, PinB0 = 8, PinB1 = 9, PinB2 = 10, PinB3 = 11, PinB4 = 12, PinB5 = 13, PinB6 = 14, PinB7 = 15 } |
| enum | PinMode { DIR_OUTPUT = 0, DIR_INPUT = 1 } |
Public Member Functions | |
| MCP23017 (std::shared_ptr< I2C > sharedI2C, int i2cAddress) | |
| void | reset () |
| Reset MCP23017 device to its power-on state. More... | |
| void | writePin (int value, MCP23017::ExpPinName pin) |
| Write a 0/1 value to an output bit. More... | |
| void | writeMask (uint16_t data, uint16_t mask) |
| Write a masked 16-bit value to the device. More... | |
| uint8_t | readPin (MCP23017::ExpPinName pin) |
| Read a 0/1 value from an input bit. More... | |
| void | config (uint16_t dir_config, uint16_t pullup_config, uint16_t polarity_config) |
| Configure an MCP23017 device. More... | |
| void | writeRegister (MCP23017::Register regAddress, uint16_t val) |
| uint16_t | readRegister (MCP23017::Register regAddress) |
| void | pinMode (ExpPinName pin, PinMode mode) |
| void | digitalWrite (ExpPinName pin, int val) |
| int | digitalRead (ExpPinName pin) |
| uint16_t | digitalWordRead () |
| void | digitalWordWrite (uint16_t w) |
| void | inputPolarityMask (uint16_t mask) |
| void | inputOutputMask (uint16_t mask) |
| void | internalPullupMask (uint16_t mask) |
Allow access to an I2C-connected MCP23017 16-bit I/O extender chip.
| enum MCP23017::ExpPinName |
| enum MCP23017::PinMode |
| enum MCP23017::Register |
| MCP23017::MCP23017 | ( | std::shared_ptr< I2C > | sharedI2C, |
| int | i2cAddress | ||
| ) |
| void MCP23017::config | ( | uint16_t | dir_config, |
| uint16_t | pullup_config, | ||
| uint16_t | polarity_config | ||
| ) |
Configure an MCP23017 device.
| dir_config | data direction value (1 = input, 0 = output) |
| pullup_config | 100k pullup value (1 = enabled, 0 = disabled) |
| polarity_config | polarity value (1 = flip, 0 = normal) |
| int MCP23017::digitalRead | ( | ExpPinName | pin | ) |
| uint16_t MCP23017::digitalWordRead | ( | ) |
| void MCP23017::digitalWordWrite | ( | uint16_t | w | ) |
| void MCP23017::digitalWrite | ( | ExpPinName | pin, |
| int | val | ||
| ) |
| void MCP23017::inputOutputMask | ( | uint16_t | mask | ) |
| void MCP23017::inputPolarityMask | ( | uint16_t | mask | ) |
| void MCP23017::internalPullupMask | ( | uint16_t | mask | ) |
| void MCP23017::pinMode | ( | ExpPinName | pin, |
| PinMode | mode | ||
| ) |
| uint8_t MCP23017::readPin | ( | MCP23017::ExpPinName | pin | ) |
Read a 0/1 value from an input bit.
| bit_number | bit number range 0 –> 15 |
| uint16_t MCP23017::readRegister | ( | MCP23017::Register | regAddress | ) |
| void MCP23017::reset | ( | ) |
Reset MCP23017 device to its power-on state.
| void MCP23017::writeMask | ( | uint16_t | data, |
| uint16_t | mask | ||
| ) |
Write a masked 16-bit value to the device.
| data | 16-bit data value |
| mask | 16-bit mask value |
| void MCP23017::writePin | ( | int | value, |
| MCP23017::ExpPinName | pin | ||
| ) |
Write a 0/1 value to an output bit.
| value | 0 or 1 |
| bit_number | bit number range 0 –> 15 |
| void MCP23017::writeRegister | ( | MCP23017::Register | regAddress, |
| uint16_t | val | ||
| ) |


EXCESS BAGGAGE A film review by Andrew Hicks Copyright 1997 Andrew Hicks / Fatboy Productions
(1997) * (out of four)
BATMAN AND ROBIN was probably supposed to be the turning point in the career of Alicia Silverstone, the role that would make her a box office superstar rather than just the Moon Pie-faced cutie that carried such worthless "the" movies as THE CRUSH and THE BABYSITTER. The fourth BATMAN film, of course, turned out far worse than expected, in quality and quantity (at the box office), then Silverstone made the not-so-brilliant choice to follow that mistake up with EXCESS BAGGAGE , which will probably have her doing Aerosmith videos again by the year 1999.
Read my old reviews of Silverstone efforts and you'll see I had a killer crush on her through my late high school years -- 1993 through 1995. Back then, I was convinced that she had enough beauty and charm that, if she could ever pick a decent script, she would be a force to be reckoned with at the office. Now I realize that can't happen. Two or three bad movies could be a coincidence, but when you get to turkey number five, six and seven, it's time to get out of Hollywood and let some other teenage bulemic take her turn.
It sounds mean, but I've got no more patience for Alicia. Where a media-created infatuation used to lie, now I wonder what it was I liked about her in the first place. She's never acted convincingly in any movie other than CLUELESS, and then because the ditz character was tailored to her personality.  I've taken the advice of countless e-mailers and watched the film again -- and, no, it's not as bad as I thought. I'd up it to a two-and-a-half star rating in the wake of other Silverstone disasters. At least she was likeable there.
I went to see EXCESS BAGGAGE at the insistence of my younger brother, who's just now going through his Silverstone phase, maybe a little late. I've talked to a lot of guys my age and we were all infatuated with her at one time. This is the first time I've realized just how annoying she is when you're not attracted to her. Freed from my past crush, I could finally watch objectively as Silverstone embarrassed herself in her worst movie since THE BABYSITTER, even though this one had a budget and a theatrical release.
Silverstone plays a none-too-intelligent spoiled brat (a serious method acting role for her) who stages her own kidnapping as a last-ditch effort to gain her father's attention and affection. The movie, thankfully foregoing any buildup to the fake kidnapping, joins her just as she is arranging to have the ransom exchange. Then she handcuffs herself (a private preference of hers) and locks herself in the trunk. So far, so good. Then comes a fatal mistake -- car thief Benicio Del Toro decides to steal her BMW. That's not the mistake; the mistake is letting her out of the trunk when we all would have been much happier leaving her in.
This starts a series of predictable scenes -- brat Silverstone kicks him in the crotch, he locks her in the bathroom, she burns down the warehouse with a discarded cigarette butt, they end up in a car together, he dumps her, he finds out who she is and goes back to get her, she claims he molested her (in the movie's only funny line, "Daddy, he made me touch his penis," made even more amusing when you realize she wasn't talking about Benicio but the executive who was casting this movie), they fall in love -- that each become more tedious and grating than the last.
Then there are two supporting characters that lend nothing to the film. There's Harry Connick, Jr. (it had to be him) as Benicio's associate, who shows up a couple times to demand his money and ask what the hell's going on, why Alicia's still there, etc. And there's Christopher Walken, the uncle who is really sort of a surrogate father to Alicia. Walken tries to act fatherly but comes off creepier than normal in scenes where he tries to track down Alicio and Benicia.
None of this is the least bit amusing, intelligent or fun in execution. Alicia is unconvincing as the bad girl who has to smoke and cuss, Benicio is confusing in a performance that is a bizarre combination of Nicholson, French Stewart and Brad Pitt… hell, everyone is miscast except for Connick and he might as well not even be in the movie. Bad acting and bad writing combine to give this movie a plodding pace that makes it seem like it will never end. Better give Steven Tyler a call, Alicia.
--
Visit the Movie Critic at LARGE homepage at http://www.missouri.edu/~c667778/movies.html
Serving America For Almost 1/25th of a Century!
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Server
{{ server.name }}
is now down.
The ping exited with status code {{ ping.status_code }}.
Full output of the error can be seen below.
The ping has failed for the IP at {{ ping.hostname }} with the date {{ server_log.check_date }}!
The error log was:
{% include 'servers/emails/email_log.html' %}