package
stringlengths
1
122
pacakge-description
stringlengths
0
1.3M
z-orm-pg
No description available on PyPI.
zoro
====zoro====Before we introduce you to zoro, please do not confuse it with Zorro_ which isa networking library that has nothing to do with this one.The name 'zoro' comes from a Japanese onomatopoeic phrase 'zoro zoro' whichsignifies a sound a horde makes as it goes somewhere.Having to deal with a build process that involves both backend and frontendcode, transpiled languages like CoffeScript, LiveScript, LESS or Compass,exotic configuration files or settings that need to be swapped before goinginto production... The horde of tasks that need to be completed before aproject can be served to the masses can be hard to deal with without softwareto help us. On the other hand, learning a complex build system may seem like achore.Zoro tries to fill the gap between writing small (shell) scripts, and masteringa full build system like Buildout. I chose Python for this task, not onlybecause I develop Python software, but also because of its vast standardlibrary that can simplify many tasks without pulling in dozens of third-partylibraries. Zoro is also a simple and pure Python module, so you do not needanything other than the Python interpreter installed on your system. This makesit not only easy to install, but also portable across platforms.In fact, the ``zoro`` module itself does not hide any of the modules andfunctions it imports from the standard library, so you can ``from zoro import*`` to access them witout having to add many lines of imports. Further more,though its API, zoro tries to stay as close to bare Python as possible. Afterall, why invent a new language if there is already a good one (or ten)... contents::License=======Zoro is released under MIT license. See the source code for copyright andlicense.Installation============You can install zoro frim PyPI as usual::easy_install zoroor::pip install zoroBasic concept=============Somewhat similar to GNU Make, zoro allows you to easily define build targets,and run various commands within them. This is achieved through the use of``zoro.Make`` class. Let's take a look at a real-life example of such a classand discuss its usage. ::#!/usr/bin/env pythonfrom zoro import *class Targets(Make):"""Build my project."""def __init__(self):super(Targets, self).__init__()self._parser.add_options('-k', '--key', help='API key',dest='api_key')def dev(self):""" start test runners, servers and compilers """wait_for_interrupt(run(node_local('lsc -cwbo static/js src/ls')),run('compass watch -c tools/compass.rb'),run(python('app/main'), env={'APPENV': 'development'}),)def test(self, args, options):""" run unit tests """wait_for_interrupt(watch(python('tools/run_tests'), '.', '*.py'),)def build(self):""" prepares the project for deployment """self.clean()copytree('app', 'build/app')copytree('static', 'build/static')patch('build/app/conf.py', lambda s: self._patch_key(s))cleanup('build', '*.pyc')run(python('tools/cachebust build/app/templates'), wait=True)def _patch_key(self, s):key = self._options.k.api_keyif key is None:err('No API key specified', 1)return re.sub(r"API_KEY='[^']+'", "API_KEY='%s'" % key, s)if __name__ == '__main__':Targets()()This file is usually saved as 'zorofile' in the project's root directory. Theshebang line at the top of the file allows us to run this file withoutexplicitly naming the interpreter (on Linux and UNIX systems at least). OnWindows we also include a 'zorofile.cmd' file to go with it. The contents ofthe file may look like this::@echo offpython zorofile %*Now we can start calling the zorofile directly.Importing zoro functions~~~~~~~~~~~~~~~~~~~~~~~~Normally, when using zoro, we import everything from ``zoro`` module with::from zoro import *This pulls in not only the functions and classes defined by zoro itself, butalso anything and evertyhing zoro itself imports. This includes (among otherthings, the ``os`` module, ``sys``, ``time``, ``platform``, ``shlex``,``datetime``, etc). For a full listing of what's imported, you should look atthe source code.Targets class~~~~~~~~~~~~~The next thing we notice is the ``Targets`` class. It's a subclass of the``zoro.Make`` class, and we use it to house all our build targets, as well asany utility methods we might need.The constructor~~~~~~~~~~~~~~~The constructor of the ``zoro.Make`` class builds a parser object (created by``optparse`` module). The parser is used to define and parse command linearguments passed to our zorofile. In our subclass, we augment the defaultparser with a new option '-k', which we will use to pass a production API keyduring the build process.Parsed positional arguments and options are stored as ``_args`` and``_options`` instance attributes respectively and can be access by all instancemethods.Targets and utilities~~~~~~~~~~~~~~~~~~~~~Let's cover the utility methods first. In our example, we have one utilitymethod which replaces the API key in our configuration module. The reason wemade it an instance method instead of a function defined outside the class isthat this way we have access to all properties on the class, including the``_options`` attribute mentioned in the previous section.The reason utility methods are prefixed with an underscore is that methodswithout a leading underscore will be treated as build targets.You will also note that we are using the ``re`` module without explicitlyimporting it. We can do that because it is already imported in the ``zoro``module.Apart from the constructor and the utility method, there are also three buildtargets: 'dev', 'test', and 'build'. All three targets are normal Pythonmethods. They have docstrings of which the first lines are used in help messagewhen the zorofile is run with the '-l' switch.The 'dev' target is used when we want to develop the application. Itfacilitates live compilation of LiveScript_ and Compass_ code and runs ourapplication's built-in development server. This is achieved by using the``zoro.run()`` function.The ``zoro.run()`` function executes commands asyncrhonously by default. Thismeans that the function itself returns before the command exits. This isconvenient because the commands in the 'dev' target will run indefinitely untilthey receive a keyboard interrupt.The first command is passed to ``zoro.node_local()`` function. This functionconstructs the correct path for the locally installed NodeJS_ dependencies. Theactual command to run is dependent on the platform we are on, and this functionalso takes care of ironing out the differences.Third command is a python script, so we are passing it to ``zoro.python()``function, which prepends 'python' and appends the '.py' extension. You willalso notice that the third command uses an ``env`` keyword argument to the``zoro.run()`` function. This allows us to override or add envionrmentvariables specifically for that command.All three commands in the 'dev' target are wrapped in``zoro.wait_for_interrupt()`` call. This function takes child process objectsor watchdog_ observers as positional arguments, and terminates them all whenthe zorofile receives a keyboard interrupt. Because ``zoro.run()`` returns achild process object for the command it executes, we can pass its return valuedirectly to ``zoro.wait_for_interrupt()``.The second target, 'test', looks very similar to the 'dev' target, but it runsits command using ``zoro.watch()`` instead of ``zoro.run()``. The``zoro.watch()`` function takes three arguments. The first one is the same as``zoro.run()``. The second argument is a path that should be monitored forchanges and the last argument is a glob pattern to use as a filter. Whenever afile or directory under the monitored path, matching the specified globpattern, is modified, the command is executed. This allows us to rerun ourtests whenever we modify a Python module.Finally, the 'build' target creates a 'build' directory and prepares the codefor deployment. It uses the ``shutil.copytree()`` function to copy thedirectories into the target directory, calls ``zoro.patch()`` to patch theconfiguration file with the help from the utility method, and uses``zoro.cleanup()`` to remove unneeded files.Running the targets~~~~~~~~~~~~~~~~~~~To run the targets, we need to call the instance of our ``Targets`` class. Thisis done in an ``if`` block so that it is only run when the zorofile is calleddirectly.API documentation=================There is no separate API documentation, but you will find the source code to bewell-documented. The code is less than 700 lines *with* inline documentation,so you should just dig in. You will find examples for each function in thedocstrings.Reporting bugs==============Please report any bugs to the project's `BitBucket bugtracker`_... _Zorro: https://pypi.python.org/pypi/Zorro.. _LiveScript: http://livescript.net/.. _Compass: http://compass-style.org/.. _watchdog: http://pythonhosted.org//watchdog/.. _BitBucket bugtracker: https://bitbucket.org/brankovukelic/zoro/issues
zoro-ds-utils
Zoro Data Science Utilities (AKA zuds)Library with common utilities for Data Science projects.
zoro-gpapi
No description available on PyPI.
zorp
ZORP: A helpful GWAS parserWhy?ZORP is intended to abstract away differences in file formats, and help you work with GWAS data from many different sources.Provide a single unified interface to read text, gzip, or tabixed dataSeparation of concerns between reading and parsing (with parsers that can handle the most common file formats)Includes helpers to auto-detect data format and filter for variants of interestWhy not?ZORP provides a high level abstraction. This means that it is convenient, at the expense of speed.For GWAS files, ZORP does not sort the data for you, because doing so in python would be quite slow. You will still need to do some basic data preparation before using.InstallationBy default, zorp installs with as few python dependencies as practical. For more performance, and to use special features, install the additional required dependencies as follows:$ pip install zorp[perf,lookups]The snp-to-rsid lookup requires a very large file in order to work efficiently. You can download the pre-generated file using thezorp-assetscommand line script, as follows. (use "--no-update" to skip warnings about already having the latest version)$zorp-assetsdownload--typesnp_to_rsid--taggenome_buildGRCh37--no-update $zorp-assetsdownload--typesnp_to_rsid--taggenome_buildGRCh37Or build it manually (which may require first downloading a large source file):$ zorp-assets build --type snp_to_rsid --tag genome_build GRCh37Assets will be downloaded to the least user-specific location available, which may be overridden by setting the environment variableZORP_ASSETS_DIR. Runzorp-assets show --allto see the currently selected asset directory.A note on rsID lookupsWhen developing on your laptop, you may not wish to download 16 GB of data per rsID lookup. A much smaller "test" dataset is available, which contains rsID data for a handful of pre-selected genes of known biological functionality.$ zorp-assets download --type snp_to_rsid_test --tag genome_build GRCh37To use it in your python script, simply add an argument to the SnpToRsid constructor:rsid_finder = lookups.SnpToRsid('GRCh37', test=True)If you have generated your own lookup using the code in this repo (make_rsid_lookup.py), you may also replace the genome build with a hardcoded path to the LMDB file of lookup data. This use case is fairly uncommon, however.UsagePythonfromzorpimportlookups,readers,parsers# Create a reader instance. This example specifies each option for clarity, but sniffers are provided to auto-detect# common format options.sample_parser=parsers.GenericGwasLineParser(marker_col=1,pvalue_col=2,is_neg_log_pvalue=True,delimiter='\t')reader=readers.TabixReader('input.bgz',parser=sample_parser,skip_rows=1,skip_errors=True)# After parsing the data, values of pre-defined fields can be used to perform lookups for the value of one field# Lookups can be reusable functions with no dependence on zorprsid_finder=lookups.SnpToRsid('GRCh37')reader.add_lookup('rsid',lambdavariant:rsid_finder(variant.chrom,variant.pos,variant.ref,variant.alt))# Sometimes a more powerful syntax is needed- the ability to look up several fields at once, or clean up parsed data# in some way unique to this datasetreader.add_transform(lambdavariant:mutate_entire_variant(variant))# We can filter data to the variants of interest. If you use a domain specific parser, columns can be referenced by namereader.add_filter('chrom','19')# This row must have the specified value for the "chrom" fieldreader.add_filter(lambdarow:row.neg_log_pvalue>7.301)# Provide a function that can operate on all parsed fieldsreader.add_filter('neg_log_pvalue')# Exclude values with missing data for the named field# Iteration returns containers of cleaned, parsed data (with fields accessible by name).forrowinreader:print(row.chrom)# Tabix files support iterating over all or part of the fileforrowinreader.fetch('X',500_000,1_000_000):print(row)# Write a compressed, tabix-indexed file containing the subset of variants that match filters, choosing only specific# columns. The data written out will be cleaned and standardized by the parser into a well-defined format.out_fn=reader.write('outfile.txt',columns=['chrom','pos','pvalue'],make_tabix=True)# Real data is often messy. If a line fails to parse, the problem will be recorded.fornumber,message,raw_lineinreader.errors:print('Line{}failed to parse:{}'.format(number,message))Command line file conversionThe file conversion feature of zorp is also available as a command line utility. Seezorp-convert --helpfor details and the full list of supported options.This utility is currently in beta; please inspect the results carefully.To auto-detect columns based on a library of commonly known file formats:$ zorp-convert --auto infile.txt --dest outfile.txt --compressOr specify your data columns exactly:$ zorp-convert infile.txt --dest outfile.txt --index --skip-rows 1 --chrom_col 1 --pos_col 2 --ref_col 3 --alt_col 4 --pvalue_col 5 --beta_col 6 --stderr_beta_col 7 --allele_freq_col 8The--indexoption requires that your file be sorted first. If not, you can tabix the standard output format manually as follows.$ (head -n 1 <filename.txt> && tail -n +2 <file> | sort -k1,1 -k 2,2n) | bgzip > <filename.sorted.gz> $ tabix <filename.sorted.gz> -p vcfDevelopmentTo install dependencies and run in development mode:pip install -e '.[test,perf,lookups]'To run unit tests, use$flake8zorp $mypyzorp $pytesttests/
zorroautomator
Author: Robert A. McLeodEmail:[email protected] is a package designed for registration of image drift for dose fractionation in electron microscopy. It is specifically designed to suppress correlated noise.Zorro is currently in beta. Our current priority is to provide better ease of installation, so if you have problems with installing Zorro please do not hesitate to open an issue.For help on installation please see the wiki page:https://github.com/C-CINA/zorro/wikiZorro has the following dependencies:numpySciPypyFFTWAnd the following optional dependencies (for loading HDF5 and TIFF files respectively):PyTablesscikit-imageZorro comes packaged with a modified version of the NumExpr virtual machine callednumexprzthat has support forcomplex64data types.Zorro is MIT license.AutomatorThe Automator for Zorro and 2dx is a GUI interface to Zorro.It has the following additional dependencies:PySideAutomator also comes with the Skulk Manager tool which may be used as a daemon to watch a directory for new image stacks and automatically process them.Automator is LGPL license.Feature ListImport: DM4, MRC, HDF5, stacked TIFFApply gain reference to SerialEM 4/8-bit MRC stacks.Fourier cropping of super-resolution stacks.Can operate on Sun Grid Engine cluster.Flexible filters: dose filtering, low-pass filteringStochastic hot pixel filter detects per-stack radiation damage to the detectorCTF estimation with: CTFFIND4.1, GCTFParticle picking with: Gautomatch (alpha-status)Independent (separate even-odd frame) and non-independent FRC resolution estimators.Archiving with: 7z, pigz, lbzip2Output of diagnostic PNGsCitationsMcLeod, R.A., Kowal, J., Ringler, P., Stahlberg, H. 2017. Robust image alignment for cryogenic transmission electron microscopy. J. Struct. Biol. 197:279-293.http://www.sciencedirect.com/science/article/pii/S1047847716302520Zorro and Automator make use of or interface with the following 3rd party programs:CTF estimation CTFFIND4.1:Rohou, A., Grigorieff, N., 2015. CTFFIND4: Fast and accurate defocus estimation from electron micrographs. Journal of Structural Biology, Recent Advances in Detector Technologies and Applications for Molecular TEM 192, 216-221. doi:10.1016/j.jsb.2015.08.008CTF estimation from GCTF:Zhang, K., 2016. Gctf: Real-time CTF determination and correction. Journal of Structural Biology 193, 1-12. doi:10.1016/j.jsb.2015.11.0034/8-bit MRC from SerialEM:Mastronarde, D.N. 2005. Automated electron microscope tomography using robust prediction of specimen movements. J. Struct. Biol. 152:36-51.Zorro’s dose filter is ported from Unblur:Grant, T., Grigorieff, N., 2015. Measuring the optimal exposure for single particle cryo-EM using a 2.6 Å reconstruction of rotavirus VP6. eLife Sciences e06980. doi:10.7554/eLife.06980
zorroclient
Zorro Clientzorro-clientis a library written for use with Zorro, an algorithmic trading platform. This library includes a full API client with access to user-written indicators and strategies. In addition, it includes the backtesting framework and scripting language used by Zorro, so you can test out your strategies on your own data as well.Install$ pip3 install zorro-clientExampleimportzorrotheAPI=zorro.Api(api_key="your-api-key",secret_key="your-secret-key")my_indicator=theAPI.indicators['indicator-id']my_strategy=theAPI.strategies['strategy-id']stock_data=zorro.StockData.create(["AAPL","AMZN"],"2020-01-03","2020-07-11","1d")# backtest the strategybacktest=my_strategy.create_backtest(stock_data)backtest.simulate()# find important detailsbacktest_results=backtest.analyze()sharpe_ratio=backtest_results['sharpe_ratio']alpha=backtest_results['alpha']beta=backtest_results['beta']profit_pct=backtest_results['profit_percent']profit=backtest_results['profit']trade_history=backtest.trade_historyprint(backtest_results)UsageImportimportzorroCreate a strategymy_strategy=zorro.Strategy({"type":"order","stock":"AAPL","qty":"10"})Execute the strategy on a paper APINo setup required.paper_broker=zorro.PaperBroker()my_strategy.execute(handler=paper_broker)Execute the strategy on a live APITo do this, you will need an Alpaca account. You can create onehere.live_broker=zorro.LiveBroker(alpaca_api_key_id="<Your API key>",alpaca_api_secret="<Your API secret")my_strategy.execute(handler=live_broker)Thank you for using Zorro!If you have any questions, reach out to us atour email.
zorro-df
Zorro DFZorro DF is a python package for masking pandas dataframe objects in order to anonymise data. It allows you to strip away identifiable column names and string values, replacing them with a generic naming convention. The package is built under the scikit-learn transformer framework and hence can be plugged into any scikit-learn Pipeline.The package source-code can be found athttp://github.com/epw505/zorro_dfGetting StartedRequirementspandas>=0.25.3 scikit-learn>=0.22.1InstallationZorro DF can be installed usingpipwith the following command:pip install zorro_dfExamplesOnce the package is installed, you can load Zorro DF into your python session and use the Masker object to mask your data.from zorro_df import mask_dataframe as mf example_masker = mf.Masker() example_masker.fit(data) masked_data = example_masker.transform(data)TestsThe test suite for Zorro DF is built usingpytestwith thepytest-mockplugin. Install both as follows.pip install pytest pip install pytest-mockOnce they are installed, you can run the test suite from the root directory of Zorro Df.pytest tests/Future DevelopmentReverse masking to allow retrieval of original dataAdditional numerical scaling techniques
zorro-pytorch
No description available on PyPI.
zort
zort : ZTF Object Reader ToolGetting StartedThe ZTF Object Reader Tool,zort, is set of functions to organize and access the ZTF Public Data Release lightcurves across multiple colors.ZTF Public Data Release LightcurvesInstructions for downloading and extracting ZTF Public Data Release Lightcurves can be found at:https://www.ztf.caltech.edu/page/dr2#12cThe ZTF Public Data Release Lightcurves are generated through spatially cross-matching individual epoch photometric catalogs. Catalogs are pre-filtered to be (1) the same ZTF observation field ID, (2) the same CCD readout channel, and (3) the same photometric color. Spatially coincidence observations in these catalogs are all labelled as objects and saved to a common ascii file along with the observation data for each epoch of the object. These files are consolidated such that all objects sharing a common ZTF observation field ID reside in the same file.zortrefers to these files with extension*.txtaslightcurve files.Featureszortprovides facilitates the reading and inspection of lightcurves in the ZTF Public Data Release. The features ofzortinclude:Seamless looping through ZTF lightcurves for custom filtering, where interesting objects can be saved and recovered by only their file locationConsolidating g-band and R-band lightcurves of a single source that are otherwise labelled as two separate objects by pairing objects as "siblings"Plotting lightcurves in multiple colors for visual inspectionInstallationPreferred method is through pip:pip install zortLatest version can also be installed from github:git clone https://github.com/MichaelMedford/zort.git cd zort python setup.py installTerminologylightcurve file: Files included in the ZTF Public Data Release containing epoch photometry for spatially coincidence observationsobject: A collection of spatially coincident observations in a single color. Objects include IDs, sky locations (in right ascension and declination) and colors (g-band and R-band).lightcurve: Observation epochs of an object. Lightcurve observations include dates, magnitudes and magnitude errors.radec_map: Binary search trees for the objects in a lightcurve file. required for faster object access.siblings: A spatially coincident object in a different color originating from the same astrophysical source.Initializationzortrequires two additional data products per lightcurve file (*.txt) in order to make object discovery and multiple color consolidation faster. Object files (*.objects) contain all of the metadata for each object in a lightcurve file. RCID map files (*.radec_map) contain binary search trees that facilitates faster matching of multiple colors for individual objects.zortrequires that each lightcurve file has a corresponding object file and RCID map file.To generate object files and RCID map files for a directory of lightcurve files, runzort-initialize -lightcurve-file-directory=LIGHTCURVE_FILE_DIRECTORY -singleor if mpi4py is installed then launch multiple instances ofzort-initialize -lightcurve-file-directory=LIGHTCURVE_FILE_DIRECTORY -parallelIf each lightcurve file does not have an object file and an RCID map thenzortwill not be able to locate siblingsExamplesExtracting Lightcurveszortis designed to provide you with easy access to all of the lightcurves in a lightcurve file for applying filters and saving interesting objects. The preferred method for inspecting lightcurves is through a for-loop.A filter is created that returns True for interesting objects. This filter can involve simply cuts on object properties or complicated model fitting to the full observation data in the object's lightcurvedef my_interesting_filter(obj): cond1 = obj.nepochs >= 20 cond2 = min(obj.lightcurve.mag) <= 17.0 if cond1 and cond2: return True else: return FalseWhen a lightcurve file is looped over, it returns each object in the lightcurve file. Interesting objects can be gathered into a list and saved to disk using thesave_objectsfunction.filename = 'lightcurve_file_example.txt' interesting_objects = [] from zort.lightcurveFile import LightcurveFile for obj in LightcurveFile(filename): if my_interesting_filter(obj): interesting_objects.append(obj) from zort.object import save_objects save_objects('objects.list', interesting_objects)Objects and their lightcurves can be retrieved from a saved list by using theload_objectsfunction. Each object comes loaded with its metadata and lightcurve, easily previewed by printing the object and lightcurve attribute.from zort.object import load_objects interesting_objects = load_objects('objects.list') for obj in interesting_objects: print(obj) print(obj.lightcurve)Objects can also be extracted in parallel by instantiating the LightcurveFile class with a rank and size. This could be done through mpi4py, or other parallelization packages. The LightcurveFile class simply needs to be told the rank of the parallel process and the total number, or size, of the parallel processes.from mpi4py import MPI comm = MPI.COMM_WORLD rank = comm.rank size = comm.size filename = 'lightcurve_file_example.txt' interesting_objects = [] from zort.lightcurveFile import LightcurveFile for obj in LightcurveFile(filename, proc_rank=rank, proc_size=size): if my_interesting_filter(obj): interesting_objects.append(obj) from zort.object import save_objects save_objects('objects.%i.list' % rank, interesting_objects)Setting theproc_rankandproc_sizeparameters will cause the iterator to uniquely send different objects to each parallel process without loading all of the objects into memory for each process. This allows for applying a filter to all of the objects in a lightcurve file without overloading memory.Matching multiple colors for an objectEach object is defined as a spatially coincidence series of observations that share a (1) ZTF observation field ID, (2) CCD readout channel, and (3) photometric filter. This labels multiple colors of the same astrophysical source as separate ZTF objects with separate object IDs. The ZTF Public Data Release does not provide any native support for pairing these objects as multiple colors of the same source.zortsupports searching for and saving multiple colors for the same source. The ZTF Public Data Release contains observations in g-band (filterid=1) and R-band (filterid=2). Each object can therefore have one additional object that comes from the same astrophysical source but is in a different color. These matching objects are labelled as "siblings" and can be both discovered and saved withzort.The siblings for each object can be located by simply running an object'slocate_siblingsmethod. Runningfilename = 'field000245_ra357.03053to5.26702_dec-27.96964to-20.4773.txt' buffer_position = 6852 obj = Object(filename, buffer_position) obj.locate_siblings(printFlag=True)results inLocating siblings for ZTF Object 245101100000025 -- Object location: 4.74852, -26.23583 ... ** siblings file missing! ** -- Searching between buffers 17749819 and 18135260 ---- Sibling found at 4.74851, -26.23581 ! ---- Original Color: 1 | Sibling Color: 2 ---- Sibling savedAn object's siblings is itself another object and can be accessed through the siblings attribute.print(obj) Filename: field000245_ra357.03053to5.26702_dec-27.96964to-20.4773.txt Buffer Position: 6852 Object ID: 245101100000025 Color: g Ra/Dec: (4.74852, -26.23583) 22 Epochs passing quality cuts print(obj.siblings) Filename: field000245_ra357.03053to5.26702_dec-27.96964to-20.4773.txt Buffer Position: 126136890 Object ID: 245201100000047 Color: r Ra/Dec: (4.74851, -26.23581) 22 Epochs passing quality cutsThe default tolerance for matching two objects as siblings is 2.0". However this can be altered by setting theradiusargument inobj.locate_siblings().Plotting lightcurvesA lightcurve plot can be generated for any object using theobj.plot_lightcurve()method.A lightcurve plot including an object's siblings cand be generated using theobj.plot_lightcurves()method.Requirementspython 3.6numpyscipyastropymatplotlibshapelyAuthorsMichael [email protected]
zortheix
✨Welcome! to Zortheix📦 ✨👨‍💻🛠️⌛🏃📦Zortheix, languages & other kind of tools to meet for optimizatio, precision,...!Under construction! Not ready for use yet! Currently experimenting and planning!Project descriptionis kslljfdksd is a high-level Python sdfsfsdfsfeb framework that encourages rapid development and clean, pragmatic design. Thanks for checking it out.Project descriptionsdfsdfsd is a high-level Python sdfsdweb framework that encourages rapid development and clean, pragmatic design. Thanks for checking it out.All documentation is in the “docs” directory and online atA- / Modes in Zortheix:odc call CLI # or ( odc.CLI ) ==> To call CLIodc call gui # or ( odc.gui ) ==> To call GUIodc call web # or ( odc.web ) ==> To call WEBto keep the latest update:pip install akshaypawar_tut You can reach out me at,malandilajusteelysee@gmail.comfromzortheix.jdevtoolsimportmodelsasmclassSample(m):# some codes,..xz=m.frameit()Zortheix -BOX TablesCLIoperationsCLIdropbox[plugins/dropbox/README.md][PlDb]GitHub[plugins/github/README.md][PlGh]Google Drive[plugins/googledrive/README.md][PlGd]OneDrive[plugins/onedrive/README.md][PlOd]Medium[plugins/medium/README.md][PlMe]Google Analytics[plugins/googleanalytics/README.md][PlGa]Zortheix CLI (cmd tables)categorycmdREADMECLICLIjcli[plugins/dropbox/README.md][PlDb]------WEBjweb[plugins/github/README.md][PlGh]------GUIjweb[plugins/github/README.md][PlGh]------Command-lineusage cmd/>:zortheix.py[-h][-iINPUT][-oOUTPUT]cmd/>:zor[-h][-iINPUT][-oOUTPUT]cmd/>:zor[-h][-iINPUT][-oOUTPUT]LicenseGNU General Public License 3-->Documentaiton📚DONATE / Support our humble contribution,...👨‍💻building has never been easy, but with your support thing are possible📈,..Paypal 💳patreon💰Discord🤖💬GitHub📂Tutorials🎥linkedin📧👨‍💼website🌏First list itemFirst nested list itemSecond nested list item#739https://github.com/octo-org/octo-repo/issues/740Add delight to the experience when all tasks are complete :tada:Here is a simple footnote[^1].A footnote can also have multiple lines[^2].You can also use words, to fit your writing style more closely[^note].[^1]: My reference. My reference. My reference. My reference. My reference. My reference. My reference. My reference. My reference. My reference. My reference. My reference. My reference. My reference. My reference. My reference. My reference. My reference. My reference. My reference. [^2]: Every new line should be prefixed with 2 spaces.This allows you to have a footnote with multiple lines. This allows you to have a footnote with multiple lines. This allows you to have a footnote with multiple lines. [^note]: Named footnotes will still render with numbers instead of the text but allow easier identification and linking.This footnote also has been made with a different syntax using 4 spaces for new lines. This footnote also has been made with a different syntax using 4 spaces for new lines.Developed byJuste Elysée MALANDILAfrom jdevseers (c) 2022
zos
Failed to fetch description. HTTP Status Code: 404
zosapi
A class to connet to Zemax OpticStudio API via .NET
zo-sdk
01.xyz Python SDKDocumentation|PyPiPython SDK to interface with the 01 Solana program.Installation$ pip install zo-sdkGeneral UsagefromzoimportZo# Create the client. By default, this loads the local payer# and initializes a margin account for the payer if there# isn't already one.zo=awaitZo.new(cluster='devnet')# View market and collateral info.print(zo.collaterals["BTC"])print(zo.markets["BTC-PERP"])# Deposit and withdraw collateral.awaitzo.deposit(1,"SOL")awaitzo.withdraw(1,"SOL")# Place and cancel orders.awaitzo.place_order(1.,100.,'bid',symbol="SOL-PERP",order_type="limit",client_id=1)awaitzo.cancel_order_by_client_id(1,symbol="SOL-PERP")# Refresh loaded accounts to see updates,# such as change in collateral after deposits.awaitzo.refresh()# View own balance, positions and orders.print(zo.balance["BTC"])print(zo.position["BTC-PERP"])print(zo.orders["BTC-PERP"])# Dispatch multiple instructions in a single transaction,# using the `_ix` variant.awaitzo.send(zo.cancel_order_by_client_id_ix(1,symbol="SOL-PERP"),zo.place_order_ix(1.,100.,'bid',symbol="SOL-PERP",order_type="limit",client_id=1),)
zosftplib
A FTP subclass which adds some Mainframe z/OS features like job submission, execution of sql/DB2 queries, …Usageimport zosftplib Myzftp = zosftplib.Zftp(mvshost, mvsuser, passwd, timeout=500.0, sbdataconn='(ibm-1147,iso8859-1)')Featuressubmitting sql/DB2 queries and retrieving their outputswith open('/tmp/systables.csv', 'w') as outfile: for line in Myzftp.exec_sql("SELECT * FROM SYSIBM.SYSTABLES WITH UR"): outfile.write(';'.join(line.split()) + '\n')submitting batch jobs, pending their outputs# easy job for zos: job = Myzftp.submit_wait_job('//IBMUSERX JOB MSGLEVEL(1,1)\n' '//STEP001 EXEC PGM=IEFBR14', purge=True) print "rc:", job["rc"], "Jes status:", job["status"] for line in job["output"]: print lineThis produces the following output:rc: RC=0000 Jes status: OUTPUT (job purged) 1 J E S 2 J O B L O G -- S Y S T E M S Y S 1 -- N O D E N 1 0 17.49.35 JOB03914 ---- WEDNESDAY, 27 NOV 2013 ---- 17.49.35 JOB03914 IRR010I USERID IBMUSER IS ASSIGNED TO THIS JOB. 17.49.35 JOB03914 ICH70001I IBMUSER LAST ACCESS AT 17:47:56 ON WEDNESDAY, NOVEMBER 27, 2013 17.49.35 JOB03914 $HASP373 IBMUSERX STARTED - INIT 1 - CLASS A - SYS SYS1 17.49.35 JOB03914 IEF403I IBMUSERX - STARTED - TIME=17.49.35 17.49.35 JOB03914 IEF404I IBMUSERX - ENDED - TIME=17.49.35 17.49.35 JOB03914 $HASP395 IBMUSERX ENDED 0------ JES2 JOB STATISTICS ------ - 27 NOV 2013 JOB EXECUTION DATE - 2 CARDS READ - 24 SYSOUT PRINT RECORDS - 0 SYSOUT PUNCH RECORDS - 1 SYSOUT SPOOL KBYTES - 0.00 MINUTES EXECUTION TIME END OF JES SPOOL FILE 1 //IBMUSERX JOB MSGLEVEL(1,1) JOB03914 2 //STEP001 EXEC PGM=IEFBR14 END OF JES SPOOL FILE ICH70001I IBMUSER LAST ACCESS AT 17:47:56 ON WEDNESDAY, NOVEMBER 27, 2013 IEF142I IBMUSERX STEP001 - STEP WAS EXECUTED - COND CODE 0000 IEF373I STEP/STEP001 /START 2013331.1749 IEF374I STEP/STEP001 /STOP 2013331.1749 CPU 0MIN 00.01SEC SRB 0MIN 00.00SEC VIRT 4K SYS 232K EXT 0K SYS 10780K IEF375I JOB/IBMUSERX/START 2013331.1749 IEF376I JOB/IBMUSERX/STOP 2013331.1749 CPU 0MIN 00.01SEC SRB 0MIN 00.00SECz/OS Catalog and JES spool informationsfor x in Myzftp.list_catalog('SYS1.*'): print x["Dsname"], x["Dsorg"], x["Used"], "tracks" # print all "ACTIVE" jobs: for job in Myzftp.list_jes_spool('', '', 'ACTIVE'): print jobThis produces the following output:JOBNAME JOBID OWNER STATUS CLASS BPXAS STC04218 START2 ACTIVE STC PORTMAP STC04182 START2 ACTIVE STC BPXAS STC04179 START2 ACTIVE STC NFSC STC04171 START2 ACTIVE STC CICSA STC04170 START2 ACTIVE STC TCPIP STC04162 TCPIP ACTIVE STC TN3270 STC04163 START2 ACTIVE STC SDSF STC04160 START2 ACTIVE STC 1 spool files TSO STC04158 START1 ACTIVE STC 1 spool files INIT STC04157 START2 ACTIVE STC TCPIP STC04162 TCPIP ACTIVE STC VTAM STC04147 START1 ACTIVE STC RACF STC04164 START2 ACTIVE STC ...Retrieve thousands of membersMyzftp.get_members('SYS1.PARMLIB', '/tmp/parmlib/') Myzftp.get_members('SYS1.LINKLIB', '/tmp/linklib/', members='*', retr='binary', ftp_threads=10)Get/put sequential text/binary z/OS fileMyzftp.download_binary('SYS1.MAN1', '/tmp/smf.bin') Myzftp.upload_text('/tmp/bigdata.txt', 'IBMUSER.BIGDATA', sitecmd='lrecl=1024 cyl pri=500 sec=100')InstallationThe package is available as a Pip package:$ sudo pip install zosftplibOr using easy_install:$ sudo easy_install zosftplibChangelog2.0 - (2019-01-15) 1.0 - (2013-11-25) Initial release.
zosjcl
zosjclThis is a small class to generate Job Control Language (aka JCL).
zoslogs
zoslogsLibrary for parsing z/OS log files (syslog, operlog) up into individual messages. Because logs can be messy, and authorized programs can write whatever they want to the log, by default it will discard anything that doesn’t match what a log entry should look like, and return whatever it can make sense of.Please note that this was written to solve a problem I was having; it’s by no means perfect, but it may solve a problem you have, too, and I do plan on continuing to improve it as I have time. Pull requests and bug reports will certainly be appreciated.Free software: Apache Software License 2.0Documentation:https://zoslogs.readthedocs.io.FeaturesHandle compressed filesFiltering messagesCreditsCreated by Kevin [email protected] package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.3 (2022-0x-04)Include history update for version 0.1.2, and other cleanup to doc0.1.2 (2022-03-29)Point source code location in setup.py to the correct place.0.1.1 (2022-03-29)Move CI to Github actions.0.1.0 (2022-03-04)First release on PyPI.
zospy
ZOSPyAboutWrapper around theAnsys Zemax OpticStudioAPI that provides a more pythonic and intuitive way to interact with theZOS-APIthrough python using a .NET connection. It thereby allows you to do more optics modelling with less coding.In addition to full access to all the OpticStudio fucntions through the ZOS-API, ZOSPy provides the following features:Wrapper functions for several OpticStudio analyses inzospy.analyses;Easy access to solvers inzospy.solvers;Easy access to all API constants inzospy.constants;Autocomplete for all ZOS-API endpoints and constants;Solves common problems related to Python.NET 3 and interaction with the ZOS-API.Waranty and liabilityThe code is provided as is, without any warranty. It is solely intended for research purposes. No warranty is given and no rights can be derived from it, as is also stated in theMIT license.InstallingZOSPy is available on PyPipip install zospyDependenciesZOSPy officially supports Python 3.9 - 3.12. It may work with older Python versions, but support is not provided for these versions.Python packagesPython for .NET3.0.3pandasNumPySemVer3.0.2SoftwareAnsys Zemax OpticStudioCompatibilityZOSPy is tested with the following versions of Python and Ansys Zemax OpticStudio:Zemax20.3.223.1.023.2.124.1.0Python 3.9⚠✔✔✔Python 3.10⚠✔✔✔Python 3.11⚠✔✔✔Python 3.12⚠✔✔: This version works without problems. ⚠: This version works, but the output of analyses can differ slightly from the used reference version (currentlyOpticStudio 23 R1.01).ReferencingWhen publishing results obtained with this package, please cite the paper in which the package was first used:van Vught L, Que I, Luyten GPM and Beenakker JWM.Effect of anatomical differences and intraocular lens design on Negative Dysphotopsia.JCRS: Sep 06, 2022. [doi:10.1097/j.jcrs.0000000000001054] [JCRS]If a direct reference of the package is also required, reference it using the following DOI:ContributingPlease read ourcontribution guidelinesprior to opening a Pull Request.Basic usageInitiating connectionThe connection as extension to running software OpticStudio is initiated as:importzospyaszpzos=zp.ZOS()oss=zos.connect("extension")Make sure that the OpticStudio software is set up to be connected to as extension through the API. Alternatively, a standalone OpticStudio application can be launched by changing the last line to:oss=zos.connect("standalone")Using solversSolvers for the Lens Data Editor are available throughzp.solvers. Every solver requires a surface as its first parameter.Examplesimportzospy.solversassolverssurface=oss.LDE.GetSurfaceAt(2)solvers.position(surface.ThicknessCell,from_surface=1,length=10)Performing analysesImplemented analyses are available thoughzp.analyses. The available analyses are grouped in files that correspond to the analysis groups in OpticStudio (e.g.zp.analyses.mtfandzp.analyses.wavefront). Every analysis requires the OpticStudioSystemossas first parameter.Examplesfromzp.analyses.mtfimportfft_through_focus_mtfmtf=fft_through_focus_mtf(oss,sampling='64x64',deltafocus=0.1,oncomplete='Close')fromzp.analyses.reportsimportcardinal_pointscp=cardinal_points(oss,surf1=3,surf2=4,oncomplete='Release')A full description of the available function parameters is provided in the docstrings.ConstantsAfter initiating the connection, all api constants are available throughzp.constants( e.g.zp.constants.Editors.LDE.SurfaceType). Note that these are only available afterzos.wakeup()has been called, as explained underInitiating connection.Convenience functionsSome convenience functions are available throughzp.functions, e.g. to change a surface to a standard stuface:newsurf=oss.LDE.InsertNewSurfaceAt(0)zp.functions.lde.surface_change_type(newsurf,'Standard')Full exampleThis example creates a simple optical system consisting of a single lens.# Create a new, empty systemoss.new()# Set aperture and wavelengthoss.SystemData.Aperture.ApertureType=zp.constants.SystemData.ZemaxApertureType.FloatByStopSizeoss.SystemData.Wavelengths.GetWavelength(1).Wavelength=0.543# in μm# Set the object at infinitysurface_object=oss.LDE.GetSurfaceAt(0)surface_object.Thickness=float("inf")# Use a very small stop size, so the system is approximately paraxialsurface_stop=oss.LDE.GetSurfaceAt(1)surface_stop.SemiDiameter=0.1# Add a lens with n = 1.5lens_front=oss.LDE.InsertNewSurfaceAt(2)lens_front.Comment="lens front"lens_front.Radius=20lens_front.Thickness=1zp.solvers.material_model(lens_front.MaterialCell,refractive_index=1.5)lens_back=oss.LDE.InsertNewSurfaceAt(3)lens_back.Comment="lens back"lens_back.Radius=-20lens_back.Thickness=19.792# System is in focusLoggingSome basic logging is implemented through the standardpython logging module(but still under development). The following implementation examples assume thatimport logginghas been executed.To enable logging output from all ZOSPy and other modules using logging.basicConfig:logging.basicConfig(level=logging.DEBUG,format='%(asctime)s-%(name)s-%(levelname)s-%(message)s')To enable logging output from all ZOSPy and other modules using a root logger:fmt=logging.Formatter('%(asctime)s-%(name)s-%(levelname)s-%(message)s')sh=logging.StreamHandler()sh.setFormatter(fmt)sh.setLevel(logging.DEBUG)logger=logging.getLogger()logger.addHandler(sh)To enable logging output from only ZOSPylogging.getLogger('zospy').addHandler(logging.StreamHandler())logging.getLogger('zospy').setLevel(logging.INFO)ContactFeel free to contact us for any inquiries:C. Haasjes (email)J.W.M. Beenakker (email)L. van Vught (email)
zos-util
zos-utilThis module provides a Python interface into various z/OS utilitiesAPISeeherefor the APIExampleimport zos_util import tempfile f = tempfile.NamedTemporaryFile() # To specify a file with IBM-1047 code set fpath = f.name zos_util.chtag(fpath, 1047) # To specify a file with ISO8859-1 code set zos_util.chtag(fpath) tag_info = zos_util.get_tag_info(fpath) print(f"CCSID:{tag_info[0]}, TXT_FLAG:{tag_info[1]}") # set to tag_mixed mode zos_util.tag_mixed(fpath) tag_info = zos_util.get_tag_info(fpath) print(f"CCSID:{tag_info[0]}, TXT_FLAG:{tag_info[1]}") # remove the tag from the file zos_util.untag(fpath) tag_info = zos_util.get_tag_info(fpath) print(f"CCSID:{tag_info[0]}, TXT_FLAG:{tag_info[1]}")Build Instructionpython3 ./setup installTest Instructioncd testpython3 ./tag_test.py
zos-utilities
Library for performing various utility functions needed for z/OS libraries. I have a couple of libraries that do various things for/with z/OS, and they all need to convert from the z/OS Julian Date to datetime, so I thought I might as well put it into a library. I’m also starting to build a representation of z/OS and IBM Z from an infrastructure perspective.0.1.0 (2022-04-20)First release on PyPI.0.2.0 (2022-05-02)Add initial support for CPCs, LPARs, and logical CPUsChange minimum python level to 3.7 so I can use dataclasses. 3.6 is EOL anyway.0.3.0 (2022-05-04)Add support for PROCVIEW CPU systems0.3.1 (2022-05-04)Had conflicting requirements for twine in requirements_dev.txt0.4.0 (2022-05-10)Add some additional cpc and lpar fieldsAutomate build and publishing to Pypi0.5.0 (2022-05-25)Strip out leading spaces from inputs (because sometimes they’re getting passed in that way)0.5.3 (2022-06-13)Bugfixes0.6.0 (2023-06-25)Add initial support for IEE200I (D ASM output)
zot
UNKNOWN
zot4rst
BackgroundZoterois a useful tool for managing citations.zot4rst is an extension to the Pythondocutilspackage for including citations inreStructuredTextdocuments.zot4rst is developed under Linux, has been tested on Windows, and should run under Mac OS.InstallationInstallZotero.Download and install zotxt:https://bitbucket.org/egh/zotxt/downloads/zotxt.xpiInstall zot4rst:sudo python setup.py installQuickstartSeeexample/example.rst, and the generatedexample/example.pdfandexample/example.html. Citation syntax is identical to pandoc.zot4rst automatically maps citation keys (e.g., @DoeTitle2010) to entries in the zotero database. The key should be of the form @AuthorTitleDate. So, for the item:John Doe, “Article,” Journal of Generic Studies, 2006.You could use: @DoeArticle2006. This should be easy to use, but the reference needs to be unambiguous, which might be a problem if there are multiple items with the same author, title, and year. I am looking into ways to handle this better.To includeZoterocitations in areStructuredTextdocument, you must use the bundledzrst2*scripts, which have been modified to include support forzoterodirectives. These executables are installed usingsetup.pyabove. Currently, they are:zrst2htmlzrst2odtzrst2pdfzrst2pseudoxmlzrst2rstSphinxTo use in sphinx, simply add thezot4rst.sphinxextension to yourconf.pyfile:extensions = ['zot4rst.sphinx']PelicanTo use inpelican(version 3.1 or later), add the following to yourpelicanconf.pyfile:PLUGINS = [‘zot4rst.pelican_plugin’,]DetailsSome details, in no particular order.Note thatzrst2rstwill transform your citations into plain reStructuredText files without the Zotero extension. For example:A citation group :xcite:`[see @item1 p. 34-35; also @item3 chap. 3]`.will become:A citation group (see Doe 2005, p. 34–35; also Doe and Roe 2007, chap. 3).and the bibliography will be fully expanded. This can be used to create RST files that will work without zot4rst.If you use a footnote citation format, zot4rst will insert footnotes for you.However, if you also use regular autonumbered footnotes in the same section or paragraph, the ordering will be wrong. So if you want to do this, you will need to put your citations in a footnote explicitly. For example:Water is wet. [#]_ But there are those who dispute it. [#]_ .. [#] :xcite:`[See @item3]`. .. [#] These people are wrong.
zotac
Zotac toolsThis package simplifies remote manipulation of rosbags on zotac. It lets you copy rosbags to your PC and delete old robags. It also provides a view of all rosbags grouped by date.InstallationSimply run$python3-mpipinstallzotac(Requires python >= 3.6)UsageConfigure remotes, rosbag dir and optionally disk name (forzotac status)$zotacconfig\remotesREMOTE1,REMOTE2,REMOTE3,..\logdirPATH_TO_ROSBAGS\diskDISK_NAMEIt is possible to configure multiple remotes by passing a comma-separated list. When issuing commands to zotac, the tool will first select an available remote from the specified list.CommandsPrint the help$zotacCOMMAND--helpe.g.$zotaccopy--helpGet more detailed output (suitable for debugging):$zotacCOMMAND-v/--verbosee.g.$zotaclist-vView the rosbag directory$zotaclistCopy selected rosbag including logs$zotaccopy# By default copies second-to-last bag$zotaccopyROSBAG_INDEX $zotaccopyROSBAG_INDEXTARGET_DIRCopy only logs$zotaccopyROSBAG_INDEX-l/--logs-onlyDelete logs$zotacdelete-a/--all# Delete all$zotacdelete-u/--untilROSBAG_INDEX# Delete all bags before$zotacdelete-k/--keepROSBAG_INDEX# Keep all bags afterView disk usage$zotacstatusConfigure$zotacconfig\remotesREMOTE1,REMOTE2,REMOTE3,..\logdirPATH_TO_ROSBAGS\diskDISK_NAME
zotapaysdk
Official Python REST API SDKThis is theofficialpage of theZotapayPython SDK. It is intended to be used by developers who run modern Python applications and would like to integrate our next generation payments platform.REST API DocsOfficial Deposit DocumentationOfficial Payout DocumentationIntroductionThis Python SDK provides all the necessary methods for integrating the Zotapay Merchant API. This SDK is to be used by clients, as well as all the related eCommerce plugins for Python applications.The SDK covers all available functionality that ZotaPay's Merchant API exposes.RequirementsA functioning Zotapay Sandbox or Production account and related credentialsPython 3.5 (or higher)InstallationpipinstallzotapaysdkConfigurationAPI CONFIGURATION DOCSCredentials for the SDK can be passed in 3 different ways:To theMGClientitselfThrough environment variablesThrough a configuration fileThis part of the documentation will guide you on how to configure and use this SDK.Before you beginTo use this API, obtain the following credentials from Zotapay:MerchantID A merchant unique identifier, used for identification. MerchantSecretKey A secret key to keep privately and securely, used for authentication. EndpointID One or more unique endpoint identifiers to use in API requests.ContactZotapayto start your onboarding process and obtain all the credentials.API UrlThere are two environments to use with the Zotapay API:Sandbox environment, used for integration and testing purposes.https://api.zotapay-sandbox.comLive environment.https://api.zotapay.comConfiguration in the codeThe implementation fo the Zotapay API SDK depends on creating an instance of theMGClient. First priority configuration is the one passed to the client itself.Example:client=zotapaysdk.MGClient(merchant_id=<MerchantIDasreceivedfromZotapay>,merchant_secret_key=<MerchantSecretKeyasreceivedfromZotapay>,endpoint_id=<EndpointIDasreceivedfromZotapay>,request_url=<MGClient.LIVE_API_URLorMGClient.SANDBOX_API_URLor"https://api.zotapay-sandbox.com"...>)Passing configuration to the client itself is best when supporting multiple clients.Environment variables configurationThere are 4 environment variables that need to be set for the API SDK to be configured correctly:ZOTAPAY_MERCHANT_ID - MerchantID as received from Zotapay ZOTAPAY_MERCHANT_SECRET_KEY - MerchantSecretKey as received from Zotapay ZOTAPAY_ENDPOINT_ID - EndpointID as received from Zotapay ZOTAPAY_REQUEST_URL - https://api.zotapay-sandbox.com or https://api.zotapay.comConfiguration fileConfiguration parameters can be passed through a.mg_envfile placed in the user's home directory.The structure of the files follows Python'sconfigparserExample of a '~/.mg_env' :[MG] merchant_id=<MerchantID as received from Zotapay>, merchant_secret_key=<MerchantSecretKey as received from Zotapay>, endpoint_id=<EndpointID as received from Zotapay>, request_url=<MGClient.LIVE_API_URL or MGClient.SANDBOX_API_URL or "https://api.zotapay-sandbox.com"...>UsageIn order to use the SDK we need to instantiate a client:fromzotapaysdk.clientimportMGClientmg_client=MGClient()DepositA deposit request can be generated in two different ways:fromzotapaysdk.mg_requestsimportMGDepositRequestexample_deposit_request_with_kwargs=MGDepositRequest(merchant_order_id="QvE8dZshpKhaOmHY",merchant_order_desc="Test order",order_amount="500.00",order_currency="THB",customer_email="[email protected]",customer_first_name="John",customer_last_name="Doe",customer_address="5/5 Moo 5 Thong Nai Pan Noi Beach, Baan Tai, Koh Phangan",customer_country_code="TH",customer_city="Surat Thani",customer_zip_code="84280",customer_phone="+66-77999110",customer_ip="103.106.8.104",redirect_url="https://www.example-merchant.com/payment-return/",callback_url="https://www.example-merchant.com/payment-callback/",custom_param="{\"UserId\":\"e139b447\"}",checkout_url="https://www.example-merchant.com/account/deposit/?uid=e139b447",)or alternativelyexample_deposit_request=MGDepositRequest().\set_merchant_order_id("QvE8dZshpKhaOmHY").\set_merchant_order_desc("Test order").\set_order_amount("500").\set_order_currency("USD").\set_customer_email("[email protected]").\set_customer_first_name("John").\set_customer_last_name("Doe").\set_customer_address("5/5 Moo 5 Thong Nai Pan Noi Beach, Baan Tai, Koh Phangan").\set_customer_country_code("TH").\set_customer_city("Surat Thani").\set_customer_zip_code("84280").\set_customer_phone("+66-66006600").\set_customer_ip("103.106.8.104").\set_redirect_url("https://www.example-merchant.com/payment-return/").\set_callback_url("https://www.example-merchant.com/payment-callback/").\set_custom_param("{\"UserId\":\"e139b447\"}").\set_checkout_url("https://www.example-merchant.com/account/deposit/?uid=e139b447")Sending the request to Zotapay happens through the client:deposit_response=mg_client.send_deposit_request(example_deposit_request)print("Deposit Request is "+str(deposit_response.is_ok))In order to send aCredit Card Depositwe need to append the appropriateCredit Card Paramswhich is achieved through sending aMGCardDepositRequestexample_cc_deposit_request=MGCardDepositRequest(merchant_order_id="QvE8dZshpKhaOmHY",merchant_order_desc="Test order",order_amount="500.00",order_currency="THB",customer_email="[email protected]",customer_first_name="John",customer_last_name="Doe",customer_address="5/5 Moo 5 Thong Nai Pan Noi Beach, Baan Tai, Koh Phangan",customer_country_code="TH",customer_city="Surat Thani",customer_zip_code="84280",customer_phone="+66-77999110",customer_ip="103.106.8.104",redirect_url="https://www.example-merchant.com/payment-return/",callback_url="https://www.example-merchant.com/payment-callback/",custom_param="{\"UserId\":\"e139b447\"}",checkout_url="https://www.example-merchant.com/account/deposit/?uid=e139b447",# CC PARAMS HEREcard_number="3453789023457890",card_holder_name="John Doe",card_expiration_month="08",card_expiration_year="2027",card_cvv="123")deposit_response=mg_client.send_deposit_request(example_cc_deposit_request)print("Deposit Request is "+str(deposit_response.is_ok))Working withDeposit ResponseEach deposit attempt against a Zotapay returns either aMGDepositResponseorMGCardDepositResponse.The above objects are simply a wrapper around the standard HTTP response as describedhere.The response classes contain an additional helper method that validates the signature of the response when provided with amerchant_secret_keyPayoutSending a payout request is almost identical to sending a deposit request.The request is built:fromzotapaysdk.mg_requestsimportMGPayoutRequestexample_payout_request=\MGPayoutRequest(merchant_order_id="TbbQzewLWwDW6goc",merchant_order_desc="Test order",order_amount="500.00",order_currency="MYR",customer_email="[email protected]",customer_first_name="John",customer_last_name="Doe",customer_phone="+66-77999110",customer_ip="103.106.8.104",callback_url="https://www.example-merchant.com/payout-callback/",customer_bank_code="BBL",customer_bank_account_number="100200",customer_bank_account_name="John Doe",customer_bank_branch="Bank Branch",customer_bank_address="Thong Nai Pan Noi Beach, Baan Tai, Koh Phangan",customer_bank_zip_code="84280",customer_bank_province="Bank Province",customer_bank_area="Bank Area / City",customer_bank_routing_number="000",custom_param="{\"UserId\":\"e139b447\"}",checkout_url="https://www.example-merchant.com/account/withdrawal/?uid=e139b447")The client returnsMGPayoutResponsewhich is again a wrapper around the standard HTTP response.CallbacksMGCallbackis a class that parses the raw HTTP Request sent from Zotapay to the configured endpoint. It's purpose is to make working with callbacks manageable.ValidationsTheMGRequestclass implements avalidate()method which can be used for parameter validation of the request offline before the request is being sent. It's purpose is to check whether all the values passsed to the different parameters is in-line with what Zotapay's endpoint expects. See the API DOCS for more info and guidance about the format of the different parameters.Test Coverage
zotcher
Zotchermade with ❤️ bymentix02A simple (unofficial) Zomato™ Partner API client library & CLI.Note: Zotcher is in no way affiliated with Zomato™ or any of its subsidiaries. All trademarks are the property of their respective owners. The project itself is licensed under the GPLv3 license.Installationpip install zotcherEtymologyImportant things first.Zomato™ + fetcher = ZotcherMotivationZomato™ devs were too incompetent to provide order items in their CSV exports and after tearing my hair out by scraping their dashboard via client side Javascript, it became readily apparent that hacking around their private API would be far easier than sitting around and praying for them do the sensible thing. So I did.Config & UsageZotcher was built with convention over configuration in mind. All that is required by the user is the Node.js fetch call tofetch-orders-by-statesthat can be grabbed from Chrome's Network tab in it's developer tools.Open up theZomato Partner Dashboardin Chrome.Open the developer tools (F12). Click on "Network".Right clickfetch-orders-by-statesand select "Copy" -> "Copy as Node.js fetch".Paste the copied code into a file, e.g.fetch.js.Run theconfigcommand to generate a config file. This should create aconfig.jsonfile.$zotcher.pyconfigfetch.jsFetch the orders using thefetchcommand.$zotcher.pyfetchorders.jsonThis should save the orders from the past 10 days toorders.json. You can go further by tweaking the flags of thefetchcommand. Enjoy!
zote4o2-test
Medium multiplyA small demo library for a Medium publication about publishing libraries.Installationpip install medium-multiplyGet startedHow to multiply one number by another with this lib:frommedium_multiplyimportMultiplication# Instantiate a Multiplication objectmultiplication=Multiplication(2)# Call the multiply methodresult=multiplication.multiply(5)
zoter
Zoter is an interface to the Zotero API.
zotero2md
Zotero to MarkdownGenerate Markdown files from Zotero annotations and notes. With newZotero PDF Reader, all highlights are saved in the Zotero database. The highlights are NOT saved in the PDF file unless you export the highlights in order to save them.If you annotate your files outside the new Zotero PDF reader, this library will not work with your PDF annotations as those are not retrievable from Zotero API. In that case, you may want to use zotfile + mdnotes to extract the annotations and convert them into markdown files.This library is for you if you annotate (highlight + note) using the Zotero's PDF reader (including the Zotero iOS)InstallationYou can install the library by runningpipinstallzotero2mdNote: If you do not have pip installed on your system, you can follow the instructionshere.UsageSince we have to retrieve the notes from Zotero API, the minimum requirements are:Zotero API key[Required]: Create a new Zotero Key fromyour Zotero settingsZotero personal or group ID[Required]:Yourpersonal library ID(akauserID) can be foundherenext toYour userID for use in API calls is XXXXXX.If you're using agroup library, you can find the library ID byGo tohttps://www.zotero.org/groups/Click on the interested group.You can find the library ID from the URL link that has format likehttps://www.zotero.org/groups/<group_id>/group_name. The number between/groups/and/group_nameis the libarry ID.Zotero library type[Optional]:"user"(default) if using personal library and"group"if using group library.Note that if you want to retrieve annotations and notes from a group, you should provide the group ID (zotero_library_id=<group_id>) and set the library type to group (zotero_library_type="group").Approach 1 (Recommended)After installing the library, open a Python terminal, and then execute the following:fromzotero2md.zt2mdimportZotero2Markdownzt=Zotero2Markdown(zotero_key="your_zotero_key",zotero_library_id="your_zotero_id",zotero_library_type="user",# "user" (default) or "group"params_filepath="",# [Default values provided bellow] # The path to JSON file containing the custom parameters (See Section Custom Output Parameters).include_annotations=True,# Default: Trueinclude_notes=True,# Default: True)zt.run_all()Just to make sure that all files are created, you can runsave_failed_items_to_txt()to ensure that no file was was failed to create. If a file or more failed to create, the filename (item title) and the corresponding Zotero item key will be saved to a txt file.zt.save_failed_items_to_txt("failed_zotero_items.txt")Approach 2For this approach, you need to downloadoutput_to_md.pyscript. Runpython output_to_md.py -hto get more information about all options.pythonzotero2md/output_to_md.py<zotero_key><zotero_id>For instance, assuming zotero_key=abcd and zotero_id=1234, you can simply run the following:pythonzotero2md/output_to_md.pyabcd1234Custom Output ParametersYou can change default parameters by passing the--config_filepathoption with the path to a JSON file containing the desired configurations. For instance,pythonzotero2md/generate.py<zotero_key><zotero_id>--config_filepath./sample_params.jsonParametertypedefault valueconvertTagsToInternalLinksbooltruedoNotConvertFollowingTagsToLinkList of strings[ ]includeHighlightDatebooltruehideHighlightDateInPreviewbooltrueAny parameter in the JSON file will override the default setting. If a parameter is not provided, then the default value will be used.For example, if you don't want to show the highlight date in the output file, you can simply pass a JSON file with the following content:{"hideHighlightDateInPreview":false}FeaturesGenerate MD files for all annotations and notes saved in ZoteroThe ability to convert Zotero tags to internal links ([[ ]]) used in many bidirectional MD editors.You can even pass certain tags that you don't want to convert to internal links! (usingdoNotConvertFollowingTagsToLinkparameter)Quick noteSince I'm personally using Obsidian as my markdown editor, there are custom parameters to generate MD files that are consistent with Obsidian and I'm planning to add more option there.RoadmapUpdate existing annotations and notesOption to add frontmatter section (particularly useful for Obsidian)More flexibility in styling the output filesRequest a new feature or report a bugFeel free to request a new feature or report a bug in GitHub issuehere.📫 How to reach me:
zotero2readwise
Zotero ➡️ Readwisezotero2readwiseis a Python library that retrieves allZoteroannotations† and notes. Then, It automatically uploads them to yourReadwise§.This is particularly useful for the newZotero PDF Readerthat stores all highlights in the Zotero database. The new Zotero, also available foriOS app(currently in beta). In the new Zotero, the annotations are NOT saved in the PDF file unless you export the highlights in order to save them.If you annotate your files outside the new Zotero PDF reader, this library may not work with your PDF annotations as those are not retrievable from Zotero API.This library is for you if you annotate (highlight + note) using the Zotero's PDF reader (including the Zotero iOS)👉Updating an existing Zotero annotation or note and re-running this library will update the corresponding Readwise highlight without creating a duplicate!† Annotations made in the new Zotero PDF reader and note editor.§ Readwise is apaidservice/software that integrates your highlights from almost everywhere (Pocket, Instapaper, Twitter, Medium, Apple Books, and many more). It even has an amazing OCR for directly importing your highlights on a physical book/article into Readwise and allowing you to export all your highlights to Obsidian, Notion, Roam, Markdown, etc. Moreover, It has an automatedSpaced RepitionandActive Recall.InstallationYou can install the library by runningpipinstallzotero2readwiseNote: If you do not have pip installed on your system, you can follow the instructionshere.UsageSince we have to retrieve the notes from Zotero API and then upload them to the Readwise, the minimum requirements are:Readwise access token[Required]: You can get your access token fromhttps://readwise.io/access_tokenZotero API key[Required]: Create a new Zotero Key fromyour Zotero settingsZotero personal or group ID[Required]:Yourpersonal library ID(akauserID) can be foundherenext toYour userID for use in API calls is XXXXXX.If you're using agroup library, you can find the library ID byGo tohttps://www.zotero.org/groups/Click on the interested group.You can find the library ID from the URL link that has format likehttps://www.zotero.org/groups/<group_id>/group_name. The number between/groups/and/group_nameis the libarry ID.Zotero library type[Optional]:"user"(default) if using personal library and"group"if using group library.Note that if you want to retrieve annotations and notes from a group, you should provide the group ID (zotero_library_id=<group_id>) and set the library type to group (zotero_library_type="group").Approach 1 (running a python script)For this approach you can downloadrun.pyscript (fromhere). Runpython run.py -hto get more information about all options. You can simply run the script as the following:pythonrun.py<readwise_token><zotero_key><zotero_id>Approach 2 (through python terminal)fromzotero2readwise.zt2rwimportZotero2Readwisezt_rw=Zotero2Readwise(readwise_token="your_readwise_access_token",# Visit https://readwise.io/access_token)zotero_key="your_zotero_key",# Visit https://www.zotero.org/settings/keyszotero_library_id="your_zotero_id",# Visit https://www.zotero.org/settings/keyszotero_library_type="user",# "user" (default) or "group"include_annotations=True,# Include Zotero annotations -> Default: Trueinclude_notes=False,# Include Zotero notes -> Default: False)zt_rw.run()Just to make sure that all files are created, you can runsave_failed_items_to_json()fromreadwiseattribute of the class object to save any highlight that failed to upload to Readwise. If a file or more failed to create, the filename (item title) and the corresponding Zotero item key will be saved to a txt file.zt_rw.readwise.save_failed_items_to_json("failed_readwise_highlights.json")Zotero2Readwise-Sync👉 Set up a scheduled automation once and forget about it!You can fork my repoZotero2Readwise-Syncrepository that contain the cronjob (time-based Job scheduler) using GitHub actions to automatically retrieve all your Zotero annotations/notes, and then push them to Readwise. You can use the forked repo without even changing a single line (of course if you're happy with the default settings!)Request a new feature or report a bugFeel free to request a new feature or report a bug in GitHub issuehere.📫 How to reach me:
zotero2wordcloud
zotero2wordcloudCreate a word cloud based on a specified field of a collection of papers from Zotero.Installation instructionsOpen a terminal window, and create a new virtual environment calledzotero2wordcloudUsingConda:conda create --name zotero2wordcloudUsing python:python3.7 -m venv my_envActivate the new environmentconda activate zotero2wordcloudorsource zotero2wordcloud/bin/activateNote always work in this virtual environment when working on this project, and deactivate the environment when you're done.Navigate to the folder where you'd like to install this packagecd <yourpath/GitHub/mkdir zotero2wordcloudcd zotero2wordcloudInstallUsing pip:pip install zotero2wordcloudUsing Anaconda:conda config --add channels conda-forge && conda install zotero2wordcloudUsage instructions:Before starting, you'll need three pieces of information from Zotery: library ID, library type, and API key.Your personal library ID is availablefrom Zotero.If you're using a group library, the ID is on the group's pagehttps://www.zotero.org/groups/yourgroupname. Hover over theGroup Settingslink.You will likely need tocreate a new API keyIf you're having trouble getting access to your Zotero library, check out example #1 in the/examplesfolder. Also seePyzotero documentationfor more information.Using terminal:from zotero2wordcloud.zoterto2wordcloud import zotero2wordcloudUsing Anacondajupyter lab zotero2wordcloud.ipynbReporting issuesIf you encounter an error while using this package, please open an issue on itsGithub issues page.Licensezotero2wordcloud is licensed under theGNU General Public License v3.0.
zotero-bibtize
zotero-bibtizeRefurbish exported Zotero-BibTex bibliographies into a morefriendly representation.In the current state exporting the contents of a Zotero database to Bibtex format most special characters are replaced by Zotero internal versions or escaped before written to the output file. This behavior is exceptionally annoying if entries contain code which is meant to be processed by(i.e. chemical or mathematical expressions and formulas in the title, etc.).zotero-bibtizecan be used to post-process the generated Zotero output files and remove added escape sequences (i.e. the output is an identical replica of the raw entry contents stored in the Zotero interface)UsageAfter installing the packagezotero-bibtizecan be invoked via a call to thezotero-bibtizecommand on the command line:$zotero-bibtizezotero_bibliography.bibbibtized_bibliography.bibwhich will process the original contentszotero_bibliography.biband writes the processed contents to the newbibtized_bibliography.bibfile. Note that specifying a target file is optional and the input file will be overwritten if left out.ExampleOriginal bibtex entry generated by Zotero export:$catzotero_bibliography.bib@article{LangCM2015,title = {Lithium {Ion} {Conduction} in {\textbackslash}ce\{{LiTi}2({PO}4)3\} and {Related} {Compounds} {Based} on the \{{NASICON}\} {Structure}: {A} {First}-{Principles} {Study}},volume = {27},issn = {0897-4756, 1520-5002},shorttitle = {Lithium {Ion} {Conduction} in {\textbackslash}ce\{{LiTi}2({PO}4)3\} and {Related} {Compounds} {Based} on the {NASICON} {Structure}},url = {http://pubs.acs.org/doi/10.1021/acs.chemmater.5b01582},doi = {10.1021/acs.chemmater.5b01582},language = {en},number = {14},urldate = {2019-02-11},journal = {Chem. Mater.},author = {Lang, Britta and Ziebarth, Benedikt and Els{\textbackslash}"\{a\}sser, Christian},month = jul,year = {2015},pages = {5040--5048}}After runningzotero-bibtize zotero_bibliography.bib:$catzotero_bibliography.bib@article{LangCM2015,title = {Lithium Ion Conduction in \ce{LiTi2(PO4)3} and Related Compounds Based on the NASICON Structure: A First-Principles Study},volume = {27},issn = {0897-4756, 1520-5002},shorttitle = {Lithium Ion Conduction in \ce{LiTi2(PO4)3} and Related Compounds Based on the NASICON Structure},url = {http://pubs.acs.org/doi/10.1021/acs.chemmater.5b01582},doi = {10.1021/acs.chemmater.5b01582},language = {en},number = {14},urldate = {2019-02-11},journal = {Chem. Mater.},author = {Lang, Britta and Ziebarth, Benedikt and Els\"{a}sser, Christian},month = jul,year = {2015},pages = {5040--5048}}Custom BibTex Keys (very experimental)Custom BibTex keys can be defined through the optional--key-formatoption that will be written to the bibliography file instead of the default keys generated by Zotero. The key format defines the way how to combine and format contents taken from the BibTex entry fields to build a custom key format. In general the format key is of the form[field1:option][field2:option]...wherefielddefines the BibTex entry field to take the contents from and the options defines different format options that will be applied to the contents. Currently the following fields are implemented:authorAdds the author's lastnames to the key entryGeneral format:[author:num:options]numDefines the maximal number of author names used for the keyoptionsThe format options that will be applied to the author names, i.e.capitalize: Capitalize the namesupper: Transform names uppercaselower: Transform names to lowercaseabbreviate: Only us the first letter instead of the full nametitleAdds contents of the title string to the key entryGeneral format:[title:num:options]numDefines the maximal number of words in the title used for the key (Note thatfunction keyswill not be taken into account)optionsThe format options that will be applied to the title contents, i.e.capitalize: Capitalize the namesupper: Transform names uppercaselower: Transform names to lowercaseabbreviate: Only us the first letter instead of the full namejournalAdds contents of the journal name to the key entryGeneral format:[journal:options]optionsThe format options that will be applied to the journal name, i.e.capitalize: Capitalize the namesupper: Transform names uppercaselower: Transform names to lowercaseabbreviate: Only us the first letter instead of the full nameyearAdd the publication year to the key entryGeneral format:[year:option]optionAdding the year only allows to specify two types of options:short: Add the year to the key as 2-digit quantitylong: Add the full year to the (i.e. as 4-digit quantitiy)ExampleIn the following example we create a custom key containing the first author name and the abbreviated journal name followed by the publication year. The key format defining such a key is of the following form:[author:1:capitalize][journal:capitalize:abbreviate][year]The original entry generated by Zotero looks like this:$catzotero_bibliography.bib@article{lang_lithium_ion_conduction_2015,title = {Lithium {Ion} {Conduction} in {\textbackslash}ce\{{LiTi}2({PO}4)3\} and {Related} {Compounds} {Based} on the \{{NASICON}\} {Structure}: {A} {First}-{Principles} {Study}},volume = {27},issn = {0897-4756, 1520-5002},shorttitle = {Lithium {Ion} {Conduction} in {\textbackslash}ce\{{LiTi}2({PO}4)3\} and {Related} {Compounds} {Based} on the {NASICON} {Structure}},url = {http://pubs.acs.org/doi/10.1021/acs.chemmater.5b01582},doi = {10.1021/acs.chemmater.5b01582},language = {en},number = {14},urldate = {2019-02-11},journal = {Chem. Mater.},author = {Lang, Britta and Ziebarth, Benedikt and Els{\textbackslash}"\{a\}sser, Christian},month = jul,year = {2015},pages = {5040--5048}}After runningzotero-bibtize zotero_bibliography.bib --key-format [author:1:capitalize][journal:capitalize:abbreviate][year]the original contents will be processed byzotero-bibtizeand the original Zotero key will be replaced with the modified version:$catzotero_bibliography.bib@article{LangCM2015,title = {Lithium Ion Conduction in \ce{LiTi2(PO4)3} and Related Compounds Based on the NASICON Structure: A First-Principles Study},volume = {27},issn = {0897-4756, 1520-5002},shorttitle = {Lithium Ion Conduction in \ce{LiTi2(PO4)3} and Related Compounds Based on the NASICON Structure},url = {http://pubs.acs.org/doi/10.1021/acs.chemmater.5b01582},doi = {10.1021/acs.chemmater.5b01582},language = {en},number = {14},urldate = {2019-02-11},journal = {Chem. Mater.},author = {Lang, Britta and Ziebarth, Benedikt and Els\"{a}sser, Christian},month = jul,year = {2015},pages = {5040--5048}}
zotero-cli
No description available on PyPI.
zotero-cli-tool
Zotero CLISort and rank your Zotero references easy from your CLI.Ask questions to your Zotero documents with GPT locally.ThisTinyscripttool relies onpyzoterofor communicating withZotero's Web API. It allows to list field values, show items in tables in the CLI or also export sorted items to an Excel file.$ pip install zotero-cli-toolQuick StartThe first time you start it, the tool will ask for your API identifier and key. It will cache it to~/.zotero/creds.txtwith permissions set torwfor your user only. Data is cached to~/.zotero/cache/. If you are using a shared group library, you can either pass the "-g" ("--group") option in yourzotero-clicommand or, for setting it permanently, touch an empty file~/.zotero/group.Manually update cached data$zotero-cliresetNote that it could take a while. That's why caching is interesting for further use.Count items in a collection$zotero-clicount--filter"collections:biblio"123List values for a given field$zotero-clilistitemTypeType----computerprogramconferencepaperdocumentjournalarticlemanuscriptthesiswebpageShow entries with the given set of fields, filtered based on multiple critera and limited to a given number of items$zotero-clishowyeartitleitemTypenumPages--filter"collections:biblio"--filter"title:detect"--limit">date:10"YearTitleType#Pages-------------------2016ClassifyingPackedProgramsasMaliciousSoftwareDetectedconferencepaper32016DetectingPackedExecutableFile:SupervisedorAnomalyDetectionMethod?conferencepaper52016Entropyanalysistoclassifyunknownpackingalgorithmsformalwaredetectionconferencepaper212017PackerDetectionforMulti-LayerExecutablesUsingEntropyAnalysisjournalarticle182018SensitivesystemcallsbasedpackedmalwarevariantsdetectionusingprincipalcomponentinitializedMultiLayersneuralnetworksjournalarticle132018Effective,efficient,androbustpackingdetectionandclassificationjournalarticle152019Efficientautomaticoriginalentrypointdetectionjournalarticle142019All-in-OneFrameworkforDetection,Unpacking,andVerificationforMalwareAnalysisjournalarticle162020ExperimentalComparisonofMachineLearningModelsinMalwarePackingDetectionconferencepaper32020Buildingasmartandautomatedtoolforpackedmalwaredetectionsusingmachinelearningthesis99Export entries$zotero-cliexportyeartitleitemTypenumPages--filter"collections:biblio"--filter"title:detect"--limit">date:10"$fileexport.xlsxexport.xlsx:MicrosoftExcel2007+Use a predefined query$zotero-clishow---query"top-50-most-relevants"Note: "-" is used for thefieldpositional argument to tell the tool to select the predefined list of fields included in the query.This is equivalent to:$zotero-clishowyeartitlenumPagesitemType--limit">rank:50"Available queries:no-attachment: list of all items with no attachment ; displayed fields:titleno-url: list of all items with no URL ; displayed fields:year,titletop-10-most-relevants: top-10 best ranked items ; displayed fields:year,title,numPages,itemTypetop-50-most-relevants: same as top-10 but with the top-50Mark items:$zotero-climarkread--filter"title:a nice paper"$zotero-climarkunread--filter"title:a nice paper"Markers:read/unread: by default, items are displayed in bold ; marking an item as read will make it display as normalirrelevant/relevant: this allows to exclude a result from the output list of itemsignore/unignore: this allows to completely ignore an item, including in the ranking algorithmLocal GPTThis feature is based onPrivateGPT. It can be used to ingest local Zotero documents and ask questions based on a chosen GPT model.Install optional dependencies$pipinstallzotero-cli-tool[gpt]Install a model among the followings:ggml-gpt4all-j-v1.3-groovy.bin(default)ggml-gpt4all-l13b-snoozy.binggml-mpt-7b-chat.binggml-v3-13b-hermes-q5_1.binggml-vicuna-7b-1.1-q4_2.binggml-vicuna-13b-1.1-q4_2.binggml-wizardLM-7B.q4_2.binggml-stable-vicuna-13B.q4_2.binggml-mpt-7b-base.binggml-nous-gpt4-vicuna-13b.binggml-mpt-7b-instruct.binggml-wizard-13b-uncensored.bin$zotero-cliinstallThe latest installed model gets selected for theaskcommand (see hereafter).Ingest your documents$zotero-cliingestAsk questions to your documents$zotero-cliask UsingembeddedDuckDBwithpersistence:datawillbestoredin:/home/morfal/.zotero/db Foundmodelfile.[...]Enteraquery:Special FeaturesSome additional fields can be used for listing/filtering/showing/exporting data.Computed fieldsauthors: the list ofcreatorswithcreatorTypeequal toauthorcitations: the number of relations the item has to other items with a later dateeditors: the list ofcreatorswithcreatorTypeequal toeditornumAttachments: the number of child items withitemTypeequal toattachmentnumAuthors: the number ofcreatorswithcreatorTypeequal toauthornumCreators: the number ofcreatorsnumEditors: the number ofcreatorswithcreatorTypeequal toeditornumNotes: the number of child items withitemTypeequal tonotenumPages: the (corrected) number of pages, either got from the original orpagesfieldreferences: the number of relations the item has to other items with an earlier dateyear: the year coming from thedatetimeparsing of thedatefieldExtracted fields (from theextrafield)comments: custom field for adding commentsresults: custom field for mentioning results related to the itemwhat: custom field for a short description of what the item is aboutzscc: number of Scholar citations, computed with theZotero Google Scholar CitationspluginPageRank-based reference ranking algorithmrank: computed field aimed to rank references in order of relevance ; this uses an algorithm similar to Google's PageRank while weighting references in function of their year of publication (giving more importance to recent references, which cannot have as much citations as older references anyway)
zotero.py
No description available on PyPI.
zoterosync
ZoterosyncSyncs local zotero files to a remote storage using rclone. This is a work in progress.Software requirementspython 3piprclonevirtualenv: virtual environment is apropriated to install compatible dependenciesbashRecomended softwareLinux Distro: not tested on other platformsGoogle Drive: rclone is compatible with a lot of cloud storage, but we've tested only with 'drive' option.Install zoterosyncDownload the latest version with git:gitclonehttps://gitlab.com/marceloakira/zoterosyncCreate a virtual environment with python3 as default interpreter:virtualenv--python=python3zoterosyncInstall required python libraries inside virtual environment:cdzoterosyncsourcebin/activate pipinstall-rrequirements.txtCreate configuration:# generates default configurationpythonzoterosync_cli.pyconfigSetup script:# create a directory for executable scriptsmkdir-P~/bin# add this path to PATH environment variableecho"~/bin">>~/.profile# setup scriptln-s$PWD/zoterosync.bash~/bin/zoterosync# close the current terminal and test commandzoterosyncConfigure a remote storage$ rclone config Current remotes: Name Type ==== ==== e) Edit existing remote n) New remote d) Delete remote r) Rename remote c) Copy remote s) Set configuration password q) Quit config e/n/d/r/c/s/q> n name> Quantum Computing Type of storage to configure. Enter a string value. Press Enter for the default (""). Choose a number from below, or type in your own value ... 13 / Google Drive \ "drive" ... Storage>13 * See help for drive backend at: https://rclone.org/drive/ ** Google Application Client Id Setting your own is recommended. See https://rclone.org/drive/#making-your-own-client-id for how to create your own. If you leave this blank, it will use an internal key which is low performance. Enter a string value. Press Enter for the default (""). client_id> <--- press Enter OAuth Client Secret Leave blank normally. Enter a string value. Press Enter for the default (""). client_secret> <--- press Enter Scope that rclone should use when requesting access from drive. Enter a string value. Press Enter for the default (""). Choose a number from below, or type in your own value 1 / Full access all files, excluding Application Data Folder. \ "drive" ... scope> 1 ID of the root folder Leave blank normally. Fill in to access "Computers" folders (see docs), or for rclone to use a non root folder as its starting point. Enter a string value. Press Enter for the default (""). root_folder_id> <--- press Enter Service Account Credentials JSON file path Leave blank normally. Needed only if you want use SA instead of interactive login. Leading `~` will be expanded in the file name as will environment variables such as `${RCLONE_CONFIG_DIR}`. Enter a string value. Press Enter for the default (""). service_account_file> <--- Press Enter Edit advanced config? (y/n) y) Yes n) No (default) y/n> <-- press Enter Use auto config? * Say Y if not sure * Say N if you are working on a remote or headless machine y) Yes (default) n) No y/n> <-- press Enter If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=WOqyzeguK5dtqpDkDnplOQ Log in and authorize rclone for access Waiting for code... <-- configuration with browser Log in and authorize rclone for access Waiting for code... Got code Configure this as a team drive? y) Yes n) No (default) y/n> y Fetching team drive list... Choose a number from below, or type in your own value ... 3 / Quantum Computing \ "0ABtgQWBCM1GiUk9PVA" ... [Quantum Computing] type = drive scope = drive token = {xxx} team_drive = 0AIZzmLgyr5CaUk9PVA root_folder_id = -------------------- y) Yes this is OK (default) e) Edit this remote d) Delete this remote y/e/d> yList your groups and set a remote$zoterosynclistremotes quantum-computing $zoterosynclistgroups QuantumComputing $zoterosyncsetremote'Quantum Computing''quantum-computing'creatingremotepathquantum-computing:zotero-storage remotepathcreatedList your groups in local storage and push$zoterosyncpush'Quantum Computing'...2020/12/2511:50:43INFO:Transferred:19.321M/19.321MBytes,100%,282.299kBytes/s,ETA0s Transferred:34/34,100% Elapsedtime:1m12.2sList your remotes and pull$zoterosynclistremotes QuantumComputing $zoterosyncpull'Quantum Computing'pullingchangedfilesfromremotetolocalstorage2020/12/2511:53:53INFO:Therewasnothingtotransfer2020/12/2511:53:53INFO:Transferred:0/0Bytes,-,0Bytes/s,ETA- Checks:34/34,100% Elapsedtime:3.5s ...That's it, enjoy zoterosync!
zotero-sync
Zotero SyncBack up your data when using this script. I have not lost any, but I can't make any guarantees.A simple module for updating zotflies directories. You can use this to delete redundant files or upload newly added files from the filesystem. It works by looking at every reference you have on zotero.org (you don't need to have files uploaded to make this work) and then compares the paths of those attachements to the ones in you zotfile directory. If there are any on your zotfile directory that aren't in your zotfile cloud, you can choose to "trash" or "upload" them.Installationpipinstallzotero_syncUsageGo and create a new api key athttps://www.zotero.org/settings/keys. Take note of the api key and also take note of the line that says "Your userID for use in API calls is ***"Create a.zoterosyncfile in your home directory:#~/.zoterosyncZOTFILE_DIR='***'USER_ID='***'API_KEY='***'For information on script usage.zotero_sync--help
zoterotex
zoterotexWrapper forpyzoterothat keeps a BibTeX file in sync with a Zotero library.SetupAPI KeyYou'll need an API key to usezoterotex, which can be created inyour Zotero account.InstallationpipinstallzoterotexExample usageFor a user libraryYou can retrieve your userid fromyour Zotero keys settings. For example, if your username is 54321, you can sync with:zoterotexsyncuser54321myuser.bib--api-keyaabbccdd11223344For a group libraryIf you navigate to [your Zotero groups], you can grab a group ID from the url. For example, group 12345678 has the URLhttps://www.zotero.org/groups/12345678/my_group_name, and you can sync like so:zoterotexsyncgroup12345678mygroup.bib--api-keyaabbccdd11223344
zotero-word-items-to-collection
# Zotero Word items to collectionA Python utility to create a Zotero collection from items added to a Word (.docx) document via the Zotero Word integration.## Setup - Open a commandline and install using pip:pip install zotero_word_items_to_collection- Login to Zotero online and create a Zotero API key with write permissions here:https://www.zotero.org/settings/keys/new- Copy the API string displayed after you saved it and save it to an empty file in your home directory called:~/.zotero_api_key(you can also parse it via the–api-keyargument)## Usage On a commandline run:` zotero_word_items_to_collection <path/to/docx/file> "New collection name" `(add-hfor help or-nto do a dryrun first)## Credit Michel Wortmann <[email protected]>MIT Licence
zotion
WIP Python client for official Notion API (now in public beta)For now just internal integrations.Feel free to contribute.MIT license.
zotmer
UNKNOWN
zotnote
ZotNoteAutomatize and manage your reading notes with Zotero & Better Bibtex Plugin (BBT).Note: ZotNote is still in early development and not production readyCurrent featuresSimple installation via pipx/pipFull command-line interface to create, edit, and remove notesGraphical interface to select a Zotero itemSupport for various reading note templatesPlanned featuresAnnotation of reading notes and individual quotes using tags/keywordsRetrieval of relevant quotes based on these tags and keywordsAnalytics based on these tags and keywordsEnrich reading notes with more metadata from ZoteroSimple reports about progress of literature review(dreaming) Automatically export collection of notes as an annotated bibliography.Long-term visionA literature review suite that connects to Zotero & BBT. Management of reading notes, reading/writing analytics, and basic qualitative text analysis (export reports as HTML via Jupyter notebooks). Export of reading notes in different formats (e.g., annotated bibliography).You can find a roadmap for ZotNotehere.InstallationRequirementsPython3.6 or higherZotero StandalonewithBetter Bibtex pluginRecommended: Install via pipxThe recommended way to install ZotNote is usingpipx. Pipx cleanly install the package in an isolated environment (clean uninstalls!) and automagically exposes the CLI-endpoints globally on your system.pipx install zotnoteOption 2: Install via pipHowever, you can also simply use pip. Please be aware of the Python version and environments you are using.pip install zotnoteOption 3: Download from GitHubDownload the latest release from Github and unzip. Put the folder containing the scripts into yourPATH.Alternatively, run[sudo] python3 setup.py installorpython3 setup.py install --userOption 4: Git clone (for developers)git clone [email protected]:Bubblbu/zotnote.gitThe project is being developed withPoetryas a dependency manager.More instructions will follow soon!Getting startedUsage: zotnote [OPTIONS] COMMAND [ARGS]... CLI for ZotNote. Options: --help Show this message and exit. Commands: add Create a new note. config Configure Zotnote from the command line. edit Open a note in your editor of choice. remove Remove a note templates List all available templates for notes.ConfigurationAfter installation you should be able to simply runzotnoteand be prompted to a quick command-line configuration.ZotNote currently asks you for:A name which is used in all reading notes.An email addressA folder to store your reading notesUsageSome basic use cases:Create a note with the graphical interface (Zotero picker)zotnote addCreate for specific citekeyzotnote add [citekey]Edit a note (with graphical picker)zotnote editorzotnote edit [citekey]You can explore each command in detail by adding--help.AuthorsWritten byAsura Enkhbayarwhile he was quarantined.
zotutil
ZotUtilA Python Module of Zotero Utilities.Free software: MIT licenseHistory0.1.0 (2020-06-23)First release.0.1.1 (2020-07-19)Update empty directories removal.
zou
Zou, the Kitsu API is the memory of your animation productionThe Kitsu API allows to store and manage the data of your animation/VFX production. Through it, you can link all the tools of your pipeline and make sure they are all synchronized.A dedicated Python client,Gazu, allows users to integrate Zou into the tools.FeaturesZou can:Store production data, such as projects, shots, assets, tasks, and file metadata.Track the progress of your artistsStore preview files and version themProvide folder and file paths for any taskImport and Export data to CSV filesPublish an event stream of changesInstallation and DocumentationInstallation of Zou requires the setup of third-party tools such as a database instance, so it is recommended to follow the documentation:https://zou.cg-wire.com/Specification: -https://api-docs.kitsu.cloud/ContributingContributions are welcomed so long as theC4 contractis respected.Zou is based on Python and theFlaskframework.You can use the pre-commit hook for Black (a Python code formatter) before committing:pipinstallpre-commitpre-commitinstallInstructions for setting up a development environment are available inthe documentationContributors@aboellinger (Xilam/Spa)@BigRoy (Colorbleed)@EvanBldy (CGWire) -maintainer@ex5 (Blender Studio)@flablog (Les Fées Spéciales)@frankrousseau (CGWire) -maintainer@kaamaurice (Tchak)@g-Lul (TNZPV)@pilou (Freelancer)@LedruRollin (Cube-Xilam)@mathbou (Zag)@manuelrais (TNZPV)@NehmatH (CGWire)@pcharmoille (Unit Image)@Tilix4 (Normaal)About authorsKitsu is written by CGWire, a company based in France. We help with animation and VFX studios to collaborate better through efficient tooling. We already work with more than 70 studios around the world.Visitcg-wire.comfor more information.
zouaho_nester
UNKNOWN
zouhao_nester
UNKNOWN
zounds
MotivationZounds is a python library for working with sound. Its primary goals are to:layer semantically meaningful audio manipulations on top of numpy arrayshelp to organize the definition and persistence of audio processing pipelines and machine learning experiments with soundAudio processing graphs and machine learning pipelines are defined usingfeatureflow.A Quick ExampleimportzoundsResampled=zounds.resampled(resample_to=zounds.SR11025())@zounds.simple_in_memory_settingsclassSound(Resampled):""" A simple pipeline that computes a perceptually weighted modified discrete cosine transform, and "persists" feature data in an in-memory store. """windowed=zounds.ArrayWithUnitsFeature(zounds.SlidingWindow,needs=Resampled.resampled,wscheme=zounds.HalfLapped(),wfunc=zounds.OggVorbisWindowingFunc(),store=True)mdct=zounds.ArrayWithUnitsFeature(zounds.MDCT,needs=windowed)weighted=zounds.ArrayWithUnitsFeature(lambdax:x*zounds.AWeighting(),needs=mdct)if__name__=='__main__':# produce some audio to test our pipeline, and encode it as FLACsynth=zounds.SineSynthesizer(zounds.SR44100())samples=synth.synthesize(zounds.Seconds(5),[220.,440.,880.])encoded=samples.encode(fmt='FLAC')# process the audio, and fetch features from our in-memory store_id=Sound.process(meta=encoded)sound=Sound(_id)# grab all the frequency information, for a subset of the durationstart=zounds.Milliseconds(500)end=start+zounds.Seconds(2)snippet=sound.weighted[start:end,:]# grab a subset of frequency information for the duration of the soundfreq_band=slice(zounds.Hertz(400),zounds.Hertz(500))a440=sound.mdct[:,freq_band]# produce a new set of coefficients where only the 440hz sine wave is# presentfiltered=sound.mdct.zeros_like()filtered[:,freq_band]=a440# apply a geometric scale, which more closely matches human pitch# perception, and apply it to the linear frequency axisscale=zounds.GeometricScale(50,4000,0.05,100)log_coeffs=scale.apply(sound.mdct,zounds.HanningWindowingFunc())# reconstruct audio from the MDCT coefficientsmdct_synth=zounds.MDCTSynthesizer()reconstructed=mdct_synth.synthesize(sound.mdct)filtered_reconstruction=mdct_synth.synthesize(filtered)# start an in-browser REPL that will allow you to listen to and visualize# the variables defined above (and any new ones you create in the session)app=zounds.ZoundsApp(model=Sound,audio_feature=Sound.ogg,visualization_feature=Sound.weighted,globals=globals(),locals=locals())app.start(9999)Find more inspiration in theexamples folder, or on theblog.InstallationLibsndfile IssuesInstallation currently requires you to build lbiflac and libsndfile from source, because ofan outstanding issuethat will be corrected when the apt package is updated tolibsndfile 1.0.26. Download and runthis scriptto handle this step.Numpy and ScipyTheAnacondapython distribution is highly recommended.ZoundsFinally, just:pipinstallzounds
zouqi
Zouqi: A Python CLI Starter Purely Built on argparse.Zouqi (『走起』) is a CLI starter similar to [python-fire]. It is purely built on argparse.Installationpip install zouqiExampleCheckexample.pyfor a detailed example.
zourite
Zourite is a client for professional Network like LinkedIn. You can stay connected to your contacts and manage you network.
zourmat-libpythonpro
libpythonproMódulo para exemplificar construção de projetos Python no curso PyToolsNesse curso é ensinado como contribuir com projetos de código abertoLink para o cursoPython ProSuportada versão 3 de PythonPara instalar:pip install pipenvpipenv install --devPara conferir qualidade de código:pipenv run flake8Tópicos a serem abordados:GitVirtualenvPipMockPipenv
zouss
No description available on PyPI.
zouti-utils
zouti-utilsby ZoutigeWolf
zoviz
Zoviz is an unaffiliated library for accessing and visualizing Zotero data.Gitlab project:https://gitlab.com/jlogan03/zoviz(includes example.ipynb notebook)RTFM:https://zoviz.readthedocs.io/en/latest/index.htmlExample application: visualizing the graph of collaboration between creators
zowe
No description available on PyPI.
zowe-core-for-zowe-sdk
No description available on PyPI.
zowe-secrets-for-zowe-sdk
Secrets PackageContains APIs to store, retrieve, and delete credentials in the end user's operating system (OS) keyring.This Python package requires the OS keyring to be unlocked before credentials can stored or retrieved. Please follow theinstallation guidelines for Zowe CLIto ensure that the Secure Credential Store is accessible.If you are using a headless Linux environment, please consult the following article on Zowe Docs:Configuring Secure Credential Store on headless Linux operating systems.Examplefromzowe.secrets_for_zowe_sdkimportkeyring# Store a short password using the keyring module:password="Zowe ❕"keyring.set_password("Test","ShortPassword",password)# Retrieving a password under a given service and account:assertkeyring.get_password("Test","ShortPassword")==password# Deleting a password:assertkeyring.delete_password("Test","ShortPassword")assertkeyring.get_password("Test","ShortPassword")isNone
zowe-zos-console-for-zowe-sdk
No description available on PyPI.
zowe-zos-files-for-zowe-sdk
No description available on PyPI.
zowe-zos-jobs-for-zowe-sdk
No description available on PyPI.
zowe-zosmf-for-zowe-sdk
No description available on PyPI.
zowe-zos-tso-for-zowe-sdk
No description available on PyPI.
zowie
ZowieZowie ("Zotero linkwriter") is a command-line program for macOS that writes Zoteroselectlinks into the file attachments contained in a Zotero database.Table of contentsIntroductionInstallationUsageKnown issues and limitationsAdditional tipsGetting helpContributingLicenseAcknowledgmentsIntroductionWhen usingZotero, you may on occasion want to work with PDF files and other attachment files outside of Zotero. For example, if you're aDEVONthinkuser, you will at some point discover the power of indexing your local Zotero database from DEVONthink. However, when viewing or manipulating the attachments from outside of Zotero, you may run into the following problem: when looking at a given file,how do you find out which Zotero entry it belongs to?Enter Zowie (a loose acronym for"Zotero linkwriter", and pronounced likethe interjection). Zowie scans through the files on your disk in a local Zotero database, looks up the Zotero bibliographic record corresponding to each file found, and writes aZotero select linkinto the file and/or certain macOS Finder/Spotlight metadata fields (depending on the user's choice). A Zotero select link has the formzotero://select/...and when opened on macOS, causes the Zotero desktop application to open that item in your database. Zowie thus makes it possible to go from a file opened in an application other than Zotero (e.g., DEVONthink, Adobe Acrobat), to the Zotero record corresponding to that file.Regretfully, Zowie canonlywork with Zotero libraries that use normal/local data storage;it cannot work when Zotero is configured to use linked attachments.InstallationThere are multiple ways of installing Zowie, ranging from downloading a self-contained, single-file, ready-to-run program, to installing it as a typical Python program usingpip. Please choose the alternative that suits you and your Mac environment.Alternative 1: downloading the ready-to-run programOn macOS Catalina (10.15) or later, you can use a ready-to-run version of Zowie that only needs a Python interpreter version 3.8 or higher on your computer. That's the case for macOS 10.15 and later, but before you can use it, you may need to let macOS install some additional software components from Apple. To test it, run the following command in a terminal andtake note of the version of Pythonthat it prints:python3--versionIf this is the first timeyou've runpython3on your system, macOS will either ask you if you want to install certain additional software components, or it may produce an error aboutxcrun: error: invalid active developer path (/Library/Developer/CommandLineTools) .... In either case, the solution is to run the following command in the terminal:xcode-select --installIn the pop-up dialog box that this brings up,click theInstallbuttonand agree to let it install theCommand Line Toolspackage from Apple.Next,Go to thelatest release on GitHuband find theAssetsDownloadthe ZIP file whose name contains the version of Python on your computer (which you determined by runningpython3 --versionabove)Unzipthe file (if your browser didn't unzip it)Open the folderthat gets created (it will have a name likezowie-1.2.0-macos-python3.8)Look inside forzowieandmove itto a location where you put other command-line programs (such as/usr/local/bin).If you want to put it in/usr/local/binbut that folder does not exist on your computer yet, you can create it by opening a terminal window and running the following command (priorto movingzowieinto/usr/local/bin):sudomkdir/usr/local/binThe following is an example command that you can type in a terminal to move Zowie there:sudomvzowie/usr/local/binAlternative 2: installing Zowie usingpipxYou can usepipxto install Zowie. Pipx will install it into a separate Python environment that isolates the dependencies needed by Zowie from other Python programs on your system, and yet the resultingzowiecommand wil be executable from any shell – like any normal program on your computer. If you do not already havepipxon your system, it can be installed in a variety of easy ways and it is best to consultPipx's installation guidefor instructions. Once you have pipx on your system, you can install Zowie with the following command:pipxinstallzowiePipx can also let you run Zowie directly usingpipx run zowie, although in that case, you must always prefix every Zowie command withpipx run. Consult thedocumentation forpipx runfor more information.Alternative 3: installing Zowie usingpipThe instructions below assume you have a Python 3 interpreter installed on your computer. Note that the default on macOS at least through 10.14 (Mojave) is Python2– please first install Python version 3 and familiarize yourself with running Python programs on your system before proceeding further.You should be able to installzowiewithpipfor Python 3. To installzowiefrom thePython package repository (PyPI), run the following command:python3-mpipinstallzowieAs an alternative to getting it fromPyPI, you can usepipto installzowiedirectly from GitHub:python3-mpipinstallgit+https://github.com/mhucka/zowie.gitIf you already installed Zowie once before, and want to update to the latest version, add--upgradeto the end of either command line above.Alternative 4: installing Zowie from sourcesIf you prefer to install Zowie directly from the source code, you can do that too. To get a copy of the files, you can clone the GitHub repository:gitclonehttps://github.com/mhucka/zowieAlternatively, you can download the files as a ZIP archive using this link directly from your browser using this link:https://github.com/mhucka/zowie/archive/refs/heads/main.zipNext, after getting a copy of the files, runsetup.pyinside the code directory:cdzowie python3setup.pyinstallUsageFor help with usage at any time, runzowiewith the option-h.Thezowiecommand-line program should end up installed in a location where software is normally installed on your computer, if the installation steps described in the previous section proceeded successfully. Running Zowie from a terminal shell then should be as simple as running any other shell command on your system:zowie-hIf you installed it as a Python package, then an alternative method is available to run Zowie from anywhere, namely to use the normal approach for running Python modules:python3-mzowie-hCredentials for Zotero accessZowie relies on theZotero sync APIto get information about your references. This allows it to look up Zotero item URIs for files regardless of whether they belong to your personal library or shared libraries, and from there, construct the appropriate Zotero select link for the files. If you do not already have aZotero sync account, it will be necessary to create one before going any further.To use Zowie, you will also need both an API user identifier (also known as theuserID) and anAPI key. To find out your Zotero userID and create a new API key, log in to your Zotero account atZotero.organd visit theFeeds/APItab of the yourSettingspage. On that page you can find your userID and create a new API key for Zowie.The first time you run Zowie, it will ask for this information and (unless the-Koption is given) store it in your macOS keychain so that it does not have to ask for it again on future occasions. It is also possible to supply the identifier and API key directly on the command line using the-iand-aoptions, respectively; the given values will then override any values stored in the keychain and (unless the-Koption is also given) will be used to update the keychain for the next time.Basic usageZowie can operate on a folder, or one or more individual files, or a mix of both. Suppose your local Zotero database is located in~/Zotero/. Perhaps the simplest way to run Zowie is the following command:zowie~/ZoteroIf this is your first run of Zowie, it will ask you for your userID and API key, then search for files recursively under~/Zotero/. For each file found, Zowie will contact the Zotero servers over the network and determine the Zotero select link for the bibliographic entry containing that file. Finally, it will use the default method of recording the link, which is to write it into the macOS Finder comments for the file. It will also store your Zotero userID and API key into the system keychain so that it does not have to ask for them in the future.If you are a user ofDEVONthink, you will probably want to add the-soption (see theexplanation belowfor the details):zowie-s~/ZoteroInstead of a folder, you can also invoke Zowie on one or more individual files (but be careful to put quotes around pathnames with spaces in them, such as in this example):zowie-s"~/Zotero/storage/26GS7CZL/Smith 2020 Paper.pdf"Available methods of writing Zotero linksZowie supports multiple methods of writing the Zotero select link. The option-lwill cause Zowie to print a list of all the methods available, then exit.The option-mcan be used to select one or more methods when running Zowie. Write the method names separated with commas without spaces. For example, the following command will make Zowie write the Zotero select link into the Finder comments as well as the PDF metadata attributeSubject:zowie-mfindercomment,pdfsubject~/Zotero/storageAt this time, the following methods are available:findercomment: (The default method.) Writes the Zotero select link into the Finder comments of each file, attempting to preserve other parts of the comments. If Zowie finds an existing Zotero select link in the text of the Finder comments attribute, it only updates the link portion and tries to leave the rest of the comment text untouched. Otherwise, Zowieonlywrites into the comments attribute if either the attribute value is empty or Zowie is given the overwrite (-o) option. (Note that updating the link text requires rewriting the entire Finder comments attribute on a given file. Finder comments have a reputation for being easy to get into inconsistent states, so if you have existing Finder comments that you absolutely don't want to lose, it may be safest to avoid this method.)pdfproducer: (Only applicable to PDF files.) Writes the Zotero select link into the "Producer" metadata field of each PDF file. If the "Producer" field is not empty on a given file, Zowie looks for an existing Zotero link within the value and updates the link if one is found; otherwise, Zowie leaves the field untouched unless given the overwrite flag (-o), in which case, it replaces the entire contents of the field with the Zotero select link. For some users, the "Producer" field has not utility, and thus can be usefully hijacked for the purpose of storing the Zotero select link. The value is accessible from macOS Preview, Adobe Acrobat, DEVONthink, and presumably any other application that can display the PDF metadata fields. However, note that some users (archivists, forensics investigators, possibly others) do use the "Producer" field, and overwriting it may be undesirable.pdfsubject: (Only applicable to PDF files.) Writes the Zotero select link into the "Subject" metadata field of each PDF file. If the "Subject" field is not empty on a given file, Zowie looks for an existing Zotero link within the value and updates the link if one is found; otherwise, Zowie leaves the field untouched unless given the overwrite flag (-o), in which case, it replaces the entire contents of the field with the Zotero select link. Note that the PDF "Subject" field is not the same as the "Title" field. For some users, the "Subject" field is not used for any purpose and thus can be usefully hijacked for storing the Zotero select link. The value is accessible from macOS Preview, Adobe Acrobat, DEVONthink, and presumably any other application that can display the PDF metadata fields.wherefrom: Writes the Zotero select link to the "Where from" metadata field of each file (thecom.apple.metadata:kMDItemWhereFromsextended attribute). This field is displayed as "Where from" in Finder "Get Info" panels; it is typically used by web browsers to store a file's download origin. The field is a list. If Zowie finds a Zotero select link as the first item in the list, it updates that value; otherwise, Zowie prepends the Zotero select link to the list of existing values, keeping the other values unless the overwrite option (-o) is used. When the overwrite option is used, Zowie deletes the existing list of values and writes only the Zotero select link. Note that if macOS Spotlight indexing is turned on for the volume containing the file, the macOS Finder will display the updated "Where from" values in the Get Info panel of the file; if Spotlight is not turned on, the Get info panel will not be updated, but other applications will still be able to read the updated value.Note that, depending on the attribute, it is possible that a file has an attribute value that is not visible in the Finder or other applications. This is especially true for "Where from" values and Finder comments. The implication is that it may not be apparent when a file has a value for a given attribute, which can lead to confusion if Zowie thinks there is a value and refuses to change it without the-ooption.Filtering by file typeBy default, Zowie acts on all files it finds on the command line, except for certain files that it always ignores: hidden files and files with extensions.sqlite,.bak,.csl,.css,.js,.json,.pl, and a few others. If the-moption is used to select methods that only apply to specific file types, Zowie will examine each file it finds in turn and only apply the methods that match that particular file's type, but it will still consider every file it finds in the directories it scans and apply the methods that are not limited to specific types.You can use the option-fto make Zowie filter the files it finds based on file name extensions. This is useful if you want it to concentrate only on particular file types and ignore other files it might find while scanning folders. Here is an example (this also using the-soption forreasons given below):zowie-s-fpdf,mp4,mov~/Zoterowill cause it to only work on PDF, MP4, and QuickTime format files. You can provide multiple file extensions separated by commas, without spaces and without the leading periods.Filtering by dateIf the-doption is given, the files will be filtered to use only those whose last-modified date/time stamp is no older than the given date/time description. Valid descriptors are those accepted by the Python dateparser library. Make sure to enclose descriptions within single or double quotes. Examples:zowie-d"2 weeks ago".... zowie-d"2014-08-29".... zowie-d"12 Dec 2014".... zowie-d"July 4, 2013"....Special-case behaviorAlthough Zowie is not aimed solely at DEVONthink users, its development was motivated by the author's desire to use Zotero with that software. A complication arose due to an undocumented feature in DEVONthink:it ignores a Finder comment if it is identical to the value of the "URL" attribute(which is the name it gives to thecom.apple.metadata:kMDItemWhereFromsattributediscussed above). In practical terms, if you do something like write the Zotero select link into the Finder comment of a file and then have a DEVONthink smart rule copy the value to the URL field, the Finder comment will subsequentlyappear blank in DEVONthink(even though it exists on the actual file). This can be unexpected and confusing, and has caught people (including the author of Zowie) unaware. To compensate, Zowie 1.2 introduced a new option: it can add a trailing space character to the end of the value it writes into the Finder comment when using thefindercommentmethod. Since approaches to copy the Zotero link from the Finder comment to the URL field in DEVONthink will typically strip whitespace around the URL value, the net effect is to make the value in the Finder comment just different enough from the URL field value to prevent DEVONthink from ignoring the Finder comment. Use the option-sto make Zowie to add the trailing space character.Additional command-line argumentsTo make Zowie only print what it would do without actually doing it, use the-n"dry run" option.If given the-qoption, Zowie will not print its usual informational messages while it is working. It will only print messages for warnings or errors. By default, messages printed by Zowie are also color-coded. If given the option-C, Zowie will not color the text of messages it prints. (This latter option is useful when running Zowie within subshells inside other environments such as Emacs.)If given the-Voption, this program will print the version and other information, and exit without doing anything else.If given the-@argument, this program will output a detailed trace of what it is doing. The debug trace will be sent to the given destination, which can be-to indicate console output, or a file path to send the output to a file.When-@has been given, Zowie also installs a signal handler on signalSIGUSR1that will drop Zowie into the pdb debugger if the signal is sent to the running process.Summary of command-line optionsThe following table summarizes all the command line options available.ShortLong form optMeaningDefault-aA--api-keyAAPI key to access the Zotero API service-C--no-colorDon't color-code the outputUse colors in the terminal-d--after-dateDOnly act on files modified after date "D"Act on all files found-f--file-extFOnly act on files with extensions in "F"Act on all files found⚑-h--helpDisplay help text and exit-i--identifierIZotero user ID for API calls-K--no-keyringDon't use a keyring/keychainStore login info in keyring-l--listDisplay known services and exit-m--methodMSelect how Zotero select links are writtenfindercomment-n--dry-runSay what would be done, but don't do itDo it-o--overwriteOverwrite previous metadata contentDon't write if already present-q--quietDon't print messages while workingBe chatty while working-s--spaceAppend trailing space to Finder commentsDon't add a space★-V--versionDisplay program version info and exit-@OUT--debugOUTDebugging mode; write trace toOUTNormal mode⬥⚑   Certain files are always ignored: hidden files, macOS aliases, and files with extensions.sqlite,.sqlite-journal,.bak,.csl,.css,.js,.json,.pl, and.config_resp.⬥   To write to the console, use the character-as the value ofOUT; otherwise,OUTmust be the name of a file where the output should be written.★   See the explanation in the section onspecial-case behavior.Return valuesThis program exits with a return code of 0 if no problems are encountered. It returns a nonzero value otherwise. The following table lists the possible return values:CodeMeaning0success – program completed normally1the user interrupted the program's execution2encountered a bad or missing value for an option3no network detected – cannot proceed4file error – encountered a problem with a file5server error – encountered a problem with a server6an exception or fatal error occurredKnown issues and limitationsThe following is a list of currently-known issues and limitations:Zowie can only work when Zotero is set to use direct data storage; i.e., where attached files are stored in Zotero. Itcannot work if you uselinked attachments, that is, if you setLinked Attachment Base Directoryin your Zotero Preferences'Advanced→Files and Folderspanel.If you useDEVONthinkin a scheme in which you index your Zotero folder and use Zowie to write the Zotero select link into the Finder comments of files, beware of the following situation. If you use a DEVONthink smart rule to copy the comment string into the "URL" field, DEVONthink will (after reindexing the file) suddenly display anemptyFinder comment, even though the comment is still there. This is due to adeliberate behavior in DEVONthinkand not a problem with Zowie, as discussed in thesection on special-case behavior. Using the-soption will avoid this, but at the cost of adding an extra character to the Finder comment, so make sure to account for the added space character in any scripts or other actions you take on the Finder comment.DEVONthinkbases the "URL" value of a file on the file'scom.apple.metadata:kMDItemWhereFromsextended attribute. The original hope behind Zowie was to make it write Zotero select links directly into that attribute value. Unfortunately, it turns out that if a file has already been indexed by DEVONthink, thenit willnotdetect any changes to thecom.apple.metadata:kMDItemWhereFromsattributemade by an external program. Thus, if you index your Zotero folder within DEVONthink, you cannot use Zowie'swherefromsmethod to update the "URL" field directly. You are advised instead to use Zowie'sfindercommentmethod (the default) in combination with smart rules in DEVONthink, as discussed inthe wiki. I share your frustration.For reasons I have not had time to investigate, the binary version ofzowietakes a very long time to start up on macOS 10.15 (Catalina) and 11.1 (Big Sur). On my test system inside a virtual machine running on a fast iMac, it takes 10 seconds or more before the first output fromzowieappears.Additional tipsIn thewiki associated with the Zowie project in GitHub, I have started writing some notes about how I personally use Zowie to combine Zotero with DEVONthink.Getting helpIf you find an issue, please submit it inthe GitHub issue trackerfor this repository.ContributingI would be happy to receive your help and participation if you are interested. Everyone is asked to read and respect thecode of conductwhen participating in this project. Development generally takes place on thedevelopmentbranch.LicenseThis software is Copyright (C) 2020–2023, by Michael Hucka and the California Institute of Technology (Pasadena, California, USA). This software is freely distributed under a 3-clause BSD type license. Please see theLICENSEfile for more information.AcknowledgmentsThis work is a personal project developed by the author, using computing facilities and other resources of theCalifornia Institute of Technology Library.Thevector artworkof an exclamation point circled by a zigzag, used as the icon for this repository, was created byAlfredo @ IconsAlfredo.comfrom the Noun Project. It is licensed under the Creative CommonsCC-BY 3.0license.Zowie makes use of numerous open-source packages, without which Zowie could not have been developed. I want to acknowledge this debt. In alphabetical order, the packages are:aenum– advanced enumerations for Pythonbiplist– A binary plist parser/writer for Pythonboltons– package of miscellaneous Python utilitiesbun– a set of basic user interface classes and functionsCommonPy– a collection of commonly-useful Python functionsfastnumbers– number testing and conversion functionsipdb– the IPython debuggerkeyring– access the system keyring service from Pythonpdfrw– a pure Python library for reading and writing PDFsplac– a command line argument parserpy-applescript– a Python interface to AppleScriptPyInstaller– a packaging program that creates standalone applications from Python programspyobjc– Python ⇌ Objective-C and macOS frameworks bridgepyxattr– access extended file attributes from Pythonpyzotero– a Python API client for Zoterosetuptools– library forsetup.pyShiv– command-line utility for creating self-contained Python zipappsSidetrack– simple debug logging/tracing packagewheel– setuptools extension for building wheelsThedevelopers of DEVONthink, especially Jim Neumann and Christian Grunenberg, quickly and consistently replied to my many questions on theDEVONtechnologies forums.
zowie-utils
No description available on PyPI.
zoxy
Zonda Python ProxyInstallpip install zoxyQuick start for cliDefault server path: 127.0.0.1:8080$ ./zoxyCustomize url and portExample: 0.0.0.0:9999$ ./zoxy -u 0.0.0.0 -p 9999Allowed accessExample:127.0.0.1, mask: 255.255.255.255, port 8080127.0.0.0, mask: 255.255.255.0, port: all$ ./zoxy --allowed_access 127.0.1.1 8080 --allowed_access 127.0.0.0/24 *Blocked accessExample:127.0.0.1, mask: 255.255.255.255, port: 8080127.0.0.0, mask: 255.255.255.0, port: all$ ./zoxy --blocked_access 127.0.1.1 8080 --blocked_access 127.0.0.0/24 *Note: Blocked access setting has higher priority than allowed access.ForwardingExample:192.168.1.0, mask: 255.255.255.0, port: 1234 to 127.0.0.1, port: 80000.0.0.0, mask: 0.0.0.0, port: all to 127.0.0.2, port: all$ ./zoxy --forwarding 192.168.1.0/24 1234 127.0.0.1 8000 --forwarding 0.0.0.0/0 * 127.0.0.2 *Quick start for programimportzoxy.serverconfig={"url":"0.0.0.0","port":9999,"allowed_accesses":[["127.0.1.1","8080"],["127.0.2.0/24","1234"],["127.0.0.0/24","*"],],"blocked_accesses":[["192.0.1.1","8080"],["192.0.2.0/24","1234"],["192.0.0.0/24","*"],],"forwarding":[["196.168.2.1","1234","127.0.2.1","8000"],["196.168.1.0/24","1234","127.0.0.1","8000"],["0.0.0.0/0","*","127.0.0.2","*"],],"load_balancing":{"frontend":["127.0.0.1/32","8080"],"backend":[["127.0.0.1","9090","80"],["127.0.0.1","*","20"],],},}zoxy.server.ProxyServer(**config).listen()Get/Set accessesAllowed accesses# Getproxy_server.allowed_accesses'''[["127.0.1.1/32", "8080"],["127.0.2.0/24", "1234"],["127.0.0.0/24", "*"],]'''# Setproxy_server.allowed_accesses=[["111.0.1.1","8080"],["111.0.2.0/24","1234"],["111.0.0.0/24","*"],]Blocked accesses# Getproxy_server.blocked_accesses'''[["192.0.1.1/32", "8080"],["192.0.2.0/24", "1234"],["192.0.0.0/24", "*"],]'''# Setproxy_server.blocked_accesses=[["111.0.1.1","8080"],["111.0.2.0/24","1234"],["111.0.0.0/24","*"],]Get/Set forwarding# Getproxy_server.forwarding'''[["196.168.2.1/32", "1234", "127.0.2.1", "8000"],["196.168.1.0/24", "1234", "127.0.0.1", "8000"],["0.0.0.0/0", "*", "127.0.0.2", "*"]]'''# Setproxy_server.forwarding=[["176.168.2.1","1234","127.0.2.1","8000"],["176.168.1.0/24","1234","127.0.0.1","8000"],["176.0.0.0/8","*","127.0.0.2","*"]]Get/Set Load balancing# Getproxy_server.load_balancing'''{"frontend": ["127.0.0.1/32", "8080"],"backend": [["127.0.0.1", "9090", "80"],["127.0.0.1", "*", "20"],],}'''# Setproxy_server.load_balancing={"frontend":["168.0.0.1/32","8080"],"backend":[["111.0.0.1","9090","80"],["111.0.0.1","*","20"],],}DeveloperTestpython -m unittestType checkingmypy zoxy
zoyupkg
No description available on PyPI.
zozol
UNKNOWN
zozopdf
This is the homepage of our project.
zozoTestFunction
READMEthis is the test of pypi
zp1
No description available on PyPI.
zp2
No description available on PyPI.
zp3
No description available on PyPI.
z-package
No description available on PyPI.
zpack-zakirhamadan53
idk
zpapollo
pyapollo 常用工具包
zparser
No description available on PyPI.
zpassistant
工具包单点登录工具包# 进入工作目录cd.\basic\zpsso\# 安装打包工具python3-mpipinstall--user--upgradetwine# 打包指令python3setup.pysdistbdist_wheel# 上传python3-mtwineuploaddist/*# 更新zpassistantpip3install-ihttps://pypi.org/simple--upgradezpassistant
zpath
No description available on PyPI.
zpca
No description available on PyPI.
zpcheckresource
UsedFunctions
zp-config
модуль для получения настроек из файлов настрек и секретов
zpcpssupport
UsedTo use, simple do:>>> from zalopaysupport import prepareResourceBeforeUpload, uploadImagesToZPSVN >>> input = './images' >>> output = './output' >>> subFolderOnSVN = 'subfolder' >>> prepareResourceBeforeUpload(input, target) >>> uploadImagesToZPSVN(output, subFolderOnSVN)Functions>>> prepareResourceBeforeUpload>>> uploadImagesToZPSVN>>> renameAllFolderAndFile>>> renameToRemoveResolutionSuffix>>> yes_no>>> choose_environment>>> choose_multi_environmentPublic python package>>> python3 setup.py sdist >>> twine check dist/* >>> twine upload dist/*
zpdb
No description available on PyPI.
zped
Why you shouldn’t use thisZPED let’s you do some truly silly stuff with event dispatching. There’s a built-in decorator that will create and execute pre/post execution events on functions, which is pretty cool! Until you realize that your event listeners can arbitrarily modify the execution of your code by raising exceptions. A pre-execution event can completely modify the data sent to the executing function, or even the data sent to other listeners (since they’re executed in serial). The same event can even stop execution entirely and force return a value. A post-execution event can do similar. It’s insane, it’s terrible, it will make your applications /really/ hard to debug.Why I even wrote thisI’m in the process of writing a static website generator based on Flask, and I needed a good way to let plugins tie into the core system. One of the better days to do this is with event dispatching! So I started writing a simple dispatcher, because using an external library for that seemed silly. Then I thought, “If I were insane and writing a plugin to heavily modify the generator’s internals, but didn’t want to fork the code or monkeypatch… what would I need?” ZPED is the culmination of that, and entirely too much coffee.Ok, but… I don’t /have/ to use the bad parts of this, right?No, but power corrupts.Just tell me how to use itLook at the tests, I’ll write some docs later.
zpenv
zpenvLangue/LanguageEnglish VersionInformationsOutil multi-plateforme de gestion d'environnement virtuel Python pour la création, l'édition, la suppression ou le travail avec un environnement virtuel.Tout se passe directement en console.Il est possible de migrer ces anciens environnements virtuels sur cette solution.PrerequisPython 3Installationpip install zpenvUtilisationAffichage de toutes les commandes disponibles[user@host ~]$zpenv-hInstallation d'un environnement[user@host ~]$zpenv--install[NomEnvironnement]--name = Donner un nom à notre environnement--tag = Ajouter des tags (séparés avec ,)--comment = Ajouter un commentaire--projectfolder = Spécifier le dossier du projet (emplacement du code)--prompt = Spécifier le message dans le prompt (D'autres options sont disponibles)Suppression d'un environnement[user@host ~]$zpenv--remove[NomEnvironnement]--nopurge = Ne pas supprimer le dossier de l'environnement Le dossier du projet ne sera jamais suppriméMigration d'un environnementPermet de récupérer la gestion d'un environnement créé par venv ou virtualenv par exemple.[user@host ~]$zpenv--migrate[CheminVersEnvironnement]Si aucun chemin n'est spécifié, l'app prendra le répertoire courant.Lister les environnements disponibles[user@host ~]$zpenv--list- Project1- Project2Afficher les informations d'un environnement[user@host ~]$zpenv--info[NomEnvironnement]Environment name: Project1Environment path: C:\Users\zephyroff\Desktop\ENVEnvironment version: 3.10.8Environment tag: ProjectConsole,TabBarProject Folder: C:\Users\zephyroff\Desktop\ENVCodeOuverture d'un environnementPour activer l'environnement virtuel et commencer à travailler dessus, il faut l'ouvrir.[user@host ~]$zpenv--open[NomDeLEnvironnement]--shell = Pour entrer directement dans le shell PythonGestion de packageInstaller un package[user@host ~]$zpenv--installmodule[package]ou pour installer des packages depuis un fichier requirement[user@host ~]$zpenv--requirement[RequirementFile]Supprimer un package[user@host ~]$zpenv--removemodule[package]Mettre à jour un package[user@host ~]$zpenv--upgrademodule[package]Installation de pip[user@host ~]$zpenv--installpipEN - InformationsCross-platform Python virtual environment management tool for creating, editing, deleting, or working with a virtual environment.Everything happens directly in console.It is possible to migrate these old virtual environments to this solution.Prerequisites-Python 3Installationpip install zpenvUseShowing all available commands[user@host ~]$zpenv-hInstalling an environment[user@host ~]$zpenv--install[EnvironmentName]--name = Give a name to our environment--tag = Add tags (separated with ,)--comment = Add a comment--projectfolder = Specify project folder (code location) (Other options are available)Deleting an environment[user@host ~]$zpenv--remove[EnvironmentName]--nopurge = Don't delete environment folder The project folder will never be deletedMigrating an environmentAllows to recover the management of an environment created by venv or virtualenv for example.[user@host ~]$zpenv--migrate[PathToEnvironment]If no path is specified, the app will take the current directory.List available environments[user@host ~]$zpenv--list-Project1-Project2Display environment information[user@host ~]$zpenv--info[EnvironmentName]Environment name: Project1Environment path: C:\Users\zephyroff\Desktop\ENVEnvironment version: 3.10.8Environment tag: ProjectConsole,TabBarProject Folder: C:\Users\zephyroff\Desktop\ENVCodeOpening an environmentTo activate the virtual environment and start working on it, you must open it.[user@host ~]$zpenv--open[EnvironmentName]--shell = To enter the Python shell directlyPackage managementInstall a package[user@host ~]$zpenv--installmodule[package]or to install packages from a requirement file[user@host ~]$zpenv--requirement[RequirementFile]Delete a package[user@host ~]$zpenv--removemodule[package]Update a package[user@host ~]$zpenv--upgrademodule[package]Install pip[user@host ~]$zpenv--installpip
zperfmetrics
Table of ContentsPerfmetrics configuration for Zope and PloneInstallationUsageRequest Lifecycle IntegrationZopePloneStatd, Graphite & Grafana in DockerSource CodeContributorsHistory1.0b5 (2016-08-05)1.0b4 (2016-08-05)1.0b3 (2016-08-05)1.0b2 (2016-08-04)1.0b1 (2016-08-04)1.0a7 (2016-08-03)1.0a6 (2016-07-28)1.0a5 (2016-06-28)1.0a4 (2016-06-10)1.0a3 (2016-06-09)1.0a2 (2016-03-22)1.0a1 (2016-03-22)1.0a0 (2016-03-22)LicensePerfmetrics configuration for Zope and Plonezperfmetrics works like and depends onperfmetrics, additional it:offers a ZConfig configuration for the statsd,uses the current requests path in the statd dotted path prefix,also provides a patch to measure plone.app.theming for diazo compile and diazo transform if Plone is available,InstallationFirst get yourstatsdconfigured properly. This is out of scope of this module.Depend on this module in your packagessetup.py.Given you usezc.builodutto set up your Zope2 or Plone, add to your[instance]section or the section withrecipe = plone.recipe.zope2instancethe lines:[instance01] recipe = plone.recipe.zope2instance ... zope-conf-imports = zperfmetrics zope-conf-additional = <perfmetrics> uri statsd://localhost:8125 before MyFancyProject hostname on virtualhost on after ${:_buildout_section_name_} </perfmetrics> ...Given this runs on a host calledw-plone1, this will result in a prefixMyFancyProject.w-plone1.instance01.uriFull URI of statd.beforePrefix path before the hostname.hostnameGet hostname and insert into prefix. (Boolean:onoroff)virtualhostGet virtualhost and use in ZPerfmetrics after the static prefix. (Boolean:onoroff)afterPrefix path after the hostname.UsageYou need to decorate your code or use thewithstatement to measure a code block.Usage:from zperfmetrics import ZMetric from zperfmetrics import zmetric from zperfmetrics import zmetricmethod @zmetric def some_function(): # whole functions timing and call counts will be measured pass @ZMetric(stat='a_custom_prefix') def some_other_function(): # set a custom prefix instead of module path and fucntion name. pass class Foo(object): @zmetricmethod def some_method(self): # whole methods timing and call counts will be measured pass @ZMetric(method=True, timing=False): def some_counted_method(self): # whole methods number of calls will be measured, but no times pass @ZMetric(method=True, count=False): def some_timed_method(self): # whole methods timing be measured, but no counts pass def some_method_partly_measured(self): # do something here you dont want to measure with ZMetric(stat='part_of_other_method_time'): # do something to measure # call counts and timing will be measured pass # do something here you dont want to measure @ZMetric(method=True, rate=0.5): def some_random_recorded_method(self): # randomly record 50% of the calls. passRequest Lifecycle IntegrationAll ZPerfmetrics with a request passed in are considered to be under therequest_lifecyclesection.All metrics in here are build like:$PREFIX.request_lifecycle.[$VIRTUAL_HOST].$PATH.*.ZopeThis package provides subscribers to measure the time a request takes, including some points in time between.These subscribers are loaded via zcml and are logging underpublish.*:publish.traversaltime needed from publication start until traversal is finished.publish.renderingtime needed from traversal end until before commit begin.This value is a bit fuzzy and should be taken with a grain of salt, because there can be other subscribers to this event which take their time. Since the order of execution of the subscribers is not defined, processing may happen after this measurementIf plone tranformchain is active, the rendering time is before transforms are starting.publish.finalizetime needed from rendering end (or transform end if plone.transformchain is active) until database commit is done.publish_allwhole time needed from publication start until request is completly processed.PloneInstalling this package in Plone by depending onzperfmetrics[plone]forces usage ofplone.transformchainversion 1.2 or newer.First,publish.renderinggets less fuzzy because the expensive transforms (also subscribers to publish.beforecommit) are all done.Then it introduces new measurements related toplone.transformchain:publish.transform_alltime needed for all transforms in theplone.transformchain. This usually includes Diazo.publish_transform_single.${ORDER}-${TRANSFORMNAME}time needed for a specific single transform. transforms are ordered and named, both are replaced.This package patches:diazo.setupmetricplone.app.theming.transform.ThemeTransform.setupTransformis patched as a basic (path-less) perfmetricsMetric. The setup of the transform happens once on startup and is the time needed to create the Diazo xslt from its rules.xml, index.html and related files.Statd, Graphite & Grafana in DockerSetting up Statsd, Graphite and Grafana can be complex. For local testing - but also for production environments - firing up some docker containers comes in handy.A very minimal version of such aStatd, Graphite & Grafana in Docker setup(original) helps getting things initially up and running.Install Dockerandinstall docker-compose(justpip installdocker-compose), then just clone the repository and in itsdockerdirectory rundocker-composeup-d.Let Zperfmetrics point touristatsd://localhost:8125and collect some data. Open Grafana in your browser athttp://localhost:3000.Go first toGrafana Getting Started, the 10 minute videoreally helpsto find the hidden part of its UI.Source CodeThe sources are in a GIT DVCS with its main branches atgithub.We’d be happy to see many branches, forks and pull-requests to make zperfmetrics even better.ContributorsJens W. Klein <[email protected]>Zalán SomogyváryHistory1.0b5 (2016-08-05)Event better naming in order to be able to group and stack: Renamedpublish.sumtopublish_allandpublish.transform_singletopublish_transform_single. [jensens]1.0b4 (2016-08-05)Cleanup names, better grouping in order to make graphing easier. [jensens]1.0b3 (2016-08-05)Enhancement: Introduce after-prefix a top levelrequest_lifecycleto be consistent with levels. [jensens]1.0b2 (2016-08-04)Fix: Name of a single transform may contain dots. They are now replaced by_. [jensens]Fix: The root element of a path was not shown on the same level as all other paths. Now it is shown as__root__[jensens]Feature: It was not possible to filter by virtual host in environment with more than one site per Zope. A new configuration optionvirtualhostwas introduced. If set to on, the virtualhost name will be inserted beforePATH. [jensens]Support: In order to make a test installation easier, an example docker-compose setup was added to the Github repository together with some documentation in the README.rst. [jensens]1.0b1 (2016-08-04)Added subscribers toplone.transformchainevents. New setup extra[plone]. Removed one patch for diazo transform. Madepublish.beforecommitless fuzzy in Plone. [jensens]1.0a7 (2016-08-03)Fix: virtual path config in ZMetric class. [syzn]1.0a6 (2016-07-28)Feature: New value publish.commit. Delta time used from publish.beforecommit to request end. [jensens]Fix: publish.sum shows now overall time of request processing. [jensens]Fix: Update README to reflect last changes. [jensens]Use more beautiful paths if VirtualHostMonster is used. [syzn]1.0a5 (2016-06-28)Fix: Before/after hooks were not assigned correctly. [jensens]1.0a4 (2016-06-10)Fixes measurements of zope request, also add more detailed metrics. [jensens]1.0a3 (2016-06-09)Measure time a zope request needs. [jensens]1.0a2 (2016-03-22)Refactored: ZConfig best practice [jensens]Fix: Strip trailing dot from prefix [jensens]1.0a1 (2016-03-22)Fix: README was wrong. [jensens]1.0a0 (2016-03-22)made it work [jensens, 2016-03-17]LicenseCopyright (c) 2016, BlueDynamics Alliance, Austria, Germany, Switzerland All rights reserved.Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.Neither the name of the BlueDynamics Alliance nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.THIS SOFTWARE IS PROVIDED BY BlueDynamics AllianceAS ISAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BlueDynamics Alliance BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
zpgdb
zpgdb - Python library for simple PostgreSQL connection and transaction managementzpgdbis a small library to ease the management of PostgreSQL database connection between your app modules and packages, and provides a simple context manager to wrap code that should run database commands inside a transaction, with automatic commit or rollback.Database connections are reused and one connection is opened by thread. Only one connection type is permitted at this time (eg, the same host, port, user and password and database).Persistent connections are tested before used for commands, and they are automatically reopened in case they were lost, dealing with PostgreSQL restarts transparently.How to installpipinstallzpgdbHow to use# You can import the module on every package/module you want to share# the database connection.importzpgdbasdb# The access configuration needs to be done only one time, preferably# inside your __main__ block.db.config_connection(host,port,user,password,database)# You can get the connection object directly. `getdb()` will start a# new connection if there is no connection opened with the actual thread.dbh=db.getdb()# Or you can start a context manager getting a cursor, with automatic# commit on finish, or rollback in case there is a exception thrown.withdb.trans()asc:c.execute('...')c.execute('...')forrowinc:...
zpgs
No description available on PyPI.
zph01
long_description
zphisher
Installation$ pip install zphisher && zphisherFeatureszphisher, ** Automated phishing tool with 30+ templates. **How to install ?$ pkg install python -y $ pip install zphisher $ zphisherRun ?$ zphisherDisclaimerWe are not responsible for your loss by this tool. this tool is made for Education/Learning Purpose. Dont harm anyone using this tool.Usage$ zphisher -h Author : HTR Tech PIP module : Parixit Sutariya Github : github.com/Bhai4You Blogspot : https://bhai4you.blogspot.comGithub
zpipe
嵌入式管道模块, 类似于logstash使用方法类似logstash, 配置化操作安装pip install zpipe配置管道框架创建一个目录, 这个目录作为你的管道组织主路径mkdir /home/mypipe mkdir /home/mypipe/pipe_config mkdir /home/mypipe/plugin创建框架配置文件touch /etc/zpipe/config.json # win系统: "c:/zpipe/config.json" # 其他系统: "/etc/zpipe/config.json" # 可以使用环境变量 ZPIPE_CONFIG 指定框架配置文件路径, 优先级最高修改框架配置文件为你的设置{"pipe_config_path":"/home/mypipe/pipe_config","plugin_path":"/home/mypipe/plugin"}pipe_config_path 表示管道配置文件路径, 可以是文件或文件夹, 每个配置文件是一个json文件, 最后框架会将所有json合并为一个更大的jsonplugin_path 表示插件路径, 只能是文件夹路径可以使用相对路径(相对于框架配置文件的路径), 多路径用分号 [;] 隔开大功告成, 终于可以开始制作管道了一个简单的管道在管道配置目录下创建一个文件 my_pipe.py, 写入如下内容{"test":{"output":"log"}}新建一个py文件, 写入如下内容fromzpipeimportpipe_servera=pipe_server()pipe=a.get_pipe('test')result=pipe.process("测试消息")运行它, 随后你可以在控制台看到打印出来的消息这个管道做了什么{ "test": { #定义管道名 "output": "log" #定义输出插件 } }fromzpipeimportpipe_server#导入框架服务a=pipe_server()#创建框架服务的实例pipe=a.get_pipe('test')#获取管道实例result=pipe.process("测试消息")#向管道发送数据并获取管道结果管道配置详解对插件设置参数, 执行顺序为 pipe > codec > filter.codec > filter > output.codec > output{"管道1":{"codec":{"name":"解码器名","参数名":"参数值"},"filter":{"name":"过滤器名","参数名":"参数值","codec":{"name":"解码器名","参数名":"参数值"}},"output":{"name":"输出插件名","参数名":"参数值","codec":{"name":"解码器名","参数名":"参数值"}},"参数名":"参数值"},"管道2":{}}如果不设置参数可以简化配置{"管道名":{"codec":"解码器名","filter":"过滤器名","output":"输出插件名","参数名":"参数值"}}自制插件, 简单插件实例# 自制插件必须遵循以下规则# 插件所在的目录必须添加到框架配置文件的plugin_path里# 插件类型目前只有三种['codec', 'filter', 'output']# 插件文件名必须为规则:[zpipe_插件类型_插件名.py]# 插件类名必须和插件文件名相同并且继承于[zpipe.plugin_base]# zpipe_output_test.pyfromzpipeimportplugin_baseclasszpipe_output_test(plugin_base):defplugin_init(self,**kw):'''插件初始化:param kw: 这里接收管道定义的插件参数'''passdefplugin_distroy(self):'''插件销毁时'''passdefprocess(self,data):'''插件过程:param data: 收到的数据:return: 结果会顺序传递给下一个插件, 如果是最后一个插件则会返回给管道的调用者'''print('收到数据',data)returndata内置codec插件raw只需要调用者发送的数据, 忽略管道接收数据时对数据的打包, 没有任何参数dict将调用者发送的数据认为是一个dict, 并将它更新到数据的顶层json将调用者发送的数据认为可以被json.loads函数加载, 结果为dict, 并将它更新到数据的顶层, 参数配置参考json.loadsmsgpack将调用者发送的数据认为可以被msgpack.loads函数加载, 结果如果为dict, 会将它更新到数据的顶层, 参数配置参考msgpack.loads内置filter插件default参数名参数类型默认值说明removestr or list移除指定的数据, 允许链式表达数据位置,如 "a.b.c" 表示 del data[a][b][c]内置output插件log日志输出插件参数名参数类型默认值说明log_namestrzpipe_output_log日志名write_streamboolTrue是否输出到流(控制台)write_fileboolFalse是否输出到文件file_dirstr.输出文件所在的路径, 允许相对路径(相对于框架配置文件的路径)levelstrdebug日志可见等级(debug,info,warn,error,fatal)intervalint1间隔多少天新建一个日志文件backupCountint2保留多少个历史日志文件info_levelstr日志消息等级(debug,info,warn,error,fatal), 允许从消息内提取, 如 "raw.__level__"更新日志发布时间版本发布说明19-04-120.0.1发布第一版, 所有功能均已实现, 但是插件很少, 允许用户自定义插件, 插件开发简单本项目仅供所有人学习交流使用, 禁止用于商业用途
zpkg
Packaging tool used for Zope and ZODB.
z-pkg
Failed to fetch description. HTTP Status Code: 404
zpl
Python ZPL2 Library generates ZPL2 code which can be sent to Zebra or similar label printers. The library uses only Millimeter as unit and converts them internally according to printer settings.Example useimportosfromPILimportImageimportzpll=zpl.Label(100,60)height=0l.origin(0,0)l.write_text("Problem?",char_height=10,char_width=8,line_width=60,justification='C')l.endorigin()height+=13image_width=5l.origin((l.width-image_width)/2,height)image_height=l.write_graphic(Image.open(os.path.join(os.path.dirname(zpl.__file__),'trollface-large.png')),image_width)l.endorigin()height+=image_height+5l.origin(10,height)l.barcode('U','07000002198',height=70,check_digit='Y')l.endorigin()l.origin(32,height)l.barcode('Q','https://github.com/cod3monk/zpl/',magnification=5)l.endorigin()height+=20l.origin(0,height)l.write_text('Happy Troloween!',char_height=5,char_width=4,line_width=60,justification='C')l.endorigin()print(l.dumpZPL())l.preview()This will display the following preview image, generated using theLabelary API:label previewThe generated ZPL2 code is:^XA^FO0,0^A0N,120,96^FB720,1,0,C,0^FDProblem?\&^FS^FO330,156^GFA,768,384,8,00003FFFC0000000000600000FF0000000180200C01F8000003008000000600000204080440D10000041080000000C000082420000CC020000840002000102000100200001008000010040000000800002000FF80000010006003F84003E01800C036F8200E100C01402307101FE01202878000E030000A071060200010001504201FC0000007C50821000000106C090A438000001800010A466001E0040115084A183C80070103042107009C044382060104E0800803A20300C40E00700F840380FE03C0003D8001A047021F83C588004027E2021845880020227E021047880020141F82187F8800100C07FFFFFF88001004047FFFFF88000803040FFFFF88000C00880419970800060078001117080001241C00012608000089038C237C08000060401FFF8008000011080000020000000C21040E0044000003863C0010840000006060000104000000180380080400000006000000080000000180000008000000007800001000000000038000600000000000380180000000000003FC000^FS^FO120,264^BUN,70,Y,N,Y^FD07000002198^FS^FO384,264^BQN,2,5,Q,7^FDQA,https://github.com/cod3monk/zpl/^FS^FO0,504^A0N,60,48^FB720,1,0,C,0^FDHappy Troloween!\&^FS^XZInstallationpip install --user zplRequirementsPIL or Pillow
zpl2
This library allows you to generate ZPL II labels.
zplane
Z-PlaneA handful of freqeuntly used plots when working with discrete systems or digital signal processing in Pyton. Z-Plane is built upon the scipy.signal module, using theTransferFunctionclass to pass all required system information to plot functions in a single object. This allows all plots to be executed in a single line of code, while Z-Plane handles the calculations and setup required to get the perfect plot.The following functions are available:freq: Normalized frequency responsepz: Pole-Zero plotbode: Bode plot (Gain and Phase), non logarithmic frequency axis possibleimpulse: Impulse responsenorm: Normalize transfer functionfir2tf: Get FIR transfer function from impulse responseInstallationpipinstallzplaneUseImportzplaneCall any of the available functions, and pass a valid scipy.signal TransferFunctionHave a look at theexamplesfor a quick demonstration on how to use the functions. Please look up theTransferFunctiondocumentation, if you are unsure how to create a valid instance of aTransferFunction.
zplgen
zplgen is a utility library to aid in generating ZPL2 code.The core idiom is theCommandclass, which subclassesbytes. Another helper is theFontclass.Example usagef_default=Font('V',height=30)label=bytes()label+=Command.label_start()label+=Command.label_home(30,0)label+=Command.graphic_circle(x=550,y=15,diameter=100,border=6)label+=Command.field('?',x=560,y=50,font=f_default(45))label+=Command.field(name,x=0,y=135,font=f_default)label+=Command.label_end()send_to_printer(label)Running testsIn the base directory, run the following:python-munittestdiscover-stestsLicensezplgen is released under theMIT License.
zplgrf
UPDATE: If you’re only interested in the quality of barcodes when printing then first try using the new center of pixel options in cups-filters 1.11.4.zplgrfThis project contains the utils I made to convert to and from GRF images from ZPL while trying to diagnose why barcodes printed from CUPS on Linux and OSX were so blurry/fuzzy/etc. It also contains my attempt at sharpening the barcodes and a CUPS filter you can setup to try for yourself.Barcode QualityThe way CUPS (and at least my Windows driver too) prints PDFs to label printers is by converting the PDF to an image and then embedding that image in ZPL. The problem with this is that all PDF converters seem to aim to maintain font quality and don’t care much about the quality of vectors. Often this create unscanable barcodes especially at the low 203 dpi of most label printers.There are a couple of ways around this when generating your own PDFs (a barcode font, snap the barcode to round units, etc.) but they all have their downsides and don’t help you if you have to print a label generated by someone else.Originally I tried getting a greyscale image from Ghostscript and converting to mono while maintaining barcode quality but I always ended up destroying the font quality. I noticed that GRFs generated by Windows showed similar artifacting on text and a retail OSX driver says in their guide that their driver may also affect text quality so I think this kind of post processing is possibly what others are doing.In the end I opted for getting a mono image from Ghostscript and then searching the image data to find any suspected barcodes and simply widening the white areas. It’s very dumb and simple but works for me. You may need to tweak it for your own labels and there’s a good chance it could actually make your barcodes worse.UPDATE: I also added support for the center of pixel rule in Ghostscript when converting from PDFs. This improves barcode quality but also decreases the quality of some text.InstallationRunpip install zplgrf.DependenciesNormal installation should handle regular Python dependencies but this project also requires Ghostscript (gs) to be installed.I would recommend installing the newest version of Ghostscript. The tests fail due to slight rendering differences on old versions and the current center of pixel implementation isn’t compatible with 9.22-9.26.Using the Python APISome quick demos.Open a PDF, optimise the barcodes, and show the ZPL:from zplgrf import GRF with open('source.pdf', 'rb') as pdf: pages = GRF.from_pdf(pdf.read(), 'DEMO') for grf in pages: grf.optimise_barcodes() print(grf.to_zpl())When converting from PDFs you will get better performance and barcodes by using Ghostscript’s center of pixel rule instead of myoptimise_barcodes()method:from zplgrf import GRF with open('source.pdf', 'rb') as pdf: pages = GRF.from_pdf(pdf.read(), 'DEMO', center_of_pixel=True) for grf in pages: print(grf.to_zpl())To convert an image instead:from zplgrf import GRF with open('source.png', 'rb') as image: grf = GRF.from_image(image.read(), 'DEMO') grf.optimise_barcodes() print(grf.to_zpl(compression=3, quantity=1)) # Some random optionsIf the ZPL won’t print it’s possible that your printer doesn’t support ZB64 compressed images so trycompression=2instead.Extract all GRFs from ZPL and save them as PNGs:from zplgrf import GRF with open('source.zpl', 'r') as zpl: grfs = GRF.from_zpl(zpl.read()) for i, grf in enumerate(grfs): grf.to_image().save('output-%s.png' % i, 'PNG')Optimise all barcodes in a ZPL file:from zplgrf import GRF with open('source.zpl', 'r') as zpl: print(GRF.replace_grfs_in_zpl(zpl.read()))Arguments for the various methods are documented in the source. Some such asto_zpl()andoptimise_barcodes()have quite a few arguments that may need tweaking for your purposes.Using the CUPS FilterInstall the package normally and then copypdftozplto your CUPS filter directory which is usually/usr/lib/cups/filter. Make sure that the copied file has the same permissions as the other filters in the folder.Now edit the PPD file for your printer which is usually in/etc/cups/ppd. Find the lines containing*cupsFilterand add the following below them:*cupsFilter2: "application/pdf application/octet-stream 50 pdftozpl"Now restart CUPS and this new filter will take affect. Note that*cupsFilter2filters require CUPS 1.5+ and they disable all regular*cupsFilterfilters so you may need to setup more filters for other mimetypes.application/octet-streamis the mimetype CUPS uses for raw printing which is what we want to send raw ZPL to the printer.PerformancePerformance of the CUPS filter is pretty bad in comparison to the native filters written in C. On a Raspberry Pi 3 it takes about 2.5s to run but is low 100s of ms on a decent computer.
zpllibrary
zpllibraryA python library helping to generate ZPL. This is ongoing and is currently in Beta with basic zpl types includedYou can test generated code athttp://labelary.com/viewer.htmlUsage:Single elementoptions = Options() #Sets Default options for rendering simple_text_field = TextField("Content", 100, 100, Font(), True, False, NewLineConversion.Space) zpl = Engine(simple_text_field).to_zpl_string(options) print(zpl) #Output #^XA^A0N,30.0,30.0^FO100.0,100.0^FH^FDContent^FS^XZBarcodeoptions = Options() simple_barcode = Barcode39("Content", 100, 100, 200) zpl = Engine(simple_barcode).to_zpl_string(options) print(zpl) #Output #^XA^FO100.0,100.0^B3N,N,200.0,Y,N^FDContent^FS^XZWhole label using all available elementsoptions = Options() zpl_list = [] zpl_list.append(RawZpl('Check here')) zpl_list.append(TextField("Some\nText", 10, 10, Font(), True, True, NewLineConversion.Space)) zpl_list.append(FieldBlock("more text is here", 10, 200, 300, Font(), 2)) zpl_list.append(TextBlock("more text is here than before", 10, 300, 400, 200, Font())) zpl_list.append(Barcode128("123ABC", 100, 100)) zpl_list.append(Barcode39("123ABC", 100, 200)) zpl_list.append(BarcodeAnsi("123ABC", 100, 300, 100, "A", "D")) zpl_list.append(QrCode("QR content", 100, 400, magnification_factor=12)) zpl_list.append(GraphicBox(100, 500, 100, 100)) zpl_list.append(GraphicDiagonalLine(100, 600, 100, 100)) zpl_list.append(GraphicEllipse(100, 700, 100, 100)) zpl_list.append(GraphicCircle(100, 800, 20)) zpl_list.append(GraphicHorizontalLine(100, 900, 20)) zpl_list.append(GraphicVerticalLine(100, 1000, 20)) zpl_list.append(GraphicSymbol(SpecialCharacter.canadian_standards_association_approval, 100, 100, 100, 100)) zpl_list.append(DownloadGraphic(500, 100, "C:\\Users\\scott\\Pictures\\download.png")) zpl = Engine(zpl_list).render(options) print(zpl)
zplogger
ZPloggerZpower日志工具Usagefrom zplogger.logger import Logger logger = Logger( file=__file__, user='yulong', project="shouma", server="127.0.0.1", debug=True) log_msg = ''' this is a test msg for test logger in multiplelines. Stack messag: xxxx more stack info.. ''' # warning message logger.warn(sys._getframe().f_lineno, log_msg) # info message logger.info(sys._getframe().f_lineno, log_msg) # error message logger.error(sys._getframe().f_lineno, log_msg)
zplot
UNKNOWN
zpl-plat
No description available on PyPI.