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
###! | |
* jFBMobileFeedPhoto.js | |
* | |
* @version 1.0.2 | |
* @author Yusuke Sugomori | |
* @license http://yusugomori.com/license/mit The MIT License | |
* | |
* More details on github: https://github.com/yusugomori/jFBMobileFeedPhoto | |
### |
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
class Landscape | |
constructor: (options={}) -> | |
$('body').css visibility: 'hidden' | |
@isPortraitActivated = false | |
@isLandscape = false | |
@winWidth = 0 | |
@clientHeight = 0 | |
@clientWidth = 0 | |
@maxWidth = 0 |
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
#Landscape | |
#wrapper | |
.view-host | |
//.view.full-image | |
= image_tag "/path/to/img" | |
.view.page | |
p page | |
.view.page | |
p page | |
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
@import "bootstrap/bootstrap"; | |
@ratio: 1.1985; | |
@w: 480px; | |
body { | |
min-height: 100%; | |
overflow: hidden; | |
} |
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
class iPhoneTouchScroll | |
constructor: () -> | |
@clientHeight = 0 | |
@preserveHeight = 0 | |
@onTouchCurrent = {x:0, y:0} | |
@onTouchStart = {x:0, y:0} | |
@onTouchDrag = {x:0, y:0} | |
@onTouchDragThres = 5 | |
# @onTouchScrollThres = 0 | |
@onTouchScrollThres = 50 |
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
String.prototype.capitalize = function() { | |
return this.slice(0, 1).toUpperCase() + this.slice(1).toLowerCase(); | |
}; | |
console.log('hElLo'.capitalize()); // Hello |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Restricted Boltzmann Machine (RBM) | |
References : | |
- Y. Bengio, P. Lamblin, D. Popovici, H. Larochelle: Greedy Layer-Wise | |
Training of Deep Networks, Advances in Neural Information Processing | |
Systems 19, 2007 |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
''' | |
Logistic Regression | |
References : | |
- Jason Rennie: Logistic Regression, | |
http://qwone.com/~jason/writing/lr.pdf | |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
''' | |
Deep Belief Nets (DBN) | |
References : | |
- Y. Bengio, P. Lamblin, D. Popovici, H. Larochelle: Greedy Layer-Wise | |
Training of Deep Networks, Advances in Neural Information Processing | |
Systems 19, 2007 |
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
# Mathieu Blondel, September 2010 | |
import numpy as np | |
from numpy import linalg | |
import cvxopt | |
import cvxopt.solvers | |
def linear_kernel(x1, x2): | |
return np.dot(x1, x2) |