I struggled the past few weeks with an odd bug that I kept declining to fix in my Google App Engine application. I wanted to upload a file and parse some text from that file with Python. I specifically wanted to bypass the blobstore (for reasons that don’t matter here).
Super simple file upload.
All the posts I found said: don’t do this, use blobstore. Instead of just answering the posters question. They would then post a helpful example with blobstore use but only a snippet. I already know I should use blobstore though and my blobstore example works. This was similar but didn’t work and I couldn’t figure out why.. When I requested the file from self.request.get(‘filename’) I simply got back the file name I was uploading and no file.
My problem: def get(self): instead of def post(self); for the function declaration. DOH!
The entire simple example is below so hopefully someone can find the real answer to what they ask instead of “don’t do what you asked, do x”
def post(self): self.response.out.write(“——Attempting to upload: %s——\n”%self.request.get(‘filetype’)) #Some other attribute I wanted stringReader = csv.reader(StringIO.StringIO(self.request.get(‘file’))) for row in stringReader: self.response.out.write(‘Row:%s’%row)
Tried out the Oculus Rift tonight. I was impressed during the first run by how well it worked. The tuscany demo is impressive. I was actually able to pass the ball between my hands.
Tried out another space ship demo that was a bit disorienting and by my third time in Tuscany I became sick. It became worse when I actually took off the headset. It is now 2 hours later and my hands still feel disconnected from my head. Weird.
It really is neat. I just wish my body would have been okay with it. I’m fairly certain it was from doing non-natural head motions without head tracking in the demos.
Modded my Sega Master System this evening. Installed a replacement socket-able bios chip and replaced some failing caps in anticipation for conversion to SCART video/audio output.
I still can’t get my European version of Castle of Illusion to boot even after extensive cleaning of the cart and the socket. Phantasy Star 1 loads nicely though and now I can play Japanese card games using my home made adapter!
Progress has been made on my new Delta 3D printer. Michael and I rocked out on it yesterday. The build area is slightly bigger than 1/2 a meter in each direction. If I printed a solid cube it would take 12 days.
11g has this awesome feature called listagg. You can select a field from a subquery and it will roll it up doing a nice concatenate with a custom delimiter. Great! Only it let me down… which is why this post exists.
Standard ways to perform this task normally involve a for loop building a string over time or using wmsys.wm_concat if I don’t mine having just ‘,’ as a delimiter.
So why did listagg not work? It does everything I want a concatenate function to do but for some reason Oracle decided to limit it to 4000 characters inside PL/SQL. This seems odd to me as most of the newer string operators support the full 32000 characters in PL/SQL or have a clob equivalent.
I poked around dmbs_lob and didn’t see any options so I had to go back to using an ugly/slow loop function/custom concat code. This could seriously cut down our code base if it was implemented to support 32000 characters.
Dear Tastykake - Can you please sell your goods nationally? My family can’t ship them fast enough and I don’t make it back to a state you serve as often as I’d like. This cherry pie was soo delicious and was my dinner.
Chocolate Stout is finished! Cracked the first bottle this weekend and it was very tasty.
I’ve got half the batch still sitting in a secondary fermenter with 3 pounds of mashed cherries. I plan to leave it there one additional week and do a quick taste test to see if the taste has transferred sufficiently.
This weekend we’ll be brewing at All Hands Active. If you have any interest in learning how or just hanging out and tasting home brew, feel free to join!
Flipable indicator flags. Eventually these will sport 6 different color flags. This was just a quick prototype ran from a 3D Model I made. Commercial version of this runs about $60. I believe I can produce these for $8 in parts/material and 10 minutes of time. Woo! Only a few dozen to make once I finalize the design.