# start a screen with a sessionname
screen -S sessionname
# list screens
screen -ls
# attach to a detached screen
screen -r [sessionid]
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
const router = require('cmdrouter'); | |
const fs = require('fs-extra'); | |
const yamljs = require('yamljs'); | |
const jsyaml = require('js-yaml'); | |
// USAGE: | |
// `node yaml-vs-json-perf write` to create the data data yaml and data.json files, and stringify perf measure. | |
// `node yaml-vs-json-perf read` to perf measure the parsing. |
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
## Tutorial >> https://www.tensorflow.org/get_started/mnist/beginners | |
import os | |
os.environ['TF_CPP_MIN_LOG_LEVEL']='2' | |
## https://github.com/tensorflow/tensorflow/issues/7778 | |
import tensorflow as tf | |
from tensorflow.examples.tutorials.mnist import input_data |
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
Show hidden characters
{ | |
"env": { | |
"browser": true, | |
"commonjs": true, | |
"es6": true, | |
"node": true | |
}, | |
"plugins": ["react"], | |
"extends": ["eslint:recommended","plugin:react/recommended"], |
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 | |
var math = { | |
base: 0, | |
add: add | |
}; | |
function add(a, b) { | |
return this.base + a + b; | |
} |
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 Foundation | |
// | |
// Json.swift | |
// | |
// Simple and convenient JSON wrapper of a AnyObject returned by the NSJSONSerialization parser. | |
// | |
// NEXT: probably want to split the promise (done/fail) from the future part (the resolve/reject) | |
// | |
// Jeremy Chone 2015-06-21 |
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
// | |
// Future.swift | |
// | |
// Experimental simple Future/Promise class in Swift 2 (Beta) | |
// | |
// NEXT: probably want to split the promise (done/fail) from the future part (the resolve/reject) | |
// | |
// Jeremy Chone 2015-06-21 | |
import Foundation |
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
package com.britecrm.util; | |
import com.fasterxml.jackson.core.JsonGenerator; | |
import com.fasterxml.jackson.core.JsonParser; | |
import com.fasterxml.jackson.core.JsonProcessingException; | |
import com.fasterxml.jackson.core.ObjectCodec; | |
import com.fasterxml.jackson.databind.*; | |
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | |
import com.fasterxml.jackson.databind.module.SimpleModule; |
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
List<String> names = Arrays.asList("one","two ","three"); | |
// fancy builtin collector with delimiter | |
String s = names.stream().collect(Collectors.joining(", ")); | |
System.out.println(s); | |
// "one, two , three" | |
// name elements does not get trimmed, so, need custom. | |
// Let's see how we can get there with the custom collector collect(supplier,accumulator,multiplier) |
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
// Just a little indirection to render a template using handlebars. | |
// This simple indirection allows much flexibility later one, | |
// when using pre-compiling or other templating engine are needed. | |
Handlebars.templates = Handlebars.templates || {}; | |
function render(templateName,data){ | |
var tmpl = Handlebars.templates[templateName]; | |
if (!tmpl){ | |
tmpl = Handlebars.compile($("#" + templateName).html()); | |
Handlebars.templates[templateName] = tmpl; | |
} |