/images/bio-photo-small.jpg

Shallow and Pedantic

A person/tech/code blog of a coder/techie/person. Like calculus in a kiddie pool, the author of this blog is known to be quite shallow and pedantic.

IPython

The more I use Python, the nicer it becomes. I’m currently working on a project for a course, which involves somewhat heavy-duty database and algorithm work. Python is my language of choice for it - let’s hope it works out well.

In the meantime, I’ve found a really nice python shell called iPython (available in apt) - it adds a bunch of stuff to the python shell which I sorely missed from irb - autocompletion, auto-indentation, and - it seems - adds a whole lot more.

Using Jabber from within the Technion

A very neat find for those of you who want to use Jabber from within the Technion, but with your client of choice rather than a web-based one: Many Jabber servers, including Google Talk, support using Port 443 over SSL. Since the Technion does not block outbound SSL connections, this will work there as well. Be sure to mark the appropriate ‘Use old SSL protocol’ option in your jabber client (that’s what it’s called in gaim and pidgin, at any rate).

Before reinstalling your server for RAID

Check that the RAID it supports is actual Raid. My experience today:

  1. Decide that secondary server should gradually become more and more primary
  2. Decide that since it has two 160GB hard drives and built-in RAID, we should use that for mirroring
  3. Mail (both!) users of the secondary server that it’ll be down for rebuilding
  4. Set up RAID array from BIOS, clearing all old information
  5. Insert installation CD
  6. Notice that installation still sees two hard drives
  7. Discover that built-in NVRaid is actually software RAID
  8. Disable built in RAID in favor of LVM, proceed to reinstall :(

Bass guitar

I brought my Fender Squier Jazz Bass up to my Technion apartment. I hope it won’t have too much of an adverse effect on my studying… playing it (loud) is great for stress, and I’m taking a jazz improvisation course next semester.

By the way - if any of you record with one of these, I highly recommend Arour, using a low-pass LADSPA filter. Also, activating both pickups on about 80% does wonders against hum if you connect directly.

Really liking the whole Python thing

I’ve converted my Antigibberish script1 (converts “broken hebrew” into proper hebrew, useful for sent-offline ICQ messages) to Python… it’s quite a nice language, and the interpreter is FAST! I’m really torn between it and Ruby :(


  1. Used to have a copy of antigibberish.py, but it’s been lost in the mists of time. It used to do the equivalent of this:

    iconv -f utf-8 -t iso8859-1 | iconv -f iso8859-8 -t utf-8 ↩︎

Here's hoping

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
def factor(grade, params = {})
  return 100 if params.empty? # Optimistic, eh?

  case params[:type]
  when :pass
    return 55
  when :fail
    return 54
  when :root
    params[:gamma] = 0.5
  end

  grade = grade.to_f

  return params[:proc].call(grade) if params[:proc]

  grade *= params[:coefficient] if params[:coefficient]

  if params[:gamma]
    grade /= 100
    grade **= params[:gamma]
    grade *= 100
  end

  if params[:offset]
    grade += params[:offset]
  end

  return grade if params[:idnoclip]
  [ grade, 100 ].min
end