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
| var express = require('express'); | |
| var app = express(); | |
| app.use(express.static('public')); | |
| var server = app.listen(3000, function () { | |
| var host = server.address().address; | |
| var port = server.address().port; | |
| console.log('Example app listening at http://%s:%s', host, port); |
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
| //log alias for .qunit namespace | |
| INFO: (value`.)[`INFO]; |
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
| { | |
| "cmd": ["/usr/local/bin/q32", "test/$file_name"], | |
| "file_regex": "^(...*?):([0-9]*):?([0-9]*)", | |
| "working_dir": "${file_path}/..", | |
| "selector": "source.q", | |
| "env": | |
| { | |
| "QPREFIX":"/usr/local", | |
| "QHOME":"/usr/local/lib/q", | |
| "QLIB":"/Users/komsit/lib/q", |
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
| from IPython.core.magic import (register_cell_magic) | |
| from qpython import qconnection | |
| @register_cell_magic | |
| def q(con, cell=None): | |
| """ | |
| execute q statements in jupyter cell. Required qpython https://github.com/exxeleron/qPython | |
| :param con: connection string (default 'localhost:5555') | |
| :type con: str |
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
| library(devtools) | |
| install_local('/workspace/github/rzmq') | |
| install_github('IRkernel/repr') | |
| install_github("IRkernel/IRdisplay") | |
| install_github("IRkernel/IRkernel") | |
| IRkernel::installspec() | |
| system.file("kernelspec", package="IRkernel") | |
| > system.file("kernelspec", package="IRkernel") |
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
| chrome: "/Applications/Google\\ Chrome.app/Contents/MacOS/Google\\ Chrome " | |
| .nv.t1: {.j.j {{`key`values!(y;`x`y xcol (x,'y)#z)}[;;x]/:[c[0];1_c:cols x]} x} | |
| .chart.libpath: "/" sv (getenv `QHOME;"ext";"chart") | |
| .chart.template: {hsym `$"/" sv (.chart.libpath;"template";string ` sv (x;`html))} | |
| .chart.tempfile: {hsym `$"/" sv (.chart.libpath;"tmp";string ` sv (`$-3_(string .z.Z) except ".:";`html))} | |
| plot:{[template; data] | |
| lines: read0 .chart.template template; |
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
| //run this on q session in a new server | |
| h: hopen`$":192.241.231.75:5012::"; | |
| h ({tables `.}; ()); | |
| sel: {[t; d] select from t where date=d}; | |
| getdata: {[src; dst; query; transform; d] dst set transform delete date from h (query; src; d)}; | |
| write: {[dst; d] .Q.dpft[`:/apps/bnb/data; d; `id; dst]}; |
NewerOlder