Code Monkey home page Code Monkey logo

aix's Introduction

aix's People

Contributors

thorwhalen avatar

Stargazers

 avatar

Watchers

 avatar

aix's Issues

Make `aix` configurable

The desired effect is that of:

from aix.pd import *
from aix.np import *
from aix.sk import *

from aix import pd
from aix import np
from aix import sk

but with dynamic control.
That is, this should be configurable from a local file that contains the list of packages (here pandas, numpy and scikit-learn) and particulars -- e.g. precedence order, import name, short name (e.g. pd), etc.

Recursive subpackage/submodule walk

See aix/sk.py. It uses guide.tools.submodule_callables, but that function doesn't catch everything (seems to fail on __all__ definitions.

"""sklearn (scikit-learn)"""
from contextlib import suppress
from guide.tools import submodule_callables

import sklearn

for _ in list(dict.fromkeys(submodule_callables(sklearn))):
    if hasattr(_, '__name__'):
        locals()[_.__name__] = _

for _subpackage_name in sklearn.__all__:
    with suppress(ModuleNotFoundError):
        _subpackage = __import__(f"sklearn.{_subpackage_name}")
        for _ in submodule_callables(sklearn):
            if hasattr(_, '__name__'):
                locals()[_.__name__] = _

See: https://github.com/thorwhalen/guide/blob/master/guide/tools.py

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.