package
stringlengths
1
122
pacakge-description
stringlengths
0
1.3M
zw.jsmath
A basic integration of jsMath fromhttp://www.math.union.edu/~dpvc/jsmath/into Zope3 using zc.resourcelibrary.
zwkit
No description available on PyPI.
zwkMathTest
No description available on PyPI.
zwkPython
No description available on PyPI.
zwlib
ZwlibZwLib is a package that provides a series of utility functions for Convo studio, HyperPM, and AIForYou products.FeaturesEasy-to-use API request functions with built-in error handlingFunctions for handling image, video, and payment meta-dataBuilding NLP ModelsCompatible with Python 3.6 and aboveInstallationTo install Zwlib, simply run:pipinstallzwlib
zw.mail.incoming
Zaehlwerk’s Incoming mail processingThis small module enables a Zope process to react on incoming mails, reading a Maildir or (in the future) an imap folder.zw.mail.incoming can be seen as the counterpart to zope.sendmail but for processing incoming emails.CHANGESVersion 0.1.2.3 (2009-01-18)Message processing is loggedVersion 0.1.2.1 (2009-01-18)Python 2.4 compability bugVersion 0.1.2 (2009-01-17)‘dropmail’ script allows to read a message from stdin and to write to a Maildir.Version 0.1.1 (2009-01-10)NewEmailFailureEvent has now a delivery_report fieldVersion 0.1 (2009-01-08)Initial release
zw_nester
UNKNOWN
zwnet
Personal Network Utilities
zwnlp
Personal NLP task utils
zwnlptk
Personal utils
zwnschool
OOP Learning Example By Zawanee Makeng
zwoasi
A python binding to the ZWO ASI version 2 library.
zwocr
Personal Python OCR Utilities
zwog
Zwift workout generatorHave you ever been frustrated by any WYSIWYG workout editor, such as theZwift Workout editorand theTrainingPeaks Workout Builder?ZWOG makes it easier to generate structured workouts using a syntax similar to the one used onWhat's on Zwift?.InstallationPyPIInstall the latest stable version from PyPI$pipinstallzwogGitHubInstall the version from the main branch$pipinstallgit+https://github.com/tare/zwog.gitSyntaxThe basic building blocks are ramp intervals10min from 30 to 60% FTPand steady state intervals2hrs 10min @ 60% FTPInterval durations can be given in seconds (sec,s), minutes (min,m), and hours (hrs,h).Moreover, it is possible to create repeated intervals4x 5min @ 95% FTP, 5min @ 85% FTPFinally, a complete workout can be defined as follows10min from 40 to 85% FTP 3x 5min @ 95% FTP, 5min @ 86% FTP 5min @ 50% FTP 3x 5min @ 95% FTP, 5min @ 86% FTP 10min from 75 to 55% FTPThe parser is rather robust when it comes to newlines and other whitespaces.UsageYou can use the command line application$zwog--helpusage: zwog [-h] -i INPUT_FILE [-o OUTPUT_FILE] [-a AUTHOR] [-n NAME][-c CATEGORY] [-s SUBCATEGORY] [-v]Zwift workout generatoroptional arguments:-h, --help show this help message and exit-i INPUT_FILE, --input_file INPUT_FILEinput filename-o OUTPUT_FILE, --output_file OUTPUT_FILEoutput filename-a AUTHOR, --author AUTHORauthor name-n NAME, --name NAME workout name-c CATEGORY, --category CATEGORYcategory-s SUBCATEGORY, --subcategory SUBCATEGORYsubcategory-v, --version show program's version number and exitor call it from Pythonimportzwogworkout_text="15min from 10 to 50% FTP 5min from 50 to 70% FTP 2x 0.5hrs @ 100% FTP, 0.5hrs @ 50% FTP, 10min from 80 to 90% FTP 2min @ 50% FTP\n2min @ 50% FTP\n10min @ 50% FTP, 10min @ 60% FTP 10min from 50 to 10% FTP"workout=zwog.ZWOG(workout_text)workout.save_zwo('workout.xml')print(workout)print(f"{round(workout.tss)}TSS")LimitationsOnly theZWO file formatis supported currentlyWorkout files have to be uploadedmanuallyto Zwift
zwolang
ZWO MinilangPython toolkit for the ZWO minilang.InstallationInstall from PyPi with your favoritepipinvocation:$pipinstallzwolangYou can confirm proper installation via thezwomCLI:$ zwom --help Usage: zwom [OPTIONS] COMMAND [ARGS]... +- Options -------------------------------------------------------------------+ | --help Show this message and exit. | +-----------------------------------------------------------------------------+ +- Commands ------------------------------------------------------------------+ | batch Discover and convert all `*.zwom` files in the given directory. | | single Convert the specified `*.zwom` file to Zwift's `*.zwo`. | +-----------------------------------------------------------------------------+The ZWOM File SpecificationThe primary purpose of this package is to provide a simple, human-readable format for constructing Zwift workouts that can be used to generate the actual workout XML. Let's call it a*.zwomfile, or ZWOM.ZWOM files are parsed using aParsimoniousgrammar, as specified below:workout = ((comment / block) elws*)+ / elws block = tag ws "{" ((comment / params) / elws)+ "}" params = (message / value) ","? value = tag ws (string / range / rangeval) message = "@" ws duration ws string range = rangeval ws "->" ws rangeval rangeval = duration / numeric / zone duration = number ":" number percent = number "%" zone = ("Z" number) / "SS" numeric = percent / number elws = ws / emptyline comment = ~r"\;[^\r\n]*" tag = ~"[A-Z_]+" string = ~'"[^\"]+"' number = ~"\d+" ws = ~"\s*" emptyline = ws+Syntax & KeywordsLike Zwift's built-in workout builder, the ZWO minilang is a block-based system. Blocks are specified using a<tag> {<block contents>}format supporting arbitrary whitespace.Inline comments are also supported, denoted by a leading;.Workout MetadataEach ZWO file must begin with aMETAblock containing comma-separated parameters:KeywordDescriptionAccepted InputsOptional?NAMEDisplayed workout namestrNoAUTHORWorkout authorstrNoDESCRIPTIONWorkout descriptionstr1NoFTPRider's FTPintMaybe2TAGSWorkout tagsString of hashtags3YesMultiline strings are supportedZwift's workouts are generated using FTP percentages rather than absolute watts, so your FTP is required if you want to use absolute watts in your ZWOMTags are capped at 31 total characters, including spaces and hashtags. Zwift also provides 4 built-in tags (#RECOVERY,#INTERVALS,#FTP, and#TT) that may also be added and do not count against this total.Workout BlocksFollowing theMETAblock are your workout blocks:KeywordDescriptionFREEFree rideCOOLDOWNCooldownINTERVALSIntervalsRAMPRampSEGMENTSteady segmentWARMUPWarmupNOTE:While there is no specific Ramp block in the workout building UI, some experimental observations have been made:If a ramp is at the very beginning of the workout, Zwift serializes it as a Warmup blockIf there are multiple blocks in a workout and a ramp is at the end, Zwift serializes it as a Cooldown blockIf there are multiple blocks in a workout and a ramp is not at the beginning or the end, Zwift serializes it as a Ramp blockWhen writing your*.zwomfile, these 3 blocks can be used interchangably, and ZWOM will try to match this behavior when outputting its*.zwofile. Zwift may do its own normalization if edits are made in the workout UI.Workout Block MetadataWorkout blocks can contain the following (optionally) comma-separated parameters:KeywordDescriptionAccepted InputsOptional?DURATIONBlock durationMM:SS, Range1NoCADENCETarget cadenceint, Range1,2YesREPEATNumber of intervalsintOnly valid for intervalsPOWERTarget powerint,int%, Zone3, Range1Mostly no4@Display a message@ MM:SS str5YesFor Interval & Ramp segments, the range syntax can be used to set values for the<left> -> <right>segments (e.g.65% -> 120%orZ2 -> Z6)Cadence ranges are only valid for Interval segmentsZones may be specified asZ1-7orSSPower is ignored for Free segmentsMessage timestamps are relative to their containing blockRepeating a Chunk of BlocksTheSTART_REPEATandEND_REPEATmeta blocks are provided to specify an arbitrary chunk of blocks to repeat. TheSTART_REPEATblock must specify aREPEATparameter;END_REPEATaccepts no parameters. Nested repeats are not currently supported.For example:SEGMENT {DURATION 2:00, POWER 65%} RAMP { DURATION 2:00, POWER 120% -> 140%, @ 0:00 "Here goes the ramp!", @ 1:50 "10 seconds left!", } SEGMENT {DURATION 2:00, POWER 65%} RAMP { DURATION 2:00, POWER 120% -> 140%, @ 0:00 "Here goes the ramp!", @ 1:50 "10 seconds left!", }Becomes:START_REPEAT {REPEAT 2} SEGMENT {DURATION 2:00, POWER 65%} RAMP { DURATION 2:00, POWER 120% -> 140%, @ 0:00 "Here goes the ramp!", @ 1:50 "10 seconds left!", } END_REPEAT {}Sample Workout; Here is a workout-level comment! META { NAME "Sample Workout", AUTHOR "sco1", DESCRIPTION "Here's a description! Descriptions may be on more than one line too!", TAGS "#RECOVERY #super #sweet #workout", FTP 270, } FREE {DURATION 10:00} INTERVALS { ; Here is a block-level comment! REPEAT 3, DURATION 1:00 -> 0:30, POWER 55% -> 78%, CADENCE 85 -> 110, } SEGMENT {DURATION 2:00, POWER 65%} RAMP { DURATION 2:00, POWER 120% -> 140%, @ 0:00 "Here goes the ramp!", @ 1:50 "10 seconds left!", } FREE {DURATION 10:00}
zword
zword安装方法如下,请用 python3pip install zword使用有问题请到gitee.com/znlp/zword/issues发帖。从维基百科抽取中文语料维基百科语料下载地址 :dumps.wikimedia.org/zhwiki有很多链接,下载比如https://dumps.wikimedia.org/zhwiki/20200701/zhwiki-20200701-pages-articles.xml.bz2下载后运行类似如下的命令来抽取中文语料wiki_txt /share/wiki/zhwiki-20200701-pages-articles.xml.bz2小技巧:维基百科打包打包很大,但是不需要完全下载也可以运行以上命令(会报错,但能部分输出,方便开发)会在bz2的同目录输出两个文件条目正文:zhwiki-20200701-pages-articles.title.txt.zd条目标题:zhwiki-20200701-pages-articles.txt.zd这两个文件是Zstandard压缩后的纯文本文件 ( 参见Zstandard:一种新的无损压缩算法)使用本软件包附带的zdcat命令可以查看, 比如:zdcat /share/wiki/zhwiki-20200701-pages-articles.title.txt.zd在条目正文中,条目的标题以 "➜ " 开头。在程序中读取zd文件,可用如下方法from zword import zd with zd.open( "/share/wiki/zhwiki-20200701-pages-articles.txt.zd" ) as f: for i in f: print(i)特别感谢代码改编自《获取并处理中文维基百科语料 - 科学空间|Scientific Spaces》
zw-outliersdetec
zw_outliersdetecThis is a small outliers-detection package. You can clickGithub-vidieweito see more about this package.This package includes six algorithms for unsupervised-outliers-detection 1銆丠OT-SAX 2銆丳APR_RW 3銆両ntervalSets 4銆乮Forest 5銆丷DOS 6銆丗astVOA
zwpdf
Personal PDF utilsNotes:使用pdf2htmlex进行pdf->html的转换,默认使用docker镜像运行(docker pull bwits/pdf2htmlex)
zwpool
Personal Pool utilsProxy PoolAccount Pool(todo)Resource Pool(todo)
zwpy
zwpython测试中。。。
zwpy2js
zwpy2js测试中。。。
zwpython
zwpython测试中。。。
zw.schema
Zaehlwerk FieldsColor fieldEmail fieldColor FieldThe string contained in the field describes a RGB color in hexdecimal format. Let’s first generate a color field:>>> from zw.schema.color import Color >>> color = Color()Make sure the colors validate:>>> color.validate('aa00cc') >>> color.validate('00aa000') Traceback (most recent call last): ... InvalidColor: 00aa000CHANGESVersion 0.2.2 (2008-04-14)packaging bug fixed.Version 0.2.1 (2008-04-13)Remove email field. (It can be found in z3c.schema)Version 0.2 (2008-04-11)Added email field
zwsp-char-function
This is a library that returns a sequence of zero with characters, AKA as ZWSP, based on the parameters of the function.Start by doing thisfrom zero_width_char import zero_wcchar = zero_wc(count=1) # Intprint(len(char))Yes, it’s that simple.Change Log1.0 (27/5/22)First Release
zwsp-steg-py
# zwsp-steg-pyZero-Width Space Steganography. Encodes and decodes hidden messages as non printable/readable characters.This repository is a Python porting of [zwsp-steg-js](https://github.com/offdev/zwsp-steg-js).All credits to [offdev](https://github.com/offdev)!### Installation```bash$ pip install zwsp-steg-py```### Usage Example```.pyimport zwsp_stegencoded = zwsp_steg.encode('hidden message')decoded = zwsp_steg.decode(encoded)print(decoded) # hidden message```Note that decoding a message will ignore all non 'special' characters. That means if you hide your message within a readable string, and decode the whole string, you will only return the hidden message.### ParametersYou can use different sets of characters in different encoding / decoding modes.```.pyimport zwsp_stegzwsp_steg.encode('hidden message', zwsp_steg.MODE_ZWSP)zwsp_steg.encode('hidden message', zwsp_steg.MODE_FULL)```#### Character sets used- **MODE_ZWSP**: Zero-Width Space (\u200b), Zero-Width Non-Joiner (\u200c), Zero-Width Joiner (\u200d)- **MODE_FULL**: All MODE_ZWSP characters, Left-To-Right Mark (\u200e), Right-To-Left Mark (\u200f)### License[Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0)
zwt5
No description available on PyPI.
zwtestprint
No description available on PyPI.
zwtk
Personal Python Helper (require python stds lib only)
zwutils
Personal Python Utilities
zw.widget
Zaehlwerk WidgetsSome widgets for the z3c.form framework.Color widgetEmail widgetLines widgetTinyMCE widgetColorWidgetThe widget can render an input field with color preview:>>> from zope.interface.verify import verifyClass >>> from z3c.form.interfaces import IWidget >>> from zw.widget.color.widget import ColorWidgetThe ColorWidget is a widget:>>> verifyClass(IWidget, ColorWidget) TrueThe widget can render a input field only by adapting a request:>>> from z3c.form.testing import TestRequest >>> request = TestRequest() >>> widget = ColorWidget(request)Such a field provides IWidget:>>> IWidget.providedBy(widget) TrueWe also need to register the template for at least the widget and request:>>> import os.path >>> import zope.interface >>> from zope.publisher.interfaces.browser import IDefaultBrowserLayer >>> from zope.pagetemplate.interfaces import IPageTemplate >>> import zw.widget.color >>> import z3c.form.widget >>> template = os.path.join(os.path.dirname(zw.widget.color.__file__), ... 'color_input.pt') >>> factory = z3c.form.widget.WidgetTemplateFactory(template) >>> zope.component.provideAdapter(factory, ... (zope.interface.Interface, IDefaultBrowserLayer, None, None, None), ... IPageTemplate, name='input')If we render the widget we get the HTML:>>> print widget.render() <input type="text" class="color-widget" value="" />Adding some more attributes to the widget will make it display more:>>> widget.id = 'id' >>> widget.name = 'name' >>> widget.value = u'value' >>> print widget.render() <span id="" class="color-widget color-sample" style="background-color: #value;"> </span> <input type="text" id="id" name="name" class="color-widget" value="value" />EmailWidgetThe widget can render an ordinary input field:>>> from zope.interface.verify import verifyClass >>> from z3c.form.interfaces import IWidget, INPUT_MODE, DISPLAY_MODE >>> from zw.widget.email.widget import EmailWidgetThe EmailWidget is a widget:>>> verifyClass(IWidget, EmailWidget) TrueThe widget can render a input field only by adapting a request:>>> from z3c.form.testing import TestRequest >>> request = TestRequest() >>> widget = EmailWidget(request)Such a field provides IWidget:>>> IWidget.providedBy(widget) TrueWe also need to register the template for at least the widget and request:>>> import os.path >>> import zope.interface >>> from zope.publisher.interfaces.browser import IDefaultBrowserLayer >>> from zope.pagetemplate.interfaces import IPageTemplate >>> import zw.widget.email >>> import z3c.form.widget >>> template = os.path.join(os.path.dirname(zw.widget.email.__file__), ... 'email_input.pt') >>> factory = z3c.form.widget.WidgetTemplateFactory(template) >>> zope.component.provideAdapter(factory, ... (zope.interface.Interface, IDefaultBrowserLayer, None, None, None), ... IPageTemplate, name='input')If we render the widget we get the HTML:>>> print widget.render() <input type="text" class="email-widget" value="" />Adding some more attributes to the widget will make it display more:>>> widget.id = 'id' >>> widget.name = 'name' >>> widget.value = u'[email protected]' >>> print widget.render() <input type="text" id="id" name="name" class="email-widget" value="[email protected]" />More interesting is to the display view:>>> widget.mode = DISPLAY_MODE >>> template = os.path.join(os.path.dirname(zw.widget.email.__file__), ... 'email_display.pt') >>> factory = z3c.form.widget.WidgetTemplateFactory(template) >>> zope.component.provideAdapter(factory, ... (zope.interface.Interface, IDefaultBrowserLayer, None, None, None), ... IPageTemplate, name='display') >>> print widget.render() <span id="id" class="email-widget"> <a href="mailto:[email protected]"> [email protected] </a> </span>But if we are not authenticated it should be obscured:>>> widget.obscured = True >>> print widget.render() <span id="id" class="email-widget"> [email protected] </span>LinesWidgetThe widget can render a HTML text input field, which collects list items by line.>>> from zope.interface.verify import verifyClass >>> from z3c.form.interfaces import IWidget >>> from zw.widget.lines.widget import LinesWidgetThe LinesWidget is a widget:>>> verifyClass(IWidget, LinesWidget) TrueThe widget can render a textarea field only by adapteing a request:>>> from z3c.form.testing import TestRequest >>> request = TestRequest() >>> widget = LinesWidget(request)Such a field provides IWidget:>>> IWidget.providedBy(widget) TrueWe also need to register the template for at least the widget and request:>>> import os.path >>> import zope.interface >>> from zope.publisher.interfaces.browser import IDefaultBrowserLayer >>> from zope.pagetemplate.interfaces import IPageTemplate >>> import zw.widget.lines >>> import z3c.form.widget >>> template = os.path.join(os.path.dirname(zw.widget.lines.__file__), ... 'lines_input.pt') >>> factory = z3c.form.widget.WidgetTemplateFactory(template) >>> zope.component.provideAdapter(factory, ... (zope.interface.Interface, IDefaultBrowserLayer, None, None, None), ... IPageTemplate, name='input')If we render the widget we get the HTML:>>> print widget.render() <textarea class="lines-widget"></textarea>Adding some more attributes to the widget will make it display more:>>> widget.id = 'id' >>> widget.name = 'name' >>> widget.value = u'value'>>> print widget.render() <textarea id="id" name="name" class="lines-widget">value</textarea>TinyWidgetThe widget can render a HTML text input field based on the TinyMCE JavaScript Content Editor from Moxicode Systems..http://tinymce.moxiecode.com>>> from zope.interface.verify import verifyClass >>> from zope.app.form.interfaces import IInputWidget >>> from z3c.form.interfaces import IWidget >>> from zw.widget.tiny.widget import TinyWidgetThe TinyWidget is a widget:>>> verifyClass(IWidget, TinyWidget) TrueThe widget can render a textarea field only by adapteing a request:>>> from z3c.form.testing import TestRequest >>> request = TestRequest() >>> widget = TinyWidget(request)Such a field provides IWidget:>>> IWidget.providedBy(widget) TrueWe also need to register the template for at least the widget and request:>>> import os.path >>> import zope.interface >>> from zope.publisher.interfaces.browser import IDefaultBrowserLayer >>> from zope.pagetemplate.interfaces import IPageTemplate >>> import zw.widget.tiny >>> import z3c.form.widget >>> template = os.path.join(os.path.dirname(zw.widget.tiny.__file__), ... 'tiny_input.pt') >>> factory = z3c.form.widget.WidgetTemplateFactory(template) >>> zope.component.provideAdapter(factory, ... (zope.interface.Interface, IDefaultBrowserLayer, None, None, None), ... IPageTemplate, name='input')If we render the widget we get the HTML:>>> print widget.render() <textarea class="tiny-widget" cols="60" rows="10"></textarea>Adding some more attributes to the widget will make it display more:>>> widget.id = 'id' >>> widget.name = 'name' >>> widget.value = u'value'>>> print widget.render() <textarea id="id" name="name" class="tiny-widget" cols="60" rows="10">value</textarea>TODO: Testing for ECMAScript code…CHANGESVersion 0.1.6.2 (2009-01-09)Lines: converter should work only on LinesWidgetVersion 0.1.6.1 (2008-12-28)packaging problem in setup.pyVersion 0.1.6 (2008-12-28)tinyMCE update (3.2.1.1)tinyMCE is not included in the sources but downloaded.z3c.autoinclude dependency removedVersion 0.1.5 (2008-11-18)tinyMCE update (3.2.1)Version 0.1.4 (2008-06-08)tinyMCE update (3.0.9)Version 0.1.3 (2008-06-08)tinyMCE bug fix for gecko based browsersVersion 0.1.2 (2008-04-13)email widget for z3c.schema.email added.Version 0.1 (2008-02-17)Initial release
zww-test-package
使用说明安装打包:pipinstall-Usetuptoolswheeltwine使用打包命令pythonsetup.pysdistbdist_wheel上传到PyPI:twineupload--repository-urlhttps://upload.pypi.org/legacy/dist/*注: 去pypi申请账号 注册获取api key 配置好~/.pypirc文件twineupload--repository-urlhttps://upload.pypi.org/legacy/--config-file$HOME/.pypircdist/*
zwyfastai
Welcome to fastaifastai simplifies training fast and accurate neural nets using modern best practicesImportant: This documentation covers fastai v2, which is a from-scratch rewrite of fastai. The v1 documentation has moved tofastai1.fast.ai. To stop fastai from updating to v2, run in your terminalecho 'fastai 1.*' >> $CONDA_PREFIX/conda-meta/pinned(if you use conda).InstallingYou can use fastai without any installation by usingGoogle Colab. In fact, every page of this documentation is also available as an interactive notebook - click "Open in colab" at the top of any page to open it (be sure to change the Colab runtime to "GPU" to have it run fast!) See the fast.ai courseIntroduction to Colabfor more information.You can install fastai on your own machines with conda (highly recommended). If you're usingAnacondathen run:condainstall-cfastai-cpytorch-canacondafastaighanaconda...or if you're usingminiconda) then run:condainstall-cfastai-cpytorchfastaiTo install with pip, use:pip install fastai. If you install with pip, you should install PyTorch first by following the PyTorchinstallation instructions.If you plan to develop fastai yourself, or want to be on the cutting edge, you can use an editable install (if you do this, you should also use an editable install offastcoreto go with it.):git clone https://github.com/fastai/fastai pip install -e "fastai[dev]"Learning fastaiThe best way to get start with fastai (and deep learning) is to readthe book, and completethe free course.To see what's possible with fastai, take a look at theQuick Start, which shows how to use around 5 lines of code to build an image classifier, an image segmentation model, a text sentiment model, a recommendation system, and a tabular model. For each of the applications, the code is much the same.Read through theTutorialsto learn how to train your own models on your own datasets. Use the navigation sidebar to look through the fastai documentation. Every class, function, and method is documented here.To learn about the design and motivation of the library, read thepeer reviewed paper.About fastaifastai is a deep learning library which provides practitioners with high-level components that can quickly and easily provide state-of-the-art results in standard deep learning domains, and provides researchers with low-level components that can be mixed and matched to build new approaches. It aims to do both things without substantial compromises in ease of use, flexibility, or performance. This is possible thanks to a carefully layered architecture, which expresses common underlying patterns of many deep learning and data processing techniques in terms of decoupled abstractions. These abstractions can be expressed concisely and clearly by leveraging the dynamism of the underlying Python language and the flexibility of the PyTorch library. fastai includes:A new type dispatch system for Python along with a semantic type hierarchy for tensorsA GPU-optimized computer vision library which can be extended in pure PythonAn optimizer which refactors out the common functionality of modern optimizers into two basic pieces, allowing optimization algorithms to be implemented in 4–5 lines of codeA novel 2-way callback system that can access any part of the data, model, or optimizer and change it at any point during trainingA new data block APIAnd much more...fastai is organized around two main design goals: to be approachable and rapidly productive, while also being deeply hackable and configurable. It is built on top of a hierarchy of lower-level APIs which provide composable building blocks. This way, a user wanting to rewrite part of the high-level API or add particular behavior to suit their needs does not have to learn how to use the lowest level.Migrating from other librariesIt's very easy to migrate from plain PyTorch, Ignite, or any other PyTorch-based library, or even to use fastai in conjunction with other libraries. Generally, you'll be able to use all your existing data processing code, but will be able to reduce the amount of code you require for training, and more easily take advantage of modern best practices. Here are migration guides from some popular libraries to help you on your way:Plain PyTorchIgniteLightningCatalystTestsTo run the tests in parallel, launch:nbdev_test_nbsormake testFor all the tests to pass, you'll need to install the following optional dependencies:pip install "sentencepiece<0.1.90" wandb tensorboard albumentations pydicom opencv-python scikit-image pyarrow kornia \ catalyst captum neptune-cliTests are written usingnbdev, for example see the documentation fortest_eq.ContributingAfter you clone this repository, please runnbdev_install_git_hooksin your terminal. This sets up git hooks, which clean up the notebooks to remove the extraneous stuff stored in the notebooks (e.g. which cells you ran) which causes unnecessary merge conflicts.Before submitting a PR, check that the local library and notebooks match. The scriptnbdev_diff_nbscan let you know if there is a difference between the local library and the notebooks.If you made a change to the notebooks in one of the exported cells, you can export it to the library withnbdev_build_libormake fastai.If you made a change to the library, you can export it back to the notebooks withnbdev_update_lib.Docker ContainersFor those interested in official docker containers for this project, they can be foundhere.
zwzd
No description available on PyPI.
zx
zxZX Spectrum Emulator written in a mix of Python and C++.More screenshotsFeaturesDesigned to be suitable for research and development purposes such as unattended testing of Spectrum software, timing analysis, etc.Meant to be easy to customize and re-use via Python interfaces.Fast and accurate emulation.Based on the fast and flexibleZ80 emulator.Development statusGeneral status: working pre-alpha.Supported machines: 48K only for now.Display: multi-colour effects,accurate timings.Sound: not supported yet.Tape: TAP and TZX formats supported as well as conversion to WAV.Snapshots: Z80.Playback recordings: RZX.Installation and runningFor the latest release:$sudopip3installzxOr directly from the repository for current development version:$sudopip3installgit+https://github.com/kosarev/zxLocal development setups are also supported:$gitclone--recursivehttps://github.com/kosarev/zx $cdzx $python3setup.pydevelop--prefix~/.localRunning:$zxControlsF1displays help.F2is to save snapshot.F3is to load snapshot or tape file.F6pauses/resumes tape.F10andESCquit the emulator.F11and double click switch between fullscreen and windowed mode.PAUSEand mouse click pause/resume emulation or RZX playback.Any Spectrum key stroke resumes emulation and leaves the RZX playback mode back to the regular emulation mode.Running snapshots, recordings and tapes$zxelven.z80$zxexolon.rzx$zxhttps://www.worldofspectrum.org/pub/sinclair/games/e/EricTheFloaters.tzx.zipConverting filesSupported formats:.rzx,.scr,.tap,.tzx,.wav,.z80,.zip.$zxjack.tzxjack.wav$zxeric.taperic.z80Dumping files$zxdumprick.z80 OrderedDict([('id','z80_snapshot'),('a',213),('f',66),...On thedumpcommand,zxparses the specified file (that can be of any supported format) in the form of raw Python data.Reference papersScreen timings
zx1995_nester
UNKNOWN
zx81p2wav
No description available on PyPI.
zxbasic
ZX BASICCopyleft (K) 2008, Jose Rodriguez-Rosa (a.k.a. Boriel)http://www.boriel.comAll files in this project are covered under theGPLv3 LICENSEexcept those placed in directorieslibrary/andlibrary-asm. Those are licensed underMIT licenseunless otherwise specified in the files themselves (i.e. a different license). Anyway, all of the licenses for files under those directories allow binary closed-source (i.e. commercial) distribution of the files created with this compiler.You can create closed-source programs (even commercial ones) with this compiler (a mention to this tool will be welcome, though). But you are not allowed to release the compiler itself as a closed source program.If you modifythisproject (the compiler .py or anything licensed as GPLv3) in any way you MUST publish the changes you made and submit your contribution to the community under the same license.DOCUMENTATIONThis is a very little help file.For DOCUMENTATION in English go to theZX BASIC docs.For help, support, updates meet the community at theforum.INSTALLATIONGo to theZXBasic download pageand get the version most suitable for you.There are, basically, two flavors (both with identical capabilities):For Windows you can download de win32 executable (Windows .exe zip package) version. To install just uncompress it in a directory of your choice. The main executable iszxbc.exe(more on this later). With this toolchain also comeszxbasm.exe(the assembler) andzxbpp.exe(the preprocessor), but these are not needed when programming in BASIC.For Linux and Mac OSX there is a python version, so you will need a python interpreter (available on many platforms, and usually already installed in Linux and Mac OSX). Just uncompress it in a directory of your choice and installation is done. :-) The main executables arezxbc.py(the compiler),zxbasm.py(the assembler) andzxbpp.py(the preprocessor). You can use this version in Windows, but will need to install a python interpreter first.ExamplesAn in-game screenshot of Eleuterio by @na_th_anIngame screenshot ofEl Hobbitby @Wilco2000Ingame screenshot ofKnignt and Demonds DXby Einar SaukasSee more examples at theRelased Programspage.QUICK STARTFor a quick start, just open a terminal in your PC in the same directory you uncompressed ZX Basic and typezxbc(on Windows) orzxbc.py(OSX, Linux). You should see a zxbasic message like this:usage: zxbc [-h] [-d] [-O OPTIMIZE] [-o OUTPUT_FILE] [-T] [-t] [-B] [-a] [-A] [-S ORG] [-e STDERR] [--array-base ARRAY_BASE] [--string-base STRING_BASE] [-Z] [-H HEAP_SIZE] [--heap-adddress HEAP_ADDRESS] [--debug-memory] [--debug-array] [--strict-bool] [--enable-break] [-E] [--explicit] [-D DEFINES] [-M MEMORY_MAP] [-i] [-I INCLUDE_PATH] [--strict] [--version] PROGRAM zxbc: error: the following arguments are required: PROGRAMCreate a text file with the following content:10 CLS 20 PRINT "HELLO WORLD!"Save it ashello.basand finally compile it with:zxbc -taB hello.basIf everything went well, a file namedhello.tapshould be created. Open it with your favourite emulator (i.e. fuse) and see the result.Congratulations! You're now ready to create compiled BASIC programs for your machine. Check and compile the examples included in the examples/ folder or go to thedocumentation pagefor further info.ACKNOWLEDGEMENTSThese are some people who has contributed in a way or another. I consider some of them co-authors (Britlion, LCD, em00k, ...) of this project.Also, many thanks to people supporting this project with their donations!
zxc
Салам короче это модуль от чела который не шарит в питоне Вот что хочу тебе сказать тут есть только две функции и только 4 атрибутаimport zxczxc.zxc_math()Это запуск самого калькулятора на дефолдных настройках у функции zxc_math() есть 3 атрибута delay = По умолчанию стоит 0.2 требуте тип данных float или int | Это задержка на вывод action = True/False bool тип данных | Подтверждение на продолжение выполнения скрипта thread = True/False bool тип данных | Будет находиться в потоке или нетПример :::import zxczxc.zxc_math(delay=0.2,action=False,thread=False)Так же можно изменить само число от которого калькулятор будет отниматьimport zxczxc.setNum(1000) zxc.zxc_math(delay=0,2,action=False,thread=False)в функции setNum() есть только один атрбут эта функция передаёт данные числа с которого отнимается 7 в zxc_math() обязательно если есть в коде должна распологаться сверху zxc_math() во избежание ошибок num = 1000 желательно использовать int но можно и float | Выставляет число для zxc_math()API to zxc python module by.Fikko @
zxcdsaweercvvv
No description available on PyPI.
zxcglf
zxcglf模块 帮助文档编写目的有些简单的函数经常使用,整理成模块方便调用复杂函数依赖库多,在模块中拆成多个小函数,部分整合成大函数有助于提升效率自己写的第一个模块,了解模块制作并实践一下?模块名称自然用了老婆名字的缩写哟模块特征函数的命名以其存在的细分py文件为首,作用为尾,例:作用为y的函数来自x.py,则名称为x_y()声明随包颁发麻省理工学院(MIT)许可证,为开源模块代码中可能会存在很多不足之处,望理解与指出,精益求精是我对该模块的执着追求特别感谢boraxdatetimepyautoguipywin32pandasopenpyxlopencv-pythonwin32gui特别感谢以上这些模块的作者,本模块离不开你们的贡献以上排列不分先后运行环境#!/usr/bin/env python3使用编码# -*- coding: utf-8 -*-模块目录结构zxcglf│ LICENSE│ README.md│ setup.py├─demos└─zxcglf├─csv.py├─debug.py├─file.py├─img.py├─keyboard.py├─mouse.py├─password.py├─path.py├─system.py├─time.py├─tool.py├─window.py├─xlsx.py└─__init__.pyGitHub URL点击访问更新、程序开发进度更新日志第一次大更新更新日期:2021/11/28从无到有,建立工程大致确定了制作与更新的方向对前代模块进行了BUG修复与整理第一次大更新补丁更新日期:2021/11/28连夜更新,为解决一个导入问题第二次大更新更新日期:2021/12/01建立了keyboard.py建立了window.py更新了mouse.py因为上面三条原因,多了一堆新函数第三次大更新[测试版本]更新日期:2021/12/28建立了img.py更新了path.py更新了time.py并修复time_now_get函数与time_change_stamp函数的月、日两项精度输出错误的BUG修复了mouse.py下错误的函数名"mouse_get_positon"改为"mouse_get_position"第三次大更新补丁1[测试版本]更新日期:2021/12/28修复了关于农历含时间精度函数无法返回中文时间的BUG第三次大更新补丁2[测试版本]更新日期:2021/12/29修复了关于window.py未导入win32gui库的错误第四次大更新[测试版本]更新日期:2021/12/31更新了debug.py排查了V2.0.2无法正常安装的原因,原因是win32gui在python3.7以上版本被整合入pywin32模块由于上述原因,我们将从setup.py中移除对win32gui的依赖指示,若仍在使用python3.7以下版本,请手动安装win32gui模块第四次大更新补丁更新日期:2021/12/31修复了关于window.py未导入win32con库的错误双旦将至,节日快乐V1.0更新日期:2022/2/24新增密码服务password.py新增操作系统服务system.py新增常用工具tool.py更新许可证函数功能详细介绍* debug_normal:普通调试 * 功能 * 传入一个字符串,在其最前方加入[DEBUG]字样 * 这样做虽然需要给每个语句加入注释 * 但能方便找出具体错误位置和原因 * 也可做成日志系统 * 用法 * debug_normal(调试提示信息) * 注意事项 * 调试提示信息必须是字符串* debug_with_time:带时间追踪的调试 * 功能 * 传入一个字符串,在其最前方加入[DEBUG]字样 * 相比于debug_normal(),加入了时间戳 * 这样做虽然需要给每个语句加入注释 * 但能方便找出具体错误位置和原因 * 也可做成带时间记录的日志系统 * 用法 * debug_with_time(调试提示信息,时间精度) * 注意事项 * 调试提示信息必须是字符串 * 时间精度必须是字符串,0或1* time_now_get:返回当前已格式化的时间 * 功能 * 该函数提供日期 * 通过给定精度参数 * 精度表示可使用中文 * 返回当前的具体日期 * 最终日期数据通过变量now_time返回 * 若精度格式存在问题(TI00)会返回错误信息 * 用法 * time_now_get(时间精度) * 注意事项 * 时间精度必须是字符串,0或1 * 精度格式中文:年、月、日、时、分、秒、毫秒 * 精度英文格式:y,month,d,h,m,s,ms * 中文可直接组合,例如:年月日时分秒 * 英文组合必须用"."分隔,例如:y,month,d,h,m,s * 精度参数为"0"时相当于返回时分秒 * 精度参数为"1"时相当于返回时分秒毫秒* mouse_move * 功能 * 移动光标到指定坐标 * 给定三个参数,分别是目标坐标的横纵坐标值以及持续时间 * 持续时间可缺省,默认值为0 * 用法 * mouse_move(目标横坐标,目标纵坐标,持续时间(可缺省,默认值为0)) * 注意事项 * 无* mouse_click_left * 功能 * 移动光标到指定坐标并左键单击 * 给定两个参数,分别是目标坐标的横纵坐标值 * 用法 * mouse_click_left(目标横坐标,目标纵坐标) * 注意事项 * 可能需要系统较高权限才对某些程序有效* mouse_click_right * 功能 * 移动光标到指定坐标并右键单击 * 给定两个参数,分别是目标坐标的横纵坐标值 * 用法 * mouse_click_right(目标横坐标,目标纵坐标) * 注意事项 * 可能需要系统较高权限才对某些程序有效* mouse_get_position * 功能 * 返回目前光标的横纵坐标 * 用法 * mouse_get_position() * 注意事项 * 无* mouse_drag * 功能 * 拖拽内容到指定位置 * 给定三个参数,分别是目标坐标的横纵坐标值以及持续时间 * 持续时间可缺省,默认值为0 * 用法 * mouse_drag(目标横坐标,目标纵坐标,持续时间(可缺省,默认值为0)) * 注意事项 * 可能需要系统较高权限才对某些程序有效 * 拖拽起点为光标当前位置* mouse_scroll_up * 功能 * 向上滚动 * 给定一个参数,为滚动的像素值 * 用法 * mouse_scroll_up(滚动的像素值) * 注意事项 * 无* mouse_scroll_down * 功能 * 向下滚动 * 给定一个参数,为滚动的像素值 * 用法 * mouse_scroll_down(滚动的像素值) * 注意事项 * 无* path_desktop * 功能 * 在Windows操作系统下,返回桌面路径 * 用法 * path_desktop(参数缺省) * 注意事项 * 这在其他操作系统上无法工作* file_select * 功能 * 在Windows操作系统下,给定一个主页路径 * 打开文件选择器浏览文件 * 若直接关闭文件选择器,将无法跳出循环 * 用法 * file_select(文件选择器主页路径) * 注意事项 * 这在其他操作系统上无法工作* csv_read_column * 功能 * 读取csv的某列 * 将返回一个列表 * 用法 * csv_read_column(csv文件路径, 要读取的列数,编码) * 注意事项 * 使用自然计数的列数 * 编码缺省则为UTF-8* time_change_stamp * 功能 * 将时间戳转换为格式化的时间 * 用法 * time_change_stamp(时间戳, 精度) * 注意事项 * 时间戳应该为一个整数 * 精度格式见time_now_get * 但注意,时间戳将不存在毫秒精度* file_folder_create_if_non_exist * 功能 * 检查目录是否存在 * 若不存在则创建 * 用法 * file_folder_create_if_non_exist(目录路径) * 注意事项 * 无* file_file_create_if_non_exist * 功能 * 检查文件及其根目录是否存在 * 若不存在则创建 * 拓展名可缺省 * 用法 * file_file_create_if_non_exist(根目录路径, 文件名, 文件拓展名) * 注意事项 * 无* file_list * 功能 * 给定路径以及文件拓展名 * 返回一个含有该目录下指定拓展名的文件的列表 * 当文件拓展名参数被缺省时 * 将返回一个含有该路径下所有的文件以及文件夹的列表 * 用法 * file_list(路径) * 注意事项 * 无* file_file_exist * 功能 * 检查一个文件是否存在 * 若不存在则返回False * 存在则返回True * 用法 * file_file_exist(文件路径) * 注意事项 * 无* xlsx_open * 功能 * 给定一个xlsx的路径将其打开 * 以一个变量返回该文件 * 用法 * xlsx_open(文件路径) * 注意事项 * 无* xlsx_open_sheet * 功能 * 给定一个xlsx * 打开其中的工作表 * 若参数sheetname(第二项)缺省,则列出可选内容 * 用法 * xlsx_open_sheet(工作簿, 工作表名称(可缺省)) * 注意事项 * 无* mouse_click_middle * 功能 * 移动光标到指定坐标并中键单击 * 给定两个参数,分别是目标坐标的横纵坐标值 * 用法 * mouse_click_middle(目标横坐标,目标纵坐标) * 注意事项 * 可能需要系统较高权限才对某些程序有效* keyboard_type_string * 功能 * 给定一个字符串,模拟键盘输入 * 第二项参数是字符间时间间隔,单位为秒,缺省则默认为0 * 用法 * keyboard_type_string(要模拟输入的字符串, 字符间时间间隔(可缺省,默认为0)) * 注意事项 * 可能需要系统较高权限才对某些程序有效* keyboard_press * 功能 * 给定一个按键名或者包含多个按键名的列表 * 模拟键盘按键并自动松开 * 用法 * keyboard_press(一个按键名或者包含多个按键名的列表) * 注意事项 * 可能需要系统较高权限才对某些程序有效 * 按键名称应遵循《键盘按键名称表》* keyboard_down * 功能 * 给定一个按键名 * 模拟键盘按下 * 用法 * keyboard_down(一个按键名) * 注意事项 * 可能需要系统较高权限才对某些程序有效 * 按键名应在字符串内 * 按键名称应遵循《键盘按键名称表》* keyboard_up * 功能 * 给定一个按键名 * 模拟键盘松开 * 用法 * keyboard_up(一个按键名) * 注意事项 * 可能需要系统较高权限才对某些程序有效 * 按键名应在字符串内 * 按键名称应遵循《键盘按键名称表》* keyboard_hotkey * 功能 * 给定按键名(不定项),以半角逗号分隔 * 模拟键盘热键 * 用法 * keyboard_hotkey(按键1,按键2,······,按键n) * 注意事项 * 可能需要系统较高权限才对某些程序有效 * 按键名应在字符串内 * 按键名称应遵循《键盘按键名称表》* 键盘按键名称表 * \t, \n, \r, , !, ", #, $, %, &, "", (, ), *, +, ,, -, ., /, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, :, ;, <, =, >, ?, @, [, \\, ], ^, _, `, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, {, |, }, ~, accept, add, alt, altleft, altright, apps, backspace, browserback, browserfavorites, browserforward, browserhome, browserrefresh, browsersearch, browserstop, capslock, clear, convert, ctrl, ctrlleft, ctrlright, decimal, del, delete, divide, down, end, enter, esc, escape, execute, f1, f10, f11, f12, f13, f14, f15, f16, f17, f18, f19, f2, f20, f21, f22, f23, f24, f3, f4, f5, f6, f7, f8, f9, final, fn, hanguel, hangul, hanja, help, home, insert, junja, kana, kanji, launchapp1, launchapp2, launchmail, launchmediaselect, left, modechange, multiply, nexttrack, nonconvert, num0, num1, num2, num3, num4, num5, num6, num7, num8, num9, numlock, pagedown, pageup, pause, pgdn, pgup, playpause, prevtrack, print, printscreen, prntscrn, prtsc, prtscr, return, right, scrolllock, select, separator, shift, shiftleft, shiftright, sleep, space, stop, subtract, tab, up, volumedown, volumemute, volumeup, win, winleft, winright, yen, command, option, optionleft, optionright* window_delete_button_close * 功能 * 删除本窗口的关闭按钮 * 用法 * window_delete_button_close() * 注意事项 * 每次运行应只使用一次* window_delete_button_max * 功能 * 删除本窗口的最大化按钮 * 用法 * window_delete_button_max() * 注意事项 * 每次运行应只使用一次* window_delete_button_min * 功能 * 删除本窗口的最小化按钮 * 用法 * window_delete_button_min() * 注意事项 * 每次运行应只使用一次* window_delete_size * 功能 * 删除本窗口的大小拖动功能 * 用法 * window_delete_size() * 注意事项 * 每次运行应只使用一次* window_set_title * 功能 * 设置本窗口的窗口标题 * 用法 * window_set_title(要设置的窗口标题) * 注意事项 * 无* path_user * 功能 * 在Windows操作系统下,返回用户主目录路径 * 用法 * path_user(参数缺省) * 注意事项 * 这在其他操作系统上无法工作* path_documents * 功能 * 在Windows操作系统下,返回用户文档目录路径 * 用法 * path_documents(参数缺省) * 注意事项 * 这在其他操作系统上无法工作* path_downloads * 功能 * 在Windows操作系统下,返回用户下载目录路径 * 用法 * path_downloads(参数缺省) * 注意事项 * 这在其他操作系统上无法工作* path_pictures * 功能 * 在Windows操作系统下,返回用户图片目录路径 * 用法 * path_pictures(参数缺省) * 注意事项 * 这在其他操作系统上无法工作* path_videos * 功能 * 在Windows操作系统下,返回用户视频目录路径 * 用法 * path_videos(参数缺省) * 注意事项 * 这在其他操作系统上无法工作* path_music * 功能 * 在Windows操作系统下,返回用户音乐目录路径 * 用法 * path_music(参数缺省) * 注意事项 * 这在其他操作系统上无法工作* path_favorites * 功能 * 在Windows操作系统下,返回用户收藏目录路径 * 用法 * path_favorites(参数缺省) * 注意事项 * 这在其他操作系统上无法工作* img_read * 功能 * 给定图片的路径,返回带有图片的变量 * 用法 * img_read(图片路径) * 注意事项 * 图片路径必须不含中文字符* img_gray * 功能 * 给定一张图片,返回转化为灰度图片的该图的变量 * 用法 * img_gray(图片变量) * 注意事项 * 无* img_display * 功能 * 给定一张图片,然后显示 * 用法 * img_display(图片变量, 窗口的标题,缺省则为空, 等待键盘输入以关闭窗口的时间, 单位:秒,缺省则为0,意为无限等待, 执行完成后是否自动关闭窗口,默认为1,意为关闭,0则不关闭) * 注意事项 * 窗口标题必须不含中文字符* img_resize * 功能 * 给定一张图片,转换的目标宽高,返回改变长宽后的图片 * 用法 * img_resize(图片变量, 目标宽度, 目标高度) * 注意事项 * 无* time_lunar_now_get * 功能 * 给定一个时间精度参数(形如:年月日),若参数以“中”开头则返回中文日期 * 返回当前日期下的农历日期 * 精度参数缺省则为数字日期 * 用法 * time_lunar_now_get(时间精度(缺省则返回数字日期)) * 注意事项 * 仅支持公历范围1900-2100年* time_lunar_from_solar * 功能 * 给定一个时间精度参数(形如:年月日),若精度参数以“中”开头则返回中文日期,以及公历年月日 * 返回给定的公历日期对应的农历日期 * 精度参数缺省则为数字日期 * 用法 * time_lunar_from_solar(公历日期年份, 公历日期月份, 公历日期日, 时间精度(缺省则返回数字日期)) * 注意事项 * 仅支持公历范围1900-2100年* time_lunar_now_get_animal * 功能 * 获取当前农历日期对应的的属相 * 用法 * time_lunar_now_get_animal(参数缺省) * 注意事项 * 仅支持公历范围1900-2100年* time_lunar_from_solar_animal * 功能 * 给定一个公历日期,返回对应农历日期对应的的属相 * 用法 * time_lunar_from_solar_animal(公历日期年份, 公历日期月份, 公历日期日) * 注意事项 * 仅支持公历范围1900-2100年* time_lunar_to_solar * 功能 * 给定一个农历日期,返回对应公历日期 * 用法 * time_lunar_from_solar_animal(农历日期年份, 农历日期月份, 农历日期日) * 注意事项 * 仅支持公历范围1900-2100年* debug_error_notice * 功能 * 给定错误来源和错误提示内容,将给予相应提示 * 返回错误信息字符串,仅在印屏幕参数为0或2时生效 * 用法 * debug_error_notice(错误来源,仅在passage参数不为空时允许缺省, 错误提示内容,仅在passage参数不为空时允许缺省, 错误提示的头部文字,若缺省则使用DEBUG功能的默认头部‍,且此时参数source、text不允许缺省, 是否输出为印屏幕,1为是,0为否,若缺省则印屏幕,2为印屏幕同时返回,否则返回为字符串) * 注意事项 * 无* password_get * 功能 * 给定一个提示信息,程序将提供密码输入栏 * 用户输入回车标定为密码输入完成 * 用户输入退格删除一个字符 * 用户输入Esc清空密码栏 * 返回用户确认完成的密码 * 用法 * password_get(密码提示信息) * 注意事项 * 无* system_type_get * 功能 * 参数缺省 * 返回操作系统的类型 * 在Windows平台下返回"Windows" * 在Linux平台下返回"Linux" * 在MacOS平台下返回"MacOS" * 在其他平台下返回"Other" * 用法 * system_type_get(参数缺省) * 注意事项 * 无* system_type_detail_get * 功能 * 参数缺省 * 返回具体操作系统的类型 * 用法 * system_type_detail_get(参数缺省) * 注意事项 * 无* tool_shutdown_computer * 功能 * 给定一个时间,单位为分钟,将在该时间后关闭计算机,若缺省则为0 * 仅在遇到不支持的操作系统时返回提示信息 * 用法 * tool_shutdown_computer(剩余关机时间,若缺省则为0) * 注意事项 * 目前仅支持Windows、Linux、MacOSCopyright © zxcglf 2021-2022
zx_core_backend
Failed to fetch description. HTTP Status Code: 404
zxcv
Guess A Python package to play tic tac toeUsage A Python package to play tic tac toe
zxcvb
Failed to fetch description. HTTP Status Code: 404
zxcvbn
zxcvbnA realistic password strength estimator.This is a Python implementation of the library created by the team at Dropbox. The original library, written for JavaScript, can be foundhere.While there may be other Python ports available, this one is the most up to date and is recommended by the original developers of zxcvbn at this time.FeaturesTested in Python versions 2.7, 3.3-3.6Accepts user data to be added to the dictionaries that are tested against (name, birthdate, etc)Gives a score to the password, from 0 (terrible) to 4 (great)Provides feedback on the password and ways to improve itReturns time estimates on how long it would take to guess the password in different situationsInstallationInstall the package using pip:pip install zxcvbnUsagePass a password as the first parameter, and a list of user-provided inputs as theuser_inputsparameter (optional).fromzxcvbnimportzxcvbnresults=zxcvbn('JohnSmith123',user_inputs=['John','Smith'])print(results)Output:{ 'password': 'JohnSmith123', 'score': 2, 'guesses': 2567800, 'guesses_log10': 6.409561194521849, 'calc_time': datetime.timedelta(0, 0, 5204) 'feedback': { 'warning': '', 'suggestions': [ 'Add another word or two. Uncommon words are better.', "Capitalization doesn't help very much" ] }, 'crack_times_display': { 'offline_fast_hashing_1e10_per_second': 'less than a second' 'offline_slow_hashing_1e4_per_second': '4 minutes', 'online_no_throttling_10_per_second': '3 days', 'online_throttling_100_per_hour': '3 years', }, 'crack_times_seconds': { 'offline_fast_hashing_1e10_per_second': 0.00025678, 'offline_slow_hashing_1e4_per_second': 256.78 'online_no_throttling_10_per_second': 256780.0, 'online_throttling_100_per_hour': 92440800.0, }, 'sequence': [{ 'matched_word': 'john', 'rank': 2, 'pattern': 'dictionary', 'reversed': False, 'token': 'John', 'l33t': False, 'uppercase_variations': 2, 'i': 0, 'guesses': 50, 'l33t_variations': 1, 'dictionary_name': 'male_names', 'base_guesses': 2, 'guesses_log10': 1.6989700043360185, 'j': 3 }, { 'matched_word': 'smith123', 'rank': 12789, 'pattern': 'dictionary', 'reversed': False, 'token': 'Smith123', 'l33t': False, 'uppercase_variations': 2, 'i': 4, 'guesses': 25578, 'l33t_variations': 1, 'dictionary_name': 'passwords', 'base_guesses': 12789, 'guesses_log10': 4.407866583030775, 'j': 11 }], }Custom Ranked DictionariesIn order to support more languages or just add password dictionaries of your own, there is a helper function you may use.fromzxcvbn.matchingimportadd_frequency_listsadd_frequency_lists({'my_list':['foo','bar'],'another_list':['baz']})These lists will be added to the current ones, but you can also overwrite the current ones if you wish. The lists you add should be in order of how common the word is used with the most common words appearing first.CLIYou an also use zxcvbn from the command line:echo 'password' | zxcvbn --user-input <user-input> | jqYou can also execute the zxcvbn module:echo 'password' | python -m zxcvbn --user-input <user-input> | jqContributeReport an Issue:https://github.com/dwolfhub/zxcvbn-python/issuesSubmit a Pull Request:https://github.com/dwolfhub/zxcvbn-python/pullsLicenseThe project is licensed under the MIT license.
zxcvbn-covert
zxcvbnA realistic password strength estimator.This is a Python implementation of the library created by the team at Dropbox. The original library, written for JavaScript, can be foundhere.While there may be other Python ports available, this one is the most up to date and is recommended by the original developers of zxcvbn at this time.FeaturesTested in Python versions 3.6-3.9For python 2 support, please use zxcvbn<5Accepts user data to be added to the dictionaries that are tested against (name, birthdate, etc)Gives a score to the password, from 0 (terrible) to 4 (great)Provides feedback on the password and ways to improve itReturns time estimates on how long it would take to guess the password in different situationsInstallationInstall the package using pip:pip install zxcvbnUsagePass a password as the first parameter, and a list of user-provided inputs as theuser_inputsparameter (optional).fromzxcvbnimportzxcvbnresults=zxcvbn('JohnSmith123',user_inputs=['John','Smith'])print(results)Output:{ 'password': 'JohnSmith123', 'score': 2, 'guesses': 2567800, 'guesses_log10': 6.409561194521849, 'calc_time': datetime.timedelta(0, 0, 5204) 'feedback': { 'warning': '', 'suggestions': [ 'Add another word or two. Uncommon words are better.', "Capitalization doesn't help very much" ] }, 'crack_times_display': { 'offline_fast_hashing_1e10_per_second': 'less than a second' 'offline_slow_hashing_1e4_per_second': '4 minutes', 'online_no_throttling_10_per_second': '3 days', 'online_throttling_100_per_hour': '3 years', }, 'crack_times_seconds': { 'offline_fast_hashing_1e10_per_second': 0.00025678, 'offline_slow_hashing_1e4_per_second': 256.78 'online_no_throttling_10_per_second': 256780.0, 'online_throttling_100_per_hour': 92440800.0, }, 'sequence': [{ 'matched_word': 'john', 'rank': 2, 'pattern': 'dictionary', 'reversed': False, 'token': 'John', 'l33t': False, 'uppercase_variations': 2, 'i': 0, 'guesses': 50, 'l33t_variations': 1, 'dictionary_name': 'male_names', 'base_guesses': 2, 'guesses_log10': 1.6989700043360185, 'j': 3 }, { 'matched_word': 'smith123', 'rank': 12789, 'pattern': 'dictionary', 'reversed': False, 'token': 'Smith123', 'l33t': False, 'uppercase_variations': 2, 'i': 4, 'guesses': 25578, 'l33t_variations': 1, 'dictionary_name': 'passwords', 'base_guesses': 12789, 'guesses_log10': 4.407866583030775, 'j': 11 }], }Custom Ranked DictionariesIn order to support more languages or just add password dictionaries of your own, there is a helper function you may use.fromzxcvbn.matchingimportadd_frequency_listsadd_frequency_lists({'my_list':['foo','bar'],'another_list':['baz']})These lists will be added to the current ones, but you can also overwrite the current ones if you wish. The lists you add should be in order of how common the word is used with the most common words appearing first.CLIYou an also use zxcvbn from the command line:echo 'password' | zxcvbn --user-input <user-input> | jqYou can also execute the zxcvbn module:echo 'password' | python -m zxcvbn --user-input <user-input> | jqContributeReport an Issue:https://github.com/dwolfhub/zxcvbn-python/issuesSubmit a Pull Request:https://github.com/dwolfhub/zxcvbn-python/pullsLicenseThe project is licensed under the MIT license.
zxcvbncpp
UNKNOWN
zxcvbn-dutch
This is a python port of zxcvbn, which is a JavaScript password strength generator. zxcvbn attempts to give sound password advice through pattern matching and conservative entropy calculations. It finds 10k common passwords, common American names and surnames, common English words, and common patterns like dates, repeats (aaa), sequences (abcd), and QWERTY patterns.All the hard work on the Python port been done by Ryan Pearl, in his original python-zxcvbn package. This version adds a Dutch word list.Please refer tohttp://tech.dropbox.com/?p=165for the full details and motivation behind zxcbvn. The source code for the original JavaScript (well, actually CoffeeScript) implementation can be found at:https://github.com/lowe/zxcvbnFor full motivation, see:http://tech.dropbox.com/?p=165InstallThis project is available from PyPI as zxcvbn-dutch:https://pypi.python.org/pypi/zxcvbn-dutchYou can install it with:pip install zxcvbn-dutchIf you haven an existing Python version of zxcvbn installed, it is recommended to uninstall it before installing zxcvbn-dutch.UseThe zxcvbn module exports the password_strength() function. Import zxcvbn, and call password_strength(password, user_inputs=[]). The function will return a result dictionary with the following keys:entropy # bitscrack_time # estimation of actual crack time, in seconds.crack_time_display # same crack time, as a friendlier string:# “instant”, “6 minutes”, “centuries”, etc.score # [0,1,2,3,4] if crack time is less than# [10**2, 10**4, 10**6, 10**8, Infinity]. # (useful for implementing a strength bar.)match_sequence # the list of patterns that zxcvbn based the# entropy calculation on.calculation_time # how long it took to calculate an answer,# in milliseconds. usually only a few ms.The optional user_inputs argument is an array of strings that zxcvbn will add to its internal dictionary. This can be whatever list of strings you like, but is meant for user inputs from other fields of the form, like name and email. That way a password that includes the user’s personal info can be heavily penalized. This list is also good for site-specific vocabulary.Bug reports and pull requests welcome!AcknowledgmentsDropbox, thank you again for supporting independent projects both inside and outside of hackweek.Thanks to Dan Wheeler (https://github.com/lowe) for the CoffeeScript implementation (see above.) To repeat his outside acknowledgements (which remain useful, as always):Many thanks to Mark Burnett for releasing his 10k top passwords list:http://xato.net/passwords/more-top-worst-passwordsand for his 2006 book, “Perfect Passwords: Selection, Protection, Authentication”Huge thanks to Wiktionary contributors for building a frequency list of English as used in television and movies:http://en.wiktionary.org/wiki/Wiktionary:Frequency_listsMany thanks to the University of Leipzig for releasing their Dutch word lists:http://wortschatz.uni-leipzig.de/html/sitemap.htmlLast but not least, big thanks to xkcd :)https://xkcd.com/936/
zxcvbn-py3
UNKNOWN
zxcvbn-python
DEPRECATION WARNINGThis package has been moved! Please install usingpip install zxcvbn.https://pypi.python.org/pypi/zxcvbnzxcvbn-pythonA realistic password strength estimator.This is a Python implementation of the library created by the team at Dropbox. The original library, written for JavaScript, can be foundhere.While there may be other Python ports available, this one is the most up to date and is recommended by the original developers of zxcvbn at this time.FeaturesTested in Python versions 2.6-2.7, 3.3-3.6Accepts user data to be added to the dictionaries that are tested against (name, birthdate, etc)Gives a score to the password, from 0 (terrible) to 4 (great)Provides feedback on the password and ways to improve itReturns time estimates on how long it would take to guess the password in different situationsInstallationInstall the package using pip:pip installzxcvbn-pythonUsagePass a password as the first parameter, and a list of user-provided inputs as theuser_inputsparameter (optional).fromzxcvbnimportzxcvbnresults=zxcvbn('JohnSmith123',user_inputs=['John','Smith'])print(results)Output:{ 'password': 'JohnSmith123', 'score': 2, 'guesses': 2567800, 'guesses_log10': 6.409561194521849, 'calc_time': datetime.timedelta(0, 0, 5204) 'feedback': { 'warning': '', 'suggestions': [ 'Add another word or two. Uncommon words are better.', "Capitalization doesn't help very much" ] }, 'crack_times_display': { 'offline_fast_hashing_1e10_per_second': 'less than a second' 'offline_slow_hashing_1e4_per_second': '4 minutes', 'online_no_throttling_10_per_second': '3 days', 'online_throttling_100_per_hour': '3 years', }, 'crack_times_seconds': { 'offline_fast_hashing_1e10_per_second': 0.00025678, 'offline_slow_hashing_1e4_per_second': 256.78 'online_no_throttling_10_per_second': 256780.0, 'online_throttling_100_per_hour': 92440800.0, }, 'sequence': [{ 'matched_word': 'john', 'rank': 2, 'pattern': 'dictionary', 'reversed': False, 'token': 'John', 'l33t': False, 'uppercase_variations': 2, 'i': 0, 'guesses': 50, 'l33t_variations': 1, 'dictionary_name': 'male_names', 'base_guesses': 2, 'guesses_log10': 1.6989700043360185, 'j': 3 }, { 'matched_word': 'smith123', 'rank': 12789, 'pattern': 'dictionary', 'reversed': False, 'token': 'Smith123', 'l33t': False, 'uppercase_variations': 2, 'i': 4, 'guesses': 25578, 'l33t_variations': 1, 'dictionary_name': 'passwords', 'base_guesses': 12789, 'guesses_log10': 4.407866583030775, 'j': 11 }], }Custom Ranked DictionariesIn order to support more languages or just add password dictionaries of your own, there is a helper function you may use.fromzxcvbn.matchingimportadd_frequency_listsadd_frequency_lists({'my_list':['foo','bar'],'another_list':['baz']})These lists will be added to the current ones, but you can also overwrite the current ones if you wish. The lists you add should be in order of how common the word is used with the most common words appearing first.CLIYou an also use zxcvbn from the command line:echo 'password' | zxcvbn --user-input <user-input> | jqYou can also execute the zxcvbn module:echo 'password' | python -m zxcvbn --user-input <user-input> | jqContributeReport an Issue:https://github.com/dwolfhub/zxcvbn-python/issuesSubmit a Pull Request:https://github.com/dwolfhub/zxcvbn-python/pullsLicenseThe project is licensed under the MIT license.
zxcvbn-rs-py
zxcvbn-rs-pyPython bindings forzxcvbn-rs, the Rust implementation of zxcvbnDocumentation:https://fief-dev.github.io/zxcvbn-rs-py/Source Code:https://github.com/fief-dev/zxcvbn-rs-pyInstallationpipinstallzxcvbn-rs-pyQuickstartfromzxcvbn_rs_pyimportzxcvbnr=zxcvbn("correcthorsebatterystaple")print(r.score)BenchmarkThanks to its Rust core, zxcvbn-rs-py is~5 times fasterthan the pure Python implementation,zxcvbn-python.Serve the documentationYou can serve the Mkdocs documentation with:hatchrundocs-serveIt'll automatically watch for changes in your code.LicenseThis project is licensed under the terms of the MIT license.
zxdnester
UNKNOWN
zxext
zxext智学网的补充库收录了一些智学网库里比较冷门的函数。一个版本仅对应一个智学网的版本!对应关系zxext版本对应zhixuewang版本0.1.0-0.1.11.1.12支持的功能练习本功能(workbook)问题和建议如果您在使用的过程中遇到任何问题,欢迎前往Issue提问 当然也可以加入这个QQ群讨论:862767072(备注:智学网扩展)示例fromzxext.workbookimportWorkbook# 导入练习本fromzhixuewangimport*# 导入核心库teacher=login("114514","1919810")wb=Workbook(teacher.get_session())print(wb.search_press("人教"))# >> 272贡献建议优先提交给zhixuewang库,除非是部分比较不常用的功能。
zx-forecasting-framework
###Description of the project A Python package to enable quick iterative time series analysis, modelling and forecasting using combinations of automatic transformations, differencing and forecasting models.Installationpip install zx_forecasting_frameworkExamplefrom zx_forecasting_framework import Analyse from zx_forecasting_framework import Metrics from zx_forecasting_framework import Model from zx_forecasting_framework import TimeSeriesObject from zx_forecasting_framework import TransformLicenseZX Forecasting Framework is licensed underthe MIT License
zxftools
No description available on PyPI.
zxgraphs
ZX graphs are a graph-theoretic tool to represent quantum circuits and computations in terms of computational basis (Z basis) and Fourier basis (X basis) tensors (known to us as “spiders”) for finite Abelian group algebras. They are closely related to the original qubit ZX calculus[1][2]and recent developments in higher-dimensional variants[3][4].[1]Bob Coecke and Ross Duncan,“Interacting Quantum Observables: Categorical Algebra and Diagrammatics”, 2009.arXiv:0906.4725[2]Aleks Kissinger and John van de Wetering,“PyZX: Large Scale Automated Diagrammatic Reasoning”, 2020.arXiv:1904.04735,pyzx on GitHub[3]John van de Wetering and Lia Yeh,“Phase gadget compilation for diagonal qutrit gates”, 2022.arXiv:2204.13681[4]Robert I. Booth and Titouan Carette,“Complete ZX-calculi for the stabiliser fragment in odd prime dimensions”, 2022.arXiv:2204.12531ContentsInstallUsageAPIContributingLicenseInstallZX graphs are currently in pre-alpha development. Once development is complete, you will be able to install the latest release fromPyPIas follows:$pipinstall--upgradezxgraphsUsageZX graphs are currently in pre-alpha development.APIZX graphs are currently in pre-alpha development. Once development is complete, the full API documentation will be available athttps://zxgraphs.readthedocs.io/ContributingPlease seeCONTRIBUTING.md.LicenseLGPL (c) Hashberg Ltd.
zxhtom
No description available on PyPI.
zxing
python-zxingThis is a wrapper for theZXing barcode library. It will allow you to read and decode barcode images from Python.It was originally a "slightly less quick-and-dirty" fork ofoostendo/python-zxing, but has since evolved considerably beyond that ancestral package.Dependencies and installationUse the Python 3 version of pip (usually invoked viapip3) to install:pip3 install zxingYou'll neeed to have a recentjavabinary somewhere in your path. (Tested with OpenJDK v7, v8, v11.)pip will automatically download the relevantJARfiles for the Java ZXing libraries (currently v3.5.1)UsageTheBarCodeReaderclass is used to decode images:>>>importzxing>>>reader=zxing.BarCodeReader()>>>print(reader.zxing_version,reader.zxing_version_info)3.5.1(3,5,1)>>>barcode=reader.decode("test/barcodes/QR_CODE-easy.png")>>>print(barcode)BarCode(raw='This should be QR_CODE',parsed='This should be QR_CODE',path='test/barcodes/QR_CODE-easy.png',format='QR_CODE',type='TEXT',points=[(15.0,87.0),(15.0,15.0),(87.0,15.0),(75.0,75.0)])The attributes of the decodedBarCodeobject areraw,parsed,path,format,type, andpoints. The list of formats which ZXing can decode ishere.Thedecode()method accepts an image path orPIL Image object(or list thereof) and takes optional parameterstry_harder(boolean),possible_formats(list of formats to consider), andpure_barcode(boolean). If no barcode is found, it returns aFalse-yBarCodeobject with all fields exceptpathset toNone. If it encounters any other recognizable error from the Java ZXing library, it raisesBarCodeReaderException.Command-line interfaceThe command-line interface can decode images into barcodes and output in either a human-readable or CSV format:usage: zxing [-h] [-c] [--try-harder] [--pure-barcode] [-V] image [image ...]Human-readable:$zxing/tmp/barcode.png /tmp/barcode.png================DecodedTEXTbarcodeinQR_CODEformat.Rawtext:'Testing 123'Parsedtext:'Testing 123'CSV output (can be opened by LibreOffice or Excel):$zxing/tmp/barcode1.png/tmp/barcode2.png/tmp/barcode3.png Filename,Format,Type,Raw,Parsed /tmp/barcode1.png,CODE_128,TEXT,Testing123,Testing123/tmp/barcode2.png,QR_CODE,URI,http://zxing.org,http://zxing.org /tmp/barcode3.png,QR_CODE,TEXT,"This text, ""Has stuff in it!"" Wow⏎Yes it does!","This text, ""Has stuff in it!"" Wow⏎Yes it does!"LicenseLGPLv3
zxing-cpp
Python bindings for zxing-cppInstallationpipinstallzxing-cpporpythonsetup.pyinstall[Note: To install viasetup.py(or viapip installin case there is no pre-build wheel available for your platfor or python version), you need a suitablebuild environmentincluding a c++ compiler.]Usageimportcv2,zxingcppimg=cv2.imread('test.png')results=zxingcpp.read_barcodes(img)forresultinresults:print('Found barcode:'f'\nText: "{result.text}"'f'\nFormat:{result.format}'f'\nContent:{result.content_type}'f'\nPosition:{result.position}')iflen(results)==0:print("Could not find any barcode.")To get a full list of available parameters forread_barcodesandwrite_barcodeas well as the properties of the result objects, have a look at thePYBIND11_MODULEdefinition inthis c++ source file.
zxinglight
A simple wrapper forZXing C++inspired byzbarlight.Documentation is available on <https://zxinglight.readthedocs.io/en/latest/>.
zxingmod
More information:https://github.com/dlenski/python-zxing
zxing-tkinter-utils
目标用tkinter开发小型桌面应用。App类一个窗口,有一些预设值:大小不可改变。窗口位置居中。字体大小为16。place方法推荐使用tkinter的place布局,宽高坐标都是写死的。我简化了一下调用方式。# 之前xxx.place(x=0,y=0,width=100,height=100)# 之后place(xxx,0,0,100,100)
zxinvoice
####################### Q&A ########################一、打开终端,运行以下命令行: pip install --upgrade pip pip install chinesecalendar pip install baidu-aip pip install chardet pip install pywebio二、Mac 安装Python库 pysqlcipher3 brew install sqlcipher pip install pysqlcipher3三、解压文件,终端命令行进入项目根目录 cd 项目根目录 nohup python main.py > run.log 2>&1 &####################### Q&A ########################一、 MAC 安装brew 如果命令行提示没有安装brew,运行以下命令: /bin/zsh -c "$(curl -fsSLhttps://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"二、MAC 安装pysqlcipher3库过程中提示:undefined method `cellar' for 解决方法 cd /usr/local/Homebrew/Library/Taps/homebrew/ rm -rf homebrew-core git clonehttps://github.com/Homebrew/homebrew-core.git
zxj-env
Failed to fetch description. HTTP Status Code: 404
zxj-test-pengym
Failed to fetch description. HTTP Status Code: 404
zxkane.cdk-construct-simple-nat
Simple NATIt's a CDK construct to create NAT instances on AWS.It supports adding specific IP CIDRs to route tables of VPC, the network traffic to those IP CIDRs will be forwarded to the NAT instances.It supports routing to below services out of box,Github git serversGoogleCloudflareInstallTypeScript/JavaScript:yarnaddcdk-construct-simple-natornpminstallcdk-construct-simple-natUsageimport{SimpleNAT}from'cdk-construct-simple-nat';newSimpleNAT(this,'SimpleNAT',{vpc,natSubnetsSelection:{subnetType:SubnetType.PUBLIC,onePerAz:true,},}).withGithubRoute();See the completeexampleandAPI doc.FAQWhat's the difference betweenEC2 NAT instancesand NAT instances created by this constructThere are below differences,EC2 NAT instance will route all Internet traffic to itself by defaultNAT instance uses depracated Amazon Linux AMI, this construct always uses latest Amazon Linux 2 AMINAT instances created by this construct can work with NAT gateways together, you can have multiple NAT instances in one VPCThis construct can help when only routing specific traffic(for example, github/gist) to NAT instances which acts as transit proxyWhat's the difference betweenCDK built-in NAT instancesand NAT instances created by this constructCDK built-in NAT instances has to be created with VPC stack, this construct can add NAT instances to any existing VPCYou can use this construct multiple NAT instances for different purposesThis construct allows you customize the instances how to route the trafficThe deployment fails due to the routes in route table exceeds the limitThe default routes in route table is 50, the deployment will fail if adding routes more than the limit of your account. You can increase the limit up to1000routes per route table via service quota.How to exclude IPv6 CIDR with built-in github/google/cloudflare routesYou can exclude IPv6 CIDR like below,newSimpleNAT(this,'SimpleNAT',{vpc,}).withCloudflareRoute({excludeIPv6:true,});
zxl
No description available on PyPI.
zxlive
TheZX-calculusgives us a handy way to represent and work with quantum computations. ZXLive is an interactive tool for working with ZX. Draw graphs or load circuits and apply ZX rules. Intended for experimenting, building proofs, helping to write papers, showing off, or simply learning about ZX and quantum computing. It is powered by thepyzxopen source library under the hood.This project is in a pretty early stage, with lots more to come. Have a look at theIssue Trackerto see what's in the pipeline.InstructionsTo install from source, you need Python >= 3.9 and pip. If you have those, just run:git clone https://github.com/Quantomatic/zxlive.git cd zxlive pip install .Then, you can run ZXLive by typingpython3 -m zxlive.
zxmtools
No description available on PyPI.
zx-openmc
This is a solution to the OpenMC benchmark😊😊😊
zxotest
UNKNOWN
zxpath
No description available on PyPI.
zxpath2
操作更方便的xpath使用方法类似于Beautiful Soup4, 但是比他更快速, 功能更强大importzxpath2deffind(name=None,class_=None,text=None,deep=True,index:Noneorint=None,**attrs):'''查询节点:param name: 元素名, 如果不是str类型则查找所有元素:param class_: class属性:param text: 文本值:param deep: 是否深度查询孙节点:param index: 取出第几个结果:param attrs: 匹配元素的属性值, 属性值为True, 表示存在该属性的元素, 属性名前加下划线_表示否定, 如_id=True表示不存在id的元素, _id='t1'表示id不是t1的元素:return: index为整数时: 成功返回Element对象, 失败返回None, index为其他:返回包含_Element对象的列表'''passzx=zxpath2.load('etree对象或者html源码')#加载zx.find('div',id='content')#查询id为'content'的所有div, 返回包含_Element对象的列表zx.find('div',id=False,index=0)#查询不存在id的第一个div, 返回_Element对象zx.find('div',_id='content',deep=False)#在当前节点中查询id不为'content'的所有div, 返回包含_Element对象的列表zx.find('div',id='content',index=-1)#查询id为'content'的最后一个div, 返回_Element对象zx('div',id='content')#_Element对象可以作为函数名直接调用findElement对象属性属性名返回类型描述namestr返回元素节点的标签名, 如 a, div, h1, p, span等baseetree._Element对象返回原始的etree._Elementidint返回base的id值is_elementbool返回是否为一个element节点, 始终返回Trueis_node_elementbool返回是否为一个元素节点, 始终返回Trueis_text_elementbool返回是否为一个文本节点, 始终返回Falseis_commentbool返回当前节点是否为注释节点stringstr返回当前节点下所有的文本连接在一起的字符串, 没有文本返回空字符串textstr返回当前节点下的第一个文本, 没有文本返回空字符串tailstr返回当前节点的尾巴文本, 没有文本返回空字符串htmlstr将当前节点序列化为html源码attrsdict获取当前节点的所有属性pre返回当前节点的之前的一个同级对象, 没有时返回NonepresElement_List返回当前节点之前的所有同级对象, 没有时返回空列表pre_node返回当前节点的之前的一个同级元素节点, 没有时返回Nonepres_nodeElement_List返回当前节点之前的所有同级元素节点, 没有时返回空列表next返回当前节点的之后的一个同级对象, 没有时返回NonenextsElement_List返回当前节点之后的所有同级对象, 没有时返回空列表next_node返回当前节点的之后的一个同级元素节点, 没有时返回Nonenexts_nodeElement_List返回当前节点之后的所有同级元素节点, 没有时返回空列表child返回当前节点的第一个子对象, 没有时返回NonechildsElement_List返回当前节点的所有子对象, 没有时返回空列表child_node返回当前节点的第一个子元素节点, 没有时返回Nonechilds_nodeElement_List返回当前节点的所有子元素节点, 没有时返回空列表parentElement返回当前节点的父节点, 没有时返回NoneancestorElement返回当前节点的第一个父辈, 没有时返回NoneancestorsElement_List返回当前节点的所有父辈, 没有时返回空列表Element.xpath方法使用原生xpath代码查询参数名数据类型默认值描述codestr原生xpath代码, 如 //div/a, //div/h1/text()indexNoneintNoneNone: 返回一个列表, 包含所有符合条件的节点int: 返回指定位置(从0开始)的一个节点, 索引是安全的, 不存在的索引返回NoneElement.css方法使用原生css代码查询参数名数据类型默认值描述codestr原生css代码, 如 .class1, div>aindexNoneintNoneNone: 返回一个列表, 包含所有符合条件的节点int: 返回指定位置(从0开始)的一个节点, 索引是安全的, 不存在的索引返回NoneElement.child_in方法接收一个参数, 返回当前节点是否为传入对象的子节点Element.remove_attr方法从节点中删除当前节点的某一个属性, 无此属性则忽略Element.remove_all_attr方法删除当前节点的所有属性Element.remove_self方法从节点树中删除当前节点Element.remove方法接收一个参数, 从节点树中删除当前节点的一个子节点, 如果传入的对象不是当前节点的子节点会报错, 不能删除文本节点Element.change_text方法修改当前节点的主要文本Element.change_tail方法修改当前节点的尾巴文本Element.find方法查询当前节点下的对象参数名数据类型默认值描述namestrNone要查找的对象名, 表示html中的标签名, 如div,a,li, 如果设为None或空字符串表示查询所有对象class_strNone要查找元素的类名None: 不关心classTrue: 任何存在class属性的元素False: 不存在class属性的元素str: class属性为指定字符串的元素textstrNone要查找对象的文本值None: 不关心文本True: 任何存在文本的元素False: 没有文本的元素str: 文本为指定字符串的元素deepboolTrue是否深度查询True: 遍历搜索当前节点下的所有对象False: 只搜索当前节点下的子对象indexintNoneNone: 返回一个列表, 包含所有符合条件的节点int: 返回指定位置(从0开始)的一个节点其他属性名str你也可以选择使用html的其他属性名, 如href, src, style等带前下划线的属性名str如果属性名之前带了下划线, 如 _class_, _text, _href, _src等, 表示搜索的元素的这个属性不为设置的值如 _text='123' 表示元素的文本不等于123, _src=True 表示元素没有src属性, 当然不推荐 _属性名=True这种方式, 你应该使用 属性名=FalseElement.其他查找方法这些方法的属性参考find方法方法名描述find_pre查找当前节点之前的同级对象find_pre_node查找当前节点之前的同级元素节点find_next查找当前节点之后的同级对象find_next_node查找当前节点之后的同级元素节点find_child查找当前节点的子对象find_child_node查找当前节点的子元素节点Element高级使用方法有一个html源码如下<div><aid="a1"class="c1">1</a><aid="a2">2</a><aclass="c1"></a><aclass="c4">4</a><bid='b5'class="c1">bbb</b></div>你可以使用如下代码查询zx=zxpath2.load('html源码')#加载html源码或一个经过lxml.etree编译的对象zx('div')# 直接将对象作为方法使用, 参数参考find方法zx.div# 遍历搜索当前节点中的第一个div元素node=zx.div.span.a# 链式查询第一个div中的第一个span中的第一个a元素node.href# 获取当前节点的href属性, 如果没有这个属性则返回Nonenode.class_# 获取class属性node['href']# 获取href属性, 如果没有这个属性则报错node['class']# 获取class属性nodeinzx# 判断两个对象是否指向Dom树中的同一个位置 或 node是否为zx的子孙节点node==zx# 判断两个对象是否指向Dom树中的同一个位置zx.find('a',id=True)# 查找存在id的a元素zx.find('a',id=False)# 查找不存在id的a元素zx.find(class_='c1')# 查找class为c1的任何元素zx.find('a',_class='c1',text=True)#查找class不为c1并且存在文本的a元素更新日志发布时间版本发布说明19-06-051.1.3紧急修复了一个bug, 如果html源码是紧凑型的, 参数method为html时获取源码会输出空的Dom树, 已将method参数改为xml19-06-051.1.2新增方法get_tail()用于获取节点的尾巴文本, 也可以使用tail属性获取remove_all_attr()用于删除当前对象的所有属性优化了节点类型判断方法,etree._ElementStringResult也被视为文本节点现在获取html源码允许用户设置输出格式, 默认为html. 允许用户选择是否输出尾巴文本, 默认不输出新增change_text(text: str)用于修改节点的主要文本新增change_tail(text: str)用于修改节点的尾巴文本19-04-031.1.1新增方法css(code, index: None or int = None), 现在可以使用css代码选择对象了新增方法remove_attr(key: str)用于删除当前对象的某个属性19-03-191.1.0取消__init__.py中的from . import xxx将下划线开始的模块名去掉下划线将所有搜索接口中的index重构, 不再将index解析为值传到原生xpath代码中, 仅作为字面意思从列表中提取第几个结果19-01-301.0.3现在_Element_List的str结果也被重载了现在可以用==判断两个_Element或列表是否相等修复了获取元素节点html时会将元素节点后面的文字也放入html的bug19-01-211.0.2重载了str()的结果现在可以用child_in判断是否为另一个_Element的子孙了可以使用in来判断一个_Element对象是否为另一个的子孙或和另个一对象相等19-01-181.0.1修复获取所有父辈节点时会报错的bug本项目仅供所有人学习交流使用, 禁止用于商业用途
zxpy
zxpyShell scripts made simple 🐚zxpy lets you seamlessly write shell commands inside Python code, to create readable and maintainable shell scripts.Inspired by Google'szx, but made much simpler and more accessible using Python.RationaleBash is cool, and it's extremely powerful when paired with linux coreutils and pipes. But apart from that, it's a whole another language to learn, and has a (comparatively) unintuitive syntax for things like conditionals and loops.zxpyaims to supercharge bash by allowing you to write scripts in Python, but with native support for bash commands and pipes.Let's use it to find allTODOs in one of my other projects, and format them into a table:#! /usr/bin/env zxpytodo_comments=~"git grep -n TODO"fortodointodo_comments.splitlines():filename,lineno,code=todo.split(':',2)*_,comment=code.partition('TODO')print(f"{filename:40}on line{lineno:4}:{comment.lstrip(': ')}")Running this, we get:$./todo_check.pyREADME.md on line 154 : move this content somewhere more sensible.instachat/lib/models/message.dart on line 7 : rename to uuidinstachat/lib/models/update.dart on line 13 : make intinstachat/lib/services/chat_service.dart on line 211 : error handlingserver/api/api.go on line 94 : move these to /chat/@:addressserver/api/user.go on line 80 : check for errors instead of relying on zero valueWriting something like this purely in bash or in Python would be much harder than this. Being able to use linux utilities seamlessly with a readable, general purpose language is what makes this a really powerful tool.A larger, practical exampleYou can find a comparison between a practical-ish script written in bash and zxpy inEXAMPLE.mdInstallationpip install zxpypipxIf you havepipxinstalled, you can try out zxpy without installing it, by running:pipx run zxpyBasic ExamplesMake a filescript.py(The name and extension can be anything):#! /usr/bin/env zxpy~'echo Hello world!'file_count=~'ls -1 | wc -l'print("file count is:",file_count)And then run it:$chmod+x./script.py$./script.pyHello world!file count is: 3Run>>> help('zx')in Python REPL to find out more ways to use zxpy.A slightly more involved example:run_all_tests.py#! /usr/bin/env zxpytest_files=(~"find -name '*_test\.py'").splitlines()forfilenameintest_files:try:print(f'Running{filename:.<50}',end='')output=~f'python{filename}'# variables in your shell commands :Dassertoutput==''print('Test passed!')except:print(f'Test failed.')Output:$./run_all_tests.py Running./tests/python_version_test.py....................Testfailed. Running./tests/platform_test.py..........................Testpassed! Running./tests/imports_test.py...........................Testpassed!More examples are inEXAMPLE.md, and in theexamples folder.stderrand return codesTo getstderrand return code information out of the shell command, there is an alternative way of invoking the shell.To use it, just use3 variableson the left side of your~'...'shell string:stdout,stderr,return_code=~'echo hi'print(stdout)# hiprint(return_code)# 0More examples are in theexamples folder.CLI ArgumentsWhen writing a shell script, you often want to pass CLI arguments to it.Like so:$cat./foo.shecho arg is: $1$./foo.sh123arg is: 123To do the same inzxpy, pass the script arguments after a--in thezxpyCLI command.#!/usr/bin/env zxpyimportsysprint("Argv is:",sys.argv)~"echo output: $1 $2 $3"$./test.pyArgv is: ['/bin/sh']output:$./test.py--abcdefArgv is: ['/bin/sh', 'abc', 'def']output: abc defBoth$1andsys.argv[1]will do the same thing.QuotingTake this shell command:$uname-aLinux pop-os 5.11.0 [...] x86_64 GNU/LinuxNow take this piece of code:>>>cmd='uname -a'>>>~f'{cmd}'/bin/sh: 1: uname -a: not foundWhy does this not work?This is becauseuname -awasquotedinto'uname -a'. All values passed inside f-strings are automatically quoted to avoidshell injection.To prevent quoting, the:rawformat_spec can be used:>>>cmd='uname -a'>>>~f'{cmd:raw}'Linux pop-os 5.11.0 [...] x86_64 GNU/LinuxThisdisablesquoting, and the command is run as-is as provided in the string.Note that this shouldn't be used with external data, or thiswillexpose you toshell injection.Interactive mode$ zxpyzxpy shellPython 3.8.5 (default, Jan 27 2021, 15:41:15)[GCC 9.3.0]>>>~"ls | grep '\.py'"__main__.pysetup.pyzx.py>>>Also works withpath/to/python -m zxIt can also be used to start a zxpy session in an already running REPL. Simply do:>>>importzx;zx.install()and zxpy should be enabled in the existing session.Development/TestingTo install from source, clone the repo, and do the following:$source./venv/bin/activate# Always use a virtualenv!$pipinstall-rrequirements-dev.txtProcessing ./zxpy[...]Successfully installed zxpy-1.X.X$pytest# runs tests
zxs
No description available on PyPI.
zxshare
Failed to fetch description. HTTP Status Code: 404
zxshareProject
test
zxt
zxtools介绍zx的一个工具集,以Python为主,安装教程python -m pip install .python -m pip install zxtpython -m pip install --upgrade zxt上传教程创建 .pypirc 文件 type NUL > %UserProfile%.pypircpypirc 规范https://packaging.python.org/specifications/pypirc/升级工具 python -m pip install --upgrade build python -m pip install --upgrade twineGenerating distribution archives (生成档案)https://packaging.python.org/en/latest/tutorials/packaging-projects/切换到 pyproject.toml 的同级目录, 一般先删除 dist 目录(RMDIR /S .\dist\ /Q) python -m buildUploading the distribution archives (上传档案)https://packaging.python.org/en/latest/tutorials/packaging-projects/python -m twine upload --repository zxt dist/*调试教程卸载 zxt 包 python -m pip uninstall zxt从 zxt 的源码中找到 pth.py 所在目录, 在该目录下执行如下命令: python ./pth.py --dflt_opt=C源码已关联到 python 环境, 可以写代码调用 zxt 包进行调试了
zxtaputils
# zxtaputils - Utilities for handling TAP files on the ZX Spectrum (Next)## DescriptionThis is a collection of small utilities to work with TAP filesThis suite consists of the tools:bas2tap: turns BASIC code into a TAP file containing tokenized codetap2bas: view/save BASIC code contained in a TAP filetapextract: extract and save data from a TAP blocktapify: store any files inside a TAP file as a containertapinfo: view information about a TAP filetapsplit: save a TAP file’s blocks as individual files
zxtestlib
我的库是一个很好的库,大家可以用它来做很多事情,欢迎大家下载使用!!!斜体加粗this is my code
zxtools
Here’s a set of utils to manipulate files that were copied from a TR-DOS diskette or from a tape.Originally the tools were written to simplify the following workflow:Grab diskette image usingHobetatool.Strip the file header and save the result to a new file.Convert resultingZeus Z80 assemblerfile to the plain text format.TODO: I have future plans to implement some more tools I need to restore my old ZX Spectrum projects.But you can use them in the way you need. And it’s very easy to use: download the package, runsetup.py(or install viapip install zxtools), invoke in the following way:$ python3 -m zxtools.hobeta strip input.hobeta result.zeus $ python3 -m zxtools.zeus2txt result.zeus listing.asm --include-codeNOTE: Python 3 is required to use this package, and Python 2 is not supported but you are welcome to fix it.To view the resulting files with syntax colorization you can use specialVisual Studio Code plugin:
zxtouch
Package ofhttps://github.com/xuan32546/IOS13-SimulateTouch/tree/v0.0.7-10/layout/usr/lib/python3.7/site-packages/zxtouch
zxutils
zxutilIntroPython tool boxLICENSEMIT
zxvcv.cmdutil
zxvcv.cmdutilCommandline toolbox.Setup aliasesTo use aliases provided with this package:WindowsAdd path <python_path>/Lib/site-packages/zxvcv/cmdutil/aliases/dosUnixRun command (for python 3.11):printf "\nexport PATH=\$PATH:~/.local/lib/python3.11/site-packages/zxvcv/cmdutil/aliases/unix\n. ~/.local/lib/python3.11/site-packages/zxvcv/cmdutil/aliases/unix/bash_zxvcv_aliases\n\n" >> ~/.bashrcrequires to installsudo apt install python-is-python3or setalias python=python3 $@To get python site-packates path run: python3 -m siteProvided aliasesWindowsclear= clsgita= git add -A :!agitl= git log --graph --oneline %*la= dirll= dirls= dir /Bvenva- support activation python venvs (see --help)venvi- support creation python venvs (see --help)venvr- support removing python venvs (see --help)venvl- list available python venvs (see --help)Unixcls= cleargita= git add -A :!agitl= git log --graph --oneline $@venva- support activation python venvs (see --help)venvi- support creation python venvs (see --help)venvr- support removing python venvs (see --help)venvl- list available python venvs (see --help)Virtual Python Environemts PathsWindows:C:\PythonVenvUnix:~/pythonvenvScriptszxvcv.pullallHelps updating multiple git repositories (see --help)
zxvcv.util
zxvcv.utilToolbox for other projects.Contain usefull classes, functions and other usefull items, that could be reused in other projects.
zxvcv.util-cli
zxvcv.util-cliPlotting data in terminal in multiple virtual screens displayed in single terminal.This feature allows to print information about multiple processes that are done parallely, in single terminal.
zxw
Failed to fetch description. HTTP Status Code: 404
zxwei-nester
No description available on PyPI.
zxx
zxx北京大学政信信女足开发的Python库,主要用于剪辑比赛集锦。 / A Python package developed by “Zheng Xin Xin” Women’s Football Team at Peking University, mainly used for editing game highlights.点击此处前往zxx的GitHub主页。 / Clickhereto go to the GitHub homepage ofzxx.点击此处前往zxx的PyPI主页。 / Clickhereto go to the PyPI homepage ofzxx.安装 / To install:pip install zxx.更新 / To update:pip install --upgrade zxx/pip install -U zxx.更新日志 Update Logs0.1.0 (2022-11-07)第一次正式发布。 / The first release.0.2.0 (2023-04-03)全面修改运行逻辑。 / An entire modification.
zxy
READMEhhhhhwwwwwww
zxycba
Failed to fetch description. HTTP Status Code: 404
zxynewpkgcheckupstream
No description available on PyPI.
zxy-Test
Python 项目模版开发使用$ virtualenv venv --python=python3 && source venv/bin/activate创建并激活此virtualenv;使用$ make install_dev或者$ pip install -e .[dev]安装项目依赖Coding静态检查项目已经配置好使用flake8做静态检查,执行$ make lint即可。测试单元测试位于tests/目录中,使用$ make test可以运行单元测试。如何编写单元测试可以参考pytest默认会在 Python2.7/3.7 环境下运行单元测试,如果需要支持更多版本 Python,可以修改tox.ini。规范代码规范需要保证代码兼容 Python2.7,Python3.7+;代码风格兼容PEP8,除了代码最大宽度放宽到 120。版本规范版本需要遵循Semver;发布分支后,需要创建类似v0.0.1的 tag;每次 Release,需要编辑 CHANGELOG.md,内容需要遵守changelog 规范。TipsMakefile指南makefile用于帮助开发者快速使用功能,目前支持的命令有指令作用make按顺序执行 install_dev、isort、isort_check、lint、test(操作更改代码!)make check按顺序执行 install_dev、isort_check、lint、testmake install_dev安装测试所需依赖(位于setup.py的DEV_REQUIRES)make isort执行isort,规范化import顺序(操作更改代码!)make isort_check执行import顺序规范性检查make lint执行flake8,检查你的代码规范性make test执行tox,检测单元测试的正确性make clean清除测试和检查产物建议每次准备发布代码前,执行一次make或者make check来保证代码的规范性和健壮性。Python2/3 兼容每个Python 文件头部都增加如下代码(尽量保证此import位于任何其他import之前):# coding: utf-8from__future__importabsolute_import,division,print_function,unicode_literals来保证代码在 Python2 和 Python3 下尽可能保持一致。Python2 与 Python3 不兼容的代码,尽量使用six模块做兼容。比如 Python2 和 Python3 下range函数行为不一致,统一使用six.moves.range可以保证兼容性。类型标注PythonPEP484中新增了类型标注功能,可以给代码增加可选的类型标注,配合mypy可以静态的给代码做类型检查。开发中给每个.py文件编写一个对应的.pyi,编写好导出类型的函数签名。此项目已经配置好相关规则,包发布后,使用者就可以使用编写好的类型信息做静态类型检查、代码补全。如果对导出函数写 docstring,除了按照 PEP8 的要求进行编写之外,还可以对传入传出数据类型做标注与注释。注释格式参考 PyCharm 的这篇文档的格式进行编写。PyCharm 以及 Jedi(vim / emacs / vscode 都是基于 jedi 进行自动补全)等等自动补全/静态检查工具都可以基于此格式的信息进行检查,Sphinx 生成的 API doc 也可以进行识别。editorconfig可以安装editorconfig编辑器插件,保持代码一致性。此项目已经默认配置。
zxyzhxbanking
step3
zxz646piptry
No description available on PyPI.
zy
No description available on PyPI.
zy1221_nester
UNKNOWN
zy-aliyun-python-sdk
aliyun_sdk因为使用阿里云官方的 sdk 需要调用太多的包,而且写法上比较繁琐,故自己开发了一个比较简单的 sdk。安装方式pipinstallzy-aliyun-python-sdk目前支持的产品已适配的阿里云产品及 API 接口详情功能介绍支持主流的阿里云产品。加入请求超时自动重新请求,上限 3 次。产品限制:该接口仅适用于少次、不频繁、低速,其他限制及详细说明,请参考阿里云官方文档具体传参请参考官方文档。若需要添加或更新调用的 API 接口信息,请查看aliyun_sdk/common.py文件,修改或添加PRODUCT_API_CONFIG_MAP中的字段。API 接口详情如下:产品名称简称API 版本请求地址端口协议添加日期云服务器ecs2014-05-26ecs.aliyuncs.com443https2019-04-17阿里云关系型数据库rds2014-08-15rds.aliyuncs.com443https2019-04-17分布式关系型数据库drds2015-04-13drds.aliyuncs.com443https2019-04-17负载均衡slb2014-05-15slb.aliyuncs.com443https2019-04-17弹性伸缩ess2014-08-28ess.aliyuncs.com443https2019-04-17媒体处理mts2014-06-18mts.aliyuncs.com443https2019-04-17阿里云云盾yundun2014-09-24yundun.aliyuncs.com443https2019-04-17CDNcdn2018-05-10cdn.aliyuncs.com443https2019-04-17访问控制 RAMram2015-05-01ram.aliyuncs.com443https2019-04-17安全令牌 STSsts2015-04-01sts.aliyuncs.com443https2019-04-17短信服务dysms2017-05-25dysmsapi.aliyuncs.com443https2019-04-17语音服务dyvms2017-05-25dyvmsapi.aliyuncs.com443https2019-04-17消息接收1dybase2017-05-25dybaseapi.aliyuncs.com443https2019-04-17云数据库Redis版redis2015-01-01r-kvstore.aliyuncs.com443https2019-04-17云数据库 MongoDB 版mongodb2015-12-01mongodb.aliyuncs.com443https2019-04-17数据传输服务DTSdts2016-08-01dts.aliyuncs.com443https2019-04-17VPCvpc2016-04-28vpc.aliyuncs.com443https2019-04-17云监控cms2019-01-01metrics.aliyuncs.com443https2019-07-12Web 应用防火墙waf2018-01-17wafopenapi.cn-hangzhou.aliyuncs.com443https2019-04-17域名domain2018-01-29domain.aliyuncs.com443https2019-04-17交易与账单管理business2017-12-14business.aliyuncs.com443https2019-04-17ddos 防护ddospro2017-07-25ddospro.cn-hangzhou.aliyuncs.com443https2019-04-17example# 非 oss 产品fromaliyun_sdkimportclientak={"AccessKeyId":"example","AccessKeySecret":"example"}aliyun_client=client.AliyunClient(ak)status_code,response=aliyun_client.common('ecs',Action='DescribeRegions')# response ==> (status_code, result)print(status_code,response)# example result# (404, {'Recommend': 'https://error-center.aliyun.com/status/search?Keyword=InvalidAccessKeyId.NotFound&source=PopGw', 'Message': 'Specified access key is not found.', 'RequestId': 'AEA6AEB8-6F44-445B-Bd0E-9E5F706B5665', 'HostId': 'ecs.aliyuncs.com', 'Code': 'InvalidAccessKeyId.NotFound'})# oss 产品status_code,oss_response=aliyun_client.oss('GET',**{"max-keys":1000})print(status_code,oss_response)status_code,oss_response=aliyun_client.oss('GET',BucketName='cxp-test',Query={'acl':None})print(status_code,oss_response)
zybats
zybatsZYBATS
zyb-charts
No description available on PyPI.
zyb-image
No description available on PyPI.