Saravanan666/pypi-org huggingface dataset:
Package: pycdep
PyCDepPyCDep is a python and prolog tool to perform in-depth header file dependency analysis and visualization.The main program is pycdep.py.Support and DocumentationSome aspects of the tool are discussed ontechnogems.blogspot.com.
Additionally there’s getting started documentation in sphinx format.
Finally, use can consult the source code.LicensePyCDepis offered under theGPLv3.AuthorsPyCDepis a hobby project ofStefaan HimpeCreditsDistributeBuildoutmodern-package-templateswi-prologgraphvizNews0.0.1Release date: 11-Apr-2011Initial release.0.0.2New feature
* sorting include files by importanceOrder of magnitude speed upBug fixes:
* removed undesired remaining choicepoints in several prolog predicates
* files ending in .sh are considered header files of “h” is defined as header file suffix
* add missing dependency on python project argparse in setup.py
* problems with window sloppy file name case on linux systems
* do not bail out during full_report generation if no hierarchy constraints are defined
* clean up prolog predicates by removing unused arguments
* be smarter about where to find the prolog template, allowing to start pycdep from any folder
* problems with win32 path handling due to refactorings for speed optimization
Package: pycdf
The pycdf package wraps the complete functionality of the
Unidata netcdf library inside a Python OOP framework.
Variables are read/written through Numeric arrays.
See also the pyhdf package, which wraps HDF4, a similar
library from NCSA.Current release: pycdf-0.5-4, 2005-08-15 , bug fix release.
See download page for older releases and change history.
Package: py-cdhit
py-cdhitA Python interface for CD-HIT package.Read the documentationhere.DescriptionThis package provides a Python interface for CD-HIT (Cluster Database at High Identity with Tolerance), which has programs for clustering biological sequences with a very fast speed. Specifically, this package contains functions that run commands and read the output files, thus reducing the overhead of switching between languages and writing parsing code when using Python in the data analysis workflows.UsageA simple example on Linux is provided below. See thenotebookfor more details.frompycdhitimportcd_hit,read_clstrres=cd_hit(i="./docs/examples/apd.fasta",o="./docs/examples/out",c=0.7,d=0,sc=1,)df_clstr=read_clstr("./docs/examples/out.clstr")Please visit CD-HIT'sdocumentationsfor its installation and the options of commands.InstallationInstallFirst Install CD-HIT.Mambais recommended. For example, to create an environment and install:mambacreate-nmyenvpython=3.10
mambaactivatemyenvmambainstall-cbiocondacd-hitcd-hit-auxtoolsThen install this package from PyPI:pipinstallpy-cdhitDevelopInstall from source after git clone:cdpy-cdhit
pipinstall-e'.[dev]'pipinstall-rdocs/requirements.txt
python-mpytest--cov-reportterm-missing--cov=pycdhittests/
Package: pycdi
A simple Python CDI ( Code Dependency Injection) Library.See thecode of conduct.InstallInstall stable pycdipipinstallpycdiInstall latest pycdipipinstallgit+https://github.com/ettoreleandrotognoli/python-cdiUsagePython2 & Python3You can see more examples in the examples folder (examples/common).importloggingfromloggingimportLoggerfrompycdiimportInject,Singleton,Producerfrompycdi.shortcutsimportcall@Producer(str,_context='app_name')defget_app_name():return'PyCDI'@Singleton(produce_type=Logger)@Inject(app_name=str,_context='app_name')defget_logger(app_name):returnlogging.getLogger(app_name)@Inject(name=(str,'app_name'),logger=Logger)defmain(name,logger):logger.info('I\'m starting...')print('Hello World!!!\nI\'m a example of%s'%name)logger.debug('I\'m finishing...')call(main)Python 3With Python 3 is possible define the types of injections with the type hints.You can see more examples in the examples folder( examples/py3/ ).importloggingfromloggingimportLoggerfrompycdiimportInject,Singleton,Producerfrompycdi.shortcutsimportcall@Producer(_context='app_name')defget_app_name()->str:return'PyCDI'@Singleton()@Inject(logger_name='app_name')defget_logger(logger_name:str)->Logger:returnlogging.getLogger(logger_name)@Inject(name='app_name')defmain(name:str,logger:Logger):logger.info('I\'m starting...')print('Hello World!!!\nI\'m a example of%s'%name)logger.debug('I\'m finishing...')call(main)
Package: pycdiscount
PythonCdiscount is a small wrapper around theCdiscountProducts
API.RequirementsPythonCdiscount requires Requests, an elegant and simple HTTP library for Python, built for human
beings.http://docs.python-requests.org/You also need a Cdiscount API key, which you can get from here :https://dev.cdiscount.comInstallationpip install pycdiscountExample UsefrompycdiscountimportPyCdiscountapp=PyCdiscount(api_key="YOUR API KEY")searchresult=app.search("Iphone")All results are returned in JSON format. If you want to show them in the console, I suggest you use
the pprint module.https://docs.python.org/3/library/pprint.htmlQuestions, Comments, etc?Feel free to hit me up at the following:GitHub:https://github.com/wblondelTwitter:http://twitter.com/wgblondelEmail:contact@williamblondel.fr
Package: pycdlib
PyCdlib is a pure python library to parse, write (master), and create ISO9660 files, suitable for writing to a CD or USB.The original ISO9660 (including ISO9660-1999) specification is supported, as well the El Torito, Joliet, Rock Ridge, and UDF extensions.Please seehttps://clalancette.github.io/pycdlib/for much more documentation.
Package: pycdoexpr
pycdoexprCDO (Climate data operator) is a high-efficient command line tool for climate and meteorology data processing. This Python package helps to generate complicated cdo expr(computing expression) in a convenient and pythonic way.InstallInstall via pippipinstallpycdoexpr==0.0.2Usagegenerate digitize expr (same as np.digitize)frompycdoexprimportcdoexpr# EX1: use digitize to generate WIND LEVEL exprwind_level_bins=[0.3,1.6,3.4,5.5,8.,10.8,13.9,17.2,\20.8,24.5,28.5,32.6,36.9,41.4,46.1,50.9,56.,61.3]cexpr=cdoexpr()cexpr.digitize(varname='WIND_LEVEL',bins=wind_level_bins,right=False)convert multi-level conditions string in python syntax to cdo expr# EX2: use conditions to generate WW (weather code) expr (https://www.jodc.go.jp/data_format/weather-code.html)s='''if PRE1H > 0.001:if TEM2 >= 3:if PRE1H < 0.1:WW = 51elif PRE1H < 2.5:WW = 61elif PRE1H < 8:WW = 62else:WW = 63elif TEM2 >=0:if PRE1H < 2.5:WW = 66else:WW = 67else:if PRE1H < 0.1:WW = 71elif PRE1H < 0.2:WW = 73else:WW = 75else:if VIS > 10000:if TCC > 80:WW = 3elif TCC > 40:WW = 2else:WW = 0elif VIS >= 1000:if RHU2 > 80:WW = 45elif RHU2 > 50:WW = 48else:WW = 31else:if WS10 < 1:WW = 45else:if RHU2 >=50:WW = 45else:WW = 34'''expr=cexpr.conditions(s,verbose=True)f"cdo expr,'WW={expr}' infile outfile"moore voting# EX3: generate moore voting cdo expressionexpr=cexpr.moore_voting(voters=['a','b','c'],varname='MAJOR')f"cdo -expr,'{expr}' infile outfile"convert multi xgboost tree to expr with ensemble method (averaging, boosting, moore_voting)experimental# EX4: convert a xgb decision trees model to cdo expressionexpr=cexpr.xgb_decision_trees('./static/model.pkl',ensemble='averaging')f"cdo -expr, '{expr}' infile outfile"Benchmarkcdo expr vs (np.verctorize calc and xarray io)TODO
Package: pycdstar
pycdstarPython client library for CDStarUsagefrompycdstar.apiimportCdstar# Initialize a client object, with connection info from a config filecdstar=Cdstar()# create a new objectobj=cdstar.get_object()# with initially no associated metadataassertobj.metadataisNone# assigning to the metadata property will create a metadata recordobj.metadata={"creator":"pycdstar"}# retrieve the now existing objectobj=cdstar.get_object(obj.id)assert'creator'inobj.metadata# again, initially the bitstreams property is an empty listassertnotobj.bitstreams# we add a bitstream by uploading a local filebitstream=obj.add_bitstream(fname='README.txt')# and re-read the objectobj.read()# a bitstreams read method returns an iterator to allow for streaming,# i.e. chunked downloadsassert''.join(list(bitstream.read()))assertlen(obj.bitstreams)==1# to make sure the newly created resources are properly indexed, we allow# for a short delaysleep(1)# now we search for a string we know to exist in the uploaded bitstreamres=cdstar.search('ssh')assertlen(res)# the first element in the search results list has the bitstream as# associated resourceassert'ssh'in''.join(list(res[0].resource.read()))query='pycdstar'res=cdstar.search(query,index='metadata')assertlen(res)res=cdstar.search(query,index='fulltext')assertnotlen(res)bitstream.delete()obj.delete()
Package: pycdt
Python Charge Defects Toolkit (PyCDT) is a python package aimed at making
charged defects modeling simpler, high throughput ready, and also accessible
to researchers who don’t have the required background. PyCDT can handle
thermodynamic calculations and error corrections in the context of periodic
boundary condition density functional calculations of charged defects in
semiconductors and insulators. It can also generate the inputs for required
DFT calculations and can process the output of the DFT calculations.
The code is modular and any DFT code can be integrated into PyCDT for defect
calculations.RequirementsPyCDT requires pymatgen (and its dependencies) and optionally sxdefectalign packages.Source CodeIf not available already, use the following steps.Installgit, if not already packaged with your system.Download the pycdt source code using the command:git clone https://bitbucket.org/mbkumar/pycdt.gitInstallationNavigate to pycdt root directory:cd pycdtInstall the code, using the command:python setup.py installThe command tries to obtain the required packages and their dependencies and install them automatically.
Access to root may be needed ifvirtualenvis not used.The package can be installed at non-standard locations using the command:python setup.py install --prefix PYCDT_INSTALL_DIRwhere PYCDT_INSTALL_DIR is your choice of directory. In UNIX/Linux environments,
add PYCDT_INSTALL_DIR to PATH and PYTHONPATH variables by the following commands:export PATH=$PATH:PYCDT_INSTALL_DIR
export PYTHONPATH=$PYTHONPATH:PYCDT_INSTALL_DIR(If not set) Set the VASP pseudopotential directory in $HOME/.pmgrc.yaml as follows:VASP_PSP_DIR: <Location of vasp pseudopotential top directory>(If not set) Set the Materials Project API key in $HOME/.pmgrc.yaml as follows:MAPI_KEY: <Your mapi key obtained from www.materialsproject.org>ExamplesFrom the pycdt root folder, go to examples folder by typing:cd examplesQuestions?Post your questions onPyCDT forum.
Package: pyCDxAnalysis
pyCDxAnalysispyCDxAnalysis is a python library to format, filter, analyze and visulize cancer companian diagnosis data in a unifying thread. It provides universal interface to filter samples via a range of condition, and various methods to perform most commonly used analysis in cancer genomics.InstallationFrom source code.$ git clone https://github.com/JaylanLiu/pyCDxAnalysis
$ cd pyCDxAnalysis
$ python setup.py installTo install the package with pip, run:pip install pyCDxAnalysisExample usageAn executable demonstration of the package is available on GitHub as a Jupyter Notebook,https://github.com/JaylanLiu/pyCDxAnalysis/blob/main/pyCDxAnalysis/pyCDxAnalysis_test.ipynb.
Package: pyce
PYCEpyceis a library to work with encrypted Python bytecode.  It adds
functionality to a Python runtime by extending the way the builtin keywordimportworks.  Currently, it assumes that convergent encryption will be used,
but the library can be extended.  For example, functionality could be added to
decrypt files viaHashicorp's Vault(which also
supports convergent encryption as a mode of operation).pyceenables the creation of a Trusted Computing Python environment by
ensuring each deployed file is precisely what the developer intended by
enforcing end-to-end encryption.  Execution halts if even a single bit of an
imported Python file is modified.How do I use it?First, you'll want to encrypt a module or package.Note: this is a
destructive action.Do not run this on a codebase that is not saved
elsewhere.  This can recursively operate on folders, and supports exclusion
lists (to not encrypt certain files).pyceexpects files to be pre-compiled Python bytecode, using a command
similar topython3 -mcompileall -bwhere-bdoes an in place compilation.frompyceimportencrypt_pathencrypt_path('pyce/hello.pyc')[('pyce/hello.pyce','443df1d5f9914d13ed27950dd81aa2dd9d3b708be416c388f3226ad398d71a14')]Second, register your keys and try importing from the encrypted module or
package:frompyceimportPYCEPathFinderPYCEPathFinder.KEYS={'pyce/hello.pyce':'443df1d5f9914d13ed27950dd81aa2dd9d3b708be416c388f3226ad398d71a14'}importsyssys.meta_path.insert(0,PYCEPathFinder)frompyce.helloimporthellohello()Key distribution is outside the scope of this project.  You will need to
maintain keys typically by using a networked key server such asHashicorp's
Vault.  You could pass keys by environment
variable,stdin, or some other mechanism.Typically, you will leave (exclude) a stub file that is designed to just hook
Python's import path parsers, setup the keys, and then execute your code.What can I do with it?File Integrity Monitoring:You could protect your production code running
on application servers by adding in automatic cryptographic checks of imports.Licensing:You could publish encrypted modules to PyPI and only release
decryption keys to certain organizations, people, or others!  You could publish
such modules anywhere!At-rest Code Protection:You could just protect code at rest by integrating
on-the-fly decryption with an IDE or other software.  This would be more of a
DIY project at this point in time, butpycegives you all the building blocks
you need!LicenseAll of this code is released under theApache v2.0
License.
Package: pyce3
pyce3: Multilingual Web Page Content Extractor for Python3Introductionpyce3is a python3 package for multilingual web page content extraction. It is used to extract the content of article type web pages, such as news, blog posts, etc.Usageimportpyce3importrequestsurl="http://caijing.chinadaily.com.cn/a/201911/21/WS5dd62455a31099ab995ed438.html"html=requests.get(url).contentencoding,time,title,text,next_link=pyce3.parse(url,html)print("编码："+encoding)print('='*10)print("标题："+title)print("时间："+time)print('='*10)print("内容："+text)print("NextPageLink: ",next_link)
Package: pycebes
Python client for Cebes - an integrated framework for Data Science.SeeCebes websiteandcebes-serverfor more information.Installationpycebesis a pure Python package and can be installed from PyPI:$ pip install pycebesUnit tests$ pip install nose coverage
$ nosetests --with-coverage --cover-package=pycebes --cover-html --cover-html-dir=tests/report tests/test_*Python versionsPython >= 2.7 and >= 3.3 are supported. Other older versions might work too, but they are not actively tested.ContributingIf you’d like to contribute, fork the project, make a patch and send a pull request.In general, we keep track features in the maincebes-serverrepository.
Create an issue on this repository only if it ispycebes-specific.
Package: pyCEC
pyCECPurpose of this project is to provide object API to libcec for
home-assistant hdmi_cec module asprimary
goaland to make
TCP <=> HDMI bridge to control HDMI devices over TCP network as asecondary goal.libcecdependency[1]libcecmust be installed[2]for
this module to work in direct mode. Follow the installation instructions
for your environment, provided at the link.libcecinstalls Python 3
bindings by default as a system Python module. If you are runningpyCECin aPython virtual
environment, make sure it
can access the system module, by either symlinking it or using the--system-site-packagesflag.[1]:bulb: When usingpyCECas a network client,libcecis not needed.[2]:warning: Do not usepip3 install cec. This will fail.Compilelibcecinstead.running serverYou can runpyCECserver which will provide bridge between HDMI CEC port
and TCP network by exexcutingpython3-mpycec. Server will bind to
default port9526on all interfaces.Then you can connect by client part ofpyCECwithout need of libcec or
HDMI port on client’s machine. Just useTcpAdapterinstead ofCecAdapter.You can also connect to9526byNetCatand send CEC commands directly.home-assistant with multiple on/off switchesYou can not only add ahdmi_cecinstance to home-assistant with specifiedhostfor remote control of your TV, but also add switches for multiple TVs to turn on or off:switch:-platform:telnetswitches:some_device_id:name:"SomeDeviceName"resource:xxx.xxx.xxx.xxxport:9526command_on:'10:04'command_off:'10:36'command_state:'10:8f'value_template:'{{value=="01:90:00"}}'timeout:1
Package: pycedar
pycedarPython binding ofcedar(implementation of efficiently-updatable double-array trie) using CythonOfficial URL ofcedar:http://www.tkl.iis.u-tokyo.ac.jp/~ynaga/cedar/Installationinstall from PyPi release$pipinstall--userpycedarinstall from GitHub master$pipinstall--userhttps://github.com/akivajp/pycedar/archive/master.zipUsageusing python-like dict class based on double array trie>>>importpycedar>>>d=pycedar.dict()>>>print(len(d))0>>>print(bool(d))False>>>print(list(d))[]>>>d['nineteen']=19>>>d.set('twenty',20)>>>d['twenty one']=21>>>d['twenty two']=22>>>d['twenty three']=23>>>d['twenty four']=24>>>print(len(d))6>>>print(bool(d))True>>>print(list(d))['nineteen','twenty','twenty four','twenty one','twenty three','twenty two']>>>print(list(d.keys()))['nineteen','twenty','twenty four','twenty one','twenty three','twenty two']>>>print(list(d.values()))[19,20,24,21,23,22]>>>print(list(d.items()))[('nineteen',19),('twenty',20),('twenty four',24),('twenty one',21),('twenty three',23),('twenty two',22)]>>>print(d['twenty four'])24>>>print('twenty four'ind)True>>>deld['twenty four']>>>print('twenty four'ind)False>>>try:>>>print(d['twenty four'])>>>exceptExceptionase:>>>print(repr(e))KeyError('twenty four',)>>>print(d.get('twenty three'))23>>>print(d.get('twenty four'))-1>>>print(d.get('twenty four',None))None>>>print(list(d.find('')))[('nineteen',19),('twenty',20),('twenty one',21),('twenty three',23),('twenty two',22)]>>>print(list(d.find('tw')))[('twenty',20),('twenty one',21),('twenty three',23),('twenty two',22)]>>>print(list(d.find('twenty t')))[('twenty three',23),('twenty two',22)]>>>print(list(d.find_keys('twenty')))['twenty','twenty one','twenty three','twenty two']>>>print(list(d.find_values('twenty')))[20,21,23,22]>>>n=d.get_node('twenty')>>>print(n)'twenty'>>>print(repr(n))pycedar.node(trie=<pycedar.str_trieobjectat0x7fffe2394b80>,id=260,length=6,root=0)>>>print(n.key())twenty>>>print(n.value())20>>>print([n.key()forninn.find_nodes(' t')])[' three',' two']>>>n=d.get_node('twenty ')>>>print(n)None>>>d.save('test.dat')>>>d2=pycedar.dict()>>>print(d2.setdefault('eighteen',18))18>>>print(list(d2.items()))[('eighteen',18)]>>>d2.load('test.dat')>>>print(list(d2.items()))[('nineteen',19),('twenty',20),('twenty one',21),('twenty three',23),('twenty two',22)]>>>print(d2.setdefault('eighteen',18))18>>>print(list(d2.items()))[('eighteen',18),('nineteen',19),('twenty',20),('twenty one',21),('twenty three',23),('twenty two',22)]using more primitive data structures(TBA)tododocumentation of classes:base_triestr_triebytes_trieunicode_trienode
Package: pyCEDFS
pyCEDFSA very WIP python module to allow reading and import of Ced File System (CFS) electrophysiology files generated by
the signal software suite:http://ced.co.uk/products/sigovin.
Leverages the CFS c library provided by CED to read data.Currently supports opening the file and reading metadata, and data
Currently only functions on 64-bit installations of windows.InstallCED's CFS library requires the 64-bit Microsoft Visual Studio C++ 2010 Runtime in order to run, which can be downloadedhere. Once installed, you can install the latest PyPI release of pyCEDFS using pip:pip install pyCEDFSExample UsageimportpyCEDFScfsfile=pyCEDFS.CFS('debug.cfs')#Loads the filesweep1=cfsfile.dataY[channel][sweepnumber,:]#data is loaded into dataY and dataX attributes.y_unitscfsfile.chVars[channel]['units']#Other variables can be fetched from var dictionariesConversion to NWBConversion to NWB is currently supported. Although requires some set up.
The signal files have not standardized input/output channel names, nor anything indicating clamp mode (for Intracellular EPHYS [IC-EPHYS])
Therefore the conversion process requires additional json input file(s) indicating which channels are in / out and the clamp mode (for IC-EPHYS).
The json file should look like follows (found in template.json):{
    "Clamp Mode": "IC", //Indicates the clamp mode, should be one of: IC (current clamp), VC (voltage clamp)
    "Stim Channels" : [0], //Indicates the stimuli channels. Can be multiple channels, written as [0, 2, 3].
    "Resp Channels" : [1] //Indicates the response channels. Can be multiple channels, written as [1, 5, 6].
    //Channels are indexed starting at 0
}These settings can either be applied globally (across all files in conversion). Or on a per-file basis.
To apply global settings, the file should be called in the CFS converter call:CFSConverter.CFSConverter('C:\\Users\\SMest\\Documents\\Signal Demo\\Data\\', "test2.nwb", globalSettingsFile='template.json')Otherwise settings can be applied on a per file basis. To do so, a json mimicking above, should be placed in the same directory as the file to be converted. This json should have the same file name as the file to be converted. For example-Cell1.cfs
-Cell1.json
-Cell2.cfs
-Cell2.jsonAcknowledgementssmestern would like to acknowledge funding support by CONP - In support of Open neuroscienceThis work was supported in part by funding provided by Brain Canada, in partnership with Health
Canada, for the Canadian Open Neuroscience Platform initiative.
Package: pycee2
PyceePycee is a tool to provide possible solutions for errors in python code.
Solutions are from Stackoverflow questions that may be related to the code error.
This is a reimplementation ofEmillie Thiselton's Pycee.:gear: Installationpip3 install pycee:computer: Using Pycee2After installed, all you have to do is to callpyceepassing the name of the file that contains the error.pycee file_with_error.pyHere's an example:
Supposescript.pycontains the following code:# Brazil world cup titles by yearworld_cup_titles=[1958,1962,1970,1994,2002]# print year of the 5th titleprint(world_cup_titles[5])executing this script will result in an error like this:Traceback (most recent call last):File "example_code.py", line 4, in <module>print(world_cup_titles[5])IndexError: list index out of rangeThen you can use pycee to provide an possible answer for the error, linke so:pycee script.pyWhich, finally, will output some answers form stackoverflow that are possibily related to your error:Solution 1:Generally it means that you are providing an index for which a list elementdoes not exist.E.g, if your list was [1, 3, 5, 7], and you asked for the element at index10, you would be well out of bounds and receive an error, as only elements 0through 3 exist....(rest of the output with two more answers omitted from this example):gear: Installation (for contributors)#clonetherepositoryyourdevelopmentenvironmentgit clone https://github.com/marceloFA/pycee2.git#cdintotheprojectdirectorycd pycee2/#createavirtualenvironmenttoinstallpackagesisolatedlypython3 -m venv venv # if you use venvvirtualenv venv      # else if you use virtualenv#activatethevirtualenvsource venv/bin/activate#installpackagesrequiredtorunpyceepip3 install -r requirements.txt requirements-dev.txt#usingpyceeindevelopmentmode,fromtheprojectrootpython3 usage.py example_code.py#runningtests,fromtheprojectrootpytest:building_construction: MaintainersLeonardo FurtadoMarcelo Almeida