Simple Tic-Tac-Toe Protocol
ST3P is a text-based protocol facilitating communication between Tic-Tac-Toe engines and UI/coordinator processes.
The protocol operates over standard input and output, supporting standalone
import spacy | |
import coreferee | |
def flatten(list_of_lists): | |
flat_list = []; | |
for item in list_of_lists: | |
if type(item) == list: | |
for sub_item in item: | |
flat_list.append(sub_item) | |
else: |
;; Big thanks to Christophe Grand - https://groups.google.com/d/msg/clojure/L1GiqSyQVVg/m-WJogaqU8sJ | |
(defn scaffold [iface] | |
(doseq [[iface methods] (->> iface .getMethods | |
(map #(vector (.getName (.getDeclaringClass %)) | |
(symbol (.getName %)) | |
(count (.getParameterTypes %)))) | |
(group-by first))] | |
(println (str " " iface)) | |
(doseq [[_ name argcount] methods] | |
(println |
# from target repo clone directory | |
# make sure you're in sync with origin | |
git checkout master | |
git fetch --all | |
git pull origin master | |
# fetch PR to FETCH_HEAD | |
git fetch origin pull/<PR#>/head | |
# double check the changes | |
git diff master FETCH_HEAD | |
# merge to master and push to origin (github) |
{ | |
"scripts": { | |
"test": "cross-env TS_NODE_COMPILER_OPTIONS='{ \"module\": \"commonjs\" }' mocha -r ts-node/register -r ignore-styles -r jsdom-global/register src/**/*.spec.ts" | |
} | |
} |
$ npm install cross-env --save-dev |
{ | |
"compilerOptions": { | |
"outDir": "./dist/", | |
"target": "es5", | |
"module": "esnext", | |
"moduleResolution": "node", | |
"sourceMap": true, | |
"experimentalDecorators": true, | |
"lib": [ "dom", "es6", "es5" ] | |
}, |
{ | |
"scripts": { | |
"test": "mocha -r ts-node/register -r ignore-styles -r jsdom-global/register src/**/*.spec.ts" | |
} | |
} |
$ npm install jsdom jsdom-global --save-dev |