Saravanan666/pypi-org huggingface dataset:
Package: lockmyresource
lockmyresourceCoordinate locking resources for humans and machines, using a simple sqlite DBThere is a CLI for machines and admins and a minimal tk GUI for lock&release.Quick demoUsageusage: lockmyresource [-h] [--dbfile DBFILE] [--debug] {list,lock,release} ...

Lock some resources

positional arguments:
  {list,lock,release}  Commands
    list               List resources
    lock               Lock a resource
    release            Release a resource

optional arguments:
  -h, --help           show this help message and exit
  --dbfile DBFILE      Database to use
  --debugNOTEthat the current user's username will be used for all operations.NOTEthe db will be created if it does not yet existList resourcesusage: lockmyresource list [-h] [--format {text,csv,json}]Sample output$ lockmyresource list
Resource User  Locked_at                  Comment
fork1    Hegel 2021-01-17 11:42:36.459921 Ideally, I can use fork1
fork2    Kant  2021-01-17 11:52:13.768924 Can't take fork1, I guess
spoon    None  None                       NoneLock existing / Create new resource and lock itusage: lockmyresource lock [-h] resource commentNOTEthat the comment is mandatory.NOTEthat deletion of resources is not yet implemented, you need to manipulate the sqlite DB manually for nowExample$ lockmyresource lock fork1 'To eat or not to eat...'
Obtained lock for Resource(name='fork1')Release a lockusage: lockmyresource release [-h] resourceNOTEThat only the locking user can release a lock.Example$ lockmyresource release fork1
Released lock for Resource(name='fork1')Wait for a lock to be releasedusage: lockmyresource subscribe resource [shell-command]NOTEWill not wait if it is the current user who has locked the resourceExamples$ lockmyresource subscribe fork1 && aplay tada.wav

$ lockmyresource subscribe fork2 'start trigger.bat' --interval=10=======
History0.4.0Try to use display name of users on windows0.3.0 (2022-05-21)Show version number on the UISubscribe: get notified when a resource becomes available0.2.0 (2021-04-03)First release on PyPI.
Package: locknotey
locknoteySimple script that stores encrypted data within itself and allows you to modify it using any editor.DescriptionI was a long-time user ofLockNote, but there was no
native version of it when I switched to linux. This is my attempt to re-create that functionality
in a Python script.InstallationInstalllocknoteyas follows:pipinstalllocknoteyUsageUselocknoteyas follows:Make a separate copy of thelocknoteyscript file for anything you want to store securely using the commandlocknotey --new /path/to/my/note_file. For example, I store all my online account information in a copy calledpasswords. You can store this script file anywhere you like.Execute the new script file. (I assume you have Python and the requisite supporting modules since you installed this usingpip.)A blank editor window should appear. The editor that's used is specified by yourEDITORenvironment variable. (You could also use the option-e "editor_cmd arg1 arg2..."to select another editor.)Put whatever you want into the editor, for example login names/passwords or names of criminal associates.Save and quit the editor. Then you will be asked for a password to encrypt the text after which the ciphertext will be stored within the script file.To see what you've stored, execute the script file again. You'll be asked for a password after which the encrypted text will be decrypted and displayed in an editor window. From there you can search and/or modify the text and store it back into the script file with the same or a new password.If you have an existinglocknoteyfile and want to update its code to the latest version while retaining the encrypted data, use the commandlocknotey -u /path/to/existing/note_file.FAQIs it secure?The file itself is as secure as the Pythoncryptographymodule will allow. Probably the weakest point is when the unencrypted text is being handled in the editor. Somebody who had access to your system might be able to get the clear text from the editor process. So don't uselocknoteyto store your nuclear launch codes.Will it accidentally eat all my passwords?It's alpha so it might. I still keep a copy of my passwords in another encrypted file. I'll trust it more once I've gotten to a higher release than 0.1.
Package: lockorator
This package provides decorators that will try to acquire lock before
calling decorated function.InstallationpipinstalllockoratorUsageThis package provides two flavours of lock decorators: redis and
asyncio. Both flavours have the same api.Packagelockorator.asyncioprovides asyncio lock decorators, also
compatible withtrio.Packagelockorator.redisprovides redis lock decorators.To use redis locks, setLOCKORATOR_REDIS_URLin your environment:export LOCKORATOR_REDIS_URL="redis://localhost:6379"APIlock_or_exitDecorator. Before decorated function starts, try to acquire lock with
specified identifier. If lock is acquired successfully, proceed
executing the function. Otherwise, return immediately. Theidargument can contain templated string, wich will be rendered with args
and kwargs, passed to the function.Example:fromlockorator.asyncioimportlock_or_exit@lock_or_exit('lock_work_{}')defworkwork(x):passworkwork(3)# Will try to acquire lock 'lock_work_3'lock_waitDecorator. Before decorated function starts, try to acquire lock with
specified identifier, waiting forwaittimeseconds if needed. If
lock is acquired successfully, proceed executing the function.
Otherwise, raiselockorator.TimeoutError. Theidargument can
contain templated string, wich will be rendered with args and kwargs,
passed to the function.Example:fromlockorator.redisimportlock_wait@lock_wait('lock_work_{}',waittime=4)defworkwork(x):passworkwork(3)# Will try to acquire lock 'lock_work_3' for 4 seconds
Package: lockphish
Installation$ pip install lockphish && lockphishFeatureslockphish, ** Powerful termux tool ;) **How to install ?$ pkg install python -y
$ pip install lockphish
$ lockphishRun ?$ lockphishDisclaimerWe are not responsible for your loss by this tool.
this tool is made for Education/Learning Purpose.
Dont harm anyone using this tool.Usage$ lockphish -h

Author : The Linux Choice
PIP module : Parixit Sutariya
Github : github.com/Bhai4You
Blogspot : https://bhai4you.blogspot.comGithub
Package: lock-requirements
NOTICE: If you're reading this on GitHub.com please be aware this is a mirror of the primary remote located athttps://code.richard.do/richardARPANET/lock-requirements.
Please direct issues and pull requests there.lock-requirementsA CLI tool to update your requirements.txt file package versions to be locked/fixed to the latest versions available on PyPI.For exampleInput file contents before locking:requirements-parser
pypi-simple>=0.4.0,<1.0.0
docopt>=0.5.0,<1.0.0
wheelInput file contents after locking:requirements-parser==0.2.0
pypi-simple==0.4.0
docopt==0.6.2
wheel==0.32.3Installationpip install lock-requirementsUsagelock requirements.txt
lock requirements-dev.txtUse a custom PyPI simple index url to retrieve latest package versions from.lock requirements.txt --index-url=https://example.com/simple/Development Installationpip install -r requirements-dev.txt
python setup.py developAnd to the run tests:tox
Package: locks
locksPOSIX file system locking usingflock.Getting startedInstall this package withpipinstalllocksUsageThe simplest usage is to block indefinitely until the lock is acquiredfromlocksimportMutexwithMutex('/tmp/file.lock'):# do exclusive stuff hereAlternatively, block until a timeout is reachedfromlocksimportMutextry:withMutex('/tmp/file.lock',timeout=0.5):# do exclusive stuff hereexceptBlockingIOError:# handle the failure to acquire the lockFinally, a common paradigm is to attempt to acquire the lock without blocking,
do something, and then block indefinitely. Herecallbackwill be called once
if we cannot immediately acquire the lock, and then we will block indefinitely.defcallback():print("Blocking: waiting for file lock on '/tmp/file.lock'")withMutex('/tmp/file.lock',callback=callback):# do exclusive stuff hereIf bothcallbackandtimeoutare used then we will attempt to
acquire the lock until thetimeoutis reached, and then we will block
indefinitely.LicenseThis project is licensed under the MIT License. See theLICENSEfile.
Package: locksey
🔒 locksey 🔒Personal CLI utility tool to easily encrypt and decrypt files in a directory. Can be used to
encrypt secrets in a repo, MFA recovery codes, password text files, your journal/diary entries or any text file with personal or confidential information.How does it work?If you want a file in a directory to work with locksey, you name the file with ending with.unlocked.*extension.
When you runlocksey lock <password>, it will recursively find all.unlocked.*files, encrypt them and rename them to.locked.*.Similarly when you runlocksey unlock <password>, it will recursively find all.locked.*files, decrypt them and rename them to.unlocked.*.You can also tell locksey to store the password in you home folder so you don't have to type it again.Files are encrypted as described inthisstackoverflow post.Installpython3 -m pip install lockseyUsagepython3 -m locksey [-h] action [password]ActionsNameDescriptionlockRecursively go through the directory encrypt and rename files matching glob./**/*.unlocked.*unlockRecursively go through the directory and decrypt and rename files matching glob./**/*.locked.*setpasswdStore password for current directory in home folder (~/.locksey), base64 encoded so you don't have to provide it againrmpasswdRemove stored password for current directoryChanging passwordFor changing the password in you current directory, rununlockrmpasswdif neededlockwith new passwordsetpasswdwith new password if needed
Package: locksmith
locksmithYour liaison between repository secrets and the great beyond.Overviewlocksmithacts as an interface between secrets and the Python code using them.Use caseConsider the following scenario:Your cool new app requires a slick, unique API key to run. Perhaps your framework requires you to put this API key in amanifest.jsonorAppDelegatefile. However, your manifest file(s) need to be checked into GitHub, thus exposing your precious API key.locksmithprovides a layer of security to prevent you from having to type out your secrets in plaintext anywhere in your repository.How it workslocksmithusesGnuPGto encrypt your secrets. Each user in your repository can have their own secrets, either shared among many or unique to each user. Then,locksmithexposes a simple API to access your secrets in code, rather than typing out something likeAPI_KEY = "something_that_shouldn't_be_shared".InstallationInstall withpip:pip3 install locksmithAlso, make sure you havegpginstalled. You can useHomebrew:brew install gpgIf you'd like to usepinentrytoo and you're using a Mac, installpinentry-mac:brew install pinentry-macSetup and BackgroundFirst, decide on who's going to be using your secrets.locksmithlooks for secrets based on users, which are programmer-defined. For example, if I was the only user of my repo, the only user would bewcarhart. However, perhaps you're collaborating on a repo, where you'd have two users, such aswcarhartandfriend_user. Or, perhaps you're collaborating on a repo but you'd only like to use one joint user forlocksmith, such aslocksmith_user.If you have one user,locksmith_user, add the following filelocksmith_user.lcksmthto your repository (but do NOT check it into version control!):secret0=secret_value0
secret1=secret_value1
...
secretN=secret_valueNAn example of this file with actual values could be:API_KEY=3eWhJtewSr0sSshNX9STOLUV1nGtFznxQM8UfyYH
DATABASE_USER=admin
DATABASE_AUTH=passwordIf you named this filelocksmith_user.lcksmth, then these secrets will be available to the userlocksmith_user, or to any user that knowslocksmith_user's password.Now, encrypt the file usinggpg:gpg -c locksmith_user.lcksmthEnter a desired password. This will produce a filelocksmith_user.lcksmth.gpg. You can now safely check this into your version control.Usage and APIUsageFirst, make sure to includelocksmithin your Python code:from locksmith import LocksmithThen, make aLocksmithobject based on what user(s) you have defined:l = Locksmith("locksmith_user")When the above line is executed, you will be prompted forlocksmith_user's password. This will happen only when you instatiate a newLocksmithobject and not every time you access a secret.APIlocksmithexposes the following API for you to use:get_secret(parameter)Theget_secretfunction allows you to get a specific secret, specified byparameter. Use it like this:secret_value = l.get_secret("API_KEY")If you pass in an invalidparameter,locksmithwill raise aValueErrororLookupError.
Package: locksmithy
Sure, here is a basic README file template for the Locksmith password generator project:Locksmith Password GeneratorLocksmith is a simple password generator tool that generates strong, random passwords with various options for customization.InstallationTo install Locksmith, you can usepip:pip install locksmithyAlternatively, you can clone the repository and install it manually:git clone https://github.com/yourusername/locksmith.git
cd locksmith
pip install .UsageTo generate a password with the default options (10 characters, lowercase letters only), simply run:locksmithTo specify the length of the password, use the-lor--lengthflag followed by the desired length:locksmith -l 16To include numbers in the password, use the-nor--numbersflag:locksmith --numbersTo include special characters in the password, use the-sor--specialflag:locksmith --specialTo include uppercase letters in the password, use the-uor--uppercaseflag:locksmith --uppercaseYou can combine these options to create passwords with your desired characteristics:locksmith -l 20 -nusLicenseLocksmith is licensed under theMIT License.ContributingIf you would like to contribute to Locksmith, please feel free to submit a pull request or open an issue on theGitHub repository.
Package: lockstep-sdk
Lockstep SDK For PythonA financial service SDK for python for innovative accounting solutions providers.Who are we?Lockstep automates accounting workflows to improve your operational efficiency and cash flow. Accelerate payments through automated customer communications, enhanced collections activity management, and innovative forecasting and reporting.Getting StartedHere's how to add the Lockstep python SDK to your project.Pip install the Lockstep APIpath\\to\\project\\file:pipinstalllockstep-sdkObtain an API key for the Lockstep Platform API by visiting:API KeyCreating LockstepAPI Client in your .py fileenv='PASS_ENVIRONMENT_HERE'client=LockstepApi(env)client.with_api_key([INSERT_API_KEY])ifnotclient:print("ISSUE WITH CLIENT, NO API KEY OR WRONG ENVIRONMENT")else:print(f"CLIENT WAS CREATED SUCCESSFULLY:{client}")returnclientMake a ping call to make sure you're connectedhttps://developer.lockstep.io/reference/v1_status_retrievestatusstatus_results=client.status.ping()print(f"StatusResult:{status_results}")You now have your API credentials and have successfully created your client.How to Use (Basic Usage)This example will show you how to call an API, using theQuery Invoices APIto retrieve a collection of invoices.# Connect to Client# Lockstep provides sandbox and production environmentsenv='sbx'client=LockstepApi(env)# Add your API key hereclient.with_api_key([INSERT_API_KEY])# Querying for the first 10 invoices sorted by invoice dateinvoices=client.invoices.query_invoices("invoiceDate","Company","invoiceDate asc",10,0)print(invoices['records'])Sample ProjectFetch Invoice Sample Python Project
Package: locloc
loclocOnline LOC counterExamplehttps://locloc.onrender.com/svg?url=https://github.com/eggplants/loclocDeploymentRelated workhttps://locfetch.app/(closed)ref:https://zenn.dev/kyoheiu/articles/3f01fef8afe2c9https://codetabs.com/count-loc/count-loc-online.htmlsource:https://github.com/jolav/codetabs
Package: locode
LocodeOverviewThis module contains a series of json files with ISO_3166-1, ISO_3166-2 and
city codes fromhttp://www.unece.org/cefact/locode/service/location.htmlbdist_eggpython setup.py bdist_eggsupports--country=<country_code>for creation
of light weight eggs.Usage>>>importlocode>>>locode.get_country_code('United States')u'US'>>>locode.get_country_code('Angola')u'AO'>>>locode.get_country_code('Uruguay')u'UY'>>>locode.get_state_code('Montevideo','Uruguay')u'MO'>>>locode.get_state_code('Arizona','US')u'AZ'>>>locode.get_state_code('Saint John','AG')u'04'>>>locode.get_city_code('New York','NY','US')u'NYC'>>>locode.get_city_code('Punta Carretas','Montevideo','Uruguay')u'PCA'>>>locode.get_city_code('Ondjiva','Cunene','AO')u'NGV'>>>locode.get_city_code('-','-','-')u'XX'>>>locode.get_state_code('-','-')u'XX'>>>locode.get_country_code('-')u'XX'Other methodslocode.get_countries()- returns a map with all countries and its codes.locode.get_states(country)- returns a map with all states and its codes for the provided country.locode.get_cities(country, state)- returns a map witll all cities and its codes for the provided country and state (only for few countries atm)
Package: locom
LocomLocom is the acronymlogcomments.
It is designed to help with log analysis.If you are a tester or systems analyst, you need to go through the logs frequently.
It is very often useful to take notes or highlight some lines.
If the log is from complex system, it would be useful share your comments with others.
It means commented log should be saved in some common format.
This is exactly what this tool is for.InstallationpipinstalllocomHow it worksGetlog file, which needs to be commented on.Createrules file, which describe comments and highlights of the rows.Runlocomin command line.Get html version of the log with comments and highlights.ExampleThis example is placedexample directory.Log: input.txtBrno
Fake row
Prague
Fake row
Bratislava
Fake row
Vienna
Fake row
Warsaw
Fake row
Berlin
Fake row
Paris
Fake row
Stockholm
Fake row
Madrid
Fake rowRules File: rules.txtre     Brno          red       red comment
re     Prague        green     green comment
re     Bratislava    blue      blue comment
re     Vienna        yellow    yellow comment
row    9             gray      gray comment
row    11            violet    violet comment
re     Paris         low       low row and comment
re     Stockholm     normal    normal row and comment
re     Madrid        hideCLIlocom cli -r rules.txt -i input.txt -o output_example.html  --title "Example of rows and comments" --description "This example shows all possible type of rows and comments."Note: Used Python has to have/Scriptsin the path.Output HTML: output_example.htmlMissing line 17 is not a error. It is result ofhiderender.Rules FileOne line in file is one rule. Every rules has 3 mandatory parts and 1 optional part.Parts are separated by 4+ whitespaces.Consider this example with named parts.re                     Brno                red            red comment
[row recognizer type]  [recognizer value]  [render type]  [comment - optional]Recognizer2 types of recognizers are implemented:re- Recognizer value is regular expression for this type of recognizer.row- Recognizer value is row number for this type of recognizer.RendersList of all renders:redgreenblueyellowgrayvioletlownormalhide
Package: locomotive
Python API clients and a CLI for France's railways :sparkles:Installationlocomotiverequires Python 3.6+ and can be installed usingpip:pipinstalllocomotiveAPI ClientsModuleFeaturesStatusoui_v3Travel RequestgcBoard RequestCLIlocomotive is easy to use. Find below simple examples:locomotivesearch--help# Search by city namelocomotivesearchAmsterdamParis# Search by train station code (Amsterdam to Paris here)locomotivesearchNLAMAFRPAR# Specify the date and the travel classlocomotivesearchBrestParis--date2019/07/14--classfirstDevelopmentpoetryinstall
poetryrunlocomotive# pre-commitpoetryrunpre-commitinstall
poetryrunpre-commitrun--all-filesReleasespoetryversionX.Y.Z# e.g. v0.4.0gittagvX.Y.Z
gitpush--tagsLicenseslocomotive is released under theMIT license.
The train stations database (stations-lite.csv) is derived fromstations.csv(trainline-eu/stations) released under the Open Database License (ODbL) license.Logo: Train Tickets by b farias from the Noun Project.
Package: locoprop
LocoProp TorchImplementation of the paper "LocoProp: Enhancing BackProp via Local Loss Optimization" in PyTorch.Paper:https://proceedings.mlr.press/v151/amid22a/amid22a.pdfOfficial code:https://github.com/google-research/google-research/blob/master/locoprop/locoprop_training.ipynbInstallationpip install locopropUsagefromlocopropimportLocoLayerLocopropTrainer# model needs to be instance of nn.Sequential# each trainable layer needs to be instance of LocoLayer# Example: deep auto-encodermodel=nn.Sequential(LocoLayer(nn.Linear(28*28,1000),nn.Tanh()),LocoLayer(nn.Linear(1000,500),nn.Tanh()),LocoLayer(nn.Linear(500,250),nn.Tanh()),LocoLayer(nn.Linear(250,30),nn.Tanh()),LocoLayer(nn.Linear(30,250),nn.Tanh()),LocoLayer(nn.Linear(250,500),nn.Tanh()),LocoLayer(nn.Linear(500,1000),nn.Tanh()),LocoLayer(nn.Linear(1000,28*28),nn.Sigmoid(),implicit=True),# implicit means the activation only is applied during local optimization)defloss_fn(logits,labels):...trainer=LocopropTrainer(model,loss_fn)dl=get_dataloader()forx,yindl:trainer.step(x,y)
Package: locr
READMEThis fetches full text from Library of Congress OCR files for LOC items. It
returns the text, when found, andNoneotherwise.UsageIt can take as input either a result item from aJSON API responseor the URL of an item:from locr import Fetcher

# From item or resource URL
Fetcher.full_text_from_url('https://www.loc.gov/resource/mss85943.001811/')

# From search result
# See https://libraryofcongress.github.io/data-exploration/requests.html
url = 'https://www.loc.gov/search/?fo=json&fa=subject:cats'
response = requests.get(url)
Fetcher(response['results'][0]).full_text()Note that the above example is not guaranteed to work. In particular, not all
objects have online text available.Fetcher may raise the following exceptions:ObjectNotOnline: when the object does not have any online formats.AmbiguousText: when multiple fulltext options are found.UnknownFormat: when locr is not sure how to handle the fulltext link's filetype.If you encounter these exceptions, kindly file an issue or open a PR about the
newly discovered edge case. Thanks.Why LOCR?The Library of Congress has put OCRed full text online for many of its items.
However:the API does not in general return the URLs to these itemsOCRed text exists on different servers, with different URL formats; there is
not one single way to construct the relevant URL for an itemWhile full text is easy to retrieve via the web site for a single item, perhaps
you, like me, would like to fetch it programmatically.DevelopmentThis package has a humiliating lack of tests, and I have done nothing to verify
appropriate versions for dependencies. It really can use your help. PRs welcome.