Saravanan666/pypi-org huggingface dataset:
Package: pyconsole-util
pyconsole_utilThe python console utility is a basic set of functions that print to the console in different formats for debugging, exploring, or printing nicely.You can see some samples below and in the source code itselfutil.startup(*args)*args can be anything normally able to be printed with print()When you are initializing variables, uploading to documents, setting up pins on a board, etc- use this to print out that those things are initializing.Sends in yellowutil.title(*args)*args can be anything normally able to be printed with print()Whenever a new block of your code begins, use this block of code to display that.Sends in white text with a green backgroundutil.endline(*args)*args can be anything normally able to be printed with print()Whenever a block of code ends, use this to signal thatutil.debug(*args, title=None)*args can be anything normally able to be printed with print()
title is an optional parameter that appears to the left of the locationDisplays the absolute path to the file and the line number the function was called on, underlined. The other arguments will be printed out. All in red.util.info(*arg)*arg can be any objectPrints out all of the members of an object in teal, organizes dictionaries and arrays for print.
Package: pyconstants
pyconstantsThis is a python package that aims to bringrealconstants to python
The project is at planning stage
The project will be released to pypi when I complete coding theConstInt,ConstStrandConstFloatclassesThings I plan to do1- Finish codingConstInt,ConstStrandConstFloatclasses and publish the package to PyPi
Status: The metaclass is almost ready, I have to code type spesific methods now2- Code theConstDict,ConstList,ConstTupleand other mutable builtin types
Status: Not started3- Code aCustomConstclass, which can be used to create constants of any type
Status: Not started4- Write a documentation at readthedocs.io
Status: Documentation is being written5- Create a issue system that people can request some common but not builtin types to have its own class that comes with the package
Status: Not started
Package: pyconstraints
PyConstraints===A simple, constraints satisfaction problem solver. Used for the [YACS][] coursescheduler project.[yacs]: http://github.com/jeffh/yacsUsage-----The Problem is the primary interface:>>> from pyconstraints import ProblemAnd then specify your problem to solve with various constraints:>>> p = Problem()>>> p.add_variable('x', range(4)) # variable-name, domain>>> p.add_variable('y', range(4))# give constraint function and list of variables used>>> p.add_constraint(lambda x, y: x != y, ['x', 'y'])>>> p.add_constraint(lambda x: x % 2 == 0)Then get your solutions:>>> p.get_solutions()# => ({'y': 0, 'x': 2},#     {'y': 1, 'x': 0},#     {'y': 1, 'x': 2},#     {'y': 2, 'x': 0},#     {'y': 3, 'x': 0},#     {'y': 3, 'x': 2})Or iteratively:>>> p.iter_solutions().next()# => {'y': 0, 'x': 2}And that's it!Using Another Solver--------------------Simply pass the solver to the Problem constructor:>>> from pyconstraints import BruteForceSolver, BacktrackingSolver>>> p = Problem(BacktrackingSolver()) # BruteForceSolver is defaultBecause the BruteForceSolver uses itertools, there may be cases where it isfaster than the BacktrackingSolver.Writing Your Own Solver-----------------------For convinence, there is a ``pyconstraints.SolverInterface`` Abstract-Base Class if you want toimplement all the features manually:@abstractpropertydef solutions_seen(self):"Returns the number of solutions currently seen by the solver."@abstractpropertydef solutions_at_points(self):"""Returns a dictionary of {iteration_index: solution} of all knownsolutions while iterating."""@abstractmethoddef set_conditions(self, variables, constraints):"""Called by the Problem class to assign the variables and constraintsfor the problem.variables = {variable-name: list-of-domain-values}constraints = [(constraint_function,variable-names,default-variable-values)]"""@abstractmethoddef restore_point(self, starting_point=None):"Restores the iteration state to a given starting point."@abstractmethoddef save_point(self):"""Returns data to indicate a way to restore to the current iterationpoint."""@abstractmethoddef __iter__(self):"Yields solutions."But for convinence, you can inherit from the ``pyconstraints.SolverBase`` classwhich provides a primitive implementation for all the interface methods exceptfor ``__iter__`` and ``set_conditions``.Todo------ Speed up backtracking solver- Add more solvers?
Package: pyconstring
pyconstringTool to handle connection strings. Offers an easy API that parses and constructs connection strings
in the form ofKey=Value;, as easy as handling a dictionary. Works with both Python 2.7 and 3.xLicenseMIT. SeeLicense File.Installpyconstringis on PyPIpip install pyconstringoreasy_install pyconstringUsage examplesConstructing a connection string from scratch:>>>frompyconstringimportConnectionString>>>cs=ConnectionString()>>>cs['user']='manuel'>>>cs['password']='1234'>>>printcs.get_string()User=manuel;Password=1234;Parsing an already existing string:>>>cs=ConnectionString.from_string('key1=value1;key2=value2;')>>>cs['key1']='another value'>>>cs.get_string()u'Key1=another value;Key2=value2;'>>>cs['user']='johnny'>>>printcs.get_string()Key1=anothervalue;Key2=value2;User=johnny;Automated escaping when necessary:>>>cs=ConnectionString()>>>cs['weird=key']='" weird;value  '>>>printcs.get_string()Weird==Key='" weird;value  ';Key translation:>>>cs['key']='value'>>>cs.translate({'key':'clave'})>>>printcs.get_string()Clave=value;More information in thedocumentation.If you find any bug or have any suggestion, feel free to send me an email or open an issue on github.
Package: pyconsul
[![Latest Version](https://pypip.in/v/pyconsul/badge.png)](https://pypi.python.org/pypi/pyconsul/)
[![Build Status](https://drone.io/github.com/hackliff/pyconsul/status.png)](https://drone.io/github.com/hackliff/pyconsul/latest)
[![Coverage Status](https://coveralls.io/repos/hackliff/pyconsul/badge.png?branch=master)](https://coveralls.io/r/hackliff/pyconsul?branch=master)
[![Code Health](https://landscape.io/github/hackliff/pyconsul/master/landscape.png)](https://landscape.io/github/hackliff/pyconsul/master)
[![Requirements Status](https://requires.io/github/hackliff/pyconsul/requirements.png?branch=master)](https://requires.io/github/hackliff/pyconsul/requirements/?branch=master)
[![License](https://pypip.in/license/pyconsul/badge.png)](https://pypi.python.org/pypi/pyconsul/)> Python client for [Consul][1]A dummy, one-file implementation on top of the [HTTP API][5] of Consul.Getting startedPyconsul is developed as a submodule of the [unide][7] project. Check out [the
documentation to learn more][6].LicenseCopyright 2014 Xavier Bruhiere.PyConsul is available under the [MIT Licence][2].[1]:http://consul.io[2]:http://opensource.org/licenses/MIT[3]:http://www.consul.io/intro/getting-started/install.html[4]:http://www.consul.io/intro/[5]:http://www.consul.io/docs/agent/http.html[6]:http://doc.unide.co/articles/pyconsul/[7]:http://unide.co
Package: py-consul
Python client forConsul.ioFork intentThe origin projecthttps://github.com/cablehead/python-consulis not maintained
since 2018.  As we’re not able to get in touch with the maintainer (cablehead)
to merge and release our PRs, we’ve forked the project in order to continue the
maintenance of the project.  We also renamed the project to be able to upload
on pypi; seehttps://pypi.org/project/py-consul/Exampleimportconsulc=consul.Consul()# poll a key for updatesindex=NonewhileTrue:index,data=c.kv.get('foo',index=index)printdata['Value']# in another processc.kv.put('foo','bar')Installationpip install py-consulNote:When using py-consul library in environment with proxy server, setting ofhttp_proxy,https_proxyandno_proxyenvironment variables can be required for proper functionality.Contributingpy-consul is currently maintained by Criteo folks.Please reach out if you’re interested in being a maintainer as well. Otherwise,
open a PR or Issue we’ll try and respond as quickly as we’re able.When you create a PR please ensure:To add tests for your new features, if reasonableTo add docstrings for new api features you may addChange log1.3.0feature: drop tornado and twisted supportenv: support python 3.10 and 3.11env: drop support of EOL python versions 3.5, 3.6 and 3.7code-style: syntax modernizationcode-style: formatter and linter useci: multiple python version test and linter enforcement1.2.4feature: aio: allow setting timeout by request1.2.3feature: base: ensure return format of json callback is more consistent1.2.2bugfix: connect: fix wrong endpoints callbacks1.2.1feature: Add support for context-managersfeature: Add support for /agent/service/:service_id APIbugfix: rename internal connect method1.2.0feature: Support deregister field in Check.scriptfeature: Introduce Consul Connect-related API wrappersfeature: Add token support missing in multiple methodsbugfix: aio: fix timeout typefeature: allow multiple tags in service health query1.1.5Dummy release to overcome a pypi release issue1.1.4bugfix: fixed connection_timeout usage for aiohttp1.1.3bugfix: fixed connection_limit usage for aiohttp1.1.2add support for connection_limit and connection_timeout in aiohttpfix asyncio session close1.1.1Add support for python 3.7 and 3.8Fix asyncio compatibility to support latest python versionRemove six dependencyUse new style of class declarationGet rid of py3.4 old compatDrop support of deprecated python2base: allow weights parameter in service registerBase forkCriteo starts forking this library fromhttps://github.com/cablehead/python-consul
Package: pycont
PyContValidate and genereate pythpon objects from templates.
Library is powered byTrafaretand helps to validate and genereate data from template.Documentationhttps://pycont.readthedocs.io/en/latest/index.htmlUsagepipinstallpycontSimple data template>>>frompycontimportTemplate,Contract>>>importtrafaretast>>>contract=Contract(Template(t.Int()))>>>print(contract(42))42>>>print(contract('test'))Traceback(mostrecentcalllast):...ValueError:Invalidvalue:valuecan't be converted to intSimple list template>>>frompycontimportTemplate,Contract>>>importtrafaretast>>>contract=Contract([...Template(t.Int())...])>>>print(contract([42]))[42]>>>print(contract([1,2,3,4,5]))[1,2,3,4,5]>>>print(contract([1,2,3,'error']))Traceback(mostrecentcalllast):...ValueError:Invalidvalue:valuecan't be converted to intStatic list template>>>frompycontimportTemplate,Contract>>>importtrafaretast>>>contract=Contract([...Template(t.Int()),...Template(t.String()),...Template(t.Float()),...])>>>print(contract([42,'test',12.5]))[42,'test',12.5]Dict template>>>frompycontimportTemplate,Contract>>>importtrafaretast>>>contract=Contract(Template(t.Int(),default=42))>>>print(contract('error'))42>>>contract=Contract({...'id':Template(t.Int()),...'value':Template(t.String()),...})# Key 'key' not contains in template>>>print(contract({'id':1,'value':'test','key':None})){'id':1,'value':'test'}Deafult valuepycont.Templatecontains an optional argumentdefault(the default type must be valid to Tremplate checker). If the argument is set, then if the check fails, this value will be returned.>>>frompycontimportTemplate,Contract>>>importtrafaretast>>>contract=Contract({...'id':Template(t.Int()),...'value':Template(t.String(),default='None'),# 'None' is a string...})>>>print(contract({'id':1,'key':None}))# key 'value' is not set{'id':1,'value':'None'}
Package: pycontainerutils
# pycontainerutils
## Installationpip install pycontainerutils## Example### version
추후 release로 이동
0.0.0.0
3번째 - 기능 추가
4번째 - 버그 수정0.0.0.1
- pypi 테스트0.0.0.2
- test code test0.0.0.3
- db adaper0.0.0.4
- logger0.0.0.5
- scheduler0.0.0.5
- scheduler
0.0.0.6  == 0.0.1.0
- check_delete_insert_df0.0.1.1
- check_delete_insert_df
- 위험성 감소0.0.1.2
- info console 추가
- 간단히 info만 확인하는 용으로 사용0.0.1.3
- DB handler에서 db 연결부분 분리 - psycopg2를 사용하여 재정의
- 로그 이중 발생 문제 해결
-https://stackoverflow.com/questions/18900888/how-to-turn-sqlalchemy-logging-off-completely0.0.1.4
- check_delete_insert_df에서 많은 로그가 보이는 걸 조절
- DBAdapter에서 logger level 추가0.0.1.5
- check_delete_insert_df 로그에 n 추가0.0.2.0
- check_delete_insert_df log level -> debug
- api client0.0.2.1
- db handler에서 연결 방식을 sqlalchemy 으로 변경
Package: pycontent-type
pycontent-typeA Python library to access all Supported Content-Types/Media-Types ⚡InstallationYou can add pycontent-type in a few easy steps. First of all, install the dependency:$pipinstallpycontent-type

--->100%

Successfullyinstalledpycontent-typeUsageWe have a simple API to access all the supported content-types:As known the categories of content-types are:applicationaudiofontimagemessagemodelmultiparttextvideoGet Content-Type by extension# Get content-type for applicationimportpycontent_typelen(pycontent_type.application)>>>1551# Get content-type for specific extension using Namepycontent_type.application.get(Name='json')>>>application(Name='json',Template='application/json')# Get content-type for specific extension using Templatepycontent_type.application.get(Template='application/xml')>>>application(Name='xml',Template='application/xml')The same applies for all the categories, we have 2 ways to get the content-type:UsingNameattributeUsingTemplateattributeDevelopment 🚧Setup environment 📦You should create a virtual environment and activate it:python-mvenvvenv/sourcevenv/bin/activateAnd then install the development dependencies:# Install dependenciespipinstall-e.[test,lint]Run tests 🌝You can run all the tests with:bashscripts/test.shFormat the code 🍂Execute the following command to applypre-commitformatting:bashscripts/format.shLicenseThis project is licensed under the terms of the MIT license.
Package: pycontest
pycontest(v1.2)An easy to use testcase generator for generating testcases for online judges.Installation$ pip install pycontestBasic UsageI highly recommend you readingthis example.TypesTypeDescriptionExampleIntVar(a, b)Generates a random integer N such thata<= N <=b.IntVar(1, IntVar(10, 20))FloatVar(a, b)Generates a random float N such thata<= N <=b.FloatVar(1.5, FloatVar(1.6, 20))CustomArray(l, g, *args)Generates an array with lengthlandgas generator of each elementHereIntArray(a, b, l)Generates a random integer array with lengthlandIntVar(a, b)as generator.IntArray(0, 100, IntVar(0, 10**9))FloatArray(a, b, l)Generates a random float array with lengthlandFloatVar(a, b)as generator.FloatArray(2.2, 80.3, IntVar(0, 10**9))ChoiceList(l, c_l: list or string)Generates a random array with lengthland a random choice of c_lChoiceList(100, string.hexdigits)Array2d(l, array:[IntArray, FloatArray, ChoiceList])Populates a 2d array with given arrayHereUsagefrompycontestimportCase,IntArray,\IntVarfrompycontest.helperimportlist_printerclassTestCase(Case):batch_size=10n=IntVar(1,10**2)arr=IntArray(-1000,1000,n)def__inp_str__(self):returnf"{self.n}\n"+\f"{list_printer(self.arr)}"defconfig(self):self.function=minself.input_sequence=[self.arr]Case.main()Instead of function you can use a python file, setself.appto the python file path.defconfig(self):self.path='my_app.py'in this method your app will run with__inp_str__function as input, and all the stdout prints will captured as output.
seeexample_app.writerDefault writer, writes each testcase into separate files:# └───tests
        #     ├────in
        #     │     ├───input0.txt
        #     │     ├───input1.txt
        #     │     │  . . .
        #     │     └───input10.txt
        #     └────out
        #           ├───output0.txt
        #           ├───output1.txt
        #           │  . . .
        #           └───output10.txteachtests/in/input<n>.txtfile contains the output of__inp_str__function.eachtests/out/output<n>.txtfile contains the the output offunctionwith*input_sequenceas parameters.For more examples and explanation seeexamples.Using more than one TestCaseyou can simply generate different test cases with making more classes inheriting from Case class....classTestCase1(Case):# ...passclassTestCase2(Case):# ...passCase.main()Using custom generatorTo use your own generator for generating variables you can useCustomArray.frompycontestimportCase,IntVar,CustomArrayimportrandomdefq(n:int):whileTrue:x=random.randint(0,3000)ifn>0andx>1000orx==0:yield0n-=1else:yieldxclassTestCase(Case):m=IntVar(0,5)arr=CustomArray(100,q,m)def__str__(self):returnf"input:\n{self.m}\n"+\f"\n{self.arr}\n"Case.main()from pycontest import Case, IntVar, IntArray
Here withCustomArrayvia ourqgenerator we were able to generate an array that has maximumm0s in and chance of a member being 0 is 1/3.###using-2d-arrayclassTestCase(Case):m=IntVar(0,5)arr=IntArray(100,q,m)arr2d=Array2d(m,arr)
Package: pyConTextNLP
pyConTextNLP============This code has been validated using the included notebooks on Python v 3.7.2. Python 2.x is no longer supported.pyConTextNLP is a Python implementation/extension/modification of theConText algorithm described in `CITE <>`__ which is itself ageneralization of the NegEx algorithm described in `CITE <>`__.The package is maintained by Brian Chapman at the University of Utah.Other active and past developers include:-  Wendy W. Chapman-  Glenn Dayton-  Danielle MoweryIntroduction------------pyConTextNLP is a partial implementation of the ConText algorithm usingPython. The original description of pyConTextNLP was provided in ChapmanBE, Lee S, Kang HP, Chapman WW, "Document-level classification of CTpulmonary angiography reports based on an extension of the ConTextalgorithm." `J Biomed Inform. 2011Oct;44(5):728-37 <http://www.sciencedirect.com/science/article/pii/S1532046411000621>`__Other publications/presentations based on pyConText include: \* WilsonRA, et al. "Automated ancillary cancer history classification formesothelioma patients from free-text clinical reports." J Pathol Inform.2010 Oct 11;1:24. \* Chapman BE, Lee S, Kang HP, Chapman WW. "UsingConText to Identify Candidate Pulmonary Embolism Subjects Based onDictated Radiology Reports." (Presented at AMIA Clinical ResearchInformatics Summit 2011) \* Wilson RA, Chapman WW, DeFries SJ, BecichMJ, Chapman BE. "Identifying History of Ancillary Cancers inMesothelioma Patients from Free-Text Clinical Reports." (Presented atAMIA 2010).Note: we changed the package name from pyConText to pyConTextNLP becauseof a name conflict on pypi.Installation------------Latest Version~~~~~~~~~~~~~~The latest version of pyConTextNLP is available on [github](https://github.com/chapmanbe/pyConTextNLP).The package can be installed by either cloning the repository and running `python setup.py install`.Alternatively or by.. code:: shellpip install git+https://github.com/chapmanbe/pyConTextNLP.gitPyPi~~~~~pyConTextNLP is also available via the Python Package Index and can be installed via.. code:: shellpip install pyConTextNLPDependencies include* networkx* PyYAMLTutorials---------See the `notebooks folder <./notebooks>`__ for a series of walkthroughsdemonstrating pyConTextNLP core concepts with example data.How to Use----------I am working on improving the documentation and (hopefully) adding sometesting to the code.Some preliminary comments:-  pyConTextNLP works marks up text on a sentence by sentence level.-  pyConTextNLP assumes the sentence is a string not a list of words- Our preferred way to represent knowledge is now with YAML files rather than TSV files.
Package: pycontract
A declarative data contract container type for PythonPycontracts is currently an internal alpha and not ready for production use.Python data contracts (pycontracts in PyPi) is a  library for exchanging data between
systems.  It is loosely based on the django forms api to help ease adoption. A simple example:from pycontract import DataContract, StringField, NumberField

class Person(DataContract):
    name = StringField()
    phone = StringField(null=True)
    age = NumberField(null=True)

bob = Person()
bob["name"] = "Bob Smith"
bob["phone"] = "999-555-1234"
bob["age"] = 32In this example the contract for person is declared and the record for bob is instantiated.  In
addition to the basic data we can addprocessorswhich manipulate or clean the data as well
asvalidatorswhich validate the data similar to django validators.FeaturesCustomizable validation (compatible with django validators).Data processors to clean up and format data.Declarative field definitions.Enforced value assignment helps avoid regression errors.Licensed under theMIT License.Basic UsageThe first step is define a basic contract.  This is done by inheriting frompycontract.DataContract.  Next
we decide if there is standard processing that is needed for each field.  For example we could use thestrip_white_spaceprocessor to call pythonsstripon each value.  Finally we decide if there is any
extra validation that is needed on the values.  For example to ensure that the persons name starts with an “a”
we could use theRegexValidator.  So with this information we would declare this DataContract like this:from pycontract import DataContract, StringField, NumberField, strip_white_space, RegexValidator

class Person(DataContract):
    name = StringField(processors=(strip_white_space,), validators=(RegexValidator(r"[aA].+"),))
    phone = StringField(null=True)
    age = NumberField(null=True)Now at runtime we can set the values, check for a valid contract and finally access the values.  That would like something
like this:>>> manny = Person()
>>> manny["name"] = "Angel Man "
>>> manny["phone"] = "999555-1234"
>>> manny["age"] = 22
>>> manny.is_valid()
True
>>> print manny.name
'Angel Man'This is early release and the code base is very short, so for more information see the code.  The source
code can be found atgithub.
Package: pycontractsdk
# 调用solidity智能协约的SDK需要python3.6的环境## 安装virtualenv```bash$ pip install virtualenv$ virtualenv --no-site-packages venv$ . ./venv/bin/activate$ pip install -r requirements.txt```## 便于开发SDK的使用方式```bash$ cd $youProjPath$ . ./venv/bin/activiate$ cd $pyconstractsdk_path$ python setup.py develop```## 使用的第三方的加密解密模块```bash$ npm i -g crypto-tx```
Package: py-contract-ui
PyContractUIPyContractUIis a Python package that simplifies the process of creating interactive HTML user interfaces for Ethereum smart contracts. It automates the conversion of smart contract ABIs into web-based UIs, making it easier for developers to build GUIs .FeaturesConvert Ethereum smart contract ABIs into HTML user interfaces.Seamless integration with popular Ethereum wallets for smooth execution of smart contract functions.InstallationYou can install PyConttractUI using pip:pipinstallpy-contract-uiServing the GUI on Local serverIf you want to interact with your smart contracts you might want to generate the GUI on a local server (without exporting it). If you want to export the GUI please read the next section.To start the server you can execute the command below in the same folder where your smart contract ABI is located:contract-ui-gen--serveFor example, if your ABIS is placed on the folder named contract/abis
first you have to navigate into the folder contract/abis and then execute the command above command
After running the local server, the GUI is available on the URLhttp://0.0.0.0:8000If you want instead to specify a custom path of the directory of the smart contract ABIs, you can add the optional parameter as per below:contract-ui-gen--contract/contracts/abis--serveThe command above generates the GUI using the ABI found in the folder contracts/abisExporting the GUIYou can export your smart contract ABIs into HTML using the below commandcontract-ui-genThe command will create a folder with the GUI in the directory where the command has been executed.
Alternatively, you can add optional parameters to the source folder of the ABI and/or the destination folder where the GUI has to be exported to. For example:contract-ui-gen --contract /contracts/abis --output gui_outputThe command above generates the GUI using the ABI found in the folder
/contracts/abis and exports to the gui_output folder