Saravanan666/pypi-org huggingface dataset:
Package: python-message-channel
message-channelThis library provides a message channel object which subtract particular messages from mass of messages. It's likegroup byof SQL or ReactiveX but for asynchronous reader.Installationpip install python-message-channelUsageFor example, assume that you have a string stream which messages are prefixed bya,b, ...eand you'd like to split subchannels for messages prefixed bybordlike below.=============================================
---------------------------------> a:foo
--------------------+
--------------------|------------> c:foo
--------------------|------------> d:foo
--------------------|------------> e:foo
====================|========================
channel             |
                   =|========================
                    +------------> b:foo
                   ==========================
                   subchannel `m.startswith('b')`This library is a tool for handling such situation.
First, create aChannelinstance from a steram reader and you can receive messages bychannel.recv()method.
In this example, we useasyncio.Queueas a stream.importasynciofrommessage_channelimportChannelasyncdefmain():# Create original streamstream=asyncio.Queue()# Create stream readerasyncdefreader():returnawaitstream.get()# Create stream channelasyncwithChannel(reader)aschannel:stream.put_nowait('a:foo')stream.put_nowait('b:foo')stream.put_nowait('c:foo')stream.put_nowait('d:foo')stream.put_nowait('e:foo')assert(awaitchannel.recv())=='a:foo'assert(awaitchannel.recv())=='b:foo'assert(awaitchannel.recv())=='c:foo'assert(awaitchannel.recv())=='d:foo'assert(awaitchannel.recv())=='e:foo'if__name__=='__main__':asyncio.run(main())And you cansplitthe channel bychannel.split()method by a predicator likeasyncwithChannel(reader)aschannel:defpredicator(m):returnm.startswith('b:')asyncwithchannel.split(predicator)assub:stream.put_nowait('a:foo')stream.put_nowait('b:foo')stream.put_nowait('c:foo')stream.put_nowait('d:foo')stream.put_nowait('e:foo')# sub receive messages starts from 'b:'assert(awaitsub.recv())=='b:foo'# channel (original) receive messages other than aboveassert(awaitchannel.recv())=='a:foo'assert(awaitchannel.recv())=='c:foo'assert(awaitchannel.recv())=='d:foo'assert(awaitchannel.recv())=='e:foo'API documentationhttps://fixpoint.github.io/python-message-channel/powered bypdoc.LicenseDistributed under the terms of theMIT License
Package: python-messaging
python-messagingA SMS/MMS encoder/decoder written 100% in Python.HistoryOriginally written by Paul Hardwick with some bits from Dave Berkeley’s
pysms. It was imported in the Wader and MobileManager projects and
quickly became clear that a joint effort would be more beneficial for
everyone.In 2010, the superb python-mms package by Francois Aucamp was merged
into python-messaging to provide a complete SMS/MMS encoder/decoder.In 2011, as part of a license clarification, Francis Aucamp was
contacted and asked if it were possible to relicence his MMS portions as
GPLv2, he responded: “feel free to re-license the parts of the
python-mms code you are using in your python-messaging project to GPL
v2; you have my full consent.”SMS FeaturesSupports 7bit, 8bit and UCS2 encodingsMultipart encoding/decodingStatus report encoding/decodingRelative validityAlphanumeric address decodingSupports python 2.5 up to 3.2TestsMMS FeaturesSMIL supportMain formats supported: jpg, gif, arm, 3gp, midi, etc.Supports MMS 1.0-1.4 decoding/encodingSupports python 2.5 up to 3.2Tests
Package: python-messenger
# python-messengerMessenger bot base class for python applications## Example```pyfrom messenger import Botclass EchoBot(Bot):def handle_message(self, messaging_event):self.send_text_message(messaging_event['sender']['id'], messaging_event['message']['text'])```## Contributing### Installation```bashvirtualenv virtualenvsource virtualenv/bin/activatepip install -r requirements.txt```### Tests```bashsource virtualenv/bin/activatepytest messenger```
Package: python-messytable-handler
Parsing for messy tablesA library for dealing with messy tabular data in several formats, guessing types and detecting headers.See the documentation at:https://messytables.readthedocs.ioFind the package at:https://pypi.python.org/pypi/messytablesSee CONTRIBUTING.md for how to send patches, run tests.Contact: Open Knowledge Labs -http://okfnlabs.org/contact/. We especially recommend the forum:http://discuss.okfn.org/category/open-knowledge-labs/
Package: python-metallum
python-metallumA basic python API for the amazingwww.metal-archives.comInstallpip install python-metallumUsageArtist searchimportmetallum# Search bands matching termbands=metallum.band_search('metallica')# -> [<SearchResult: Metallica | Thrash Metal (early), Hard Rock/Heavy/Thrash Metal (later) | United States>]bands[0].name# -> 'Metallica'# Fetch band pageband=bands[0].get()# Get all albumsband.albums# -> [<Album: No Life 'til Leather (Demo)>, <Album: Kill 'Em All (Full-length)>, ...]# Get only full-length albumsfull_length=band.albums.search(type=metallum.AlbumTypes.FULL_LENGTH)# -> [<Album: Kill 'Em All (Full-length)>, <Album: Ride the Lightning (Full-length)>, <Album: Master of Puppets (Full-length)>, <Album: ...and Justice for All (Full-length)>, <Album: Metallica (Full-length)>, <Album: Load (Full-length)>, <Album: ReLoad (Full-length)>, <Album: Garage Inc. (Full-length)>, <Album: St. Anger (Full-length)>, <Album: Death Magnetic (Full-length)>, <Album: Hardwired... to Self-Destruct (Full-length)>]album=full_length[2]album.title# -> 'Master of Puppets'album.date# -> datetime.datetime(1986, 3, 3, 0, 0)# Get all tracksalbum.tracks# -> [<Track: Battery (313)>, <Track: Master of Puppets (516)>, <Track: The Thing That Should Not Be (397)>, <Track: Welcome Home (Sanitarium) (388)>, <Track: Disposable Heroes (497)>, <Track: Leper Messiah (341)>, <Track: Orion (508)>, <Track: Damage, Inc. (330)>]Album searchimportmetallum# Search albums matching termmetallum.album_search('seventh')# -> []# Search albums containing termmetallum.album_search('seventh',strict=False)# -> [<SearchResult: Beherit | Seventh Blasphemy | Demo>, <SearchResult: Black Sabbath | Seventh Star | Full-length>, ...]# Search albums by bandmetallum.album_search('seventh',band='iron maiden',strict=False)# -> [<SearchResult: Iron Maiden | Seventh Son of a Seventh Son | Full-length>]Refer to source and doctests for detailed usage
Package: python-metar
Metar is a python package for interpreting METAR and SPECI weather reports.METAR is an international format for reporting weather observations.
The standard specification for the METAR and SPECI codes is given
in the WMO Manual on Codes, vol I.1, Part A (WMO-306 I.i.A).  US
conventions for METAR/SPECI reports are described in chapter 12 of
the Federal Meteorological Handbook No.1. (FMH-1 1995), issued by
NOAA.  Seehttp://www.ncdc.noaa.gov/oa/wdc/metar/This module extracts the data recorded in the main-body groups of
reports that follow the WMO spec or the US conventions, except for
the runway state and trend groups, which are parsed but ignored.
The most useful remark groups defined in the US spec are parsed,
as well, such as the cumulative precipitation, min/max temperature,
peak wind and sea-level pressure groups.  No other regional conventions
are formally supported, but a large number of variant formats found
in international reports are accepted.
Package: python-metrc
Python METRCA light Python wrapper around the METRC Web APIGetting StartedThese instructions will get you a copy of the project up and running on
your local machine for development and testing purposes.Installing$ pip install python_metrcRunning the testscd python_metrc
pytestDocumentationTo generate and call the endpoint -https://sandbox-api-ca.metrc.com/transfers/v1/delivery/packages/states- you can use any of the following combinations:>>> from python_metrc import METRC
>>> metrc = METRC('https://sandbox-api-ca.metrc.com', vendor_key={VENDOR_KEY}, user_key={USER_KEY}, license_number={LICENSE_NUMBER})
>>> metrc.transfers('delivery').packages('states').get()
<Response [200]>
>>> metrc.transfers.delivery.packages('states').get()
<Response [200]>
>>> metrc.transfers.delivery.packages.states.get()
<Response [200]>
>>> metrc.transfers('delivery', 'packages', 'states').get()
<Response [200]>TheMETRCclass instance provides theGET,POSTandDELETEHTTP methods as binded on itself. The return type is therequestsmodule’sResponseobject.ContributingPlease read theContributionguidelines for details on our code of conduct, and the process for submitting pull requests to us.AuthorsSee the list ofcontributorswho participated in this project.LicenseThis project is licensed under the MIT License - see theLICENSEfile for detailsAcknowledgmentsHammock- Used to generate RESTful URLsHistory0.1.2 (2018-09-26)Convert main class to inherit from Hammock instead.0.1.1 (2018-09-26)Clean up unnecessary artefacts after setup.0.1.0 (2018-09-26)First release on PyPI.
Package: python-microscopy
The PYthon Microscopy EnvironmentPYME (the PYthon Microscopy Environment) is an open-source application suite for light microscopy acquisition, data storage, visualization, and analysis. It offers a particularly comprehensive set of features for single-molecule localization techniques (PALM, STORM, PAINT, etc ...), but also supports many other modalities. The package is multi-platform, running on Windows, Linux, and OSX.Website:https://www.python-microscopy.orgInstallation:https://python-microscopy.org/doc/Installation/Installation.htmlDocumentation:https://python-microscopy.org/doc/Source code:https://github.com/python-microscopy/python-microscopy/Contributing:https://python-microscopy.org/doc/Contributing.htmlBug reports:https://github.com/python-microscopy/python-microscopy/issuesThe documentation is also available in thedocssubdirectory of the repository.Have a question?Get in touch!You can email us atsupport@python-microscopy.org, or raise asupport issue. We are also active on theimage.sc forum- tag your post withpymeand we'll be happy to support you.
Package: python-mid
python-midEfficient ID generation, lexicographically sortable, contains time information.Structure4 bytes for the timestamp8 bytes of randomnessencoded as urlsafe base6416 charactersExample:ZEDpWWfGaXNR_0rsUsage>>>importmid>>>mid.generate_mid()'ZEDpWWfGaXNR_0rs'>>>mid.get_date_time("ZEDpWWfGaXNR_0rs")datetime.datetime(2017,12,28,20,22,24)>>>mid.get_time("ZEDpWWfGaXNR_0rs")1514474944PerformanceBench #1: Generate 1.000.000 IDsUUID1UUID4ULIDObjectIDMIDExecution Time2.96s3.55s5.88s5.43s0.28sExecutions/s337612.24281647.68170118.74184101.313556948.61FAQAre the resulting IDs always lexographically sortable?Yes, the resulting MIDs generated by the generate_mid function in the C extension code I provided earlier are always lexicographically sortable.The first four bytes of each MID represent the current time in seconds since the epoch. These bytes are stored in big-endian order, which means that MIDs generated at later times will have a larger numerical value for these first four bytes. Since the base64 encoding used to encode the MIDs preserves the lexicographical order of the input data, this means that MIDs generated at later times will also be lexicographically greater than MIDs generated at earlier times.The remaining eight bytes of each MID are filled with random data and do not affect the lexicographical order of the MIDs.Therefore, if you generate multiple MIDs using the generate_mid function and sort them lexicographically, they will be sorted in chronological order based on their creation time.What about January 19, 2038?The generate_mid function stores the current time in seconds since the epoch as a 4-byte integer in big-endian order. This means that the maximum value that can be represented by these 4 bytes is 2^32 - 1, or 4294967295.Since the epoch is defined as January 1, 1970, this means that the latest time that can be represented by these 4 bytes is 4294967295 seconds after the epoch, or approximately 07:14:07 UTC on February 7, 2106.After this time, the value of the current time in seconds since the epoch will no longer fit into 4 bytes and will overflow. This will cause the time value stored in the MIDs to wrap around and start counting from zero again.
Package: python-mikrotik-login
Python Mikrotik WebClient WiFi LoginThis is a python code to login to wifi Mikrotik Webclient for devices that has no access to GUI (such as headless Raspberry Pi, or Linux Terminal). Mikrotik Webclient is using unique keys or salts generated randomly at some time interval, this program is made to find that unique keys or salts and combine it with username and password to make final login request.Installing the packageusing pippip install python-mikrotik-loginusing gitpip install git+https://github.com/castrix/Python-Mikrotik-WebClient-WiFi-LoginUsing the programFirst import the modulefrom python_mikrotik_login import MikrotikLogin

    login = MikrotikLogin("username","password","http://url") #you can leave the unique key index empty or set it manually
    login.do_login()
    print(login) # to see statusArgumentsMikrotikLogin(username_string, password_string, url_string, minkey1_integer_optional, maxkey1_integer_optional, minkey2_integer_optional, maxkey2_integer_optional)if you are still confused, see theExampleHow this worksThis code works by finding the unique key from the Mikrotik Web Client and then combine it with username and password then send back thepostrequest to the Mikrotik Web Client.Finding the unique keyFor the example this is the function where the login action is fired:function doLogin() {
    document.sendin.username.value = document.login.username.value;
    document.sendin.password.value = hexMD5('\340' + document.login.password.value + '\043\242\062\374\062\365\062\266\201\323\145\251\200\303\025\315');
    document.sendin.submit();
    return false;
    }In this case you should find the index of:\340
    and
    \043\242\062\374\062\365\062\266\201\323\145\251\200\303\025\315where:\340 is the first unique key or salt
    \043\242\062\374\062\365\062\266\201\323\145\251\200\303\025\315 is the second unique key saltContributorsIhsan Fajar RamadhanMarchelAce
Package: python-milvus-server
Python Milvus ServerNote:From VERSION 2.2.4, thismatrixji/python-milvus-serverstart migrate tomilvus-io/embd-milvusAndmilvus_serverpackage name change tomilvus, for more details seemilvus-io/embd-milvusVisithttps://pypi.org/project/milvus/for more details.
Package: python-mimeparse
This module provides basic functions for handling mime-types. It can
handle matching mime-types against a list of media-ranges. See section
5.3.2 of the HTTP 1.1 Semantics and Content specification [RFC 7231] for
a complete explanation:https://tools.ietf.org/html/rfc7231#section-5.3.2InstallationUsepip:$pipinstallpython-mimeparseIt supports Python 2.7 - 3.5 and PyPy.Functionsparse_mime_type()Parses a mime-type into its component parts.parse_media_range()Media-ranges are mime-types with wild-cards and a “q” quality parameter.quality()Determines the quality (“q”) of a mime-type when compared against a list of
media-ranges.quality_parsed()Just likequality()except the second parameter must be pre-parsed.best_match()Choose the mime-type with the highest quality (“q”) from a list of candidates.TestingRun the tests by typing:python mimeparse_test.py. The tests require Python 2.6.To make sure that the package works in all the supported environments, you can
runtoxtests:$pipinstalltox$toxThe format of the JSON test data file is as follows: A top-level JSON object
which has a key for each of the functions to be tested. The value corresponding
to that key is a list of tests. Each test contains: the argument or arguments
to the function being tested, the expected results and an optional description.
Package: python-mindmeister
I am no longer interesting in developing this library. Bugs (if any reported)
will be fixed, but no new features will be added. Should anyone be interested in
continuing supporting and developing python-mindmeister and PyMind, please,
contact me.This directory contains source code of the unofficial python bindings
for the MindMeister API.This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
Package: python-minesweeper
MinesweeperImplementation of Minesweeper game and agent in Python 3.ScreenshotsA Game of 5x5 Map in progressSample exported 20x20 MapModulespyminesweeperMinesweeperMapContains the functions to create the minesweeper grid and help connect to a frontendMinesweeperUIContains terminal UI for playing the game and functions to create a customised game UIInstallingpip install python-minesweeperHow to Playimportpyminesweepergame=pyminesweeper.MinesweeperUI()game.run()Planned additionsability to load mapsa working agentDevelopmentAll kinds of contributions are very welcome.Source:python-minesweeper
Package: python-minimize
MinimizeMinimize is a command line utility for optimizing the size of MicroPython projects, allowing you to write clean and
readable code occupying minimal memory when deployed to micro-controllerInstallationUse the package managerpipto install minimize.pipinstallpython-minimizeUsageMinimize provides a simple command-line utility which runs size reduction recursively over all files under the working directoryminimizeThe command also accepts an arbitrary number of glob patterns, enabling fine-grained control over which files are minimizedminimizebig-files/**.pyhuge-files/**.pyContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.A fullcontribution guideandcode of conductare supplied with the repository. In essence, update the unit tests and changelog, and treat fellow users with respect!LicenseApache Software License 2.0
Package: python-minimizer
python-minimizerMinimizes Python code using Python's lexical scanning tokenize module.Get it on pippipinstallpython-minimizerCommand-line usageCurrently python-minimizer supports the following options:usage:minimizer.py[-h][-oOUT_PATH][-b][-c][-d][-s][-wWHITESPACE_CHAR][-iINDENT_CHAR][-r][-v]in_path

MinimizesPythoncodeusingPython'slexicalscanningtokenizemodule.

positionalarguments:in_pathThefiletominimize

optionalarguments:-h,--helpshowthishelpmessageandexit-oOUT_PATH,--out-pathOUT_PATHWhenspecified,minimizerwilloutputtothepathinsteadofstdout-b,--keep-blank-linesWhenset,minimizerwillnotremoveblanklines.-c,--keep-commentsWhenset,minimizerwillnotremovecommentlinesandinlinecomments-d,--keep-docstringsWhenset,minimizerwillnotremovedocstrings-s,--keep-whitespaceWhenset,minimizerwillnotremoveextraneouswhitespace-wWHITESPACE_CHAR,--whitespace-charWHITESPACE_CHARSetthewhitespacecharactertouse.Defaultstospace(" ")-iINDENT_CHAR,--indent-charINDENT_CHARSettheindentationcharactertouse.Defaultstotab("\t")-r,--recursiveTreatthein-pathand--out-pathasdirectoriestominimizerecursively-v,--verboseExplainwhatwearedoingaswedoit,higherlevelsareusefulfordebugging

Bydefault,theminimizerremovesblanklines,comments,docstrings,and
extraneouswhitespace.Whereneeded,itwillinsertaspace(" ")forwhitespacebetweenoperatorsanduseatab("\t")forindentation.Usethecommandlineswitchestochangeanyofthedefaults.Library usageOf course, you can also import the minimizer module and use it as follows:fromminimizerimportminimizewithopen(code_file,'r')asf:code=f.read()minimized_code=minimize(code)withopen(minimized_file,'w')asf:f.write(minimized_code)By default, theminimizefunction will remove blank lines, comments, docstrings, and whitespace between operators and uses a space (" ") for the whitespace character and a tab ("\t") for the indent character, but accepts keyword arguments to change these options.
Package: python-mint
MINT - Mimetic INTerpolation on the SphereOverviewThis project contains code to regrid edge centred fields from a source to a destination grid. The grid is stored as a collection of
grid cells, which have four vertices (i.e. the cells are quadrilaterals). The edge field is stored as integrals of a vector field
along each edge. The vertex coordinates are stored in longitude-latitude space.The regridding method is mimetic in the sense that Stokes's theorem is satisfied to near machine precision. In particular, the
loop integrals of an interpolated vector field deriving from a gradient is zero.PrerequisitesTo build theMINTPython module:C++ compiler with C++11 supportCythonNetCDF libraryNumPyVTKWe recommend installing the above packages usingconda.To build theMINTC++ library and the tools:C++ compiler with C++11 supportFortran compiler (e.g., gfortran 6.4)NetCDF libraryDoxygenVTKHow to Build the MINT Python ModuleTheMINTPython interface requiresVTK,netCDFand thetbblibraries to
be installed. This is most easily done in a conda environment:conda env create --file requirements/mint.yml
conda activate mint-devIn the rootMINTdirectory then type:pip install --no-deps --editable .Check that you can import the mint module:python -c "import mint"To run the tests type:pytestHow to Build the MINT C++ LibraryPerform the following in order to callMINTfromFortran,CorC++:mkdir build
cd build
cmake ..
make -j 8You can specify the compiler with:FC=mpif90 CXX=mpicxx cmake ..; make -j 8You can check that the build was successful by typing:make testBinary ToolsThe aboveCMakebuild will compile a number of tools. To run the tools, setMINT_SRC_DIRto the location of theMINTsource directory (e.g.export MINT_SRC_DIR=..).Compute the interpolation weights from a lat-lon grid to the cubed sphere:./tools/regrid_edges -s $MINT_SRC_DIR/data/latlon4x2.nc:latlon -S 0 \
                     -d $MINT_SRC_DIR/data/cs_4.nc:physics -D 1 \
                     -w weights.ncRegrid fieldedge_integrated_velocityfrom lat-lon to cubed-sphere by loading the previously generated weights:./tools/regrid_edges -s $MINT_SRC_DIR/data/latlon4x2.nc:latlon -S 0 \
                     -d $MINT_SRC_DIR/data/cs_4.nc:physics -D 1 \
                     -v edge_integrated_velocity -W weights.nc -o edge_integrated_velocity.vtkCompute the weights and regrid in one step:./tools/regrid_edges -s $MINT_SRC_DIR/data/latlon4x2.nc:latlon -S 0 \
                     -d $MINT_SRC_DIR/data/cs_4.nc:physics -D 1 \
                     -v edge_integrated_velocity -W -o edge_integrated_velocity.vtkRegrid a time dependent field with elevation:./tools/regrid_edges -s $MINT_SRC_DIR/data/lonlatzt_8x4x3x2.nc:mesh2d -S 0 \
                    -d $MINT_SRC_DIR/data/c24_u_integrated.nc:physics -D 1 \
                    -v u@$MINT_SRC_DIR/data/lonlatzt_8x4x3x2.nc \
                    -O regridedges_xyzt.nc -o regridedges_xyzt.vtkAPI DocumentationThis is useful if you would like to callMINTfromC,PythonorFortran:https://pletzer.github.io/mint/html/Conservation ErrorThe plot below shows the error of mimetic regridding error obtained by computing the
closed line integral for each cell.