Saravanan666/pypi-org huggingface dataset:
Package: cocotbext-uart
UART interface modules for CocotbGitHub repository:https://github.com/alexforencich/cocotbext-uartIntroductionUART simulation models forcocotb.InstallationInstallation from pip (release version, stable):$ pip install cocotbext-uartInstallation from git (latest development version, potentially unstable):$ pip install https://github.com/alexforencich/cocotbext-uart/archive/master.zipInstallation for active development:$ git clone https://github.com/alexforencich/cocotbext-uart
$ pip install -e cocotbext-uartDocumentation and usage examplesSee thetestsdirectory andverilog-uartfor complete testbenches using these modules.UARTTheUartSourceandUartSinkclasses can be used to drive, receive, and monitor asynchronous serial data.To use these modules, import the one you need and connect it to the DUT:from cocotbext.uart import UartSource, UartSink

uart_source = UartSource(dut.rxd, baud=115200, bits=8)
uart_sink = UartSink(dut.rxd, baud=115200, bits=8)To send data into a design with aUartSource, callwrite()orwrite_nowait().  Accepted data types are iterables of ints, including lists, bytes, bytearrays, etc.  Optionally, callwait()to wait for the transmit operation to complete.  Example:await uart_source.send(b'test data')
# wait for operation to complete (optional)
await uart_source.wait()To receive data with aUartSink, callread()orread_nowait().  Optionally callwait()to wait for new receive data.read()will block until at least 1 data byte is available.  Bothread()andread_nowait()will return up tocountbytes from the receive queue, or the entire contents of the receive queue if not specified.data = await uart_sink.recv()Constructor parameters:data: data signalbaud: baud rate in bits per second (optional, default 9600)bits: bits per byte (optional, default 8)stop_bits: length of stop bit in bit times (optional, default 1)Attributes:baud: baud rate in bits per secondbits: bits per bytestop_bits: length of stop bit in bit timesMethodswrite(data): senddata(blocking) (source)write_nowait(data): senddata(non-blocking) (source)read(count): readcountbytes from buffer (blocking) (sink)read_nowait(count): readcountbytes from buffer (non-blocking) (sink)count(): returns the number of items in the queue (all)empty(): returnsTrueif the queue is empty (all)idle(): returnsTrueif no transfer is in progress (all) or if the queue is not empty (source)clear(): drop all data in queue (all)wait(): wait for idle (source)wait(timeout=0, timeout_unit='ns'): wait for data received (sink)
Package: cocotbext-vidio
vidio (video io)This generates the AXIStream frame for video subsystems to be used with cocotb.This generates the AXIStream frame for video subsystems to be used with cocotb.Functions:GenAXIStream: Generates an AXIS frameConvertAXIStreamCS: Converts color space RGB to YUV [In development]Roadmap:AXIS to matrix [Add 422, 420]Matrix to AXISGenerate color bars AXIS/matrix, supporting ITU-R BT.601-7, ITU-R BT.709-5Color convertionChroma convertionVideo to SMPTE-2110 packetReferences:Xilinx TPGcocotbcocotbext-axi
Package: cocotb-vivado
cocotb-vivadoA limited Python/cocotbinterface to theXilinx Vivado Simulatorsimulator.
Based oncocotb-stub-sim.The project is at a proof of concept stageOnly top-level ports are accessible.It supports theTimertrigger.Setting signal values is immediate, as one would usesetimmediatevalue.OnlyVerilogat the top level is supported (to do).Installationpip install cocotb-vivadoUsageSee thetestsfolder for examples.source ../Vivado/202X.X/settings64.sh
export LD_LIBRARY_PATH=$XILINX_VIVADO/lib/lnx64.o
pytest -sAcknowledgmentWe'd like to thank our employer,Dectrisfor supporting this work.
Package: coco-toolkit
IntroductionCoco-toolkit is a tool for preparing and analyzing object detection data which is coco json format in Python. Tool countains merge, preprocessing, report and converter modules.1 - Preprocessing
This class obtain preprocess functions for preparing coco json dataset.2 - Converter
This module has converters functions which are Pascal voc to coco json and coco json to tfrecords.3 - Merge
Merge module has multiple coco merge function.
It merges all given coco json file and return all in one output folder.4- Report
Report module has analyze dataset functions. These functions are; return information of data set, plots data set information as pie chart, and integrates data set with coco viewer.System requirementsInstallationBasic usage1 - Import1.1 -Import preprocessfrom coco_toolkit.helper.preprocess import PreProcess1.2 -Import mergefrom coco_toolkit.helper.merge import merge_multiple_cocos1.2 -Import reportfrom coco_toolkit.helper.report import AnalyzeCategories2 - Sample usage2.1 - Usage filter classThis function filter given class names. It returns filtered coco json as dictionary and saves filtered coco json file and filtered images in new folder.PreProcess(path).export_according2_class(coco, categories, image_path)parameter path : This parameter is directory of output.Function saves
filtered dataset in this path.parameter coco : Coco json file as read dictionaryparameter categories : List of to be filtered class namesparameter image_path: Dataset images folder pathcoco = PreProcess(path to coco json file).reader()PreProcess(path).export_according2_class(coco, ["human", "car"], "/home/user/data/images")Check before PRblack.--configpyproject.toml
isort.
pre-commitrun--all-files
Package: cocotostphoto
CocoToSTPhotoCOCO DataSet instances to STPhotoCopyright (c) 2019InfoLab(Donggun LEE)https://pypi.org/project/cocotostphoto/HOW TO USEpythonCocoToSTPhoto.py"d:/instances""c:/annotation/stphoto.json""d:/images"pythonCocoToSTPhoto.py"d:/instances/instances_val2018.json""c:/annotation/stphoto.json","d:/images"#input file or folder                   output file          image folderHOW TO INSTALL#NEED Python 3.6pipinstalldeepgeo,cocotostphoto
Package: coco-types
COCO TypesPackage for handling COCO datasets types.Note: This package loads the data as is and does not create dictionaries mapping ids to lists of images/annotations/categories.InstallationThe package is available on pypihere, you can install it with:pip install coco-typesLoading COCO dataYou can load COCO dataset labels into Pydantic objects by using theDatasetandDatasetKPclasses.For an object detection dataset:importcoco_typeswithopen("path/to/json",encoding="utf-8")asdata_file:dataset=coco_types.Dataset.parse_raw(data_file.read())For a keypoint detection dataset:importcoco_typeswithopen("path/to/json",encoding="utf-8")asdata_file:dataset=coco_types.DatasetKP.parse_raw(data_file.read())Usage example:importcoco_typeswithopen("path/to/json",encoding="utf-8")asdata_file:dataset=coco_types.Dataset.parse_raw(data_file.read())img=dataset.images[0]print(f"Image's filename{img.file_name}")print(f"Image's id{img.id}")print(f"Image's height{img.height}")print(f"Image's width{img.width}")img_annotations=[annotationforannotationindataset.annotationsifannotation.image_id==img.id]ann=img_annotations[0]print(f"Annotation's id:{ann.id}")print(f"Annotation's image id:{ann.image_id}")print(f"Annotation's category id:{ann.category_id}")print(f"Annotation's iscrowd:{ann.iscrowd}")print(f"Annotation's bbox:{ann.bbox}")print(f"Annotation's area{ann.area}")forcatindataset.categories:ifcat.id==ann.category_id:breakprint(f"Category's name{cat.name}")print(f"Category's supercategory{cat.supercategory}")KeypointsIf using a dataset with keypoints (coco_types.DatasetKP), then annotations will have two additional attributes:keypointsandnum_keypoints.In the same way, categories will have  two additional attributes:keypointsandskeleton.TypedDict versionsATypedDictversion of the pydantic models can be accessed usingcoco_types.dicts.*(for examplecoco_types.dicts.Dataset). This can be useful if you have data that is slightly malformed / follows a slightly different format but is still usable.
Package: coco-utils
coco_utilsA set of utility functions to process object detection (coco) datasets.SummaryCOCO wrapper,  Use coco_utils COCO function which has extra properties likelabel_counts,label_presence,img_wise_counts,label_names,label_names_available,count_images.fromcoco_utils.cocoimportCOCOx=COCO("data/annotations/instances_val2017.json")plot labelsfunction is used to plot and savelabels_correlogram.jpgandlabels.jpgfiles.fromcoco_utils.plotsimportplot_coco_labelsloc="data/annotations/instances_val2017.json"plot_coco_labels(loc,"data/outputs/")Summary of set upClone the repo and dopoetry install. To install poetry on yoursystem/server.How to run tests ?TODOHow to use ?poetry add coco_utilsorpip install coco_utilsDeployment instructionspoetry build&poetry publishWho do I talk to?Repo owner or adminPrakash VanapalliOther community or team contact.
Package: coc.py
coc.pyEasy to use asynchronous Clash of Clans API wrapper in Python.Key FeaturesAsynchronous codeEntire coverage of the official Clash of Clans APIEmail/password login removes the stress of managing tokensOptimised for speed, memory and performanceGetting StartedInstallingPython 3.7 or higher is required# Linux/macOSpython3-mpipinstall-Ucoc.py# Windowspy-3-mpipinstall-Ucoc.py# to install the development version:python3-mpipinstall-Ugit+https://github.com/mathsman5133/coc.pyQuick ExampleThis is the basic usage of the library.
This example will get a player with a certain tag, and search for 5 clans with a name.importasyncioimportcocasyncdefmain():asyncwithcoc.Client()ascoc_client:try:awaitcoc_client.login("email","password")exceptcoc.invalidcredentialsaserror:exit(error)player=awaitcoc_client.get_player("tag")print(f"{player.name}has{player.trophies}trophies!")clans=awaitcoc_client.search_clans(name="best clan ever",limit=5)forclaninclans:print(f"{clan.name}({clan.tag}) has{clan.member_count}members")try:war=awaitcoc_client.get_current_war("#clantag")print(f"{war.clan_tag}is currently in{war.state}state.")exceptcoc.privatewarlog:print("uh oh, they have a private war log!")if__name__=="__main__":try:asyncio.run(main())exceptKeyboardInterrupt:passBasic Events ExampleThis script will run forever, printing to the terminal
whenever someone joins the clan or a member of the clan donates troops.importasyncioimportloggingimportcoc@coc.ClanEvents.member_join()asyncdeffoo(player,clan):print(f"{player.name}({player.tag}) just joined{clan.name}({clan.tag})")@coc.ClanEvents.member_donations()asyncdefbar(old_member,member):troops_donated=member.donations-old_member.donationsprint(f"{member.name}just donated{troops_donated}troops!")asyncdefmain():coc_client=coc.EVentsClient()try:awaitcoc.login("email","password")exceptcoc.InvalidCredentialsaserror:exit(error)# Register all the clans you want to monitorlist_of_clan_tags=["tag1","tag2","tag3"]coc_client.add_clan_updates(*list_of_clan_tags)# Register the callbacks for each of the events you are monitoringcoc_client.add_events(foo,bar)if__name__=="__main__":logging.basicConfig(level=logging.INFO)log=logging.getLogger()loop=asyncio.get_event_loop()try:loop.run_until_complete(main())loop.run_forever()exceptKeyboardInterrupt:passFor more examples see the examples directoryContributingContributing is fantastic and much welcomed! If you have an issue, feel free to open an issue and start working on it.If you wish to run, setup or work on documentation, you will need to installsphinxand a few related dependencies.
These can be installed with:pipinstall-rdoc_requirements.txtcddocsmakehtmlIf you wish to run linting, pylint, black and flake8 have been setup and can be run with:pythonsetup.pylintLinkscoc.py DocumentationOfficial Clash of Clans API PageClash of Clans API Discord ServerDisclaimerThis content is not affiliated with, endorsed, sponsored, or specifically
approved by Supercell and Supercell is not responsible for it.
For more information seeSupercell’s Fan Content Policy.
Package: cocpyth
cocpythTable of ContentsInstallationLicenseInstallationpip install cocpythUsageSimply typecocpythpress enter and follow the prompts to generate a character. Don't forget to use tab for autocompletion goodness!Licensecocpythis distributed under the terms of theMITlicense.This python package uses trademarks and/or copyrights owned by Chaosium Inc/Moon Design Publications LLC,which are used underChaosium Inc’s Fan Material Policy.We are expressly prohibited from charging you to use or access this content. This package is not published, endorsed, orspecifically approved by Chaosium Inc. For more information about Chaosium Inc’s products, please visitwww.chaosium.com.You agree to use your best efforts to preserve the high standard of our intellectual property.

You agree to present Chaosium Inc, our products, and the Chaosium Inc/Moon Design Publications Material in a generally positive light.

You agree to not use this permission for material that depicts:
excessive graphic violence or gore;
sexual abuse, pornography, gratuitous nudity of human or humanoid forms, genitalia, or sexual activity;

existing real-world minorities, nationalities, social castes, religious groups or practices, political preferences, gender identities,
sexual orientation, or people with disabilities, as a group inferior to any other group or in a way that promotes disrespect for those groups
or practices, or that endorses those groups or practices over another.

Call of Cthulhu © copyright 1981–2023 Chaosium Inc. All rights reserved.
Package: cocrawler
CoCrawlerCoCrawler is a versatile web crawler built using modern tools and
concurrency.Crawling the web can be easy or hard, depending upon the details.
Mature crawlers like Nutch and Heritrix work great in many situations,
and fall short in others. Some of the most demanding crawl situations
include open-ended crawling of the whole web.The object of this project is to create a modular crawler with
pluggable modules, capable of working well for a large variety of
crawl tasks. The core of the crawler is written in Python 3.5+ using
coroutines.StatusCoCrawler is pre-release, with major restructuring going on. It is
currently able to crawl at around 170 megabits / 170 pages/sec on a 4
core machine.Screenshot:InstallingWe recommend that you use pyenv, because (1) CoCrawler requires Python
3.5+, and (2) requirements.txt specifies exact module versions.git clone https://github.com/cocrawler/cocrawler.git
cd cocrawler
make init  # will install requirements using pip
make pytest
make test_coveragePluggable ModulesPluggable modules make policy decisions, and use utility routines
to keep policy modules short and sweet.An additional set of pluggable modules provide support for a variety
of databases. These databases are mostly used to orchestrate the
cooperation of multiple crawl processes, enabling the horizontal
scalability of the crawler over many cores and many nodes.Crawled web assets are intended to be stored as WARC files, although
this interface should also pluggable.RankingEveryone knows that ranking is extremely important to search queries,
but it's also important to crawling. Crawling the most important stuff
is one of the best ways to avoid crawling too much webspam, soft 404s,
and crawler trap pages.SEO is a multi-billion-dollar industry created to game search engine
ranking, and any crawl of a wide swath of the web is going to run into
poor-quality content attempting to appear to have high quality.
There's little chance that CoCrawler's algorithms will beat the most
sophisticated SEO techniques, but a little ranking goes a long way.CreditsCoCrawler draws on ideas from the Python 3.4 code in "500 Lines or
Less", which can be found athttps://github.com/aosabook/500lines.
It is also heavily influenced by the experiences that Greg acquired
while working at blekko and the Internet Archive.LicenseApache 2.0
Package: cocuni-module
python-module-resourcesImport non-python files in a project directory as python namedtuple objects.If you've ever worked in node, you might be familiar with a language feature which allows you to pull in a json file as an imported module.import { dataStuff } from 'myProjectResources/jsonFiles'

dataStuff.contents === "A rich javascript object"Withmodule_resources, you can achieve something similar in python.frommy_project_resources.json_filesimportdata_stuffdata_stuff.contents=='A python namedtuple instance'CaveatsThere are some caveats to be aware of.Valid vs. invalid namedtuple field names>>>frommodule_resources.examples.jsonimportlogging_config>>>logging_config.loggers.__main__git checkout master
git pull origin master
# examples of preparing a new tag for release
make tag-patch # also accepts: tag-minor, tag-major
git push origin --tags
Package: cocy
OverviewCoCy provides components for UPnP based on
thecircuits framework. Read thePackage Documentationfor details.The source is maintained atgithub. Please use theissue trackerthere to report any issues.RequirementsCoCy depends on thePython Standard Library,
thecircuits frameworkin the 2.1 version,
the general purposecircuits-brickscomponents and therbtranslationslibrary.InstallationThe simplest and recommended way to install CoCy is with
easy_install:> easy_install cocyAlternatively, you may download the source package from thecocy Page on PyPIor fromgithub, extract it
and install using:> python setup.py installLicenseCoCy is licensed under theGPL License.
Package: cod
codeasy to use the click package to add command for a interactive terminal!support autocompetationsupport arrow up or down for history commandInstallingInstall and update usingpip:pip install -U codA Simple Exampleimport click

from cod import main, echo

@click.option('--name', prompt='Your name',
            help='The person to greet.')
@click.command()
def hello(name):
    echo(name)

main()
Package: coda
Coda is a file system organizer, designed for data scientists who frequently deal
with large amounts of heterogeneous data. In this age where data rules all, being able to
efficiently search and label those data is paramount to maintaining productivity. Coda
allows you to tag files with arbitrary metadata, so that you can stay organized when
managing/analyzing large datasets over time.As a quick example of how coda might be useful for organizing an arbitrary dataset,
see the following example (see thedocumentationfor more in-depth documentation):>>>importcoda>>>>>># generate a collection of files from a directory>>>cl=coda.Collection('/path/to/test/data')>>>>>># show all of the files in the structure>>>printcl/path/to/test/data/type1.txt/path/to/test/data/type1.csv/path/to/test/data/type2.txt/path/to/test/data/type2.csv>>>>>># set properties about the collection>>>cl.group='test'>>>cl.cohort='My Cohort'>>>>>># add the files in the collection to the database>>># for tracking and retrieval later>>>coda.add(cl)>>>>>># do the same with a training dataset>>>cl=coda.Collection('/path/to/train/data',metadata={'group':'train'})>>>coda.add(cl)>>>>>># wait ... add one more file in a different location to>>># the training set>>>fi=coda.File('/my/special/training/file.csv')>>>fi.group='train'>>>coda.add(fi)>>>>>># ... later in time ...>>>>>># query all of our training files>>>cl=coda.find({'group':'train'})>>>printcl/path/to/train/data/type1.txt/path/to/train/data/type1.csv/path/to/train/data/type2.txt/path/to/train/data/type2.csv/my/special/training/file.csv>>>>>># filter those by csv files>>>printcl.filter(lambdax:'.csv'inx.name)/path/to/train/data/type1.csv/path/to/train/data/type2.csv/my/special/training/file.csv>>>>>># tag the special file with new metadata>>>cl.files[-1].special=True>>>coda.add(cl.files[-1])>>>>>># query it back (for the example)>>>fi=coda.find_one({'special':True})>>>printfi.metadata{'group':'train','special':True}DocumentationFor installation and usage instructions please see thedocumentation.Questions/FeedbackFile an issue in theGitHub issue tracker.
Package: codabl
The Codabl API is a collection of analytics tools and data integrations made for blockchain developers. In particular we offer Natural Language Processing and Anomaly detection algorithms that have been fine tune to understand text data and time series in the domain speficic setting of cryptocurrency and blockchain technology. This technology is intended to be use as building blocks to bigger applications, we offer examples on how to use them for Trading Backtesting and Smart Contract anomaly monitoring.  # noqa: E501
Package: codableopt
codable-model-optimizerOptimization problem meta-heuristics solver for easy modeling.InstallationUse pip$pipinstallcodableoptUse setup.py# Master branch$gitclonehttps://github.com/recruit-tech/codable-model-optimizer$python3setup.pyinstallExample UsageSample1importnumpyasnpfromcodableoptimport*# set problemproblem=Problem(is_max_problem=True)# define variablesx=IntVariable(name='x',lower=np.double(0),upper=np.double(5))y=DoubleVariable(name='y',lower=np.double(0.0),upper=None)z=CategoryVariable(name='z',categories=['a','b','c'])# define objective functiondefobjective_function(var_x,var_y,var_z,parameters):obj_value=parameters['coef_x']*var_x+parameters['coef_y']*var_yifvar_z=='a':obj_value+=10.0elifvar_z=='b':obj_value+=8.0else:# var_z == 'c'obj_value-=3.0returnobj_value# set objective function and its argumentsproblem+=Objective(objective=objective_function,args_map={'var_x':x,'var_y':y,'var_z':z,'parameters':{'coef_x':-3.0,'coef_y':4.0}})# define constraintproblem+=2*x+4*y+2*(z=='a')+3*(z==('b','c'))<=8problem+=2*x-y+2*(z=='b')>3print(problem)solver=OptSolver()# generate optimization methods to be used within the solvermethod=PenaltyAdjustmentMethod(steps=40000)answer,is_feasible=solver.solve(problem,method)print(f'answer:{answer}, answer_is_feasible:{is_feasible}')Sample2importrandomfromitertoolsimportcombinationsfromcodableoptimportProblem,Objective,CategoryVariable,OptSolver,PenaltyAdjustmentMethod# define distance generating functiondefgenerate_distances(args_place_names):generated_distances={}forpoint_to_pointincombinations(['start']+args_place_names,2):distance_value=random.randint(20,40)generated_distances[point_to_point]=distance_valuegenerated_distances[tuple(reversed(point_to_point))]=distance_valueforxin['start']+args_place_names:generated_distances[(x,x)]=0returngenerated_distances# generate TSP problemPLACE_NUM=30destination_names=[f'destination_{no}'fornoinrange(PLACE_NUM)]place_names=[f'P{no}'fornoinrange(PLACE_NUM)]distances=generate_distances(place_names)destinations=[CategoryVariable(name=destination_name,categories=place_names)fordestination_nameindestination_names]# set problemproblem=Problem(is_max_problem=False)# define objective functiondefcalc_distance(var_destinations,para_distances):returnsum([para_distances[(x,y)]forx,yinzip(['start']+var_destinations,var_destinations+['start'])])# set objective function and its argumentsproblem+=Objective(objective=calc_distance,args_map={'var_destinations':destinations,'para_distances':distances})# define constraint# constraint formula that always reaches all points at least onceforplace_nameinplace_names:problem+=sum([(destination==place_name)fordestinationindestinations])>=1# optimization implementationsolver=OptSolver(round_times=4,debug=True,debug_unit_step=1000)method=PenaltyAdjustmentMethod(steps=10000,delta_to_update_penalty_rate=0.9)answer,is_feasible=solver.solve(problem,method,n_jobs=-1)print(f'answer_is_feasible:{is_feasible}')root=['start']+[answer[root]forrootindestination_names]+['start']print(f'root:{" -> ".join(root)}')
Package: codabl-python
The Codabl API is a collection of analytics tools and data integrations made for blockchain developers. In particular we offer Natural Language Processing and Anomaly detection algorithms that have been fine tune to understand text data and time series in the domain speficic setting of cryptocurrency and blockchain technology. This technology is intended to be use as building blocks to bigger applications, we offer examples on how to use them for Trading Backtesting and Smart Contract anomaly monitoring.  # noqa: E501