The recent video I made for Python Fiddle didn’t prove to be a hit with on 60 views so far, but the one for the JavaScript IDE has been on the top or second place in referrals for Fiddle Salad. One explanation would be YouTube’s video ranking algorithm takes into account community factors such as subscribed channels and the videos in your channel.
The number of visitors to my site for Wijmo Books is also disappointing but almost to be expected. At least the site was a lot of fun to build and still looks spiff.
One of the bugs still in the Waterloo Course Planner is the handling of prerequisite sentences that end with “* students only.”. The fix I made was rather simple. Though converting existing test cases to unit tests did not help because none of the older grammar rules were changed and therefore the tests were not broken, it did help in the development of new grammar rules. Python unit tests does a nice job of pinpointing the exact place where the expected results differ from running the code.
[cc]
Failure
Traceback (most recent call last):
File “N:\Projects\ply\prereqyacc.py”, line 182, in testQuirks
self.assertEqual(results, map(parser.parse, prereqs))
AssertionError: Lists differ: [‘MATH 127/MATH 128/MATH 137/M… != [‘MATH 127/MATH 128/MATH 137/M…
First differing element 1:
MATH 115/MATH 119
MATH 115, MATH 119
+ [‘MATH 127/MATH 128/MATH 137/MATH 147’, ‘MATH 115, MATH 119’]
? ^^
[/cc]
“* students only.” appearing in a string results in the tokenizer printing out a list of invalid tokens. There are two ways of ignoring strings in PLY:
t_ignore_ in the tokenizer
change t_ignore_ to a token and add a new rule that returns an empty string in the parser
I used the second method this time, since the semicolon preceding “* students only.” would also need to be ignored. Semicolons are treated as a signal for an “and” clause otherwise. The new rule looks like the following:
[cc lang=”python”]
def p_restriction(p):
‘semi_restriction : SEMI STUDENTS_ONLY’
p[0] = ”
[/cc]
Installing Gentoo Linux across all Pentium 4 machines for DataMill was an easy process. I copied an existing installation across hard drives. While installing Gentoo on the source machine, I had -march=pentium4 in make.conf while I would recommend i686 or x86_64 for a generic install that can be copied over a large number of machines. I follow the same steps as http://www.gentoo-wiki.info/HOWTO_Clone_a_Gentoo_Server_or_Workstation, with slight modifications.
On the source machine, I boot up the System Rescue CD and resize the last partition of the install to fit the hard drive size. I also have netcat compiled and uploaded to my site. I run
ifconfig -a
to find out its ip address. Before I start the cloning process, I also change the hostname.
mount /dev/sda3 /mnt/gentoo #sda4 is the partition for /
vim /mnt/gentoo/etc/conf.d/hostname
umount /mnt/gentoo
dd if=/dev/sda conv=sync,noerror bs=1024 count=30000000 | ./nc -l 0 -p 5000
On the destination machine, I boot the Gentoo Live CD, download netcat, and listen to port 5000.
I made this video in the summer and Python Fiddle back in 2010. It is still the best Python IDE on the web running in a browser. So here is a demo if you’re new to Python:
First up on the list is the bad news: the old share bar is permanently gone as Google has shut it down. That’s right! Google has shut down a competitor’s service after buying it. At least the meebo team is honest and left us a message:
Meebo was acquired by Google on June 4, 2012.
Our team is now working just a few miles down the road with the Google+ team, where we continue to focus on creating delightful experiences for our users, developers, and publishers.
Meebo’s products are no longer available, but you can find all the latest and greatest things that we’re working on at https://developers.google.com/+/.
On the course explorer side, there has recently been a change to Amazon’s Ecommerce API, breaking code for getting book titles and URLs that I wrote several years ago. Basically, most of the responses returned changed from single item ones to
[cc lang=”xml”]
cd6bd87d-046c-4a07-a99e-16fc600ebe31
0.0220990000000000
True ISBN 9780470392164 Small Books All
0470392169 http://www.amazon.ca/How-Read-Proofs-Introduction-Mathematical/dp/0470392169%3FSubscriptionId%3DAKIAIZLBWTLA3LJJZ2MA%26tag%3Dyuguzhan-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D0470392169 Add To Wishlist http://www.amazon.ca/gp/registry/wishlist/add-item.html%3Fasin.0%3D0470392169%26SubscriptionId%3DAKIAIZLBWTLA3LJJZ2MA%26tag%3Dyuguzhan-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D386005%26creativeASIN%3D0470392169
Tell A Friend http://www.amazon.ca/gp/pdp/taf/0470392169%3FSubscriptionId%3DAKIAIZLBWTLA3LJJZ2MA%26tag%3Dyuguzhan-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D386005%26creativeASIN%3D0470392169
All Customer Reviews http://www.amazon.ca/review/product/0470392169%3FSubscriptionId%3DAKIAIZLBWTLA3LJJZ2MA%26tag%3Dyuguzhan-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D386005%26creativeASIN%3D0470392169
All Offers http://www.amazon.ca/gp/offer-listing/0470392169%3FSubscriptionId%3DAKIAIZLBWTLA3LJJZ2MA%26tag%3Dyuguzhan-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D386005%26creativeASIN%3D0470392169
Daniel Solow Wiley Book How to Read and Do Proofs: An Introduction to Mathematical Thought Processes
[/cc]
to multiple item ones
[cc lang=”xml”]
cc114a2f-75e9-419a-81a4-fc7e98f6df13
0.0407320000000000
True ISBN 9780201350883 Small Books All
0201350882 http://www.amazon.ca/Algorithms-Parts-1-4-Fundamentals-Structure/dp/0201350882%3FSubscriptionId%3DAKIAIZLBWTLA3LJJZ2MA%26tag%3Dyuguzhan-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D0201350882 Add To Wishlist http://www.amazon.ca/gp/registry/wishlist/add-item.html%3Fasin.0%3D0201350882%26SubscriptionId%3DAKIAIZLBWTLA3LJJZ2MA%26tag%3Dyuguzhan-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D386005%26creativeASIN%3D0201350882
Tell A Friend http://www.amazon.ca/gp/pdp/taf/0201350882%3FSubscriptionId%3DAKIAIZLBWTLA3LJJZ2MA%26tag%3Dyuguzhan-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D386005%26creativeASIN%3D0201350882
All Customer Reviews http://www.amazon.ca/review/product/0201350882%3FSubscriptionId%3DAKIAIZLBWTLA3LJJZ2MA%26tag%3Dyuguzhan-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D386005%26creativeASIN%3D0201350882
All Offers http://www.amazon.ca/gp/offer-listing/0201350882%3FSubscriptionId%3DAKIAIZLBWTLA3LJJZ2MA%26tag%3Dyuguzhan-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D386005%26creativeASIN%3D0201350882
Robert Sedgewick Addison-Wesley Professional Book Algorithms in C++, Parts 1-4: Fundamentals, Data Structure, Sorting, Searching (3rd Edition)
B001FWIJFA http://www.amazon.ca/Algorithms-Parts-1-4-Fundamentals-Structure-ebook/dp/B001FWIJFA%3FSubscriptionId%3DAKIAIZLBWTLA3LJJZ2MA%26tag%3Dyuguzhan-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3DB001FWIJFA Add To Wishlist http://www.amazon.ca/gp/registry/wishlist/add-item.html%3Fasin.0%3DB001FWIJFA%26SubscriptionId%3DAKIAIZLBWTLA3LJJZ2MA%26tag%3Dyuguzhan-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D386005%26creativeASIN%3DB001FWIJFA
Tell A Friend http://www.amazon.ca/gp/pdp/taf/B001FWIJFA%3FSubscriptionId%3DAKIAIZLBWTLA3LJJZ2MA%26tag%3Dyuguzhan-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D386005%26creativeASIN%3DB001FWIJFA
All Customer Reviews http://www.amazon.ca/review/product/B001FWIJFA%3FSubscriptionId%3DAKIAIZLBWTLA3LJJZ2MA%26tag%3Dyuguzhan-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D386005%26creativeASIN%3DB001FWIJFA
All Offers http://www.amazon.ca/gp/offer-listing/B001FWIJFA%3FSubscriptionId%3DAKIAIZLBWTLA3LJJZ2MA%26tag%3Dyuguzhan-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D386005%26creativeASIN%3DB001FWIJFA
Robert Sedgewick Addison-Wesley Professional eBooks Algorithms in C++, Parts 1-4: Fundamentals, Data Structure, Sorting, Searching (3rd Edition)
[/cc]
As with many of these bugs, they are easy to fix once cause of the problem is found. If you know XML, an exercise for you is to spot the difference between the top one and the bottom one.