package
stringlengths 1
122
| pacakge-description
stringlengths 0
1.3M
|
---|---|
affo-deeplink | AFFO DeeplinkVersion1.0.1Webhttps://affo.io/Downloadhttps://pypi.org/affoio/affo-deeplink/Sourcehttps://github.com/affoio/affo-deeplink/Keywordspython, deeplink, service, affiliateInstallationpip install affo-deeplinkTestsTo run the test suite execute the following command in package root
folder:python setup.py test |
affo-email-client | AFFO Email ClientA simple python interface for the email service.InstallationVersion1.0.1Webhttps://affo.io/Downloadhttps://pypi.org/affoio/affo-email-client/Sourcehttps://github.com/affoio/affo-email-client/Keywordspython, email, service, clientpip install python-email-clientUsageThe example below shows how you get an informimportaffo_email_clientclient=affo_email_client.Client(api_root_url="https://localhost/api/v1.0/")client.message.create(body={"from_":"[email protected]","to":["[email protected]"],"subject":"Hello","html":"","text":"","tag":"test"}) |
affo-email-service | AFFO Email ServiceVersion1.0.3Webhttps://affo.io/Downloadhttps://pypi.org/affoio/affo-email-service/Sourcehttps://github.com/affoio/affo-email-service/Keywordspython, email, serviceInstallationpip install affo-email-serviceTestsTo run the test suite execute the following command in package root
folder:python setup.py test |
affo-event-service | AFFO Event ServiceVersion1.0.1Webhttps://affo.io/Downloadhttps://pypi.org/affoio/affo-event-service/Sourcehttps://github.com/affoio/affo-event-service/Keywordspython, email, serviceInstallationpip install affo-event-serviceTestsTo run the test suite execute the following command in package root
folder:python setup.py test |
affogato | No description available on PyPI. |
affordable | AffordableAn abstraction layer to facilitate RL environment developing.ConceptsGameWorldAgentAffordableActionStateEmbeddingHow to releasepython3setup.pysdistbdist_wheel
python3-mtwineuploaddist/*
gittagva.b.cmaster
gitpushoriginva.b.c |
affo-sms-service | AFFO SMS ServiceVersion1.0.5Webhttps://affo.io/Downloadhttps://pypi.org/affoio/affo-sms-service/Sourcehttps://github.com/affoio/affo-sms-service/Keywordspython, sms, serviceInstallationpip install affo-sms-serviceTestsTo run the test suite execute the following command in package root
folder:python setup.py test |
affo-user-service | AFFO User ServiceVersion1.0.4Webhttps://affo.io/Downloadhttps://pypi.org/affoio/affo-user-service/Sourcehttps://github.com/affoio/affo-user-service/Keywordspython, user, serviceInstallationpip install affo-user-serviceTestsTo run the test suite execute the following command in package root
folder:python setup.py test |
affprop | affinity-propagation-python |
affprop-THIESBEN | Failed to fetch description. HTTP Status Code: 404 |
affresco-api | Failed to fetch description. HTTP Status Code: 404 |
afg | No description available on PyPI. |
afgutils | Shared support functions |
afh-dl | Python command-line tool for downloading from AndroidFileHost.Options-h,--help- Display available options & option information.-i,--interactive- Use the interactive downloading mode. You will
be queried for a download link, and then to pick the server you wish to
download from.-l,--link- Only used if you do not specify interactive mode. This
will automatically choose the first provided mirror for downloading. |
afid | No description available on PyPI. |
afids-cnn | afids-NNUtilizing the anatomical fiducals framework to identify other salient brain regions and automatic localization of anatomical fiducials using neural networksProcessing data for trainingConvert3DAnatomical landmark data (AFIDs)Convert3D:.fcsv -> threshold image -> landmark distance map (could be considered probability map)distance map used for trainingStructural T1w imagingConvert3D:brainmask.nii -> 3D patches sampled at x voxelsmatching of distance maps and anatomical imaging patches is crucial for proper training |
afids-regrf | afids-regRF |
afids-utils | Anatomical Fiducials (AFIDs) Utility ToolsTheafids-utilspackage provides common utilities for projects involving
anatomical fiducials (AFIDs). For a comprehensive list of available utilities
refer to thedocumentationpage.Installationafids-utilscan be installed using pip:pipinstallafids-utilsTo also include plotting functionality (this will installmatplotlib,plotly, andnilearn):pipinstallafids-utils[plotting]Contributingafids-utilsis an open-source project and contributions are welcome! If you
have any bug reports, feature requests, or improvement suggestions, please
submit them to theissues page.To contribute, first click the "fork" button to create your own copy of the
repository and then clone the project to your local machine:gitclonehttps://github.com/your-username/afids-utils.gitNavigate to the location where the directory was cloned and add the upstream
repository:cdafids-utils
gitremoteaddupstreamhttps://github.com/afids/afids-utils.gitNow,git remote -vwill show two remote repositories:upstream, referring to theafidsrepositoryorigin, your personal forkTo the pull the latest changes from the code:gitcheckoutmain
gitpullupstreammainTo develop and push your contribution to your copy of the repository:gitcheckout-bcontribution-name
gitpushorigincontribution-nameOnce pushed, a pull request can be opened, at which point the contribution
will be reviewed by a maintainer of theafids-utilsrepository.Poetryafids-utilsdepedencies are managed with Poetry - please
refer to thePoetry websitefor installation instructions. Following the
installation of Poetry, the development environment can be set up from the
local repository location by running the following commands:poetryinstall--withdev--all-extrasPoetry usespoethepoetas a task runner. You can see what commands are
available by running:poetryrunpoeTests are performed withpytestand can be run via:poetryrunpoetestAdditionally,afids-utilsmakes use of a number of libraries to lint and
format code, which can be invoked by running the following:poetryrunpoesetupThis sets up a pre-commit hook, which runs the necessary checks every time
a commit is performed. Alternatively, if you don't wish to use the pre-commit
hook, you can run the following manually, which performs the same checks:poetryrunpoequalityPlease ensure these all pass before making a pull request. |
afif | No description available on PyPI. |
afilio.py | UNKNOWN |
afilnet | This package is designed to be an easy way to use Afilnet API services. You can send SMS, email and voice notifications using your Afilnet account.You only need an Afilnet account with enought credits.
If you do not have an account, you cancreate itin a few minutes.InstallationYou can use pip to install this package.
Go to your terminal and run: pip install afilnetEasy to useYou only need to call the moduleurls.py+ service:res=afilnet.sendSMS("MyAfilnetUsername","MyAfilnetPassword","To","This is a test message","From")Then you will receive the result in json.Available ServicesThere are 4 channels availables:
- General
- SMS
- Email
- VoiceThis library use the structure:res=afilnet.service(params)General has two services:
- getBalance (Get balance of your account)
- isUser (Return if user is valid or not)This service return a booleanSMS, Email and Voice have the same services:
- send (Send to a single user)
- sendFromTemplate (Send to a single user using a template)
- sendToGroup (Send to a defined group)
- sendToGroupFromTemplate (Send to a defined group using a template)
- getDeliveryStatus (Get delivery status of a message)## SMSsendSms(username, password, to, message, sender, scheduledatetime=””)sendSmsFromTemplate(username, password, to, idTemplate, params, scheduledatetime=””)sendSmsToGroup(username, password, sender, countryCode, idGroup, msg, scheduledatetime=””)sendSmsToGroupFromTemplate(username, password, countryCode, idGroup, idTemplate, scheduledatetime=””)## EmailsendEmail(username, password, subject, to, message, scheduledatetime=””):sendEmailFromTemplate(username, password, to, idTemplate, params, scheduledatetime=””)sendEmailToGroup(username, password, subject, idGroup, msg, scheduledatetime=””)sendEmailToGroupFromTemplate(username, password, idGroup, idTemplate, scheduledatetime=””)## VoicesendVoice(username, password, to, message, lang=””, scheduledatetime=””)sendVoiceFromTemplate(username, password, to, idTemplate, params, scheduledatetime=””)sendVoiceToGroup(username, password, countryCode, idGroup, msg, scheduledatetime=””)sendVoiceToGroupFromTemplate(username, password, countryCode, idGroup, idTemplate, scheduledatetime=””)## UsergetBalance(username, password)isUser(username, password) |
afilter | No description available on PyPI. |
afilter-vsp | No description available on PyPI. |
afinder | >>>fromafinderimportafind>>>afind(your_obj,'something-to-find')['obj.attribute.something','obj.attribute.moha:"something is here"']InstallationTo install Afinder, simply:$pipinstallafinder |
afinipy | Afinipy is a, CLI, python package that builds your init files for you.
It works by, recursively, parsing the directory and modules using Python’s Abstract Syntax Trees.
Afinipy features two modes, top-level and recursive. The top-level mode builds a single__init__at
the root directory even if modules are located into subdirectories. The recursive mode will build a__init__for each subdirectory. For additional options see the usage section below or the notebook
in the examples directory.All ‘private’ functions, those starting with an underscore, are excluded from the init. Optionally,
additional functions, classes or the contents of a directory can be excluded by specifying them in
a file and passed to theexclusion_pathparameter.
All functions or all classes can be excluded by, respectively, specifying–exclude ‘functions’or–exclude ‘classes’Seehttps://github.com/RUrlus/afinipyfor details |
afinn | AFINN sentiment analysis in Python: Wordlist-based approach for sentiment analysis.Examples>>> from afinn import Afinn
>>> afinn = Afinn()
>>> afinn.score('This is utterly excellent!')
3.0In Danish:>>> afinn = Afinn(language='da')
>>> afinn.score('Hvis ikke det er det mest afskyelige flueknepperi...')
-6.0With emoticons:>>> afinn = Afinn(emoticons=True)
>>> afinn.score('I saw that yesterday :)')
2.0With multiple sentences (here with data from an Austen novel available in Gutenberg):>>> from afinn import Afinn
>>> from nltk.corpus import gutenberg
>>> import textwrap
>>> afinn = Afinn()
>>> sentences = (" ".join(wordlist) for wordlist in gutenberg.sents('austen-sense.txt'))
>>> scored_sentences = ((afinn.score(sent), sent) for sent in sentences)
>>> sorted_sentences = sorted(scored_sentences)
>>> print("\n".join(textwrap.wrap(sorted_sentences[0][1], 70)))
To attach myself to your sister , therefore , was not a thing to be
thought of ;-- and with a meanness , selfishness , cruelty -- which no
indignant , no contemptuous look , even of yours , Miss Dashwood , can
ever reprobate too much -- I was acting in this manner , trying to
engage her regard , without a thought of returning it .-- But one
thing may be said for me : even in that horrid state of selfish vanity
, I did not know the extent of the injury I meditated , because I did
not THEN know what it was to love .CitationIf you as a scientist use the wordlist or the code please cite this one:Finn Årup Nielsen, “A new ANEW: evaluation of a word list for sentiment analysis in microblogs”, Proceedings of the ESWC2011 Workshop on ‘Making Sense of Microposts’: Big things come in small packages. Volume 718 in CEUR Workshop Proceedings: 93-98. 2011 May. Matthew Rowe, Milan Stankovic, Aba-Sah Dadzie, Mariann Hardey (editors)Paper with supplement:http://www2.imm.dtu.dk/pubdb/views/edoc_download.php/6006/pdf/imm6006.pdfSee alsohttp://neuro.compute.dtu.dk/wiki/AFINN- Brede Wiki entry on AFINN with pointers to many scientific papershttps://github.com/darenr/afinn- Sentiment analysis in Javascript with AFINN word listTravis et al. |
afinn-gaming | No description available on PyPI. |
afip | python-afipPython package to interact with some of Argentina's AFIP Web services.NOTE: UNDER DEVELOPMENT. NOT FULLY IMPLEMENTEDIt implements programmatic interfaces for the following services:WSAA: the token-granting service.WSFE: the invoicing ("factura") service for the local market (type "C" invoices). [PARTIALLY IMPLEMENTED]WSFEX: the invoice service for export operations (type "E" invoices).WS_SR_PADRON_A5: tax payer information service (query to get info for your invoices).WS_SR_PADRON_A13: same as above, but output is different.It's designed to contain anything amonotributistafreelancer reasonably needs to issue
and manipulate invoices, presumably to send something that doesn't look completely horrendous and
unprofessional to clients (I'm looking at you, RECE et al.)This is a Python 3 ONLY library, seeing as Python 2.7 will reach end of life in short order.This package only contains the base interfaces to interact with AFIP's Web services. It doesn't
implement a DB backend to store things on, an administrative interface of any kind, or an invoice/receipt
template-to-PDF generator. It does, however, include a CLI utility to test things out.Tested only on Linux as that's what I use, but there is nothing platform-specific about it. If you
use it on Mac/Windows/whatever and it something doesn't work, kindly submit a pull request or at least
file a bug.Contribution in the form of bug fixes, documentation, code improvements, tests, support for additional
services.You might notice there is another package available for Python to interact with AFIP's services called
pyafipws and you might be wondering why use this one instead. To that, I can tell you why I'm writing
it:This is a simpler, one-function-one-package sort of deal. Use it to build something else.It runs on Python 3 (and only Python 3) out of the box.The code is simpler/cleaner to understand.This package tries to abstract away (i.e. hide) the inherent ugliness and the sea of inconsistencies
in the native interfaces and gives you more natural data structures that don't make you feel like you
are dealing with an ugly pile of XML documents and related SOAP awfulness. Because you are not, I am,
so you don't have to.And just to be fair, a few reasons not to use it:You want something established and better tested.You need services not currently supported.You don't care about Python 3 (though you should, really, it's pretty sweet).You aren't looking to integrate this into something else. You want a fully built out solution.TODODocument how to get valid certificates.Document basic usage of each service.Document API in code for API reference doc gen.Implement WSFE.Test WSFE in production.Test WSFEX in production.Implement output of invoices into whatever storage format AFIP requires as well as something
nicer to deal with.LoggingIn the event anything goes wrong either in this package or in your own application code, and given the
irrevocable nature of issuing an invoice through AFIP (why?!), good logging is essential. So, all
interfaces run a logging plugin on the underlying SOAP client.All you need to do is pass thelog_dirargument to the constructor of any WS client. You'll get
jsonlines-formatted files with every request and response sent/received along with the raw XML and
timestamps for whatever service you called.I strongly encourage you to use this. Worst-case scenario, you'll have a small log directory to
clean up every now and then.DocumentationFor now, this file is all the documentation you get. I'll be adding to it over the coming days/weeks. However,
here are some pointers:AFIP has documentation on how to get working certificates (start with a testing certificate only).Play with the CLI tool. It can call anything that's implemented and lets you interact with the different web
services. Run "python -m afip --help" to get started.Load your certificate into the CLI tool with theprofilesub-command.Get usable tokens (they'll be stored for your convenience) from the WSAA service via the wsaa sub-command.
Try "python -m afip wsaa authorize wsfex".Interact with services you've requested tokens for (they expire after 12 hours) with the appropriate sub-command.
Try "python -m afip wsfex country_cuits".To see how to use it in code, import the appropriate client from the appropriately-named module and instantiate it
with an afip.credentials.AFIPCredentials object, a log dir, and a Zeep cache of some sort. The last 2 are optional,
but a log directory will give you crucial debugging information and a Zeep cache will speed up your app as Zeep
(the SOAP client library) will be able to cache WSDL files. See afip.ws.WebServiceTool for a working example;
specifically, the constructor and thehandlemethod. There is also an example of how to use each individual
method of a client in the same file the client is defined, in the code for the CLI sub-command for it (look for
a sub-class of WebServiceTool). |
afipcaeqrdecode | PyPI python packageAFIP invoice pdf qr CAE extract and decodeThis is a python package that usespdf2imageto convert the first page of your AFIP invoice with an AFIP CAE QR code to an image, and then runqreaderon it in order to locate and decode the AFIP CAE QR code in order to extract relevant invoice metadata like:Invoice dateCUIT of invoice creatorAFIP electronic invoice point of sale (Punto de venta)Invoice numberAmountCurrencyCUIT of inovoice recipientAnd other less important properties.Why qreader instead of pyzbarIn its inception this library used justpyzbar, however we came upon some QR codes which did not decode succesfully using justpyzbar.qreaderdepends onpyzbar, but uses a pre-trained AI model to detect and segment QR codes, using information extracted by this AI model, it applies different image preprocessing techniques that heavily increase the decoding rate bypyzbarExample Usage and notes about metadataUsing the included sample files for demonstration (and ran from repository root using included sample file):from afipcaeqrdecode import get_cae_metadata
invoice_metadata = get_cae_metadata('./tests/sample_files/2000005044986390.pdf')Here, invoice metadata will evaluate to:{"ver":1,"fecha":"2023-02-10",#I've found this field to be missing in some decodes"cuit":30710145764,"ptoVta":4,"tipoCmp":1,"nroCmp":25399,"importe":2460,"moneda":"PES","ctz":1,"tipoDocRec":80,"nroDocRec":30717336905,"tipoCodAut":"E","codAut":73064176949471}#The actual output will not be pretty printed, it will be stripped of all whitespace and formatting charactersSalvaging bad QR code z-indexing on invoices, bad AFIP CAE urls, and bad JSONSome bad PDFs have other images overlapping on the AFIP CAE QR code, so we implemented a second run codepath that usesPyMuPDFin order to extract all images inside the invoices and then runqreaderon them.In cases in which the construction of the AFIP CAE QR url was done incorrectly or have some parts missing, we try to decode anyways.We came upon many decoded metadatas with bad json that had to be repaired in the consumer application, with this in mind we included [json-repair] (https://pypi.org/project/json-repair/) by and turn it on by default.System Dependencies and their installationThis package depends onqreader, which in turn depends onpyzbar, which in turn depends on the system library zbarZBarCheck your OS documentation on what package to install to get ZBar working with pyzbar.On Linux (Ubuntu 22.04):sudo apt-get install libzbar0On Mac OS X:brew install zbarInstallation using pipAfter installing system dependencies, you can install using thePyPI python packagepip install afipcaeqrdecodeFirst run noticeOn first runqreaderwill download the weights to run its QR detector AI model, then it will resume program operation automatically.WARNINGThis is an experimental package, USE IN PRODUCTION AT YOUR OWN RISK.It is barely even tested, i'm sharing it so I can actually import it as a PyPI package in another project that consumes it.CreditsAll the other library authors this package depends on.
Facundo Mainere for helping with JWT decode.Author: Emiliano Mesquita.LicenseGNU LGPLv3. |
afip.py | Afip.pyLibrería para conectarse a los Web Services de AFIP en PythonExplorar documentación »Reportar un bugDocumentaciónExplorar documentaciónAcerca del proyectoCon más de 60k descargas, desde el 2017 Afip SDK es la librería elegida por los desarrolladores para integrar sus plataformas con AFIP.Esta librería fue creada con la intención de ayudar a los programadores a usar los Web Services de AFIP sin romperse la cabeza ni perder tiempo tratando de entender la complicada documentación que AFIP provee.ContactoAfip SDK [email protected] del proyecto:https://github.com/afipsdk/afip.pyEste software y sus desarrolladores no tienen ninguna relación con la AFIP. |
afip-ws | afip-wsPython library to easily interact with AFIP Web Services |
afire | Python AfireFork frompython-fire.Python AFire is a library for automatically generating command line interfaces
(CLIs) from absolutely any Python object.Python Afire is a simple way to create a CLI in Python.[1]Python Afire is a helpful tool for developing and debugging Python code.[2]Python Afire helps with exploring existing code or turning other people's
code into a CLI.[3]Python Afire makes transitioning between Bash and Python easier.[4]Python Afire makes using a Python REPL easier by setting up the REPL with the
modules and variables you'll need already imported and created.[5]Python Afirefully support type hint.InstallationTo install Python Afire with pip, run:pip install afireTo install Python Afire with conda, run:conda install afire -c conda-forgeTo install Python Afire from source, first clone the repository and then run:poetry installBasic UsageYou can callFireon any Python object:functions, classes, modules, objects, dictionaries, lists, tuples, etc.
They all work!Here's an example of calling Fire on a function with type hint, it will automatically recognize and convert types according to your hype hint.importafirefrompathlibimportPathdefhello(path:Path):assertisinstance(path,Path)if__name__=='__main__':afire.Fire(hello)Then, from the command line, you can run:pythonhello.py--path=/root# No errorpythonhello.py--help# Shows usage information.Here's an example of calling Fire on a function with nested type hint.importafirefromtypingimportDict,Union,Setdeftest(a:Union[Dict[str,int],Set[bytes]]):# check typesassertisinstance(a,(Dict,Set))# check types in dict or setifisinstance(a,Dict):fork,vina.items():assertisinstance(k,str)assertisinstance(v,int)else:foriina:assertisinstance(i,bytes)print(a)if__name__=='__main__':afire.Fire(test)Then, from the command line, you can run:# dict typepythontest.py--a='{1: 2}'# {'1': 2}# or use position argpythontest.py'{1: 2}'# {'1': 2}# set typepythontest.py--a='{a, b, c}'# {b'a', b'b', b'c'}Type conversion rulesCurrently support input types:typeexamplestr"a"int1bytesb"a"List[x, y, z]Dict[x: y]Set{x, y, z}Tuple(x, y, z)note: you can use str or bytes expr in complex type, e.g. [b"x", b"y"]Rulestrintbytes<- inputstr***intcan be converted to int*xbytes*(utf8)*(length 8, big order)*datetime/dateformat: YYYY-MM-DD-HH:MM:SSxxformat: YYYY-MM-DD HH:MM:SSformat: YYYY/MM/DD HH:MM:SSformat: YYYYMMDDHHMMSSformat: YYYY/MM/DDformat: YYYY-MM-DDany type with one parameterif supportif supportif supportif supporte.g. Path, float^ type hint*: any kind of input will convertx: not support to convertLicenseLicensed under theApache 2.0License.DisclaimerThis is not an official Google product. |
afisha-sentry-telegram-plugin | This is a security placeholder package.
If you want to claim this name for legitimate purposes,
please contact us [email protected]@yandex-team.ru |
afisys-monitor | No description available on PyPI. |
afitop100 | No description available on PyPI. |
afivmax | afivmax安装pip install afivmax使用fromafivmax.afivmaximportafiv_max# argsassert3==afiv_max(1,2,3)assert3==afiv_max(3,3,3)# args with keyassert3==afiv_max(1,2,3,key=lambdax:x**2)classTmpClass:def__init__(self,x):self.val=xassert9==afiv_max(*[TmpClass(x)forxinrange(10)],key=lambdax:x.val).val# iterablesassert3==afiv_max([1,2,3])assert3==afiv_max([3,2,1])assert3==afiv_max([3])# iterables with keysassert3==afiv_max([1,2,3],key=lambdax:x**2)assert9==afiv_max([TmpClass(x)forxinrange(10)],key=lambdax:x.val).val# iterables with defaultassert10==afiv_max([],default=10),"iterable with default only" |
afiz-speech-text | afiz-speech-textRead more about AssemblyAI here 👇DocsInstallpipinstallafiz-speech-textHow to useThis Library provides aAssemblyAIclass using which you can submit audio files for transcribing and
uderstanding it better.fromafiz_speech_text.assemblyaiimportAssemblyAIFirst create the assembly_ai instance by providing the AssemblyAI API
KEY, which you can get it for free fromhereassembly_ai=AssemblyAI(api_key=YOUR_API_KEY)Submit the audio url for transcriptionres=assembly_ai.submit_url_for_transcription(audio_url="https://bit.ly/3yxKEIY")res.get('id')# This id is used to extract the actual text from the audio files.'rs3c8julbq-177d-4071-ab6f-d7c7a9bb6dbb'Getting the Transcription Resultfull_details=assembly_ai.get_transcription_results('rs3c8julbq-177d-4071-ab6f-d7c7a9bb6dbb')print(full_details['text'])You know, demons on TV like that. And and for people to expose themselves to being rejected on TV or, you know, humili humiliated by Fear Factor or, you know.We can check out other details like sentiment analysis fromfull_details |
afk | No description available on PyPI. |
afkak | Afkak is aTwisted-nativeApache Kafkaclient library.
It provides support for:Producing messages, with automatic batching and optional compression.Consuming messages, with group coordination and automatic commit.Learn more in thedocumentation, downloadfrom PyPI, or review thecontribution guidelines.
Please report any issueson GitHub.StatusAfkak supports these Pythons:CPython 3.5, 3.6, 3.7, 3.8, and 3.9PyPy3We aim to support Kafka 1.1.xand later.
Integration tests are run against these Kafka broker versions:0.9.0.11.1.1Testing against 2.0.0 is planned (see#45).Newer broker releases will generally function, but not all Afkak features will work on older brokers.
In particular, the coordinated consumer won’t work before Kafka 0.9.0.1.
We don’t recommend deploying such old releases of Kafka anyway, as they have serious bugs.UsageHigh levelNote: This code is not meant to be runnable. Seeproducer_exampleandconsumer_examplefor runnable example code.fromafkak.clientimportKafkaClientfromafkak.consumerimportConsumerfromafkak.producerimportProducerfromafkak.commonimport(OFFSET_EARLIEST,PRODUCER_ACK_ALL_REPLICAS,PRODUCER_ACK_LOCAL_WRITE)kClient=KafkaClient("localhost:9092")# To send messagesproducer=Producer(kClient)d1=producer.send_messages("my-topic",msgs=[b"some message"])d2=producer.send_messages("my-topic",msgs=[b"takes a list",b"of messages"])# To get confirmations/errors on the sends, add callbacks to the returned deferredsd1.addCallbacks(handleResponses,handleErrors)# To wait for acknowledgements# PRODUCER_ACK_LOCAL_WRITE : server will wait till the data is written to# a local log before sending response# [ the default ]# PRODUCER_ACK_ALL_REPLICAS : server will block until the message is committed# by all in sync replicas before sending a responseproducer=Producer(kClient,req_acks=Producer.PRODUCER_ACK_LOCAL_WRITE,ack_timeout=2000)responseD=producer.send_messages("my-topic",msgs=[b"message"])# Using twisted's @inlineCallbacks:responses=yieldresponseDifresponse:print(response[0].error)print(response[0].offset)# To send messages in batch: You can use a producer with any of the# partitioners for doing this. The following producer will collect# messages in batch and send them to Kafka after 20 messages are# collected or every 60 seconds (whichever comes first). You can# also batch by number of bytes.# Notes:# * If the producer dies before the messages are sent, the caller would# * not have had the callbacks called on the send_messages() returned# * deferreds, and so can retry.# * Calling producer.stop() before the messages are sent will# errback() the deferred(s) returned from the send_messages call(s)producer=Producer(kClient,batch_send=True,batch_send_every_n=20,batch_send_every_t=60)responseD1=producer.send_messages("my-topic",msgs=[b"message"])responseD2=producer.send_messages("my-topic",msgs=[b"message 2"])# To consume messages# define a function which takes a list of messages to process and# possibly returns a deferred which fires when the processing is# complete.defprocessor_func(consumer,messages):# Store_Messages_In_Database may return a deferredresult=store_messages_in_database(messages)# record last processed messageconsumer.commit()returnresultthe_partition=3# Consume only from partition 3.consumer=Consumer(kClient,"my-topic",the_partition,processor_func)d=consumer.start(OFFSET_EARLIEST)# Start reading at earliest message# The deferred returned by consumer.start() will fire when an error# occurs that can't handled by the consumer, or when consumer.stop()# is calledyielddconsumer.stop()kClient.close()Keyed messagesfromafkak.clientimportKafkaClientfromafkak.producerimportProducerfromafkak.partitionerimportHashedPartitioner,RoundRobinPartitionerkafka=KafkaClient("localhost:9092")# Use the HashedPartitioner so that the producer will use the optional key# argument on send_messages()producer=Producer(kafka,partitioner_class=HashedPartitioner)producer.send_messages("my-topic","key1",[b"some message"])producer.send_messages("my-topic","key2",[b"this method"])Low levelfromafkak.clientimportKafkaClientkafka=KafkaClient("localhost:9092")req=ProduceRequest(topic="my-topic",partition=1,messages=[KafkaProtocol.encode_message(b"some message")])resps=afkak.send_produce_request(payloads=[req],fail_on_error=True)kafka.close()resps[0].topic# b"my-topic"resps[0].partition# 1resps[0].error# 0 (hopefully)resps[0].offset# offset of the first message sent in this requestInstallAfkak releases areavailable on PyPI.Because the Afkak dependenciesTwistedandpython-snappyhave binary extension modules you will need to install the Python development headers for the interpreter you wish to use:Debian/Ubuntu:sudo apt-get install build-essential python3-dev pypy3-dev libsnappy-devOS Xbrew install python pypy snappypip install virtualenvThen Afkak can beinstalled with pip as usual:LicenseCopyright 2013, 2014, 2015 David Arthur under Apache License, v2.0. SeeLICENSECopyright 2014, 2015 Cyan, Inc. under Apache License, v2.0. SeeLICENSECopyright 2015–2021 Ciena Corporation under Apache License, v2.0. SeeLICENSEThis project began as a port of thekafka-pythonlibrary to Twisted.SeeAUTHORS.mdfor the full contributor list. |
afkarena | AFK Arena API.Simple API wrapper for the AFK Arena sitehttps://cdkey.lilith.com/afk-global.Note:This wrapper is unofficial and is not associated with nor endorsed by Lilith Games.The logic of this library has been part of my Discord bot,Dreaf, ever since AFK Arena changed to the external gift code redemption site. Due to the increased interest of community members on making use of this unofficial API, and the fact that this logic is currently being used across two seperate projects of my own, I figured it's time to make the API interactions standalone to ease maintenance and keep the feature scope focused on the essentials of its functionality.Installpip install afkarenaRequirementsPython 3.9+aiohttp 3.7+How to use# create a Player object for the main user account.player=Player(main_user_id)# authenticate using the authentication code in game settings.awaitplayer.verify(authentication_code)# fetch data of all linked user accountsawaitplayer.fetch_users()# redeem one or more gift codes for all linked user accountsresults=awaitplayer.redeem_codes(gift_code_one,gift_code_two)# view code redemption resultsprint(results) |
afk-bot | AFK-Bot🤖: A bot for the away from keyboard times🧠 PhilosophyWe strongly believe that all developers should have full access to their resources (i.e.sudoaccess or permission to deactivate screens saver, ...).afk-bot🤖 is a simple bot that moves the mouse cursor (every 1 second by default and it can be customized); so, your status never goesIdleand your screen never gets locked 😂 ...🛠 InstallationTo begin with, you need to have aPython version >=3.8installed and to install the library
fromPyPIsimply run 🏃♀️ :$ pip install afk-bot📌 Quick Startafk-botis acommand-linebased bot and you can simply run it in anyterminal🏃♀️ :$ afk-bot <- runs the bot and the mouse cursor moves every 1 second by default
$ afk-bot -t <interval-range> <- you can customize the interval with -t or --time
$ afk-bot --help <- shows the optionsToexit, simply pressCTRL+Ckeys.📣 Common IssuesMac users should note that the accessibility toApple Events Server (AEServer)should be turned on. Simply follow the steps 🏃♀️ :System Preferences > Security & Privacy > Choose Privacy Tab > Select Accessibility from Left Pane > Enable AEServerSome Linux users might need to export the environment variableDISPLAY. Simply run 🏃♀️ :$ export DISPLAY=:0🧑💻🤝 ContributingIf you think more features should be added, please open up an issue an. PRs are more than welcome 🙏 . You can find the details of the development process in our SlickML🧞Contributingguidelines. We strongly believe that reading and following these guidelines will help us make the contribution process easy and effective for everyone involved 🚀🌙 .❓ 🆘 📲 Need Help?Please join ourSlack Channelto interact directly with the core team and our small community. This is a good place to discuss your questions and ideas or in general ask for help 👨👩👧 👫 👨👩👦 . |
afkmc2 | Assumption Free KMeans Monte CarloThis package contains sklearn compatible python implementations of various K-Means seeding algorithms.The package was inspired by the AFKMC^2 algorithm detailed inFast and Provably Good Seedings for k-MeansOlivier Bachem, Mario Lucic, S. Hamed Hassani and Andreas KrauseInNeural Information Processing Systems(NIPS), 2016.https://las.inf.ethz.ch/files/bachem16fast.pdfThe algorithm uses Monte Carlo Markov Chain to quickly find good seedings for KMeans and offers a runtime improvement over the common K-Means++ algorithm.UsageUsing this package to get seedings for KMeans in sklearn is as simple as:import afkmc2
X = np.array([[1, 2], [1, 4], [1, 0],
[4, 2], [4, 4], [4, 0]])
seeds = afkmc2.afkmc2(X, 2)
from sklearn.custer import KMeans
model = KMeans(n_clusters=2, init=seeds).fit(X)
print model.cluster_centers_InstallationQuickly install afkmc2 by running (coming soon):pip install afkmc2ContributeIssue Tracker:https://github.com/adriangoe/afkmc2/issuesSupportYou can reach out to me throughhttps://adriangoe.me/.LicenseThe project is licensed under the MIT License. |
afkode | AFKode - Speak it, Save it, AFKode it!AFKode allows users to interact with AI and file system using only voice, allowing you to work away from keyboard.
Works on iPhone with pythonista, or on MacOS.
Powered by Whisper and ChatGPT.This project was inspired by long walks on the beach while ruminating and organizing ones thoughts.Users of this program should be comfortable using pythonista/python.
You are required to BYO OpenAI secret key in variableOPENAI_KEYusing environment variables or withinafkcode/secrets.py.Key features:Detection of start/stop dictation for transcriptionUses ChatGPT create smart file naming for your notesInterfaces:At home: Supports MacOS with base speakers/microphone or AirPods. May not work with other bluetooth headsets like Bose headphones.Out and about: Supports Pythonista iOS with base speakers/microphones, or plugged in lightning wired heaphones. Bluetooth headsets like AirPods and Bose headphones currently not working.ContentsInstructions for usersInstallationUsage documentationBug reportsInstructions for developersPoetryTesting with NoxCode formatting with Pre-commitContributorsInstructions for usersThe following are the quick start instructions for using the project as an end-user.Follow theInstructions for developersto set up the virtual environment and dependency management.InstallationMacOS requirements:Python 3.8pyaudioffmpeg for mp3 text-to-speech,brew install ffmpegbrew install portaudioNote: Instructions marked with %% are not functioning and are for demo purposes only.Install the project using pip %%:pipinstallafkodeTo replicate the data transformations and model results, run the following commands from the project root.
These should be run from thepoetry shell, orcondaenvironment, or with thepoetry runprefix.python-mafkode.runUsage documentationThe user guides can be found ongithub pages.
This includes overview of features, discussion ofafkodeframework, and API reference.Bug reportsPlease raise anissuewithbuglabel and I will look into it!Instructions for developersThe following are the setup instructions for developers looking to improve this project.
For information on current contributors and guidelines see thecontributorssection.
Follow each step here and ensure tests are working.PoetryPoetryhandles virtual environment management, dev and optional extra libraries, library development, builds and publishing.Check the poetry website for the latest instructions on how to install poetry.
You can use the following command on OS/linux to install poetry 1.1.9 used in this project.curl-sSLhttps://install.python-poetry.org|python---version1.1.9It is recommended to set virtual environment creation to within project using the following command.
This adds a.venvdirectory to project to handle cache and virtual environment.poetryconfigvirtualenvs.in-projecttrueYou can set up the virtual environment in the repo using the following command.
Make sure that any other virtual environments (i.e.conda deactivate) are deactivated before running.poetryinstallTroubleshooting: You may need to point poetry to the correct python interpreter using the following command.
In another terminal and in conda, runwhich python.poetryenvuse/path/to/python3When the environment is correctly installed, you can enter the virtual environment usingpoetry shell. Library can be built usingpoetry build.Testing with NoxNoxis a command-line tool that automates testing in multiple Python environments, similar to tox, Makefiles or scripts. Unlike tox, Nox uses a standard Python file for configuration.Here it is used for code quality, testing, and generating documentation.The following command can be used to run mypy, lint, and tests.
It is recommended to run these before pushing code, as this is run with Github Actions.
Some checks such as black are run more frequently withpre-commit.poetryrunnoxLocal Sphinx documentation can be generated with the following command.
Documentation publishing using Github Actions to Github pages is enabled by default.poetryrunnox-sdocsOther available commands include:poetryrunnox-rscoverageCode formatting with Pre-commitPre-commitis a framework for managing and maintaining multi-language pre-commit hooks.It intercepts thegit commitcommand to run checks of staged code before the commit is finalized.
The checks are specified in.pre-commit-config.yaml.
Checks in use are quick, pragmatic, and apply automatic formatting checks.
If checks fail, it is usually only a matter of re-staging the files (git add) and attempting to commit again.The aim is to provide a lightweight way to keep some code standards automatically in line with standards.
This does not replace the need to run nox tests, although pre-commits will satisfy some of the nox test checks.On first time use of the repository, pre-commit will need to be installed locally.
You will need to be in thepoetry shellorcondaenvironment.
Run the following command to perform a first time install.pre-commitinstallThis will cache several code assets used in the checks.When you have new code to commit, pre-commit will kick in and check the code.
Alternatively, you can run the following command to run for all files in repo.pre-commitrun--all-filesContributorsNick Jenkins- Data Scientist, API & Web dev, Team lead, WriterSeeCONTRIBUTING.mdin Github repo for specific instructions on contributing to project.Usage rights governed byLICENSEin Github repo or page footer. |
afkodingpdf | This is the home page of our project. |
afk-slack-agent | Signal you A.F.K. (Away From Keyboard) status on Slack, automatically.Table of ContentsInstallationWhat it does?PrerequisitesConfigurationOther settingsCustom actionsWhy?WarningThis software is for MacOS only!Installationpipinstallafk_slack_agentWhat it does?This software is distributed with an agent (afk_agent) and a client (afk, optional).The agent is designed to be run in the background and stay active until you terminate it.Features implemented by the agentwaits for lock screen and unlock screen eventsconnects to a Slack workspace, and change user status on lock (clean it on unlock)optionally: write a message on a channel on lock/unlockPrerequisitesyou have tocreate a Slack application, and install it into your workspace
- the application should have at least the followingscope:users.profile:write.optionally, you could also enablechat:writeandreactions:writeto run custom AFK commands from the client, you’ll need to enable the agent to control your Mac (from “Privacy and Security” system settings)ConfigurationThe first time the agent is run, a~/.afk.jsonfile is created.This is the default file created:{"version":1,"token":"","status_text":"I need a break","status_emoji":":coffee:","channel":null,"away_message":"I'm going to take a coffee break","back_message":"I'm back","delay_for_reaction_emoji":60,"back_emoji":"back","agent_emoji":"robot_face","actions":[{"action":"lunch","status_text":"Lunch break","status_emoji":":spaghetti:","away_message":"I'm going to take the lunch break","back_message":"I'm back and stuffed!","command":"lock"}]}The most important key istoken, which must contain the Slack User OAuth Token.Other settingsstatus_textStatus to be set when locking the screenstatus_emojiemoji to be set when locking the screenchanneluse this only if you want to write messages on a channel when going AFK and be back.Put the channel id there. You can find it by right-clicking on the channel and clicking “View channel details”.
It will be at the very bottom of the popup.away_messagemessage to send when going AFKback_messagemessage to send when back to keyboarddelay_for_reaction_emojiin case you will be back before this amount of seconds, do not send a back message, but just react to your away message using a reaction emoji.
This will reduce noise in case of quick lock/unlock screenback_emojiemoji to be used for quick back reactionagent_emojiautomatically adds this emoji at the end of every message sent or slack status set.
This helps others to know there’s a bot that is acting for you.delay_after_screen_lockbefore starting interacting with Slack, wait this amount of seconds.This will delay reactions to your lock screen status a while, so no Slack commands will be run if you unlock the screen before this time.
As example: you are reading a document and the screen locks for inactivity, but you are not AFK.Custom actionsThe JSON configuration can contain anactionskey, with an array of custom actions.Custom actions can be sent to the agent using the client component:afklunchA custom action is a way to perform something more than the standard lock/unlock monitor.See theafkcommand line help for more.An action interact with Slack in the same way the agent does, and inherit the same configuration, but it can override some of them like:status_text,status_emoji,away_messageandback_message.
Every of these settings can benullto explicitly inherit from the global settings.back_messagecan also befalse: this disables the back message for the action even if the global setting has a value.Finally, a custom action can perform one of the following commands:lockLock the screen manuallysleepPut you computer to sleepWhy?To understand motivation about this tool, readwhy I needed to join my lock screen activities with Slack. |
afk-time | Install$[sudo]pipinstallafk-timeFeaturesget afk time in secondsUsageusage:afk-timeExamples$sleep3&&afk-time3 |
aflabs-test | this is readme filepoe |
aflabs-test-app | Add books to installed_apps |
afl-ai-utils | afl-ai-utilsrm -rf build dist
python3 setup.py sdist bdist_wheel
twine upload --repository pypi dist/*Installationpip install afl-ai-utilsUsageSlack Alertingfrom afl_ai_utils.slack_alerts import send_slack_alert
send_slack_alert(info_alert_slack_webhook_url=None, red_alert_slack_webhook_url=None, slack_red_alert_userids=None, payload=None, is_red_alert=False)
"""Send a Slack message to a channel via a webhook.
Args:
info_alert_slack_webhook_url(str): Infor slack channel url
red_alert_slack_webhook_url(str): red alert channel url
slack_red_alert_userids (list): userid's to mention in slack for red alert notification
payload (dict): Dictionary containing Slack message, i.e. {"text": "This is a test"}
is_red_alert (bool): Full Slack webhook URL for your chosen channel.
Returns:
HTTP response code, i.e. <Response [503]>
"""BigQuery Dataframe to BigQuery and get result in Datafeamedef dump_dataframe_to_bq_table(self, dataframe: pd.DataFrame, schema_cols_type: dict, table_id: str, mode: str):
>>> from afl_ai_utils.bigquery_utils import BigQuery
>>> bq = BigQuery("keys.json")
>>> bq.write_insights_to_bq_table(dataframe=None, schema=None, table_id=None, mode=None)
"""Insert a dataframe to bigquery
Args:
dataframe(pandas dataframe): for dataframe to be dumped to bigquery
schema(BigQuery.Schema ): ex:
schema_cols_type: {"date_start":"date", "id": "integer", "name": "string"}
table_id (list): table_id in which dataframe need to be inserted e.g project_id.dataset.table_name = table_id
mode(str): To append or replace the table - e.g mode = "append" or mode="replace"
Returns:
returns as success message with number of inserted rows and table name
"""Execute any query to BigQuerydef execute_query(self, query):
>>> from afl_ai_utils.bigquery_utils import BigQuery
>>> bq = BigQuery("keys.json")
>>> df = bq.execute_query(query = "SELECT * FROM TABLE")
"""
Args:
query (query of any type SELECT/INSERT/DELETE )
Returns:
returns dataframe of execute query result
""" |
aflak | ===============================================================aflak - Advanced Framework for Learning Astrophysical Knowledge===============================================================.. figure:: https://api.travis-ci.org/malikolivier/aflak.svg?branch=master:alt: Build status**IN ACTIVE DEVELOPMENT: Features and API highly unstable!**Environment===========Support Python3.5+.Install=======You can install `aflak` using any of the following methods.Using pip---------This is the recommended way of installing aflak as a user. Please make sureto install `aflak` for python 3.x. It will not work on python 2.x... code :: bashpip install aflak # pip should point to python3!pip3 install aflak # Use `pip3' if you are on Debian or UbuntuDepending on your python install, you should be able to run aflak form thecommand line with any of these commands.. code :: bashaflak # This should work in most environmentpython -m aflak # `python' should be the python 3.x interpreter!python3 -m aflakUsing .deb files----------------*Only `Debian Stretch` and `Ubuntu 17.10` are supported for now.*Download the .deb file of the latest release fromhttps://github.com/malikolivier/aflak/releasesInstall it with:.. code :: bashsudo dpkg -i aflak-X.X.X-release.deb# If dependencies are missing, you should then run:sudo apt-get install -fRemove it with:.. code :: bashsudo apt-get remove aflakFrom source locally-------------------.. code :: bashgit clone https://github.com/malikolivier/aflakcd aflakvirtualenv -p python3 venv. ./venv/bin/activatepip install -r requirements.txt./runOpen a FITS file================::aflak my-fits-file.fitsThe provided FITS file is required to have the following extensions:- 'FLUX': 3D data containing 2D luminosity component for each wavelength value- 'WAVE': 1D data containing value of each target wavelengthAfter some fiddling you should be able to get a window like below:.. figure:: images/2017-11-13-screenshot.jpg?raw=true:alt: Screen capture of the running GUI applicationGet sample FITS files=====================The Makefile contains a few recipes to get sample fits files.Run make as below:::make data/manga-7443-12703-LINCUBE.fitsTo see a fits file header=========================::fold -w 80 foo.fits | lessTODO====- Show arbitrary sums over spectral data (currently only show one frame)- Benchmark / Test with several fits files- Set a label on the histogram's Y-axis (flux [1E-17 erg/s/cm^2])v0.0.11=======Change:- Delete Menu button inherited from pyqtgraph (59167a5)v0.0.10=======Fix:- Image orientation (240e4cf)- Crash on Python 3.5 (691f08d)- Can also use `-v` flag to output version (50acf19)- Fix crash in setup.py (538cb89)v0.0.9======Fix:- Crash on Python 3.5 (c3cf229)v0.0.8======New:- Include compass showing North (red) and East (blue) directions- Tick labels of image axes are shown in absolute and relative equatorialcoordinates.Fix:- Read waveform's unit from FITS header (31fd99b)v0.0.7======New:- Add icon to debian releasev0.0.6======New:- Make .deb files for easy distributionFix:- Force use of PyQt5, even if PyQt4 happen to be installed (28cb7a0)- Increase size of ROI handles, making them easier to be grabbed (e533168)v0.0.5======New:- Add 3 types of ROI: polygonal, ecliptic and semi-automatic. In semi-automaticmode, the use is free to choose and point and a threshold. All the pointsabove the threshold around the selected point will be inside the ROI.- Add a "Recent Files" menu. No need to look far away for your FITS files.Change:- Delete ROI button and move ROI management inside menu.Fix:- Output of --version under some some circumstances (fa7e211)- Name of main window is set to 'aflak' (6677775)v0.0.4======New:- FITS menu from which FITS header can be seen- Version flag to CLI- `About' dialog box in Help menuv0.0.3======Fix: Run aflak as module (with `python -m aflak`)New:- Include some unit tests- Include units in waveform axes, read from loaded FITS filesv0.0.2======Fix: Use logarithmic scale on brightness histogramsv0.0.1======Very first version released on PyPI. Can only open FITS files and visualizeFLUX and WAVE data. |
aflevering3-tree | This is a collection of functions from an assigment, that i could not be bothered to have on the top of my new project.
They include the functions:“gen_labels_letters(n)”, this generates a List of n length, of max length 24, of letters from A to Z“gen_labels(n)”, this generates a list of n length with names of “L1, L2, … , Ln”“permute(L)”, permutes a given list L“pairs(L)”, pairs elements of a given list L, with the condition that a < b“canonical_triplets(A, B)”, Makes pairs of with all combinations from A and B, so [(A[1], B[1], (A[1], B[2]), … , (A[n], B[1]), … , (A[n], B[n])]“anchored_triplets(L, R)”, takes “canonical_triplets(L, R) + canonical_triplets(R, L)” and outputs that.Change Log0.0.1 (24/02/2022)First version0.0.2 (24/02/2022)added import random to hopefully make a function work0.0.3 (24/02/2022)added ‘import string’ to make another function work :)))))added more the README0.0.4 (24/02/2022)Improved the pairs function, so L1 > L10Removed unnecessary code0.0.5 (24/02/22)removed some test code i accidentally uploaded, so everytime this was imported it was spit out a list |
af-licence-manager | AristaFlow BPM REST Client library for connecting to the LicenceManager/LicenceManager endpoint.https://pypi.org/project/aristaflowpy/provides APIs on top of the AristaFlow BPM REST endpoints for many use cases, so using aristaflowpy is recommended. |
aflight | Aflight: simple Arrow Flight API builder/runnerLoosely inspired byFlaskTL;DRServer:Createapp.pyimportaflightapp=aflight.Aflight()@app.command("predict")defpredict(batch):result=do_something_with(batch)return[result]To Run:aflightClient:fromaflight.clientimportpredictdata=some_pandas_data()print(predict(data))Why?Currentkserve,torch/serveetc. APIs are too reliant on HTTP request/response paradigmUsing Arrow as a data format and Arrow Flight as a service API produces a much better interface:standardhas schemafastcolumnarbatch-able |
afloat | No description available on PyPI. |
aflow | AFLOWPython APIPython API wrapping the AFLUX API language for AFLOW library.Note:This is not an official repo of the AFLOW consortium and is not
maintained by them.API
Documentation.If you use this package, please cite it:@ARTICLE{2017arXiv171000813R,
author = {{Rosenbrock}, C.~W.},
title = "{A Practical Python API for Querying AFLOWLIB}",
journal = {ArXiv e-prints},
archivePrefix = "arXiv",
eprint = {1710.00813},
primaryClass = "cs.DB",
keywords = {Computer Science - Databases},
year = 2017,
month = sep,
adsurl = {http://adsabs.harvard.edu/abs/2017arXiv171000813R},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}QuickstartInstallaflowfrom the python package index:pip install aflowOr alternatively installaflowfrom conda using:conda install -c conda-forge aflowOpen an ipython notebook or terminal and execute the query from the
paper:fromaflowimport*result=search(batch_size=20).select(K.agl_thermal_conductivity_300K).filter(K.Egap>6).orderby(K.agl_thermal_conductivity_300K,True)# Now, you can just iterate over the results.forentryinresult:print(entry.Egap)aflowsupports lazy evaluation. This means that if you didn’t ask
for a particular property during the initial query, you can just ask for
it later and the request will happen transparently in the background.Python 2 SupportAlthough the package was originally designed to be compatible with both
python 2 and python 3, python 2 has reached the end of its life. As
such, we don’t guarantee anymore that it will work. |
aflowey | FeaturesUtilities to describe and execute flow with coroutine functionsEasily launch several flows simultaneouslyStrong focus on readabilityhttps://aflowey.readthedocs.ioRequirementspython 3.7 +This library is easier to use with third party libraries for manipulating function
such asfn(flip function, function composition…), andtenacity(retry library).InstallationYou can installAfloweyviapipfromPyPI:$pipinstallafloweyUsageChain function to execute an async flow !fromafloweyimportaflow,CANCEL_FLOW,aexec,flog,partialdb=...# get client db# add some other libraryfromtenacityimportretryasyncdeffetch_url(url):returnawait...defprocess_data(html):processed_data=...# process dataifprocessed_dataisNone:returnCANCEL_FLOWreturnprocessed_dataasyncdefinsert_into_db(content):returnawaitdb.insert_one(content)defget_url_flow(url):# defining a flow for working with urlreturn(aflow.from_args("http://goole.fr")>>retry(wait=2)(fetch_url)>>flog("url fetched",print_arg=True)>>process_data# this one is synchronous but may included in the flow>>insert_into_db)Execute the flow for one url:result=awaitget_url_flow("http://google.com/...").run()Execute several flows asynchronously:fromfnimportflipname="Marco"user_flow=(aflow.empty()>>partial(db.find_one,search={"username":name})>>User.from_dict# the impure indicate that this step does not return a new result# i.e the result of User.from_dict will be sended>>impure(partial(flip(setattr),datetime.now(),'created_at')))organization_id="Not employed"organization_flow=(aflow.empty()>>partial(db_find_one,search={"organization_id":organization_id})>>Organization.from_dict)urls=["http://google.com/...","http://google.com/...","http://google.com/...","http://google.com/...",]url_flows=[get_url_flow(url)forurlinurls]# execute all flow with asyncio gather methodexecutor=aexec().from_flows(url_flows)|user_flow|organization_flow(url1,url2,url3,url4),user,organization=awaitexecutor.run()It can be boring to create function that exactly matches arity of the flow.
Aflowey provide some higher order functions to help, see:lift: create a new method accepting transformed argumentsF0: from a 0 argument function, create one argument function to fit the arity of the flowF1: create a new function with an extra parameter to process input of the flow stepspread: create a new function which spread an iterable of arguments into the given functionspread_kw: create a new function which spread kw arguments into the given functionThe fn library provide other interesting functions like:flipfirstIf you have any other ideas…ContributingContributions are very welcome.
To learn more, see theContributor Guide.LicenseDistributed under the terms of theMIT license,Afloweyis free and open source software.IssuesIf you encounter any problems,
pleasefile an issuealong with a detailed description.CreditsThis project was generated from@cjolowicz’sHypermodern Python Cookiecuttertemplate. |
aflr | aflr - python SDKaflr is the officialapi.audioPython 3 SDK. This SDK provides easy access to the api.audio API from applications written in python.📝 Table of ContentsAboutGetting StartedHello WorldDocumentationImportAuthenticationAuthentication with environment variableResource usageScriptSpeechVoiceSoundMasteringFileAuthorsLicense🧐 AboutThis repository is actively maintained byAflorithmic Labs. For examples, recipes and api reference see theapi.audio docs.🏁 Getting StartedInstallationYou don't need this source code unless you want to modify it. If you want to use the package, just run:pipinstallaflr-UInstall from source with:pythonsetup.pyinstallPrerequisitesPython 3.6+🚀 Hello WorldCreate a filehello.pytouchhello.pyAuthenticationThe library needs to be configured with your account's secret key which is available in yourAflorithmic Dashboard. Import the aflr package and setaflr.api_keywith the api-key you got from the dashboard:importaflraflr.api_key="your-key"Create Text to audio in 4 stepsLet's create our first audio from text.✍️ Create a new script:script=aflr.Script.create(scriptText="Hello world",scriptName="hello")print(script)🎤 Create an speech audio file from the script using Joanna's voice:response=aflr.Speech.create(scriptId=script["scriptId"],voice="Joanna")print(response)🎧 Now let's master the speech file with high quality and a nice background track.response=aflr.Mastering.create(scriptId=script.get("scriptId"),backgroundTrackId="full__citynights.wav")print(response)🎉 Finally, get the urls of the audio files generated:urls=aflr.Mastering.retrieve(scriptId=script["scriptId"])print(urls)Or download the files in your current folder:filepath=aflr.Mastering.download(scriptId=script["scriptId"],destination=".")print(filepath)Easy right? 🔮 This is thehello.pyfinal picture:importaflraflr.api_key="your-key"# script creationscript=aflr.Script.create(scriptText="Hello world",scriptName="hello")# speech creationresponse=aflr.Speech.create(scriptId=script["scriptId"],voice="Joanna")print(response)# mastering processresponse=aflr.Mastering.create(scriptId=script.get("scriptId"),backgroundTrackId="full__citynights.wav")print(response)# get url of audio tracks generatedurls=aflr.Mastering.retrieve(scriptId=script["scriptId"])print(urls)# or downloadfilepath=aflr.Mastering.download(scriptId=script["scriptId"],destination=".")print(filepath)Now let's run the code:pythonhello.pyOnce completed, check the files in thehello.pyroot folder - you will see a new audio file. Play it!📑 DocumentationImportimportaflrAuthenticationThe library needs to be configured with your account's secret key which is available in yourAflorithmic Dashboard. Setaflr.api_keywith the api-key you got from the dashboard:aflr.api_key="your-key"Authentication with environment variable (recommended)You can also authenticate usingaflr_keyenvironment variable and the aflr SDK will automatically use it. To setup, open the terminal and type:exportaflr_key=<your-key>If you provide both environment variable andaflr.api_keyauthentication, theaflr.api_keywill be used.Resource UsageThere are two approaches to use the resources.
First approach is to import the resource classes you want to use first, then use resource methods. For example, to useScript, we could do:fromaflrimportScriptScript.create()The second approach is to use it directly from aflr:importaflraflr.Script.create()Same logic applies for other resources (Speech,Voice,Sound...)ScriptresourceThe Script resource/class allows you to create, retrieve and list scripts. Learn more about scriptshere.Script methods are:create()- Create a new script.Parameters:scriptText* [Required] (string) - Text for your script. A script can contain multiple sections and SSML tags. Learn more about scriptText detailshereprojectName(string) - The name of your project. Default value is "default"moduleName(string) - The name of your module. Default value is "default"scriptName(string) - The name of your script. Default value is "default"scriptId(string) - Custom identifier for your script. If scriptId parameter is used, then projectName, moduleName and scriptName are required parameters.Example:script=aflr.Script.create(scriptText="<<sectionName::hello>> Hello {{username|buddy}} <<sectionName::bye>> Good bye from {{location|barcelona}}",projectName="myProject",moduleName="myModule",scriptName="myScript",scriptId="id-1234")retrieve()- Retrieve a script by id.Parameters:scriptId* [Required] (string) - The script ID you want to retrieve.Example:script=aflr.Script.retrieve(scriptId="id-1234")list()- List all scripts available in your organization.Parameters:No parameters required.Example:scripts=aflr.Script.list()get_random_text()- Retrieve random text from a list of categories.Parameters:category(string) - The category from which the random text is retrieved. If no category is specified, the function defaults to"FunFact"Example:text=aflr.Script.get_random_text(category="BibleVerse")Categories currently available:"BibleVerse","FunFact","InspirationalQuote","Joke","MovieSynopsis","Poem","PhilosophicalQuestion","Recipe","TriviaQuestion".SpeechresourceSpeech allows you to do Text-To-Speech (TTS) with our API using all the voices available. Use it to create a speech audio file from your script.Speech methods are:create()Send a Text-To-Speech request to our Text-To-Speech service.Parameters:scriptId* [Required] (string) - The script IDvoice(string) - Voice name. See the list of available voices usingVoice resource. Default voice is "Joanna".speed(string) - Voice speed. Default speed is 100.effect(string) - Put a funny effect in your voice. You can try the following ones:dark_father,chewie,88b,2r2d,volume_boost_lowvolume_boost_middlevolume_boost_high(Volume boost allows you to adjust the volume of speech. NOTE! Volume boost effect only applies to speech creation and will be overwritten by the mastering process)silence_padding(integer) - Add a silence padding to your speech tracks (in milliseconds). Default is 0 (no padding)audience(dictionary) - List of dicts containing the personalisation parameters as key-value pairs. This parameter depends on the number of parameters you used in your script resource. For instance, if in the script resource you havescriptText="Hello {{name}} {{lastname}}", the audience should be:[{"username": "Elon", "lastname": "Musk"}]sections(dictionary) is a dictionary (key-value pairs), where the key is a section name, and the value is another dictionary with the section configuration ( valid parameters are: voice, speed, effect, silence_padding). If a section is not found here, the section will automatically inherit the voice, speed, effect and silence_padding values you defined above (or the default ones if you don't provide them). See an example below with 2 sections and different configuration parameters being used.sections={"firstsection":{"voice":"Matthew","speed":110,"silence_padding":100,"effect":"dark_father"},"anothersection":{"voice":"en-GB-RyanNeural","speed":100}}voiceName(DEPRECATED, usevoiceinstead)scriptSpeed(DEPRECATED, usespeedinstead)Simple example:response=aflr.Speech.create(scriptId="id-1234",voice="Joanna")Complete example:response=aflr.Speech.create(scriptId="id-1234",voice="Matthew",speed=100,effect="dark_father",silence_padding=1000,audience=[{"username":"Elon","lastname":"Musk"}],sections={"firstsection":{"voice":"Matthew","speed":110,"silence_padding":100,"effect":"dark_father"},"anothersection":{"voice":"en-GB-RyanNeural",}})retrieve()Retrieve the speech file urls.Parameters:scriptId* [Required] (string) - The script ID you want to retrieve.section(string) - The script section name for the first section. The default name for a script section is "default". NOTE: At the moment, Only scripts with 1 section are supported. If the scripts contain more than one section, only the first section can be retrieved.parameters(dict) - Dict containing the personalisation parameters for the first section of the script. This parameter depends on the parameters you used in yourscript's resource section. If this parameter is used,sectionmust be specified.Example:audio_files=aflr.Speech.retrieve(scriptId="id-1234")download()Download the speech files in your preferred folder.Parameters:scriptId* [Required] (string) - The script ID you want to downloadsection(string) - The script section name for the first section. The default name for a script section is "default". NOTE: At the moment, Only scripts with 1 section are supported. If the scripts contain more than one section, only the first section can be retrieved.parameters(dict) - Dict containing the personalisation parameters for the first section of the script. This parameter depends on the parameters you used in yourscript's resource section. If this parameter is used,sectionmust be specified.destination(string) - The folder destination path. Default is "." (current folder)Example:audio_files=aflr.Speech.download(scriptId="id-1234",destination=".")VoiceresourceVoice allows you to retrieve a list of the available voices from our API.Voice methods are:list()List all the available voices in our API. The parameters are all optional, and can be used in combination to get the perfect voice for your usecase.Parameters:provider(string) - Try one of: google, polly, azure, msnrproviderFullName(string) - Try with one of: amazon polly, google, microsoft azure, aflorithmic labslanguage(string) - Try with one of: english, spanish, french, germanaccent(string) - Try with one of: american, british, neutral, portuguese/brazilian, american soft, mexican, australiangender(string) - Try with one of: male, femaleageBracket(string) - Try with one of: adult, child, seniortags(string) - Try with one or more (separated by commas) of: steady, confident, balanced, informative, serious, instructional, slow, storytelling, calm, clear, deep, formal, sad, thin, fast, upbeat, fun, energetic, tense, very fast, flat, low pitched, high pitched, low-pitched, sing-y, cooperative, kind, stable, monotonous, neutral, responsible, business man, straight to the point, knowledgeable, focused, newscastery, newsreader, interviewer, reliable, friendly, welcoming, good for handing out information, slightly friendlyindustryExamples(string) - Try with one or more (separated by commas) of: fitness, business, commercial, fashion, travel, audiobook, real estate, faith, health industry, comercial, realestate, kids entertainment, games, customer service, education, storytelling, entertainment, kids, education audiobookExample:all_voices=aflr.Voice.list()Example:french_voices=aflr.Voice.list(language="french",tags="steady, fun")list_parameters()This endpoint lets you see which attributes you can filter the voices by, along with the allowed values for each attribute. You can later use these parameters and values to filter the voices you wish to list.Parameters:No parameters required.Example:parameters=aflr.Voice.list_parameters()SoundresourceSound allows you to design your own sound template from a script and a background track. In order to get a sound template/project, make sure you requestedspeechfor your script resource first.Sound methods are:create()Creates a sound template, compresses the sound project into a zip file and returns the url.Parameters:scriptId* [Required] (string) - Thescriptresource ID.backgroundTrackId* [Required] (string) - The background track file ID.Example:sound_url=aflr.Sound.create(scriptId="id-1234",backgroundTrackId="full__citynights.wav",)retrieve()Retrieve the url of the sound project zip file.Parameters:scriptId* [Required] (string) - Thescriptresource ID.Example:audio_files=aflr.Sound.retrieve(scriptId="id-1234")list_sound_templates()List all the available sound templates in our api.Parameters:No parameters required.Example:sound_templates=aflr.Sound.list_sound_templates()list()List all the available background tracks in our API.Parameters:No parameters required.Example:all_bg_tracks=aflr.Sound.list()list_v2()List all the available background tracks in our API including a 15 seconds audio snippet.Parameters:No parameters required.Example:all_bg_tracks=aflr.Sound.list_v2()download()Download the sound project zip file in your preferred folder.Parameters:scriptId* [Required] (string) - Thescriptresource ID.destination(string) - The folder destination path. Default is "." (current folder)Example:audio_files=aflr.Sound.download(scriptId="id-1234",destination=".")MasteringresourceMastering allows you to create and retrieve a mastered audio file of your script. A mastered version contains the speech of the script, a background track, personalised parameters for your audience and a mastering process to enhance the audio quality of the whole track. In order to get a mastered audio file, make sure you requestedspeechfor your script resource first.Mastering methods are:create()Creates a mastered version of your script.Parameters:scriptId* [Required] (string) - Thescriptresource ID.backgroundTrackId* [Required] (string) - The background track file ID.audience(list) - List of dicts containing the personalisation parameters. This parameter depends on the number of parameters you used in yourscriptresource. In the script documentation example above, we used 2 parameters:usernameandlocation, and in the following example below we want to produce the script for usernameAntoniowith locationBarcelona.public(boolean) - Boolean flag that allows to store the mastered file in a public s3 folder. Default value isFalse. Warning - This will cause your mastered files to be public to anyone in the internet. Use this at your own risk.vast(boolean) - Boolean flag that allows to create a VAST file of your mastered file. Thevastflag only works ifpublicisTrue. Default value isFalse.Example:response=aflr.Mastering.create(scriptId="id-1234",backgroundTrackId="full__citynights.wav",audience=[{"username":"antonio","location":"barcelona"}])retrieve()Retrieves the mastered file urls.Parameters:scriptId* [Required] (string) - Thescriptresource ID.parameters(dict) - Dictionary containing the audience item you want to retrieve.public(boolean) - Boolean flag that allows to retrieve the mastered file from the public bucket. Use this if you want to retrieve a mastered file created usingpublic=True. Default value isFalse.vast(boolean) - Boolean flag that allows to retrieve the VAST file of your mastered file. Thevastflag only works ifpublicisTrue. Default value isFalse.Example:mastered_files=aflr.Mastering.retrieve(scriptId="id-1234",parameters={"username":"antonio","location":"barcelona"})download()Download the mastered files in your preferred folder.Parameters:scriptId* [Required] (string) - Thescriptresource ID.parameters(dict) - Dictionary containing the audience item you want to retrieve.destination(string) - The folder destination path. Default is "." (current folder)public(boolean) - Boolean flag that allows to retrieve the mastered file from the public bucket. Use this if you want to retrieve a mastered file created usingpublic=True. Default value isFalse.vast(boolean) - Boolean flag that allows to retrieve the VAST file of your mastered file. Thevastflag only works ifpublicisTrue. Default value isFalse.Example:mastered_files=aflr.Mastering.download(scriptId="id-1234",parameters={"username":"antonio","location":"barcelona"}destination=".")FileresourceFile allows you to retrieve all the files available in api.audio for your organization.Available soon.Authorshttps://github.com/tonythreehttps://github.com/GetOn4https://github.com/zerittehttps://github.com/springcoilhttps://github.com/a96lexLicenseThis project is licensed under the terms of the MIT license. |
afl-tables | No description available on PyPI. |
afluent | AFLuentSpectrum Based Fault Localization Plugin for PyTestUNDER CONSTRUCTIONThis project is a work in progress, documentation will be published soon |
afm | No description available on PyPI. |
afmaths | afmathsA simple package of math functions. Many of these will display output to the console to help understand what steps are required.FunctionsGeneraladd(), subtract(), multiply(), divide(), exponentiate(), square_root(), factorial(), euclid()Computer Sciencecs_file_compression_ratio(), cs_compressed_file_size(), cs_diagonal_pixel_length(), cs_travelling_salesman_problem_total_routes(), cs_check_clusters(), cs_ml_precision(), cs_ml_recall(), cs_ml_weighted_inputs()Graphsgraph_gradient(), graph_equation_of_line()Lists (todo: rename to collections?)list_sorted(), list_length(), list_sum(), list_minimum(), list_maximum(), list_range(), list_mean(), list_median(), list_quartiles()Physicsphysics_radiowave_power_distances(), physics_radiowave_recieved_power(), physics_speed_of_light_metres_per_second(), physics_planck_constant(), physics_photon_energy_from_wavelength(), physics_photon_energy_from_frequency(), physics_frequency_to_wavelength(), physics_wavelength_to_frequency() |
afmcg | No description available on PyPI. |
af-metrics | No description available on PyPI. |
afmformats | Reading common atomic force microscopy (AFM) file formats.DocumentationThe documentation, including the code reference and examples, is available atafmformats.readthedocs.io.InstallationTo install the latest release, simply run:pip install afmformats |
afmmech | No description available on PyPI. |
afmparser | AFM-parserThis is an antlr4 implementation of the old fama plain-text format built from scratch, developed for retrocompatibility purposes.%Relationships
Home : ControlSystemLighting [AntiTheftAlarm] [MoviePlayer] [Internet] [Contents] [ADA] ;ControlSystem:[1,2]CellPhone ControlPanel;MoviePlayer:[1,3]{HDTV42in HDTV32in PCPlayer} ;Internet:[1,4]{EthernetWiFi_n WiFi_bg Mobile3G } ;Contents:[1,2]{VideoOnDemand DMS } ;VideoOnDemand : [Cache] Providers ;Providers : [1,2]ProviderA ProviderB ;%ConstraintsVideoOnDemand REQUIRES Internet ;VideoOnDemand REQUIRES ADA ;Cache REQUIRES DMS ;PCPlayer REQUIRES CellPhone ;AntiTheftAlarm REQUIRES ControlPanel ;Model 1: Feature Model ExampleLoad Model 1 in FAMA console using the load command. In case you need help about the available
commands, use help command or read the reference manual. The following table shows the results of
executing the difeerent operations.Operation ResultValid Yes#Products 4928Commonality(CellPhone) 3696Errors No errorIf you want to see how FAMA behaves when an error is found, introduce at the end of Model 1 the constraint ControlPanel REQUIRES CellPhone;. The result is a model where CellPhone is a false-mandatory
feature. It means that it is mandatory for any product despite of being modelled as optional. When we calculate Its commonality (the number of products where a feature appears in), it is equal to the total number
of products. It is the sign of mandatory features:Operation ResultValid Yes#Products 3696Commonality(CellPhone) 3696Errors False-mandatory: CellPhoneExplanations [CTC-6],[to-CellPhone-ControlPanel-rel]%Relationships
Home : ControlSystemLighting [AntiTheftAlarm] [MoviePlayer] [Internet] [Contents] [ADA] ;ControlSystem:[1,2]CellPhone ControlPanel;MoviePlayer:[1,3]{HDTV42in HDTV32in PCPlayer} ;Internet:[1,4]{EthernetWiFi_n WiFi_bg Mobile3G } ;Contents:[1,2]{VideoOnDemand DMS } ;VideoOnDemand : [Cache] Providers ;Providers : [1,2]ProviderA ProviderB ;%AttributesHDTV42in.ppp : [720,1080],0,0 ;%ConstraintsVideoOnDemand REQUIRES Internet ;VideoOnDemand REQUIRES ADA ;Cache REQUIRES DMS ;PCPlayer REQUIRES CellPhone ;AntiTheftAlarm REQUIRES ControlPanel ;HDTV42in.ppp == 1080 IMPLIES Ethernet ;Model 2: Model 1 extended with quality attributesAll credits to the original design corresponds to Jesús García Galán. |
afmpydes | No description available on PyPI. |
afmt | afmtThis module provides an easy way to format text in CLI environment.
It is designed for use inf-stringsbut regular string formatting withformatmethod is also supported.The module takes care of stripping ANSI escape sequences from piped output
and puts the sequences only if they're supported by the output device.Setup$ pip install afmtUsage and examplesfromafmtimportFormatterf=Formatter()# You can use inline stylingprint(f'{f:bold}bold text{f:e}')# You can define specs outside of an f-stringwarning='bold bg(yellow) fg(black) italic'error='bold bg(red) fg(white) underline'print(f'{f:{warning}}Warning: you shouldn\'t do it{f:e}')print(f'{f:{error}}Error: you can\'t do it{f:e}')# You can define custom styles in the formatter instancef.add_style('important','b fg(red)')print(f'{f:important}important text{f:e}')# Or you can pass a dict of styles in the initializerf=Formatter(styles={'important':'bold fg(255,0,0)','unimporant':'faint'})print(f'{f:important}important text{f:e}')print(f'{f:unimportant}not so important text{f:e}')# Move cursor to 4th row and 6th column and print text in reverse video modeprint(f'{f:reverse goto(4,6)}hello, world{f:e}')# Make text bold and underlined and unset bold in the middleprint(f'{f:bold italic}hello,{f:!bold}world{f:e}')Development statusThis module is in the early stage of development.
More features are coming hopefully soon. |
afn | AFNis Alexander Boyd’s “labs” project. It contains a collection of useful
tools and libraries that aren’t big enough or popular enough to merit their own
projects. |
afnan159 | No description available on PyPI. |
afnews-comprehend-api | No description available on PyPI. |
afniRTI | AFNI Real-Time Interface in PythonPython scripts and modules to enable communication with AFNI's real-time data interface to facilitate neuro-feedback experimentsThis project contains both code to communicate with AFNI's real-time interface via network, and example code to do simple
processing and stimulus generation, based on the received data.The code within this package has been derived from python modules in theAFNIsoftware suite,
which were repackaged and modularized to improve portability.The communication is handled by theafniRTImodule, and the shipping demonstration experiment is implemented usingPsychoPy.The experiment can be run by PsychoPy running on Windows, Mac OS X, and Linux - with AFNI running on a Linux or OS X computer
sending the data (via TCP) to the computer running the experiment in PschoPy.Stimulus initialization and experimental setup is done in the 'setupExperiment' routine, processing and modeling of AFNI data
is done in the 'compute_TR_data' routine, and updating of stimuli to deliver feedback is done by the 'runExperiment' module.Code organization and initial version provided by J. Naegele. Assistance with Windows compatibility provided by S. J. Fede. |
afnumpy | afnumpyAims to be a GPU-ready drop-in replacement for numpy. UsesArrayFireto do the actual computing.How to citePlease cite afnumpy as:Filipe R. N. C. Maia. (2017). afnumpy: A GPU-ready drop-in replacement for NumPy,http://doi.org/10.5281/zenodo.262201Git commit4a04c11 |
afohtim-cpp-code-convention-formatter | No description available on PyPI. |
afoone-calculadora | No description available on PyPI. |
afoonematematica | No description available on PyPI. |
afoone-matematica | No description available on PyPI. |
aforcioligetscode | No description available on PyPI. |
af-org-model-manager | AristaFlow BPM REST Client library for connecting to the OrgModelManager/OrgModelManager endpoint.https://pypi.org/project/aristaflowpy/provides APIs on top of the AristaFlow BPM REST endpoints for many use cases, so using aristaflowpy is recommended. |
afori-utils | Afori UtilsThis package contains an aggregation of tools used by Dor Miron.
Afori is my cat, and he contributed some changes now and then.InstallationRun the following to install:pipinstallafori_utilsUsagefromignore.afori_utilsimportpyplot_utils,sync_utilsfromafori_utilsimportdebug_utils,sync_utils |
afp | afpPython package and utilities for reading AFP (Advanced Function Presentation)
files.OverviewAn afp package for Python, allowing the caller to read and decode AFP (Advanced
Function Presentation) print files. For more information on AFP see the website
of the AFP Consortiumhttp://afpcinc.org.The repository also contains two utilities that make use of the library -
dumpafp.py and afp2ascii.py.The code is pure Python 3. |
afpapi | No description available on PyPI. |
afpcli | This package exists so that people can misspell ‘afp-cli’ as ‘afpcli’ and still get what they expect. |
afp-cli | OverviewThe AFP CLI is the command line interface to access the
AWS Federation Proxy (AFP).Its main use case is starting a new shell where your temporary
AWS credentials have been exported into the environment.InstallationThe tool ishosted on PyPiand can be
installed using the usual Python specific mechanisms, e.g.:$pipinstallafp-cliConfigurationTheafpcommand can be configured through yaml files in
the following directories:/etc/afp-cli/*.yaml(global configuration)$HOME/.afp-cli/*.yaml(per-user configuration)The yaml files are read in lexical order and merged viayamlreader.
The following configuration options are supported:api_url:<api-url>Defaults to lookup a FQDN of a host namedafpvia DNS and construct
the server url from it:https://{FQDN}/afp-api/latestThe specified url must contain full server url (not just the FQDN).
This option always takes precedence overserverserver: <server>The AFP server to use. No default value.
If not overridden byapi_url(see above),api_urlwill
becomehttp://<server>//afp-api/latestuser: <username>Defaults to the currently logged in user-namepassword-provider:<provider>Viable options are:prompt(default) to prompt for the password during
every interaction with the AFP server orkeyringto use the Pythonkeyringmodule. For more info about using thekeyringmodule, see
below.Example:user:myuserapi_url:https://afp-server.my.domain/afp-api/latestpassword-provider:keyringUsageGet Help Text$afp[-h|--help]List Available Account Names and RolesFor the currently logged-in user:$afpThe same for another user:$afp--user=usernameOutput format:<accountname> <role1>,<role2>,...,<roleN>Example output:abc_account some_role_in_abc_account
xyz_account some_role_in_yxz_account,another_role_in_xyzObtain AWS CredentialsThis starts a subshell in which the credentials have been exported into the
environment. Use theexitcommand or pressCTRL+Dto terminate the
subshell.Use credentials for currently logged in user and specified account and role:$afpaccountnamerolenameUse credentials for the currently logged in user for thefirstrole:$afpaccountnameAs above, but specifying a different user:$afp--user=usernameaccountnamerolenameSpecify the URL of the AFP server, overriding any config file:$afp--api-url=https://afp-server.my.domain/afp-api/latestShow and ExportIn case you don’t want to start a subshell or are using something other than
bash, you can use--showor--exportto display the credentials. You
can use the usual UNIX tools to add/remove them from your environment.--showwill just show them and--exportwill show them in a format
suitable for an export into your environment, i.e. prefixed withexportfor
UNIX andsetfor Windows.$afp--show<myaccount>[<myrole>]Password for myuser:
AWS_VALID_SECONDS='600'
AWS_SESSION_TOKEN='XXX'
AWS_SECURITY_TOKEN='XXX'
AWS_SECRET_ACCESS_KEY='XXX'
AWS_EXPIRATION_DATE='1970-01-01T01:00:00Z'
AWS_ACCESS_KEY_ID='XXX'$afp--export<myaccount>[<myrole>]Password for myuser:
export AWS_VALID_SECONDS='600'
export AWS_SESSION_TOKEN='XXX'
export AWS_SECURITY_TOKEN='XXX'
export AWS_SECRET_ACCESS_KEY='XXX'
export AWS_EXPIRATION_DATE='1970-01-01T01:00:00Z'
export AWS_ACCESS_KEY_ID='XXX'The following examples work in zsh, to add and remove them from your
environment:Adding credentials:$eval$(afp--export<accountname>)Removing them again:$env|grepAWS|cut-f1-d'='|whilereadline;do;unset$line;done;Write to AWS Credentials FileThe AWS tools read credentials specified withaws configurefrom a local
file namedcredentialsin a folder named.awsin your home directory.
The afp-cli tool can write your temporary credentials to this file.$afp--write<myaccount>[<myrole>]Configuration Settings and PrecedencePlease read the section onConfiguration Settings and Precedencefrom the AWS documentation.Interface with the System KeyringStarting with version1.3.0, experimental support for thePython keyring
modulehas been implemented. This has
been tested with the Gnome Keyring and Max OS X Keychain but supposedly also
works with Windows Credential Vault. You can configure this feature using the
config file as shown above or with a command-line switch.Example command-line:$afp--password-providerkeyringNo password found in keychain, please enter it now to store it.
Password for user:You will be prompted for your password the first time. Note
that if you fail to enter the password correctly, the incorrect version will be
stored. Note further that if you are using the Gnome-Keychain you can use the
toolseahorseto update and delete saved passwords, in this case for the
serviceafp.Keyring on MacOS XOn some MacOS systems, storing the password works fine, but fetching it fails withCan’t fetch password from system. This is due to achange in the ‘keyring’ module, introduced in version 9.0. As a workaround, downgrade to the previous version withpip installkeyring==8.7Keyring with Gnome-KeychainThere is an intricate caveat when using thekeyringmodule with
Gnome-Keychain. But before discussing this, it is important to mention that
the keyring module uses another module, namelysecretstorageunder the
hood.In order for thekeyringmodule to correctly use the Gnome Keychain the
Python modulePyGObject aka giis required. As stated on the project website: “PyGObject is a Python extension
module that gives clean and consistent access to the entire GNOME software
platform through the use of GObject Introspection.” Now, unfortunately, even
though this project isavailable on PyPiit can not be installed from there
usingpipdue to issues with the build system. It is however available as a
system package for Ubuntu distributions aspython-gi.Long story short, in order to use thekeyringmodule fromafp-cliyou need to have
thegimodule available to your Python interpreter. You can achieve this,
for example, by doing a global install ofafp-cliusing something likesudo pip installafp-clior install it into a virtual environment that uses
the system site packages because it has been created with the--system-site-packagesflag. In case thegimodule is not available and
you try to use thekeyringmodule anyway,afp-cliwill exit with an
appropriate error message. Lastly, if in doubt, you can use the--debugswitch to check at runtime which backend was selected.LicenseCopyright 2015,2016 Immobilien Scout GmbHLicensed under the Apache License, Version 2.0 (the “License”); you may not use
this file except in compliance with the License. You may obtain a copy of the
License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.See AlsoSeeHologramfor another solution that brings temporary AWS credentials onto
developer desktops. |
afplay-py | afplay-pyA python wrapper and better CLI for the macOS toolafplay(audio-file player).InstallationFrom pip:pipinstallafplay-pyFrom source (from the root project directory):pipinstall.Quick UsageCLIPlay an audio file using the CLI:afplay-py~/path/to/file.mp3NOTE: The intent is for this CLI to not have some of the problems the regular tool does.PythonPlay an audio file using Python:fromafplayimportafplayafplay("path/to/file.mp3",volume=2,time=100,leaks=True)Check ifafplayis installed:fromafplayimportis_installedprint(is_installed()) |
afplot | afplotThis is a tool to plot allele frequencies in VCF files.The two main subcommands that are available are: *regions: Plot
single regions or regions from a bed file, optionally with a margin. *whole-genome: Create a single image for every chromosome on the
genome.Both subcommands have three modes:histogram: This will create a histogram with kernel density plot
of allele frequencies.scatter: Create a scatter plot of allele frequencies, along the
region or chromosome.distance: Create a scatter plot of distances to theoretical
allele frequencies, along the region or chromosome. This only makes
sense for autosomes of diploid organisms.By default, colors correspond to call type (hom_alt/ref/hom_ref).Multiple VCF files can be supplied simultaneously for thewhole-genomesubcommand, in which case they can be grouped by label.
When multiple VCF files are supplied, plots will be colored on label per
VCF file.Only one sample per VCF file can be plotted.We currently assume the presence of anADcolumn in theFORMATfield. This column should contain the depth per allele, with the
reference allele being first.All VCFs should be indexed with tabix, and should contain contigs in the
header.Installationafplot is available through pypi with:pip install afplotRequirementsPython 3.4+clicknumpymatplotlibpandasseabornprogressbar2pysampyvcfUsageUsage: afplot [OPTIONS] COMMAND [ARGS]...
Plot allele frequencies in VCF files.
Two basic modes exist:
- regions: Plot histogram, scatter or distance plots per
user-specified region.
- whole-genome: Plot histogram, scatter or distance plots over the
entire genome.
Options:
--help Show this message and exit.
Commands:
regions Region plots
whole-genome Whole-genome plotsExamplesSingle VCF on a single regionafplot regions histogram-vmy.vcf.gz-ooutput_dir-Rchr1:100-200Single VCF on a bed fileafplot regions histogram-vmy.vcf.gz-ooutput_dir-Lregions.bedSingle VCF whole genomeafplotwhole-genomehistogram-vmy.vcf.gz-lmy_label-smy_sample-omysample.histogram.pngMultiple VCFs whole genomeafplotwhole-genomehistogram-vmy1.vcf.gz-lmy_label1-smy_sample1-vmy2.vcf.gz-lmy_label2-smy_sample2-oboth_samples.histogram.pngGrouping samples can be achieved by supplying identical labels to
samples. E.g.afplotwhole-genomehistogram-v1.vcf.gz-v2.vcf.gz-v3.vcf.gz-v4.vcf.gz-lgroup1-lgroup1-lgroup2-lgroup2[...]Excluding contigs on whole genomeIn certain cases, you may not want to plot all contigs. For instance,
when your vcf header contains many small unplaced contigs. This can be
achieved by supplying a regex pattern to the-eflag. For instance,
all contigs containing “gl” can be filtered out by doing:afplotwhole-genome[...]-e'.*gl.*'Changelog0.2The entire command line interface was changed to useclick, instead
of regular argparse. This allows a more complex CLI. In stead of having
flags for plot mode,afplotnow uses subcommands.While the CLI has changed, and the internals ofafplothave been
refactored, the old-style (version 0.1) API remains in place for now.
This may be deprecated in the future.Support for plotting regions was added. Region plotting outputs on a
directory, rather than on a single file.LicenseMIT |
afpproxy | AFPproxy is an MIT licensed proxy for an AppleShare file server. You can use it to help debug client/server connections on Mac OS X, but I wrote it to explore the Twisted networking framework.When running, the proxy prints details of the client/server communication to stderr.InstallationRequires Python 2.5 or later and Twisted. AFPproxy does not run on Python 3. Mac OS X 10.5 and later include Python and Twisted by default.You can download and install the source directly:tar -xf afpproxy-0.1.tar.gz
cd afpproxy-0.1
python setup.py installOr install it from PyPI:pip install afpproxyIf you don’t have Twisted installed, install it. For Python 2.5 install it with:pip install 'Twisted<12.2' 'zope.interface<4'UsageOnce installed, start the proxy with theafpproxycommand.By default this proxies your real AFP server on localhost port 548, and accepts connections on port 5548. You then connect to the running afpproxy and will see a description of the commands sent between client and server.To proxy to a different server give its name or IP address:afpproxy --host example.comOr to proxy to a server running on a non-standard port:afpproxy --host example.com --port 1234To start a proxy listening for connections on port 1548:afpproxy --listen 1548By default afpproxy will log (relatively) meaningful information about the requests and responses. If you want to see the bytes of each and every command use the--debugflag:afpproxy --debugDevelopmentThe source for afpproxy is hosted on GitHub:https://github.com/davidwtbuxton/afpproxy |
af-process-image-renderer | AristaFlow BPM REST Client library for connecting to the ProcessImageRenderer/ProcessImageRenderer endpoint.https://pypi.org/project/aristaflowpy/provides APIs on top of the AristaFlow BPM REST endpoints for many use cases, so using aristaflowpy is recommended. |
af-process-manager | AristaFlow BPM REST Client library for connecting to the ProcessManager/ProcessManager endpoint.https://pypi.org/project/aristaflowpy/provides APIs on top of the AristaFlow BPM REST endpoints for many use cases, so using aristaflowpy is recommended. |
afpy | afpyA personal python package for increasing python efficiency by simplifying repeatable code. |
afpy.ldap | afpy.ldapThis module is actively used onhttp://www.afpy.orgto manage the french python comunity members.The following examples show all features of the package. If you just want to
give it a try in a quickest way readInstallation and configurationfrom the Sphinx
documentation.Get a connection (this custom afpy connection get is configuration from a~/.ldap.inifile. SeeInstallation and configuration):>>> from afpy.ldap import custom as ldap
>>> conn = ldap.get_conn()Get a node via is dn:>>> dn = 'uid=gawel,ou=members,dc=afpy,dc=org'
>>> node = conn.get_node(dn)
>>> node
<Node at uid=gawel,ou=members,dc=afpy,dc=org>
>>> print node.birthDate
19750410000000ZYou can also define your own node class with a schema:>>> from afpy.ldap.node import Node
>>> from afpy.ldap import schema
>>> class User(Node):
... uid=schema.StringProperty('uid')
... birthDate = schema.DateProperty('birthDate', title='Date de naissance')
>>> node = conn.get_node(dn, node_class=User)
>>> node
<User at uid=gawel,ou=members,dc=afpy,dc=org>Then data is converted to a python object:>>> node.birthDate
datetime.date(1975, 4, 10)This also allow to generate forms withFormAlchemy:>>> from afpy.ldap import forms
>>> fs = forms.FieldSet(User)
>>> user = User()
>>> fs.rebind(user)
>>> print fs.render().strip() # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
<div>
<label class="field_opt" for="User--uid">Uid</label>
<input id="User--uid" name="User--uid" type="text" />
</div>
...
<div>
<label class="field_opt" for="User--birthDate">Date de naissance</label>
...The source code can be find on theAFPy repositoryGot a bug, feature request ? Want to send beer because you love it ? Send an
email [email protected] join us on the #afpy channel on freenode.News0.8.2Add ListOfGroups and ListOfPerms attributes. Allow to set user.groups = []0.8.1fix authentification failure when uid does not exist0.8small fixesadd GroupOfUniqueNames0.7Add repoze.what pluginsAllow to set node classes via config filefix compat with latest python-ldap0.5require dataflake.ldapconnection>=1.0b1, python-ldap>=2.3.100.1initial version |
afpy.xap | <[email protected]>
website:http://programmation-python.orgHelpers to work with Xapian. see doc/You need xapian-core and xapian-bindings:http://www.xapian.org/download.phpHistory0.1 (2008-09-27)refactoring of ‘xap’ from Tarek Ziadéinitial version created by IngeniSkel |
afqat1 | Failed to fetch description. HTTP Status Code: 404 |
afqinsight | AFQ-InsightPython based statistical learning for tractometrySeehttps://yeatmanlab.github.io/AFQ-Browser/for documentation of the AFQ data formatThis is a work in progress.ContributingWe love contributions!AFQ-Insightis open source, built on open source,
and we'd love to have you hang out in our community.We have developed someguidelinesfor contributing toAFQ-Insight.CitingAFQ-InsightIf you useAFQ-Insightin a scientific publication, please see cite us:Richie-Halford, A., Yeatman, J., Simon, N., and Rokem, A.Multidimensional analysis and detection of informative features in diffusion MRI measurements of human white matter.
DOI:10.1101/2019.12.19.882928@article {Richie-Halford2019.12.19.882928,
author = {{R}ichie-{H}alford, {A}dam and {Y}eatman, {J}ason and {S}imon, {N}oah and {R}okem, {A}riel},
title = {{M}ultidimensional analysis and detection of informative features in diffusion {MRI} measurements of human white matter},
elocation-id = {2019.12.19.882928},
year = {2019},
doi = {10.1101/2019.12.19.882928},
publisher = {Cold Spring Harbor Laboratory},
URL = {https://www.biorxiv.org/content/early/2019/12/20/2019.12.19.882928},
eprint = {https://www.biorxiv.org/content/early/2019/12/20/2019.12.19.882928.full.pdf},
journal = {bioRxiv}
}AcknowledgementsAFQ-Insightdevelopment is supported through a grant from theGordon
and Betty Moore Foundationand from theAlfred P. Sloan Foundationto theUniversity of
Washington eScience Institute, as
well asNIMH BRAIN Initiative grant 1RF1MH121868-01to Ariel Rokem (University of Washington). |
aframe | A-FRAMEAn easy-to-use python wrapper for the A-Frame web framework.pip install aframeWhat is A-Frame?A-Frame is a web framework for building virtual reality (VR) experiences. A-Frame is based on top of HTML, making it simple to get started. But A-Frame is not just a 3D scene graph or a markup language; the core is a powerful entity-component framework that provides a declarative, extensible, and composable structure tothree.js.Originally conceived within Mozilla and now maintained by the co-creators of A-Frame withinSupermedium, A-Frame was developed to be an easy yet powerful way to develop VR content. As anindependent open source project, A-Frame has grown to be one of thelargest VR communities.A-Frame supports most VR headsets such as Vive, Rift, Windows Mixed Reality, Daydream, GearVR, Cardboard, Oculus Go, and can even be used for augmented reality. Although A-Frame supports the whole spectrum, A-Frame aims to define fully immersive interactive VR experiences that go beyond basic 360° content, making full use of positional tracking and controllers.ExampleHere is an example using the Aframe library with FastAPI to create a VR Hello World:from aframe import Aframe, xyz
from fastapi import FastAPI
from fastapi.responses import HTMLResponse
import uvicorn
app = FastAPI()
@app.get('/')
def hello_world():
a = Aframe()
a.set_scene(background="color: #ECECEC")
a.box(position=xyz(-1, 0.5, -3), rotation=xyz(0, 45, 0),
color="#4CC3D9", shadow=True)
a.sphere(position=xyz(0, 1.25, -5), radius=1.25,
color="#EF2D5E", shadow=True)
a.cylinder(position=xyz(1, 0.75, -3), radius=0.5,
height=1.5, color="#FFC65D", shadow=True)
a.plane(position=xyz(0, 0.1, -4), rotation=xyz(-90, 0, 0),
width=4, height=4, color="#7BC8A4")
return HTMLResponse(a.generate())
if __name__ == '__main__':
uvicorn.run("main:app", port=8000, log_level="info", reload=True)For a more involved example, run the following in a script file:from aframe.templates import fastapi
fastapi() |
aframetour | No description available on PyPI. |
afrc | afrcAboutWhat?afrcis a Python package that implements an analytical version of the Flory Random Coil (i.e. the AFRC) for polypeptides. By way of an example, if you have a protein sequence, one can calculate a variety of polymeric properties simply by passing in the sequence:from afrc import AnalyticalFRC
# creat an AnalyticalFRC object
P = AnalyticalFRC('MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDI')
## from this object you can calculate various polymeric properties
## directly without any additional information
# get the ensemble-average radius of gyration
mean_rg = P.get_mean_radius_of_gyration()
# get the ensemble-average end-to-end distance
mean_e2e = P.get_mean_end_to_end_distance()
# get the full distribution of the radius of gyration
[bins, p_rg] = P.get_radius_of_gyration_distribution()
# get the full distribution of the distances between residue 4 and 20
[bins, p_r] = P.get_interresidue_distance_distribution(4,20)Why?When studying disordered or unfolded polypeptides we often lack a relevant "reference" frame to calibrate our expectations or results. The AFRC provides a pre-parameterized model that recapitulates a polypeptide if it behaved as an ideal chain (which approximates the behavior in a theta solvent). A theta solvent is a solvent where chain-chain and chain-solvent are equally attractive, canceling out excluded volume effects, giving rise to a chain with a polymer scaling exponent of 0.5. Unlike a real chain in a theta solvent, the AFRC also shows ideal chain behavior, such that intra-residue distance distributions can be analytically calculated without concern for finite size effects.How?Read the preprint! But the TL/DR is we performed numerical simulations to generate Flory Random Coil ensembles (see Mao et al. 2013), and then parameterized closed-form models to reproduce the end-to-end distance distribution and the radius of gyration distance distribution. From these, a variety of additional parameters can be calculated, all without needing to run any simulations.Who?The AFRC was developed by Garrett Ginell, Jhullian Alston, and Alex Holehouse in theHolehouse lab. For any questions, please contact Alex.Implementation detailsThis analytical solution is based on the rotational isomeric state approximation of Flory and Volkenstein and parameterized using numerical simulations of residue-specific Flory Random Coil. It provides an interface into sequence-specific polymeric properties (i.e., intra-molecular distances) expected for a given sequence and behaves like a polymer in a true theta solvent. In this way, it provides a convenient reference state through which real simulations or experiments can be normalized against.InstallationTo installafrc:pip install afrcGoogle colab notebookClick here to use AFRC (and other polymer models) via the Google colab notebookQuickstartThere is a single user-facing object that is built from theafrcpackage, which is the AnalyticalFRC object. This object gives access to a bunch of additional object functions. As an examplefrom afrc import AnalyticalFRC
A = AnalyticalFRC('APPAPAPAPPAPAPAPPAPPAPPAPAPPA')
# prints the expected radius of gyration if the associated sequence
# behaved like a bona fide Flory Random Coil
print(A.get_mean_radius_of_gyration())
# prints the expected end-to-end distance if the associated sequence
# behaved like a bona fide Flory Random Coil
print(A.get_mean_end_to_end_distance())DocumentationFor full documentation,see hereHelpIf you find a bug or have any feature requests, please submitan issue here on GitHub. Also, feel free toshoot Alex an emailLicenseThe afrc package is distributed by theHolehouse Labunder the GNU LESSER GENERAL PUBLIC LICENSE.ReferencesFlory, P. J. (1969). Statistical Mechanics of Chain Molecules. Oxford University Press.Volkenstein, M. V. (1958). The configurational statistics of polymeric chains. Journal of Polymer Science, 29(120), 441–454.Mao, A. H., Lyle, N., & Pappu, R. V. (2013). Describing sequence–ensemble relationships for intrinsically disordered proteins. Biochemical Journal, 449(2), 307–318. |
afreeca | AfreecaAfreecaTV API WrapperInstallpipinstallafreecaUsageimportasynciofromafreecaimportAfreecaTV,Chat,UserCredentialasyncdefcallback(chat:Chat):print(f"{chat.nickname}:{chat.message}")asyncdefmain():cred=awaitUserCredential.login("ID","PW")afreeca=AfreecaTV(credential=cred)chat=awaitafreeca.create_chat("BJ")chat.add_callback(callback)awaitchat.start()asyncio.run(main())Referencehttps://github.com/ha1fstack/aftv-ws |
afreeze | afreezeFreeze ALSA configuration settings.Getting Startedafreeze may be installed via PyPi via:pipinstallafreeze[daemon]--userOr afreeze may be installed via git:gitclonehttps://github.com/Alexhuszagh/afreezecdafreeze
pythonsetup.pyinstall--userOnce installed, you can freeze various alsa configuration settings via various commands. For example, to force the audio to stay at 75%, you may use:afreeze--command"'Master' 75%"To list all controls available and current content settings, use:afreeze--list-controls
afreeze--list-contentsafreeze supports custom devices and sound cards. To specify a custom device, use:afreeze--devicedefault...To specify a custom sound card, use:afreeze--card0...To enable auto-mute mode (muting speakers when headphones are plugged in), use:afreeze--card0"'Auto-Mute Mode' Enabled"DaemonThis script may also be run as a daemon, requiringpython-daemon. To launch afreeze as a daemon, use:afreeze--daemon...LicenseThis is free and unencumbered software released into the public domain.ContributingUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in afreeze by you, will be unlicensed (free and unencumbered software released into the public domain). |
afrelpl89-hello-world | Failed to fetch description. HTTP Status Code: 404 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.