Saravanan666/pypi-org huggingface dataset:
Package: update-conf.py
update-conf.pyGenerate config files fromconf.dlike directories.Split your config file into smaller files, called snippets, in aconf.dlike directory. The generated config file will be the concatenation of all snippets, with snippets ordered by the lexical order of their names.Files ending with.bak,.oldand other similar terminations will be ignored.This project was based on theupdate-conf.d project.InstallThis project works in Python 3 (3.7 or newer).To install:pipinstallupdate-conf.pyIt's possible to clone the project in Github and install it viasetuptools:gitclonegit@github.com:rarylson/update-conf.py.gitcdupdate-conf.py
pythonsetup.pyinstallUsageTo generate a config file, you can run something like this:update-conf.py-f/etc/snmp/snmpd.confThe example above will merge the snippets in the directory/etc/snmp/snmpd.conf.dinto the file/etc/snmp/snmpd.conf.If the directory containing the snippets uses a diferent name pattern, you can pass its name as an argument:update-conf.py-f/etc/snmp/snmpd.conf-d/etc/snmp/snmpd.dIt's also possible to define frequently used options in a config file. For example, in/etc/update-conf.py.conf:[snmpd]file=/etc/snmp/snmpd.confdir=/etc/snmp/snmpd.dNow, you can run:update-conf.py-nsnmpdTo get help:update-conf.py--helpConfig filesupdate-conf.pywill use the global config file (/etc/update-conf.py.conf) or the user-home config file (~/.update-conf.py.conf) if they exist.You can use the the sample config file (provided within the distributed package) as a start point:cp${prefix}/share/update-conf.py/update-conf.py.conf/etc/update-conf.py.confIt's also possible to pass a custom config file via command line args:update-conf.py-cmy_custom_config.conf-nsnmpdMore examplesSuppose you have 2 snippets. One is/etc/snmp/snmpd.conf.d/00-main:syslocation Unknownsyscontact Root <root@localhost>And the other is/etc/snmp/snmpd.conf.d/01-permissions:rocommunity public 192.168.0.0/24After runningupdate-conf.py -f /etc/snmp/snmpd.conf, the generated config file will be:# Auto-generated by update-conf.py# Do NOT edit this file by hand. Your changes will be overwritten.syslocation Unknownsyscontact Root <root@localhost>rocommunity public 192.168.0.0/24There are cases when it's useful to change the prefix used in the auto-generated comment. After runningupdate-conf.py -f /etc/php.ini -p ';', the generated config will start with:; Auto-generated by update-conf.py; Do NOT edit this file by hand. Your changes will be overwritten.It's also possible to set the prefix used in the auto-generated comment via config file. For instance, in/etc/update-conf.py.conf:[php]file=/etc/php.inidir=/etc/php.dprefix_comment=;LicenseThis software is released under theRevised BSD License.ChangelogCheck theCHANGELOGpage.ContributingIf you want to contribute with this project, check theCONTRIBUTINGpage.TODOPublish this software in a Ubuntu PPA.
Package: update-dict
update_dictA Python module who does recursive update work on 2 dicts.Is a method of updating nested dictionaries更新多层嵌套字典的键值.UsageInstallationpip install update_dictExamples# >>> from update_dict import update_dict

# >>> update_dict({'a':{"b":{"c":{"d"}}},"e":{"e1":{"e5":'qwq'}},"e5": {},"ss":"1111"},
{"e5":'www',"ss":"ssss",'c':{},'ss1':'ss'})
{'a': {'b': {'c': {}}}, 'e': {'e1': {'e5': 'www'}}, 'e5': 'www', 'ss': 'ssss'

# >>> update_dict({'a':{"b":{"c":{"d":'c'}}},"e":{"e1":{"e5":'qwq'}},"e5": {},"ss":"1111"},{"d":'www'})
{'a': {'b': {'c': {'d': 'www'}}}, 'e': {'e1': {'e5': 'qwq'}}, 'e5': {}, 'ss': '1111'}

# >>> update_dict({'a': {'c': 1, 'd': {}}, 'b': 4}, {'a': 2})
{'a': 2, 'b': 4}
'''Why?License
Package: updatedir
Introductionupdatedir is a python module which pushes updates from one directory to another.
It is intended to automatically handle the transport layer.As of 0.1, only local update and update over ssh are supported.The update algorithm is also rather stupid - it just skips any files if the filename
already exists. This could be made more sophisiticated, but is beyond my current needs.CreditsParamikoDistributeBuildoutmodern-package-templateNews0.1.1
—Release date: 18-Aug-2010Added recurisve directory creation for ssh0.1Release date: 18-Aug-2010Created updatedir module
Package: updated-networks-dune
Dune Analytics APIA simple framework for interacting with Dune Analytics' unsupported API. The primary
class (DuneAPI) of this repo is adapted fromhttps://github.com/itzmestar/duneanalyticsat commit
bdccd5ba543a8f3679e2c81e18cee846af47bc52Import as Project Dependencypipinstallupdated_networks_duneThen you should be able to write python scripts similar to the following:Example UsageFill out your Dune credentials in the.envfile. The Dune user and password are
straight-forward login credentials to Dune Analytics. TheDUNE_QUERY_IDis an integer
id found in the URL of a query when saved in the Dune interface. This should be created
beforehand, but the same query id can be used everywhere throughout the program (as long
as it is owned by the account corresponding to the user credentials provided).You do not have to provide the query id as an environment variable, but doing so, will
allow you to use the same id for all fetching needs. For dashboard management, you will
need to have a unique id for each query.Execute Query and Fetch Results from Dunefromduneapi.apiimportDuneAPIfromduneapi.typesimportNetwork,QueryParameter,DuneRecord,DuneQueryfromduneapi.utilimportopen_querydeffetch_records(dune:DuneAPI)->list[DuneRecord]:sample_query=DuneQuery.from_environment(raw_sql=open_query("PATH_TO_SOME_SQL_FILE"),name="Sample Query",network=Network.MAINNET,parameters=[QueryParameter.number_type("IntParam",10),QueryParameter.text_type("TextParam","aba"),],)returndune.fetch(sample_query)if__name__=="__main__":dune_connection=DuneAPI.new_from_environment()records=fetch_records(dune_connection)print("First result:",records[0])Dashboard ManagementIt will help to get aquainted with the Dashboard configuration file found in./example/dashboard/my_dashboard.json. This
essentially requires filepath and query id to existing dune queries. Generally it is
expected that you will use the family of queries contained in an existing dashboard, but
there is no actual validation. Technically one could put all queries here and refresh
them with this tool.fromduneapi.dashboardimportDuneDashboarddashboard=DuneDashboard("./example/dashboard/_config.json")dashboard.update()print("Updated",dashboard)To fetch some sample ethereum block data, run the sample script as:python-mexample.fetchThis will result in the following console logs:got 10 records from last query
First record Record(
    string='0x255309e019abaf74bf2d58d4020547c89f875842abae1c874fb0d5ae8eac9859', 
    integer=14362177, 
    decimal=0.14785533, 
    time='2022-03-10T23:50:16+00:00'
)To fetch your own data follow the code outline
infetch.pyContributing and Local DevelopmentClone this Repo and install as follows.python3-mvenvvenvsource./env/bin/activate
pipinstall-rrequirements.txt
cp.env.sample.env<-----CopyyourDunecredentialshere!DeploymentBump the version number insetup.pyBuild the duneapi packagepython -m buildUpload to pypitwine upload dist/*
Package: updatedns
UpdateDNSEdit updatedns.ini to specify the API key for each provider hosting your DNS.
Add a FQDN entry specifying which interface to monitor and update.[digital_ocean]
key       = <api key>
domain    = domain.tld

[route53]
key       = <api key>
secret    = <secret>
domain    = example.com
domain    = test.io

[sub.domain.tld]
interface = wan0

[yep.example.com]
interface = eth0

[yep.test.io]
interface = eth0Providers as of libcloud-3.7.0auroradnsbuddynscloudflaredigital_oceandnsimpledurablednsgandigandi_livegodaddygooglehostvirtuallinodeliquidwebluadnsnfsnnsoneonapppointdnspowerdnsrackspacercodezeroroute53softlayervultrworldwidednszerigozonomi
Package: update-ip
An extensible Python utility to automatically update your IP address with
dynamic DNS services, or notify you of such a change.
Currently, we support the following services:WebFactionNearlyFreeSpeechThis utility was designed to be run
periodically through a scheduling utility like cron to keep your IP address
current.Installation$ pip install update-ipInitial SetupA configuration file is needed to store various options. This file can be
created through a wizard, by running:$ update-ip -wIt will show you a list of available services, and askwhere the configuration file should be keptwhere the cache file should be kept (stores last known ip)which domains do you want to updatethe name of the service to run on IP changeservice-dependent optionsThe domains should be separated by commas, with no spaces.Normal Usage$ update-ip /path/to/configuration/fileAutomatic DomainsIf no domains are configured on the configuration file, the updater will
only change the IPs of the domains that match the last known IP. This feature
may not be available on all services.ContributingContributions to the project are greatly appreciated!  Please send pull
requests or patches, and we’ll be glad to merge or apply them.Development happens in [https://github.com/bkonkle/update-ip](https://github.com/bkonkle/update-ip)
Package: update-netrc
update-netrcA simple command line utility to update netrc credentials.Usage$update-netrc--help
usage:update-netrc[-h][--netrc-pathNETRC_PATH]{update}...

Default.netrcpath:/Users/martijn/.netrc

positionalarguments:{update}options:-h,--helpshowthishelpmessageandexit--netrc-pathNETRC_PATHSpecifyanalternativelocationfortheusednetrcfile$update-netrcupdate--help
usage:update-netrcupdate[-h][--loginLOGIN][--accountACCOUNT][--passwordPASSWORD]host

positionalarguments:hostSelectsthehost(machine)youwanttoupdate

options:-h,--helpshowthishelpmessageandexit--loginLOGINUpdatetheloginofspecifiedhost--accountACCOUNTUpdatetheaccountofthespecifiedhost--passwordPASSWORDUpdatethepasswordofthespecifiedhostExamplesTo update the password of thelocalhostmachine:$update-netrcupdatelocalhost--passwordmy-secret-passwordTo update the login of thedefaultmachine$update-netrcupdatedefault--loginmy-loginYou can also add new entries,--loginand--passwordare then required:$update-netrcupdatemy-new-host--loginmy-login--passwordmy-passwordInstallationpipinstallupdate-netrcDevelopment setupFirst clone this repositorygit clone https://github.com/maerteijn/update-netrc.gitInstall the python projectpyenvvirtualenvupdate-netrc# or your alternative to create a venvpyenvactivateupdate-netrc
makeinstallLintingblack,ruffandmypyare installed and configuredmakelintFormattingblackandruffare configuredmakeformatTestPytest with coverage is default enabledmakecov
Package: update-notipy
Send a notification when there is an update available for your package!
Py-port ofupdate-notifier.Installpipenv install update_notipyorpip install update_notipyUsagefromupdate_notipyimportupdate_notifyupdate_notify(<pkg_name>,<pkg_version>,callback=<callback>,message=<message>,defer=<True|False>).notify()Argumentspkg_name: str: name of the package as registered on PyPIpkg_version: str: version of the installed package, to be compared with the latest onecallback: Callable: function to be called instead of printing the standard messagemessage: str: custom message to be printeddefer: bool: set toTrueif you want to notify the user when the app closesExamplesfromupdate_notipyimportupdate_notify__version__="0.1.0"update_notify('pkg-info',__version__).notify()#    ┌───────────────────────────────────────────┐#    │                                           │#    │   Update available 0.1.0 → 0.1.2          │#    │   Run pip install -U pkg-info to update   │#    │                                           │#    └───────────────────────────────────────────┘deffoo():four=2+2print(four)update_notify('pkg-info',__version__,callback=foo).notify()# 4update_notify('pkg-info',__version__,message="Hello, world!").notify()# Hello, world!
Package: update-package-version
This package provides a python executable that delivers a path-wide
version bump feature. It reads~/.update-package-version.ymlfile
for root paths from which it should start its recursive package search.Package versions are updated using these glob patterns by default: -**/Pipfile-**/requirements.txt-requirements/**.txtInstallationpipinstallupdate-package-versionUsage./upv.py----help# upv.py [CONFIG_FILE_PATH] [CONFIG_FILE_NAME] [CWD]
# upv.py [--config-file-path CONFIG_FILE_PATH] [--config-file-name CONFIG_FILE_NAME] [--cwd CWD]# You can use update-package-version command
# or upv shortcutupvfindpackage-name--src0.0.1upvfindpackage-nameupvupdatepackage-name--src0.0.1--trg1.1.1# Assumes src == *upvupdatepackage-name--trg1.1.1Configuration####################################### CONVENIENCE PYTHON PACKAGE ALIASES #######################################.RE:# matches `sample-package` and `sample-package==0.0.1`.package:&include-package'(?P<package>{package})(?P<sign>\=\=|\<\=|\>\=|\<|\>)?(?P<version>[\-\d\.]+)?'# matches `sample-package.git@0.0.1`.git-package:&include-git-package'(?P<package>{package})\.git@(?P<version>[\-\d\.]+)'.EXCLUDE:# matches all the lines start with the hash character.comment:&no-comment'^\s*#.+'# just aliasing `*include-git-package` to make it more readable across the config file.git-package:&no-git-package'(?P<package>{package})\.git@(?P<version>[\-\d\.]+)'######################################### SOME USEFUL PYTHON PATTERN TEMPLATES #########################################.GENERIC-PATTERNS:# use these lines along with something like `pattern: '**/requirements.txt'`.generic-requirements-package:&generic-requirements-packagereplacer:RegexReplacer# AND logic is used hereinclude-patterns:[]# OR logic is used herematch-patterns:-*include-package# OR logic is used hereexclude-patterns:-*no-git-package-*no-comment.git-repo-requirements-package:&git-repo-requirements-packagereplacer:RegexReplacermatch-patterns:-*include-git-packageexclude-patterns:-*no-commentdefaults:file-patterns:&default-file-patterns# Generic Pipfile parser-pattern:'**/Pipfile'replacer:PipfileReplacer# an utterly broad glob pattern for everything that looks like a python package file,# but NOT a .git repo-pattern:'**/requirements.txt'<<:*generic-requirements-package# and this one for .git repo ONLY-pattern:'**/requirements.txt'<<:*git-repo-requirements-package# ... when you love segmentation too much-pattern:'**/requirements/*.txt'<<:*generic-requirements-package-pattern:'**/requirements/*.txt'<<:*git-repo-requirements-packageorigins:-root:'/tmp/sample-project-group'file-patterns:*default-file-patternson-update:-echo LOL LOL LOL-echo COOL COOL COOL
Package: update-pip-packages
Update Pip and App Packagesv0.1.4This Python script provides an efficient way to update Pip and app packages on various Linux distributions. The script supports Ubuntu, Debian, Fedora, CentOS, Red Hat, Arch, Manjaro, OpenSUSE, and SUSE distributions. It updates packages using the appropriate package manager for each distribution.I know this script may seem useless. Moreover, updating all pip packages can lead to challenges in some projects.
This script is only a part of my self-education journey.FeaturesUpdate Pip and its packages to the latest versions.Update app packages for supported Linux distributions using the corresponding package manager.Command-line interface with options for updating Pip packages, app packages, or both.UsageTo use the script, run the following command with the desired options:update-pip-packages[--pip][--app]-h, --help: Show this help message and exit--pip: Update Pip packages.--app: Update app packages.-v, --version: Display the version of the packageIf no options are provided, the script will display help information.TestsThe tests cover various aspects of the script, including the following:Getting the Linux distribution.Updating Pip packages.Updating app packages for each supported Linux distribution.Handling unsupported Linux distributions.DependenciesPython3.6 or laterPoetrypytestdistrotomlInstallationFromPyPi.orgIn Linux:pip install update-pip-packagesorpython3 -m pip install update-pip-packagesGitHub RepositoryFor more information, source code, and installation instructions, please visit the GitHub repository:GitHub: update-pip-packagesRemarksThere is also abash script. I started with it and developed it into this Python project.
It does not support Linux distribution detection, but you can use it for the same purposes as the main(python) application in a Debian or Ubuntu environment.
Package: update-plex-music-album-covers
update-plex-music-album-coversIs your Plex showing waveforms or label covers instead of the posters (covers) you worked or paid for?Update Plex music album covers to the corresponding front covers embedded in your MP3 files.RationaleThis utility was written as a solution to a problem with Plex Media Server and music album covers.
Some MP3 files such as the ones purchased from Beatport come with the usual cover one would expect
as well as an additional waveform image. They often include a label cover too.
When scanning files for covers Plex Media Server sees all of these and selects one seemingly
at random. This utility scans your music library for albums with multiple covers, attempts
to extract the embedded front covers from the MP3 files themselves and updates the album
covers with the those. The MP3 files are not modified in this process.RunningInstall via PIP on the same machine where you Plex server is running:pip3install--userupdate-plex-music-album-coversRun:update-plex-music-album-coversUSERNAME--passwordPASSWORDSERVERLIBRARYIf you want to conceal your password you can pass it via environment variable like so:read-p"Enter your password: "-sPLEX_PASSWORD&&exportPLEX_PASSWORD
update-plex-music-album-coversUSERNAMESERVERLIBRARY
Package: update-req-spec
update-req-specUpdate Python requirements in a setup.py file to permit latest available versions.MotivationYou wish to cap the versions of the dependencies in your library to the major versions
that are currently released since you have tested your library against these versions and, given
everyone follows semantic versioning, minor updates should remain compatible. But keeping these
version ranges up to date with new major releases can be tedious.update-req-specmakes this a little easier by updating theinstall_requirementsin yoursetup.pyso that the version specifications allow the latest major releases while retaining the
minimum permitted versions. Then all you need to do is run your tests and publish a new release.For example, given:fromsetuptoolsimportsetupsetup(# --- snip ---install_requires=["requests","Click>=6.1","attrs~=18.1",],# --- snip ---)will be transformed to:fromsetuptoolsimportsetupsetup(# --- snip ---install_requires=["requests<3","Click>=6.1,<8","attrs>=18.1,<19",],# --- snip ---)InstallationInstall withpipsi:pipsiinstallupdate-req-sepcor with pip:python3-mpipinstallupdate-req-specUsageupdate-req-specsetup.pyIf you use a private packge repository:update-req-spec--index-urlhttp://private-repo.example/setup.py# orexportPIP_INDEX_URL=http://private-repo.example/
update-req-specsetup.py
Package: updater-extension
Updater ExtensionUpdater Extension is an Extension ofof the Python-telegram-bot Updater class.Free software: MIT licenseDocumentation:https://updater-extension.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2022-06-06)First release on PyPI.
Package: updaterForExe
Updater for exe with firebaseVersion format X.X.X (Example: 1.6.11)UseimportupdatermyUpdater=updater.Update(config,webAppUrl,appName,path,optional:debugPath,displayErrorMessages,autoUpdate,assetsFolder,assetsFolderUrl,updateAssetsArg)myUpdater.checkUpdate()#Rest of your codeconfig:This is your standard config to use when you're working with firebase.webAppUrl:Your URL to your new version of the appliecation (example.com/new_version.exe).appName:The name of your application or exe name.path:The path in your realtime database to check for a new version.debugPath:The path to your project when you are still developing in python console.displayErrorMessages:If set to True: Messages like 'No internet connection' will appear.autoUpdate:If set to True, the user won't be asked to update or not.assetsFolder:Set this to true if the assets folder should be updated too. Also the version.json file will be saved there.assetsFolderUrl:If 'assetsFolder' is true, you have to specify the URL to your assets folder online (example.com/new_assets.zip)updateAssetsArg:If set to 1: The assets folder will be updated at X.X.X
If set to 2: The assets folder will only be updated at X.X.0
If set to 3: The assets folder will only be updated at X.0.0Exampleimportupdaterconfig={"apiKey":"YOUR-API-KEY","authDomain":"YOU-PROJECT-NAME.firebaseapp.com","databaseURL":"https://YOU-PROJECT-NAME.firebaseio.com","storageBucket":"YOU-PROJECT-NAME.appspot.com","tls":{"rejectUnauthorized":False}}url='example.com/index.exe'assetsUrl='example.com/assets.zip'myUpdater=updater.Update(config,url,'index','/program/version',debugPath='C:/Users/user/Documents/Python/Updater',displayErrorMessages=True,autoUpdate=False,assetsFolder=True,assetsFolderUrl=assestUrl,updateAssetsArg=2)myUpdater.checkUpdate()#Rest of your codeUse with pyinstallerWhen you want to convert the python file to an executable using py installer, you need additional hooks to use firebase and gcloud. For that you need to create a new python file at some directory NAMED 'hook-gcloud.py' with the following code:fromPyInstaller.utils.hooksimportcopy_metadatadatas=copy_metadata('gcloud')When you want to convert the file into an executable you have to add the argument '--additional-hooks-dirthe directory to the hook-gcloud.py file'.Example:pyinstaller --onfeile --additional-hooks-dir C:\Users\user\hooks index.py
Package: update-route53
update-route53Updates route53 for a name and IP address. This was designed to allow a machine with a floating IP address to self-update its hostname.To buildpython3-mvenvvenvsourcevenv/bin/activate
pipinstallwheelsetuptools-U
pythonsetup.pysdistbdist_wheelto install once builtdeactivate
sudopip3installdist/update_route53-0.0.1-py3-none-any.whlTo install in crontabsudocrontab-e## I place my env variables above the descriptive comments in the crontabAWS_ACCESS_KEY_ID=AKIA**********AWS_SECRET_ACCESS_KEY=********************DNSNAME=subdomain.mydomain.com# For more information see the manual pages of crontab(5) and cron(8)## m h  dom mon dow   command18****/usr/local/bin/update-route53${DNSNAME}>>/var/log/update-route53.log2>>/var/log/update-route53.errorThe above runs 18 minutes past the hour. Consider picking a random number
between 0-59. My old boss preferred prime number intervals between all services.
This makes your job easier if your system ever displays periodic instability.
If your periodic tasks all start on the hour, isolating the cause of problems is
slightly harder. In this case, I'm just thinking of the poor guy running the IP
echo service this code is hitting. Spread that load out.To testpython3-mvenvvenvsourcevenv/bin/activate
pipinstall-rrequirements.txt
python-munittestAWS setupI have included an example IAM policy inconf/aws/route53-updater-policy.json.
I suggest creating a user that has no permissions other than this policy,
and using those permissions with the script/service. Note, do NOT ever install a
policy you haven't audited yourself. Please take a look at it and look up the
associated permissions.