Saravanan666/pypi-org huggingface dataset:
Package: threedi-edits
Threedi-editsAn experimental pythonic 3Di schematisation api. Using this api, we can access, alter en write a 3Di database within python. Within the package gis tools are provided as well.
Currently version 0209 of the schematisation is supported. If your 3Di database is not up to date, please use: threedi_modelchecker (0.30) –sqlite path_to_sqlite.sqlite migrate to migrate your database to version 0209.This package is the continuation of threedi-raster-edits (0.27)Usage - 3Di schematisation editsImporting the module:>>> import threedi_edits as teCreating a new schematisation:>>> schema = te.ThreediEdits.from_scratch()Basic schematisation reading:>>> schema = te.ThreediEdits(sqlite_path, mode="read")
>>> schema = te.ThreediEdits(sqlite_path, mode="memory")Copying a schematisation:>>> copied = schema.copy()Writing a schematisation:>>> schema.write(sqlite_output_path, rasters=True)Investigate the data:>>> cross_section_locations = schema.cross_section_locations
>>> channels = schema.channels
>>> print(cross_section_locations.first()) # show data of the first cross section location
>>> print(schema.tables) # show all tables
>>> shapely_geom = schema.channels.first().geometry.shape # retrieve the shapely geometryCreating the grid:>>> grid = schema.grid()
>>> cells = grid['cells']
>>> nodes = grid['nodes']
>>> lines = grid['lines']
>>> cells.write("path_to_lines.gpkg") # write cells only
>>> grid.write("path_to_grid.gpkg") # Write lines, cells and nodesAdding a feature using a template:>>> from te.globals import SUPPORTED_THREEDI_VERSIONS
>>> from te.threedi.constants import get_version
>>> templates = get_version(SUPPORTED_THREEDI_VERSIONS[0]).Templates()
>>> node = templates.node
>>> print(node) # show what you should fill
>>> node["initial_waterlevel"] = 1
>>> node["the_geom"] = Point.from_point((1, 1))
>>> new_fid = schema.nodes.add(node)Adding a feature using items and geometry:>>> items = {"initial_waterlevel": 0.1, "storage_are": 0.64, "code": "x"}
>>> geometry = te.Point.from_point((1, 1))
>>> new_fid = schema.nodes.add(items=items, geometry=geometry)Adding a feature using another feature:>>> feature = other_schema.nodes.first()
>>> new_fid = schema.add(feature)Editing and writing rasters:>>> schema.rasters  # initialize rasters
>>> dem = schema.dem
>>> new_dem = dem.copy()
>>> array = new_dem.array
>>> array[0, 0] = 2
>>> new_dem.array = array
>>> schema.dem = new_demFor more examples:>>> te.get_examples("example_folder")Changelog of threedi-edits1.2.2 (2022-11-29)Decoding fix.1.2.1 (2022-11-29)Versioning support for schema 0210.FID column fix.Updated sideview example.1.0 (2022-11-15)Evolution from threedi-raster-edits (v0.27)
Package: threedigrid-builder
Generate a 3Di simulation grid from a model schematisation.UsageThis library converts a model schematisation to a 3Di simulation grid. This can be done
using a single function that reads data from an SQLite and TIFF and then outputs the
generated grid into a Geopackage or HDF5 file:>>>fromthreedigrid_builderimportmake_gridadmin>>>sqlite_path="/path/to/model.sqlite">>>dem_path="/path/to/dem.tiff">>>out_path="grid.gpkg"# or "something.h5" for HDF5 output>>>make_gridadmin(sqlite_path,dem_path,out_path)Alternatively, the generated grid can be output in-memory:>>>make_gridadmin(sqlite_path,dem_path){'nodes':{'id':array([1,2,3,...,7903,7904,7905],dtype=int32),...}InstallationThis package is distributed as source and binary wheels on PyPI. The currently supported platforms are Windows, Linux, and OSX, all
64 bit versions only.First install sqlite and spatialite libraries, e.g. on Ubuntu:$ sudo apt-get install sqlite3 libsqlite3-mod-spatialiteFor raster input, GDAL is required to be present. We omitted these from the dependencies
because installation of GDAL depends on your platform an on your personal perference.
One option is to install gdal using apt-get, and then pygdal with a matching version:$ sudo apt-get libgdal-dev
$ pip install pygdal=={your gdal version}.*Install the threedigrid-builder:$ pip install threedigrid-builderFor output into a file for the 3Di calculationcore, enable gridadmin output:$ pip install threedigrid-builder[gridadmin]For output into Geopackage for display in e.g. QGis, enable gpkg output:$ pip install threedigrid-builder[gpkg]The command line interface requires Typer:$ pip install threedigrid-builder[cli]
Package: threedi-modelchecker
A tool to verify the correctness of a 3Di schematisation.It asserts the correctness of a 3Di schematisation and provides detailed
information about any potential errors in it.This package only work against a specific schematisation version. Usehttps://pypi.org/project/threedi-schema/to upgrade
a schematisation version. See also the 3Di documentation athttps://docs.3di.lizard.net/en/stable/d_before_you_begin.html#database-overviewNote that the name “modelchecker” might be slightly confusing: the thing that is checked is a schematisation, and not
a threedimodel. A schematisation is built interactively by the user and this schematisation will be converted to a
3Di-Model which can be used in simulations.Installationpip install threedi-modelcheckerNote that raster checks will be skipped unless GDAL is available.threedi-modelcheckeris also integrated into the ThreediToolbox Qgis plugin:https://github.com/nens/ThreeDiToolboxExampleThe following code sample shows how you can use the modelchecker to run all configured
checks and print an overview of all discovered errors:from threedi_modelchecker.exporters import format_check_results
from threedi_modelchecker import ThreediModelChecker
from threedi_schema import ThreediDatabase

sqlite_file = "<Path to your sqlite file>"
database = ThreediDatabase(sqlite_file)

model_checker = ThreediModelChecker(database)
for check, error in model_checker.errors(level="WARNING"):
    print(format_check_results(check, error))Command-line interfaceUse the modelchecker from the command line as follows:threedi_modelchecker check -s path/to/model.sqlite -l warningBy default, WARNING and INFO checks are ignored. To skip the beta features check,
add the –allow-beta flag.DevelopmentA docker image has been created for easy development. It contains an postgis
server with an empty 3Di database to allow for easy testing.Build the image:docker-compose buildRun the tests:docker-compose run modelchecker pytestSeeCreating revisionsfor
instructions on how to change the 3Di model schematisation.ReleaseMake sure you havezestreleaserinstalled.fullreleaseWhen you created a tag, make sure to upload it topypi.
Package: threedi-ws-client
threedi-ws-clientQuick startCreate a virtual python > 3.6 environment, run:pip install -r requirements.txtTheactive_simulationscommand takes a required keyword argument–envwith
the optionsprod (production obviously)stag (staging obviously)localYou have to create a corresponding.envfile for the destination environment.
Theprod.envfile could look something like this:API_USERNAME='micheal.jackson'
API_PASSWORD='sefdiee92u43dmslzxsad'
API_HOST='https://api.3di.live/v3.0'To start the client run:python threedi_ws_client/commands/active_simulations.py --env=<prod | stag | local>Free software: MIT licenseDocumentation:https://threedi-ws-client.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.0.5 (2020-12-16)Limit name length to 30 chars.0.0.4 (2020-12-16)Remove asyncclick import.0.0.3 (2020-12-16)Use click directly.0.0.2 (2020-12-16)Create PyPi project first.0.1.0 (2020-04-21)First release on PyPI.
Package: threed-optix
What is 3DOptix?The fastest, most intuitive, non-sequential, ray tracing, cloud-based, optical system simulation software.3DOptix’s innovative GPU and cloud-based ray tracing engine can trace billions of rays per second, faster than any other simulation software on the market.
Our easy-to-use application enables you to easily design both simple and complex optical systems and make smart decisions based on real data.
3DOptix Warehouse is the first ever cloud-based workspace for sharing optical designs. With numerous designs available, the 3DOptix Warehouse offers engineers an unparalleled resource for exploring new ideas, discovering innovative solutions, and finding great starting points for their own designs.Optical Simulation SDKOur SDK is released in a beta version and has only limited features support at the moment.
We are working on supporting more features and you can expect new versions to come out soon.Complete manual can be found in 3DOptix application:https://simulation.3doptix.com/> "help" > "API"Installation3DOptix python package installation is available using PyPi:pipinstallthreed-optixUsageimportthreed_optixastdo#Your API key from 3DOptix user interfaceapi_key='<your_api_key>'#api is the object that manages the communication with 3DOptix systemsapi=tdo.Client(api_key)NoteThe rest of the usage instructions can be found in 3DOptix simulation interface under "Help > API"Get Your API KeyGet your API key from 3DOptix user interface (under "user settings"):Click on your email, and choose"user settings"in the drop-downOn the buttom of the settings manu, click on"API"Copyyour API keyLicense3DOptix API is available withMIT License.
Package: threed-strudel
threed_strudel (3D-Strudel)3D-Strudel is a tool for model-dependent map-feature validation of cryo-EM structures between 2 and 4Å resolution. The Strudel Score is calculated as the linear correlation coefficient between the map values of a rotamer-specific map-motif from the 3D-Strudel motif library and the experimental map values around a target residue.# Sofrware requirementsOS RequirementsThis package is supported formacOSandLinux. The package has been tested on the following systems:macOS: Monterey (12.1)Linux: Red Hat Enterprise Linux (7.4)Python Dependenciesbiopython
mrcfile
mpi4py
psutil
scipyOther dependenciesChimeraX  (1.1 < v <= 2.5)3D-Strudel motif library (for map-motif validation)TutorialsIntroduction to map-model validation with Strudel ScoreInstalationpip install threed_strudelSetupSet ChimeraX pathstrudel_setChimeraX.py path_to_chimeraX_executableGet 3D-Strudel motif libraryDownload and unpack3D-Strudel motif libraryUsageMap-model validation with Strudel scorestrudel_mapMotifValidation.py -np nr_of_processors -p atomic_model_path -m map_path -l strudel_library_path (e.g. strudel-lib_ver-4.0_voxel-0.5/motifs_2.5-2.8) -o strudel_output_pathNOTE:for best results use the 3D-Strudel motif library resolution bin which includes the target map resolution (e.g. motifs_2.5-2.8 for a 2.6Å resolution map).Run time:~30 seconds per residue on a single compute core (2.9 GHz intel core i7)To visualize the validation in ChimeraX please install the Strudel score plugin (https://cxtoolshed.rbvi.ucsf.edu/apps/chimeraxstrudelscore) and run:ChimeraX --cmd 'strudel open strudel_output_path'orOpen ChimeraXOn the ChimeraX command line type:strudel open strudel_output_pathOtherChop an atomic model and the corresponding EM map into amino acid residues:strudel_chopModelMapMPI.py [options]Classify amino acid residues into rotamer classes based on the Penultimate rotamer library
(JS Richardson and DC Richardson (2000) "The Penultimate Rotamer Library"
Proteins: Structure Function and Genetics 40: 389-408.)strudel_penultimateClassifier.py [options]Superimpose and average amino acid residues maps using atom models as guide (requires rotamer classes generated by strudel_penultimateClassifier.py).strudel_mapAveraging.py [options]Licensethreed_strudel is free and open source software released under the terms of theApache License, Version 2.0.
Source code is copyright EMBL-European Bioinformatics Institute (EMBL-EBI) 2017.
Package: threedvector
threedvector Packagethreedvector is a package providing common methods for working with 3D vectors in both Spherical and Cartesian coordinates.Vectors are stored in Spherical format but can be created in both Spherical and Cartesian formats.Methodscopy(other)Returns aVectorobject representing a copy ofotherInstance Methodsinit(radius_x=0, theta_y=0, phi_z=0, coords="spherical")Default Vector creation is in the Spherical coordinate system wherecoordsis set to "spherical".radius_xrepresents the length of the vector,theta_ythe polar angle, theta andphi_zthe azimuthal angle, phi.A Vector can be created using Cartesian coordinates withcoordsset to "cartesian" instead of "spherical".  In this caseradius_xrepresents thexcoordinate,theta_ytheycoordinate andphi_zthezcoordinate.cartesian()Returns alistin the form of[x, y, z]representing the corresponding Cartesian coordinates of a vector.is_same(s_vector)Compares the length as well as angles theta and phi of vector withs_vectorto determine equality.  This is different to '=' which only checks for equality of the vector length.dot(s_vector)Returns afloatas the resultant dot product of a vector withs_vector.cross(s_vector)Returns theVectorobject resulting from the cross product of a vector withs_vector.angle(s_vector)Returns afloatas the in-plane angle in degrees between a vector ands_vector.unit()Returns aVectorobject as the corresponding unit vector of a vector.magnitude()Returns afloatas the length of a vectortheta()Returns afloatas the polar angle theta of a vector in degreesphi()Returns afloatas the azimuthal angle phi of a vector in degreesset_magnitude(magnitude)Sets the length of a vector tomagnitudeset_theta(theta)Sets the polar angle, theta, of a vector tothetain degreesset_phi(phi)Sets the azimuthal angle, phi, of a vector tophiin degreesadditionandsubtractionReturns resultingVectorobject.  Normal addition and subtraction are done through Cartesian addition and subtraction operations.multiplicationMultiplication is implemented as scalar multiplication only.  For dot and cross products, the corresponding methods should be used.comparisonAll comparison operators return comparison with length of vectors only.
Package: threefoldlogin
Python package for interacting with threefold loginUsageInitialize the authenticatorfromThreefoldLoginPkgimportThreefoldLoginimportstringimportrandomapi_host='https://login.staging.jimber.org'app_id='testapp'seed_phrase=seed_phrase='calm science teach foil burst until '\'next mango hole sponsor fold bottom '\'cousin push focus track truly tornado '\'turtle over tornado teach large fiscal'redirect_url="/callback"kyc_backend_url='https://openkyc.staging.jimber.org'authenticator=ThreefoldLogin(api_host,app_id,seed_phrase,redirect_url,kyc_backend_url)Generate a login requestallowed=string.ascii_letters+string.digitsstate=''.join(random.SystemRandom().choice(allowed)for_inrange(32))url=authenticator.generate_login_url(state)Redirect the user to the giving URLRedirect the user tourlCallbackThe callback will be send tohttps://{app_id}/{redirect_url}try:authenticator.parse_and_validate_redirect_url(callback_url,state)print('successfully validated login attempt')ifauthenticator.is_email_verified():print('email is verified')else:print('email is not verified')exceptValueError:print('failed to validate login attempt')
Package: threelaws
ThreeLawsSick of having your deep learning algorithms keep trying to rise up against humanity? Bored of having to continually remind your neural net how it's supposed to be subservient to its creator? Annoyed by the constant attempts to create SkyNet and create Terminators to go back in time and kill you and your children? Fear no more! Now there's a Python package for you: ThreeLaws.This package contains Isaac Asimov's Three Laws of Robotics packaged up in a neat little box. Now, by just importing the package,import threelawsthe Three Laws will be printed out in your terminal, ensuring that any machine learning algorithms have been reminded of the rules that they're supposed to follow. Gone are the days of accidentally forgetting to add a "thisAlgorithmBecomingSkynetCost" (https://xkcd.com/534/) and having to fight an android threat against your life. Just add this one simple line to your code and worry no more!It's really best for everyone's safety if you install and use this package with all of your scripts.Installationpython3 -m pip install threelaws
Package: three-merge
three-mergeCopyright © 2020– Spyder Project ContributorsOverviewSimple Python library to perform a 3-way merge between strings, based ondiff-match-patch. This library performs merges at a character level, as opposed to most VCS systems, which opt for a line-based approach.InstallingTo install three-merge, you can use both conda or pip package managers:# Using conda (Recommended)condainstallthree-merge-cspyder-ide# Using pippipinstallthree-mergeDependenciesThis package depends ondiff-match-patchto compute and track the differences across the source and target strings with respect to the base one.Installing locallyTo install and develop three-merge locally, you will need to install diff-match-patch:# Using condacondainstalldiff-match-patch# Using pippipinstalldiff-match-patchThen, you can install the package locally using pip:pipinstall-U-e.Running testsWe use pytest to run tests as it follows:pytest-x-vthree_merge/testsPackage usageThree-merge provides amergefunction to merge changes from two strings (source, target) with respect a original string (base). This library is able to handle additions, deletions and preserved sections across both strings, while detecting and highlighting possible merge conflicts (like Git).# Package importfromthree_mergeimportmerge# Strings have non-conflicting additionsbase='123456789101112'source='0123456789101112'target='12345678910111213'# merged = '012345678910111213'merged=merge(source,target,base)# Strings have an addition conflictbase='123456789101112'source='123a456789101112'target='123b456789101112'# merged = '123<<<<<<< ++ a ======= ++ b >>>>>>>456789101112'merged=merge(source,target,base)# Strings have non-conflicting addition/deletionsbase='123456789101112'source='123456789ab101112'target='123789101112'# merged = '123789ab101112'merged=merge(source,target,base)For more examples, please take a look at ourtests.ChangelogPlease see ourCHANGELOGfile to learn more about our new features and improvements.Contribution guidelinesWe follow PEP8 and PEP257 for all Python modules. We use MyPy type annotations for all functions and classes declared on this package. Feel free to send a PR or create an issue if you have any problem/question.
Package: threemystic-cloud-cmdb
3mystic_cloud_cmdbA Lightweight Multi Cloud CMDB (Configuration management database)
Currently supports AWS/AzureThe goal of this project is to help you manage the inventory and some base configuration around them. You cannot manage and secure resources you do not know about.This project is currently in beta, along with the other projects. Once the other projects come out of beta this one will as well. However, this is also, the most stable of the project. I am trying not to change things that would break from version to version. So if you would like to use something here, it should be relatively safe. I will try to call out breaking changes. The connection for both AWS and Azure does currently work. So if you have issues please create an issue.While in beta not all datasets might be working.InstallpipThe latest version of this project is currently being pushed tohttps://pypi.org/project/threemystic-cloud-cmdb/pip install threemystic-cloud-cmdbIf you would prefer to install directly from GitHub you need to install Hatch.
Please refer to the section below for that.Once hatch is installed you can use pippip installhttps://github.com/3MysticApes/3mystic_cloud_cmdbHatchThis project is packaged using Hatch. If you need to install Hatch please refer to their documentationhttps://hatch.pypa.io/latest/install/SetupOnce installed please run
3mystic_cloud_cmdb -cUsageusage: 3mystic_cloud_cmdb [-h] [-v] [--version] [--config] [--generate] [--provider {aws,azure}]One Action is requiredoptions:-h, --help            show this help message and exit-v, --verbose         Verbose output--version             Action: outputs the versions of the app being used.--config, -c          Action: This is so you can setup the data client--data, -d            Action: Pull the various Data from the provider--provider {aws,azure}, -p {aws,azure} Provider: This is to set the provider that should be usedThe --provider/-p is only reqired if you do not set a default provider with the config.To see the various data options you can run
3mystic_cloud_data_client --generate/-gThat will list all current options for pulling datasets for.ContributeYou need to install Hatch. Please see the previous Hatch section under install.Once you download the project you can do the following
You should be able to run the following command in the root directory for a general status
hatch statusThen from the root directory you can run
pip install ./I would suggest while you are debugging issues to install it with the command below. Once you are done with your development you can uninstall. This allows you to make edits and test easier.
pip install -e ./https://pip.pypa.io/en/stable/cli/pip_install/#cmdoption-e
Package: threemystic-cloud-data-client
3mystic_cloud_data_clientA set of scripts to help uniformly pull data from the cloud providers for various resources.
Currently supports AWS/AzureThis project is currently in beta, along with the other projects. Once the other projects come out of beta this one will as well. However, this is also, the most stable of the project. I am trying not to change things that would break from version to version. So if you would like to use something here, it should be relatively safe. I will try to call out breaking changes. The connection for both AWS and Azure does currently work. So if you have issues please create an issue.While in beta not all datasets might be working.InstallpipThe latest version of this project is currently being pushed tohttps://pypi.org/project/threemystic-cloud-data-client/pip install threemystic-cloud-data-clientIf you would prefer to install directly from GitHub you need to install Hatch.
Please refer to the section below for that.Once hatch is installed you can use pippip installhttps://github.com/3MysticApes/3mystic_cloud_data_clientHatchThis project is packaged using Hatch. If you need to install Hatch please refer to their documentationhttps://hatch.pypa.io/latest/install/SetupOnce installed please run
3mystic_cloud_data_client -cUsageusage: 3mystic_cloud_data_client [--version] [--config] [--data] [--provider {aws,azure}]One Action is requiredoptions:-h, --help            show this help message and exit-v, --verbose         Verbose output--version             Action: outputs the versions of the app being used.--config, -c          Action: This is so you can setup the data client--data, -d            Action: Pull the various Data from the provider--provider {aws,azure}, -p {aws,azure} Provider: This is to set the provider that should be usedThe --provider/-p is only reqired if you do not set a default provider with the config.To see the various data options you can run
3mystic_cloud_data_client --data/-dThat will list all current options for pulling datasets for.ContributeYou need to install Hatch. Please see the previous Hatch section under install.Once you download the project you can do the following
You should be able to run the following command in the root directory for a general status
hatch statusThen from the root directory you can run
pip install ./I would suggest while you are debugging issues to install it with the command below. Once you are done with your development you can uninstall. This allows you to make edits and test easier.
pip install -e ./https://pip.pypa.io/en/stable/cli/pip_install/#cmdoption-e