semvec/pypi-packages huggingface dataset:
pylabutils 1.1.0
Some utils for working with python in a simple lab-like environment
License: MIT
Requires Python: ~=3.7
Keywords: laboratory utils tools

# pylabutils

`pylabutils` is a small, experimental python package that aims to provide some
aid in the making of simple data analysis reports in a lighter, more ergonomic
and more streamlined manner.

It currently offers 5 main methods (and an additional utility):

+ `fit` : the process of defining a function and setting up the optimization
  method all in one line, with added functionalities for immediate graphical
  representation.
+ `read_data` : an easy way to read your data from most table-like files
  and have it stored in a convenient `pandas.DataFrame`.
+ `tex_table` : prints your data into a fancy, common LaTeX table, with an
  added bit of customization included.
+ `multisort` : allows you to sort all of your data based on any of the
  variables stored, in case they don't all follow a monotonic progression.
+ `wdir` : a manager that yields a path, useful for when your data is stored
  externally.
+ `Interval` : a small class that lets you create *Real* number intervals,
  letting you check belongings using the `in` operator.

They all do have detailed `__doc__` attributes that explain all of their
arguments and keyword arguments, which you can view, and I encourage so,
by using either `help(<method>)` or `<method>.__doc__`.

There are, in addition, some "private" methods that can give some
functionalities that are included in some of the "main" methods, but these
are not really intended for active use and do not have a detailed description
accompanying them.
xtip 0.2.0
Run commands on selected text quickly
License: MIT
Requires Python: >=3.6,<4.0

# Xtip

A semi-clone of tanin47's [tip](https://github.com/tanin47/tip) but for X11 (i.e. Linux).

Alpha stage, anything may change at any time.

Customised in python (but it's very easy to run shell commands from python if
you prefer another language).


## Installation and setup

* Install the core dependencies: `zenity`, `dmenu`, `xclip`
  * e.g. on Debian-based OS: `sudo apt install zenity xclip suckless-tools`
* Install xtip from pypi, e.g. `pip3 install xtip`
* Bind a hotkey to run the `xtip` command using your preferred method.
  * I use [sxhkd](https://github.com/baskerville/sxhkd), but I think most
  desktop environments have a hotkey binding system.
* Optionally install dependencies for any individual commands that you want to use:
  * GoogleTranslate requires the python googtrans library
  * Emacsclient requires emacs (obviously)


## Writing your own commands


For most customisation of commands you should probably just write your own
(because it only takes a few lines of python). You can write new commands in
`~/.config/xtip/custom_commands.py`.

To do so: write a new class derived from `Command` and decorate it with
`@command`, for example:


```
from typing import Optional
from subprocess import run

from xtip.commands import Command, command


@command
class Emacsclient(Command):
    unique_name = "Open in emacsclient"

    def run(self, text: str) -> Optional[str]:
        # TODO(david): Figure out a way to get the absolute path... maybe by
        # guessing from a few possible prefixes?
        run(["emacsclient", "-c", "-n", text])

        # Return text from here to output it to the screen and clipboard
        return None

    def accepts(self, text: str) -> bool:
        # TODO: only accept things that look like valid paths?
        Return True
```

TODO: Do we need both inheritence and a decorator? Probably not!


## TODO

* Write some tests
* CI builds
* Try to display useful outputs in dmenu completion (e.g. converted datetimes)
* Something better than dmenu? Better mouse support, popup at cursor.
* Figure out how to construct an absolute path from a relative one