package
stringlengths
1
122
pacakge-description
stringlengths
0
1.3M
zerotk.zops
Extensible command line operations for software development.
zero-true
Zero True: A New Kind of Code Notebook🌐 OverviewWelcome toZero True, your go-to platform for creating beautiful and professional data-driven notebooks and applications in pure Python. Designed to foster collaboration and improve data accessibility, Zero True offers a rich UI library along with an intelligent code parser. Your notebook will always stay in sync.📚 Table of ContentsFeaturesRequirementsQuick StartUsageCommunityFeatures📝 Python + SQL reactive computational notebook.🌌 No hidden state. Our reactive cell updates show you what your notebook looks like in real time.📊 Dynamic UI rendering with beautifulVuetifycomponents.🔄 Automatic dependency tracking between cells.🚀 Integrated app publishing with a simple command.⚙ RequirementsPython 3.9 (Anaconda or virtual environment recommended)🚀 Quick Startpipinstallzero-true zero-truenotebookUsageOnce the application is running, navigate tohttp://localhost:1326and start creating and executing code cells. Click the "Run" button to execute code and visualize the output below the editor.Basic Exampleimportzero_trueasztslider=zt.Slider(id='slider_1')print('The squared value is '+str(slider.value**2))More Complicated Example using Python + SQLFor this example you will need scikitlearnpipinstallscikit-learnOnce it has installed, launch your notebook. We will be using the Iris dataset from scikit learn to create an app where people can filter the data using the our UI components and SQL editor. We start with a Python cell:importzero_trueasztimportsklearnimportpandasaspdfromsklearnimportdatasetsiris=datasets.load_iris()# Creating a DataFrame with the feature datairis_df=pd.DataFrame(data=iris.data,columns=iris.feature_names)# Map the target indices to target namesiris_df['target']=iris.targetiris_df['target_name']=iris_df['target'].apply(lambdax:iris.target_names[x])# Rename columns to remove spaces and standardizeiris_df.columns=[col.replace(' ','_').replace('(cm)','cm')forcoliniris_df.columns]iris_df.columns=[col.replace(' ','_').replace('(cm)','cm')forcoliniris_df.columns]iris_df.drop('target',axis=1,inplace=True)#all the different sliderssepal_width_slider=zt.RangeSlider(id='sepal_width',min=iris_df.sepal_width_cm.min(),max=iris_df.sepal_width_cm.max(),step=0.1,label='Sepal Width')petal_width_slider=zt.RangeSlider(id='petal_width',min=iris_df.petal_width_cm.min(),max=iris_df.petal_width_cm.max(),step=0.1,label='Petal Width')sepal_length_slider=zt.RangeSlider(id='sepal_length',min=iris_df.sepal_length_cm.min(),max=iris_df.sepal_length_cm.max(),step=0.1,label='Sepal Length')petal_length_slider=zt.RangeSlider(id='petal_lenght',min=iris_df.petal_length_cm.min(),max=iris_df.petal_length_cm.max(),step=0.1,label='Petal Length')Then add a SQL cell below to query the dataframe. Notice how we can query a pandas dataframe directly and reference our UI components in the query:SELECT*FROMiris_dfWHERE(sepal_length_cmBETWEEN{sepal_length_slider.value[0]}AND{sepal_length_slider.value[1]})AND(sepal_width_cmBETWEEN{sepal_width_slider.value[0]}AND{sepal_width_slider.value[1]})AND(petal_width_cmBETWEEN{petal_width_slider.value[0]}AND{petal_width_slider.value[1]})AND(petal_length_cmBETWEEN{petal_length_slider.value[0]}AND{petal_length_slider.value[1]})Notice how dragging the slider will update the dataframe. Set the parameters for your Iris bouquet and check out the data! You can see a published app for thisexample.We support a large range of use cases and UI components. For more information please check out our docs:docs! You can also find some more narrative tutorials at our Medium publicationhere.PublishingPublishing your notebook is easy. Currently it's a one liner from the command line:zero-truepublish[api-key][user-name][project-name][project-source]Publishing is only open to a limited audience. If you are interested in publishing your notebook at a URL in our public cloud please fill out the email waiting list on ourwebsite.CommunityReach out on GitHub with any feature requests or bugs that you encounter and share your work with us onTwitter/X! We are also active onlinkedin. We would love to see what you're able to build using Zero-True.
zero-two
zero-twoArbitrary library used for testing publishing a python package using poetry.
zeroundub
ProjectZero UndubUndub project for Tecmo's Project Zero - the EU version (the first one) for the PS2.Why?I first played Project Zero in 2010 and fell in love with everything about the game ... well, everything except the English audio. I soon started making my own undubbed version by merging the Japanese release (Zero) with the European one. At the time, it was an entertaining journey of nights spent disassembling the main ELF, reverse-engineering the game data, and transcribing the game audio from FMVs, and cutscenes. It was fun, and I can safely say that I learned a lot from that experience.So, why now?By chance, I stumbled onwagrenier's GitHub pageof the very same project more than 10 years later. That made me remember the good old times, and I suddenly felt the urge to rewrite my old and ugly C code into modern python, with a lot more additions! In fact, initially, the code was a mess of uncoordinated tools that had to be run by hand. It produced a bunch of files (not a nice bootable ISO) that required a not so easy to find program to be converted into an ISO image. Luckily, things are a lot better now!What can it do?With this code, it's possible to merge the European and Japanese versions of the game into an undubbed European version. That is a European version but with all the audio / voices / FMVs taken from the Japanese one. The original game was localized into 5 languages: English, French, German, Spanish, and Italian. All languages share the same English audio but have localized text and graphics. All languages except English have subtitles because, for some reason, the developers decided not to include English subtitles in the English localization. That is understandable but leaves the undubber with a severe problem since, once the English audio is replaced with the Japanese one, subtitles become slightly necessary unless you are fluent in Japanese. Still, I would argue that you are probably better off playing the original Japanese game at that point.This code re-enables the English subtitles and re-constructs the localized English file from scratch, re-injecting the subtitles. I say re-injecting because the original English localization does not have the English text of each FMV or in-game cutscene. Since they were not to be shown in the first place, why bother? So a part of the allocated space for the text has been filled with dummy text. But only a part of it. There are, in fact, 271 text entries in each localization, but the English one has only 225 in it. By simply forcing the English subtitles to show, the game WILL crash when trying to display the missing ones. By reverse-engineering the localization binary file, it is possible to unpack it, replace the 225 dummy texts with the whole 271 English subtitles, and rebuild it into a perfectly working English localization.FeaturesThe idea of unpacking and re-constructing is a crucial aspect of this tool. This first iteration of the Project Zero franchise packs all game-related files (except for FMVs) into a huge 1.2GB binary file (IMGBD.BIN). The file is accompanied by a small file (IMG_HD.BIN) that serves as table of contents. From what I understand, the standard undubbing procedure consists in replacing the specific bytes of each content to undub into the ISO at the correct position. For example, to replace the English localization, one would need to find the exact offset in the iso where the original one is stored and replace it, being very careful not to exceed the original size. Doing so would overwrite data of other files, rendering the ISO corrupted or not properly working. On the contrary, this tool takes a similar yet different approach, by recreating and replacing the whole IMG_BD.BIN binary file with a new one containing the patched contents. To do so, it parses the original IMG_BD.BIN binary file and extracts all the necessary files for the undub process (localization files, audio, etc.). These files are then replaced with the Japanese ones (or patched ones like for the English localization), and a new binary file that can be replaced into the ISO is rebuilt from scratch. The only constraint, as previously said, is that the new binary file has to be smaller or equal in size to the original one. Luckily, the guys at Tecmo decided to align each file in the IMG_BD.BIN file not just to an LBA multiple of 2048 (the size of a sector in an ISO) but to an LBA multiple of 16 times 2048! The reason probably lies in DVD access timings, but according to my tests, aligning the files to a smaller multiple of 2048 does not incur in access timing problems. The only effect is the reduction in size of the resulting IMG_BD.BIN. In fact, by aligning the files to LBAs just multiple of 2048, it is possible to save around 30MB, which is plenty enough to compensate for the extra few kB of the English localization and the difference in size that some Japanese audio files have with respect to the equivalent English ones. This method effectively removes _anylimitation to what can be injected into the European version! So, contrary to other tools, this one does not need to sacrifice anything in the original game, say a non-English language containing all 271 subtitles, to accommodate the extra English subtitles. This results in a clean undubbed ISO where all the languages are fully functional!In summary:The main ELF is patched to show the English subtitlesEnglish subtitles have been transcribed and injected into the English localizationFMVs (both PAL and NTSC) have been remuxed with the Japanese audio trackAll other languages are left unchanged and functionalThe ELF can be further patched to add extra nice features! (see below)Extra features:Usually, the game asks to choose a language only the first time, when no save data is present. The following times the game starts in the previous language, forcing anyone who would like to change the language to start the game without the memory card inserted. The ELF can be patched to restore the language selection screen at every boot. The only downside is that the game does not remember the video format preference. Meaning that if previously the game was being played in NTSC format, that option must be reselected every time. This is an optional feature, so it is left to the user's preference.Given the recent progress in PS2 emulation, specifically regardingPCSX2emulator, the great community behind it has come up with nice enhancements, such as 16:9 (not stretched, but actual 16:9 in-game rendering) widescreen patches. Thanks to a tool called "PS2 Patch Engine" developed bypelvicthrustmanand later ported to Linux (PS2_Pnacher) bySnaggly, it is possible to patch the ELF to incorporate some of these patches. Obviously, I decided to include the relevant bits into the game ELF, allowing to:Enable 16:9 aspect ratio in-gameEnable 19:9 aspect ratio in FMVs via adding black borders instead of stretching (strongly suggested if the 19:9 in-game patch is enabled, but the user is free to leave them stretched if against the pillarbox effect)Remove in-game bloom effectRemove in-game dark filterRemove in-game noise effectRemove main menu noise effectAll the above community patches are optional, and the choice of which to enable is left to the user of this software (although I recommend enabling them all, except for the main menu noise effect which I actually prefer to leave it enabled).What's next?During the complete rewrite of my old code, I rediscovered a lot of stuff about the game files and their format. With a bit of effort, this information can be found on the internet, but there is not a centralized source for it all. With time, I would like to create a small compendium of what I ended up researching about PK2 (game packages), STR (game audio), OBJ Localization files, Font files, and other stuff as well. This repository already contains a lot of code to handle a good part of them. Still, if possible, I would like to release specific tools to address each one of them and the relative documentation.Small UpdateI've published some of the tools I used for the undub together with an initial documentation for some game formats here:https://github.com/karas84/ProjectZeroTools.UsageThe program comes as both a python3 command-line tool (with very few dependencies) or as a tkinter GUI. To run it, you will need:A European Project Zero (SLES508.21) ISO image dumped from your own original copy of the gameA Japanese Zero (SLPS250.74) ISO image dumped from your own original copy of the gamePython 3.7 or newerThe program has been developed on Linux, but it also works on Windows if both python and the needed dependencies are correctly installed (both natively or on WSL, although in the first versions of WSL the disk access is quite slower than the native one and the undubbing process may require more time to complete).Command Line Interface (CLI)The command-line interface (CLI) can be launched using theundub.pyfile. It accepts 3 mandatory arguments:The path to the European ISOThe path to the Japanese ISOThe output path for the undubbed ISOAdditionally, several flags can be specified to patch the ELF with extra features. Please refer to the program's help for further details.Graphical User Interface (GUI)The graphical user interface (GUI) can be launched using theundub_gui.pyfile. It is built upon the tkinter library, which should be installed manually (but often comes preinstalled with python3).Instructions on how to preform the undub are shown in the "Info" section of the GUI.Copyright DisclaimerThis tool is supposed to be used with ISO files obtained from your own legally owned copies of the games (both European and Japanese versions). I do not condone piracy and strongly believe that game developers MUST be supported. It is for this precise reason that this tool does not contain any asset whatsoever of the original game. Because I believe that only the copyright holder has the right to distribute the files. For the very same reason, the missing English subtitles are not stored as plaintext English but are kept as hex strings of the bitwise or operation with the original English localization binary file. This way, only by using the original ISO file, the subtitles can be reconstructed and injected into the final ISO.Final NotesI've tested the undubbed version on both PCSX2 and my own PS2. I've played it through various spots using several save files and never encountered a problem. This does not mean that there are no bugs, so if you find anything, please submit an issue here, and I will try to address it!Moreover, I decided to release this tool to let other people, who share the same love for this game like me, be able to enjoy it to the fullest. I do not seek recognition, so there are no modifications in the undubbed version that carry my name or any way to trace back the undubbed game to me. What you get is an exact copy of the European version, but with Japanese audio.AcknowledgementsThis tool would not exist if it wasn't for the hard work of many individuals, to whom I'd like to give my thanks:First,wagrenier, for hisZeroUndubproject, who inspired me again to work on this softwarewagrenieragain, for his excellent python version ofPssMux, which makes this tool able to automatically undub all FMVs in the game!wagrenieragain, for his help with replacing all game models with the Japanese onespgertand the wholePCSX2 communityfor the great patches that can be injected into the gamepelvicthrustmanandSnagglyfor their tools to inject patches into the ELFweirdbeardgame, for the Kirie camera bug fixFlamePurgefor proofreading the subtitlesAll the guys out there on so many forums I've lost track of, that released bits of information about many game file formatsFinally, to 2010 me, who painstakingly spent weeks building his own undub, reversed-engineered the game data and transcribed all FMVs and cutscenes
zero-users
Another simple app to manage profiles in django.
zerovm-sphinx-theme
This package bundles theZeroVMtheme forSphinx.Install the package and add this to yourconf.py:import zerovm_sphinx_theme html_theme_path = [zerovm_sphinx_theme.theme_path] html_theme = 'zerovm'That will configure the theme path correctly and activate the theme.Changelog1.1 (2014-03-28):Version 1.0 did not work sinceREADME.rstwasn’t distributed.1.0 (2014-03-28):First release.
zero-width-lib
zero-width-lib-pythonWhat's zero-width-libZero-width-lib is a library for manipulating zero width characters (ZWC), which are non-printing and invisible chars.The common usage of ZWC includes fingerprinting confidential text, embedding hidden text and escaping from string matching (i.e. regex)...The lib is inspired by this greatmedium articleand got the following features:💯stable & cover full test cases😆support full width Unicode chars⚡️dependencies & performance considered📦support CJS, ESM and UMDForked fromthisJavaScript implementation.WARNING: Not 100% compatible with original implementation.Installpip install zero_width_libUsageimportzero_width_libaszwlib# orfromzero_width_libimport*# note * represents the invisible ZWC# U+ represents the Unicode for the character# 1. convert texttext="text"zwc=zwlib.t2z(text)# '********'back=zwlib.z2t(zwc)# 'text'# 2. embed hidden textvisible='hello world'hidden='transplanted by @shacha086'encoded=zwlib.encode(visible,hidden)# 'h*********ello world'decoded=zwlib.decode(encoded)# 'transplanted by @shacha086'# 3. extract ZWC from textextracted=zwlib.extract(encoded)vis=extracted['visible']# 'hello world'hid=extracted['hidden']# '*********'# 4. escape from string matchingforbidden='forbidden'escaped=zwlib.split(forbidden)# 'f*o*r*b*i*d*d*e*n*'LicenseMIT
zerqu
Zerqu is a forum library that provides APIs to create topics, comments and etc.
zerrphix
OverviewZerrphix is a new HDI DUNE index and skinner written in python.The major difference between Zerrphix and other HDI Dune indexers and skinners is that Zerrphix uses the dune_http functionality. This essentially means that the UI structure is obtained from a web server rather than a folder structure using dune_folder.txt (e.g. Yadis).It should be noted that there is a big caveat to using Zerrphix which is that a Linux computer needs to be running Zerrphix (pretty much 24/7) for the dune to be able to use the Zerrphix UI at any time. The raspberry pi has been tested and looks to be suitable.Current FeaturesReal-time dynamic menu structure generationDesigned to be fully automated such that once a new film/show is detected and processed, from a pre configured scan path, it is available on the Zerrphix UI.Highly customisable menu structure/templatesMulti user supportTemplate per user supportFilm TV/Search on the duneShows last film/show watched on user’s main menuContinue and Watch Next functionality for TV Show EpisodesAdd Favourites/To Watch for Film and TV from the duneEach user can have their own language set (images and text)Each user can have a customised title, overview for film/show/show episodeMulti Dune supportRoadmapAllow custom plugins to allow for other online databases lookups (tmdb/thetvdb already supported)Installationhttps://docs.google.com/document/d/1SXcNiFSxuZPI2cABDHOrdCOsF-_8BEgjLonA2R31ZOM/edit?usp=sharingUsagehttps://docs.google.com/document/d/1B-R4R3x74G0xGZjDC0SjLlXQ0rggPLNrX7Hgy86Htjk/edit?usp=sharingIRChttps://webchat.freenode.net/?channels=zerrphix
zertoapilib
zertoapl is a simple python3 API wrapper for the Zerto product by the eponymous corporation. It is intended to simplify the deployment and management of Zerto in a code-driven manner. Potential uses for this API wrapper are as diverse as you may wish to make it. An example script of automatically protecting tagged virtual machines (VMs) is included in this library.
zertoapl
zertoapl is a simple python3 API wrapper for the Zerto product by the eponymous corporation. It is intended to simplify the deployment and management of Zerto in a code-driven manner. Potential uses for this API wrapper are as diverse as you may wish to make it. An example script of automatically protecting tagged virtual machines (VMs) is included in this library.
zerty
No description available on PyPI.
zerv
# Zerv :fire:Yet another AWS Lambda [+ API Gateway] CLI deployment tool.## IMPORTANTThis is a draft-project which means a lot, if not all, could change in next couple of weeks.## DocumentationNo docs for the time being.This will create/update a lambda function and if you want you can attach a API Gateway trigger to it.## UsageFor the time being the only way you can test is:`python zerv/handler.py``python zerv/handler.py --dir=/path/to/your/project``python zerv/handler.py --function=prt_mx_rfc_validation`This uses Boto3 so you need to check credentials config for it### SettingsIt will look like:#### Project settings```project:name: 'default'root_dir: 'lambdas'settings_file: 'settings'source_code_folder: 'code'requirements_file: 'requirements.txt'precompiled_packages:- requests: "/path/to"permissions:iam_role: "arn:aws:iam::9848734876:role/AROLE"execution:timeout: 300memory_size: 128```#### Function settings```api_gateway:enabled: trueendpoint: nullstage: defaultenvironment:required_variables:- ENVfunction:description: "My fancy description"arn: "some ARN so it doesnt create a new one"name: "some name so it doesn't create a new one"runtime: python3.6handler: handler```#### Default settings```project:name: 'Zerv Project'root_dir: 'lambdas'settings_file: 'settings'source_code_folder: 'code'requirements_file: 'requirements.txt'precompiled_packages: ~function:arn: ~description: ~handler: handlername: ~requirements_file: 'requirements.txt'runtime: python3.6append_project_name: trueapi_gateway:enabled: falseendpoint: ~stage: defaultpermissions:iam_role: ~execution:timeout: 300memory_size: 128environment:required_variables: ~source_path: ~```## Contributors:- [@pablotrinidad](https://github.com/pablotrinidad/)- [@henocdz](https://github.com/henocdz/)## TODOs- [ ] Read/install requirements.txt- [ ] Only install packages compatible with manylinux- [ ] Include environment variables- [ ] Documentation- [ ] Replace argparse with click- [ ] Handle errors properly- [ ] ...## CONTRIBUTINGPlease don't do it... *yet*, this a draft-project with a lot of spaghetti-code, bad practices and not even ready for being a PyPi package, and of course, I'll squash several commits. If you're interested please drop me an email: henocdz [AT] gmailIf curious...- Create a virtualenv- Clone the project- cd zerv- pip install -e .**Thx**
zes3t
Zes3t (pronounced “zest!”) is a Python API to access Amazon’s S3 AWS storage service. Unlike many other S3 APIs, zes3t uses the SOAP web services in the background rather than the REST web services. The SOAP client implementation is the excellent “suds” project. The zes3t API very closely mirrors Amazon’s own API, and is well-documented; it also fully supports the COPY operation.
zescator
a simple python obfuscator that uses base64 and strings
zesje
UNKNOWN
zesl
Zayne's Extremely Simple LanguageInspired byTom's Obvious Minimal Language (TOML)andYAMLThis project isn't serious btw; This was just a side project 👀.ZESLwon't be getting regularly scheduled updates.GrammarZESLuses theBNFgrammar format. It's grammar is as follows:<program>::=<statement><statement>::=<key>|<comment><letter>::="A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" | "S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z" | "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z"<digit>::="0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"<symbol>::="|" | " " | "!" | "#" | "$" | "%" | "&" | "(" | ")" | "*" | "+" | "," | "-" | "." | "/" | ":" | ";" | ">" | "=" | "<" | "?" | "@" | "[" | "\\" | "]" | "^" | "_" | "`" | "{" | "}" | "~"<comment>::=">" " "* (<digit>|<letter>| " " |<symbol>)+<value>::="\"" (<digit>|<letter>| " " |<symbol>)* "\"" |<digit>+ | "."*<digit>+ "."*<digit>*<key>::=<letter>+ "="<value>" "*<comment>*SyntaxZESLsupports strings, integers, and floats.ZESLalso support usage of comments.> This is a comment. city="Salt Lake City, Utah" area=801 precipitation=50.0There are multiple ways to type a value, however there're somebigno-no(s).The correct way to enclose an string inZESLwould be indouble quotes. Attempting to use single quotes will result in an error.quote='Do not fear mistakes. There are none. (Miles Davis)' > Wrong way to write strings. quote="Do not fear mistakes. There are none. (Miles Davis)" > Correct way to write strings. Note the double quotes.GoalsIf I do decide to at least dedicateSOMEof my time to this project, here's what I would do.Improve BNF grammar. Adding double-quotes and/or back-ticks for string would be nice. Make context a bit more loose.Add[]and{}, allows for defining dicts and/or lists.Syntax sugar!?
zespa
No description available on PyPI.
zess_chapter3
UNKNOWN
zess_chapter5
UNKNOWN
zess_chapter6
UNKNOWN
zess_chapter7
UNKNOWN
zess_nester
UNKNOWN
zest
Project TitleA lightweight decorator based testing package for Python 3.5+.InstallingThe easiest way to install is to use pip:pip install zestorpython3 -m pip install zestYou can also download the source and place it the directory of the module you want to use it in. An example directory structure is shown below:project_directoryzestzest's files hereyour_file.pyyour_test_file.pyGetting StartedA suggested workflow is to write the test first in a seperatetests.pyfile, like so:from zest import tests, raises, test_all import main @tests(main.squared) def test_squared(func = None): """Ensure squaring is done accureately and only squarable types are squared""" # Make sure ValueError is thrown if invalid imputs are given assert raises(TypeError, func, "NaN"), "Should raise TypeError when 'NaN' supplied" assert raises(TypeError, func, {1, 2, 3}), "Should raise TypeError when {1, 2, 3} supplied" assert func(4) == 16, "4^2 is 16, received %s" % func(4) assert func(5) == 25, "5^2 is 25, received %s" % func(5) print(test_squared())Note multiple tests can be placed in one test function. main.py simply contains a function called squared that squares the input and returns it.Zest keeps track of all registered testing functions, allowing you to run them all at once, and get grouped information on the results of the test, like so:print(test_all())At the moment test_all() only returns a pretty print output, but in the future this will be fleshed out to be more comprehensivePrerequisitesPython 3.5+AuthorsJeremy Zolnai-Lucas-Initial work-Jezza672LicenseThis project is licensed under the MIT License - see theLICENSEfile for details
zest.cachetuning
IntroductionThis Plone product allows some cache tuning for your site. Currently it only allows username replacment, but we might add some more features in the future.Username replacementIf you enable this option, you can cache the whole pages and an Ajax request will replace the username in the page in order to reduce the load.If you use a custom theme, you can specify the query used to select the HTML node containing the username. This query is written in the classic CSS format.Extra librariesThe Javascript cookie setting is done using jquery.cookie.js, written by Klaus Hartl. The project is hosted athttps://github.com/carhartl/jquery-cookie.Changelog0.4 (2012-08-24)Return userid when full name is empty. [vincent]Cleaned sources - added buildout for tests. [maurits]0.3 (2012-08-24)Splitted the zestcachetuning.js file so we have one version for authenticated users and one for anonymous. [vincent]0.2 (2012-08-23)Store a cookie with the username so we don’t have to make an Ajax call everytime. [vincent]Fixed an error happening with anonymous users. [vincent]0.1 (2012-01-12)Initial release [vincent]
zest.commentcleanup
IntroductionYou have enabled commenting in your Plone Site. Now you wake up and see that during the night some spammer has added 1337 comments in your site. What do you do now? Sure, you first shoot him and then you integrate some captcha solution, but you still have those 1337 comments. You do not want to click 1337 times on a delete button. Have no fear:zest.commentcleanupwill rescue you! Or at least it will help you get rid of those spam comments faster.How does it work?Just addzest.commentcleanupto the eggs parameter of the instance section of your buildout.cfg. On Plone 3.2 or earlier add it to the zcml parameter as well.The package simply works by registering some browser views. Start your instance, go to the root of your site and add/@@cleanup-comments-overviewto the url. This will give you an overview of which items in your site have comments. It is sorted so the item with the most comments is at the top.Note that the overview works on other contexts as well, for example on a folder.In the overview click on themanagelink of an item with comments. This takes you to thecleanup-comments-detailspage of that item. This lists all comments, ordered by creation date. From there you can delete single items.But the biggest thing you can do there is: select a comment and delete thisand all following comments. The idea is that the first three comments may be valid comments, then there are a gazillion spam comments, and very likely no actual human has added a valid comment somewhere in that spam flood anymore. So you keep the first few comments and delete the rest without having to buy a new mouse because you have clicked too much.From the overview page you can also go to the@@cleanup-comments-listpage. Here you see the latest comments, which you can remove one at a time. This is handier when you have done the big cleanup already and only need to check the new comments of the last few days.All the used views are only available if you have theManage portalpermission.RequirementsThis has been tested on Plone 3.3.5 with the standard comments. It might or might not work with packages likequintagroup.plonecommentsorplone.app.discussion. It probably works on Plone 2.5 and 4 as well, but I have not checked. Hey, it might even work in a default CMF site.Changelog1.6 (2013-05-13)Support plone.app.discussion. [maurits]1.5 (2012-09-12)Moved to github. [maurits]1.4 (2011-01-26)Also catch AttributeError in @@find-catalog-comments, which may happen for objects in portal_skins/custom. [maurits]1.3 (2011-01-26)Moved the remove-buttons more the the left, so they do not hop around after deleting an item with a long title, or that causes a new long title to appear. [maurits]On the overview page offer to also index comments in objects that currently do not allow comments but may have done so in the past. [maurits]When switching comments off for an object, uncatalog its existing comments. [maurits]When turning comments on for an object, catalog its possibly already existing comments, when needed. [maurits]On the details page, also show number of actual comments, instead of only the comments in the catalog. [maurits]Added @@find-catalog-comments page (linked from the overview page) that finds and catalogs all comments for objects that currently allow commenting. This is needed after a clear and rebuild of the portal_catalog, as the catalog then loses all info about comments. [maurits]1.2 (2011-01-04)Sort the cleanup-comments-list on creation date. [maurits]1.1 (2011-01-04)Handle redirection in the same way everywhere, so you also get to the same batched page using a came_from parameter. [maurits]Added ‘@@cleanup-comments-list’ page that lists the latest comments. [maurits]1.0 (2010-12-21)Initial release
zest.emailhider
Zest emailhiderThis document describes the zest.emailhider package.DependenciesThis package depends on jquery.pyproxy to integrate python code with jquery code.OverviewThis package provides a mechanism to hide email addresses with JavaScript. Or actually: with this package you can hide your email addresses by default so they are never in the html; with javascript the addresses are then fetched and displayed.For every content item in your site you can have exactly one email address, as we look up the email address for an object by its UID. For objects for which you want this you should register a simple adapter to the IMailable interface, so we can ask this adapter for anemailattribute and aUIDmethod. The ‘emailhider’ view is provided to generate the placeholder link.Objects display a placeholder link with ahidden-emailclass, auidrel attribute and aemail-uid-<someuid>class set to the UID of an object; when the page is loaded some jQuery is run to make a request for all those links to replace them with a ‘mailto’ link for that object. Using this mechanism the email address isn’t visible in the initial page load, and it requires JavaScript to be seen - so it is much harder for spammers to harvest.Special case: when the uid contains ‘email’ or ‘address’ it is clearly no real uid. In that case we do nothing with the IMailable interface but we try to get a property with this ‘uid’ from the property sheet of the portal. Main use case is of course the ‘email_from_address’, but you can add other addresses as well, like ‘info_email’. If you want to display the email_from address in for example a static portlet on any page in the site, use this html code:<a class="hidden-email email-uid-email_from_address" rel="email_from_address"> Activate JavaScript to see this address.</a>You can load thetest_emailhiderpage to see if this works.Instructions for your own packageWhat do you need to do if you want to use this in your own package, for your own content type?First you need to make your content type adaptable to the IMailable interface, either directly or via an adapter.If your content type already has aUIDmethod (like all Archetypes content types) and anemailattribute, you can use some zcml like this:<class class=".content.MyContentType"> <implements interface="zest.emailhider.interfaces.IMailable" /> </class>If not, then you need to register an adapter for your content type that has this method and attribute. For example something like this:from zope.component import adapts from zope.interface import implements from zest.emailhider.interfaces import IMailable from your.package.interfaces import IMyContentType class MailableAdapter(object): adapts(IMyContentType) implements(IMailable) def __init__(self, context): self.context = context def UID(self): return self.context.my_special_uid_attribute @property def email(self): return self.context.getSomeContactAddress()Second, in the page template of your content type you need to add code to show the placeholder text instead of the real email address:<span>For more information contact us via email:</span> <span tal:replace="structure context/@@emailhider" />Note that if you want this to still work when zest.emailhider is not installed, you can use this code instead:<span tal:replace="structure context/@@emailhider|context/email" />This shows the unprotected plain text email when zest.emailhider is is not available. When you are using zest.emailhider 2.6 or higher this works a bit better, as we have introduced an own browser layer: the @@emailhider page is only available when zest.emailhider is actually installed in the Plone Site. This also makes it safe to use zest.emailhider when you have more than one Plone Site in a single Zope instance and want emailhider to only be used in one them.Note that the generated code in the template is very small, so you can also look at the page template in zest.emailhider and copy some code from there and change it to your own needs. As long as your objects can be found by UID in the uid_catalog and your content type can be adapted to IMailable to get the email attribute, it should all work fine.Note on KSS usage in older releasesOlder releases (until and including 1.3) used KSS instead of jQuery. As our functionality should of course also work for anonymous users, we had to make KSS publicly accessible. So all javascript that was needed for KSS was loaded for anonymous users as well.We cannot undo that automatically, as the package has no way of knowing if the same change was needed by some other package or was done for other valid reasons by a Manager. So you should check the javascript registry in the ZMI and see if this needs to be undone so anonymous users no longer get the kss javascripts as they no longer need that.For reference, this is the normal line in the Condition field of++resource++kukit.js(all on one line):python: not here.restrictedTraverse('@@plone_portal_state').anonymous() and here.restrictedTraverse('@@kss_devel_mode').isoff()and this is the normal line in the Condition field of++resource++kukit-devel.js(all on one line):python: not here.restrictedTraverse('@@plone_portal_state').anonymous() and here.restrictedTraverse('@@kss_devel_mode').ison()CompatibilityVersion 3.0 should work on Plone 4.1, 4.2, 4.3, 5.0.For older Plone versions, please stick to the 2.x line. Latest release as of writing is 2.7.Note that on Plone 5.0 we are not completely modern: we register our css and javascript in the old portal tools, not in the new resource registry. So it ends up in the Plone legacy bundle.History of zest.emailhider package3.1.3 (2018-02-20)Make ‘No uids found in request.’ a warning instead of an error. I see bots requesting this url. [maurits]3.1.2 (2017-03-08)Do not render our javascript inline. It leads to display problems when it is included on a 404 page or any other non 20x page: an assertion inProducts.ResourceRegistriesfails, resulting in the html being returned with mimetype javascript. That seems a possible problem with any inline script. Added upgrade step for this. [maurits]3.1.1 (2017-02-24)Fixed javascript bug that caused a request even without any emails to reveal. [maurits]3.1 (2016-11-02)Query and reveal all emails at once. If you have an employee content type that you have hooked up to zest.emailhider, and you have a page showing fifty employees, previously we would fire fifty ajax requests. Now we gather everything into one request. [maurits]3.0 (2015-10-03)Added Travis badge. [maurits]Support Plone 5 by readingplone.email_from_addressfrom the registry. This loses compatibility with Plone 4.0. We try reading any email (also your own additional emails) from the registry first, withplone.prepended, and then look for a property on the portal root. [maurits]Use$instead ofjqin our javascript. Now it works without needingjquery-integration.js. This loses compatibility with Plone 3. [maurits]Addedtest_emailhiderpage that hides the portalemail_from_address, so you can easily test it. When you disable your javascript you should not see an email address. [maurits]2.7 (2012-09-12)Moved to github. [maurits]2.6 (2011-11-11)Added MANIFEST.in so our generated .mo files are added to the source distribution. [maurits]Register our browser views only for our own new browser layer. Added an upgrade step for this. This makes it easier for other packages to have a conditional dependency on zest.emailhider. [maurits]2.5 (2011-06-01)Updated call to ‘jq_reveal_email’ to use the one at the root of the site to avoid security errors. [vincent]2.4 (2011-05-10)Updated jquery.pyproxy dependency to at least 0.3.1 and removed the now no longer needed clean_string call. [maurits]2.3 (2010-12-15)Not only look up a fake uid for email_from_address as portal property, but do this for any fake uid that has ‘email’ or ‘address’ in it. Log warnings when no email address can be found for a fake or real uid. [maurits]2.2 (2010-12-14)Added another upgrade step as we definitely need to apply our javascript registry too when upgrading. Really at this point a plain reinstall in the portal_quickinstaller is actually fine, which we could also define as upgrade step, but never mind that now. [maurits]2.1 (2010-12-14)Added two upgrade steps to upgrade from 1.x by installing jquery.pyproxy and running our kss step (which just removes our no longer needed kss file). [maurits]2.0 (2010-12-09)Use jquery.pyproxy instead of KSS. This makes the page load much less for anonymous users. [vincent+maurits]1.3 (2009-12-28)Made reveal_email available always, as it should just work whenever we want to hide the glocal ‘email_from_address’. If we have a real uid target, then try to adapt that target to the IMailable interface and if that fails we just silently do nothing. [maurits]1.2 (2008-11-19)Using kss.plugin.cacheability and added it as a dependency. [jladage]Allow to set the uid to email_from_address. [jladage]Changed the KSS to use the load event instead of the click event - it now either works transparently, or asks the user to activate JS. [simon]1.1 (2008-10-24)Added translations and modified template to use them. [simon]Initial creation of project. [simon]1.0 (2008-10-20)Initial creation of project. [simon]
zester
Zester is a library that makes it easier to develop Python clients for websites without APIs.No lxml, no XPath, just javascript.Let’s make a client library forHacker Newsby saving the following code in a file named hnclient.py:from zester import MultipleClient, Attribute class HNClient(MultipleClient): url = "http://news.ycombinator.com/" title = Attribute(selector="$('.title a')", modifier="$(el).html()") link = Attribute(selector="$('.title a')"), modifier="$(el).attr('href')") points = Attribute(selector="$('.subtext span')", modifier="$(el).html().replace(' points', '')")Now, let’s use the client we just made. Open a python shell:>>> from hnclient import HNClient >>> client = HNClient() >>> stories = client.process() >>> stories[0] HNClientResponse(points=u'200', link=u'http://daltoncaldwell.com/what-twitter-could-have-been', title=u'What Twitter could have been') >>> print stories[0].title What Twitter could have been >>> print stories[0].link http://daltoncaldwell.com/what-twitter-could-have-been >>> print stories[0].points 56We subclassed MultipleClient there because we were planning on returning multiple results. If we wanted to make a client for something likeWeather.govthat returned a single result, we could do something like this:from zester import SingleClient, Attribute class WeatherClient(SingleClient): url = "http://forecast.weather.gov/MapClick.php?lat={lat}&lon={lng}" temperature = Attribute(selector="$('.myforecast-current-lrg').html()") humidity = Attribute(selector="$('.current-conditions-detail li').contents()[1]") heat_index = Attribute(selector="$('.current-conditions-detail li').contents()[11]") def __init__(self, lat, lng, *args, **kwargs): super(WeatherClient, self).__init__(*args, **kwargs) self.url = self.url.format(lat=lat, lng=lng)This also demonstrates how you can allow arguments to be taken:>>> from weather_client import WeatherClient >>> client = WeatherClient(lat=40.7143528, lng=-74.0059731) >>> curr_weather = client.process() >>> curr_weather WeatherClientResponse(heat_index=u'82\xb0F (28\xb0C)', temperature=u'80\xb0F', humidity=u'58%') >>> print curr_weather.temperature 80°F >>> print curr_weather.humidity 58% >>> print curr_weather.heat_index 82°F (28°C)InstallationZester is dependant uponGhost.py. You must install it before installing Zester. Ghost.py will also require the installation of either PyQt or PySide.After Ghost.py is installed, to install zester:$ pip install zester
zestful-parse-ingredient
Ingredient Parser (Zestful Client)OverviewParse recipe ingredient strings into structured data.ExamplesParse a single ingredientimportjsonimportparse_ingredientingredient=parse_ingredient.parse('2 1/2 tablespoons finely chopped parsley')print(json.dumps(ingredient.as_dict())){"quantity":2.5,"unit":"tablespoon","product":"parsley","productSizeModifier":null,"preparationNotes":"finely chopped","usdaInfo":{"category":"Vegetables and Vegetable Products","description":"Parsley, fresh","fdcId":"170416","matchMethod":"exact"},"confidence":0.9858154,}Parse multiple ingredientsimportjsonimportparse_ingredientingredients=parse_ingredient.parse_multiple(['½ tsp brown sugar','3 large Granny Smith apples')print(json.dumps(ingredients.as_dict()))[{"ingredientRaw":"½ tsp brown sugar","ingredientParsed":{"preparationNotes":"finely chopped","product":"brown sugar","productSizeModifier":null,"quantity":0.5,"unit":"teaspoon","usdaInfo":{"category":"Sweets","description":"Sugars, brown","fdcId":"168833","matchMethod":"exact"},"confidence":0.9857134,},"error":null,},{"ingredientRaw":"3 large Granny Smith apples","ingredientParsed":{"preparationNotes":null,"product":"Granny Smith apples","productSizeModifier":"large","quantity":3.0,"unit":null,"usdaInfo":{"category":"Fruits and Fruit Juices","description":"Apples, raw, granny smith, with skin (Includes foods for USDA's Food Distribution Program)","fdcId":"168203","matchMethod":"exact"},"confidence":0.9741028,},"error":null,}]Parse ingredients using RapidAPIIf you have aRapidAPI subscriptionto Zestful, you can use your API key as follows:importjsonimportparse_ingredient# Replace this with your key from RapidAPI# https://rapidapi.com/zestfuldata/api/recipe-and-ingredient-analysisRAPID_API_KEY='your-rapid-api-key'client=parse_ingredient.client(rapid_api_key=RAPID_API_KEY)ingredient=client.parse_ingredient('2 1/2 tablespoons finely chopped parsley')print(json.dumps(ingredient.as_dict()))Use private Zestful serverIf you have a private Zestful ingredient parsing server as part of an Enterprise plan, you can use the library as follows:importjsonimportparse_ingredientENDPOINT_URL='https://zestful.yourdomain.com'client=parse_ingredient.client(endpoint_url=ENDPOINT_URL)ingredient=client.parse_ingredient('2 1/2 tablespoons finely chopped parsley')print(json.dumps(ingredient.as_dict()))InstallationFrom pippipinstallzestful-parse-ingredientFrom sourcegitclonehttps://github.com/mtlynch/zestful-client.gitcdzestful-client pipinstall.How does it work?The library sends ingredient parsing requests to a remote Zestful ingredient parsing server. By default, the library uses the demo instance of Zestful. For production usage, you should set a RapidAPI key or private Zestful server instance address.LimitationsWithout a subscription, you can only parse 30 ingredients per day. To parse an unlimited number of ingredients, purchase a subscription fromZestful.Full documentationFor full documentation of each result field, see the officialZestful API documentation.
zest.ploneglossaryhighlight
IntroductionThis is an extra package forProducts.PloneGlossary. It adds a fieldhighlightto content types in your site. With that field you can specify for a page whether terms on it should be highlighted. Values can be yes, no, or use the value of the parent (which is the default).Support for Archetypes has been there since the first release (witharchetypes.schemaextender). Support for Dexterity has been there since release 2.0.0 (withplone.behaviorandplone.dexterity).InstallationAdd it to the eggs option of the zope instance in your buildout.When you want Archetypes support, please usezest.ploneglossaryhighlight[archetypes].When you want Dexterity support, please usezest.ploneglossaryhighlight[dexterity].Or use both:zest.ploneglossaryhighlight[archetypes, dexterity].Run buildout and restart your Zope instance.Go to the Add-ons control panel in Plone.Install PloneGlossary.Install zest.ploneglossaryhighlight.CompatibilityRequires Products.PloneGlossary 1.5.0 or later. Tested with latest 1.7.3.Tested with Plone 4.3 on Python 2.7. Current latest release of PloneGlossary does not work on Plone 5.Changelog2.0.0 (2019-04-26)Added Dexterity support in a[dexterity]extra requirement insetup.py. This hasplone.behaviorandplone.dexterityas dependencies. [maurits]Moved Archetypes support to an[archetypes]extra requirement insetup.py. This hasarchetypes.schemaextenderas dependency. [maurits]Register the default adapter only for Archetypes base content, instead of everything. [maurits]Test only with Python 2.7 and Plone 4.3. [maurits]1.0 (2011-11-24)Initial release [maurits]
zest.pocompile
IntroductionThis package compiles po files. It contains azest.releaserentrypoint and a stand-alone command line tool.GoalYou want to release a package that has alocalesdir (orlocale, or something else as long as it has aLC_MESSAGESfolder somewhere in it) with translations in.pofiles. You want to include the compiled.mofiles in your release as well, but you do not want to keep those in a revision control system (like git) as they are binary and can be easily recreated. That is good. This package helps with that.Want.mofiles? Add aMANIFEST.infile.When you usepython setup.py sdistto create a source distribution, Python doesnotautomatically include all files. It might look at the information of the revision control system (RCS), but that may or may not work. This depends on your RCS, your Python version, setuptools, or extra packages likesetuptools-git.Since the compiled.mofiles are best not stored in git (or any other RCS), you need to give a hint on which files to include. You do this by adding aMANIFEST.infile. Let’s say your package has roughly these contents (not all files are shown):your.package/setup.py your.package/your/package/locales/nl/LC_MESSAGES/domain.poThen you need aMANIFEST.infile like this:recursive-include your *Or with a bigger example:recursive-include your * recursive-include docs * include * global-exclude *.pycI will explain the lines one by one for clarity. And yes: I (Maurits) now simply go to this page on PyPI if I want to have an example of a properMANIFEST.infile. So this documentation is now getting slightly larger than strictly needed. :-)recursive-includeyour *This tells distutils to recursively include all (*) files and directories within theyourdirectory. Try it: create a directory structure like the above example with a propersetup.py, copy thedomain.pofile todomain.moas a silly test, runpython setup.py sdistand check that the.mofile ends up in the created distribution.recursive-includedocs *Include files in thedocsdirectory. If this directory does not exist, you will get a warning, so you may want to remove it then, but leaving it there does not hurt.include *Include unrecognized files in the root directory. Oterwise by default only standard files likeREADME.txt,setup.py, andsetup.cfgare included. So for example aCHANGES.txtfile must be explicitly included (here with*).global-exclude*.pycThis avoids unnecessarily adding compiled python files in the release. When these are not there, for example after a fresh checkout, you will get a harmless warning:nopreviously-includedfiles matching'*.pyc'found anywhere in distribution.For more info on creating a source distribution and how to useMANIFEST.insee thePython distutils documentationor thesetuptools documentation.With this part working, the only thing thiszest.pocompilepackage needs to do, is to actually find all.pofiles and compile them to.mofiles. It simply looks for directories that are namedLC_MESSAGESand compiles all.pofiles found in there.Command line toolWhen youpip install zest.pocompileyou get a command line toolpocompile. When you run it, this walks the current directory, finds all po translation files in a properly formed locales directory, and compiles them into.mofiles. You can also give it a list of directories as arguments instead. Run it with the--helpoption to get some help.In the above example, if you are in theyour.packagedirectory and runpocompileit will create this file:your.package/your/package/locales/nl/LC_MESSAGES/domain.mozest.releaser entry pointYou do not needzest.releaserfor a proper functioning ofzest.pocompile. But if you use the two together, in combination with a properMANIFEST.infile, releasing a source distribution with compiled.mofiles is made easy.Therelease(orfullrelease) command ofzest.releasercreates a (git or other) tag and checks out this tag. Then it creates a source distribution (sdist) and possibly a wheel (bdist_wheel) and uploads it to PyPI. Whenzest.pocompileis added to the mix, it compiles the.pofiles immediately after checking out the tag. This is right in time for creating the distributions, which should now contain the.mofiles.You may want the full release to fail early whenzest.pocompileis not available. Since version 1.6.0 this is possible by editing thesetup.cfgof the package where you want this, and add the following section:[zest.releaser] prereleaser.before = zest.pocompile.availableCreditsThis package has been cobbled together by Maurits van Rees.It depends on thepython-gettextpackage,. This itself suggests using theBabelpackage. But it does exactly what we need and its releases are stored on PyPI, so we ignore that suggestion.The main functions are taken from thebuild_mocommand ofcollective.releaser.Thanks!To DoAdd tests.Changelog2.0.0 (2023-09-11)Make final release. Nothing changed since the last alpha. [maurits]2.0.0a1 (2023-07-13)Require Python 3.8+ and switch to native namespace packages. This is needed becausezest.releaser9.0.0a1 does the same. [maurits]1.6.0 (2022-09-13)Addzest.pocompile.available. You can use this to let the full release of a package fail early whenzest.pocompileis not available. Edit itssetup.cfg, and add a[zest.releaser]section with valueprereleaser.before = zest.pocompile.available[maurits]1.5.0 (2020-01-29)Claim Python 2 and 3 compatibility. Seems to work fine. [maurits]1.4 (2013-07-05)Moved tohttps://github.com/zestsoftware/zest.pocompile. [maurits]1.3 (2011-12-16)Fixed the example MANIFEST.in. [maurits]1.2 (2011-12-16)Added a larger example of a MANIFEST.in file in the readme. Also add a MANIFEST.in in zest.pocompile itself, so the CHANGES.txt is included in the source distribution. [maurits]1.1 (2011-12-15)Look for.pofiles in anyLC_MESSAGESdirectory. It no longer matters if this is contained in a language directory within alocalesorlocaledirectory, as they could also have names likeplonelocalesorlocales_for_version_2_only. Note that in Plone.pofiles can also be in an i18n directory, but those should not be compiled; this does not have aLC_MESSAGESdirectory, so we automatically skip it. [maurits]1.0 (2010-10-19)Initial release
zest.recipe.mysql
Recipe to install MysqlCode repository:http://svn.plone.org/svn/collective/buildout/zest.recipe.mysqlIt can be a problem getting both mysql and mysql’s python binding to install reliably on everyone’s development machine. Problems we encountered were mostly on the mac, as mysql gets installed into different locations by the official mysql distribution, macports and fink. And on the mac, the python binding needs a patch.One solution: fix the underlying stuff and make mysql and mysql-python a dependency that has to be handled by the OS. Alternative solution: this ‘zest.recipe.mysql’ recipe.Warning: rough edges. It is not a properly documented and tested package as it originally was a quick need-to-get-something-working-now job.Here’s a quick piece of buildout to get you started if you want to test it:[buildout] parts = mysql ... [mysql] recipe = zest.recipe.mysql # Note that these urls usually stop working after a while... thanks... mysql-url = http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-5.0.86.tar.gz/from/http://mysql.proserve.nl/ mysql-python-url = http://surfnet.dl.sourceforge.net/sourceforge/mysql-python/MySQL-python-1.2.2.tar.gz [plone] ... eggs = ... ${mysql:eggs}This ought to download and install mysql and mysql-python.Mysql and mysql-python end up in ‘…/parts/mysql’.mysql-python is installed as a development egg by buildout.The socket and the database are in ‘…/var/mysql’.Optionsmysql-url– Download URL for the target version of MySQL (required).mysql-python-url– Download URL for the target version of the Python wrappers (required)python– path to the Python against which to build the wrappers (optional, currrently unused).config-skeleton– path to a file used as a template for generating the instance-localmy.cnffile (optional). If this option is not supplied, no configuration will be generated. If passed, the text from the indicated file will be used as a Python string template, with the following keys passed in the mapping to the%operator:MYSQLD_INSTALLMYSQLD_SOCKETMYSQLD_PIDFILEDATADIRwith-innodb– if set to a non-false value, will pass the--with-innodboption to the configure command.Changelog1.0.4 (2010-02-23)Moved options documentation to theREADME.txtfile. [maurits]Add a recipe option,with-innodb: if set to a non-false value, will pass the--with-innodboption to the configure command. [rafrombrc]1.0.3 (2009-10-19)Add a recipe option,config-skeleton: if passed, points to a file used as a template for generating an instance-localmy.cnffile. Ensure that the generated wrapper scripts use this file, if generated; if not, ensure that the wrappers disable “standard” config file lookups. [tseaver]Document existing recipe options in class docstring. [tseaver]Delegate command line arguments from wrapper script to the real mysqld_safe, just as with other wrappers. [tseaver]1.0.2 (2009-10-14)Unchanged rerelease of 1.0.1 due to fix packaging error. [maurits]1.0.1 (2009-10-13)Fix support for newer MySQL releases, thanks to a patch send in by Tres Seaver. [jladage]1.0 (2009-10-09)Nothing changed yet.1.0beta (2008-10-21)Added bin/stop-mysql script. [reinout]0.9.1 (2008-10-20)README update.0.9 (2008-10-15)Better conditional downloading/extracting of the zipfiles. [reinout]Changing update method to check for existance of /parts/mysql. If you’ve removed that parts directory the full install will be run. Handy for updating old installs. [reinout]0.8 (2008-10-10)Changed mysql-python egg handling: it no longer installs an egg in your global egg cache (which gives errors when you have two buildouts that use it). Instead it installs the egg locally as a development egg. This means you have to include it in your instance’s egg list as ${mysql:eggs}. [reinout]Added example parts to the buildout config so that it can be tested that way. There are no real other tests. [reinout]0.4.0 (2008-03-16)Created recipe with ZopeSkel [Jean-Paul Ladage].Learned from the varnish recipe and wrote the build recipe which downloads, compiles and install MySQL and created wrapper scripts in the bin folder of the buildout.Todo listContributorsJean-Paul Ladage (Zest software): principal authorReinout van Rees (Zest software): added development egg support.Tres Seaver (Agendaless Consulting): bugfixes, config file generation.Rob Miller: added ‘with-innodb’ option
zest.releaser
Package releasing made easy: zest.releaser overview and installationzest.releaser is collection of command-line programs to help you automate the task of releasing a Python project.It does away with all the boring bits. This is what zest.releaser automates for you:It updates the version number. The version number can either be insetup.pyorversion.txtor in a__version__attribute in a Python file or insetup.cfg. For example, it switches you from0.3.dev0(current development version) to0.3(release) to0.4.dev0(new development version).It updates the history/changes file. It logs the release date on release and adds a new heading for the upcoming changes (new development version).It tags the release. It creates a tag in your version control system named after the released version number.It optionally uploads a source release to PyPI. It will only do this if the package is already registered there (else it will ask, defaulting to ‘no’); zest releaser is careful not to publish your private projects!Most important URLsFirst the three most important links:The full documentation is atzestreleaser.readthedocs.io.We’reon PyPI, so we’re only anpip install zest.releaseraway from installation on your computer.The code is atgithub.com/zestsoftware/zest.releaser.Compatibility / Dependencieszest.releaserworks on Python 3.8+, including PyPy3. Tested until Python 3.11, but seetox.inifor the canonical place for that.To be sure: the packages that you release withzest.releasermay very well work on other Python versions: that totally depends on your package.We depend on:setuptoolsfor the entrypoint hooks that we offer.coloramafor colorized output (some errors printed in red).twinefor secure uploading via https to pypi. Plain setuptools doesn’t support this.Since version 4.0 there is arecommendedextra that you can get by installingzest.releaser[recommended]instead ofzest.releaser. It contains a few trusted add-ons that we feel are useful for the great majority ofzest.releaserusers:wheelfor creating a Python wheel that we upload to PyPI next to the standard source distribution. Wheels are the official binary distribution format for Python. Since version 8.0.0a2 we always create wheels, except when you explicitly switch this off in the config:create-wheel= false. If you are sure you want “universal” wheels, follow the directions from thewheel documentation.check-manifestchecks yourMANIFEST.infile for completeness, or tells you that you need such a file. It basically checks if all version controlled files are ending up the the distribution that we will upload. This may avoid ‘brown bag’ releases that are missing files.pyromachecks if the package follows best practices of Python packaging. Mostly it performs checks on thesetup.pyfile, like checking for Python version classifiers.readme_rendererto check your long description in the same way as pypi does. No more unformatted restructured text on your pypi page just because there was a small error somewhere. Handy.InstallationJust a simplepip install zest.releaseroreasy_install zest.releaseris enough. If you want the recommended extra utilities, do apip install zest.releaser[recommended].Alternatively, buildout users can install zest.releaser as part of a specific project’s buildout, by having a buildout configuration such as:[buildout] parts = scripts [scripts] recipe = zc.recipe.egg eggs = zest.releaser[recommended]Version control systems: gitOf course you must have a version control system installed. Since version 7, zest.releaser only supports git.If you use Subversion (svn), Mercurial (hg), Git-svn, or Bazaar (bzr), please use version 6. If you really want, you can probably copy the relevant parts from the old code to a new package, and release this as an add-on package for zest.releaser. I suspect that currently it would only work with a monkey patch. If you are planning something, please open an issue, and we can see about making this part pluggable.Available commandsZest.releaser gives you four commands to help in releasing python packages. They must be run in a version controlled checkout. The commands are:prerelease: asks you for a version number (defaults to the current version minus a ‘dev’ or so), updates the setup.py or version.txt and the CHANGES/HISTORY/CHANGELOG file (with either .rst/.txt/.md/.markdown or no extension) with this new version number and offers to commit those changes to subversion (or bzr or hg or git).release: copies the the trunk or branch of the current checkout and creates a version control tag of it. Makes a checkout of the tag in a temporary directory. Offers to register and upload a source dist of this package to PyPI (Python Package Index). Note: if the package has not been registered yet, it will not do that for you. You must register the package manually (python setup.py register) so this remains a conscious decision. The main reason is that you want to avoid having to say: “Oops, I uploaded our client code to the internet; and this is the initial version with the plaintext root passwords.”postrelease: asks you for a version number (gives a sane default), adds a development marker to it, updates the setup.py or version.txt and the CHANGES/HISTORY/CHANGELOG file with this and offers to commit those changes to version control. Note that with git and hg, you’d also be asked to push your changes (since 3.27). Otherwise the release and tag only live in your local hg/git repository and not on the server.fullrelease: all of the above in order.Note: markdown files should use the “underline” style of headings, not the “atx” style where you prefix the headers with#signs.There are some additional tools:longtest: small tool that renders the long description and opens it in a web browser. Handy for debugging formatting issues locally before uploading it to pypi.lasttagdiff: small tool that shows thediffof the current branch with the last released tag. Handy for checking whether all the changes are adequately described in the changes file.lasttaglog: small tool that shows thelogof the current branch since the last released tag. Handy for checking whether all the changes are adequately described in the changes file.addchangelogentry: pass this a text on the command line and it will add this as an entry in the changelog. This is probably mostly useful when you are making the same change in a batch of packages. The same text is used as commit message. In the changelog, the text is indented and the first line is started with a dash. The command detects it if you use for example a star as first character of an entry.bumpversion: do not release, only bump the version. A development marker is kept when it is there. With--featurewe update the minor version. With option--breakingwe update the major version.CreditsReinout van Rees(Nelen & Schuurmans) is the original author. He’s still maintaining it, together with Maurits.Maurits van Rees(Zest Software) added a heapload of improvements and is the maintainer, together with Reinout.Kevin Teague(Canada’s Michael Smith Genome Sciences Center) added support for multiple version control systems, most notable Mercurial.Wouter vanden Hove(University of Gent) added support for uploading to multiple servers, using collective.dist.Godefroid Chapelle(BubbleNet) added /tag besides /tags for subversion.Richard Mitchell(Isotoma) added Python 3 support.Mateusz Legięckiadded a dockerfile for much easier testing.Eli Salléadded pyproject.toml support for zest.releaser’s own options. We’re modern now!Changelog for zest.releaser9.1.3 (2024-02-07)Fix to the project setup.tox.iniusesextras =instead ofdeps =to to install the test extras. [mtelka]9.1.2 (2024-02-05)If you want to build a release package (release=true, the default), but don’t want to actually upload it, you can now set theupload-pypioption to false (default is true). [leplatrem]9.1.1 (2023-10-11)When reading~/.pypircconfig, readsetup.cfgas well, as it might override some of these values, like[distutils]index-servers. Fixes issue #436. [maurits]9.1.0 (2023-10-03)Using newer ‘build’ (>=1.0.0) including a slight API change, fixes #433. [reinout]Typo fix in the readme: we look at__version__instead of the previously-documented__versions__… [reinout]9.0.0 (2023-09-11)Make final release. Nothing changed since the last beta. [maurits]9.0.0b1 (2023-07-31)When a command we call exits with a non-zero exit code, clearly state this in the output. Ask the user if she wants to continue or not. Note that this is tricky to do right. Some commands likegitseem to print everything to stderr, leading us to think there are errors, but the exit code is zero, so it should be fine. We do not want to ask too many questions, but we do not want to silently swallow important errors either. [maurits]9.0.0a3 (2023-07-25)Updated contributors list.Documentinghook_package_dirsetting for entry points (which isn’t needed for most entry points, btw). Fixesissue 370.Allowing for retry forgit push, which might fail because of a protected branch. Also displaying that possible cause when it occurs. Fixesissue 385.9.0.0a2 (2023-07-19)Ignore error output when callingbuild. We only need to look at the exit code to see if it worked. You can call zest.releaser with--verboseif you want to see the possible warnings.Removedencodingconfig option as nobody is using it anymore (using the option would result in a crash). Apparently it isn’t needed anymore now that we don’t use python 2 anymore. Fixesissue 391.Thelongtestis now simpler. It runs readme_renderer and just displays the result in the browser, without error handling.twine checkshould be used if you want a real hard check (longtest--headlessis deprecated). The advantage is that longtest now also renders markdown correctly. This addsreadme_renderer[md]as dependency. Fixesissue 363.9.0.0a1 (2023-07-13)Changed build system to pypa/build instead of explicitly using setuptools.Zest.releaser’s settings can now also be placed inpyproject.toml.Use native namespace packages forzest.releaser, instead of deprecatedpkg_resourcesbased ones.Added pre-commit config for neater code (black, flake8, isort).Dropped support for python 3.7. Together with switching tobuildandpyproject.toml, this warrants a major version bump.8.0.0 (2023-05-05)Make final release, no changes since latest alpha. [maurits]8.0.0a2 (2023-04-06)Always create wheels, except when you explicitly switch this off in the config:[zest.releaser]create-wheel= no. If thewheelpackage is not available, we still do not create wheels. Fixesissue 406. [maurits]Do not fail when tag versions cannot be parsed. This can happen inlasttaglog,lasttagdiff, andbumpversion, withsetuptools66 or higher. Fixesissue 408. [maurits]8.0.0a1 (2023-02-08)Drop support for Python 3.6. [maurits]Support reading and writing the version inpyproject.toml. Seeissue 295,issue 373, andPEP-621, [maurits]7.3.0 (2023-02-07)Add optionrun-pre-commit= yes / no. Default: no. When set to true, pre commit hooks are run. This may interfere with releasing when they fail. [maurits]7.2.0 (2022-12-09)Auto-detecthistory_formatbased on history filename. [ericof]Addhistory_formatoption, to explicitly set changelogs entries in Markdown. [ericof]7.1.0 (2022-11-23)Add thebumpversionoptions to thepostreleasecommand. This meansfeature,breaking, andfinal. [rnc, maurits]Add--finaloption tobumpversioncommand. This removes alpha / beta / rc markers from the version. [maurits]Add support for Python 3.11, removez3c.testsetupfrom test dependencies. [maurits]7.0.0 (2022-09-09)Optionally add prefix text to commit messages. This can be used ensure your messages follow some regular expression. To activate this, addprefix-message= [TAG]to a[zest.releaser]section in thesetup.cfgof your package, or your global~/.pypirc. Or add your favorite geeky quotes there. [LvffY]7.0.0a3 (2022-04-04)Bug 381: Inprerelease, check withpep440if the version is canonical. Addedpep440to therecommendedextra, not to the core dependencies:zest.releasercan also be used for non-Python projects. [maurits]7.0.0a2 (2022-02-10)Add--headlessoption tolongtest.7.0.0a1 (2021-12-01)Big cleanup to ease future development:Removed support for Subversion (svn), Bazaar (bzr), Mercurial (hg).Removed support for Python 2 and 3.5.Added support for Python 3.9 and 3.10.Tested with Python 3.6-3.10 plus PyPy3.Switched from Travis to GitHub Actions.Simplified running commands by usingsubprocess.run.
zestreleaser.towncrier
zestreleaser.towncrierThis callstowncrierwhen releasing a package withzest.releaser.towncrierupdates your history file (likeCHANGES.rst) based on news snippets. This is for exampleused by pip.The plugin will calltowncrier--version<package version>--yes. You can get a preview of the result yourself by callingtowncrier--version1.2.3--draft.Thetowncriercommand should be on yourPATH. The plugin can also find it when it is in the same directory as thefullreleasescript (orprerelease/postrelease).InstallationInstallzestreleaser.towncrierwithpip:$ pip install zestreleaser.towncrierThen you can runfullreleaselike you would normally do when releasing a package.ContributeIssue Tracker:https://github.com/collective/zestreleaser.towncrier/issuesSource Code:https://github.com/collective/zestreleaser.towncrierSupportIf you are having problems, please let us know by filing anissue.LicenseThe project is licensed under the GPL.pyproject.tomlexampletowncrierneeds a configuredpyproject.tomlfile in the root of the package, next to thesetup.py. For reference, here is the literalpyproject.tomlfile fromzestreleaser.towncrier:[tool.towncrier] issue_format = "`Issue #{issue} <https://github.com/collective/zestreleaser.towncrier/issues/{issue}>`_" filename = "CHANGES.rst" directory = "news/" title_format = "{version} ({project_date})" # First underline is used for version/date header. # Second underline is used for the type names (like 'Bug fixes:'). underlines = ["-", ""] [[tool.towncrier.type]] directory = "breaking" name = "Breaking changes:" showcontent = true [[tool.towncrier.type]] directory = "feature" name = "New features:" showcontent = true [[tool.towncrier.type]] directory = "bugfix" name = "Bug fixes:" showcontent = true [tool.isort] profile = "black"ContributorsMaurits van Rees,[email protected] (2022-04-19)New features:Use thebuildsubcommand fortowncrierto build the changelog. Fixes compatibility withtowncrier21.9.0 or later. Requirestowncrier19.9.0 or later. [mcflugen] (Issue #22)For parsing, usetomliwhen on Python 3,tomlon Python 2. Same astowncrierdid until recently. [maurits] (Issue #23)1.2.0 (2019-03-05)New features:Use ‘python -m towncrier’ when the script is not easily findable. Still check the directory of the fullrelease script first. No longer check the PATH. [maurits] (Issue #17)Bug fixes:Do not run sanity checks or run draft during postrelease. [maurits] (Issue #16)1.1.0 (2019-03-05)New features:Rerelease 1.0.3 as 1.1.0, as it contains new features. (Issue #9)1.0.3 (2019-03-05)New features:Report on sanity of newsfragments: do they have the correct extensions? Is at least one found? Show dry-run (draft) of what towncrier would do. [maurits] (Issue #9)Handle multiple news entries per issue/type pair. [maurits] (Issue #14)1.0.2 (2019-03-04)Bug fixes:Fixed finding towncrier when sys.argv is messed up. [maurits] (Issue #6)1.0.1 (2019-02-20)Bug fixes:Tell bumpversion to not update the history. [maurits] (Issue #10)1.0.0 (2019-02-06)New features:Warn and ask when towncrier is wanted but not found. [maurits] (Issue #7)1.0.0b3 (2018-05-17)New features:Require towncrier 18.5.0 so we don’t need a package name in the config. [maurits] (Issue #3)Bug fixes:First look fortowncriernext to thefull/prereleasescript. Then fall back to looking on thePATH. [maurits] (Issue #4)1.0.0b2 (2018-05-16)Bug fixes:Do not fail when pyproject.toml file is not there. [maurits] (Issue #2)1.0.0b1 (2018-05-15)New features:First release. [maurits] (Issue #1)
zest.social
IntroductionThis is yet another social bookmarking viewlet based onhttp://www.addthis.com/Why a new one and not for examplecollective.addthis? Well, probably just because it is so easy to generate the javascript with the services we choose, and register this as a viewlet. We did that for our ownZest Softwaresite and a client wanted the same, but then with s checkbox per page to turn it on or off.FeaturesThis gives you a viewlet near the bottom of the page with links to share this on LinkedIn, Twitter or Google; you can share on some other sites in a popup; plus a print button.Also, you get an extra boolean fieldshow_social_viewleton the edit page (the Settings tab) of content types (usingarchetypes.schemaextender). When this field is checked, the viewlet is shown. By default the field is not checked, so the viewlet is not shown.The extra field and the viewlet are only available when you have actually installed this Add-On in your Plone Site (this is done using plone.browserlayer). So when your Zope instance has more than one Plone Site, the viewlet is only used in the site where you install it.ConfigurationThere is no configuration in the UI. If you want to override the default value and fallback value for showing the viewlet you may want to look atconfig.pyand do a monkey patch on the values there.If you want to change the links that are shown, you should just override the viewlet template, which is probably easiest usingz3c.jbot.Compatibilityzest.socialhas been tested with Plone 3.3. and Plone 4.0, usingarchetypes.schemaextender1.6 and 2.0.3.Changelog1.3 (2012-09-12)Moved to github. [maurits]1.2 (2010-10-19)Added MANIFEST.in file so the released package will contain.mofiles (at least when usingzest.releaserin combination withzest.pocompile). [maurits]When context.show_social_viewlet does not work, try context.getField(‘show_social_viewlet’).get(context) as somehow the first only works when you have called getField once. Tested with archetypes.schemaextender 1.6 and 2.0.3. [maurits]Added config.py to ease overriding the default value for the show_social_viewlet field (False) and the fallback value for when the field does not exist for the current object (False). [maurits]1.1 (2010-10-18)Explicitly load the zcml of the archetypes.schemaextender package so you do not need to add this yourself to your buildout config on Plone 3.2 or earlier. [maurits]1.0 (2010-10-18)Initial release. [maurits]
zest.specialpaste
ContentsIntroductionUse caseCompatibilityInstallationFuture ideasChangelog1.2 (2011-11-04)1.1 (2011-11-02)1.0 (2011-11-02)IntroductionWhen copying and pasting an object in Plone the workflow state of the newly pasted object is set to the initial state. Sometimes you want to keep the original state. This is whatzest.specialpastedoes.Use caseYou use Plone to store some information about clients in a folder. You have created a standard folder with a few sub folders and several documents, images and files that you use as a template for new clients. For new clients some of these objects should already be published. You have set this up correctly in the template or sample folder. You copy this folder, go to a new location and use the ‘Special paste’ action fromzest.specialpasteto paste the objects and let the review state of the new objects be the same as their originals.CompatibilityTested on Plone 4.0 and 4.1. Currently it does not work on Plone 3.3; that surprises me, so it might be fixable.InstallationAddzest.specialpasteto theeggsof your buildout (and to thezcmltoo if you are on Plone 3.2 or earlier, but it does not work there currently). Rerun the buildout.Install Zest Special Paste in the Add-on Products control panel. This adds a ‘Special paste’ action on objects and registers a browser layer that makes our@@special-pastebrowser view available.Future ideasWe can add a form in between where you can specify what should be special for the paste. When selecting no options it should do the same as the standard paste action.Allow keeping the original owner.Take over local roles.Make compatible with Plone 3.3 as well.Changelog1.2 (2011-11-04)Do less logging as this can be overly verbose or warn about things that in practice occur for very normal reasons. [maurits]Fix paste error when copying a folder that has a sub folder that has content. [maurits]1.1 (2011-11-02)Added MANIFEST.in file so .mo files are included when run with zest.releaser. [maurits]1.0 (2011-11-02)Initial release
zest.stabilizer
Zest buildout stabilizerGoal of this product: zest.stabilizer helps moving the trunk checkouts in your development buildout to tag checkouts in your production buildout. It detects the latest tag and changes stable.cfg accordingly.It is at the moment quiteZest softwarespecific in the sense that it is hardcoded to two assumptions/requirements that are true for us.Requirement 1: split buildout configsAt Zest software, we’ve settled on a specific buildout.cfg setup that separates the buildout.cfg into five files:unstable.cfgTrunk checkouts, development eggs, development settings.stable.cfgTag checkouts, released eggs. No development products.devel.cfg/preview.cfg/production.cfgSymlinked as production.cfg. The parts of the configuration that differ on development laptops, the preview and the production system. Port numbers, varnish installation, etc. Devel extends unstable, preview and production extend stable.zest.stabilizer thus moves the trunk checkouts in unstable.cfg to tag checkouts in stable.cfg.Requirement 2: infrae.subversion instead of svn:externalsOur internal policy is to keep as much configuration in the buildout config. So we’ve switched from svn:externals insrc/to infrae.subversion. We extended infrae.subversion to support development eggs and to support placement in a different directory from the defaultparts/[partname]/.Zest.stabilizer expects a specific name (“ourpackages”). Such a part looks like this:[ourpackages] recipe = infrae.subversion >= 1.4 urls = https://svn.vanrees.org/svn/reinout/anker/anker.theme/trunk anker.theme http://codespeak.net/svn/z3/deliverance/trunk Deliverance as_eggs = true location = srcWhat zest.stabilizer doesWhen you runstabilize, zest.stabilizer does the following:Detect the[ourpackages]section in unstable.cfg and read in the urls.Remove “trunk” from each url and add “tags” and look up the available tags in svn.Grab the highest number for each.Remove existing[ourpackages]in stable.cfg if it exists.Add[ourpackages]part into stable.cfg with those highest available tag checkouts in it.Show the “svn diff” and ask you whether to commit the change.Helper command:needreleaseBefore stabilization, often a set of products first needs to be released. If you have multiple packages, it is a chore to check all the svn logs to see if there’s a change since the last release.Runneedreleaseand you’ll get the last svn log message of every detected package.InstallationInstallation is a simpleeasy_install zest.stabilizer.zest.stabilizer requires zest.releaser, which is installed automatically as a dependency. Wow, more goodies!Included programsTwo programs are installed globally:unstable_fixupwhich currently only assists with movingsrc/*development eggs to an infrae.subversion part. At the end it prints instructions for further work that you have to do manually.stabilizewhich takes the infrae.subversion part ofunstable.cfgand finds out the latest tags for each of those development packages. It then adds a similar part tostable.cfg.The development version of zest.stabilizer can be found athttps://svn.plone.org/svn/collective/zest.stabilizer/trunk.Changelog zest.stabilizer1.4 (2009-04-01)Depend on zest.releaser 2.0 or higher. [maurits]1.3 (2009-04-01)Fixed our code to work with the refactored zest.releaser (with more vcs support). [maurits]1.2.2 (2009-02-16)Typo fixed. [reinout]1.2.1 (2009-02-16)Moved to the collective svn. [reinout]1.2 (2009-02-16)Logging changes in history file now. [reinout]1.1.1 (2009-02-11)Small fix. -l doesn’t exist everywhere, but –limit does. [reinout]1.1 (2009-02-11)Addedneedreleasecommand that shows the last log message of every detected development package. Easy to see if one or more still need releasing. [reinout]1.0 (2009-02-08)First release on pypi. [reinout]Fixed up documentation to make the product usable outside Zest. [reinout]0.2 (2008-11-06)Change the lines that are added in stable.cfg now that infrae.subversion 1.4 has been released. [maurits+reinout]Add newline at end of contents before saving stable.cfg or unstable.cfg. [maurits]0.1 (2008-10-23)Extracting unstable eggs from [ourpackages] instead of develop section now. [reinout]unstable_fixup adds [ourpackages] section in place of ‘develop =’ section. [reinout]Added unstable_fixup script to check/perform common fixups that need to happen in unstable.cfg. [reinout]Copied stabilize script out of zest.releaser. [reinout]CreditsReinout van Rees(Zest software) is the originator and main author.Maurits van Rees(Zest software) added several fixes and the unstable_fixup utility.TODO tasksGet a prettier message to add to the history file.
zesty-poker
none
zest.zodbupdate
zest.zodbupdatezodbupdate rename dictionary and dexterity patch for Plone 5.2 projects.Seepost on community.plone.org. And thePlone ZODB Python 3 migration docs.Quick usageIn a simplifiedbuildout.cfg:[buildout] parts = instance zodbupdate [instance] recipe = plone.recipe.zope2instance eggs = Plone zodbverify [zodbupdate] recipe = zc.recipe.egg scripts = zodbupdate eggs = zodbupdate zest.zodbupdate ${instance:eggs}Runbin/buildoutand thenbin/zodbupdate-fvar/filestorage/Data.fs.Use case and processYou want to migrate your Plone 5.2 database from Python 2.7 to Python 3. You use the zodbverify and zodbupdate tools for this. When you first runbin/zodbverifyorbin/instance zodbverify, you may see warnings and exceptions. It may warn about problems that zodbupdate will fix. So the idea is now:First with Python 2.7, runbin/zodbupdate-fvar/filestorage/Data.fsSonopython3 convert stuff! This will detect and apply several explicit and implicit rename rules.Then runbin/instance zodbverify. If this still gives warnings or exceptions, you may need to define more rules and apply them with zodbupdate.When all is well, on Python 3 run:bin/zodbupdate --convert-py3 --file=var/filestorage/Data.fs --encoding utf8For good measure, on Python 3 runbin/instance zodbverify.When this works fine on a copy of your production database, you could choose to safe some downtime and only do step 3 on your production database. But please check this process again on a copy of your database.Rename ruleszodbverify may give warnings and exceptions like these:Warning: Missing factory for Products.ResourceRegistries.interfaces.settings IResourceRegistriesSettings Warning: Missing factory for App.interfaces IPersistentExtra Warning: Missing factory for App.interfaces IUndoSupport ... Found X records that could not be loaded. Exceptions and how often they happened: ImportError: No module named ResourceRegistries.interfaces.settings: 8 AttributeError: 'module' object has no attribute 'IPersistentExtra': 4508For each, you need to check if it can be safely replaced by something else, or if this points to a real problem: maybe a previously installed add-on is missing.In this case, these interfaces seem no longer needed. Easiest is to replace them with a basic Interface. Maybe there are better ways to clean these up, but so far so good.You fix these with renames in an entrypoint using zodbupdate. Seehttps://github.com/zopefoundation/zodbupdate#pre-defined-rename-rulesThe current package defines such an entrypoint.Here is the rename dictionary from themaster branch. The warnings and exceptions mentioned above are handled here. Each version of this package may have different contents.Dynamic dexterity schemasA special case thatbin/zodbupdateandbin/zodbverifymay bump into, is:AttributeError: Cannot find dynamic object factory for module plone.dexterity.schema.generated: 58 Warning: Missing factory for plone.dexterity.schema.generated Plone_0_Image Warning: Missing factory for plone.dexterity.schema.generated Plone_0_Document Warning: Missing factory for plone.dexterity.schema.generated Site2_0_News_1_Item Warning: Missing factory for plone.dexterity.schema.generated Site3_0_DocumentThis is because no zcml is loaded by these scripts. So this utility fromplone.dexterity/configure.zcmlis not registered:<utility factory=".schema.SchemaModuleFactory" name="plone.dexterity.schema.generated" />This utility implementsplone.alterego.interfaces.IDynamicObjectFactory. This is responsible for generating schemas on the fly. So we register this utility in Python code.Note that in normal use (bin/instance) this would result in a double registration, but the second one is simply ignored by zope.interface, because it is the same.Also, when you have zodbverify in the instance eggs and you callbin/instance zodbverify, you will not get this error, because then zcml is loaded, and no special handling is needed.Package structureThis package only has an__init__.pyfile.It has the rename dictionary pointed to by the entrypoint in oursetup.cfg.It is only loaded when runningbin/zodbupdate, because this is the only code that looks for the entrypoint.As a side effect, when the entrypoint is loaded we also register the dexterity utility when available. This code is executed simply because it also is in the__init__.pyfile.Changelog1.0.0 (2020-07-24)Handle the return of webdav in Zope 4.3, especiallyIFTPAccessandEtagBaseInterface. Fixesissue #1. [maurits]1.0.0b2 (2020-03-25)Add renames for a few webdav interfaces. In Zope 4.3 webdav will return, but until then they give real errors for zodbverify on Python 3. [maurits]1.0.0b1 (2020-03-03)Initial release. [maurits]
zet
Failed to fetch description. HTTP Status Code: 404
zeta
ZetaZeta is a project collaboration tool, integrating, wiki (for documentation), issue tracking, review and version control in a single platform.Feature highlightsProjectUser RegistrationUser registration by invitation.Multiple project creation by registered users.Divide project into components and manage them with milestones and versions.Project teams.Document with ZWiki.Track issues withtickets.Integrate with respositories, navigate, analyse and refer its content.Reviewdocuments, source code in repositories and ZWiki pages.Mount any number of repository directories(containing documents) onto project’s url path.Project roadmap.Project downloads.User Favorites for projects, wiki pages and tickets.Vote for wiki pages and tickets.Zetalinks, for generating quick hyper links for zeta resources (like license, projects, tickets ).Timeline(s).RSS feeds available in about dozen ways.Charts and analytics.Faceted searching.Permission management system, customizable for user needs.Attachments for wiki, ticket, review, projects, site, etc …Tagging wiki, ticket, review, project, etc …WikiWiki engine developed from scratch to cater to the needs of Zeta.Version controlled wiki pages for project documentation.Color coded difference between versions, help resolving conflict.Spreadsheet like wiki page listing, with inline edit.User favorites.User voting.Wiki page downloaded in other formats like ps, pdf, text.Single click review request.Wiki talk page, for discussion.Charts and analytics.Complete list of ZWiki featuresIssue trackingCreate and track issues.Spreadsheet like ticket listing, with inline edit.Ticket filters, supported both on server-side and browser-side.Powerful regular expression based filtering rules.Filters can be saved per user.Ticket discussion.Ticket workflow.User favorites.User voting.Charts and analytics.Source browserIntegration with VCS (Version Control System). SVN and Bazaar supported.Explorer style, repository navigation (for requested revision)Mount any number of repository directories (containing documents) onto project’s url path. Documents can be in wiki, html or plain-text format.Fully annotated and syntax highlighted listing of files.Single click review request for a single file or for a change-set.Navigate through repository revisions and download the changeset in patch-file format.Source code analyticsReviewReview wiki pages and files in repositories.Spreadsheet like review listing, with inline edit.Group reviews into reviewset.Create reviews with author, moderator and participants, with prescribed permissions.Inline review (while listing the file’s content), with syntax highlighting and color coding for modified lines.User favorites.Charts and analytics.Email integrationSMTP client.POP3 client.Invitations for new users.Notifications on changes to favorite projects, wikis, tickets and reviews.Create / publish static wiki pages via email.Create / publish wiki pages or add your comment to wiki pages via email.Create / edit tickets and ticket attributes, and add your ticket comments via email.Add review comments via email.Integration with vimVim plugin available for zwiki syntax highlighting.Read, edit, and publish static wiki pages via Vim.Read, edit, and publish wiki pages via Vim.Read, create and edit tickets via Vim.Map source files to reviews and add review comments as you browse the source file in Vim.Other featuresGuest wiki, to compose and organise help pages, common pages, user pages etc …User home page.For each user, consolidated listing of tickets owned by the user across all projects.Via web user preference.Creating and managing license documents.Navigation Breadcrumbs and Url breadcrumbsSession management.Tool-tip widget.Site administration and project administration via web.Integration with google maps.Integration with google analytics.Deployable under apache-wsgi environment.MySQL database.Integration with editors, VCS and email servers.QuicklinksInstalla fresh deployment.Configureapplication.Integrate with a mail serverAdministrationUpgradea deployment to latest versionREADMECHANGELOGUPGRADE notesTrack Zeta developmentIf you have any queries, suggestionsdiscuss with usDocumentationZetaZWikiZWiki-markup-referenceInstalling it under UbuntuCustomize and configure ZetaComplete list of help pagesUpgrade your installationZen of zeta
zetacolor
Zeta Lockhart’s color library
zetaforge
No description available on PyPI.
zetalib
ZZZZZZZZZZZZZZZZZZZ tttt Z:::::::::::::::::Z ttt:::t Z:::::::::::::::::Z t:::::t Z:::ZZZZZZZZ:::::Z t:::::t ZZZZZ Z:::::Z eeeeeeeeeeee ttttttt:::::ttttttt aaaaaaaaaaaaa Z:::::Z ee::::::::::::ee t:::::::::::::::::t a::::::::::::a Z:::::Z e::::::eeeee:::::et:::::::::::::::::t aaaaaaaaa:::::a Z:::::Z e::::::e e:::::tttttt:::::::tttttt a::::a Z:::::Z e:::::::eeeee::::::e t:::::t aaaaaaa:::::a Z:::::Z e:::::::::::::::::e t:::::t aa::::::::::::a Z:::::Z e::::::eeeeeeeeeee t:::::t a::::aaaa::::::a ZZZ:::::Z ZZZZe:::::::e t:::::t ttttta::::a a:::::a Z::::::ZZZZZZZZ:::e::::::::e t::::::tttt:::::a::::a a:::::a Z:::::::::::::::::Ze::::::::eeeeeeee tt::::::::::::::a:::::aaaa::::::a Z:::::::::::::::::Z ee:::::::::::::e tt:::::::::::tta::::::::::aa:::a ZZZZZZZZZZZZZZZZZZZ eeeeeeeeeeeeee ttttttttttt aaaaaaaaaa aaaaIntroductionZeta provides methods for computing local and topological zeta functions arising from the enumeration of subalgebras, ideals, submodules, and representations of suitable algebraic structures as well as some other types of zeta functions.This package is anexperimental forkof Zeta, turning it into a pip-installable SageMath package. You can check thistemporary linkfor the full documentation.Please also check theoriginal homepage of ZetabyTobias Rossmann.InstallationDependenciesWe assume SageMath version 8.3, or higher, is used.Thewheelpackaging standard is needed at installation time. It can be installed by running:$ sage -pip install wheelZeta will try to invoke the programscount(a part ofLattE integrale) andnormaliz(a part ofNormaliz). They can be installed by running:$ sage -i latte_int $ sage -i normalizSee the full documentation how to use other versions of these programs.Install from PyPIThe easiest way to obtain Zeta is to run:$ sage -pip install zetalibLocal install from sourceDownload the source from the git repository:$ git clone https://gitlab.com/mathzeta2/zetalib.gitFor convenience this package contains aMakefilewith some often used commands. To build the C extensions, install and test you should change to the root directory and run:$ makeAlternatively, you can do it in separate steps:$ make build $ make test $ sage -pip install --upgrade --no-index -v . # or `make install`To uninstall you can run:$ sage -pip uninstall zetalib # or `make uninstall`If you want to use another version of SageMath you have installed, you can modify theSAGEvariable when callingmake:$ make SAGE=/path/to/sage buildUsageOnce the package is installed, you can use it in Sage with:sage: import zetalib sage: M = zetalib.Algebra(rank=3, operators=[ [[1,1,-1], [0,1,1], [0,0,1]] ]) sage: zetalib.topological_zeta_function(M) 1/((3*s - 2)*(2*s - 1)*s)See the documentation for further details.PackagingAll packaging setup is internally done throughsetup.py. To create a “source package” run:$ sage setup.py sdistTo create a binary wheel package run:$ sage setup.py bdist_wheelOr use the shorthand:$ make build_wheelDocumentationThe source files of the documentation are located in thedocs/sourcedirectory, and are written in Sage’sSphinxformat.Generate the HTML documentation by running:$ cd docs $ sage -sh -c "make html"Or using the shorthand:$ make docThen opendocs/build/html/index.htmlin your browser.AcknowledgementsTheSage Sample Packagewas used for the initial package structure.LicenseSee theLICENSEfile. This fork of Zeta is released under GPL-3.0-or-later, like the original version, as quoted in the original documentation:Copyright 2014, 2015, 2016, 2017 Tobias Rossmann.Zeta is free software: you can redistribute it and/or modify it under the terms of theGNU General Public Licenseas published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.Zeta is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See the GNU General Public License for more details.You should have received a copy of the GNU General Public License along with Zeta. If not, seehttp://www.gnu.org/licenses.
zetalibrary
Zeta libraryZeta libraryis a framework allows to create, collect and pack css, scss, js files much easier.Documentationduring development.ContentsZeta libraryFeaturesInstallationUsageChangesExamplesOptionsBug trackerContributingLicenseCopyrightNoteFeaturesCollectJSfiles;CollectCSSandSCSSfiles in any order;Compress output files;Parse custom files in support formats;Watch files or folders and auto repack static;Has included popular js and css frameworks (you can expand);And more…CSS import support:@import url(path or http);JS require support:require("path or http");SCSS compile and imports supportSeeSCSSfor more information about language:@import url(path or http); // or Scss style also supported @import 'compass/css3'Blueprint css frameworkEx.@import url(zeta://blueprint.css);Compass scss frameworkEx.@import url(zeta://compass.scss); // or @import 'compass/reset'Boilerrplate framework supportEx.@import url(zeta://boilerplate.css);Zeta css, js frameworkEx:@import url(zeta://zeta.css); require("zeta://zeta.js");InstallationZeta libraryshould be installed using pip or setuptools:pip install zetalibrary easy_install zetalibraryUsage$zeta$ zeta help usage: zeta [-h] [-v] {pack,watch,shell,libs} ... positional arguments: {pack,watch,shell,libs} pack Parse file or dir, import css, js code and save with prefix watch Watch directory for changes and auto pack sources shell A helper command to be used for shell integration libs Show zeta libs optional arguments: -h, --help show this help message and exit -v, --version show program's version number and exit $ zeta pack --help usage: zeta pack [-h] [-p PREFIX] [-f FORMAT] [-c] [-d DIRECTORY] [-o OUTPUT] [-s SETUP_FILE] source positional arguments: source optional arguments: -h, --help show this help message and exit -p PREFIX, --prefix PREFIX Save packed files with prefix. Default is '_' -f FORMAT, --format FORMAT Force format (css, js, ...). By default format parse from file extension -c, --compress Compress packed sources -d DIRECTORY, --directory DIRECTORY Add custom directory for search with prefix: 'zeta://' By default $ZETA_LIBDIR -o OUTPUT, --output OUTPUT Set output directory path -s SETUP_FILE, --setup-file SETUP_FILE Configuration ini file, with 'Zeta' sectionChangesMake sure you`ve read the following document if you are upgrading from previous versions of zetalibrary:http://packages.python.org/zetalibrary/changes.htmlExamplesParse all static files in directory ‘’/tmp/static’’ with default prefix:$> ls -la /tmp/static drwxr-xr-x 4 www-data www-data 4096 2011-02-16 15:09 main -rw-r--r-- 1 www-data www-data 335 2011-02-16 15:09 main.css -rw-r--r-- 1 www-data www-data 343 2011-02-16 15:09 main.js -rw-r--r-- 1 www-data www-data 0 2011-02-16 15:09 print.css $> zeta /tmp/static ... $> ls -la /tmp/static drwxr-xr-x 4 www-data www-data 4096 2011-02-16 15:09 main -rw-r--r-- 1 www-data www-data 335 2011-02-16 15:09 main.css -rw-r--r-- 1 www-data www-data 335 2011-02-16 15:09 _main.css -rw-r--r-- 1 www-data www-data 343 2011-02-16 15:09 main.js -rw-r--r-- 1 www-data www-data 343 2011-02-16 15:09 _main.js -rw-r--r-- 1 www-data www-data 0 2011-02-16 15:09 print.css -rw-r--r-- 1 www-data www-data 0 2011-02-16 15:09 _print.cssParse/static/main.jsand minify$ zeta -c /static/main.jsWatch directory/static/$ zeta watch /staticOptionsUnder construction.Bug trackerIf you have any suggestions, bug reports or annoyances please report them to the issue tracker athttps://github.com/klen/zeta-library/issuesContributingDevelopment of zeta-library happens at github:https://github.com/klen/zeta-libraryklen(Kirill Klenov)LicenseLicensed under aGNU lesser general public license.CopyrightCopyright (c) 2011 Kirill Klenov ([email protected])Compass:(c) 2009 Christopher M. Eppsteinhttp://compass-style.org/SCSS:(c) 2006-2009 Hampton Catlin and Nathan Weizenbaumhttp://sass-lang.com/jQuery:(c) 2009-2010 jQuery Projecthttp://jquery.org/NoteYour feedback are welcome!
zetalytics-api
zetalytics-apiA straightforward python library for the Zetalytics Zonecruncher API. For a list of all endpoints and query parameters, refer to theAPI documentation.Use of the Zetalytics API and zetalytics-api client requires a user token. You can request onehere.InstallationTo install zetalytics-api, use Pypi via pip.pip install zetalytics-apiInitializationfrom zetalytics import Zetalytics zeta = Zetalytics(token=[YOUR USER TOKEN])Examplesdomain2nsSearch passive dns by domain for NS recordsquery = {'q': 'example.com'} zeta.domain2ns(**query)email_addressSearch for domains sharing a registration email address or SOA email from passivequery = {'q': '[email protected]', 'size': 10} zeta.email_address(**query)Search passive dns by IP, CIDR, or Range (v6 compatible)query = {'q': '1.2.3.4', 'tsfield': 'first_seen', 'start': '2019-01-01', 'size': 100} zeta.ip(**query)LicenseThis project is licensed under the GNU General Public License v3.0.
zetamarkets
No description available on PyPI.
zetamarkets-py
Zeta Python SDK 🐍InstallationInstall from PyPIpipinstallzetamarkets_pyInstall from SourceYou can add optional dependencies for running trading examples or docs using the--withflag.poetryinstall[--withexamples,docs]UsageSetting up a Solana walletPlease follow theSolana wallet creation docsto set up a wallet if you don't already have one locally. By default the SDK will look for the wallet at~/.config/solana/id.jsonRunning the examplesRun the various code examples provided in theexamplesdirectory.DevelopmentFormatting and LintingWe useblackwithisortfor formatting andrufffor lintingpoetryformat poetrylint
zetane
The Zetane API is a Python library designed for robustly developing, testing, augmenting, and deploying computer vision Artificial Intelligence (AI) models. The API allows you to test adverse and out-of-domain conditions, offering a much-needed tool for AI developers, researchers, and data scientists who are eager to push the boundaries of their models, to comprehend their limitations, and to improve upon these performance thresholds.The Zetane API's core functionalities are derived from its distinctive data transformation capabilities. It is designed to take input images and then transform them in a multitude of ways, mimicking conditions that a model might encounter in real-world applications. The variety of transformations includes but is not limited to, geometric and color augmentations, noise injection, alterations in lighting and contrast, as well as various forms of image degradation and distortions. These transformations effectively broaden the scope of conditions under which AI models are tested, ensuring a model is not just learning from its data, but also generalizing well to unforeseen situations.Visit ourdocsfor more details on how to get started with the Zetane API.
zetane-engine
Zetane Engine is a 3D environment for exploring machine learning algorithms visually. Send your input, model state, and outputs at the same time to a visualization to get context on what is happening. Use breakpoints to visually debug scripts and models, record data and model internals, and share data + model packages with other users.
zetanize
HTML form parser designed for humans
zetapush_python
No description available on PyPI.
zetapy
No description available on PyPI.
zetascale
Build SOTA AI Models 80% faster with modular, high-performance, and scalable building blocks!After building out thousands of neural nets and facing the same annoying bottlenecks of chaotic codebases with no modularity and low performance modules, Zeta needed to be born to enable me and others to quickly prototype, train, and optimize the latest SOTA neural nets and deploy them into production.Zeta places a radical emphasis on useability, modularity, and performance. Zeta is now currently employed in 100s of models across my github and across others. Get started below and LMK if you want my help building any model, I'm here for you 😊 💜Install$ pip3 install -U zetascaleUsageStarting Your JourneyCreating a model empowered with the aforementioned breakthrough research features is a breeze. Here's how to quickly materialize the renowned Flash Attentionimporttorchfromzeta.nnimportFlashAttentionq=torch.randn(2,4,6,8)k=torch.randn(2,4,10,8)v=torch.randn(2,4,10,8)attention=FlashAttention(causal=False,dropout=0.1,flash=True)output=attention(q,k,v)print(output.shape)SwiGLUPowers Transformer modelsimporttorchfromzeta.nnimportSwiGLUStackedx=torch.randn(5,10)swiglu=SwiGLUStacked(10,20)swiglu(x).shapeRelativePositionBiasRelativePositionBiasquantizes the distance between two positions into a certain number of buckets and then uses an embedding to get the relative position bias. This mechanism aids in the attention mechanism by providing biases based on relative positions between the query and key, rather than relying solely on their absolute positions.importtorchfromtorchimportnnfromzeta.nnimportRelativePositionBias# Initialize the RelativePositionBias modulerel_pos_bias=RelativePositionBias()# Example 1: Compute bias for a single batchbias_matrix=rel_pos_bias(1,10,10)# Example 2: Utilize in conjunction with an attention mechanism# NOTE: This is a mock example, and may not represent an actual attention mechanism's complete implementation.classMockAttention(nn.Module):def__init__(self):super().__init__()self.rel_pos_bias=RelativePositionBias()defforward(self,queries,keys):bias=self.rel_pos_bias(queries.size(0),queries.size(1),keys.size(1))# Further computations with bias in the attention mechanism...returnNone# Placeholder# Example 3: Modify default configurationscustom_rel_pos_bias=RelativePositionBias(bidirectional=False,num_buckets=64,max_distance=256,num_heads=8)FeedForwardThe FeedForward module performs a feedforward operation on the input tensor x. It consists of a multi-layer perceptron (MLP) with an optional activation function and LayerNorm. Used in most language, multi-modal, and modern neural networks.importtorchfromzeta.nnimportFeedForwardmodel=FeedForward(256,512,glu=True,post_act_ln=True,dropout=0.2)x=torch.randn(1,256)output=model(x)print(output.shape)BitLinearThe BitLinear module performs linear transformation on the input data, followed by quantization and dequantization. The quantization process is performed using the absmax_quantize function, which quantizes the input tensor based on the absolute maximum value,from the paperimporttorchfromtorchimportnnimportzeta.quantasqtclassMyModel(nn.Module):def__init__(self):super().__init__()self.linear=qt.BitLinear(10,20)defforward(self,x):returnself.linear(x)# Initialize the modelmodel=MyModel()# Create a random tensor of size (128, 10)input=torch.randn(128,10)# Perform the forward passoutput=model(input)# Print the size of the outputprint(output.size())# torch.Size([128, 20])PalmEThis is an implementation of the multi-modal Palm-E model using a decoder llm as the backbone with an VIT image encoder to process vision, it's very similiar to GPT4, Kosmos, RTX2, and many other multi-modality model architecturesimporttorchfromzeta.structsimport(AutoregressiveWrapper,Decoder,Encoder,Transformer,ViTransformerWrapper,)classPalmE(torch.nn.Module):"""PalmE is a transformer architecture that uses a ViT encoder and a transformer decoder.Args:image_size (int): Size of the image.patch_size (int): Size of the patch.encoder_dim (int): Dimension of the encoder.encoder_depth (int): Depth of the encoder.encoder_heads (int): Number of heads in the encoder.num_tokens (int): Number of tokens.max_seq_len (int): Maximum sequence length.decoder_dim (int): Dimension of the decoder.decoder_depth (int): Depth of the decoder.decoder_heads (int): Number of heads in the decoder.alibi_num_heads (int): Number of heads in the alibi attention.attn_kv_heads (int): Number of heads in the attention key-value projection.use_abs_pos_emb (bool): Whether to use absolute positional embeddings.cross_attend (bool): Whether to cross attend in the decoder.alibi_pos_bias (bool): Whether to use positional bias in the alibi attention.rotary_xpos (bool): Whether to use rotary positional embeddings.attn_flash (bool): Whether to use attention flash.qk_norm (bool): Whether to normalize the query and key in the attention layer.Returns:torch.Tensor: The output of the model.Usage:img = torch.randn(1, 3, 256, 256)text = torch.randint(0, 20000, (1, 1024))model = PalmE()output = model(img, text)print(output)"""def__init__(self,image_size=256,patch_size=32,encoder_dim=512,encoder_depth=6,encoder_heads=8,num_tokens=20000,max_seq_len=1024,decoder_dim=512,decoder_depth=6,decoder_heads=8,alibi_num_heads=4,attn_kv_heads=2,use_abs_pos_emb=False,cross_attend=True,alibi_pos_bias=True,rotary_xpos=True,attn_flash=True,qk_norm=True,):super().__init__()# vit architectureself.encoder=ViTransformerWrapper(image_size=image_size,patch_size=patch_size,attn_layers=Encoder(dim=encoder_dim,depth=encoder_depth,heads=encoder_heads),)# palm model architectureself.decoder=Transformer(num_tokens=num_tokens,max_seq_len=max_seq_len,use_abs_pos_emb=use_abs_pos_emb,attn_layers=Decoder(dim=decoder_dim,depth=decoder_depth,heads=decoder_heads,cross_attend=cross_attend,alibi_pos_bias=alibi_pos_bias,alibi_num_heads=alibi_num_heads,rotary_xpos=rotary_xpos,attn_kv_heads=attn_kv_heads,attn_flash=attn_flash,qk_norm=qk_norm,),)# autoregressive wrapper to enable generation of tokensself.decoder=AutoregressiveWrapper(self.decoder)defforward(self,img:torch.Tensor,text:torch.Tensor):"""Forward pass of the model."""try:encoded=self.encoder(img,return_embeddings=True)returnself.decoder(text,context=encoded)exceptExceptionaserror:print(f"Failed in forward method:{error}")raise# Usage with random inputsimg=torch.randn(1,3,256,256)text=torch.randint(0,20000,(1,1024))# Initiliaze the modelmodel=PalmE()output=model(img,text)print(output)UnetUnet is a famous convolutional neural network architecture originally used for biomedical image segmentation but soon became the backbone of the generative AI Mega-revolution. The architecture comprises two primary pathways: downsampling and upsampling, followed by an output convolution. Due to its U-shape, the architecture is named U-Net. Its symmetric architecture ensures that the context (from downsampling) and the localization (from upsampling) are captured effectively.importtorchfromzeta.nnimportUnet# Initialize the U-Net modelmodel=Unet(n_channels=1,n_classes=2)# Random input tensor with dimensions [batch_size, channels, height, width]x=torch.randn(1,1,572,572)# Forward pass through the modely=model(x)# Outputprint(f"Input shape:{x.shape}")print(f"Output shape:{y.shape}")VisionEmbeddingsThe VisionEmbedding class is designed for converting images into patch embeddings, making them suitable for processing by transformer-based models. This class plays a crucial role in various computer vision tasks and enables the integration of vision data into transformer architectures!importtorchfromzeta.nnimportVisionEmbedding# Create an instance of VisionEmbeddingvision_embedding=VisionEmbedding(img_size=224,patch_size=16,in_chans=3,embed_dim=768,contain_mask_token=True,prepend_cls_token=True,)# Load an example image (3 channels, 224x224)input_image=torch.rand(1,3,224,224)# Perform image-to-patch embeddingoutput=vision_embedding(input_image)# The output now contains patch embeddings, ready for input to a transformer modelnivaNiva focuses on weights of certain layers (specified by quantize_layers). Ideal for models where runtime activation is variable. 👁️ Example Layers: nn.Embedding, nn.LSTM.importtorchfromzetaimportniva# Load a pre-trained modelmodel=YourModelClass()# Quantize the model dynamically, specifying layers to quantizeniva(model=model,model_path="path_to_pretrained_model_weights.pt",output_path="quantized_model.pt",quant_type="dynamic",quantize_layers=[nn.Linear,nn.Conv2d],dtype=torch.qint8,)FusedDenseGELUDenseIncrease model speed by 2x with this module that fuses together 2 hyper-optimized dense ops from bits and bytes and a gelu together!importtorchfromzeta.nnimportFusedDenseGELUDensex=torch.randn(1,512)model=FusedDenseGELUDense(512,1024)out=model(x)out.shapeFusedDropoutLayerNormFusedDropoutLayerNorm is a fused kernel of dropout and layernorm to speed up FFNs or MLPS by 2Ximporttorchfromtorchimportnnfromzeta.nnimportFusedDropoutLayerNorm# Initialize the modulemodel=FusedDropoutLayerNorm(dim=512)# Create a sample input tensorx=torch.randn(1,512)# Forward passoutput=model(x)# Check output shapeprint(output.shape)# Expected: torch.Size([1, 512])MambaPytorch implementation of the new SSM model architecture Mambaimporttorchfromzeta.nnimportMambaBlock# Initialize Mambablock=MambaBlock(dim=64,depth=1)# Random inputx=torch.randn(1,10,64)# Apply the model to the blocky=block(x)print(y.shape)# torch.Size([1, 10, 64])FiLMimporttorchfromzeta.nnimportFilm# Initialize the Film layerfilm_layer=Film(dim=128,hidden_dim=64,expanse_ratio=4)# Create some dummy data for conditions and hiddensconditions=torch.randn(10,128)# Batch size is 10, feature size is 128hiddens=torch.randn(10,1,128)# Batch size is 10, sequence length is 1, feature size is 128# Pass the data through the Film layermodulated_features=film_layer(conditions,hiddens)# Print the shape of the outputprint(modulated_features.shape)# Should be [10, 1, 128]hyper_optimizeA single wrapper for torch.fx, torch.script, torch.compile, dynamic quantization, mixed precision through torch.amp, with execution time metrics all in once place!importtorchfromzeta.nnimporthyper_optimize@hyper_optimize(torch_fx=False,torch_script=False,torch_compile=True,quantize=True,mixed_precision=True,enable_metrics=True,)defmodel(x):returnx@xout=model(torch.randn(1,3,32,32))print(out)DPO - Direct Policy OptimizationDirect Policy Optimization employed for many RLHF applications for LLMs.importtorchfromtorchimportnnfromzeta.rlimportDPO# Define a simple policy modelclassPolicyModel(nn.Module):def__init__(self,input_dim,output_dim):super().__init__()self.fc=nn.Linear(input_dim,output_dim)defforward(self,x):returnself.fc(x)input_dim=10output_dim=5policy_model=PolicyModel(input_dim,output_dim)# Initialize DPO with the policy modeldpo_model=DPO(model=policy_model,beta=0.1)# Sample preferred and unpreferred sequencespreferred_seq=torch.randint(0,output_dim,(3,input_dim))unpreferred_seq=torch.randint(0,output_dim,(3,input_dim))# Compute lossloss=dpo_model(preferred_seq,unpreferred_seq)print(loss)ZetaCloudTrain or finetune any model on any cluster in 1 click with zetacloud, just pass in your file and the GPU type and quantity you want! To gain access firstpip install zetascalethen runzeta -hin the terminal.Here is the docs for moreFlexible Pricing with pooling from many cloudsEasy Deployment with 1 clickVarious options for cloud providers!ZetacloudCLI options:-h,--helpshowthishelpmessageandexit-tTASK_NAME,--task_nameTASK_NAMETaskname-cCLUSTER_NAME,--cluster_nameCLUSTER_NAMEClustername-clCLOUD,--cloudCLOUDCloudprovider-gGPUS,--gpusGPUSGPUs-fFILENAME,--filenameFILENAMEFilename-s,--stopStopflag-d,--downDownflag-sr,--status_reportStatusreportflagA simple run example code would be like:zeta-ftrain.py-gA100:8DocumentationAll classes must have documentation if you see a class or function without documentation then please report it to me [email protected],Documentation is atzeta.apac.aiRunning testsYou should install the pre-commit hooks with pre-commit install. This will run the linter, mypy, and a subset of the tests on every commit.For more examples on how to run the full test suite please refer to the CI workflow.Some examples of running tests locally:python3-mpipinstall-e'.[testing]'# install extra deps for testingpython3-mpytesttests/# whole test suiteCommunityJoin our growing community around the world, for real-time support, ideas, and discussions on how to build better models 😊View our officialDocsChat live with us onDiscordFollow us onTwitterConnect with us onLinkedInVisit us onYouTubeJoin the Swarms community on Discord!🤝 Schedule a 1-on-1 SessionWant to train a custom AI model for a real-world task like General Multi-Modal Models, Facial Recognitions, Drug Discovery, Humanoid Robotics? I'll help you create the model architecture then train the model and then optimize it to meet your quality assurance standards.Book a1-on-1 Session with Kye here., the Creator, to discuss any issues, provide feedback, or explore how we can improve Zeta for you or help you build your own custom models!🫶 Contributions:The easiest way to contribute is to pick any issue with thegood first issuetag 💪. Read the Contributing guidelineshere. Bug Report?File here| Feature Request?File hereZeta is an open-source project, and contributions are VERY welcome. If you want to contribute, you can create new features, fix bugs, or improve the infrastructure. Please refer to theCONTRIBUTING.mdand ourcontributing boardto participate in Roadmap discussions!Accelerate BacklogHelp us accelerate our backlog by supporting us financially! Note, we're an open source corporation and so all the revenue we generate is through donations at the moment ;)LicenseApache
zetaSeq
ZetaSeq 0.0.8ZetaSeq is a versatile toolbox for processing sequencing data.ZetaSeq contains useful Python modules for handling your daily sequencing data.Most of the modules were initiated at 2010 when I started to mingle with high throughput sequencing.-- Zewei [email protected]@outlook.com
zetastitcher
ZetaStitcher is a tool designed to stitch large volumetric images such as those produced by Light-Sheet Fluorescence Microscopes.Key features:able to handle datasets as big as 1012voxelsmultichannel imagespowerful and simple Python API to query arbitrary regions within the fused volumeHow to installOn Ubuntu 20.04 LTS, run these commands:sudo apt-get install python3-pip libgl1 libglib2.0-0 pip3 install zetastitcherDocker imageTo build a docker image with ZetaStitcher:make dockerYou can call the stitching commands using an ephemeral container like this:docker run -it -v`pwd`:/home --rm zetastitcher stitch-align -h docker run -it -v`pwd`:/home --rm zetastitcher stitch-fuse -hDocumentationPlease read the documentation and follow the tutorial at this page:https://lens-biophotonics.github.io/ZetaStitcher/AcknowledgementsThis open source software code was developed in whole in the Human Brain Project, funded from the European Union’s Horizon 2020 Framework Programme for Research and Innovation under Specific Grant Agreements No. 720270 and No. 785907 (Human Brain Project SGA1 and SGA2).Co-funded by the European Union
zetch
ZetchIn-place, continuous templater.You can installZetchviapipfromPyPI:pip install zetchBinaries are available for:Linux:x86_64,aarch64,i686,armv7,ppc64le,s390x,musl-x86_64&musl-aarch64MacOS:x86_64,aarch64Windows:x86_64,aarch64,i686If your platform isn't supported,file an issue.UsagePlease see thedocumentationfor details.ContributingContributions are very welcome. To learn more, see theContributor Guide.LicenseDistributed under the terms of theMIT license,Zetchis free and open source software.IssuesIf you encounter any problems, pleasefile an issuealong with a detailed description.
zet-cli
Zet CLIA Zettlekasten helper utility.InstallationClone the repositorygit clone https://github.com/mattdood/zet-cli.git zet-cliInstall the cloned repository via pip from the cloned foldercd path/to/install python3 -m pip install -e zet-cliUsageThe commands are well documented using--help.zet --helpConceptsThis note taking tool has a few concepts and vocabulary words that should be understood before utilizing the various commands that are offered.NotesA "zet" is a notes file that is created and stored in a "repo" (folder). These notes are in Markdown format; however, user created templates can be created that have different formats.Any containing assets for a note (images, gifs, etc.) are recommended to be stored in the folder created specifically for that note. This allows local references within the Markdown file and helps with organization when repos contain many zets.Repos (Storage)Each zet file is stored in a date-time folder hierarchy. Example execution:zet create -t "sample title" -c "sample" -tag "test, test1"Folder structure created:zets/ 2022/ 06/ 01/ 20220601120100/ sample-title-20220601120100.mdUsers can have multiple repos, each with their own zets. Zets are stored with categories and tags as metadata. Based on the above sample, the file would have the following information:--- path: '/2022/6/sample-title-20220601120100' title: 'sample title' category: 'sample' tags: ['test', 'test1'] --- # sample titleTemplatesA template is provided with the default installation (named "default"). This is referenced within the settings file (~/zets/.env/.local.json) when calling thezet createcommand.The template can be customized at the path that it is referenced in the settings file; however, users are encouraged to only modify copies of the template.For users that wish to provide their own templates, these can be created then added to the settings file with a path that points to that template.The settings section goes into greater detail regarding things like defaults and concepts about modifying default command behavior.Creating new templates is typically a good idea if other file formats are required, or if there are fields in the default template that you would like to omit.Currently supported fields:path: 'templatePath' title: 'templateTitle' date: 'templateDate' category: 'templateCategory' tags: templateTagsThetemplatePathis useful for blogging, it has a less verbose structure than the folder layouts provided by thezet createoption.Git commandsThe Zet-CLI offers wrappers around common Git commands to encourage versioning of notes utilizing Git. This helps to track changes in the notes repositories over time, while offering simple wrappers to reference repository locations by name rather than managing the git operations from within the containing folder.SettingsUsers have local settings generated at runtime of the CLI. This ensures that default settings exist and that the folder structure is consistent across installations.These settings can be modified to change default behaviors, or even copied over from other installations on separate machines.Note:A potential solution to having multiple solutions may be storing the settings in a private Gist (if on GitHub) to better keep these installations "in sync".DefaultsThe application utilizes defaults to check for things like editors, reduce the need to specify a specific repo on every command, and determine a template to use for creating a zet file.Note:The default editor setting isNeovim.ReposThe repos known to the CLI are referenced here. Repos can exist outside of the installation directory (~/zets/)Default template names can be altered within the repo record in the settings file. There is not a CLI option for this.TemplatesTemplates are used as a base form when creating a new zet. These are copied and renamed in-place when creating a directory to hold a new zet file. To create your own templates, utilize the same delimeter pattern (---) then place your corresponding data keys into the file.These templates do not have to live inside the installation pathway; however, for organization it is encouraged. A good idea would be to create atemplates/directory inside of the environment variables folder (.env/templates/).Templates are referenced by name from the settings file, if you prefer a new default template then simply change thedefaultssection of the settings file to reference the name of your new template.When a template is added to the settings file it will become available in the CLI for creating zets.Note:All templates need their full directory listed in settings. This should include an absolute reference.Example:"templates": { "default": ..., "my_template": "~/zets/.env/templates/my-template.md" }Running testsTo run the test suite we need to tell the settings to use a different installation location or we'll run into clashing with any other installations. This could result in deleting your note repos, settings, etc.Running the test suite with aZET_STAGE=testwill ensure the installation pathway of the test objects is inside the project, where teardown can safely take place.ZET_STAGE=testpytest-vv-s
zetest
No description available on PyPI.
ze-the-scraper
No description available on PyPI.
zetl
A simple ETL framework for Python, SQL and BAT files which uses a Postgres database for activity logging. the zetl framework requires python and Postgres to run.1. Install PythonDownload and install python (https://www.python.org/downloads/) to your local computer.2. Install Postgreszetl v2+ uses sqlite backend instead of postgres, so installing postgres is not mandatory.Download and install postgres (https://www.postgresql.org/download/) to your local computer. Remember the password.When you run zetl it will prompt you for database connection details. At the end of prompting, it will ask if you want to save the connection details (y/n). If you select y, the details are saved in that folder and you aren't prompted again unless the details fail on connect.Here are the defaults for postgtres:host: localhostport: 1532name: postgresschema: publicUsername: postgresPassword: <whatever_you_supplied>3.Install zetlJust install with pippip install zetlWherever you run zetl, it will look for a folder called zetl_scripts, where all your etl folders are stored.zetl_scriptsIn the tests folder on git hub you can see examples of etl folders, and etl scripts under the zetl_scripts folder.zetl_scripts\demo1 zetl_scripts\demo2 zetl_scripts\demo3 zetl_scripts\empty_log zetl_scripts\view_log3. Run zetlpy -m zetl.runThis prompt for connection details to the Postgres database you just istalled. Hit enter to accept the defaults and enter the password you entered during the database setup.4. Run zetl commandsTo run any zetl commands, go to the command line and change to the zetl directory. eg. CD \zetlIf your setup is successful, when you run zetl.py with no parameters, it will connect and list ETL's available to run such as:demo1demo2demo3view_logempty_logUsageWhat is an ETL in the zetl framework ?An ETL exists in the form of a directory, under zetl_scripts, with files of a specific naming convention which are either python, windows bat, or sql. The file naming convention is as follows: step_number.activity.extensionstep_numberis any integer unique in the immediate folderactivityis any alphanumeric name for the activity of the fileextensionmust be either py, bat or sqlFor example:zetl\zetl_scripts\demo1\1.hello.pyzetl\zetl_scripts\demo1\2.something.sqlzetl\zetl_scripts\demo1\3.hello.batcreate an ETLcreate a folder under zetl_scripts and add a file which follows the naming convention step_number.activity.extension For example:1.anything.sql2.anythingelses.bat3.something.pyrun an ETLGo to the command line and change to the zetl directory. eg. CD \zetl pass the ETL as a parameter to zetlfor example:zetl demo1View the ETL LogEverytime an ETL runs, the z_log table is updated with the activity. To see view the log, query the z_log table or run the ETL view_log as follows:zetl view_log
zetops
ZetOpsZetOps是旨在提高网络运维自动化开发效率的一款工具包。名字的来源主要是之前做过的一个项目,叫做“织网”,你可以把z看做是“自”,它旨在解决网络自动化开发效率问题,垂直于网络自动化开发领域。你可以把Z看做是"织",代表的是网络自动化人一针一线缝缝补补编织梦想的精神。你可以把Z看做是“中”,它的一大特色是应对国产化趋势之下国内网络设备适配的不足。你可以把Z看做是“N”的转置,代表的是网络人锐意创新的决心。然而,目前它还刚刚起步。RoadMap在这个最初的版本,我会聚焦在netmiko对国产化设备适配的不足,写一些国产化设备的驱动。对华为、山石、烽火进行了适配。后续将会分享一些自己写的国产化textfsm的模板,也会试图寻求网友的帮助。我会根据自己的理解,创建一个基于CLI的类似napalm的网络抽象层,不过这块可大可小,可能还需要我再思考一下。同时也会针对NetDevOps场景中的数据提取和配置备份做一些nornir的task模块
zetsubou
ZetsubouFASTbuild project generator for the helplessHigh level wrapper around FASTbuild build system, written in python. Generates Visual Studio solution from simple yaml description. Supports Conan package manager. Provides commands for common operations, like setting up dev environment, building or clean (and many more in future).Currently only Windows and msvc are supported, but clang and Linux are planned.Installpip install zetsubouDevelopmentLocal install in editable modepython -m pip install -e .Deploy conan generatordeploy_generator.batorconan export zetsubou/zetsubou_conan_toolchain.py --user=bentou --channel=stableUsagezetsubou [COMMAND] [PROJECT] [OPTIONS...]zetsubou regen project.yml --verboseCommandsclean - removes all generated build folder and slninstall - setups virtual environment based on your build_tools.inigen - generates bff files, creates visual studio project and solutionregen - clean, install and gen in one commandbuild - build generated projectcreate - (WiP) emit new project from templateExample Projectproject.ymlproject: MyTest config: verbose_build: false platforms: - 'platform/windows.yml' rules: - 'configurations/MsvcRules.yml' configurations: - 'configurations/Debug.yml' - 'configurations/Release.yml' config_string: '{platform}-{configuration}-{toolchain}' conan: build_tools: build_tools.ini dependencies: dependencies.ini targets: - 'my_app/my_app.yml'my_app.ymltarget: 'MyApp' config: kind: EXECUTABLE source: paths: 'src' patterns: - '*.cpp'Directory structuremy_project/├── build/ # generated│ ├── conan/ # conan dependencies install output│ ├── fbuild/ # generated fastbuild files (bff)│ ├── projects/ # generated vcxproj files│ ├── scripts/ # command scripts│ └── venv/ # virtual environment, with activate and deactivate scripts│├── my_app/│ ├── src/│ │ └── main.cpp│ └── my_app.yml│├── my_project.sln # generated├── build_tools.ini├── dependencies.ini└── project.yml
zettasql
ZettaSQLZettaSQL - the most popular Open Source SQL database management system, is developed,distributed, and supported byAhensCorporation.🧠🕋ZettaSQL is a database management system.ZettaSQL databases are relational.ZettaSQL software is Open Source.The ZettaSQL Database Server is very fast, reliable, scalable, and easy to use.ZettaSQL Server works in client/server or embedded systems.ZettaSQL commands are at all case sensitive. Everything is stored and retrived in small letters.InstallationOpen your command line (Command Prompt / Powershell / Bash / Terminal etc.)Run this commandpip install zettasql.It will install all the dependencies.UsageLearn more about ZettaSQL usagehere. All commands are to be run in command line.DocumentationLearn more about ZettaSQL documentationhere.IssuesYou are free to raise issues for bugshereContributionYou are free to contribute in this open source project.🎉🎉
zettatel
ZetattelAn SDK to help send messages through the zettatel APIUsageQuick smsto use this package, you can either git clone or install using pip:pip install zettatel==0.1.3.1This will install all the required packages. Next we need to initialize the packacge as shown below:from zettatel.message import Client message = Client( "username", "password", "senderId" )To send a quick message use the following sample:message.send_quick_SMS('254712345678', "this is test from python package")To send a scheduled quick sms :message.send_quick_smartlink_sms( '254712345678', "this is test from python package",scheduleTime = '2023-09-16 13:24')Group SMSTo send message to a group:message.send_group_sms("group name","message")To send a scheduled group smsmessage.send_group_scheduled_sms("group name","message","scheduledTime eg 2023-09-16 13:24")Delivery StatusGet delivery status by transaction ID:message.delivery_status_by_transactionid("transactionid: int")Get message delivery report of a particular day:message.delivery_status_by_day("date")Get overal delivery report summary:message.delivery_status_by_summary()Sender IDto get your sender Id use :res = message.get_senderID() print(res.text)GroupsTo create a group:message.create_group("groupname")To get all the groups:message.get_groups()To update a group:message.update_group("newgroupname","groupid")ContactsThis are teh contacts that will be available in the specified groups.To create conntacts:message.create_contact("contact name","mobile number","group id")To update contact:message.update_contact("contact name","mobile number","group id")To get all the contacts in a group:message.get_contact("group name")
zettel
zettel - Notetaking with ZettelkastenA CLI program for notetaking following theZettelkasten Method.
zettelgeist
ZettelGeist - a historiographically focused notetaking system
zettelkasten
zettelkastenFolder based zettelkasten with a bibtex reference system and emacs org-mode file zettelsVery first stepsInitialInitializegitinside your repo:gitinitIf you don't havePoetryinstalled run:makedownload-poetryInitialize poetry and installpre-commithooks:makeinstallUpload initial code to GitHub (ensure you've runmake installto usepre-commit):gitadd. gitcommit-m":tada: Initial commit"gitbranch-Mmain gitremoteaddoriginhttps://github.com/tZ3ma/zettelkasten.git gitpush-uoriginmainInitial setting upSet upDependabotto ensure you have the latest dependencies.Set upStale botfor automatic issue closing.PoetryAll manipulations with dependencies are executed through Poetry. If you're new to it, look throughthe documentation.Notes about PoetryPoetry'scommandsare very intuitive and easy to learn, like:poetry add numpypoetry run pytestpoetry buildetcBuilding your packageBuilding a new version of the application contains steps:Bump the version of your packagepoetry version <version>. You can pass the new version explicitly, or a rule such asmajor,minor, orpatch. For more details, refer to theSemantic Versionsstandard.Make a commit toGitHub.Create aGitHub release.And... publish 🙂poetry publish --buildWhat's nextWell, that's up to you. I can only recommend the packages and articles that helped me.Packages:Typeris great for creating CLI applications.Richmakes it easy to add beautiful formatting in the terminal.FastAPIis a type-driven asynchronous web framework.IceCreamis a little library for sweet and creamy debuggingArticles:Open Source GuidesGitHub Actions DocumentationMaybe you would like to addgitmojito commit names. This is really funny. 😄🚀 FeaturesFor your development we've prepared:Supports forPython 3.7and higher.Poetryas the dependencies manager. See configuration inpyproject.tomlandsetup.cfg.Power ofblack,isortandpyupgradeformatters.Ready-to-usepre-commithooks with formatters above.Type checks with the configuredmypy.Testing withpytest.Docstring checks withdarglint.Security checks withsafetyandbandit.Well-made.editorconfig,.dockerignore, and.gitignore. You don't have to worry about those things.For building and deployment:GitHubintegration.Makefilefor building routines. Everything is already set up for security checks, codestyle checks, code formatting, testing, linting, docker builds, etc. More details atMakefile summary).Dockerfilefor your package.Github Actionswith predefinedbuild workflowas the default CI/CD.Always up-to-date dependencies with@dependabot(You will onlyenable it).Automatic drafts of new releases withRelease Drafter. It creates a list of changes based on labels in mergedPull Requests. You can see labels (akacategories) inrelease-drafter.yml. Works perfectly withSemantic Versionsspecification.For creating your open source community:Ready-to-usePull Requests templatesand severalIssue templates.Files such as:LICENSE,CONTRIBUTING.md,CODE_OF_CONDUCT.md, andSECURITY.mdare generated automatically.Stale botthat closes abandoned issues after a period of inactivity. (You will onlyneed to setup free plan). Configuration ishere.Semantic Versionsspecification withRelease Drafter.Installationpipinstall-Uzettelkastenor install withPoetrypoetryaddzettelkastenThen you can runzettelkasten--helpzettelkasten--nameRomanor if installed withPoetry:poetryrunzettelkasten--helppoetryrunzettelkasten--nameRomanMakefile usageMakefilecontains many functions for fast assembling and convenient work.1. Download Poetrymakedownload-poetry2. Install all dependencies and pre-commit hooksmakeinstallIf you do not want to install pre-commit hooks, run the command with the NO_PRE_COMMIT flag:makeinstallNO_PRE_COMMIT=13. Check the security of your codemakecheck-safetyThis command launches aPoetryandPipintegrity check as well as identifies security issues withSafetyandBandit. By default, the build will not crash if any of the items fail. But you can setSTRICT=1for the entire build, or you can configure strictness for each item separately.makecheck-safetySTRICT=1or only forsafety:makecheck-safetySAFETY_STRICT=1multiplemakecheck-safetyPIP_STRICT=1SAFETY_STRICT=1List of flags forcheck-safety(can be set to1or0):STRICT,POETRY_STRICT,PIP_STRICT,SAFETY_STRICT,BANDIT_STRICT.4. Check the codestyleThe command is similar tocheck-safetybut to check the code style, obviously. It usesBlack,Darglint,Isort, andMypyinside.makecheck-styleIt may also contain theSTRICTflag.makecheck-styleSTRICT=1List of flags forcheck-style(can be set to1or0):STRICT,BLACK_STRICT,DARGLINT_STRICT,ISORT_STRICT,MYPY_STRICT.5. Run all the codestyle formatersCodestyle usespre-commithooks, so ensure you've runmake installbefore.makecodestyle6. Run testsmaketest7. Run all the lintersmakelintthe same as:maketest&&makecheck-safety&&makecheck-styleList of flags forlint(can be set to1or0):STRICT,POETRY_STRICT,PIP_STRICT,SAFETY_STRICT,BANDIT_STRICT,BLACK_STRICT,DARGLINT_STRICT,ISORT_STRICT,MYPY_STRICT.8. Build dockermakedockerwhich is equivalent to:makedockerVERSION=latestMore informationhere.9. Cleanup dockermakeclean_dockeror to remove all buildmakecleanMore informationhere.📈 ReleasesYou can see the list of available releases on theGitHub Releasespage.We followSemantic Versionsspecification.We useRelease Drafter. As pull requests are merged, a draft release is kept up-to-date listing the changes, ready to publish when you’re ready. With the categories option, you can categorize pull requests in release notes using labels.For Pull Request this labels are configured, by default:LabelTitle in Releasesenhancement,feature🚀 Featuresbug,refactoring,bugfix,fix🔧 Fixes & Refactoringbuild,ci,testing📦 Build System & CI/CDbreaking💥 Breaking Changesdocumentation📝 Documentationdependencies⬆️ Dependencies updatesYou can update it inrelease-drafter.yml.GitHub creates thebug,enhancement, anddocumentationlabels for you. Dependabot creates thedependencieslabel. Create the remaining labels on the Issues tab of your GitHub repository, when you need them.🛡 LicenseThis project is licensed under the terms of theMITlicense. SeeLICENSEfor more details.📃 Citation@misc{zettelkasten, author = {tZ3ma}, title = {Folder based zettelkasten with a bibtex reference system and emacs org-mode file zettels}, year = {2021}, publisher = {GitHub}, journal = {GitHub repository}, howpublished = {\url{https://github.com/tZ3ma/zettelkasten}} }CreditsThis project was generated withpython-package-template.
zettelmerken
Supercharge your learning by combining two of the most revolutionary ideas in knowledge enhancement!IntroductionZettel stands for "note" and Merken stands for "remember" in German. A literal translation would imply "Remember your notes", but that is an overly simplistic definition of what the title stands for.To be precise, Zettel Merken is a fusion of two impactful ideas in the field of knowledge management and learning enhancement: "Zettelkasten" and "Spaced Repetition".What is Zettelkasten?TheWikipedia articledefines zettelkasten as "The zettelkasten is a system of note-taking and personal knowledge management used in research and study".zettelkasten.deis a wonderful little site that is all about, well, zettelkasten. Do read theintroduction. To pick an excerpt from there:A Zettelkasten is a personal tool for thinking and writing. [...] The difference to other systems is that you create a web of thoughts instead of notes of arbitrary size and form, and emphasize connection, not a collection.If I had to explain the concept to someone in a hurry, I'd say: Zettelkasten = Mind Map + Flash CardsOf course, it isnotentirely either, so I would recommend following the links above for a more detailed understanding.How I use ZettelkastenI take notes foreverything! From doing research for my web novels to learning new languages, from my transaction history to ongoing projects, suffice to say I have alotof notes. However, I have come to realize that not all my notes are highly connected. Rather, a collection of notes is usually extremely cohesive with one another but largely decoupled from the rest. So I follow a sort-of watered-down system like so:One single folder called "notes"An index (No direct notes made here, only links), usually named "index.md".A "hub" for each topic. Imagine a hub as a collection (like a notebook or a drawer). One hub usually points to one large topic.A "zettel" for each atomic piece of info. All zettels for a topic are linked into the hub and are stored in a folder usually named after the same.That's it! To expand on the above, here is a sample of my current notes directory:~/Notes ├──index.md ├──books-and-articles.md ├──books-and-articles │├──atomic-habits.md │└──ledger-accounting.md ├──code-notes.md ├──code-notes │├──python.md │└──vim.md ├──learning-french.md ├──learning-french │├──basics-1.1.md │├──basics-1.2.md │└──basics-1.3.md ├──transactions.md └──transactions├──01-2022.md└──02-2022.mdAs you can see above, I have hubs after each topic: zettel-merken, books-and-articles, learning-french, etc. Each hub has a file.md and folder with the same name. I take all my notes in neovim in markdown format No special plugins, just a couple of functions and mapping. See wiki.Thus, myindex.mdwill look like:# INDEX-[Learning French](./learning-french.md)and mylearning-french.md:# Learning French-[Basics 1.1](./learning-french/basics-1.1.md)-[Basics 1.2](./learning-french/basics-1.2.md)-[Basics 1.3](./learning-french/basics-1.3.md)Concerning zettels, I try to have them in an easily digestible format. Each zettels has a microscopic focus on the information it is trying to convey. That is - all the content inside a zettel must directly relate to a single matter or flow in one direction. The size of the file is irrelevant, although I try to keep it short and simple.For example,basics-1.1might look like:# Basic 1.1## Level 0-un = a (sounds: un)-et = and (sounds: ae)-un chat = a cat (sounds: un shaa)-un homme = a man (sounds: un oum)-un garcon = a boy (sounds: un gars-on)-un chat et un homme = A cat and a manAlso, Itryto avoid more than one layer of nesting below the "notes" folder but in some cases, it is inevitable. However, there should never be a need to go beyond two layers.After following the above system consistently for a few months, you'll have a decent-sized collection of notes all linked together in a proper structure. That being said, simply "collecting" notes is never going to help you learn in the long term. That is where the Spaced Repetition comes in!What is Spaced Repetition?Excerpt fromWikipedia article:The basis for spaced repetition research was laid by Hermann Ebbinghaus, who suggested that information loss over time follows a forgetting curve, but that forgetting could be reset with repetition based on active recall.Excerpt frome-student.org:Spaced repetition is a memory technique that involves reviewing and recalling information at optimal spacing intervals until the information is learned at a sufficient level.It is quite difficult to manually track hundreds of notes and review a set everyday. You'd have to keep logs of when each topic was visited, how many repetitions were completed, when the next review will be and so on. Quite cumbersome!That is were Zettel Merken comes into play. Not only does this program keep track of your every note and its schedule, it also automatically emails notes that are due for review for the day! How awesome is that? It is quite easy to use too!SetupNOTE: Code was written in and tested on Manjaro Linux (kernel 5.18) with Python 3.10 (compatible with 3.9)Installpython-mpipinstallzettelmerkenConfigurepython-mzettelmerken--configCreate aconfig.jsonin either~/.config/zettel_merken/or~/zettel_merken, and open in default editor.Initializepython-mzettelmerken--initCreate systemd units to exectute zettelmerken on a daily basis.Helppython-mzettelmerken--helpTODOsv0.2Add slack webhook alternative to emailAdd a wikiv0.3MacOS SupportMaybesconfig.toml instead of config.json?Windows Support?Per-note schedule?Docker Image?
zettel-org
zorgThe zettel note manager of the future.project status badges:version badges:Installation 🗹Usingpipxto Install (preferred)This packagecouldbe installed using pip like any other Python package (in fact, see the section below this one for instructions on how to do just that). Given that we only need this package's entry points, however, we recommend thatpipxbe used instead:# install and setup pipxpython3-mpipinstall--userpipx python3-mpipxensurepath# install zorgpipxinstallzettel-orgUsingpipto InstallTo installzorgusingpip, run the following commands in your terminal:python3-mpipinstall--userzettel-org# install zorgIf you don't have pip installed, thisPython installation guidecan guide you through the process.Command-Line Interface (CLI)The output from runningzorg --helpis shown below:usage: zorg [-h] [-c CONFIG_FILE] [-L [FILE[:LEVEL][@FORMAT]]] [-v] [-d ZETTEL_DIR] {day} ... The zettel note manager of the future. options: -c CONFIG_FILE, --config CONFIG_FILE Absolute or relative path to a YAML file that contains this application's configuration. -d ZETTEL_DIR, --dir ZETTEL_DIR The directory where all of your notes are stored. -h, --help show this help message and exit -L [FILE[:LEVEL][@FORMAT]], --log [FILE[:LEVEL][@FORMAT]] This option can be used to enable a new logging handler. FILE should be either a path to a logfile or one of the following special file types: [1] 'stderr' to log to standard error (enabled by default), [2] 'stdout' to log to standard out, [3] 'null' to disable all console (e.g. stderr) handlers, or [4] '+[NAME]' to choose a default logfile path (where NAME is an optional basename for the logfile). LEVEL can be any valid log level (i.e. one of ['CRITICAL', 'DEBUG', 'ERROR', 'INFO', 'TRACE', 'WARNING']) and FORMAT can be any valid log format (i.e. one of ['color', 'json', 'nocolor']). NOTE: This option can be specified multiple times and has a default argument of '+'. -v, --verbose How verbose should the output be? This option can be specified multiple times (e.g. -v, -vv, -vvv, ...). subcommands: {day} day Generate new day logs from templates and open the main day log in your system's editor. This is the default subcommand.Useful Links 🔗API Reference: A developer's reference of the API exposed by this project.cc-python: Thecookiecutterthat was used to generate this project. Changes made to this cookiecutter are periodically synced with this project usingcruft.CHANGELOG.md: We use this file to document all notable changes made to this project.CONTRIBUTING.md: This document contains guidelines for developers interested in contributing to this project.Create a New Issue: Create a new GitHub issue for this project.Documentation: This project's full documentation.
zettels
# Zettels Zettels is a command line tool implementing Niklas Luhmann’s system of a “Zettelkasten”.# Anouncement: ReimplementationThis implementation of Zettels is no longer actively developed. Instead, I chose to reimplement Zettels from scratch in Rust.While doing so, I added a lot of features and separated the command line interface from the backend, which is now a library calledlibzettels, sporting an API that can be used to easily build other user interfaces.# Check the reimplementation out:## 1. Zettels - Command line tool[Repo](https://gitlab.com/sthesing/zettels)[crates.io](https://crates.io/crates/zettels)## 2. Libzettels - Backend[Repo](https://gitlab.com/sthesing/libzettels)[crates.io](https://crates.io/crates/libzettels)# Where is the old README?[OLD-README.md](OLD-README.md)
zettle
No description available on PyPI.
zettlekasten
# zettlekastenSoftware that try to implement a simple zettlekasten coded in Python.## Kesako?!> The Zettelkasten principles > > A Zettelkasten is a phenomenal tool for storing and organizing your > knowledge, extending your> memory, generating new connections > between ideas, and increasing your writing output. However, to make > the most of a Zettelkasten, you should follow some key principles. > > 1. The principle of atomicity: The term was coined by Christian > Tietze. It means that each note should contain one idea and one > idea only. This makes it possible to link ideas with a lase > focus. > > 2. The principle of autonomy: Each note should be autonomous, > meaning it should be self-contained and comprehensible on its > own. This allows notes to be moved, processed, separated, and > concatenated independently of its neighbors. It also ensures that > notes remain useful even if the original source of information > disappears. > > 3. Always link your notes: Whenever you add a note, make sure to > link it to already existing notes. Avoid notes that are > disconnected from other notes. As Luhmann himself put it, “each > note is just an element that derives its quality from the network > of links in the system. A note that is not connected to the > network will be lost, will be forgotten by the Zettelkasten” > (original in German). > > 4. Explain why you’re linking notes: Whenever you are connecting two > notes by a link, make sure to briefly explain why you are linking > them. Otherwise, years down the road when you revisit your notes, > you may have no idea why you connected them. > > 5. Use your own words: Don’t copy and paste. If you come across an > interesting idea and want to add it to your Zettelkasten, you > must express that idea with your own words, in a way that you’ll > be sure to understand years later. Don’t turn your Zettelkasten > into a dump of copy-and-pasted information. > > 6. Keep references: Always add references to your notes so that you > know where you got an idea from. This prevents plagiarism and > makes it easy for you to revisit the original source later on. > > 7. Add your own thoughts to the Zettelkasten: If you have thoughts > of your own, add them to the Zettelkasten as notes while keeping > in mind the principle of atomicity, autonomy, and the need for > linking. > > 8. Don’t worry about structure: Don’t worry about putting notes in > neat folders or into unique preconceived categories. As Schmidt > put it, in a Zettelkasten “there are no privileged positions” and > “there is no top and no bottom.” The organization develops > organically. > > 9. Add connection notes: As you begin to see connections among > seemingly random notes, create connection notes, that is, > specific notes whose purpose is to link together other notes and > explain their relationship. > > 10. Add outline notes: As ideas begin to coalesce into themes, > create outline notes. An outline note is a note that simply > contains a sequence of links to other notes, putting those other > notes into a particular order to create a story, narrative, or > argument. > > 11. Never delete: Don’t delete old notes. Instead, link to new notes > that explain what’s wrong with the old ones. In that way, your > Zettelkasten will reflect how your thinking has evolved over > time, which will prevent hindsight bias. Moreover, if you don’t > delete, you might revisit old ideas that may turn out to be > correct after all. > > 12. Add notes without fear: You can never have too much information > in your Zettelkasten. At worst, you’ll add notes that won’t be > of immediate use. But adding more notes will never break your > Zettelkasten or interfere with its proper operation. Remember, > Luhmann had 90,000 notes in his Zettelkasten! > >https://writingcooperative.com/zettelkasten-how-one-german-scholar-was-so-freakishly-productive-997e4e0ca125
zettwerk.clickmap
Introductionzettwerk.clickmap integrates a clickmap/heatmap tool into Plone. These tools are for visualisation of user clicks on the page. So you can see, what part of the pages might be more interesting for your visitors, and which are not. Some good known tracking tools are offering the same, but this one adds no external url, cause it handles all to collect and show the clicks.You can selective enable or disalbe the content type objects which gets logged and view the results in an overlay image.Things to knowThe concept works best, if the page uses a fixed width layout. But it also tries to work with variable width layouts. To handle this, you must setup the tool to a given “reference” width, where all clicks gets transformed to. Use the plone control panel to do so, and read the given comments.It is also important to know, that the control panel gui gives you a list of all available objects, which you can choose the ones, you want to log. But this also means, that on big sites, the generation of the list might took a while. I am looking for an alternate widget to select the pages.The storage of the clicks is handle by a BTree data structure. This might be ok for small to mid-sized pages, but there es no experiance with heavy load pages.And the last side note: clicks of users with edit permissions of an object will never be logged, cause the inline edit gui won’t suite to the generated output image/map.Plone compatibilityThe actual work is only tested in Plone 4. There is also a Plone 3 version tagged in the svn which should work, but it is not tested with the latest versions. It also contains jquery-ui javascript resources, which are now removed in trunk (and so for Plone 4). (Anyone knows a lightwight drag’n’drop lib for jquery?)InstallationAdd zettwerk.clickmap to your buildout eggs. After running buildout and starting the instance, you can install Zettwerk Clickmap via portal_quickinstaller to your plone instance. Switch to the control panel and use the configlet to adapt the settings.Changelog1.0 (2013-10-18)Fixed version numbering0.2.0 (2013-09-27)Replaced jquery accessor for Plone 4.3 compatibility0.13 (2012-03-02)Nothing changed yet.0.12 (2011-06-14)Fixed js bug in click handler0.11 (2010-09-19)Fixed wrong import0.1Initial public release with some cleanups
zettwerk.fullcalendar
Introductionzettwerk.fullcalendar integrates the jQuery FullCalendar into Plone 4.Also check out zettwerk.ui for on-the-fly theming of the calendar and you plone site.Use-CasesBasically this addon gives you a new view for Topics (and Folders) to display all event-like contenttypes with the jQuery Fullcalendar. Results from the Topic criteria which are not event-like CT´s will be ignored.If you have developed you own event type it will be displayed as long as it implements the right interface or is based on ATEvent.An Event will be ‘all-day’ if the starttime hour and minutes were left empty when the event was created. All displayed events link to the corresponding object.Time-FormatBeginning with version 0.2.1 zettwerk.fullcalendar uses Plone site’s preferred time format. It defaults to display a.m./p.m. which might not be so common in european contries. To change it, switch to the ZMI and click the portal_properties object. Then look for the site_properties and open it. Change the field ‘localTimeOnlyFormat’ to something more common like %H:%M.InstallationAdd zettwerk.fullcalendar to your buildout eggs. After running buildout and starting the instance, you can install Zettwerk Fullcalendar via portal_quickinstaller to your plone instance. zettwerk.fullcalendar requires Plone 4.UsageAdd a Topic anywhere on your site and set the criterias to your needs. All event-like results can now be displayed with the jQuery Fullcalendar by selecting the Calendar view in the Topic´s display menu. For Folders, just do the same: select the Calendar view and you are done. All event-like content objects will be shown.Notezettwerk.fullcalendar is out of the box ready to use zettwerk.ui to apply jquery.ui’s css to the calendar view. There is only one problem with the ordering of the registered css in plone’s portal_css (registry): if you installed zettwerk.ui after zettwerk.fullcalendar make sure to move the resource with id “++resource++jquery.fullcalendar/fullcalendar.css” to the bottom of all registered css files. You can do this by switching to the ZMI of you plone instance - click portal_css - search the id given above und use the arrows to move it down. At the end click “save”.Changelog0.3.1 (2013-10-10)Rerelease of 0.3.0: fixed package structure0.3.0 (2013-09-27)Replaced jquery accessor (fixes Plone 4.3 compatibility) [jkubaile]Updated fullcalendar to official 1.6.4 [jkubaile]0.2.2 (2012-09-21)Add proper translateable view titles and descriptions. [tmog]Events now include a className which is the combination of all Subjects it is tagged with, giving designers some more to play with. Class names are normalized using the standard plone mechanism. E.g. for an event Subject=[‘A subject’, ‘Subject 10!’] we add className=”Subject_a-subject Subject_subject-10”. [tmog]Add danish translation. [tmog]0.2.1 (2012-03-17)Changed date transfer format (#1) [jkubaile]updated fullcalendar to offical 1.5.3 [jkubaile]fixed preview link display [jkubaile]pep8-ify [jkubaile]added Finnish locales [pingviini].bulgarian translation [vlado]zettwerk.fullcalendar will now pull the Plone site’s preferred time format from portal_properties and use it when displaying dates. [fvox13]Changing am and pm to a.m. and p.m. so as to comply with the Associated Press Stylebook, Microsoft Manual of Style, Chicago Manual of Style, Gregg Reference Manual… [fvox13]added notes about portal_properties usage in readme [jkubaile]0.2.0 (2011-05-17)replaced $ with jq to make ie work for authenticated usersadded another view with overlay preview (reinstall via quickinstaller required)updated fullcalendar to 1.5.10.1.2 (2010-12-15)avoid javascript errors on the other views [jkubaile]added some svn:ignores [jensens]updated fullcalendar to official 1.4.9 [jensens]make div id to bind on more unique and remove superfluos try in js [jensens]0.1.1 (2010-11-02)Better startup handling to avoid empty calendar view if js errors occureAdded fullcalender_view as possible view for folders0.1.0 (2010-10-02)Initial release
zettwerk.i18nduder
IntroductionThe tasks to add translations to a plone product are more or less always the same:Creating and registering the locales directoryAdding languagesCall i18ndude with rebuild-pot commandCall i18ndude with sync commandRun the last two commands in combination with find-untranslated a couple of timesAnd maybe directly compile the mo fileszettwerk.i18nduder tries to make this a little bit easer, by wrapping the i18ndude commands and avoid the folder and path handling by calling it directly from your buildout home folder. It makes nothing, that you can’t do with i18ndude directly, but in our internal usage, it made working with translations a little bit easier and faster.To make this work there is only one assumption made, which should be common in a paster created plone product: your translation domain has the same name as your python package.InstallationPut a i18nduder part to your buildout.cfg and define it like this:[i18nduder] recipe = zc.recipe.egg eggs = ${instance:eggs} zettwerk.i18nduderIt is important to include your instance eggs, cause duder gets the path of the package by importing it. Also note, that zettwerk.i18nduder includes a dependency to i18ndude.Available commands and usageThe generated script is called duder. To see a list of commands use the –help argument:> ./bin/duder --help > Usage: duder command -p package.name or --help for details > > Available commands: > create Create the locales folder and/or add given languages > update Call rebuild-pot and sync > mo Call msgfmt to build the mo files > find Find untranslated strings (domain independent) > > Options: > -h, --help show this help message and exit > -p PACKAGE, --package=PACKAGE > Name of the package > -d DOMAIN, --domain=DOMAIN > Name of the i18n domain. Only needed if it is different > from the package name. > -l LANGUAGES, --languages=LANGUAGES > List of comma-separated names of language strings. > Only used for create command. For example: -l en,deExamplesThe following commands are used against a newly created, and registered in your buildout archetype product with the package name dummy.exampleFirst, we create the locales folder and add some languages:> ./bin/duder create -p dummy.example -l en,de > Created locales folder at: /home/joerg/Instances/Plone4/src/dummy.example/dummy/example/locales > Don't forget to add this to your configure.zcml: > <i18n:registerTranslations directory="locales" / > > - en language added > - de language addedTo add another language just call it again:> ./bin/duder create -p dummy.example -l nl > Locales folder already exists at: /home/joerg/Instances/Plone4/src/dummy.example/dummy/example/locales > - nl language addedAfter working with dummy.exmaple some translations must be done:> ./bin/duder update -p dummy.example > nl/LC_MESSAGES/dummy.example.po: 1 added, 0 removed > en/LC_MESSAGES/dummy.example.po: 1 added, 0 removed > de/LC_MESSAGES/dummy.example.po: 1 added, 0 removedNote, that the pot/po headers are not manipulated with this. This must be done by hand.Find-untranslated is also available:> ./bin/duder find -p dummy.example > wrote output to: /home/joerg/Instances/Plone4/dummy.example-untranslatedAnd the mo files can be compiled like this:> ./bin/duder mo -p dummy.exampleThis calls “msgfmt”, so it must be available on your system.Notes about domainsIt is maybe good to now, that i18ndude can’t differentiate domains by the MessageFactory. So if you run duder with the domain option will result with the msgids of the given domain (when used explicitly in your template files with i18n:domain)andthe translations, which are created via the MessageFactory of you default domain.Feel free to contact us for suggestions and improvments.Changelog0.2.1 (2011-04-05)added full path output after update call0.2 (2011-04-03)added -d option to add explicit domain namerefactored commandspep8 cleanups0.1 (2010-11-13)Initial release with commands: create, update, find, mo
zettwerk.mailtemplates
IntroductionCreate mail templates in plone.If you want to send emails out of plone, you need to create a custom template or method. With this extension it is possible to create mail templates and send them without the need of programming. Nevertheless there is an api to send such created templates by code. For choosing the recipients you can filter by users or groups. In addition there are also extensible user filter, queried through the zca.InstallationAdd zettwerk.mailtemplates to your buildout eggs:eggs = .. zettwerk.mailtemplatesAfter running buildout and starting the instance, you can install Zettwerk Mailtemplates via portal_quickinstaller to your instance.Use-CaseGo to the plone configuration and click on the Zettwerk Mailtemplates link, listed under the custom extensions. Use plone’s add menu to add a template. Enter a title (which results in the mail subject) and a mail body text. Also set the template-id.Click on “portal_mail_templates” on the breadcrumb. Now you can filter the recipients by username or group selection. Try the simulate button the get a list of the selected recipients. Hit the send button to send the mail(s).By filtering a group, you can provide an additional filter. These are registered utilities for zettwerk.mailtemplates.interfaces.IMessageTemplateUserFilter - see the configure.zcml and the utility with the name “registration_reminder” for an example. This on returns only users which have never logged in to your plone site.Recursive GroupsBy selecting a group only the toplevel group members are used. If the group contains other groups, there members are not used.Override Plone’s default templatesIt is common to customize Plone’s default templates for registration and password reset. zettwerk.mailtemplates supports this through the web - no need to add custom template overrides via code. Just add a template with id ‘registration’ or ‘password_reset’ and it is used - that’s all.TodosTests and api documentation needed.Changelog0.2.2 (2014-10-01)Filter out recursive group members0.2.1 (2014-07-14)Fixed bug in send_emailview0.2.0 (2014-07-11)Added support to override Plone’s default templates: registration and password reset.0.1.2 (2014-06-06)changed uninstall: keep the tool object, otherwise existing templates gets removed on reinstalladded default template on fresh install0.1.1 (2014-06-04)fixed packaging0.1 (2014-05-02)Inital release (prototype)Added uninstall profileContributorsJörg KubaileDownload
zettwerk.mobile
zettwerk.mobileApply jquery.mobile based themes to plone.UsageAdd zettwerk.mobile to your buildout and install it via quickinstaller. It also installs zettwerk.mobiletheming for url based theme switching. Go to the plone control panel to mobile theming and set up a hostname, under which the theme should be applied.ThemesThere is support for jquery.mobile based themes. Just open the themeroller and create your theme. Then download and upload it in the zettwerk.mobile Themes Controlpanel.See it in action:https://www.youtube.com/watch?v=Q2ID86XkiQQ(with phonegap) or herehttps://www.youtube.com/watch?v=s7n0IMjltzU(with themeroller support)ContributorsJörg KubaileChangelog0.2.1 (2014-07-01)Using zettwerk.mobiletheming generic setup import profile0.2 (2014-06-17)Added support for jquery.mobile’s themerolle based themesenable zettwerk.mobile as default theme on installation in zettwerk.mobiletheming0.1 (2014-06-04)Initial commit
zettwerk.mobiletheming
zettwerk.mobilethemingSwitching mobile themes based on urlsUsageInstall zettwerk.mobiletheming via quickinstaller. A new control panel entry makes it possible to change settings.Enter the hostnames on which the mobile theme should be applied. Choose the diazo theme to use for selected URL.There is also some settings for “redirecting urls”, it works like this:A javascript is installed in portal_javascriptThis javascript redirects urls to the url set in the control panel.Redirects works for mobile devices.You can choose if you want to redirect iPads and tablets, too.There is a settingSee this example with the zettwerk.mobile theme:https://www.youtube.com/watch?v=Q2ID86XkiQQGeneric SetupThis product also provides a GenericSetup extension for integrators to set these settings via a xml profile file. Place the file “mobiletheming.xml” in your (default) generic setup profile and change it as you need. You can also export your current settings via portal_setup -> Export. The export step is called “Mobiletheming Settings”.Example content, taken fromzettwerk.mobile:<?xml version="1.0"?> <settings> <themename>zettwerk.mobile</themename> <hostnames> <element>http://localhost:8080</element> </hostnames> <ipad>False</ipad> <tablets>False</tablets> </settings>ContributorsJörg KubaileEspen Moe-NilssenChangelog0.2.1 (2014-11-21)Added ‘redirect to full url’ [espenmn]0.2 (2014-07-01)Added GenericSetup import/export profiles.0.1 (2014-06-04)Initial version
zettwerk.ui
Introductionzettwerk.ui integrates jquery.ui’s themeroller based themes into Plone 4.x. Themeroller is a tool to dynamically customize the jquery.ui css classes. For details about jquery.ui theming and themeroller seehttp://jqueryui.com/themeroller/.See it in action:https://www.youtube.com/watch?v=izgJ9GOSuNwNote: with version 2.0 the dynamic integration of the themeroller widget stops working. But you can include manually downloaded themes. Follow the instructions on the “add theme” page linked on the Zettwerk UI Themer conrol panel. For future versions, it is planned to add a custom widget with live preview again. To see how it worked with versions below 2.0 seehttp://www.youtube.com/watch?v=p4_jU-5HUYAUsageWith this add-on it is very easy to adapt the look and color scheme of your plone site. After installation, there is a new extension product listed in the plone controlpanel which is called “Zettwerk UI Themer”. See the instructions given on that page to choose and add themes.Feel free to contact us for feedback.Technical background and pre 1.0 versionsFor versions below 1.0 zettwerk.ui made heavy use of javascript to manipulate the dom and css of the generated output page. This was ok for prototyping but probably not for production. Especially slower browsers shows some kind of flickering, till all manipulations were applied. With version 1.0, the complete concept to do most of the manipulation changed to xsl-transforms, applied via diazo / plone.app.theming. This results in a much better user experience. On the other hand, zettwerk.ui acts now as a skin (while the former one was none).InstallationAdd zettwerk.ui to your buildout eggs:eggs = .. zettwerk.uiAfter running buildout and starting the instance, you can install Zettwerk UI Themer via portal_quickinstaller to your plone instance. zettwerk.ui requires Plone 4.1 cause it depends onplone.app.theming. If you want to use zettwerk.ui in Plone 4.0 you can also useversion 0.40, which is the last one, (officially) supporting Plone 4.0.x.Filesystem dependencyCreated themes are downloaded to the servers filesystem. So a directory is needed, to store these files. At the moment, this is located always relative from your INSTANCE_HOME: ../../zettwerk.ui.downloads. In a common buildout environment, that is directly inside your buildout folder.Deployment and reuse of themesYou can easily move the dowloaded themes from the download folder from one buildout instance to another. So to deploy a theme just copy the folder with the name of your theme from your develop server to your live server. It should be immediatelly available (without restart) - but only if the download folder was already created.Changelog2.0 (2014-04-15)Plone 4.3 compatibility (for < 4.3 use < 2.0)removed themeroller integrationadded instructions for manual theme integrationadded z-index for dialog boxes to avoid overlapping with the edit barupdated german translationsadded theme uninstall via uninstall profile1.1.0 (2012-09-21)Removed checkbox and radiobox handling.1.0.5 (2012-08-17)Fixed Install error with newer collective.js.jqueryui versionsPlone 4.2 compatibility and tests1.0.4 (unreleased)Fixed action menu display1.0.3 (2012-03-17)Pinned plone.app.theming to avoid zmi stylingFully removed “not-zmi” styling rules1.0.2 (2012-03-12)Fixed related Items and categorisation (#4)1.0.1 (2011-10-21)Fixed manage portlet links (#3)Fixed setuphandler execution1.0 (2011-06-23)re-added radio box stylingtuned rules.xml to not style zmi pagesAdd french translation [toutpt]Updated spanish translation [macagua]1.0rc1 (2011-06-12)Major rewrite to apply manipulations via plone.app.theming/diazoremoved “settings” panel.0.40 (2011-05-28)removed own jquery.ui integration and use collective.js.jqueryui (reinstall via quickinstall required!)collective.js.jqueryui’s sunburst theme integrated with special resource handlingre-added validation of theme name charactersmade the font size of the default start theme a little smallerudpated pot file and german translationssorting of theme names0.34 (2011-05-17)IE7 Fix for global tabs0.33 (2011-05-06)do not show the “enable cookie” status message, it it is not visible0.32 (2011-04-30)Show Uninstall in Title of profile to not confuse plone-admins ;-) [jensens]handle BadZipfile exceptionsupdated jquery.ui to 1.8.120.31 (2011-03-07)added testsadded selenium testsupdated jquery.ui to 1.8.10tested on plone 4.0.x and 4.1.x0.30 (2011-02-16)added Spanish translation [macagua]changed control panel gui and usage of download handlingadded translatable strings for control panel javascriptschanged some imports (for Plone 4.1 compatibility)pep8 cleanupsupdated jquery.ui to 1.8.90.28 (2011-01-11)Back to old version numbering schema - to make buildout updates work.0.2.7 (2011-01-11)Fixed version numberingreplaced $ with jq to fix gui for authenticated IE users0.26 (2010-12-15)updated jquery.ui to 1.8.7 (reinstall via quick-installer required)changed ui base resource integration to avoid required reinstalls for the upcoming ui updates0.25 (2010-11-23)made enableTabs work with <dl class=”enableFormTabbing”> based tabs0.24 (2010-11-16)added support for disabled radio- and checkboxesupdated jquery.ui to 1.8.6tuned edit-bar styling0.23 (2010-10-21)removed little extra margin for global tabsmade ui css work for @import stylesheets0.22 (2010-10-13)made portlet’s font size smallermade edit of existing themes work after reinstall or uninstall-installmade edit of existing themes work for themes added via filesystem0.21 (2010-10-13)removed console.log call0.20 (2010-10-10)customization of existing themes (just give it the same name when downloading)added new option to enable global font stylingadded checkbox stylingadded radiobox stylingcleaned up overall forms stylingadded forms styling to dialog contentfixed dialog stylingcleaned up navigation-portlet stylingmerged enableButtons into enableFormstuned livesearch result stylingupdated jquery-ui to 1.8.5 (reinstall via quick-installer required)made uninstall remove the controlpanel iconupdated translationstested with plone 4.0.10.14 (2010-09-19)removed annoying flickering of personal-tools when hovering0.13updated jquery-ui to 1.8.40.12fixed css rules suitable for plone 4.0b40.11fixed css rules suitable for plone 4.0b3added #edit-bar stylingadded simple livesearch styling0.1First working version
zettwerk.users
IntroductionAt the point of writing, zettwerk.users provides an additional view /@@userlist_view. This view can be found via the plone controlpanel “Zettwerk Users”. It lists the users, available in your plone instance, and shows your wether the user already logged in or not. You can select all users that did not log in yet and reset their passwords. However, it is also possible to select single users by hand.You can filter the users by groups. By default, all users are shown.InstallationJust put zettwerk.users into your buildout.cfg[instance] … eggs += zettwerk.users zcml += zettwerk.users …Use the portal_quickinstaller to register the “Zettwerk Users” to the controlpanel.Changelog0.1 (2011-02-28)Initial release with view /@@userlist_view
zetup
No description available on PyPI.
zeug
ZEUG
zeugma
Zeugma📝 Natural language processing (NLP) utils: word embeddings (Word2Vec, GloVe, FastText, …) and preprocessing transformers, compatible withscikit-learn Pipelines. 🛠 Check thedocumentationfor more information.InstallationInstall package withpip install zeugma.ExamplesEmbedding transformers can be either be used with downloaded embeddings (they all come with a default embedding URL) or trained.Pretrained embeddingsAs an illustrative example the cosine similarity of the sentenceswhat is zeugmaanda figure of speechis computed using theGloVepretrained embeddings.:>>> from zeugma.embeddings import EmbeddingTransformer >>> glove = EmbeddingTransformer('glove') >>> embeddings = glove.transform(['what is zeugma', 'a figure of speech']) >>> from sklearn.metrics.pairwise import cosine_similarity >>> cosine_similarity(embeddings)[0, 1] 0.8721696Training embeddingsTo train your own Word2Vec embeddings use theGensim sklearn API.Fine-tuning embeddingsEmbeddings fine tuning (training embeddings with preloaded values) will be implemented in the future.Other examplesUsage examples are present in theexamplesfolder.Additional examples using Zeugma can be foundin some posts of my blog.ContributeFeel free to fork this repo and submit a Pull Request.DevelopmentThe development workflow for this repo is the following:create a virtual environment:python-mvenv venv && source venv/bin/activateinstall required packages:pip install-rrequirements.txtinstall the pre-commit hooks:pre-commitinstallinstall the package itself in editable mode:pip install-e.run the test suite with:pytestfrom the root folderDistribution via PyPITo upload a new version to PyPI, simply:tag your new version on git:git tag-ax.x-m"my tag message"update the download_url field in thesetup.pyfilecommit, push the code and the tag (git push origin x.x), and make a PRMake sure you have a.pypircfile structured likethisin your home folder (you can usehttps://upload.pypi.org/legacy/for the URL field)once the updated code is present in master runpython setup.py sdist && twine upload dist/*from the root of the package to distribute it.Building documentationTo build the documentation locally simply runmake htmlfrom thedocsfolder.Bonus: what’s a zeugma?It’s a figure of speech: “The act of using a word, particularly an adjective or verb, to apply to more than one noun when its sense is appropriate to only one.” (fromWiktionary).For example, “He lost his wallet and his mind.” is a zeugma.
zeus
UNKNOWN
zeusai-py
ZeusAI.PyThe python package to wrap the various APIs associated with ZeusAI.Usage for Non-ContributorsSee the Readthedocs page (TODO) for usage documentation.DocumentationTo view all of the available documentation for this project, please see theDocuments IndexThis includes information on getting started, the development environment, and more.Version NumbersZeusAI.Py is updated at the same time as the ZeusAI server. The first 3 sections of the ZeusAI.Py version number will be the associated version number for ZeusAI, with the 4th section being the ZeusAI.Py revision number, which is only updated for bugs. (i.e. if ZeusAI is on 1.2.3, ZeusAI.Py will be on 1.2.3.x).If the first three sections of the ZeusAI.Py version number match your ZeusAI version number, they should be compatable.
zeusapi
No description available on PyPI.
zeus-client
Zeus client is a command line tool to facilitate execution of advancedzeuselection administrative operations such as cryptographical mix and partial decryption of submitted ballots.InstallHintPython 2.7 along with the pip packaging tool is required to beinstalledInstallingzeus-clienttool should be as simple as$ pip install zeus-client $ zeus-client --helpRemote mixThemixcommand can be used for elections withremote mixingenabled during initial election parametrization. Once election voting closes and zeus completes the first mix of encrypted ballots, Zeus produces the election remote mix URL to the election administrator. The URL can be shared across the preferred set of participants as required by the election process. Each participant takes part to the election mix as follows:- Download previously set of mixed ciphers - Generate a new mix - Upload the new ballot mix (will be used as input for the next mix)zeus-clientautomatically takes care of all of the above steps:$ zeus-client mix <election-mix-url> <mix-id> <rounds> <parallel> # e.g. $ zeus-client mix https://zeus-testing.grnet.gr/zeus/elections/election-uuid/mix/unique-id my-election 128 4election-mix-urlthe election mix URL as provided by the election administrator.mix-idis an election identification string used as a prefix for the generated filenames.roundsis an integer related to mixnet security parameters. Using a low number produces fast results but could diminish mix security. It is advised to use an integer equal or greater than128.parallelshould be set to the number of CPU cores of your system.DecryptionDownload election ciphertexts:$ zeus-client download ciphers "<trustee-login-url>" ballots-encryptedCompute partial decryptions$ zeus-client decrypt ballots-encrypted ballots-partially-decrypted “<path-to-trustee-secret-key>”Submit partial decryptions$ zeus-client upload factors ballots-partially-decrypted “<trustee-login-url>”
zeuscloud-iamspy
No description available on PyPI.
zeus-lab804
Fast create scaffold of flask.
zeus-log-parser
# zeus-log-parser Log Parsing Library for Zeus
zeus-mcmc
zeus is a Python implementation of the Ensemble Slice Sampling method.Fast & RobustBayesian Inference,EfficientMarkov Chain Monte Carlo (MCMC),Black-box inference, no hand-tuning,Excellent performance in terms of autocorrelation time and convergence rate,Scale to multiple CPUs without any extra effort,Automated Convergence diagnostics.ExampleFor instance, if you wanted to draw samples from a 10-dimensional Gaussian, you would do something like:importzeusimportnumpyasnpdeflog_prob(x,ivar):return-0.5*np.sum(ivar*x**2.0)nsteps,nwalkers,ndim=1000,100,10ivar=1.0/np.random.rand(ndim)start=np.random.randn(nwalkers,ndim)sampler=zeus.EnsembleSampler(nwalkers,ndim,log_prob,args=[ivar])sampler.run_mcmc(start,nsteps)chain=sampler.get_chain(flat=True)DocumentationRead the docs atzeus-mcmc.readthedocs.ioInstallationTo installzeususingpiprun:pipinstallzeus-mcmcTo installzeusin a[Ana]Condaenvironment use:condainstall-cconda-forgezeus-mcmcAttributionPlease cite the following papers if you found this code useful in your research:@article{karamanis2021zeus,title={zeus:APythonimplementationofEnsembleSliceSamplingforefficientBayesianparameterinference},author={Karamanis,MinasandBeutler,FlorianandPeacock,JohnA},journal={arXivpreprintarXiv:2105.03468},year={2021}}@article{karamanis2020ensemble,title={Ensembleslicesampling:Parallel,black-boxandgradient-freeinferenceforcorrelated&multimodaldistributions},author={Karamanis,MinasandBeutler,Florian},journal={arXivpreprintarXiv:2002.06212},year={2020}}LicenceCopyright 2019-2021 Minas Karamanis and contributors.zeus is free software made available under the GPL-3.0 License. For details see theLICENSEfile.
zeus-ml
Deep Learning Energy Measurement and OptimizationProject News⚡[2023/12] The preprint of the Perseus paper is outhere![2023/10] We released Perseus, an energy optimizer for large model training. Get startedhere![2023/09] We moved to underml-energy! Please stay tuned for new exciting projects![2023/07]ZeusMonitorwas used to profile GPU time and energy consumption for theML.ENERGY leaderboard & Colosseum.[2023/03]Chase, an automatic carbon optimization framework for DNN training, will appear at ICLR'23 workshop.[2022/11]Carbon-Aware Zeuswon thesecond overall best solution awardat Carbon Hack 22.Zeus is a framework for (1) measuring GPU energy consumption and (2) optimizing energy and time for DNN training.Measuring GPU energyfromzeus.monitorimportZeusMonitormonitor=ZeusMonitor(gpu_indices=[0,1,2,3])monitor.begin_window("heavy computation")# Four GPUs consuming energy like crazy!measurement=monitor.end_window("heavy computation")print(f"Energy:{measurement.total_energy}J")print(f"Time :{measurement.time}s")Finding the optimal GPU power limitZeus silently profiles different power limits during training and converges to the optimal one.fromzeus.monitorimportZeusMonitorfromzeus.optimizerimportGlobalPowerLimitOptimizermonitor=ZeusMonitor(gpu_indices=[0,1,2,3])plo=GlobalPowerLimitOptimizer(monitor)plo.on_epoch_begin()forx,yintrain_dataloader:plo.on_step_begin()# Learn from x and y!plo.on_step_end()plo.on_epoch_end()CLI power and energy monitor$python-mzeus.monitorpower[2023-08-22 22:39:59,787] [PowerMonitor](power.py:134) Monitoring power usage of GPUs [0, 1, 2, 3]2023-08-22 22:40:00.800576{'GPU0': 66.176, 'GPU1': 68.792, 'GPU2': 66.898, 'GPU3': 67.53}2023-08-22 22:40:01.842590{'GPU0': 66.078, 'GPU1': 68.595, 'GPU2': 66.996, 'GPU3': 67.138}2023-08-22 22:40:02.845734{'GPU0': 66.078, 'GPU1': 68.693, 'GPU2': 66.898, 'GPU3': 67.236}2023-08-22 22:40:03.848818{'GPU0': 66.177, 'GPU1': 68.675, 'GPU2': 67.094, 'GPU3': 66.926}^CTotal time (s): 4.421529293060303Total energy (J):{'GPU0': 198.52566362297537, 'GPU1': 206.22215216255188, 'GPU2': 201.08565518283845, 'GPU3': 201.79834523367884}$python-mzeus.monitorenergy[2023-08-22 22:44:45,106] [ZeusMonitor](energy.py:157) Monitoring GPU [0, 1, 2, 3].[2023-08-22 22:44:46,210] [zeus.util.framework](framework.py:38) PyTorch with CUDA support is available.[2023-08-22 22:44:46,760] [ZeusMonitor](energy.py:329) Measurement window 'zeus.monitor.energy' started.^C[2023-08-22 22:44:50,205] [ZeusMonitor](energy.py:329) Measurement window 'zeus.monitor.energy' ended.Total energy (J):Measurement(time=3.4480526447296143, energy={0: 224.2969999909401, 1: 232.83799999952316, 2: 233.3100000023842, 3: 234.53700000047684})Please refer to our NSDI’23paperandslidesfor details. CheckoutOverviewfor a summary.Zeus is part ofThe ML.ENERGY Initiative.Repository Organization. ├── zeus/ # ⚡ Zeus Python package │   ├── optimizer/ # - GPU energy and time optimizers │   ├── run/ # - Tools for running Zeus on real training jobs │   ├── policy/ # - Optimization policies and extension interfaces │   ├── util/ # - Utility functions and classes │   ├── monitor.py # - `ZeusMonitor`: Measure GPU time and energy of any code block │   ├── controller.py # - Tools for controlling the flow of training │   ├── callback.py # - Base class for Hugging Face-like training callbacks. │   ├── simulate.py # - Tools for trace-driven simulation │   ├── analyze.py # - Analysis functions for power logs │   └── job.py # - Class for job specification │ ├── zeus_monitor/ # 🔌 GPU power monitor │   ├── zemo/ # - A header-only library for querying NVML │   └── main.cpp # - Source code of the power monitor │ ├── examples/ # 🛠️ Examples of integrating Zeus │ ├── capriccio/ # 🌊 A drifting sentiment analysis dataset │ └── trace/ # 🗃️ Train and power traces for various GPUs and DNNsGetting StartedRefer toGetting startedfor complete instructions on environment setup, installation, and integration.Docker imageWe provide a Docker image fully equipped with all dependencies and environments. The only command you need is:dockerrun-it\--gpusall`# Mount all GPUs` \--cap-addSYS_ADMIN`# Needed to change the power limit of the GPU` \--ipchost`# PyTorch DataLoader workers need enough shm` \mlenergy/zeus:latest\bashRefer toEnvironment setupfor details.ExamplesWe provide working examples for integrating and running Zeus in theexamples/directory.Extending ZeusYou can easily implement custom policies for batch size and power limit optimization and plug it into Zeus.Refer toExtending Zeusfor details.Carbon-Aware ZeusThe use of GPUs for training DNNs results in high carbon emissions and energy consumption. Building on top of Zeus, we introduceChase-- a carbon-aware solution.Chasedynamically controls the energy consumption of GPUs; adapts to shifts in carbon intensity during DNN training, reducing carbon footprint with minimal compromises on training performance. To proactively adapt to shifting carbon intensity, a lightweight machine learning algorithm is used to forecast the carbon intensity of the upcoming time frame. For more details on Chase, please refer to ourpaperand thechase branch.Citation@inproceedings{zeus-nsdi23,title={Zeus: Understanding and Optimizing {GPU} Energy Consumption of {DNN} Training},author={Jie You and Jae-Won Chung and Mosharaf Chowdhury},booktitle={USENIX NSDI},year={2023}}ContactJae-Won Chung ([email protected])
zeus-py
zeus-pyDescriptionzeus-py is a Python wrapper for the Zeus API. It provides a convenient way to interact with the Zeus platform using Python.RequirementsPython 3.11.x or higherInstallationYou can install zeus-py using pip:py-3-mpipinstall-Uzeus-pyDocumentationThere is no documentation yet for this project
zeusrobot
ZeusRobot API이 모듈은 ZeusRobot의 사용을 위해 제공되는 유저 API 라이브러리 입니다.
zeustheinvestigator
Zeus the InvestigatorUSAGE$zeus-u<first_url>-u<second_url>-c<cooldown(insecs.default=3)>InstallationManual InstallationNote:You will need poetry for manual installation$pipinstallpoetryDownload or clone the repository.$ git clone https://github.com/777advait/Zeus-The-InvestigatorInstall the project by running the following command in the root of the directory.$poetryinstallPyPi Installation$pipinstallZeusTheInvestigator
zeus-utility
Zeus's UtilityFeaturesParallel ExecuteQuick Usage:Install:pipinstallzeus-utility# orpipinstallgit+https://github.com/zeuscsc/zeus_utility.gitUsagefromzeus_utility.parallel_executorimportQueueExecutordefprint_a_plus_b(a,b):print(a+b)executor=QueueExecutor(threads_count=5)foriinrange(10):executor.add_task(print_a_plus_b,a=i,b=i)executor.execute()
zevcrack
No description available on PyPI.
zEvent
No description available on PyPI.
zevents
ZEventsEasy to use generic events system.Free software: MIT licenseDocumentation:https://zevents.readthedocs.io.FeaturesEventManager class orchestrating subscriptions, unsubscriptions and notificationsGeneric Event class usable to implement custom eventsGeneric TriggerEvent triggering the processing of queues in EventManagerStandard events collection: TickEvent, QuitEventInstall$pipinstalltchappui-zeventsExampleA simple example of how to use ZEvents can be found in theUsage sectionof the documentation.CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2019-02-04)First release on PyPI.