Saravanan666/pypi-org huggingface dataset:
Package: adapted-logger
A helper log library based on default logging module permetting a custom
format of logs to be redirected to Logstash - Elasticsearch - Kibana.Custom usage:HOW TO INSTALLInstall adapted_logger using easy_setup or pip:pip install adapted_loggerHOW TO USE:from logger.adapted_logger import AdaptedLogger
logger = AdaptedLogger("project_name", "127.0.0.1") # specify project_name and ip address of current server
log = logger.get_logger()
log.info("This is an info message")
log.debug("This is a debug message")
log.warn("This is a warning message")
log.error("This is an error message")RESULTS:2015-10-27 17:06:50,176 project_name INFO 127.0.0.1 This is an info message
2015-10-27 17:06:55,552 project_name DEBUG 127.0.0.1 This is a debug message
2015-10-27 17:07:00,863 project_name WARNING 127.0.0.1 This is a warning message
2015-10-27 17:07:05,360 project_name ERROR 127.0.0.1 This is an error messageRedirect logs to console:Instantiate AdaptedLogger object:adapted_log = AdaptedLogger("retail_crm_server", "127.0.0.1")Redirect logs to console (Default behavior):adapted_log.redirect_to_console()Get logger object:logger = adapted_log.get_logger()
logger.debug("Testing Debug Message")
logger.info("Testing Info Message")
logger.warn("Testing Warn Message")
logger.error("Testing Error Message")Redirect logs to file:Instantiate AdaptedLogger object:adapted_log = AdaptedLogger("retail_crm_server", "127.0.0.1")Redirect logs to file:adapted_log.redirect_to_file("/path/logfile.log")Get logger object:logger = adapted_log.get_logger()
logger.debug("Testing Debug Message")
logger.info("Testing Info Message")
logger.warn("Testing Warn Message")
logger.error("Testing Error Message")Custom adapterThis adds the possibility to configure your logger within a config file like config.yml,
inside /config folder you should specify your configuration in YAML format.formatters:simpleFormater:
    format: '%(asctime)s    %(name)s    %(levelname)s    %(message)s'
    datefmt: '%Y/%m/%d %H:%M:%S'sHere we specify time, package name, level name, and the message, right now there is no injection of the ip addresshandlersconsole:
    class: logging.StreamHandler
    formatter: simpleFormater
    level: DEBUG
    stream: ext://sys.stdout
file:
    class : logging.FileHandler
    formatter: simpleFormater
    level: WARNING
    filename: filename_or_path.logHere we specify handlers, in this exemple we use 2 handlers : console and file.loggers:clogger:
    level: DEBUG
    handlers: [console]
flogger:
    level: WARNING
    handlers: [file]And finally we create 2 loggers for console and file handlers.To inject ip address into context, we have created CustomAdapter class that create an adapter and inject ip in the
process.Usagelogging_config = yaml.load(open('config/config.yml', 'r'))
dictConfig(logging_config)

logger_1 = logging.getLogger("project_name.application_name1")
logger_1 = CustomAdapter(logger_1, {'ip': ip})

logger_2 = logging.getLogger("project_name.application_name2")
logger_2 = CustomAdapter(logger_2, {'ip': ip})Right now, we can calllogger_1.warning('This is a warning Message')
logger_2.error('This is an error message)
Package: adapter-client
Клиент для взаимодействия со СМЭВ3 посредством АдаптераПодключениеsettings:INSTALLED_APPS = [
    'adapter_client'
]services:from adapter_client.adapters.smev.adapter import adapter
from adapter_client.adapters.smev.services.base import AbstractService
from adapter_client.core.domain.model import Message


class ROGDINFService(AbstractService):
    """
    Сервис обрабатывающий сообщения со сведениями о рождении.
    """
    message_type = 'urn://x-artefacts-zags-rogdinf/root/112-51/4.0.1'

    def process_message(self, message: Message):
		# сообщение на которое получен ответ
		reply_to = message.reply.to
        ...

class ApplicationRequestService(AbstractService):
    """
    Сервис обрабатывающий запросы на зачисление (в качестве поставщика).
    """
    message_type = (
        'http://epgu.gosuslugi.ru/concentrator/kindergarten/3.2.1'
    )
    def process_message(self, message: Message):
        # обрабатываем сообщение-запрос
        ...

        # отправляем ответ на запрос
        adapter.send(
            Message(
                # необходимо указать что сообщение является ответом
                reply_to=message,
                # остальные поля сообщения
                ...
            )
        )apps:from django.apps.config import AppConfig as AppConfigBase

class AppConfig(AppConfigBase):

    name = __package__

    def ready(self):
        self._init_adapter_client()
        self._register_services()

    def _init_adapter_client(self):
        from adapter_client.config import ProductConfig, set_config
        from tasks import BaseTask

        set_config(ProductConfig(async_task_base=BaseTask))
    
    def _register_services(self):
    from adapter_client.adapters.smev.adapter import adapter
    from .services import ApplicationRequestService, ROGDINFService
    
    adapter.register_service(ApplicationRequestService(), ROGDINFService())Запуск тестов$ toxAPIПередача сообщенияfrom adapter_client.adapters.smev.adapter import adapter
from adapter_client.core.domain.model import Message

message = Message(
    message_type='Foo',
    body='<foo>bar</foo>',
    attachments=['http://domain.com/attach1', 'http://domain.com/attach2'],
    test=True
)

adapter.send(message)Дальнейшая обработка сообщений производится Celery в фоновом режиме.Получение ответа на сообщениеОтветы на отправленные сообщения собираются периодической задачей
и передаются зарегистрированным сервисам.
Package: adapterio
TheAdapter Python IOsoftware provides a convenient data table loader from various formats such asxlsx,csv,db (sqlite database), andsqlalchemy. Its main feature is the ability to convert data tables identified in one main and optionally one or more additional input files intodatabase tablesandPandas DataFramesfor downstream usage in any compatible software.Adapterbuilds upon the existing Python packages that allow for the communication betweenPythonandMS Excel, as well asdatabasesandcsvfiles. It provides inbuilt capabilities to specify the output location path, as well as a version identifier for a research code run.  In addition to the loading capability, an instance of theAdapterIOobject has the write capability. If invoked, all loaded tables are written as either a singledatabaseor a set ofcsvfiles, or both. The purpose of this software is to support the development of research and analytical software through allowing for a simple multi-format IO with versioning and output path specification in the input data itself. The package is supported onWindowsandmacOS, as well as forLinuxfor the utilization without anyxlsxinputs.
Package: adapt-fw
ADAPTADAPTstands forADAptivePickingToolbox. This package is a library
thought for seismologist and scientist that approach a seismic phase picking analysis.This library aims to easening the creation of seismic catalogue by means of a semi-automated offline multi-phase repicking system.AUTHOR:Matteo BagagliVERSION:0.0.1DATE:06.2021 @ ETH-ZurichSetupMore info coming soon. The software is currently under submission process in peer-reviewd journal.
In the meantime it is distributed a useful magnitude calculation script/module with several functions for LocalMagnitude (ML) calculation [Richter 1935]For the moment just type:$pipinstalladaptReferencesRichter, Charles F. "An instrumental earthquake magnitude scale."Bulletin of the seismological society of America25.1 (1935): 1-32.
Package: adaptiveagatepy
Early Release Phase - November, 2020This platform is in an early release phase; if you are comfortable working with early-release software and would like access, please contactagate-support@adaptivebiotech.com.Adaptive Agate is a new, modern platform designed by Adaptive Biotechnologies to share data with our immunoSEQ&reg; research customers and assist with downstream analysis. The platform consists of four components:A cloud-based SQL Server database containing metadata about samples such as the total number of templates found and sample-level metrics such as clonality.Per-sample files containing detailed sequence-level information, stored in and accessed via Azure Blob Storage.A set of REST functions providing common algorithms and analyses.An easily-installed Python library that provides simple access to all of the above.Access to these resources are secured using Microsoft Azure Active Directory credentials. Customers can associate their existing email addresses with Agate accounts and, in many cases, use existing enterprise or Microsoft credentials.While we expect most users will use Python to access Agate data and functions, any tool or development environment that can access SQL, Azure Blob and HTTPS resources using Active Directory authentication is supported. For example, we supply a Microsoft Excel template (Windows only) that can automatically download data into worksheets and pivot tables for direct analysis in that environment.  For more information, visit the Agate documentation website at www.adaptiveagate.com.How to get the Adaptive Agate Python SDKPackages for the Adaptive Agate Python SDK (adaptiveagatepy) are available from PyPi and Anaconda using the mechanisms below.To install from PyPi using PIP:
.. code-block:pip install adaptiveagatepyTo install from Anaconda using conda:
.. code-block:conda install -c adaptivebiotech adaptiveagatepyimmunoSEQ is for research use only and not for use in diagnostic procedures.Copyright 2020 Adaptive Biotechnologies, All Rights Reserved.
Package: adaptive-boxes
Adaptive-BoxesPython Library for rectangular decomposition of 2D binary images.See the CUDA GPU version:adaptive-boxes-gpuQuick StartInstalladaboxfrom PiP:pip install adaptive-boxesCalladaptive-boxeslibraryfrom adabox import proc
from adabox.plot_tools import plot_rectangles, plot_rectangles_only_linesCall others too:import numpy as np
import matplotlib.pyplot as pltLoad data in.csvformat. File should contain data with columns:[x1_position x2_position flag].
Initially,flag = 0(Seesample_datafolder).# Input Path
in_path = './sample_data/sample_2.csv'

# Load Demo data with columns [x_position y_position flag]
data_2d = np.loadtxt(in_path, delimiter=",")If you want to see data, plot using:# Plot demo data
plt.scatter(data_2d[:, 0], data_2d[:, 1])
plt.axis('scaled')Decompose data in rectangles, it returns a list of rectangles and a separation value needed to plot them.rectangles = []
# Number of random searches, more is better!
searches = 2        
(rectangles, sep_value) = proc.decompose(data_2d, searches)
print('Number of rectangles found: ' + str(len(rectangles)))Plot resulting rectanglesplot_rectangles(rectangles, sep_value)orplot_rectangles_only_lines(rectangles, sep_value)OutputAdaboxapplied over:./sample_data/files. Click in the images to expand.Hi-res imagesFile:sample_1.csvFile:sample_2.csvRepo ContentEach folder contains the next information:data: Files with voxel information in Blender (.plyextension)proto: Prototype scriptsresults: Results of the heuristic process (.jsonextension)lib: library scriptsMore info
Package: adaptivebridge
Project Name:AdaptiveBridgeLicense:MIT LicenseAuthor:Netanel EliavAuthor Website:https://inetanel.comAuthor Email:netanel.eliav@gmail.comDocumentation:Click HereIssue Tracker:Click HereOverviewAdaptiveBridge is a revolutionary adaptive modeling for machine learning applications, particularly in the realm of Artificial Intelligence. It tackles a common challenge in AI projects: handling missing features in real-world scenarios. Machine learning models are often trained on specific features, but when deployed, users may not have access to all those features for predictions. AdaptiveBridge bridges this gap by enabling models to intelligently predict and fill in missing features, similar to how humans handle incomplete data. This ensures that AI models can seamlessly manage missing data and features while providing accurate predictions.Key FeaturesMissing Feature Prediction:AdaptiveBridge empowers AI models to predict and fill in missing features based on the available data.Feature Selection for Mapping:You can impact the features prediction methods by using configurable thresholds for importance, correlation, and accuracy.Adaptive Modeling:Utilize machine learning models to predict missing features, maintaining high prediction accuracy even with incomplete data.Custom Accuracy Logic:Define your own accuracy calculation logic to fine-tune feature selection.Feature Distribution Handling:Automatically determine the best method for handling feature distribution based on data characteristics.Dependency Management:Identify mandatory, deviation, and leveled features to optimize AI model performance.UsageWith AdaptiveBridge, integrating this powerful tool into your AI and machine learning pipelines is easy. Fit the class to your data, and let it handle missing features intelligently. Detailed comments and comprehensive documentation are provided for straightforward implementation.Getting StartedFollow these steps to get started with AdaptiveBridge:Clone this repository:pipinstalladaptivebridge# Alternativelygitclonehttps://github.com/inetanel/adaptivebridge.git
pipinstall-rrequirements.txtDependenciesSklearnScipyNumPyPandasDistfitMatplotlibPytest (Production Dependency)TqdmContributionContributions and feedback are highly encouraged. You can open issues, submit pull requests for enhancements or bug fixes, and be part of the AI community that advances AdaptiveBridge.LicenseThis project is licensed under the MIT License. See the LICENSE file for details.DisclaimerThis code is provided as-is, without any warranties or guarantees. Please use it responsibly and review the documentation for usage instructions and best practices.
Package: adaptivecards
AdaptiveCardsAuthor adaptive cards in pure pythonIntroductionAdaptive Cardsare a great way to extend your bot interactions. However, writing the JSON required to specify the card layout by hand can be cumbersome and error prone. And while using adesigneris a good way to manually create cards this does not cover cards that are generated by code. AdaptiveCards allows you to author cards in native python without ever touching the underlying json.A code sample says more then a thousand words so the following code snippet ...fromadaptivecards.adaptivecardimportAdaptiveCardfromadaptivecards.elementsimportTextBlockfromadaptivecards.containersimportColumn,ColumnSet,Containercard=AdaptiveCard()card.body=[Container(items=[TextBlock(text='Hello from adaptivecards',font_type='Default',size='Medium'),ColumnSet(columns=[Column(width='stretch',items=[TextBlock(text='author',weight="Bolder",wrap=True),TextBlock(text='version',weight="Bolder",wrap=True),]),Column(width='stretch',items=[TextBlock(text='Huu Hoa NGUYEN',wrap=True),TextBlock(text='0.1.0',wrap=True),])])]),TextBlock(text='more information can be found at [https://pypi.org/project/adaptivecards/](https://pypi.org/project/adaptivecards/)',wrap=True)]json_str=str(card)print(json_str)... produces this json ...{"$schema":"http://adaptivecards.io/schemas/adaptive-card.json","body":[{"items":[{"fontType":"Default","size":"Medium","text":"Hello from adaptivecards","type":"TextBlock"},{"columns":[{"items":[{"text":"author","type":"TextBlock","weight":"Bolder","wrap":true},{"text":"version","type":"TextBlock","weight":"Bolder","wrap":true}],"type":"Column","width":"stretch"},{"items":[{"text":"Huu Hoa NGUYEN","type":"TextBlock","wrap":true},{"text":"0.1.0","type":"TextBlock","wrap":true}],"type":"Column","width":"stretch"}],"type":"ColumnSet"}],"type":"Container"},{"text":"more information can be found at [https://pypi.org/project/adaptivecards/](https://pypi.org/project/adaptivecards/)","type":"TextBlock","wrap":true}],"type":"AdaptiveCard","version":"1.2"}when render in Teams will look likeFeaturesSupports all components, options and features of adaptive cards version 1.4Create adaptive cards from pure pythonInstallationYou can install AdaptiveCards using pip by issuing$pipinstalladaptivecardsFor more information on how to use this package please check the project documentation athttps://github.com/huuhoa/adaptivecards.Authors & MaintainersHuu Hoa NGUYENhuuhoa@gmail.comCreditsThe following resources were influential in the creation of this project:The package's README was copied partially fromPyAdaptiveCardsLicenseThis project is licensed to you under the terms of theMIT License.
Package: adaptivekde
This package implements adaptive kernel density estimation algorithms for 1-dimensional
signals developed by Hideaki Shimazaki. This enables the generation of smoothed histograms
that preserve important density features at multiple scales, as opposed to naive
single-bandwidth kernel density methods that can either over or under smooth density
estimates. These methods are described in Shimazaki's paper:H. Shimazaki and S. Shinomoto, "Kernel Bandwidth Optimization in Spike Rate Estimation,"
in Journal of Computational Neuroscience 29(1-2): 171–182, 2010http://dx.doi.org/10.1007/s10827-009-0180-4.License:
All software in this package is licensed under the Apache License 2.0.
See LICENSE.txt for more details.Authors:
Hideaki Shimazaki (shimazaki.hideaki.8x@kyoto-u.jp) shimazaki on Github
Lee A.D. Cooper (cooperle@gmail.com) cooperlab on GitHub
Subhasis Ray (ray.subhasis@gmail.com)Three methods are implemented in this package:sshist - can be used to determine the optimal number of histogram bins for independent
identically distributed samples from an underlying one-dimensional distribution. The
principal here is to minimize the L2 norm of the difference between the histogram and the
underlying distribution.sskernel - implements kernel density estimation with a single globally-optimized
bandwidth.ssvkernel - implements kernel density estimation with a locally variable bandwidth.Dependencies: These functions in this package depend on NumPy for various operations
including fast-fourier transforms and histogram generation.
Package: adaptivelcbin
# adaptivelcbin__CAUTION__: this is a simple functional project, although it should work as generally expected, do make sanity checks
and make sure you understand what the adaptive binning isIt makes adaptive binning and hardness ratio of two light curves (XMM-Newton input tested)## Installation`bash $ pip install adaptivelcbin `## Help`bash $ hratio--help`## Example:`bash $ hratioPNsrc_lc_01s_005-030.fitsPNsrc_lc_01s_030-100.fitshratio4.qdp 15.0--flag_rebin=4``python import hratiohratio.hratio_func('data/PNsrc_lc_01s_005-030.fits','data/PNsrc_lc_01s_030-100.fits','test1.qdp', 15.0) `
Package: adaptive-neighbourhoods
Adaptive Neighbourhoods for the Discoveryof Adversarial ExamplesPython API for generating adapted and unique neighbourhoods for
searching for adversarial examplesInstallation & usageThis work is released on PyPi. Installation, therefore, is as simple as installing the package with pip:python3-mpipinstalladaptive-neighbourhoodsAt this point, you're free to start generating neighbourhoods for your own dataset:fromadaptive_neighbourhoodsimportepsilon_expandneighbourhoods=epsilon_expand(x,# your input datay)# the integer encoded labels for your dataMove information on the variable parameters and general guidance on using this package can be found at:https://jaypmorgan.github.io/adaptive-neighbourhoods/ContributingAll contributions and feedback are welcome!There are three main remote mirrors used for hosting this project. If
you would like to contribute, please submit an
issue/pull-request/patch-request to any of these mirrors:Github:https://github.com/jaypmorgan/adaptive-neighbourhoodsGitlab:https://gitlab.com/jaymorgan/adaptive-neighbourhoodsSource Hut:https://git.sr.ht/~jaymorgan/adaptive-neighbourhoodsCiting this workIf you use this work in your research, please consider referencing our
article using the following bibtex entry:@article{DBLP:journals/corr/abs-2101-09108,
  author    = {Jay Morgan and
               Adeline Paiement and
               Arno Pauly and
               Monika Seisenberger},
  title     = {Adaptive Neighbourhoods for the Discovery of Adversarial Examples},
  journal   = {CoRR},
  volume    = {abs/2101.09108},
  year      = {2021},
  url       = {https://arxiv.org/abs/2101.09108},
  eprinttype = {arXiv},
  eprint    = {2101.09108},
  timestamp = {Sat, 30 Jan 2021 18:02:51 +0100},
  biburl    = {https://dblp.org/rec/journals/corr/abs-2101-09108.bib},
  bibsource = {dblp computer science bibliography, https://dblp.org}
}
Package: adaptive-stratification
Adaptive StratificationThis package provides an implementation of the adaptive stratification sampling method to estimate quantities of interest of the form Q = E(f(Y)), where the random vector Y follows a d-dimensional uniform distribution on the unit-cube and f is a given function.Example: Using the Sampler# Import the module containing the sampling routinesfromstratificationimportAdaptiveStratification# Create a sampler for function funcsampler=AdaptiveStratification(func,d,N_max,N_new_per_stratum,alpha,type='hyperrect')# Solve (return a tuple)result=sampler.solve()Input arguments:func: implementation of given function of interest that defines the quantity of interest. It needs to be callable, accepting one m-times-n-dimensional numpy array as input and returns a m-dimensional numpy array;d: dimension of the stochastic domain;N_max: number of total samples to be used;N_new_per_stratum: targeted average number of samples per stratum, controlling the adaptation;alpha: number between zero and one, defining the hybrid allocation rule;type: type of tessellation procedure, i.e., via hyper-rectangles (type='hyperrect') or simplices (type='simplex')More InformationSee theGithub repositoryfor more details.