tag:blogger.com,1999:blog-40241341709964074582024-03-14T05:00:51.414+01:00Musically yoursYour mileage may vary.musically_uthttp://www.blogger.com/profile/00017318258700020690noreply@blogger.comBlogger64125tag:blogger.com,1999:blog-4024134170996407458.post-28941267951783504872014-04-04T15:04:00.004+02:002014-04-04T15:04:41.945+02:00I have moved
I started posting on blog.musicallyut.in as an experiment and I like blogging there.
I will not migrate the posts from this blog over, but all new entries will be posted there. :)
musically_uthttp://www.blogger.com/profile/00017318258700020690noreply@blogger.com0tag:blogger.com,1999:blog-4024134170996407458.post-64230460926633125282013-11-22T13:55:00.000+01:002013-11-22T13:55:26.558+01:00Political orientation (summary)
I have difficulty in immediately grasping what views a person holds when they tell me their political orientation, e.g. that they are Convervative or Socialist. I found the following short list on a LW survey and I liked the concise descriptions associated with them:
Libertarian, for example like the US Libertarian Party: socially permissive, minimal/no taxes, minimal/no distributionmusically_uthttp://www.blogger.com/profile/00017318258700020690noreply@blogger.com0tag:blogger.com,1999:blog-4024134170996407458.post-54147559734798600042013-11-08T23:28:00.001+01:002013-11-08T23:30:04.343+01:00Hide overflowing labels on pie charts
I have seen many questions related to occlusion of labels on pie charts and have always suggested that the problem should be solved by moving the labels outside the pie chart, or by rotating them to align with the axis.
The solutions I have suggested often is to rotate the label but it has never quite satisfied me. Part of it was the horrible font rendering done by some browsers and loss inmusically_uthttp://www.blogger.com/profile/00017318258700020690noreply@blogger.com3tag:blogger.com,1999:blog-4024134170996407458.post-14005288631464560022013-11-03T19:24:00.001+01:002013-11-06T21:06:40.628+01:00Book Review: 2013
Book reviews
I
read (and listened to) a lot of books in the part few months and I just
couldn't get time to write about them. Finally, I do have some time to
pen down my thoughts.
The pleasure of Finding things out
This
one is a classic, Feynman's assorted lectures in a collection. This
would probably qualify as a pop science book and I listened to this on
my daily transitsmusically_uthttp://www.blogger.com/profile/00017318258700020690noreply@blogger.com0tag:blogger.com,1999:blog-4024134170996407458.post-1912593469058786332013-09-11T00:08:00.000+02:002013-09-11T00:08:01.180+02:00Interactive Storytelling in The Last of Us.
I watched the walk-through of The Last of Us. If you haven't seen to the end/played to the end any game by NaughtyDog, then I bet the ending will catch you by surprise.
I loved it.
I
like to categorise and keep a record of things which I am doing. I
religiously scrobble my songs to Last.fm. I record every book I read
with the finish date on Shelfari. I will need to create a new category musically_uthttp://www.blogger.com/profile/00017318258700020690noreply@blogger.com0tag:blogger.com,1999:blog-4024134170996407458.post-10296638987541499442013-03-19T12:43:00.000+01:002013-03-19T12:43:28.388+01:00mitmproxy as a reverse proxy
It turns out that thanks to the powerful scripting interface, mitmproxy can be used as a reverse proxy to redirect calls to different servers easily:
revProxy.py
import os
proxyHost = os.environ['PROXYHOST']
def request(ctx, r):
if r.request.path.startswith('/api'):
# Proxy calls with /api prefix to proxyHost
r.request.headers['Host'] = [proxyHost]
musically_uthttp://www.blogger.com/profile/00017318258700020690noreply@blogger.com1tag:blogger.com,1999:blog-4024134170996407458.post-91250324838951836162013-01-18T22:48:00.003+01:002013-02-03T11:24:47.732+01:00Two room problem
I had a problem.
I fractured my foot last month, on 6th December, and now am walking with crutches. I have largely recovered now, but one excruciating problem I face is having no free arms while going from room to room. That means I cannot bring food to the table from the kitchen, nor carry used plates, glasses, etc. to the kitchen. However, those problems were easy to solve: just eat inmusically_uthttp://www.blogger.com/profile/00017318258700020690noreply@blogger.com3tag:blogger.com,1999:blog-4024134170996407458.post-9953076565463049952013-01-18T22:26:00.000+01:002013-01-18T22:26:34.339+01:002012: Books
Read surprisingly few of those this year and did not keep up my implicit promise of reviewing all of them. Though few in number, they made up in the quality. It is hard to pick the best one from among the likes of Museum of Innocence, Flowers For Algernon, The Long Earth and The Glass Bead Game.
The Museum of Innocence was a behemoth, taking me through vicissitudes musically_uthttp://www.blogger.com/profile/00017318258700020690noreply@blogger.com0Zurich, Switzerland47.3686498 8.539182500000038147.1966073 8.2164590000000377 47.5406923 8.8619060000000385tag:blogger.com,1999:blog-4024134170996407458.post-78397559629351492392012-08-25T17:51:00.004+02:002012-08-25T17:51:58.469+02:00Book Review: Captain Blood
Captain Blood by Rafael Sabatini
While browsing through the audio books on LibriVox, I came across this book. I had just read some Sci-Fi (Permutation City, which was good) and I wanted something more epic in scale, like one of the Dicken's novels. So this was the best fit. It turned out to be a good choice, it kept me good company for the next week.
I listened to this book in musically_uthttp://www.blogger.com/profile/00017318258700020690noreply@blogger.com0tag:blogger.com,1999:blog-4024134170996407458.post-1216847092996693732012-07-29T14:06:00.000+02:002013-09-25T11:15:35.564+02:00Pre-allocate your vectors
Or else welcome the good ol' friend, the O(n^2) back in your life.
There are three common ways people add elements to vectors in R. First way:
f1 <- function (n) {
l <- list()
for(idx in 1:n) {
l <- append(l, idx)
}
return(l)
}
This is bad. It does what it looks musically_uthttp://www.blogger.com/profile/00017318258700020690noreply@blogger.com7tag:blogger.com,1999:blog-4024134170996407458.post-3992339886898557192012-07-29T00:40:00.001+02:002014-10-08T11:42:58.809+02:00Colors in R console
Update 2: The colorout package has moved again and is now available on GitHub.
install.packages('devtools')
library(devtools)
install_github('jalvesaq/colorout')
Update: The colorout package on CRAN has not been updated to be compatible with R version 3.x.x yet. However, if you compile and install it yourself, it still works.
download.file("http://www.lepem.ufc.br/jaa/colorout_1.0-1.tar.gz",musically_uthttp://www.blogger.com/profile/00017318258700020690noreply@blogger.com1tag:blogger.com,1999:blog-4024134170996407458.post-74779806973241544712012-06-11T23:10:00.002+02:002012-06-11T23:12:13.331+02:00Book Review: Seabiscuit - An American legend
This book is about a horse and four people around it: the owner, the trainer and two riders.
To be honest, I did not start the book with high hopes. To begin with, it was non-fiction and then it was about a horse. About 10 pages deep, I had an inkling that Laura Hillenbrand was luring me into a trap. I distinctly remember thinking "This is not how one writes a historical account" but I could musically_uthttp://www.blogger.com/profile/00017318258700020690noreply@blogger.com0tag:blogger.com,1999:blog-4024134170996407458.post-40280610555018065882012-05-25T01:31:00.000+02:002012-05-25T22:09:33.044+02:00Book review: The Museum of Innocence
The first 100 pages or so made me consider many times why I was reading the book at all (it came highly recommended) and why didn't Kemal bey just move-on. Why stay there? And moreover, why call it innocence when nothing could have been further away? Why color something purportedly black and white like carnal desires in shades of gray by waving brushes of grandeur on it? Why not just admit it musically_uthttp://www.blogger.com/profile/00017318258700020690noreply@blogger.com0tag:blogger.com,1999:blog-4024134170996407458.post-76407383385281760792012-04-04T09:09:00.000+02:002012-04-04T09:09:14.754+02:00Umlauts and accents in Gnome 3
The extra characters can usually be typed with the help of a compose key. In Gnome, one can choose one of the keys on the keyboard to be a compose key in this way.
Go to System settings:
Go to Keyboard settings:
Go to Layout options:
Select the Compose key setting:
Close the settings.
Then to type รค, press the Compose key + " + a and musically_uthttp://www.blogger.com/profile/00017318258700020690noreply@blogger.com0tag:blogger.com,1999:blog-4024134170996407458.post-66805439796222572332012-03-05T18:07:00.003+01:002012-03-17T09:12:47.993+01:00Rate songs in notifications with Rhythmbox
Update: Keeping in mind the feedback, I have enabled instant update of the notification once the ratings are changed in my new patch to the notification plugin of Rhythmbox.
When do you rate your songs?
I have a huge music library. Enough to keep me engaged for more
than a month if I listen to each song in a row with no repeats. Hence, my
preferred time for rating songs is while I am musically_uthttp://www.blogger.com/profile/00017318258700020690noreply@blogger.com5tag:blogger.com,1999:blog-4024134170996407458.post-17617015906420629022011-12-31T21:12:00.000+01:002011-12-31T21:12:12.961+01:00Line segment intersectionIt looks like an easy problem, it has a trove of information on it and Bryce Boe even has a two line solution for it. However, his program does not handle improper intersections, i.e. when one end of one of the segments lies on the other line. Since a point lying on the line does not make triangles with different orientations (since it has zero area), his program does not count it as an musically_uthttp://www.blogger.com/profile/00017318258700020690noreply@blogger.com0tag:blogger.com,1999:blog-4024134170996407458.post-42684951846932531562011-12-20T17:46:00.000+01:002011-12-20T17:46:01.721+01:00Numerically stable standard deviation calculation and code perforationHow would you implement a class which has an append(double x) function to collect values, and a get_std_dev() function which returns the standard deviation of the values collected?
Sounds like an easy problem, here is my guess at what your code would look like:
This looks like an standard implementation, but it contains some subtle bugs. These bugs do not show up in regular usage, but musically_uthttp://www.blogger.com/profile/00017318258700020690noreply@blogger.com0tag:blogger.com,1999:blog-4024134170996407458.post-35789567279464409682011-11-26T00:22:00.000+01:002011-11-26T00:22:51.770+01:00Handling NULLs and NAsReal world data always has missing and blatantly incorrect values.
This becomes a painful issue when it comes to coming up with predictive models. While there are multiple ways of imputing data, it is difficult to figure out whether one is doing a good enough job. To make matters worse, the rows missing data might not be random. For example, all incomes above a certain threshold might be&musically_uthttp://www.blogger.com/profile/00017318258700020690noreply@blogger.com5tag:blogger.com,1999:blog-4024134170996407458.post-31726444539395957702011-10-30T08:58:00.000+01:002011-10-30T22:55:46.451+01:00Starting out with OcamlThere are many thing which they do not tell you about Ocaml right when you start out. This is a stumbling block for many, and in this post, I will cover a few facts which just might help out the beginner a tad bit.
Toplevel
The first look at the toplevel is disheartening.
# let f = fun x : x + 1^[[D^[[D^[[D
The toplevel does not support readline functionality out of the box. This leads musically_uthttp://www.blogger.com/profile/00017318258700020690noreply@blogger.com0tag:blogger.com,1999:blog-4024134170996407458.post-39422761249562139742011-10-30T00:12:00.000+02:002011-10-30T00:12:37.683+02:00Notes on tuning JVM
pre
{
background-color: #2f2f2f;
border-bottom-color: rgb(153, 153, 153); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(153, 153, 153); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(153, 153, 153); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(153, 153, 153); border-top-style: dashed; border-top-width: musically_uthttp://www.blogger.com/profile/00017318258700020690noreply@blogger.com0tag:blogger.com,1999:blog-4024134170996407458.post-2002857830916063952011-10-27T09:39:00.000+02:002011-10-27T11:52:27.750+02:00Verbosity of programming languages
It is not often that one sees the same functionality being implemented in more than one language outside toy examples and for mere bragging rights. However, the AI challenge's starter packages:
Each implement the same algorithm in different languages
With the same I/O infrastructure
Were not written intentionally to be better than the other (no bias)
So I thought it would be a good data-set musically_uthttp://www.blogger.com/profile/00017318258700020690noreply@blogger.com2tag:blogger.com,1999:blog-4024134170996407458.post-32978610343740853182011-10-20T16:28:00.000+02:002011-10-21T21:36:02.104+02:00Software Reliability: 3 general problems
Introduction
While creating a critical piece of software (e.g. creating a Smart Home Controller for my Master's Thesis), one of the emphasis is on reliability.
Broadly speaking, reliability means not crashing or, failing that, exiting gracefully and then restarting without requiring any supervision.
Hence, I set about to write a tiny wrapper to execute applications in, which will wait musically_uthttp://www.blogger.com/profile/00017318258700020690noreply@blogger.com0tag:blogger.com,1999:blog-4024134170996407458.post-22114299087289992052011-10-19T20:05:00.000+02:002011-10-19T20:05:47.155+02:00Humble "FrozenSynapse" BundleHumble Bundle came back again, this time with just one new game FrozenSynapse and the previous FrozenByte bundle with it, if you paid more than the average.
This run of the Bundle was not as peppered with events as the previous bundles were: there were only two mid-air additions to the bundle, instead of half a score of interesting events happening the last time and nothing (to musically_uthttp://www.blogger.com/profile/00017318258700020690noreply@blogger.com0tag:blogger.com,1999:blog-4024134170996407458.post-68617453322558333162011-09-26T19:56:00.000+02:002013-01-18T13:54:20.377+01:00Book Reviews: The Sweet Shop owner, The Help, and Brief Interview with Hideous men
The sweet-shop owner
(Graham Swift)
The Sweet Shop owner
This is a good book. Though the author has not gone out of his way to make it easy to read. It is the story of a special kind of love, a love which is arranged, but still as rock solid as any other kind of love one is likely to find. Where the implicit rules forbid one from making explicit mention of "love". Where effort is made musically_uthttp://www.blogger.com/profile/00017318258700020690noreply@blogger.com1tag:blogger.com,1999:blog-4024134170996407458.post-4765532830793622732011-09-11T00:44:00.000+02:002011-09-11T00:50:25.255+02:00What Perl got right and R got wrong
R tries to do the right thing by having very short names for functions one uses often:
c()
Creating vectors.
t()
Transpose a matrix.
q()
Quitting R
is()
Generic isInstanceOf
by()
apply after grouping
as()
Generic type cast
Common primitive functions in R
As much as I like not having to type extra characters to get to these functions, I have always had to be extra musically_uthttp://www.blogger.com/profile/00017318258700020690noreply@blogger.com4