Saravanan666/pypi-org huggingface dataset:
Package: machu-picchu
Vedro Screenshot MatcherThe screenshot_matcher (a.k.a. Machu Picchu) is a powerful tool designed for developers and testers to visually compare two versions of an application. By contrasting a production version (known as "golden") with a development version (referred to as "test"), spotting visual inconsistencies becomes more straightforward.Integrated seamlessly with the vedro testing framework, it aids in performing visual regression tests with ease.InstallationInstall the Pluginvedro plugin install vedro-screenshot-matcherConfigure the Plugin
In yourvedro.cfg.py:importvedroimportscreenshot_matcherclassConfig(vedro.Config):classPlugins(vedro.Config.Plugins):classScreenshotMatcher(screenshot_matcher.ScreenshotMatcher):test_app_url="http://localhost"golden_app_url="http://golden-app.com"Make sure to provide the correcttest_app_urlandgolden_app_urlin the configuration.Quick StartSuppose you have a basic test as below:importvedrofromcontextsimportopened_index_pageclassScenario(vedro.Scenario):subject="share page"defgiven_opened_page(self):self.page=opened_index_page()defwhen_user_click_on_share(self):self.page.get_by_text("Share").click()defthen_it_should_show_share_popup(self):share_popup=self.page.locator(".share-popup .title")assertshare_popup.text_content()=="Share Page"The context that opens the index page:importvedroimportplaywrightfromosimportenviron@vedro.contextasyncdefopened_index_page():browser=awaitplaywright.chromium.launch()page=awaitbrowser.new_page()awaitpage.goto(environ["APP_URL"])returnpageTo implement a screenshot assertion:Add the@screenshot_assertsdecorator at the beginning of the scenarioInclude thematch_screenshotassertion where neededimportvedrofromscreenshot_matcherimportscreenshot_asserts,match_screenshot@screenshot_asserts()# Step 1: Add decoratorclassScenario(vedro.Scenario):subject="share page"defgiven_opened_page(self):self.page=opened_index_page()defwhen_user_click_on_share(self):self.page.get_by_text("Share").click()defthen_it_should_show_share_popup(self):share_popup=self.page.locator(".share-popup .title")assertshare_popup.text_content()=="Share Page"assertmatch_screenshot(share_popup)# Step 2: Add screenshot assertionBy following these steps, the plugin will:Execute the test usingAPP_URLset to yourgolden_app_urlCapture a screenshot, storing it as the expected outcomeRun the test again withAPP_URLset to yourtest_app_urlFinally, it will compare the new screenshot with the previously saved one
Package: mac-imessage
imessagePython tools for sending iMessage/SMS message from a Mac. Check out the blog post on medium related to this repository:MediumPyPIInstallationpip install mac_imessageRunning mainpython -m mac_imessageUsageimportmac_imessageBasic UsageCheck oututils.pyfor the most basic functionalitymac_imessage.send('This is a test message','123-555-5555','iMessage')mac_imessage.send_SMS('This is a test message','123-555-5555')mac_imessage.send_iMessage('This is a test message','123-555-5555')AuthorJames Kabbes
Package: macimg
macimgA Python package for manipulating images using Objective-C frameworks.ExamplesExample 1: Applying Image FiltersfrommacimgimportImagefrommacimg.filtersimport(Bloom,Comic,Crystallize,Edges,Invert,Sepia,Vignette)# Load an imageimg=Image("assets/Iceland1.jpg")img.show_in_preview()# Apply a single filterVignette(intensity=10).apply_to(img)img.show_in_preview()# Apply multiple filtersfilters=[Comic(),Edges(),Invert(),Sepia(),Bloom(),Crystallize(crystal_size=50)]forindex,filterinenumerate(filters):filter.apply_to(img)img.show_in_preview()The code above produces the following sequence of images:Example 2: Applying DistortionsfrommacimgimportImagefrommacimg.distortionsimport(Bump,CircleSplash,Hole,LightTunnel,Pinch,TorusLens,Vortex,)# Load imageimg=Image("assets/Iceland2.jpg")img.show_in_preview()# Apply multiple distortionsdistortions=[Bump(radius=500,curvature=1),Vortex(radius=750,angle=1000.0),TorusLens(radius=1000,width=250),Hole(),Pinch(intensity=1),CircleSplash(),LightTunnel()]forindex,distortioninenumerate(distortions):distortion.apply_to(img)img.show_in_preview()The code above produces the following sequence of images:Example 3: Applying TransformationsfrommacimgimportImagefrommacimg.transformsimport(Flip,Rotate,)# Load imageimg=Image("assets/Iceland3.jpg")img.show_in_preview()# Apply multiple transformationstransforms=[Flip("horizontal"),Flip("vertical"),Rotate(degrees=30)]forindex,transforminenumerate(transforms):transform.apply_to(img)img.show_in_preview()The code above produces the following sequence of images:
Package: mac-itunes
Installation$[sudo]pipinstallmac-itunes$[sudo]npmi-gmac-itunesExamples$itunesplay
$itunespause
$itunesstop
$itunesnext
$itunespreviousvolume$itunesvolume50$itunesvolume50mute$itunesmute
$itunesmuted1$itunesunmutefrontmost (1or0)$itunesfrontmost0iTunes.appprocess$itunespid42$ituneskillreadme42.com
Package: mackerel
Mackerel is a minimal static site generator written in typed Python 3.6+.InstallationInstalling mackerel with pip:$ pip install mackerelOr by cloning the repository:$ git clone https://github.com/pkolios/mackerel.gitAnd installing mackerel:$ cd mackerel
$ pip install -e .DocumentationView the basic usage documentation atmackerel.sh.TestingRunning the tests from mackerel root directory:$ pytestLicenseMIT licensed. See the bundledLICENSEfile for more details.Changelog0.2 (2017-07-09)BugfixesFix an error in the packaging that causedmackerel initcommand to fail
due to the lack ofconfig.ini.ImprovementsRework thesetup.pyscript to increase release automation.0.1 (2017-07-09)First preview release.
Package: mackerel.client
mackerel.client is a python library to access Mackerel (https://mackerel.io/).This client is Ported frommackerel-client-ruby.Install$pipinstallmackerel.clientDependencymackerel.client userequests,simplejsonandclick.UsageGet hostsfrommackerel.clientimportClientclient=Client(mackerel_api_key='<Put your API key')host=client.get_hosts()Get hostfrommackerel.clientimportClientclient=Client(mackerel_api_key='<Put your API key')host=client.get_host('<hostId>')Update host statusfrommackerel.clientimportClientclient=Client(mackerel_api_key='<Put your API key')# Poweroff.self.client.update_host_status('<hostId>','poweroff')# Standby.self.client.update_host_status('<hostId>','standby')# Working.self.client.update_host_status('<hostId>','working')# Maintenance.self.client.update_host_status('<hostId>','maintenance')Retire hostfrommackerel.clientimportClientclient=Client(mackerel_api_key='<Put your API key')self.client.retire_host('<hostId>')Get latest metricsfrommackerel.clientimportClientclient=Client(mackerel_api_key='<Put your API key')# Get hostId A's and hostId B's loadavg5, memory.free value.metrics=self.client.get_latest_metrics(['<hostId A>','<hostId B>'],['loadavg5','memory.free'])Post metricsfrommackerel.clientimportClientclient=Client(mackerel_api_key='<Put your API key>')metrics=[{'hostId':'<hostId>','name':'custom.metrics.loadavg','time':1401537844,'value':1.4},{'hostId':'<hostId>','name':'custom.metrics.uptime','time':1401537844,'value':500}]# Post `custom.metrics.loadavg` and `custom.metrics.uptime` to `hostId`.client.post_metrics(metrics)Post service metricsfrommackerel.clientimportClientclient=Client(mackerel_api_key='<Put your API key>')metrics=[{'name':'custom.metrics.latency','time':1401537844,'value':0.5},{'name':'custom.metrics.uptime','time':1401537844,'value':500}]# Post 'custom.metrics.latency' and 'custom.metrics.uptime' to `service_name`.self.client.post_service_metrics('service_name',metrics)CLIGet host(s) information from hostname or service, role.$mkr.pyinfo[--namefoo][--serviceservice][--rolerole]Set status of a host.$mkr.pystatus--host-idfoo--statusworkingRetire a host.$mkr.pyretire--host-idfooGet status of a host.$mkr.pystatus--host-idfooAuthentication$exportMACKEREL_APIKEY=foobar
Package: mack-sdk
OverviewThis is a Python SDK for theThe One API(not fully implemented).API Overview ishere.Example usage may be foundhere.Rate limit retry is not implemented, you may get 429 errorsInstallpip install mack-sdkDevelopmentpre-commithooks is heavily used for various linting and formatting tasks.
We rely onpoetryfor dependency management.makeis used to spin-up local environment:make developmentto install all dependenciesmake lintto run lintingmake testto run all testsmake test TESTS=tests/unit/client_test.pyto run tests from a file
Package: mac-localized
Installation$[sudo]pipinstallmac-localizedHow it worksRelease Notes.localized/
    .localized/
        en.strings
        de.strings
        ja.strings.strings:"Release Notes" = "Localized name";Examples>>>importmac_localized>>>mac_localized.mkdir("folder",ru="ru translation",de="de translation")'folder.localized'>>>mac_localized.load("folder"){'ru':'ru translation','de':'de translation'}>>>mac_localized.update("folder",ru="new ru translation",de="new de translation")>>>mac_localized.get("folder","ru")'new ru translation'>>>mac_localized.rm("folder",["ru"])>>>mac_localized.rm("folder")# rm all localizationsLinksLocalizing the Name of a DirectoryDisplay Namesreadme42.com
Package: mac-login-items
Installation$[sudo]pipinstallmac-login-items$[sudo]npmi-gmac-login-itemsExamples$login-itemsnames
GoogleChrome
Windscribe$login-itemspaths
/Users/username/Applications/GoogleChrome.app
/Applications/Windscribe.app$login-itemsadd/Applications/CCMenu.app$login-itemsrmCCMenureadme42.com
Package: maclookup
Client library formacaddress.ioin Python
language.Free software: MITInstallationpip install maclookuporgit clone https://github.com/CodeLineFi/maclookup-python.git
pip install -e /path_to_sdist/orcd /path_to_sdist/
python setup.py installorcd /path_to_sdist/
easy_install .Sample codefrom maclookup import ApiClient
import logging

client = ApiClient('Your API key')

logging.basicConfig(filename='myapp.log', level=logging.WARNING)

print(client.get_raw_data('00A043AAAAAA', 'json'))
print(client.get_vendor('BBA043AAAAAA'))
print(client.get('BBA043AAAAAA'))

response = client.get('00A043AAAAAA')
print(response.vendor_details.is_private)
print(response.block_details.date_created)ExamplesYou may find some examples in the “examples” directory. To run these
examples you need to install “maclookup” package. Then you need to create an
account onmacaddress.io. The last step is to
define environment variables with the value of your API key and other
settings.export API_KEY=<Your API key>
export LOG_FILENAME=myapp.log
export OUTPUT_FILENAME=result.csvDocumentationmaclookup package contains the API client classApiClient, which
implements the following functionalityApiClient methods list:get(mac): ResponseModelReturns ResponseModel object as a parsed API response for a given MAC address
or OUIget_vendor(mac): stringReturns the company name as textget_raw_data(mac, output_format): stringReturns non-parsed API response as stringset_base_url(url)Sets base url tourlset_requester(requester)Sets instance of RequesterResponseModel fields:vendor_details: VendorDetailsblock_details: BlockDetailsmac_address_details: MacAddressDetailsVendorDetails fields:oui: stringis_private: boolean (False|True)company_name: stringcompany_address: stringcountry_code: stringBlockDetails fields:block_found: boolean (False|True)border_left: string (MAC address, may be in the EUI-64)border_right: string (MAC address, may be in the EUI-64)block_size: int (long long int)assignment_block_size: stringdate_created: instance of datetime.datetimedate_updated: instance of datetime.datetimeMacAddressDetails fields:search_term: stringis_valid: boolean (False|True)transmission_type: stringadministration_type: stringIf the server returns a marker of outdated API version, this library will
write a warning to the log.DevelopmentTo install dev requirements, you need to run the following commands:cd /path_to_sdist/
pip install -e .[dev]To run unit tests, you may use the following command:cd /path_to_sdist/
python -m unittest discover . "*_test.py"or this onecd /path_to_sdist/
toxChangelog1.0.0 (2018-08-01)First release on PyPI.
Package: maclookup-cli
A command-line utility to lookup info related to a MAC address or OUI,
such as vendor name and address, based on the MAC Address API.Installation$pipinstallmaclookup-cliUser InstallYou can also perform a user installation via$pipinstallmaclookup-cli--userFor user installs on macOS make sure~/Library/Python/<ver>/binis in your$PATH, i.e. edit thePATH=line in~/.bashrcor~/.bash_profile, e.g.PATH=$PATH:~/Library/Python/<ver>/binApply the changes with$source~/.bashrcor$source~/.bash_profileIn Windows make sure%AppData%\Python\Python<version>\Scriptsis in yourPATH.API keyThe tool requires an API account, signuphere.The key can either be provided via the-k/--api-keycommand option
or the environment variable#macOSandLinux$exportMAC_ADDRESS_IO_API_KEY="your-api-key"#Windows(CMD)set MAC_ADDRESS_IO_API_KEY="your-api-key"#Windows(PowerShell)$env:MAC_ADDRESS_IO_API_KEY="your-api-key"Usage$maclookup--helpDocumentationThe latest documentation is available onGitHub.
Package: mac-mathpix-ocr
introsuppose you want to make a comand line tool called mac_mathpix_ocr.
it accept integer as numbers
ouput carrots we need to feedex:
	cmd> mac_mathpix_ocr 2 
	ouput: 4we can get the output by two ways:command linemac_mathpix_ocr2call python moudlepython-mmac_mathpix_ocr2best practice schemaenvGenerated bymake envThis is first step you need to do in any python projectit will create a virtual envauto source itinstall requirements for the start uptestrunmake testrunmake runwill run in module modemake mainwill run in normal modeYou can see thatmain.pyandmac_mathpix_ocr/__main__.pyare the same  content file.why do we needmain.py?
It is eay to make an  entry in IDE , like intellij.Could I just use__main__.pyto run  like this?pythonmac_mathpix_ocr/__main__.pyYou cound not.That is because the top-level package problem.Ex:python main.py 
top-level package is the same as main.py

python src/func/main.py  
top-level package is the same as main.py, aka func 
top-level package is the folder where you run this command fromSo , whymac_mathpix_ocr/__main__.pydoes not work?because top-level package is mac_mathpix_ocr now.loggingAlways use logging for log print,dont useprintlogging config is controlled bylogging.yml, which can control every module level callsetup_logging` in main file (ra)make moduleupdate readmeput moudle in the folder parallel with logx folder.logxyour_modulepacking module or cmdlocalfor quick test purposeinstall:pip install .uninstall:pip uninstall <module_name>make install
make uninstallupload to test or prod PYPI serverupload to test server:make upload-to-testupload to prod server:make upload-to-prodtest and coveragepure testmake testtest with coveragemake coverage
Package: mac-notifier
Mac NotifierMac_notifier is a command line utility to display notifications, alerts and dialogs on mac. It executes apple scripts underneath to achieve the purpose.Usagedsp notify 'Hello wolrd'                                 # send notification
dsp notify -t 'Hurry up!' 'Time is precious'             # send notification with title

dsp alert WARNING                                        # display alert
dsp alert -b '["Sorry", "I will"]' 'Will you marry me?'  # display alert with customized buttons

dsp dialog 'Man is not made for defeat. A man can be destroyed but not defeated.'For more detailed usage, refer to command help.Command HelpUsedsp --helpto show help:Usage: dsp [OPTIONS] COMMAND [ARGS]...

  Display notifications, alerts and dialogs on mac

Options:
  --help  Show this message and exit.

Commands:
  alert   Display an alert on mac
  dialog  Display a dialog on mac
  notify  Display a notification on macUsedsp subcommand --helpto show help for subcommands, for example:Usage: dsp alert [OPTIONS] CONTENT

  Display an alert on mac

Options:
  -m, --message TEXT     Explanatory message.
  -b, --buttons TEXT     List of button names in json format, e.g. ["Cancel",
                         "OK"].
  -d, --default INTEGER  Index of default buttons, 1 based.
  -l, --lasting INTEGER  Number of seconds before dismissing. Wait forever if
                         not specified.
  --help                 Show this message and exit.
Package: macoop
(MACOOP) สำหรับเรียนรู้พัฒนาระบบโปรแกรมนี้ใช้ทดสอบระบบเท่านั้น!!วิธีติดตั้งเปิด CMD / TerminalpipinstallmacoopDay 0allstudent = []

teacher1 = Teacher('Ada Lovelace')
teacher2 = Teacher('Bill Gates')
print(teacher1.students)




#Day 1
print('----------Day 1 --------')
St1 = Student('Albert','Einstein')
allstudent.append(St1)
teacher2.AddStudent(St1)
print(St1.fullname)

print('----------Day 2 --------')
#Day 2
St2 = Student('Steve','Jobs')
allstudent.append(St2)
teacher2.AddStudent(St1)
print(St2.fullname)

#Day 3
print('----------Day 3 --------')
for i in range(3):
    St1.Codeing()

St2.Codeing()
St1.ShowExp()
St2.ShowExp()

#Day 4
print('----------Day 4 --------')

stp1 = SpecialStudent('Thomas', 'Edison', 'Hitler')
allstudent.append(stp1)
teacher1.AddStudent(stp1)
print(stp1.fullname)
print('คุณครูครับ ชอคะแนนฟรี 20 คะแนนได้ไหม')
stp1.exp = 20
stp1.Codeing()
stp1.ShowExp()

#Day 5
print('----------Day 5 --------')
print('นักเรียนกลีบบ้านกันยังไง')

print(allstudent)
for st in allstudent:
    print('ผม {} กลับ้านด้วย {} ครับ'.format(st.name, st.vehicle))
    print(isinstance(st,SpecialStudent))
    if isinstance(st,SpecialStudent):
        st.vehicle.SelfDriving(st)

#Day 6
print('----------Day 6 --------')


teacher1.CheckStudent()
teacher2.CheckStudent()

print('รวมพลังของนักเรียน 2 คน', St1 + St2)```
Package: mac-open-apps
Installation$[sudo]pipinstallmac-open-apps$[sudo]npmi-gmac-open-appsExamples$open-appsDiscordiTerm"Google Chrome"Skype"Sublime Text"Terminal~/Library/LaunchAgents/apps.plist<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plistversion="1.0"><dict><key>Label</key><string>apps</string><key>ProgramArguments</key><array><string>/usr/local/bin/open-apps</string><string>Discord</string><string>iTerm</string><string>GoogleChrome</string><string>Skype</string><string>SublimeText</string><string>Terminal</string></array><key>RunAtLoad</key><true/></dict></plist>readme42.com
Package: mac-opera
Installation$[sudo]pipinstallmac-opera$[sudo]npmi-gmac-operaConfig$exportOPERA_TIMEOUT=10# 5 by defaultExamplesurl(s)$operaurls
https://github.com/
https://google.com/
$operaurl
https://github.com/open/refresh$operaopen"https://github.com/""https://google.com/"$operarefresh"https://github.com/"fullscreen$operafullscreen-enter
$operafullscreen-detect1$operafullscreen-exitfrontmost (1or0)$operafrontmost0Opera.appprocess$operapid42$operaisready5# timeout 5 seconds1$operakillreadme42.com
Package: macops
macopsIt is a python module which can help you to change the current mac address of a certain interface, generate a mac address, get the current mac address and also reset the current mac address to the original one.
Developed by Shounak Kulkarni (c) 2021Not supported in Python 2.xInstallationpipinstallmacopsFunctionsGet Current Macget_current_mac: As it's name describes itself, this function willgetthe current mac address.How this function should be used:-importMacOpscurrent_mac=MacOps.get_current_mac()print(current_mac)Generate Macgenerate_mac: This function generates arandommac address.How this function should be used:-importMacOpsnew_mac=MacOps.generate_mac()print(new_mac)Change Macchange_mac: This willchangethe mac address to the generated mac address.Note: This function can only be performed in unix/linux systems.How this function should be used:-importMacOpsMacOps.change_mac()No parameter is required as it takes input fom the user and the new mac address is automatically generated.Reset to Original Macreset_original_mac: This function willresetthe permanent mac address.Note: This function can only be performed in unix/linux systems.How this function should be used:-importMacOpsMacOps.reset_original_mac()LicenseGithub repository:macops:GithubYou can find the license here:License:macops
Package: macos-display
Fetch information about macOS displays given a display ID, which is available fromnsscreen.deviceDescription()["NSScreenNumber"]using pyobjc.Get the user-visible display name from an id:>>> import macos_display
>>> macos_display.display_name(69732928)
'Color LCD'List all display names:>>> from AppKit import NSScreen
>>> import macos_display
>>> screens = NSScreen.screens()
>>> for screen in screens:
...     screen_id = screen.deviceDescription()["NSScreenNumber"]
...     name = macos_display.display_name(screen_id)
...     print(name)
...
Color LCD
SAMSUNG
LCD1970NXp
Package: macos-free
Memory usage for macOS,  an alternative tofreecommand on Linux.☤ InstallationYou can install “macos-free” via pip fromPyPI:$ pip install macos-free☤ Usage$ free --help
Usage: free [OPTIONS]

Options:
  -b, --bytes    show output in bytes
  -k, --kilo     show output in kilobytes
  -m, --mega     show output in megabytes
  -g, --giga     show output in gigabytes
  --tera         show output in terabytes
  -h, --human    show human-readable output
  --si           use powers of 1000 not 1024
  -V, --version  output version information and exit
  --help         Show this message and exit.
Package: macos-keychain
macos_keychainMacOS keychain password managerAdding a password to keychainimportmacos_keychainmacos_keychain.add(name='API token',value='<TOKEN>')Removing passwords in keychainimportmacos_keychainmacos_keychain.rm(name='API token')Listing passwords in keychainimportmacos_keychainmacos_keychain.ls()Getting password in keychainimportmacos_keychainmacos_keychain.get(name='API token')
Package: macos-lswin
macos-lswinlswin: a commandline utility to list and filter macOS process and window names.BackgroundThis utility provides filtering for windows based on parent process name, window name, and whether or not the process is on the screen.A similar project,mac_list_windows_pids, revealed how straightforward the necessary Quartz core graphics lookups are; so, I reviewed Apple's developer documentation forCGWindowListCopyWindowInfoand set out to add primitive UNIX shell style wildcard filtering for process and window names with a simple command line interface.Supported PlatformsThis utility has been tested on macOS Catalina 10.15.UsageDevelopment EnvironmentInitialize a development environment by executingtox; thelswinutility
will be installed in the.toxPython virtual environment binary path.ExamplesList all windows with process names or window names beginning with "term":$ lswin -a -f "term*"
   PID     WID  Process: Window                                  X      Y
------  ------  -------------------------------------------  -----  -----
  4953    4805  Terminal: <4805>                                 0      0
  4953    4806  Terminal: <4806>                                 0      0
  4953    4813  Terminal: Focus Proxy                          100    100
  4953    7208  Terminal: <7208>                               628     95
  4953    7268  Terminal: Colors                                 0    612
  4953    7269  Terminal: <7269>                               951    433
  4953    8639  Terminal: <8639>                             -1920      0
  4953    8657  Terminal: <8657>                                 0      0
  4953   13111  Terminal: <13111>                              318     68
  4953   13984  Terminal: <13984>                               80      0
  4953   14588  Terminal: Terminal — -bash — 129×22            395    201
  4953   14890  Terminal: Terminal — lswin.py -a -f term...    395    201List onscreen windows with process names or window names beginning with "term":$ lswin -f "term*"
   PID     WID  Process: Window                                  X      Y
------  ------  -------------------------------------------  -----  -----
  4953   14588  Terminal: Terminal — -bash — 129×25            173    496
  4953   14890  Terminal: Terminal — lswin.py -f term* —...    395    201