Saravanan666/pypi-org huggingface dataset:
Package: import-serial
Calculate statistics of serial MX data from xia2.ssx or CrystFEL and import them to CCP4.Requirements: ccp4-python from CCP4 8.0 or later (it includes CCTBX)Example of usage:$ ccp4-python -m import_serial --hklin 116720-721.lst-asdf-scale.hkl --half-dataset 116720-721.lst-asdf-scale.hkl1 116720-721.lst-asdf-scale.hkl2 --spacegroup P21 --cell 39.4 78.5 48.0 90 97.94 90
$ ccp4-python -m import_serial --hklin 116720-721.lst-asdf-scale.hkl --spacegroup P21 --cell 39.4 78.5 48.0 90 97.94 90 --nbins 20 --dmin 1.65 --project protein --dataset 01List of all options:$ ccp4-python -m import_serial --help

usage: import_serial [-h] --hklin HKLIN [--half-dataset HKL1 HKL2] [--wavelength WAVELENGTH]
                     [--spacegroup SPACEGROUP] [--cell a b c alpha beta gamma] [--cellfile CELLFILE]
                     [--streamfile STREAMFILE] [--reference REFERENCE] [--dmin D_MIN] [--dmax D_MAX]
                     [--nbins N_BINS] [--project PROJECT] [--crystal CRYST] [--dataset DATASET]

Calculate statistics of serial MX data from xia2.ssx or CrystFEL and import them to CCP4

optional arguments:
  -h, --help            show this help message and exit
  --hklin HKLIN, --HKLIN HKLIN
                        Specify merged mtz file from xia2.ssx or merged hkl file from CrystFEL
  --half-dataset HKL1 HKL2
                        CrystFEL only: two half-data-set merge files (usually .hkl1 and .hkl2)
  --wavelength WAVELENGTH, -w WAVELENGTH
                        Wavelength (only for data from CrystFEL)
  --spacegroup SPACEGROUP
                        Space group
  --cell a b c alpha beta gamma
                        Unit cell parameters divided by spaces, e.g. 60 50 40 90 90 90
  --cellfile CELLFILE   Cell file from CrystFEL
  --streamfile STREAMFILE
                        Stream file from CrystFEL
  --reference REFERENCE, --ref REFERENCE, --pdb REFERENCE, --cif REFERENCE, --mmcif REFERENCE
                        Reference file (PDB, mmCIF or MTZ) to provide spacegroup and unit cell
  --dmin D_MIN, --highres D_MIN
                        High-resolution cutoff
  --dmax D_MAX, --lowres D_MAX
                        Low-resolution cutoff
  --nbins N_BINS, --nshells N_BINS
                        Number of resolution bins
  --project PROJECT     Project name
  --crystal CRYST       Crystal name
  --dataset DATASET     Dataset nameInstallationThis program is already distributed within CCP4 so it is not necessary to install it. You can get the latest code from GitHub:$ ccp4-python -m pip install https://github.com/MartinMalyMM/import_serial/archive/master.zip --no-deps --upgrade --useror from PyPI:$ ccp4-python -m pip install import_serial --no-deps --upgrade --userTests$ cd test
$ ccp4-python -m pytest -vv -sTest data are available in a separate repository:https://github.com/MartinMalyMM/import_serial_test_dataDeveloped by Martin Maly, University of Southampton,martin.maly@soton.ac.uk
Package: imports-logger
Import LoggerThis was a terrible, quickly slapped together, package designed as a quick debugging tool.Over the past few years, it has proved to be incredibly useful.what this doesThis package is used to override calls toimport, wrapping every import with
a call topsutilwhich measures memory.The outputs are written to a versioned file ascsvcompatible text files --
one for "successful" imports, another for "failures"".The output files are written to an__imports_loggeddirectory and stored under
an incremental__imports_logged/runssubfolder.This is rough and can be customized.  This should NEVER NEVER NEVER be used on
production code.  This is a quick debugging tool.DANGER DANGER DANGERDO NOT RUN THIS IN PRODUCTIONDANGER DANGER DANGERSERIOUSLY, DO NOT RUN THIS IN PRODUCTIONWhy not?  This library saves the loaded information in a versioned format - so
every time you start/restart your applications, more disk space will be consumed.so why would I use this?There are two main use-cases:The outputs can be processed and analyzed (even imported to Excel!) to
determine where the biggest imports are, and what causes them.Knowing import errors is useful in two situations: refactoring your own code,
and finding what libraries are conditionally importing other 3rd party tools.requirementspsutilusagetry running the demo.py scriptit is just...# at the top of your script
import imports_logger
imports_logger.setup_logger()

# your code here    
import re

# this should have created a folder named `__imports_logged/runs/001`the text in runs 001 should look likeimport|re.None,demo.py,0,12664832,12664832
Package: importStar
Imagine…you need all modules in a package imported… maybe because you want to access them via inspect.getmembers… or want to do sth. likefor module in package: ...BUT:you are to lazy to update all your __init__.pyyou dont want/can’t to use automodinit <https://github.com/ned14/automodinit>AND/OR you cannot use dynamic imports (maybe because you want to create an application with pyinstaller)THAN:this might be your solution!installvia pippip install importStarubuntu or simularsudo python setup.py installwindowspython setup.py installusageeither:
* use as a script:importstar [directorypath]to see help: run importstar without further arguments or with-hor–helpOR call function importStar.importstar.run(args) directlyresultimportstar add all modules and packages recursively within a given directoryin all __init__.py files that have the following comments:#<<<importStar
[i will be substitued]
#>>>importStarthe result might look like:#<<<importStar
import mod1
import mod2
import pkg1
#>>>importStar
Package: import_string
import_stringImports an object based on a stringFree software: ISC licenseDocumentation:https://import-string.readthedocs.io.FeaturesImports an object based on a string.  This is useful if you want to
use import paths as endpoints or something similar.  An import path can
be specified either in dotted notation (.)
or with a colon as object delimiter (:).
Ifsilentis True the return value will beNoneif the import fails.Usageimportimport_stringmodule=import_string('my_system.my_package.my_module')function=import_string('my_system.my_module:some_function')Class=import_string('my_system.my_module:SomeClass',silent=True)# If path doesn't exist Class = NoneCreditsThis package was extracted fromwerkzeug.utilsmoduleThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2016-06-30)First release on PyPI.
Package: import-submodules
Installation$pipinstallimport-submodulesProsreplaces multiple imports with one lineExamplesfolder
├── __init__.py
├── module1.py
├── module2.py
└── module3.py__init__.pyimportimport_submodulesimport_submodules.import_submodules()# import moduleXimportimport_submodulesimport_submodules.import_all_from_submodules()# from moduleX import *
Package: importTime
Import TimeUse this module to debug your import times or to check how long a process takes.UsageDebug Import TimesThis will print out the time it takes to import each module, but will not import them globally to your application. Please just use this function to debug times.fromimportTimeimportdebugImportTimesdebugImportTimes(["numpy","torch","mediapipe","PIL"],"MainDeps")Prints:TimetoImportMainDeps:0.08100032806396484Reveal TimesCan be added to your currently running application. This will print out the time it takes to import betweenstartImport()andendImport("moduleName").```pythonfromimportTimeimportstartImport,endImport,startTotal,endTotal,saveCSVstartTotal()startImport()importnumpyasnpendImport("numpy")startImport()importtorchendImport("torch")startImport()fromPILimportImage,ImageFilterimportPILimportmediapipeasmpendImport("MediaPipe + PIL")endTotal()# OptionalsaveCSV("importTime.csv")PrintsTime to Import numpy: 0.08100032806396484
Time to Import torch: 0.9580004215240479
Time to Import MediaPipe + PIL: 2.0379998683929443
Total to Import Time: 3.077000141143799
Package: importtime-waterfall
importtime-waterfallGenerate waterfalls from-Ximporttimetracing.installpip install importtime-waterfallnote:importtime-waterfallrequires python3.7+usageimporttime-waterfallprovides a single executable by the same name.importtime-waterfalltakes a module name as a positional argument.  This is
the module that will be profiled.--include-interpreter-startupInclude tracing information of modules that are always imported as part of
interpreter startup.  These are usually not interesting and so they are left
out by default.--harOutput as anHTTP Archiveor "HAR" file.  Yes these aren't actual
HTTP requests but it's an easy way to get a visualization using a standardized
data format.HAR unfortunaly doesn't have microsecond resolution so all times in the HAR
output are * 1000 (1 μs => 1ms).The easiest way to use the output of this is to paste it into ahar viewer.I use the following:$importtime-waterfallimporttime_waterfall--har|xclip-selectioncxcliptakes the output and puts it onto the clipboard.
Alternatively, you can redirect to a file (> foo.har) and upload it that way.Once pasted into the viewer you can inspect the output.The blocked import time is represented as "waiting" (purple) and the self time
is represented as "receiving" (grey).  Generally when looking for slow modules
look for ones with large grey chunks.--graph(this is the default display).  Display the output as a tree.  This doesn't
really add much on top of whatpython -Ximporttimealready displays (but was
useful for developing / debugging this tool).  I guess it's in human order
instead of reversed so that's something 🤷.Times displayed next to the module names are self-times in μs.$importtime-waterfallimporttime_waterfallimporttime_waterfall (419)argparse (864)re (599)enum (661)sre_compile (270)_sre (109)sre_parse (336)sre_constants (339)copyreg (161)gettext (1056)locale (820)datetime (768)time (234)math (57)_datetime (154)json (254)json.decoder (446)json.scanner (481)_json (193)json.encoder (443)subprocess (628)signal (1030)errno (101)_posixsubprocess (40)select (51)selectors (543)collections.abc (184)threading (578)traceback (394)linecache (162)tokenize (911)token (178)_weakrefset (217)typing (1469)success storiesI used this to find a24% speedup inflake8's startup.nitty-gritty how it worksimporttime-waterfallimports the profiled module in a subprocess while
setting the-Ximporttimeflag.importtime-waterfalltakes
picks the best-of-5 (by total time) and uses that result.  It parses the
"import time:" lines and then outputs.
Package: import-transforms
import-transformsis a Python library for intercepting and transforming source code at import time. Its main use isunit-syntax, which modifies the Python syntax to support units of measure.UsageTransforms are defined by extendingimport_transforms.SourceTransform. For a small example that adds logging of every single function call, seecall_log.py.To apply a transform to future module imports:register_module_source_transform("target_module",my_transform)importtarget_module# transform applied!The first argument is a glob-style pattern on the fully-qualified module name:"foo" matches just that single module."foo.*" matches all sub-modules of "foo" (but not "foo" itself)."*" will match all modules.As a shorthand to apply a transform to all sub-modules of your package, place this in__init__.py:register_package_source_transform(__name__,my_transform)TODOcheck/support bytecode cached files
Package: import-utils
Utilities for loading modules,
supporting programmatic imports of types:>>>from import_utils import import_module_from, import_module
>>>import x as mod_x
>>>mod_x = import_module('x')
>>>
>>>import x.y as mod_xy
>>>mod_xy = import_module('x.y')
>>>
>>>from x.y import z
>>>z = import_module_from('x.y.z')
Package: importwatch
Authors:Scott Torborg (storborg)Version:0.1This library tracks module imports. That’s it.NoteUse at your own risk!InstallationSimple as:$ pip install importwatchOr with easy_install:$ easy_install importwatchOr if you prefer, download the source and then:$ python setup.py build
$ python setup.py installExample>>> import importwatch
>>> importwatch.start()
>>> run_lots_of_code_which_imports_stuff()
>>> # That's it!Just care about your package?>>> import importwatch
>>> importwatch.start('^myapp')Logging ConfigurationTo make importwatch more useful, you’ll want to configure some special logging.
Do it like:[logger_importwatch]
level = INFO
handlers = console
qualname = importwatchLicensePackagetrack is released under the GNU General Public License (GPL). See the
LICENSE file for full text of the license.
Package: import-watch
Welcome!import-watchallows to
trace module imports
and
detect/deny cyclic importsat runtimewith Python 2 and 3.
It is licensed under the MIT license.Enjoy!Installation#pipinstallimport-watchUsageTrace importsimportimport_watchimport_watch.trace_imports(depth=2)# default depth is unlimitedDetect and warn about cyclic imports (at runtime)importimport_watchimport_watch.warn_about_cyclic_imports()Deny cyclic imports (at runtime)importimport_watchimport_watch.deny_cyclic_imports()Start freshimportimport_watch[..]import_watch.reset()
Package: import-wrappers
Import WrappersA simple set of utilities to make working with various import patterns easy.Installationpip install import-wrappersOptional DependenciesThe original motivation for this library was the repetitive utilities I found myself authoring to
hack around supporting optional dependencies in other projects. Optional dependencies are a common
pattern where the core of a library does not depend on a dependency but some functionality may
require it. Most users may never interact with the code that requires the optional dependency but
without proper handling will still be required to install them and by extension inherit the overhead
of managing dependency versions and conflicts.UsageWrapping Optional DependenciesTypical import pattern - this fails on import whether or not the dependency is usedfromoptional_dependencyimportSomeUnusedClassdefsome_function_that_isnt_needed(*args,**kwargs):returnSomeUnusedClass().some_method(*args,**kwargs)Same functionality using import wrappers - only raise an error on USE, not importfromimport_wrappers.optional_dependenciesimportOptionalDependencyWrapperSomeUnusedClass=OptionalDependencyWrapper('optional_dependency','SomeUnusedClass')defsome_function_that_isnt_needed(*args,**kwargs):returnSomeUnusedClass().some_method(*args,**kwargs)
Package: import-x
Documentation|Get Started|Developer ChatDeepSource helps you ship good quality code.import-xAn ext-tensible loader to import anything like it is a python module.Supports Python3.6+.Installationpip install import-xUsageExample json file in your pathfoo.json:{"why":"not",}# Extend the ExtensionLoader and implement 'handle_module' method# where you will get a module object and the path to that module.>>>fromimport_ximportExtensionLoader>>>classJsonLoader(ExtensionLoader):extension='.json'auto_enable=False@staticmethoddefhandle_module(module,path):"""Load the json file and set as `data` attribute of the module."""json_file=Path(path)content=json_file.read_text()try:data=json.loads(content)except(json.JSONDecodeError,ValueError):data={}module.data=data>>>json_imports=JsonLoader()>>>withjson_imports:importfoo>>>foo.data>>>{"why":"not"}If you want to enable imports automatically without the context_manager then just
doauto_enable = Truein your loader.This ExampleJsonLoadercan be used directly by importingfromimport_x.loaders.json_loaderimportJsonLoaderand you are ready to import all the json files.
Package: import-yxdb
The ‘import_yxdb’ enables importing yxdb-files from Alteryx into to a dictionary or a Pandas dataframe.
It relies on the ‘yxdb’ package (full credit to the author of that package), which is used to read the yxdb-file into Python.Version 1.0.1
2023-11-05
- First (beta) release on PyPI
- Minor corrections in code.
- Compatible with yxbd 1.0.0Version 1.0.0
2023-11-04
- First (beta) release on PyPI
- Compatible with yxbd 1.0.0
Package: impose
Align microscopy images using custom-defined structural patterns and superimpose those on data from other imaging modalities.DocumentationThe documentation is available atimpose.readthedocs.io.InstallationIf you have Python 3.7 or later, you can install impose via:pip install imposeStarting imposeOnce you have installed impose via the method described above, you can
start it from the command line (e.g.Terminalapp on macOS):python -m impose
Package: imposm
Imposm is an importer for OpenStreetMap data. It reads XML and PBF files and
can import the data into PostgreSQL/PostGIS databases.It is designed to create databases that are optimized for rendering/WMS
services.It is developed and supported byOmniscale, runs on
Linux or Mac OS X and is released as open source under theApache Software
License 2.0.Seehttp://imposm.org/for more information.Changelog2.6.0 2015-01-10improve load performance of large limit-to geometriescheck connection before reading and fail if unable to connectnew BoundaryPolygons mapping class that keeps inserted waysquote column names when generalizing tableonly skip import of polygons if way was inserted as multipolygononly look for tables/views/indexes with schema=public when rotating tablesupdated generated code for internal cacheminor fixes2.5.0 2012-12-06PostGIS 2 supportnew –limit-to option to limit imports to polygonsadded –quiet option that only logs progress once per minuteadd StringIndex and Index mappings for PostgreSQLalways drop tables _and_ views with same name before creating new
table/view. allows to change mappings from views to tables and
vice versa.internal refactoring to make support for non SQL databases easier2.4.0 2012-03-30new Class and Type field typesadd support to disable automatictypecolumnnew –connection optionsupport for PostGIS Trigram indicesdo not try to simplify empty geometrieslimit progress logging to 5 times per seconduse SERIAL as primary key to support multiple features
with the same OSM IDnew optional splitting of long line stringsuse BIGINT for OSM ID in Postgres to support 64bit OSM IDs2.3.2 2011-09-05fixed –table-prefixadd –debug option for more verbose outputfixed way mergingfixed default_name_fields for UnionViewsimproved (contains) relation builder2.3.1 2011-07-05DROP views instead of REPLACE to prevent errors
when columns changed2.3.0 2011-07-05new PseudoArea field typenew Name and LocalizedName field typeupdate SRS in GeneralizedTables and UnionTablesnew waterareas_gen0|1 in default stylenew area field in landusages tablenew meter_to_mapunit function to use same mapping
for EPSG:4326 and projected SRS2.2.0 2011-06-01support for Shapely speedups (>=1.2.10)new –port option for PostgreSQL portreduced size of nodes cache by ~40%store inserted ways in extra cachesupport for relations type=boundarynew faster relation builder that supports
relations with >1000 ringsset import options in mapping fileimport_partial_relations=True/Falserelation_builder=contains(new)/union(old)imposm_multipolygon_report=60(seconds)imposm_multipolygon_max_ring=02.1.3 2011-04-19support for colons and other special chars in field and
table names (e.g. de:name)2.1.2 2011-04-13make it work on 32bit systems2.1.1 2011-04-12new--projoption to change DB projection from EPSG:900913abort if there are existing cache filesnew--merge-cacheand--overwrite-cacheoptions2.1.0 2011-03-29first open source release
Package: imposm.geocoder
Imposm.geocoder is a geocoder for OpenStreetMap data. It is developed as a libary and can be used to convert addresses into coordinates.Right now the geocoder is still in an early beta state and some code is optimized for German addresses.
Be aware that the API will change in the future.It depends on an PostgreSQL/PostGIS database and the import toolImposm.
It is developed and supported byOmniscale.
The libary runs on Linux or Mac OS X and is released as open source under theApache License 2.0.Seehttp://geocoder.imposm.org/for more information.
Package: imposm.parser
imposm.parseris a Python library that parses OpenStreetMap data inXMLandPBFformat.It has a simple API and it is fast and easy to use. It also works across multiple CPU/cores for extra speed.It is developed and supported byOmniscaleand released under theApache Software License 2.0.ExampleHere is an example that parses an OSM file and counts all ways that are tagged as a highway.from imposm.parser import OSMParser

# simple class that handles the parsed OSM data.
class HighwayCounter(object):
    highways = 0

    def ways(self, ways):
        # callback method for ways
        for osmid, tags, refs in ways:
            if 'highway' in tags:
              self.highways += 1

# instantiate counter and parser and start parsing
counter = HighwayCounter()
p = OSMParser(concurrency=4, ways_callback=counter.ways)
p.parse('germany.osm.pbf')

# done
print counter.highwaysSource and issue trackerSource code and issue tracker are available athttps://github.com/omniscale/imposm-parser.Changelog1.0.7 2015-01-10updated protobuf parser1.0.6 2014-10-31fixed bug in protobuf parser that could cause segfaults1.0.5 2013-09-13support PBF without granularity valueimproved support for non-pretty-printed XML1.0.4 2012-12-10improved support for non-pretty-printed XMLfixed dependency check for multiprocessing1.0.3 2011-07-21support for uncompressed PBFbug fix for PBF without dense nodes1.0.2 2011-03-10improved regexp based XML coord parserprevent mmap overflow in XMLChunker without coord_callbacksuccessfully parsed whole planet.osm1.0.0 2011-02-22first release
Package: impossible
Impossible: A way to encode everythingInstallationpip install impossibleUsageSimple Exampleimportimpossibleencoded_string=impossible.encode("Hello World!")print(encoded_string)decoded_string=decode(encoded_string)print(decoded_string)Using KeysTo use a key, first you must generate it.importimpossiblekey=impossible.generate_key()print(key)# -> 9,ogwje68zm5kcsbxl0yrf4d2731qauptinhv.m8hzqsbvx,lketd4ca0wgpjyu691ir725onf3.Then, you can encode and decode using that key.importimpossibleencoded_value=impossible.encode("Hello World",ek="9,ogwje68zm5kcsbxl0yrf4d2731qauptinhv.m8hzqsbvx,lketd4ca0wgpjyu691ir725onf3.",key=True)[0]print(encoded_value)decoded_value=decode(encoded_value,key="9,ogwje68zm5kcsbxl0yrf4d2731qauptinhv.m8hzqsbvx,lketd4ca0wgpjyu691ir725onf3.")print(decoded_value)
Package: imposter
This service was created to ease the usage of AWS SDK tools with using
assumed roles in your development environment.Installationpip install imposterUsageLaunching the serviceimposter--profile<AWS CLI profile name>[--bind[host]:port](169.254.169.254:80)[-D](daemonize)If the service detects you do not have the private IP address
169.254.169.254, it will attempt to create it for you with sudo. It will
also ask for credentials so that you can run the service on privileged
ports.Stopping the serviceimposter--stopListing rolesimposter--rolesSwitching rolesimposter--profile<AWS CLI profile name>If the service is running, it will attempt to switch the active role. If
not, it will launch it. Switching roles is equivalent to runningcurl-XPOSThttp://169.254.169.254/roles/<profilename>Checking service statusimposter--statusYour AWS CLI configYour AWS CLI config shouldnothave credentials in thedefaultprofile, otherwise the AWS SDK will look there for credentials before
looking for the EC2 Metadata service. Instead, have your config profiles
point to a separate, non-default section with your credentials, e.g.[profile teamrole1]
role_arn = arn:aws:iam::123456789012:role/teamrole1
source_profile = myidentity
role_session_name = teamrole1

[profile teamrole2]
role_arn = arn:aws:iam::123456789012:role/teamrole2
source_profile = myidentity
role_session_name = teamrole2

[myidentity]
aws_access_key_id = ABCDEFGHIJKLMNOPQRST
aws_secret_access_key = abcdefghij1234567890abcdefghij1234567890