Skip to main content

MyBA in Python

Project description

BA_PY: Optimize Your Workflow with Python!

Downloads Downloads Downloads

repo size code size GitHub release (latest by date) GitHub Commit Activity GitHub last commit

PyPI Status PyPI python versions

GitHub language count docs license codeium

windows linux

mbapy is a Python package that includes a collection of useful Python scripts as sub-modules, and it's goal is Basic for All in Python.
mbapy primarily focus on data works, including data-retrieval, data-management, data-visualization, data-analysis and data-computation. It is built for both python-users and command-line-users.

Get start

install

Now, mbapy only support pypi install:

pip install mbapy

mbapy is a multi-funtional package, and it does not require every third-party packages to make every sub-module work. However, it provides some requriements option to install more specified requirements to make some sub-modules work:

  1. bio: some packages for biology(sci).
    install as pip install mbapy[bio]
  2. game: some packages for game(pygame).
    install as pip install mbapy[game]
  3. full: full requirements to make almost every sub-module in mbapy work(except dl_torch).
    install as pip install mbapy[full]

If you find the latest release version has some problems, you can try install the up-to-date version on github or gitee:

pip install git+https://github.com/BHM-Bob/BA_PY.git
pip install git+https://gitee.com/BHM-Bob/BA_PY.git

docs

The documentation for mbapy can be found on read the docs or just in the docs folder.

web sites

Contents

mbapy python package

__version__

some version info

base

some utils for easier coding

file

image

imgae utils, including reading, saving and process a image into a feature tensor via pytorch.

video

video utils, including extract frames or unique frames from a video.

plot

pandas.dataFrame utils for plot and some simple plot based on plt

web

utils for web-crawler

request

get a web hyml page or a selenium browser warpper for easier usage.

parse

utils for parsing html

task

small task manager

spider

a light-weight web spider architecture

stats

cluster

BAKmeans, KOptim, KBayesian from KMeans, and a func for many cluster

df

pandas.dataFrame utils for stats

reg

regression

test

some test func(using scipy and mostly give a support for mbapy-style data input)

dl-torch

pytorch utils for deeplearning

bb

basic blocks : tiny network structures

data

utils for dataset loading

loss

some loss function

m

model : deeplearning model constructed with basic blocks

utils

deeplearning training utils

optim

learning rate scheduler

paper

sci-paper utils, contains paper searching, downloading and parsing

paper_search

search papers via pubmed, baidu xueshu, wos

paper_download

download papers via scihub

paper_parse

parse paper from a pdf file into a dict of each sections

bio

peptide

class and funcs to calcu peptide MW, mutations

high_level

some high-level utils for bio

sci_instrument

hplc

HPLC instrument data processing and visualization

mass

mass spectrometry instrument data processing and visualization

scripts

some useful scripts for command user
launch by python -m mbapy.scripts.XXX or mbapy-cli XXX.

examples

web/crawler

  1. chaoxin ppt multi threads downloader (jpg->pdf)
  2. wujin search http://www.basechem.org
  3. chemSub search http://chemsub.online.fr
  4. cnipa https://pss-system.cponline.cnipa.gov.cn/seniorSearch

Additional Info

Requirements

  1. mbapy requires python 3.8~3.11 because of the use of type hint and require matplotlib>=3.7.5, and the developer do not test it on other python version.
  2. mbapy only requires a part of third-party packages in a specific version. This is because the developer do not want to make a big change during the installation. Bellow are the specific requirements:
  • matplotlib>=3.7.5: HPLC and Mass data visualization need set legend draggable, this is only supported in 3.7+
  • seaborn>=0.13.0: plot_utils.bar_utils.plot_bar need set seaborn stripplot native_scale, this is only supported in 0.13+
  • nicegui[highcharts]: scripts/hplc: explore-hplc need a highcharts as interactive plot for manual peaking.
  • torch any: though dl_torch is important for mbapy, but the developer kowns torch is a big package, and do not has a specific function requirement.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mbapy-0.10.1.tar.gz (368.3 kB view details)

Uploaded Source

File details

Details for the file mbapy-0.10.1.tar.gz.

File metadata

  • Download URL: mbapy-0.10.1.tar.gz
  • Upload date:
  • Size: 368.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for mbapy-0.10.1.tar.gz
Algorithm Hash digest
SHA256 2deb413ff0df06f4d779b3001bfc37d2e76eb84cd63f63a8ca0bb927db508a96
MD5 5842223693f4a1c8c7879cc9811ce46b
BLAKE2b-256 3b5aaa847d74c99363bbdbed72cbb9c9cecfecd4cbfe2c84d733ec39f7648b15

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page