jhadida / deck Goto Github PK
View Code? Open in Web Editor NEWA general-purpose Matlab (2015+) toolbox that doesn't get in your way.
License: GNU Affero General Public License v3.0
A general-purpose Matlab (2015+) toolbox that doesn't get in your way.
License: GNU Affero General Public License v3.0
It might be better to move the folder of templates to the install location along with the Python scripts.
This would allow the user to define their own templates in a more sensible place than +dk/+mapred/templates
.
Not sure about this. But if going through with it, we need to keep track of where the stuff is installed in order to initialise painlessly, so maybe a .bindir
file created and ignored in the mapred folder.
Check if there is an issue with spaces in the paths provided to obj.Compiler
. If so, find the correct way to escape them (ie either quote or escape spaces themselves).
Let mapfun
behave as arrayfun
on all non-cell inputs, including scalar structs.
Bring dk.struct.kvfun
to first level in order to get a map function on struct or struct-arrays.
+verb/
submodule, in favour of using the dk.logger.Logger
implementation.dk.logger.level
to simplify level control.Logger:setFile
, more explicit than open
.dk.logger.test
to be called by assert/reject
in order to redirect assertions to different channels.callerInfo
from Logger
, and move it to separate dk.logger.chan
instead (taking stack depth argument), which returns a struct with channel ID and caller string.Logger:write
to take a channel as first input, and exclude empty caller from log line.dk.log
, taking a channel as first input (or creating a default one if formatted message is passed directly), with a persistent instance of the default logger.funciton log(varargin)
persistent..
args = varargin;
if nargin > 1
v = args{1};
if isstruct(v)
chan = v;
args = varargin(2:end);
elseif ismember(v,{'w','e','...'})
chan = dk.logger.chan( v, 4 );
args = varargin(2:end);
else
chan = dk.logger.chan( 'i', 4 );
end
end
L.write( chan, args{:} );
end
dk.warn/info
to call dk.log
..if
methods from Logger
, in favour of directed assertions.dk.wassert/wreject
with calls to assert
with specified channels.Refactor struct
submodule to support subfield assignment by default (i.e. using dk.str.to_substruct
).
Is this code available under an open source license? I'm in the market for a new JSON parser...
I've found the following causes an error:
test = struct('value', {{1 2; 3 4}});
g = dk.json.encode(test);
Error using dk.json.encode>write_struct (line 46)
Assertion failed.
Error in dk.json.encode>write_array (line 100)
s = write_struct(x,w,w.shapepfx);
Error in dk.json.encode>write_value (line 16)
s=write_array(x,w,t);
Error in dk.json.encode>write_struct (line 57)
s{i} = [w.ind w.enc.char([p f]) ':' w.sp write_value(x.(f),w)];
Error in dk.json.encode>write_scalar (line 128)
s=write_struct(x,w);
Error in dk.json.encode>write_value (line 29)
s=write_scalar(x,w,t);
Error in dk.json.encode (line 4)
txt = write_value(dat,fmt);
No issues with column or row cell arrays.
test = struct('value', {{1 2}});
g = dk.json.encode(test);
test = struct('value', {{1; 2}});
g = dk.json.encode(test);
Edit:
The issue is coming from
x = struct( 'size', dim, 'stride', str, 'value', reshape(x,1,numel(x)) );
In MATLAB struct('value', {1 2 3 4})
will create an array of structures (1x4 in this case). To get a structure containing a cell array you would need to double up the {}, so struct('value', {{1 2 3 4}})
.
A possible solution could be:
if strcmp(name, 'cell')
x = struct( 'size', dim, 'stride', str, 'value', {reshape(x,1,numel(x))} );
else
x = struct( 'size', dim, 'stride', str, 'value', reshape(x,1,numel(x)) );
end
Description
From Matlab version 2016a, the named argument npoints
has changed to NumPoints
without backwards compatibility.
To-do
Create a backwards-compatible function in dk.math
and replace all occurences throughout the package.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.