package
stringlengths
1
122
pacakge-description
stringlengths
0
1.3M
ammonite
Ammonite: Geometry calculation cheatsheetUnit aware calculation of geometrical primitives' area, volumes, etc. It is base onpintfor a seamless unit management and easy conversion.This package is at an early stage of development, it currently only include3D:BoxCubeSphere2D:RectangleSquareCircleUsagefromammoniteimporturegfromammonite.Object3DimportSpheremy_sphere=Sphere(radius=3*ureg.meter)print(my_sphere.volume)# 113.09733552923254 meter ** 3print(my_sphere.area)# 113.09733552923255 meter ** 2ContributionsAny comments to report a bug, improve this package, make it follow best practices which I might not know of or improve its automation are welcome.
ammonyte
AmmonytePython package designed for conducting non-linear time series analysis of paleoclimate data. Recommended for usage in tandem withPyleoclim. Developed byAlexander Jameswith theUniversity of Southern California Climate Dynamics Lab Group. Currently under heavy construction.Much of Ammonyte's capability is enabled byPyRQA, a tool designed to conduct recurrence analysis in a massively parallel manner. Many of our functions are essentially wrappers around PyRQA functions, so we recommend looking into that package if you're curious about the bones of how recurrence analysis is done in Ammonyte.Install instructions:It's recommended you create a new environment using anaconda before installing.Inside your environment install cartopy with the commandconda install -c conda-forge cartopyRunpip install ammonyteThings to note:Current releases of Ammonyte are highly experimental. These are mainly done to facilitate our research, though others are welcome to use the functionality. Just be aware that the package is currently subject to constant change and will remain unstable for some time.Certain functionalities such as RecurrenceNetwork and the synthetic_series utilities are currently non-functional and are acting as placeholders for features that will be included in the future.This function has only been tested on macOS/Unix based operating systems, so if you encounter errors they may be system specific.Raising issues/feature requests is appreciated but there is no guarantee they'll be addressed hastily at this stage of the package's development as we are focused on building core features that are of use to our lab.
ammoo
No description available on PyPI.
ammp
Currently empty ... sorry :|
ammp-framework
Doc for Framework
amms_planop2xls
AMMS PlanOp2XLSImporter/konwerter plików PDF z planem operacyjnym z systemu Asseco Medical Management Solutions.AMMS-PlanOp2XLS to otwarte oprogramowanie: licencja MIT. Oznacza to, iż jest dostępne za darmo.Program w wersji binarnej stabilnej 0.7.3 można pobrać na dwa sposoby:format ZIP: wersja bez instalatora, nie wymaga uprawnień administratorado instalacji, powinna działać z pendrive USB (78.6 MB)format EXE: pełnoprawny instalator, wymaga uprawnień administratora (63.6 MB)Wersja 0.7.3 dostępna jest tutaj:https://github.com/mpasternak/amms-planop2xls/releases/tag/v0.7.3Możliwości programugenerowanie plików ODT (OpenOffice, LibreOffice) według zadanych templatek,importowanie danych z plików PDF z planem operacyjnym generowanym przez system AMMS.CreditsAutorem ikony programu jest Edward Boatman, którego to inne prace można pobrać ze stronyhttps://thenounproject.com/edward/collection/health-care-symbols/.Program jest niezależnym projektem firmy IPL i nie jest w żaden sposób związany lub wspierany przez firmę Asseco.This package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2017-05-02)First release on PyPI.
ammu-distributions
No description available on PyPI.
ammunition
Failed to fetch description. HTTP Status Code: 404
amncore
amncoreCore modules for use with the AmmuNation frameworkInstallationRun the following command:$ pip install amncore
amnes
Adaptive Meta-Framework for Network Experiment Studies (AMNES)AMNES is a highly modular tool that aims to simplify the execution of reproducible network experiments of all kinds. With its easy configurability, the possibility to develop comprehensive extensions and the connectivity to different storage backends, this framework helps you to spend less time on testbed configuration and more time on your network research.For Usage and Development Guide consultAMNES Documentation.
amnesia
Amnesia reloads modules on-the-fly as an aid for developmentof WSGI compliant applications. Amnesia is meant to be used like a standalone executable, running on the shell likeamnesia mymodule my_wsgi_appor as a WSGI Middleware as follows:>>> from wsgiref.simple_server import make_server >>> from amnesia import Amnesia >>> >>> my_reloading_app = Amnesia("mymodule", "wsgi_app") >>> >>> if __name__ == "__main__": >>> httpd = make_server("", 8080, my_reloading_app) >>> print("Running on localhost:8080...") >>> print("Modify your app and refresh your browser's page.") >>> httpd.serve_forever() >>>
amniotic
AmnioticA multi-output ambient sound mixer for Home Assistant.Amniotic lets you use a single device to create on-the-fly, custom ambient audio mixes - e.g. mixing Waterfall sounds with Birdsong on one set of speakers, while playing Fireplace sounds from a second audio device - to suit your tastes and environment.The library integrates with Home Assistant via MQTT as a new device, allowing you to create and control ambient mixes from the Home Assistant interface.Why Would I Want Such a Thing?I won't explain the general reasons for introducing non-musical sounds into one's environment, but if you findsound maskinghelps you concentrate in noisy environments, if you're (as I am) slightlymisophonic, if you usewhite noise machinesto induce sleep or relaxation, or if you just think sound is an important factor in setting a pleasant ambience, then you might find Amniotic useful.Can't I do This with Spotify, Volumio, HifiBerry etc.?Since those systems are intended for music, they aren't designed for playing or mixing multiple streams simultaneously with a single device, even if set up in multi-room configurations. Also, the streaming services often won't allow a single account to play multiple streams, evenifmultiple devices are used.Anyway, those limitations motivated this library.There are two ways to install and run Amniotic:On the Home Assistant machine itself, as an add-on.Install manually, on a separate machine.Home Assistant AddonTo add as an Addon, click here:DocumentationFor non-addon installs, and general documentation, seethe project wiki.
amnis
█████╗ ███╗ ███╗███╗ ██╗██╗███████╗ ██╔══██╗████╗ ████║████╗ ██║██║██╔════╝ ███████║██╔████╔██║██╔██╗ ██║██║███████╗ ██╔══██║██║╚██╔╝██║██║╚██╗██║██║╚════██║ ██║ ██║██║ ╚═╝ ██║██║ ╚████║██║███████║ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═══╝╚═╝╚══════╝ ---------------------------------------- Java like Streams Api for PythonStreams are lazy evaluated -- That is, evaluation starts only when a terminal operation is appliedInstallationpip install this repo. (Note: Incompatible with Python 2.x)pip3installamnis(or)pipinstallamnisUsage examplesallmatchCheck if all elements in the stream match a condition.This method returnsTrueif all elements in the stream satisfy the condition defined by the provided functionfn. If any element does not satisfy the condition,Falseis returned.fromamnisimportStreamresult=(Stream(["cat","fat","rat"]).allmatch(lambdax:"at"inx))# Trueresult=(Stream(["cat","dog","rat"]).allmatch(lambdax:"at"inx))# FalseanymatchCheck if any element in the stream matches a condition.This method returnsTrueif at least one element in the stream satisfies the condition defined by the provided functionfn. If no element satisfies the condition,Falseis returned.fromamnisimportStreamresult=(Stream(["cat","dog","rat"]).anymatch(lambdax:"at"inx))# Trueresult=(Stream(["cat","dog","rat"]).anymatch(lambdax:"z"inx))# FalsecatchHandle exceptions while iterating through the stream.This method returns a new Stream that applies the provided exception handler functionhandlerto handle exceptions of a specific typeerr_typewhile iterating through the stream. The handler can return a value to continue iteration, or raise a different exception to propagate it.# =======# Logging# =======fromamnisimportStreamimportloggingdefhandler(err):logging.error(err)result=(Stream(['a','b','c',10,'d']).map(lambdax:x.upper()).catch(handler).collect(list))# >>> ERROR:root:'int' object has no attribute 'upper'# result = ['A', 'B', 'C', None, 'D']# =======================# Multiple Error Handling# =======================fromamnisimportStreamimportloggingdefhandle_upper(err):logging.error(err)defhandle_index_out_of_bounds(err):logging.warning(err)result=(Stream(['ab','cd','e',10,'fg']).map(lambdax:x.upper()).catch(handle_upper).map(lambdax:x[1]).catch(handle_index_out_of_bounds).collect(list))# >>> WARNING:root:string index out of range# >>> ERROR:root:'int' object has no attribute 'upper'# result = ['B', 'D', 'G']# ===================# Replace Error Value# ===================fromamnisimportStreamdefsqrt(x):ifx<0:raiseValueError(x)returnx**0.5defhandler_neg_sqrt(err):(value,)=err.argsreturnvalue*1000result=(Stream([4,9,-3,16]).map(sqrt).catch(handler_neg_sqrt).collect(list))# [2.0, 3.0, -3000, 4.0]# =======================# Specific Error Handling# =======================deferr_fn(x):ifx=='a':raiseValueError(x)ifx=='b':raiseKeyError(x)returnxdefhandle_value_err(err):(value,)=err.argsreturnvalue*2defhandle_key_err(err):(value,)=err.argsreturnvalue*4result=(Stream(['e','a','g','d','b']).map(err_fn).catch(handle_value_err,ValueError).catch(handle_key_err,KeyError).collect(list))# ['e', 'aa', 'g', 'd', 'bbbb']collectCollect the elements in the stream into a collection.This method collects the elements in the stream and returns them as a collection, determined by the provided collector function. The default collector isiter, which returns an iterable containing the elements.fromamnisimportStreamresult=Stream([1,2,3]).collect(list)# [1, 2, 3]countCount the number of elements in the stream.This method returns the total number of elements in the stream.fromamnisimportStreamresult=Stream(['a','b','c']).count()# 3distinctRemove duplicate elements from the stream.This method returns a new Stream containing only the distinct elements from the original stream. Duplicate elements are eliminated, and only the first occurrence is retained.fromamnisimportStreamresult=(Stream([3,2,3,1,3,2,2]).distinct().collect(list))# [3, 2, 1]filterFilter elements in the stream based on a given condition.This method filters the elements in the stream, retaining only those that satisfy the provided condition defined by the functionfn.fromamnisimportStreamresult=(Stream([1,2,3]).filter(lambdax:x>1).collect(list))# [2, 3]findFind the first element that matches a condition in the stream.This method returns the first element from the stream that satisfies the condition defined by the provided functionfn. If no matching element is found,Noneis returned.fromamnisimportStreamresult=Stream([5,4,3,2,1]).find(lambdax:x%2==0)# 4firstGet the first element from the stream.This method returns the first element from the stream, orNoneif the stream is empty.fromamnisimportStreamresult=Stream([1,2,3]).first()# 1flatmapApply a function to each element and flatten the results into a single stream.This method applies the provided functionfnto each element in the stream and then flattens the resulting iterable of each function call into a single stream.flatmap is exactly the same as doing map and flattenfromamnisimportStreamresult=(Stream(["it's Sunny in","","California"]).flatmap(lambdas:s.split(" ")).collect(list))# ["it's", "Sunny", "in", "", "California"]flattenFlatten a stream of nested iterables into a single stream.This method flattens a stream that contains nested iterables, such as lists or tuples, into a single stream of individual elements.fromamnisimportStreamresult=(Stream([[1,2,3],[],[4,5]]).flatten().collect(list))# [1, 2, 3, 4, 5]foreachApply a function to each element in the stream.This method applies the provided functionfnto each element in the stream. The function can have side effects.fromamnisimportStreamStream([1,2,3]).foreach(lambdax:print(x))# >>> 1# >>> 2# >>> 3groupGroup elements in the stream based on keys and values.This method groups elements in the stream based on keys and values determined by the provided key and value functions. The grouping logic is defined by the provided grouper object, which specifies how values are combined for each key.Parameters:key_fn: A function that takes an element of typeTand returns a key of typeUto group the elements by.val_fn: A function that takes an element of typeTand returns a value of typeVassociated with the element.grouper: A Grouper object that specifies how values are combined for each key. The Grouper should havecollectionandgrouper_fnattributes.Returns: dict: A dictionary where keys are the result of the key function and values are the results of applying the grouper function to the associated values.fromamnisimportStream,Grouperresult=(Stream(["apple","banana","cherry"]).group(key_fn=lambdaword:len(word),val_fn=lambdaword:word.upper(),grouper=Grouper(list,grouper_fn=lambdal,item:l.append(item))))# {5: ['APPLE'], 6: ['BANANA', 'CHERRY']}classPerson:def__init__(self,name,age):self.name,self.age=name,agepeople=[Person("jack",20),Person("jack",30),Person("jill",25),Person("jack",40)]result=(Stream(people).group(key_fn=lambdap:p.name,val_fn=lambdap:p.age,grouper=Grouper(list,grouper_fn=lambdal,item:l.append(item))))# {# "jack": [20, 30, 40],# "jill": [25]# }result=(Stream(people).group(key_fn=lambdap:p.name,val_fn=lambdap:p.age,grouper=Grouper(str,grouper_fn=lambdas,item:f"{s}--{item}"ifselsef"{item}")))# {# "jack": "20--30--40",# "jill": "25"# }inspectApply a function to each element in the stream while preserving the stream's contents.This method returns a new Stream that applies the provided functionfnto each element in the original stream. The function is called for every element, and it can have side effects. The original elements remain unchanged, and the new Stream still contains the same elements.fromamnisimportStreamresult=(Stream([1,2,3]).inspect(lambdax:print(f"before map :{x}")).map(lambdax:x*3).inspect(lambdax:print(f"after map :{x}")).collect(list))# >>> before map : 1# >>> after map : 3# >>> before map : 2# >>> after map : 6# >>> before map : 3# >>> after map : 9# result = [3, 6, 9]lastGet the last element from the stream.This method returns the last element from the stream, orNoneif the stream is empty.fromamnisimportStreamresult=Stream([1,2,3]).last()# 3limitLimit the number of elements in the stream.This method returns a new Stream containing, at most, the firstnelements from the original stream. Ifnis greater than the total number of elements, all elements from the original stream will be included.fromamnisimportStreamresult=(Stream(range(100)).limit(10).collect(list))# [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]mapApply a function to each element in the stream.This method applies the provided functionfnto each element in the stream and returns a new Stream containing the transformed values.fromamnisimportStreamresult=(Stream([1,2,3]).map(lambdax:x*2).collect(list))# [2, 4, 6]maxFind the maximum element in the stream.This method returns the maximum element from the stream, based on the natural ordering of the elements or a custom sorting key defined by thekeyparameter.fromamnisimportStreamresult=Stream(["a","bbbbb","cc"]).max()# "cc"result=Stream(["a","bbbbb","cc"]).max(lambdax:len(x))# "bbbbb"minFind the minimum element in the stream.This method returns the minimum element from the stream, based on the natural ordering of the elements or a custom sorting key defined by thekeyparameter.fromamnisimportStreamresult=Stream(["cc","aaaaa","b"]).min()# "aaaaa"result=Stream(["cc","aaaaa","b"]).min(lambdax:len(x))# "b"nomatchCheck if no elements in the stream match a condition.This method returnsTrueif none of the elements in the stream satisfy the condition defined by the provided functionfn. If any element satisfies the condition,Falseis returned.fromamnisimportStreamresult=(Stream([3,5,7]).nomatch(lambdax:x%2==0))# Trueresult=(Stream([3,4,7]).nomatch(lambdax:x%2==0))# FalsenthGet the element at the nth position in the stream.This method returns the element at the specified positionnin the stream. If the position is out of bounds,Noneis returned. The position index is zero-based. Negative indexes are not supported.fromamnisimportStreamresult=Stream([1,2,3]).nth(1)# 2par_mapParallel version of themapmethod for CPU-bound operations. The results may not be in the same order as the original stream due to the parallel execution.IMPORTANT: Lambda functions are not allowed asfnsince they are not easily serializable for parallel execution. Define your mapping function as a regular named function.See the documentation for themapmethod for more details.fromamnisimportStreamdeftimes2(x):returnx*2result=(Stream([1,2,3]).par_map(times2).collect(list))# [2, 4, 6]reduceReduce the elements in the stream to a single value.This method applies the provided binary functionfncumulatively to the elements of the stream, from left to right, and returns a single accumulated result. An initial value can be provided to start the accumulation; otherwise, the first element of the stream is used as the initial value.fromamnisimportStreamresult=(Stream([1,2,3]).reduce(lambdax,y:x+y))# 6importoperatorresult=(Stream([1,2,3]).reduce(operator.add,initial=20))# 26skipSkip the firstnelements in the stream.This method returns a new Stream containing the elements from the original stream after skipping the firstnelements. Ifnis greater than the total number of elements, an empty stream will be returned.Stream([1, 2, 3]).skip(2)fromamnisimportStreamresult=(Stream([1,2,3]).skip(2).collect(list))# [3]skipwhileCreate a new stream by skipping elements while a condition is met.This method returns a new Stream that starts including elements from the original stream as soon as the provided condition defined by the functionfnevaluates to False. Elements before the first one that does not satisfy the condition are skipped.fromamnisimportStreamresult=(Stream([1,2,2,3,5,3,2,3,5]).skipwhile(lambdax:x<3).collect(list))# [3, 5, 3, 2, 3, 5]sortedSort the elements in the stream.This method returns a new Stream containing the elements from the original stream, sorted in ascending order by default. A custom sorting key can be provided using thekeyparameter.WARNING: Sorting is an eager operation and requires all elements to be loaded into memory.fromamnisimportStreamresult=(Stream([5,4,3,2,1]).sorted().collect(list))# [1, 2, 3, 4, 5]result=(Stream([(1,4),(2,3),(3,2),(4,1)]).sorted(key=lambdap:p[1]).collect(list))# [(4, 1), (3, 2), (2, 3), (1, 4)]takewhileCreate a new stream with elements while a condition is met.This method returns a new Stream that includes elements from the original stream as long as the provided condition defined by the functionfnevaluates to True. Once an element is encountered that does not satisfy the condition, the new stream stops including further elements.fromamnisimportStreamresult=(Stream([1,2,2,4,5,3,2,3,5]).takewhile(lambdax:x<5).collect(list))# [1, 2, 2, 4]windowCreate a sliding window over the stream.This method returns a new Stream where each element is a tuple containing the elements of the original stream that form a sliding window of the specified sizewindow_size. The elements within each window are ordered as they appear in the stream.fromamnisimportStreamresult=(Stream([1,2,3,4,5]).window(3).collect(list))# [# (1, 2, 3),# (2, 3, 4),# (3, 4, 5),# ]result=(Stream([1,2,3,4,5]).window(3).map(lambdaw:w[0]+w[1]+w[2]).collect(list))# [6, 9, 12]Development setupClone this repo and install packages listed in requirements.txtpip3install-rrequirements.txtMetaM. Zahash [email protected] under the MIT license. SeeLICENSEfor more information.https://github.com/zahash/ContributingFork it (https://github.com/zahash/amnis/fork)Create your feature branch (git checkout -b feature/fooBar)Commit your changes (git commit -am 'Add some fooBar')Push to the branch (git push origin feature/fooBar)Create a new Pull Request
amnparse
amnparseParser libraries used by the AmmuNation framework
amntftp
No description available on PyPI.
am-num2word
Amharic Number to WordConverters Numbers from decimal representation to Amharic language word representation. The package supports numbers up-to 999,999,999,999,999. These are the numbers that could often comeup in real world.UsageThis package provides one class(am_num2word.Number2WordsConverter) to handle number to words conversion.importam_num2wordnumber=45232945075converter=am_num2word.Number2WordsConverter()words,coma_separated=converter.convert(number)print(words)# አርባ አምስት ቢሊዮን ሁለት መቶ ሰላሳ ሁለት ሚሊዮን ዘጠኝ መቶ አርባ አምስት ሺህ ሰባ አምስትprint(coma_separated)# 45,232,945,075'How to installpip install am-num2wordLincenseMIT LicenseCopyright (c) 2019 Mitiku YohannesPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
am-num-2-word-converter
Failed to fetch description. HTTP Status Code: 404
amo2kinto
amo2kintokinto2xml: Export the blocklist in the legacy XML formatblockpages-generator: Generate the blocklist documentation pages.InstallationTo install the release:pip install amo2kintoTo install the development environment:make installSystem dependenciesIn order to buildamo2kintodependencies you may need the following libraries:Buildinglxmlwill require:libxml2-devlibxslt-devpython-devOtherwise you will run into errors like:libxml/xmlversion.h: File not foundGenerate a blocklist.xml file from Kinto collectionsIf you want to export blocklists stored in Kinto in the addons server XML export format, you can use thekinto2xmlscript:kinto2xml -s http://localhost:8888/v1kinto2xmlgives you the ability to configure what you want to export and in which bucket and collection are the data stored.usage: kinto2xml [-h] [-s SERVER] [-a AUTH] [-v] [-q] [-D] [--certificates-bucket CERTIFICATES_BUCKET] [--certificates-collection CERTIFICATES_COLLECTION] [--gfx-bucket GFX_BUCKET] [--gfx-collection GFX_COLLECTION] [--addons-bucket ADDONS_BUCKET] [--addons-collection ADDONS_COLLECTION] [--plugins-bucket PLUGINS_BUCKET] [--plugins-collection PLUGINS_COLLECTION] [--api-version API_VERSION] [--app APP] [--app-version APP_VERSION] [-o OUT] Build a blocklists.xml file from Kinto blocklists. optional arguments: -h, --help show this help message and exit -s SERVER, --server SERVER The location of the remote server (with prefix) -a AUTH, --auth AUTH BasicAuth token:my-secret -v, --verbose Show all messages. -q, --quiet Show only critical errors. -D, --debug Show all messages, including debug messages. --certificates-bucket CERTIFICATES_BUCKET Bucket name for certificates --certificates-collection CERTIFICATES_COLLECTION Collection name for certificates --gfx-bucket GFX_BUCKET Bucket name for gfx --gfx-collection GFX_COLLECTION Collection name for gfx --addons-bucket ADDONS_BUCKET Bucket name for addons --addons-collection ADDONS_COLLECTION Collection name for addon --plugins-bucket PLUGINS_BUCKET Bucket name for plugins --plugins-collection PLUGINS_COLLECTION Collection name for plugin --api-version API_VERSION Targeted blocklists.xml APP id --app APP Targeted blocklists.xml APP id --app-version APP_VERSION The targetted app version -o OUT, --out OUT Output XML file.Generate blocked addons and plugins description pagesYou might want to export the human readable list and description of add-ons and plugins that were blocked.You can do that using theblockpages-generatorcli tool:usage: blockpages-generator [-h] [-s SERVER] [-a AUTH] [-b BUCKET] [-v] [-q] [-D] [--addons-collection ADDONS_COLLECTION] [--plugins-collection PLUGINS_COLLECTION] [-d TARGET_DIR] Generate blocked item description files. optional arguments: -h, --help show this help message and exit -s SERVER, --server SERVER The location of the remote server (with prefix) -a AUTH, --auth AUTH BasicAuth token:my-secret -b BUCKET, --bucket BUCKET Bucket name. -v, --verbose Show all messages. -q, --quiet Show only critical errors. -D, --debug Show all messages, including debug messages. --addons-collection ADDONS_COLLECTION Collection name for addon --plugins-collection PLUGINS_COLLECTION Collection name for plugin -d TARGET_DIR, --target-dir TARGET_DIR Destination directory to write files in.It will generate anindex.htmlfile with the list of records present in theaddonsandpluginscollections in thetarget-dirdirectory.It will also generate a file peradd-onandpluginusing theblockIDor theid. e.gi487.htmlor08db5018-2c80-4c4d-aa98-dafe6aacc28c.htmlCHANGELOGThis document describes changes between each past release.4.0.2 (2020-05-18)Bug fixFix crash whenprefsfield is missing from addons entry4.0.1 (2018-07-04)Bug fixFix the XML item ID when squashing entries by addon ID4.0.0 (2018-07-04)Bug fixFix the affected users section (#87), thanks @rctgamer3!Breaking changesRemoved code in charge of updating the collection schema (#85)3.2.1 (2018-02-28)Fix bug with Python 3 and writing files (#80).3.2.0 (2018-02-06)Filter add-ons and plugins in v3 based on the requesting application and version. (#74)Stop exporting cert items to Firefox 58 and above, where they aren’t used. (#75)3.1.0 (2017-10-03)Add support for cert items subject and pubKeyHash attributes. (#70)3.0.0 (2017-09-14)Remove json2kinto importerRemove xml verifier2.0.1 (2017-06-02)Bug fixFix synchronize kinto-http parameters. (#67)2.0.0 (2017-06-02)Breaking changesUpgrade to kinto-http.py 8.0 and drop support for Python < 3.51.7.2 (2017-02-20)Fix XML exporter on missing blockID. (#63)1.7.1 (2016-11-24)Bug fixAllow the importer to work even without the permission to create collections. (#56)UsePUTinstead ofPATCHto fully overwrite the destination with the source (#58)1.7.0 (2016-11-21)New featuresRetry downloading the XML in case it fails the first time. (#50)Bug fixRemove redundant footer when generating pages. (#51)Allow the importer to work even without the permission to create buckets. (#53)Internal changesImprove the way the Makefile works (#52)1.6.0 (2016-10-04)New featuresAdd a configurable signoff workflow to-review → to-sign (#48)1.5.1 (2016-09-08)Bug fixsession_kwargs is not accessible anymore with last kinto-http client release. (#45)1.5.0 (2016-08-25)Add theblockpages-generatorCLI tool (#43)1.4.1 (2016-08-02)Fix blockID ordering to make it the same as the addons-server.1.4.0 (2016-07-18)New featuresAdd version ranges for GFX items (#39) —Bug 12836011.3.1 (2016-07-06)Bug fixFix patch_records properties.1.3.0 (2016-07-06)Update records that were changed (#37)1.2.1 (2016-05-26)Bug fixkinto_client.delete_records API changed. (#35)1.2.0 (2016-05-26)New featuresLet people specify--app-versionand--api-versionwhile using kinto2xml (#33)Add functional tests for both version of the XML file format. (#33)Configure the kinto-admin as well as the JSONSchema (#32)Bug fixGroup addons by the biggest guid (#33)1.1.0 (2016-05-18)Bug fixIn case there is a diff using xml-verifier, the command now returns an error code (#28)Internal changesjson2kintodoes not set destination collections as publicly readable (#27)1.0.0 (2016-05-12)Breaking changeskinto2xml was renamed amo2kinto (#21)New JSON Schema file format with a “collection” prefix (#22)New featuresUse the schema to validate AMO records in the importer script. (#5)Warn if the server does not have the schema capability (#24)Internal changesDocument amo2kinto commands: json2kinto, kinto2xml and verifier. (#23)0.1.0 (2016-04-27)Initial versionCreate collection with the definition of the JSON schema.Fetch AMO blocklists information from the /blocked/blocklists.json AMO endpoint.Handle import configuration on the CLI. - Bucket / Collection names - Remote AMO endpoint configuration - Schema file path configuration - Schema or not schema - Verbosity level - Server selection - Auth credentials - Importation type selectionSupport for kinto-signer triggeringFull SSL support for Python 2.7Full Python 2.7 and Python 3.4/3.5 supportHandle the enabled flag to activate recordsMakefile rule to update the schema definitionExport kinto blocklists in XML blocklist file version 2Export kinto blocklists in XML blocklist file version 3XML verifier that create a diff of two XML files
amoapi
a description will be here
amocrm
amocrm is a package for RESTful communication with AmoCRMInstallationpip install amocrm
amocrm-api
Python AmoCRM API v2 (http://www.amocrm.ru/) (human interface for easy using)Installationpip install amocrm_apiUsageАвторизацияАвторизация - с Июня 2020 amoCRM форсировала смену авторизации с токена на OAuthИ без поддержки server to server взаимодействия, в связи с чем текущая реализация содержит следующие ограниченияВ личном кабинете необходимо создать интеграциюРефреш токен одноразовый и обновляется при каждом получении аксесс токенаEcли запросы в amoCRM происходят реже чем время жизни рефреш токена то вам не подойдет такой варант интеграцииТокены нужно хранить, для этого есть api и существует 3 типа хранилища (можно реализовать свой):MemoryTokensStorage - хранит токены в памяти (если вы перезапускаете приложение то придется снова создавать refresh_token)FileStorage - сохраняет токены в файлеRedisTokensStorage - сохраняет токены в редисе (pip install redis) для new-age приложений которые работают в нескольких экземплярахExample:from amocrm.v2 import tokens tokens.default_token_manager( client_id="xxx-xxx-xxxx-xxxx-xxxxxxx", client_secret="xxxx", subdomain="subdomain", redirect_url="https://xxxx/xx", storage=tokens.FileTokensStorage(), # by default FileTokensStorage ) tokens.default_token_manager.init(code="..very long code...", skip_error=True)Контакт - ContactКомпания - CompanyТеги - TagsСделка - LeadЗадача - TaskПримечание - NoteСобытие - EventВоронки и Статусы - Pipeline, StatusРабота с сущностямиУ каждой сущности есть менеджер (аттрибут objects), который имеет следующие методы<Entity>.objects.get(object_id=1, query="test") # получение обьекта <Entity>.objects.all() # получение всех сущностей <Entity>.objects.filter(**kwargs) # получение списка сущностей с фильтром <Entity>.objects.create(**kwargs) # создание сущности (нет явной сигнатуры поэтому лучше использовать метод create самой сущности) <Entity>.objects.update(**kwargs) # обносление сущности (нет явной сигнатуры поэтому лучше использовать метод update самой сущности)В свою очередь сама сущность имеет несколько методов для более простого создания и обновления<EntityInstance>.create() <EntityInstance>.update() <EntityInstance>.save() # создаст или обновит в зависимости от того как обьект был инициализированИсключение - создание звонка происходит через упрошенную сущностьfrom amocrm.v2 import Call, CallDirection, CallStatus Call().create(CallDirection.OUTBOUNT, phone="....", source="", duration=timedelta(minutes=10), status=CallStatus.CALL_LATER, created_by=manager)Рассмотрим полный процесс работы на примере контактаfrom amocrm.v2 import Contact, Company contact = Contact.objects.get(query="Тест") print(contact.first_name) print(contact.company.name) print(contact.created_at) contact.last_name = "Новое" contact.tags.append("new") contact.notes.objects.create(text="Примечание") contact.save() contact.company = Company(name="Amocrm") # создаст и сразу прилинкует компанию print(contact.company.id) len(list(contact.customers)) # lazy list contact.customers.append(Customer(name="Volta"))Кастомные поляОдна из удобных возможностей amoCRM - кастомные поляExample:from amocrm.v2 import Lead as _Lead, custom_field class Lead(_Lead): utm = custom_field.UrlCustomField("UTM метка") delivery_type = custom_field.SelectCustomField("Способ доставки") address = custom_field.TextCustomField("Адрес")Однако мапинг всех кастомных полей дело утоминетльное, поэтому для генерации файла с готовым мапингом есть команда:export AMOCRM_CLIENT_ID=xxx export AMOCRM_SECRET=xxx export AMOCRM_SUBDOMAIN=xxx export AMOCRM_REDIRECT_URL=xxx export AMOCRM_CODE=xxx # optional pyamogen > models.pyДля ее работы необходимо установить пакет python-slugify (https://github.com/un33k/python-slugify)
amocrm-api-wrapper
wrapper for amocrm rest apiInstallInstall usingpip...pip install amocrm-api-wrapperUsage=======fromamocrm_apiimportAmoLegacyClient# for login password authfromamocrm_apiimportAmoOAuthClient# for oauthfromdatetimeimportdatetimeclient=AmoLegacyClient('<login>','<password>','<crm_url>')client=AmoOAuthClient('<access_token>','<refresh_token>','<crm_url>','<client_id>','<client_secret>','<redirect_uri>')dt=datetime.datetime.today().strftime("%a,%d%b %Y %H-%m-%d")date_time=f"{dt}UTC"# for Legacy clientheaders={"IF-MODIFIED-SINCE":f"{date_time}","Content-Type":"application/json",}client.update_session_params(headers)get account infodoc -https://www.amocrm.ru/developers/content/crm_platform/account-infoparams:nametypedefault valuewith_amojo_idboolFalsewith_amojo_rightsboolFalsewith_users_groupsboolFalsewith_task_typesboolFalsewith_versionboolFalsewith_ventity_namesboolFalsewith_datetime_settingsboolFalseaccount_info=client.get_account_info()create leadsdoc -https://www.amocrm.ru/developers/content/crm_platform/leads-api#leads-addparams:nametypedefault valueobjectslist-objects=[{"name":"Сделка для примера 1","created_by":0,"price":20000,"custom_fields_values":[{"field_id":294471,"values":[{"value":"Наш первый клиент"}]}]},{"name":"Сделка для примера 2","price":10000,"_embedded":{"tags":[{"id":2719}]}}]result=client.create_leads(objects)update leadsdoc -https://www.amocrm.ru/developers/content/crm_platform/leads-api#leads-editparams:nametypedefault valueobjectslist-objects=[{"id":54886,"pipeline_id":47521,"status_id":143,"date_close":1589297221,"loss_reason_id":7323,"updated_by":0},{"id":54884,"price":50000,"pipeline_id":47521,"status_id":525743,"_embedded":{"tags":None}}]result=client.update_leads(objects)get leaddoc -https://www.amocrm.ru/developers/content/crm_platform/leads-api#lead-detailparams:nametypedefault valuelead_idint-lead=client.get_lead(123)get leadsdoc -https://www.amocrm.ru/developers/content/crm_platform/leads-api#leads-listparams:nametypedefault valuelimitint250pageint1with_paramsOptional[list]NonefiltersOptional[dict]NoneorderOptional[dict]Noneleads=client.get_leads(limit=10,page=3,filters={'updated_at__from':'<timestamp>','updated_at__to':'<timestamp>'})# for any timestamp fields like created_at, updated_at, closed_at u need to user __ like created_at__from, created_at__toget unsorted leadsdoc -https://www.amocrm.ru/developers/content/crm_platform/unsorted-api#unsorted-listparams:nametypedefault valuelimitint250pageint1filter_by_uidsUnion[str, list, None]Nonefilter_by_pipeline_idUnion[str, list, None]Nonefilter_by_categoryUnion[str, list, None]Noneorder_byOptional[dict]Noneunsorted_leads=client.get_unsorted_leads(limit=10,page=3,filter_by_pipeline_id=[1,2310,8751035])get unsorted lead by uiddoc -https://www.amocrm.ru/developers/content/crm_platform/unsorted-api#unsorted-detailparams:nametypedefault valueuidstr-unsorted_lead=client.get_unsorted_by_uid('ufsigkgdjlk13igmd')create unsorted lead by sipdoc -https://www.amocrm.ru/developers/content/crm_platform/unsorted-api#unsorted-add-sipparams:nametypedefault valuesource_uidstr-source_namestr-metadatadict-conctactdict-leaddict-comapanydict-pipeline_idOptional[int]Nonecreated_atOptional[int]Nonerequest_idOptional[int]Noneunsorted_lead={"request_id":"123","source_name":"ОАО Коспромсервис","source_uid":"a1fee7c0fc436088e64ba2e8822ba2b3","pipeline_id":2194576,"created_at":1510261200,"leads":{"name":"Тех обслуживание","price":5000,"custom_fields_values":[{"field_id":284785,"values":[{"value":"Кастомное поле"}]}],"_embedded":{"tags":[{"id":263809}]}}],"contacts":{"name":"Контакт для примера"}"companies":{"name":"ОАО Коспромсервис"}},"metadata":{"is_call_event_needed":True,"uniq":"a1fe231cc88e64ba2e8822ba2b3ewrw","duration":54,"service_code":"CkAvbEwPam6sad","link":"https://example.com","phone":79998888888,"called_at":1510261200,"from":"onlinePBX"}}result=client.create_unsorted_by_sip(**unsorted_lead)create unsorted lead by formdoc -https://www.amocrm.ru/developers/content/crm_platform/unsorted-api#unsorted-add-formparams:nametypedefault valuesource_uidstr-source_namestr-metadatadict-conctactdict-leaddict-comapanydict-pipeline_idOptional[int]Nonecreated_atOptional[int]Nonerequest_idOptional[int]Noneunsorted_lead={"request_id":"123","source_name":"ОАО Коспромсервис","source_uid":"a1fee7c0fc436088e64ba2e8822ba2b3","pipeline_id":2194576,"created_at":1590830520,"leads":{"name":"Тех обслуживание","visitor_uid":"5692210d-58d0-468c-acb2-dce7f93eef87","price":5000,"custom_fields_values":[{"field_id":284785,"values":[{"value":"Дополнительное поле"}]}],"_embedded":{"tags":[{"name":"Тег для примера"}]}},"contacts":{"name":234,"first_name":"123213","last_name":234,"custom_fields_values":[{"field_code":"PHONE","values":[{"value":"+7912321323"}]}]},"companies":{"name":"ОАО Коспромсервис"},"metadata":{"ip":"123.222.2.22","form_id":"a1fee7c0fc436088e64ba2e8822ba2b3ewrw","form_sent_at":1590830520,"form_name":"Форма заявки для полёта в космос","form_page":"https://example.com","referer":"https://www.google.com/search?&q=elon+musk"}}result=client.create_unsorted_by_form(**unsorted_lead)accept unsorted leaddoc -https://www.amocrm.ru/developers/content/crm_platform/unsorted-api#unsorted-acceptparams:nametypedefault valueuidstr-user_idint-status_idint-result=client.accept_unsorted('jkjsoijg2321kgkdu2',2310,4444)decline unsorted leaddoc -https://www.amocrm.ru/developers/content/crm_platform/unsorted-api#unsorted-declineparams:nametypedefault valueuidstr-user_idint-result=client.decline_unsorted('jkjsoijg2321kgkdu2',2310,)link unsorted lead ot another leaddoc -https://www.amocrm.ru/developers/content/crm_platform/unsorted-api#unsorted-linkparams:nametypedefault valueuidstr-user_idint-linkdict-result=client.link_unsorted('jkjsoijg2321kgkdu2',2310,link={"entity_id":93144801,"entity_type":"leads"})get summary unsorted leadsdoc -https://www.amocrm.ru/developers/content/crm_platform/unsorted-api#unsorted-summaryparams:nametypedefault valueuidUnion[str, list, None]Nonecreated_at__fromOptional[str]Nonecreated_at__toOptional[str]Nonepipeline_idUnion[str, list, None]Nonesummary_unsorted=client.get_summary_unsorted()get pipelinesdoc -https://www.amocrm.ru/developers/content/crm_platform/leads_pipelines#pipelines-listpipelines=client.get_pipelines()craete pipelinedoc -https://www.amocrm.ru/developers/content/crm_platform/leads_pipelines#pipelines-addparams:nametypedefault valuenamestr-sortint-is_mainbool-statuseslist-is_unsorted_onboolFalserequest_idOptional[str]Nonepipeline={"name":"Воронка доп продаж","is_main":False,"is_unsorted_on":True,"sort":20,"request_id":"123","statuses":[{"id":142,"name":"Мое название для успешных сделок"},{"name":"Первичный контакт","sort":10,"color":"#fffeb2"}]}result=client.create_pipeline(**pipeline)edit pipelinedoc -https://www.amocrm.ru/developers/content/crm_platform/leads_pipelines#pipelines-addparams:nametypedefault valuepipeline_idint-namestr-sortint-is_mainbool-is_unsorted_onboolFalsepipeline={"pipeline_id":2310,"name":"Новое название для воронки","is_main":False,"is_unsorted_on":False,"sort":100}result=client.edit_pipeline(**pipeline)delete pipelinedoc -https://www.amocrm.ru/developers/content/crm_platform/leads_pipelines#pipeline-deleteparams:nametypedefault valuepipeline_idint-result=client.delete_pipeline(2310)get statuses by pipelinedoc -https://www.amocrm.ru/developers/content/crm_platform/leads_pipelines#statuses-listparams:nametypedefault valuepipeline_idint-pipeline_statuses=client.get_pipeline_statuses(2310)get pipeline statusdoc -https://www.amocrm.ru/developers/content/crm_platform/leads_pipelines#status-detailparams:nametypedefault valuepipeline_idint-status_idint-pipeline_status=client.get_pipeline_status(2310,123)add statuses to pipelinedoc -https://www.amocrm.ru/developers/content/crm_platform/leads_pipelines#statuses-addparams:nametypedefault valuepipeline_idint-statuseslist-statuses=[{"name":"Новый этап","sort":100,"color":"#fffeb2"},{"name":"Новый этап 2","sort":200,"color":"#fffeb2"}]result=client.add_statuses_to_pipeline(2310,statuses)edit pipeline statusdoc -https://www.amocrm.ru/developers/content/crm_platform/leads_pipelines#statuses-addparams:nametypedefault valuepipeline_idint-status_idint-namestr-sortint-colorstr-result=client.edit_pipeline_status(2310,123,'Новый Этап',sort=500,color="#fffeb2")delete status from pipelinedoc -https://www.amocrm.ru/developers/content/crm_platform/leads_pipelines#status-deleteparams:nametypedefault valuepipeline_idint-status_idint-result=client.delete_status_from_pipeline(2310,123)get contactsdoc -https://www.amocrm.ru/developers/content/crm_platform/contacts-api#contacts-listparams:nametypedefault valuelimitint250pageint1with_paramsOptional[list]NonefiltersOptional[dict]NoneorderOptional[dict]Nonecontacts=client.get_contacts(limit=10,page=3,filters={'updated_at__from':'<timestamp>','updated_at__to':'<timestamp>'})# for any timestamp fields like created_at, updated_at, closed_at u need to user __ like created_at__from, created_at__toget contactdoc -https://www.amocrm.ru/developers/content/crm_platform/contacts-api#contact-detailparams:nametypedefault valuecontact_idint-contact=client.get_contact(123989)create contactsdoc -https://www.amocrm.ru/developers/content/crm_platform/contacts-api#contacts-addparams:nametypedefault valuecontactslist-conctacts=[{"first_name":"Петр","last_name":"Смирнов","custom_fields_values":[{"field_id":271316,"values":[{"value":"Директор"}]}]},{"name":"Владимир Смирнов","created_by":47272}]result=client.create_contacts(contacts)update contactsdoc -https://www.amocrm.ru/developers/content/crm_platform/contacts-api#contacts-editparams:nametypedefault valuecontactslist-conctacts=[{"id":3,"first_name":"Иван","last_name":"Иванов","custom_fields_values":[{"field_id":66192,"field_name":"Телефон","values":[{"value":"79999999999","enum_code":"WORK"}]}]}]result=client.update_contacts(contacts)get companiesdoc -https://www.amocrm.ru/developers/content/crm_platform/companies-api#companies-listparams:nametypedefault valuelimitint250pageint1with_paramsOptional[list]NonefiltersOptional[dict]NoneorderOptional[dict]Nonecompanies=client.get_companies(limit=10,page=3,filters={'updated_at__from':'<timestamp>','updated_at__to':'<timestamp>'})# for any timestamp fields like created_at, updated_at, closed_at u need to user __ like created_at__from, created_at__toget companydoc -https://www.amocrm.ru/developers/content/crm_platform/companies-api#company-detailparams:nametypedefault valuecompany_idint-company=client.get_company(9988)create companiesdoc -https://www.amocrm.ru/developers/content/crm_platform/companies-api#companies-addparams:nametypedefault valuecompanieslist-companies=[{"name":"АО Рога и Копыта","custom_fields_values":[{"field_code":"PHONE","values":[{"value":"+7912322222","enum_code":"WORK"}]}]}]result=client.create_companies(companies)update companiesdoc -https://www.amocrm.ru/developers/content/crm_platform/companies-api#companies-editparams:nametypedefault valuecompanieslist-companies=[{"id":11090825,"name":"Новое название компании","custom_fields_values":[{"field_code":"EMAIL","values":[{"value":"[email protected]","enum_code":"WORK"}]}]}]result=client.update_companies(companies)get catalogsdoc -https://www.amocrm.ru/developers/content/crm_platform/catalogs-api#lists-listparams:nametypedefault valuepageint1limitint250catalogs=client.get_catalogs(page=1,limit=5)get catalogdoc -https://www.amocrm.ru/developers/content/crm_platform/catalogs-api#list-detailparams:nametypedefault valuecatalog_idint1catalog=client.get_catalog(12319)create catalogsdoc -https://www.amocrm.ru/developers/content/crm_platform/catalogs-api#lists-addparams:nametypedefault valuecatalogslist-catalogs=[{"name":"Тестовый список","can_add_elements":True,"can_link_multiple":False,"request_id":"123"}]}]result=client.create_catalogs(catalogs)update catalogsdoc -https://www.amocrm.ru/developers/content/crm_platform/catalogs-api#lists-editparams:nametypedefault valuecatalogslist-catalogs=[{"id":5787,"name":"Новое имя списка","can_add_elements":True,"can_link_multiple":False}]result=client.update_catalogs(catalogs)get elements from catalogdoc -https://www.amocrm.ru/developers/content/crm_platform/catalogs-api#list-elements-listparams:nametypedefault valuecatalogs_idint-pageint1limitint250filtersOptional[dict]Noneelements=client.get_catalog_elements(5787,page=3,limit=8)get element from catalogdoc -https://www.amocrm.ru/developers/content/crm_platform/catalogs-api#list-elements-detailparams:nametypedefault valuecatalogs_idint-element_idint-element=client.get_catalog_element(5787,2301)add elements to catalogdoc -https://www.amocrm.ru/developers/content/crm_platform/catalogs-api#list-elements-addparams:nametypedefault valuecatalogs_idint-elementslist-elements=[{"name":"Новый элемент списка","custom_fields_values":[{"field_id":14263,"values":[{"value":1000}]}]}]result=client.add_elements_to_catalog(5787,elements)update elements in catalogdoc -https://www.amocrm.ru/developers/content/crm_platform/catalogs-api#list-elements-editparams:nametypedefault valuecatalogs_idint-elementslist-elements=[{"id":986757,"name":"Новое имя элемента"},{"id":986753,"name":"Новое имя элемента 2"}]result=client.update_elements_in_catalog(5787,elements)get usersdoc -https://www.amocrm.ru/developers/content/crm_platform/users-api#users-listparams:nametypedefault valuepageint1limitlist250with_roleboolFalsewith_groupboolFalseusers=client.get_users(page=1,limit=250)get userdoc -https://www.amocrm.ru/developers/content/crm_platform/users-api#user-detailparams:nametypedefault valueuser_idint1with_roleboolFalsewith_groupboolFalseuser=client.get_user(2222,with_role=True,with_group=True)get webhooksdoc -https://www.amocrm.ru/developers/content/crm_platform/webhooks-api#webhooks-listparams:nametypedefault valuedistansionOptional[str]Nonewebhooks=client.get_webhooks()subscribe webhookdoc -https://www.amocrm.ru/developers/content/crm_platform/webhooks-api#webhook-subscribeparams:nametypedefault valuedistansionstr-settingslist-result=client.subscribe_webhook(destination="https://example.test",settings=["add_lead"])get widgetsdoc -https://www.amocrm.ru/developers/content/crm_platform/widgets-api#widgets-listparams:nametypedefault valuepageint1limitint250widgets=client.get_widgets(page=3,limit=22)get widgetdoc -https://www.amocrm.ru/developers/content/crm_platform/widgets-api#widget-detailparams:nametypedefault valuewidget_codestr-widget=client.get_widget('<widget_code>')install widgetdoc -https://www.amocrm.ru/developers/content/crm_platform/widgets-api#widget-installparams:nametypedefault valuewidget_codestr-**kwargsstr-example={"login":"example","password":"eXaMp1E","phones":{504141:"1039"},"script_path":"https://example.com/"}result=client.install_widget('<widget_code>',**example)uninstall widgetdoc -https://www.amocrm.ru/developers/content/crm_platform/widgets-api#widget-uninstallparams:nametypedefault valuewidget_codestr-result=client.uninstall_widget('<widget_code>')get tasksdoc -https://www.amocrm.ru/developers/content/crm_platform/tasks-api#tasks-listparams:nametypedefault valuepageint1limitint250filtersOptional[dict]NoneorderOptional[dict]Nonetasks=client.get_tasks(page=1,limit=10,filters={'updated_at__from':'<timestamp>','updated_at__to':'<timestamp>'})# for any timestamp fields like created_at, updated_at, closed_at u need to user __ like created_at__from, created_at__toget taskdoc -https://www.amocrm.ru/developers/content/crm_platform/tasks-api#task-detailparams:nametypedefault valuetask_idint-task=client.get_task(1288)add tasksdoc -https://www.amocrm.ru/developers/content/crm_platform/tasks-api#tasks-addparams:nametypedefault valuetaskslist-tasks=[{"task_type_id":1,"text":"Встретиться с клиентом Иван Иванов","complete_till":1588885140,"entity_id":9785993,"entity_type":"leads","request_id":"example"}]result=client.add_tasks(tasks=tasks)update tasksdoc -https://www.amocrm.ru/developers/content/crm_platform/tasks-api#tasks-editparams:nametypedefault valuetaskslist-tasks=[{"id":4745251,"task_type_id":2,"text":"Новое название для задачи","complete_till":1588885140},{"id":4747929,"task_type_id":1,"text":"Новое название для задачи 2","complete_till":1588885140}]result=client.update_tasks(tasks=tasks)execution taskdoc -https://www.amocrm.ru/developers/content/crm_platform/tasks-api#tasks-completeparams:nametypedefault valuetask_idint-is_completedbool-resultstr-result=client.execution_task(1288,is_completed=True,result="Удалось связаться с клиентом")get tasks by entity type (leads|contacts|companies|customers)doc -https://www.amocrm.ru/developers/content/crm_platform/tags-api#tags-listparams:nametypedefault valueentity_typestr-pageint1limitint250filtersOptional[dict]Nonetags=client.get_tags_by_entity_type('leads',page=1,limit=10)add tasks for entity type (leads|contacts|companies|customers)doc -https://www.amocrm.ru/developers/content/crm_platform/tags-api#tags-addparams:nametypedefault valueentity_typestr-tagslist-tags=[{"name":"Tag 1"},{"name":"Tag 2","request_id":"my_request_id"},{"name":"Tag 3"}]tags=client.add_tags_for_entity_type('leads',tags=tags)get custom fieldsdoc -https://www.amocrm.ru/developers/content/crm_platform/custom-fields#common-infocontacts_cf=client.get_contacts_custom_fields()leads_cf=client.get_leads_custom_fields()companies_cf=client.get_companies_custom_fields()customers_cf=client.get_customers_custom_fields()customer_segments_cf=client.get_customer_segments_custom_fields()customer_segments_cf=client.get_customer_segments_custom_fields()get_catalog_custom_fields=client.get_customer_segments_custom_fields('<catalog_id>')get custom fielddoc -https://www.amocrm.ru/developers/content/crm_platform/custom-fields#custom-field-detailcontacts_cf=client.get_contacts_custom_field('<id>')leads_cf=client.get_leads_custom_field('<id>')companies_cf=client.get_companies_custom_field('<id>')customers_cf=client.get_customers_custom_field('<id>')customer_segments_cf=client.get_customer_segments_custom_field('<id>')get_catalog_custom_fields=client.get_catalog_custom_field('<catalog_id>','<id>')create custom fielddoc -https://www.amocrm.ru/developers/content/crm_platform/custom-fields#custom-fields-addcontacts_cf=client.create_contacts_custom_field(['<cf>'])leads_cf=client.create_leads_custom_field(['<cf>'])companies_cf=client.create_companies_custom_field(['<cf>'])customers_cf=client.create_customers_custom_field(['<cf>'])customer_segments_cf=client.create_customer_segments_custom_field(['<cf>'])get_catalog_custom_fields=client.create_catalog_custom_field('<catalog_id>',['<cf>'])update custom fielddoc -https://www.amocrm.ru/developers/content/crm_platform/custom-fields#custom-fields-editcontacts_cf=client.update_contacts_custom_field(['<cf>'])leads_cf=client.update_leads_custom_field(['<cf>'])companies_cf=client.update_companies_custom_field(['<cf>'])customers_cf=client.update_customers_custom_field(['<cf>'])customer_segments_cf=client.update_customer_segments_custom_field(['<cf>'])get_catalog_custom_fields=client.update_catalog_custom_field('<catalog_id>',['<cf>'])changelog0.0.12 - add entity notes methods, rename updatecustomers_segments_custom_fields -> update_customers_segments_custom_fields
amocrm-client
No description available on PyPI.
amocrm-talenttech-oss
Amocrm custom libraryRetrieving data from amocrm amocrm.api (v2 and v4).Uploading data to database.Supported databases:clickhouseverticaUsagepip3installamocrm-talenttech-ossRetrieving data from API:importdatetimefromapi.api_loader_amocrm_v4importAmocrmApiLoaderasApiLoaderV4date_modified_from=datetime.datetime.now()-datetime.timedelta(days=1)#args_api={"amocrm_api_url":"https://<NAMESPACE>.amocrm.ru/amocrm.api/v4/<ENTITY>?page={page}&limit={limit}","AUTH_URL":"https://<NAMESPACE>.amocrm.ru/oauth2/access_token","CLIENT_SECRET":"xxxx","CLIENT_ID":"xxx-xxx-xxxx-xxxx-xxxxxxx","REDIRECT_URL":"https://xxxx/xx"}args_s3={"aws_access_key_id":<S3_ACCESS_KEY>,"aws_secret_access_key":<S3_ACCESS_SECRET>,"endpoint_url":<S3_ENDPOINT_URL>,"bucket":<S3_BUCKET>}api_loader=ApiLoaderV4(entity=<ENTITY>,# leads/tasks/companies or e.t.cs3_path=<S3_PATH>,# this s3 folder should contain retrieved filess3_token_path=<S3_TOKEN_PATH>,# directory for tokensargs_s3=args_s3,args_api=args_api,date_modified_from=date_modified_from,#parameters is optional, if want load only updated records from datewith_offset=True,batch_api=500)api_loader.auth(<CODE_AUTH>)#call it if you need to create or regenerate refresh token the first timeapi_loader.extract()Uploading data to vertica:fromdb.vertica_uploaderimportUploaderDBasVerticaUploaderDBsql_credentials={"database":<DATABASE>,"schema":<SCHEMA>"user":<VERTICA_WRITE_USER>,"host":<VERTICA_HOST>,"port":<VERTICA_PORT>,"password":<VERTICA_WRITE_PASSWORD>,"vertica_configs":<VERTICA_CONFIGS>,}args_s3={"aws_access_key_id":<S3_ACCESS_KEY>,"aws_secret_access_key":<S3_ACCESS_SECRET>,"endpoint_url":<S3_ENDPOINT_URL>,"bucket":<S3_BUCKET>}db_uploader=VerticaUploaderDB(args_s3=args_s3,s3_path=s3_path,sql_credentials=sql_credentials,entity=<ENTITY>,table_name=<TABLE_NAME>,json_columns=[<COLUM_JSON_1>,<COLUM_JSON_2>])db_uploader.load_s3_to_db()Extract or load data to db:importosimportjsonargs={"action":os.getenv("action"),"etl_name_no_version":os.getenv("ETL_NAME_NO_VERSION"),"execution_date":parse(os.getenv("execution_date")),"config_name":os.getenv("config_name"),"entity":os.getenv("entity"),"args_s3":args_netology_s3,"sql_credentials":sql_credentials,"db":os.getenv("db"),"table_name":os.getenv("table_name"),"table_to_optimize":os.getenv("table_to_optimize"),"json_columns":os.getenv("json_columns"),"amocrm_secrets":json.loads(os.getenv("AMOCRM_TOKEN_SECRET")),"amocrm_api_url":os.getenv("amocrm_api_url"),"if_modified_since":os.getenv("if_modified_since"),"parser":os.getenv("parser"),}amo_runner=AmocrmRunner(**args)#amo_runner.regenerate_file_secret(code_auth="def502003cdbc2c012e210f69190133bf1943b5ebf825ef46c10b52c077064e3b9cf1378831d6f28855b9e17e4c0f95e40213af8994c1e0fadd9221730219d3e54a5dcdf1f25a90a83a19cf4edb05bd024595eec042ec3c1170f78de9dd33b5074c72e9b1821d8db0c2b31e1ab82012e6f3361ee90283e88a0c95e61802cc4e46e8d3797d04d074f367c3162879bedd0fac4c6951faf73e27895f141769a77794de56abf940c3bd68f64b7cc959017767c421c618d0100ab4c4ec651bcb03a105b3fb9ae9a26fc46252dac707963c283d1cca7fd5ec29c6f384467b1d7090b8770b2b9c69a284cbd9f7548f4c7a4f5f00a229322ae68073b603b41eeece7162f46a7519d818c8d9ffb6c93e80fadc9a3db9e83f0e4af0f3965d43e81e48a868821c2d851e1b96ffb80a875f3ff211188a12054efdd1ccc93c4b2dd73d524671c8d8aca3b1c414bfda9d011801a2aeba0dc79f882f248788553b4e5a2d7f648c89b53d86079ef09ae13dfab0cea8ab4f137579eb128a270a2cf62487b65ffc57372bed6a4fb62635f0d7275b0eba18d64900a3ea6cac403f7949617bbba7ef6afa7b0e359c8b5daac05fd30c194575c253933a8d45ad8b8737842d57ceca1810da7797b23") #if secret file is empty or you net to create it the first timeamo_runner.run()
amod400_dist1
UNKNOWN
amode
UNKNOWN
amodel
amodelamodelis Apollo's model deployment and management tool.Set environmentIf you are running in Apollo docker, you can skip this step. If you are running outside of docker, the following environment needs to be set up.sourcedocker/setup_host/host_env.shHow to workamodelprovides the following commands:list. Show models installed in Apollo.info. Show details of the model.install. Install the model to Apollo.remove. Remove the model from Apollo.ListYou can get the installed models in Apollo through thelistcommand.$amodellist Name|Task_type|Sensor_type|Framework|Date mask_pillars|3d_detection|lidar|paddlepaddle|2021-07-30 center_point|3d_detection|lidar|paddlepaddle|2022-07-22 point_pillars|3d_detection|lidar|paddlepaddle|2020-12-15 cnnseg16|3d_segmentation|lidar|paddlepaddle|2018-10-14 cnnseg128|3d_segmentation|lidar|paddlepaddle|2020-06-17 cnnseg64|3d_segmentation|lidar|paddlepaddle|2019-05-29 smoke|3d_detection|camera|paddlepaddle|2019-06-27 3d-yolo|3d_detection|camera|paddlepaddle|2019-12-08 denseline|lane_detection|camera|paddlepaddle|2019-05-29 darkSCNN|lane_detection|camera|paddlepaddle|2020-12-15 tl_detection|tl_detection|camera|paddlepaddle|2021-01-15 tl_recognition|tl_recognition|camera|paddlepaddle|2021-01-15InfoThen you can use theinfocommand to show the details of the model.$amodelinfopoint_pillars name:point_pillars date:2020-12-15 task_type:3d_detection sensor_type:lidar framework:paddlepaddle model_files: -name:pfe.onnxsize:4125-name:pts_backbone.zipsize:16945051-name:pts_bbox_head.zipsize:121150-name:pts_middle_encoder.zipsize:3763-name:pts_neck.zipsize:2420625-name:pts_voxel_encoder.zipsize:17575-name:rpn.onnxsize:18300546dataset: -waymo -kitti -nusenseInstallYou can deploy the model through theinstallcommand.# Install from localamodelinstallxxx.zip# Install from httpamodelinstallhttps://xxx.zipRemoveYou can delete the model installed in Apollo through theremovecommand.amodelremovepoint_pillars
amodem
No description available on PyPI.
amoeba
Failed to fetch description. HTTP Status Code: 404
amoeba-build
cmake-build-extensionSetuptools extension to build and package CMake projects.This project aims to simplify the integration of C++ projects based on CMake with Python packaging tools. CMake provides out-of-the-box support to eitherSWIGandpybind11, that are two among the most used projects to create Python bindings from C++ sources.If you have any experience with these hybrid projects, you know the challenges to make packaging right! This project takes inspiration from pre-existing examples (pybind/cmake_example, among many others) and provides a simple, flexible, and reusable setuptools extension with the following features:Bridge between CMake projects and Python packaging.Configure and build the CMake project fromsetup.py.Install the CMake project in the resulting Python package.Allow passing custom CMake options.Allow creating a top-level__init__.py.Expose C++ executables to the Python environment.Provide a context manager to import reliably CPython modules on all major OSs.Disable the C++ extension in editable installations (requiring to manually call CMake to install the C++ project).Have a look to theexamplefor an overview of what can be done with this extension. It shows how to create SWIG and pybind11 bindings for a project composed by a small C++ library with NumPy support and an executable.Advanced featuresThis extension supports creating packagesPEP517andPEP518compliant (more details).If the CMake projectexports the targets, downstream projects can:Extend theirCMAKE_MODULE_PATHwith the root of your installed Python package, that could be obtained with:python-c"import <pkg>, pathlib; print(pathlib.Path(<pkg>.__file__).parent)"and consume the exported CMake targets.Usecmake-build-extensionwith thecmake_depends_onoption and link against the exported CMake targets during the downstream packaging.Note that the second feature allows distributing C++ dependencies through PyPI. The resulting package structure is similar to other projects likepybind11andCasADi. Be aware that ensuring ABI compatibility could be problematic in edge cases, and the usage of a propercompatible release pattern(~=) could be necessary.InstallationFrom PyPI:pipinstallcmake-build-extensionFrom the repository:pipinstallgit+https://github.com/diegoferigo/cmake-build-extensionUsageOnce both CMake project andsetup.py|setup.cfg|pyproject.tomlof your hybrid package are correctly configured to use the resources provided by cmake-build-extension, the following commands can be used:# ============# Create sdist# ============# Calling setup.pypythonsetup.pysdist# Using pypa/buildpython-mbuild--sdist# ============# Create wheel# ============# Calling setup.pypythonsetup.pybdist_wheel# Using pippipwheel-wdist/.# Using pypa/buildpython-mbuild--wheel# ==========================================================# Create wheel or install package passing additional options# ==========================================================# Calling setup.pypythonsetup.py{bdist_wheel|install}build_ext-D"BAR=Foo;VAR=TRUE"# Using pippip{wheel|install}--global-option="build_ext"--global-option="-DBAR=Foo;VAR=TRUE".# Using pypa/build (only wheel creation)python-mbuild--wheel"-C--global-option=build_ext""-C--global-option=-DBAR=Foo;VAR=TRUE"Caveatsmanylinux*supportThis extension, beyond packaging the hybrid C++ / Python project, also allows the inclusion of the exported CMake targets in the resulting wheel. This result depends on how the CMake project is configured, and whether theexported targetsare installed together with the other files.Such hybrid packages can then be uploaded to PyPI. Though, on GNU/Linux, the generated wheel is not compliant by default with anymanylinux*standard. Tools suchauditwheelexist to fix these wheels, but they require running on selected distributions. Luckily, other projects likecibuildwheelgreatly simplify the process in CI.This being said,manylinux*guidelines could still work against you. In fact, wheels supportingmanylinux2010|manylinux2014are builtwith gcc4that does not support the new C++11 ABIs. In few words, this means that the exported libraries bundled in the wheel cannot be imported in a downstream project using relatively new C++ standards! For more details visitrobotology/idyntree#776.Luckily, the situation changed thanks to the finalization ofPEP600, i.e.manylinuxX_YY:tada: If you build a PEP600 compliant wheel (nowadays compatible with most of the commonly used distributions), your exported CMake project bundled in the wheel can be successfully imported downstream. If you want to support this use case, make sure to produce and distribute wheels compliant with PEP600.Loading CPython modules in WindowsPython 3.8changedhow DLL are resolved. By default, modules that could be imported in Python 3.7 stopped working, and using the newos.add_dll_directoryis now necessary.In order to streamline the process,cmake-build-extensionimplements a context manager that can be used to import reliably the bindings module:importcmake_build_extensionwithcmake_build_extension.build_extension_env():from.importbindingsIt will take care to temporarily fix the search path.For more details, refer to#8and#12.setup.py|setup.cfg|pyproject.tomlfiles in subfolderSometimes hybrid projects are C++ centric, and keeping these files in the top-level folder is not desirable. In this setup, however, problems occur if the mainCMakeLists.txtis kept in the top-level folder (seepypa/build#322). To solve this problem,cmake-build-extensionprovides custom commands to create source distribution. You can use one of the following customsdistoptions insetup.py:setuptools.setup(cmdclass=dict(# [...]# Pack the whole git folder:sdist=cmake_build_extension.GitSdistFolder,# Pack only the git tree:sdist=cmake_build_extension.GitSdistTree,# Or, inherit from cmake_build_extension.sdist_command.GitSdistABC and# make your own custom sdist including only the files you are interested),)Downstream projectsIf the provided example is not enough complex, find here below a list of projects usingcmake-build-extension:robotology/idyntreerobotology/yarprobotology/ycmdiegoferigo/gazebo-yarp-synchronizerrobotology/gym-ignition@scenariodic-iit/gazebo-scenario-pluginsdic-iit/bipedal-locomotion-frameworkartivis/manifContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.LicenseMIT
amoeba-db
AMOEBA-6422Environment SetupInstall dependenciesInstall postgresql-12 (https://www.postgresql.org/download/)Download demo data fromdropboxand unzip it todatafolderStart postgresql server with data folder:/usr/lib/postgresql/12/bin/pg_ctl -D ./data startIf you install postgresql-12 from apt, stop it viasudo systemctl stop postgresql.serviceand give permission to the lock file viasudo chmod o+w /var/run/postgresqlInstall dependenciessudo apt-get install python3-dev libmysqlclient-dev(if not Debian/Ubuntu, seehttps://github.com/PyMySQL/mysqlclient#installfor more details)pip install -r requirements.txtfor python dependenciesSetup environmentInstallation ofdirenvis needed. And runeval "$(direnv hook bash)"to setup the environment (replacebashwithzshor any shell you're using).Build theMUTATORofAMOEBA(only necessary if you make changes to theMUTATOR)cd /workspace/calcite-fuzzing && ./gradlew build -x core:checkstyleMain -x test -x core:checkstyleTest -x core:forbiddenApisTest -x core:autostyleJavaCheckQuick StartAMOEBAis configurable, a launch command template looks like the following:$timeout{total_timeout}./test_driver.py--workers{num_workers}--output{outputfolder}--queries{num_queries_per_worker}--rewriter./calcite-fuzzing--dbms={dbms_undertest}--validate--num_loops={num_feedbackloops}--feedback={conf_feedback}--dbconf=db_conf_demo.json--query_timeout{per_query_timeout}You can customize the value of the following options:{total_timeout}: timeout for the entire run ofAMOEBA(unit is seconds){workers}: number of parallel workers to invokeGENERATORandMUTATOR{output}: location to store the intermediate results and bug reports{queries}: number of base queries that are generated by eachGENERATORinstance{dbms}: DBMS thatAMOEBAwill evaluate on (i.e.,postgresqlorcockroachdb){num_loops}: number of feedback loops{validate}: a boolean argument that decides whether to invoke theVALIDATORafter generating the equivalent query pairs{feedback}: what types of feedbacks to utilize (i.e.,both,none,mutator, orvalidator){query_timeout}: timeout for executing each query (unit is seconds)For example, you can launchAMOEBAwith the following command:timeout3600./test_driver.py--workers1--output/home/postgres/exp/1--queries200--rewriter./calcite-fuzzing--dbms=postgresql--validate--num_loops=100--feedback=none--dbconf=db_conf_demo.json--query_timeout30IfAMOEBAis working correctly, you should expect to see the following progress information is printed:startquerygenerator['mutator.py --prob_table=/home/postgres/test/190156/prob_table_190156.json --db_info=/workspace/amoeba_conf/db_conf_demo.json -s seq --queries 100 1>/home/postgres/test/190156/0/log_sa0 2>/home/postgres/test/190156/0/input.sql']finishquerygenerator startqueryrewriter['java -cp calcite-core-1.22.0-SNAPSHOT-tests.jar:./*:. org.apache.calcite.test.Transformer /home/postgres/test/190156/0']finishqueryrewriter startvalidator begincompareplancostofequivalentqueries compareplancost/home/postgres/test/190156/0/out/q20.sql findplandiff/home/postgres/test/190156/0/out/q20.sql compareplancost/home/postgres/test/190156/0/out/q13.sql findplandiff/home/postgres/test/190156/0/out/q13.sql compareplancost/home/postgres/test/190156/0/out/q18.sql compareplancost/home/postgres/test/190156/0/out/q23.sqlThis example command should complete within 20 minutes. You can check the generated intermediate results in/home/postgres/exp/1. IfAMOEBAdiscovers potential performance bugs, the generated bug report will live at/home/postgres/exp/1/bugs.md.The shortcut CTRL+C can be used to terminateAMOEBAmanually. Otherwise,AMOEBAwill terminate either after a specified experiment timeout is reached or after a specified number of base queries have been examined. The optiontotal_timeoutcontrols the experiment timeout. The optionsworkers,queries, andnum_loopsaltogether determine the number of base queries thatAMOEBAis going to examine.Notecalcite part is based on Apache Calcite 1.22 and the only new class is added oncore/src/test/java/org/apache/calcite/test/Transformer.javaneed to remove all dependencies in this repo and ask users to download it as needed.grant appropriate permission to your user to access the database. ref:https://stackoverflow.com/a/23934693/10180666
amoex
No description available on PyPI.
amof
aMOFaMOF is a python package consisting in a collection of tools to analyze Molecular Dynamics (MD) trajectories of amorphous Metal-Organic Frameworks (MOFs).FunctionalitiesGeneral-purpose MD toolboxThis package brings together a number of analyses that can be performed on every MD trajectory (not necessarily MOFs), heavily using both other python packages and non-python codes. It can compute the following properties:Radial Distribution Functions (RDF), based onASAPBond-Angle DistributionsCoordination numbersMean Squared Displacement (MSD)Elastic constants from cell properties, and mechanical properties from elastic constants by callingELATEPore analysis by wrappingZeo++, reusing code frompysimmRing statistics by wrapping theRINGS codeThe backend for manipulating trajectories isASE, which areASE trajectoryobjects.Building units identification of aMOFsA module calledcoordinationallows the identification of the different building blocks of amorphous MOFs with anad hocapproach per MOF system.Only ZIF-4 is supported in the current release.This allows the computation of rings statistics of the metal-ligand network.This code is designed to be compatible withmolsys, and can be used to generate input files inmfpxformat.The detailed algorithm for ZIF-4 is presented in the supporting information of the paperChallenges in Molecular Dynamics of Amorphous ZIFs using Reactive Force Fields.InstallationPre-requisitesTo use theporeandringmodules,Zeo++and theRINGS codeneed to be installed and accessible in the system path.First download and follow the installation instructions on their respective websites (here for Zeo++andhere for RINGS).Then for Zeo++, create the following variable on your system:export ZEOpp_EXEC=/path/to/zeo++-0.3/networkFor RINGS, ensure that theringsbinary is in your path:export PATH=$PATH:/path/to/rings/binInstallation with pipaMOF can be installed from PyPI:pip install amofor directly from source:git clone https://github.com/coudertlab/amof.git cd amof pip install .Special care should be taken withAsap, which can only be installed ifnumpyis already installed and is thus not a default dependency. To solve this, either installasapindependently (followingtheir installation guide), or first installnumpythen installamofwith therdfextra:pip install numpy pip install amof[rdf]By default, graphical dependencies (used in theplotmodule) are not installed. To install them use thegraphicsextra:pip install amof[graphics]Installation with condaSupport for installing aMOF withcondais not included at the moment. However,condacan be used to first install all dependencies before installingamofwithpip.conda install -c conda-forge ase=3.20.1 asap3 pandas numpy xarray=0.19.0 dask netCDF4 bottleneck ase asap3 joblib pymatgen hvplot atomman jupyter jupyterlab jupytext matplotlib networkx scipy plotly seaborn cairosvg pyarrow seleniumDocumentationA documentation is can easily be created withpdoc.Simply run (with pdoc installed):pdoc --html --output-dir path\to\docs path\to\amofUsageExamplesExamples analyses can be found in theexamplesfolder of this repository.CitationIf you use the python package in published results (paper, conference, etc.), please cite the first paper for which it was developed:Challenges in Molecular Dynamics of Amorphous ZIFs using Reactive Force Fields.
amogus
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣤⣤⣤⣀⣀⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣼⠟⠉⠉⠉⠉⠉⠉⠉⠙⠻⢶⣄⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣾⡏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⣷⡀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⡟⠀⣠⣶⠛⠛⠛⠛⠛⠛⠳⣦⡀⠀⠘⣿⡄⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⠁⠀⢹⣿⣦⣀⣀⣀⣀⣀⣠⣼⡇⠀⠀⠸⣷⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⡏⠀⠀⠀⠉⠛⠿⠿⠿⠿⠛⠋⠁⠀⠀⠀⠀⣿⡄⣠ ⠀⠀⢀⣀⣀⣀⠀⠀⢠⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⡇⠀ ⠿⠿⠟⠛⠛⠉⠀⠀⣸⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⡇⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⣿⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣧⠀ ⠀⠀⠀⠀⠀⠀⠀⢸⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣿⠀ ⠀⠀⠀⠀⠀⠀⠀⣾⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⠀ ⠀⠀⠀⠀⠀⠀⠀⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⠀ ⠀⠀⠀⠀⠀⠀⢰⣿⠀⠀⠀⠀⣠⡶⠶⠿⠿⠿⠿⢷⣦⠀⠀⠀⠀⠀⠀⠀⣿⠀ ⠀⠀⣀⣀⣀⠀⣸⡇⠀⠀⠀⠀⣿⡀⠀⠀⠀⠀⠀⠀⣿⡇⠀⠀⠀⠀⠀⠀⣿⠀ ⣠⡿⠛⠛⠛⠛⠻⠀⠀⠀⠀⠀⢸⣇⠀⠀⠀⠀⠀⠀⣿⠇⠀⠀⠀⠀⠀⠀⣿⠀ ⢻⣇⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣼⡟⠀⠀⢀⣤⣤⣴⣿⠀⠀⠀⠀⠀⠀⠀⣿⠀ ⠈⠙⢷⣶⣦⣤⣤⣤⣴⣶⣾⠿⠛⠁⢀⣶⡟⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡟⠀ ⢷⣶⣤⣀⠉⠉⠉⠉⠉⠄⠀⠀⠀⠀⠈⣿⣆⡀⠀⠀⠀⠀⠀⠀⢀⣠⣴⡾⠃⠀ ⠀⠈⠉⠛⠿⣶⣦⣄⣀⠀⠀⠀⠀⠀⠀⠈⠛⠻⢿⣿⣾⣿⡿⠿⠟⠋⠁⠀⠀⠀
amoi
UNKNOWN
amok
This package is empty.
amolang
UNKNOWN
amole
Amole pay integrationThis python library is to help you integrate with amole api. Contact amole team for integration.importamoleimportjson,requestsamole=Amole(url="https://uatc.api.myamole.com:8076/amole/pay",signature='<SEGNITURE>',ip_address='<YOUR IP>',username='<USERNAME>',password='<TEST>')response=amole.send_otp(card_number='<CARD OR PHONENUMBER>',merchant_id='<MERCHANT ID>')print(response)response=amole.pay(card_number='<CARD OR PHONENUMBER>',merchant_id='<MERCHANT ID>',amount='200',OTP='9999')print(json.loads(response.content))
amolkit
# amolkit A library for obtaining molecular properties
amon
Elegant server and web application monitoring toolkit
amonagent
UNKNOWN
amongo
UNKNOWN
amongus
Placeholder until package is ready for release ;) checkhttps://gitlab.com/TECHNOFAB/AmongUsIOfor aplha/beta builds
amongusbot
AmongUsBotShitty (but lightweight) bot that toggles server muting of all members in a specific user's voice channel when a hotkey is pressed. Uses thekeyboardmodule to listen for keypresses.If you are looking for the project with the same very original name that uses Tesseract and Selenium go here:https://github.com/alpharaoh/AmongUsBotInstallationClone the Repository and Install withPoetry(preferred)gitclonehttps://github.com/PederHA/AmongUsBot.gitcdamongusbot poetryinstallInstall with pip (alternative)pipinstallhttps://github.com/PederHA/AmongUsBot/releases/download/0.2.1/amongusbot-0.2.1.tar.gzNOTE: The version on PyPi does not include sound alerts and example run file! Download those files manually and place them in your project root if you choose to use pip.RunningCreate a Bot UserGo tohttps://discord.com/developers/applicationsand create a new application, then add a bot user to the application by clicking on the "Bot" tab on the left-hand side of the page.Invite the Bot to Your ServerInvite the bot with the following URL (substitute with your bot's ID):https://discord.com/oauth2/authorize?client_id=<BOT_CLIENT_ID>&scope=bot&permissions=12651520Run the BotSeerun_example.py.Add the bot's secret token as an environment variable namedAUBOT_TOKENor pass it in as the first argument to the application when running it.Configurationamongusbot/config.pydefines the following configuration options:@dataclassclassConfig:user_id:int# ID of user to mute voice channel ofhotkey:str="|"# Trigger hotkeylog_channel_id:Optional[int]=None# Log channel IDpoll_rate:float=0.05# Keyboard polling rate (seconds)command_prefix:str="-"# Command prefixdoubleclick:bool=False# Require double-click of hotkey to triggerdoubleclick_window:float=0.5# Double-click activation window (seconds)cooldown:float=2.0# Trigger cooldownsound:bool=False# Play sound when triggeredmute_sound:str="audio/muted.wav"# Mute soundunmute_sound:str="audio/unmuted.wav"# Unmute soundDefaults can be overridden when running the bot:fromamongusbotimportrun,Configrun("your_token",Config(user_id=123456,hotkey="f4"))UsagePress the hotkey whenever a round starts to mute everyone in your channel, and press it again whenever a meeting is convened or the game ends.NotesOnly tested on Windows.
among-us-parser
Among us python packet parserThis module should parse network packets from the game among usNoticeNot many packet types are parsed yet.If you wan't to contribute. You can fork this and then make a pull request.I will gladly accept any pull request if they makes sense and don't completely change the structure of this codebase, for no reason.
amoni
AmoniA command line utility for local development ofAnvilapps.Amoni gives you:A simple command to start a new project and create all the necessary files and folders:amoni initPre-configured docker containers for the anvil app server and postgresql database server to run your appSimple commands to start and stop those servers:amoni start amoni stopYour app available in your browser at port 3030 on your local machineYour database server available on port 5432 on your local machineA pre-configured docker container and a simple command to run your test suite:amoni testCommands to fetch anvil apps and add them to your project as the main app or as dependencies:amoni install app amoni install dependencyStub filesthat allow your autocompleter to see what tables are included in your appRead the DocumentationAsk a QuestionChat with the team
amoniak
AMON Tools for GISCE-ERP
amonpy
amonpyAmonpy is the Python client for AmonInstallation1. Install the package withpip install amonpyor alternatively you can download the tarball and runpython setup.py installConfigurationimport amonpy amonpy.config.address = 'http://amonhost:port' amonpy.config.protocol = 'http|zeromq'Usageimport amonpy amonpy.log(message) amonpy.log(message, ['list', 'of', 'tags']) data = { 'exception_class': '', 'url': '', 'backtrace': '', 'enviroment': '', 'data': '' } amonpy.exception(data)DjangoUsing amonpy in Django is exactly the same as in every other python library. You can customize the config options by adding them somewhere insettings.py# in settings.py import amonpy amon.config.address = 'http://amonhost:port'To capture and log exceptionsMIDDLEWARE_CLASSES = ( ..... 'amonpy.adapters.DjangoExceptionMiddleware' )RequirementsPython 2.6+requests
amo-partner-crawler
No description available on PyPI.
amora
No description available on PyPI.
amoragon-test
Un ejemplo sencillo
amora-py
AmoraAmora is a secure token inspired byJWTandBranca, but enhanced a bit in some areas.Key features:Can contain any type of payload: JSON, msgpack, cbor and so on...Always encrypted and authenticated using XChaCha20-Poly1305 algorithm.There are two versions of Amora:Amora zero: encrypted with a 32-byte symmetric key.Amora one: encrypted with a 32-byte asymmetric key.Encoded using url-safe base64.Always contain token generation time and TTL.Amora structureheader (4 bytes for Amora zero; 36 bytes for Amora one):version marker: 0xa0 or 0xa1 (1 byte)TTL (3 bytes; little-endian)randomly generated public key (32 bytes; Amora one only)nonce (24 bytes)token generation time (first 4 bytes; little-endian)randomly generated 20 bytespayload (any length)message authentication code (4 bytes)Token generation time (TGT) + TTLTGT is an unsigned 32-bit int. It's a number of seconds starting from the Unix epoch on January 1, 1970 UTC. This means that Amora tokens will work correctly until the year 2106.TTL is an unsigned 24-bits int. It means that each token can be valid for a maximum of 194 days.Asymmetric encryptionThe shared key is computed using the X25519 function. It requires two pairs of priv/pub keys. The first pair must be known. The second pair is randomly generated for each token.Code examplesSymmetric from byteskey=bytes([0x4f,0x99,0x70,0x66,0x2f,0xac,0xd3,0x7d,0xc3,0x6c,0x0f,0xd1,0xda,0xd0,0x7e,0xaa,0x04,0x7c,0x28,0x54,0x58,0x3c,0x92,0x0f,0x52,0x4b,0x2b,0x01,0xd8,0x40,0x83,0x1a,])amora=amora_py.Amora.amora_zero(key)payload="sample_payload_just_for_testing"token=amora.encode(payload.encode(),1)decoded=amora.decode(token,True)decoded=bytes(decoded).decode()Symmetric key from stringkey="4f9970662facd37dc36c0fd1dad07eaa047c2854583c920f524b2b01d840831a"amora=amora_py.Amora.amora_zero_from_str(key)payload="sample_payload_just_for_testing"token=amora.encode(payload.encode(),1)decoded=amora.decode(token,True)decoded=bytes(decoded).decode()Asymmetric key from bytesx25519=X25519PrivateKey.generate()secret_key=x25519.private_bytes_raw()public_key=x25519.public_key().public_bytes_raw()amora=amora_py.Amora.amora_one(secret_key,public_key)payload="sample_payload_just_for_testing"token=amora.encode(payload.encode(),1)decoded=amora.decode(token,True)decoded=bytes(decoded).decode()Asymmetric key from stringsecret_key="778d0b92672b9a25ec4fbe65e3ad2212efa011e8f7035754c1342fe46191dbb3"public_key="5cdd89c1bb6859c927c50b6976712f256cdbf14d7273f723dc121c191f9d6d6d"amora=amora_py.Amora.amora_one_from_str(secret_key,public_key)payload="sample_payload_just_for_testing"token=amora.encode(payload.encode(),1)decoded=amora.decode(token,True)decoded=bytes(decoded).decode()
amoredb
AmoreDBSimple append-only database for Python with rich record formats and compression.For impatientspipinstallamoredbExample 1importasynciofromamoredbimportAmoreDBasyncdefmain():asyncwithAmoreDB('test','w')asdb:awaitdb.append(b'foo')awaitdb.append(b'bar')awaitdb.append(b'baz')asyncforrecordindb:print(record)asyncio.run(main())Result:b'foo' b'bar' b'baz'Example 2importasynciofromamoredb.jsonimportJsonAmoreDBasyncdefmain():asyncwithJsonAmoreDB('test.json','w')asdb:awaitdb.append({'foo':'bar'})awaitdb.append({'bar':'foo'})asyncforrecordindb:print(record)asyncio.run(main())Result:{'foo': 'bar'} {'bar': 'foo'}Record formatsThe basic format for database records is bytes object. Subclasses may support other formats, as demonstrated above in the Example 2. AmoreDB provides support for the following formats:JSON:JsonMixin,JsonAmoreDBfromamoredb.jsonstrings:StrMixin,StrAmoreDBfromamoredb.strstructures:StructMixin,StructAmoreDBfromamoredb.structBSON:BsonMixin,BsonAmoreDBfromamoredb.bson, requiressimple_bsonpackageRecords are converted to the binary data by mixins and AmoreDB provides predefined classes, such, for example, asclassJsonAmoreDB(JsonMixin,AmoreDB):passRecord compressionSimilar to record format conversion, compression is implemented by mix-ins. AmoreDB provides a few for the following formats:gzip:GzipMixinfromamoredb.gziplzma:LzmaMixinfromamoredb.lzmalz4:Lz4Mixinfromamoredb.lzma, requireslz4packagebrotli:BrotliMixinfromamoredb.brotli, requiresbrotlipackagesnappy:SnappyMixinfromamoredb.snappy, requirespython-snappypackageThere are no predefined classes for compression, it's up to end users to define ones for their needs. For example,fromamoredbimportAmoreDBfromamoredb.jsonimportJsonMixinfromamoredb.gzipimportGzipMixinclassMyDB(JsonMixin,GzipMixin,AmoreDB):passasyncwithMyDB('test.json.gz','w',compresslevel=5)asdb:awaitdb.append({'foo':'bar'})awaitdb.append({'bar':'foo'})asyncforrecordindb:print(record)Record transformation pipelineRecords in AmoreDB are processed by the following methods:defrecord_to_raw_data(self,record_data):# do custom conversion here# ...# call base methodreturnsuper().record_to_raw_data(record_data)defrecord_from_raw_data(self,record_data):# do custom conversion here# ...# call base methodreturnsuper().record_from_raw_data(record_data)Mix-ins override these methods and to make pipeline working, mix-ins should be defined in the right order. As we have seen above,classMyDB(JsonMixin,GzipMixin,AmoreDB):passGzipMixinis placed in between, because compression takes place after converting record from JSON to binary data and before writing this data to file. Same for opposite direction.Database structureThe database consists of data file and index file. Optional metadata file in JSON format may contain the structure of database class.Index file contains positions of records except the first one which is always zero. The first element in index file is the offset of the next record. Thus, the number of items in the index file equals to the number of records.Record id is implicit, it is the index of the record. Thus, to get a record by id, read its offset from the index file and then read the record from data file.
amorf
No description available on PyPI.
amor-hyp-gp
Task-Agnostic Amortized Inference of Gaussian Process Hyperparameters (AHGP)This repository contains code and pretrained-models for the task-agnostic amortized inference of GP hyperparameters (AHGP) proposed in ourNeurIPS 2020 paper. AHGP is a method that allows light-weight amortized inference of GP hyperparameters through a pre-trained neural model.The repository also includes a pip installable package that includes the essential components for using AHGP for GP hyperparameters inference. The hope is to make it easier for you to use AHGP with a simple function call.If you find this repository helpful, please cite ourNeurIPS paper:@incollection{liu2020ahgp, title={Task-Agnostic Amortized Inference of Gaussian Process Hyperparameters}, author={Liu, Sulin and Sun, Xingyuan and Ramadge, Peter J. and Adams, Ryan P.}, booktitle={Advances in Neural Information Processing Systems}, year={2020} }Package installation and usageInstallationThe essential components of AHGP are packaged inmodel/and you can install this via PyPI:pipinstallamor-hyp-gpRequirementamor-hyp-gphas the following dependencies:python >= 3.6pytorch >= 1.3.0tensorboardXeasydictPyYAMLUsageUsage examples are included inexamples/.ahgp_gp_inference_example.pycontains an example of full GP inference, which uses amortized GP hyperparameter inference and full GP prediction implemented inPyTorch.ahgp_gp_inference_example.pycontains an example that outputs the GP hyperprameters (means and variances of the Gaussian mixtures for modeling the spectral density).Code for training and running the modelsGenerating synthetic data for trainingAn example of generating synthetic training data from GP priors with stationary kernels is provided inget_data_gp.py.Running experiments described in the AHGP paperTo run the experiments, you will need the following extra dependencies:GPyemukitThe UCI regression benchmark datasets are stored indata/regression_datasets. The Bayesian optimization functions are implemented inutils/bo_function.py. The Bayesian quadrature functions are imported from theemukitpackage.Training modelTo train a neural model for amortized inference, you can run:pythonrun_exp.py-cconfig/train.yamlInconfig/train.yaml, you can define the configurations for the neural model and training hyperparameters.Regression experimentsTo run the experiments on regression benchmarks with the pretrained neural model, run:pythonrun_exp.py-cconfig/regression.yaml-tInconfig/regression.yaml, you can define the configurations of the pretrained model and the regression experiment.Bayesian optimization experimentsTo run the Bayesian optimization experiments with the pretrained neural model, run:pythonrun_exp_bo.py-cconfig/bo.yamlInconfig/bo.yaml, you can define the configurations of the pretrained model and the BO experiment.Bayesian quadrature experimentsTo run the Bayesian quadrature experiments with the pretrained neural model, run:pythonrun_exp_bq.py-cconfig/bq.yamlInconfig/bq.yaml, you can define the configurations of the pretrained model and the BQ experiment.Authors:Sulin LiuXingyuan SunPeter J. RamadgeRyan P. AdamsPlease reach out to us with any questions!
amor-hyp-gp-testfinal
Failed to fetch description. HTTP Status Code: 404
amorprot
AmorProt: Amino Acid Molecular Fingerprints Repurposing-based Protein Fingerprint
amort
Amortization is a command line interface that outputs an amortization schedule based on the user’s input of the borrowed amount, interest rate, loan duration, and number of payments made annually. For reading on amortization schedules please visit:https://en.wikipedia.org/wiki/Amortization_scheduleInstallationAmortization requires the pandas library in order for the command line application to work correctly. Pandas should be pre-installed in the environment where amortization is installed. For pandas install instructions, please visit:http://pandas.pydata.org/To install the Amortization package simply open a command line prompt and run:pip install amortIf you would rather install from source, run the following commands:git clone https://github.com/mandeep/Amortization.git cd Amortization python setup.py installUsageOnce Amortization is installed, the command line application can be invoked with the following command and mandatory arguments:amortization BORROWED INTEREST LENGTH PERIODS [NAME] Example: amortization 70000000 3 30 12 "Gulfstream G650 Loan"Output of the command line application appears below:
amortization
LicenseVersionGithub ActionsCoverageSupported versionsWheelStatusDownloadsamortizationPython library for calculating amortizations and generating amortization schedulesInstallationpipinstallamortizationUsagePythonAmortization Amountfromamortization.amountimportcalculate_amortization_amountamount=calculate_amortization_amount(150000,0.1,36)Amortization Periodfromamortization.periodimportcalculate_amortization_periodperiod=calculate_amortization_period(150000,0.1,4840.08)Amortization Schedulefromamortization.scheduleimportamortization_schedulefornumber,amount,interest,principal,balanceinamortization_schedule(150000,0.1,36):print(number,amount,interest,principal,balance)Amortization Schedule (using tabulate)fromamortization.scheduleimportamortization_schedulefromtabulateimporttabulatetable=(xforxinamortization_schedule(150000,0.1,36))print(tabulate(table,headers=["Number","Amount","Interest","Principal","Balance"],floatfmt=",.2f",numalign="right"))Command lineamortize-h usage:amortize[-h]-PPRINCIPAL-rINTEREST_RATE[-s][-f{daily,biweekly,weekly,semimonthly,monthly,quarterly,semiyearly,yearly}](-nPERIOD|-aAMOUNT)Pythonlibraryforcalculatingamortizationsandgeneratingamortizationschedules options:-h,--helpshowthishelpmessageandexit-s,--scheduleGenerateamortizationschedule-f{daily,biweekly,weekly,semimonthly,monthly,quarterly,semiyearly,yearly},--frequency{daily,biweekly,weekly,semimonthly,monthly,quarterly,semiyearly,yearly}Paymentfrequency-nPERIOD,--periodPERIODTotalnumberofperiods-aAMOUNT,--amountAMOUNTAmortizationamountperperiod requiredarguments:-PPRINCIPAL,--principalPRINCIPALPrincipalamount-rINTEREST_RATE,--interest-rateINTEREST_RATEInterestrateperyearamortize-P150000-n36-r0.1# periodamortize-P150000-n36-r0.1-s# scheduleamortize-P150000-a4840.08-r0.1# amountamortize-P150000-n36-r0.1-fweekly# period (specify payment frequency)%amortize-P150000-n36-r0.1-sNumberAmountInterestPrincipalBalance -------------------------------------------------14,840.081,250.003,590.08146,409.9224,840.081,220.083,620.00142,789.9234,840.081,189.923,650.16139,139.7644,840.081,159.503,680.58135,459.1854,840.081,128.833,711.25131,747.9364,840.081,097.903,742.18128,005.7574,840.081,066.713,773.37124,232.3884,840.081,035.273,804.81120,427.5794,840.081,003.563,836.52116,591.05104,840.08971.593,868.49112,722.56114,840.08939.353,900.73108,821.83124,840.08906.853,933.23104,888.60134,840.08874.073,966.01100,922.59144,840.08841.023,999.0696,923.53154,840.08807.704,032.3892,891.15164,840.08774.094,065.9988,825.16174,840.08740.214,099.8784,725.29184,840.08706.044,134.0480,591.25194,840.08671.594,168.4976,422.76204,840.08636.864,203.2272,219.54214,840.08601.834,238.2567,981.29224,840.08566.514,273.5763,707.72234,840.08530.904,309.1859,398.54244,840.08494.994,345.0955,053.45254,840.08458.784,381.3050,672.15264,840.08422.274,417.8146,254.34274,840.08385.454,454.6341,799.71284,840.08348.334,491.7537,307.96294,840.08310.904,529.1832,778.78304,840.08273.164,566.9228,211.86314,840.08235.104,604.9823,606.88324,840.08196.724,643.3618,963.52334,840.08158.034,682.0514,281.47344,840.08119.014,721.079,560.40354,840.0879.674,760.414,799.99364,839.9940.004,799.990.00 Totals174,242.7924,242.79150,000.00DependenciestabulateAuthorRonie MartinezReferencesAmortization Calculation FormulaAmortization Period Formula
amortize
amortizeEasy-to-use Python Library for Amortization Schedule and RefinanceInspirationThe bank with the lowest rate is not always the best choice. APR is important because the interest rate that gets quoted by the lender, isn't always the interest rate that you will pay. The APR includes interest rate and fees charged by the lender, and lets you compare mortgage offers.APR, reflects the true cost of borrowing.However, the borrower will see this figure after the approval and signing of the contract!If you want something that is straight to the point, this python library can be a good reference.You can estimate the mortgage amount that works with your budget.See true cost of borrowing.If you wish, you can see a payment breakdown for every single month of the loan duration.It allows the side-by-side comparison of the existing or refinanced loan.The break-even point shows how long it'll take for the savings to outweigh the cost.You can export amortization schedule to excel.It doesn’t show you graphs, pie charts, or amortization charts!InstallationInstall withpipor your favorite PyPi package manager.pip install amortizeDependenciesnumpy-financial = 1.0.0tabulate = 0.8.7pandas = "1.2.1UsageMortgage( loan amount, annual interest rate, loan period in months, fees)fromamortize.calcimportMortgagem=Mortgage(300000,6,12,0)>> m.afford() : Determine how much house you can afford >> m.summary() : Repayment summary >> m.table() : Amortization table >> m.refinance() : Refinance >> m.excel() : Send amortization table to excelCLIusage: amortize [-h] -a AMOUNT -i INTEREST -m MONTHS -f FEES [-s] [-t] [-r] [-c] [-e] Easy-to-use Python Library for Amortization Schedule and Refinance optional arguments: -h, --help show this help message and exit -s, --summary Repayment summary -t, --table Amortization table -r, --refinance Refinance -c, --afcalc Affordability calculator -e, --excel Export to excel required arguments: -a AMOUNT, --amount AMOUNT Loan amount -i INTEREST, --interest INTEREST Annual interest rate -m MONTHS, --months MONTHS Loan period in months -f FEES, --fees FEES Extra paymentsScreenshotsRepayment Summary: amortize -a300000 -i6 -m12 -f6000 -sAmortization Table: amortize -a300000 -i6 -m12 -f0 -tRefinance: amortize -a300000 -i6 -m12 -f9000 -rAffordability: amortize -a0 -i2.61 -m360 -f0 -cThank YouThanks for checking out the package.
amortizer
[][license]Amortizer - Simple loan amortization calculatorAmortizeris a simple amortization table generator which supports two common approaches: annuity payments and straight amortization.OverviewAmortizeris basically a single python class which instantiates an object with several useful methods.MethodDescription.get_summary(method="annuity")Calculates amortization dataframe (methods: 'straight' or 'annuity') and returns a dictionary with summary statistics..straight_amortization()Calculates amortization table with straight amortization and returns a dataframe..annuity_amortization()Calculates amortization table with annuity payments and returns a dataframe..to_html(method="annuity")Calculates amortization dataframe (methods: 'straight' or 'annuity') and returns results to a string with html markup..to_json(method="annuity")Calculates amortization dataframe (methods: 'straight' or 'annuity') and returns results to a string with JSON object..to_csv(path: str, method="annuity")Calculates amortization dataframe (methods: 'straight' or 'annuity') and exports results to the .csv file.Learn more about the methods above in theDocumentationInstallationAmortizersupports python3.7 + environments.$pipinstall--upgradeamortizeor usepipenv$pipenvinstall--upgradeamortizeGetting StartedMinimal Examplefromamortizer.generatorimportAmortizer# Instantiate new object with any suitable name and pass itinial parameters of the loan / mortgageamortizer=Amortizer(amount=100000,period=18,interest_rate=6)# Get summary statistics with annuity paymentsamortizer.get_summary(method="annuity")# >>> {'total_cost': 104817.06, 'average_interest_exp': 267.62, 'average_monthly_pmt': 5823.17, 'total_interest_exp': 4817.12}# Export amortization payments table to csv fileamortizer.to_csv(path="/tmp/",method="straight")#>>> Data was recorded to straight_amortization.csv at the following location: /tmp/ResourcesPyPiDocumentationIssue trackingContributingFeel free to send merge requests.If you've got questionsRead the docs.Look through the issues.LicenseMIT License.
amos
"I AM that guy." - Amos BurtonLike the Roci's most interesting character, this package is designed to handle the dirtiest jobs in a python project.amos's framework supports a wide range of coding styles. You can create complex multiple inheritance structures with mixins galore or simpler, compositional objects. Even though the data structures are necessarily object-oriented, all of the tools to modify them are also available as functions, for those who prefer a more funcitonal approaching to programming.The project is also highly internally documented so that users and developers can easily make amos work with their projects. It is designed for Python coders at all levels. Beginners should be able to follow the readable code and internal documentation to understand how it works. More advanced users should find complex and tricky problems addressed through efficient code.
amoshell
AMOSHELLPython convenience class to interface with Ericsson’s amos/moshell commands.Installpip install amoshellSynopsisimport amoshell mo = amoshell.Amos() rval, out, err = mo.moshell('RBS003', 'lt all; alt') if rval: print err else: print outAPIAmos(kwargs)bin_path: keyword-arg to set a non-standard path where the moshell binaries may be installed (optional).parallel: keyword-arg to set max number of parallel sessions that mobatch may run (defaults to 10).Amos.moshell(name, command, kwargs)Run a moshell command on a node.name: recognized node name or node ip address.command: command string. multiple commands are delimited with semicolon.kwargs: any valid options that are normally set with the ‘-v’ on the moshell command line can be entered here. See Ericsson AMOS user guide for more.Return value is a tuple, containing:exit code: 0 = ok, non-zero = a failure.stdout text:stderr text:Amos.mobatch(nodes, command, kwargs)Run mobatch commands against many nodes simultaneously.nodes: a list of node names (or ip addresses), or a string pointing to an existing sitefile.command: command string, or a string identifying the path to an existing moshell command file.kwargs: any valid options that are normally set with the ‘-v’ on the moshell command line can be entered here. See Ericsson AMOS user guide for more.Return value is a list of tuples. Each 3 element tuple contains:node name: node this tuple’s info relates to.exit code: 0 = ok, non-zero = a failure.path to log: path to the file containing the moshell results for this node.Examplesimport amoshell mo = amoshell.Amos() # moshell example rval, out, err = mo.moshell('RBS003', 'lt all; alt') # mobatch example results = mo.mobatch(['ERBS001', 'ERBS002'], 'lt all; get security', ip_database=/tmp/ipdb.dat, corba_class=5 ) for r in results: node, rval, logfile = r if not rval: print "node %s results found in log %s" % (node, logfile)Known IssuesNode Passwords: Some commands in moshell require a password. This tool is not designed to have an interactive shell, and a password request will cause this to hang indefinitely.To prevent this, you should use a custom ip_database file containing nodes and their passwords. The file is then referenced with the “ip_database” optional arg.Amos.moshell(node, command, ip_database='/path/to/file')See Ericsson documentation for more information about these ip_database files.To DoAuthorJeff Leary (sillymonkeysoftware -at- gmail -dot- com)
amostra
Sample management backed by MongoDBFree software: 3-clause BSD licenseDocumentation: (COMING SOON!)https://danielballan.github.io/amostra.FeaturesTODO
amount-in-words
Convert amount to words (Polish translation).InstallInstall the package viapip:pip install git+git://github.com/bogdal/amount-in-words.gitExample>>> from amount_in_words import Amount >>> Amount.in_words('123.45') sto dwadzieścia trzy złote i czterdzieści pięć groszy
amounts
AmountsGenerate a wordlist to fuzz amounts or any other numerical values. Based onCommon Security Issues in Financially-Oriented Web Applications.Bypass minimum and maximum restrictions, cause an unintended behavior and errors, etc.Works with integer and float numerical values.Tests:using amount separators such as space, dot, and comma;prepending zeros and appending decimal zeros using amount separators such as space and comma;prepending and appending positive and negative scope;prepending currency symbols such as$,£, and€- including negative scope;embracing the amount with brackets such as(),[], and{}- and expanding it;trying underflows and overflows;trying binary, hexadecimal, hexadecimal ASCII, hexadecimal Unicode, and exponential notations;trying bolean, empty, integer minimum and maximum, and other special values,trying various lengths - including negative scope.Pre-generated wordlists can be found in/src/wordlists/; also a part of/danielmiessler/SecLists/tree/master/Fuzzing/Amounts.Complimentary wordlists:/danielmiessler/SecLists/blob/master/Fuzzing/JSON.Fuzzing.txtExtend this script to your liking.Tested on Kali Linux v2023.4 (64-bit).Made for educational purposes. I hope it will help!Table of ContentsHow to InstallHow to Build and Install ManuallyGenerated AmountsUsageHow to Installpip3 install --upgrade amountsHow to Build and Install ManuallyRun the following commands:git clone https://github.com/ivan-sincek/amounts && cd amounts python3 -m pip install --upgrade build python3 -m build python3 -m pip install dist/amounts-3.3-py3-none-any.whlGenerated Amountsamounts -min 1 -max 10000 -mid 2200 -o amounts.txtamounts.txtgenerated wordlist:1 10000 2200 2 200 2.200 2,200 002200 2200.00 2200,00 +2200 2200+ -2200 2200- $2200 $-2200 -$2200 £2200 £-2200 -£2200 €2200 €-2200 -€2200 () (,,) (2200) (2200,2201) ("2200") ("2200","2201") [] [,,] [2200] [2200,2201] ["2200"] ["2200","2201"] {} {,,} {2200} {2200,2201} {"2200"} {"2200","2201"} 0 10001 NaN -NaN Infinity -Infinity inf -inf 0b100010011000 0x898 \x32\x32\x30\x30 \u0032\u0032\u0030\u0030 &h00 &hff 0.00000000000000000000000000000000000000000000000001 1e-50 2200e0 1e-1 10000e1 true false -1 +1 -0 +0 0e-1 0e1 null None nil An Array 2,,2,,0,,0 %20%092200 2200%20%00%00 -2147483648 2147483647 4294967295 -2147483649 2147483648 4294967296 99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 -9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 -999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 -99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999UsageAmounts v3.3 ( github.com/ivan-sincek/amounts ) --- Generate a wordlist from an amount range --- Usage: python3 amounts.py -min minimum -max maximum -mid middle -o out [-q quotes] Example: python3 amounts.py -min 1 -max 1000 -mid 20 -o amounts.txt [-q double] --- Generate a wordlist from a single amount --- Usage: python3 amounts.py -mid middle -o out [-q quotes] Example: python3 amounts.py -mid 20 -o amounts.txt [-q double] DESCRIPTION Generate a wordlist to fuzz amounts or any other numerical values MINIMUM Minimum amount allowed If not specified, middle amount will be used -min, --minimum = 1 | etc. MAXIMUM Maximum amount allowed If not specified, middle amount will be used -max, --maximum = 1000 | etc. MIDDLE Preferably a multi-digit amount greater than minimum, lesser than maximum, and other than zero -mid, --middle = 20 | etc. OUT Output file -o, --out = amounts.txt | etc. QUOTES Enclose amounts in quotes Use comma-separated values -q, --quotes = original | single | double | backtick | all
amo-validator
[![Updates](https://pyup.io/repos/github/mozilla/amo-validator/shield.svg)](https://pyup.io/repos/github/mozilla/amo-validator/)# addons.mozilla.org Validator:warning: :warning: :fire: This tool is being deprecated and going away eventually. :warning: :warning: :fire:It is still used on addons.mozilla.org for legacy add-ons but once support for updates for legacy add-ons goes away from AMO this tool will be archived.The AMO Validator is a tool designed to scan Mozilla add-on packages forproblems such as security vulnerabilities, exploits, spamware and badware,and lots of other gunk. By using a combination of various techniques anddetection mechanisms, the validator is capable of being both efficient as wellas thorough.## Setup### PrerequisitesYou can install everything you need for running and testing with```bashpip install -r requirements.txt```### SubmodulesThe validator may require some submodules to work. Make sure to run```bashgit clone --recursive git://github.com/mozilla/amo-validator.git```so that you get all of the goodies inside.### SpidermonkeyA working copy of Spidermonkey (debug or non-debug is fine) is required. Theeasiest way to do this is to just [download the binary](https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/jsshell-linux-x86_64.zip).If you want to build it from scratch, [clone](http://hg.mozilla.org/mozilla-central/)the mozilla-central repo or[download the tip](http://hg.mozilla.org/mozilla-central/archive/tip.tar.bz2)(which is faster). Then build it from source like this```bashcd mozilla-centralcd js/srcautoconf2.13./configuremakesudo cp dist/bin/js /usr/local/bin/js```You must use autoconf at *exactly* 2.13 or else it won't work. If you're using`brew`_ on Mac OS X you can get autoconf2.13 with thisbrew install autoconf213If you don't want to put the `js` executable in your `$PATH` or you want itin a custom path, you can define it as `$SPIDERMONKEY_INSTALLATION` inyour environment.### Using amo-validator as a contained app using dockerCheck this instructions from [marceloandrader](https://github.com/marceloandrader/dockerfiles/blob/master/amo-validator/README.md)## RunningRun the validator as follows```./addon-validator <path to xpi> [-t <expected type>] [-o <output type>] [-v][--boring] [--selfhosted] [--determined]```The path to the XPI should point to an XPI file.<dl><dt>-t<dd>The type that you expect your add-on to be detected as. The list oftypes is listed below.<dt>-o<dd>The type of output to generate. Types are listed below.<dt>-v<dd>Enable verbose mode. Extra information will be displayed in verbose mode,namely notices (informational messages), Jetpack information ifavailable, extra error info (like contexts, file data, etc.), and errordescriptions. This only applies to `-o text`.<dt>--selfhosted<dd>Disables messages that are specific to add-ons hosted on AMO.<dt>--boring<dd>Disables colorful shell output.<dt>--determined<dd>Continue validating the remaining tiers of an add-on if one tier hasfailed. Certain high-tiered tests may inadvertently fail when this optionis enabled for badly malformed add-ons.<dt>--target-maxversion<dd>Accepts a JSON string containing an object whose keys are GUIDs andvalues are version strings. This will override the max version that theadd-on supports for the corresponding application GUID. E.g.:`{"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}": "6.*"}`<dt>--target-minversion<dd>Identical to `--target-maxversion`, except overrides the min versioninstead of the max.<dt>--for-appversions<dd>Accepts a JSON string containing an object whose keys are GUIDs andvalues are lists of version strings. If this list is specified,non-inlinecompatibility tests will only be run if they specificallytarget the applications and veresions in this parameter. E.g.:`{"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}": ["6.*"]}`</dl>### Expected Type:The expected type should be one of the following values:<dl><dt>any (default)<dd>Accepts any extension<dt>extension<dd>Accepts only extensions<dt>theme<dd>Accepts only themes<dt>dictionary<dd>Accepts only dictionaries<dt>languagepack<dd>Accepts only language packs<dt>search<dd>Accepts only OpenSearch XML files (unpackaged)<dt>multi<dd>Accepts only multi-item XPI packages</dl>Specifying an expected type will throw an error if the validatordoes not detect that particular type when scanning. All addon typedetection mechanisms are used to make this determination.### Output Type:The output type may be either of the following:<dl><dt>text (default)<dd>Outputs a textual summary of the addo-on analysis. Supports verbose mode.<dt>json<dd>Outputs a JSON snippet representing a full summary of the add-on analysis.</dl>## Output### Text Output Mode (default; `text`)In `text` output mode, output is structured in the format of onemessage per line. The messages are prefixed by their priority level(i.e.: "Warning: This is the message").At the head of the text output is a block describing what theadd-on type was determined to be.### JSON Output Mode (`json`)In `JSON` output mode, output is formatted as a JSON snippetcontaining all messages. The format for the JSON output is that of thesample document below.```js{"detected_type": "extension","errors": 2,"warnings": 1,"notices": 1,"success": false,"compatibility_summary": {"errors": 1,"warnings": 0,"notices": 0},"ending_tier": 4,"messages": [{"uid": "123456789","id": ["module", "function", "error"],"type": "error","message": "This is the error message text.","description": ["Description of the error message.","Additional description text"],"file": ["chrome/foo.jar", "bar/zap.js"],"line": 12,"column": 50,"context": [" if(foo = bar())"," an_error_is_somewhere_on_this_line.prototy.eval(\"whatever\");",null],"compatibility_type": "error","for_appversions": {"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}": ["5.0a2", "6.0a1"]},"tier": 2}],"metadata": {"name": "Best Add-on Evar","version": "9000","guid": "[email protected]"}}```#### JSON Notes:##### File HierarchyWhen a subpackage exists, an angle bracket will delimit the subpackagename and the message text.If no applicable file is available (i.e.: when a file is missing), the`file` value will be empty. If a `file` value is available within asubpackage, then the `file` attribute will be a list containing thename of the outermost subpackage's name, followed by each successiveconcentric subpackage's name, followed by the name of the file that themessage was generated in. If no applicable file is available within asubpackage, the `file` attribute is identical, except the last elementof the list in the `file` attribute is an empty string.For instance, this tree would generate the following messages:```package_to_test.xpi||-install.rdf|-chrome.manifest|-subpackage.xpi| || |-subsubpackage.xpi| || |-chrome.manifest| |-install.rdf||-subpackage.jar||-install.rdf``````js[{"type": "notice","message": "<em:type> not found in install.rdf","description": " ... ","file": "install.rdf","line": 0},{"type": "error","message": "Invalid chrome.manifest subject: override","description": " ... ","file": "chrome.manifest","line": 7},{"type": "error","message": "subpackage.xpi > install.rdf missing from theme","description": " ... ","file": ["subpackage.xpi", ""],"line": 0},{"type": "error","message": "subpackage.xpi > subsubpackage.xpi > Invalid chrome.manifest subject: sytle","description": " ... ","file": ["subpackage.xpi", "subsubpackage.xpi", "chrome.manifest"],"line": 5}]```##### Line Numbers and ColumnsLine numbers are 1-based. Column numbers are 0-based. This can beconfusing from a programmatic standpoint, but makes literal sense. "Lineone" would obviously refer to the first line of a file.##### ContextsThe context attribute of messages will either be a list or null. Nullcontexts represent the validator's inability to determine surroundingcode. As a list, there will always be three elements. Each elementrepresents a line surrounding the message's location.The middle element of the context list represents the line of interest. Ifan element of the context list is null, that line does not exist. Forinstance, if an error is on the first line of a file, the context mightlook like:```js[null,"This is the line with the error","This is the second line of the file"]```The same rule applies for the end of a file and for files with only one line.## TestingTests can be run with```bashpy.test tests/```Functional tests, which take longer, can be run with```bashpy.test functional_tests/```Then make a cup of tea while all of those tests run. It takes a while. If youhave more than two cores on your machine or you don't mind pwnage, you can tryto increase the number of parallel processes used for testing.## ReleasingFollow these steps to release a new version of the `amo-validator` Python package:1. Increment the `__version__` attribute at the top of`./validator/__init__.py`.2. Commit your change to the master branch and run `git push`.3. Tag master with the new version number, such as `git tag 1.9.8`.4. Push the new tag with `git push --tags`5. TravisCI will build and release a new version of `amo-validator`to PyPI from your tag commit.[Here is an example](https://travis-ci.org/mozilla/amo-validator/builds/90333989).## UpdatingSome regular maintenance needs to be performed on the validator in order tomake sure that the results are accurate.### App VersionsA list of Mozilla `<em:targetApplication>` values is stored in the`validator/app_versions.json` file. This must be updated to include the latestapplication versions. This information can be found on AMO:https://addons.mozilla.org/en-US/firefox/pages/appversions/### JS LibrariesLists of JS library hashes are kept to allow for whitelisting or warning. Thesemust be regenerated with each new library version. To update:```bashpython extras/update_hashes.py```To add new libraries to the mix, edit `extras/jslibfetcher.py` and add theversion number to the appropriate tuple.### JetpackIn order to maintain Jetpack compatibility, the whitelist hashes need to beregenerated with each successive Jetpack version. To rebuild the hash library,simply run:```bashcd jetpack./generate_jp_whitelist.sh```That's it!### Language PacksWith every version of every app that's released, the language pack referencesneed to be updated.We now have an automated tool to ease this tedious process. It is currentlydesigned to work on OS X with the OS X versions of Mozilla applications, thoughit could conceivably run on any \*NIX platform against the OS X applicationpackages.To run the tool, first create a new directory: `extras/language_controls/`Put the `.app` packages for each updated product into this directory. Oncethis is ready, simply run:```bashcd extraspython update_langpacks.py```That should be it. Note that this tool will fail horribly if any of the teamschange the locations that the various language files are stored in.Also note that this tool should only be run against the en-US versions of theseapplications.
amoveo-client
IntroductionAmoveo is a pretty new blockchain, the mainnet was launched on March, 2nd.it’s not a fork of any existing coin, but it implements number of interesting concepts: on-chain governance, oracles working on top of the coin itself, lightning channels, turing-complete smart-contracts on top of channels, and last but not least – prediction markets, they’re one of main purposes of the project.Amoveo shows steady growth of userbase and has number of services, implemented by 3rd parties, working with this coin: there’re mobile wallets, desktop app, mining pools etc.Right now it’s trading on two small exchanges not listed on CMC, and trade volume including OTC deals is like tens of BTCs per day.The project itself is open source and community-driven, its main developer is Zack Hess, former CTO of Augur and Aeternity.To find more information you can look throughhttps://amoveo.io– it’s community site, recently launched. Also, join the community athttps://t.me/amoveoInfrastructureTo work with API you need a running full node. Full node is written in Erlang and available from project repository athttps://github.com/zack-bitcoin/amoveoThe full node can be set up using instructions from official repo:https://github.com/zack-bitcoin/amoveo/blob/master/docs/getting-started/build_intro.mdOnce node’s up you need to sync it according tohttps://github.com/zack-bitcoin/amoveo/blob/master/docs/getting-started/sync.mdNB: it’s vital to switchsync_modetonormalafter the first sync (and after every restart).Also, take care of security, ‘causeepmdopens the maintenance port:https://github.com/zack-bitcoin/amoveo/blob/master/docs/getting-started/firewall.mdThe full node opens two ports: 8080 for external api, it should be visible from internet too to sync, and 8081 onlolistening for internal api (which is effectively erlang methods calls via HTTP).In case of troubles with sync, etc. you can use our own full node at 88.99.245.31:8080List of open full nodes is available onhttps://veoscan.ioNice public block explorer (supporting tx hashes) ishttps://explorer.veopool.pwGood reference of deposit/withdraw UI is onhttps://qtrade.ioInstall and useInstallpip install amoveo-clientExamplesInitAMOVEO_CONF = { 'EXPLORER': ..., 'NODE': ... } amoveo_client = AmoveoClient(AMOVEO_CONF)Create address and private keyaddress, private_key, passphrase = amoveo_client.generate_wallet()Get current balance It can return 0 if account has never been fundedbalance = amoveo_client.balance(address) balance_in_satoshi = amoveo_client.balance(address, in_satoshi=True)Get transaction by tx hashamoveo.get_tx(tx_hash)Get account transactionsamoveo.account_txs(address)Send transaction. CallAmoveo.send. It determines tx type needed, forms the transaction payload, serializes it and sends to full node. Please note, there should be at least 1 satoshi left on the account to make spending transaction correct (i.e. you can’t transfer the whole amount, just amount - 1 satoshi, excluding fee).acc = amoveo.account(_to) tx_typ = "create_account_tx" if acc == "empty" else "spend_tx" fee = 152168 if acc == "empty" else 61657 tx = amoveo_client.prepare_tx(tx_typ, amount, fee, _from, _to) sign = amoveo.sign(tx, private_key) transaction_id = amoveo_client.send_tx(tx, sign)Get current blockchain heightheight = amoveo_client.last_block()Get block and its tx’s. Response contains several nested arrays, first with transactions and theirs signatures (MQ…) and the second with theirs hashes in the corresponding order.block_data = amoveo_client.last_block(block_height)Pending transactions. Response contains current pending transactions. Unfortunately, they have no hashes included in response but one can map them using theirs signatures.amoveo_client.pending_tx()curl --request GET \ --url http://amoveo.node/ \ --header 'content-type: application/json' \ --data '["mempool"]'Other methodsamoveo_client.account(address)account not fundedcurl --request GET \ --url http://amoveo.node/ \ --header 'content-type: application/json' \ --data '["account", "BIkj6yP84pYqRP8LDjKnO6Ae4cQSP5NiX6x5jRpWUcYWyR87uM6pf90ZhAH/J0g3Fm35O+Kf6a0mAqzsuvTPmyU="]' > ["ok",0] # account not funded yet.account fundedcurl --request GET \ --url http://amoveo.node/ \ --header 'content-type: application/json' \ --data '["account", "BH8sPvGR4DqpnasL3zVJ9C068bPHbtBEOLV4rhEQvqt1Y8NH9ceXFozaFctuSaAtgb0SZ5kiuPxZZY6jGM+BDHw="]' > ["ok",["acc",74679577,25,"BH8sPvGR4DqpnasL3zVJ9C068bPHbtBEOLV4rhEQvqt1Y8NH9ceXFozaFctuSaAtgb0SZ5kiuPxZZY6jGM+BDHw=",0,"B2onx55azio9R/ndLoPk/26ohys8Ihj2bJK4m1XzZWA="]] [result, [request type, balance, ...]]
amoxibospdf
This is the homepage of our project.
ampache
AMPACHE LIBRARY FOR PYTHON3Upload to PyPIINFOA python3 library for interaction with your Ampache server using the XML & JSON APIhttps://ampache.org/API/Code examples and scripts are available from githubThe class documentation has been extracted out into a markdown file for easier reading.https://raw.githubusercontent.com/ampache/python3-ampache/master/docs/MANUAL.mdThere has been a pretty significant change in the library between Ampache 4 and Ampache 5.For anyone wanting to stay on v4 the branch has been separated from the master branch.https://github.com/ampache/python3-ampache/tree/api4Once you connect with your passphrase or api key, the url and auth token are stored allowing you to call methods without them.importampacheimporttime# connect to the serverampacheConnection=ampache.API()# if using password auth use encrypt_passwordmytime=int(time.time())passphrase=ampacheConnection.encrypt_password('mypassword',mytime)auth=ampacheConnection.handshake('https://music.com.au',passphrase,'my username',mytime)# if using an API key auth keep using encrypt_stringpassphrase=ampacheConnection.encrypt_string('my apikey','my username')auth=ampacheConnection.handshake('https://music.com.au',passphrase)# now you can call methods without having to keep putting in the url and userkeyampacheConnection.label(1677)# ping has always allowed empty calls so you have to ping with a url and session stillampacheConnection.ping('https://music.com.au',auth)NEWSPassword handshake auth is available now.This library now supports every Ampache API release (3, 4, 5 and 6)You can save and restore from a json config file using new methodsset_config_path: Set a folder to your config pathget_config: Load the config and set Ampache globalssave_config: Save the config file with the current globalsAMPACHE_URL = The URL of your Ampache serverAMPACHE_USER = config[“ampache_user”]AMPACHE_KEY = Your encrypted apikey OR password if using password authAMPACHE_SESSION = Current session auth from the handshake. Use to reconnect to an existing sessionAMPACHE_API = API output format “json” || “xml”INSTALLYou can now install from pip directly:pip3 install -U ampacheEXAMPLESThere is a fairly simple cli example for windows/linux to perform a few functions. It’s a good example for testing and might make things a bit easier to follow.https://raw.githubusercontent.com/ampache/python3-ampache/master/docs/examples/ampyche.pyampyche.py help:PossibleActions:/u:%CUSTOM_USER%(Customusernameforthecurrentaction)/k:%CUSTOM_APIKEY%(Customapikeyforthecurrentaction)/a:%ACTION%(ping,playlists,localplay,download,configure,logout,showconfig)/l:%LIMIT%(integer)/o:%OBJECT_ID%(string)/t:%OBJECT_TYPE%(song,playlist)/p:%PATH%(folderfordownloads)/f:%FORMAT%(raw,mp3,ogg,flac)/usb(splitfilesintonumeric0-9foldersforcarUSBs)/c:%COMMAND%(localplaycommand)(next,prev,stop,play,pause,add,volume_up,volume_down,volume_mute,delete_all,skip,status)Here is a short code sample for python using version 5.x.x+ to scrobble a track to your serverimporttimeimportampache# user variablesampache_url='https://music.server'my_api_key='mysuperapikey'user='myusername'# processed detailsampacheConnection=ampache.API()encrypted_key=ampacheConnection.encrypt_string(my_api_key,user)ampache_session=ampacheConnection.handshake(ampache_url,encrypted_key)ifampache_session:# Scrobble a music track to your ampache serverProcess(target=ampacheConnection.scrobble,args=('Beneath The Cold Clay','Crust','...and a Dirge Becomes an Anthem','','','',int(time.time()))).start()LINKShttps://github.com/ampache/python3-ampache/https://pypi.org/project/ampache/
ampalibe
AmpalibeVideo Tutorials·Documentation·Report BugAmpalibeis a lightweight Python framework for building Facebook Messenger bots faster. It provides a new concept, it manages webhooks, processes data sent by Facebook and providesAPI Messengerwith advanced functions such as payload management, item length, and more.Show your supportby giving a star 🌟 if this project helped you!InstallationpipinstallampalibeOR you can install dev versionpipinstallhttps://github.com/iTeam-S/Ampalibe/archive/refs/heads/main.zipif you use mysql as database, you have to installmysql-connectorormysql-connector-pythonwith ampalibepipinstallampalibe[mysql-connector]if you use postgresql as database, you have to installpsycopg2with ampalibepipinstallampalibe[psycopg2]if you use mongodb as database, you have to installpymongowith ampalibepipinstallampalibe[pymongo]Usagecommand-lineampalibeisampalibe.batforWindowsampalibecreatemyprojectOR$cdmyproject $ampalibeinitto run project, just useampaliberunfor dev mode withHot Reloadampaliberun--devRegister for an Access TokenYou will need to configure a Facebook application, a Facebook page, get the access to the page, link the application to the page, configure a webhook for your app before you can really start usingAmpalibe.This app setup guideshould helpORSeethis videoon YoutubeMinimal ApplicationimportampalibefromampalibeimportMessenger,Modelfromampalibe.messengerimportActionchat=Messenger()query=Model()@ampalibe.before_receive()defbefore_process(sender_id,**ext):# Put a view for each message receivedchat.send_action(sender_id,Action.mark_seen)[email protected]('/')defmain(sender_id,cmd,**ext):"""No need to manage weebhooks and data: messages are received directly in a main function"""chat.send_text(sender_id,'Enter your name')# define the function of the next treatmentquery.set_action(sender_id,'/get_name')@ampalibe.action('/get_name')defget_name(sender_id,cmd,**ext):query.set_action(sender_id,None)# clear current actionchat.send_text(sender_id,f'Hello{cmd}')# greeting with name enter by userDocumentationAmpalibe ReadthedocsOther resource[Youtube] Create a Facebook Bot Messenger with AMPALIBE Framework (EN)[Youtube] Tutoriel Framework Ampalibe (FR)[Youtube] Ampalibe Framework Episode (Teny Vary Masaka)DeploymentUsing containerGo to our dir project and run$dockerrun-d-v"${PWD}:/usr/src/app"-p4555:4555ghcr.io/iteam-s/ampalibeUsing heroku containerGo to heroku docs fordocker deploysChange your Dockerfile like thisFROMghcr.io/iteam-s/ampalibeADD./usr/src/app/# RUN pip install --no-cache-dir -r requirements.txtCMDampalibe-p$PORTrunCustomize your Dockerfile if necessaryUsing heroku pythonGo to heroku docs forGetting Started on Heroku with PythonDefine your Procfile like thisweb: ampalibe -p $PORT runOther plateform ?Maybe just runampalibe runin the right directory? or specify port if neededampalibe -p 1774 runAboutAmpalibe is a word of Malagasyorigin designating the fruit jackfruit.We have made a promise tokeep itlightmake iteasy to usedo itquickly to developContributorsCommunity📌 ExtensionAmpalibe extensionbyRaja RakotonirinaA VScode extension that allows the user to write a snippet of code using easy to remember prefixes📌 ModuleAmpalibe Odoo AddonsbyRivo LalainaAn Odoo module to synchronize the Ampalibe Framework with Odoo ERP.
ampapi
ampapi-pyAn API that allows you to communicate with AMP installations from within Python.Documentation for available API calls can be found by appending /API to the URL of any existing AMP installation.Support:Ping@thepotatoking3452in the#developmentchannel of theAMP DiscordMy owndevelopment DiscordInstallationpipinstallampapiorpipinstall'ampapi @ git+https://github.com/p0t4t0sandwich/ampapi-py.git'You also need the following packages installed:pipinstallrequestsaiohttpjsonNotesI've redone the return types, most should work, but if you find any that don't, please let me know.ExamplesCommonAPI Examplefromampapi.modules.CommonAPIimportCommonAPIdefmain():# If you know the module that the instance is using, specify it instead of CommonAPIAPI=CommonAPI("http://localhost:8080/","admin","myfancypassword123")API.Login()# API call parameters are simply in the same order as shown in the documentation.API.Core.SendConsoleMessage("say Hello Everyone, this message was sent from the Python API!")currentStatus=API.Core.GetStatus()CPUUsagePercent=currentStatus.Metrics["CPU Usage"].Percentprint(f"Current CPU usage is:{CPUUsagePercent}%")main()Async CommonAPI Exampleimportasynciofromampapi.modules.CommonAPIimportCommonAPIasyncdefmain():# If you know the module that the instance is using, specify it instead of CommonAPIAPI=CommonAPI("http://localhost:8080/","admin","myfancypassword123")awaitAPI.LoginAsync()# API call parameters are simply in the same order as shown in the documentation.awaitAPI.Core.SendConsoleMessageAsync("say Hello Everyone, this message was sent from the Python API!")currentStatus=awaitAPI.Core.GetStatusAsync()CPUUsagePercent=currentStatus.Metrics["CPU Usage"].Percentprint(f"Current CPU usage is:{CPUUsagePercent}%")asyncio.run(main())Example using the ADS to manage an instancefromampapi.modules.ADSimportADSAPI=ADS("http://localhost:8080/","admin","myfancypassword123")API.Login()# Get the available instancestargets=API.ADSModule.GetInstances()# In this example, my Hub server is on the second target# If you're running a standalone setup, you can just use targets[1]target=targets[1]hub_instance_id=""# Get the available instancesinstances=target.AvailableInstancesforinstanceininstances:# Find the instance named "Hub"ifinstance.InstanceName=="Hub":hub_instance_id=instance.InstanceIDbreak# Use the instance ID to get the API for the instanceHub=API.InstanceLogin(hub_instance_id,"Minecraft")# Get the current CPU usagecurrentStatus=Hub.Core.GetStatus()CPUUsagePercent=currentStatus.Metrics["CPU Usage"].Percent# Send a message to the consoleHub.Core.SendConsoleMessage(f"say Current CPU usage is{CPUUsagePercent}%")CommonAPI Example, handling the sessionId and rememberMeToken manually (not recommended)fromampapi.modules.CommonAPIimportCommonAPItry:API=CommonAPI("http://localhost:8080/")# The third parameter is either used for 2FA logins, or if no password is specified to use a remembered token from a previous login, or a service login token.loginResult=API.Core.Login("admin","myfancypassword123","",False)ifloginResult.success:print("Login successful")API.sessionId=loginResult.sessionIDAPI.Core.sessionId=loginResult.sessionID# API call parameters are simply in the same order as shown in the documentation.API.Core.SendConsoleMessage("say Hello Everyone, this message was sent from the Python API!")currentStatus=API.Core.GetStatus()CPUUsagePercent=currentStatus.Metrics["CPU Usage"].Percentprint(f"Current CPU usage is:{CPUUsagePercent}%")else:print("Login failed")print(loginResult)exceptExceptionaserr:# In reality, you'd handle this exception betterraiseException(err)
am-parser
NOTE: This package is no longer maintained.Simple parser for asciimath.amparser.parse(input)To enhance the formatting, iterate over the result.
amp-atomistics
# Amp: Atomistic Machine-learning Package #Ampis an open-source package designed to easily bring machine-learning to atomistic calculations. This project is being developed at Brown University in the School of Engineering, primarily by Andrew Peterson and Alireza Khorshidi, and is released under the GNU General Public License.Ampallows for the modular representation of the potential energy surface, enabling the user to specify or create descriptor and regression methods.This project lives at:https://bitbucket.org/andrewpeterson/ampDocumentation lives at:http://amp.readthedocs.orgUsers’ mailing list lives at:https://listserv.brown.edu/?A0=AMP-USERS(Subscribe page:)https://listserv.brown.edu/?SUBED1=AMP-USERS&A=1If you would like to compile a local version of the documentation, see the README file in the docs directory.LicenseThis program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.This program 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 this program. If not, see <http://www.gnu.org/licenses/>.InstallationYou can find the installation instructions for this version of Amp in the documentation filedocs/installation.rst.DocumentationWe currently host multiple versions of the documentation, which includes installation instructions, athttp://amp.readthedocs.io.You can build a local copy of the documentation for this version of Amp. You will find instructions to do this in the “Documentation” section of the filedocs/develop.rst.
ampcl
PointCloud-PyUsage提供点云处理的Python实现,本仓库正在进行大幅度地迭代,暂不建议使用安装安装依赖ROS1 / ROS2(如需要用到ROS的相关插件)Open3D(如果Python版本为3.10,需自行安装Open3D@ref)# pip 版本需要大于等于20.3$pip3install-Upip $pip3install--user--prehttps://storage.googleapis.com/open3d-releases-master/python-wheels/open3d-0.16.0-cp310-cp310-manylinux_2_27_x86_64.whl"构建工具$pip3install-Ubuild构建安装和安装包$gitclonehttps://github.com/Natsu-Akatsuki/PointCloud-PyUsage--depth=1$cdPointCloud-PyUsage# (推荐)非开发模式$bashinstall.sh# 开发模式$pip3install-e.Note非虚拟环境下,使用开发模式可能出现its build backend is missing the 'build_editable' hook的报错,则可能是系统级别的setuptools的版本覆盖了高版本的setuptools。通过如下命令行可查询当前的版本python3 -c "import setuptools; print(setuptools.__version__)"程序包名作用io导入和导出点云文件visualization点云可视化ros-utils动态调参,ROS消息类型和numpy类型的相互转换IO支持npy,pcd,bin点云文件的读取目前支持读取的字段包括xyz,xyzi# >>> import usage >>>frompointcloud_utils.ioimportload_pointcloud# low-level APIpointcloud=load_npy("../data/pointcloud.npy")pointcloud=load_txt("../data/pointcloud.txt")pointcloud=load_pcd("../data/pointcloud_ascii.pcd")# high-level API(支持npy, pcd, bin文件)pointcloud=load_pointcloud("pointcloud_utils/data/pointcloud.pcd")# >>> export usage >>>save_pointcloud(pointcloud,"pointcloud.pcd")Visualization可视化激光点云基于强度实现点云伪彩色增强frompointcloud_utils.ioimportload_pointcloudfrompointcloud_utils.visualizationimporto3d_viewer_from_pointcloudpointcloud=load_pointcloud("pointcloud_utils/data/pointcloud_ascii.pcd")withprint_durations(unit='ms'):o3d_viewer_from_pointcloud(pointcloud)命令行可视化点云基于Open3D的点云可视化,支持npy,pcd,bin点云文件的可视化目前支持的字段包括xyz,xyzi强度字段使用伪彩色增强$o3d_viewer<pointcloud_file># 如遇到KITTI数据集这种将强度进行过归一化的则需要加上-n选项$o3d_viewer-n<pointcloud_file>TODO用开发模式安装的包无法被Pycharm智能识别而不能实现补全(不论是否处于虚拟环境)使用github来构建安装包规范遵从pep660(setuptools至少需要v64.0才支持单个toml下的develop模式)(@ref)参考资料仓库参考ros_numpyROS1点云数据和numpy数据相互转换ros2_numpyROS1点云数据和numpy数据相互转换ddynamic_reconfigure_pythonROS1动态调参OpenPCDet神经网络算子和标定pykittiKITTI数据集读取livox_mapping基于强度值的伪彩色
amp-core
Failed to fetch description. HTTP Status Code: 404
ampcountpy
Some python functions to count the expected amplifications for genomic regions given a set of primer binding locations for amultiple displacement amplificationreaction. SeeampCountRfor more details.InstallationEasy installThe easy way to install is to just do:pip install ampcountpyGithubTo install the development version from github, clone the repository to a local directory using something like:git clone https://github.com/sherrillmix/ampcountpy.gitand runsetup.pyfrom the resulting directory (the–userinstalls it locally and doesn’t require root access):cd ampcountpy python setup.py install --user python setup.py testRun directlyThe module can be called directly using something like:python -m ampcountpy -f forward.txt -r reverse.txtor:ampcountpy -f forward.txt -r reverse.txtwhereforward.txtis a text file containing position of primer landing sites on the forward strand andreverse.txtis primer landing sites on the reverse strand. By default, amplification predictions are output to out.csv. The full details on options and arguments is available with:ampcountpy --helpUsing function in pythonThe main function ispredictAmplificationswhich can be used like:fromampcountpyimportpredictAmplificationsforwards=[1,2,3]reverses=[5,6,7]predictions=predictAmplifications(forwards,reverses)whereforwardsare the 5’-most base of primer landing sites on the forward strand andreversesare the 3’-most base of primers landing on the reverse strand.Changelog0.2.0 (2015-12-08)Count non-overlapping primers correctly0.1.3 (2015-11-02)Fix header0.1.2 (2015-11-02)Fix changelog formatting0.1.1 (2015-11-02)Pip install instructions0.1.0 (2015-11-02)Initial public release
ampcrowd_client
UNKNOWN
ampd
ampd - Asynchronous MPD client libraryCommunicate with a Music Player Daemon server using asyncio.Connection is established by a client object. Requests (MPD commands) are generated by executor objects, and are awaited for in asyncio coroutines. Each client has a root executor, and sub-executors can be constructed for grouping related requests.TasksAn AMPD task is an asyncio coroutine decorated [email protected]. The decorator ensures that the task is immediately scheduled for execution, and that cancellation (e.g., on close()ing the executor) is considered normal termination:@ampd.task async def task_example(): ... reply = await executor.request1(a, b) ... reply = await executor.request2() ...The request can be:a. AnMPD command(other thanidleornoidle). Returns when the server's reply arrives:await executor.play(5) reply = await executor.status()b. Idle request:reply = await executor.idle(event_mask, timeout=None)This emulates MPD'sidlecommand, with some improvements. The timeout is given in seconds. Possible event flags are:Event.<SUBSYSTEM>(in uppercase) orANYto match any subsystem.Event.CONNECT- client is connected to server.Event.IDLE- client is idle.Returns the mask of events which actually occurred, orEvent.TIMEOUTif timeout occurred.c. Command list:executor.command_list(iterable).
ampdata
AmpData API librayThis library is meant as a simple toolkit for working with data fromhttps://ampiato.com/(or equivalent services). Note that access is based on some sort of login credentials, this library is not all that useful unless you have a valid Ampiato account.InstallationYou can simply install/update the latest version of AmpData API python library with pip. Start a terminal (a shell) and use the following commandpipinstall-UampdataCopyright (MIT License)Copyright (c) 2024 Ampiato s.r.o.Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.AcknowledgementThis library started as a fork of wapi-python.
ampdLib
README.md rev. 10 Feb 2023 by Luca Cerina. Copyright (c) 2023 Luca Cerina. Distributed under the Apache 2.0 License in the accompanying file LICENSE.Automatic Multiscale-based Peak Detection (AMPD)ampdLib implements automatic multiscale-based peak detection (AMPD) algorithm as in An Efficient Algorithm for Automatic Peak Detection in Noisy Periodic and Quasi-Periodic Signals, by Felix Scholkmann, Jens Boss and Martin Wolf, Algorithms 2012, 5, 588-603.Python required dependenciesPython >= 3.6NumpyScipy for testsInstallationThe library can be easily installed with setuptools support usingpip install .or via PyPI withpip install ampdlibUsageA simple example is:peaks = ampdlib.ampd(input)AMPD may require a lot of memory (N*(lsm_limit*N/2) bytes for a given length N and default lsm_limit). A solution is to divide the signal in windows withampd_fastorampd_fast_subor determine a better lsm_limit for the minimum distance between peaks required by the use case withget_optimal_size.TestsThe tests folder contains an ECG signal with annotated peaks in matlab format.ContributionIf you feel generous and want to show some extra appreciation:
ampdup
ampdupA type-hinted async python mpd client library.Summaryampdupis an async/await based MPD library.It is fully type-hinted and MPD responses are typed as well, so it is able to play nicely withmypyand autocompletion such as what is provided byjedi.ExamplesFirst a basic usage example.make()returns a connected client as a context manager that handles disconnection automatically.asyncdefmain():asyncwithMPDClient.make('localhost',6600)asm:awaitm.play()The IdleClient class provides theidle()function. Sinceampdupisasync/await-based this loop can easily run concurrently with other operations.async def observe_state(): async with IdleClient.make('localhost', 6600) as i: while True: changed = await i.idle() handle_changes(changed)TodoSupport command lists.Support connecting through Unix socket.Support the more obscure MPD features such as partitions.
ampeg
AmpegAmpeg is a simple and lightweight package for parallel computation. It provides simple functions for scheduling and execution of a set of dependent or independent computational tasks over multiple processes using themultiprocessingpackage.RequirementsPython 2.7 or laterPython 3.4 or laterInstallationpip install ampegUsageAmpeg exposes a scheduling functionearliest_finish_time, an execution functionexecute_task_listsand aDependencyclass. The former takes a directed acyclic graph (DAG) and a number of processes and produces a set of task lists for each process and a corresponding set of task IDs for translating the execution result. These two form the input toexecute_task_lists, which returns a dict with the result of each task in the original graph.The DAG is represented by a python dict of vertices where each key is the ID of a task and each value is a triple of (function, args or kwargs, computation cost). Edges are implicitly defined by instances of theDependencyclass in the args or kwargs.A simple usage example computing (3^2 + 4^2) - (3^2 * 10/2):>>> import ampeg as ag >>> n_processes = 3 >>> my_graph = {0: (lambda x: x**2, 3, 10.8), 1: (lambda x: x**2, 4, 10.8), 2: (lambda x: x/2, 10, 11), 3: (lambda x, y: x + y, (ag.Dependency(0, None, 1), ag.Dependency(1, None, 1), 10.7), 4: (lambda x, y: x*y, (ag.Dependency(0, None, 1), ag.Dependency(2, None, 1)), 10.8), 5: (lambda x, y: x - y, (ag.Dependency(3, None, 1), ag.Dependency(4, None, 1)), 10.9)} >>> task_lists, task_ids = ag.earliest_finish_time(my_graph, n_processes) >>> ag.execute_task_lists(task_lists, task_ids) {0: 9, 1: 16, 2: 5, 3: 25, 4: 45, 5: -20}The Dependency classA dependency is a triple of (task ID or index, key (if any) and communication cost). The key may be a single key, index or slice, or it may be an iterable of such values to be applied in sequence. For example, the key('values', 2)extracts the value 5 from the dict{'values': [1, 3, 5]}. Dependency instances are created byampeg.Dependency(task, key, cost)where cost is optional and defaults to 0.ExceptionsAmpeg catches exceptions raised by individual tasks, returning them as results encapsulated in theErrclass. When anErrinstance is found among the dependencies for a task, the result for this task will be anErrinstance encapsulating aDependencyError.WindowsNote that under Windows, the functions and their arguments must all be picklable.
ampel
No description available on PyPI.
ampel-alerts
Alert support for AMPELEnables the processing ofalertsby AMPEL.The central class of this repository,ampel.alert.AlertConsumer, is capable of loading, filtering and "ingesting" these alerts.The loading part involves instrument specific classes.The optional filtering part allows the selection of events based on pre-defined rules. High-throughput systems, such as ZTF or LSST in astronomy, rely on such filters.Duringingestion, the content of alerts is saved into the AMPEL database, possibly together with other different documents which can be created according to pre-defined directives.TheAlertConsumeroperates on the first three tiers of AMPEL: T0, T1 and T2.Loading AlertPerformed by subclasses ofampel.abstract.AbsAlertSupplier.Concrete implementation examples:ampel.ztf.alert.ZiAlertSupplierActions break-down:Load bytes (tar, network, ...)Deserialize (avro, bson, json, ...)First shape (instrument specific): morph intoAmpelAlertorPhotoAlertPurpose: having a common format that theAlertConsumerand alert filters understand. APhotoAlerttypically contains two distinct flat sequences, one for photopoints and one for upperlimits. The associated object ID, such as the ZTF name, is converted into nummerical ampel IDs. This is necessary for all alerts (rejected one as well) since "autocomplete" is based on true Ampel IDs.Filtering AlertAlerts filtering is performed per channel, by subclasses ofampel.abstract.AbsAlertFilter. AnAlertConsumerinstance can handle multiple filters. Alert filters methods provided by user units are called by the classFilterBlock, that handles associated operations (what happens to rejected alerts ? what about auto-complete, etc...)FilterBlockinstances are themselves embedded inFilterBlocksHandlerFilters can return:FalseorNoneto reject an alert.Trueto accept the alert and create all t1/t2 documents defined in the alert processor directiveAnintnumber to accept the alert and create only the t1/t2 documents associated with this group id (as defined in the alert processor directive)Ingesting AlertIf any channel accepts a given alert, DB updates need to occur. v0.7 brought many updates regarding how ingestion happens. Class:ampel.alert.ChainedIngestionHandler,ampel.abstract.AbsDocIngesterMore details laterDirectivesNesting is chainingSecond shape: morph intoDataPointAlerts that pass any T0 filter are further shaped in order to fullfill some requirements for DB storage and easy later retrieval. Among other things, individual datapoints can be tagged during this step. For ZTF, upper limits do not feature a unique ID, so we have to build our own. Each datapoint is shaped into aampel.content.DataPointstructure.Implementation example:ampel.ztf.ingest.ZiDataPointShaperCompilersOptimize the number of created documentsIngestersCreate and upserts documents into the DB
ampel-argo
No description available on PyPI.
ampel-core
AMPEL-coreInformation about AMPEL is availablehere
ampel-hu-astro
AMPEL-HU-astroContributed Ampel units from HU/DESY groupDemo install instructions:Create environment with python 3.10+ / poetry. Then run:git clone https://github.com/AmpelProject/Ampel-HU-astro.gitcd Ampel-HU-astro/poetry install -E "ztf sncosmo extcats notebook"cd notebookspoetry run jupyter notebookThis will allow a number of Demo / access / development notebooks to be run. Note that most of them requires an access token if data is to be retrieved.Contains as of Nov 2022:T0SimpleDecentFilterLensedTransientFilterNoFilterRandFilterSEDmTargetFilterSimpleDecentFilterToOFilterTransientInClusterFilterTransientInEllipticalFilterXShooterFilterRcfFilterRedshiftCatalogFilterT2T2PanStarrThumbPrintT2PhaseLimitT2PS1ThumbExtCatT2PS1ThumbNedSNCosmoT2PS1ThumbNedTapT2LCQualityT2BrightSNProbT2TNSEvalT2InfantCatalogEvalT2RunSncosmoT2CatalogMatchLocalT2DigestRedshiftsT2RunPossisT2RunTDET2RunParsnipT2RunSnoopyT2MatchBTST2NedTapT2NedSNCosmoT2PropagateStockInfoT2GetLensSNParametersT2LSPhotoZTapT2ElasticcRedshiftSamplerT2TabulatorRiseDeclineT2XgbClassifierT2ElasticcReportT2FastDeclinerT3TransientInfoPrinterTransientViewDumperChannelSummaryPublisherSlackSummaryPublisherRapidBaseRapidSedmRapidLcoTNSTalkerTNSMirrorUpdaterTransientTablePublisherHealpixCorrPlotterPlotLightcurveSampleElasticcClassPublisherVOEventPublisher
ampel-interface
Ampel-interfaceampel-interfaceprovides type-hinted abstract base classes forAmpel.
ampel-ipython
No description available on PyPI.
ampel-lsst
LSST plugin for AMPELLSST-specific implementations for Ampel such as:AnAlertSuppliercompatible with plasticc generated alertsShaper classes for ingestion
ampel-nuclear
Ampel-nuclearCentral repository to host AMPEL code to search for and analyze nuclear transients. At the moment, this is exclusively code from the ZTFbh science working group.InstallationPrerequisitesYou need to export environment variables for theAMPEL ZTF archive(tokens are availablehere), forFritz, and for the dropbox API (ask Sjoert).Furthermore, you need a running instance ofMongoDB. On macOS, make sure you have the command line tools installed (in doubt, runxcode-select –install).SetupCreate a fresh Python 3.10 conda envconda create -n tde_filter_upgrade python=3.10 conda activate tde_filter_upgradeInstall is done via poetry:pip install poetry git clone https://github.com/AmpelProject/ampel-nuclear cd Ampel-nuclear poetry installNow we have to build the ampel config and install it in the conda env. Issueampel config installNote: this will throw some import errors, but you can ignore these because those packages are not needed locally.Now you need to export the following tokensexport AMPEL_ARCHIVE_TOKEN='' export DROPBOX_TOKEN='' export FRITZ_TOKEN=''TestTo run the test, start your local MongoDB. And then issue./run_tde_scan.py -iIf you cannot execute the file, issuechmod +x run_tde_scan.py.Note: To push the result of a run to the dropbox, add-p.The-iinitiates (and saves) a new archive API stream token. To request one day, use-d YYYY-MM-DDfor a certain day. The script will request alerts for the 24 hours after this date.Your can also use--daysago nto scan the lastndays.Note: When requesting a full day with-dor the lastndays with--daysago nfrom the archive, the first run will probably fail, as the archive database has not fully ramped up yet (URL is locked). In this case, just rerun./run_tde_scan.py, without any parameters except for-pif you want to enable dropbox-push to prevent requesting a new stream token and overwriting the current one until the archive starts serving alerts (you will see them getting ingested).To check the output, go to thetempdirectory that gets created when script is run without-p(push to dropbox), or check the dropbox.To see all available commands of the test script, run./run_tde_scan.py -h.Examples./run_tde_scan.py -i --daysago 4 -pThis will perform a search for the last 4 days and push the results to the dropbox../run_tde_scan.py -i -d 2022-10-06This will perform a search for October 6, 2022 and save the result in a local directory.
ampel-photometry
No description available on PyPI.
ampel-plot
Ampel-plotprovides:a standardized document structure calledSVGRecordfor saving plots into the ampel DBa model for configuring plot properties in unit config:PlotPropertiesmethods for converting matplotlib figures into SVG dictionaries
ampel-plots
No description available on PyPI.
ampel-ztf
ZTF support for AMPELZTF-specific implementations for Ampel such as:AnAlertSuppliercompatible with IPAC generated alertsShaper classes for ingestionEncoding utilities for ZTF names (AMPEL requires integer ids)Classes for archiving alerts
ampel-ztf-archive
ZTF alert archive for AMPELThis package provides an API to store the elements of ZTF alerts in a postgres database, de-duplicating repeated elements of the alert history. It also supports basic history queries by object id, sky coordinates, and time.
ampere
Ampere - Advanced Model Package for ElectRochemical ExperimentsAmpereis a Python module for working with battery models.Using ascikit-learn-like API, we hope to make visualizing, fitting, and analyzing impedance spectra more intuitive and reproducible.Ampere is currently in the alpha phase and new features are rapidly being added.If you have a feature request or find a bug, please feel free tofile an issueor, better yet, make the code improvements andsubmit a pull request! The goal is to build an open-source tool that the entire electrochemical community can use and improveAmpere currently provides:A simple API for fitting, predicting, and plotting discharge curvesA simple API for generating data, or fitting with arbitrary charge / discharge patterns.InstallationDependenciesAmpere requires:Python (>=3.5)SciPy (>=1.0)NumPy (>=1.14)Matplotlib (>=2.0)Cython (>=0.29)Several example notebooks are provided in the examples/ directory. Opening these will require Jupyter notebook or Jupyter lab.User InstallationThe easiest way to install Ampere is using pip:pip install ampereHowever, it depends on Cython and Microsoft c++ libraries in order to install (on windows). Those should be added as follows:pip install --upgrade cython setuptoolsfollowthese instructionsto install the proper c++ libraries using Microsoft tools.That may or may not work, depending upon your system. An alternative method of installation that works is:git clone https://github.com/nealde/ampereI've recently added the Cython-generated c files back to the repo, so it may be as simple as:cd amperepython setup.py installHowever, if that doesn't work, the following will rebuild the files:cd ampere/models/P2Dpython setup.py build_ext --inplacecd ../SPMpython setup.py build_ext --inplaceThis will build the local C code that is needed by the main compiler. Then, you can cd back up to the main folder andpython setup.py installThat will typically work. I'm still working on getting pip installation working, and it will likely require some package modifications, following SKLearn as a guide.Examples and DocumentationExamples and documentation will be provided after my Defense, which is set for the end of May.On the HorizonCurrently, all models are solved with Finite Difference discretization. I would love to use some higher order spatial discretizations.Currently, the results have not been verified with external models. That is still on the to-do list, and to incorporate those values into the test suite would be excellent.Some of my published work regarding surrogate models for solving and fitting will be implemented once they are fully fleshed out.Add ability to serialize / deserialize models from disk, to save the result of an optimizationadd ability to have custom Up / Un functions for different battery chemistriesadd documentation / fix docstrings to be accurateadd Latex equations and node spacings
ampersand
The really,reallyminimalistic static site generator. Manage translations statically, without any pesky JavaScript for rendering dynamic chunks of localized text.FeaturesSeparate key phrases (or everything, for that matter) into “modals” and localized content files.Create includes such as site-wide headers and footers to reduce repetition.Avoid copy and pasting the same content several times with global translations.Keep things simple with Mustache templates.Extend Ampersand with plugins written in Python.The problemTraditionally, managing translations of a website statically would look something like this:__ root | |__ scripts | |__ scripts.js | |__ styles | |__ styles.css | |__ lang |__ en | |__ index.html | |__ about.html | |__ ... | |__ fr |__ index.html |__ about.html |__ ...Here, we have a website with two or more English pages that we also translated into French. This works, but what happens when I want to make some changes toindex.html? Now, I need to copy those changes over to thefrfolder and adapt. When these phrases are wrapped with new UI components, It gets worse the more languages you add.The solutionA problem like this would take a static site generator to solve, but not just any static site generator would do the trick. This generator must have a focus on translation, allowing you to build several copies of the same page based on different localization files.Now, you can leave the translation to the globalization team and focus on your code.PhilosophySo as you can tell, Ampersand is a pretty straightforward static site generator. Some may even argue that it doesn’t do much. This is because Ampersand is aminimalisticstatic site generator. But of course, all static site generators mention minimalism in their mission statement so saying it here doesn’t mean much. Never the less, Ampersand aims to do what it’s supposed to do without jumping through too many hoops that don’t help it achieve its goal.InstallationSetting up Ampersand is fairly simple if you havepip. For those of you who don’t,python.orghas it documented.$ pip install ampersandFor a bleeding edge and developer version, you can clone the repository:$ git clone https://github.com/natejms/ampersand.git $ cd ampersand $ pip install .To learn more about the usage of Ampersand, check outthe documentationContributingInterested in making a contribution? Here’s a few places where you might be able to help out:Contribute patches and help develop new featuresDevelop a plugin for AmpersandWork to improve the documentationHelp spread the wordMore information can be found in the CONTRIBUTING.md file of this repository.
amp-flow
No description available on PyPI.