Saturday, September 19, 2009

Visualizing Implanted Tumors in Mice with Magnetic Resonance Imaging Using Magnetotactic Bacteria

Me and my brother were contemplating about the possible imaging application of magnetotactic bateria. We decided to keep in a bit of a secret until he can submit his undergrad project proposal for resarch. However, quite accidently I have discovered that the idea and experiment design has already been suggested and supposedly someone is already working on this.

This is quite interesting, as this holds potential for accurate and absolute modeling and tracking of tumors whilst inducing minial to no damage to the patient and virutally no side-effetcs.

Read all about it here.

Wednesday, September 16, 2009

ChipPC Super Lite Linux based OS

Now that it's finally out, I'm proud to say that I had the pleasure to work with Alex Fradkin, Mark Lifshitz,Andrey Baranovsky , Nicolai and Andrey "The Big" our highly esteemed R&D manager.

The fruit of our labor is ThinX , a very low resource consuming Linux based OS that allows for the production of super lite computing units. The units are tightly secured and are excellent for usage as a thin client. Python was instrumental in its creation.

It was a pleasure working with you guys, I hope to be working with you sometime soon again on either projects that we may encounter.

I urge anybody who have needs for such hardware to contact sales and place your order. There's even an evaluation plan. Just don't forget to mention Sivan Greenberg recommended it to you through his blog! :-)

To see the line of products go to ChipPC's website and whet your appetite.

Now that ChipPC has atom based units, I wonder how fun it would be to have Ubuntu installed as the OS :-) Food for thought!

Tuesday, September 15, 2009

Budapest, Here I Come!

It appears that I'm going to http://ploneconf2009.org/ !! Will be great to meet all the community there that I've known so far just through IRC. Do some Singing & Dancing hacking and see where taxonomy in plone is headed to. I also hope to learn new tricks and tips, and see how Deliverance is used.

Thank you great grant committee. You made my day!

Wednesday, August 19, 2009

Twisted Based Directory and file transfer utility

I recently toyed with Twisted and found it extremely pleasurable and easy to implement a very basic gross file transfer utility. (That can actually sync complete directory structure).

This "app" is composed of a server and client scripts, you have to run the server script on the target computer and use the client as instructed.

The server will never overwrite an existing file or directory but will create transmitted directory structures as required.

I found this utility to be very very useful inside a QA lab or a development LAN where unauthenticated unlimited file/directory transfer tool is needed and there's no will to install ftp, samba etc...

Oh, make sure you have twisted installed before trying this.
On ubuntu that usually means: sudo apt-get install python-twisted

If you modify this to work on windows, let me know. I did this on Ubuntu.

Feel free to package this for whatever distro you fancy, if you find it useful.

Download it here:dirsync

Monday, January 07, 2008

Restoring File Using HUBackup

After receiving quite some emails about folks bewildered by the crashing hurestore I think it's only fair to create a post about how to restore files from archives created using hubackup using the underlying archiver , DAR.

Usually after a typical run of hubackup you will have two resulting files:

.hubackup-data/paepp-master-archive.1.dar
.hubackup-data/paepp-master-catalog.1.dar

(Thanks goes to Peter Päppinghaus for sending me an email about this)

To restore , which actually usually means extract in DAR's language you need to do something like:

dar -x .hubackup-data/paepp-master-archive -R TARGET_DIR

If there is more then one slice DAR knows how to switch between them properly.

That should be enough for most of operations, for more detailed explanation of what dar can do in restoration (or backup for that matter) DAR's manual pages are quite good.

Wednesday, October 24, 2007

HUBackup and rdiff-backup, or how I should have done it at the first place!

Okay, so exploring the rdiff-backup code base I now come across some ideas I do not want forgotten yet I don't feel like editing/creating a new spec (that will come later) but part of my plans for Hardy (again an LTS release) I want to start at the direction of making HUBackup the tool it was meant to be ;) so the first point I want to note:

* Use rdiff-backup as the backup/archiver tool instead of DAR; Although DAR is a truely amazing tool, it currently lacks good python bindings and the fact HUBackup uses it from a ptty is a bit of a pain to maintain and expand with features. This also stands in the way of a better restore process. Moreover, Using rdiff-backup, I now think of just letting it create its "meta data" (reverse diff) along side the already existing directories the user wants to backup, which will *greatly* reduce space overhead when backing up (essentially just burning the folders to the optical media together with the special information for restoring the permissions and other file attributes). Now, given that I need to explore how to slice up backup data to fit in more then one optical medium.

Sunday, October 14, 2007

Very Simple Web Scraping

Got interested lately in extracting some data (namely emails and sublinks) from web pages I came out with a very simple, very straight forward class in Python that when instantiated will hold all the unique outgoing links the web page in question has and all the unique email addresses it has, just for practice. It is not intended for "production" use in any way as it does not respect any of the HTTP GET rules that even very simple fetchers support. This was just for practice. However, you are free to use it for your purpose. I wonder if this would be a good candidate when improved to build a graph for the web as it looks from the stand point of the specific "seed" web page. (ofcourse I will need to wrap it in a recursive algorithm to go deep following the links discovered).

Here is the code:


#!/usr/bin/env python

import re
import os
import sys
import urllib2



class URLRepo:
URL = None # holds this URL's address, as is the parent of the son URLs it will hold
def __init__(self, URL):
""" A Class representing the collection of all son URLs a parent URL holds.
URL is the internet URL to prcess."""
self.URL = URL
raw_html = urllib2.urlopen(URL).read() # note this completely disregards proper HTTP workflow e.g. proper GET headers
self.html = raw_html
emailre = re.compile('[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}',re.IGNORECASE)
linkre = re.compile('.*(.*)<\/a>') # match the URL and its corrsponding title
links = linkre.findall(raw_html)
emails = emailre.findall(raw_html)
self.emails = []

# filter out any link that may return us to the same parent URL and clean out email links
self.links = [i for i in links if (not i[0].startswith('/') and
not i[0].startswith('mailto') and
not i[0].startswith('#') and
not i[0].startswith(self.URL) and
(i[0].startswith('http') or
i[0].startswith('www')))]
for eml in emails:
for eml in emails:
try:
self.emails.index(eml)
except:
self.emails.append(eml)







if __name__ == '__main__':
SEED_URL = sys.argv[1]
A = URLRepo(SEED_URL)
print "List of links:"
print "--------------"
for link in A.links:
print link
print "List of Email addresses"
print "-----------------------"
for eml in A.emails:
print eml