Saravanan666/pypi-org huggingface dataset:
Package: polyleven
Website:https://ceptord.net/Latest Release:v0.8 (2022-10-02)License:MIT License1. Introductionpolyleven is a Pythonic Levenshtein distance library that:Isfastindependent of input types, and hence can be used for
both short (like English words) and long input types (like DNA
sequences).Can be used readily in a manner not covered by restrictive
licenses such as GPL, hence can be used freely in private codes.Supports Python 3.x.2. How to installThe official package is available on PyPI:$ pip install polyleven3. How to usePolyleven provides a single interface functionlevenshtein(). You
can use this function to measure the similarity of two strings.>>> from polyleven import levenshtein
>>> levenshtein('aaa', 'ccc')
3If you only care about distances under a certain threshold, you can
pass the max threshold to the third argument.>>> levenshtein('acc', 'ccc', 1)
1
>>> levenshtein('aaa', 'ccc', 1)
2In general, you can gain a noticeable speed boost with threshold\(k < 3\).4. Benchmark4.1  English WordsTo compare Polyleven with other Pythonic edit distance libraries,
a million word pairs was generated fromSCOWL.Each library was measured how long it takes to evaluate all of
these words. The following table summarises the result:Function NameTIME[sec]SPEED[pairs/s]edlib4.763208216editdistance1.943510450jellyfish.levenshtein_distance0.7221374081distance.levenshtein0.6231591396Levenshtein.distance0.5001982764polyleven.levenshtein0.43123034204.2. Longer InputsTo evaluate the efficiency for longer inputs, I created 5000 pairs
of random strings of size 16, 32, 64, 128, 256, 512 and 1024.Each library was measured how fast it can process these entries.[1]LibraryN=16N=32N=64N=128N=256N=512N=1024edlib0.0400.0630.0940.2050.4320.9082.089editdistance0.0270.0490.0860.1780.3360.74058.139jellyfish0.0090.0320.1180.4701.8748.87742.848distance0.0070.0290.1090.4311.7266.95027.998Levenshtein0.0060.0220.0850.3361.3285.28621.097polyleven0.0030.0050.0100.0430.1490.5502.1093.3. List of LibrariesLibraryVersionURLedlibv1.2.1https://github.com/Martinsos/edlibeditdistancev0.4https://github.com/aflc/editdistancejellyfishv0.5.6https://github.com/jamesturk/jellyfishdistancev0.1.3https://github.com/doukremt/distanceLevenshteinv0.12https://github.com/ztane/python-Levenshteinpolylevenv0.3https://github.com/fujimotos/polyleven[1]Measured using Python 3.5.3 on Debian Jessie with Intel Core
i3-4010U (1.70GHz)
Package: polylib
Pure Python polynomials over a ring or over a field.InstallationFirst, installnumlib, then install polylib
withpip3 install polylib --useror, for newer versions of Python,pip install polylib --userTo upgrade to the latest version:pip3 install -U polylib --userNotesIfnumpyis installed, then one
can optionally multiply certain polynomials using numpy’s fft implementation;
however, this is not essential and numpy need not be installed.See theupstream repositoryfor
usage notes and examples.
Package: polyline
polylineis a Python implementation of Google’sEncoded Polyline Algorithm
Format. It is essentially a port ofMapbox polylinewith some additional features.Installationpolylinecan be installed usingpip:$ pip install polylineStarting fromv2.0.0only Python 3.7 and above is supported. For Python 2 support, please installv1.4.0:$ pip install polyline==1.4.0API DocumentationEncodingTo get the encoded polyline representation of a given set of (lat, lon) coordinates:import polyline
polyline.encode([(38.5, -120.2), (40.7, -120.9), (43.2, -126.4)], 5)This should return_p~iF~ps|U_ulL~ugC_hgN~eq`@.You can set the required precision with the optionalprecisionparameter. The default value is 5.You can encode (lon, lat) tuples by settinggeojson=True.DecodingTo get a set of coordinates represented by a given encoded polyline string:import polyline
polyline.decode('u{~vFvyys@fS]', 5)This should return[(40.63179,-8.65708),(40.62855,-8.65693)]in (lat, lon) order.You can set the required precision with the optionalprecisionparameter. The default value is 5.You can decode into (lon, lat) tuples by settinggeojson=True.DevelopmentAll installation and development dependencies are fully specified inpyproject.toml. Theproject.optional-dependenciesobject is used tospecify optional requirementsfor various development tasks. This makes it possible to specify additional options when performing installation usingpip:python -m pip install .[dev]DocumentationThe documentation can be generated automatically from the source files usingSphinx:python -m sphinx.cmd.build -b html docs docs/_build/htmlTesting and ConventionsAll unit tests are executed and their coverage is measured when usingpytest:python -m pytestStyle conventions are enforced usingPylint:python -m pylint polylineContributionsIn order to contribute to the source code, open an issue or submit a pull request on theGitHub pagefor this library.VersioningBeginning with version 0.1.0, the version number format for this library and the changes to the library associated with version number increments conform withSemantic Versioning 2.0.0.PublishingThis library can be published as apackage on PyPIby a package maintainer. Ensure that the correct version number appears inpyproject.toml, and that any links in this README document to the Read the Docs documentation of this package (or its dependencies) have appropriate version numbers. Also ensure that the Read the Docs project for this library has anautomation rulethat activates and sets as the default all tagged versions. Create and push a tag for this version (replacing?.?.?with the version number):git tag ?.?.?
git push origin ?.?.?Remove any old build/distribution files. Then, package the source into a distribution archive:rm -rf build dist src/*.egg-info
python -m build --sdist --wheel .Finally, upload the package distribution archive toPyPI:python -m twine upload dist/*
Package: polyline-ruler
polyline-rulerInit frommapbox/cheap-rulerbut more than that.Installationvia pippipinstall-Upolyline-rulerfrom sourcegitclone--recursivehttps://github.com/cubao/polyline-ruler
pipinstall./polyline-rulerOrpipinstallgit+https://github.com/cubao/polyline-ruler.git(you can build wheels for later reuse bypip wheel git+https://github.com/cubao/polyline-ruler.git)UsageSeetests/test_basic.py.Testspython3tests/test_basic.py
Package: polylog
PolyLogPolyLog is a custom logging package designed to support your application development process. Built with versatility in mind, this package provides comprehensive, formatted logging in Python. It includes features such as:Customizable formattingThread-safe loggingTrace and Span ID integrationColor-coded log levelsOptional local log file storageThis package forms part of a larger multi-language (polylog) logging framework, with companion modules in Go, Rust, and TypeScript.InstallationTo install PolyLog, you can simply use pip:pipinstallpolylogUsageHere is a basic usage example:frompolylogimportsetup_logger# Set up the loggerlogger=setup_logger(__name__)# Use the loggerlogger.info("This is an information message")logger.error("This is an error message")In this example,setup_loggeris a function that sets up the logger and returns it. You can then use methods likelogger.infoandlogger.errorto log messages.ContactIf you have any questions, feel free to reach out atGitHub.LicenseThis project is licensed under the terms of the MIT license.
Package: polymarket-trading
trade-cliSimple cli tool for trading on PolyMarketInstallation on WindowsInstallPythonfrom Microsoftor download thePython installerdirectlyInstallVisual StudioC++ Build ToolsOpen a terminalRunpip install polymarket-tradingRunpm-trade -hto display helpTrading SetupCreate a new wallet on the matic chainCreate your matic RPC endpoint onhttps://rpc.maticvigil.com/(or other RPC provider)Set env variablesPOLYGON_PRIVATE_KEYMATIC_VIGIL_RPC_KEY or RPC_URIFund your trading wallet with matic and usdcMade some money from this tool and want to contribute? Donate to these charities.Planned ParenthoodFair FightBrady Center to Prevent Gun ViolenceThe Marshall Project
Package: polymatheia
PolymatheiaPolymatheia is a python library to support working with digital archive metadata. Its aim is not necessarily to cover
all ways of working with digital archive metadata, but to make it (comparatively) easy to undertake most types of
tasks and analysis.Homepage:https://polymatheia.readthedocs.ioRepository:https://github.com/scmmmh/polymatheiaPackage:https://pypi.org/project/polymatheiaLicense: MIT
Package: polymatica-api
This is a simple example of getting data from a server Polymatica Platformfrompolymatica_apiimportPolymaticaAPIfrompolymatica_api.data_optionimportFilterAndfrompolymatica_api.typesimportDataOptionMethod,FilterMethod,SortDirectionimportpandasaspdp=PolymaticaAPI('{SERVER_URL}','Token{TOKEN}')response=p.get_data([p.from_dataset('world_population.csv').method(DataOptionMethod.Aggregate).group("Country/Territory").sum('2000 Population','2010 Population','2015 Population','2020 Population','2022 Population',).sort("Country/Territory",SortDirection.Desc).sort("2010 Population",SortDirection.Desc).set_filter(FilterAnd("Country/Territory",FilterMethod.Equal,"Jamaica"))])data=response.get('default')frame=pd.DataFrame(data.rows)frame.rename(columns=data.column_map,inplace=True)print(frame)
Package: polymatrix
What is it?A simple library for simulating and solvingpolymatrix games, where players are nodes of a network and edges represent two-player games.Right now polymatrix can handle any amount of players and connections between them, but only two possible strategies and two state variables for each player. If your use case is not supported, reach out via email or post an issue, I'll see what I can do.Installationpip install polymatrixUsageMaking a quick game between randomly connected 7 players and simulating 5 random rounds:game=polymatrix.QuickGame(7)game.simulate(5)Making a game between 5 players on a ring topology (each player connected to two others) and with a starting state of 100 units for all players. Then play some strategy profiles:game=polymatrix.PolymatrixGame(start_populations_matrix=[[100,100]]*5,topology="ring")game.play(strategy_profile=[0,1,1,1,0])print(game.state)ArchitectureThe the high-level functionality (such as payoff functions) are in the PolymatrixGame class in polymatrixgame.py module, which inherits from more general MultiplayerGame from multiplayergame.py. The fundamental data of the game is information about the players (player.py) and how they are connected (network.py). The game network is really a networkx graph but with some extra methods (such as random edge addition/removal which I used for genetic programming). This is a high-level overview of dependencies:There are 3 types of attributes to define a game:
global_attributes, for example: probability of an edge existing, edge weight distribution, global utility etc
player_attributes (specific to a node)
link_attributes (specific to an edge)LiteratureI highly recommend a 2016 paper by Cai, Candogan, Daskalakis and Papadimitriou about zero-sum polymatrix games:https://www.cs.mcgill.ca/~cai/pdf/zerosum.pdfFor general algorithmic game theory:https://www.cs.cmu.edu/~sandholm/cs15-892F13/algorithmic-game-theory.pdf
Package: polymaze
﻿=================================================
PolyMaze - Create mazes from a variety of sources
=================================================This utility converts several different kinds of inputs into mazes.Allowed Inputs:Aspect ratio (height / width) of a rectangular mazeText - convert the content of the string into a maze / mazesImage - convert the dark parts of an image into a maze / mazesOptions:Height / Width - adjust the difficulty (measured in polygon side lengths)Complexity - adjust the difficulty (measured in polygon density)Font - use your own font when making a String maze (especially for unicode strings)Shape - explicitly choose the type of tesselation used in the mazeInstallation:polymazeshould work with Py2 or Py3.pipinstallpolymazeIf you get the errordecoder zip not availablewhen using it, then probablyPILLOWdid not install completely. Try to upgrade or reinstallPILLOWand make sure it says png support was installed.Commandline Usage:To make a generic rectangular maze, at the command line:polymazeTo see all options:polymaze-hFor example, to make a string into a maze with some extra options (note the n
gets converted to a real newline internally):polymaze--text"Happy\nBirthday!"--complexity10--shapePolycatpolymaze-t迷路-c10-sOctaDiamond--fontmeiryob.ttcEverything above assumes the command line entry point (named polymaze) works
after installation. If not, then you will need to navigate to the root package
directory and use:pythoncli_runner.py[--options...]Library Usage:Please see demo.py for examples of how to use the components. You can also run
it simply with:pythondemo.pyThe primary components arePolyGrid(the geometric core of the whole package),
andPolyMazewhich converts aPolyGridinto a maze.Extension:If anyone is interested, I can document how to specify new tessellations.Background and Feedback:I developed this to regain some basic trigonometry skills which I have
lost over the years.If you find this useful or have any feedback, please let me know! Specifically
I have only tested this on Windows so please make an issue if it doesn’t work
in Linux, etc.License:MIT. See LICENSEBundled Noto CJK Font:SIL Open Font License, Version 1.1. See polymaze/font/LICENSE_CJK.txt
Package: polymedia
WSTL-PYA python package to make implementingWeb Service Transition Language (WSTL)in projects.Package DevelopmentI am developing this package as part of work on theOpen Distributed Information Service (ODIS).
Hopefully, it will be useful beyond this project, but I am not ready to make any promises just yet.
At the moment it should be considered an experimental work.Related WorkThere is also theALPS-PYdeveloped for the same reason,
which helps withApplication-Level Profile Semantics (ALPS)implementations.FeedbackAny feedback will be welcomed. Create an issue, or start a discussion on
theODIS repoUsageAt the moment it is possible to create a valid WSTL message from code:wstl=Wstl()wstl.add_action(...)wstl.add_data_item(...)print(wstl.to_data())Behind the scenes it can resolve action names to full action descriptions.Plans[ ] Integration withALPS-PYproject
Package: polymer
New Summary - Do not use this packageIn many cases, this package can be replaced by Python3'sconcurrent.futures.ProcessPoolExecutor().  As of 2023, this package is vulnerable to process deadlocks, and in-general Python3 tripping all over itself. These problems are better solved inconcurrent.futures.  At some point in the future, I may rewritepolymeras a wrapper aroundconcurrent.futures.Original SummaryA simple framework to run tasks in parallel.  It's similar tomultiprocessing.Pool, but has a few enhancements over that.  For example,mp.Poolis only useful for multiprocessing functions (not objects).  You can wrap a function around the object, but it's nicer just to deal with task objects themselves.polymeris mostly useful for its Worker error logging and run-time statistics.  It also restarts crashed multiprocessing workers automatically (not true with multiprocessing.Pool).  When a worker crashes,polymerknows what the worker was doing and resubmits that task as well.  This definitely is not fool-proof; however, it's a helpful feature.OnceTaskMgr().supervise()finishes, a list of object instances is returned.  You can store per-task results as an attribute of each object instance.Usageimporttimefrompolymer.PolymerimportControllerQueue,TaskMgrfrompolymer.abc_taskimportBaseTaskclassSimpleTask(BaseTask):def__init__(self,text="",wait=0.0):super(SimpleTask,self).__init__()self.text=textself.wait=waitdefrun(self):"""run() is where all the work is done; this is called by TaskMgr()"""## WARNING... using try / except in run() could squash Polymer's##      internal error logging...#time.sleep(float(self.wait/10))print(self.text,self.wait/10.0)def__eq__(self,other):"""Define how tasks are uniquely identified"""ifisinstance(other,SimpleTask)and(other.text==self.text):returnTruereturnFalsedef__repr__(self):return"""<{0}, wait:{1}>""".format(self.text,self.wait)def__hash__(self):returnid(self)defController():"""Controller() builds a list of tasks, and queues them to the TaskMgrThere is nothing special about the name Controller()... it's just somecode to build a list of SimpleTask() instances."""tasks=list()## Build ten tasks... do *not* depend on execution order...num_tasks=10foriiinrange(0,num_tasks):tasks.append(SimpleTask(text="Task{0}".format(ii),wait=ii))targs={'work_todo':tasks,# a list of SimpleTask() instances'hot_loop':False,# If True, continuously loop over the tasks'worker_count':3,# Number of workers (default: 5)'resubmit_on_error':False,# Do not retry errored jobs...'queue':ControllerQueue(),'worker_cycle_sleep':0.001,# Worker sleep time after a task'log_stdout':False,# Don't log to stdout (default: True)'log_path':"taskmgr.log",# Log file name'log_level':0,# Logging off is 0 (debugging=3)'log_interval':10,# Statistics logging interval}## task_mgr reads and executes the queued taskstask_mgr=TaskMgr(**targs)## a set() of completed task objects are returned after supervise()results=task_mgr.supervise()returnresultsif__name__=='__main__':Controller()LicenseGPLv3
Package: polymera
Polymera is a Python package for representing ambiguous sequences written with complement alphabets.Install:pipinstallpolymeraWeb documentation:https://edinburgh-genome-foundry.github.io/Polymera/Github page:https://github.com/Edinburgh-Genome-Foundry/PolymeraLicense:MIT, Copyright 2020 Edinburgh Genome FoundryMore biology softwarePolymera is part of theEGF Codonssynthetic biology software suite for DNA design, manufacturing and validation.
Package: polymers
Polymers Modeling LibraryThe library is implemented entirely in Rust, including the Python API. The Julia API calls the Rust library.PythonThe library can be installed as a Python package:pipinstallpolymersJuliaThe library can be installed as a Julia package:usingPkgPkg.add("Polymers")RustThe library can be added to an existing Rust project:cargoaddpolymersCitationMichael R. Buche. Polymers Modeling Library.Zenodo (2023).CopyrightCopyright 2022 National Technology & Engineering Solutions of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government retains certain rights in this software.
Package: polymetro
polymetroA polyrhythmic metronome with CLI and Jack audio server connectivity.InstallationInstallpolymetrousing pip:pipinstallpolymetroBasic UsageTo usepolymetro, follow the format:polymetro-pJACK_MIDI_PORT_NAME-tTEMPO-d<int>[intint...]Parameters:-p JACK_MIDI_PORT_NAME: The port name as shown byjack_lsp. For example:fluidsynth:midi_00.-t TEMPO: Set the tempo in measures per minute (main beat tempo).-d: Beat subdivisions. Can be one or multiple values, such as-d 4for 4 beats per measure. If multiple values are given, like-d 3 4, a 3-against-4 polyrhythm will be generated. In this scenario, the metronome will play two separate MIDI tracks, each with its own output, besides the main MIDI output.Example:To generate a 3-against-4 polyrhythm at a measure tempo of 30 per minute on the portfluidsynth:midi_00, you'd run:polymetro-pfluidsynth:midi_00-t30-d34Feedback and ContributionsFeel free to open issues or pull requests if you have suggestions, bug reports, or contributions. Your feedback is highly appreciated!LICENSEThis project is licensed under the terms of the LICENSE included in this repository. You can view the full license text byclicking here.
Package: polymonitor
PolymonitorPolymonitor can be used as a stand alone CLI tool to quickly check the status of a URL or as a plugin forpolybar.InstallationUse the package managerpipto install polymonitor.$pipinstallpolymonitorAlternatively you can clone the git repository and usePoetryto install it.$gitclonehttps://github.com/hegelocampus/polymonitor
$cdpolymonitor
$poetryinstallUsagepolymonitor--helpusage:Displayssitestatusforpolybar.[-h][-s][-c][-uURLS[URLS...]]optionalarguments:-h,--helpshowthishelpmessageandexit-s,--symbolicDisplaystheresultsassymbols-c,--compactReducestheresultsintoamorecompactpackage-uURLS[URLS...],--urlsURLS[URLS...]PassinURLstomonitorA basic use case would be quickly printing the status of web-apps you'd like to check on:$polymonitor-cuduckduckgo.comgoogle.comgoogle.com/404
Up:2Down:google.com/404Note that you do not need to preface the URLs with a protocol (e.g.,https://). If you do not provide a full URLhttps://will be prefixed to your URL before it is pinged.You can leave off the-cflag for more verbose output:$polymonitor-cuduckduckgo.comgoogle.comgoogle.com/404
google.com:Upgoogle.com/404:Downduckduckgo.com:UpPolybar UseIf you would like to use this tool in your polybar you need to add the following to your polybar config:[module/polymonitor]
type = custom/script
exec = polymonitor -cu duckduckgo.com google.com twitter.com cloudflare.com
interval = 10800This is what the above configuration will generate:Note that if you are using this to ping your own web-pages, you may want to raise the interval to only refresh every couple hours.The interval is specified in seconds so one hour would beinterval = 3600and the above example would refresh every three hours.ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.LicenseMIT
Package: polymr
Polymr is a lightweight and extensible search engine. Polymr has some
good features:Implemented entirely in PythonFlexible: capable of storing its index locally on LevelDB,
remotely on Redis and Postgres, and distributedly on Amazon DynamoExtensible, well-defined backend classesCapable of batch and incremental indexingThreadsafe searchesInstallationGetting the latest release of polymr is a snap.pipinstallpolymrDocumentationLearn more about polymr atreadthedocs.
Package: polymuse-future
polymuse-futureMaking the music realIn development phase, once completed repo will change name to polymuseFeaturesNeed to discuss .......Table of ContentsOverviewComponentsLinksInstalling ..Training(Note model)LoadingPlayerOverviewThis is BE project aiming to generate the musical patterns from the midi file that are the audibes toearsComponentsWill be added soonLinksThis to ...Installing ...This is pre complete installation, package may not run as expected$ pip install polymuseOR$ pip install polymuse-futureinstall thepolymuse-futurerecommendedTrainOnlyNOTEtraining availableNote TrainingfrompolymuseimporttrainF=dataset_path# It should be absolute PATH(recomended) where midi file aretrain.train_gpu(F,maxx=5)#Only if GPU is available, It uses CuDNNLstm version which performs operation on GPUtrain.train(F,maxx=5)#if GPU version do not works@dataset_path : It should be absolute PATH(recomended) where midi file are
@maxx : It is parameters that specifies maximum no of files used to training in case there are large no of files in dataset_path givenThis snapshot will train the model on dataset given,
3 files will generated and stored in followingdirstrucure :
.h5_models
:...chorus:....... stateless:...........wlvv.h5:...drum:......stateless:...........vyvh.h5:...lead:......stateless:.......... vyvh.h5Load Pretrain ModelsBelow code snapshot downloads the default model, and make above directory structure in current working directoryfrompolymuseimportloaderloader.load(mname='default')Load sample midisBelow code snapshot downloads the default midi and download in current directoryfrompolymuseimportloaderloader.load_midi()Note PlayerBefore using the player please train the models on dataset or load pre trained modelsfrompolymuseimportplayer# Before this please make sure the h5_models are loaded locallymidi_file="F:\\rushikesh\\project\\dataset\\lakh_dataset\\Kenny G"# directory where midi file willmidi_file=dutils.get_all_files(F)[0]# Midi file must be of atleast 3 tracksplayer.play_3_track_no_time(midi_file,midi_fname='midi00')The above will store midi file in current directory with file namemidi00XXX