Saravanan666/pypi-org huggingface dataset:
Package: 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
Package: 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.
Package: 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)
Package: 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
Package: 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.
Package: 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.
Package: 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 -afipsdk@gmail.comLink del proyecto:https://github.com/afipsdk/afip.pyEste software y sus desarrolladores no tienen ninguna relación con la AFIP.
Package: 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.
Package: 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"
Package: 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
Package: 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)
Package: 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 👨‍👩‍👧 👫 👨‍👩‍👦 .
Package: 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.
Package: 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
    """
Package: 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
Package: 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