GithubHelp home page GithubHelp logo

penock / defnotdatatools Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 13 KB

Definitely Not Data Tools are rough but sometimes-nifty Python data (and other) utilities. Name is a play on my music persona, https://facebook.com/defnotdrphil ... in alpha, not supported, but feel free to ask me about anything: contact me via penock.com or enockphd.com.

Jupyter Notebook 15.76% Python 84.24%

defnotdatatools's Introduction

defnotdatatools package

Definitely Not Data Tools are rough but sometimes-nifty Python data (and other) utilities. The name is a play on my music persona, https://facebook.com/defnotdrphil

This package is in alpha stage, thus not supported, and all aspects of it could change. But feel free to ask me about anything here--contact me via https://penock.com or https://linkedin.com/in/enockphd

How to import into your Python code

    import sys
    import os
    PATH_DNDT_PARENT = r'/XXX_THEPARENTDIR_XXX'  # must be parent dir of defnotdatatools
    if PATH_DNDT_PARENT not in sys.path:
        sys.path.append(PATH_DNDT_PARENT)
    from defnotdatatools import iact, misc, missing, timing  # just include the ones you need

We avoid doing import * for now because it's severely frowned-upon by Python community. We may figure out some shortcuts system involving an import * to provide easy access to the most frequently used parts of defnotdatatools. (When we do this, note PEP8's advice, "Modules that are designed for use via from M import * should use the all mechanism to prevent exporting globals, or use the older convention of prefixing such globals with an underscore".)

How to import in the special case when you're modifying the defnotdatatools package

Note: IF you're in the process of modifying defnotdatatools package code while using it in IPython, you'll need this or similar reload code, so your modifications get reloaded. (Beware, as you could get confusing errors if defnotdatatools gets partially but not fully updated.)

    # Alternate import for when you're in Jupyter and are modifying defnotdatatools code
    import sys
    import os
    import importlib
    PATH_DNDT_PARENT = r'/XXX_THEPARENTDIR_XXX'  # must be parent dir of defnotdatatools
    if PATH_DNDT_PARENT not in sys.path:
        sys.path.append(PATH_DNDT_PARENT)
    for module_name in ['iact', 'misc', 'missing', 'timing']:
        try:
            globals()[module_name] = importlib.reload(globals()[module_name])
        except KeyError:
            globals()[module_name] = importlib.import_module('defnotdatatools.' + module_name)

defnotdatatools's People

Contributors

penock avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.