Saravanan666/pypi-org huggingface dataset:
Package: pycno
pycnoPython map overlay software to read CNO and CNOB files. This provides a light-weight interface to add overlays tomatplotlibplots. For longitude/latitude plots, no additional prerequisites are required. For data with projected coordinates, see "projection support." This allows for pure python installation with supplemental support if desired.statusEarly development. Useful light weight mapping library. Interface may change.installLatest release:pip install pycnoLastest development:pip install https://github.com/barronh/pycno/archive/main.zipexample usageBy default, this adds coasts and countries to the current axes. If the current axes has no other data on it, provide the xlim/ylim keywords to define the extents.import pycno
import matplotlib.pyplot as plt


cno = pycno.cno(xlim=(-180, 180), ylim=(-90, 90))
cno.draw()
plt.savefig('coasts_countries.png')Use the cnopath keyword to specify another overlay. If you specify a downloadable cnopath you don't have, it will automatically be downloaded. For a list of downloadable cnob, see pycno.downloadable. Currently, this includes thePanoply Overlay cnobs. For example,cno.draw('MWDB_Coasts_NA_1.cnob')will download a high-resolution version of North American coasts, continents, and states.projection supportpycno.cnosupports the pyproj projections. If you provide theprojkeyword, then overlays coordinates will be converted to the projection space before being plotted. In this case, the xlim/ylim keyworkds will need to be provided in projection space. This should work for most projections, but has only been tested with  Lambert Conformal Conic and Polar Stereographic. If you test it with another projection, please post a comment under issues and let us know.lambert conic conformalExample uses LCC domain used by EPA and called 12US2import pycno
import pyproj
import matplotlib.pyplot as plt


proj = pyproj.Proj(
  (
    '+proj=lcc +lat_0=40 +lon_0=-97 +lat_1=33 +lat_2=45 ' +
    '+x_0=2412000 +y_0=1620000 +R=6370000 +to_meter=12000 ' +
    '+no_defs'
  ),
  preserve_units=True
)
plt.axis('image')
cno = pycno.cno(proj=proj, xlim=(0, 396), ylim=(0, 246))
cno.draw()
plt.savefig('coasts_countries_lcc.png')polar stereographicExample uses Polar Stereographic domain used by EPA and called 108NHEMI2import pycno
import pyproj
import matplotlib.pyplot as plt


proj = pyproj.Proj(
  (
    '+proj=stere +lat_0=90 +lat_ts=45 +lon_0=-98 ' +
    '+x_0=10098000 +y_0=10098000 +R=6370000 +to_meter=108000 ' +
    '+no_defs'
  ),
  preserve_units=True
)
plt.axis('image')
cno = pycno.cno(proj=proj, xlim=(0, 187), ylim=(0, 187))
cno.draw()
plt.savefig('coasts_countries_ps.png')
Package: py-cn-phone-area-code
# py-cn-phone-area-codePython lib , convert phone to area code , or find area phone codehttps://github.com/netroby/py-cn-phone-area-code## Install>From piphttps://pypi.python.org/pypi/py-cn-phone-area-code```pip install -U py-cn-phone-area-code```## Usageto use it, see tests```from py_cn_phone_area_code import *def main():print(find_area_by_phone("0595")) # == "泉州"print(find_phone_by_area("泉州")) #== "0595"```
Package: pycnpj-cpf
Python CNPJ/CPFPython CNPJ/CPF is a library created to validate the entered value, indicating whether it is a valid CNPJ or CPF.Installationpipinstallpycnpj-cpfUsage in CLI mode$#verify CNPJ$pycnpj-cpfvalidate--value="37.538.534/0001-86"$
$pycnpj-cpfvalidate--value="37538534000186"$#verify CPF$pycnpj-cpfvalidate--value="237.491.140-30"$
$pycnpj-cpfvalidate--value="23749114030"$Usage in Python file>>>frompycnpj_cpf.coreimportcnpj_or_cpf_is_valid>>>>>>cnpj_or_cpf_is_valid("31.851.707/0001-35")True>>>>>>cnpj_or_cpf_is_valid("492.711.290-08")True>>>>>>cnpj_or_cpf_is_valid("49271129008")True>>>>>>cnpj_or_cpf_is_valid("31851707000135")True>>>>>>cnpj_or_cpf_is_valid("31.851.707/0001-40")False>>>>>>cnpj_or_cpf_is_valid("31.851.707/000140")False>>>>>>cnpj_or_cpf_is_valid("31.851.707/0001-40a")False>>>>>>cnpj_or_cpf_is_valid("31.851.707/0001-40 ")False>>>>>>cnpj_or_cpf_is_valid("37538026000106")True>>>>>>cnpj_or_cpf_is_valid("37538036000106")False>>>
Package: pycnt
pycntCalculate word counts in a text file!Installation$pipinstallpycntUsagepycountscan be used to count words in a text file and plot results
as follows:frompycounts.pycountsimportcount_wordsfrompycounts.plottingimportplot_wordsimportmatplotlib.pyplotaspltfile_path="test.txt"# path to your filecounts=count_words(file_path)fig=plot_words(counts,n=10)plt.show()ContributingInterested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.Licensepycntwas created by Arsen Poghosyan. It is licensed under the terms of the MIT license.Creditspycntwas created withcookiecutterand thepy-pkgs-cookiecuttertemplate.
Package: pycntrparser
pycntrparserDescriptionpycntrparseris a syntax checker designed forCNTR transcriptions, utilizing ANTLR4 for parsing and validation.InstallationYou can easily installpycntrparserusing pip:pipinstallpycntrparserUsageTo check for syntax errors in CNTR transcriptions, use the following command:cntr-check"transcriptions/class 1""transcriptions/class 2"Replace the paths within quotes with the actual paths to the CNTR transcriptions you want to check. The tool will then validate the syntax and report any errors it finds.UpgradeTo upgrade to the latest version ofpycntrparser, use the following command:pipinstall--upgradepycntrparserThis will ensure that you have the latest features and bug fixes.
Package: pycnysr
pycnysrA simple directory watcher and syncerusageBased on a YAML config file (see theexample configuration file), this module synchronizes a local directory to one or more local or remote directories, usingrsyncas the underlying backend.It uses two levels of exclusion and inclusion in order to avoid useless expensive rsync calls. At a first level, files that don't need to be monitored
can be excluded at a cheap cost. At a second level, only files that need to be
really rsynced can be configured and fine tuned.It should be able to run on Windows, Linux and macOS and generate optional notifications.in practicemy-repository:destinations:["my-host:~/my-repository/"]event_handler:excludes:[".*tmp.*"]includes:[".*/api/.*",".*/conf/.*",]notify:truersync:filters:["-***/*.pyc","-***/__pycache__/","+api/***","+conf/***","-*"]options:['--archive','--delete','--rsh=ssh']source:~/Sites/my-repository/Given thisconfig.yamlfile, changes in the source directory~/Sites/my-repository/will be propagated tomy-host:~/my-repository/via SSH with options eventually passed in thersync.optionslist.First, only files not excluded in theevent_handler.excludes(by default: [])
and included by theevent_handler.includes(by default: ['.*']) will be
passed to the rsync process.Then, rsync is called with thefilter rulesbuilt from thersync.filterslist.Tet's run the watcher:❯ pycnysr --config config.yaml2022-10-13 21:03:17 INFO set log level to INFO2022-10-13 21:03:17 INFO rsync binary is /opt/homebrew/bin/rsync2022-10-13 21:03:17 INFO using config /Users/laurent/Sites/pycnysr/config.yaml2022-10-13 21:03:17 INFO syncing repository named my-repository located in /Users/laurent/Sites/pycnysr to ['/Users/laurent/Downloads/dest/']2022-10-13 21:03:17 INFO observers all initializedOn another console, create a file:touch api/new-file.txtSee the file synchronized:2022-10-13 21:03:23 INFO synchronizing /Users/laurent/Sites/pycnysr/new-file.txtwarningUse with care. early development.licenseThis project is licensed under the terms of the MIT license.
Package: pyco
PycoCreated byDuplexesandLemonPi314Pyco is a Python package designed to help developers make better command line applications faster. It has cross-platform compatibility for Windows and Linux. Some of the included features are a built-in error logger, colorized terminal input and output, progress bars, and an extensive list of ANSI escape code functions.Full documentation can be found athttps://duplexes.me/pyco.InstallationUse the package managerpipto install Pyco.pipinstallpycoUsageBasic usage of included functions and constants.frompycoimport*frompyco.colorimportFore,Back# Print a message with a prefixprint_message("message","prefix")# Print a message with colorprint_message(Fore.RED+"message")# Print a message with a prefix and colorprint_message(Fore.BRIGHT_YELLOW+"message",prefix=Fore.BLUE+"prefix")# Prompt for user input with coloruser_input(Back.GREEN+"prompt",input_color=Fore.BRIGHT_WHITE)# Log a message into a log filelogging.log("message","prefix")ContributingThis project is a work-in-progress, so any issues and bug reports are greatly appreciated. Pull requests are welcome. For major changes and feature requests, pleaseopen an issuefirst to discuss what you would like to change.LicenseMIT License
Package: pyCoalesce
Copyright 2018-9, InCadence Strategic SolutionsThe package pyCoalesce is a wrapper for the Coalesce database abstraction layer,
which provides a common API for interacting with multiple databases.A standalone version of pyCoalesce can be found at:https://pypi.org/project/pyCoalesce/To install pyCoalesce via pip, simply "pip install pyCoalesce".The "lxml" package is recommended for manipulating XSD-based classes, but
it's not absolutely required.The full Coalesce project can be found at:https://github.com/InCadence/coalesceThe pyCoalesce version number corresponds to the Coalesce version number, but
is modified to meet PEP 440 and PyPi rules:  release version numbers are
identical, but for snapshot versions, "snapshot" is replaced with "devX", where
"X" is a sequential number incremented whenever a pyCoalesce snapshot is
distributed.The pyCoalesce package is found in the "pyCoalesce" directory of the Coalesce
repository.  In addition to the pyCoalesce source files, this directory and its
sub-directories contain documentation (and source for creating documentation), a
script for generating classes from the the Coalesce entity XSD, tests, and
distribution tools.The "unit tests" are not true unit tests:  later tests rely on the entities
created in earlier tests, thereby avoiding either repeated creation and
deletion of entities, or testing against a mocked-up API.  (The latter would
be unnecessarily time-consuming to create, and wouldn't catch bugs in the API
itself, which was still a consideration when this wrapper was created.)
Apprently, a recent change to Coalesce has caused one search test to fail,
due to the creation of multiple entities with each "create" call.  The test has
been retained while the issue is under investigation.To recreate the distribution files, run the following command from the main
pyCoalesce directory (typical options have been included):python setup.py sdist bdist_wheel
Package: pycoast
Python package for adding coastlines, borders, rivers, lakes, cities, and other
overlays to raster images.InstallationPyCoast can be installed from PyPI using pip:pip install pycoastOr with conda using the conda-forge channel:conda install -c conda-forge pycoastExample>>> from PIL import Image
>>> from pycoast import ContourWriterAGG
>>> img = Image.open('BMNG_clouds_201109181715_areaT2.png')
>>> proj4_string = '+proj=stere +lon_0=8.00 +lat_0=50.00 +lat_ts=50.00 +ellps=WGS84'
>>> area_extent = (-3363403.31,-2291879.85,2630596.69,2203620.1)
>>> area_def = (proj4_string, area_extent)
>>> cw = ContourWriterAGG('/home/esn/data/gshhs')
>>> cw.add_coastlines(img, area_def, resolution='l', level=4)
>>> cw.add_rivers(img, area_def, level=5, outline='blue')
>>> cw.add_borders(img, area_def, outline=(255, 0, 0))
>>> img.show()
Package: pycobaltstrike
pycobaltstrikeA pure python, Cobalt Strike External C2 client library.This library provides convenience methods for interacting with a Cobalt Strike teamserver via itsExternal C2mechanism. It implemenents the specification as definedhere.installationpipinstallpycobaltstrikeoverviewThis project provides two classes for working with Cobalt Strike via its external c2 mechanism.CobaltStrike()- This class handles connections to a teamserver and is responsible for sending and receiving frames between a teamserver and an implementor.Frame()- This class is a representation of the raw bytes that is sent to and from a teamserver via theCobaltStrikeclass. It contains various convenience methods for working with data.usage exampleOnce installed, import the library (and theFrameclass if you need it).frompycobaltstrikeimportCobaltStrike,FrameNext, instantiate a new instance ofCobaltStrikeand then connect to an external c2 server.cs=CobaltStrike()cs.connect('remote.host',2222)With thecsobject connected to a Cobalt Strike teamserver, we can now request a stager.stager=cs.get_stage(arch='x64',pipename='tutorial')Getting the result ofstagerto run is out of the scope of this library, however, once that is running and you are able to relay frames, you can do so by sending and receivingFrameobjects.# assuming data here is the raw frame bytes you want to send to the teamserverdata=b'00'frame=Frame(data)cs.send(frame=frame)# response from the teamserver will also return a Frameresponse=cs.recv()Thats it!theFrameobjectData sent up and down usingsend()andrecv()are instances of theFrameclass.Frame's have some convenience methods as shown below.The specification states that data frames sent to and from the teamserver via external c2's must have the format of[size][payload]. When instantiating a newFrameusing the class constructor, note that this should purely be data and not include the length prefix as indicated by thespecification. If you have a payload that includes the length prefix, useFrame.from_bytes().# init a frame from data that does not include length prefixframe=Frame(b'00')# init a frame from data that *does* include the length prefixframe=Frame.from_bytes(b'00')# init a frame from base64 encoded data that *does* include the length prefixframe=Frame.from_base64('bXVoYWhhCg==')# return the raw bytes of a frame that includes the size prefixframe_bytes=frame.as_bytes()
Package: pycobb
Report Issues and BugsCheck out theDocumentationInstallationWith PIP:pip install pycobbFrom source:git clone https://github.com/ryan-byrne/pycobb
cd pycobb
python install setup.pyUsagePythonThepycobbPython Packageand it's associated functions can be easily imported into an existing Python Project.importpycobbdf=pycobb.get(pitchers=["Trevor Bauer"],batters=["Javier Baez"],years=[2018,2019])Thispycobb.get()returns apandas DataFramewith stats on every pitchTrevor Bauerthrew toJavier Baezin the2018and2019seasons.Command Line Interface (CLI)pycobbcan return that same DataFrame from the command line. The option--printprints the DataFrame to the console:pycobb get -p Trevor+Bauer -b Javier+Baez -y 2019 --printReturns:pitch_type   game_date  release_speed  ...  spin_axis  delta_home_win_exp delta_run_exp
0         SL  2019-08-09           78.2  ...         80               0.058        -0.514
1         SL  2019-08-09           79.3  ...         81               0.000        -0.084
2         SL  2019-08-09           79.4  ...         87               0.046        -0.382
3         SL  2019-08-09           78.7  ...         81               0.020        -0.319
4         FC  2019-08-09           81.0  ...         68               0.000        -0.091
5         FF  2019-08-09           94.7  ...        202               0.000         0.121
6         FC  2019-08-09           81.7  ...         55               0.000         0.054
7         FC  2019-08-09           82.2  ...         70               0.000        -0.050
8         SL  2019-08-09           78.4  ...         79               0.000         0.037

[9 rows x 92 columns]Additional Search ParametersFor a full list of search parameters,review the documentation
Package: pycobi
PyCoBiPyCoBiis aPython tool for parametercontinuations and automatedbifurcation analysis.
It provides a Python interface toAuto-07p[1], allowing for a more intuitive usage ofAuto-07pcommands within Python scripts.
It provides direct access to solutions, branches, and their properties (i.e. special solutions, eigenvalues, etc.) as well as a range of plotting
functions to visualize bifurcation diagrams and solutions.
Finally, it allows to automatically generate the user-supplied Fortran routines viaPyRates,
such thatAuto-07pcan be fully used/controlled from within a single Python script,
without the need to supply additional non-Python files.InstallationTo usePyCoBi, it is required to installAuto-07p.
You can follow theseinstallation instructionsfor detailed
information on how to installAuto-07pin your specific setup.
Note that it is not required to manually set any path variables, sincePyAutowill take care of that for you.A typical installation procedure would be the following:Step 1:Clone theAuto-07pgithub repository:gitclonehttps://github.com/auto-07p/auto-07pStep 2:Configure the installation scriptsGo to the directory that you cloned theAuto-07prepository into and call./configureStep 3:InstallAuto-07pIn the same directory, callmakeStep 4:Install the Python version ofAuto-07pAfter that, in the same directory, execute the following call from within the Python environment that you would like to use forPyAutopythonsetup.pyinstallStep 5:InstallPyCoBiUsepipto install the latest stable version ofPyCoBipipinstallpycobiAlternatively, the development version ofPyCoBican be installed by cloning the github
repository and using thesetup.pyfor installation (see steps 1 and 4).DocumentationA full API, documentation, and use examples can be found atreadthedocs.References[1] E.J. Doedel, T.F. Fairgrieve, B. Sandstede, A.R. Champneys, Y.A. Kuznetsov and W. Xianjun (2007)Auto-07p:
Continuation and bifurcation software for ordinary differential equations.Technical report,
Department of Computer Science, Concordia University, Montreal, Quebec.
Package: pycobol2csv
pycobol2csvpycobol2csv is a Python library to convert COBOL ebcdic file to CSV format. The package is built to cater for advanced features in COBOL copybooks such asOCCURES x TIMES,BINARY,COMP.The CSV file is RDBMS friendly and all headers are ready to be used as database column names.
CSV conversion is controlled by config file incsv_config.jsonAdded more enhancements for the outdated REDEFINE and PIC syntax for a new clientInstall the python module:pip install pycobol2csvTo use the module:from pycobol2csv import convert_cobol_file, decode_copybook_file

row_length, cobol_struc = decode_copybook_file(copybook_file)

convert_cobol_file(copybook_file, data_file, output_file, config_file, codepage, debug=False)copybook_file: copybook filenamedata_file: data filenameoutput_file: output csv filenameconfig_file: csv configuration filename, refer to csv_config.jsoncodepage: codepage for edibic, refer tohttps://docs.python.org/3.7/library/codecs.html#standard-encodingsfor detailsdebug: enable for more debug information, default is OFFtest2 sets of test data have been created from scratch. Each set includes a copybook and an EBCDIC data file.To test:python convert_cobol_test_main.py --copybook [COPYBOOK_FILE] --data [DATA_FILE] --output [CSV_FILE]
Package: pycobol2parquet
pycobol2parquetpycobol2parquet is a Python library to convert COBOL ebcdic file to parquet format.I releasedpycobol2csvback in 2021 and it has been deployed to multiple production systems. One feedback I received is about the possibility of converting from Cobol to Parquet directly for analytical workload.It is straightforward to reuse the same underline knowledge and code to generate Parquet file.Install the python module:pip install pycobol2parquetTo use the module:from pycobol2parquet import convert_cobol_file, decode_copybook_file

row_length, cobol_struc = decode_copybook_file(copybook_file)

convert_cobol_file(copybook_file, data_file, output_file, codepage, debug=False)copybook_file: copybook filenamedata_file: data filenameoutput_file: output parquet filenamecodepage: codepage for edibic, refer tohttps://docs.python.org/3.7/library/codecs.html#standard-encodingsfor detailsdebug: enable for more debug information, default is OFFPlease refer toconvert_cobol_test_main.pyfor details.test2 sets of test data have been created from scratch. Each set includes a copybook and an EBCDIC data file.To test:python convert_cobol_test_main.py --copybook testdata\test2\DWSTUB.txt --data testdata\test2\DWSTUB_DATA.DAT --output DWSTUB_DATA_output.parquetknown issues and limitationsBe aware of the resources available in your runtime environment and make sure the Cobol file size is not beyond the limit or cause any performance issue.To handle large Cobol files, you can split the files into smaller chunks and then process the chunks in parallel. Please refer to themedium postfor details.When creating Parquet files the library detects data type automatically. This is to simplify the parameters passed to the conversion function.
Package: pycobra
pycobraCitationIf you are using pycobra, please consider citing the following papers:Guedj and Srinivasa Desikan (2020), Kernel-based ensemble learning in Python. Information (webpage)Guedj and Srinivasa Desikan (2018), Pycobra: A Python Toolbox for Ensemble Learning and Visualisation. Journal of Machine Learning Research (webpage)Biau, Fischer, Guedj and Malley (2016), COBRA: A combined regression strategy. Journal of Multivariate Analysis (webpage)All these references are included in the filepycobra.bib.What is pycobra?pycobra is a python library for ensemble learning. It serves as a
toolkit for regression and classification using these ensembled
machines, and also for visualisation of the performance of the new
machine and constituent machines. Here, when we say machine, we mean any
predictor or machine learning object - it could be a LASSO regressor, or
even a Neural Network. It is scikit-learn compatible and fits into the
existing scikit-learn ecosystem.pycobra offers a python implementation of the COBRA algorithm introduced
by Biau et al. (2016) for regression.Another algorithm implemented is the EWA (Exponentially Weighted
Aggregate) aggregation technique (among several other references, you
can check the paper by Dalalyan and Tsybakov (2007).Apart from these two regression aggregation algorithms, pycobra
implements a version of COBRA for classification. This procedure has
been introduced by Mojirsheibani (1999).pycobra also offers various visualisation and diagnostic methods built
on top of matplotlib which lets the user analyse and compare different
regression machines with COBRA. The Visualisation class also lets you
use some of the tools (such as Voronoi Tesselations) on other
visualisation problems, such as clustering.pycobra is described in thepaper“Pycobra: A Python Toolbox for Ensemble Learning and Visualisation”,
Journal of Machine Learning Research, vol. 18 (190), 1–5.Documentation and ExamplesThenotebooksdirectory showcases the usage of pycobra, with examples and basic usage.
Thedocumentationpage further
covers how to use pycobra.InstallationRunpip install pycobrato download and install from PyPI.Runpython setup.py installfor default installation.Runpython setup.py testto run all tests.Runpip install .to install from source.DependenciesPython 2.7+, 3.4+numpy, scipy, scikit-learn, matplotlib, pandas, seabornReferencesB. Guedj and B. Srinivasa Desikan (2018). Pycobra: A Python Toolbox for Ensemble Learning and Visualisation.
Journal of Machine Learning Research, vol. 18 (190), 1–5.B. Guedj and B. Srinivasa Desikan (2020). Kernel-based ensemble learning in Python.
Information, vol. 11(2).G. Biau, A. Fischer, B. Guedj and J. D. Malley (2016), COBRA: A
combined regression strategy, Journal of Multivariate Analysis.M. Mojirsheibani (1999), Combining Classifiers via Discretization,
Journal of the American Statistical Association.A. S. Dalalyan and A. B. Tsybakov (2007) Aggregation by exponential
weighting and sharp oracle inequalities, Conference on Learning
Theory.