Saravanan666/pypi-org huggingface dataset:
Package: sans
sansSynchronous /AsynchronousNationStatesAfully typedextension forHTTPXfor theNationStates API.Installingpython3-mpipinstall-UsansDevelopment version:python3-mpipinstall-Uhttps://github.com/zephyrkul/sans/archive/master.zip#egg=sansExamplesSynchronousimportsansfromxml.etreeimportElementTreeasETdefmain():sans.set_agent("Darcania")request=sans.Nation("darcania","fullname population flag census",mode="score",scale="65 66",)root=sans.get(request).xmlsans.indent(root)print(ET.tostring(root,encoding="unicode"))withsans.stream("GET",sans.RegionsDump())asresponse:forregioninresponse.iter_xml():sans.indent(region)print(ET.tostring(region,encoding="unicode"))if__name__=="__main__":main()Asynchronousimportasyncioimportsansfromxml.etreeimportElementTreeasETasyncdefmain():sans.set_agent("Darcania")asyncwithsans.AsyncClient()asclient:request=sans.Nation("darcania","fullname population flag census",mode="score",scale="65 66",)root=(awaitclient.get(request)).xmlsans.indent(root)print(ET.tostring(root,encoding="unicode"))asyncwithclient.stream("GET",sans.RegionsDump())asresponse:asyncforregioninresponse.aiter_xml():sans.indent(region)print(ET.tostring(region,encoding="unicode"))if__name__=="__main__":asyncio.run(main())Authenticationauth=sans.NSAuth(password="hunter2")sans.get(sans.Nation("testlandia","ping"),auth=auth)# X-Autologin is automatically retrieved and stored for when the auth object is re-usedprint(auth.autologin)# X-Pin is cached internally for repeated requestsroot=sans.get(sans.Nation("testlandia","packs"),auth=auth).xmlTelegramslimiter=sans.TelegramLimiter(recruitment=False)# The Telegram API can be used without a TelegramLimiter, but marking it ahead of time can save an API call.response=sans.get(sans.Telegram(client="abcd1234",tgid="1234",key="abcdef1234567890",to="testlandia"),auth=limiter)assertresponse.content=b"queued"Command Linesans--nationdarcaniacensus--scale"6566"--modescore--agentDarcania<NATIONid="darcania"><CENSUS><SCALEid="65"><SCORE>8145.00</SCORE></SCALE><SCALEid="66"><SCORE>0.00</SCORE></SCALE></CENSUS></NATION>sans--nationtestlandiafullname<NATIONid="testlandia"><FULLNAME>TheHiveMindofTestlandia</FULLNAME></NATION>sans--region"thenorthpacific"numnationslastupdate<REGIONid="the_north_pacific"><LASTUPDATE>1685681810</LASTUPDATE><NUMNATIONS>9535</NUMNATIONS></REGION>sans--quit
Noqueryprovided.Exiting...RequirementsPython 3.7+httpx
Package: sansaycdrparser
Sansay SBC CDR File Parser Module---------------------------------USAGErecords_list = sansaycdrparser.ParseFile(file, ver)Where file is the name of a Sansay SBC CDR file and ver is the version of the Sansay SBC CDR file format.Current support for version 1.18 is provided and is the default passed at this time.Earlier versions and newly released versions will be updated as needed.LICENSE This helper module is distributed under the MIT License
Package: sansio-lsp-client
sansio-lsp-clientAn implementation of the client side of the LSP protocol, useful for embedding
easily in your editor.Developing$ git clone https://github.com/PurpleMyst/sansio-lsp-client
$ cd sansio-lsp-client
$ python3 -m venv env
$ source env/bin/activate
(env)$ pip install --upgrade pip
(env)$ pip install poetry
(env)$ poetry installMost tests don't work on Windows,
but GitHub Actions runs tests of all pull requests and uploads coverage files from them.
TODO: add instructions for looking at coverage files on WindowsTo run tests, first download the langservers you need.
You can mostly read.github/workflows/test.yml, but the Go langserver is a bit of a gotcha.
You will need to install go fromhttps://golang.org/,
because the one fromsudo apt install golangis too old.
Extract it inside where you clonedsansio-lsp-clientso that you get an executable namedsansio-lsp-client/go/bin/go.$ tar xf ~/Downloads/go1.16.5.linux-amd64.tar.gzOnce you have installed all langservers you want, you can run the tests:(env)$ PATH="$PATH:$(pwd)/go/bin" poetry run pytest -v
Package: sansjson
sansJsonYour friendly neighborhood JSON sorter helper!This package is meant to rival the nativesort_keysoption of thejsonpackage.sort_keysonly re-orders the keys according to the alphanumeric
priority.  This method breaks down when internal components (such aslists)
need to be re-ordered as well.  To ensure consistency across the entire JSON
object, as in the event of ahash, a recursive reordering of sortable
components may be necessary.  The following situations are covered:Note:Homogenous: All elements in a specific component are the same data type.
(e.g.{'a': [1,2,3], 'b', [2,3,4], 'c': [3,4,5]})Nonhomogenous: Each element in a specific component may be any of the
supported JSON types. (e.g.{'a': [1, 'z', False], 0: [3,4,5]})The default priority for nonhomogenous types is:nullbooleannumber (int > float)stringarrayobjectMulti-leveldictJSON (homogenous + nonhomogenous)arrayJSON (homogenous + nonhomogenous)All types except pythonobjectThe following cases are not supported:pythonobjects(i.e. classes)InstallationpipinstallsansjsonHow to use>>>importsansjson>>>to_sort={'a':0,'g':[3,1,3,2],'c':1,'f':2}>>>sansjson.sort_pyobject(to_sort){'a':0,'c':1,'f':2,'g':[1,2,3,3]}>>>a='{"z": 1, "a": {"12": true, "ef": ["a", 1, false], "ap": 0}}'>>>sansjson.sort_json(a)'{"a": {"12": true, "ap": 0, "ef": [false, 1, "a"]}, "z": 1}'
Package: sanskrit
sanskritWrite programs in the fastest language, as confirmed by NASA.InstallationpipinstallsanskritNow put a# coding: sanskritcomment above your code to start programming in sanskrit!UsageThere's two ways to usesanskrit:As a REPLSimply typesanskritand it will bring up thesanskritREPL:$ sanskritसंस्कृत प्रोग्रामिंग 3.11.5 (main, Aug 24 2023, 15:09:45) [Clang 14.0.3 (clang-1403.0.22.14.1)]>>>x=42>>>दर्शयतु(x)# print(x)42In a projectSimple for loop:# coding: sanskritसर्वेषांआईअन्तःसीमा(5):# for i in range(5):दर्शयतु(आई)#     print(i)Output:$pythonexample.sanskrit01234import this:# -*- coding: sanskrit -*-आयातम्इदम्‌Output:$pythonexample.sanskritThe Zen of Python, by Tim PetersBeautiful is better than ugly.Explicit is better than implicit....
Package: sanskrit-text
Sanskrit Text (Devanagari) Utility FunctionsFree software: GNU General Public License v3Documentation:https://sanskrit-text.readthedocs.io.FeaturesSyllabificationVarṇa VicchedaPratyāhāra Encoding-DecodingUccāraṇa Sthāna Yatna UtilitySeveral other utility functionsInstallTo install Sanskrit Text, run this command in your terminal:$pipinstallsanskrit-textCreditsThis package was created withCookiecutterand thehrishikeshrt/cookiecutter-pypackageproject template.History0.1.0 (2022-07-03)First release on PyPI.
Package: sanskrit-tts
sanskrit_ttsA simple python library for converting Sanskrit text to speech.Pre-requisitesCurrently, the only supported method is to use Google Cloud text to speech with a workaround (see details below). A Google Cloud account with text-to-speech API enabled is required. Instructions for enabling the API and setting up application credentials are describedhere. Please follow these steps before using this library.Note that the TTS API will incur a cost if the free quota is exceeded (details). The library uses a wavenet voice by default, but this can be changed via thevoiceparameter tosynthesize_text.InstallationThis package has been developed on python 3.8 but should work with any version of python >= 3.6.pipinstallsanskrit_ttsTo install from the master branch of the git repo:pipinstallgit+https://github.com/avinashvarna/sanskrit_tts.gitFor an editable installation (to modify the code and experiment)gitclonehttps://github.com/avinashvarna/sanskrit_tts.gitcdsanskrit_tts
pipinstall-e.UsageSee theexample notebookfor a simple example of converting text from Sanskrit Wikipedia to the corresponding audio.How it worksGoogle Text-to-Speech does not support Sanskrit yet. As a workaround, this library uses other languages for speech to text conversion. Kannada is used by default for this workaround. Any other language/voice supported by Google TTS API can be used by changing thevoiceparameter tosynthesize_text, and the results will vary. A complete list of voices is availablehere.
Package: sanskrit-util
SanskritFor usage of this library, and for other tasks such assandhijoining/splitting,
sentence parsing, etc., please see thesanskrit_parserlibrary.Thesandhiandsoundsmodules are not fully featured currently,
and are unlikely to be developed due to the availability of better maintained packages.Original description:This is a general-purpose package for dealing with Sanskrit data of any kind.
It currently operates at and below the word level and below, with modules like:query, for accessing linguistic datasandhi, for applying and undoing sandhi changessounds, for testing sounds and getting the meter of a phraseSoon the package will move up to the word and sentence levels. Once there, it
will provide tools for inflecting, analyzing, tagging, and parsing Sanskrit.
Package: sansldap
sansldap - Python Sans-IO LDAP LibraryLibrary for LDAP in Python.
It does not provide any IO or concurrency logic as it's designed to be a pure Python implementation that is then used by other libraries.
This follows thesans-IOparadigm to promote re-usability and have it focus purely on the protocol logic.
Some examples that utilitise this library can be found intests/examplesDocumentationDocumentation is available athttps://sansldap.readthedocs.io/.RequirementsCPython 3.7+InstallFrom PyPIpipinstallsansldapFrom Sourcegitclonehttps://github.com/jborean93/sansldap.gitcdsansldap
pipinstall-e.
Package: sanssouci
sanssouci.pythonGeneral presentationPost hoc inference via multiple testingThe goal of this projet is to port theR package sansSoucito python.Authors:Laurent RisserandPierre Neuvial.Permutation-based confidence envelopesA typical output for fMRI data (Localizer data set, left vs right click) is shown below:The left plot displays an upper confidence envelope on the False Discovery Proportion among the most significant voxels. The right plot displays a lower confidence envelope on the number of True Postives among the most significant voxels. See theScript to reproduce this plot.Test the package on synthetic dataHere is a simple code you can use to test and get familiar with thesanssoucipackage. Other examples are given in theexamplesdirectory.import sanssouci as sa
import numpy as np



#1) generate phantom data
p = 130
n = 45


X=np.random.randn(n,p)  #NOTE: no signal!! we expect trivial bounds
categ=np.random.binomial(1, 0.4, size=n)


#2) test the algorithm
B = 100
pval0=sa.get_perm_p(X, categ, B=B , row_test_fun=sa.row_welch_tests)

K=p
piv_stat=sa.get_pivotal_stats(pval0, K=K)


#3) Compute Bounds

alpha=0.1

lambda_quant=np.quantile(piv_stat, alpha)
thr=sa.t_linear(lambda_quant, np.arange(1,p+1), p)
swt=sa.row_welch_tests(X, categ)
p_values=swt['p_value'][:]
pvals=p_values[:10]

bound = sa.max_fp(pvals, thr)
print(bound)
Package: sanstem
sanstemSanstem is a tool used forstemmingSanskrit Verbs and Nouns. Stemming is a pre-processing procedure applied for many NLP algorithms by which the suffix of a word is removed to obtain its stem/root form. This tool is built using a simple rule-based approach.Installationpip install sanstemUsagefrom sanstem import SanskritStemmer

#create a SanskritStemmer object
stemmer = SanskritStemmer()Stemming a Nouninflected_noun = 'गजेन' 
stemmed_noun = stemmer.noun_stem(inflected_noun)
print(stemmed_noun)
# output : गज्Stemming a Verbinflected_verb = 'गच्छामि'
stemmed_verb = stemmer.verb_stem(inflected_verb)
print(stemmed_verb)
# output : गच्छ्Please note to only enter asingle wordinDevanagaritext as input to the functionsverb_stem()andnoun_stem().ContributeCurrently the tool can stem only Sansrkrit Verbs and Noun. It can be extend to more parts of speech like adjective, adverb etc.The tool can be made flexible to accept Sanskrit input in any convention like IAST, HK, iTrans etc.Instead of stemming just a single word, it can be made capable of stemming a sentence or even a whole file.IssuePleaseopen an issuehere in case any bug was encountered.
Mail id :nairsooraj2000@gmail.com
Package: santa
A Python project to randomly pair Secret Santa gifters and recipients, following a set of constraints, and email
them, all without the operator seeing the assignments.RequirementsyagmailInstallationInstall withpip3 install santaorpython3-mpip install santa. Precede either command withsudoif it
fails due to insufficient permissions.UsageCreatePersonobjects for all participants with their names and addresses:importsantajohn=santa.Person('John Doe','jdoe@example.com')sally=santa.Person('Sally Salamander','sally@mander.com')linus=santa.Person('Linus Torvalds','torvalds@transmeta.com')guido=santa.Person('Guido van Rossum','guido@python.org')Put them into a list:people=[john,sally,linus,guido]If any participants have restrictions on who they can give to (say, John and Sally are married and will be getting
each other gifts regardless), create a dictionary with the giver as the key and the banned recipients in a list as the
value:# not only are John and Sally married, but Sally hates Linus and will not get him a gift.restrictions={john:[sally],sally:[john,linus]}Pass these into the functionsanta.run(person_list, invalid_links=None, *,message='',subject='SecretSanta').
This will match people and send emails. If a match is not found, the program will raisesanta.SolvingError. If
you haven’t alreadyconfigured yagmail, it will prompt you for a username and password.santa.run(people,restrictions,message='Thank you for participating.')If there are any errors sending emails, they will be printed to the console in the form of a list of tuples of(gifter, recipient). You, the operator, must decide how to handle this.OptionsBy default, santa will solve using the'loop'strategy, which results in a “gifting loop.” As of version 0.2,
santa can also solve with the method'draw', which simulates drawing tickets from a hat. This method will not
necessarily result in a loop, but it will be possible for “pairs” of two gifters giving to each other to occur.To set a solving mode, pass it intosanta.run()like so:santa.run(people,restrictions,solve_mode='loop')The current list of solving modes is as follows:'loop'(default)'draw'Santa also has options for output modes. By default, it will email recipients. But as of version 0.2, it also has the
option to save output to text files in the current working directory. These can be attached to emails and sent
without the operator having to find out who is assigned to whom.To set an output mode, pass it intosanta.run()like so:santa.run(people,restrictions,out_mode='text')The current list of output modes is as follows:'email'(default)'text'
Package: santa-7imbrook
Secret SantaSimple cli to match your friends or family up for secret santas!Add people to your group, set a location to exclude households or partners. People in the same location wont get each other../santa.pyadd-person<name><phone-number><location>You can test out your matches with--dry-run./santa.pyshuffle--dry-runThen send it off! (without--dry-run) There's no way to track back who got who after the program quits so it's one shot.
Package: santa-helpers
santa-helpersHelpers for Advent of CodeeFree software: MIT licenseDocumentation:https://santa-helpers.readthedocs.io.FeaturesCalculate manhattan distance>>>distances.manhattan((-3,1),(0,0))4Generate neighbors>>>list(neighbors.neighbors((1,1)))[(1,0),(0,1),(2,1),(1,2)]>>>list(neighbors.neighbors((1,1),8))[(0,0),(1,0),(2,0),(0,1),(2,1),(0,2),(1,2),(2,2)]>>>list(neighbors.neighbors((1,1),p_min=(1,1)))[(2,1),(1,2)]Generate points in path>>>list(paths.path_points((0,0),'R2'))[(1,0),(2,0)]CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.0.1 (2022-02-02)First release on PyPI.neighborsparsing to dict0.0.2 (2022-03-08)manhattan distancepoints in path
Package: santander-cobranca-xml
# santander-cobranca-xmlConsumes the API given by Santander in order to register a *boleto bancário*.In Brazil, Santander requires the use of a client ssl certificate.## ExampleNotice that one may not use the same ticket twice. Thus, in this examples, it is necessary to request two tickets, one to register the *boleto bancário* and the other to retrieve the status.```nosso_numero = '1'data = {'cod_convenio': 'CONVENIO','tp_doc': '01', # 01=CPF, 02=CNPJ'num_doc': '11111111111','pagador_nome': '','pagador_endereco': '','pagador_bairro': '','pagador_cidade': '','pagador_uf': '','pagador_cep': '','nosso_numero': nosso_numero,'seu_numero': nosso_numero,'data_vencimento': '30062017','data_emissao': '27062017','especie': '02', # Duplicada mercantil'valor_nominal': '102', # R$ 1,02'multa': '0','qt_dias_multa': '0','juros': '0','tipo_desconto': '0', # Isento'valor_desconto': '0','data_limite_desconto': '00000000','valor_abatimento': '0','tipo_protesto': '0', # Não protestar'qt_dias_protesto': '0','qt_dias_baixa': '15','mensagem': 'Teste',}estacao = 'SUA_ESTACAO'nsu = '1'data_nsu = '28062017'cert = ('path to certificate', 'path to private key')ret1 = get_ticket(data, cert=cert)print '-- solicita ticket --'print 'retCode', ret1.return_codeprint 'ticket', ret1.ticketprint ''ret2 = incluir_titulo(ret1.ticket, estacao=estacao, nsu=nsu, data_nsu=data_nsu, cert=cert, teste=False)print '-- incluir titulo --'print 'nsu', nsuprint 'data nsu', data_nsuprint 'situacao', ret2.situacaoprint 'descricao', ret2.descricaoprint ''ret3 = get_ticket(data, cert=cert)print '-- solicita ticket --'print 'retCode', ret3.return_codeprint 'ticket', ret3.ticketprint ''ret4 = consultar_titulo(ret3.ticket, estacao=estacao, nsu=nsu, data_nsu=data_nsu, cert=cert, teste=False)print '-- consulta titulo --'print 'situacao', ret4.situacaoprint 'descricao', ret4.descricaoprint ''```## TestingI have tested using my company's client ssl certificate and it worked fine.
Package: santic-validation
BuildPackageTools for help developers working with Sanic and Pydantic.Featuresvalidate_schemaasync_validate_by_methodSanticModelMethodTypeFieldInstallationpip install santic-validationUsagefrom typing import Optional
from pydantic import BaseModel, Field
from santic_validation import (
    validate_schema,
    async_validate_by_method,
    SanticModel,
    MethodType,
)


class QueryAddressSchema(BaseModel):
   location: str


def address_number(value: str):
   return f"Number: {value}"


def make_address(value: str):
   return f"Address: {value}"


class AddressSchema(SanticModel):
   number: MethodType[int] = Field(method=address_number)
   address: MethodType[str] = Field(method=make_address)

   @property
   def address_method_params(self):
       query: QueryAddressSchema = self._context.get("query")
       return {"value": f"{self.address} ({query.location})"}

   @property
   def number_method_params(self):
       query: QueryAddressSchema = self._context.get("query")
       return {"value": f"{self.number} ({query.location})"}


class PlanetSchema(BaseModel):
   name: Optional[str]
   category: int


sanic_app = Sanic(name="TestingApp")


def query_category_(category_id):
    return Model.get(id=category_id)


@sanic_app.route("/post", methods=["POST"])
@validate_schema(body=BodySchema, query=QuerySchema)
async def post_handler(request, body, query):

    # validate to make sure category exists
    # if exists, change the body.category value
    async_validate_by_method(
        body,
        {
            "category": {
                "method": query_category,
                "params": {"category_id": body.category},
            }
        },
        exceptions=(DoesNotExists,),
    )

    return Text("hello world")


@sanic_app.route("/post_address", methods=["POST"])
@validate_schema(
   body=AddressSchema,
   query=QueryAddressSchema,
   method_replace_value=True,
)
async def post_address(request, body, query):
    return json(
        {
            "body": body.dict(),
            "query": query.dict(),
        }
    )
Package: santitools
Santi's ToolsThis repo contains a set of Python tools and APIs that I use for personal projects.These utilities are:Filesystem (filesystem.py):A collection of tools for working with files, synchronously or using co-routines.Colors (colors.py):It provides 3 ways to colorize your text with ANSI escape sequences: using an already-built dictionary, a function or a special colorizer object.Math (math.py):A set of math functions (for randomness mostly) and highly accurate math constants.Time (time.py):A time API that's very similar to JavaScript'sDateobject.Screen Clear (__init__.py):A function to easily clear the screen, by using 1 of 2 methods: theosmodule'ssystemfunction or an ANSI escape sequence.Bisect (__init__.py):A binary-search algorithm as a function. It's useful for finding a value in a sorted list, with a logarithmic time complexity.It so happens I just packaged this project, so now you can install it with the commandpip install santitools. Try it out!*WARNING: The math randomness functions are just as safe as the built-inrandommodule. They are just a JavaScript-like wrapper.
Package: santodigital-bigquery
## Wrapper para trabalhar com a API do BigQuery### Procedimento para upload no Pypi#### Pré requisitos
Instalar pacotes pythonpython3 -m pip install –user –upgrade setuptools wheelpython3 -m pip install –user –upgrade twine#### Upload no PypiNa pasta onde tem o setup.pypython3 setup.py sdist bdist_wheelpython3 -m twine upload dist/*Changelog1.0.1 (2020-02-27)Mudança de ownership.1.0.0 (2020-02-26)First release on PyPI.
Package: santodigital-gcpLogging
GCP LOGGING MANAGERThis is a simple gcp logging package where you can easily write logs to gcp stackdriver with custom parameters.Required librarypip install --upgrade google-cloud-loggingSetting up authenticationIn the Cloud Console, go to the Create service account key page.From the Service account list, select New service account.In the Service account name field, enter a name.From the Role list, select Project > Owner.GCP Stackdriver matricsparam type: Resource type to filter in Stackdriver Logging (required)param service: Service name to filter in Stackdriver Logging (required)param log_name: Log Name to filter in Stackdriver Loggingparam region: GCP Service Region to filter in Stackdriver Logging (optional) default value region='us-east1'Sample codefromsantodigital_gcpLoggingimportCloudRunLoggingClient# Resouce must match with strackdriver resource.type (cloud_run_revision or bigquery_resource etc)resource='cloud_run_revision'name='santodigital-gcpLogging'SERVICE='santodigital-gcpLogging'logger=CloudRunLoggingClient(resource,SERVICE,name)""":param struct: (Dict) Custom information for logging into Stackdriver Logging.:param severity: Severity Level for the logging."""defreport(struct,severity='INFO'):logger.report(struct,severity)returnTrueif__name__=='__main__':print(report({'info':'success'},'WARNING'))
Package: sanwei
sanweiTable of ContentsInstallationLicenseInstallationnix shellgit+https://github.com/fetsorn/sanweipip install sanweiUsage# render a random chinese character with WenQuanYi Zen Hei fontnix buildgit+https://github.com/fetsorn/sanwei#imagesanwei --binary /path/to/blender \--font-path "/path/to/font" \--font-name "Font Name Regular"Docs"--binary", required, path to Blender binary executable, e.g. "/Applications/Blender.app/Contents/MacOS/Blender""--font-path", required, path to chinese font, e.g. "./path/to/chinese.ttc""--font-name", required, name of the font in bpy.data.fonts, e.g. "Chinese Font Regular""--output", optional, name for output file without the .png extension, defaults to "/tmp/sanwei" and creates a "/tmp/sanwei.png" file"--input", optional, arbitrary text to render, defaults to a random chinese character"--resolution", optional, percentage scale for render resolution, int in [1, 32767], default 100"--samples", optional, number of samples for the Cycles render engine, default 128Licensesanweiis distributed under the terms of theMITlicense.