Trivial
This file contains hidden or 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
| table <- read.csv('result.csv', head = FALSE) | |
| vec <- as.vector(transform(t(table))[,1][2:1025]) | |
| png('result1-0.png', width=720, height=405) | |
| barplot(sapply(vec[1:128], as.numeric), cex.names = 0.00001) | |
| png('result1-1.png', width=720, height=405) | |
| barplot(sapply(vec[1000:1025], as.numeric), cex.names = 0.00001) | |
| vec <- as.vector(transform(t(table))[,5][2:1025]) | |
| png('result2-0.png', width=720, height=405) | |
| barplot(sapply(vec[1:128], as.numeric), cex.names = 0.00001) |
This file contains hidden or 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
| test: gen-nodejs node_modules | |
| `npm bin`/nodeunit test.js | |
| gen-nodejs: | |
| thrift --gen js:node user.thrift | |
| node_modules: | |
| npm install thrift nodeunit |
This file contains hidden or 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
| module.exports = (grunt) -> | |
| grunt.initConfig | |
| pkg: grunt.file.readJSON 'package.json' | |
| coffee: compile: | |
| options: bare: true | |
| files: 'dist/controller.js': './controller.coffee' | |
| jade: compile: | |
| options: pretty: true | |
| files: 'dist/index.html': [ 'index.jade' ] |
This file contains hidden or 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
| module.exports = (grunt) -> | |
| grunt.initConfig { | |
| pkg: grunt.file.readJSON('package.json') | |
| coffee: { | |
| compile: { | |
| options: { | |
| bare: false | |
| } | |
| files: { | |
| 'dist/app_nodep.js': 'app.coffee' |
API 서버들을 최신 버전으로 업데이트하는 스크립트.
기존 스크립트와의 차이는 다음과 같다.
- 서버를 모두 새로 띄운다.
기존 스크립트는 서버를 한대씩 멈추고 업데이트한 다음, 다시 실행하는 방식으로 작동하였는데, 2~3대의 서버가 있을 때 한대를 내리게 되면 잠시나마 서비스에 상당한
This file contains hidden or 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 pango | |
| from terminatorlib.util import dbg | |
| import terminatorlib.plugin as plugin | |
| # AVAILABLE must contain a list of all the classes that you want exposed | |
| AVAILABLE = ['AutoFontSizePlugin'] | |
| class Resizer: | |
| def __init__(self, term): |
This file contains hidden or 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
| util = require 'util' | |
| hbase = require 'hbase' | |
| inspect = (obj) -> util.inspect(obj, { colors: true, depth: null }) | |
| debug = (err, res) -> console.log err? && err || inspect(res) | |
| client = hbase { | |
| host: '--some-host--' | |
| port: --some-port-number-- | |
| } |
This file contains hidden or 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
| request = require 'request' | |
| url = 'http://localhost:4000' | |
| i = 0 | |
| sendRequest = (id) -> | |
| request.get url, (err, res, body) -> | |
| return console.log err if err | |
| console.log "#{id} : #{res.statusCode}" |
This file contains hidden or 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 AssemblyKeys._ | |
| assemblySettings | |
| name := "HelloWorld" | |
| version := "0.0.1" | |
| scalaVersion := "2.9.2" |