Saravanan666/pypi-org huggingface dataset:
Package: cfg-service
Configuration ServiceDescriptionTo load an application always is needed parameters of variables. Some of them can be diferents depending on the environment you want to deploy. This library takes care of it.InstallationThis project has an automated deployment to pypi, so only is needed to use pip command:>> pip install cfg-serviceAfter installation you have available a package calledcfgsrv. The project depends of librarypyyamlif it uses yaml files to define variables.UsageTo be documented.SupportSend any suggestion tosruiz@indoorclima.comorsalvador.ruiz.r@gmail.com. Any ideas or support is well recieved.RoadmapIncrement versioning when pushingIntegrate with gitlab continuous integration to publish to pypi as libraryImprove coverage rate to > 96%Improve usage documentation with sphinxUpload to readthedocsContributingState if you are open to contributions and what your requirements are for accepting them.For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.Authors and acknowledgmentWe would like to thank the contribution of
For sure the ideas of Eric Evans and Domain Design Development are the base of this project to be used with python language. Without this seed it has not sensseLicenseThis is under LGPL lincense. You can use and modify this library.Project statusIt is used in projects developed currently by the company IndoorClima.
Package: cfgstack
CfgStack is a configfile system reader.  System?  Yeah.  In reading
and parsing one file, CfgStack can be directed to go read other files
and to incorporate their contents into the growing dataset.CfgStack ("somefile")Attempts to load the named file as JSON/YAML/TOML with default
extensions of json/yaml/yml/toml (can be over-ridden).  The loaded
object must be a dictionary.  The “data” member of the resulting
object is an addict Dict of the loaded dataset.  So far so simple._include_:
  - file1
  - file2
_default_:
  zero: 0
  one: 1
foo:
  this: that
  zero: null
var: value
bar:
  _default_:
    inner: inside_bar
  inside:
    oh: boy
    yep: really
baz:
  _include_:
    - file3A few things going on here:“_include_” keys are assumed to list additional data files which
will be loaded and their contents merged with the dictionary at the
same level.  If multiple files are listed, they will be applied in
order from the top down.  Files are searched for in the CWD or
optionally in a list of passed paths.“_default_” keys provide default key:value pairs for all
dictionary values at the current levelNote that all includes are applied first, then all defaults. Higher
level values override lower level values, across both includes and
defaults (includes first) and both for contents and data-type.
Package: cfgtodict
-- ConfigToDictionaryConvert a python config file of to a python dictionary-- ExampleReturn the information in `info.cfg` as a `JSON` response from a `Flask` server:info.cfg----------[info]name = riskversion = 1description = A simple game of chance. Risk 1000 Satoshis, win 2000, or lose them all.project = https://github.com/joelklabo/risk[risk]price = 1000description = 49/100 chance you will double your satoshis```server.py----------from flask import Flaskfrom flask.ext.responses import json_responsefrom cfgtodict import ConfigToDictionaryapp = Flask(__name__)@app.route('/info')def info():about = ConfigToDictionary('info.cfg').dict()return json_response(about)```JSON response----------{"info": {"description": "A simple game of chance. Risk 1000 Satoshis, win 2000, or lose them all.","name": "risk","project": "https://github.com/joelklabo/risk","version": "1"},"risk": {"description": "49/100 chance you will double your satoshis","price": "1000"}}```
Package: cfgtree
Free software: MITDocumentation:https://cfgtree.readthedocs.org/en/latest/Source:https://github.com/gsemet/cfgtreeDescriptionThis package provides an easy yet comprehensive way of describing, storing, parsing, modifying
user configuration for a modern application.It requires the following acknolegdments:Application settings are stored in a hierarchical structure, they can be organized into
group of settings, subgroups, and they entierely depends on the application itself.This structure is called in cfgtree a “bare configuration”, or “configuration tree”, and is
described by a “model”.User settings may come from different inputs:environment variables (“12-factors” approach). Example:MYAPP_VERBOSE.command line argument. Example:--verboseconfiguration storage such as file (json, yaml, ini) or configuration server. Example:{"verbose":true{This allows you to define once your settings structure, and let the user of your application define
the settings throught different ways. For instance, your application can read some settings through
command line arguments, which is very useful for containerization of your application. It is indeed
recommended byHeroku’s 12 Factor Good Practices.Describing your configuration through a model also allows to have a configuration validator without
having to maintain both a file schema (ex: JSON Schema) and the parsing logic code.Access to settingsIn your application, an xpath-like syntax allows you to reach any item of the configuration:cfg.get_cfg_value("key1.key2.key3.item").To modify a key configuration, usecfg.set_cfg_value("key1.key2.key3.item","new_value"). File
is actually written on call ofcfg.save_configuration()or automatically when autosave is set.See the documentation for full explanation.Similar opensource projectsOpenstack’sOlso.configDocumentationFull documentation is provided onReadTheDocs.
Package: cfgur
cfgur (configure)Load environment vars, and command line arguments in a predictable, standardized way.This package wraps argparse, loading config from environment variables as well as the usual command line arguments / flags. A config object is passed into init(), configuring argparse. The environment variables are implied from the arg name (stripped, uppercased and underscored), but can be manually defined using the key "env_var" in args config. Once args are loaded, config is accessable using a getter function "get()". To get all variables, use get_all(). The args object keys are passed to parser.add_argument().InstallationThe cfgur package is available on PyPI which means installation should be as simple as:$ pip install cfgurUsageimportcfgur# Initialize once, pass in configcfgur.init({"parser":{"description":"this is the service description"},"args":[{"name":"-test","help":"Description of test","default":"test-db","required":False,},{"name":"--foo","required":True,},{"name":"-f","required":False,"env_var":"LETTER_F",}]})# Return value of config. If missing, return Nonemy_config=cfgur.get_all()# Return value of config. If missing, return Nonetest_val=cfgur.get("test")# Return value of config. If missing, raise KeyErrortest_val=cfgur.get("test",True)LicenseThis software is licensed under the MIT license.© 2018 Bray Almini.
Package: cfgutils
CFGUtilsA Utility library for working with Control Flow Graphs (CFGs) in Python. This library implements previous academic
and industrial research in the field of CFGs. It is also the home of the CFGED algorithm, refered to as Basque-CFGED, created in the USENIX Security
2024 Paper"Ahoy SAILR! There is No Need to DREAM of C: A Compiler-Aware Structuring Algorithm for Binary Decompilation".If you use this library in your research, please cite the SAILR paper.Installpip3installcfgutilsUsageCFGUtils is used on Networkx DiGraphs. Most analysis assumes the graph is composed ofGenericBlocknodes.
The nodes a very simple and can be subclassed to represent different kinds of blocks.All algorithms in this library have a testcase, which can be found in thetests.pyfile.Region IdentificationRegions here are defined asSingle-Entry Single-Exit (SESE)subgraphs of the CFG.
These regions are mostly used in the context of control flow recovery and decompilation.fromcfgutils.data.generic_blockimportGenericBlockfromcfgutils.regions.region_identifierimportRegionIdentifierimportnetworkxasnxblocks=[GenericBlock(i)foriinrange(9)]numbered_edges=[(1,2),(1,3),(2,4),(3,4),(4,5),(4,6),(5,7),(6,7)]block_edges=[(blocks[in_e],blocks[out_e])for(in_e,out_e)innumbered_edges]graph=nx.DiGraph(block_edges)ri=RegionIdentifier(graph)top_region=ri.regionprint(top_region.graph.nodes)SubclassGenericBlockto use different kinds of blocks in your graph.Basque CFGEDThe Basque CFGED algorithm is a graph edit distance algorithm for CFGs. To use it you need to have two CFGs and a mapping of the nodes between the two graphs.
Not all nodes need to be mapped, just as many as you can do.importnetworkxasnxfromcfgutils.similarityimportcfg_edit_distancefromcfgutils.dataimportnumbered_edges_to_block_graphg1:nx.DiGraph=numbered_edges_to_block_graph([(1,2),(1,3),(3,6.2),(3,5),(5,6.2),(2,6.1)])g2:nx.DiGraph=numbered_edges_to_block_graph([(1,2),(1,3),(3,4),(3,5),(4,6),(5,6),(2,6)])mapping={n:{n}forninrange(7)}# see tests for an explanationassertcfg_edit_distance(g1,g2,mapping,mapping)==5FeaturesRegion IdentificationGraph Edit Distance:Basque CFGEDAbu-Aisheh GEDHu CFGEDDominator Trees
Package: cfig
cfigA configuration manager for Python[Example|Documentation|PyPI]importcfigconfig=cfig.Configuration()@config.required()defSECRET_KEY(val:str)->str:"""Secret string used to manage HTTP session tokens."""returnvalif__name__=="__main__":config.cli()frommypackage.mycfigimportSECRET_KEYprint(f"My SECRET_KEY is:{SECRET_KEY}")$python-mmypackage.mycfig===== Configuration =====SECRET_KEY    → Required, but not set.Secret string used to manage HTTP session tokens.===== End =====
Package: cfile
cfileA C code generator written in Python 3.UsageimportcfileasChello=C.cfile('hello.c')hello.code.append(C.sysinclude('stdio.h'))hello.code.append(C.blank())hello.code.append(C.function('main','int',).add_param(C.variable('argc','int')).add_param(C.variable('argv','char',pointer=2)))body=C.block(innerIndent=3)body.append(C.statement(C.fcall('printf').add_arg(r'"Hello World!\n"')))body.append(C.statement('return 0'))hello.code.append(body)print(str(hello))#include<stdio.h>intmain(intargc,char**argv){printf("Hello World!\n");return0;}RequiresPython 3
Package: cfinterface
cfinterfacePython package that contains a framework for dealing with custom file formats, modulating reading, data formatting and writing in a scalable and modular way.Summarycfinterfaceis a framework for designing low-level interfaces that depends on complex text or binary file parsing. It provides components for modeling lines, registers, blocks and sections in a declarative way and aggregate these blocks as components for defining files.Suppose that a complex text file needs to be parsed and the contents of lines with a specific identifier must be extracted and validated. For instance, the line follows the format:DATA_HIGH  ID001   sudo.user  10/20/2025  901.25IfDATA_HIGHis the identifier that specifies the lines to be read, than one can model it with theRegisterclass in thecfinterfaceframework.classDATA_HIGH(Register):IDENTIFIER="DATA_HIGH"IDENTIFIER_DIGITS=9LINE=Line([LiteralField(size=6,starting_position=11),LiteralField(size=9,starting_position=19),DatetimeField(size=10,starting_position=30,format="%M/$d/%Y"),FloatField(size=6,starting_position=42,decimal_digits=2),])ARegisterdepends on the definition of aLineobject, that is composed ofFieldobjects. By modeling these elements on a declarative way, the user gains access to reading / writing functions on the fly, and theRegistermay be added to aRegisterFileobject, so that it can be read / written together with many other registers to files.Despite theRegistermodel, files can also be composed ofBlocksandSections, and their interfaces can be done totextorbinaryformats. For more information, the docs are availablehere.Installcfinterfacerequires python >= 3.7. It this requirement is met, than one may install the framework withpython -m pip install cfinterfaceDocumentationGuides, tutorials and references may be found at the package's official site:https://rjmalves.github.io/cfi
Package: cf-json
Expanded JSON serializationSummarycf-jsonprovides a batteries included approach to extending the standardjsonmodule.It achieves this by making use of a customjson.JSONEncodersubclasscfjson.MyEncoderto
expand the range of types that can be serialized. While keeping sticking to thejsoninterface.InstallationInstall the package fromPyPI:$python-mpipinstallcf-json[...]
Successfully installed cf-jsonQuick Startcf-jsonis a drop in replacement for the standardjsonmodule.>>>fromcfjsonimportdumps,loads>>>data={1:'a',2:Path('./my_file.py'),3:datetime.datetime.utcnow()}>>>data{1:'a',2:WindowsPath('my_file.py'),3:datetime.datetime(2021,4,7,2,45,57,696066)}>>>json_blob=dumps(data)>>>json_blob'{"1": "a", "2": {"__json_type__": "WindowsPath", "path": "my_file.py"}, "3": {"__json_type__": "datetime", "datetime": "2021-04-07T02:45:57.696066"}}'>>>loads(json_blob){'1':'a','2':WindowsPath('my_file.py'),'3':datetime.datetime(2021,4,7,2,45,57,696066)}DocumentationFull documentation
Package: cfkv
CFKVA simple wrapper to communicate withCloudflare KV Store. It can be used as a cache and features will be implemented to be used in frameworks such asFastAPISet and GetFastapi MiddlewareFlask integrationOptions to include string instead of dict entrySimple UsageimportdatetimefromcfkvimportKVStorestore=KVStore(namespace_id="YOUR_NAMESPACE_ID",account_id="ACCOUNT_ID",api_key="API_KEY")# Usage Examplekey="sample_key"get=store.get(key)ifgetisNone:data={"test":True,"date":str(datetime.datetime.now())}store.set(key)data['stored']=Falseget=dataelse:data['stored']=Trueprint(get)SetupYou will need to know your namespace id which is generated when you create a KV namespace and Account ID. To generate the KV api key follow the instructions belowNavigate toCloudflare API TokensCreate API TokenScroll down to create custom tokenCreate a token withWorkers KV Storageand selectEditYou can use environment variables to store these the following are monitoredKV_NAMESPACE_ID="YOUR_NAMESPACE_ID"CF_ACCOUNT_ID="YOUR_ACCOUNT_ID"CF_API_KEY="YOUR_API_KEY"
Package: cflapi
CFLApi - a Python client for The Canadian Football League statistics APIDescriptionCFLApi is a lightweight client library for the CFL statistics APIDocumentationOfficial API DocumentationInstallationTODODependenciesRequestsAPI KeyYou will need an API key to access the CFL API. To obtain a key, submit aAPI key requestExampleimportcflapiapi=cflapi.CFLApi(YOURAPIKEYHERE)response=api.getGamesBySeason(2018,filter={'team':{'eq':'SSK'}})forgameinresponse['data']:print(game['date_start'],game['team_1']['nickname'],'@',game['team_2']['nickname'])SupportIf you find an bug, have any questions or have suggestions for improvements then feel free to file an issue on the Github project pagehere.
Package: cflare
cflare [WIP]Pythonic Cloudflare OpsMaking Cloudflare a little easier to work with in PythonMost Objects returned from the API are Dataclass Objects, allowing easier manipulation and accessing properties.InstallationDependencies:requests,typer,dataclasses-jsonpipinstall--upgradecflareEnvironment VariablesAuthenticationAPI User:CFLARE_USER,CLOUDFLARE_USERAPI Key:CFLARE_KEY,CLOUDFLARE_KEYAPI Token:CFLARE_TOKEN,CLOUDFLARE_TOKENRecordsImportant Note:Content takes priority over IP Address due to how default value is created.Domain Name:CFLARE_DOMAIN,CLOUDFLARE_DOMAINSubdomain Name:CFLARE_SUBDOMAIN,CLOUDFLARE_SUBDOMAINRecord Type:CFLARE_RECORD,CLOUDFLARE_RECORD,[Default = 'A']IP Address:CFLARE_ADDRESS,CLOUDFLARE_ADDRESS,[Default = Host IP Address]Content:CFLARE_CONTENT,CLOUDFLARE_CONTENTTTL:CFLARE_TTL,CLOUDFLARE_TTL,[Default = 1 or Auto]Proxied:CFLARE_PROXIED,CLOUDFLARE_PROXIED,[Default = False]Quick Start CLIcflareauth--emailuser@email.com--keysupersecureapikey# This will sync the Host VM's Public IP Address to A Record app.mydomain.com = 123.123.123 [VM Public IP]cflaresync--domainmydomain.com--subdomainappQuick Start APIfromcflareimportCFlareAPI,CFlareAuth,save_config# Auth: Optional.## Save Auth Explicitly. Will be reloaded next time around.auth=CFlareAuth(api_user='',api_key='')save_config(auth.data)## Pass Auth to the API Explicitlycfapi=CFlareAPI(auth)# Or skip the above steps and have it be picked up from environment variablescfapi=CFlareAPI()domains=cfapi.all_domains# ['domain1.com', 'domain2.com'...]# Pass params explicitlyres=cfapi.sync(domain='',subdomain='',**config)# Or call and have it be picked up by environment variablesres=cfapi.sync()
Package: cflare-ddns
cflare-ddnsThis is yet another Cloudflare Dynamic DNS application.Installationpipinstallcflare-ddnsUsageFirst is you need to create a config file. You can place it in the default location/etc/cflare-ddns.jsonor anywhere in your filesystem that is readable by the script. You'll need to pass that config location in the cli if it's not the default location.Edit the config file, you'll need to provide the following:api_key- You can get this in your cloudflare dashboard. Follow thislinkto get full instructions.email- The email account you use in cloudflare.zone_id-Zone IDof your domain name.domain- The domain name. Example:example.comrecord_name- The sub domain you want to update with your public ip. This subdomain should be anArecord type. Example:wwwConfiguration file example:{"api_key":"xxxx","email":"xxxx@gmail.com","records":[{"zone_id":"xxxx","domain":"example.xyz","record_name":"vpn"},{"zone_id":"xxxx","domain":"example.sh","record_name":"www"}]}Running the script with config in the default location:cflare-ddnsRunning the script with config in non-default location:cflare-ddns-c/opt/somewhere/config.jsonYou can add this to yourcronjobsto run periodically.*****cflare-ddns
-----|||||||||-----Dayofweek(0-7)(Sunday=0or7)|||-------Month(1-12)||---------Dayofmonth(1-31)|-----------Hour(0-23)-------------Minute(0-59)To run every 15 minutes:*/15 * * * * cflare-ddnsCLI Referenceusage:cflare-ddns[-h][-cCONFIG_FILE][-iINTERVAL][-v]options:-h,--helpshowthishelpmessageandexit-v,--versionAppversion-cCONFIG_FILE,--configCONFIG_FILEPathtoyourconfigurationfile.Defaultpaths:/etc/cflare-ddns.json,cflare-ddns.json-iINTERVAL,--intervalINTERVALNumberofsecondsbetweeneachsync.Thiswillmaketheprogramrunforever.HitCtrl-Ctostop.DockerExample on running on docker:dockerrun-eCF_DDNS_INTERVAL=900-v$(pwd)/cflare-ddns.json:/etc/cflare-ddns.json--rmianpogi5/cflare-ddns:latestExample usingdocker-compose.yml:version:"3.9"services:cflare-ddns:image:ianpogi5/cflare-ddns:latestcontainer_name:cflare-ddnsenvironment:-CF_DDNS_INTERVAL=900volumes:-/YOUR/PATH/TO/cflare-ddns.json:/etc/cflare-ddns.jsonrestart:unless-stopped
Package: cfl-data-utils
Chetwood Financial Data and Analytics UtilitiesFull documentation can be foundhereInstallationThis can be installed like any other package, from PyPi:pipinstallcfl-data-utilsSystem RequirementsThis package has the following requirements:Python>= 3.6DependenciesAll dependencies are listed insetup.pyas per the expected standard. These packages should be installed as part of the installation process.Blessingsblessingsis a Unix-only package, and does not work on Windows. This has been accounted for and it is not imported if the OS is Windows, however should this cuase an error an issue should be raised as detail below.UsesContributingIssuesIf any issues arise when using/as a result of this package, raise an issue on GitHub with the following details:Steps to reproduceExpected resultActual resultEnvironment setupAny other information which may be usefulCodeIf you have functions which you often copy and paste between scripts or reuse (in any volume), then feel free to create a pull request or send a request via Slack/Email/etc.
Package: cflib
cflib: Crazyflie python librarycflib is an API written in Python that is used to communicate with the Crazyflie
and Crazyflie 2.0 quadcopters. It is intended to be used by client software to
communicate with and control a Crazyflie quadcopter. For instance theCrazyflie PC clientuses the cflib.Seebelowfor platform specific instruction.
For more info see ourdocumentation.InstallationSee theinstallation instructionsin the github docs folder.Official DocumentationCheck out theBitcraze crazyflie-lib-python documentationon our website.ContributeGo to thecontribute pageon our website to learn more.Test code for contributionRun the automated build locally to test your codepython3 tools/build/build
Package: cf-lines-overlap
Ormuco Code ChallengeThis project has been created only for demonstration purpose.The challengeYour goal for this question is to write a program that accepts two lines (x1,x2) and (x3,x4) on the x-axis and returns whether they overlap. As an example, (1,5) and (2,6) overlaps but not (1,5) and (6,8).The Answersource directory:./overlapusage:Runpip3 install cf_lines_overlapfrom overlap.overlap import overlap

result = overlap((1,5), (4,25))

# It will return True if the lines overlap, False otherwise
Package: cfloader
Model Configuration LoaderLoads and instantiates python classes from a configuration file.Free software: MIT licenseDocumentation:https://cfloader.readthedocs.io.FeaturesAuto class instantiation from json configurationRead configuration from archivesLoad dependencies between classesLoad configuration parameter as class or as objectInstallationpip install cfloaderUsageCreate a configuration file with parameters:{"model":{"model_name":"SomeClass","param_1":20},"epochs":10}Now you can load the configuration parameters, either as primitive dicts or as a class:importcfloaderclassSomeClass:def__init__(self,param_1):self.param_1=param_1loader=cfloader.open("config.json")num_epochs=loader.load("epochs")# = int(10)model_param_1=loader.load("model.param_1")# = int(20)model_configuration=loader.load("model")# = {"model_name": "SomeClass", "param_1": 20}model_class=loader.load("model",as_class=True)# = <SomeClass object (param_1 = 20)>For a more extensive example, seeexamples/pytorch/example_pytorch.py.NoteIf you want to run the example, run it as a python module:python-mexamples.pytorch.example_pytorch--helpYou may need to install pytorchpip install torch torchvision tqdmCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2020-10-06)First release on PyPI.
Package: cflr
cflra Cloudflare Admin CLIA collection of commands for working with a Cloudflare account.This package authenticates against theCloudflare APIusing environment variables. For managing these securely consider the excellentcf-vaultproject.Quickstart:warning: Python>=3.11.xrequired.$gitclone
$python-mvenv.venv
$source.venv/bin/activate# DO NOT SKIP THIS STEP!# install dependencies (pyproject.toml)# if developing run `python -m pip install -e ".[dev]"` for an editable install$python-mpipinstall.# run cflr$cflr--help# or$python-mcflr--help# or$pythoncflr/cli.py--helpCommands$ ssoEnterpriseonly.API endpoint:/accounts/:account_id/sso/v2/connectors(undocumented as of 2024-01-13)RequiresGlobal API Keyenvironment variables to be set.list/enable/disablethe SSO email domains configured.Why is this usefulCloudflare allow Enterprise plans to configure IdP's toenforce SSO access to the dashboardacross email domain(s).:warning: If the IdP were to suffer an outage, access to the Cloudflare dashboard would be impacted as the SSO flow would fail.In this instance,disablingthe associated SSO email domain(s) will allow users to fallback to logging in via username/password/2FA.Usage$cflrsso--help
$cflrssolist:account_id
$cflrssodisable:account_id# an interactive pick list is returned$cflrssoenable:account_id# an interactive pick list is returned