Saravanan666/pypi-org huggingface dataset:
Package: secondstate
secondstateRequirementsPython >= 3.8Docker(for development only)Installationpip install secondstateUsageLets say you want to figure out the availability of a haircut with a particular barber:fromsecondstateimportSecondState# We want all available appointments from now until the next 7 daysbarber=SecondState(start="2021-05-23T11:17:49",finish="2021-05-30T11:17:49")# The barber works Monday 10:00-16:00barber.set(start="2021-05-24T10:00:00",finish="2021-05-24T16:00:00")# Looks like the barber already has appointments on Monday at 10:30 and 15:00barber.unset(start="2021-05-24T10:30:00",finish="2021-05-24T11:00:00")barber.unset(start="2021-05-24T15:00:00",finish="2021-05-24T15:30:00")# Haircut takes 30 minutesprint(barber.get(minutes=30))Result:[["2021-05-24T10:00:00","2021-05-24T10:30:00"],["2021-05-24T11:00:00","2021-05-24T11:30:00"],["2021-05-24T11:30:00","2021-05-24T12:00:00"],["2021-05-24T12:00:00","2021-05-24T12:30:00"],["2021-05-24T12:30:00","2021-05-24T13:00:00"],["2021-05-24T13:00:00","2021-05-24T13:30:00"],["2021-05-24T13:30:00","2021-05-24T14:00:00"],["2021-05-24T14:00:00","2021-05-24T14:30:00"],["2021-05-24T14:30:00","2021-05-24T15:00:00"],["2021-05-24T15:30:00","2021-05-24T16:00:00"],]To use the development environment:make devReleasingpoetry version major | minor | patch
make release
Package: secondstotext
Seconds to TextConverts seconds to human readable text or tuple, and back again.fromsecondstotextimportSectxt,txtsecSectxt: Converts seconds to text
    Args:
        seconds:    Amount of seconds for it to process.
                    Can be float (at least 3 decimals) or int.
                    Can be negative but will be changed to positive.

        listgen:    Generates a list of responses
                    used for string generation but can
                    be used externally if needed.
                    print(Sectxt(-12069123).listgen())

      showzeros:    trims any part before the first not 0.
                    print(Sectxt(-12069123).showzeros())
                    4 Months, 18 Days, 0 Hours, 32 Minutes, 3 Seconds

        showall:    shows all parts.
                    print(Sectxt(12069123).showall())
                    0 Years, 4 Months, 18 Days, 0 Hours, 32 Minutes, 3 Seconds, 0 ms

       rawtuple:    returns a 7 part tuple.
                    print(Sectxt(12069123).rawtuple())
                    (0, 4, 18, 0, 32, 3, 0)

        default:    skips any part of the response that is 0.
                    print(Sectxt(12069123.135156484))
                    4 Months, 18 Days, 32 Minutes, 3 Seconds, 135msText to seconds: converts a string to seconds.
    Args:
        text:
            A string to convert to seconds, comma seperated.
            Can be any combination of:
            Years, Months, Days, Hours, Minutes, Seconds, ms
            Y,y,M,D,d,H,h,m,S,s,ms are all accepted.
            Capitalized M is Month and lower case m is minute if single letter.
            print(txtsec("1 Year, 2 Months, 3 Days, 4 Hours, 5 Minutes, 6 Seconds, 7 ms"))
            print(txtsec("1y,2M,3d,4H,5m,6s,7ms"))
            = 37065900.007
Package: secpass
TheSecPasssuite of programs, tools, and protocols is designed to
allow fairly easy creation, distribution, rotation, and management of
very secure passwords in the most secure manner possible, without
compromising ease-of-use too much.Please note that thesecpasslibrary only provides low-level
drivers and command-line tools. If you are interested in a more
user-friendly interface, please try theSecPass-GUIpackage.Warning2014/04/18: The SecPass package is currently under active
development, i.e. it is not ready for use. Unless you like living on
the edge, of course. So, until further notice, SecPass is explicitly
in “beta” (at best), functionally incomplete, but can do some things
at times reliably. You should only use it if you make lots of
backups and don’t mind losing data. Cheers!TL;DRInstall:$pipinstallsecpass$secpass--helpOverviewTODO: add docs
Package: secpass_gui
A GUI interface to secpass, the Secure Password system.Warning2014/04/19: The SecPass GUI package is currently under active
development, i.e. it is not ready for use. Come back in a month
or two.TL;DRInstall on Linux (for non-Ubuntu distributions, adjust as needed):# install wxPython 3.0.0.0$wgethttp://downloads.sourceforge.net/project/wxpython/wxPython/3.0.0.0/wxPython-src-3.0.0.0.tar.bz2$tarxvjfwxPython-src-3.0.0.0.tar.bz2$cdwxPython-src-3.0.0.0/wxPython$pythonbuild-wxpython.py--install# if building into a virtualenv, add "--installdir=$VIRTUAL_ENV" to the last line# install secpass-gui$pipinstallsecpass-gui# run secpass-gui$secpass-gui
Package: sec-pass-manager
Secure Password ManagerWith this program you will be able to create random passwords with the length you desire. The passwords will be saved in the same directory your console is.
You can also edit the password generating another one or even delete a file you don't need anymore.UsageFirst of all, you can install this project withpip install sec-pass-managerThere are 2 ways for using this program.1. Graphical interfaceAll you need to do typespmon your console.After that a window will popup where you can create, delete or edit a file that contains username and password:2. ConsoleThis is a more direct way to manage the files using the console commandcpass. Now you will see an example of each function:cpass create --filename test --username pingu --length 24cpass edit --filename test --username pingu2 --length 12cpass delete --filename testThere is also de reduced commandscpass create -f test -u pingu -l 24cpass edit -f test -u pingu2 -l 12cpass delete -f test[!NOTE]
This program will create.keyfiles that you can open with any notepad as if it was a.txtIf you don't indicate a length it will be set to 10 as default.
Package: sec-password
A small Python library that aids in securely storing and authenticating passwords.Based on best practice suggestions from:https://crackstation.net/hashing-security.htm?=rdUsage>>> hashed = hash_password(
...    password='secure password',
...    key='string from keyfile',
...    iterations=500
... )
>>> verify_password(
...    stored_password=hashed,
...    provided_password='secure password',
...    key='string from keyfile',
...    iterations=500
... )
TrueNote that iterations is a multiplied by 1,000. 500 is probably a reasonable
default.Keyed HashesIfkeyis used it should be a string read from a file or outside source that
is not stored in the database or hardcoded into the program.Keyed Hashes are not required. By default an empty string is used.Seehttps://crackstation.net/hashing-security.htm?=rdfor Keyed HashesInstallationpoetry add sec-passwordorpip install sec-password
Package: secpat2gf
secpat2gfconvert secret patterns to gf compatible.Installfrom PyPI$pip3installsecpat2gffrom Source$gitclonehttps://github.com/dwisiswant0/secpat2gf$cdsecpat2gf/$pip3install-rrequirements.txt$python3-mbuild$pip3installdist/secpat2gf-*.whl--force-reinstallUsage$secpat2gf--helpusage: secpat2gf [-h] -r RULE_FILE [-e ENGINE] [-f FLAGS] [-s]options:-h, --help            show this help message and exit-r RULE_FILE, --rule-file RULE_FILEpath to rule file/URL-e ENGINE, --engine ENGINEset custom engine (default: grep)-f FLAGS, --flags FLAGSgrep flags (default: -aHnoPr)-s, --save            save to /home/dw1/.gf instead of stdoutExampleConverting YAML-based rule URL to gf compatible$secpat2gf-rhttps://github.com/mazen160/secrets-patterns-db/raw/master/datasets/generic.yml[02/10/2023 08:56:55 AM] Slack Token pattern{"flags": "-aHnPr","pattern": "(xox[pborsa]-[0-9]{12}-[0-9]{12}-[0-9]{12}-[a-z0-9]{32})"}[02/10/2023 08:56:55 AM] test pattern{"flags": "-aHnPr","pattern": "test"}[02/10/2023 08:56:55 AM] generic password pattern{"flags": "-aHnPr","pattern": "password.+"}[02/10/2023 08:56:55 AM] Generic secret pattern{"flags": "-aHnPr","pattern": "secret.+"}...Converting YAML-based rule file to gf & save the results$secpat2gf--save-rgeneric.yaml[02/10/2023 10:30:56 AM] directory '$HOME/.gf' created successfully[02/10/2023 10:30:57 AM] Saving Slack Token pattern to $HOME/.gf/slack-token_secrets.json[02/10/2023 10:30:57 AM] Saving test pattern to $HOME/.gf/test_secrets.json[02/10/2023 10:30:57 AM] Saving generic password pattern to $HOME/.gf/generic-password_secrets.json[02/10/2023 10:30:57 AM] Saving Generic secret pattern to $HOME/.gf/generic-secret_secrets.json[02/10/2023 10:30:57 AM] Saving Generic token pattern to $HOME/.gf/generic-token_secrets.json...Then we can see that the pattern can be successfully compiled to gf:$gf-listadmin-password_secretsaws-client-id_secretsaws-mws-id_secretsaws-secret-key_secretsbasic-auth-credentials_secretsbasic-token_secretsbearer-token_secrets$gf-dumpadmin-password_secrets# dump patterngrep -aHnPr "(admin).+(secret|token|key).+" .WeaponizingSeeworkaroundfromgf-secretsto weaponize those patterns.Resourcessecrets-patterns-db- Secrets Patterns DB: The largest open-source Database for detecting secrets, API keys, passwords, tokens, and more.gf- A wrapper around grep, to help you grep for things.gfx- Improved version of gf by @tomnomnom.gf-secrets- Secret and/or credential patterns used for gf.Licensesecpat2gfis distributed under MIT. SeeLICENSEfile.
Package: secpickle
SecPickleWe all know that thePython Pickle moduleis not secure becausearbitrary codecan be executed. The function ofsecpickleis to guarantee that you will only unzip files that weregenerated by you, avoiding readingunknown files.SecPickle in PyPIHow to useThe functions available insecpickleare:load()loads()dump()dumps()Only one thing changes in using these functions: an argument calledkeyhas been added to each of them. The key is requested so that aunique hashcan be used to prove that file was created by you. The more complex your key, the greater the security.Thesame keyused for dump must be used to load the file. Otherwise, theIntegrityUnconfirmedErrorexception will be thrown, indicating, as the name implies, that it is not possible to confirm whether that file was created by you.fromsecpickleimportsecpickledata=[{'name':'SecPickle'}]key='this-is-my-secret-key'withopen('data','wb')asfile:secpickle.dump(data,file,key)withopen('data','rb')asfile:result=secpickle.load(file,key)print(result)LicenseBSD 3-Clause License
Copyright (c) 2023, FirlastThis project uses theBSD 3-Clause License, please read the license for more informations.
Package: secprint
Python library to improve console printing by adding context to your prints. It makes your console much cleaner, and you won't have to worry about making your prints beautiful.Warning: This library is not maintained anymore and its implementation uses questionable python
tricks. It is advised for anyone interested in continuing it to figure out a better implementation
and to start over with an entirely new project.
A fork with more some additional features and more maintenance efforts is available athttps://pypi.org/project/context-verbose/Installation:pip install secprintBasic usage example:fromsecprintimportSectionPrinterasSptSpt.enter_section('Main section',color='blue')Spt.print('Text in main section')foriinrange(3):Spt.enter_section('Subsection{}'.format(i+1))Spt.print('Text in subsection')Spt.print('Text in subsection')Spt.exit_section()Spt.exit_section()The above example will print the following:Advanced usage example, using contexts and automatic line skips when exiting sections:fromsecprintimportSectionPrinterasSptSpt.set_automatic_skip(True)withSpt("Main section",color="blue"):Spt.print('Text in main section')foriinrange(3):withSpt(f"Subsection{i+1}"):Spt.print('Text in subsection')Spt.print('Text in subsection')The above example will print the following:
Package: secrecy-capacity
Calculation of the Secrecy CapacityThis repository contains Python implementations of two algorithms that allow a
(numerical) calculation of the secrecy capacity of wiretap channels.The two algorithms are taken from the following publications:S. Loyka and C. D. Charalambous, "An Algorithm for Global Maximization of
Secrecy Rates in Gaussian MIMO Wiretap Channels," IEEE Trans. Commun., vol.
63, no. 6, pp. 2288–2299, Jun.
2015.T. Van Nguyen, Q.-D. Vu, M. Juntti, and L.-N. Tran, "A Low-Complexity
Algorithm for Achieving Secrecy Capacity in MIMO Wiretap Channels," in ICC
2020 - 2020 IEEE International Conference on Communications (ICC),
2020.InstallationYou can install the package via pippipinstallsecrecy-capacityIf you want to install the latest version, you can install the
package from sourcegitclonehttps://github.com/klb2/secrecy-capacity-calculation.gitcdsecrecy_capacity
gitcheckoutdev# only if you want to unstable versionpipinstall.UsageSome examples are provided in theexamples/directory.
You can run the code locally or using a service like Binder. If you use Binder,
you do not need a local Python installation and you can simply run the scripts
in your browser.VersionThe code has been developed and tested with the following versionsPython 3.9numpy 1.19scipy 1.6matplotlib 3.3Jupyter 1.0License and ReferencingThis program is licensed under the GPLv3 license. If you in any way use this
code for research that results in publications, please cite the original
articles listed above and this repository.You can use the following BibTeX entry for this repository@online{BesserSecrecyCapacityCalculation,author={Besser, Karl-Ludwig},title={Algorithms to calculate the secrecy capacity},subtitle={Python Implementation},year={2021},url={https://github.com/klb2/secrecy-capacity-calculation},version={0.1.0},}
Package: secret-agent
Secret-AgentExamples# automatically generates a key and encrypts an empty string
secret = SecretAgent.Secret()

# rekey the secret
secret.rekey()

# update the secret value
secret.update_value(data='new string value')

# fetch the secret value as clear text
secret_text = secret.clear_text


# encrypt using user supplied password
secret = SecretAgent.Secret(passwordKeyAsClearText='P@ssw0rd!!', data='secret text', forgetKeyOnCreation=True)
secret_text = secret.unlock(password=input())
Package: secretcli
The secretcli project provides a simple to use command line interface to
theAWS Secrets Manager.
It is capable of uploading or downloading the entire secret as well as
working with individual fields.InstallingThis project is available onpypiand can be installed with
pip.pip3 install secretcliUsageInitializing a new SecretNew secrets are easy to initiate. This will create a new Secret in the
AWS Secret Manager and store an empty javascript object as the first
version.$secretcliinitTestSecretWorking with individual KeysAdditional Key/Value pairs can be added to the secret using a single
command. Behind the scenes this downloads the existing database, updates
it with the new key/value pair, and uploads it as the current version.$secretclisetTestSecretpostgreshost10.10.10.16$secretclisetTestSecretpostgresuserpostgres$secretclisetTestSecretpostgrespasswordsuper_secret_string$secretclisetTestSecretlongstring"This is a string with spaces."Retrieving values is just as simple. This can be useful when trying to
use values in bash scripts.$secretcligetTestSecretpostgreshost10.10.10.16$secretcligetTestSecretpostgresuserpostgres$secretcligetTestSecretpostgrespasswordsuper_secret_stringValues can also be completely removed from the secret.$secretcligetTestSecretpostgreshost10.10.10.16$secretcliremoveTestSecretpostgreshost$secretcligetTestSecretpostgreshostTo avoid passing the value directly into the console (potentially
logging it in places like bash history) the-sflag can be passed
and the value can be passed in interactively without displaying it.$secretclisetTestSecretpostgrespassword-sValue:Repeatforconfirmation:$secretcligetTestSecretpostgrespasswordsuper_secret_stringWorking with entire FilesThe entire Secret can be downloaded as a file. This command works
regardless of the format of the file- Secrets that are not managed bysecretclican be downloaded using this tool.$secretclidownloadTestSecret./secret_configuration.jsonThe file can also be uploaded- but be careful, it will be uploaded
exactly as is without any verification of the json formatting.$secretcliuploadTestSecret./secret_configuration.jsonDatastore Formatsecretclistores data as a JSON Object in an attempt to be as
interoperable as possible. Eachkeypassed tosecretcliis
represented by akeyin the JSON Object.When storing in AWS Secret Managersecretcliuses theSecretStringfield in the AWS Secrets Manager. This allows the
database to be viewed in the AWS Console both as a raw string and using
the Key/Value table.
Package: secretconf
secretconfManage your secret configurations easilyInstallationpip3 install secretconf --userUsagesecretconf is a library to manage (encrypt/decrypt) your credentials on demand using public key encryption.Hushhush is a commandline utility installed with secretconf to make your life easier to store and update credentialshush--sectiontwittermain--fields'user,__token'--privatekey~/.ssh/id_rsahush--help
Usage:hush[OPTIONS]Options:--sectionTEXTSection(Appname)--privatekeyTEXTPrivatekeypath--configpathTEXTSecretconfigurationpath--fieldsTEXTquotedcommaseparatedfields;secretfieldsareprefixedwith__--helpShowthismessageandexit.Data storageYou can configure where to save the data using--configpathwhich is set to/tmp/secrets.confby default.[twittermain]user=ahmed__token=eYCWre9l7IauoHs6K3D5J2wkgnQQBtFV4CoZE3W4tpbxa7Z7Qt+c/LnQhSI=Please notice that you can't use multiple keys on the sameconfigpathfileAPI usagesecretconfdocumentationmake_configdeftest_make_config_creates_file_with_encrypted_data():make_config(APPNAME,{'user':USER,'__password':PASSWORD},config_path=TEST_CONFIG_PATH,private_key=hashedsk)assertos.path.exists(TEST_CONFIG_PATH)withopen(TEST_CONFIG_PATH,'r')asf:content=f.read()assert"user"incontentassertUSERincontentassert"__password"incontentassertPASSWORDnotincontentread_configconf=read_config(APPNAME,config_path=TEST_CONFIG_PATH,private_key=hashedsk)assertAPPNAMEinconfassert'user'inconf[APPNAME]assert'__password'inconf[APPNAME]assertconf[APPNAME]['user']==USERassertconf[APPNAME]['__password']==PASSWORDTestingsecretconf tests exists intestsdirectorybasic teststest_basic.py: encryption/decryption and usage ofmake_configandread_configproperty based teststest_properties.pyYou can usepytest testsor justtoxmake sure toinstall requirements-test.txtormake testGenerating Docsmake gendocsRequirementssetuptools==38.5.0click==6.7PyNaCl==1.2.1npyscreen==4.10.5LicenseSoftware is provided as is under BSD 3-Clause LicenseAuthorssecretconfwas written byAhmed Youssef <xmonader@gmail.com>_.
Package: secretcrypt
Utility for keeping your secrets encrypted. Also has aGo
version.For example, you have the following configuration fileMY_SECRET=VerySecretValue!but you can’t include that file in VCS because then your secret value
would be exposed.Withsecretcrypt, you can encrypt your secret using your AWS KMS
master key aliasedMyKey:$encrypt-secretkmsalias/MyKeyEnterplaintext:VerySecretValue!# enterkms:region=us-east-1:CiC/SXeuXDGRADRIjc0qcE...# shortened for brevity# --- or --$echo"VerySecretValue!"|encrypt-secretkmsalias/MyKeykms:region=us-east-1:CiC/SXeuXDGRADRIjc0qcE...# shortened for brevity
# only use piping when scripting, otherwise your secrets will be stored
# in your shell's history!use that secret in my config filefromsecretcryptimportSecretMY_SECRET=Secret('kms:region=us-east-1:CiC/SXeuXDGRADRIjc0qcE...')# shortened for brevityand get the plaintext likeprintMY_SECRET.get()# VerySecretValue!If you are using very sensitive secrets, you can ensure the plaintext
is not kept in memory and is only encrypted on demand by using a stricter
version:fromsecretcryptimportStrictSecretMY_SECRET=StrictSecret('kms:region=us-east-1:CiC/SXeuXDGRADRIjc0qcE...')# shortened for brevityand get the plaintext likeprintMY_SECRET.decrypt()# VerySecretValue!KMSThe KMS option uses AWS Key Management Service. When encrypting and
decrypting KMS secrets, you need to provide which AWS region the is to
be or was encrypted on, but it defaults tous-east-1.So if you use a custom region, you must provide it to secretcrypt:encrypt-secretkms--regionus-west-1alias/MyKeyLocal encryptionThis mode is meant for local and/or offline development usage. It
generates a local key in your %USER_DATA_DIR% (seeappdirs), so that the key
cannot be accidentally committed to CVS.It then uses that key to symmetrically encrypt and decrypt your secrets.Password encryption - interactive onlyThe password encryption mode should not be used in your application - it is
meant for easily sharing secrets among developers. It interactively prompts
the user for a password when encrypting the secret. When decrypting, it
prompts for the password again.History1.0.4 (2020-09-21)fixed reraise error in decrypt module1.0.3 (2017-11-02)reverted scrypt parameter changes1.0.2 (2017-10-31)changed scrypt parameters1.0.1 (2017-10-31)Fixed readme formatting.1.0.0 (2017-10-31)added password encryption/decryption0.9.1 (2017-03-28)Python3 local module fixed issue with utf-8unpinned dependencies0.4 (2016-03-02)plaintexts are now returned as strings not as bytes0.3 (2016-03-02)BREAKING CHANGE: introduced new semantics for Secret and a new StrictSecret
Package: secretctl
secretctlCommand-line tool for working with aws secrets manager.Installingsecretctlis a python package.$pipinstallsecretctlAuthenticating'secretctl' requires an authenticated AWS user with permissions to use the Secrets Manager, as resolved by boto3.
The primary example being identity settings in ~/.aws/credentials. A recommended way to do this is usingaws-vault,
as in:$aws-vaultexecprod--secretctl..UsageCreating and Updating Secrets$secretctlcreate<path/key><value|->This command will write a secret into the Secret Managers. If-is provided as the value argument, the value will be read from standard input. A description can be added using the --description flag. Tags are added using the --tags flag
and flag values in the tag=value format.$secretctlcreate<path/key><value>--description<STRING>--tags<tag>=<value>,..If the path/key already exists, the process will fail. Useupdateto change the value of a
secret.$cat<filename>|secretctlupdatemyapp/dev/public-key-Usesecretctl tagandsecretctl untagto add/remove/modify tags.Reading Secrets$secretctlreadmyapp/dev/docker_loginPath/KeyVersionValuemyapp/dev/docker_login1mydockerloginUse--quietto return only the secret value.Listing Secrets$secretctllist--pathdi/dev/

Path/KeyDescriptionTags
di/dev/docker_usernameaccesscredentialsforprivateregis..team=di,circleci-context=team-di
di/dev/docker_passwordaccesscredentialsforprivateregis..team=di,circleci-context=team-di
di/dev/vault_tokenteamvaulttokenteam=di,circleci-context=team-di
Found3secrets.If no --path is provided, all secrets will be listed. Use the --tags  to filter for secrets where tags or values
match STRING.Exporting$secretctlexportdi/dev/docker_username=mydockerlogindocker_password=mydockerpasswordvault_token=myvaulttokenExample use in a deploy pipeline:$secretctlexportdi/dev/>local.env
$sourcelocal.envexportcan export secrets in various file formats. The following
file formats are supported:tfvars (default)jsoncsvunder developmentsercretctl does not yet support:
custom KMS key
binary secret value type
(unit testing) no moto support for testing descriptions or resource tags
Package: secretelf
secretelfTable of ContentsInstallationUsageLicenseInstallationpip install secretelfUsageJust pass the secretd binary file to thesecretelf iaskeys command$secretelfiaskeystests/vectors/secretdAPI KEY:  be5e574b2d4ce101eaf374c5a6ba6f40SPID:     6C7BCCC92E1C7308084D737230F38022$secretelf--helpUsage: secretelf [OPTIONS] COMMAND [ARGS]...Options:--version  Show the version and exit.--help     Show this message and exit.Commands:iaskeys$secretelfiaskeys--helpUsage: secretelf iaskeys [OPTIONS] BINARYOptions:--help  Show this message and exit.Licensesecretelfis distributed under the terms of theMITlicense.
Package: secretenv
secretenvJust playing with an idea re: storing config information in a git repo along
with the code, but needing a secret key (in an environment variable) to decrypt
it. Think,git-secret, butscrypt/ symmetric keys instead of GPG.Change logv0.1.5: Relaxed return-type ofsecretenv.load(formerlyopen), to allow
Python 3.8 compatibility.v0.1.4: first decent version. Requires Python 3.9.