Saravanan666/pypi-org huggingface dataset:
Package: crescent-ext-docstrings
crescent-ext-docstringsA docstring parser forhikari-crescent.Installationpip install crescent-ext-docstringsUsageThis extension works for both class commands and function commands.importcrescentfromcrescent.extimportdocstringsbot=crescent.Bot("...")@bot.include@docstrings.parse_doc@crescent.commandasyncdefexample(ctx:crescent.Context,a:str,b:str)->None:"""This is the command's description.:param a:This is the first param's description.:param b:This is the first param's description."""awaitctx.respond(f"{a=},{b=}")@bot.include@docstrings.parse_doc@crescent.command(name="class_example")classClassExample:"""Other doc styles are supported. This is google doc style.Args:a: This is the first param's description.b: This is the first param's description."""a=crescent.option(str)b=crescent.option(str)asyncdefcallback(self,ctx:crescent.Context)->None:awaitctx.respond(f"{self.a=},{self.b=}")bot.run()Doc StylesSince this library relies ondocstring-parser, the styles Rest, Google, Numpy, and Epydoc are supported. If no style is specified, the style will be inferred.importdocstrings@bot.include@docstrings.parse_doc(style=docstrings.Style.REST)@crescent.commandasyncdefexample(ctx:crescent.Command,a:str)->None:"""Rest style description.:param a:The parameter."""...
Package: crescent-ext-kebabify
crescent-ext-kebabifyTurn your command names into kebabs.Installingpip install crescent-ext-kebabifyExampleimportcrescentfromcrescent.extimportkebabbot=crescent.Bot("TOKEN")# Make this command's name `my-class-command`@bot.include@kebab.ify@crescent.commandclassMyClassCommand:asyncdefcallback(self,ctx:crescent.Context):...# Make this command's name `my-function-command`@bot.include@kebab.ify@crescent.commandasyncdefmy_function_commannd(ctx:crescent.Context):...bot.run()
Package: crescience-websocket-py
\n# Crescience Websocket ClientWebsocket client for Crescience devices written in python.Requirementspython>=3.7pipInstallationYou can install the client usingpip:pipinstallcrescience-websocket-pyUsageThe client provides two different usage cases:Callbackfromcrescience_websocket_pyimportWebsocketClient,Message,ConnectionMessageTypedefcallback(msg_type:ConnectionMessageType,msg:Message|None,error:ConnectionErrorReason|None)->None:ifmsg_type==ConnectionMessageType.TEXT:print(f"Received message:{str(msg)}")elifmsg_type==ConnectionMessageType.OPEN:print("Connection opened")elifmsg_type==ConnectionMessageType.ERROR:print(f"Connection error:{error}")elifmsg_type==ConnectionMessageType.CLOSE:print("Connection closed")client=WebsocketClient(host="<IP_OR_DOMAIN>",port=81,verify_ssl=False,callback=callback)Class inheritancefromcrescience_websocket_pyimportWebsocketClient,Message,ConnectionMessageTypeclassMyCrescienceClient(WebsocketClient):def__init__(self,host:str)->None:super().__init__(host=host,port=81,verify_ssl=False)asyncdefreceived(self,msg:Message)->None:print(f"Received message:{str(msg)}")asyncdefon_open(self)->None:print("Connection opened")asyncdefon_close(self)->None:print("Connection closed")asyncdefon_error(self,error:ConnectionMessageType)->None:print(f"Connection error:{error}")client=MyCrescienceClient("<IP_OR_DOMAIN>")Check for firmware-updatesYou can check if firmware updates are available using the following command:fromcrescience_websocket_pyimportget_latest_versionlatest_version=get_latest_version(device_type="crescontrol")print(latest_version["version"])
Package: crest
A generic CLI to access any RESTful service with a little bit of configuration.
Think of it as something in between curl and proper CLI.Features:Replace parts of JSON request body while sending the request using simpleobject.property[index]notationPrint only part of JSON response using above described notationHistory: Previously sent request are stored and can be resent using--lastoptionTemplates: Store preset requests of a particular URL and send them using--templateoptionService config: Store common headers, URL prefix, preset requests of a particular service in configIt has options similar to curl to fetch and provide request body.-d,-Hand-dare
same as curl.-Xis changed to-m. Currently, the tool usesrequeststo send
HTTP requests. In future, it may just be wrapper on top of curl delegating all options to
curl.Sample usage:With followingconfigurationin~/.crest/raxid/config.py:tokens_request = {
    "auth": {
        "passwordCredentials":{
            "username":"REPLACE_USERNAME",
            "password":"REPLACE_PASSWORD"
        }
    }
}
config = {
    "name": "raxid",
    "description": "Rackspace Identity Service",
    "uriprefix": "https://identity.api.rackspacecloud.com/v2.0",
    "headers": {
        "accept": "application/json",
        "content-type": "application/json"
    },
    "resources": {
        "tokens/?$": {
            "templates": {"default": tokens_request},
            "aliases": {
                "username": "auth.passwordCredentials.username",
                "password": "auth.passwordCredentials.password",
            },
            "help": "Authenticate via username/password"
        }
    }
}one can authenticate toRackspace Identity Serviceand extract token using following command:crest -s raxid tokens -m post -t -r username=myuname -r password=mypwd -o access.token.idFor more details checkusageInstallationpip install crest
mkdir -p ~/.crest/generic_history  # for --history and --service to workThanksThanks to Rackspace for having a culture of hacking on side projects and allowing me to work on this, and having anexcellentopen source employee contribution policy
Package: crestic
Crestic - configurable ResticThis is a slim configuration wrapper forRestic, a pretty awesome backup tool.Why?Because restic is unfortunately still missing config files.UsageThe goal ofcresticis to make runningresticeasy, e.g. creating backups usingcrestichomebackupinstead of running complexresticcommandsresticbackup\--reposftp:your_server:my_computer.restic\--password-file~/.config/restic/password\--exclude-file~/.config/restic/excludes\~To achieve this, this tool does not try to be clever, it simply maps anycommandline optionsforresticto akey in an config file:[home]repo:sftp:your_server:my_computer.resticpassword-file:~/.config/restic/password[home.backup]exclude-file:~/.config/restic/excludes_arguments:~More advanced usage examples can be foundin the docs
Package: crew
AMQP based RPC library for TornadoUse casesTask queueLoad balancing for different CPU-bound HTTP handlers… other systems which involve RPCInstallationpip install crewExampleSee the fullexample.UsageFor example create your first app, and save as master.py:import tornado.ioloop
import tornado.gen
import tornado.web
import tornado.log
import json
import tornado.options
from crew import TimeoutError, ExpirationError
from crew.master.tornado import Client

class MainHandler(tornado.web.RequestHandler):

    @tornado.gen.coroutine
    def get(self):
        resp = yield self.settings['crew'].call(None, priority=100)
        self.write(json.dumps(resp))

cl = Client()
application = tornado.web.Application(
    [
        (r"/", MainHandler),
    ],
    crew=cl,
    autoreload=True,
    debug=True,
)

if __name__ == "__main__":
    cl.connect()
    tornado.options.parse_command_line()
    application.listen(8888)
    tornado.ioloop.IOLoop.instance().start()And create your first task, and save as worker.py:# encoding: utf-8
from crew.worker import run, context, Task

@Task('test')
def long_task(req):
    context.settings.counter += 1
    return {"counter": context.settings.counter}

run(
    counter=0
)After that run it:$ python master.py &
$ python worker.py &
$ waitTry to test it:$ curl http://localhost:8888/
Package: crewai-tools
crewAI ToolsThis document provides a comprehensive guide for setting up sophisticated tools forcrewAIagents, facilitating the creation of bespoke tooling to empower your AI solutions.In the realm of CrewAI agents, tools are pivotal for enhancing functionality. This guide outlines the steps to equip your agents with an arsenal of ready-to-use tools and the methodology to craft your own.Homepage|Documentation|Chat with Docs|Examples|DiscordTable of contentsCreating Your ToolsSubclassingBaseToolUtilizing thetoolDecoratorContribution GuidelinesDevelopment SetupCreating Your ToolsTools are always expect to return strings, as they are meant to be used by the agents to generate responses.There are three ways to create tools for crewAI agents:SubclassingBaseToolCreating a tool from a function or lambdaUsing thetooldecoratorSubclassingBaseToolfromcrewai_toolsimportBaseToolclassMyCustomTool(BaseTool):name:str="Name of my tool"description:str="Clear description for what this tool is useful for, you agent will need this information to use it."def_run(self,argument:str)->str:# Implementation goes herepassDefine a new class inheriting fromBaseTool, specifyingname,description, and the_runmethod for operational logic.Utilizing thetoolDecoratorFor a simpler approach, create aToolobject directly with the required attributes and a functional logic.fromcrewai_toolsimporttool@tool("Name of my tool")defmy_tool(question:str)->str:"""Clear description for what this tool is useful for, you agent will need this information to use it."""# Function logic hereThetooldecorator simplifies the process, transforming functions into tools with minimal overhead.Contribution GuidelinesWe eagerly welcome contributions to enrich this toolset. To contribute:Fork the Repository:Begin with forking the repository to your GitHub account.Feature Branch:Create a new branch in your fork for the feature or improvement.Implement Your Feature:Add your contribution to the new branch.Pull Request:Submit a pull request from your feature branch to the main repository.Your contributions are greatly appreciated and will help enhance this project.Development SetupInstalling Dependencies:poetryinstallActivating Virtual Environment:poetryshellSetting Up Pre-commit Hooks:pre-commitinstallRunning Tests:poetryrunpytestStatic Type Checking:poetryrunpyrightPackaging:poetrybuildLocal Installation:pipinstalldist/*.tar.gzThank you for your interest in enhancing the capabilities of AI agents through advanced tooling. Your contributions make a significant impact.
Package: crewcal
crewcalConvert an airline crew schedule pdf into iCalendar format using a machine learning Large Language Model.Explore the docs »Report Bug·Request FeatureTable of ContentsAbout the ProjectGetting StartedPrerequisitesInstallationUsageRoadmapContributingContact(back to top)About the ProjectConvert an airline crew schedule pdf into iCalendar format using a machine learning Large Language Model. An LLM (Large Language Model, specifically OpenAI's gpt-3.5-turbo) is used to extract the schedule information. iCalender files are recognized by most calendar systems (iOS, Android, Google, ++) and will create the flights on your phone/device calendar.The PDF schedule does not need to follow a very prescribed structured format.Development performed mostly using AIMS eCrew pdf schedules.(back to top)Getting StartedPrerequisitesObtain an OpenAI API key.Make this available as an environment variable:exportOPENAI_API_KEY=YOUR_KEYAlternatively specify the API Key in a .env file.(back to top)InstallationStrongly consider using pipx or a virtual environment depending on your needs.pipinstallcrewcal(back to top)UsageCLITo create the calendar file (schedule.ics) from a pdf schedule file (schedule.pdf):crewcalextractschedule.pdfschedule.icscrewcal --helpshows a brief manual page.Python PackageThe following sript extracts the schedule fromschedule.pdfand stores the icalendar file inschedule.icsfile.fromcrewcal.llm_extractimportOpenAISchedulesched=OpenAISchedule(schedule_path='schedule.pdf',to_icalendar_file='schedule.ics')The resulting .ics file can be read by most calendar software.(back to top)RoadmapNone (feel free to suggest)(back to top)ContributingAny contributions you make aregreatly appreciated.If you have a suggestion that would make this better, please fork the repo and create a pull request. You can alsoopena feature request or bug report.
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)ContactProject Link:crewcal(back to top)
Package: crf-beam
crf-beamBeam search for Bonito CRF models.Usage>>>importtorch>>>fromcrf_beamimportbeam_search>>>>>>T,C,S=1000,320,64>>>scores=torch.rand(T,C)>>>back_guides=torch.rand(T+1,S)>>>post=torch.rand(T,S)>>>>>>sequence,qstring,moves=beam_search(scores,back_guides,post)>>>sequence'ACACTCGCAGCGCGATACGACTGATCGAGATATACTCAGTGTACACAGT...'>>>qstring'(&''(****95444"@732"55",--/5555"5"@@E"E4""","-#**...'Developer QuickstartPython$ python3 -m venv venv3
$ source venv3/bin/activate
(venv3) $ pip install -r requirements.txt
(venv3) $ make build
(venv3) $ make testWASM$ make wasm
$ node tests/test.js
Package: crflux
#crflux.models:  parameterizations of the Cosmic Ray fluxHistorically, this module was part of the research code for a paper
[A. Fedynitch, J. Becker Tjus, and P. Desiati, Phys. Rev. D 86, 114024
(2012)](http://journals.aps.org/prd/abstract/10.1103/PhysRevD.86.114024),
where we compared the effects of different Cosmic Ray Flux models on the atmospheric lepton flux.This code is now an integral dependency of the atmospheric neutrino and
air-shower cascade research code [MCEq: Matrix Cascade Equations (MCEq)](https://github.com/afedynitch/MCEq) providing:numerical models/parameterizations of high energy cosmic ray fluxes,conversions from all-particle into all-nucleon flux,and other convenience functions for semi-analytical atmospheric lepton flux calculations.Performance was never a bottle-neck, thus it’s not the most numerically brilliant code to date but it does the job.If you find it too slow for your applications feel free to open an issue or send a pull request or just branch/fork and let me know.## Documentation[The documentation is located here](http://crfluxmodels.readthedocs.org/en/latest/index.html). Please acknowledge the code by citing the paper above.## RequirementsPython 2 or 3, numpy, scipy, matplotlib.## Installationpip install crflux## ExampleThe interaction with the classes and plotting is demonstrated in thetest()method:from crflux.models import *
test()## ContributorsHans Dembinski [@HDembinski](https://github.com/HDembinski)## [MIT LICENSE](LICENSE)Code and documentation copyright 2015 Anatoli Fedynitch
Package: crfmnes
CR-FM-NES[slide]CR-FM-NES[1] implementation.
The main feature of CR-FM-NES is that both time and space complexity are linear, with partially considering variable dependencies.
Therefore, it is especially suitable for high-dimensional problems (about hundreds to thousands of dimensions).
On the other hand, it often achieves high performance even on low-dimensional problems.
This is an extension ofFM-NES (Fast Moving Natural Evolution Strategy)[2] to be
applicable in high-dimensional problems.
Please e-mail atmasahironomura5325@gmail.comif you have any issue.If you find this code useful in your research then please cite:@INPROCEEDINGS{nomura2022fast,title={Fast Moving Natural Evolution Strategy for High-Dimensional Problems},author={Nomura, Masahiro and Ono, Isao},booktitle={2022 IEEE Congress on Evolutionary Computation (CEC)},pages={1-8},year={2022},}News(2022/07)The paperFast Moving Natural Evolution Strategy for High-Dimensional Problemshas been accepted at IEEE CEC'22.(2022/12)CR-FM-NES has been integrated intoevosax, which provides JAX-based evolution strategies implementation. Thanks@RobertTLangeand@Obliman!Getting StartedPrerequisitesYou need onlyNumPythat is the package for scientific computing.InstallingPlease run the following command.$pipinstallcrfmnesExampleThis is a simple example that objective function is sphere function.
Note that the optimization problem is formulated asminimizationproblem.importnumpyasnpfromcrfmnesimportCRFMNESdim=3f=lambdax:np.sum(x**2)mean=np.ones([dim,1])*0.5sigma=0.2lamb=6crfmnes=CRFMNES(dim,f,mean,sigma,lamb)x_best,f_best=crfmnes.optimize(100)print("x_best:{}, f_best:{}".format(x_best,f_best))# x_best:[1.64023896e-05 2.41682149e-05 3.40657594e-05], f_best:2.0136169613476005e-09For Constrained ProblemsCR-FM-NES can be applied to (implicitly) constrained black-box optimization problems.
Please set the objective function value of the infeasible solution tonp.inf.
CR-FM-NES reflects the information and performs an efficient search.
Please refer to [3] for the details of the constraint handling methods implemented in this repository.Other Versions of CR-FM-NESI really appreciate that CR-FM-NES is implemented in other settings.C# Implementation:bakanaouji/CRFMNES_CSC++ Implementation:dietmarwo/fast-cma-esJax(Python) Implementation:RobertTLange/evosaxReferences[1]M. Nomura, I. Ono, Fast Moving Natural Evolution Strategy for High-Dimensional Problems, IEEE CEC, 2022.[2]M. Nomura, I. Ono, Natural Evolution Strategy for Unconstrained and Implicitly Constrained Problems with Ridge Structure, IEEE SSCI, 2021.[3]M. Nomura, N. Sakai, N. Fukushima, and I. Ono, Distance-weighted Exponential Natural Evolution Strategy for Implicitly Constrained Black-Box Function Optimization, IEEE CEC, 2021.
Package: crf-pos
Persian Parts-of-Speech taggerThis repository contains Persian Part of Speech tagger based on Conditional Random Fields and a native Text Normalizer.Table of ContentsTO-DOInstallationUsing PipFrom SourceOn CoLabUsageImplementation DetailsEvaluationHow To ContributeTO-DO:CRF taggercommit#64Wapiti taggercommit#56Native Normalizerpull#4UnitTestingcommit#127CI/CDpull#5Scrutinize Coverageissue#8Documentationpull#9Improve Coveragepull#9Smooth Installationissue#12pull#13Excel code qualitypull#11Adding documentation and flowchart of the code.CircleCI CI/CD Pipeline Configissue#14Installation:Using Pip!pipinstallcrf_posFrom Source$gitclonehttps://github.com/MohammadForouhesh/crf-pos-persian$cdcrf-pos-persian
$pythonsetup.pyinstallOn CoLab!pipinstallgit+https://github.com/MohammadForouhesh/crf-pos-persian.gitUsagefrom crf_pos.pos_tagger.wapiti import WapitiPosTagger
pos_tagger = WapitiPosTagger()
tokens = 'او رئیس‌جمهور حجتالاسلاموالمسلمین ابرهیم رئیسی رئیس جمهور ایران اسلامی می باشد'
pos_tagger[tokens]

[1]: 
[('او', 'PRO'),
('رئیس\u200cجمهور', 'N'),
('حجت\u200cالاسلام\u200cوالمسلمین', 'N'),
('ابرهیم', 'N'),
('رئیسی', 'N'),
('رئیس\u200cجمهور', 'N'),
('ایران', 'N'),
('اسلامی', 'ADJ'),
('می\u200cباشد', 'V')]Implementation DetailsEvaluationTest and training is perfomed on Mojgan Seraji'sUppsala Persian CorpusPart-of-SpeechDescriptionprecisionrecallf1-scoresupportNNoun0.9850.9700.977186585PPreposition0.9980.9980.99889450VVerb0.9990.9990.99987762ADVAdverb0.9760.9720.97415983FWForeign Word0.9890.9920.9912784DETDeterminer0.9730.9770.97519786ADJAdjective0.9780.9750.97761526INTInterjection1.0001.0001.00073CONJConjunction0.9960.9970.99774796PROPronoun0.9730.9740.97323094NUMNumeral0.9880.9920.99024864avg/total-0.9850.9850.985586703How To ContributeReport any encountered error trough[BUG]Report if Normalizer mis-out half-space correction trough[ZWNJ]
Package: crfpy
crfpy is a python binding tocrfpp.InstallationUsingpip:pip install crfpyUsageSeeexampleincrfpp.ContributingSource code:https://github.com/seifer08ms/crfpyIssue tracker:https://github.com/seifer08ms/crfpy/issuesFeel free to submit ideas, bugs reports, pull requests or regular patches.Authors and ContributorsChenliang Wang<chenliangwang08ms@gmail.com>Licensecrfpy is licensed under MIT license.crfpplibrary is licensed under LGPL license.This package (crfpy) wraps crfpp C++ API using SWIG-generated wrapper code.
crfpy works in Python 2 and Python 3, doesn’t have external dependencies
(crfpp is bundled with crf_learn command line script) and support training
in Python.
<style>#STTBimg, #STTBimg2 { display: none !important; }</style>
Package: crfseg
crfseg: CRF layer for segmentation in PyTorchConditional random field (CRF) is a classical graphical model which allows to make structured predictions
in such tasks as image semantic segmentation or sequence labeling.You can learn about it in papers:Efficient Inference in Fully Connected CRFs with
Gaussian Edge PotentialsConditional Random Fields as Recurrent Neural NetworksInstallationpip install crfsegUsageCan be easily used as differentiable (and moreover learnable) postprocessing layer of your NN for segmentation.import torch
import torch.nn as nn
from crfseg import CRF

model = nn.Sequential(
    nn.Identity(),  # your NN
    CRF(n_spatial_dims=2)
)

batch_size, n_channels, spatial = 10, 1, (100, 100)
x = torch.zeros(batch_size, n_channels, *spatial)
log_proba = model(x)
Package: crfst
CRFSuiteTagger==============_CRFSuiteTagger_ is a sequence tagger based on the [pycrfsuite](https://github.com/tpeng/python-crfsuite "pycrfsuite") python wrapper for [CRFSuite](http://www.chokkan.org/software/crfsuite/ "CRFSuite"). It is built for chunking, NER, and other BIO (also referred to as IOB) based text annotation tasks.### Why would you need this?_CRFSuiteTagger_ has a wide selection of common features, and the capability to easily integrate additional ones. The features are controlled using a simple string-based feature template. Additional features can be easily added through new _feature generating functions_ (see `crfsuitetagger.ftex`) passed on the `CRFSuiteTagger` constructor.### InstallationYou should be able to install _CRFSuiteTagger_ as any other Python package:python setup.py install### DependenciesYou will need the following Python packages and one of my other libraries:* [pycrfsuite](https://github.com/tpeng/python-crfsuite  "pycrfsuite") - python wrapper for CRFSuite* [numpy](http://www.numpy.org/ "NumPy") - you should it* [bioeval](https://github.com/savkov/bioeval "bioeval") - my library for evaluating BIO style annotation, which replaces the perl script from [CoNLL-2000](http://ilk.uvt.nl/team/sabine/chunklink/chunklink_2-2-2000_for_conll.pl)### TODO* command line interface* migrate data structure to [pandas](http://pandas.pydata.org/ "pandas")* more examples### See AlsoIf you are interested in other sequence taggers, you might want to look at:* [Stanford NLP](http://nlp.stanford.edu/software/lex-parser.shtml) -- POS tagger* [ARK](http://www.ark.cs.cmu.edu/TweetNLP/) -- POS tagger for tweets* [YamCha](http://chasen.org/~taku/software/yamcha/) -- BIO tagger/chunker* [CRF++](http://taku910.github.io/crfpp/) -- BIO tagger/chunker* [Wapiti](https://wapiti.limsi.fr/) -- POS & BIO tagger/chunker
Package: crfsuite
crfsuite-rsRust binding tocrfsuiteInstallationAdd it to yourCargo.toml:[dependencies]crfsuite="0.3"Addextern crate crfsuiteto your crate root and your're good to go!Python packageThere is also a Python package namedcrfsuite, you can install it viapip:pipinstall-UcrfsuiteUsage example:fromcrfsuiteimportModelif__name__=='__main__':model=Model('path/to/crfsuite/model.crf')tagged=model.tag(["abc","def"])print(tagged)LicenseThis work is released under the MIT license. A copy of the license is provided in theLICENSEfile.
Package: crhc-cli
C.RH.C API Command Line ToolThis project contains thecrhccommand line tool that simplifies the use of the C.RH.C API available atconsole.redhat.comDisclaimer: This project or the binary files available in theReleasesarea areNOTdelivered and/or released by Red Hat. This is an independent project to help customers and Red Hat Support team to export and/or collect the data fromconsole.redhat.comfor reporting or troubleshooting purposes.crhc-cliwill work on those versions of python:3.6+Supported Platforms: At this moment supportingLinuxandMS Windows.Documentation is onRead the Docs. Code repository and issue tracker are onGitHub.Getting StartedSee theQuick Startsection on Read The Docs.Change HistoryThe complete changelog on thechangelogpage.ContributingClickhereand check how to contribute for this amazing project.