This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
implement complex mathamatic property using JS Object | |
*/ | |
// Define constructor : =================================================================== | |
// ( c = x + y i ) | |
// ======================================================================================== | |
function Complex(real,imaginary){ | |
this.x = real; | |
this.y = imaginary; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# generic currying decorator | |
# right currying behavior | |
from functools import partial | |
""" | |
Curry decorator | |
""" | |
def curry(func, args_num=1, args_total=None): | |
if not args_total: args_total = func.func_code.co_argcount | |
def curried(arg1): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
# electric guitar remix | |
# version 1.1 ( with organ harmony , heart beat) | |
# | |
# electric_guitar_remix.coffee | |
# Source: https://gist.github.com/KC-Liu/11139685 | |
# | |
# Inspired by "Mom, I got full marks in the exam" by SelfKill | |
# (https://www.youtube.com/watch?v=jq6bvDQ2FyA) | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
# DO YOU HEAR THE PEOPLE SING? (Uplifting Mix) | |
# version 1.3 (clearer kick sound) | |
# | |
# Converted from CoffeeScript | |
# Source: https://gist.github.com/11080149 | |
# Usage: coffee -bcp file.coffee | |
# | |
# Original from Les Miserables |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
# DO YOU HEAR THE PEOPLE SING? (Uplifting Mix) | |
# version 1.2 | |
# | |
# Converted from CoffeeScript | |
# Source: https://gist.github.com/11080149 | |
# Usage: coffee -bcp file.coffee | |
# | |
# Original from Les Miserables | |
# (http://www.youtube.com/watch?v=QngGvHTOKh4) |