Uncategorized « Matt’s Blog

Matt’s Blog Just another weblog

16Dec/06Off

Setting up Palm Pilot – Linux

So, I have had my Tungsten T3 Palm Pilot for quite some time now, but I've not been able to take full advantage of it in my daily work life. The problem was that when I purchased the Palm, I had a Windows XP system running the synchronization software. However, after removing Windows from my life, I've had to put aside my organizer until today.

This labor day weekend, I was determined to configure my Palm. Believe me, I have tried to task before and failed. I wonder what I did differently this time. Nonetheless, I have a fully functioning Tungsten T3 Palm Pilot capable of Internte access synchronizing with my system via the cradle. I will describe the steps I took to accomplish this goal along with some neat tools and services I discovered that make my Palm actually worth the money it cost.

Prerequisite

  • Fedora Core 4 - Kernel Version 2.6.16-1-2111
  • Pilot Link 0.11.8-11.4
  • Pilot Link Devel 0.11.8-11.4
  • Gnome Pilot 2.0.13-5
  • Gnome Pilot Devel 2.0.13-5
  • USB Visor - http://usbvisor.sourceforge.net/index.php
  • J-Pilot

Make sure that you have the above programs installed. You may download the Pilot Link and Gnome Pilot from http://rpm.pbone.net/. Pilot Link (http://www.pilot-link.org/) is a program which allows you to interact with your Palm. It basically setups the capability for the Palm to communicate with Linux. Our synchronization programs will utilize pilot-link to send and retreive content to and from the palm. This is all done automatically by J-Pilot, we only need to have the softawre installed. J-Pilot is your Palm Desktop equivelent. It manages the synchronization of the Calendar, Contacts, ToDo List, and MemoPad. An alternative to J-Pilot is Evolution. Evolution is the answer to Microsoft Outlook for Linux. However, as far as synchronizing with a Palm, I found Evolution to be lacking. The address book did not update the Birthday field, and it did not support Memos. Plus, I use Thunderbird as my email client and do not need to be running yet another one. Lastily, USB Visor takes care of the USB interface for the Palm. When we plug the Palm into the system, Visor will detect it as a Palm and allow pilot-link to communicate with it. The Visor website contains all the information you may need to configure the tool.

Okay, first thing we need to do is load some kernel modules. Login as root and type:

/sbin/modprobe usbserial /sbin/modprobe visor

You should then see:

> /sbin/lsmod | grep visor visor 19405 0 usbserial 31501 1 visor

Print some /var/log/messages output

Talk about the

dlpsh -p /dev/ttyUSB1
Send link to  http://howto.pilot-link.org/ppp/cb.html
Setting up permissions
usbcam udev

Filed under: Uncategorized 2 Comments
16Dec/06Off

Maintaining a random playlist

Today, I was thinking about how rhythmbox happens to be playing songs that I enjoy hearing, one after another. It for whatever reason, happens to know exactly the next song that I would like to hear. This got me thinking about the why this works. With these thoughts, I also got an idea how this processes could be improved to be even better.

When a new playlist is loaded, every song can be sorted on the following fields:

  • Title
  • Author
  • Album
  • Play count
  • Genre
  • Length
  • Last 10 time times
  • Surrounding tracks at last rating
  • Surrounding tracks at current rating

Play count is initialized to 0. Next, the user begins playing new tracks. This would increase the play count under the following conditions:

  • The song was completely played, or
  • The song was played atleast 75% and the next played track has a rating of atleast 3.

Upon updating the play count, the surrounding tracks are placed in the temporary surrounding tracks list. Later, this list becomes either the current rating or previous rating surrounding track list.

When a certain number of tracks have been seeded, the initialization of the random list can begin.

The first 10 tracks are sorted and the one with the most popular play time ( See most updating most popular play time ) closest to the current time is selected for play. This ensures that the first played song is a of high rating. Songs played at the same time, e.g. after work help build a profile of the listener. Perhaps, the individual begins preparing a meal when coming home from work at 6 pm. However, Friday he comes home at a different time and instead enjoys a different flavor of music. This sort of behavior requires that days are considered in the popular play time calculation.

Interesting things can begin to happen. The user at this time is always capable of switching to the next track. However, if the track is played through, note that its count and rating will be adjusted. This will continue for each succesively played track. Note that, occacionally, more frequent during first few minutes of playtime or number of songs played, the next selected track will be skewed from the current play list position. The exact offset is determined by a selective algorithm that considers the following information:

  • Tracks in the surrounding track list of the current and previous rating
  • Position at a random offset of the current. The exact offset is picked based on:
    • Genre similarity of next track compared to current
    • Artist
  • The above suggests that certain the next song should be as similiar to the current track as possilbe. It would be interesting to determine the beat patterns of the next songs in the list. It would also be beneficial to analyze and record a priority list of beat patterns which are most enjoyable to the current listener. This would be most ideal however suffers from a critical flaw in that different genres, even those in same, may have compeletly different patterns however they are appropriate to be played at the present time.

Now, certain songs are penelized in rating, more so, repelled from the list of surrounding tracks of current rating of the switching track. This may assist in composing distinctions between "moods" For instance, when I am listening to soft music and the next track isn't desirable, I will change it. This behavior indicates that the two tracks are not related and instead, priority should be given to the track which was selected. This binding will enforce a playlist of desirable songs. Frequently, a song can place an individual into a specific mood. This is more strengthened when following songs further reinforce the mood. The listener is overcome with a feeling of "perfectly selected" tracks.

It would also be interesting to create a sorted list of authors based on rating. For instance, a list of favorite Do or Die songs. Note that at anytime that a song is played, a rating is increased. The author hopes that the listener is not consistently in random play and is continually refiniforcing behavioral patterns. However, this is far fetched. In reality, this cannot be guaranteed and the random play must exploring new songs on its own. It will therefore attemtp to select sogns over time which have never been visited. This process will create an organic playlist since new songs are selected. However, unattended play or attempt to find new songs can have negative effect since poisoning of the list can occur. This means that there must be an aggresive algorithm for 1. Retaining strong bounded songs and mood files 2. Be flexible in adjusting this list 3. Efficiently label songs as unwanted. The challange remains in that at one particular time a song was not friendly since it had bad timing (perhaps the mood algorithm was incorrect) it should still maintain its rating but analyses of whether the song should mainting its strong bound should be considered, perhaps simply weakened.

Allow people to queue next song - strong indicator of mood and acceptable next song - however, user may be experimenting and this should be accounted for. Allow users to quickly enable and disable the list. Also, allow users to easily remove songs from the queue.

Problems with iTunes Smart Playlist

The iTunes is apparently a successful manager of enormeous playlists. However, preminelary analysis shows critical falts including:

  • Only supports organization based on limited criteria which do not nesesseraly reflect the mood of the listener and validity of next play song. Smart Playlist is limited to:
    • Play count
    • File type filtretation
    • Conditions based on:
      • Time, genre, etc which includes field values created by customized user input - especially mood
    • In the mood is based on keywords associated with a song. Therefore, each song must be individually labelled with a particular mood.

Positive of Smart Playlist

There are qualities of Smart Playlist which make it a successful algorithm, including:

  • Creation and composition of multiple playlists. N x N relationships can be created among playlists. In other words, subsets of playlists can be composed to create a new smart playlist.

Reference: http://playlistmag.com/help/2005/02/brillplaylist/

Note that additional research is needed into the Smart Playlist aswell as alternative solutions in order to leverage and incorporate successful solutions.

Note that algorithm must be able to determine songs that are enjoyable in a series, for instance, I like to hear all Phil Collins track.  It's my Phil Collins mood.

Filed under: Uncategorized No Comments
16Dec/06Off

Systematic method of file sharing

This post deals with creating a method that will allow users to download related files in a systematic fashion, e.g. automatically downloaded such as with RSS feeds).

The website contains a list of files that are requested for download. The processes will be explained with an example involving The Sopranos episodes. When the episode is aired or created, a user will attempt to upload it. Users will then download the file and be able to adjust its rating. Note that, several users will be able to upload the same file at the same time. This will allow for switching to valid files. It is negotioable whether users will be able to view all versions of possible tracks. It would be advisible to do so, since users will be able to download and rate higher successful uploads. Instead of listing all the user uploads for a parcticular file, instead, only the first five determined by the rating of the user uploading the file. Users posting a file similiar or with a certain number of positive tracks have their rating also increased.

Users with a high rating are rewarded in the following ways:
given more bandwidth for downloads
more?

Uses:
Download music
Download complete shows
Create communities for particular songs - voting?

Filed under: Uncategorized No Comments
9Aug/06Off

apache htaccess and htdigest

Okay, so this evening I noticed I had webalizer installed (http://localhost/usage) and was desperatly concerned when I noticed it was exposed to the entire world. Luckily enough, I was installing MythWeb a few days ago and stumbled upon htdigests for authentication. Apparently, it still (like basic authentication) has its problems which you may read about in the Apache manual. However, digest authentication only sends the MD5 of your password across the web. Therefore, intruders will not be able to intercept the contents of your password. Nonetheless, webalizer uses the directory /var/www/usage to store it's files and this happens to be the directory that I am trying to protect. My inital idea was to drop a .htaccess file inside of this directory and see what happens. Here were the contents of that file:

AuthType Digest AuthName "Webaliver" AuthDigestFile /var/www/htdigest Require valid-user

Very simple. The problem was, the directory did not have an "AllowOverride" tag inside my httpd.conf file. As a matter of fact, the file didn't even exist in the directory. No problem, lets create the element. Inside httpd.conf:

AuthType Digest AuthName "Webalizer" AuthDigestFile /var/www/htdigest Require valid-user

Another way of doing it... Instead of creating a htaccess file for the /usage directory, let's just add the authentication parameters inside of the directory element of the httpd.conf file.
Directory> AuthType Digest AuthName "Webalizer" AuthDigestFile /var/www/htdigest Require valid-user /Directory>

That should help. Bed time. Coming up next, how to make Amanda force full backups to your USB drive.

Filed under: Uncategorized 3 Comments