Profile

Cover photo
Gary “grim” Kramlich
293 followers|94,794 views
AboutPostsPhotosYouTube

Stream

 
Today's python hack...

In [13]: class A(object):
   ....:     pass
   ....: 

In [14]: a = A()

In [15]: a.foo()
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-15-759019553652> in <module>()
--> 1 a.foo()

AttributeError: 'A' object has no attribute 'foo'

In [16]: a.foo = types.MethodType(lambda self: 'foo', a)

In [17]: a.foo()
Out[17]: 'foo'

#python   #dev   #monkeypatching  
2
Ethan Blanton's profile photoGary Kramlich's profile photo
2 comments
 
Heh we actually had a use case for this... In the python requests library if you try to stream the response from one request to another, it sets the content length to 0 when sending. So we monkey patched in a _len_ method with this to make it work :-)
Add a comment...

Gary Kramlich

Shared publicly  - 
 
I'm going to just start using cash for everything...
http://krebsonsecurity.com/2014/12/banks-card-breach-at-some-chick-fil-as/
1
Andrew Dieffenbach's profile photo
 
That's what it feels like.
Add a comment...

Gary Kramlich

Shared publicly  - 
 
Too funny :-)
 
I found Linux has the highest I/O bandwidth.
30 comments on original post
4
Add a comment...

Gary Kramlich

Shared publicly  - 
 
#IngressFS Milwaukee
Sat, November 1, 2014, 10:00 AM CDT
2
2
Drew Dondero's profile photoBrandon Cornejo's profile photo

Gary Kramlich

Shared publicly  - 
 
pulled into my alley then this.. yep time to just goto bed...
1
Ethan Blanton's profile photoGary Kramlich's profile photoChris Cook's profile photo
4 comments
 
cars... ◔_◔
Add a comment...

Gary Kramlich

Shared publicly  - 
 
Good stuff #python  
Learn to take better advantage of Python's best features and improve existing code through a series of code transformations, "When you see this, do that instead."
1
Add a comment...

Gary Kramlich

Shared publicly  - 
 
Woo 20/20 with some good guessing :)
2
1
Chris Cook's profile photo
Add a comment...
Have him in circles
293 people
James Carlson's profile photo
Nick Bruggs's profile photo
Scott Tannis's profile photo
Ethan Blanton's profile photo
Jackie buhl's profile photo
Andy Frahm's profile photo
Walter Huf's profile photo
Andre Archambeau's profile photo
tracy apps's profile photo

Gary Kramlich

Shared publicly  - 
 
Hey #3dprinting  friends... my extruder has stopped extruding... The filament is getting caught and is trying to be driven through the extruder, but all I get is a tiny bit of ooze.  I think somehow my nozzle is completely jammed up.

Any suggestions, aside from hitting it with a torch which I haven't done yet.
1
Add a comment...
 
#3dprinting  from my workstation has led me to some interesting problems that can arise from using a machine while printing.

As you may or may not know I started using https://github.com/daid/Cura as my toolchain quite awhile ago.  It works great and I highly recommend it.

As I mentioned earlier, I'm running Cura on my workstation, which just happens to be running Linux.  On said workstation I do all kinds of development and other futzing around.  However, last night I had two odd issues that completely stalled out my printer.

The first happened when I connected my tablet to the machine to be reflashed to factory default (long story  short, recovery went bad, didn't get an OTA update, etc etc, wanted to flash the newest image).  As soon as I plugged in the tablet, the printer froze.  I run dmesg and see that the Arduino got disconnected and immediately reconnected.

Okay, crazy, but perhaps the USB driver had to disconnect the Arduino which maybe negotiated USB2.0 or something, and wanted to set my tablet to USB2.0.  However, is it the Arduino's (or Marlin's) fault or Cura's?  No idea...

So anyways, I scrap that printer, kill all the cura processes and keep printing.  Awhile later, I'm trying to start up a #docker  image, and again, printer just freezes.  However, nothing in dmesg this time.  This starts pointing to Cura but I really have no idea how to proceed.

So while I need to print, I guess I can't start docker images or switch USB devices (at least on the same hub).  It sucks, but until I get another print host setup, I guess it will have to do.
Read this, it's important! If you are reading this, then you are looking at the development version of Cura. If you just want to use Cura, take a look at the following location:
1
Pete Prodoehl's profile photoMark Rehorst's profile photoSteven Critchfield's profile photoGary Kramlich's profile photo
15 comments
 
totally digging octopi (octoprint running on a pi).  I'm still using cura to slice on my workstation but then just uploading the gcode.  But being able to monitor progress from around the house is great.  Now I just need to find one of my usb hubs so I can start doing some time lapses to keep an eye on the print itself :)  (my usb's are in use by the wifi adapter and the printer, hence why I need a hub)
Add a comment...
 
With past experiences with my printer, I really didn't think this puzzle box was going to work. But it did and that's awesome :-) #3dprinting
4
Add a comment...

Gary Kramlich

Shared publicly  - 
3
Add a comment...

Gary Kramlich

Shared publicly  - 
3
3
Nathan K's profile photoKevin Ciesielski's profile photoMathieu Malaterre's profile photoTHE UrbanIlluminati's profile photo
 
wonder how to try it out,
Add a comment...
People
Have him in circles
293 people
James Carlson's profile photo
Nick Bruggs's profile photo
Scott Tannis's profile photo
Ethan Blanton's profile photo
Jackie buhl's profile photo
Andy Frahm's profile photo
Walter Huf's profile photo
Andre Archambeau's profile photo
tracy apps's profile photo
Work
Occupation
Computer Programming, Teaching
Story
Tagline
Jack of all trades, master of most!
Introduction
I'm an open source developer working on way too many projects.  I have too many crazy ideas and not enough itch scratchers.  I've been told numerous times, I over engineer, but I call it future proofing ;)
Basic Information
Gender
Male