Thursday, 23 April 2015

4/23 Harmonic resonators - History of Science Museum, Cambridge University

Physical manifestation (and possible inspiration, depending on the timeline) for Fourier Series+Transform (but hard to quantity magnitude/coefficients in this setup).

Sunday, 12 April 2015

Python 'self'

"The reason you need to use self. is because Python does not use the @ syntax to refer to instance attributes. Python decided to do methods in a way that makes the instance to which the method belongs be passed automatically, but not received automatically: the first parameter of methods is the instance the method is called on. That makes methods entirely the same as functions, and leaves the actual name to use up to you (although self is the convention, and people will generally frown at you when you use something else.) self is not special to the code, it's just another object."

"Because explicit is better than implicit."


source: http://stackoverflow.com/questions/2709821/what-is-the-purpose-of-self-in-python

Python: Underscore In Front of Variable



"In addition, the following special forms using leading or trailing underscores are recognized (these can generally be combined with any case convention): _single_leading_underscore: weak "internal use" indicator. E.g. "from M import *" does not import objects whose name starts with an underscore."


source: http://stackoverflow.com/questions/6700826/in-python-what-is-the-underscore-in-front-of-the-instance-variable

Git Remote Repository File Deletion



git commit  (file name with path which you want to delete)  -m "file is deleted"
git push origin master


source: http://stackoverflow.com/questions/9701238/git-how-delete-file-from-remote-repository

Laser-Cut, Acrylic, Flywheel-Gimbal System

Saturday, 11 April 2015

CNC Plasma Cutter, Fixme Hackerspace

Installing PyGame on Mac

Linux and Windows seem to have more straightforward installations. This worked for me on Mac.

brew install python
/usr/local/share/python/easy_install mecurial

brew install sdl
brew install sdl_mixer
brew install sdl_ttf
brew install sdl_image

hg clone https://bitbucket.org/pygame/pygame
cd pygame
/usr/local/bin/python setup.py install

You can verify proper installation by typing in terminal:
python
import pygame

source: https://bitbucket.org/pygame/pygame/issue/82/homebrew-on-leopard-fails-to-install#comment-627494



IoT APIs

"JanOS is an operating system designed to run on the chipset of mobile phones. It runs without a screen, and allows you to access all phone functionality, from calling to the camera, through JavaScript APIs."

source: http://janos.io/


source: http://blog.parse.com/2015/03/25/connecting-hardware-with-the-cloud-parse-for-iot/

Mac OSX - AttributeError: 'FigureCanvasMac' object has no attribute 'restore_region'

"Just set blit=False when animation.FuncAnimation() is called and it will work."

source: http://stackoverflow.com/questions/13216520/mac-osx-attributeerror-figurecanvasmac-object-has-no-attribute-restore-reg