Saravanan666/pypi-org huggingface dataset:
Package: pydesktopbrowserrecorder
PyDesktopBrowserRecorderThis project allows you to record your desktop or the browser during an automated test using selenium's webdriverTo install it, just open a terminal and execute:pip install pydesktopbrowserrecorderPiPY Project:https://pypi.org/project/pydesktopbrowserrecorder/Once installed, you just have to make the following import:from selenium_browser_desktop_recorder import SeleniumBrowserRecorderThen you create a SeleniumBrowserRecorder object, you have two modes.First mode:obj = SeleniumBrowserRecorder(folder,encoding)folder: Folder where we want to create the folder that will contain the videos for our recording sessionencoding: Encoding of the video. We only assure that using ".mp4" will work
This way, when you start the recording session, the desktop will be recorded until we stop the recording sessionBut you can also provide a third parameter:obj = SeleniumBrowserRecorder(folder,encoding,driver)driver: A webdriver objectIn this case, we will record only the browser window(s) that are being controlled by that webdriver objectTo start the recording session once we build the object we only have to use this method:obj.start_recording_session()And our object will start recording in a parallel threadTo stop the recording session we only have to:obj.stop_recording_session()The video will be saved and the threads finishedNOTE: If we are recording a browser and the size of it changes, we will stop the current video and start a new one with the new
size of the windowNOTE: This was developed using the following versions of the following external libraries:imageio_ffmpeg = 0.4.5numpy~=1.22.2imageio==2.15.0PyAutoGUI~=0.9.53selenium~=4.1.0Pillow~=9.0.1
Package: pydeskui
PyDeskUIPython TKinter Simple UI Components⚠️This project is still in development and is only for testing and learning, not productionUsageInstallationroot path# install dependencies from requirements.txtpipinstall-rrequirements.txt# install PyDeskUI by setup.py, build modepythonsetup.pybuild
pythonsetup.pyinstallDemoDraw Bing Dwen Dwencddemo/draw_bdd
pythonmain.pyDevelop democdpydeskui
pythondemo.pyBuildpipinstallpyinstaller
pyinstaller-F-w-i./core/assets/img/logo.ico./core/grid.pyContributionCheckContributing GuideReferencehttps://tkdocs.com/tutorial/
Package: py-des-lib
Welcome to Py-DESpy-desis a Python package designed to simplify the process of discrete event simulation, providing users with an intuitive and efficient framework for modeling and analyzing complex systems. Built upon the principles of simplicity, flexibility, and performance,py-desaims to offer a streamlined solution for simulation tasks across various domains, including operations research, computer science, and manufacturing.Key PrinciplesSimplicity:py-desprioritizes ease of use, allowing users to quickly define simulation models and scenarios without unnecessary complexity.Flexibility:Withpy-des, users have the flexibility to customize simulation through the usage of predefined and customComponents. From simple simulations to complex scenarios involving multiple entities and interactions,py-desadapts to diverse use cases with ease.Getting StartedTo begin usingpy-des, simply install the package via pip (comming soon):pipinstallpy-des-libFirst define your main process extending theComponentand defining amainmethod.frompydesimportComponent,SimulatorclassProcess(Component):def__init__(self,sim:Simulator):self.sim=simdefmain(self):for_inrange(10):self.sim.record(self,"start waiting")self.sim.sleep(2)self.sim.record(self,"end waiting")Now schedule the main process object and run simulationsim=Simulator()p=Process(sim)sim.schedule(p)sim.run()Start your journey looking at the documentation in thequick-startsection or check out theexamplesfor guidance on how to create simulation environments, schedule events, and analyze simulation outcomes.Feedback and SupportIf you have any questions, suggestions, or feedback regardingpy-des, feel free to reach out via GitHub issues or the official communication channels. Your input is invaluable in shaping the future development of the library and ensuring that it meets the needs of its users.Todos/Ideascomplete docsadd "speed" to the simulationadd predifined records on componentsadd more components: Server, Source, Sink ...create a module for Network (nodes and links) componentsgenerate components with cli tool for faster developement and automatic boilerplate (other new package)dependency injection
Package: py-desmume
A Python library for DeSmuME, the Nintendo DS library.Library to interface with DeSmuME’s “interface” frontend.Reimplementation of the DeSmuME Glade-GTK UI with GTK3.Running the setup.py (eg. via pip) compiles the library from the fork. Wheels are available
for Linux, Windows and MacOS.Documentation can be found in thedocsdirectory and athttps://py-desmume.readthedocs.org.
Package: pydesync
DesyncSimple conversions between synchronous and asynchronous functions and function
calls. You can use it to wait (really block) for asynchronous function results
withsyncor create synchronous versions withsynced:# Assume async_func is asynchronous.async_func:Callable[...,Awaitable[T]]# Call async_func and wait for its result synchronously:result:T=sync(async_func,*args,**kwargs)# Create a version which is synchronous without calling it:desynced_func:Callable[...,T]=synced(async_func)You can also wait for synchronous functions viadesyncor create asynchronous
versions withdesynced:# Assume sync_func is synchronous.func:Callable[...,T]# Call sync_func and wait for its result in an asynchronous context:awaitable:Awaitable[T]=desync(sync_func,*args,**kwargs)result:T=awaitawaitable# Create a version which is asynchronous without calling it:descyned_func:Callable[...,Awaitable[T]]=desynced(func)Desynced functions run in parallel (as far as python can run in parallel).defwait_some():time.sleep(1)return1# This should take approx. 1 second:assert10==sum(awaitasyncio.gather(*(desync(wait_some)foriinrange(10))))
Package: pydetect
Change point and anomaly detections for time-series.
Seenotebookto check basic usage.Change point detectionMean or / and variance shift (at most one change)CUMSUM statisticsMeanDetectorVarianceDetectorMeanVarianceDetectorAnomaly detectionGeneralized ESD TestGESDDetectorSeehttp://www.itl.nist.gov/div898/handbook/eda/section3/eda35h3.htm
Package: pydetex
Source repo onGitHub,
and run it onRepl.itIntroductionPyDetex is a Python application that transforms LaTeX code to plain text. It has multiple
language support (15+), detects repeated words, offers a dictionary (synonyms, antonyms,
definitions), and many things more to come!Comprehensive documentation for the latest version (if you plan to use the API)
is available athttps://pydetex.readthedocs.ioInstall InstructionsPyDetex can be installed via pip, for both MacOS, Windows & Linux. Simply run:$>python3pipinstallpydetex-UAlso, there’re compiled binaries for Windows (x64) and macOS available through GitHub releases.Launch the GUI, or use the librarySimply run this command anywhere to execute the application.$>python3-mpydetex.gui(Simple Pipeline)Tadada… !!! A simple GUI to process your LaTex, and paste into Google Docs, an email, or Grammarly ＼(^o^)／(Strict Pipeline)The strict pipeline removes all commands, or replaces by some known tags.Multiple options to configure: Check repeated words, highlight undetected code, or use different pipelines.You can also import the library, and use the parsers (methods that take latex code
and perform a single task) or the pipelines (combination of parsers). For more
information, visit thedocumentation.importpydetex.pipelinesaspiptext="This is a\\textbf{LaTex}code..."out=pip.simple(text)TO-DOsCurrently, many things must be improved:Add synthax checking for several languages, likelanguage-check.Custom support for environments, such astable.AuthorPablo Pizarro R.| 2021 - 2023
Package: pydetour
pydetour: Redirect any callable objects in Pythonpydetouris a pure-Python library for redirecting any callable object -- builtin functions included -- to an arbitrary function,without replacing the reference to the to-be-redirected function. Works on Python 3.8 and above.Installationpip install pydetour... or simply putpydetour.pyin a PYTHON_PATH.ExampleLet us see what it takes to redirect calls toos.listdirusing this library.>>>frompydetourimporthook>>>defget_fake_os_listdir(os_listdir):...deffake_os_listdir(path):...print(f'fake_os_listdir({repr(path)})')...ret=os_listdir(path)...ret.insert(0,'<fake>')...returnret...returnfake_os_listdir...get_fake_os_listdiris a function to pass to the library. Note that it takes an argument and returns a function. As you can infer, the argument is (or, more precicely, can be treated as) the original function and the returned function is the function to which calls toos.listdirare redirected.>>>importos>>>os.listdir('.')['pydetour.py','README.md','setup.py']>>>ref=os.listdir>>>unhook=hook(os.listdir,get_fake_os_listdir)>>>refisos.listdirTrueWe hookedos.listdirby invokinghook()function from the library, which returns another function which reverses the effect.  By comparing the variable to which we had saved the reference ofos.listdirwithos.listdirafter hooking, we can confirm that they are identical.>>>os.listdir('.')fake_os_listdir('.')['<fake>','pydetour.py','README.md','setup.py']>>>unhook()>>>os.listdir('.')['pydetour.py','README.md','setup.py']However, callingos.listdirdemonstrates that the call is indeed redirected to the function we defined earlier, as there is<fake>inserted in the beginning of the returned list. By calling the function returned byhook()we can undo the redirection.How it worksIn order to understand how this library works, it is necessary to get to know how function invocation is treated in CPython 3.8 and above. The snippet shown below is the part of CPython in charge of handling function invocations. (The explanation given here is a simplified one, as it does not mention the case in whichtp_callis called. Although we omit this case here, the library handles that as well.)Include/cpython/abstract.hstaticinlinePyObject*_PyObject_VectorcallTstate(PyThreadState*tstate,PyObject*callable,PyObject*const*args,size_tnargsf,PyObject*kwnames){// snipfunc=PyVectorcall_Function(callable);// snipres=func(callable,args,nargsf,kwnames);return_Py_CheckFunctionResult(tstate,callable,res,NULL);}Here,callableis a pointer to a callablePyObjectbeing invoked andPyVectorcall_Functionis a function for retrievingtp_vectorcall, a function pointer, from a givenPyObject. After retrieving thetp_vectorcall, it is called with the arguments passed tocallable.With this in mind, it is easy to see that if we could modify whatPyVectorcall_Functionreturns forcallable, we would be able to redirect all the invocations ofcallable, which is exactly what this library does.To achieve the goal, this library makes an extensive (ab)use of ctypes for manipulating internal Python objects.
Package: pydeum
IMPORTANTThis project is not released yet1. Installationpip3installpydeum2. UsageYou can usepydeumin many different ways, such as to get transactions or check addresses.2.1. Transactionsimportpydeumaspyd# Add a transaction to the mempoolpyd.push("from_address","to_address",100)# Review a transactionpyd.check("from_address","to_address",100)# Get 10 last transactions from an addresspyd.get("address",10)# Get the current balance of an addresspyd.balance("address",10)
Package: pydevd
PyDev.DebuggerLatest3.xversion: the PyDev debugger now supportssys.monitoringwhich enables
really fast tracing onPython 3.12(so, if speed is an issue, make sure you upgrade).The PyDev Debugger is a Python debugger which historically was created to
work withPyDev(in Eclipse).Over the years (as it's open source -- EPL) it was adopted by other IDEs/companies
(so, it was integrated into PyCharm and VSCode Python throughdebugpy, which bundlespydevd).Note that although it was adopted by other IDEs (and over the years companies of other
commercial IDEs did provide backing), by far most of the work was done without any
external backing and the ongoing work on the project relies on community support.So, if you like using it, please consider becoming a backer of the project (this is
done through thePyDevumbrella, so please seehttps://www.pydev.org/about.htmlfor how to contribute to the project).The sources for the PyDev.Debugger may be seen at:https://github.com/fabioz/PyDev.DebuggerIn general, the debugger backend shouldNOTbe installed separately if you're using an IDE which already
bundles it (such as PyDev, PyCharm or bundled through debugpy, which is the debug adapter used in
VSCode Python and Visual Studio Python).It is however available in PyPi so that it can be installed for doing remote debugging withpip-- so, when
debugging a process which runs in another machine, it's possible topip install pydevdand in the code usepydevd.settrace(host='10.1.1.1')to connect the debugger backend to the debugger UI running in the IDE
(whereas previously the sources had to be manually copied from the IDE installation).For instructions on how toRemote DebugwithPyDev, see:https://www.pydev.org/manual_adv_remote_debugger.htmlpydevdis compatible with Python 3.8 onwards and is tested both with CPython as well as PyPy.ForPython 3.3 to 3.7please keep usingpydevd 2.10.0.ForPython 2please keep usingpydevd 2.8.0.Recent versions contain speedup modules using Cython, which are generated with a few changes in the regular files
tocythonizethe files. To update and compile the cython sources (and generate some other auto-generated files),build_tools/build.pyshould be run -- note that the resulting .pyx and .c files should be commited.
Package: py-dev-deps
py-dev-depsA project that only manages python development dependenciesThe aim of this project is to provide a common denominator for python development dependencies
in one package that can be added as a development dependency to other projects.  By using
poetry to resolve and maintain a common set of compatible development dependencies, it may
help to reduce the burdens of package installations for projects using this project as a
development dependency.InstallSeeINSTALLfor more details; the following should work; note that
the intention is to use this package only for development dependencies.poetrypoetryadd-D'py-dev-deps'pipcat>>dev-requirements.txt<<EOFpy-dev-depsEOFpipinstall-rdev-requirements.txt
Package: pydevd-odoo
pydevd-odooPyDev.Debuggeris the Python debugger used
in PyDev, PyCharm, VSCode. This plugin aims to make the debugger works better for Odoo.Odoo RecordsetRecordsetsis a fundamental concept in Odoo.
A recordset is an ordered collection of records of the same model. Trying to read a field
on multiple ids recordset will raise an error. Because PyDev.Debugger recognizes a recordset as a
non-collection object so the error will be raise when evaluating its fields. This plugin helps
PyDev.Debugger correctly evaluate a multiple ids recordset.InstallationInstall this plugin to the python environment in which the debugger runs.pip install pydevd-odooScreenshotsPyCharm Debugger without this pluginPyCharm Debugger with this plugin
Package: pydevd-pycharm
The sources for the PyDev.Debugger (used in PyDev & PyCharm) may be seen at:https://github.com/fabioz/PyDev.DebuggerIn general, the debugger backend shouldNOTbe installed separately if you’re using an IDE which already
bundles it (such as PyDev or PyCharm).It is however available in PyPi so that it can be installed for doing remote debugging withpip– so, when
debugging a process which runs in another machine, it’s possible topip install pydevd-pycharmand in the code usepydevd_pycharm.settrace(host=’10.1.1.1’)to connect the debugger backend to the debugger UI running in the IDE
(whereas previously the sources had to be manually copied from the IDE installation).It should be compatible with Python 2.6 onwards (as well as Jython 2.7, IronPython and PyPy – and
any other variant which properly supports the Python structure for debuggers – i.e.: sys.settrace/threading.settrace).Recent versions contain speedup modules using Cython, which are generated with a few changes in the regular files
tocythonizethe files. To update and compile the cython sources (and generate some other auto-generated files),build_tools/build.pyshould be run – note that the resulting .pyx and .c files should be commited.To generate a distribution with the precompiled binaries for the IDE,build_binaries_windows.pyshould be run (
note that the environments must be pre-created as specified in that file).To generate a distribution to upload to PyPi,python setup.py sdist bdist_wheelshould be run for each python version
which should have a wheel and afterwardstwine upload -s dist/pydevd-*should be run to actually upload the contents
to PyPi.Travis (Linux CI):Appveyor (Windows CI):
Package: pydevf
===============PyDev Formatter===============.. image:: https://img.shields.io/pypi/v/pydevf.svg:target: https://pypi.python.org/pypi/pydevf.. image:: https://img.shields.io/travis/fabioz/PyDev.Formatter.svg:target: https://travis-ci.org/fabioz/PyDev.FormatterFeatures==========This package provides a command line API to use the PyDev Code Formatter (the PyDevCode formatter is created by extracting the engine for code formatting provided byPyDev: http://www.pydev.org).The PyDev Formatter is a conservative python code formatter and will try to keep thestructure of the code as close as possible to the original sources, while fixing manycommon issues such as:- Keep a space after commas- Trim spaces inside parenthesis- Right-trim lines- Add a space before and after operators- Keep 2 lines before top level classes/methods- Keep 1 line before inner classes/methods- Add new line at end of file- Format comments to have 2 spaces before a comment and 1 space inside the commentNote that it does not try to break statements to fit any pre-specified line length (as gofmt).Command line=============Basic use of the formatter is:``python -m pydevf <filename_or_directory>````python -m pydevf -h`` may be used to see the help for additional parameters.Installing============Requisites------------ java 8+ (so, make sure java is installed and in your PATH)- python 2.7 or 3.4 onwards- click 6+Install with pip-----------------To install the PyDev Formatter use:``pip install pydevf``Using with pre-commit---------------------To use it with `pre-commit`_, just add the following repo to your ``.pre-commit-config.yaml``::-   repo: https://github.com/fabioz/PyDev.Formatterrev: ''  # Use the sha or tag you want to point athooks:-   id: pydevf.. _pre-commit: https://pre-commit.com/Dealing with big lines========================Note that in PyDev there are tools to help on those manual cases. i.e.:Wrap docstrings/comments with ``Ctrl+2, W`` -- See: http://pydev.blogspot.com/2015/04/wrapping-docstringscomments-in-pydev.html.Wrap/unwrap lists/calls with ``Ctrl+1``, ``Wrap expression``/``Unwrap expression`` (used with cursor inside the list/call).Daemon mode============By default the formatter will create a daemon and will reuse it among multiple invocations (becausethe formatter is **very fast** but its startup is slow). If you don't want to use this mode usethe ``--no-daemon`` parameter.License==========* EPL (Eclipse Public License) 2.0Releasing==========- Update versions on ``setup.py`` and ``version.py``- ``git tag {{version}}`` (i.e.: v0.1.2)- ``git push --tags`` (travis should build and deploy)Local release---------------- Update versions on ``setup.py`` and ``version.py``- ``python setup.py sdist bdist_wheel``- ``python -m twine upload dist/*``=======History=======0.1.0 (2018-06-12)------------------* First release on PyPI.
Package: pydevice2mqtt
pydevice2mqttPython class library for device handling via MQTT.
All devices supports the auto discovery and configuration of HassioBuild and Installbuild wheel:# from top folder: 
pip install -e .
flit buildinstall wheel:pip install pydevice2mqttUsageimportosimportpathlibimportpydevice2mqtt# may create a dict with the device informationnew_device:dict={"ArbitrarySensor":[{"name":"Sensor 1","device_class":"current","unit_of_measurement":"A","object_id":"special_ID1"},{"name":"Sensor 2","device_class":"temperature","unit_of_measurement":"C","object_id":"special_ID2"}]}remote_config="remote_config.yaml"# your config file with the mqtt settingspydevice2mqtt.DeviceBridge.update_config(devices=new_device,config_file=remote_config)my_bridge=pydevice2mqtt.DeviceBridge(config_file=remote_config)my_bridge.configure_devices()# add new devices in Hassiomy_bridge.loop()Update Sensor ValuefromtypingimportDictimportpydevice2mqttdevices:Dict[str,pydevice2mqtt.RemoteDevice]=my_bridge.get_devices()devices[<unique_sensor_id>].set_value(123)
Package: pydevicetree
pydevicetreeThis is a Python 3 library for parsing, querying, and modifying Devicetree Source v1 files as
described in theDevicetree Specification v0.2.Installpydevicetree supports Python >= 3.5 and can be installed with pip from thePython Package Index.pip install pydevicetreeTutorialThe DevicetreeLet's say you have a file design.dts with the contents/dts-v1/;

/ {
	#address-cells = <1>;
	#size-cells = <1>;
	compatible = "my,design";
	aliases {
		serial0 = "/soc/uart@10000000";
	};
	chosen {
		stdout-path = "/soc/uart@10000000:115200";
	};
	cpus {
		#address-cells = <1>;
		#size-cells = <0>;
		cpu@0 {
			compatible = "sifive,rocket0", "riscv";
			device_type = "cpu";
			reg = <0>;
			riscv,isa = "rv32imac";
			status = "okay";
			timebase-frequency = <1000000>;
			sifive,dtim = <&dtim>;
			interrupt-controller {
				#interrupt-cells = <1>;
				compatible = "riscv,cpu-intc";
				interrupt-controller;
			};
		};
	};
	soc {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "my,design-soc";
		ranges;
		dtim: dtim@20000000 {
			compatible = "sifive,dtim0";
			reg = <0x20000000 0x10000000>;
			reg-names = "mem";
		};
		uart: uart@10000000 {
			compatible = "sifive,uart0";
			reg = <0x10000000 0x1000>;
			reg-names = "control";
		};
	};
};Parsing the TreeParsing the tree is as easy as 1, 2...>>> from pydevicetree import Devicetree
>>> tree = Devicetree.parseFile("design.dts")
>>> tree
<Devicetree my,design>Querying the TreeBycompatiblestring>>> tree.match("sifive,rocket0")
[<Node cpu>]By path>>> tree.get_by_path("/soc/dtim")
<Node dtim@20000000>Devicetree aliases are allowed in paths>>> tree.get_by_path("serial0")
<Node uart@10000000>GettingNodepropertiesThe value (or first value of a list/array) of a property can be retrieved withNode.get_field()>>> tree.match("sifive,rocket0")[0].get_field("timebase-frequency")
1000000The list or array of values assigned to a property can be retrieved withNode.get_fields()>>> tree.match("sifive,rocket0")[0].get_fields("compatible")
<StringList ['sifive,rocket0', 'riscv']>There are helper methodsNode.get_reg()andNode.get_ranges()for theregandrangesDevicetree properties.>>> tree.get_by_path("/soc/dtim").get_reg()
<RegArray [536870912, 268435456]>
>>> tree.get_by_path("/soc/dtim").get_reg().get_by_name("mem")
(536870912, 268435456)
>>> "0x%x" % tree.get_by_path("/soc/dtim").get_reg().get_by_name("mem")[0]
'0x20000000'GettingchosenpropertiesDevicetree.chosen()provides quick access to the properties of thechosennode>>> tree.chosen("stdout-path")
<StringList ['/soc/uart@10000000:115200']>Converting back to DevicetreeAny tree or subtree can be converted back to Devicetree by callingNode.to_dts()or simply
byprinting it:>>> print(tree.match("sifive,rocket0")[0])
cpu@0 {
        #size-cells = <0>;
        compatible = "sifive,rocket0", "riscv";
        device_type = "cpu";
        reg = <0x0>;
        riscv,isa = "rv32imac";
        status = "okay";
        timebase-frequency = <1000000>;
        sifive,dtim = <&dtim>;
        interrupt-controller {
                #interrupt-cells = <1>;
                compatible = "riscv,cpu-intc";
                interrupt-controller;
        };
};