Jump to content

doug_h

Active Members
  • Posts

    11
  • Joined

  • Last visited

Contact Methods

  • AIM
    bemasher
  • ICQ
    0

Profile Information

  • Gender
    Male

Recent Profile Visitors

617 profile views

doug_h's Achievements

Newbie

Newbie (1/14)

  1. What software are you designing it in? I've done some really simple digital component design in Logisim which isn't really professional by any means but does the job for learning your way around things like that. Or are you using something like verilog?
  2. Here's a simpler more readable version of my previous submission. It's also commented. def PowerSet(base): #What size of gray_code set should we make? bits = len(base) power_set = [] #Generate the gray_code gray_code = map(lambda x: x ^ (x / 2), range(0, 2 ** bits)) for gcode in gray_code: #Calculate binary of gray_code binary = map(lambda x: (gcode >> x) & 1, range(bits-1, -1, -1)) #Calculate the indexes of the 1's working_set = filter(lambda x: binary[x], range(0, bits)) #Add the values from the base that coorespond to the 1 indexes working_set = map(lambda x: base[x], working_set) #Add working_set to power_set power_set.append(working_set) return power_set print PowerSet([1,2,3])
  3. Here's my submission. def PowerSet(base): power_set = [] b = len(base) map(lambda g: power_set.append(map(lambda x: base[x], filter(lambda x: g[x], range(0, b)))), map(lambda value: map(lambda x: (value >> x) & 1, range(b - 1, -1, -1)), map(lambda value: value ^ (value / 2), range(0, 2**b)))) return power_set print PowerSet([1,2,3]) This definitely won't win for readability but it's the shortest I could come up with.
  4. I was wondering if anyone here has done any pair programming. I really like the idea and am interested in trying it. So far i've found only two editors // IDE's that support remote collaboration the first is Eclipse with ECF (Cola) and Notepad++ with the Dochshare plugin. Both follow the same general idea. One client would serve a document (or connect to a server that would manage sharing it) and another user would connect as a client to either the other user or the server. Both users would be presented with the document in question and could edit it live with changes being sync'd to both clients. It looks like right now the Npp Docshare plugin is really new and there are a lot of details yet to be flushed out but Eclipse's ECF plugin seems to be pretty mature already. It'd be really cool if there were a pair programming competition.
×
×
  • Create New...