Giter Site home page Giter Site logo

Comments (9)

rasbt avatar rasbt commented on July 23, 2024

Sounds like a good idea, I am actually using this format everywhere but here (for whatever reason). A PR would be very welcome!

from watermark.

ianozsvald avatar ianozsvald commented on July 23, 2024

So one totally quick hack is to replace your existing default strftime with an ISO-8601 alternative:

        if not any(vars(args).values()):
            self.out += strftime("%Y-%m-%dT%H:%M:%S")
            #self.out += strftime('%m/%d/%Y %H:%M:%S')

and then by way of a very quick test I get:

$ python -c "import watermark; watermark.WaterMark().watermark('')"
2016-01-29T17:52:54

CPython 3.4.4
IPython 4.0.1

compiler   : GCC 4.4.7 20120313 (Red Hat 4.4.7-1)
system     : Linux
release    : 3.16.0-38-generic
machine    : x86_64
processor  : x86_64
CPU cores  : 8
interpreter: 64bit

from watermark.

rasbt avatar rasbt commented on July 23, 2024

Looks good to me. Personally, I don't like the "T" in "2016-01-29T17:52:54", but hey, let's just go with the standard here ;).

I think we could also remove

@argument('-e', '--eurodate', action='store_true', help='prints current date as DD/MM/YYYY')

then and update

@argument('-d', '--date', action='store_true', help='prints current date as MM/DD/YYYY')

Are you planning to prepare a pull request?

from watermark.

ianozsvald avatar ianozsvald commented on July 23, 2024

I'll avoid a PR if that's OK, the change is pretty minor. I hope that's OK?
I.
On 29 Jan 2016 18:08, "Sebastian Raschka" [email protected] wrote:

Looks good to me. Personally, I don't like the "T" in
"2016-01-29T17:52:54", but hey, let's just go with the standard here ;).

I think we could also remove

@argument('-e', '--eurodate', action='store_true', help='prints current date as DD/MM/YYYY')

then and update

@argument('-d', '--date', action='store_true', help='prints current date as MM/DD/YYYY')

Are you planning to prepare a pull request?


Reply to this email directly or view it on GitHub
#9 (comment).

from watermark.

rasbt avatar rasbt commented on July 23, 2024

Sure, that's absolutely fine! I'll take a look at it :).

from watermark.

rasbt avatar rasbt commented on July 23, 2024

I just pushed the update. Thanks again for the suggestion!

from watermark.

ianozsvald avatar ianozsvald commented on July 23, 2024

Glad it was a useful question :-)

from watermark.

ianozsvald avatar ianozsvald commented on July 23, 2024

Just to note - I've added a link to my data science notes, cheers! https://github.com/ianozsvald/data_science_delivered

from watermark.

rasbt avatar rasbt commented on July 23, 2024

Thanks, Ian. That's a pretty cool outline; it transfers nicely into a project planning todo-checklist ;)

from watermark.

Related Issues (20)

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.