Saravanan666/pypi-org huggingface dataset:
Package: itermark
ItermarkExtension for iterable data types; adds boundwise bookmark iteration, enabling active item
tracking/setting (type allowing)Ideal for 'paging' through iterablesInstallationpip install itermarkUsing Itermark>>>fromitermarkimportItermark>>>iterlist=Itermark(['zero','one','two','three'])>>>iterlist.active'zero'>>>iterlist.mark+=2>>>iterlist.active'two'>>>iterlist.mark=5# Would put mark outside active index>>>iterlist.active'three'# Defaults to highest upper bound>>>iterlist.active='new three'>>>iterlist.active'new three'The Itermark extension adds two properties (three for dicts), and two functions to it's objects.
Note that all itermark attributes are disabled if underlying iterable is emptymarkActs as a bookmark index, and can be assigned a value directly (iterlist.mark = 2) or by operator assignment
(iterlist.mark += 1,iterlist.mark -= 1)activeRetrieves nth item from iterable where self.mark = n. Dictionary Itermarks return nth valueactivekeyDict specific, retrieves nth key from dictonary type where self.mark = n.
Note that itermark was made post 3.6's insertion ordered dicts. While itermark properties still work
pre 3.6, collections.OrderedDict is recommended and supportedmarkend()Set mark to end value. Mark will never go above upper bound, but without calling len() user may not
know what that upper bound is. Use .markend() to reliably set mark to upper boundSupported typeslistOriginal implementation, full mark and active usage`tupleNo active assignment
`dictUses iterator gen for mark and active properties.activecalls and sets values,activekeycalls immutable keysOrderedDictSame features as a regular dict, but for pre 3.6 implementationstringSure, strings are just a list of characterssetLook, I don't know who'd want bookmark iteration through a set but here ya go
Package: iterm-file-handler
Iterm File HandlerInstallClone and run below commandpython3 setup.py installInstall using pippip install iterm_file_handlerUsesAdd/usr/local/bin/itfh "\1" "\2" "\5"in iterm setting as belowCMD + Click on the file path displayed in itermProfitDebuggingAdd 'test' in the input as/usr/local/bin/itfh "\1" "\2" "\5" 'test'to generate logs at~/.iterm_file_handler.log. By default it will log if something goes wrong.Creditshttps://github.com/jgehrcke/python-cmdline-bootstraphttps://github.com/fmeeuw/Iterm2-intellij
Package: iter_model
iter_model- provides a convenient API for interacting with iterable objects (Iterable).
iter_model uses a methods approach instead of individual functions.iter_model also providesasyncanalog of all methods.
This is useful when interacting with asynchronous iterable objects (AsyncIterable),
because python does not have ready functions for these cases.Therefore,iter_modelprovidesSyncIterclass forIterable,
andAsyncIterforAsyncIterable.Examplefromiter_modelimportSyncIterit=SyncIter(range(10))# SyncIter for sync iterablesresult=(it.where(lambdax:x%2==0)# filter only odd values.take(3)# take first 3 value.map(lambdax:x**2)# square all values)print(result.to_list())LinksSource code:github.com/VolodymyrBor/iter_modelDocumentation:iter_modelChangelog:changelog
Package: iterm-pane-spliter
Split iterm panes by user defined structureSplit iterm panes by user defined structure from the command line.Usagepip3installiterm-pane-spliter
iterm-pane-spliter<json-structure>the structure is a json Matrix, where each value is a different pane, the number of panes is the number of different values in the matrix.the more values of the same number in the matrix, the bigger the pane will be.Examples2 panes vertically splitFor this:-------------------
|        |        |
|        |        |
|   1    |    2   |
|        |        |
|        |        |
-------------------the json structure you should provide is:Tip: just add more numbers to add more vertical panes[[1,2]]so you will need to run:iterm-pane-spliter"[[1, 2]]"2 panes horizontally splitFor this:-------------------
|                 |
|       1         |
|                 |
-------------------
|                 |
|       2         |
|                 |
-------------------the json structure you should provide is:Tip: just add more single value arrays to add more horizontal panes[[1],[2]]so you will need to run:iterm-pane-spliter"[[1], [2]]"2 panes vertically split 1 is bigger than 2For this:-------------------
|           |     |
|           |     |
|     1     |  2  |
|           |     |
|           |     |
-------------------the json structure you should provide is:[[1,1,1,2]]so you will need to run:iterm-pane-spliter"[[1, 1, 1, 2]]"split to 4 equal panesFor this:-------------------
|        |        |
|    1   |   2    |
|        |        |
-------------------
|        |        |
|    3   |   4    |
|        |        |
-------------------the json structure you should provide is:[[1,2],[3,4]]so you will need to run:iterm-pane-spliter"[[1, 2], [3, 4]]"Some crazy structure-------------------
|     1     |     |
| --------- |  5  |
|     |     |     |
|     |  7  | --- |
|  2  |     |  3   |
|     | --- | --- |
|     |  8  |  6  |
| --- | --- | --- |
|        4        |
-------------------the json structure you should provide is:[[1,1,5],[2,7,5],[2,7,3],[2,8,6],[4,4,4]]so you will need to run:iterm-pane-spliter"[[1, 1, 5], [2, 7, 5], [2, 7, 3], [2, 8, 6], [4, 4, 4]]"
Package: iterm-theme-generator
This theme generator will produce a color set for iTerm2 from an image.Check out thegalleryContentsInstallationUsageFeaturesThanks ToLinksInstallationFrom pip:$pip install --upgrade iterm-theme-generatorUsageTo generate a color set from an image:$ iterm_theme_generator <path-to-image> --parent <your-profile>This will generate colors and create iTerm2 profile in its DynamicProfiles
directory. This theme profile will inherit profile you mention with–parentoption. Go to the profiles tab and select this new profile as default and
restart iTerm. Now, when you change theme again iTerm will load it dynamically,
so no need to restart again.Options:usage: iTerm2 Theme Generator [-h] [--parent PROFILE] [--out FILE]
                              [--tiled TILED] [--blend BLEND]
                              [--transparency VALUE] [--contrast CONTRAST]
                              [--saturation-min MIN] [--saturation-max MAX]
                              [--brightness-min MIN] [--brightness-max MAX]
                              [--rotate TIMES] [--inverted] [--reversed]
                              [--no-background]
                              IMAGE

Generate iTerm2 color scheme based on an image

positional arguments:
  IMAGE                 Image to process

optional arguments:
  -h, --help            show this help message and exit
  --parent PROFILE      Profile this theme will inherit. Default:
                        'Default.Profile'
  --out FILE            Output file. Default:
                        /Users/m4yers/Library/Application
                        Support/iTerm2/DynamicProfiles/theme.json
  --tiled TILED         Tile the image. Default: False
  --blend BLEND         Blend(0.0-1.0). Default: 0.10
  --transparency VALUE  Transparency(0.0-1.0). Default: 0.0
  --contrast CONTRAST   Contrast(0.0-1.0). Default: 0.0
  --saturation-min MIN  Minimal saturation(0.0-1.0). Default: 0.0
  --saturation-max MAX  Maximal saturation(0.0-1.0). Default: 1.0
  --brightness-min MIN  Minimal brightness(0.0-1.0). Default: 0.0
  --brightness-max MAX  Maximal brightness(0.0-1.0). Default: 1.0
  --rotate TIMES        Rotate colors order N times(0-7). Default: 0
  --inverted            Invert colors. Default: No
  --reversed            Reverse colors order. Default: No
  --no-background       Disable background image. Useful if using
                        transparency.FeaturesSome iTerm features are exposed through the generator such astiling,blending,contrast.The generator provides rudimentary color control, including:saturation min/max boundbrightness min/max boundrotation and reversion of the generated color setcolor inversionUsing these features will allow you to capture an awesome color set that will
fit your background image neatly.Thanks Toradiosilencefor the original scriptmetakirby5for colorz utilLinksPyPIGitHub
Package: iterpipes
This is a beta release. The library may be changed significantly.Release Date:2010-03-11RationalePython is a good choice for many software tools, but it lacks clarity and
simplicity of command shells when it comes to running command pipelines from
scripts. The standardsubprocessmodule provides basic inter-processing
tools, but it requires lots of lines to express a single shell line.iterpipesis trying to overcome this limitation by representing a shell
command pipeline asa function over iterables, similar to functions from the
standarditertoolsmodule.Getting StartedDownload and install iterpipesRead theintroductionGet familiar with theiterpipes APIThe simplest way to installiterpipesis viapiporeasy_install:$ pip install iterpipesPackages forArch LinuxandFreeBSDare also available.
Package: iterplus
iterplus -itertoolsextendedThis library provides a set of functions that complement Python itertools. These include means to access iterable content via slicing, scan generator (easy series) and chainable wrapper (ie. a.map(…).filter(…)).Documentation:http://packages.python.org/iterplus/Source:http://github.com/bebraw/iterplus/Issue Tracker:http://github.com/bebraw/iterplus/issues/ExamplesScanfibo = scan(0, 1, lambda a, b: a + b)“scan” returns an iterator. Note how simple it’s to define series such as Fibonacci’s using it. In case an explicit rule is not provided, it infers one automatically (ie. 1,2,3,…).Sliceablesliceable(scan(0, 1))[2:5] # returns list containing third, fourth and fifth item“sliceable” makes it possible to slice the content of iterators.Chainablechainable([1, 2, 3]).map(lambda x: x * 2).filter(lambda x: x > 3).val() == [4, 6]“chainable” makes it possible to use basic functional utilities (map, filter, reduce) using a chaining syntax.Licenseiterplus is available under MIT license. See LICENSE for more details.Changelog0.2.5 (2011-11-16)Added index and rindexTidied up docs0.2.0 (2011-11-11)First public releaseAdded caching to sliceable0.1.0 (2011-09-26)Initial release
Package: iterpop
iterpopiterpop makes popping the value out of a singleton container or a homogeneous container safe & funFree software: MIT licenseDocumentation:https://iterpop.readthedocs.io.fromiterpopimportiterpopasip# returns 'a'ip.popsingleton(['a'])ip.popsingleton({'a'})ip.popsingleton('a')# throwsip.popsingleton([])ip.popsingleton(set())ip.popsingleton('')# throwsip.popsingleton(['a','b'])ip.popsingleton({'a','b'})ip.popsingleton('ab'})# returns 'a'ip.pophomogeneous(['a'])ip.pophomogeneous({'a'})ip.pophomogeneous('a')# also returns 'a'ip.pophomogeneous(['a','a'])ip.pophomogeneous('aaa')ip.pophomogeneous('a'for__inrange(100))# throwsip.pophomogeneous([])ip.pophomogeneous(set())ip.pophomogeneous('')# throwsip.pophomogeneous(['a','b'])ip.pophomogeneous({'a','b'})ip.pophomogeneous('ab'})# returns 'a'ip.poursingleton(['a'])ip.poursingleton({'a'})ip.poursingleton('a')# returns Noneip.poursingleton([])ip.poursingleton(set())ip.poursingleton('')# throwsip.poursingleton(['a','b'])ip.poursingleton({'a','b'})ip.poursingleton('ab'})# returns 'a'ip.pourhomogeneous(['a'])ip.pourhomogeneous({'a'})ip.pourhomogeneous('a')# also returns 'a'ip.pourhomogeneous(['a','a'])ip.pourhomogeneous('aaa')ip.pourhomogeneous('a'for__inrange(100))# returns Noneip.pourhomogeneous([])ip.pourhomogeneous(set())ip.pourhomogeneous('')# throwsip.pourhomogeneous(['a','b'])ip.pourhomogeneous({'a','b'})ip.pourhomogeneous('ab'})CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2020-07-06)First release on PyPI.
Package: iterprinter
IterationPrinter: A simple iteration history printerWhen using iterative numerical algorithms it is common
to print after each iteration a message so that a user
can monitor convergence and catch any bugs.
As an example,demo.pyimplements a simple bisection algorithm
for computing the square root of two.
The following is the output using this library:UsagefromiterprinterimportIterationPrinter# Initialize the printer by passing formatting information each columnprinter=IterationPrinter(it='4d',obj='16.6e')# Print a header for the tableprinter.print_header(it='iter',obj='objective')# Print a normal line of historyprinter.print_iter(it=0,obj=5e3)# If a particular field is not provided, the column is left emptyprinter.print_iter(it=1)For a more complete example, seedemo.py.
Package: iterproxy
⏩ Welcome toiterproxyDocumentationYou may seen the following code style in many ORM framework, this pattern provides a user friendly API to access items from the iterator object:query(...).one()query(...).one_or_none()query(...).many(3)query(...).all(5)query(...).skip(5).many(3)iterproxylibrary can give any iterable object similar capabilities.Usage ExampleConvert any iterable object to aIterProxyobject:fromiterproxyimportIterProxy# Suppose you have an iterable objectiterator=range(10)# Convert it to a IterProxy objectproxy=IterProxy(iterator)Access items from theIterProxyobject:proxy=IterProxy(range(10))proxy.one()# it will return 0proxy.many(3)# it will return [1, 2, 3]proxy.skip(2).many(2)# it will skip [4, 5] and return [6, 7]proxy.all()# it will return the rest [8, 9]proxy.one_or_none()# it will return NoneIterProxy.iter_chunkscan group items into chunks having K items, the last chunk may have less items than K:proxy=IterProxy(range(3))list(proxy.iter_chunks(2))# it will return [[0, 1], [2]]Another example:proxy=IterProxy(range(10))proxy.all()# it will return [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]Of course theIterProxyitself is a iterator:foriinIterProxy(range(10)):# 0, 1, 2, ......You can use custom filter function to filter the result. Other than the nesting style in built-infilterfunction, it use chain pattern.defis_odd(x):returnx%2==1defgte_5(x):returnx>=5# with IterProxy, you can chain them# it returns you [5, 7, 9]foriinIterProxy(range(10)).filter(is_odd).filter(gte_5):print(i)# or put them together, by default, it is logic andforiinIterProxy(range(10)).filter(is_odd,gte_5):print(i)# with the built-in filter, this is not that intuitiveforiinfilter(gte_5,filter(is_odd,range(10))):...You can also use compound logicand_,or_,not_:defis_odd(i):returni%2defis_even(i):returnnot(i%2)deflte_3(i):returni<=3defgte_4(i):returni>=4deflte_6(i):returni<=6defgte_7(i):returni>=7IterProxy(range(10)).filter(and_(gte_4,lte_6)).all()# [4, 5, 6]IterProxy(range(10)).filter(or_(lte_3,gte_7)).all()# [0, 1, 2, 3, 7, 8, 9]IterProxy(range(10)).filter(not_(is_odd)).all()# [0, 2, 4, 6, 8]# of course you can nest and_, or_, not_IterProxy(range(10)).filter(not_(and_(is_odd,or_(lte_3,gte_7)))).all()# [0, 2, 4, 5, 6, 8](Advanced) In order to enable type hint, you can do:fromiterproxyimportIterProxyclassDog:defbark(self):passclassDogIterProxy(IterProxy[Dog]):# subclass from IterProxy[${YourTypeHint}]passmany_dogs=[Dog(),]*10proxy=DogIterProxy(many_dogs)proxy.one_or_none().bark()fordoginproxy.many(2):dog.bark()fordoginproxy.skip(1).many(2):dog.bark()fordoginproxy.all():dog.bark()filtered_proxy=DogIterProxy(many_dogs).filter(lambdadog:True)filtered_proxy.one_or_none().bark()fordoginfiltered_proxy.many(2):dog.bark()fordoginfiltered_proxy.skip(1).many(2):dog.bark()fordoginfiltered_proxy.all():dog.bark()Installiterproxyis released on PyPI, so all you need is:$pipinstalliterproxyTo upgrade to latest version:$pipinstall--upgradeiterproxy
Package: iterpy
iterpyPython has implementedmap,filteretc. as functions, rather than methods on a sequence. This makes the result harder to read and iterators less used than they could be. iterpy exists to change that.You get this 🔥:fromiterpyimportIterresult=Iter([1,2,3]).map(multiply_by_2).filter(is_even)Instead of this:sequence=[1,2,3]multiplied=[multiply_by_2(x)forxinsequence]result=[xforxinmultipliedifis_even(x)]Or this:result=filter(is_even,map(multiply_by_2,[1,2,3]))InstallpipinstalliterpyUsagefromiterpyimportIterresult=(Iter([1,2]).filter(lambdax:x%2==0).map(lambdax:x*2).to_list())assertresult==[4]Prior artiterpy stands on the shoulders of Scala, Rust etc.Other Python projects have had similar ideas:PyFunctionalhas existed for 7+ years with a comprehensive feature set. It is performant, with built-in lineage and caching. Unfortunately, this makes typingnon-trivial, with a 4+ year ongoing effort to add types.flupyis highly similar, well typed, and mature. I had some issues with.flatten()not being type-hinted correctly, but but your mileage may vary.Your library here? Feel free to make an issue if you have a good alternative!ContributingConventionsPhilosophyMake it work: Concise syntax borrowed from Scala, Rust etc.Make it right: Fully typed, no exceptionsMake it fast:Concurrency through.pmap(Future): Caching(Future): Refactor operations to use generatorsKeep it simple: No dependenciesAPI designAs a heuristic, we follow the APIs of:Rust'sstd::iterRust'sitertoolsIn cases where this conflicts with typical python implementations, the API should be as predictable as possible for Python users.DevcontainerInstallOrbstackor Docker Desktop. Make sure to complete the full install process before continuing.If not installed, install VSCodePress thislinkComplete the setup processDone! Easy as that.💬 Where to ask questionsType🚨Bug ReportsGitHub Issue Tracker🎁Feature Requests & IdeasGitHub Issue Tracker👩‍💻Usage QuestionsGitHub Discussions🗯General DiscussionGitHub Discussions
Package: iters
itersComposable external iteration.If you have found yourself with acollectionof some kind, and needed to perform
an operation on the elements of said collection, you will quickly run intoiterators.
Iterators are heavily used in idiomatic Python code, so becoming familiar with them is essential.InstallingPython 3.8 or above is required.pipInstalling the library withpipis quite simple:$pipinstallitersAlternatively, the library can be installed from source:$gitclonehttps://github.com/nekitdev/iters.git$cditers$python-mpipinstall.poetryYou can additersas a dependency with the following command:$poetryadditersOr by directly specifying it in the configuration like so:[tool.poetry.dependencies]iters="^0.16.1"Alternatively, you can add it directly from the source:[tool.poetry.dependencies.iters]git="https://github.com/nekitdev/iters.git"ExamplesSimpleSquaring only even numbers in some sequence:fromitersimportiterdefis_even(value:int)->bool:returnnotvalue%2defsquare(value:int)->int:returnvalue*valuenumbers=[0,1,2,3,4,5,6,7,8,9]result=iter(numbers).filter(is_even).map(square).list()print(result)# [0, 4, 16, 36, 64]AsynchronousAsynchronous iteration is fully supported byiters, and its API is similar to its
synchronous counterpart.DocumentationYou can find the documentationhere.SupportIf you need support with the library, you can send anemailor refer to the officialDiscord server.ChangelogYou can find the changeloghere.Security PolicyYou can find the Security Policy ofitershere.ContributingIf you are interested in contributing toiters, make sure to take a look at theContributing Guide, as well as theCode of Conduct.Licenseitersis licensed under the MIT License terms. SeeLicensefor details.
Package: itershap
IterSHAP: Iterative feature selection using SHAP valuesAuthor: Frank van Mourik, University of TwenteInstallationInstall viapipusing:pip install itershap(requires Python version >=3.10,<3.11).UsagefromitershapimportIterSHAPX,y=get_data()# Replace with data locationfs=IterSHAP()# Create a IterSHAP feature selection objectfs.fit(X,y)# Execute IterSHAP on input dataX_transformed=fs.transform(X)# Only keep the via IterSHAP selected featuresBenefitsPerforms well on small high-dimensional datasetsGuarantees to return a feature subsetModel-agnostic (limited byshapsupported models)Validated on synthesised dataBenchmarked onDEAP datasetLicenseAvailable under the MIT license, which can be foundhere
Package: iterstring
Simple class that allows writing lists and dicts as heredoc stringsWrite lists as strings with one line per elementSame for dictionaries, but use first token on each line as keyFeaturesHandles comments (using # characters)Strips away extraneous whitespace with reasonable defaults (configurable)Coerce items to numbers where possible (see coerce)Iterating over the object treats it like a listIndexing the object treats it like a dictionarylistr and distr helper functions provide simple interfacesExamplesA simple use case:>>>fromiterstringimportlistr# or distr>>>some_list=listr('''
item one # with a comment
  2
three
''')>>>some_list['item one',2,'three']>>>type(some_list)<class'list'>Using the class directly:>>>fromiterstringimportIstr>>>asdf=Istr('''
item one # with a comment
  2
three
''')>>>asdf.to_list()['item one',2,'three']>>>type(asdf)<class'iterstring.Istr'>>>>[xforxinasdf]['item one',2,'three']>>>fdsa=Istr('''
item one # with a comment
  2 some other value
key3 3.14159
''')>>>asdf.to_dict(){'item':'one',2:'some other value','key3':3.14159}>>>asdf.to_dict(coerce=False){'item':'one','2':'some other value','key3':'3.14159'}LicenseFree software: MIT licenseDocumentationhttps://iterstring.readthedocs.io/CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.
Package: itertoolz
More useful tools for Python iterators.  A set of common utility functions.[![Build Status](https://travis-ci.org/mrocklin/itertoolz.png)](https://travis-ci.org/mrocklin/itertoolz)Relationship toitertoolsTheitertoolspackage (with ans) is a package in the standard library.  It differs fromitertoolz(with az) in the following ways.itertoolshas ans.itertoolzhas az.itertoolsis strictly a library of [streaming algorithms](http://en.wikipedia.org/wiki/Streaming_algorithm) whileitertoolzaccepts functions that require finite iterators.itertoolschanges very slowly and is managed by the official Python community (you submit aPEP).itertoolzis more loose (you submit a pull request)itertoolsis minimal.itertoolzaccepts recipes.Author[Matthew Rocklin](http://matthewrocklin.com)LICENSENew BSD.  See [License File](LICENSE.TXT).Installitertoolzis on the Python Package Index (PyPi)pip install itertoolzoreasy_install itertoolzor from source./setup.py installDependenciesitertoolzsupports Python 2.6+ and Python 3.2+ with a common codebase.It has no dependencies outside of the standard library.See Also[functoolz](http://github.com/mrocklin/functoolz)[classtoolz](http://github.com/mrocklin/classtoolz)
Package: itertypes
IterTypes LibraryThis library has some useful types and functions used to get types of iterables.
Whilst iterable types were purposely avoided by the types library, iterables offer
unique types which could sometimes be useful to obtain.Getting startedStart by importing the module:importitertypesThere are various functions which follow the naming conventionis[type]iterator.itertypes.isstringiterator(iter("string"))>>>Truedictionary={1:2,3:4}iteration=iter(dictionary.items())itertypes.isdictitemiterator(iteration)>>>TrueThere's also theitertypes.isiteratorfunction where it checks if the given
object is iterable or not.my_variable=5itertypes.isiterable(my_variable)>>>Falsemy_variable=['a','b','c','d']all([itertypes.isiterable(my_variable),itertypes.islistiterator(iter(my_variable))])>>>TrueFinally, there's various types which resolve to iterable types.
These types can be used with isinstance, or with the equality operator
and the type function.byte=bytearray()isinstance(iter(byte),itertypes.BytearrayIteratorType)>>>Trueiterable=iter({1:2,3:4}.values())isinstance(iterable,itertypes.DictValueIteratorType)>>>TrueInstallationInstall through pip.python-mpipinstallitertypes