Saravanan666/pypi-org huggingface dataset:
Package: coral-ordinal
Ordinal regression in Tensorflow KerasTensorflow Keras implementation of ordinal regression (aka ordinal classification) using consistent rank logits (CORAL) by Cao, Mirjalili, & Raschka (2019).This package includes:Ordinal output layer:CoralOrdinal()Ordinal loss function:OrdinalCrossEntropy()Ordinal error metric:MeanAbsoluteErrorLabels()Ordinal activation function:ordinal_softmax()This is a work in progress, so please post any issues to theissue queue. The package was developed as part of the Berkeley D-Lab'shate speech measurement projectand paper (Kennedy et al. 2020).Acknowledgments: Many thanks toSebastian Raschkafor the help in porting from thePyTorch source repository.Key pending items:Function docstringsDocsTestsInstallationInstall the stable version via pip:pipinstallcoral-ordinalInstall the most recent code on GitHub via pip:pipinstallgit+https://github.com/ck37/coral-ordinal/DependenciesThis package relies on Python 3.6+, Tensorflow 2.2+, and numpy.ExampleThis is a quick example to show a basic model implementation. With actual data one would also want to specify the input shape.importcoral_ordinalascoralNUM_CLASSES=5model=tf.keras.Sequential()model.add(tf.keras.layers.Dense(32,activation="relu"))model.add(coral.CoralOrdinal(num_classes=NUM_CLASSES))# Ordinal variable has 5 labels, 0 through 4.model.compile(loss=coral.OrdinalCrossEntropy(),metrics=[coral.MeanAbsoluteErrorLabels()])See this colab notebookfor extended examples of ordinal regression with MNIST (multilayer perceptron) and Amazon reviews (universal sentence encoder).Note that the minimum value of the ordinal variable needs to be 0. If your labeled data ranges from 1 to 5, you will need to subtract 1 so that it is scaled to be 0 to 4.ReferencesCao, W., Mirjalili, V., & Raschka, S. (2019).Rank-consistent ordinal regression for neural networks. arXiv preprint arXiv:1901.07884, 6.Kennedy, C. J., Bacon, G., Sahn, A., & von Vacano, C. (2020).Constructing interval variables via faceted Rasch measurement and multitask deep learning: a hate speech application. arXiv preprint arXiv:2009.10277.
Package: coramin
CoraminCoramin is a Pyomo-based Python package that provides tools for
developing tailored algorithms for mixed-integer nonlinear programming
problems (MINLP's). This software includes classes for managing and
refining convex relaxations of nonconvex constraints. These classes
provide methods for updating the relaxation based on new variable
bounds, creating and managing piecewise relaxations (for multi-tree
based algorithms), and adding outer-approximation based cuts for
convex or concave constraints. These classes inherit from Pyomo
Blocks, so they can be easily integrated with Pyomo
models. Additionally, Coramin has functions for automatically
generating convex relaxations of general Pyomo models. Coramin also
has tools for domain reduction, including a parallel implementation
of optimization-based bounds tightening (OBBT) and various OBBT
filtering techniques.Primary ContributorsMichael BynumRelaxation classesOBBTOBBT FilteringFactorable programming approach to generating relaxationsCarl LairdParallel OBBTMcCormick and piecewise McCormick relaxations for bilinear termsRelaxations for univariate convex/concave fucntionsAnya CastilloRelaxation classesFrancesco CecconAlpha-BB relaxationRelevant PackagesPyomoCoramin is built upon Pyomo and is designed for integration with Pyomo models.SuspectUse of Coramin can be improved significantly by also utilizing
Suspect's convexity detection and feasibility-based bounds tightening
features. Future development of Coramin will directly use Suspect in
Coramin's factorable programming approach to generating relaxations.DocumentationComing soon..
Package: coras
===============================Python Coras===============================PythonCorasLib=================This API SDK was automatically generated by APIMATIC BETA v2.0Due to the UniRest package dependency this SDK only works under Python 2.7It will not work using Python 3.xHow To Configure:=================The generated code might need to be configured with your API credentials. To do that,provide the credentials and configuration values as constructor parameters for the controllersHow To Build:=============The generated code uses Python libraries named UniRest and Jsonpickle.PIP is a popular tool for managing python packages[1].To resolve these packages:1) From terminal/cmd navigate to the root directory2) Invoke 'pip install -r requirements.txt'Note: You will need internet access to resolve these dependencies.How To Use:===========The following shows how to make invoke the APIController controller.It is also shown in [2].1. Create a "APIControllerTest.py" file in the root directory.2. Add the following import statement'from PythonCorasLib.Controllers.APIController import *'3. Create a new instance using 'controller = APIController()'4. Invoke an endpoint with the appropriate parameters, for example'response = controller.getsection_retrieve(<required parameters if any>)'5. "response" will now be an object of type SectionSerializer.6. To test the response you get, print out a property of "response",for example 'print response.url'.[1] PIP - https://pip.pypa.io[2] from PythonCorasLib.Controllers.APIController import *response = controller.getsection_retrieve()print response.url#or you can print more informationprint response.resolve_names()Example usage:===========from CorasLib import APIControllerfrom datetime import datetimec = APIController(authorization='Token a7238841b1d4c6170b0919d401cc4fe7f10acdb5')now =str(datetime.utcnow())#Create Eventevent = c.create_event_create(name="Phil's Band", venue=venue.id, start=now, doors=now, announce=now, general_onsale=now)#list venuesfor v in c.get_venue_list(): print v.name#list eventsfor e in c.get_event_list(): print e.nameHistory-------0.0.1 (2015-10-20)---------------------* First release on PyPI.
Package: corbeau
Corbeau is an extension toRavenwhich adds a cert-verifying HTTPS transport.It is a drop-in replacement for raven.Client:>>>url="https://foo:bar@example.com/project">>>client=corbeau.Client(url)>>>clientisraven.base.RavenTrue>>>client.registry.get_transport(urlparse.urlparse(url))<corbeau.VerifiedHTTPSTransport object at 0x...>The transport the corbeau client uses does verification of SSL certs
for HTTPS connections, thanks toRequests.The transport uses a requests.Session object to make requests, accessible
at corbeau.session.  This means that keep-alive will be used if the
server supports it.History0.2 (2013-05-24)Make Corbeau compatible with Raven 3.2.x and 3.3.x.
This release is not backwards compatible with Raven 3.1.x.0.1 (2013-02-26)initial release
Package: corby
🤖 Corby⚡ Create your AI applications from zero to deploy in minutes ⚡🚀 Quick Installpipinstallcorby# check your installationcorby-v🤔 What is this?AI applications are awesome, but... who has time to go through all the settings, configurations and the hell of folder structuring? 😫Corbyis a tool that bootstraps the skeleton of your AI applications so you don't have spend a ton of time preparing the configurations.🚀 Just run the commandcorbyon your terminal and get your AI application working in less than 1 minute!📚 How to use📌 User guides can be found here 📌usage:corbynew{chatbot|notebook}[options]positionalarguments:{new}Actiontoperform{chatbot,notebook}Entitytoworkwith

options:-h,--helpshowthishelpmessageandexit-v,--versionShowversion-d,--debugDebugmode🤝 ContributeThis project is open-source and therefore every contribution is more than welcome, whether it be in the form of a new feature, new templates, or better documentation.
Package: corcli
corcli - Cortex CLI clientCortexis a Powerful Observable Analysis and Active Response Engine. While it is usually used along withTheHive Project, why not using it on a daily basis in a CLI fashion.corcliwas built in Python for this specific purpose.Documentation:https://0xfustang.github.io/corcli-docs/Source Code:https://github.com/0xFustang/corcliFeaturesKey features are:Fast job submission: Submit one or multiple observables to Cortex with a different set of analysersBulk submission: Submit jobs to Cortex observables from a text fileExtract artifacts: Submit one or multiple job and display only the extracted artifactsDownload files: Download extracted files from the job artifactsUse aliases for analysers: Map your own aliases to launch your favorite analysersMulti instance config: Submit jobs to another Cortex instanceInstallationwith pipcorcliis published as aPython packageand can be installed withpip, ideally by using avirtual environment. Before installingcorcli, installlibmagicasexplainedin the installation doc.Open up a terminal and install corcli with:pipinstallcorcliusing DockerAdocker imageis available from the repository and comes with all dependencies pre-installed. Open up a terminal and pull the image with:dockerpullghcr.io/0xfustang/corcli:1.1.0LicenseGPLv3
Package: corcondia
pycorcondiaCORCONDIA (Core Consistency Diagnostic) implementation in Python. It uses Tensorly with the Numpy backend.Installationpipinstall-UcorcondiaUsageCurrently, the only implemented function iscorcondia_3d, which calculates the Core Consistency Diagnostic (CORCONDIA) for a 3D tensor. Additional arguments will be forwarded to thetensorly.decomposition.parafaccall.An example on a random tensor is shown below.importnumpyasnpfromcorcondiaimportcorcondia_3dX=np.random.rand(5,5,5)print(corcondia_3d(X,k=3))ReferencesThis is based off of the original MATLAB implementation by Evangelos (Vagelis) Papalexakis:@inproceedings{inproceedings,
author = {Papalexakis, Evangelos and Faloutsos, Christos},
year = {2015},
month = {04},
pages = {5441-5445},
title = {Fast efficient and scalable Core Consistency Diagnostic for the parafac decomposition for big sparse tensors},
doi = {10.1109/ICASSP.2015.7179011}
}CORCONDA was first introduced by Bro and Kiers (2003)here.Thanks to Alessandro Bessi for his initial implementationhere, which led to the creation of this repo.Also, thanks to Yorgos Tsitsikas for his valuable feedback and suggestions.
Package: cord-19-tools
COVID-19 Data ToolsTools for making COVID 19 data slightly easier for everyone! If you A) think something would be useful in your research or B) have some helpful code to contribute, make an issue or PR ASAP so we can get your code shared!Installationpip install cord-19-toolsBE SURE TO HAVE THE MOST RECENT VERSION! I will be constantly updating to make sure users are getting the right data! Semantic Scholar updates the dataset every friday, so on fridays and saturdays be sure to redownload data!DemoDemonstration Notebook on colabDownloading the dataTo download and extract the data, use thedownloadfunction:importcotoolsfrompprintimportpprintcotools.download()For now this just downloads the data from theCORD-19 dataset, metadata is not included (will be by end of day), extracts all the tarfiles, and places them in a directoryThe Paperset classThis is a class for lazily loading papers from theCORD-19 dataset.# no `/` at the end please!data=cotools.Paperset("data/comm_use_subset")# indexes with intspprint(data[0])# returns a dict# and slices!pprint(data[:2])# returns a list of dictsprint(len(data))# takes about 5gb in memoryalldata=data[:]Lets talk for a bit about how it works, and why it doesnt take a gigantic amount of memory. The files are not actually loaded into pythonuntil the data is indexed. Upon indexing, the files at those indexes are read into python, resulting in a list of dictionaries. This means you can still contribute while working on a low resource system.Getting text and abstractsFor text, there is thetextfunction, which returns the text from a single document, thetextsfunction, which returns the text from multiple documents, and thePaperset.texts()function, which gets the text from all documents:print(cotools.text(data[0]))print(cotools.texts(data[12:18]))alltext=data.texts()# alltext = cotools.texts(alldata)For abstracts, we have a similar API:print(cotools.abstract(data[0]))print(cotools.abstracts(data[12:18]))allabs=data.abstracts()# allabs = cotools.abstracts(alldata)ManipulatingYou can also manipulate the documents with thePaperset.applymethod:keys=comm_use.apply(lambdax:list(x.keys()))# then lets combine them into a setprint(set(sum(keys,[])))SearchingYou can search with a list OR a nested list! See the demo notebook for more examples!txt=[["covid","novel coronavirus"],["ventilator","cpap","bipap"]]x=cotools.search(comm_use,txt)print(len(x))print(len(cotools.search(comm_use,txt[0])))print(len(cotools.search(comm_use,txt[-1])))TODOMetadataOther data, for example data fromthis aggregate siteandthis google spreadsheet
Package: cordage
Cordage: Computational Research Data ManagementParameterize experiments using dataclasses and use cordage to easily parse configuration files and command line
options.[!IMPORTANT]Cordage is in a very early stage. Currently, it lacks a lot of documentation and wider range
of features. If you think it could be useful for you, try it out and leave suggestions, complains, and improvemnt ideas
asgithub issues.MotivationIn many cases, we want to execute and parameterize a main function.
Since experiments can quickly become more complex and may use an increasing number of parameters,
it often makes sense to store these parameters in adataclass.Cordage makes it easy to load configuration files or configure the experiment via the commandline.Quick StartInstallationIn an environment of your choice (python>=3.8), run:pipinstallcordageExamplefromdataclassesimportdataclassimportcordage@dataclassclassConfig:lr:float=5e-5name:str="MNIST"deftrain(config:Config):"""Help text which will be shown."""print(config)if__name__=="__main__":cordage.run(train)To use cordage, you need a main function (e.g.func) which takes a dataclass configuration object as an argument.
Usecordage.run(func)to execute this function with arguments passed via the command line. Cordage parses the
configuration and creates an output directory (if the function acceptsoutput_dir, it will be passed as such).See the examples in the examples directory for more details.FeaturesThe main puprose of cordage is to manage configurations to make configuring reproducible experiments easy.
Cordage automatically generates a commandline interface which can be used to parse configuration files and/or
set specific configuration fields via CLI options (run the experiment with the--help optionto get an overview
over the available configuration fields).By using the__series__key, it is possible ot invoke multiple repetitions of an experiment using the same
base configuration but varying some of the configuration fields. The resulting trial runs are (by default)
saved in a common series-level directory.Additionally, cordage can provide an output directory (via theoutput_dir) where cordage will store the used configuration
as well as some experimental metadata.
Package: cord-client-python
Encord Python API ClientThe data engine for computer vision💻 FeaturesMinimal low-level Python client that allows you to interact with Encord's APISupports Python:3.7,3.8,3.9, and3.10✨ Relevant LinksEncord websiteEncord web appEncord documentation💡 Getting StartedFor full documentation, visitEncord Python API Client.First, install Encord Python API Client using thepippackage manager:pipinstallcord-client-pythonThen, create an API key for authentication via theEncord web app. Pass the resource ID and API key as environment variables or pass them explicitly when you initialise the EncordClient object.exportENCORD_PROJECT_ID="<project_id>"exportENCORD_API_KEY="<project_api_key>"Passing the resource ID and API key as environment variables, you can initialise the Encord client directly.fromencord.clientimportEncordClientclient=EncordClient.initialise()If you want to avoid setting environment variables, you can initialise the Encord client by passing the resource ID and API key as strings.fromencord.clientimportEncordClientclient=EncordClient.initialise("<resource_id>","<resource_api_key>")If you wish to instantiate several client objects and avoid passing parameters each time, you can instantiate a EncordConfig object, pass the resource ID and API key as strings, and initialise the client with the config object.fromencord.clientimportEncordClientfromencord.clientimportEncordConfigconfig=EncordConfig("<resource_id>","<resource_api_key>")client=EncordClient.initialise_with_config(config)Once you have instantiated an Encord client, it is easy to fetch information associated with the given resource ID.fromencord.clientimportEncordClientclient=EncordClient.initialise()project=client.get_project()🐛 TroubleshootingPlease report bugs toGitHub Issues. Just make sure you read theEncord documentationand search for related issues first.
Package: corded
CordedA lightweight, extensible client library for Discord botsExample usage:fromcordedimportCordedClient,GatewayEvent,Intentsbot=CordedClient("my_token",Intents.default())@bot.on("message_create")asyncdefon_message_create(event:GatewayEvent)->None:data=event.typed_dataprint(data["content"])bot.start()
Package: cordial
cordialCoridal is an intuitive light-weight API that allows developers to seamlessly use different recommender systems for their needs.
In just three lines of a code, one can built a powerful content recommender system. Currently, Coridal only provides content recommenders,
but collaborative filtering is coming soon!Installationpip install cordialExample usage:# An example with Cordial's BasicRecommenderfromcordial.content_recommendersimportGraphRecommenderrecommender=BasicRecommender('disney')print(recommender.recommend('Toy Story')['result'])# An example with Cordial's GraphRecommenderfromcordial.content_recommendersimportGraphRecommenderrecommender=GraphRecommender('netflix')print(recommender.recommend('Toy Story')['result'])# It's as simple as pie!Full documentation can be viewedhere
Package: cord.py
A modern, easy to use, feature-rich, and async ready API wrapper for Cord written in Python.The Future of cord.pyPlease read thegistfor the future of this project. It’s been a good one.Key FeaturesModern Pythonic API usingasyncandawait.Proper rate limit handling.Optimised in both speed and memory.InstallingPython 3.8 or higher is requiredTo install the library without full voice support, you can just run the following command:# Linux/macOSpython3-mpipinstall-Ucord.py# Windowspy-3-mpipinstall-Ucord.pyOtherwise to get voice support you should run the following command:# Linux/macOSpython3-mpipinstall-U"cord.py[voice]"# Windowspy-3-mpipinstall-Ucord.py[voice]To install the development version, do the following:$gitclonehttps://github.com/VincentRPS/cord.py$cdcord.py$python3-mpipinstall-U.[voice]Optional PackagesPyNaCl(for voice support)Please note that on Linux installing voice you must install the following packages via your favourite package manager (e.g.apt,dnf, etc) before running the above commands:libffi-dev (orlibffi-develon some systems)python-dev (e.g.python3.6-devfor Python 3.6)Quick ExampleimportcordclassMyClient(cord.Client):asyncdefon_ready(self):print('Logged on as',self.user)asyncdefon_message(self,message):# don't respond to ourselvesifmessage.author==self.user:returnifmessage.content=='ping':awaitmessage.channel.send('pong')client=MyClient()client.run('token')Bot Exampleimportcordfromcord.extimportcommandsbot=commands.Bot(command_prefix='>')@bot.command()asyncdefping(ctx):awaitctx.send('pong')bot.run('token')You can find more examples in the examples directory.LinksDocumentationOfficial Cord ServerCord API
Package: cords
CORDS is COReset and Data Selection library for making machine learning time, energy, cost, and compute efficient. CORDS is built on top of PyTorch. Today, deep learning systems are extremely compute-intensive, with significant turnaround times, energy inefficiencies, higher costs, and resource requirements [7, 8]. CORDS is an effort to make deep learning more energy, cost, resource, and time-efficient while not sacrificing accuracy.
Package: cordsearch
Why use CordSearchIn response to the Covid-19 pandemic, research efforts and subsequent publications were dramatically accelerated. The breakneck pace has made it nearly impossible for the medical community to verify and reference the results of the many papers published daily. CordSearch can make this process more efficient by providing easy to use semantic search functions. For any paper in the CORD-19 dataset, CordSearch can be used to quickly find similar papers or sentences. If a paper has a promising conclusion, using CordSearch can help researchers identify whether or not the result is supported by the broader literature.Package setupCreate a virtual environment and thenpip install -r requirements.txt.Download the dataThe Cord-19 dataset can be downloaded through the Huggingface Dataset Hub:fromdatasetsimportload_datasetds=load_dataset('cord19','fulltext')The dataset is approximately 9gbDownload punkt for NLTKimportnltknltk.download('punkt')Using CordSearchfromcordsearchimportCordDatasetds=CordDataset()# Get abstracts by ID:abstract=ds.abstracts[10]# Get individual sentences by specifying the abstract and sentence IDssentence=ds.sentence(abstract_id=10,sentence_id=5)# Find similar papers by specifying the abstract of interest and the number of most similar papers to be displayedds.find_similar_abstracts(abstract_id=10,top_k=2)# Find similar papers by specifying the fulltext of interestds.find_similar_papers(bodytext_id=10,top_k=2)# Find similar sentences from CORD-19 abstractsds.quick_find_similar_sentences(abstract_id=10,sentence_id=5,top_k=2)# Find similar sentences from CORD-19 fulltextsds.find_similar_sentences(bodytext_id=10,sentence_id=5,top_k=2)
Package: cordslash
Cordslashcordslash is aWIPdiscord slash commands wrapper, that is built on thecordedframework by vcokltfre.
Expect more changes/features to be added in the future, currently undocumented but will be soonPR's are welcomeMAKE SURE TO INSTALL CORDED OTHERWISE USE THE POETRY ENVexample.pyimportcordedimportcordslashintents=corded.Intents.default()intents.guild_members=Truebot=cordClient(token="BOT_TOKEN",app_id=BOT_ID,intents=intents)@bot.command(name="wave",guild_ids=[12345678910],description="Say hello to a user")asyncdefwave(ctx:cordslash.Context,user:cordslash.User)->None:awaitctx.send(f":wave: <@{user}>!")bot.start()
Package: cordstore
CordStoreUtilize discord to store files in textchannels using bots or webhooksInstallation# Linux/macOS
python3 -m pip install -U cordstore

# Windows
py -3 -m pip install -U cordstoreHow to use# Webhook Storagestorage=WebhookStorage("webhook_url")uploaded_file=awaitstorage.upload_file("example.png")storage.close()# Channel Storagestorage=ChannelStorage(bot,1234567890123456789)uploaded_file=awaitstorage.upload_file("example.png")storage.close()What would a uploaded file look like?uploaded_file.to_dict(){"id":1234567890123456789,"channel_id":1234567890123456789,"filename":"example_file_name","size":12345,"url":"example_url","proxy_url":"example_proxy_url","width":1280,"height":720,"content_type":"image/png"}