更新: | 2014-05-14 |
---|---|
バージョン: | 0.0.12 |
作者: | @voluntas |
URL: | http://voluntas.github.io/ |
とても詳しいまとめがありますので、ますはそちらを見ることをオススメします。
<polymer-element name="user-gravatar" attributes="email"> | |
<template> | |
<img src="https://secure.gravatar.com/avatar/{{gid}}" /> | |
</template> | |
<script> | |
Polymer('user-gravatar', { | |
ready: function() { | |
this.gid = md5(this.email); | |
} | |
}); |
package spark.examples | |
import org.apache.spark._ | |
import org.apache.spark.SparkContext._ | |
import org.json4s.jackson.JsonMethods | |
import org.json4s.jackson.JsonMethods._ | |
import org.json4s.JsonAST._ | |
object HDFSDeleteExample { |
import org.apache.spark._ | |
import org.apache.spark.SparkContext._ | |
import org.json4s.jackson.JsonMethods | |
import org.json4s.jackson.JsonMethods._ | |
import org.json4s.JsonAST._ | |
import org.json4s.DefaultFormats | |
object CandyCrushExample { | |
def main(args: Array[String]): Unit = { |
import theano | |
from pylearn2.models import mlp | |
from pylearn2.train_extensions import best_params | |
from pylearn2.training_algorithms import sgd, learning_rule | |
from pylearn2.utils import serial | |
from pylearn2.termination_criteria import MonitorBased | |
from pylearn2.datasets.dense_design_matrix import DenseDesignMatrix | |
from sklearn.preprocessing import StandardScaler | |
import numpy as np | |
from random import randint |
''' | |
texture image path are relative to the blend file directory. run from command line like this: | |
texture=img/2012720989_c.jpg blender -b mug.blend --python texture_change.py -F PNG -s 1 -e 1 -j 1 -t 0 -a | |
'''' | |
import os | |
image_file = os.getenv('texture') | |
if not image_file: | |
image_file="img/2012720989_c.jpg" |
sudo apt-get -y update | |
sudo apt-get -y upgrade | |
sudo apt-get -y dist-upgrade | |
sudo apt-get -y install git make python-dev python-setuptools libblas-dev gfortran g++ python-pip python-numpy python-scipy liblapack-dev | |
sudo pip install ipython nose | |
sudo apt-get install screen | |
sudo pip install --upgrade git+git://github.com/Theano/Theano.git | |
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1204/x86_64/cuda-repo-ubuntu1204_5.5-0_amd64.deb | |
sudo dpkg -i cuda-repo-ubuntu1204_5.5-0_amd64.deb | |
sudo apt-get update |
更新: | 2014-05-14 |
---|---|
バージョン: | 0.0.12 |
作者: | @voluntas |
URL: | http://voluntas.github.io/ |
とても詳しいまとめがありますので、ますはそちらを見ることをオススメします。
# Build a checkerboard colored square plane with "segments" number of tiles per side. | |
# Using three.js v62 | |
checkerboard = (segments=8) -> | |
geometry = new THREE.PlaneGeometry(100, 100, segments, segments) | |
materialEven = new THREE.MeshBasicMaterial(color: 0xccccfc) | |
materialOdd = new THREE.MeshBasicMaterial(color: 0x444464) | |
materials = [materialEven, materialOdd] | |
for x in [0...segments] | |
for y in [0...segments] |
我记得我曾经有两次写博客提及过度量这个词: 一篇是2010年的博文:http://www.sssa2000.com/?p=33。 另一篇是2012年的博文:http://www.sssa2000.com/?p=748。 当时的我基本上是把可度量和可测试画上了等号。
随着自己慢慢开始关注管理,对可度量这个词的含义有了更多的认识。例如:当需要回答某些问题的时候,我发现过去的眼光太局限:
//////////////////////////////////////////////////////////////////////////////// | |
// Polygon Creation Exercise | |
// Your task is to complete the function PolygonGeometry(sides) | |
// which takes 1 argument: | |
// sides - how many edges the polygon has. | |
// Return the mesh that defines the minimum number of triangles necessary | |
// to draw the polygon. | |
// Radius of the polygon is 1. Center of the polygon is at 0, 0. | |
//////////////////////////////////////////////////////////////////////////////// | |
/*global, THREE, Coordinates, $, document, window*/ |