Category Archives: Science - Page 4

woofi, a location-aware WiFi switcher for Android devices.

Woofi

My most recent project is an app called woofi.  Let me quote the apps description from its market page:

Simply put, with woofi you define locations like “home”, “work”, or “Joe’s house”, and woofi turns your WiFi radio on when near those points and off when not.

More detailed explanation:

Say, for example, that the only place you connect your phone to WiFi is at home. This means you don’t need for the WiFi radio in your phone to be on when you’re not at home. The rest of the day it’s just sitting there trying to connect to access points and wasting battery.

With this app you would save your “home” location (and wherever else you connect to WiFi regularly…like at the office), and the app would keep track of your location throughout the day and when you weren’t near these saved locations turn your WiFi radio off, and then when you were near them it would turn your WiFi radio back on.

You can, of course, simply turn the WiFi radio on and off manually when you are at-home/not-at-home, the only purpose of this app is to automate doing this for you. I always forget to do this manually…thus the idea for this app.

Most people seem to leave their WiFi on all the time and not realize that it’s on because it just connects to networks that they’ve connected to before automatically.

Here’s what normally happens without this app: Once you’ve connected to your home (or office, or wherever) WiFi, Android will just connect to your home WiFi every time you’re in range. The only way it knows to do this is because the WiFi radio in your phone is on all the time looking for WiFi networks to connect to.

This app replaces that procedure by checking your phones location and leaving the WiFi radio off unless it is needed. Doing this saves battery life.

Coming soon expect some posts about the logic and trade offs made in the development of this app.

Placebos, dude

How long does it take to play the Half-Life series?

I recently played all the way through the following games on the hardest difficulty.

[table id=1 /]

I have played through all the games before, but it’s been years.  I didn’t rush through any of the games.  I didn’t look in every nook and cranny of each level, but things that were interesting, I investigated.

I must say, the whole Half-Life series is a blast to play.  I am, however, disappointed at how much shorter Half-Life 2 was then Half-Life 1.

New home

This isn’t directly connected what I normally post about, but I’ve got a home I’m trying to sell!

Links of the day

I bet this smells good.

I wonder if any significant portion of the Egyptian populace will hear about this.

Glucosamine and chondroitin shown to be ineffective supplements.  How surprising.

Chemistry Ph.D. thesis + dance = cute smart girls edumacating.

What to do when a body part falls off.

Apple Trailer Downloader .2.1

A small update to version .2…

  • Added the <quality></quality> element to the .nfo file generated for the Home Theater Experience Script.

Windows .exe here.

Source code here.

Original post with more info here.

Apple Trailer Downloader .2

Version .2 of my Apple Trailer Downloader is out.  Major changes:

  • Code organization to allow easier updates (this is an on-going effort since when I started this project it kind of grew organically rather than having some sort of plan.)
  • Added the --htenfo option.  This creates a .nfo file for each trailer for use with the Home Theater Experience XBMC script.
  • Added the --imdb option.  This fetches movie information from the IMDB.  Currently, it only uses this information to get MPAA ratings for trailers that Apple doesn’t specify a MPAA rating for.  Many upcoming movies still don’t have MPAA ratings so this won’t help in those instances.

Hit the original post for more info and the download link.

Apple Trailer Downloader

This isn’t currently working because of changes to Apple’s site. I hope to fix it before the end of the year.

I wanted all the movie trailers from Apple in the highest resolution available (1080p for most of them), so I wrote this script in python to fetch them all.

Usage

Update: I wasn’t very clear about this before. ATD keeps a database of what it’s already downloaded, so each time you run it, it will just download everything you haven’t downloaded yet.

This works through the command line in a very simple manner.

I’ll start out with some examples and then provide a full option list.

The following example will download 500 megabytes worth of trailers and save them to C:\Trailers.

atd -l 500 -d "C:\Trailers"

The next example will do the same and also append “-trailer” to the filename and change the extension to “.hdmov”.

atd -l 500 -d "C:\Trailers" -a "-trailer" -e "hdmov"

If there is a certain trailer you would like atd to download again (say you deleted the trailer on accident), you can call it as follows. The one downside to this method is that all this does is tell ATD to not skip this trailer when processing the trailer list. If it doesn’t make it to the movie because you’ve used the download limit option it won’t download it again. Changing this behavior is on my todo list.

atd --redown "Iron Man 2"

If you want the maximum resolution it downloads to be 480p you do it like so:

atd --respref "480p"

To get help you do this:

atd -h

Which will ouput:

Usage: atd [options]

If no options passed, it will download all not already downloaded trailers to a
subdir called Trailers.

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -l MB, --downlimit=MB
                        Approxmiate megabytes to download per session
                        (default: 0)
  -d DIR, --dest=DIR    Destination directory. (default: Trailers)
  -a TEXT, --append=TEXT
                        Appends the specified text to the filename. (default:
                        -trailer)
  -r, --rename          Rename trailer with movies name.
  -e EXTENSION, --ext=EXTENSION
                        Changes file extension to what is specified
  --redown=movie name   Redownloads the trailer for the specified movie.  Ex:
                        --redown Iron Man 2
  --flush               WARNING: This option deletes your download history
                        which means that all trailers will be downloaded again
  --respref=RESPREF     Get specified resolution or less.  Options are
                        ['1080p', '720p', '480p', '640w', '480']
  --reslimit=RESLIMIT   Get specified resolution or dont get trailer at all
  --mdate=DATE          Only get trailers for movies with a release date after
                        this. (format: YYYY-MM-DD)
  --tdate=DATE          Only get trailers released after this date. (format:
                        YYYY-MM-DD)
  --fake                Don't download, just print list of movies it would
                        download trailers for with the specified commandline.
                        (Ignores download limit)
  --htenfo              Writes an nfo file for use with the Home Theater
                        Experience XBMC script.
  --imdb                Fetches missing information like MPAA rating from
                        IMDB.  (Slows down parsing)

Please report any bugs or feature requests you may have. This script is dependent upon how Apple presents it’s trailers on the web. If they change the correct (or incorrect depending on how you look at it) things this script will break. I’ll do my best to keep up with such changes.

Newest Version

Version 0.2.2 is here.

Source

ATD is now on github.

Older versions

Version 0.2.1 is here.

Version 0.2 for Windows users is here.
Version 0.2 for Linux users or users interested in the source can get it here.

Version 0.1 for Windows users is here.
Version 0.1 for Linux users or users interested in the source can get the source code here.

Planned Features

Rolling updates

With this feature, ATD will be able to keep a folder full of only trailers for movies past a certain date (for example, only trailers for movies that haven’t been released yet).  It will remove trailers for movies before the date and add/dl trailers for movies with new trailers.

Known Bugs

  • With --imdb, ATD fetches info for all trailers even if because of other options like --downlimit we’ve limited the number of trailers that will download.
  • Funkiness with --redown.
  • Unicode handling is currently a hackjob.

Naturalnews.com is misleading to further their anti-vaccine agenda

Someone recently pointed me to an article on Naturalnews.com.  It’s idiocy blew my mind.

I probably shouldn’t even dignify it with a rebuttal, but I can’t help myself.

#1) Where are the randomized, double-blind, placebo-controlled studies proving flu vaccines are both safe and effective?
Answer: There aren’t any.

The CDC would like to disagree.  Even if there weren’t such studies, we have to make decisions based upon the best available evidence and every study that has been done points to the flu vaccine being effective and safe.

#2) Where, then, is the so-called “science” backing the idea that flu vaccines work at all?
Answer: Other than “cohort studies,” there isn’t any. And the cohort studies have been thoroughly debunked. Scientifically speaking, there isn’t a scrap of honest evidence showing flu vaccines work at all.

See the previous question.  Studies of flu vaccine effectiveness have not been “thoroughly debunked”.  If this was so how come the scientific consensus still supports the use of the flu vaccine?

#3) How can methyl mercury (Thimerosal, a preservative used in flu vaccines) be safe for injecting into the human body when mercury is an extremely toxic heavy metal?
Answer: It isn’t safe at all. Methyl mercury is a poison. Along with vaccine adjuvants, it explains why so many people suffer autism or other debilitating neurological side effects after being vaccinated.

Point number one, thimerosal is ethyl mercury, not methyl mercury which is a critical difference as ethyl mercury doesn’t accumulate in the body like methyl mercury.  Regardless of that, almost all evidence points to no ill effects from thimerosal in vaccines.

As Wikipedia says:

Most conclusively, eight major studies (as of 2008) examined the effect of reductions or removal of thiomersal from vaccines. All eight demonstrated that autism rates failed to decline despite removal of thiomersal, arguing strongly against a causative role.

On to their next point…

#4) Why do reports keep surfacing of children and teens suffering debilitating neurological disorders, brain swelling, seizures and even death following flu vaccines or HPV vaccines?
Answer: Because vaccines are dangerous. The vaccine industry routinely dismisses all such accounts — no matter how many are reported — as “coincidence.”

I don’t even understand how this is an actual argument.

Correlation is not the same thing as causation.  I’m sure hundreds of people have got in car accidents after getting a flu vaccine as well.  Is that the flu vaccine’s fault?

#5) Why don’t doctors recommend vitamin D for flu protection, especially when vitamin D activates the immune response far better than a vaccine? (http://www.naturalnews.com/027231_V…)
Answer: Because vitamin D can’t be patented and sold as “medicine.” You can make it yourself. If you want more vitamin D, you don’t even need a doctor, and doctors tend not to recommend things that put them out of business

Oh gosh, a conspiracy theory.  Why didn’t I see that coming?  It’s not an either/or situation.  Vitamin D does strengthen the immune system.  However, a strong immune system doesn’t keep you from getting the flu.

I’ll finish up with my rebuttal in my next post.

We don’t understand ourselves, or, how psychologists see themselves

As Tyler Cowen points out this is quite an interesting time waster:

The email edition of the British Psychological Society’s Research Digest has reached the milestone of its 150th issue. That’s over 900 quality, peer-reviewed psychology journal articles digested since 2003. To mark the occasion, the Digest editor has invited some of the world’s leading psychologists to look inwards and share, in 150 words, one nagging thing they still don’t understand about themselves. Their responses are by turns candid, witty and thought-provoking. Here’s what they had to say…

Here’s one of the answers submitted by Chris McManus, Professor of Psychology and Medical Education at UCL:

Chris McManus: Beauty

What is this thing I call beauty? Not “art” as a social phenomenon based on status or display, or beautiful faces seen merely as biological fitness markers. Rather, the sheer, drawing-in-of-breath beauty of a Handel aria, a Rothko painting, TS Eliot’s poems, or those everyday moments of sun shining through wet, autumn leaves, or even a Powerpoint layout seeming just right. Content itself doesn’t matter – Cezanne’s paintings of apples are not beautiful because one likes apples, and there are beautiful photographs of horrible things. Somewhere there must be something formal, structural, compositional, involving the arrangement of light and shade, of sounds, of words best ordered to say old ideas in new ways. When I see beauty I know it, and others must also see it, or they wouldn’t make the paintings I like or have them hung in galleries. But why then doesn’t everyone see it in the same way?

Get more answers here.