Saravanan666/pypi-org huggingface dataset:
Package: windows-adb-screen-capture
Capture screen from background windows and adb (Windows only)pipinstallwindows-adb-screen-capture# If you get the following error during the installation#       ModuleNotFoundError: No module named 'win32.distutils.command'#       [end of output]##   note: This error originates from a subprocess, and is likely not a problem with pip.# error: subprocess-exited-with-error## Try this:pipinstallwindows-adb-screen-capture--no-depspipinstallpywin32pipinstallmsspipinstallpandaspipinstallopencv-pythonUpdate 2022/11/10Faster ADB screenshotsUpdate 2022/11/04Screenshots can now be resized for imshowScreenshots can be taken from the whole screen, and even multiple screensBugfix: Closing and reopening imshow is working nowfromwindows_adb_screen_captureimportScreenShotssc2=ScreenShots()sc2.set_resize_ratio(50).choose_monitor_for_screenshot(0).imshow_screenshot_monitor()#0 for all screens, 1 for screen 1, 2 for screen 2...Example with BlueStacks (using adb)Open bluestacks$adbconnectlocalhost:5735#connect to adb from shell or however you wantfromwindows_adb_screen_captureimportScreenShotssc=ScreenShots(hwnd=None,adb_path=r"C:\ProgramData\adb\adb.exe",adb_serial='localhost:5735')sc.imshow_adb(sleep_time=0.05,quit_key="e")#show captured screenEdit screenshots before showingimportcv2sc.enable_show_edited_images()forxinrange(120):#while True for endless looptmpscreenshot=sc.imget_adb()#get as numpy arraytmpscreenshort_inverted=cv2.bitwise_not(tmpscreenshot)#just an example, do your editing heresc.show_edited_image(tmpscreenshort_inverted)#show the edited picsc.disable_show_edited_images()#back to normal screen capturingExample with BlueStacks (using hwnd)sc2=ScreenShots()sc2.find_window_with_regex('[bB]lue[sS]tacks.*')sc2.imshow_hwnd(sleep_time=0.05,quit_key="q")#show captured screen#capture screen and edit before showingsc2.enable_show_edited_images()forxinrange(1000):#while True for endless looptmpscreenshot=sc2.imget_hwnd()tmpscreenshort_inverted=cv2.bitwise_not(tmpscreenshot)#do your editing heresc2.show_edited_image(tmpscreenshort_inverted)#show the edited picsc2.disable_show_edited_images()#back to normal screen capturingGet screenshots without showing windowsfromwindowcaptureimportScreenShotssc=ScreenShots(hwnd=None,adb_path=r"C:\ProgramData\adb\adb.exe",adb_serial='localhost:5735')sc.imget_adb()sc2=ScreenShots()sc2.find_window_with_regex('[bB]lue[sS]tacks.*')sc2.imget_hwnd()
Package: windowsapps
windowsapps - Python library for managing installed applications on WindowsInstallationTo installwindowsappsfrom PyPi run:pipinstallwindowsappsUsageGetting all Installed Applicatonsimportwindowsappsinstalled_applications=windowsapps.get_apps()#Gives Dictionary of Application names along with their AppIDGetting the Name, AppId for a particular applicationimportwindowsappsname,appid=windowsapps.find_app('APPLICATION NAME')#searches for the APPLICATION NAME and returns:-#name = Name of the application.#appid = AppId of the applicationOpen an applicationimportwindowsappswindowsapps.open_app('APPLICATION NAME')#Will search for the application APPLICATION NAME and open it.CaveatsThis module will works for all applications installed on the PC including Windows Store Applications.
Works perfectly fine on Windows 10.
Package: windows-cap
Windows CaptureUtilize the Windows Graphics Capture API to capture the client area of a window.Requires Windows 10 and Python 3.8 or later.Usageimportcv2importnumpyasnpfromwindows_capimportWindowCapture# Create a WindowCapture object with the window title and class name (optional)wincap=WindowCapture("Untitled - Notepad","CLASSNAME")whileTrue:data=wincap.next()w,h=wincap.client_sizeimg=np.frombuffer(data,dtype=np.uint8)img=np.reshape(img,(h,w,4))img=cv2.resize(img,(w//4,h//4))cv2.imshow("WGC",img)ifcv2.waitKey(1)==ord('q'):cv2.destroyAllWindows()break
Package: windows-capture
Windows CaptureWindows Captureis a highly efficient Rust and Python library that enables you to capture the screen using the Graphics Capture API effortlessly. This library allows you to easily capture the screen of your Windows-based computer and use it for various purposes, such as creating instructional videos, taking screenshots, or recording your gameplay. With its intuitive interface and robust functionality, Windows Capture is an excellent choice for anyone looking for a reliable, easy-to-use screen-capturing solution.Notethis README.md is forPython libraryRust library can be foundhereFeaturesOnly Updates The Frame When Required.High Performance.Easy To Use.Latest Screen Capturing API.InstallationRun this commandpip install windows-captureUsagefromwindows_captureimportWindowsCapture,Frame,InternalCaptureControl# Every Error From on_closed and on_frame_arrived Will End Up Herecapture=WindowsCapture(capture_cursor=None,draw_border=None,monitor_index=None,window_name=None,)# Called Every Time A New Frame Is Available@capture.eventdefon_frame_arrived(frame:Frame,capture_control:InternalCaptureControl):print("New Frame Arrived")# Save The Frame As An Image To The Specified Pathframe.save_as_image("image.png")# Gracefully Stop The Capture Threadcapture_control.stop()# Called When The Capture Item Closes Usually When The Window Closes, Capture# Session Will End After This Function Ends@capture.eventdefon_closed():print("Capture Session Closed")capture.start()BenchmarkWindows Capture Is The Fastest Python Screen Capture LibraryContributingContributions are welcome! If you find a bug or want to add new features to the library, please open an issue or submit a pull request.LicenseThis project is licensed under theMIT License.
Package: windows-capture-device-list
Getting Camera List and Resolution in Python on WindowsOpenCVdoes not have an API for enumerating capture devices. The sample shows how to create a Python extension to invoke DirectShow C++ APIs for enumerating capture devices and corresponding resolutions.EnvironmentMicrosoft Windows SDKPython 3.6 or laterHow to Build the CPython ExtensionCreate a source distribution:pythonsetup.pysdistdistutils:python.\setup_distutils.pybuildscikit-build:pipwheel.--verboseTestimportdeviceimportcv2defselect_camera(last_index):number=0hint="Select a camera (0 to "+str(last_index)+"): "try:number=int(input(hint))# select = int(select)exceptException:print("It's not a number!")returnselect_camera(last_index)ifnumber>last_index:print("Invalid number! Retry!")returnselect_camera(last_index)returnnumberdefopen_camera(index):cap=cv2.VideoCapture(index)returncapdefmain():# print OpenCV versionprint("OpenCV version: "+cv2.__version__)# Get camera listdevice_list=device.getDeviceList()index=0forcameraindevice_list:print(str(index)+': '+camera[0]+' '+str(camera[1]))index+=1last_index=index-1iflast_index<0:print("No device is connected")return# Select a cameracamera_number=select_camera(last_index)# Open cameracap=open_camera(camera_number)ifcap.isOpened():width=cap.get(3)# Frame Widthheight=cap.get(4)# Frame Heightprint('Default width: '+str(width)+', height: '+str(height))whileTrue:ret,frame=cap.read()cv2.imshow("frame",frame)# key: 'ESC'key=cv2.waitKey(20)ifkey==27:breakcap.release()cv2.destroyAllWindows()if__name__=="__main__":main()pythontest.pyBlogListing Multiple Cameras for OpenCV-Python on Windows
Package: windows-curses
Adds support for the standard Pythoncursesmodule on Windows. Based onthese wheels. Uses the
PDCurses curses implementation.The wheels are built fromthis GitHub
repository.PDCurses is compiled with wide character support, meaningget_wch()is
available. UTF-8 is forced as the encoding.Starting from windows-curses 2.0, in the name of pragmatism, these wheels (but
not Gohlke's) include a hack to make resizing work for applications developed
against ncurses without Python code changes: Whenevergetch(),getkey(), orget_wch()returnKEY_RESIZE,resize_term(0, 0)is called automatically.
This gives behavior similar to the automaticSIGWINCHhandling in ncurses
(see PDCurses'resize_term()documentation).This
commitimplements the hack.To add the same hack in Python code (which is harmless, and needed if you want
resizing to work with older windows-curses versions or with Gohlke's wheels),
callcurses.resize_term(0, 0)after receivingKEY_RESIZE, and ignore anycurses.errorexceptions. ncurses reliably fails and does nothing forresize_term(0, 0), so this is safe on *nix.Please tell me if theresize_term(0, 0)hackery causes you any trouble.
Package: windows-curses-ywmod
Update: Add support for Fullwidth Unicode Characters! CJK languages
support finally!Adds support for the standard Pythoncursesmodule on Windows. Based onthese wheels. Uses the
PDCurses curses implementation.The wheels are built fromthis GitHub
repository.PDCurses is compiled with wide character support, meaningget_wch()is
available. UTF-8 is forced as the encoding.Starting from windows-curses 2.0, in the name of pragmatism, these wheels (but
not Gohlke's) include a hack to make resizing work for applications developed
against ncurses without Python code changes: Whenevergetch(),getkey(), orget_wch()returnKEY_RESIZE,resize_term(0, 0)is called automatically.
This gives behavior similar to the automaticSIGWINCHhandling in ncurses
(see PDCurses'resize_term()documentation).This
commitimplements the hack.To add the same hack in Python code (which is harmless, and needed if you want
resizing to work with older windows-curses versions or with Gohlke's wheels),
callcurses.resize_term(0, 0)after receivingKEY_RESIZE, and ignore anycurses.errorexceptions. ncurses reliably fails and does nothing forresize_term(0, 0), so this is safe on *nix.Please tell me if theresize_term(0, 0)hackery causes you any trouble.
Package: windowsdnsserver-py
windowsdnsserver-pywindowsdnsserver-py is a wrapper Python library forDnsServermodule.Subprocess module is used to perform process calls to interact with DnsServer module.FeaturesConvenient as a Python librarySupports A and Txt recordQuery DNS recordsInstallationpipinstallwindowsdnserver-pyLimitationsPython 3 supported, but Python 2 is not testedThis library is not able to work remotely, currently, it is merely able to call DnsServer module on localhost.
Since, the remote session feature is not on the table, the software that uses this module
must be installed on windows server where Windows Server/Dns Server is located.
Package: windows-dscp-fix
Windows DSCP Fix Python PackageA Python package to fixsetsockopt(..,IP_TOS,..)behavior on Windows.WhyIn theIPPROTO_IP socket optionsforsetsockopt,IP_TOSis marked as"DO NOT USE", andWindows QoS2 subsystemtakes over the admission.ToS/DSCP value is still an important field for QoS guarantee in IEEE 802.11 network, according toRFC 8325. However, there is no existing convenient method to tune the value.On Windows, only DSCP value is allowed to set except ECN bits and the Administrator permission is required (link). So, this functionality has to be maintained as a third-party module, which will not be accepted by mainline.Usageimportsocketimportwindows_dscp_fixsock=socket.socket(socket.AF_INET,socket.SOCK_DGRAM)sock.setsockopt(socket.IPPROTO_IP,socket.IP_TOS,128)#NOTE: Administrator permission required
Package: windows-entry-exe
This is a simple launcher for Python files, which is functionally equivalent to
the launchers in setuptools but not based on setuptools code. There are two
versions of the launcher - console and GUI - built from the same source code.This project is based on simple_launcher by Vinay Sajip (https://bitbucket.org/vinay.sajip/simple_launcher).
Where the original project launches the script via a python child process however,
this launcher embeds python and launches the script directly.The main benefit of this is seen with gui projects on windows, such that the program
in the taskbar is the launcher exe rather than the python.exe insimple_launcher.
This change means pinning the program to the taskbar works, as does any application icons set.The launcher is intended to facilitate script execution under Windows where a
PEP 397-compatible launcher is not available. The idea is that each Python
script has a copy of the launcher (symlinks not being generally available
under Windows). For scripts to work with the launcher, they have to have a name
ending in -script.py (for a console script) or -script.pyw (for a GUI script).
The deployment system (e.g. packaging) will ensure that for foo-script.py, a
console launcher opy named foo.exe is placed in the same directory; for
bar-script.pyw, a GUI launcher copy named bar.exe is placed in the same
directory.Assuming that the relevant directories are on the path, the scripts can be
invoked using just “foo” or “bar”. The foo.exe or bar.exe executable then
runs: it looks for a script with the appropriate suffix (“-script.py” or
“-script.pyw”) in the same directory, and if found, opens that script to read a
shebang line indicating which Python executable to use for the script. The folder
of that executable, if found, is used to specify which python.dll the launcher is run against.The above scheme is used automatically bysetuptoolswhenentry_pointsaree defined.distutilhowever works with an archive appended to the executable, rather than a separate file.
This scheme is also supported natively; if an archive is found it will be used preferentially, if not a companion script
will be used.These launchers can be used automatically for a project by including this module in
yoursetup.pyconfiguration like sosetup(
    name="my_proj",
    ...,
    use_windows_entry_exe=True,
    setup_requires=['windows_entry_exe'],
    entry_points={
        'gui_scripts': [
            'MyProj = my_proj:main',
        ]
    },
)setuptools will then build entry_point exe’s using these launchers rather than its own bundled ones.
Package: windows_filedialogs
File dialogs for Windowspipinstallwindows-filedialogsDocumentation:https://mrthearman.github.io/filedialogs/Source Code:https://github.com/MrThearMan/filedialogs/Contributing:https://github.com/MrThearMan/filedialogs/blob/main/CONTRIBUTING.mdImplements easy Windows file dialog functions. Requires thepywin32module.Basic use:fromfiledialogsimportsave_file_dialog,open_file_dialog,open_folder_dialogopen_path=open_file_dialog()ifopen_path:withopen(open_path,"r")asf:...save_path=save_file_dialog()ifsave_path:withopen(save_path,"w")asf:...open_folder=open_folder_dialog()ifopen_folder:withopen(os.path.join(open_folder,...),"w")asf:...Documentation:open_file_dialogtitle: str - Dialog title. Default is no title.directory: str - Directory to open file dialog in. Default is the current working directory.default_name: str - Default file name on dialog open. Default is empty.default_ext: str - Default file extension on dialog open. Default is no extension.ext: list[tuple[str, str | tuple[str, ...]]] - List of available extensions as (description, extension) tuples. Default is ("All files", "*").multiselect: bool - Allow multiple files to be selected. Default is False.Returns: Path to a file to open if multiselect=False. List of the paths to files which should be opened if multiselect=True. None if file open dialog canceled.Raises: IOError - File open dialog failed.save_file_dialogtitle: str - Dialog title. Default is no title.directory: str - Directory to open file dialog in. Default is the current working directory.default_name: str - Default file name on dialog open. Default is empty.default_ext: str - Default file extension on dialog open. Default is no extension.ext: list[tuple[str, str | tuple[str, ...]]]  - List of available extensions as (description, extension) tuples. Default is ("All files", "*").Returns: Path file should be save to. None if file save dialog canceled.Raises: IOError - File save dialog failed.open_folder_dialogtitle: str - Dialog title. Default is no title.encoding: str - Encoding for the folder. Default is Latin-1.Returns: Path to folder. None if no folder selected.
Package: windows-filepath
Makes a string file path compatible (Windows)# Tested with:# Python 3.9.13# Windows 10$pipinstallwindows-filepathimportsysimportpandasaspdimportinspectfromwindows_filepathimportmake_filepath_windows_comp,allow_long_path_windows# creating some random datateststuff=[x+'.png'ifini%2==0elsexforini,xinenumerate(inspect.getsource(pd).splitlines())]for_inteststuff:# doesn't check the length, you can change the windows settings by calling allow_long_path_windows()# This will set the MAX_PATH to 32,767fp=make_filepath_windows_comp(filepath=_,fillvalue="_",# replacement of any illegal charreduce_fillvalue=True,# */<> (illegal chars) -> ____ (replacement) -> _ (reduced replacement)remove_backslash_and_col=False,# important for multiple foldersspaceforbidden=True,# '\s' -> _other_to_replace=(";",",","[","]","`","="),# other chars you don't want in the file pathslash_to_backslash=True,# replaces / with \\ before doing all the other replacements)print(_)print(fp,end='\n\n')
Package: windowsget
Windowsget: Python CLIBasic usage -Download file by passing your URL as argument afterwindowsgetwindowsgethttps://myexample.com/file.txtDownload file by passing your URL as argument afterwindowsgetand specify output path with filename.windowsgethttps://myexample.com/file.txt-omydir/myfile.txtFor more check the documentation given under the project links.
Package: windowsha
Windows HA Data CrawlerCrawler for extracting windows HA dataGetting StartedThe crawler is developed to extract data from windows HA data and saved as xlsx format. We are using CIS benchmark as the standard. In the future, we will allow users to customize their own benchmark.PrerequisitesPre-requests are included in setup file. You will need to run the following commands to install external libraries if errors occur.Give examplesInstallingThe package can be installed by pip install. Make sure you have installed it properly.Run the following commands to install pip.curl https://bootstrap.pypa.io/get-pip.py -o get-pip.pypython get-pip.pyDeploymentAdd additional notes about how to deploy this on a live systemContributingPlease readCONTRIBUTING.mdfor details on our code of conduct, and the process for submitting pull requests to us.VersioningWe useSemVerfor versioning. For the versions available, see thetags on this repository.AuthorsLi XingxuanLicenseThis project is licensed under the MIT License - see theLICENSE.mdfile for details
Package: windows-hotkey-checker
Windows Hotkey CheckerSimple command line tool to check for registered hotkeys on WindowsThis is a simple python script that checks for hotkeys that already regitstered
by other programs on Windos and prints them to the console.It works by enumerating combinations of modifiers and keys and trying to
register them as new hotkeys. If the registration fails, it means that the
combination is already registered by another program.InstallationThe script can be installed with pip:python -m pip install windows_hotkey_checkerand only uses python standard library modules, so no additional dependencies.UsageUsage is simple. Just run the script with python:> python -m windows_hotkey_checkerThere is also a Script installed in the Scripts directory of the python
installation with the shortcut "hotkeys" that you can run from the command line as:> hotkeys
Package: window-slider
A python package to run sliding window with overlapping on numpy arrayStatusUsage$ pip install window-slider$ pythonfrom window_slider import Slider
import numpy
list = numpy.array([0, 1, 2, 3, 4, 5, 6, 7])
bucket_size = 3
overlap_count = 1
slider = Slider(bucket_size,overlap_count)
slider.fit(list)       
while True:
    window_data = slider.slide()
    # do your stuff
    print(window_data)
    if slider.reached_end_of_list(): breaknumpy 2D arrayfrom window_slider import Slider
import numpy
list = numpy.array([[0, 1, 2, 3],[0, 1, 2, 3]])
bucket_size = 3
overlap_count = 1
slider = Slider(bucket_size,overlap_count)
slider.fit(list)       
while True:
    window_data = slider.slide()
    # do your stuff
    print(window_data)
    if slider.reached_end_of_list(): breakwrap window data to custom classclass WindowData(object):
    def __init__(self, data):
        self._data = data
    
    def sum(self):
        return sum(self._data)
        

from window_slider import Slider
import numpy
list = numpy.array([0, 1, 2, 3, 4, 5, 6, 7])
bucket_size = 3
overlap_count = 1
slider = Slider(bucket_size,overlap_count,WindowData)
slider.fit(list)       
while True:
    window_data = slider.slide()
    # do your stuff
    print(window_data.sum())
    if slider.reached_end_of_list(): breakLicense
Package: windows-metadata
Windows MetadataThis package reads the metadata Windows creates for a file (also called "attributes" or "details").
These values are then stored in a WindowsAttribute object and can be accessed like a dict or an object attribute.attr=WindowsAttributes('testfile')attr["Horizontal resolution"]# dict-like accessattr.horizontal_resolution# attribute like accessTo get a dict of all the attributes a file hasattr.get_attribute_dict()
Package: windows-oracle-finder
Windows Oracle Finder"Windows Oracle Finder" is a module for python scirpts in order to find the correct version of the "Oracle Client" or "Oracle Instant Client" to use.PurposeThe purpose of this module is not to be deployed to live system like webservers or similar. Following the guidelines of the oracle connection modules (likecx_Oracle) is strongly recommended.This module is intended for use in scripts that are running on different client machines, that the oracle installation could be different in each one or has many oracle installations.Getting StartedThese instructions will get you a copy of the project up and running on your local machine on a windows system.PrerequisitesIn order to install this module you need to have:A Windows Operating SystemPython >= 3InstallingInstallation is pretty forward and it is done through pippip install windows-oracle-finderA basic use can be achieved like:import find_oracle

find_oracle.safely_set_oracle_path(None)Built Withlogzero- A simple library for easy logging (could change it to standard logging module)pefile- A way to identify if a dll is 32bit or 64bitpywin32- Helper functions to get the certain OS specific dataContributingPlease readCONTRIBUTING.mdfor details on our code of conduct, and the process for submitting pull requests to us.AuthorsCharalampos Gkikas-Initial work-hargikasLicenseThis project is licensed under the MIT License - see theLICENSEfile for details
Package: windows-path-adder
windows-path-adderopen cmd in windowsecho%PATH%:: C:\foo;D:\boopython -m windowspathadder"D:/new/path":: or python -m windowspathadder "D:\new\path"echo%PATH%:: D:\new\path;C:\foo;D:\boo:: the previous path is backed up with timestamp.echo%PATH_{timestamp}%:: C:\foo;D:\boo
Package: windows-pathlib
windows_pathlibBest Practices for Handling Paths in Windows.Have you written code like this?importosimportpathlibasPath# In Windows, the desktop can be changed to any location. The desktop is not necessarily located in the home directory.print(Path(os.path.expanduser("~/Desktop")))# This does not work.print(Path("%APPDATA%/Microsoft"))windows_pathlib can be used for concise writing.fromwindows_pathlibimportWindowsPathlibasPath# C:\Users\username\Desktopprint(Path.desktop())# C:\Users\username\AppData\Roaming\Microsoftprint(Path("%APPDATA%/Microsoft"))