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

Friday 10 April 2015

Basile's Single Sheet Origami Box

On Licensing Open Source Software

"QUICK NOTE: LICENSING OPEN SOURCE SOFTWARE

When you start using third-party libraries, pay attention to the license and/or copyright information that is written out. Generally, if the library/code has no license, it means all rights reserved for the author (do not use the code). If it’s GPL, your application/script must also be licensed under the GPL. Although, technically any license that is GPL-compatible is fine to use too: GPL Compatible Licenses or GPL compatibility. If it’s mit/2-clause bsd you can do whatever you want (no need to use the same license, or even have a license), if it’s 3-clause bsd you can do whatever you want but have to credit the original author. FOR THE CURIOUS Code that is up on GitHub does not mean that it is free to use. If you want to use a library, ask the developer if s/he has plans to include a LICENSE file or in the headers of the files if it’s not there already. If you want to open source your code (yay, go you!), include your desired license either as a separate file or within the preamble/beginning of your code. Licensing your code is simply copying & pasting the required language of a license of your choice into your codebase."

source: http://newcoder.io/Part-1-Parse/

Wednesday 1 April 2015

Bibliothèque Cantonale et Universitaire, University of Lausanne

Delivering G+ and FB Messages to Your Gmail Inbox

Create a gmail filter and set the fields to be "in:chats", from anyone (from:()) or leave the gui field blank and select "chats" from the dropdown menu.

motivation: http://oliveremberton.com/2013/how-to-master-your-time/
Opt in to live chat by opening the respective portals, but prevent missing messages by having them delivered as emails.

source: http://webapps.stackexchange.com/questions/47370/gmail-problem-with-hangout-and-filters