Saravanan666/pypi-org huggingface dataset:
Package: capn
capn====capn is a package that provides hooks when the current-working-directory changes.### Installation$ sudo pip install capn$ touch ~/.capnhooks### Configurationcapn uses a simple YAML file for specifying paths and their hooks. As a quick example, consider the following:settings:default_type: pathexternal_hooks:- ~/.otherhookshooks:- path: /hometype: treeenter:- echo entering /homeexit:- echo exiting /home- echo /home waves goodbye- path: ~/enter:- echo entering ~/exit:- echo exiting ~/The above establish enter and exit hooks for the two listed directories. As you change directories you should see output indicating each hook's execution. You'll notice that the */home* path has a **type** key with the value **tree**. There are two types of hooks; **path**, which is the default, only triggers for that absolute path. **tree** hooks will trigger when you enter or leave the tree below the specified path. Moving between child-paths below the tree does _not_ trigger the hooks. For example, moving from */ -> /home* would trigger the *enter* hook. Moving from */home -> ~/* would not trigger the exit hook.Generally the commands specified in the hooks will be the names of shell scripts not single shell commands.The first section of the configuration currently has two available settings:* **default_type**: either **path** or **tree**. If setting is not specified, **path** will be used.* **external_hooks**: a list of paths to other YAML files containing additional hooks. Such files should resemble the **'hooks'** section of the above example configuration.### UsageAfter installing capn you will need to source:$ source capnIf you no longer wish to have the hooks activated:$ unhook### APIadd_external_hook(filename, path, hooktype=DEFAULT_TYPE,enter=[], exit=[]):Currently capn has a minimal API with a single function that is used to manage programmatically generated external hook files. See the example below:>>>from capn.config import add_external_hook>>>filename = "~/.otherhooks">>>path = ~/projects/foo/bar>>>hooktype = 'tree'>>>enter = ['source ~/projects/foo/bar/bin/activate']>>>exit = ['deactivate']>>>add_external_hook(filename, path, hooktype=hooktype,...                  enter=enter, exit=exit)>>>The above will add a hook to auto de/activate the python-virtualenv whenever the shell is inside the project directory to the file *"~/.otherhooks"*. You will then need to add the filename to the **external_hooks** list in the *"~/.capnhooks"* configuration file.
Package: capncord.py
capncord.pycapncord.py is an API wrapper for Discord written in Python.InstallingTo install the library, run the following command:pip install capncord.pyDepending on your environment, the command may be slightly different. If you're having trouble installing the library, familiarize yourself with howpipworks on your platform first.TutorialTo create a bot, subclasscapncord.Botand overloadon_readyandon_message.BotThe Bot class supports the methodsasync def wait_for(event: str, check: Optional[function] = None, timeout: Optional[int] = None,async def get_message(id: int) -> Message,async def history() -> List[Message]andasync def get_channel(id: int) -> Channel.history()returns a list of messages sent in all channels with the most recent messages at the start of the list.It also has the attributesloop: asyncio.BaseEventLoop,session: aiohttp.ClientSessionanduser: User.MessageThe Message class has the attributesid: int,created_at: datetime.datetime,content: str,author: Userandchannel: Channel.ChannelThe Channel class supports the methodsasync def send(content: str)andasync def history() -> List[Message].history()returns a list of messages sent in this channel with the most recent messages at the start of the list.It also has the attributeid.UserThe User class supportsstr.It also has the attributesawait User.nameandawait User.messages_sent.RequirementsPython 3.5.3+aiohttplibrarywebsocketslibraryUsuallypipwill handle these for you.
Package: capon
caponCapital Market inPythonAuthorVersionDemoGialdetticaponis a python package for easily obtaining and analyzing real-time stock data. It provides extended datasets of stock metadata and features.
In addition, it offers simple APIs for tracking your personal stock portfolios and their live status.InstallationInstall latest release version viapip$pipinstallcaponInstall latest development version$pipinstallgit+https://github.com/gialdetti/capon.gitor$gitclonehttps://github.com/gialdetti/capon.git
$cdcapon
$pythonsetup.pyinstallA simple exampleGet the historical stock price of AMD, and plot it.importcaponamd=capon.stock('AMD',range='ytd')The historical data is given as a standardpandasdataframe.
This allows a fast and powerful data analysis, manipulation and visualization. For instance,amd.plot(x='timestamp',y='adjclose')My portfolio exampleTrack your personal stock portfolio with real-time data.a) Define my holdingsfromcaponimportPortfolio,Lotmy_portfolio=Portfolio([Lot('2020-03-20','AMZN',2,1888.86),Lot('2020-03-20','TSLA',8,451.40),Lot('2020-03-23','GOOGL',3,1037.89),Lot('2020-03-23','AMC',1041,2.88),Lot('2020-03-27','ZM',20,150.29),])b) Sync with real-time stock data to find current statusstatus=my_portfolio.status()display(status)total_cost,total_value=status.sum()[['cost','value']]print(f'Total cost:{total_cost:,.2f}; Market value:{total_value:,.2f}')print(f'Total gain:{total_value-total_cost:+,.2f}({total_value/total_cost-1:+,.2%})')c) Plot itfromcapon.visualizationimportplot_statusplot_status(status)d) Plot historical dataimportplotly.expressaspxperformance=my_portfolio.performance()px.line(performance,x='timestamp',y='gain_pct',color='symbol',template='capon')The full example in a live notebook is providedbelow.Help and SupportExamplesThe tutorials below aim to provide a clear and concise demonstration of some of the most important capabilities ofcapon.
For instance, step-by-step guides for building and real-time monitoring of your portfolio, for fetching and analyzing
stock historical data, or for using stocks metadata.To make it a bit more interesting (hopefully), each tutorial first poses a meaningful stock-market "research question".
In the context of answering these questions, the tutorials demonstrate the relevant library features.ThemeMyBinderColabMy Stock Portfolio PerformanceStock Market Crash and Rebound Amid CoronavirusAnalyzing the Sector-level Crash and ReboundTestingAfter cloning and installing the development version, you can launch the test suite:$pytest
Package: capozzoli-testando-hyperon-das-atomdb
Hyperon DAS AtomDBPersistence layer for Distributed AtomSpaceInstallationThis package requires:python>= 3.8.5 to run.This package is deployed onPypi. If you want, you can install using the pip commandpip install hyperon-das-atomdbIf you want to run it without installing it by pip, you can follow the following approachWe use thePoetrypackage to manage project dependencies and other things. So, if you have Poetry on your machine, you can run the commands below to prepare your environment1. poetry install2. poetry shell(activate virtual environment)Prepare environment1 - Redis and MongoDBYou must have Redis and MongoDB running in your environment2.1 - Environments VariablesYou must have the following variables set in your environment with their respective values:DAS_MONGODB_HOSTNAME=172.17.0.2
DAS_MONGODB_PORT=27017
DAS_MONGODB_USERNAME=mongo
DAS_MONGODB_PASSWORD=mongo
DAS_REDIS_HOSTNAME=127.0.0.1
DAS_REDIS_PORT=63792.2 or you can export necessary environment using the enviroment filesource environmentUsageUse adaptersfromhyperon_das_atomdb.adaptersimportRedisMongoDB,InMemoryDBredis_mongo_db=RedisMongoDB()in_memory_db=InMemoryDB()TestsYou can ran the command below to execute the unittestsmaketest-coverageDocumentation ReferencesRepositories documentation
Package: cappuccino
Java Garbage Collection parser written in PythonWhat is it?cappuccinois a Python package that provides a way of parsing Java Garbage Collection Logs.Where to get itThe source code is currently hosted on GitHub at:https://github.com/vidigalp/cappuccinoBinary installers for the latest released version are available at thePython
Package Index (PyPI).# or PyPIpipinstallcappuccinoHow to Runpythoncappuccino<input_directory>gc_log1.log:100%|██████████|93842/93842[00:00<00:00,146317.63it/s]gc_log2.log:100%|██████████|89468/89468[00:00<00:00,147814.29it/s]gc_log3.log:100%|██████████|84950/84950[00:00<00:00,148095.09it/s]gc_log4.log:100%|██████████|89549/89549[00:00<00:00,147173.26it/s]gc_log5.log:100%|██████████|86187/86187[00:00<00:00,147973.24it/s]countmeanstdmin25%50%\pause_typeG1EvacuationPause16348.00.0404320.1411960.000.010.020G1HumongousAllocation34.00.2288240.3942220.030.070.105GCLockerInitiatedGC1.00.040000NaN0.040.040.040MetadataGCThreshold15.00.0246670.0106010.010.020.02075%maxpause_typeG1EvacuationPause0.0304.58G1HumongousAllocation0.2001.74GCLockerInitiatedGC0.0400.04MetadataGCThreshold0.0350.04DependenciesPandas - pandas is a fast, powerful, flexible and easy to use open source data analysis and manipulation tool, built on top of the Python programming language.NumPy - Adds support for large, multi-dimensional arrays, matrices and high-level mathematical functions to operate on these arrayspython-dateutil - Provides powerful extensions to the standard datetime modulepytz - Brings the Olson tz database into Python which allows accurate and cross platform timezone calculationsClick - Click is a Python package for creating beautiful command line interfaces in a composable way with as little code as necessary.tqdm - Instantly make your loops show a smart progress meter - just wrap any iterable with tqdm(iterable), and you're done!
Package: cappy239
INPE CAPPY239 - Análise Espectral de Processos EstocásticosFerramenta desenvolvida para a disciplina CAP 238 Matemática Computacional I - Análise Espectral de Processos  Estocásticos, ministrada pelo Dr. Reinaldo Roberto Rosa no programa de Pós Graduação em Computação Aplicada no Instituto Nacional de Pesquisas Espaciais.
O módulo possui as seguintes funções:Instalaçãopip install cappy239Disponível para Python 3.0 ou superior.PowernoiseA funçãopowernoisegera sinais estocásticos, ruídos 1/fβ. É uma adaptação do código implementado em Matlab pelo Dr. Reinaldo R. Rosa e Dale B. Dalrymple.Alguns exemplos com 212valores:White noise:fromcappy239importpowernoisewhite_noise=powernoise(beta=0,N=4096)Pink noise:fromcappy239importpowernoisepink_noise=powernoise(beta=1,N=4096)Red noise:fromcappy239importpowernoisered_noise=powernoise(beta=2,N=4096)Por padrão s série temporal está normalizada, caso não queria isso passe o argumentovarargin='randpower'.Mapeamento Quadrático (Logístico)A funçãologistic_mapgera uma série caótica .
Exemplo com 100 valores:fromcappy239importlogistic_mapchaotic_serie=logistic_map(rho=3.85,a0=0.001,n=100)Referência:https://geoffboeing.com/2015/03/chaos-theory-logistic-map/PmodelA funçãopmodelé utilizada para gerar séries temporais estacionárias. O código é uma adaptação da implementação em Matlab disponível emhttp://www2.meteo.uni-bonn.de/staff/venema/themes/surrogates/pmodel/pmodel.m.
Alguns exemplos com 212valores:S8: p=0.52, β=-1.66fromcappy239importpmodelkolmogorov=pmodel(noValues=4096,p=0.52,slope=-1.66).' ___  |     / \     |_   __ \|_   __ \|_  _||_  _|/ ___ `./ ____ `..' ____ '. 
/ .'   \_|    / _ \      | |__) | | |__) | \ \  / / |_/___) |`'  __) || (____) | 
| |          / ___ \     |  ___/  |  ___/   \ \/ /   .'____.'_  |__ '.'_.____. | 
\ `.___.'\ _/ /   \ \_  _| |_    _| |_      _|  |_  / /_____| \____) || \____| | 
 `.____ .'|____| |____||_____|  |_____|    |______| |_______|\______.' \______,' 
                                                           By Adriano P. Almeida
Package: cappy-cli
CappyA simple, fast and powerful CLI tool to add captions to Images. Supports GIFs too!FeauturesAdds caption to static images like.jpeg/.jpg/.png.Adds caption to animated GIFs.Uploads generated images to Imgur to prevent storage usage.Takes care of the image size and aspect ratio.PrerequisitesImgur client ID and secret. You can generate one for freehere.You will be asked for the ID and Secret on first time usage of cappy.UsageInstall the package from pypi.pipinstallcappy-cliRun the command.cappyKeep following the prompts to add caption.
Package: capreolus
CapreolusCapreolus is a toolkit for conducting end-to-end ad hoc retrieval experiments. Capreolus provides fine control over the entire experimental pipeline through the use of interchangeable and configurable modules.Get started with a NotebookRead the documentation for a detailed overview.Quick StartPrerequisites: Python 3.7+ and Java 11. See theinstallation instructionsInstall the pip package:pip install capreolusTrain a model:capreolus rerank.traineval with benchmark.name=nf reranker.name=KNRM reranker.trainer.niters=2If thetraincommand completed successfully, you've trained your first Capreolus reranker onNFCorpus! This command created several outputs, such as model checkpoints and TREC-format run files. To learn about these files,read about running experiments with Capreolus.To learn about different configuration options, try:capreolus rerank.print_config with benchmark.name=nf reranker.name=KNRMTo learn about different modules you can use, such asreranker.name=DRMM, try:capreolus modulesLearn aboutrunning experiments via the Python APIEnvironment VariablesCapreolus uses environment variables to indicate where outputs should be stored and where document inputs can be found. Consult the table below to determine which variables should be set. Set them either on the fly before running Capreolus (export CAPREOLUS_RESULTS=...) or by editing your shell's initialization files (e.g.,~/.bashrcor~/.zshrc).Environment VariableDefault ValuePurposeCAPREOLUS_RESULTS~/.capreolus/results/Directory where results will be storedCAPREOLUS_CACHE~/.capreolus/cache/Directory used for cache filesCUDA_VISIBLE_DEVICES(unset)Indicates GPUs available to PyTorch, starting from 0. For example, set to '1' the system's 2nd GPU (as numbered bynvidia-smi). Set to '' (an empty string) to force CPU.
Package: capricorn
capricorncapricorn is a lightweight library for helping prepare vocabulary from
corpus and prepare word embedding ready to be used by learning models.build vocabulary from corpusload necessary word embedding with consistent word index in Vocabularygetting startedpip install capricornimportcapricornimportos# Specify filepathsVocab_path="vocab_processor"embedding_vector_path="path/to/embedding"# Load vocabifos.path.isfile(Vocab_path):print("Loading Vocabulary ...")vocab_processor=capricorn.VocabularyProcessor.restore(Vocab_path)else:# build vocabprint("Building Vocabulary ...")x_text=["Saudi Arabia Equity Movers: Almarai, Jarir Marketing and Spimaco.","Orange, Thales to Get French Cloud Computing Funds, Figaro Says.","Stansted Could Double Passengers on Deregulation, Times Reports."]# Build/load vocabularymax_document_length=11min_freq_filter=2vocab_processor=capricorn.VocabularyProcessor(max_document_length=max_document_length,min_frequency=min_freq_filter)# only fit# vocab_processor.fit(x_text)# or fit_transform to get the transformed corpusx_text_transformed=vocab_processor.fit_transform(x_text)vocab_processor.save(Vocab_path)print("vocab_processor saved at:",Vocab_path)# build embedding matrix of which the index is consistent with vocab word2index mappingembedding_matrix=vocab_processor.prepare_embedding_matrix_with_dim(embedding_vector_path,300)User inputThe library default to use special token __UNK__  and __PAD__,
if the input sequence lengths below the max_document_length when initial
VocabularyProcessor, it will automatically pad the sequence use the __PAD__.If user have pre defined special tokens when initialize Vocabulary, user
need to pre-process the sequence, namely adding the self defined special
tokens to the input sequence. For example if user defined __START__
and __END__ as additional special tokens and max_document_length=11,  User has to process the original
sentence from:"We like it very much"to:"__START__ __PAD__ __PAD__  We like it very much __PAD__ __PAD__ __END__"
Package: caprover-api
Caprover APIunofficial caprover api to deploy apps to caproverFree software: MIT licenseFull Documentation:https://caprover-api.readthedocs.io.Featurescreate appadd custom domainenable sslupdate app with port mappings, env variables, repo info etcdeploy one click appsget list of all appsget app by namedelete appdelete app and it’s volumesstop appscale appUsageTo use Caprover API in a project:from caprover_api import caprover_api

cap = caprover_api.CaproverAPI(
    dashboard_url="cap-dashboard-url",
    password="cap-dashboard-password"
)One Click Appsget app name fromList of one-click-appsautomated deploy:app_variables = {
    "$$cap_redis_password": "REDIS-PASSWORD-HERE"
}
cap.deploy_one_click_app(
    one_click_app_name='redis',
    namespace='new-app',
    app_variables=app_variables,
    automated=True
)manual deploy (you will be asked to enter required variables during runtime):cap.deploy_one_click_app(
    one_click_app_name='redis',
    namespace='new-app',
)Custom Appscreate a new app:cap.create_app(
    app_name="new-app",
    has_persistent_data=False
)create and deploy redis app from docker hub:cap.create_and_update_app(
    app_name="new-app-redis",
    has_persistent_data=False,
    image_name='redis:5',
    persistent_directories=['new-app-redis-data:/data', ]
)History0.1.0 (2021-06-11)First release on PyPI.
Package: caps-cli
CAPS Command Line InterfaceA repository to discuss, define and implement an approach for easily uploading modelsPrerequisitesWhat things you need to install to run the software and how to install themPython3InstallingA step by step series of examples that tell you how to get a development env runningMacOS and Linux Guide for creating virtual environmentCreate a python3 virtual environment from the parent directory of this projectpython3 -m venv caps-cli-devActivate the python3 virtualenvsource caps-cli-dev/bin/activateWindows Guide for creating virtual environmentCreate a python3 virtual environment from the parent directory of this projectpy -m venv caps-cli-devActivate the python3 virtualenv.\caps-cli-dev\Scripts\activateFor more infovisit thisBuilding the ProjectNow navigate to the project folder (ModelCatalogInsertion)cd ModelCatalogInsertionBuild the projectpython3 setup.py installRunning the ProjectHelp functionality in the CLIcaps-cli --helpUse this command to configure username and password for the Model Catalog APIcaps-cli configure --profile=<NAME_OF_PROFILE>Use this command to know the details of each CLI function (options, arguments)caps-cli <initialize, push, validate> --helpRun this command to test the template creation functionality (with 2 inputs, 3 outputs and 1 parameter)caps-cli initialize -i 2 -o 3 -p 1Running the above command will generate a yaml outline. By default this will create the outline in the current directory, use -d path/to/location to speciy a location. By default the yaml will be named example_yaml.yaml, user can also use -d fileName.yaml to name the output (note the user must specify .yaml after the name. Otherwise the program does not know if it is a directory or filename). By default this will not override an existing file if they share the same name. use flag -f to force override.Run this command to transform the input YAML into a postable JSON objectcaps-cli push --profile=<NAME_OF_PROFILE> <path_of_yaml_file_from_root_of_the_project>Run this command to validate the JSON schema obtained by using the above commandcaps-cli validate <path_of_json_file_from_root_of_the_project>Use this command to deactivate the python virtual environmentdeactivate
Package: capslock
CAPSLOCKA utility python library for writing certain tasks in python easily & elegantly.[The library is still in development. The doc is not completed yet. You can contribute to improve the library.]Backgroundcapslockis a high level utility library written in python for writing certain frequently needed task in faster & efficient way. For example, if you want to keep track of the execution time of one of your method while optimizing it, witing code for tracking execution time can be done easily using capslock.InstallationInstall using the following command -pipinstallcapslockUninstall using the following command -pipuninstallcapslockGetting StartedHow to use decorators from capslockCapslock defines different decorators that can be used out of the box for certain frequent tasks. E.g. getting the run time of certain function over the period of optimization in development phase.Timing DecoratorTo keep track of the execution time of a function in your project for optimizing it over the time, just put the "timing" decorator in your desired function. Capslock will keep track of different run of that function and will plot a well visualized graph for last five execution time of that function.fromcapslockimporttiming@timing(plot=True)defsay_hello():print("Hello World")if__name__=='__main__':say_hello()This will generate output like bellow:And it will also keep track of runtime for different runs of thesay_hello()function. and will plot a graph in the same directory of your python script if you setplot=True, otherwise the plot flag is by defaultFalse.Debug DecoratorTo get debug information of anyof your function, follow the bellow instruction-fromcapslockimportdebug@debugdefadd(number1,number2):returnnumber1+number2if__name__=='__main__':print(add(20,30))will provide you the following output with some debug information-Run Multiple Times DecoratorTo run a function multiple times, use therun_multiple_timesdecorator from capslock package.fromdatetimeimportdatetimefromcapslockimportrun_multiple_times@run_multiple_times(times=10)defcurrent_time():now=datetime.now()returnnow.strftime("%H:%M:%S.%f")if__name__=='__main__':print(current_time())will run the current time function 10 times.Require Root previllege DecoratorIf you want to prevent some accidental execution of a certain part of code
that might cause system-wide changes and you wish the user to have root
previllege before running that part of the python code, just use therequire_rootdecorator from capslock.fromcapslockimportrequire_root@require_rootdefsay_hello():for_inrange(10):print("Hello World")if__name__=='__main__':say_hello()Now,say_hello()will only run, if the user is root.Color your function output decoratorIf you want to see your function output as colorful this method might help you to color your function output.
At present this method support these colorsBLUE, CYAN, GREEN, YELLOW, RED, BOLD, UNDERLINEfromcapslockimportcolor_output@color_output("RED")defhello_color():return"Hey! How are you!"if__name__=='__main__':hello_color()How to ContributeYou can contribute in different ways. You can add more decorators for frequently used tasks in day to day development works.
Package: capsolver
CapsolverCapsolver official python librarySupported CAPTCHA types:HCaptchaFunCaptchaGeetestReCaptchaV2ReCaptchav3MtCaptchaDatadomCloudflareKasadaAkamai BMPInstallationYou don't need this source code unless you want to modify the package. If you just
want to use the package, just run:pip3install--upgradecapsolverInstall from source with:pythonsetup.pyinstallUsageexportCAPSOLVER_API_KEY='...'Or setcapsolver.api_keyto its value:frompathlibimportPathimportosimportbase64importcapsolver# tokenTaskprint("api host",capsolver.api_base)print("api key",capsolver.api_key)# capsolver.api_key = "..."solution=capsolver.solve({"type":"ReCaptchaV2TaskProxyLess","websiteKey":"6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-","websiteURL":"https://www.google.com/recaptcha/api2/demo",})print(solution)# RecognitionTaskimg_path=os.path.join(Path(__file__).resolve().parent,"queue-it.jpg")withopen(img_path,'rb')asf:solution=capsolver.solve({"type":"ImageToTextTask","module":"queueit","body":base64.b64encode(f.read()).decode("utf8")})print(solution)# get current balancebalance=capsolver.balance()# print the current balanceprint(balance)