Saravanan666/pypi-org huggingface dataset:
Package: zbookmarks
Install$pipinstallzbookmarksUsageA simple python package for loading / dumping Chrome HTML bookmarks.
Born out of necessity to fix my own bookmarks.importzbookmarks# Loadwithopen("chrome_bookmarks.html","r")asf:bookmarks=zbookmarks.load_chrome(f.read())# Printprint(bookmarks)# Dumpwithopen("output.html","w")asf:zbookmarks.dump_chrome(bookmarks,f)How it worksI made this package by examining my own Chrome bookmark files and extrapolating.
The general rules are:dldenotes a list of bookmark items and folders.dtdenotes either a bookmark item or folder:If it's a bookmark item,dthas a singleatag child, which gives the
bookmark attributes (href, title, etc.).If it's a bookmark folder,dthas 3 children:Ah3tag containing the folder attributes (title, etc.)Adltag containing the folder's contents.A uselesspchild tag.I found it easier to come up with these rules after visualizing the DOM tree of
a Chrome bookmarks file:You can try it out on your own bookmark file by running:#Youneedtoinstallgraphviz(dot)inordertorunthescript$sudoapt-getinstall-ygraphviz$poetryinstall$python3scripts/visualize_dom.py<my_bookmarks_file.html>
Package: zbot
NAMEZBOT - python3 irc botSYNOPSISzbot <cmd> [key=val] [key==val]
zbot [-a] [-c] [-d] [-h] [-v] [-w]

options are:

-a     load all modules
-c     start console
-d     start daemon
-h     display help
-v     use verboseDESCRIPTIONZBOT is a python3 irc bot, it can connect to IRC, fetch and display RSS
feeds, take todo notes, keep a shopping list and log text. You can also
copy/paste the service file and run it under systemd for 24/7 presence
in a IRC channel.

ZBOT users BOTL, containing all the python3 code to program a unix cli
program, such as disk perisistence for configuration files, event handler
to handle the client/server connection, code to introspect modules for
commands, deferred exception handling to not crash on an error, a parser
to parse commandline options and values, etc.

ZBOT uses OBJX, an module that allows for easy json save//load
to/from disk of objects. It provides an "clean namespace" Object class
that only has dunder methods, so the namespace is not cluttered with
method names. This makes storing and reading to/from json possible.

ZBOT is Public Domain.USAGEwithout any argument the program does nothing

$ zbot
$

see list of commands

$ zbot cmd
cmd,err,mod,req,thr,ver

list of modules

$ zbot mod
cmd,err,fnd,irc,log,mod,req,rss,tdo,thr

use -c to start a console

$ zbot -c

use mod=<name1,name2> to load additional modules

$ zbot -c mod=irc,rss
>

use -v for verbose

$ zbot -cv mod=irc
ZBOT started CV started Sat Dec 2 17:53:24 2023
>CONFIGURATION$ zbot cfg
channel=#zbot commands=True nick=zbot port=6667 server=localhost

irc

$ zbot cfg server=<server>
$ zbot cfg channel=<channel>
$ zbot cfg nick=<nick>

sasl

$ zbot pwd <nsvnick> <nspass>
$ zbot cfg password=<frompwd>

rss

$ zbot rss <url>
$ zbot dpl <url> <item1,item2>
$ zbot rem <url>
$ zbot nme <url> <name>COMMANDScmd - commands
cfg - irc configuration
dlt - remove a user
dpl - sets display items
fnd - find objects
log - log some text
met - add a user
mre - displays cached output
pwd - sasl nickserv name/pass
rem - removes a rss feed
rss - add a feed
thr - show the running threadsSYSTEMDsave the following it in /etc/systems/system/zbot.service and
replace "<user>" with the user running pipx

[Unit]
Description=python3 irc bot
Requires=network-online.target
After=network-online.target

[Service]
Type=simple
User=<user>
Group=<user>
WorkingDirectory=/home/<user>/.zbot
ExecStart=/home/<user>/.local/pipx/venvs/zbot/bin/zbot -d
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

then run this

$ mkdir ~/.zbot
$ sudo systemctl enable zbot --now

default channel/server is #zbot on localhostFILES~/.zbot
~/.local/bin/zbot
~/.local/pipx/venvs/zbot/AUTHORBart Thate <objx@proton.me>COPYRIGHTZBOT is Public Domain.
Package: zbox
zbox is a tiny library to help me usetoolzandcytoolz.
I frequently usetoolzand would like to usecytoolzif it’s
available, but don’t want to put atry/exceptin
all my projects. By importingtoolzfromzboxI always
getcytoolzifcytoolzis installed and otherwise I gettoolz.Installationzbox is on PyPI, install it with:pip install zbox.
zbox works on Python 2 and Python 3.Usagefrom zbox import toolzIfcytoolzis installedtoolzwill becytoolz,
otherwise it will betoolz.genfrom zbox import gengenis a function that converts any iterable into a Python
generator object. I use this with Pandas, which sometimes doesn’t
expand iterables unless they are first converted to a generator.
Package: zbpp-light
Light-weight Library of Zero Bubble Pipeline ParallelismHow to useInstall bypip install zbpp_lightInsert the following code snippet to your training script at the very beginning:importzbpp_lightzbpp_light.patch_megatron()# Your original training script starts hereimportmegatron,etcSupported FrameworksMegatron-LMMegatron-DeepSpeedCurrent LimitationsOnly supports ZB-H1 schedule, which reduces 2/3 1F1B bubble with same memory and communication cost.
Package: zbrac
zBrac : A multilanguage tool for zTreeCreated by Ali Seyhun Saral and Anna SchroeterLicensed under GNU General Public License v3.0About the projectzBrac is a tool designed for easy modification of the text in z-Tree treatment files. With zBrac, you can export specified text intoa language fileand import it back after the text modification or translation.The main advantage of using zBrac for z-Tree experiment development is that that the text in zTree files can be modified easily at any time, which means the coding process and the text design/translation process can be independently done.zBrac's design is specifically tailored for multicultural studies: By using the software, you can code your experiment once and send the original language file for translation. zBrac also tries to tackle encoding issues special characters in z-Tree by offering different encoding options.zBrac is particularly useful when the treatment file contains the same piece of text several times. Such duplicate text is very common in z-Tree programming as it is often needed to copy-paste stage tree elements. zBrac recognizes each unique key as a single key and it would be enough to provide the text to replace for this key at once. For an example, please see below for the Holt and Laury measure example.**zBrac is free/open-source software (See GNU GPL-3 Licence). You can use, modify and distribute it. It is not obligatory to cite the software, although it is highly appreciated. (see below about citing the paper) **Citing the softwareCurrently, a paper about zBrac is submitted to a scientific journal. If you use the software and would like to cite the paper, please visit this page or contact us before you share your manuscript to check the status of the paper.For more information, visit project page:www.zbrac.com
Package: zbx2slack
Zabbix Alert Notification Script for Slack. by pure python.Can use by “Remote command”. But can’t use by “Media type”.if use by python2.6 (like CentOS6.x), installargparsemodule.  ex,$sudoyuminstallpython-argparseScreenshotNotification example.InstallIn your zabbix server,$pipinstallzbx2slackor you can download directly usingwget,curl.$wgethttps://raw.githubusercontent.com/laughk/zbx2slack/master/zbx2slack.py$chmod+xzbx2slack.py(if necessary, usesudo. )set this script your zabbix server.put file and add mode to execute.Usageget incoming-webhook url for your slack. fromincoming webhook integration.In the WebUI of your zabbix server.[Configureation][Action]Choose ‘Trigger’ at Event source and Create Action.if “Recovery message” checked, Uncheck the checkbox.At [Conditions] tab, addTrigger value = OKto Conditions.Trigger value = OKandTrigger value = PROBLEMare in Conditions.At [Operations] tab, addRemote CommandOperation type : Remote CommandTargeta list   : any host (ex. Current host)Type           : Custom scriptExecute on     : Zabbix serverCommands:(if directly download, replacezbx2slacktozbx2slack.py.)zbx2slack\--zabbix-server-url"http://zabbix.example.com/zabbix"\--slack-botname"Zabbix Alert"\--slack-incoming-webhook-url"https://hooks.slack.com/services/xxxxxxxxx/xxxxxxxxx/...."\--trigger-id"{TRIGGER.ID}"\--trigger-name"{TRIGGER.NAME}"\--trigger-status"{TRIGGER.STATUS}"\--trigger-severity"{TRIGGER.SEVERITY}"\--event-id"{EVENT.ID}"\--item"{HOST.NAME1}|{ITEM.NAME1}|{ITEM.KEY1}|{ITEM.VALUE1}|{ITEM.ID1}"\--item"{HOST.NAME2}|{ITEM.NAME2}|{ITEM.KEY2}|{ITEM.VALUE2}|{ITEM.ID2}"\--item"{HOST.NAME3}|{ITEM.NAME3}|{ITEM.KEY3}|{ITEM.VALUE3}|{ITEM.ID3}"LICENSEMITAUTHORKei Iwasaki <me@laughk.org>
Package: zbx-dashboard
zbx_dashboardzbx_dashboardis a simple Django applicattion that provides an alternative to the Zabbix screens.
It allows users who are not registered in Zabbix being able to view the graphs and (in the future) more data from Zabbix.PrerequisitesDjango 1.5.*, 1.6.*, 1.7.*Python 2.6.8+, 2.7.*Main featuresGroup graphs in separate dashboardsRearrange graphs on the dashboardEach dashboard and the graph can be provided a brief descriptionDashboards may belong to different groups of usersInstallationInstall latest stable version from PyPI:$ pip install zbx-dashboardOr latest stable version from GitHub:$ pip install -e git+https://github.com/banzayats/zbx-dashboard@stable#egg=zbx-dashboardEdit your projects’ Django settings:INSTALLED_APPS=('admin_tools','admin_tools.theming','admin_tools.menu','admin_tools.dashboard','tinymce','widget_tweaks','django.contrib.admin','django.contrib.auth','django.contrib.contenttypes','django.contrib.sessions','django.contrib.messages','django.contrib.staticfiles','zbx_dashboard',)STATIC_ROOT=os.path.join(BASE_DIR,'static')TEMPLATE_CONTEXT_PROCESSORS=('django.contrib.auth.context_processors.auth','django.core.context_processors.debug','django.core.context_processors.i18n','django.core.context_processors.request','django.core.context_processors.static','django.contrib.messages.context_processors.messages',)LOGIN_REDIRECT_URL='/boards'# Set up your Zabbix server credentialsZABBIX_URL='https://zabbix.org/zabbix/'ZABBIX_USER='guest'ZABBIX_PASS=''# TinyMCETINYMCE_DEFAULT_CONFIG={'mode':'exact','theme':"advanced",'relative_urls':False,'width':400,'height':200,'plugins':'inlinepopups,preview,media,contextmenu,paste,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras','theme_advanced_buttons1':'fullscreen,|,bold,italic,underline,strikethrough,|,sub,sup,|,bullist,numlist,|,outdent,indent,|,formatselect,removeformat,|,preview,code','theme_simple_toolbar_location':'top','theme_advanced_toolbar_align':'left',}LOCALE_PATHS=(os.path.join(BASE_DIR,'locale'),)Add to urls.py:fromdjango.contrib.auth.viewsimportlogin,logouturlpatterns=patterns('',# ...url(r'^admin_tools/',include('admin_tools.urls')),url(r'^boards/',include('zbx_dashboard.urls',namespace="boards")),url(r'^accounts/login/$',login,name='login'),url(r'^accounts/logout/$',logout,name='logout'),url(r'^tinymce/',include('tinymce.urls')),)Run:$ python manage.py syncdbThis creates a few tables in your database that are necessary for operation.Makestaticdirectory in your projects’ root directory and run:$ python manage.py collectstaticTest the application. Run the development server:$ python manage.py runserver 0.0.0.0:5000DemoDemo site:http://boyard.pp.ualogin: admin, password: admin
Package: zbx-statsd
Introductionzbx-statsd is a clone of Etsy’s statsd and Steve Ivy’s py-statsd designed to work with Zabbix as stats collection and graphing backend. Based on sources of pystatsd.pystatsdhttps://github.com/sivy/py-statsd/Graphitehttp://graphite.wikidot.comStatsdcode:https://github.com/etsy/statsdblog post:http://codeascraft.etsy.com/2011/02/15/measure-anything-measure-everything/UsageClient:from zbx-statsd import Client, Serversc = Client(‘example.org’,8125, ‘zabbix_name_of_this_machine’)sc.timing(‘python_test.time’,500)
sc.increment(‘python_test.inc_int’)
sc.decrement(‘python_test.decr_int’)Server:srvr = Server(debug=True)
srvr.serve()
Package: zca
ZCA whitening in Python with a Scikit-Learn like interface.UsagefromzcaimportZCAimportnumpyasnpX=np.random.random((10000,15))# data arraytrf=ZCA().fit(X)X_whitened=trf.transform(X)X_reconstructed=trf.inverse_transform(X_whitened)assert(np.allclose(X,X_reconstructed))# TrueInstallationpipinstall-UzcaLicenceGPLv3Authorszcawas written byMaarten Versteegh.
Package: zcache
PyZCache is dependency free python key value cache based file storage and json serialize.extra features:limit able stack cacheoption to add ttl (time to life) in cache contentsmart requestInstallationpip install zcacheexamplebasic example:fromzcacheimportCacheimporttimec=Cache(path="/tmp")print("set foo=bar: ",c.set("foo","bar"))print("c size:",c.size())print("c has foo: ",c.has("foo"))print("c get foo: ",c.get("foo"))print("c delete foo: ",c.delete("foo"))print("c has foo: ",c.has("foo"))print("c has spam:",c.has("spam"))print("c set spam=eggs, ttl=3: ",c.set("spam","eggs",ttl=3))# cache with ttlprint("c has spam:",c.has("spam"))print("sleep 3")time.sleep(3)print("c has spam:",c.has("spam"))print("c size:",c.size())example with limited stack:fromzcacheimportCached=Cache(path="/tmp",limit=2)d.reset()# reset cache stack to 0print(d.set("one",1))# Trueprint(d.set("two",2))# Trueprint(d.set("three",3))# False out of stack limitd.delete("one")# delete one item from stackprint(d.set("three",3))# TrueSmartRequestSmartRequestis Simple HTTP Client with smart caching system provide byzcache.example usage ofSmartRequest(url, cache_path, cache_time, offline_ttl):fromzcacheimportSmartRequestreq=SmartRequest("https://www.example.com",cache_path="/tmp/request1.cache")print(req.is_loaded_from_cache)# check is response loaded from cacheresponse_headers=req.response.get('headers')response_body=req.response.get('body')to make advance request you can create costum url object with other library, for example:fromzcacheimportSmartRequestimportrequestsclassMyRequest:url="https://www.example.com"defget():"""this method called by SmartRequest to retrieve content.you can put request logic get, post etc and return tuple(headers=dict, body=str)"""ret=requests.get(MyRequest.url)returndict(ret.headers),ret.textreq=SmartRequest(MyRequest,cache_path="/tmp/request2.cache")note: caching for request media/binary content is possible withbase64encode.LicenseMIT
Package: zca_snippets
zca-listzca-snippetszca-list$zca-listpyramid.interfacespyramid.interfaces:ITranslationDirectoriespyramid.interfaces:INewRequestpyramid.interfaces:IRootFactorypyramid.interfaces:IDefaultRootFactorypyramid.interfaces:IViewMapperFactorypyramid.interfaces:IBeforeRender## ..snippyramid.interfaces:IExceptionViewClassifierpyramid.interfaces:ILocaleNegotiatorpyramid.interfaces:IMultiDictpyramid.interfaces:IAuthenticationPolicyzca-snippets$zca-snippetspyramid.interfaces:IAuthenticationPolicyfromzope.interfaceimportimplementerfrompyramid.interfacesimportIAuthenticationPolicy## see: pyramid.interfaces:IAuthenticationPolicy@implementer(IAuthenticationPolicy)classAuthenticationPolicy(object):defremember(self,request,principal,**kw):passdefeffective_principals(self,request):passdefforget(self,request):passdefauthenticated_userid(self,request):passdefunauthenticated_userid(self,request):pass$zca-snippets-qpyramid.interfaces:IAuthorizationPolicy## see: pyramid.interfaces:IAuthorizationPolicy@implementer(IAuthorizationPolicy)classAuthorizationPolicy(object):defprincipals_allowed_by_permission(self,context,permission):passdefpermits(self,context,principals,permission):pass
Package: zcatalyst-cliq
ZCatalyst Cliq SDKThe official python sdk for integrating Zoho Catalyst with Zoho Cliq.ZCatalyst Cliq SDK helps you to work with Python for handling Zoho Cliq extensions using Zoho Catalyst.PrerequisitesTo start working with this SDK you need to sign up withcatalystandcliqThen you need to install suitable version ofPythonandpipInstallingThe ZCatalyst Cliq SDK is a pip package and can be found as zcatalyst-cliq on PyPI:python-mpipinstallzcatalyst-cliqUsing zcatalyst-cliqAfter installing zcatalyst-cliq, you can initialize it in your catalyst's cliq integration functions as:importzcatalyst_cliq# your cliq handler files's mapping should be given hereconfig={"ZohoCliq":{"handlers":{"bot_handler":"handlers/bot_handler.py","function_handler":"handlers/function_handler.py","installation_validator":"handlers/installation_validator.py","command_handler":"handlers/command_handler.py","widget_handler":"handlers/widget_handler.py","messageaction_handler":"handlers/message_action_handler.py","installation_handler":"handlers/installation_handler.py"}},}defhandler(request,response):handler_resp=zcatalyst_cliq.execute(request,config)response.set_content_type('application/json')response.send(handler_resp)DocumentationFor documentation and further queries kindly contanctsupport@zohocatalyst.com
Package: zcatalyst-sdk
ZCatalyst SDKThe official python sdk of Catalyst by ZohoZCatalyst Python SDK bundles all the features of Zoho Catalyst and provides access to various Catalyst services and their respective components, which helps you build robust Catalyst applications and microservices.PrerequisitesTo start working with this SDK you need a catalyst accountSign UpThen you need to install suitable version ofPythonandpipInstallingThe ZCatalyst Python SDK is a pip package and can be found as zcatalyst on PyPI:python-mpipinstallzcatalyst-sdkUsing zcatalystAfter installing zcatalyst, you can initialize it in your catalyst functions as:importzcatalyst_sdkcatalyst_app=zcatalyst_sdk.initialize()DocumentationFor documentation and further clarifications kindly contanctsupport@zohocatalyst.com
Package: zcb-dbutils
dbutils使用方法fromzcb_dbutilsimportDBConnectionimportloggingimportpandasaspdlogging.basicConfig(level=logging.DEBUG,format='%(asctime)s%(filename)s[line:%(lineno)d]%(levelname)s%(message)s',datefmt='%d%b %Y,%a%H:%M:%S',#日 月 年 ，星期 时 分 秒)dbconn=DBConnection(host='localhost',port=3306,user='root',password='',database='basic')ret=dbconn.fetch_one("select * from tb_user1 where id = 1000")print(ret)ret=dbconn.showtable('basic','tb_user')print(pd.DataFrame.from_dict(ret))ret=dbconn.show_table_index('basic','tb_user')print(pd.DataFrame.from_dict(ret))rows=dbconn.fetch_list('select user_id,id from tb_user')print(rows)id=dbconn.insert('insert into tb_role (role_name,role_type,remark_info,created,updated) value (%s,1,%s,0,0)',('xxx','xxxx'))dbconn.commit()print(id)
Package: zcbe
zcbeIntroductionThe Z cross build environment is a tool for managing cross-compile environments.
It comes with concurrent building, dependency tracking and other useful features.UsageTutorialTODOCLI Usageusage: zcbe [-h] [-w] [-W WARNING] [-B] [-C CHDIR] [-o FILE] [-e FILE]
            [-f FILE] [-j JOBS] [-a] [-s] [-n] [-u] [-H ABOUT]
            [PROJ ...]

The Z Cross Build Environment

positional arguments:
  PROJ                  List of projects to build

optional arguments:
  -h, --help            show this help message and exit
  -w                    Suppress all warnings
  -W WARNING            Modify warning behavior
  -B, --rebuild, --always-make, --always-build
                        Force build requested projects and dependencies
  -C CHDIR, --chdir CHDIR, --directory CHDIR
                        Change directory to
  -o FILE, --stdout-to FILE
                        Redirect stdout to FILE ('{n}' expands to the name of
                        the project)
  -e FILE, --stderr-to FILE
                        Redirect stderr to FILE ('{n}' expands to the name of
                        the project)
  -f FILE, --file FILE, --build-toml FILE
                        Read FILE as build.toml
  -j JOBS, --jobs JOBS  Number of maximum concurrent jobs
  -a, --all             Build all projects in mapping.toml
  -s, --silent          Silence make standard output(short for -o /dev/null)
  -n, --dry-run, --just-print, --recon
                        Don't actually run any commands
  -u, --show-unbuilt    List unbuilt projects and exit
  -H ABOUT, --about ABOUT
                        Help on a topic("topics" for a list of topics)
Package: zc.botokeyring
Note: My hope is that this package will become redundant by
integrating something very similar into boto itself.Boto is awesome for controlling AWS.  Unfortunately, there are times
when specifying credentials is awkward.  Typically, one has to either:includint the AWS password (aws_secret_access_key) in a clear text
dot file, which is insecure, orsetting an environment variable with the password, which is
inconvenient and insecure on multi-user systems.It would be better to use a secure keyring to store the password.
zc.botokeyring provides exactlly that capability. To use it, set
aws_access_key_id in the Credentials section of your boto
configuration filem as usual, and instead of setting
aws_secret_access_key, set keyring to the name of a keyring containing
the password:[Credentials]
aws_access_key_id = 1234
keyring = testChanges0.1.0 (2012-12-02)Initial release
Package: zc.copy
This package used to provide a pluggable replacement of ObjectCopier class
and locationCopy function from zope.copypastemove and zope.location
respectively. Currently, all its functionality is merged to those packages
and the new zope.copy package is provided that contains the actual pluggable
copying mechanism used to be in this package with no dependencies except
zope.interface.This package now only provides backward-compatibility imports and should
not be used for new developments.
Package: zcc-utils
zcc_utils介绍Accumulated tool modules
Currently there are:Convert JSON string to custom typeGet the number after the decimal point, 1.2 = > 2Get the number after the decimal point, 1.2 = > 0.2Seconds to minutesSecond to hourThe hour to time type of float type, 12.99 hours = > 12:59:24安装说明pip install -i https://pypi.Python.org/simple/ zcc-utils --trusted-host pypi.Python.org
Package: zChainer
scikit-learn like interface and stacked autoencoder for chainerRequirementsnumpyscikit-learnchainer >= 1.5Installationpip install zChainerUsageAutoencoderimportnumpyasnpimportchainer.functionsasFimportchainer.linksasLfromchainerimportChainList,optimizersfromzChainerimportNNAutoEncoder,utilitydata=(..).astype(np.float32)encoder=ChainList(L.Linear(784,200),L.Linear(200,100))decoder=ChainList(L.Linear(200,784),L.Linear(100,200))# You can set your own forward function. Default is as below.#def forward(self, x):#    h = F.dropout(F.relu(self.model[0](x)))#    return F.dropout(F.relu(self.model[1](h)))##NNAutoEncoder.forward = forwardae=NNAutoEncoder(encoder,decoder,optimizers.Adam(),epoch=100,batch_size=100,log_path="./ae_log_"+utility.now()+".csv",export_path="./ae_"+utility.now()+".model")ae.fit(data)Training and Testingimportnumpyasnpimportchainer.functionsasFimportchainer.linksasLfromchainerimportChainList,optimizersfromzChainerimportNNManager,utilityimportpickleX_train=(..).astype(np.float32)y_train=(..).astype(np.int32)X_test=(..).astype(np.float32)y_test=(..).astype(np.int32)# Create a new networkmodel=ChainList(L.Linear(784,200),L.Linear(200,100),L.Linear(100,10))# or load a serialized model#f = open("./ae_2015-12-01_11-26-45.model")#model = pickle.load(f)#f.close()#model.add_link(L.Linear(100,10))defforward(self,x):h=F.relu(self.model[0](x))h=F.relu(self.model[1](h))returnF.relu(self.model[2](h))defoutput(self,y):y_trimed=y.data.argmax(axis=1)returnnp.array(y_trimed,dtype=np.int32)NNManager.forward=forwardNNManager.output=outputnn=NNManager(model,optimizers.Adam(),F.softmax_cross_entropy,epoch=100,batch_size=100,log_path="./training_log_"+utility.now()+".csv")nn.fit(X_train,y_train,is_classification=True)nn.predict(X_test,y_test)