Giter Club home page Giter Club logo

cookbook's People

Contributors

5jt avatar charlieskelton-kx avatar jhanna-kx avatar josiemd avatar kxcontrib avatar sshanks-kx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cookbook's Issues

Generating tzinfo is flawed for historic offset changes

The Java code here: https://code.kx.com/q/kb/timezones/ is flawed when it comes to historical offset changes.

The code uses TimeZone.getTimeZone("...").getRawOffset(), which as the JavaDoc states, only works for 'now':
image

This issue is seen when generating tzinfo for Europe/Istanbul - it returns +3h perpetually even though this should only be the case in more recent years (Oct 2018+); in older years it should still alternate between +2h and +3h.

image

Using ZonedDateTime.of(year, month, day, hour, min, sec, nano, ZoneId.of("...")).getOffset() accurately returns historic offsets. It is not clear to me why storing DST as a separate offset was required in the first place.

        System.out.println("Europe/Istanbul 2000.01.01 offset:");
        ZonedDateTime zdtOne = ZonedDateTime.of(2000,1,1,9,15,0,0, ZoneId.of("Europe/Istanbul"));
        System.out.println(zdtOne.getOffset()); // +02:00
        System.out.println("Europe/Istanbul 2000.06.01 offset:");
        ZonedDateTime zdtTwo = ZonedDateTime.of(2000,6,1,9,15,0,0, ZoneId.of("Europe/Istanbul"));
        System.out.println(zdtTwo.getOffset()); // +03:00

Skipping records while reading large CSVs

When reading second+ chunks from same file the the script is treating data record as header and thus skips a record.

shouldn't this portion :

// check if we have already read some data from this file
// if this is the first time we've seen it, then the first row
// contains the header information, so we want to load it accounting for that
// in both cases we want to return a table with the same column names
data:$[filename in filesread;
[flip columnames!("PSFI S";enlist",")0:rawdata;
filesread,::filename];
columnnames xcol ("PSFI S";enlist",")0:rawdata];

be:

// check if we have already read some data from this file
// if this is the first time we've seen it, then the first row
// contains the header information, so we want to load it accounting for that
// in both cases we want to return a table with the same column names
data:$[filename in filesread;
[flip columnnames!("PSFI S";enlist",")0:rawdata];
[filesread,::filename;
columnnames xcol ("PSFI S";enlist",")0:rawdata]];

'length error in the tickerplant

Hey all,

When I start up the tick.q with sym.q and feed.q with files provided as follows:

q tick.q sym -p 5010
q feed.q

The tickerplant process prints 'length error on every update, which occurs when incorrect number of elements is passed: https://code.kx.com/wiki/Errors

I suspect that this happens when the feed process calls .u.upd

Are there any suggestions as to how to remove this problem?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.