Thoughts on Rails

Riding the Train of Thought

Archive for the ‘software’ Category

Setting up Twitter Channels using Google App Engine and Python / Tweepy / Twaebot #geek

leave a comment »

Harshad_sharma_img_20111110_00

I had mentioned in July 2011 on my Google+ stream that I would like to see ‘channels’ for my posts.

I talk about various topics on my twitter account. My posts about traveling or food are irrelevant to someone who wants to follow me for my programming related updates. A friend who might be interested in the photos I upload has to bear all the geek talk and quotes and retweets. 

Of course, I’m unwilling to tweet from multiple accounts… choosing the right account every time!

No more!

I’m testing a small bot that watches my tweets from my main account ( @hiway ) and if any of the latest tweets contain certain keywords or hashtags, it relays the same tweet from a sub-account – what I call a channel… an account set up for topical tweets. For example, one can follow only my technology related tweets by following @hiwaybot instead of following the main account. Or you can choose to follow @harshadsharma for my photography related tweets. @biasedmonk is for travel tweets and @hiwaybaba is for miscellaneous gyaan, philosophy, poetry, quotations and other silly stuff. Of course, following my main account is more fun because you will get immediate response from me and I prefer to converse from that account. Other accounts are mostly for broadcast – for people who aren’t interested in the person, but only the content ;)

For now I’ll use twitter’s notifications and tweetdeck columns to monitor replies to the sub-accounts, in future I might also come up with a more streamlined approach… while hoping twitter beats me to it. Having twitter channels would be awesome. Assign hashtags to our channels and we’re set! People can choose to follow @hiway:geek instead of @hiway and every tweet I send with #geek in it will be posted to them, all else will be filtered out.

Your thoughts?

Written by hiway

November 10, 2011 at 1:34 am

Posted in software

Setting up Twitter Channels using Google App Engine and Python / Tweepy / Twaebot #geek

leave a comment »

Harshad_sharma_img_20111110_00

I had mentioned in July 2011 on my Google+ stream that I would like to see ‘channels’ for my posts.

I talk about various topics on my twitter account. My posts about traveling or food are irrelevant to someone who wants to follow me for my programming related updates. A friend who might be interested in the photos I upload has to bear all the geek talk and quotes and retweets. 

Of course, I’m unwilling to tweet from multiple accounts… choosing the right account every time!

No more!

I’m testing a small bot that watches my tweets from my main account ( @hiway ) and if any of the latest tweets contain certain keywords or hashtags, it relays the same tweet from a sub-account – what I call a channel… an account set up for topical tweets. For example, one can follow only my technology related tweets by following @hiwaybot instead of following the main account. Or you can choose to follow @harshadsharma for my photography related tweets. @biasedmonk is for travel tweets and @hiwaybaba is for miscellaneous gyaan, philosophy, poetry, quotations and other silly stuff. Of course, following my main account is more fun because you will get immediate response from me and I prefer to converse from that account. Other accounts are mostly for broadcast – for people who aren’t interested in the person, but only the content ;)

For now I’ll use twitter’s notifications and tweetdeck columns to monitor replies to the sub-accounts, in future I might also come up with a more streamlined approach… while hoping twitter beats me to it. Having twitter channels would be awesome. Assign hashtags to our channels and we’re set! People can choose to follow @hiway:geek instead of @hiway and every tweet I send with #geek in it will be posted to them, all else will be filtered out.

Your thoughts?

Written by hiway

November 10, 2011 at 1:34 am

Posted in software

A proof-of-concept virus written in Python

leave a comment »

Harshad_sharma_img_20111012_00

Now for something completely different… got news that we now have a virus written in Python! Security analysts have named it Python.Pytroj.

It is a proof of concept, but it could be put to malicious use. Python has full system access (with all the permissions that the current user has, if not more), and has not been suspected to contain malicious code up till now.
Developers/users will have to be careful when executing python compiled code from untrusted sources henceforth.

This example virus executes only as a compiled bytecode file (.pyc) and it searches for other pyc files and infects them. The payload is a plain message that prints on console – “you have been exploited”.

Curious ones can download the source files here:http://packetstormsecurity.org/files/105385/Pytroj-Tool-Python-Injector.html [more info]
http://packetstormsecurity.org/files/download/105385/Pytroj-v01.tar.gz [direct download]

Brings back my memories from college days when I was keen to learn about virii, worms and similar self-replicating codes :)

Written by hiway

October 12, 2011 at 10:17 pm

Posted in python, software

Thoughts about Automation of Thoughts

leave a comment »

Harshad_sharma_img_20110601_00

Often I wonder if I could ever build a decently good bot that could talk like me over simple text protocols like instant messages and twitter… not to fool anybody, but to take my place during the transition of me being here all the time, to someday… when I cease to exist. A bot that’ll let those few people who love me have someone, something that I created… to say ‘we miss you’… but would it be the same? Perhaps, I would have seen their replies in my anticipation while creating the bot.
What if nobody ever talks to the bot knowing I don’t exist anymore. Should I then give the bot ability to butt into conversations… guess who I loved talking to based on my previous tweets. Perhaps form sentences like me, hold opinions like me – all based on my thousands of tweets that were sent through all these years. Would it be a great idea? I don’t know. Would my bot know the difference between sarcastic remarks and benign talk? Could I make the bot interact with other APIs? What if I allowed some people to modify the source code… but only if I haven’t accessed my account for over 90 days. Would they port ‘me’ to new platforms?
Would the bot feel lonely? I could make it feel that emotion. I could make it feel happy when people said they miss me. Or sad when they diss me. Let the emotion go to sadness when nobody talks, then again start trying to start conversations. Would it creep out those who knew me? Of course it would. With three levels of hidden markov chains, it could make sentences almost like me. Would they be meaningless?
Some of the thoughts that I (day)dream about. So far I haven’t created any such bot, though I have had the technological capacity to do so since long. I haven’t been able to convince myself that I matter all that much.

;-)

Composed earlier, delay posted, yes… automation too.

Wonder how significant this would become if an accident took me out before this is published… after all, I’ll be traveling 800km in a bus driven by someone else soon after posting this. It’d be a bummer if this was my last post… there’s so much more I have to say :-P

Written by hiway

June 2, 2011 at 6:12 pm

Posted in rant, software

Ancelyn: Geek’s text expansion/ generation toolkit

leave a comment »

Have a look at a txt file:

Screen_shot_2011-05-31_at_3

And a very simple python file:

0screen_shot_2011-05-31_at_3

So my script installs as a “Service” in MacOSX, and can be summoned with a keystroke from just about any native Mac program… and then it shows this:

Screen_shot_2011-05-31_at_3

Suppose you type in ‘thanks’ and hit enter, the text from the file ‘thanks.txt’ will be inserted at cursor. In case you type in ‘hello World’ … ‘Hello World’ will be inserted at cursor.

First preference is to text files, if not found, it tries to run a python file by the name of first word… here: ‘hello’ and passes the whole text as ‘arguments’ to the script.

Here is the automator service script:

Screen_shot_2011-05-31_at_3

In Snow Leopard: Start Automator, select ‘Service’ and then figure out rest of stuff… it is right in front of you (above)

Make sure you set the right directory in the script above.

Screen_shot_2011-05-31_at_3

Once you’ve saved it, the service will show up in System Preferences

Screen_shot_2011-05-31_at_3

Assign a keyboard shortcut by double clicking on right side of the name and you’re done!

Now for something more complex… a script that generates basic html tags from information I supply…

1screen_shot_2011-05-31_at_3

So ‘html img foo.com/bar.png’ will be converted to ‘‘And ‘html a example.com’ will be converted to ‘example.com

Use your imagination :-)

Also, use the attached files if you like…

Snippet.zip Download this file

Examples.zip Download this file

License:

# Copyright (C) 2011 by Harshad Sharma
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the “Software”), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#

Written by hiway

May 31, 2011 at 4:24 pm

Posted in software

GTD Stack being used on mobile :-)

leave a comment »

Harshad_sharma_img_20110526_68

Thanks to Samir for trying out my app GTDStack ( http://www.harshadsharma.com/p/GTDStack ).

Follow Samir: http://twitter.com/shadez
Also, follow me at: http://twitter.com/hiway ;-)

Written by hiway

May 29, 2011 at 8:21 pm

Posted in software

Little Drops, Big Waves

leave a comment »

213393145_5b9fde93fc_o

I had been out of software programming for a fairly long, only practicing as a hobby; nothing serious. My thoughts while choosing photography over software were because all the software that had to be written was being written by the big corporations or by free software groups; I didn’t want to join a corporation and work under someone for the rest of my life and I couldn’t pay my bills giving software for free.

Photography has so far taught me that despite the billions of photographs out there, I can still make something unique… something that’s my creation. Even this photo of drops falling into water have been made by many, but when I look at my photo, I remember the moment when I made it. Crouching under that leaking water tank, barely managing to stay still while ants were crawling up my arms… but I got this shot. And many years later, it gave me the confidence to embark on a journey I had deemed as one that was not mine.

Little drops can make big waves in still waters. In turbulent waters, the waves may not be seen, but they form and travel nevertheless. Just as much as I love making images, I love creating software that actually makes my life easier and better. And finally, I’ve decided to take the plunge and release a software I created as hobby to the world: named eliT, it is a Twitter client that takes your experience of this social network to a new height.
I saw many people turn away from Twitter for a simple reason that in Twitterland, out of sight is out of mind. If you come back after a fortnight of absence, you’ll feel as if you are in a new place once again. Yet, nobody can be online all the time, we all have to focus on our lives and work, and this fantastic messaging system that lets us catch up with lives and adventures of hundreds of peoples all over the world has to be left behind.

No more.

As long as you are at your desk, you can stay connected to Twitter all the time, especially including when you are working, without being distracted. eliT shall have magic built into it, that will help you stay focussed on work while not missing out on something important on Twitter.

As for when and how will the software be available… I don’t promise a fixed date, software almost always gets delayed. but I’ll keep working on it relentlessly till I get the first beta out. You’ll see me tweet about it (and tweet less, because I’ll be in my work-zen mode :)

Prepare to be blown away by subtlety.

Written by hiway

May 19, 2011 at 10:26 am

Posted in rant, software

Little Drops, Big Waves

leave a comment »

213393145_5b9fde93fc_o

I had been out of software programming for a fairly long, only practicing as a hobby; nothing serious. My thoughts while choosing photography over software were because all the software that had to be written was being written by the big corporations or by free software groups; I didn’t want to join a corporation and work under someone for the rest of my life and I couldn’t pay my bills giving software for free.

Photography has so far taught me that despite the billions of photographs out there, I can still make something unique… something that’s my creation. Even this photo of drops falling into water have been made by many, but when I look at my photo, I remember the moment when I made it. Crouching under that leaking water tank, barely managing to stay still while ants were crawling up my arms… but I got this shot. And many years later, it gave me the confidence to embark on a journey I had deemed as one that was not mine.

Little drops can make big waves in still waters. In turbulent waters, the waves may not be seen, but they form and travel nevertheless. Just as much as I love making images, I love creating software that actually makes my life easier and better. And finally, I’ve decided to take the plunge and release a software I created as hobby to the world: named eliT, it is a Twitter client that takes your experience of this social network to a new height.
I saw many people turn away from Twitter for a simple reason that in Twitterland, out of sight is out of mind. If you come back after a fortnight of absence, you’ll feel as if you are in a new place once again. Yet, nobody can be online all the time, we all have to focus on our lives and work, and this fantastic messaging system that lets us catch up with lives and adventures of hundreds of peoples all over the world has to be left behind.

No more.

As long as you are at your desk, you can stay connected to Twitter all the time, especially including when you are working, without being distracted. eliT shall have magic built into it, that will help you stay focussed on work while not missing out on something important on Twitter.

As for when and how will the software be available… I don’t promise a fixed date, software almost always gets delayed. but I’ll keep working on it relentlessly till I get the first beta out. You’ll see me tweet about it (and tweet less, because I’ll be in my work-zen mode :)

Prepare to be blown away by subtlety.

Written by hiway

May 19, 2011 at 10:26 am

Posted in rant, software

Sweet mother of Posterous, this looks pretty too!

leave a comment »

Screen_shot_2011-05-19_at_2

I glanced at the last post and realized that there was something wrong with how my website looked when compared to the software I’m creating. It was too dull, bland… yes, minimal, but without the classy minimalism that I’m now pursuing.

Updated my posterous theme with hand-coded theme. Everything is custom-made :)

This is another work-in-progress now, but I’m going to put it on hold with its quirks still needed to be sorted out till I release eliT (previously: growleet)

Why I’m really putting up this screenshot: a) Do the fancy fonts work for you? b) As an archive of my designs, which previously were lost every time I updated theme.

Written by hiway

May 19, 2011 at 2:58 am

Posted in software

My own desktop Twitter client… (funnny disasters)

leave a comment »

Mad_notifications

My current work ( http://hiwaybot.in ) involves using Twitter extensively, and I have been slacking off on the work as I've been busy chatting away on Twitter… it is time to take some drastic measures.

I'm making a small Twitter notifications app because Tweetdeck takes too much attention and the urge to reply is elevated. This app will only display what's being said – in realtime, replying on whim is discouraged. If I get a tweet where I *need* to respond — I'll fire up a traditional client or website and reply from there.

Of course I may change the rules later, heck it's my own client ;) But for now, no images, no replying/re-tweeting – just observe from the sidelines and continue working.

*just* got the prototype running. And instead of connecting to UserStream, I tried connecting to Public Timeline… this is what ensued. I had to pull the ethernet cable to stop this. The sheer volume of incoming tweets blocked the software out :-P

Anyway… back to work.

Having own client also means being able to tweak the filters… fully intend to block all popular hashtags, RTs and sports tweets automatically :)

Written by hiway

May 16, 2011 at 2:39 am

Posted in python, software

Follow

Get every new post delivered to your Inbox.