qo


Nameqo JSON
Version 0.0.19 PyPI version JSON
download
home_pagehttps://github.com/otosense/qo
SummaryQuick access to code favorites
upload_time2024-12-10 12:04:57
maintainerNone
docs_urlNone
authorOtoSense
requires_pythonNone
licensemit
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# qo

Quick access to code (personalized/collaborative) favorites.

We all have our go-to utils and awesome tools. 
Some of us are annoyed at having to type long dotpaths to the object we want to import.
Some of us probably forget where that particular object is in the first place.

This is to mitigate that. 

Instead do this:

```python
from qo.my_medley import that_object
```

Also have several `my_medley` sets of favorites, since what you'll need depends on the context.

**Word of advice: This tool is meant for the quick-and-dirty development context**

Don't use this for production or any long-term code. It's meant for pulling things together quickly. Once the code matures, you should import "normally".


# Usage

See what modules are available to import

```python
>>> from qo import source_module_names
>>> source_module_names
['tw', 'ca']
```

See what that module is about (if the author cared to say)

```python
>>> from qo import tw
>>> print(tw.__doc__)

A medley of my most frequently used tools.
```

Import it (as a module object)
```python
from qo import tw
# or from qo import tw as my_own_name
```

Inject the module's contents in your current namespace (if you're that type)

```python
from qo.tw import *
```

Inject everything there is in your namespace (but expect unpredictable name collisions)
```python
from qo import *
```



# Inspiration

When I have to do this:

```python
from sklearn.linear_model import Ridge
from sklearn.metrics import confusion_matrix
from sklearn.linear_model import LinearRegression
from sklearn.ensemble import AdaBoostClassifier
from sklearn.ensemble import RandomForestClassifier
from sklearn.svm import SVR
from sklearn.ensemble import RandomForestRegressor
from sklearn.linear_model import LogisticRegression
from sklearn.tree import DecisionTreeRegressor
from sklearn.ensemble import AdaBoostRegressor
from sklearn.neural_network import MLPRegressor
from sklearn.ensemble import GradientBoostingRegressor
from sklearn.neighbors import KNeighborsRegressor
from sklearn.ensemble import StackingRegressor
from sklearn.linear_model import RidgeCV, LassoCV
from sklearn.preprocessing import StandardScaler
```

I go 🤮.

I can never remember what is where. 
Some packages (like `numpy`) percolate the best-of up to the root so that 
these objects can be imported from there. Others (like `sklearn`) don't. 
How do we solve this for ourselves -- and while we're at it, 
handle multiple packages from a same place (`qo`)?

When in fast mode, these kinds of things can really slow one down.
Irrelevant details are detrimental to thinking. 
Where an object is irrelevant when you're modeling. 

I thought this might be more appropriate:

```python
from qo import (
    Ridge, confusion_matrix, LinearRegression, AdaBoostClassifier, RandomForestClassifier,
    SVR, RandomForestRegressor, LogisticRegression, DecisionTreeRegressor, AdaBoostRegressor,
    MLPRegressor, GradientBoostingRegressor, KNeighborsRegressor, StackingRegressor,
    RidgeCV, LassoCV, StandardScaler
)
```

So I did it.



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/otosense/qo",
    "name": "qo",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "OtoSense",
    "author_email": "thorwhalen1@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/ea/3c/9a9ba1cb4ec4c80b844d10370effc89ccaa5ea8a313ba3098856e4d88ada/qo-0.0.19.tar.gz",
    "platform": "any",
    "description": "\n# qo\n\nQuick access to code (personalized/collaborative) favorites.\n\nWe all have our go-to utils and awesome tools. \nSome of us are annoyed at having to type long dotpaths to the object we want to import.\nSome of us probably forget where that particular object is in the first place.\n\nThis is to mitigate that. \n\nInstead do this:\n\n```python\nfrom qo.my_medley import that_object\n```\n\nAlso have several `my_medley` sets of favorites, since what you'll need depends on the context.\n\n**Word of advice: This tool is meant for the quick-and-dirty development context**\n\nDon't use this for production or any long-term code. It's meant for pulling things together quickly. Once the code matures, you should import \"normally\".\n\n\n# Usage\n\nSee what modules are available to import\n\n```python\n>>> from qo import source_module_names\n>>> source_module_names\n['tw', 'ca']\n```\n\nSee what that module is about (if the author cared to say)\n\n```python\n>>> from qo import tw\n>>> print(tw.__doc__)\n\nA medley of my most frequently used tools.\n```\n\nImport it (as a module object)\n```python\nfrom qo import tw\n# or from qo import tw as my_own_name\n```\n\nInject the module's contents in your current namespace (if you're that type)\n\n```python\nfrom qo.tw import *\n```\n\nInject everything there is in your namespace (but expect unpredictable name collisions)\n```python\nfrom qo import *\n```\n\n\n\n# Inspiration\n\nWhen I have to do this:\n\n```python\nfrom sklearn.linear_model import Ridge\nfrom sklearn.metrics import confusion_matrix\nfrom sklearn.linear_model import LinearRegression\nfrom sklearn.ensemble import AdaBoostClassifier\nfrom sklearn.ensemble import RandomForestClassifier\nfrom sklearn.svm import SVR\nfrom sklearn.ensemble import RandomForestRegressor\nfrom sklearn.linear_model import LogisticRegression\nfrom sklearn.tree import DecisionTreeRegressor\nfrom sklearn.ensemble import AdaBoostRegressor\nfrom sklearn.neural_network import MLPRegressor\nfrom sklearn.ensemble import GradientBoostingRegressor\nfrom sklearn.neighbors import KNeighborsRegressor\nfrom sklearn.ensemble import StackingRegressor\nfrom sklearn.linear_model import RidgeCV, LassoCV\nfrom sklearn.preprocessing import StandardScaler\n```\n\nI go \ud83e\udd2e.\n\nI can never remember what is where. \nSome packages (like `numpy`) percolate the best-of up to the root so that \nthese objects can be imported from there. Others (like `sklearn`) don't. \nHow do we solve this for ourselves -- and while we're at it, \nhandle multiple packages from a same place (`qo`)?\n\nWhen in fast mode, these kinds of things can really slow one down.\nIrrelevant details are detrimental to thinking. \nWhere an object is irrelevant when you're modeling. \n\nI thought this might be more appropriate:\n\n```python\nfrom qo import (\n    Ridge, confusion_matrix, LinearRegression, AdaBoostClassifier, RandomForestClassifier,\n    SVR, RandomForestRegressor, LogisticRegression, DecisionTreeRegressor, AdaBoostRegressor,\n    MLPRegressor, GradientBoostingRegressor, KNeighborsRegressor, StackingRegressor,\n    RidgeCV, LassoCV, StandardScaler\n)\n```\n\nSo I did it.\n\n\n",
    "bugtrack_url": null,
    "license": "mit",
    "summary": "Quick access to code favorites",
    "version": "0.0.19",
    "project_urls": {
        "Homepage": "https://github.com/otosense/qo"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "de92061c3f935cb2f6c3dd539847249d03b34b0a285d215b25a1c54a2fdd0fcc",
                "md5": "6194d96c6533cf826d88fc6ddd4ff82b",
                "sha256": "82f78fb9be48583becb8ca3c1dc1080416d805517f196f57b1411a0a25ce6fa5"
            },
            "downloads": -1,
            "filename": "qo-0.0.19-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6194d96c6533cf826d88fc6ddd4ff82b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 12739,
            "upload_time": "2024-12-10T12:04:53",
            "upload_time_iso_8601": "2024-12-10T12:04:53.787702Z",
            "url": "https://files.pythonhosted.org/packages/de/92/061c3f935cb2f6c3dd539847249d03b34b0a285d215b25a1c54a2fdd0fcc/qo-0.0.19-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ea3c9a9ba1cb4ec4c80b844d10370effc89ccaa5ea8a313ba3098856e4d88ada",
                "md5": "7c06fa798074cbe142471ca9a6234475",
                "sha256": "bcf2c6332b0449bf062b8f6e042cbc28609a45d43e927e018342d4a8f355a2d7"
            },
            "downloads": -1,
            "filename": "qo-0.0.19.tar.gz",
            "has_sig": false,
            "md5_digest": "7c06fa798074cbe142471ca9a6234475",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 13034,
            "upload_time": "2024-12-10T12:04:57",
            "upload_time_iso_8601": "2024-12-10T12:04:57.289069Z",
            "url": "https://files.pythonhosted.org/packages/ea/3c/9a9ba1cb4ec4c80b844d10370effc89ccaa5ea8a313ba3098856e4d88ada/qo-0.0.19.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-10 12:04:57",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "otosense",
    "github_project": "qo",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "qo"
}
        
Elapsed time: 0.39580s