Showing posts with label Tech. Show all posts
Showing posts with label Tech. Show all posts

Saturday, May 23, 2009

From a Queen Song to a Better Music Search Engine

From: http://ucsdnews.ucsd.edu/newsrel/students/05-09Barrington.asp

New song dissection technology from UC San Diego

May 15, 2009

By Daniel Kane

At a recent IEEE technology conference, UC San Diego electrical engineers presented a solution to their problem with the song “Bohemian Rhapsody,”—and it’s not that they don’t like this hit from the band Queen. The electrical engineers’ issue with “Bohemian Rhapsody” is that it is too heterogeneous. With its mellow piano, falsetto vocals, rock opera sections and crazy guitar solos, Bohemian Rhapsody is so internally varied that machine learning algorithms at the heart of their experimental music search engine have trouble labeling the song. The solution presented at the 2009 International Conference on Acoustics, Speech, and Signal Processing (ICASSP) in Taiwan could lead to improvements in the electrical engineers’ song labeling and search engine system.

Watch a video of the project.

The system “listens” to songs it has never heard before, labels them based on the actual sounds in the song, and then retrieves songs, as appropriate, when people type descriptive words—like “mellow jazz”—into the team’s experimental search engine.

At ICASSP, UC San Diego electrical engineering Ph.D. student Luke Barrington presented a new model for music segmentation that can capture both the sound of a song and how this sound changes over time. By modeling music in this way, Barrington showed how to automatically segment songs such as Bohemian Rhapsody into homogenous sections such as verses, choruses and bridges. This new approach to training computers to dissect songs into heterogeneous segments and then accurately label each chunk could improve the accuracy of the new music search engine built by engineers from the Jacobs School of Engineering at UC San Diego.

The team’s nickname for their experimental music search engine is “Google for music”. Users type descriptive words—rather than song titles, album names or artist names—and
the search engine returns specific song suggestions. The engine currently works for more than 100 words that cover music genres, emotions and instruments. The Jacobs School engineers are working to expand the search engine’s “vocabulary” before opening it up to the public later this year.

Teaching Computers to Label Songs

Luke Barrington, an electrical engineering graduate student, led the team that built Herd It the new Facebook games for music discovery.

In order to “teach” the search engine new words, the engineers need to show it many different examples of songs that fit that description. Initially, the engineers paid UC San Diego undergraduates to manually label songs that would serve as training materials for machine learning algorithms. But instead of continuing to rely on this expensive option, the engineers built online music games that encourage people connected via the Internet to do the song labeling while listening to music online.

In April, the electrical engineers launched their games on Facebook as an application called Herd It (http://apps.facebook.com/herd-it).

To play Herd It, log in to Facebook, open the Herd It app, select a genre of music, and start listening to song clips and playing the games. Some games ask users to identify instruments, while others focus on music genres, artist names, emotions triggered by the song, and activities you might do while listening to a song. The more your answers align with the rest of the online crowd playing the game at the same time, the more points you score.

“The Facebook games are a lot of fun and a great way to discover new music. At the same time, the games deliver the data we need to teach our computer audition system to listen to and describe music like humans do,” said Gert Lanckriet, the electrical engineering professor and machine learning expert from the Jacobs School of Engineering steering the project. Lanckriet also leads UC San Diego’s Computer Audition Laboratory, housed at the UC San Diego division of Calit2.

For the system to “listen and describe music like a human,” it must find patterns in the songs using the tools of machine learning. For example, for the system to learn to identify and label romantic songs, it must be exposed to many different romantic songs during the training period.

A screen shot from the new music discovery game on Facebook: Herd It. View more screen shots on the Jacobs School blog.

This exposure enables the machine learning algorithms find patterns in the wave forms of the songs that make the songs romantic. Once trained, the system can identify romantic songs that it has never before encountered, offering the tantalizing possibility of amassing a huge database of songs that can be tagged and retrieved based on text-based searches with no human intervention.

“The more examples of romantic songs our search engine is exposed to, the more accurately it will be able to identify romantic songs it has never heard before,” explained Barrington.

Part of Barrington’s Ph.D. dissertation will involve demonstrating that data collected from the Facebook games reliably improves the accuracy of the search engine.

“Once enough people play our new music discovery games on Facebook, I’ll have the data I need to both improve our search engine and finish my Ph.D.,” said Barrington.

The song-word combinations collected by the Facebook games will also enable the researchers to grow their music search engine’s vocabulary and increase its coverage in genres and classes of music.

###

2009 ICASSP (IEEE International Conference on Acoustics, Speech, and Signal Processing): “Dynamic Texture Models of Music,” by Luke Barrington, Antoni Chan and Gert Lanckriet from the Electrical and Computer Engineering Department at UC San Diego’s Jacobs School of Engineering. To appear inICASSP 2009.

Herd It game on Facebook:
http://apps.facebook.com/herd-it or http://herdit.org

Online Game Feeds Music Search Engine Project UC San Diego press release from 2007

A Search Engine with Ears Jacobs School of Engineering alumni magazine, Pulse

The National Science Foundation (NSF) funded some of the research leading to this publication, as well as some of the students who contributed.

UC San Diego’s von Liebig Center provided funding that enabled the researchers to create Herd It’s professional interfaces for the music games. The von Liebig Center also provided the engineers with entrepreneurship advisory services and “incubation space”.

Media Contact: Daniel Kane, 858-534-3262 or dbkane@ucsd.edu

Friday, May 22, 2009

MySQL Commands

This is a list of handy MySQL commands that I use time and time again. At the bottom are statements, clauses, and functions you can use in MySQL. Below that are PHP and Perl API functions you can use to interface with MySQL. To use those you will need to build PHP with MySQL functionality. To use MySQL with Perl you will need to use the Perl modules DBI and DBD::mysql.

Below when you see # it means from the unix shell. When you see mysql> it means from a MySQL prompt after logging into MySQL.

To login (from unix shell) use -h only if needed.

# [mysql dir]/bin/mysql -h hostname -u root -p

Create a database on the sql server.

mysql> create database [databasename];

List all databases on the sql server.

mysql> show databases;

Switch to a database.

mysql> use [db name];

To see all the tables in the db.

mysql> show tables;

To see database's field formats.

mysql> describe [table name];

To delete a db.

mysql> drop database [database name];

To delete a table.

mysql> drop table [table name];

Show all data in a table.

mysql> SELECT * FROM [table name];

Returns the columns and column information pertaining to the designated table.

mysql> show columns from [table name];

Show certain selected rows with the value "whatever".

mysql> SELECT * FROM [table name] WHERE [field name] = "whatever";

Show all records containing the name "Bob" AND the phone number '3444444'.

mysql> SELECT * FROM [table name] WHERE name = "Bob" AND phone_number = '3444444';

Show all records not containing the name "Bob" AND the phone number '3444444' order by the phone_number field.

mysql> SELECT * FROM [table name] WHERE name != "Bob" AND phone_number = '3444444' order by phone_number;

Show all records starting with the letters 'bob' AND the phone number '3444444'.

mysql> SELECT * FROM [table name] WHERE name like "Bob%" AND phone_number = '3444444';

Show all records starting with the letters 'bob' AND the phone number '3444444' limit to records 1 through 5.

mysql> SELECT * FROM [table name] WHERE name like "Bob%" AND phone_number = '3444444' limit 1,5;

Use a regular expression to find records. Use "REGEXP BINARY" to force case-sensitivity. This finds any record beginning with a.

mysql> SELECT * FROM [table name] WHERE rec RLIKE "^a";

Show unique records.

mysql> SELECT DISTINCT [column name] FROM [table name];

Show selected records sorted in an ascending (asc) or descending (desc).

mysql> SELECT [col1],[col2] FROM [table name] ORDER BY [col2] DESC;

Return number of rows.

mysql> SELECT COUNT(*) FROM [table name];

Sum column.

mysql> SELECT SUM(*) FROM [table name];

Join tables on common columns.

mysql> select lookup.illustrationid, lookup.personid,person.birthday from lookup left join person on lookup.personid=person.personid=statement to join birthday in person table with primary illustration id;

Creating a new user. Login as root. Switch to the MySQL db. Make the user. Update privs.

# mysql -u root -p
mysql> use mysql;
mysql> INSERT INTO user (Host,User,Password) VALUES('%','username',PASSWORD('password'));
mysql> flush privileges;

Change a users password from unix shell.

# [mysql dir]/bin/mysqladmin -u username -h hostname.blah.org -p password 'new-password'

Change a users password from MySQL prompt. Login as root. Set the password. Update privs.

# mysql -u root -p
mysql> SET PASSWORD FOR 'user'@'hostname' = PASSWORD('passwordhere');
mysql> flush privileges;

Recover a MySQL root password. Stop the MySQL server process. Start again with no grant tables. Login to MySQL as root. Set new password. Exit MySQL and restart MySQL server.

# /etc/init.d/mysql stop
# mysqld_safe --skip-grant-tables &
# mysql -u root
mysql> use mysql;
mysql> update user set password=PASSWORD("newrootpassword") where User='root';
mysql> flush privileges;
mysql> quit
# /etc/init.d/mysql stop
# /etc/init.d/mysql start

Set a root password if there is on root password.

# mysqladmin -u root password newpassword

Update a root password.

# mysqladmin -u root -p oldpassword newpassword

Allow the user "bob" to connect to the server from localhost using the password "passwd". Login as root. Switch to the MySQL db. Give privs. Update privs.

# mysql -u root -p
mysql> use mysql;
mysql> grant usage on *.* to bob@localhost identified by 'passwd';
mysql> flush privileges;

Give user privilages for a db. Login as root. Switch to the MySQL db. Grant privs. Update privs.

# mysql -u root -p
mysql> use mysql;
mysql> INSERT INTO user (Host,Db,User,Select_priv,Insert_priv,Update_priv,Delete_priv,Create_priv,Drop_priv) VALUES ('%','databasename','username','Y','Y','Y','Y','Y','N');
mysql> flush privileges;
or
mysql> grant all privileges on databasename.* to username@localhost;
mysql> flush privileges;

To update info already in a table.

mysql> UPDATE [table name] SET Select_priv = 'Y',Insert_priv = 'Y',Update_priv = 'Y' where [field name] = 'user';

Delete a row(s) from a table.

mysql> DELETE from [table name] where [field name] = 'whatever';

Update database permissions/privilages.

mysql> flush privileges;

Delete a column.

mysql> alter table [table name] drop column [column name];

Add a new column to db.

mysql> alter table [table name] add column [new column name] varchar (20);

Change column name.

mysql> alter table [table name] change [old column name] [new column name] varchar (50);

Make a unique column so you get no dupes.

mysql> alter table [table name] add unique ([column name]);

Make a column bigger.

mysql> alter table [table name] modify [column name] VARCHAR(3);

Delete unique from table.

mysql> alter table [table name] drop index [colmn name];

Load a CSV file into a table.

mysql> LOAD DATA INFILE '/tmp/filename.csv' replace INTO TABLE [table name] FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' (field1,field2,field3);

Dump all databases for backup. Backup file is sql commands to recreate all db's.

# [mysql dir]/bin/mysqldump -u root -ppassword --opt >/tmp/alldatabases.sql

Dump one database for backup.

# [mysql dir]/bin/mysqldump -u username -ppassword --databases databasename >/tmp/databasename.sql

Dump a table from a database.

# [mysql dir]/bin/mysqldump -c -u username -ppassword databasename tablename > /tmp/databasename.tablename.sql

Restore database (or database table) from backup.

# [mysql dir]/bin/mysql -u username -ppassword databasename < /tmp/databasename.sql

Create Table Example 1.

mysql> CREATE TABLE [table name] (firstname VARCHAR(20), middleinitial VARCHAR(3), lastname VARCHAR(35),suffix VARCHAR(3),officeid VARCHAR(10),userid VARCHAR(15),username VARCHAR(8),email VARCHAR(35),phone VARCHAR(25), groups VARCHAR(15),datestamp DATE,timestamp time,pgpemail VARCHAR(255));

Create Table Example 2.

mysql> create table [table name] (personid int(50) not null auto_increment primary key,firstname varchar(35),middlename varchar(50),lastnamevarchar(50) default 'bato');

MYSQL Statements and clauses

ALTER DATABASE

ALTER TABLE

ALTER VIEW

ANALYZE TABLE

BACKUP TABLE

CACHE INDEX

CHANGE MASTER TO

CHECK TABLE

CHECKSUM TABLE

COMMIT

CREATE DATABASE

CREATE INDEX

CREATE TABLE

CREATE VIEW

DELETE

DESCRIBE

DO

DROP DATABASE

DROP INDEX

DROP TABLE

DROP USER

DROP VIEW

EXPLAIN

FLUSH

GRANT

HANDLER

INSERT

JOIN

KILL

LOAD DATA FROM MASTER

LOAD DATA INFILE

LOAD INDEX INTO CACHE

LOAD TABLE...FROM MASTER

LOCK TABLES

OPTIMIZE TABLE

PURGE MASTER LOGS

RENAME TABLE

REPAIR TABLE

REPLACE

RESET

RESET MASTER

RESET SLAVE

RESTORE TABLE

REVOKE

ROLLBACK

ROLLBACK TO SAVEPOINT

SAVEPOINT

SELECT

SET

SET PASSWORD

SET SQL_LOG_BIN

SET TRANSACTION

SHOW BINLOG EVENTS

SHOW CHARACTER SET

SHOW COLLATION

SHOW COLUMNS

SHOW CREATE DATABASE

SHOW CREATE TABLE

SHOW CREATE VIEW

SHOW DATABASES

SHOW ENGINES

SHOW ERRORS

SHOW GRANTS

SHOW INDEX

SHOW INNODB STATUS

SHOW LOGS

SHOW MASTER LOGS

SHOW MASTER STATUS

SHOW PRIVILEGES

SHOW PROCESSLIST

SHOW SLAVE HOSTS

SHOW SLAVE STATUS

SHOW STATUS

SHOW TABLE STATUS

SHOW TABLES

SHOW VARIABLES

SHOW WARNINGS

START SLAVE

START TRANSACTION

STOP SLAVE

TRUNCATE TABLE

UNION

UNLOCK TABLES

USE


String Functions



AES_DECRYPT

AES_ENCRYPT

ASCII

BIN

BINARY

BIT_LENGTH

CHAR

CHAR_LENGTH

CHARACTER_LENGTH

COMPRESS

CONCAT

CONCAT_WS

CONV

DECODE

DES_DECRYPT

DES_ENCRYPT

ELT

ENCODE

ENCRYPT

EXPORT_SET

FIELD

FIND_IN_SET

HEX

INET_ATON

INET_NTOA

INSERT

INSTR

LCASE

LEFT

LENGTH

LOAD_FILE

LOCATE

LOWER

LPAD

LTRIM

MAKE_SET

MATCH AGAINST

MD5

MID

OCT

OCTET_LENGTH

OLD_PASSWORD

ORD

PASSWORD

POSITION

QUOTE

REPEAT

REPLACE

REVERSE

RIGHT

RPAD

RTRIM

SHA

SHA1

SOUNDEX

SPACE

STRCMP

SUBSTRING

SUBSTRING_INDEX

TRIM

UCASE

UNCOMPRESS

UNCOMPRESSED_LENGTH

UNHEX

UPPER


Date and Time Functions



ADDDATE

ADDTIME

CONVERT_TZ

CURDATE

CURRENT_DATE

CURRENT_TIME

CURRENT_TIMESTAMP

CURTIME

DATE

DATE_ADD

DATE_FORMAT

DATE_SUB

DATEDIFF

DAY

DAYNAME

DAYOFMONTH

DAYOFWEEK

DAYOFYEAR

EXTRACT

FROM_DAYS

FROM_UNIXTIME

GET_FORMAT

HOUR

LAST_DAY

LOCALTIME

LOCALTIMESTAMP

MAKEDATE

MAKETIME

MICROSECOND

MINUTE

MONTH

MONTHNAME

NOW

PERIOD_ADD

PERIOD_DIFF

QUARTER

SEC_TO_TIME

SECOND

STR_TO_DATE

SUBDATE

SUBTIME

SYSDATE

TIME

TIMEDIFF

TIMESTAMP

TIMESTAMPDIFF

TIMESTAMPADD

TIME_FORMAT

TIME_TO_SEC

TO_DAYS

UNIX_TIMESTAMP

UTC_DATE

UTC_TIME

UTC_TIMESTAMP

WEEK

WEEKDAY

WEEKOFYEAR

YEAR

YEARWEEK


Mathematical and Aggregate Functions



ABS

ACOS

ASIN

ATAN

ATAN2

AVG

BIT_AND

BIT_OR

BIT_XOR

CEIL

CEILING

COS

COT

COUNT

CRC32

DEGREES

EXP

FLOOR

FORMAT

GREATEST

GROUP_CONCAT

LEAST

LN

LOG

LOG2

LOG10

MAX

MIN

MOD

PI

POW

POWER

RADIANS

RAND

ROUND

SIGN

SIN

SQRT

STD

STDDEV

SUM

TAN

TRUNCATE

VARIANCE


Flow Control Functions



CASE

IF

IFNULL

NULLIF


Command-Line Utilities



comp_err

isamchk

make_binary_distribution

msql2mysql

my_print_defaults

myisamchk

myisamlog

myisampack

mysqlaccess

mysqladmin

mysqlbinlog

mysqlbug

mysqlcheck

mysqldump

mysqldumpslow

mysqlhotcopy

mysqlimport

mysqlshow

perror


Perl API - using functions and methods built into the Perl DBI with MySQL



available_drivers

begin_work

bind_col

bind_columns

bind_param

bind_param_array

bind_param_inout

can

clone

column_info

commit

connect

connect_cached

data_sources

disconnect

do

dump_results

err

errstr

execute

execute_array

execute_for_fetch

fetch

fetchall_arrayref

fetchall_hashref

fetchrow_array

fetchrow_arrayref

fetchrow_hashref

finish

foreign_key_info

func

get_info

installed_versions


last_insert_id

looks_like_number

neat

neat_list

parse_dsn

parse_trace_flag

parse_trace_flags

ping

prepare

prepare_cached

primary_key

primary_key_info

quote

quote_identifier

rollback

rows

selectall_arrayref

selectall_hashref

selectcol_arrayref

selectrow_array

selectrow_arrayref

selectrow_hashref

set_err

state

table_info

table_info_all

tables

trace

trace_msg

type_info

type_info_all

Attributes for Handles


PHP API - using functions built into PHP with MySQL



mysql_affected_rows

mysql_change_user

mysql_client_encoding

mysql_close

mysql_connect

mysql_create_db

mysql_data_seek

mysql_db_name

mysql_db_query

mysql_drop_db

mysql_errno

mysql_error

mysql_escape_string

mysql_fetch_array

mysql_fetch_assoc

mysql_fetch_field

mysql_fetch_lengths

mysql_fetch_object

mysql_fetch_row

mysql_field_flags

mysql_field_len

mysql_field_name

mysql_field_seek

mysql_field_table

mysql_field_type

mysql_free_result

mysql_get_client_info

mysql_get_host_info

mysql_get_proto_info

mysql_get_server_info

mysql_info

mysql_insert_id

mysql_list_dbs

mysql_list_fields

mysql_list_processes

mysql_list_tables

mysql_num_fields

mysql_num_rows

mysql_pconnect

mysql_ping

mysql_query

mysql_real_escape_string

mysql_result

mysql_select_db

mysql_stat

mysql_tablename

mysql_thread_id

mysql_unbuffered_query

How to automatically redirect a browser to another web page from one of your own

This is the preferred method of redirecting to other web pages, and additional information can be found at http://www.w3.org/QA/Tips/reback.

As the P-A Department's main web server uses the Apache HTTP server program, here is how to do it on that system (for other systems' servers, see the references in the www.w3.org web page noted above).

Create a file in the directory in question called ".htaccess" and put into it the line

Redirect /path-of-file-to-be-redirected URL-of-page-to-go-to

For example, if you are a professor teaching the (fictitious - for the sake of the example only)PHY386 course during Spring Semester 2007, but you want to keep your web pages in a subdirectory of your own user area instead of in the courses area provided, you can go to the appropriate courses area on the server, /web/documents/courses/2007spring/PHY386 and put

Redirect /courses/2007spring/PHY386/index.html http://www.pa.msu.edu/people/username/subdir/index.htm

(all on one line, in case the above example is wrapped by your browser) into a file called .htaccesswhich has world-read permissions (that's the default).

The "path" argument is relative to the "web root", so in the above example, "/web/documents" is left off. The "page to go to" URL is a full URL, even if the web page is on the same server. More than oneRedirect command can be put into the .htaccess file, and you can redirect all files in a directory to their equivalents in a "to go to" directory by leaving the filenames off.

A case where more than one Redirect command may be necessary is when a web page may be accessed via more than one URL. In the above "PHY 386" example, in fact, the instructor will have to add a second line, the same as the first, except for lower-case "phy386" instead of "PHY386" in the "path" argument, because the web page may be accessed with the "phy386" URL, too. During Spring Semester 2007, the page could also be accessed with URLs with "current" in place of "2007spring" and with "2007spring" left out entirely, bringing the number of Redirect commands up to six for that one page. Fortunately, a URL which leaves off the "index.html" filename defaults to assuming it, or else three more Redirect commands would be needed to handle those cases. (The folks at w3.org still consider this as preferable to a single "refresh" meta command in the file itself, which would be read and acted upon regardless of how the file was accessed, as described below.)

If there is already a .htaccess file in the subdirectory in question, see the Apache HTTP server documentation to see where in it the Redirect command should be placed. If you are the person running the Apache web server program on a system, you can also put instances of the Redirectcommand into the server configuration file instead of, or in addition to, .htaccess files in specific subdirectories (again, see the Apache HTTP server documentation for the details).


"refresh" meta command

Note that this method is deprecated by the official HTML standards organization in favor of the server-based redirect method described above.

You can set up a web page to inform any browser which happens to load it that there is another web page it should go to instead, after an optional delay.

This is accomplished using a "refresh" meta command in the header section

     <head>
.
.
</head>


of your HTML file, along with the title and any "keywords" or other meta commands.

Syntax

The syntax for the "refresh" meta command is

<meta http-equiv="refresh" content="N; URL=other-web-address">



where N is the approximate number of seconds that you want the current web page to be displayed before the browser automatically goes to the other web address. If N = 0, then the browser should go immediately to the other web address.



Netiquette tip

In case someone's browser doesn't handle these automatic redirects (most browsers do handle them, but some allow them to be turned off, as a way of discouraging "web spam", which often uses this type of "refresh" redirect), you may want to provide a second route to the intended destination by way of a standard link (see the example, below).

Example


<html>
<head>
<title>A web page that points a browser to a different page after 2 seconds</title>
<meta http-equiv="refresh" content="2; URL=http://www.pa.msu.edu/services/computing/">
<meta name="keywords" content="automatic redirection">
</head>
<body>
If your browser doesn't automatically go there within a few seconds,
you may want to go to
<a href="http://www.pa.msu.edu/services/computing/">the destination</a>
manually.
</body>
</html>


Select Example above or here to see how the example works in practice.






Notes on scripting languages

There are also ways of doing this with JavaScript, VBscript, and other internal web page scripting languages, but explaining them in detail is beyond the scope of this web page. A few examples may illustrate the method, however, and encourage users to obtain actual JavaScript documentation (a book, or online) to guide them in developing their own variants suited to their own needs.

The following JavaScript example, which would go ahead of the first <html> flag on the web page, orbetween the <HEAD> and </HEAD> tags, opens the new site in the same browser window (effectivelyinstead of the rest of the contents of the page that the script is in):



 <script language="javascript" type="text/javascript">
<!--
window.location="http://www.pa.msu.edu/services/";
// -->
</script>


This JavaScript example opens the new site in the same browser window after displaying the current page in the window for 2 seconds (2000 ms):



 <script language="javascript" type="text/javascript">
<!--
window.setTimeout('window.location="http://www.pa.msu.edu/services/"; ',2000);
// -->
</script>

(Note that this does exactly what the HTML META tag above does, but as the META tag method does not depend on the browser's having JavaScript available and active, in most cases the META tag method would be preferable).

The next JavaScript example opens the new site in a new* browser window:



 <script language="javascript" type="text/javascript">
<!--
Newsite= window.open("http://www.pa.msu.edu/services/","newsite");
// -->
</script>

* sometimes, the "new" window is one of those already opened in the session; this seems to be somewhat random, and I don't know if it's a browser bug or a "JavaScript thing" with the window.open command. Just note that browser behavior may not always be consistent if you use this script (or the next one, which also useswindow.open). -- GJP.

This JavaScript example opens the new site in a new browser window after a 4.5 second (4500 ms) delay:



 <script language="javascript" type="text/javascript">
<!--
window.setTimeout('window.open("http://www.pa.msu.edu/services/","newsite")',4500);
// -->
</script>



WARNING: With these capabilities for automatic redirection to other web pages, it is possible to set up a redirection loop -- try to avoid making it a no-wait-time infinite loop! (An infinite loop with a reasonable delay, on the other hand, might have its uses as a sort of slide show, among other possibilities).

Friday, May 15, 2009

Install matlab in Linux


Following the steps of the installation.

After that, there is no menu created in the application. Just navigate to /usr/share/applications and create a file "matlab.desktop", do remember you must do this with root priority.
Then copy following to the file and change the Exec and Icon path, then save it.

[Desktop Entry]
Name=Matlab
Comment=Matlab
Exec=/usr/local/bin/matlab/bin/matlab
Icon=/usr/local/bin/matlab/X11/icons/matlab64c_icon.xpm
Terminal=true
Type=Application
Categories=Development;
StartupNotify=true



Finished!

Do make sure the Terminal is set to true, as matlab must be started from terminal.

Thursday, May 14, 2009

Linux Background Process

Background Process - What is
Background Process

Related Terms
• Foreground Process

Definition: Unlike with a foreground process, the shell does not have to wait for a background process to end before it can run more processes. (More below.)
Within the limit of the amount of memory available, you can enter many background commands one after another. To run a command as a background process, type the command and add a space and an ampersand to the end of the command. For example:

$ command1 &

Immediately after entering the above command, the shell will execute the command. While that is running in the background, the shell prompt (% for the C Shell, and $ for the Bourne Shell and the Korn Shell) will return. At this point, you can enter another command for either foreground or background process. Background jobs are run at a lower priority to the foreground jobs.

You will see a message on the screen when a background process is finished running.


Online system rates images by aesthetic quality

Penn State Live - Online system rates images by aesthetic quality
Online system rates images by aesthetic quality
Tuesday, May 5, 2009

University Park, Pa. -- An online photo-rating system developed at Penn State is the first publicly available tool for automatically determining the aesthetic value of an image, according to a Penn State researcher involved with the project.

James Z. Wang, associate professor of information sciences and technology, is one of the principal researchers on the Aesthetic Quality Inference Engine (ACQUINE), a system that judges the aesthetic quality of digital images. Wang said this tool is a significant first step in recognizing human emotional reaction to visual stimulus.

ACQUINE, which has been in development since 2005 and was launched in April 2009, can be found online at http://acquine.alipr.com. Users can upload their own images for rating or test the system by providing a link to any image online. The system provides an aesthetic rating within seconds.

Wang said the system extracts and uses visual aspects such as color saturation, color distribution and photo composition to give any uploaded image a rating from zero to 100. The system learns to associate these aspects with the way humans rate photos based on thousands of previously-rated photographs in online photo-sharing Web sites such as photo.net.

"In its current form, we've seen more than 80 percent consistency between the human and computer ratings," Wang said. "The improvements to the system that are currently under development show promise to get even higher performance.

"Furthermore, aesthetics represents just one dimension of human emotion. Future systems will perhaps strive to capture other emotions that pictures arouse in people," he said.

According to Wang, there also are opportunities to link the rating system directly to cameras so that when a photo is taken, the photographer can instantly see how it might be perceived by the public.

Wang worked with Ritendra Datta, a recent Penn State doctoral degee recipient and Jia Li, associate professor of statistics at Penn State. Funding for this project was provided by the National Science Foundation as part of ongoing research about the relationship between computers and visual concepts. The researchers previously used similar technology to detect authentic Vincent van Gogh paintings.


Google+