Saravanan666/pypi-org huggingface dataset:
Package: metriql-metabase
Metriql Metabase IntegrationSynchronize Metabase datasets from Metriql datasets. The idea is to leverage Metriql datasets in your Metabase workflow without any additional modeling in Metabase.UsageThe library is available in PyPI so you can install it via pip as follows:pip install metriql-metabaseThe library expectsstdinfor the Metriql metadata and interacts with Metabase via its API. Here is an example:curl http://metriql-server.com/api/v0/metadata | metriql-metabase --metriql-url http://metriql-server.com --metabase-username USERNAME --metabase-password PASSWORD --metabase-database METABASE_DATABASE_NAME sync-databaseYou can use--fileargument instead of reading the metadata fromstdinas an alternative.Available commands arelist-databases,sync-database.FAQDo you support Metabase Cloud?Yes!How is this related todbt-metabase?While this metriql-metabase is heavily influenced by thedbt-metabasecodebase,
it integrates Metabase with Metriql, not directly to dbt. While you need to maintain Metriql as a separate service, here are advantages of Metriql over dbt-metabase:You can define the metrics as native SQLYou can leverageAggregatesto speed up your queriesSync the datasets intovarious data tools, not just MetabaseNativeMQLexperience when running ad-hoc queries on data.
Package: metriql-superset
Metriql Superset IntegrationSynchronize Superset datasets from Metriql datasets. The idea is to leverage Metriql datasets in your Superset workflow without any additional modeling in Superset.UsageThe library is available in PyPI so you can install it via pip as follows:pip install metriql-supersetThe library expectsstdinfor the metriql metadata and interacts with Superset via session tokens. Here is an example:curl http://metriql-server.com/api/v0/metadata | metriql-superset --metriql-url http://metriql-server.com --superset-username USERNAME --superset-password PASSWORD sync-databaseYou can use--fileargument instead of reading the metadata fromstdinas an alternative.Available commands arecreate-database,list-databases,sync-database.FAQWhy don't you use Superset API?While Superset provides an API, it doesn't let updating / creating datasets and databases. Therefore, we create session token using internal APIs and interact with the internal APIs.Do you support Preset Cloud?Yes! Preset offersan APIin their Enterprise Plan and you can use the API tokens to be able to synchronize the metrics of Superset deployments in your Preset account. Thetokenin the picture below should be passed as--superset-usernameand the value ofsecretshould be passed as--superset-password:Why do I need to run a separete service to use metriql-superset?Metriql requires you to run a separate service to be able to access the data in your data warehouse. In some cases, it might be overhead and we would love to get contributions from the community to make metriql-superset compatible with dbt metrics once they're released. However; here are the benefits of running Metriql as a separate service:Superset doesn't support JOIN relations in query builder since Metriql exposes all the fields including the ones that come from therelationsas database columns, you will be able to unlock that feature in Superset.Metriql hasAggregateswhich speeds up OLAP queries by pre-aggregating the fact tables. It re-writes the queries Superset runs on Metriql before executing them in your data warehouse.Metriql has an advanced semantic layer that lets you createfiltered measures,non-additiveandwindowmeasures which are not available in Superset. Additionally, you can useJinja expressionsin your metrics/dimensions.Superset has timeframes to some extent but Metriql offers a set of differenttimeframesthat lets you analyze the data in different granularities.It's not possible to access the metrics created in Superset from a different BI tool / SQL client but Metriql lets you access your metrics from differentdata tools.
Package: metriql-tableau
metriql Tableau IntegrationGenerates Tableau Data Source (TDS) files from your metriql datasets.
The idea is to leverage metriql datasets in your Tableau workflow without any additional modeling in Tableau.UsageThe library is available in PyPI so you can install it via pip as follows:pip install metriql-tableauThe library expectsstdinfor the metriql metadata and outputs a TDS file tostdout. Here is an example:curl http://metriql-server.com/api/v0/metadata | metriql-tableau --metriql-url http://metriql-server.com --dataset your_dataset create-tds > your_dataset.tdsYou can use--fileargument instead of reading the metadata fromstdinas an alternative.
You can use--outargument to create a file instead of printing the TDS file tostdoutas an alternative.The only command iscreate-tdsfor now.How does it work?The generated file includes your metriql URL and uses Presto interface which is natively supported in Tableau. In order to use Tableau integration, you need to enable JDBC in your metriql server.
Package: metrique
MetriquePython Data Warehouse and Information Platformmetrique provides a simple python API to support
ETL workloads for extracting data from disperate sources,
iteratively, rapidly and reproducibly, with transparent,
historical object persistence and tight clientside
integration with popular python scientific computing libraries
to faciliate creation and publication of a wide variety of analysis
and reports, large and small.Backends currently supported are as follows:PostgreSQL (sqlalchemy)SQLite (sqlalchemy)MongoDB (pymongo)Author:“Chris Ward” <cward@redhat.com>Sources:https://github.com/kejbaly2/metriqueQuick Install (auto-deploy -> virtenv)The instructions given below assume fedora rpm package names:# prerequisite *os* packages
sudo yum install python python-devel python-setuptools python-pip
sudo yum install openssl git gcc gcc-c++ gcc-gfortran
sudo yum install freetype-devel libpng-devel # matplotlib deps

# optional MongoDB
sudo yum install postgresql postgresql-devel postgresql-server
# optional PostgreSQL
sudo yum install mongodb mongodb-server

# make sure our core package managers are up2date
sudo pip install -U distribute setuptools

# our installation directory should always be a py virtualenv
sudo pip install virtualenv

# get metrique sources
git clone https://github.com/kejbaly2/metrique.git
cd metrique

# deploy metrique master branch into a virtual environment,
# including dependencies.
# NOTE this can take ~5-10 minutes to compile everything from source!
./metrique.py -V ~/metrique.master deploy --all --develop

# activate the virtual environment
source ~/metrique.master/bin/activate

./metrique.py firstboot metrique

# optional: setup default postgresql environment and start
./metrique.py firstboot postgresql
# optional: edit ~/.metrique/postgresql_db/*.conf
./metrique.py postgresql start

# optional: setup default mongodb environment and start
./metrique.py firstboot mongodb
./metrique.py mongodb start

# launch ipython and start mining!
Package: metriquec
Metrique CubesAuthor:“Chris Ward” <cward@redhat.com>Sources:https://github.com/drpoovilleorg/metriqueThis repo contains default metrique cubes.At this time, there is support for exracting from the
following sources.JSONCSVPostgreSQLTEIIDGit
- commitJenkins
- buildInstallMake sure you have read the `General Install Guide <https://github.com/drpoovilleorg/metrique/tree/master/README.rst>`_.Install the followingOS stuffinstalled. The examples given
below are fedora rpm package names:%> yum install postgresql postgresql-develThen installmetriquecwith:pip install metriquecKnown IssuesNone at this time
Package: metrique-client
MetriquePython/MongoDB Information Platform and Data WarehouseMetrique help bring data into an intuitive, indexable
data object collection that supports quick snapshotting,
advanced ad-hoc querying, including (mongodb) aggregations
and mapreduce, along with python, ipython, pandas,
numpy, matplotlib, and so on, is fully integrated
with the scientific python computing stack. I hope
so anyway. :)Author:“Chris Ward” <cward@redhat.com>Sources:https://github.com/drpoovilleorg/metriqueInstallationYou must first install MongoDB. Then, to continue,
make sure it’s started.Metrique(suggested) Install virtualenv and create a new virtual
environment for metrique. Activate it.Install metrique:python-pip install metrique -r requirements.txtNoteMake sure you have gcc and python-devel libraries installedNoteIf you see ‘Connection reset by peer’ error, try option: –use-mirrorsNoteIf you see any other error, Google.You should now be ready to go.Run metrique-server-config.py if you changed any defaults.To start metrique, run:$[/metrique/server/bin] metrique-server start [2|1|0] [1|0]Where argv are debug on+/on/off and async on/off respectively.It’s suggested to run :mod:metrique-server-setup after install
as well, especially if you changed any default values of your
mongo or metrique servers, they’re hosted on a different
ip thanlocalhost.ClientIf the metrique server is running on anything other thanhttp://127.0.0.1, runmetrique-client-setup.Then,  launch a python shell. We suggest ipython notebook.As of this time, :mod:cubes can be found in global
metrique namespace or local to the running user.Default:~/.metrique/cubesTo quickly make those cubes available in sys.path:IN  [] from metrique.client.cubes import set_cube_path
IN  [] set_cube_path()  # defaults to '~/.metrique/cubes'Then, to load a cube for extraction, query or administration,
import:IN  [] from git_repo.gitrepo import Commit
IN  [] g = Commit(config_file=None, uri=None)Ping the server to ensure your connected. If all
is well, metriqe server should pong your ping!:IN  [] g.ping()
OUT [] pong!Try running an example ::mod:git_commit etl job, for example:IN  [4] g.extract("git_commit")Then, analyse away:IN  [5] q = c.query.fetch('git_commit', 'author, committer_ts')
IN  [6] q.groupby(['author']).size().plot(kind='barh')
OUT [6] <matplotlib.axes.AxesSubplot at 0x6f77ad0>
Package: metriqued
Metrique ServerAuthor:“Chris Ward” <cward@redhat.com>Sources:https://github.com/drpoovilleorg/metriqueInstallMake sure you have read the `General Install Guide <https://github.com/drpoovilleorg/metrique/tree/master/README.rst>`_.Install the followingOS stuffinstalled. The examples given
below are fedora rpm package names:yum install krb5-develMake sure you have MongoDB installed. Instructions
can be found on the web.  For Fedora, for example,
see10-gen installation instructionsA default mongodb.conf file is availablehereLaunch Mongodb.Install metriqued with pip:pip install metriquedThen, startmetriquedby running:$> metriqued startAssuming you have 2.7+, you can try running agitrepo_commitetl
job, for example, in ipython:$> ipython notebook --pylab=inline
...
>>> from metrique import pyclient
>>> m = pyclient(cube='gitrepo_commit')
>>> m.ping()
>>> m.extract(uri='https://github.com/drpoovilleorg/metrique.git')
>>> q = m.find('gitrepo_commit', 'author, committer_ts')
>>> q.groupby(['author']).size().plot(kind='barh')
    <matplotlib.axes.AxesSubplot at 0x6f77ad0>Or you can analyse data from apache’s jenkins instance (or other):$> ipython notebook --pylab=inline
...
>>> from metrique import pyclient
>>> m = pyclient(cube='jkns_build')
>>> # WARNING THIS WILL TAKE A WHILE!
>>> # Just let it run for a minute, then kill
>>> # it... as a demo.
>>> m.extract(uri='http://builds.apache.org')
>>> builds = m.find(fields='__all__', limit=100)Known IssuesNone at this time
Package: metrique-server
MetriquePython/MongoDB Information Platform and Data WarehouseMetrique help bring data into an intuitive, indexable
data object collection that supports quick snapshotting,
advanced ad-hoc querying, including (mongodb) aggregations
and mapreduce, along with python, ipython, pandas,
numpy, matplotlib, and so on, is fully integrated
with the scientific python computing stack. I hope
so anyway. :)Author:“Chris Ward” <cward@redhat.com>Sources:https://github.com/drpoovilleorg/metriqueInstallationYou must first install MongoDB. Then, to continue,
make sure it’s started.Metrique(suggested) Install virtualenv and create a new virtual
environment for metrique. Activate it.Install metrique:python-pip install metrique -r requirements.txtNoteMake sure you have gcc and python-devel libraries installedNoteIf you see ‘Connection reset by peer’ error, try option: –use-mirrorsNoteIf you see any other error, Google.You should now be ready to go.Run metrique-server-config.py if you changed any defaults.To start metrique, run:$[/metrique/server/bin] metrique-server start [2|1|0] [1|0]Where argv are debug on+/on/off and async on/off respectively.It’s suggested to run :mod:metrique-server-setup after install
as well, especially if you changed any default values of your
mongo or metrique servers, they’re hosted on a different
ip thanlocalhost.ClientIf the metrique server is running on anything other thanhttp://127.0.0.1, runmetrique-client-setup.Then,  launch a python shell. We suggest ipython notebook.As of this time, :mod:cubes can be found in global
metrique namespace or local to the running user.Default:~/.metrique/cubesTo quickly make those cubes available in sys.path:IN  [] from metrique.client.cubes import set_cube_path
IN  [] set_cube_path()  # defaults to '~/.metrique/cubes'Then, to load a cube for extraction, query or administration,
import:IN  [] from git_repo.gitrepo import Commit
IN  [] g = Commit(config_file=None, uri=None)Ping the server to ensure your connected. If all
is well, metriqe server should pong your ping!:IN  [] g.ping()
OUT [] pong!Try running an example ::mod:git_commit etl job, for example:IN  [4] g.extract("git_commit")Then, analyse away:IN  [5] q = c.query.fetch('git_commit', 'author, committer_ts')
IN  [6] q.groupby(['author']).size().plot(kind='barh')
OUT [6] <matplotlib.axes.AxesSubplot at 0x6f77ad0>
Package: metriqueu
Metrique Shared UtilitiesAuthor:“Chris Ward” <cward@redhat.com>Sources:https://github.com/drpoovilleorg/metriqueInstallMake sure you have read the `General Install Guide <https://github.com/drpoovilleorg/metrique/tree/master/README.rst>`_.Install metriqueu:pip install metriqueuKnown IssuesNone at this time
Package: metrist-agent-canmonuser
Metrist In-Process Agent for PythonMetristAgent is the agent Python plugin. It intercepts HTTP calls and sends data to
the local Metrist Monitoring AgentUsageAs early in your application's lifecycle as possible, the agent should be initalized and connected:frommetristimportMetristAgentagent=MetristAgent()agent.connect()The MetristAgent constructor can take optionalhostandportkeyword arguments
to configure the telemetry destination, otherwise it will attempt to use theMETRIST_MONITORING_AGENT_HOSTandMETRIST_MONITORING_AGENT_PORTenvironment
variables or default to'127.0.0.1'and51712.
Package: metrixpp
Metrix++Metrix++ is an extendable tool for code metrics collection and analysis.
Check projects documentation for additional information:https://metrixplusplus.github.io/Thank you for using the tool!InstallationMetrix++ is published onPyPiasmetrixppand can be installed using pip:pip install metrixppAlternatively you candownload the archivewith the latest stable version and unpack it to some folder.
The first run of the tool will trigger the installation within the folder, where it was launched.For more installation options, please, checkthis documentationIssue tracker and feedbackHave got a bug or a feature request or any feedback?Please submit a ticket.Be aware of somelimitations.Copyright and licenseMIT
Package: metro
MetroThe Metro framework for Airflow allows you to build common and well-known pipeline patterns. It comprises a number of
composable modules:Metro Core: consolidate all your metrics for a given granularity of data into a single source of truth, from which denormalized tables can be created.Metro Accumulator: implements the daily aggregation + day-over-day join pattern that lets you accumulate a metric over time.Metro Aggregator: implements the table aggregation pattern to produce cube-like tables for use in reports.
Package: metro2
Metro2Creates files in Metro 2 format for reporting to credit agenciesDependencies and InstallationMetro2 can be installed from PyPI using pip$ pip install metro2This is using the ruby library metro_2, run the following command to install this$ gem install metro2_formatUsageuse the following code to generate the report in metro2 formatfrom metro2 import Metro2

sample = Metro2(customer_account_number = '1')
sample.get_metro2_report()
Package: metrocard-topup
Metrocard-TopupTops up your Metrocard with a single scriptUsageClone the repoInstall requirements fromrequirements.txtInstallgeckodriverfrom MozillaCreate a file insidesrc/calledcredentials.py> cat src/credentials.py 

#!/usr/bin/env python3

# Metrocard credentials
# Your metrocard number in string format
metrocard_number = ""
# Your metrocard password in string format
metrocard_password = ""

# Credit card credentials
# Your credit card number in string format
credit_card_number = ""
# Your credit card name in string format
credit_card_name = ""
# Your credit card expiry month in int format
credit_card_expiry_month = 
# Your credit card expiry year in string format
credit_card_expiry_year = ""
# Your credit card cvc in string format
credit_card_cvc = ""

# Email credentials
email_username = ""
email_password = ""DisclaimerYou are responsible for keeping yourcredentials.pysafe
Package: metroem
MetroEMTrain all alignersGet startedMetroEM is based on modelhouse, artificery, and scalenet packages.
It's useful to understand these packages before proceeding.Create a modelCreate a directory, with subdirectories for each module.
It's easiest to adapt an existing model.
For example, usemodelhouseto download the following model:modelhouse load gs://corgie/models/pyramid_m4m6m9Module conventionsModule subdirectories must follow the name convention<STAGE>_mip<IN_MIP>in_<SUFFIX>such that:STAGE(int): processing order of module (lowest-to-highest, 0-indexed)IN_MIP(int): mip level of the images to be used as inputSUFFIX(str): string for description onlyEach module subdirectory must followmodelhousedirectory conventions.Create a training setTraining sets consists of an image dataset as well as a field dataset.An image dataset is a set of image pairs (source and target images),
one set of image pairs for the MIP level required as input for
each module.A field dataset is a displacement field computed by a previous module,
one field for each image in an image set.Create an image datasetImage datasets may be created from CloudVolumes.
For models with multiple modules, the image set of each module
must be aligned in physical space across the span of MIP levels.Images should be normalized (mean=0, std=1) over a larger field
of view than the model.
Seecorgiefor a method to normalize CloudVolumes.To create a dataset from a CloudVolume, usedownload_image.py.
For example,python download_image.py \
--dst_folder  ~/data \
--z_start 8175 \
--z_end 8180 \
--x_offset 200960 \
--y_offset 136448 \
--mip 3 5 \
--patch_size 1536 1536 \
--cv_path <CloudVolume path>Create a field datasetField datasets will be automatically created during the training procedure.Downloading from an existing field CloudVolumeThere may be times when a user would like to create a field dataset from
an existing field CloudVolume.
To do so, usedownload_field.py.
For example:python download_field.py \
--dst_folder  ~/data/ \ 
--z_start 8175 \       
--z_end 8180 \	
--x_offset 200960 \
--y_offset 136448 \
--src_mip 8 \
--dst_mip 5 \
--patch_size 1536 \
--suffix precomputed \
--cv_path <CloudVolume path>Once downloaded, a field dataset must be used as input when creating a new
image dataset. For example:python download_image.py \
--dst_folder  ~/data \
--z_start 8175 \
--z_end 8180 \
--x_offset 200960 \
--y_offset 136448 \
--mip 5 \
--patch_size 1536 \
--cv_path <CloudVolume path> \
--field_dset ~/data/field_0_x200960_y136448_z8175_MIP5_precomputed.h5 \Each downloaded field is adjusted by its average translation, and the
bounding box of the associated image must also be adjusted by the
translation.TrainWith a model & dataset in place, it's time to train the model withtrain.py.
For example:python train.py \
--pyramid_path ~/model/m4m6m8 \
--dataset_path ~/data \
--train_mode scratch \
--train_stages 1 \
--generate_field_stages 1 \
--checkpoint_name precomputed \
--no_redirect_stdout
Package: metrohash
MetroHashPython wrapper forMetroHash, a
fast non-cryptographic hash function.Getting StartedTo use this package in your program, simply typepipinstallmetrohashAfter that, you should be able to import the module and do things with
it (see usage example below).Usage ExamplesStateless hashingThis package provides Python interfaces to 64- and 128-bit
implementations of MetroHash algorithm. For stateless hashing, it
exportsmetrohash64andmetrohash128functions. Both take a value to
be hashed and an optionalseedparameter:>>>importmetrohash...>>>metrohash.hash64_int("abc",seed=0)17099979927131455419>>>metrohash.hash128_int("abc")182995299641628952910564950850867298725Incremental hashingUnlike its cousins CityHash and FarmHash, MetroHash allows incremental
(stateful) hashing. For incremental hashing, useMetroHash64andMetroHash128classes. Incremental hashing is associative and
guarantees that any combination of input slices will result in the same
final hash value. This is useful for processing large inputs and stream
data. Example with two slices:>>>mh=metrohash.MetroHash64()>>>mh.update("Nobody inspects")>>>mh.update(" the spammish repetition")>>>mh.intdigest()7851180100622203313The resulting hash value above should be the same as in:>>>mh=metrohash.MetroHash64()>>>mh.update("Nobody inspects the spammish repetition")>>>mh.intdigest()7851180100622203313Fast hashing of NumPy arraysThe PythonBuffer
Protocolallows Python
objects to expose their data as raw byte arrays to other objects, for
fast access without copying to a separate location in memory. Among
others, NumPy is a major framework that supports this protocol.All hashing functions in this packege will read byte arrays from objects
that expose them via the buffer protocol. Here is an example showing
hashing of a 4D NumPy array:>>>importnumpyasnp>>>arr=np.zeros((256,256,4))>>>metrohash.hash64_int(arr)12125832280816116063The arrays need to be contiguous for this to work. To convert a
non-contiguous array, use NumPy'sascontiguousarray()function.DevelopmentLocal workflowFor those who want to contribute, here is a quick start using some
makefile commands:gitclonehttps://github.com/escherba/python-metrohash.gitcdpython-metrohash
makeenv# create a virtual environmentmaketest# run Python testsmakecpp-test# run C++ testsmakeshell# enter IPython shellTo find out which Make targets are available, type:makehelpDistributionThe wheels are built usingcibuildwheeland are distributed to PyPI using GitHub actions. The wheels contain compiled
binaries and are available for the following platforms: windows-amd64,
ubuntu-x86, linux-x86_64, linux-aarch64, and macosx-x86_64.See AlsoFor other fast non-cryptographic hash functions available as Python
extensions, seeFarmHashandMurmurHash.AuthorsThe MetroHash algorithm and C++ implementation is due to J. Andrew
Rogers. The Python bindings for it were written by Eugene Scherba.LicenseThis software is licensed under theApache License,
Version 2.0. See the
included LICENSE file for details.
Package: metrohash-python
metrohash-pythonPython bindings for the fast non-cryptograpical hash function MetroHash. MetroHash C++ library by J. Andrew Rogers, Python bindings by Dobatymo.RequirementsThe library has been tested on Linux Python 3.6, and on Windows Python 3.6, 3.7.Installpip install metrohash-pythonCompilation requires a C++ compiler and optionallyCython.ExamplesThe usage is similar to Python's hashlib.>>>importmetrohash>>>h=metrohash.MetroHash128()>>>h.update(b'asd')>>>h.update(b'qwe')>>>h.digest()b'K\xfb\x17\xeb>\xb2W\xbd\x93\xad\xf6\x17\xceg\x14\xda'>>>h.hexdigest()'4bfb17eb3eb257bd93adf617ce6714da'Or as simple non-incremental function:>>>importmetrohash>>>metrohash.metrohash128(b'asdqwe')b'K\xfb\x17\xeb>\xb2W\xbd\x93\xad\xf6\x17\xceg\x14\xda'The interface forMetroHash64andmetrohash64is the same.