Skip to content


PyYAML using easy_install on Mac OS X (Lion)

Tried to install pyyaml today but got a couple nasty errors.

$ sudo easy_install  pyyaml
Searching for pyyaml
Reading http://pypi.python.org/simple/pyyaml/
Reading http://pyyaml.org/wiki/PyYAML
Best match: PyYAML 3.10
Downloading http://pyyaml.org/download/pyyaml/PyYAML-3.10.zip
Processing PyYAML-3.10.zip
Running PyYAML-3.10/setup.py -q bdist_egg --dist-dir /tmp/easy_install-8Co0C6/PyYAML-3.10/egg-dist-tmp-FYdiLy
build/temp.macosx-10.7-intel-2.7/check_libyaml.c:2:18: error: yaml.h: No such file or directory
build/temp.macosx-10.7-intel-2.7/check_libyaml.c: In function ‘main’:
build/temp.macosx-10.7-intel-2.7/check_libyaml.c:5: error: ‘yaml_parser_t’ undeclared (first use in this function)
...
lipo: can't open input file: /var/tmp//ccxDQipT.out (No such file or directory)

and

libyaml is not found or a compiler error: forcing --without-libyaml
(if libyaml is installed correctly, you may need to
 specify the option --include-dirs or uncomment and
 modify the parameter include_dirs in setup.cfg)

Fortunately, after piecing together a couple posts, the fix is easy. Use the following command to install PyYAML.

sudo python -m easy_install pyyaml

We must install this way because the problem is a bug in an Python’s setuptools. Its been fixed in later versions, but for now this did the trick for me.

Resources

  • http://pyyaml.org/ticket/186
  • http://pyyaml.org/ticket/94
  • http://andreasjacobsen.com/2008/10/10/using-python-setuptools-on-the-mac/

Posted in Tutorials.


Eclipse Start-Up Crash on Mac OS X Lion

Today, I was working from my parent’s home in Arkansas where we don’t have broadband, so my Mac was offline. I tried to start Eclipse and it just popped a dialog mentioning a log file with no other message.

After a bit of searching the errors in the log, Stack Overflow came to the rescue.

just add an alias for localhost to the network interface:

sudo ifconfig en0 alias 127.0.0.1

That’s all you have to do, really.

Posted in Tutorials.


Lost Your Kindle? Email A Last-Ditch Note to the Finder/Thief.

About a week ago, I lost my Kindle. This makes me sad. After tracking it on security cameras until it left the film of vision (left in cart at grocery store), I’ve devised a last ditch effort. Remember that convenience method of emailing documents to your kindle? Well, I’ve just created a PDF pleading for its return, including my contact info. Will it work? Maybe not, but it can’t hurt either. You can do this yourself.

  1. Write a “please return my Kindle” note in MS Word. I used size 20 font, all caps, and short sentences. Continued…

Posted in Tutorials.


Simple REST API Testing Setup using Vows.js, Tobi, and Node.js

I’m learning so many new things at BrightTag! Among them, I’m helping develop a new service in node.js. After piecing together a few articles online about using node for asynchronous testing of REST services, I thought I’d share the testing setup I’d settled on, in case it can help you. The setup is written for vowsjs and can easily be tailored to your situation. I’ve tried to make heavy use of asynchronization, macros, and contextualized requests. In the case below, I was integration-testing an oauth security middleware (simplified here for, well, simplicity). Continued…

Posted in Tutorials.


Delete Lines Matching Regular Expression From Multiple Files

Today, I had to remove 650 instances of a line matching a certain pattern scattered across 145 different XML files. Not a pleasant task. (If you’re wondering, I’m deprecating a field in the XML DTD and wished to remove all current instances).

Just to save you all the searching and debugging, here is the final form and my notes.

egrep -rl '^<pattern>$' * | xargs sed -i .bak '/^</pattern><pattern>$/d'
</pattern>

Continued…

Posted in Tutorials.


Service Learning

Today, I stumbled upon the last article that I helped push through for Drexel Smart House before graduation. True to form and philosophy, this article is espousing an educational paradigm called “service learning.” This piece appeared in the Bridge (iSchool publication) and focuses on an HCI course by one of my favorite Drexel professors and personal mentors, Dr. Jennifer Rode.

DSH Spread in the Bridge

Get a PDF version for easier reading

I’m looking forward to seeing where the amazing new leadership team takes this project. I left at the most exciting time for DSH, but I’m excited to do whatever I can as an alumni to see this project, and all of the ideals and philosophies that it represents, flourish.

 

Posted in Education.


Graduated!

Yayy!! A big thank you to all my family, friends, mentors, and supporters who have helped me at various points along the way. You’ve all helped fashion a great experience for this poor Southern boy, and I hope that you’ll allow me to help you in turn, whenever the time arises.

Posted in News.


Case Study: Cell Phone Bill Analysis

Have you ever looked at the long list of calls on your phone bill, and wished there were a better way to see who all you’ve spoken with and other related information? Like some of you, I’m a data junkie, and I sure did. For now, I’m an AT&T customer. Like most modern phone companies, AT&T makes your call history available for download from their website in CSV format. Using a simple script, we can transform this long ugly list of numbers into something more meaningful.

Pie Charts showing To Whom I Speak as Percent of Total Calls and Total MinutesGraphs such as these can tell us a few interesting things,  Continued…

Posted in Case Studies.


For Loops and Finite Series

At the request of one of my AP Computer Science students, I’m posting a few solutions to a simple loop problem in Java. The question reads:

How many times are the following loops executed?

for(int i=0; i&lt;10; i++)
   for(int j=0; j<i ; j++)
      System.out.println(i*j);

The possible options are A) 100, B) 20, C) 10, or D) 45.

Now, there are a few ways you can go about solving this problem. Continued…

Posted in Tutorials.


Update on My Life

I’m sorry its been so long since I’ve written! A lot has changed in my life recently, and I should tell you all about it. In brief,

  • Finally graduated from Drexel University with both my bachelor and master degrees in electrical engineering. (Honors, baby!)
  • Moved to Chicago. Technically, I’m currently living in Evanston, IL, at Northwestern University. See next point.
  • Starting working with gifted students through Northwestern University’s Center for Talent Development Continued…

Posted in News.




Log in here!