Saravanan666/pypi-org huggingface dataset:
Package: shuup-checkoutfi
shuup-checkoutfiA simpleCheckout.fipayment module for theShuupe-commerce platform.UsageInstall the package (should be installable viapip install <this_dir>)Addshuup_checkoutfito yourINSTALLED_APPSRestart your application serverCreate a Checkout.fi payment processor in Shop Admin with proper
values for Merchant ID and Merchant Secret.Create a new payment method for the payment processor.All done! Payments with the payment method will go through
Checkout.fi.Testing valuesDon’t use these in production, silly.Merchant ID:375917Merchant Secret:SAIPPUAKAUPPIASRunning testsYou can run tests withpy.test.Requirements for running tests:Your virtualenv needs to have Shuup installed.Project root must be in the Python path.  This can be done with:pipinstall-e.To run tests, use command:py.test-vshuup_checkoutfi_testsThird-Party LicensesThis package includes a vendored version of thepython-checkoutmodule,
which is BSD licensed.LicenseCopyright (c) 2016 Shoop Commerce Ltd.
Copyright (c) 2015 Aarni KoskelaPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Package: shuup-mirage-field
# Shuup Mirage FieldFields to store encrypted contents in Django.Forked fromhttps://github.com/luojilab/django-mirage-field.## CopyrightCopyright (c) 2012-2021 by Shuup Commerce Inc. <support@shuup.com>## LicenseMITCheck [Vendor licenses](./VENDOR-LICENSES.md)
Package: shuup-onboarding
Shuup OnboardingAdd dynamic panels for onboarding purposes in Shuup (specially in Admin).Installation & ConfigurationInstall this packageRunpip install shuup_onboardingand  addshuup_onboardingtoINSTALLED_APPS.Implement your onboarding steps and add the onboarding middlewareWrite some onboarding steps (any number you want) by implementing theOnboardingStepclass, follow a simple example:classMyInfoStep(OnboardingStep):identifier="my_step_id"title="My Step Title"description="Some description of the step"template_name="my_app/step_template.jinja"defcan_skip(self):returnFalsedefis_done(self):returnself.context.storage.get("my_info")defis_visible(self):returnTruedefget_form(self,**kwargs)->forms.Form:returnMyStepForm(**kwargs)defsave(self,form):self.context.storage["my_info"]=form.cleaned_data["info"]defundo(self):self.context.storage.pop("my_info",None)Then, you need to create an unique onboarding process identifier. For a sake of example, let's usermy_onboarding_processas our onboarding identifier.Now you need to override the base middleware classBaseAdminOnboardingMiddlewareand configure your process id attribute:classMyCustomOnboardingMiddleware(BaseAdminOnboardingMiddleware):onboarding_process_id="my_onboarding_process"To make the onboarding process load your steps, you must use a special provides key:onboarding_process:[YOUR_ONBOARDING_PROCESS-ID]Finally, add your onboarding steps to the provides:classAppConfig(shuup.apps.AppConfig):provides={"onboarding_process:my_onboarding_process":["my_app.onboarding_steps.MyInfoStep","my_app.onboarding_steps.FinalStep",]Done.You can find a full working example atShuup Onboarding Example.LicenseOpen Software License version 3.0CopyrightCopyright (c) 2020 Christian Hess
Package: shuvel
ShuvelUnearthing bad code. Performs regex searches, but with more manageable results.InstallationStandard Buildpip3 install shuvelBleeding Edge Buildpip3 install git+https://gitlab.com/TheTwitchy/shuvelDevelopmentIt is recommended that you use a virtualenv for development:virtualenv --python python3 venvsource ./venv/bin/activatepython setup.py developRun withshuvelUsageRunning Rulesetsshuvel run -t ~/example/srcRuns all rules.shuvel run -t ~/example/src -r general.*Runs all rules in thegeneralcategory.shuvel run -t ~/example/src -r general.security_wordsRuns only the rulegeneral.security_words.shuvel run -t ~/example/src -r general.security_words,general.rng,other.*Runs several rules at once.shuvel run -t ~/example/src -s lowOnly run rules which will report low severity items or higher. Possible values arehigh,low, andinfo.Showing Rulesetsshuvel rulesShows all loaded rules.Writing RulesRules are stored locally, and can generally be found in theshuvelconfig directory, which can be seen when runningshuvel run --help. Non-default rules directories may be specified on the command line with the-roption. Rules need to be JSON files which have a structure as shown below (specifically the magic number should be intact, and all rules should be defined as a list under the "rules" field).Example RulesSee theexamplesfolder for some possibilities.Testing RulesTo ensure a rule is valid, runshuvel testto show any errors or suggestions. The--debugswitch can be passed before thetestcommand as well for additional output.
Package: shx
shxInspired byzx#!/usr/bin/env shxawait$"cat setup.py | grep name"branch=await$("git branch --show-current",capture='o')await$f"dep deploy --branch={branch}"awaitgather($"sleep 1; echo 1",$"sleep 2; echo 2",$"sleep 3; echo 3",)name="foo bar"await$f"mkdir /tmp/{Q(name)}"(Take a look atmore examples.)shxmakes your script writing experience better by taking the advantages of Python's sugary syntax, AsyncIO, and the extensive Python ecosystem.shxdoes three things:Wrapasyncio.create_subprocess_shellaround with asyntax sugar.await $"command"returns anasyncio.subprocess.Processinstance; on non-zero return code, raisesubprocess.CalledProcessError.Provide a top-level async environment.Preload commonly used imports and utilities. Currently, the imports are:importasynciofromasyncioimport*frompathlibimportPathfromshleximportquoteasQimportshutilNote thatshxdoes not perform quote escape automatically. Use functionQ(alias ofshlex.quote) to escape unsafe arguments.InstallpipinstallshxSettings and utility functionsSettings can either betask local(e.g.__.trace = True) or per-command (e.g.await $("echo 42", trace=True)):shell(Default:$(which bash)): Shell to be used.prefix(Default:set -euo pipefail;): String to be prepended to a command.trace(Default:True): Display command if set to True. Same asset -xin bash.capture(Default:False): If set to True, capture stdout and stderr instead of displaying them. The captured strings will replace the.stdoutand.stderrattributes of theasyncio.subprocess.Processinstance returned.await $("...", capture='o')andawait $("...", capture='e')are the aliases of(await $("...", capture=True)).stdoutand(await $("...", capture=True)).stderr, respectively.Attributes:__.argv: alias ofsys.argv, a list of command line arguments__.env: alias ofos.environ, a dict of environment variablescd(cwd: str)Change working directory tocwd. Same as the task local settings, the changes are only effective within the current task.question(prompt: str)input()withKeyboardInterrupthandling.About the subprocess syntaxNo magic, no meta-programming, and no hacking, whatsoever. Prior execution, the script istokenized, and the following replacements occur:"str prefix"$"command"->SHX("command")"function"$("command", k1=v1, ...)->SHX("command", k1=v1, ...)whereSHXis an async function wrapping aroundasyncio.create_subprocess_shell.
Package: shxarray
Xarray Extension for working with spherical harmonic dataThis extension adds functionality to work with Spherical Harmonics toXarray.Features and functionality (in progress)Gravity functionals: (convert from Stokes coefficients to various gravity functionals, such as equivalent water heights, geoid changes, etc.)Filter (e.g. Gaussian or anisotropic filter applied in the spectral domain)Applying functionals of Symmetrical non-rotating elastic isotropic (SNREI) Earth modelsThe use of Xarray like operations allow for applying functionality to multi-dimensional datasetsGetting startedThe tutorials in thedocumentationwill soon provide some Jupyter notebook workflows to adapt.InstallationYou can install this package from PyPi using:pip install shxarrayDevelopment InstallationIf you want to help in the development of this package, it's best to clone the repository to allow for modifications and pull requests. The extension makes use ofCythongenerated code to speed up spherical harmonic synthesis and analysis.Create your own virtual environment withvenvor Anaconda(Optional but recommended, when a user installation is desired)Clone this repositorygit clone https://github.com/ITC-Water-Resources/shxarray.gitChange to the repository directorycd shaxarraySet the environment variableexport USE_CYTHON=1(Optional and only in the case Cython code is being developed or needs to be regenerated)Install using pippip install .or usepip install -e .for an editable installCython build tip on an editable installFrom the repository root directory, regenerating the shared library runningpython ./setup.py build_extwill be much faster than usingpip install -e .This will build the shared library in for example./build/lib.linux-x86_64-cpython-3xx/shxarray/shlib.cpython-3xx-x86_64-linux-gnu.so. To make sure changes are picked up in your editable install you can create a symbolic link in the Python part of the library e.g. :cd src/shxarray/
ln -sf ../../build/lib.linux-x86_64-cpython-311/shxarray/shlib.cpython-311-x86_64-linux-gnu.soContributingThis repository is under development and contributions and feedback are welcome.ContributorsMain developer: Roelof Rietbroek (r.rietbroek@utwente.nl)..
Package: shxparser
shxparserPure Python Parser for SHX Hershey font files.SHX files are an AutoCad format which can encode single line fonts.This format is used for many CNC and laser operations.ProgressThings currently parse, text converts to paths. There may be edge cases and bugs within the code.EncodingCalling the parser on aSHXfile will parse the file. The glyph data is accessed via theShxFile.glyphsdictionary which stores the particular commands.
These positions are stored (or will be) in segments. Each segment is:(x0,y0)-- Move to Position.((x0,y0), (x1, y1))--- Straight Line start->end((x0,y0), (cx, cy), (x1, y1))--- Arc start->control->end where control is a point on the arc that starts at start and ends at end.UsageSeetest_parser.pyfor usage:deftest_parse(self):forfinchain(glob("parse/*.SHX"),glob("parse/*.shx")):shx=ShxFont(f)paths=ShxPath()shx.render(paths,"The quick brown fox jumps over the lazy dog",font_size=50)draw(paths,2000,100,50,f"{f}.png")FormatFor some format descriptions and explanations see:https://help.autodesk.com/view/ACD/2020/ENU/?guid=GUID-0A8E12A1-F4AB-44AD-8A9B-2140E0D5FD23And:https://help.autodesk.com/view/ACD/2020/ENU/?guid=GUID-06832147-16BE-4A66-A6D0-3ADF98DC8228Primarily the format performs regular (octant direction, distance) and 15 speciality operations.Regular CommandDirection, Length pair. If Length is 0 then direction is special command.Special CommandsEND_OF_SHAPE - Ends the shape.PEN_DOWN - Puts the pen down into drawing mode.PEN_UP - Puts the pen up into move mode.DIVIDE_VECTOR - Applies a vector 1/scaleMULTIPLY_VECTOR - Applies a vector scalePUSH_STACK - Pushes current position to the stack.POP_STACK - Pops current position from the stack.DRAW_SUBSHAPE - References the glyph data of another glyph.XY_DISPLACEMENT - Moves to a long dx, dy position.POLY_XY_DISPLACEMENT - Performs a sequence of long dx, dy position changes. 0,0 terminates.OCTANT_ARC - Performs an octant_arc operation. Performing an arc across some octants.FRACTIONAL_ARC - Performs an octant_arc operation with fractional value offsets.BULGE_ARC - Performs bulge arc operations with dx, dy, and bulge.POLY_BULGE_ARC - Performs a sequence of bulge arc operations. 0,0 terminates.COND_MODE_2 - Performs the next command conditionally, and only if the current mode is vertical.
Package: shylock
Distributed locks on Python, with asyncio supportWhat is this?Locks are required when you have a distributed system (like any API) and you want to ensure consistency for your data and prevent race conditions. There are a lot of ways to implement them, and this library aims to provide easy access to some of the better ways.The library is written primarily for use with asyncio code, but also supports normal synchronous usage.Currently supported backends:MongoDB (using unique indexes + ttl indexes for consistency and safety)ArangoDB (using unique indexes + ttl indexes for consistency and safety)Can be extended for other storage systems pretty easily.LicenseLicensing is important. This project itself uses BSD 3-clause license, but e.g. Mongodb Motor library and other such libraries used by it may have their own licenses.For more information check theLICENSE-file.Getting startedAddshylockto your project via pip / pipenv / poetry# MongoDB asynciopipinstallshylock[motor]# MongoDBpipinstallshylock[pymongo]# ArangoDB asynciopipinstallshylock[aioarangodb]# ArangoDBpipinstallshylock[python-arango]For most easy usage, you should in your application startup logic configure the default backend for Shylock to use, and then use theAsyncLockclass to handle your locking needs.frommotor.motor_asyncioimportAsyncIOMotorClientfromshylockimportconfigure,AsyncLockasLock,ShylockMotorAsyncIOBackendCONNECTION_STRING="mongodb://your-connection-string"client=AsyncIOMotorClient(CONNECTION_STRING)configure(awaitShylockMotorAsyncIOBackend.create(client,"projectdb"))asyncdefuse_lock():asyncwithLock("my-lock"):# The lock is now acquired, and will be automatically releaseddo_something()asyncdefanother_lock_use():lock=Lock("my-lock")try:awaitlock.acquire()do_something()finally:awaitlock.release()asyncdeftime_sensitive_code():lock=Lock("my-lock")try:locked=awaitlock.acquire(block=False)iflocked:do_something()finally:iflocked:awaitlock.release()Or theLockclass for code whereasynciosupport isn’t requiredfrompymongoimportMongoClientfromshylockimportconfigure,Lock,ShylockPymongoBackendCONNECTION_STRING="mongodb://your-connection-string"client=MongoClient(CONNECTION_STRING)configure(ShylockPymongoBackend.create(client,"projectdb"))defuse_lock():withLock("my-lock"):# The lock is now acquired, and will be automatically releaseddo_something()defanother_lock_use():lock=Lock("my-lock")try:lock.acquire()do_something()finally:lock.release()deftime_sensitive_code():lock=Lock("my-lock")try:locked=lock.acquire(block=False)iflocked:do_something()finally:iflocked:lock.release()You can also check out theexamples, which also show how to use Shylock with ArangoDB.ContributingThis project is run on GitHub using the issue tracking and pull requests here. If you want to contribute, feel free tosubmit issues(incl. feature requests) or PRs here.To test changes locallypython setup.py developis a good way to run this, and you canpython setup.py develop--uninstallafterwards (you might want to also use the--userflag).Financial supportThis project has been made possible thanks toCocreatorsandLietu. You can help us continue our open source work by supporting us onBuy me a coffee.
Package: shynais
shyna/shynaisGetting StartedDownload links:SSH clone URL: ssh://git@git.jetbrains.space/shyna623/shyna/shynais.gitHTTPS clone URL:https://git.jetbrains.space/shyna623/shyna/shynais.gitThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes.PrerequisitesWhat things you need to install the software and how to install them."setuptools",
    "wheel",
    "ShynaDatabase",
    "ShynaWeather",
    "Shynatime",
    "python-telegram-bot",
    "ShynaTelegramBotNotification",
    "wget",
    "haversine"DeploymentAdd additional notes about how to deploy this on a production system.ResourcesAdd links to external resources for this project, such as CI server, bug tracker, etc.DescriptionThis is for tracking and checking activities. It will store the data in table
    and Notification package should take care of sending notification in case there is something unexpected
    1) is_location_service_on?
    2) is_this_is_first_time_on_cam?
    3) is_shivam_in_front_of _any_camera?
    4) is_shivam_working late night?
    5) Is_shivam_at_home?
    6) is_mom_calling?
    7) is_shivam_far_away?
    8) is_shivam_coming_home?
Package: shy-sentry
shy-sentrysentry-sdk but silentShh.Extendinggetsentry/sentry-python, this package provides the following
customizations we found useful in multiple projects:default integrations that have a silentAtexitIntegration.callbackaGuard()context manager / decorator which provides quite sentry feedback on errors for parts of code that cannot
let exceptions rock all the way up to killing the process. This is intended for use in our legacy cgi scripts, where console output is undesired.loading certainsentry_sdk.initkwargs (dsn,environment,release) from json by default.restoressentry_sdk.serializer.MAX_DATABAG_DEPTHand expandssentry_sdk.serializer.MAX_DATABAG_BREADTHfor more
complete debugging information. This is intended for use in our legacy cgi scripts, where code complexity per function can be higher then desired in non-legacy code.Table of contentsBadgesInstallUsageBadgesmasterdevelopInstall$pipinstallshy-sentryUsageCreate a JSON configuration file with keys, used to configure sentry sdk:{"SENTRY_DSN":"https://client_key@sentry.io/project_id","SENTRY_ENVIRONMENT":"dev","SENTRY_RELEASE_STRING":"project:branch@version"}Then, setup shy-sentry in the desired entry point and guard your entry point usingGuardas a context manager or as a
decorator.as context managerimportshy_sentrydefmain():print(1/0)if__name__=="__main__":shy_sentry.init(config_path="./sentry_config.json")withshy_sentry.Guard():main()as decoratorimportshy_sentry@shy_sentry.Guard()defmain():print(1/0)if__name__=="__main__":shy_sentry.init(config_path="./sentry_config.json")main()Exceptions outside ofGuard()will get youZeroDivisionErrorissue/event in Sentry AND a traceback in your console,
when using default integrations.importshy_sentrydefmain():print(1/0)if__name__=="__main__":shy_sentry.init(config_path="./sentry_config.json")main()IfGuard()can't get asentry_sdk.client.Clientinstance, it will reraise exceptions instead of ignoring them.If there are certain exceptions you want reraised fromGuard(), you'll need a sub-class like this:fromshy_sentryimportGuardclassMyGuard(Guard):def__exit__(self,exc_type,exc_val,exc_tb):ifnotsuper().__exit__(exc_type,exc_val,exc_tb):# super intends to ignore, do we want to ignore?ifisinstance(exc_type,OSError):returnTruereturnFalse
Package: shytools
shytoolsTheshytoolsmodule provides tools to implement shy classes, that is,
classes whose instances have real private attributes:shymethod- Shy methods decorator.shyproperty- Shy properties decorator.shytype- Shy abstract base class.Usage`from shytools import *`

`class MyShy(shytype):`

    `__slots__ = ()`

    `@shymethod`
    `def __init__(self):`
        `self.private = "spam"`

    `@shymethod`
    `def get(self):`
        `return self.private`

    `@shymethod`
    `def set(self, value):`
        `self.private = value`

    `@shyproperty`
    `def public(self):`
        `return self.private`

    `@public.setter`
    `def public(self, value):`
        `self.private = value`

`my_shy = MyShy()`

`print(my_shy.get()) # "spam"`
`print(my_shy.public) # "spam"`

`my_shy.set("eggs") # ok`

`print(my_shy.get()) # "eggs"`
`print(my_shy.public) # "eggs"`

`my_shy.public = "spam" # ok`

`print(my_shy.get()) # "spam"`
`print(my_shy.public) # "spam"`

`print(my_shy.private) # AttributeError`Issues and limitationsThe shy subclasses must necessarily define an__slots__attribute, and that
attribute must necessarily be an empty tuple:`class MyShy(shytype):`

      `__slots__ = ()`Within shy properties and methods, self is not a real instance of the shy
subclass:`class MyShy(shytype):`

      `__slots__ = ()`

      `@shymethod`
      `def __init__(self):`
          `print(isinstance(self, MyShy)) # False`

      `def regular_method(self):`
          `print(isinstance(self, MyShy)) # True`If the shy subclasses implement their own__new__and__del__, they need
to call__new__and__del__of the base class manually:`class MyShy(shytype):`

      `__slots__ = ()`

      `def __new__(cls, *pargs, **kwargs):`
          `my_shy = shytype.__new__(cls)`
          `<do something>`
          `return my_shy`

      `def __del__(self):`
          `<do something>`
          `shytype.__del__(self)`
Package: si4ul
si4ulThis package implements selecrtive inference for unsupervised learning.image segmentationk-meanschange-point detectionKey references are the following papers:Computing Valid p-values for Image Segmentation by Selective InferenceComputing Valid p-value for Optimal Changepoint by Selective Inference using Dynamic ProgrammingRequirementsThis package requires the following packages:matplotlibmpmathnumpyopencv-pythonpandasscipyseabornstatsmodelstqdmInstalling si4ulUse pip to install si4ul package.
Required packages will be also installed automatically.$pipinstallsi4ulAPI ReferenceDetailed API reference is available here