Saravanan666/pypi-org huggingface dataset:
Package: cbench
Linux/MacOS:Windows:NewsWe have successfully completed the prototyping phase of the Collective Knowledge technology
to make it easier to reproduce AI&ML and deploy it in production with the help of portable CK workflows, reusable artifacts and MLOps
as described in thiswhite paperand theCK presentation.
We are now preparing the second phase of this project to make CK simpler to use, more stable and more user friendly -
don't hesitate to get in touch with theCK authorto know more!IntroductioncBench is a small and cross-platform framework
connected with theopen Collective Knowledge portalto help researchers and practitionersreproduce ML&systems researchon their own bare-metal platforms, participate in collaborative
benchmarking and optimization,
and share results onlive scoreobards.You can try to reproduce MLPerf inference benchmark on your machine usingthis solutionand see public results from the community on thisscoreboard.cBench is a part of theCollective Knowledge project (CK)and usesportable CK solutionsto describe how to download, build, benchmark and optimize applications
across different hardware, software, models and data sets.Platform support:As a host platformAs a target platformGeneric Linux✓✓Linux (Arm)✓✓Raspberry Pi✓✓MacOS✓±Windows✓✓Android±✓iOSTBDTBDObject detection crowd-benchmarking demo on UbuntuInstall prerequisites:sudo apt update
sudo apt install git wget libz-dev curl cmake
sudo apt install gcc g++ autoconf autogen libtool
sudo apt install libfreetype6-dev
sudo apt install python3.7-dev
sudo apt install -y libsm6 libxext6 libxrender-devInstall cbench:python3 -m pip install cbenchInitialize theCK solution for MLPerf:cb init demo-obj-detection-coco-tf-cpu-benchmark-linux-portable-workflowsParticipate in crowd-benchmarking:cb benchmark demo-obj-detection-coco-tf-cpu-benchmark-linux-portable-workflowsSee your results on a publicSOTA dashboard.You can also use the stable Docker image to participate in crowd-benchmarking:sudo docker run ctuning/cbench-obj-detection-coco-tf-cpu-benchmark-linux-portable-workflows /bin/bash -c "cb benchmark demo-obj-detection-coco-tf-cpu-benchmark-linux-portable-workflows"You can also checkall dependencies for this solution.DocumentationOnline docs for the Collective Knowledge technologyFeedbackThis is an ongoing project - don't hesitate tocontact usif you have any feedback and suggestions!AcknowledgmentsWe would like to thank allCK partnersfor fruitful discussions and feedback!Copyright 2020cTuning foundation
Package: cbencryption
# Couchbase Python EncryptionPython encryption for use with the Couchbase Server## AES-256-HMAC-SHA256The AES256CryptoProvider is a symmetric encryption provider for use with Couchbase server to encrypt fields within a JSON document. The provider requires a keystore and the name of the private key used to sign / verify with. Once a provider has been created it needs to be registered with the bucket and then any calls to encrypt_document and decrypt_document will use the provider.The provider can be used like this:```pythonfrom cbencryption import AES256CryptoProvider# create insecure key store and register both public and private keyskeystore = InMemoryKeyStore()keystore.set_key('mypublickey', '!mysecretkey#9^5usdk39d&dlf)03sL')keystore.set_key('myprivatekey', 'myauthpassword')# create and register providerprovider = AES256CryptoProvider(keystore, 'mypublickey', 'myprivatekey')bucket.register_crypto_provider('AES-256-HMAC-SHA256', provider)# encrypt document, the alg name must match the provider name and the kid must match a key in the keystoreprefix = '__crypt_'document = {'message': 'The old grey goose jumped over the wrickety gate.'}encrypted_document = bucket.encrypt_document(document,[{'alg': 'AES-256-HMAC-SHA256', 'name': 'message'}],prefix)# decrypt document using registered providerdecrypted_document = bucket.decrypt_document(encrypted, prefix)```The output JSON looks like the below and can be stored in Couchbase:```json{"__crypt_message": {"alg": "AES-256-HMAC-SHA256","ciphertext": "sR6AFEIGWS5Fy9QObNOhbCgfg3vXH4NHVRK1qkhKLQqjkByg2n69lot89qFEJuBsVNTXR77PZR6RjN4h4M9evg==","sig": "rT89aCj1WosYjWHHu0mf92S195vYnEGA/reDnYelQsM=","iv": "Cfq84/46Qjet3EEQ1HUwSg=="}}```## KeystoreThe key store is a managed way to retrieve keys used during encryption / decryption and the following method is required:```pythondef get_key(key_id):"""Returns the key as byte array"""return b'my-secret-key'```### JavaKeystoreThe key store is a managed way to retrieve keys used during encryption / decryption using a JCEKS keystore. An example of using the JavaKeyStore is below:```pythonfrom cbencryption import JavaKeyStore# create keystore using path to keystore file and its passphrasekeystore = JavaKeyStore('path/to/keystore.jceks', 'keystore_passphrase')```
Package: cbers4asat
cbers4asatDescriçãoBiblioteca Python para realizar a busca e processamento de imagens dos satélites CBERS-04A e AMAZONIA-1.A bibliotecacbers4asatsurgiu da necessidade de automatizar a busca e manipulação de imagens do satélite
sino-brasileiro CBERS-04A utilizando linguagens de programação. Posteriormente foi incluido a automação do satélite AMAZONIA-1.O design do projeto foi inspirado nosentinelsat, onde é possível de forma
intuitiva realizar diversas ações, como:Pesquisar por imagens.Baixar as imagens pesquisadas.Processar as imagens baixadas.Veja todos osexemplos de usona documentação.Também disponível umaInterface de Linha de Comando(CLI) docbers4asatpara Windows e Linux.Clique aqui e saiba mais.Read this README in english (old version of docs)🇺🇸Busque imagens com poucas linhas de códigofromcbers4asatimportCbers4aAPIfromdatetimeimportdate# Inicializando a bibliotecaapi=Cbers4aAPI('email@mail.com')# Área de interesse. Pode ser: bouding box, path row ou polygon.path_row=(229,124)# Buscando metadados. Este exemplo utiliza o path row (órbita/ponto).# Consulte a órbita/ponto: http://www.dgi.inpe.br/documentacao/gradesprodutos=api.query(location=path_row,initial_date=date(2021,6,1),end_date=date(2021,7,1),cloud=100,limit=10,collections=['AMAZONIA1_WFI_L2_DN','CBERS4A_WPM_L4_DN'])# Exibindo os resultadosprint(produtos)Utilize a caixa de ferramenta para os trabalhos mais comuns# Para ver todas as ferramentas disponíveis, verifique a documentaçãofromcbers4asat.toolsimportrgbn_compositeimportrasterioasriofromrasterio.plotimportshow# Criando a composição cor verdadeirargbn_composite(red='./CBERS4A_WPM22812420210704/CBERS_4A_WPM_20210704_228_124_L4_BAND3.tif',green='./CBERS4A_WPM22812420210704/CBERS_4A_WPM_20210704_228_124_L4_BAND2.tif',blue='./CBERS4A_WPM22812420210704/CBERS_4A_WPM_20210704_228_124_L4_BAND1.tif',nir='./CBERS4A_WPM22812420210704/CBERS_4A_WPM_20210704_228_124_L4_BAND4.tif',filename='CBERS4A_WPM22812420210704_TRUE_COLOR.tif',outdir='./STACK')# Plotando a imagemraster=rio.open("./STACK/CBERS4A_WPM22812420210704_TRUE_COLOR.tif")show(raster.read(),transform=raster.transform)Download da biblioteca com pippip install cbers4asatInstalação com a caixa de ferramentaspip install "cbers4asat[tools]"DocumentaçãoVocê pode ler a documentação da biblioteca no link abaixohttps://cbers4asat.readthedocs.io/TCCEsse projeto foi meu objeto de estudo do Trabalho de Conclusão de Curso (TCC) no curso de Bacharelado em Ciência da Computação, você
pode visualizar o PDF neste Link:Repositório Institucional da Universidade Federal de RondôniaContribuiçãoConvido qualquer pessoa a participar contribuindo com código, relatando bugs,
escrevendo documentação, criando tutoriais e discutindo o futuro deste projeto.Para mais informações de como contribuir ao projeto,
leiaao manual de contribuiçãoProgresso do projetoVocê pode acompanhar todo o progresso do desenvolvimento
nopainel de projetosLicençaCopyright (c) 2023 Gabriel RussoCopyright (c) 2020 Sandro KlippelO uso é fornecido sob a Licença do MIT. Veja
emLICENSEpara mais detalhes.
Package: cbexchange
https://github.com/agsimeonov/cbexchangeCurrently this is the only Python implementation of the Coinbase Exchange API that has full coverage.CBExchange has full support for:Private APIMarket Data (Public) APIWebSocket FeedPaginationErrorsCompatibilityThe Library has been fully tested on Python 2.7 however it has been written with Python 3 compatibility in mind so it should have no problems as 2to3 tests pass for all modules.RequirementsYou need to have requests and and websocket-client on your system:pip install requestspip installwebsocket-clientInstallationYou can simply run the following command to install CBExchange:pip install cbexchangeDocumentationhttp://agsimeonov.github.io/cbexchangeTake advantage of the CBExchange documentation. It includes informations for all public modules, functions and parameters. As well as some examples.Bugs/Issueshttps://github.com/agsimeonov/cbexchange/issuesPlease create an issue in the issue tracker if you encounter any bugs/issues. While I have tested most functionality I am yet to write a comprehensive test suite.
Package: cbfa
A bit of dummy patching for FastAPI, class-based handlers. So far withoutselfsupport.Install it:$pipinstallcbfaAnd use:fromtypingimportOptionalfromfastapiimportFastAPIfrompydanticimportBaseModelfromcbfaimportClassBasedapp=FastAPI()wrapper=ClassBased(app)classItem(BaseModel):name:strprice:floatis_offer:Optional[bool]=None@wrapper('/item')classItem:defget(item_id:int,q:Optional[str]=None):return{"item_id":item_id,"q":q}defpost(item_id:int,item:Item):return{"item_name":item.name,"item_id":item_id}
Package: cbgen
cbgenPython wrapper around a BGEN library.
(cbgen documentation).BGENis a file format for
storing large genetic datasets. It supports both unphased genotypes and phased
haplotype data with variable ploidy and number of alleles. It was designed to
provide a compact data representation without sacrificing variant access
performance. This Python package is a wrapper around thebgen
library, a low-memory footprint reader that
efficiently reads bgen files. It fully supports the bgen format specifications:
1.2 and 1.3; as well as their optional compressed formats.InstallationpipinstallcbgenUsage example>>>importcbgen>>>>>>bgen=cbgen.bgen_file(cbgen.example.get("haplotypes.bgen"))>>>bgen.create_metafile("haplotypes.bgen.metafile")>>>mf=cbgen.bgen_metafile("haplotypes.bgen.metafile")>>>print(mf.npartitions)1>>>print(mf.nvariants)4>>>print(mf.partition_size)4>>>part=mf.read_partition(0)>>>gt=bgen.read_genotype(part.variants.offset[0])>>>print(gt.probability)[[1.0.1.0.][0.1.1.0.][1.0.0.1.][0.1.0.1.]]>>>mf.close()>>>bgen.close()AuthorsCarl KadieDanilo HortaLicenseThis project is licensed under theMIT License.
Package: cbh_chembl_id_generator
Unique Identifier Generator for compounds in the Chembiohub Chemical DatabaseDocumentationThe full documentation is athttps://cbh_chembl_id_generator.readthedocs.org.QuickstartInstall cbh_chembl_id_generator:pip install cbh_chembl_id_generatorThen use it in a project:import cbh_chembl_id_generatorFeaturesTODOHistory0.1.0 (2015-05-01)First release on PyPI.
Package: cbh_chembl_ws_extension
An extension to chembl web services to allow additonal functionality for write operations, permissions and collaborationDocumentationThe full documentation is athttps://cbh_chembl_ws_extension.readthedocs.org.QuickstartInstall cbh_chembl_ws_extension:pip install cbh_chembl_ws_extensionThen use it in a project:import cbh_chembl_ws_extensionFeaturesTODOHistory0.1.0 (2014-11-27)First release on PyPI.
Package: cbh_core_ws
Your project description goes hereDocumentationThe full documentation is athttps://cbh_core_ws.readthedocs.org.QuickstartInstall cbh_core_ws:pip install cbh_core_wsThen use it in a project:import cbh_core_wsFeaturesTODOCookiecutter Tools Used in Making This Packagecookiecuttercookiecutter-djangopackageHistory0.1.0 (2014-01-01)First release on PyPI.
Package: cbicqc
CBICQCEssential quality control analysis of routine phantom stability MRI with single session and trend reportingLatest Version : 2022.2.28.1External DependenciesFSL 6.0 or later (https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FslInstallation)PyPi installationpip install cbicqcpip installation from source directorypip install .
Package: cbinsights-scraper
CB Insights ScraperThis project is a scraper for CB Insights, designed to gather information on companies using the public API and web scraping. It provides functionalities to search for companies by name and obtain detailed information about a specific company, including logo, website, description, specifications, news, FAQs, competitors, and address.FeaturesCompany Search: Performs company searches by name.Detailed Company Information: Retrieves detailed information on specific companies, including:LogoWebsiteDescriptionSpecifications (Founded Year, Stage, Total Raised, Last Raised)Recent NewsFrequently Asked Questions (FAQs)CompetitorsAddressInstallationTo install and run this project, follow this command:pipinstallcbinsights-scraperUsageTo use this scraper, you must first import and instantiate the `CBInsights` class from the `cb_insights.py` module. Then, you can use the `company_search` and `company_info` methods to search for companies and obtain detailed information, respectively.Example of Company SearchfromcbinsigthsimportCBInsightscbi=CBInsights.Scraper()search_results=cbi.company_search("Ferrari")print(search_results)Example of Retrieving Detailed Company Informationcompany_details=cbi.company_info("ferrari")print(company_details)LicenseThis project is licensed under the MIT License - see the `LICENSE.md` file for details.
Package: cbinterface
cbinterfacecbinterfaceis a command line tool and library for interfacing with one or more Carbon Black environments.As of now,cbinterfaceprimarily supports Carbon Black PSC EDR (Threathunter) and Carbon Black Response. However, a lot of functionality should also work with other CBC products, like Enterprise Standard. If you're using Enterprise Standard and something doesn't work, open an issue and I can likely swap out an underlying object and have it working quickly.Install & SetupInstall Via pippipinstallcbinterfaceInstall Direct from Githubpip install git+https://github.com/ace-ecosystem/cbinterface2Setup & ConfigureLook herefor help setting up and configuringcbinterfaceto work with your Carbon Black enviroments and according to your preferences.The WikiCheck out theWiki Pagefor detailed documentation and help.That said, if you don't find what you need, have a question about anything, or encounter an issue, open an issue here on Github and I'll help or fix it. If there is interest, I'll create more documentation around any subject.
Package: cbirds
cbirdsCombinator BirdsThis is a port of the haskell packageData.Aviary.Birds. Please check this out if you want to see more details about the birds.cbirdsis a module intended for demonstration purposes rather than functional or practical use. The objective is to
support thecombinator birdsin a pointfree style programming.The only way to make sense of function combinators in python would be in a pointfree context.
Lucky for us, there is apointfreemodule that allows us, e.g., to compose functions smoothly and enable partial application of functions and methods.Pointfree style has a few downsides. I'm afraid this is an unsuccessful attempt to join python pointfree and the
use combinator birds. It is just a matter of time before it becomes an unreadable mess.ExamplesLet's define a function keephalf, keephalf is a function that return the first half of a list.>>> keephalf([1,2,3,4,5,6,7,8,9,10])
[1, 2, 3, 4, 5]I'll start by defining our own (@pointfree) version of length, integer division and and take,
these functions are going to useful in the making of keephalf.@pointfreedefpflen(l):returnlen(l)@pointfreedefdiv(a,x):returna//x@pointfreedeftake(n,l):returnl[0:n]Although the code below does not look like python I can guarantee you that it is!
In the examples bellow the * symbol means function composition (from thepointfreemodule). For the ones wanting to
reach the highest level of bird use, there's a combinator that composes functions: thebluebirdbut for reasons of
readability we'll use * ,for now.The most intuitive birds to use in the making of keephalf is thephoenix.
The phoenix passes a single value through two different functions,
and pass the results to a two-parameter function. We'll also use theidiotbird, that is the identity function.#phoenix x y z w = x (y w) (z w)#idiot x = xkeephalf=phoenix(take,cardinal(div,2)*pflen,idiot)Let's try different birds now, let's use thestarlingand thecardinal.
The starling passes a value straight and also through a function to another function of arity 2, and the
cardinal that swaps the argument order.#starling = x y z = x z (y z)#cardinal x y z = x (z y)keephalf2=starling(cardinal(take),cardinal(div,2)*pflen)We can also use thewarblerand thecardinal__. The warbler is a elementary duplicator, the cardinal__
pass first argument straight, and second argument through a function,
to a two-parameter function#cardinal_ x y z w = x (y w) z#warbler x y = x y ykeephalf3=warbler(cardinal_(take,cardinal(div,2)*pflen))
Package: cbitmap
cbitmapA C-based bitmap implementation.InstallpipinstallcbitmapBasic UsageimportfromcbitmapimportBitmapinit a bitmap# pass a number to init a bitmapsize=100b=Bitmap(size)# or load a bitmap from diskpath='/path/data'b=Bitmap.load(path)setb=Bitmap(100)b.set(10)getb=Bitmap(100)b.set(10)print(b.get(10))# Trueprint(b.get(1))# Falseprint(b.get(100000))# Falsedeleteb=Bitmap(100)b.set(10)print(b.get(10))# Trueb.delete(10)print(b.get(10))# Falseset kmerb=b=Bitmap((1<<32)-1)seq='AAcgagtcatcgatgcAAcgagtcatcgatgctagtcgta'.upper()b.set_kmers(seq,16)Persistenceb=Bitmap(1000)path='/path/data'b.dump(path)b=Bitmap().load(path)len(b)==1000# True
Package: cbitstruct
Aboutcbitstructis a C implementation of thebitstructlibrary. Credits to Erik Moqvist for the originalbitstructlibrary available onGithubandpip.The goal is to provide the same API an idealy to be able to interchangeimport bitstructandimport cbitstruct as bitstruct.Obvious increased performance comes with limitations described below.Installationpip3installcbitstructDocumentationPlease refer to thebitstructdocumentationas the aim of this library is to provide the same API with increased performance.If you are not used tobitstruct, you should seriously consider using it first, before migrating to this library if you require higher performance.LimitationsLimitationWill it be lifted ?All types except padding are limited to 64 bitsMaybe for 'raw' and 'text' typesMay not work on big-endian architecturesMaybeExceptions differ frombitstructProbably notCPython onlyProbably notError messages are unclearWill never be as clear asbitstructPython >= 3.5NoSome limitations are there because I did not get the time or motivation to lift them up. Some other are deeply rooted into this library and may never be lifted.PerformanceComparing tobitstructThe script available intests/test_perf.pymeasures performance comparing to thebitstructlibrary.Here are the result "on my machine" (Ubuntu in Virtualbox on a laptop):byteswap list of int      | x  8.779 (   8.638us ->   0.984us)
byteswap str              | x 17.466 (   9.158us ->   0.524us)
calcsize                  | x139.330 (  61.060us ->   0.438us)
compiled pack             | x 47.389 (  35.968us ->   0.759us)
compiled pack_dict        | x 27.184 (  34.588us ->   1.272us)
compiled pack_into        | x 32.037 (  38.650us ->   1.206us)
compiled pack_into_dict   | x 27.343 (  37.718us ->   1.379us)
compiled unpack           | x 33.928 (  31.278us ->   0.922us)
compiled unpack_dict      | x 21.627 (  31.597us ->   1.461us)
compiled unpack_from      | x 30.622 (  29.977us ->   0.979us)
compiled unpack_from_dict | x 20.479 (  30.936us ->   1.511us)
pack                      | x 77.003 ( 103.030us ->   1.338us)
pack_dict                 | x 53.254 ( 103.255us ->   1.939us)
pack_into                 | x 82.829 ( 119.373us ->   1.441us)
pack_into_dict            | x 52.173 ( 108.135us ->   2.073us)
unpack                    | x 78.459 (  91.896us ->   1.171us)
unpack_dict               | x 40.287 (  89.300us ->   2.217us)
unpack_from               | x 77.027 (  91.202us ->   1.184us)
unpack_from_dict          | x 39.467 (  88.043us ->   2.231us)Disclaimer:these results may and will vary largely depending on the number of elements and types you pack/unpack. This script is provided as-is, and I will gladly accept an improved script providing more reliable results.The dict APIThedictAPI is marginally slower than the traditional one. As the packing/unpacking performance is quite high, the overhead of performing dictionary lookups and hashing significantly increas pack and unpacking duration.
Package: cb-kafka-consumer
Yet another kafka consumer!InstallationTo use the consumer you can add it as a dependency to your project.PIPpython-mpipinstall--usercb-kafka-consumerPipfile[packages]
cb-kafka-consumer = "~=0.1.5"An example decoder / handlerMake sure to use the right values to initiateCBKafkaConsumer.
It is necessary to pass the right decoder callback to decode the received raw message.
An example json decoder is provided below.importjsonimportloggingfromcb_kafka_consumer.src.consumerimportCBKafkaConsumer,MessageclassMyConsumer:def__init__(self):self.__consumer=CBKafkaConsumer('127.0.0.1:9092','my-group-id','my-topic',self.__handler,self.__decoder,start_from='latest')self.__consumer.start()def__handler(self,msg:Message):print(msg.get_offset(),msg.msg)self.__consumer.commit(msg)def__decoder(self,raw_msg:bytes):try:returnjson.loads(raw_msg)exceptValueError:logging.error(f'Message cannot be parsed\n{raw_msg}')returnNoneCommit policyThere are two different approaches dealing with commit policy.auto_commit=TrueYou can useauto_commit=Truewhen initiating the consumer to instruct it to automatically
commit received messages right after they have been handed over to the handler callback. When
usingauto_commit, the handler callback is not expected to explicitly call thecommitmethod of consumer object.auto_commit=False (default behavior)Ifauto_commitis not specified or set toFalsethe consumer will only commit messages
right before the item in the sequence where it's not committed(handling may have probably failed).
To further demonstrate this let's assume we the consumer has received messages with the following
offsets:1, 2, 3, 4, 5The consumer now hands over the received messages to the handler callback. Now let's say the callback
processes message #1 and #2 successfully and commits these two messages but fails to process #3. Next,
messages #4 and #5 are successfully processed and committed. The consumer will only commit message #1
and #2 and will not commit succeeded messages untilcommitis called with message #3 and will
only then move onward.Where to start receiving messages fromTo control the start point thestart_fromargument of constructor can be utilized. It accepts either
string values ('earliest', 'latest') or integer values.
In case you might need to start from a specific message use its offset asstart_from.
Let's say you need to start the consumer and instruct it to start from message with offset3743313.
The below statement constructs an instance of consumer as desired:self.__consumer=CBKafkaConsumer('127.0.0.1:9092','my-group-id','my-topic',handler_method,decoder_method,start_from=3743313)