Saravanan666/pypi-org huggingface dataset:
Package: ebryx
InstallationYou can grab the latest .whl file from repository and install it via pip or just simply type:pip install ebryxIf you want build from source code, then.git clone https://github.com/EbryxLabs/ebryx
cd ebryx/
python setup.py installYou will have a package namedebryxinstalled for your python.Encryption / DecryptionYou can encrypt / decrypt data usingebcrypttool.(AES-256 Encryption)For example, to encrypt you can do following:ebcrypt <my-file.json> -e --new
# encrypts myfile.json using newly created crypto-secure key. Keys will be written to _keys file.

ebcrypt <my-file.json> -e
# encrypts using keys in AES_KEY, AES_IV environment variable.For decryption, you'll need to haveAES_KEYandAES_IVkeys in your environment variables.ebcrypt <my-file.json> -dThis is an optional step in case you want to decode your encrypted data explicitly for manual checking. Program decrypts your encrypted config file automatically.You can get detailed help on crypto tool by typing.ebcrypt -hOpenSSL compatibilityEncryption done by openssl utility can be decrypted byebcryptutility and vice versa. For example, you can encrypt using openssl as follows.openssl aes-256-cbc -a -e -K <hex-key> -iv <hex-iv> -in <input-file> -out <output-file>hex-keyandhex-ivshould be replaced with actual keys in hex format. Using the same keys you used in openssl, you can decrypt usingebcryptas follows.ebcrypt <encrypted-file> -d
# AES_KEY environment variable should hold <hex-key>.
# AES_IV environment variable should hold <hex-iv>.Similarly, you can encrypt usingebcryptand decrypt the content using openssl, given that you're using the same keys.Code UsageYou can also use it in your own code by importing the appropriate module.# import main module.
import ebryx 

# import crypto submodule.
from ebryx import crypto
Package: ebscopy
ebscopy(/’ebskOu,pai/, not/’ebskopi:/)The official Python wrapper for the EBSCO Discovery Service API.Usageimportebscopysession=ebscopy.Session(user_id="user",password="pass",profile="profile",org="org",guest="n")results=session.search("blue")print("Total Hits:%s"%results.stat_total_hits)results.pprint()session.end()More examples:USAGE.md[STRIKEOUT:Complete module
documentation]InstallationpipinstallebscopyMore info:INSTALL.mdPYPI PageLinksEBSCO DiscoveryEDS API ConsoleEDS API
WikiNotesI use four-space tabs. Sorry if that offends anyone.ThanksEBSCO Information ServicesDave Edwards- for hiring meRon Burns- for letting Dave hire meEric Frierson- for showing me how the API worksNitin Arora- for making the case for a Python EDS API wrapper and
writing the original PyEDS
Package: ebsdtorch
EBSDTorchPyTorch-only library for electron backscatter diffraction (EBSD)Warning: This library is in early development and is not yet stable.InstallationFirst install PyTorch, then install via pip:pipinstallebsdtorchDocumentationDocumentation is coming soon...Features (and TODOs):white_check_mark: wide GPU support via PyTorch device abstraction & backends:white_check_mark: Uniform sampling on sphere / SO(3):white_check_mark: Laue symmetry operations on sphere / SO(3):white_check_mark: Modified square Lambert projection and inverse:white_check_mark: dictionary indexing (conventional pixel space):white_check_mark: dictionary indexing (covariance matrix PCA):white_large_square: dictionary indexing (Halko randomized PCA):white_check_mark: 8-bit Quantization on CPU for fast indexing:white_large_square: 8-bit Quantization on GPU for (very) fast indexing:white_large_square: Further reduced bit depth quantization (CPU or GPU):white_check_mark: EBSD master pattern direct space convolution with detector annulus:white_check_mark: Spherical covariance matrix calculation:white_large_square: Spherical covariance matrix interpolation onto detector:white_check_mark: pattern projection with average projection center:white_check_mark: pattern projection with individual projection centers:white_large_square: pattern projection with single camera matrix:white_large_square: pattern center fitting (conventional):white_large_square: geometry fitting (single camera matrix):white_check_mark: Wigner D matrices:white_check_mark: spherical harmonics:white_large_square: SO3 FFT for cross correlation / convolution:white_large_square: EBSD master pattern blur via SO3 FFT (for BSE image simulation):white_large_square: Support for generic crystal unit cells:white_large_square: Monte Carlo backscatter electron simulation:white_large_square: Dynamical scattering simulation
Package: eb-short
Earlybyte Url Shortener (usage with api key only)This tool makes it easy to use the Earlybyte linke shortener, to us this a valid api key is required.Check the clickup for how to get the api key:https://app.clickup.com/4519779/v/dc/49xv3-428/49xv3-26847InstallationTo run this tool Python 3.7 is required.You might need to upgread your pip environment first before installing eb-short.pipinstall--upgradepipThe tool can then be installed using the following command:pipinstalleb-shortUsageThe tool can be used as follows:# add an api key to the configuration (~/.eb-config.json)eb-shortadd-key"<key>"# shorten a linkeb-shortshort"<url>"About EarlybyteEarlybyte GmbH is a software company from Winterthur Switzerland. We build IoT, mobile and web applications and solutions that help freeing up time for what really matters.Find us underhttps://earlybyte.ch/
Package: ebus
ebusebusis a minimalistic event bus for python. It does not need any
initialization or sequence for register or raise events.There are two concepts inside, events and handlers. The subscribers register
a handler for a type of event, that can be any type actually, then they recieve a signal when a publisher
emits this signal.ebusaccepts to emit the signal if there is no subscriber. However,
if you want to handle the events correctly, you should register you handlers
before you raise the event.InstallationThe easy way to install package is to use pip:sudopipinstallebusAlternatively, you can download it or clone it directly from github and then type:gitclonehttps://github.com/abisxir/ebus.gitcdebus
sudopythonsetup.pyinstallUsageThe simple way is just like this, define your event, register them using handle decorator
and emit your events when it is required:importebus# This can be anythingclassMyEvent:def__init__(self,message):self.message=message# Handlers can listen to any type@ebus.handle(MyEvent)asyncdefhandle_my_event(e:MyEvent):print(e.message)# When this call, all registered handlers will runawaitebus.emit_async(MyEvent('My async event happened.'))If you like to handle it in synchronous way,ebuswill take care of that also:@ebus.handle(MyEvent)defhandle_my_event_sync(e:MyEvent):print('Handle the event in sync mode:',e.message)ebus.emit(MyEvent('My event happened.'))There is also an event context provided to pass data to the other events or stop the chain:@ebus.handle(MyEvent)defhandle_first(e:MyEvent,ctx:ebus.EventContext):print('I add something to context of ',e.message)# Here we can attach any information to context, the next handler will get it.ctx['extra']='Extra info can be anything'@ebus.handle(MyEvent)defhandle_second(e:MyEvent,ctx:ebus.EventContext):# Here we get the extra informationprint('There is something for me in ctx [{}].'.format(ctx['extra']))# We add another information to contextctx['something_else']=12@ebus.handle(MyEvent)defhandle_third(e:MyEvent,ctx:ebus.EventContext):print('If something else[{}] is less than 10 I will stop.'.format(ctx['something_else']))# It will stop if something_else is less than 10ifctx['something_else']<10:ctx.stop()@ebus.handle(MyEvent)defhandle_last(e:MyEvent,ctx:ebus.EventContext):# We will never reach here to print this, as long as we stop the event chainprint('Never see this!!!, event process stopped.')ebus.emit(MyEvent('My event happened.'))You can also useregister_handlerto register event handlers:defhandle_my_event(e:MyEvent):print(e.message)# This will register the event handler.ebus.add_handler(MyEvent,handle_my_event)# Will run all the handlers registered for this event.ebus.emit(MyEvent('Test adding handler'))Alsoebusprevents add a handler twice, it just ignores the second one.defhandle_my_event(e:MyEvent):print(e.message)# The first one registers correctlyebus.add_handler(MyEvent,handle_my_event)# This will get ignored by ebusebus.add_handler(MyEvent,handle_my_event)ebus.emit(MyEvent('My event happened.'))
Package: ebusdpy
eBusdPyeBusd python integration library for HomeAssistantGetting StartedThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.AuthorsMarco Toni-Initial work-CrazYoshijohn30-ebusd deamon-john30LicenseThis project is licensed under the GPLv3 License
Package: ebx-keypress
Key PressPython package for capture and return keypress.PrerequisitesDeveloped and tested in Linux and Python 3Installingpip3 install ebx_keypressor from source:python3 -m pip install [your_path]/ebx_keypress/Functionskeypresskeypress():
Description: Capture pressed keys and combined keys and return as stringReturn: String with pressed keyExamples of useimport ebx_keypress

result_Keypress = ''

obj_keypress = ebx_keypress.Get_Key()

print("Press keys or Ctrl+C to Exit")

while result_Keypress != 'Ctrl+ C':
    result_Keypress = obj_keypress.keypress()
    print(result_Keypress)Versioning=======================================================================================
== Log Changes: 
== Date:            2021-05-12
== Author:          Fausto Branco
== Version:         1.1.0
== Description:     Initial Version
=======================================================================================
Package: ec
The intenetionec - intends to reduce the learning curve needed to expose functionality via the command line. With available options likeargparseanddocopt, it might take several hours to get them right. And there is also the issue of the needed amount of extra coding to setup and process the arguments. See the following example to see howecsolves the issue.A simple examplefromec.ecimporttask@taskdefsay_hello():print'Hello, world!'could be accessed from the command line, like:$pythonhello.pysay_helloHello,world!FeaturesTyped arguments.Sub commands (like git).Custom types.Shell mode (like python’s interactive mode).Named / Positional arguments.A more complete examplefrom:simple.pyfromec.ecimporttask,arg,group@task# define a task@arg(type=int,desc='Value for arg1')# add an argument with a type and a description@arg(type=int)deftask1(arg1,arg2=1):printarg1,arg2@group(desc='A group with some tasks')# define a groupclassgroup1:@taskdeftask1(arg1):# define a task inside the groupprintarg1+arg1Execute a task:<dispatch mode>From the command-line enter$pythonsimple.pytask1arg1=1arg2=212$pythonsimple.pygroup1/task1arg1=12$pythonsimple.pygroup1/task11# positional arguments too are supported2Interactively execute tasks:<shell mode>From the command-line enter$pythonsimple.py# this will enter into ec-shell>task1Valueforarg1:1arg2(1):212>group1/task1# execute task1 under group1arg1:111>task1arg1=1# arguments can be given while calling the task, the missing arguments will be collected from the userarg2(1):212>^Z# exit the shellUtilizing STDIN:From the command-line enter$echo12|xargspythonsimple.pytask1# Dispatch a command with args passed through STDIN and converted to args using xargs.$echo-e"1\n2"|pythonsimple.py-ptask1# Dispatch a command and with partial args and pass the rest through STDIN.$echotask112|pythonsimple.py# Feeding the shell with complete commands through stdin.Detailed docs could be found atPyDocs.For more examples check thegithubpage.
Package: ec2api-tempest-plugin
Tempest plugin ec2api_tempest_pluginPlease fill here a long description which must be at least 3 lines wrapped on
80 cols, so that distribution package maintainers can use it in their packages.
Note that this is a hard requirement.Free software: Apache licenseDocumentation:https://docs.openstack.org/ec2-api/latestSource:https://opendev.org/openstack/ec2api-tempest-pluginBugs:https://bugs.launchpad.net/ec2-apiFeaturesTODO
Package: ec2audit
Dump all EC2 information to a folder suitable for version controlec2audit can output either tostdoutor to a directory, and can
output injsonandyamlformats. Identical data should produce
identical output (suitable fordiff-ing).TypesCurrentlyec2auditcan dump:instancessecurity groupsvolumes.UsageThe most basic usage is:ec2audit <region>However the recommended usage is to output to a directory with one item
per file.ec2audit <region> -o <output_dir>This will createinstances,security_groups, andvolumesfolders under the<output_dir>directory, with each instance,
security group and volume represented in its own file.You can change the output format using-fjsonor-fyaml. For
convenience you can also do-fjor-fy.For reference, the complete usage information is represented below:Usage:
  ec2audit [options] <region>
  ec2audit -h | --help
  ec2audit -v | --version

Options:
  -h --help                               Show this screen.
  -v --version                            Show the version.

  -o --output=OUTPUT                      The output directory, stdout otherwise
  -f --format=FORMAT                      The output format: json or yaml [default: yaml]

  -I --access-key-id=ACCESS_KEY_ID        AWS access key to use (default: $AWS_ACCESS_KEY_ID)[.
  -S --secret-key=SECRET_KEY              AWS secret key to use (default: $AWS_SECRET_ACCESS_KEY).
  -K --secret-key-file=SECRET_KEY_FILE    File containing AWS secret key to use.
Package: ec2-cli-tools
EC2-CLI-Tools=======Helpful CLI utilities to filter and connect to EC2 instances.ec2who:::% ec2who nginx2# or% ec2who 10.13.12.205# or% ec2who ec2-204-236-192-148nginx2  i-d5236fbd      us-east-1c      10.13.12.205  ec2-204-236-192-148.compute-1.amazonaws.com% ec2who "nginx*"nginx1  i-d5236fbd      us-east-1c      10.13.12.205  ec2-204-236-192-148.compute-1.amazonaws.comnginx2  i-d5237fbd      us-east-1c      10.13.12.206  ec2-204-236-192-149.compute-1.amazonaws.comnginx3  i-d5238fbd      us-east-1c      10.13.12.207  ec2-204-236-192-150.compute-1.amazonaws.com% ec2who "10.*.207"nginx3  i-d5238fbd      us-east-1c      10.13.12.207  ec2-204-236-192-150.compute-1.amazonaws.comec2ssh and ec2host:::% ec2ssh nginx2# equivalent to# ssh ubuntu@ec2-123-45-67-89.compute-1.amazonaws.com% ec2ssh root@appserver% ec2ssh deploy@nginx2 sudo restart nginx# accompanying ec2host script# w/o arg: prints all active instances% ec2hostdjango1 ec2-123-45-67-89.compute-1.amazonaws.comdjango2 ec2-132-45-67-89.compute-1.amazonaws.comdjango3 ec2-231-45-67-89.compute-1.amazonaws.com# w/ arg: prints host name of matching instance% ec2host django2django2 ec2-132-45-67-89.compute-1.amazonaws.comec2getsnaps:::% ec2getsnaps db12012-01-28T02:04:18+0000 db1-xlog 100%ec2sshproxy:::~/.ssh/configHost *.ec2User ubuntuProxyCmd ec2sshproxy %h %p% ssh my-server-tag.ec2Links`````* `Original Project, ec2-ssh <http://github.com/Instagram/ec2-ssh>`* `Instagram <http://instagram.com>`Changelog`````````* 1.0 - initial release, addition of ec2who and migration of deprecated ec2ssh project* 1.4 - added ec2sshproxy* 1.5 - added support for VPC hosts
Package: ec2cluster
Generic clustering package for EC2, suitable for redis/postgresql etc.This package makes it easier to deploy clustered applications such as PostgreSQL and Redis on EC2 by handling generic logic, including:* Deciding which role the instance should assume
* Creating and updating DNS records
* Preparing the instance for its role (e.g. writing a recovery.conf file for postgres)Basic Usage:The default ec2cluster classes assume your EC2 instances have JSON-encoded user data containing some specific attributes. The following attributes are required:* cluster - the name of the cluster, e.g. maindbInstall ec2cluster with pip:pip install ec2clusterCreate a configuration file:MASTER_CNAME = 'master.%(cluster)s.example.com'
SLAVE_CNAME = 'slave.%(cluster)s.example.com'
INIT_MASTER_SCRIPT = '/path/to/some_script.py'
INIT_SLAVE_SCRIPT = '/path/to/another_script.py'Run ec2cluster, specifying the path to the config file:ec2cluster init # initialise the cluster service
ec2cluster promote # promote a slave to the master rolePostgreSQL cluster:When starting a postgres read-slave, a file named recovery.conf must be written to the postgres configuration directory. A template file is used to make it easy to customise your recovery options.Config file:MASTER_CNAME = 'master.%(cluster)s.example.com'
SLAVE_CNAME = 'slave.%(cluster)s.example.com'
RECOVERY_TEMPLATE = '/path/to/template.conf'
RECOVERY_FILENAME = '/var/lib/postgresql/9.1/main/recovery.conf'In the recovery template file, specify the options required for your read-slaves. Instance metadata and userdata can be used for string replacement. For example:standby_mode = on
recovery_target_timeline = latest
pause_at_recovery_target = false
restore_command = '/usr/bin/s3cmd --config=/var/lib/postgresql/.s3cfg get s3://%(cluster)s/archive/wal/%%f %%p'
primary_conninfo = 'host=%(master_cname) port=5432 user=postgres password=secret sslmode=disableNote the use of “%%f” - because we are using string formatting we need to escape the percentage sign in order to end up with “%f” as required by postgres.
Package: ec2-compare
ec2-compareCompare EC2 instances families without querying AWS APIExample:Getting on instances by parametersimportec2_compare.mixinreq=ec2_compare.mixin.EmrRequestMixin().ec3__get_machines(max_instances=5,# maximum number of machines# reuest parameters**{'cpu':40,'ram':786432,'min_cpu':8,'min_ram':65536,'InstanceType':['c4','c5.','r4','r5.','m4','m5.'],'SupportedArchitectures':['x86_64'],'SupportedUsageClasses':'spot'})Getting on instances suitable for on-demand>>>importec2_compare.internal.on_demand>>>ec2_compare.internal.on_demand.get_instances_dict()[0]['InstanceType']'m5d.xlarge'Why it's more memory & CPU efficient1). ec2-compareMemory (penalty 8.1 Mb - 8175616 bytes)>>>defgetCurrentMemoryUsage():''' Memory usage in Bytes '''importpsutilimportosprocess=psutil.Process(os.getpid())returnprocess.memory_info().rss>>>getCurrentMemoryUsage()9535488>>>importec2_compare.ec2data>>>getCurrentMemoryUsage()17641472>>>len(ec2_compare.ec2data.get_instances_dict())341>>>getCurrentMemoryUsage()17711104Load time:>>>importtimeit>>>timeit.timeit('import ec2_compare.ec2data;len(ec2_compare.ec2data.get_instances_dict())',number=1)0.0028156930000000635>>>timeit.timeit('import ec2_compare.ec2data;len(ec2_compare.ec2data.get_instances_dict())',number=1)0.001711632000002794>>>timeit.timeit('import ec2_compare.ec2data;len(ec2_compare.ec2data.get_instances_dict())',number=1000)0.8330168470000032>>>timeit.timeit('import ec2_compare.ec2data;len(ec2_compare.ec2data.get_instances_dict())',number=1000)0.81742984699999972). Reading from json file:Memory (penalty 2.5 Mb - 2592768 bytes)>>>getCurrentMemoryUsage()9379840>>>importjson>>>withopen("./helpers/aws_ec2.json")asjson_file:...json.load(json_file)...>>>getCurrentMemoryUsage()11972608Load time:>>>importtimeit>>>s='''import jsonwith open("./helpers/aws_ec2.json") as json_file:json.load(json_file)'''timeit.timeit(s,number=1000)>>4.628850890999999Versioningec2_comparefollowsPEP 440.How to buildpython-mpipinstall-e./[devel]# or pip install -e ./[devel]# Running testsscripts/tests.shUpdate data LocallyDownland the latest infoawsec2describe-instance-types|jq'.InstanceTypes'>aws_ec2.jsonrepackpython3repack.pyThank youhttps://github.com/actions/for an awesome github actionsmypyfor doing all dirty work for us
Package: ec2-demo
EC2 DemoA small cli util to create, list and delete EC2 instances.Designec2-demo create <env> <file.yaml>
ec2-demo list <env>
ec2-demo destroy <env> <id>Step 0Set up environment.virtualenv .venv
source .venv/bin/activate
pip install -r requirements.txt
pip install -r requirements.txtStep 1Set up structure.- setup.py (note `ec2-demo` vs `ec2_demo`)
- ec2_demo/cli.py
- pip install -e .
- config/
- instances/Step 2Add boto3 code.- instances.py
- utils/tags.pyStep 3- replace with logging.debug
- add list command
- add destroy commandStep 4- Use env vars
- Use yaml constructors for dynamic lookups
Package: ec2-gazua
Copyright (c) 2018 JuHyun LeePermission 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.Description: UNKNOWN
Keywords: ec2 ssh
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3.7
Requires-Python: >=3.7
Package: ec2imds
EC2IMDSThe ec2imds python package is a module and a cli tool for retrieving AWS EC2
instance meta data and user data from the Instance Meta Data Service endpoint.
It is an improved version ofec2metadata.The cli tool prints data in JSON formate to stdout. The module consists of
"low-level" utils for traversing the IMDS directory.Installpipinstallec2imdsCLI UsageOn an EC2 instance, run the module.# Get everythingpython-mec2imds# Download user data(treated as binary)python-mec2imds-U>userdata# Get specific categoriespython-mec2imdsmeta-data/instance-idmeta-data/public-ipv4# Get categories matching the regexpython-mec2imds-E'meta-data/placement/.*'# List all implemented categoriespython-mec2imds-LFor more info on usage, runpython -m ec2imds -h.The cli tool can be used from a shell script in conjunction withjq.Module Usageec2imds uses IMDS v2 only. The IMDS v2 mandates the use of token.IMDSWrapperprovides callbacks for saving and loading tokens when sending requests to the
IMDS endpoint. Incorporate the callbacks to suit your use case. You can useIMDSWrapperwithout the callbacks, but you may face issues from token
exhaustion in the long run. Following is a simple example from the cli tool.importdatetimeimportjsonimportosfromec2imdsimport*defon_new_token(token:str,expiry:datetime.datetime,endpoint:tuple[str,int]):# save the new tokendoc={"token":token,"expiry":expiry.isoformat()}fp=rp.t+os.path.sep+IMDSWrapper.construct_endpoint_str(endpoint)os.makedirs(rp.t,0o700,True)saved_umask=os.umask(0o077)withopen(fp,"w")asf:json.dump(doc,f)os.umask(saved_umask)defon_load_token(endpoint:tuple[str,int])->tuple[str,datetime.datetime]:fp=rp.t+os.path.sep+IMDSWrapper.construct_endpoint_str(endpoint)try:withopen(fp,"rb")asf:t=json.load(f)return(t["token"],datetime.datetime.fromisoformat(t["expiry"]))except(FileNotFoundError,json.JSONDecodeError):returnWhererp.tis the path to the token directory.In the token directory, a file will be created to save the taken value and its
expiry for each IMDS endpoints,169.254.169.254:80and[fd00:ec2::254]:80.Now, functions for fetching categories are defined inIMDSWrapper.dir_dict.# Instantiate and set upw=IMDSWrapper()w.on_new_token=on_new_tokenw.on_load_token=on_load_token# Get all meta dataall_meta=w.all()# Get user datatry:with(w.open_userdata()asu,open("file","wb")asf):whilef.write(w.read(4096)):passexcept:...# Get specific meta datainstance_id=w.dir_dict["meta-data/instance-id"].func()# Cycle throughfork,vinw.dir_dict.items():ifk.startswith("meta-data/placement/"):print(v.func())Note that for requests ended in 404, the functions returnNone.The module does not define any classes for returned meta data. The functions
always returndictfor directory data andstr,int,bool... for scalar
values. The module is, per se, a low-level util for fetching data from the IMDS.IPv6 ConsiderationsSeedoc/ipv6only.md.