Saravanan666/pypi-org huggingface dataset:
Package: zsql
简单的mysql封装库使用非常简单, 直接调用方法操作, 不需要再去想sql代码了测试代码:if __name__ == '__main__':# 创建操作数据库的实例sql = zsql()# 创建一个库sql.create_db('db_name')# 使用库sql.use_db('db_name')# 创建一个表sql.create_table_ex('table_name', ID='int', name='char(16)', pwd='char(32)')# 保存数据sql.save_values('table_name', (0, '用户0', '密码0'), (1, '用户1', '密码1'))# 更新数据sql.update('table_name', new_item=dict(name='新用户名', pwd='新密码'), where=dict(name='用户1', pwd='密码1'))# 查询数据data = sql.select_all('table_name')# 删除表sql.drop_table('table_name')# 删除库sql.drop_db('db_name')# 显示数据for v in data:print(v)# 关闭sql.close()'''打印出以下结果CREATE DATABASE IF NOT EXISTS db_name DEFAULT CHARSET=utf8;USE db_name;USE db_name;CREATE TABLE table_name (ID int, name char(16), pwd char(32)) DEFAULT CHARSET=utf8;INSERT INTO table_name VALUES (0,'用户0','密码0'), (1,'用户1','密码1');UPDATE table_name SET name = '新用户名', pwd = '新密码' WHERE name='用户1' AND pwd='密码1';SELECT * FROM table_name;DROP TABLE IF EXISTS table_name;DROP DATABASE IF EXISTS db_name;(0, '用户0', '密码0')(1, '新用户名', '新密码')'''
Package: zssdb
一个封装的ssdb连接器参数说明参数名数据类型默认值描述更新日志发布时间发布版本发布说明19-03-020.1.2修改了一些bug19-02-190.1.0发布第一版, 暂时不支持集群连接本项目仅供所有人学习交流使用, 禁止用于商业用途
Package: zs-selenium-youtube
selenium_youtubeInstallpipinstall--upgradeselenium-youtube# orpip3install--upgradeselenium-youtubeUsagefromselenium_youtube.youtubeimportYoutubeyoutube=Youtube('path_to_cookies_folder','path_to_extensions_folder')result=youtube.upload('path_to_video','title','description',['tag1','tag2'])Dependenciesbeautifulsoup4,kcu,kstopit,kyoutubescraper,noraise,selenium,selenium-firefox,selenium-uploader-accountCreditsPéntek Zsolt
Package: zssh
ZSSH - ZIP over SSHSimple Python script to exchange files between servers.Login to SSH and choose which path you need to serve over HTTP.This script is based on Python 3+Intall from PIPpython3-mpipinstallzsshExpose a directory toZIP$python3-mzssh-as--path/desktop/path_to_exposeExtract aZIPfrom URL$python3-mzssh-ad--path/desktop/path_to_download--ziphttp://mydomain.com/temp_file.zipUsageusage:zssh[-h]-aA--pathPATH[--zipZIP][--portPORT]requiredarguments:-aAAction[s=serve,d=download]--pathPATHFile/FolderPath

optionalarguments:--zipZIPZIPFileURL|Nameshouldbe*.zip--portPORTServerPort|Default:9800
Package: zstandard
This project provides Python bindings for interfacing with theZstandardcompression library. A C extension
and CFFI interface are provided.The primary goal of the project is to provide a rich interface to the
underlying C API through a Pythonic interface while not sacrificing
performance. This means exposing most of the features and flexibility
of the C API while not sacrificing usability or safety that Python provides.The canonical home for this project ishttps://github.com/indygreg/python-zstandard.For usage documentation, seehttps://python-zstandard.readthedocs.org/.
Package: zstat-cli
zstatA bone-simple stats tool for displaying percentiles from stdin to stdout.
Example:$ cat nums.txt
456
366
695
773
617
826
56
78
338
326$ cat nums.txt | zstat
p0      =       56
p50     =       366
p90     =       773
p95     =       773
p99     =       826
p99.9   =       826
p100    =       826InstallationClone this repository locally, then:pip3 install-e.BuildingmakeTestingmake testDeploy New Versionmake deploy
Package: zstreams
ZStreamsZeek + Kafka + Spark + KSQL = ZStreamsZStreams is the bridge between Zeek and the latest streaming toolkits. With ZStreams you can quickly and easily start processing your Zeek output with the world's best analytic tools. Our examples will lead you through the process.Install ZStreamsStep 1:Install the Zeek Kafka plugin/package -Kafka_SetupStep 2:pip install zstreamsStep 3:Follow our set of simple examples to get startedExamples
Package: zsv.ticker
zsv.tickerenables flexible and idiomatic regular execution of
tasks:from zsv.ticker import Ticker

ticker = Ticker()
ticker.start(5)

while ticker.tick():
    execute_task()Tickeraims to be more idiomatic and easy to use than a time calculation and
sleep call, and further enables the instantaneous termination of a waiting
task:import signal
from time import sleep
from zsv.ticker import Ticker

ticker = Ticker()
ticker.start(5)

def abort(signum, frame):
    ticker.stop()

signal.signal(signal.SIGINT, abort)

while ticker.tick():
    print("tick")
    sleep(2)
    print("tock")The above script wraps astopcall in a signal handler registered to SIGINT:
hitting Ctrl+C after the script prints “tick” but before it prints “tock”
will yield a final “tock” before it terminates.
Package: ztask
ZtaskZtaskhelps to log task inzohoprojectsand complete the
damned timesheets from the terminal using aTaskwarriorinspired syntax.This little program is made by and for terminal enthusiasts,enjoy it!RequirementsYou only need a distribution of python3 installed.⚙️Installation:You can install the requirements (preferably in an environment) using:pip install ztaskDownload directly the script and set the variables at your user path in .ztask/env_variables.py,
more details about these variables bellow.If you install "ztask" in a environment you will need to initialize the environment before using ztask,
for so sometimes is convenient to use an alias like:alias eztask='conda activate <env_name> && ztask'Usage:Ztask, as it should be, is aterminal user interfacethat can be run with command "ztask":For printing your zoho task:ztaskShows all the table, without truncating the table:ztask longLog the task in zoho:ztask log number_of_task 'date' hh:mmZtask date suports natural language such as: 'today', 'yesterday' etcExamples:Log the task 4, two days ago with a duration of 7:30 hours:ztask log 4 '2 days ago' 07:30Log the taks 12 today 8 hours:ztask log 12 'today' 08:00💾 env variablesThe first time you execute the program will create a file in your user directory, and will ask you to fill the
content using a terminal interface.If something fails in the process the file should look like:C:\Users\YOUR USER NAME\.ztask\ztask.iniOr in Unix based systems:/home/YOUR USER NAME/.ztask/ztask.iniSet the following env variables in the env_variables.py file (copy paste and fill):[variables]client_id = <YOUR CLIENT ID>client_secret = <YOUR CLIENT SECRET>refresh_token = <YOUR REFRESH TOKEN>user_id = <YOUR USER ID>These variables can be found athttps://api-console.zoho.euafter creating a self client.You can get your refresh_token after getting first the grant token. Go to self client same web and generate the grant token
using the scope:ZohoProjects.tasks.ALL,ZohoProjects.timesheets.ALL,ZohoProjects.projects.ALL,ZohoProjects.portals.READ,ZohoProjects.bugs.ALLIf you couldn't get the config file done you can get your refresh token using the grant_token:ztask get_refresh_token "YOUR GRANT TOKEN"The user_id can be found at zoho projects, clicking in the right corner (user icon)
Package: ztc
-- if it’s not monitored, it doesn’t exist#################### IntroZTC is collection of templates and scripts (UserParameter's) for zabbixmonitoring system [http://zabbix.com].It includes script and templates for comprehensive monitoring of Linux OS,nginx and apache web servers, PostgreSQL and MySQL databases, java apps andmore.Please check wiki for full and most recent information:https://bitbucket.org/rvs/ztc/wiki/Home########################################################### License:GPLv3 unless specified in the beginning of file#################### Authors:* Vladimir Rusinov - Maitainer, primary developer<vladimir@greenmice.info>* Denis Seleznyov [https://bitbucket.org/xy2/]# contrib:* Artem Silenkov, 2gis [http://2gis.ru]# 3rd parties:* Greg Sabino Mullane - check_postgres plugin for Nagios and others (used inPostgreSQL template)<greg@endpoint.com>http://www.bucardo.org/check_postgres/* Mucknet - parts of Linux template (some disk stats items)http://www.muck.net/?p=19* check_postgres.pl authors* Allan Saddi <allan@saddi.com>* Artem Silenkov* Alex Lov# Other copyright holders:* Murano Softwarehttp://muranosoft.com/ http://muranosoft.ru/* Docufide, Inc. / Parchment, Inc.http://www.docufide.com/ http://www.parchment.com/* Wrike, Inc.http://www.wrike.com/########################################################### Become an author/contributor/tester!hg repo: http://bitbucket.org/rvs/ztc/Please, send your bugreports, comments, patches and fixes to:* http://bitbucket.org/rvs/ztc/* http://greenmice.info/* mailto:vladimir@greenmice.info* Jabber/GTalk/MSN: vladimir@greenmice.info* Skype/Yahoo: v.rusinovThanks!
Package: ztchooks
ZTC Hooks for Python3ztchooksprovides primitives for serializing and verifying hooks fired fromZeroTier CentralWebhook signatures from ZeroTier Central are in the HTTP header field:X-ZTC-SignatureExample Flask app can be found in theexample/subfolderLicenseCopyright 2023 ZeroTier, Inc. All rights reserved.  Licensed under the Mozilla Public License Version 2.0.  See theLICENSEfile for the full license text.
Package: zt-dlipower
Digital Loggers Network Power Switch Python ModuleThis is a python module and a script to mange the
Digital Loggers Web Power switch.The module provides a python class named
PowerSwitch that allows managing the web power
switch from python programs.When run as a script this acts as a command
line utility to manage the DLI Power switch.SUPPORTED DEVICESThis module has been tested against the following
Digital Loggers Power network power switches:ProSwitchWebPowerSwitch IIWebPowerSwitch IIIWebPowerSwitch IVWebPowerSwitch VEthernet Power Controller IIIExampleimportdlipowerprint("Connecting to a DLI PowerSwitch at lpc.digital-loggers.com")switch=dlipower.PowerSwitch(hostname="lpc.digital-loggers.com",userid="admin")print("Turning off the first outlet")switch.off(1)print("The powerstate of the first outlet is currently",switch[0].state)print('Renaming the first outlet as "Traffic light"')switch[0].name="Traffic light"print("The current status of the powerswitch is:")print(switch)Connecting to a DLI PowerSwitch at lpc.digital-loggers.comTurning off the first outletThe powerstate of the first outlet is currently OFFRenaming the first outlet as "Traffic light"The current status of the powerswitch is:DLIPowerSwitch at lpc.digital-loggers.comOutlet	Hostname       	State1	Traffic light  	OFF2	killer robot   	ON3	Buiten verlicti	ON4	Meeting Room Li	OFF5	Brocade LVM123 	ON6	Shoretel ABC123	ON7	Shortel 24V - T	ON8	Shortel 24V - T	ON
Package: zteb
ZTEB -- ZTEB is Tony's Electronic Birthday-CardGetting Started$pipinstallzteb
$ztebunwrapBackground StoryNedelcho Petrov and me, being the great friends that we are,
were brainstorming ideas for Tony's (Anton Karakochev) birthday present at the very last moment.
Inbetween of trying to find a rather unique and satisfying present and entertaining ourselves,
as, did I say, great friends, we considered everything from a set of fresh winter tyres to mount
a car onto to some bitcoins (or infinitesimal fractions thereof) to be locked for good as a nice (?)
investment for the next twenty years. I thought about this for a while on my own, but concluded that even
though such an investment could probably be sufficient to buy a new car, it would be a shame if there
are no tyres to mount it on. I took the idea a bit further (or behind) and decided
to lock a simple birthday card in an electronic time capsule of some sort, so it could only be read
after three days. This would make for some present and prevent Tony from realising what kind of friends
he has, or at least in our presence.About the ProjectZTEBprovides a simple command line interface to create a sort of electronic time capsules, the
content of which can only be retrieved after a specified amount of time.
The functionality is based on the paperTime-lock puzzles and timed-release Cryptoby Rivest, Shamir and Wagner and relies on encrypting the contents of the capsule
and only exposing information on how to retrieve the encryption key with
significant computational effort. In case our current beliefs on
complexity classes (P/NP) and prime number factorization techniques are correct,
a fixed amount of iterations is required to solve the puzzle.
The time it takes to perform a single iteration, however, can vary greatly
between various machines and algorithm implementations, the average naturally decreasing
as more powerful CPUs are produced. This implementation can create a capsule which
takes approximately the specified amount of time to open on the current machine,
running the same operating system, running the current code,
on the same Python interpreter, using the same...CLICreating a time capsuleUsage: zteb wrap [OPTIONS] CARD OUTPUT

  Wrap an electronic birthday-card.

Options:
  -w, --wrapper-text PATH  Optional path to file containing wrapper text. This
                           is shown while unwrapping the card.
  -d, --duration DELTA     Desired amount of time for the unwrapping to take
                           in the format of pandas.Timedelta.
  --help                   Show this message and exit.Example$ztebwrapamazing-capsule-contents.txtcapsule.zteb-d13:37:00Opening a time capsuleUsage: zteb unwrap [OPTIONS]

  Unwrap an electronic birthday-card.

Options:
  -c, --card PATH         Path to a wrapped birthday-card. If not specified,
                          the built-incard for Tony's birthday is being
                          unwrapped.
  -o, --output-file PATH  Path to file to store card message to.
  -s, --silent            Suppress all stdout output.
  --help                  Show this message and exit.Example$ztebunwrap-ccapsule.zteb
Package: zte-mf823
SynopsisVodem Vodafone K4607-Z Web Interface Python bindingsCode ExampleUse the simple interface:import vodem.simple

vodem.simple.sms_send("+16175551212", "Message String")

inbox = list(vodem.simple.sms_inbox_unread())

vodem.simple.sms_delete(1)For more advanced features, use the raw api:import vodem.api
import vodem.util

message = vodem.util.encode_sms_message("Message String")
time = vodem.util.encode_time(datetime.datetime.now())
number = "+16175551212;"

vodem.api.sms_send({'Number' : number, 'sms_time' : time, 'MessageBody' : message })Exception handling:import vodem.api
import vodem.exceptions

try:
    vodem.api.disconnect_network()
except vodem.exceptions.VodemError as exc:
    raiseFor more examples consult the examples directoryMotivationThis interface is built to integrate sms capability into an application, or other functions of the vodem that are exposed via the web interface.It requires the hardware vodem and activated sim card.InstallationUsing PyPipip install vodem-vodafone-K4607-ZUsing Gitgit clone https://github.com/alzeih/python-vodem-vodafone-K4607-Z.git
cd python-vodem-vodafone-K4607-Z
python setup.py build
python setup.py installAPI ReferenceSeehttp://python-vodem-vodafone-k4607-z.readthedocs.org/TestsWarningAs some of the tests are potentially destructive, expensive, or annoying to others, it is best to run tests in a device without a sim card.To ensure you have been made aware of the risks, read test/unit/api/__init__.py for instructions.Unfortunately this restriction doesn’t work without the top test module specified explicitly as this places unittest into discovery mode which ignores the load_tests protocol.Running Testspython -m unittest testContributorsBugs, Feature requests, Documentation, and Contributions are tracked via this respository.This project adheres to theOpen Code of Conduct. By participating, you are expected to honor this code.All code should be checked with pylint, tested and documented.LicenseMIT. See LICENCE.
Package: ztext
ztextThis project is designed for NLP analysis eaily, event you don't have any background of NLP you still can use it for text insights.
Functions:Text clean.Topic analysisSVO (Subject Verb and Object extraction)NER (Entity extraction)Topic and SVO visualization (for now Visualization only support run in Jupyter notebook and Colab)installIn python3.6 or later environmentpip install ztextIn IPython, Jupyter notebook or Colab!pip install ztextfrom source:pip3 install git+https://github.com/ZackAnalysis/ztext.gitQuick StartStart a Jupyter notebook locally or a Colab notebook (https://colab.research.google.com/)find a demo athttps://colab.research.google.com/drive/1W2mD6QHOGdVEfGShOR_tBnYHxz_D5ore?usp=sharinginstall package:!pip install ztextimport ztextload sampledata
from sampledata:df = ztext.sampledata()zt = ztext.Ztext(df=df, textCol='content',nTopics=5, custom_stopwrods=['sell','home'], samplesize=200)from file!wget https://github.com/ZackAnalysis/ztext/blob/master/ztext/sampleData.xlsx?raw=truefilename = "sampleData.xlsx"zt = ztext.Ztext()zt.loadfile(filename, textCol='content')zt.nTopics = 6zt.custom_stopwords = ['text','not','emotion']from pandas dataframezt.loaddf(df)FunctionsSentiment analysis:zt.sentiment()Topic analysis:zt.get_topics()SVO and NERzt.getSVO('topic2')Visulzationzt.getldaVis()zt.getSVOvis('topic2',options="any")save outputzt.df.to_excel('filename.xlsx)`
Package: ztfparsnip
ztfparsnipRetrainParsnipforZTF. This is achieved by usingfpbotforced photometry lightcurves of theBright Transient Survey. These are augmented (redshifted, noisified and - when possible - K-corrected).The package is maintained byA. Townsend(HU Berlin) andS. Reusch(DESY).The following augmentation steps are taken for each parent lightcurve to generate a desired number of children (calculated viaweights):draw a new redshift from a cubic distribution with maximum redshift increasedelta_zonly accept the lightcurve if at leastn_det_thresholddatapoints are above the signal-to-noise thresholdSN_thresholdif the lightcurve has an existing SNCosmo template, apply aK-correctionat that magnitude (ifk_corr=True)randomly drop datapoints untilsubsampling_rateis reachedadd some scatter to the observed dates (jd_scatter_sigmain days)ifphase_lim=True, only keep datapoints during a typical duration (depends on the type of source):warning:
Note that a highdelta_zwithout loosening theSN_thresholdandn_det_thresholdwill result in a large dropout rate, which will ultimately lead to far less lightcurves being generated than initially desired.UsageCreate an augmented training samplefrompathlibimportPathfromztfparsnip.createimportCreateLightcurvesweights={"sn_ia":9400,"tde":9400,"sn_other":9400,"agn":9400,"star":9400}if__name__=="__main__":sample=CreateLightcurves(output_format="parsnip",classkey="simpleclasses",weights=weights,train_dir=Path("train"),plot_dir=Path("plot"),seed=None,phase_lim=True,k_corr=True,)sample.select()sample.create(plot_debug=False)Train Parsnip with the augmented samplefromztfparsnip.trainimportTrainif__name__=="__main__":train=Train(classkey="simpleclasses",seed=None)train.run()Evaluate the Parsnip modelfromztfparsnip.trainimportTrainif__name__=="__main__":train=Train(classkey="simpleclasses",seed=None)train.classify()
Package: ztfquery
ztfqueryThis package is made to ease access to Zwicky Transient Facility data and data-products. It is maintained by M. Rigault (CNRS/IN2P3) and S. Reusch (DESY).cite ztfqueryztfquery: a python tool to access ztf (and SEDM) dataztfquerycontains a list of tools:ZTF products:a wrapper of theIRSA web APIthat enable to get ztf data(requires access for full data, but not public data):Images and pipeline products, e.g. catalog ; See theztfquery.query.pydocumentationLightCurves (not from image subtraction): See theztfquery.lightcurve.pydocumentationZTF observing logs: See theztfquery.skyvision.pydocumentationMarshal/Fritz:Download the source information and data, such as lightcurves, spectra, coordinates and redshift:from theZTF-I Marshal: See theztfquery.marshal.pydocumentationfrom theZTF-II Fritz: See theztfquery.fritz.pydocumentationSEDM Data:tools to download SEDM data, including IFU cubes and target spectra, frompharosSee theztfquery.sedm.pydocumentationZTF alert:Currently only a simple alert reader. See theztfquery.alert.pydocumentationCreditsCitationMickael Rigault. (2018, August 14). ztfquery, a python tool to access ZTF data (Version doi). Zenodo.http://doi.org/10.5281/zenodo.1345222AcknowledgmentsIf you have usedztfqueryfor a research you are publishing, pleaseinclude the following in your acknowledgments:"The ztfquery code was funded by the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation programme (grant agreement n°759194 - USNAC, PI: Rigault)."Corresponding Authors:M. Rigault:m.rigault@ipnl.in2p3.fr, CNRS/IN2P3S. Reusch:simeon.reusch@desy.de, DESYInstallationztfquery requirespython >= 3.8Install the codeusing pip:pip install ztfquery(favored)or for the latest version:go wherever you want to save the folder and thengitclonehttps://github.com/MickaelRigault/ztfquery.gitcdztfquery
poetryinstallSet your environmentYou should also create the global variable$ZTFDATA(usually in your~/.bash_profileor~/.cshrc). Data you will download from IRSA will be saved in the directory indicated by$ZTFDATAfollowing the IRSA data structure.Login and Password storageYour credentials will requested the first time you need to access a service (IRSA, Marshal, etc.). They will then be stored, crypted, under ~/.ztfquery.
Useztfquery.io.set_account(servicename)to reset it.You can also directly provide account settings when runningload_metadataanddownload_datausing theauth=[your_username, your_password]parameter. Similarly, directly provide the username and password to the ztf ops page when loadingNightSummaryusing theztfops_authparameter.Quick Examples
Package: ztfy.alchemy
ContentsWhat is ztfy.alchemy ?How to use ztfy.alchemy ?Changelog0.3.60.3.50.3.40.3.30.3.20.3.10.3.00.2.50.2.40.2.30.2.20.2.10.20.1.10.1What is ztfy.alchemy ?ZTFY.alchemy is a Zope3 package which can be used to connect Zope3 applications with SQLAlchemy.Main features include :integration of SQLAlchemy transactions with Zope3 transaction managerregister PostgreSQL geometric data types (PostGIS) through GeoTypes package.Most code fragments are based on zope.sqlalchemy, z3c.sqlalchemy and z3c.zalchemy elements and
source codes, except for elements handling PostGIS data types..How to use ztfy.alchemy ?#TODO: To be written…Changelog0.3.6added “close_all_connections” function in ztfy.alchemy.engine module.
This function should be called in any scheduler task in an after-commit hook to be sure that all databases
connections are correctly closed when the task ends0.3.5replace “@listens_for” decorator with “listen” calls in connections events listeners0.3.4added connections cleaning thread to invalidate connections which are still unused five minutes after
begin checked-in to connections pool0.3.3small changes in session management with a new argument allowing to create a session without
integrating it in the Zope transaction’s scoped sessioncorrected parent’s call in GeometryLINESTRING constructor0.3.2small changes in session managementremove thread-local sessions store0.3.1handle aliases in session management via new getSession() function “alias” argument0.3.0add new getUserSession function which can accept an existing session as input argumentremoved GeoTypes dependency0.2.5changed package source layout0.2.4added SQLAlchemy engines vocabulary0.2.3updated package dependencies0.2.2changed import of threading.local module0.2.1merged updates from z3c.zalchemy parent package0.2switched to ZTK-1.1.20.1.1add “pool_recycle” attribute to IEngineDirective and IAlchemyEngineUtility interfacesuse properties in AlchemyEngineUtilityupdated locales0.1initial release