Saravanan666/pypi-org huggingface dataset:
Package: pyconverters-pubmedfetcher
pyconverters_pubmedfetcherFetch articles from PubmedInstallationYou can simplypip install pyconverters_pubmedfetcher.DevelopingPre-requesitesYou will need to installflit(for building the package) andtox(for orchestrating testing and documentation building):python3 -m pip install flit toxClone the repository:git clone https://github.com/oterrier/pyconverters_pubmedfetcherRunning the test suiteYou can run the full test suite against all supported versions of Python (3.8) with:toxBuilding the documentationYou can build the HTML documentation with:tox -e docsThe built documentation is available at `docs/_build/index.html.
Package: pyconverters-rf_audio
pyconverters_rf_audioMy new converterInstallationYou can simplypip install pyconverters_rf_audio.DevelopingPre-requesitesYou will need to installflit(for building the package) andtox(for orchestrating testing and documentation building):python3 -m pip install flit toxClone the repository:git clone https://github.com/oterrier/pyconverters_rf_audioRunning the test suiteYou can run the full test suite against all supported versions of Python (3.8) with:toxBuilding the documentationYou can build the HTML documentation with:tox -e docsThe built documentation is available at `docs/_build/index.html.
Package: pyconverters-speech
pyconverters_speechSpeech recognition converter based on Huggingface pipelineInstallationYou can simplypip install pyconverters_speech.DevelopingPre-requesitesYou will need to installflit(for building the package) andtox(for orchestrating testing and documentation building):python3 -m pip install flit toxClone the repository:git clone https://github.com/oterrier/pyconverters_speechRunning the test suiteYou can run the full test suite against all supported versions of Python (3.8) with:toxBuilding the documentationYou can build the HTML documentation with:tox -e docsThe built documentation is available at `docs/_build/index.html.
Package: pyconverter-xml2py
A Python wrapper to convert XML documentation into Python source code
with its related Sphinx documentation.OverviewThe PyConverter-XML2Py project aims to automatically generate a Python library and a related
Sphinx documentation from an XML documentation.Documentation and issuesOn thePyConverter-XML2Py Issuesfor this repository,
you can create issues to submit questions, report bugs, and request new features.
To reach the PyAnsys support team, emailpyansys.core@ansys.com.Getting startedInstall thepyconverter-xml2pypackage with:python-mpipinstallpyconverter-xml2pyIt is recommended to organize the XML documentation as follow:Converting an XML-directoryOnce theXML_directoryis correctly organized, the converter can be run.pyconverter-xml2pypackage-xXML_directory_pathIf some functions need to be customized, the path containing the python
files can be specified.pyconverter-xml2pypackage-xXML_directory_path-fcustomized_function_directory_pathA new package is then automatically generated. Its default name ispackage.
It is organized as follow:Then, the Sphinx documentation can be generated from this package.
The following code is to render the documentation as an HTML one from Windows:cdpackagepipinstall-e.[doc,tests]# Using a virtual environment is recommended..\doc\make.bathtml
Package: pyconvertio
Convertio-pyA python library to usehttps://convertio.co/API to convert your files.Installationpip install pyconvertioCurrent functions:frompyconvertioimportConvertAPI_KEY="YOUR_API_KEY"convert_io=Convert()convert_io.local_file(api_key=API_KEY,file="filename",output_format="format",verbose=True)
Package: py-conway
py-conwayTDD-style implementation ofConway's Game of Lifein Python. Built with zero dependencies in order to be portable to Web, CLI and embedded applications (like MicroPython and CircuitPython).View Project on PyPiInstallationpipinstallpy-conwayUsageTo create a game, you'll need to provide dimensions and a starting two-dimensonal list to function as the game board. For example:frompy_conwayimportGameseed=[[0,1,0],[1,1,1],[0,1,0]]new_game=Game(3,3,seed)If no seed is provided, the game can either generate a seed of zeroes, or a random starter seed. use therandom=Truepositional argument to generate a random seed.new_game=Game(12,12,random=True)Once the game board is populated, call thestart()method. The game values and state will be initialized so you can interact with the board one step at a time. You can also use this method to re-initialize the game:new_game.start()You can also instruct the game to self-run with theThreadedGameclass andstart_thread()method. The game will start on a background thread and update the full game board as well as a number of informational instance variables:frompy_conwayimportThreadedGamethreaded_game=ThreadedGame(12,12,random=True)threaded_game.start_thread()threaded_game.current_board# hold the complete game state after each stepthreaded_game.live_cells# the count of live cells on the boardthreaded_game.generations# the number of steps elapsed in the current game.threaded_game.stop_thread()It's also possible to call therun_generation()method and control the game state yourself from one iteration to the next. Make sure you call thestart()method first:new_game.run_generation()According to the rules of Conway's Game of Life, the board is meant to be infinite. If you wish to
emulate this behavior in your own games, you can wrap the board around on itself with the initialization flagenforce_boundary, which is true by default.seed=[[1,0,0,0],[1,0,0,0],[1,0,0,0],[0,0,0,0]]new_game=Game(4,4,seed=seed,enforce_boundary=False)If the above code is run for a single generation, the board will look like this[[0, 0, 0, 0],
 [1, 1, 0, 1],
 [0, 0, 0, 0],
 [0, 0, 0, 0]]Here's an example that runs the game and plots the game board after intialization and the first generation. You can run this from theexample folder, either in a Jupyter notebook or standalone script:importmatplotlib.pyplotaspltfrommatplotlib.animationimportFuncAnimationfrompy-conwayimportGamemy_game=Game(12,12,random=True,enforce_boundary=False)my_game.start()board,ax=plt.subplots()plt.title("Conway's Game of Life")ylim,xlim=my_game.board_sizeax.set_xlim(0,xlim)ax.set_ylim(0,ylim)image=plt.imshow(my_game.current_board,animated=True,cmap='binary')defupdate(*args,**kwargs):my_game.run_generation()plt.xlabel(f"Generation:{my_game.generations}|\Population:{my_game.live_cells}")image.set_array(my_game.current_board)returnimage,conway_animation=FuncAnimation(board,update,interval=50,blit=True)plt.show()
Package: pycookiecutter
PycookiecutterOverviewStarting template for creating a Python package.  It’s built using theCookiecutterand theaudreyr/cookiecutter-pypackagepackages.Free software: BSD licenseDocumentation:https://pycookiecutter.readthedocs.io.FeaturesTravis CI configurationTox configuration (Python3.5/3.6/3.7)Sphinx configurationEasy PyPI registration/distributionBadges and more options.Install & RunTo generate a template, run this command in your terminal:$cookiecutterhttps://github.com/mqlab-dev/pycookiecutterOr:$pipinstallpycookiecutter$cookiecutterpycookiecutterHistory0.1.0 (2019-05-25)First release on PyPI.
Package: pycooldown
pycooldownDocumentation|SupportA lightning-fast cooldown/ratelimit implementation.Example UsagefrompycooldownimportFixedCooldowncooldown=FixedCooldown(period=10,capacity=5)defhandle_event(sender):retry_after=cooldown.update_ratelimit(sender)ifretry_afterisNone:print("Event succeeded!")else:print(f"Too many events from{sender}. Retry in{retry_after}seconds.")
Package: pycoolmasternet
A Python 3 library for interacting with aCoolMasterNetHVAC bridge.Installationpip install pycoolmasternetOr you can get the code fromhttps://github.com/koreth/pycoolmasternetUsagefrompycoolmasternetimportCoolMasterNet# Supply the IP address and optional port number (default 10102).## By default, properties will be refreshed by querying the device# if last refresh was more than 1 second ago; pass auto_update=False# to disable that behavior (in which case you will need to call# update_status() explicitly).cool=CoolMasterNet('192.168.0.123',port=12345,auto_update=False)# Returns a list of CoolMasterDevice objectsdevices=cool.devices()# Device's unit ID on the CoolMasterNet bridge, e.g., "L7.001"device.uid# Temperature unit: imperial, celsiusdevice.unit# Current reading of device's thermometerdevice.temperature# Current setting of device's thermostatdevice.thermostatdevice.set_thermostat(28)# True if device is turned ondevice.is_ondevice.turn_on()device.turn_off()# Fan speed: low, med, highdevice.fan_speeddevice.set_fan_speed('med')# Mode of operation: auto, cool, dry, fan, heatdevice.modedevice.set_mode('cool')# Swing mode: horizontal, vertical, auto, 30, 45, 60, stop# Numeric settings are degrees of louver tilt. On read, the property can# be None if the bridge reports that the device doesn't support swing.device.swingdevice.set_swing('30')# Dict with all the properties listed abovedevice.status# Force refresh of status (by default, device auto-updates its status# if most recent update is more than 1 second ago)device.update_status()LicenseThis code is released under the MIT license.
Package: pycoolmasternet-async
pycoolmasternet-asyncA Python 3 library for interacting with aCoolMasterNetHVAC bridge.
This is a fork ofpycoolmaster, modified to present an async interface and some other small changes.InstallationYou can install pycoolmasternet-async fromPyPI:pip3 install pycoolmasternet-asyncPython 3.7 and above are supported.How to usefrompycoolmasternet_asyncimportCoolMasterNetcool=CoolMasterNet("coolmaster")# Supply the IP address and optional port number (default 10102).cool=CoolMasterNet("192.168.0.123",port=12345,read_timeout=1)# General informationinfo=awaitcool.info()# Returns a dict of CoolMasterNetUnit objects. Keys are the unit IDsunits=awaitcool.status()unit=units["L1.001"]unit.unit_id# Temperature unit: Imperial, Celsiusunit.temperature_unit# Current reading of unit's thermometerunit.temperature# Current setting of unit's thermostatunit.thermostat# Setters return a new instance with updated infounit=awaitunit.set_thermostat(28)# True if unit is turned onunit.is_onunit=awaitunit.turn_on()unit=awaitunit.turn_off()# Fan speed: low, med, high, autounit.fan_speedunit=awaitunit.set_fan_speed('med')# Mode of operation: auto, cool, dry, fan, heatunit.modeunit=awaitunit.set_mode('cool')# Get fresh infounit=awaitunit.refresh()
Package: pycoon
Pycoonis a Python WSGI web development framework which allows XML
processing pipelines to handle HTTP requests based on URI pattern matching. It
is similar in intention to the Apache Cocoon framework. Pycoon uses sitemap file
format compatible with Apache Cocoon Sitemap 1.0.The architecture of Pycoon focuses on:Full sitemap file format compatibility with Apache CocoonHeavy usage of WSGI modularity ideasSimplicity of deploymentOptimization issuesPycoon is a WSGI middleware that dispatches requests based on Apache Cocoon
sitemap logic. Data is processed by an XML pipeline composed of several WSGI
applications and middleware components. An HTTP server WSGI interface and it’s
implementations (Pycoon front-end) are already complete. WSGI interfaces of
sitemap components and implementations of them (Pycoon back-end) are in progress.What’s NewCreated basic framework for adding samplesAdded support for customizableInputModulesCreated some static and dynamic UML diagrams for developersAdded HTTP redirect support via<map:redirect>Added If-Modified-Since HTTP header support toResourceReaderAdded fmt_textile built-in blockAdded mgmt_statusgen built-in blockAddedResourceExistsSelectorMinor enhancements and bugfixes (#20, #21, #22 and others)Starting PointsGeneral infoQuick starter guideDeveloper’s guideRoadmapChangelog
Package: pycoordinates
pycoordinatesA tiny implementation of typical coordinate transformations used in physics, materials science,
and quantum chemistry.InstallpipinstallpycoordinatesBuild from sourceClone this repositorygitclonehttps://github.com/pulkin/pycoordinates.gitcdpycoordinatesInstall build systempipinstallbuildBuildpython-mbuildInstallpip install dist/*.tar.gz
Package: pyco-orm
pyco-sqlalchemyUsingCoModelto make SqlAlchemy's ORM even simpler for humans, develop with Flask/Django/OtherWebFrames.note: 不管在使用任何 web 框架, 我都希望能有统一的 ORM 查询接口, 且易于在不同的数据库间迁移.Tips:usecharset=UTF8MB4 collate utf8_general_cirefer:What's the difference between utf8_general_ci and utf8_unicode_ci?Samplesflaskfrompyco_sqlalchemy._flaskimportBaseModel,dbclassUser(db.Model,BaseModel):id=db.Column(db.Integer,primary_key=True,autoincrement=True)name=db.Column(db.String(32))email=db.Column(db.String(64),unique=True)form=dict(name="dev")u1=User.insert(form,email="dev@pypi.com")u3=User.upsert_one(form,email="dev@oncode.cc")assertu1.id==u3.id
Package: pycoornet
PyCooRnetUsing Python Given a set of URLs, this packages detects coordinated link sharing behavior on social media and outputs the network of entities that performed such behaviour.pip:https://pypi.org/project/pycoornet/Project:https://upb-ss1.github.io/based onhttps://github.com/fabiogiglietto/CooRnetOverviewGiven a set of URLs, this package detects coordinated link sharing behavior (CLSB) and outputs the network of entities that performed such behavior.What do we mean by coordinated link sharing behavior?CLSB refers to a specific coordinated activity performed by a network of Facebook pages, groups and verified public profiles (Facebook public entities) that repeatedly shared the same news articles in a very short time from each other.To identify such networks, we designed, implemented and tested an algorithm that detects sets of Facebook public entities which performed CLSB by (1) estimating a time threshold that identifies URLs shares performed by multiple distinguished entities within an unusually short period of time (as compared to the entire dataset), and (2) grouping the entities that repeatedly shared the same news story within this coordination interval. The rationale is that, while it may be common that several entities share the same URLs, it is unlikely, unless a consistent coordination exists, that this occurs within the time threshold and repeatedly.Installationhttps://pypi.org/project/pycoornet/pipinstallpycoornetJupyter Notebook Examplepycoonet_example.ipynbUsage examplefrompycoornet.crowdtangleimportCrowdTanglefrompycoornet.sharedimportSharedfrompycoornet.statisticsimportStatisticsimportnetworkxasnximportnumpyasnpimportpandasaspdimportloggingdefmain():links_df=pd.read_csv('samples/sample_source_links.csv')# Init CrowdTangle with api keycrowd_tangle=CrowdTangle("abc123def345")ct_df=crowd_tangle.get_shares(urls=links_df,url_column='clean_url',date_column='date',clean_urls=True,platforms='facebook',max_calls=2)shared=Shared(ct_df)crowtangle_shares_df,shares_graph,q,coordination_interval=shared.coord_shares(clean_urls=True)print(f"Coordination Time ={coordination_interval}")#Build Gephi Filefornodeinshares_graph.nodes(data=True):node[1]['label']=node[1]['account_name']nx.write_gexf(shares_graph,"samples/out/shares.gexf")componet_summary_df=Statistics.component_summary(crowtangle_shares_df,shares_graph)top_urls_df=Statistics.get_top_coord_urls(crowtangle_shares_df,shares_graph)if__name__=="__main__":logging.basicConfig(level=logging.INFO,filename="pycoornet.log")main()running testspy.test--crowdtoken=<yourcrowdtangleapitoken>For Examplepy.test--crowdtoken=akZbRIg2DNKhFogkN6rFurvAcknowledgementsCooRnet has been developed as part of the projectSocial Media Behaviourresearch project activities.The project is supported by a the Social Media and Democracy Research Grants from Social Science Research Council (SSRC). Data and tools provided by Facebook.
Package: pycope
PyCOPEThis is a Context-Oriented Programming Extension for the Python language. It provides
that allow programmers to utilize Context-Oriented techniques in an Object-Oriented
manner.MotivationThis library is the fruit of my Context-Oriented Programming (COP) research and experimentation.
My approach is a new take on COP that can potentially be implemented in any Object Oriented
supported language. I'll be writing a paper on it soon.InstallationThis library is available in Pypi. Execute the following command to istall it:pip install pycopeDescriptionTo make this library work at minimum you need a context, a group of strategies with the same
method signature and layers.ContextIt's unconventional, but the context is stored as a stack of dictionaries.
When you create a COP "layer" you are adding/removing to/from the context's dictionary stack.
Each item in the stack represents a layer's alterations to the previous item. This was made
possible with a functional styled immutable dictionary, where a new dictionary is made after
each set of alterations.On a side note with contexts, there should be at least one context foreach thread of execution.
They are thread-safe, but you will probably get unexpected results if multiple threads are
applying layers to the same context.LayersA 'with' statement must be used on a pycope layer. Layers effects are not permanent
and must be reversed after the layer reaches the end of its execution scope.StrategiesA single group of strategies is used to define a contextual execution. The
strategies specify their priority based on the available context's map of fields. The
strategy with the highest priority is the one chosen for execution. This is essentially an
advanced if/elif/else chain.ExecutableAn executable defines a single contextual executable. The main goal is to minimize
boilerplate for the user whilst still allowing flexibility and power.Exampleimportcontextimportstrategyimportprioritizersimportexecutabledefis_red(red,green,blue):returnred>50andgreen<30andblue<30:defis_green(red,green,blue):returnred<30andgreen>50andblue<30:defis_blue(red,green,blue):returnred<30andgreen<30andblue>50:color_ctx=context.Context()color_strategies=[strategy.Strategy(is_red,[prioritizers.contains_field("color":"red")]),strategy.Strategy(is_green,[prioritizers.contains_field("color":"green")]),strategy.Strategy(is_blue,[prioritizers.contains_field("color":"blue")])]color_tester=executable.Executable(color_ctx,color_strategies)withcolor_tester.new_layer({"color":"red"},[])aslayer1:assertcolor_tester.execute(255,0,0)assertnotcolor_tester.execute(0,255,0)assertnotcolor_tester.execute(0,0,255)withcolor_tester.new_layer({"color":"blue"},[])aslayer2:assertnotcolor_tester.execute(255,0,0)assertnotcolor_tester.execute(0,255,0)assertcolor_tester.execute(0,0,255)assertcolor_tester.execute(255,0,0)assertnotcolor_tester.execute(0,255,0)assertnotcolor_tester.execute(0,0,255)
Package: pycopier
PyCopierSupports Python 2.7/3.5 and later. If it doesn't work with your Python version, feel free to submit a PR. PRs are welcome!A Python-based multi-threaded directory copier. This was created in the spirit of wanting to give a cross-platform way of doing a multi-threaded copy, in a way similar to Microsoft's Robocopy. Some params are implemented similarly to parameters of the same name from Robocopy. (Simple Robocopy calls may work with PyCopier by replacing robocopy.exe with pycopier.)InstallationTo install, clone down and in the top pycopier directory run:python -m pip install .orpython -m pip install pycopierSimple UsageAfter install, you can run via  ...python -m pycopier SourceDir DestinationDir <optional params>orpycopier SourceDir DestinationDir <optional params>Extended Usage____        ______            _
   / __ \__  __/ ____/___  ____  (_)__  _____
  / /_/ / / / / /   / __ \/ __ \/ / _ \/ ___/
 / ____/ /_/ / /___/ /_/ / /_/ / /  __/ /
/_/    \__, /\____/\____/ .___/_/\___/_/
      /____/           /_/

 ... a Python replacement for Robocopy, including multithreaded copy.

optional arguments:
  /h, //help   show this help message and exit

Robocopy Arguments:
  Arguments that more/less match Robocopy

  Source       Specifies the path to the source directory.
  Destination  Specifies the path to the destination directory.
  /MT MT       Creates multi-threaded copies with N threads. The default value
               for N is 8
  /create      Creates a directory tree and zero-length files only.
  /quit        Quits after processing command line (to view parameters).
  /purge       Deletes destination files and directories that no longer exist
               in the source.
  /move        Moves files and directories, and deletes them from the source
               after they are copied.
  /copyall     Copies all file information.
  /s           Copies subdirectories. Note that this option excludes empty
               directories. (robocopy's /e option for subdirectories including
               empties is default for pycopier)

PyCopier Arguments:
  Arguments that are specific to PyCopier

  /quiet       If set, be completely quiet during execution.DevelopmentAll development happens off of the master branch (or PRs to master). Once a 'release' is needed, versions, etc. will be updated in the master branch, tagged, and merged to the release branch. Nothing should be in the release branch that hasn't already been in the master branch.LicenseThis project is made available via the MIT License
Package: pycopine
Pycopine is a latency and fault tolerance library designed to isolate points of
access to remote systems, services and 3rd party libraries, stop cascading
failure and enable resilience in complex distributed systems where failure
is inevitable.As this copy-pasted text suggests, pycopine is heavily inspired byHystrix.PrerequisitesPycopine requires Python 3.2+, but may be backportet to 2.7 in the future.InstallationPycopine is not released yet.(Planned) FeaturesDetect and report failing services.Short-circuit services that fail on high load to help them recover.Monitor failure rates and performance metrics to detect bottlenecks.Manage thread pool and queue sizes on demand, at runtime, from everywhere.… (more to come)ExampleLets say we want to speak to a remote service that is slow, unreliable or both:importtimeimportrandomdefcrappy_service(input):''' The most useless piece of code ever.'''time.sleep(5)if'OK'!=random.choice(['OK','OK','f**ck']):raiseRuntimeError('We broke something.')returninputYou could throw lots of threads and try/except clauses at the problem and hope
to not break the internet. Or you could use pycopine:frompycopineimportCommandclassMyCommand(Command):''' Does nothing with the input, but with style. '''defrun(self,input):returncrappy_service(input)deffallback(self,input):returninput# Run and wait for the resultresult=MyCommand('input').result()# Give up after 2 secondsresult=MyCommand('input').result(timeout=2)# Fire and forgetMyCommand('input').submit()# Do stuff in parallelfoo=MyCommand('input_a').submit()bar=MyCommand('input_b').submit()results=[foo.result(),bar.result()]# Change your mind midway throughfoobar=MyCommand('input').submit()iffoobar.wait(timeout=2):result=foobar.reault()else:foobar.cancel(RuntimeError('No time for this sh**t'))