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 ca11able(object): | |
def __init__(self): | |
a = 2 | |
def __call__(self): | |
a += 1 | |
>>> c = ca11able | |
>>> c() | |
<__main__.ca11able object at 0x0000000002C949E8> |
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
AssemblyProperty (x1, x2, x3, x4, x5) <-> | |
ClassOfIndividual(x1) & | |
ClassOfIndividual(x2) & | |
ClassOfIndirectProperty(x3)& | |
Scale(x4) & | |
ArithmeticNumber(x5) & | |
exists z ( | |
ClassOfIndividual(z) & | |
SpecializationTemplate(x2, z) & |
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
>>> def g(**d): | |
print d['argname'] | |
>>> g(argname='argval') | |
argval | |
>>> def b(*z): | |
print z[0] | |
>>> b('Renata') | |
Renata |
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
X_norm = X; | |
mu = zeros(1, size(X, 2)); | |
sigma = zeros(1, size(X, 2)); | |
for featureIndex = 1:size(X, 2) | |
mu(1, featureIndex) = mean(X(:, featureIndex)); | |
sigma(1, featureIndex) = std(X(:, featureIndex)); | |
X_norm(:, featureIndex) = (X(:, featureIndex) .- mu(1, featureIndex)) ./ sigma(1, featureIndex) | |
end |
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
J = 1 / m * (sum(-1 * y .* log(sigmoid(X * theta)) - (1 - y) .* log(sigmoid(X * theta)))) + lambda / (2 * m) * sum(theta(2:length(theta),:)); | |
grad = X' * (sigmoid(X * theta) - y); | |
temp = theta; | |
temp(1) = 0; | |
grad = grad + (lambda / m) * temp; |
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
J = 1 / m * (sum(-1 * y .* log(sigmoid(X * theta)) - (1 - y) .* log(sigmoid(X * theta)))) + lambda / (2 * m) * sum(theta(2:length(theta),:)); | |
grad = 1 / m * X' * (sigmoid(X * theta) - y); | |
temp = theta; | |
temp(1) = 0; | |
grad = grad + (lambda / m) * temp; |
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
J = 1 / m * (sum(-1 * y .* log(sigmoid(X * theta)) - (1 - y) .* log(sigmoid(X * theta)))) + lambda / (2 * m) * sum(theta(2:length(theta),:)); | |
grad = 1 / m * X' * (sigmoid(X * theta) - y); | |
temp = theta; | |
temp(1) = 0; | |
grad = grad + (lambda / m) * temp; |
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
D:\Projects\couch-jquery\pairs>node "C:\Program Files (x86)\nodejs\node_modules\ | |
couchapp\bin.js" push D:\Projects\couch-jquery\pairs\app.js | |
node.js:201 | |
throw e; // process.nextTick error, or 'error' event on first tick | |
^ | |
Error: Cannot find module 'couchapp' | |
at Function._resolveFilename (module.js:334:11) | |
at Function._load (module.js:279:25) | |
at Module.require (module.js:357:17) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
p { color:red; margin:5px; cursor:pointer; } | |
p.hilite { background:yellow; } | |
</style> | |
<script src="http://code.jquery.com/jquery-latest.js"></script> | |
<script src="/_utils/script/sha1.js"></script> | |
<script src="/_utils/script/json2.js"></script> |
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
# -*- coding: utf8 -*- | |
import random | |
class Game(object): | |
def __init__(self): | |
self.options = [ | |
'7 - counts', | |
'9 - theme', | |
'10 - question', | |
'J - condition', |
OlderNewer