Saravanan666/pypi-org huggingface dataset:
Package: pycmap
Mohammad Dehghani Ashkezarimdehghan@uw.edupycmapSimons CMAP is an open-source data service to retrieve, visualize, and analyze oceanic datasets such as in-situ observations, multi-decade global satellite remote sensing, and model outputs. Pycmap is the python package of Simons CMAP project providing a simple and unified interface to the hosted datasets at Simons CMAP database. It enables the scientists and general public to dive into the vast, and often underutilized, ocean datasets and retrieve customized subsets of these massive datasets without going through the time-consuming process of data collection and preparation.DocumentationSee thetable of contentsbelow for pycmap documentations.The docs are written in jupyter notebook format and each notebook contains one or more example codes. Please download the/docsdirectory and run the example codes locally. Alternatively, you may run the examples on google cloud using theColab badgewhich appears at the top of each page:More detailed system documentations can be found athttps://cmap.readthedocs.io/en/latest/.WebsiteSimons CMAP website is under active development at the moment:https://simonscmap.comThis project is supported bySimons Foundation.Table of ContentsInstallation1. Data Retrieval (API)QueryCatalogSearch CatalogDatasetsDatasets With AncillaryDataset MetaDataVariable MetaDataDataset ColumnsDataset HeadVariable Long NameVariable UnitVariable ResolutionVariable CoverageVariable StatIf Column ExistsIs Gridded ProductIs Climatology ProductList of CruisesCruise Details by NameCruise Spatio-Temporal BoundsCruise TrajectoryCruise VariablesRetrieve DatasetRetrieve Dataset With AncillaryData Subset: Generic Space-Time CutData Subset: TimeSeriesData Subset: Depth ProfileCompute ClimatologySamplingMatch (colocalize) Cruise Track with Datasets2. Data VisualizationHistogram PlotTimeSeries PlotRegional Map, Contour Plot, 3D Surface PlotSection Map, Section ContourDepth ProfileCruise Track PlotCorrelation MatrixCorrelation Matrix Along Cruise Track
Package: pycmark
pycmarkACommonMarkparser for docutils.FeaturesProvidesmd2htmlcommandProvidespycmark.CommonMarkParsercomponent for docutilsCustomizable parserAll syntax are implemented as moduleDevelopers can customize syntax via adding/removing the modulesCompatibilityPassed all spec ofCommonMark 0.29.But docutils can't represent following document structure. Therefor they are disabled by defaultHard line breakdeeper headings appeared before shallow one
Package: pycmarkgfm
pycmarkgfmLightweight Python bindings to GitHub Flavored Markdown (GFM) library,cmark-gfm,
with enhanced support for task lists.FeaturesBy design, rendering is compliant with GitHub's, since this package wraps GitHub's own C parser and serializer.As opposed to most cmark-gfm bindings out there, this package supportsparsing and toggling task lists.Compatibility:with Python 3.7 & newer, on Linux, MacOS and Windows.InstallationThis packages isavailable on PyPialong with precompiled wheels for most architectures.$ pip install pycmarkgfmUsageimportpycmarkgfm# CommonMark (not GitHub flavored):html=pycmarkgfm.markdown_to_html("Hello *world*")# GitHub flavored Markdown:html=pycmarkgfm.gfm_to_html("Hello ~world~")Optionscmark and cmark-gfm come with a bunch of customization options (also known asflags) which are made available through
thepycmarkgfm.optionsmodule. To use one or multiple options, use theoptions=argument
with a mask (bitwise-or combination) ofpycmarkgfm.options. Each option is documented.text="hello\n<img src='doge.png'>"print(pycmarkgfm.markdown_to_html(text))# <p>hello# <!-- raw HTML omitted --></p>frompycmarkgfmimportoptionsprint(pycmarkgfm.markdown_to_html(text,options=options.unsafe|options.hardbreaks))# <p>hello<br /># <img src='doge.png'></p>Dealing with task listsOne of the distinctive features of this package is support for task lists.
You can get the list of tasks with their checked state, and update that state before rendering:importpycmarkgfmmd="""- [ ] eggs- [x] milk"""withpycmarkgfm.parse_gfm(md)asdocument:eggs,milk=document.get_tasks()assertnoteggs.checkedassertmilk.checked# Toggle!eggs.checked=Trueprint(document.to_commonmark())# - [x] eggs# - [x] milkThere is a convenience method to easily toggle a task state from the rendered HTML. The typical use-case is that your
database stores the source GFM, renders it to HTML withgfm_to_html(), then you have some client Javascript snippet
that is invoked when a checkbox is clicked. Thanks to the uniquedata-gfm-taskHTML attribute, you can update the
source GFM on the server:importpycmarkgfmmd="""- [ ] eggs- [x] milk"""print(pycmarkgfm.gfm_to_html(md))# <ul># <li data-gfm-task="2:1-2:10"><input type="checkbox" disabled="" /> eggs</li># <li data-gfm-task="3:1-3:10"><input type="checkbox" checked="" disabled="" /> milk</li># </ul># When user clicks a checkbox, get the parent 'data-gfm-task', then on the server, do:new_md=pycmarkgfm.gfm_toggle_task_by_id(md,"2:1-2:10",checked=pycmarkgfm.TOGGLE)print(new_md)# - [x] eggs# - [x] milkYou can also usechecked=True/Falseinstead ofTOGGLEto force a particular state.How is this package different fromcmarkgfm?cmarkgfmis similar to this package, in fact cmarkgfm's cffi build script
is partially re-used in this project – in compliance with its MIT license.As of October 2023, cmarkgfm is still a well-maintained project and I recommend using it if you don't need the extra
features provided by pycmarkgfm, most notably the support for task lists.LicenseGNU GPLv3.The project includes components under a different copyright under thethird_partydirectory.
Package: pycmd
pycmdis a collection of command line tools for helping with Python development.py.cleanup: remove.pycand similar filesUsage:py.cleanup [PATH]Delete pyc file recursively, starting fromPATH(which defaults to the
current working directory). Don’t follow links and don’t recurse into
directories with a “.”.py.lookup: find text in recursively found .py filesUsage:py.lookup SEARCH_STRING [options]Looks recursively at Python files for aSEARCH_STRING, starting from the
present working directory. Prints the line, with the filename and line-number
prepended.py.countloc: give LOCs for lines and testlinesUsage:py.countloc [PATHS]Count (non-empty) lines of python code and number of python files recursively
starting from aPATHSgiven on the command line (starting from the current
working directory). Distinguish between test files and normal ones and report
them separately.py.which: print location of an importable package or moduleUsage:py.which modulenamePrint the__file__of the module that is imported viaimport modulename.
The version-suffix is the same as withpy.testabove.
Package: pyCmdlineHistory
Shield:This work is licensed under aCreative Commons Attribution-ShareAlike
4.0 International
License.Save command line history and provide a command line completer for
python.Original code is fromActiveState Code »
Recipes2006.06.29 bySunjoong LEE. ActiveState content
is published underCC BY-SA
3.0.UsageInsert the linesimportsysimportsubprocesstry:importberhoel.cmd_line_historyexceptImportError:# checking if python is running under virtualenv of venvis_venv=(# This handles PEP 405 compliant virtual environments.(sys.prefix!=getattr(sys,"base_prefix",sys.prefix))or# This handles virtual environments created with pypa's virtualenv.hasattr(sys,"real_prefix"))subprocess.check_call([sys.executable,"-m","pip","install"]+([]ifis_venvelse["--user"])+["pyCmdlineHistory",])to “~/.pystartup” file, and set an environment variable to point to it:exportPYTHONSTARTUP=${HOME}/.pystartupin bash.This will locally install the module for each python you are calling.DocumentationDocumentation can be foundhereReferencesGuido van Rossum. Python Tutorial. Python Software Foundation, 2005.
86Jian Ding Chen. Indentable rlcompleter. Python Cookbook Recipe 496812Guido van Rossum. rlcompleter.py. Python Software Foundation, 20052006.06.29 Sunjoong LEEsunjoong@gmail.com2020 - 2023 Berthold Höllmannberhoel@gmail.com
Package: pycmdmovie
PyCMDMoviePyCMDMovie is a Python package that converts images and videos into ASCII art to be printed onto the terminal.InstallationYou can install PyCMDMovie via pip:pipinstallpycmdmovieUsageDisplay an Imagefrompycmdmovieimportdisplay_imgif__name__=='__main__':display_img('my/image/path.png')Display a Set of Imagesfrompycmdmovieimportdisplay_imgsif__name__=='__main__':display_imgs('my/images/dir',delay=0,clear=True,infinite=False)Display a Videofrompycmdmovieimportdisplay_videoif__name__=='__main__':display_video('my/video/path.mp4',delay=.5,clear=False,infinite=True)
Package: pycmdparse
For authors of command-line utilities. Simplifies: 1) Defining command-line options
and parameters, 2) Parsing the command line, and 3) Displaying usage instructions
to the console.Utility developers will 1) Subclass a module-defined class, 2) Include a YAML spec
in the subclass to define the utility’s options and usage, and 3) Invoke the module
arg parser. When the utility is run, if the command line is valid according to
the YAML schema, then the supplied args are injected into the subclass by the
parser. Otherwise errors are automatically displayed to the console.If the user specifies ‘-h’ or ‘–help’ on the command line, then usage instructions
are displayed as defined in the YAML, in a form generally recognizable to users
of console utilities. Specifically, displays summary usage, detailed options and
params (including categorized options), positional params, and examples.
Package: pycmds
A wrapper around theClicklibrary for Python. PyCmds makes it easier to use Click’s command execution
framework independently of the command line (i.e. executing ClickCommands in an existing Python instance.)To accompany this, PyCmds adds aCmdCompleterclass which implements theCompleterinterface from thepython-prompt-toolkit.
Using this class, one may create a python-prompt-toolkit interface with
intelligent (see below) autocompletion for ClickCommands andOptions.Also, PyCmds adds anAliasGroupclass to allow the assignment of aliases
to ClickCommands.CmdCompleterFeaturesOnly displays completion menu when the completer is certain of what
options or subcommands are valid. (E.g. no naive option or subcommand
suggestions when Click is expecting a value for a previous option.)Considersclick.Option.is_flagandclick.Parameter.nargsto
decide how many values a option should consume.Considersclick.Option.countandclick.Option.multipleto decide
if more than one instance of the same option should be permitted.Smart autocompletion for grouped short flags with or without a value
clustered on the end.Important Notes AboutCmdCompleterDesigned primarily for POSIX-style options.Only context settings specified on the root/top-levelCommandwill
be considered (by necessity).Incompatible withclick.Context.allow_interspersed_args.Incompatible withclick.Context.ignore_unknown_opts.Incompatible withclick.MultiCommand.chain.The split character for parameters with nargs > 1 is expected to be a
space.
Package: pycmdstan
pycmdstanPython interface to CmdStan.UsageAfter installing,pip install -U pycmdstan, a contrived example would befrompycmdstanimportModel,Runmodel=Model('''data { vector[20] x; real mu; }parameters { real sig; }model { x ~ normal(mu, sig); }''')assertmodel.sample(data={'mu':5.0,x:randn(20)},chains=4).R_hat.max()<1.2See thedocsfor more.ContributingContributions are welcome, please start in the issue tracker.
Use YAPF to format the code.  The Dockerfile can ease local development,docker build -t pycmdstan .
docker run --rm -it pycmdstan pytest -n4 pycmdstan/tests.pyAcknowledgementsPSIS code is by Aki Vehtari & Tuomas Sivula (BSD licensed,repo here)
Package: pycmd-todo
Welcome to pycmd-todoATextualframework based todo application.InstallationYou can install pycmd-todo via PyPI, with the following command:pip install pycmd-todothen you can run it by the follwoing command:pytodoDefault userAfter running pytodo, pycmd-todo will initialize (if it is running for the first time)
and create a default user with usernameaadand passwordadmin.
You will need these credentials to login for the first time. You can change it latter - of course.Database locationpycmd-todo will create a directory (~/.pytodo) in user home directory and will place
the database (~/.pytodo/todo_db.sqlite) file there. Removing the directory or the
database will result in data loss and reinitialization of the database.
Package: py-cmd-tool
This library is an class-based abstraction for theargparseabstraction to easily create
Python command-line tools. It supports Python 3.7+.Features include:Abstraction classes for a variety of argparse cmd-line argumentsEasy registration of the tool entry point for the “setup.py”Currently I’ve only implemented the argparse types for my most-used activities. For adding
cmd-line options that are not abstracted theRawArgcmd, or define your own custom types.
Package: pycmpfit
pycmpfitA python interface to the MPFIT library written in CThe pycmpfit interface uses a library written in C that is maintainedhere. The
license and disclaimer information for cmpfit is located in the cmpfit
subdirectory.Dependencies:python (3)numpyBuild Dependencies:cythonBuild Instructions:The python module can be built using:python setup.py build_extDocumentation:See tests/unittests.py for example usage scenarios. More documentation
and examples may be added later.
Package: pycms
Aboutpycms is a web content management system based on CherryPy.PrerequisitesPythonhttp://www.python.orgInstallationUnzip the file, then at the command line runpython setup.py installUsageOn the command line, runpython3 pycms.pyDocumentationTo read the API documentation, open a shell / DOS window, navigate to
the pycms directory, and runpydoc pycmsYou can create a HTML version usingpydoc -w pycmsLicensepycms is licensed under the GPL. See the file COPYING for details.AuthorFlorian Berger
Package: pycmsgen
pycmsgen uniform-like samplerThis directory provides Python bindings to the CMSGen unform-like sampler,Installingpip install pycmsgenCompilingIf you don't want to use the pip package, you can compile it as:apt-get install python-dev
python -m buildUsageThepycmsgenmodule has one object,Solverthat has three main functionssolve,add_clause, andget_model.The functionadd_clause()takes an iterable list of literals such as[1, 2]which represents the truth1 or 2 = True. For example,add_clause([1])sets variable1toTrue.The functionsolve()solves the system of equations that have been added
withadd_clause():>>> from pycmsgen import Solver
>>> s = Solver()
>>> s.add_clause([1, 2])
>>> sat = s.solve()
True
>>> print(s.get_model())
[1, 2]Thesolve()method optionally takes an argumentassumptionsthat
allows the user to set values to specific variables in the solver in a temporary
fashion. This means that in case the problem is satisfiable but e.g it's
unsatisfiable if variable 2 is FALSE, thensolve([-2])will return
UNSAT. However, a subsequent call tosolve()will still return a solution.
If instead of an assumptionadd_clause()would have been used, subsequentsolve()calls would have returned unsatisfiable.Solvertakes the following keyword arguments:time_limit: the time limit (integer)confl_limit: the propagation limit (integer)verbose: the verbosity level (integer)Bothtime_limitandconfl_limitset a budget to the solver. The former is based on time elapsed while the former is based on number of conflicts met during search. If the solver runs out of budget, it returns with(None, None). If both limits are used, the solver will terminate whenever one of the limits are hit (whichever first). Warning: Results fromtime_limitmay differ from run to run, depending on compute load, etc. Useconfl_limitfor more reproducible runs.
Package: pycmus
======pycmus======A python library for sending commands to the cmus music player:https://cmus.github.io/It uses the same socket interface as the cmus-remote command.Complete documentation is here: http://pycmus.readthedocs.io/en/latest/Usage=====Using pycmus is pretty straightforward you just need to init a PyCmus objectand then issue commands to it. For example::from pycmus import remotecmus = remote.PyCmus()print(cmus.status())will connect to a running cmus instance (with the socket file in the defaultlocation) and print the player status.For a complete API documentation see: :ref:`pycmus_api`.
Package: pycmx
pycmxThepycmxpackage provides a basic interface for parsing a CMX 3600 EDL and its most most common variations.FeaturesThe major variations of the CMX 3600: the standard, "File32" and "File128"
formats are automatically detected and properly read.Preserves relationship between events and individual edits/clips.Remark or comment fields with common recognized forms are read and
available to the client, including clip name and source file data.Symbolically decodes transitions and audio channels.Does not parse or validate timecodes, does not enforce framerates, does not
parameterize timecode or framerates in any way. This makes the parser more
tolerant of EDLs with mixed rates.Unrecognized lines are accessible on theEditListandEventclasses
along with the line numbers, to help the client diagnose problems with a
list and give the client the ability to extend the package with their own
parsing code.UsageOpening and Parsing EDL Files>>> import pycmx
>>> with open("tests/edls/TEST.edl") as f
... 	edl = pycmx.parse_cmx3600(f)
...
>>> edl.title
'DC7 R1_v8.2'Reading Events and EditsEditList.eventsis a generator...>>> events = list( edl.events )  
>>> len(events)
120
>>> events[43].number 
'044'...and events contain 1...n edits.>>> events[43].edits[0].source_in 
'00:00:00:00'
>>> events[43].edits[0].transition.cut
True
>>> events[43].edits[0].record_out
'01:10:21:10'Acessing Transitions and Enabled Channels>>> events[41].edits[0].transition.dissolve
False
>>> events[41].edits[1].transition.dissolve
True
>>> events[41].edits[0].clip_name
'TC R1 V1.2 TEMP1 DX M.WAV'
>>> events[41].edits[1].clip_name
'TC R1 V6 TEMP2 M DX.WAV'
   
              # parsed channel maps are also
              # available to the client
>>> events[2].edits[0].channels.get_audio_channel(7)
True
>>> events[2].edits[0].channels.get_audio_channel(6)
False
>>> for c in events[2].edits[0].channels.channels:
...     print(f"Audio channel {c} is present")
... 
Audio channel 7 is present
>>> events[2].edits[0].channels.video
False
Package: pycnab240
# pycnab240
Lib para gerar remessa CNAB 240# How to Installpip install pycnab240[![Build Status](https://travis-ci.org/Trust-Code/PyTrustCnab240.svg?branch=master)](https://travis-ci.org/Trust-Code/PyTrustCnab240)
[![Coverage Status](https://coveralls.io/repos/github/Trust-Code/PyTrustCnab240/badge.svg?branch=master)](https://coveralls.io/github/Trust-Code/PyTrustCnab240?branch=master)
[![PyPI version](https://badge.fury.io/py/pycnab240.svg)](https://badge.fury.io/py/pycnab240)
Package: pycnfg
Flexible Python configurations.Pycnfgis a tool to execute Python-based configuration.Pure Python.Flexible.It offers unified patten to create arbitrary Python objects pipeline-wise.
That naturally allows to control all parameters via single file.For details, please refer toConcepts.InstallationPyPipipinstallpycnfgDevelopment installation (tests and docs)pipinstallpycnfg[dev]Dockerdockerrun-itnizaevka/pycnfgPycnfg is tested on: Python 3.6+.DocsGetting started"""Configuration example to produce object."""importpycnfgclassCustomProducer(pycnfg.Producer):"""Specify custom methods to produce object."""def__init__(self,objects,oid):# Mandatory.super().__init__(objects,oid)defset(self,obj,key,val=42):obj[key]=valreturnobjdefprint(self,obj,key='a'):print(obj[key])returnobjdefmethod_id(self,obj,*args,**kwargs):# Some logic..returnobj# Configuration.#   Set `init` object state {'a': 7}.#   Set `producer` class CustomProducer.#   Set `steps` to execute.CNFG={'section_1':{'conf_1':{'init':{'a':7},'producer':CustomProducer,'steps':[('set',{'key':'b','val':42}),('print',{}),('print',{'key':'b'}),('method_id',{}),],},# 'conf_2': {...}}# 'section_2': {...}}if__name__=='__main__':# Execute configuration(s) in priority.objects=pycnfg.run(CNFG)# => 7# => 42# Storage for produced object(s).print(objects['section_1__conf_1'])# => {'a': 7, 'b': 42}see docs for details ;)ExamplesCheckexamples folder.Check alsomlshell- a ML framework based on Pycnfg.Contribution guidecontribution guide.LicenseApache License, Version 2.0LICENSE.
Package: pycnik
pycnikA simple Translator from Python code (with coding conventions) to
Mapnik XML stylesheet.features:allow using exotic number of zoom levels and tile sizes (computes scales denominators)provides a mechanism for inheritanceautomatically addcache-featureattribute when using more than 2 stylescaveats:still work to do to be compliant withhttps://github.com/mapnik/mapnik/wiki/XMLConfigReferenceInstall Pycnik$ git clone https://github.com/Mappy/pycnik.git
$ cd pycnik
$ python setup.py installOr via pip:$ pip install pycnikDependencies:python-mapnik (mapnik >= 2.x)lxmlTestingDependencies:$ pip install -r requirements/test.pipTo run the tests with nose:$ nosetests -vGetting startedPycnik uses dynamic variable declaration,
so you have to use the same keywords as the xml declaration syntax.example.py:from pycnik.model import *

BACKGROUND_COLOR = 'rgb(255,255,220)'

NATURAL_RASTER = {
    "type": "gdal",
    "file": "natural_earth.tif"
}

DATABASE_PARAM = {
    "dbname": "database",
    "estimate_extent": "true",
    "host": "0.0.0.0",
    "password": "******",
    "port": "5432",
    "type": "postgis",
    "user": "mapuser",
    "srid": "4326",
}

################
# MAP DEFINITION
################
Map.background_color = BACKGROUND_COLOR
Map.srs = "+init=epsg:4326"
Map.minimum_version = "2.0"
Map.font_directory = "fonts"
Map.buffer_size = 128

########
# LAYERS
########
natural_earth = Layer("natural_earth")
natural_earth.datasource = NATURAL_RASTER

bnd = Layer("country boundaries")
bnd.datasource = DATABASE_PARAM
bnd.table = "schema.boundaries"

########
# STYLES
########
natural_earth.style()[:3] = {
    RASTER: {
        'scaling': 'bilinear'
    }
}

bnd.style("blue")[0:19] = {
    LINE: {
        'fill': 'rgb(255,0,0)',
        'stroke-width': '4'
    },
    'filter': "[countrycode]='ESP'"
}

# change the stroke width from level 10 to 15
# the `filter` and `fill` attributes are preserved
bnd.style("blue")[10:15] = {
    LINE: {'stroke-width': '12'}}You can see more examples in thetest/resourcesdirectory.Generate mapnik XML$ pycnik example.py -o example.xmlChangelog1.4 (2015-02-23)fix compute_scales for WGS841.3.2 (2012-12-05)allowing any attributes for layer tag1.3.1 (2012-10-25)Updated documentation1.3 (2012-10-04)Removed “zoom” comment in tag scaledenominator (for mapnik 2.1)More tests1.2 (2012-09-11)Addedcopy_style()helper1.1 (2012-09-10)Support many symbolizer with the same type in ruleMore tests1.0 (2012-08-07)Initial release
Package: pycnnum
Copied from my git repohttps://github.com/zcold/pycnnum.UsageThis package exposes two methods for conversion between Chinese string andint/floatnumber.Chinese string to numbercn2num>>>frompycnnumimportcn2num>>>cn2num("一百八")180>>>cn2num("十五")15>>>cn2num("负十五")-15>>>cn2num("一百八十")180>>>cn2num("一百八点五六七")180.567>>>cn2num("两千万一百八十")20000180Number to Chinese stringnum2cnfrompycnnumimportnum2cn>>>num2cn('023232.005184132423423423300',numbering_type="high",alt_two=True,capitalize=False,traditional=True)'兩萬三仟兩佰三拾二點零零五一八四一三二四二三四二三四二三三'>>>num2cn('023232.005184132423423423300',numbering_type="high",alt_two=False,capitalize=False,traditional=True)'二萬三仟二佰三拾二點零零五一八四一三二四二三四二三四二三三'>>>num2cn(111180000)'一亿一千一百一十八万'>>>num2cn(1821010)'一百八十二万一千零一十'>>>num2cn(182.1)'一百八十二点一'>>>num2cn('3.4')'三点四'>>>num2cn(16)'十六'>>>num2cn(10600)'一万零六百'>>>num2cn(110)'一百一'>>>num2cn(1600)'一千六'DevelopmentCreate a virtual envvenvActivate the virtual envRunpython -m pip install .[dev]VSCodetask for creating API document is in.vscode/tasks.json.VSCodedebugger configuration for fixing issues withpytest-covis in.vscode/launch.json.