Saravanan666/pypi-org huggingface dataset:
Package: logregnumpy
logregnumpyPet Project. Logistic Regressor Classifier.Performs a gradient descent method for a loss minimizing.Works with binary and multiclass targets.Parameterslr : float, default=1e-3Learning rate (size) for each step of an gradient descent.l2_reg : float, default=0.2Degree of L2 penalty.epochs : int, default=100Number of gradient descent iterations.Examples>>> from sklearn.datasets import load_iris  
>>> from logregnumpy import LogRegNumpy  
>>> X, y = load_iris(return_X_y=True)  
>>> model = LogRegNumpy(l2_reg=0.1, epochs=1000)  
>>> model.fit(X, y)  
>>> model.predict(X)[:3]  

array([0, 0, 0])  

>>> model.predict_proba(X)[:3]

array([[9.69584306e-01, 3.04018742e-02, 1.38198704e-05],  
       [9.32753885e-01, 6.71844981e-02, 6.16165599e-05],  
       [9.57931295e-01, 4.20313028e-02, 3.74027136e-05]])Methodsfit(X, y, verbose=False, plot=False)Fit the model according to the given training data. May return a loss value graph.ParametersX : array-like of shape (n_samples, n_features)Training vector, where n_samples is the number of samples andn_features is the number of features.y : array-like of shape (n_samples,)Target vector relative to X.verbose : bool, default=FalseIf true, returns array with loss values on each iteration.plot : bool, default=FalseIf true, returns a loss value graph.predict(X)Predict class labels for samples in X.predict_proba(X)Probability estimates.NotesTo successfully uninstall the package from Jupyter notebook, use the following code:pip uninstall logregnumpy --yes
Package: log-report
Log_reportInstallationTo use in your project just use your dependency manager to install it, with pip is like this:pip install log_reportUsageProgram takes path to directory with logs and return statistic about them  place|name|car|timeargumentspath first positional arg--driver optional takes name of driver statistic only about him--desc or --asc sort by, asc is defaultpython -m log_report <path to dir with logs> --descpython -m log_report <path to dir with logs>  --driver <name driver in "">Documentation function and classesthe package has 2 classes and 2 functionargs_parser()add arguments and parse, return namespace with themparse_call(args_cm=<namespace_args>)takes namespace of args from previous func and call something it depends what args were parsedclass Logobj Log parameters pathLog.read_dataread data from files in pathLog.get_logsvalidate for usage and return three lists with abbreviations start_time and end_timeclass Reportobj Report parameters abbr_list, start_list, end_listReport.get_diff calculate differencebetween start and end timeReport.concatenate_sort_dataconcatenate diff time with abbr and then sort itReport.outputprint statistic about all driversReport.drivertakes name and get statistic about driverReport.solo_outputprint statistic about driver work with previous method
Package: log-request-id
Log-Request-ID is an extension to handle request-IDs logs in popular python api frameworks.Currently supported frameworks: flaskRequirementspython (3.6+)InstalationInstall usingpippip install log-request-idUsageSetLOG_REQUEST_ID_FRAMEWORK_SUPPORTto point to your framework of choice (section currently supported).LOG_REQUEST_ID_FRAMEWORK_SUPPORT=flaskInit request-ID handlerFlask, withlog_request_id.flask.init_flask_request_id_handlerfromlog_request_idimportinit_flask_request_id_handlerdefcreate_flask_app():app=Flask()init_flask_request_id_handler(app)Change log format (optional)At this stagerequest_idis already present in log data, request-ID will be underrequest_idkey.logging.basicConfig(level=logging.WARNING,format='%(filename)s:%(levelname)s:%(request_id)s-%(message)s')# orlogging.getlogger().setformatter(logging.formatter("%(asctime)s:%(name)s:level=%(levelname)s:%(request_id)s-%(message)s"))For more advanced logger configuration seepython’s logging module.Warningif you will be adding custom handler or custom logging initialization uselog_request_id.logging.RequestIdLogRecordFactoryorlog_request_id.logging.RequestIdLogFilter.
Package: logrich
ЛоггерСовместная работаloguru&rich.Screenshot loggerScreenshot logger2Уровень вывода исключений определяется в переменных окружения.
Цвета, ширины и шаблоны вывода также могут быть определены в окружении.Обработчики записей логов можно определять дополнительно, например запись в файл или отправка в канал.ИспользованиесмотритестКак развернуть:gitclonecdlogrich
poetryshell
poetryinstall# создаём окружениеcptemplate.env.envЗапустить тест(ы):pytest# монитор тестовptw
Package: logrotate
ContentsSummaryGet StartedAuthorChanges2012-01-23LicenseDownloadSummaryA small, simple logrotate implementation for the Python logging module that
only rotates files (it doesn’t create and delete them) and therefore maintains
owner, group and permission information.(Not tested on the Windows platform).Get StartedDownload and install from sourceAuthorJames GardnerChanges0.1.02012-01-23Created packageLicenselogrotate - A small, simple logrotate implementation for the Python logging
module that only rotates files (it doesn’t create and delete them) and
therefore maintains owner, group and permission informationCopyright (C) 2012 James GardnerPermission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the “Software”), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.Download
Package: logrotater
This library is a simple logrotater (or file rotater).
Simply pass in the path to the main logfile and this
library will rotate all the logs by an increment of 1.Example:import logrotaterrotater = logrotater.LogRotate(prefix=’/home/kyle/p4.log’, verbose=True)rotater.rotate()The prefix path should be the path of the main logfile without the .N extension.
The previous example would rotate /home/kyle/p4.log.N to /home/kyle/p4.log.N+1,
move /home/kyle/p4.log to /home/kyle/p4.log.1 and create a new empty /home/kyle/p4.log
Package: logrouter
python-log-routerA package that allows logs to be routed to different log handlers based on a discriminant. Each unique value of the discriminant is managed by a distinct handler.Installationpip install logrouterUsageCalllogrouter.setup_logging()to setup the logging configuration by providing the configuration yaml absolute file path. You can also set the configuration path using an environment variable. Specify the name of the env variable by setting theenv_pathparameter.For an example of a configuration file, refer to thedefault configuration file. You can specify the log handler to be used by replacinghandlers.single_handler_classwith the name of the handler. The default one islogrouter.logrouter.DefaultHandler, which inherits fromlogging.FileHandler.The default logging configuration will route all the logs based on thediscriminatorfield of the LogRecord object. To use the default configuration, calllogrouter.setup_logging(use_default_config=True).ExamplesRun and look at the code and logs produced of the examples located at/examplesto experience what you can achieve withlogrouter.Using different types of handlersA new instance ofsingle_handler_classhandler class is used for each discriminator unique value. This instance receives the log level and the discriminator value when created. If you want to use a differnet handler class for some discriminant values, specify them inhandlers.handlers_dictin the logging configuration file. Seethis example.
Package: logrpy
Logrclient library for Python.pip install logrpyAvailableloggermethodslogger.emerglogger.alertlogger.critlogger.errorlogger.warnlogger.noticelogger.infologger.debugAvailablecountermethodscounter.inccounter.avgcounter.maxcounter.mincounter.percounter.timecounter.snippetbonus method!ExamplefromlogrpyimportLogrconf=Logr(('127.0.0.1',7776),'MCAwDQYJKoZIhvcNAQEBBQADDwAwDAIFAMg7IrMCAwEAAQ==','MC0CAQACBQDIOyKzAgMBAAECBQCHaZwRAgMA0nkCAwDziwIDAL+xAgJMKwICGq0=',)logger=conf.getlogger('hello.log')# Send loglogger.info('Hello, Logr!')logger.debug('It`s cool!')
Package: logrun
logrunA package for experiment logging in Python.Features include:Stores relevant source code (only what is necessary) with the experiments automatically;Easily fetch the experiments that generated a given file;Easily fetch the experiments that were generated by a given script;Shouldn't use tons of storage;Everything runs locally -- no possibly-sketchy third-party will be getting access to your code and experiments.Installlogruncan be installedviapip:pipinstalllogrunExample usageThe following example trains a model and registers an experiment that outputted the filetrained_model.pth:fromlogrun.utils.generalimportoutpathimportpickle...# your experiment, yada yada yadamodel=......# your experiment, yada yada yadawithopen(outpath("trained_model.pickle"),'wb')asfile:pickle.dump(model,file)Note that you only needed to import the module and use theoutpathfunction here. Everything else is neatly encapsulated in thelogrun.internalsmodule.DocumentationThe documentation is available athttps://dccsillag.github.io/logrun/logrun/.To generate it manually, usepdoc3:pdoc--htmllogrun-odocs
Package: logs4thelazy
Logs4theLazyEasily add logs to your python projects!View Demo·Report Bug·Request FeatureTable of ContentsOverviewGetting StartedUsageRoadmapContributingLicenseContactOverviewLogs4theLazy allows you easily add detailed, descriptive, and well-structured logs to your project.Logs4theLazy allows you toDefine custom logging patternsOr you could just use a prebuilt oneYou can define the structure of your logs with LogFormatsYou can control where logs go through loggers(back to top)Getting StartedTo install logs4thelazy, it is recommended to create a virtual environment and just use pip.>>>python-mvenvvenv

>>>sourcevenv/bin/activate

>>>pipinstalll4lfor Mac and Linuxor on Windows>>>python-mvenvvenv

>>>sourcevenv\Scripts\Activate.ps1

>>>pipinstalll4lUsageTo start using logs4thelazy, you must first have itinstalled. After you install logs4thelazy, you must import itimport l4lWith logs4thelazy imported, you can use the basic default loggers# l4l_example.py
import l4l

logger = l4l.BaseLogger(name="logger")

logger.log(l4l.from_value("Hello logging4thelazy world!"), stdout=True)and then if you run it>>>pythonl4l_example.py
logger:Listofalllogsloggedbylogger,logger
logger:Hellologging4thelazyworld!(back to top)RoadmapCreate basic working loggerCreate some extra logger classes that do things such as log to a file, log to a database, format the log, log with a trace-back, etc.Add some documentationSee theopen issuesfor a full list of proposed features (and known issues).(back to top)ContributingContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make aregreatly appreciated.If you have a suggestion that would make logs4thelazy better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!Fork the ProjectCreate your Feature Branch (git checkout -b feature/AmazingFeature)Commit your Changes (git commit -m 'Add some AmazingFeature')Push to the Branch (git push origin feature/AmazingFeature)Open a Pull Request(back to top)LicenseDistributed under the MIT License. SeeLICENSEfor more information.(back to top)ContactYosi Frost -yosi_frost@icloud.comProject Link: [https://github.com/FrostyTheSouthernSnowman/logging4thelazy(https://github.com/FrostyTheSouthernSnowman/logging4thelazy)(back to top)
Package: logs-check-plugin
Logs monitoring pluginChecks an url raise an alert if some problem is found.
Uses curl with all its power, so you can extend your check with all curl options.VERSIONInstallLinux:sudo pip3 install logs_plugin --upgradeAlso is possible to use:sudo python3 -m pip install logs_plugin --upgradeOn windows with python3.5:pip install logs_plugin --upgradeFor proxies add:--proxy='http://user:passw@server:port'UsageUse the command line:> logs_plugin --help
  usage: logs_plugin [-h] [-fl [Fileocation]] [-wd [Word to Check]] [-e [EXTRA_ARGS]]

    optional arguments:
                        -h, --help            show this help message and exit
                        -fl [Fileocation], --filelocation [Fileocation]
                                                file to check
                        -wd [Word_to_check], --wordtocheck [Word to Check]
                                                word to check
                        -e [EXTRA_ARGS], --extra_args [EXTRA_ARGS]
                                                extra args to add to curl, see curl manpageExample usageExample basic usage:> logs_plugin  --fl '{filelocation}' --wd '{word_to_check}'Nagios configExample command:define command{
    command_name  logs_plugin
    command_line  /usr/local/bin/logs_plugin --fl '$ARG1$' --wd $ARG2$ $ARG3$
}With proxy defined# use logs_plugin with proxydefine command {command_name  logs_plugin
command_line  https_proxy=http://user:pass@PROXYIP:PORT /usr/local/bin/logs_plugin –fl ‘$ARG1$’ –wd $ARG2$  $ARG5$}Example service:define service {
        host_name                       SERVERX
        service_description             service_name
        check_command                   logs_plugin!c:\logs\log.txt!wordtocheck
        use                                         generic-service
        notes                           some useful notes
}With proxy defined:define service {host_name                       SERVERX
service_description             service_name
check_command                   logs_plugin!c:logslog.txt!wordtocheck
use                                         generic-service
notes                           some useful notes}You can use ansible role that already has the installation and command:https://github.com/CoffeeITWorks/ansible_nagios4_server_pluginsTODOUse hash passwordsAdd Unit tests?
Package: log_scraper
LogScraper==========A generic library for gathering stats from log files by running regexeson them. Things you can do: \* Create and run any number of regexes onany number of files in parallel. \* Aggregate stats by creating namedregex groups in your regexes \* Grab archived logs (so long as you tellit where your archives live) \* Grab files from remote boxes \* Printstats to console \* Print regex matches to console \* Search on gzippedfilesInstallation------------The easiest manner of installation is to grab the package from the PyPIrepository.::pip install log_scraperUsage-----Base Usage^^^^^^^^^^For off the cuff usage, you can just create a LogScraper object and tellit what regexes to run and where to look for files. Eg.::from log_scraper.base import LogScraperimport log_scraper.consts as LSCfilepath = '/path/to/file'filename = 'filename.ext'scraper = LogScraper(default_filepath={LSC.DEFAULT_PATH : filepath, LSC.DEFAULT_FILENAME : filename})scraper.add_regex(name='regex1', pattern=r'your_regex_here')# To get aggregated statsdata = scraper.get_log_data()# To print all the statsscraper.print_total_stats(data)# To print each file's individual statsscraper.print_stats_per_file(data)# To view log lines matching the regexscraper.view_regex_matches(scraper.get_regex_matches())The real power, though, is in creating your own class deriving fromLogScraper that presets the paths and the regexes to run so that anyonecan then use that anywhere to mine data from a process' logs.Development-----------Dependencies~~~~~~~~~~~~-  Python 2.7-  `paramiko <http://paramiko-www.readthedocs.org/en/latest/index.html>`_Testing~~~~~~~To test successfully, you must set up a virtual environment On Unix, inthe root folder for the package, do the following:``python -m virtualenv . source ./bin/activate ./bin/python setup.py develop``Now you can make any changes you want and then run the unit-tests bydoing:::./bin/python setup.py test
Package: logsensei
logsenseiLogger for Data Scientist -DocumentationIntroductionThis Python Package is build to solve one of the pain points in building Data Science projects: Having an effective logging system. As Data Science Projects often involve data ingestion, data transformation (Be it due to Data Cleaning Process, Feature Engineering, Feature Encoding, etc) and model building, we want to make sure that each steps of the process works as intended. Furthermore, in deploying our data science system, we often automate this data ingestion and data transformation processes. Effective logging will help us monitor our pipeline so that the model that we are about to train will yield consistent, accurate results.Installationpip install logsenseiUsage exampleslogsensei is very easy and intuitive to use. You can load logsensei by:import logsensei
from logsensei import loggerSave the logs into a file by:logger.setup(name="personal_projects", logger_file="./logs", level=logsensei.DEBUG)The setup is done! You can use various logging functions that is provided by the logger. Some of the examples are as follows:array = np.array([1, 2, 3, np.nan, 3, 2])
logger.array(array, 'd_array')>>> 2019-10-27 13:10:26 | INFO | __main__:<module>:2 | Array d_array shape : (6,)
>>> 2019-10-27 13:10:26 | INFO | __main__:<module>:2 | Array d_array unique values : {nan, 1.0, 2.0, 3.0}
>>> 2019-10-27 13:10:26 | INFO | __main__:<module>:2 | Array d_array cardinality : 4
>>> 2019-10-27 13:10:26 | INFO | __main__:<module>:2 | Array d_array missing values : 1 (16.67%)
>>> 2019-10-27 13:10:26 | INFO | __main__:<module>:2 | Array d_array info : MEAN=2.2 | STD=0.7483314773547882 | MIN=1.0 | 25TH=2.0 | MEDIAN=2.0 | 75TH=3.0 | MAX=3.0logger.classification(target_binary, pred_binary, "Cancer Detection")>>> 2019-10-27 13:26:36 | INFO | __main__:<module>:1 | Cancer Detection Classification Score
>>> 2019-10-27 13:26:36 | INFO | __main__:<module>:1 | ====================
>>> 2019-10-27 13:26:36 | INFO | __main__:<module>:1 | Accuracy Score : 0.46
>>> 2019-10-27 13:26:36 | INFO | __main__:<module>:1 | Precision Score : 0.5111111111111111
>>> 2019-10-27 13:26:36 | INFO | __main__:<module>:1 | Recall Score : 0.41818181818181815
>>> 2019-10-27 13:26:36 | INFO | __main__:<module>:1 | F1 Score : 0.4599999999999999
>>> 2019-10-27 13:26:36 | INFO | __main__:<module>:1 | ROC AUC Score : 0.46464646464646464For Full Documentation on the API, please visitAPI DocumentationAuthorAditya Kelvianto SidhartaGithub:https://github.com/AdityaSidhartaPersonal Website:https://adityasidharta.com/LicenseThis project is licensed under the MIT License - see theLICENSEfile for details
Package: logsense-logger
logsense-logger-pythonProvides a set of wrapper classes and method for working
with Python andLogSenseUsageInstallationpip3 install logsense-loggerWrapping loggingfrom logsense.handler import LogSenseHandler
from os import getenv
import logging

logsense_token = getenv('LOGSENSE_TOKEN', None)
log = logging.getLogger()
log.addHandler(LogSenseHandler(logsense_token))
log.setLevel(logging.INFO)


class Example:
    def __init__(self):
        self.bar = 42

    def foo(self):
        logging.info("Answer: {}".format(self.bar))


if __name__ == "__main__":
    ex = Example()
    ex.foo()Now, just run the app, e.g.LOGSENSE_TOKEN="63da4903-01e9-d1a4-82a8-9cf8cd63b7b5" python sample_logging.pyAnd your logs should flow to LogSenseMetricsThe package also includes a simple example on how to measure method duration
and have ability to track metrics. All that needs to be done is providingLOGSENSE_TOKENenvironment variable and than annotating
methods that are to be measure with@measure_duration(). For example:from logsense.metrics import measure_duration, setup_metrics
from os import getenv

logsense_token = getenv('LOGSENSE_TOKEN')
setup_metrics('myapp', logsense_token)


class MyComplexProcess:
    def __init__(self, how_many_times):
        self._how_many_times = how_many_times

    @measure_duration(extracted_params=['a'])
    def foo(self, a):
        x = 0
        for i in range(a*self._how_many_times):
            x = x+1
        return xExamplesCheck theexamplefor actual usage examples
Package: logseq-doctor
docstestspackageLogseq Doctor: heal your flat old Markdown files before importing them.Note:this project is still alpha, so it’s a bit rough on the edges (documentation and feature-wise).InstallationThe recommended way is to installlogseq-doctorglobally withpipx:pipx install logseq-doctorYou can also install the development version with:pipx install git+https://github.com/andreoliwa/logseq-doctorYou will then have thelsdcommand available globally in your system.Quick startTypelsdwithout arguments to check the current commands and options:Usage: lsd [OPTIONS] COMMAND [ARGS]...

 Logseq Doctor: heal your flat old Markdown files before importing them.

╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --install-completion          Install completion for the current shell.      │
│ --show-completion             Show completion for the current shell, to copy │
│                               it or customize the installation.              │
│ --help                        Show this message and exit.                    │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────╮
│ outline  Convert flat Markdown to outline.                                   │
│ tasks    List tasks in Logseq.                                               │
│ tidy-up  Tidy up your Markdown files by removing empty bullets in any block. │
╰──────────────────────────────────────────────────────────────────────────────╯DevelopmentTo run all the tests run:toxNote, to combine the coverage data from all the tox environments run:Windowsset PYTEST_ADDOPTS=--cov-append
toxOtherPYTEST_ADDOPTS=--cov-append tox