Saravanan666/pypi-org huggingface dataset:
Package: imshow
ImshowFlexible and Customizable Image DisplayImshowis a Python app to display images.Imshowgives you:Flexiblity- CLI & Python interface;Customizability- visualize any data via the plugin system;Fast & cleanimage display.Installationpython3-mpipinstallimshowUsageCommand-Lineimshowexamples/*.jpg
imshowexamples--recursive# --recursive (-r)imshowexamples-r--plugintile--col3# --plugin (-p)Pythonimportglobimportimgvizimportimshowimages=(imgviz.io.imread(filepath)forfilepathinglob.glob("examples/*.jpg"))imshow.imshow(images)Builtin plugins-p base(default)imshow examples/*.jpg
imshow examples --recursive  # auto-search image files-p tileimshow examples/*.jpg -p tile --col 3 --row 3
imshow examples/*.jpg -p tile --col 3-p markimshow examples/*[0-9].jpg -p mark --mark-file examples/mark.txtHow to create custom pluginYou can pass a Python file that containsclass Plugin(base.Plugin)to--plugin, -pto customize the behaviour of Imshow. Below example shows a countdown from 10 to 0 displayed as images.Seeplugins/base.pyfor the most basic example of scanning image files and displaying them.
For more examples, checkpluginsfolder.imshowexamples/*.jpg--pluginexamples/countdown_plugin.py--number10importnumpyasnpimportimgvizfromimshow.pluginsimportbaseclassPlugin(base.Plugin):@staticmethoddefadd_arguments(parser):# define additional command line optionsparser.add_argument("--number",type=int,default=10,help="number to count down from")number:intdef__init__(self,args):self.number=args.numberdefget_items(self):# convert command line options into items to visualize.# each item represent the chunk that is visualized on a single window.yield fromrange(self.number,-1,-1)defget_image(self,item):# convert item into numpy arrayimage=np.full((240,320,3),220,dtype=np.uint8)font_size=image.shape[0]//2height,width=imgviz.draw.text_size(text=f"{item}",size=font_size)image=imgviz.draw.text(src=image,text=f"{item}",yx=(image.shape[0]//2-height//2,image.shape[1]//2-width//2),color=(0,0,0),size=font_size,)returnimageLicenseMIT
Package: imshowpair
Package DescriptionUtility function for comparing two images. Inspired by MATLAB’simshowpairfunction.Installationimshowpairrequiresmatplotlib. To install,
download the source and runpython setup.py installUsageSample usage:import imshowpair
a = .. # load first image
b = .. # load second image
imshowpair.imshowpair(a, b)Functions to use when comparing images (alpha blending, etc.) are
implemented inimshowpair.utils. These may require additional dependencies
such asscikit-image:import imshowpair
import imshowpair.utils as utils
a = .. # load first image
b = .. # load second image
imshowpair.imshowpair(a, b, utils.blend)DevelopmentThe latest source code can be obtained fromGitHub.AuthorsSee the includedAUTHORS.rstfile for
more information.LicenseThis software is licensed under theBSD License.
See the includedLICENSE.rstfile for
more information.
Package: imshowTk
Author: Stephen ThompsonimshowTk is a zero dependency alternative to opencv’s imshow function. It was developed to allow us to show an image window when using opencv-headless and don’t want to use a larger UI library. It uses tkinter which comes as standard in most Python installations.imshowTk is part of theSciKit-Surgerysoftware project, developed at theWellcome EPSRC Centre for Interventional and Surgical Sciences, part ofUniversity College London (UCL).Basic use casefrom from imshowtk.imshowtk import ImshowTk
imshow = ImshowTk()
frame = cv2.imread('project-icon.png')
imshow.imshow(frame)
del imshowDevelopingCloningYou can clone the repository using the following command:git clone https://github.com/SciKit-Surgery/imshowTkRunning testsPytest is used for running unit tests:pip install pytest
python -m pytestLintingThis code conforms to the PEP8 standard. Pylint can be used to analyse the code:pip install pylint
pylint --rcfile=tests/pylintrc imshowtkInstallingYou can pip install directly from the repository as follows:pip install git+https://github.com/SciKit-Surgery/imshowTkContributingPlease see thecontributing guidelines.Useful linksSource code repositoryDocumentationLicensing and copyrightCopyright 2023 University College London.
imshowTk is released under the BSD-3 license. Please see thelicense filefor details.AcknowledgementsSupported byWellcomeandEPSRC.
Package: imshowtools
imshowtoolsThis library lets you view images in Jupyter notebooks in a much simpler and intuitive way. Ships with a better 'imshow' function with Multi Images, Smart Wrap and BGR support!.InstallationTo installimshowtools, simply dopipinstallimshowtoolsQuick PlotImportimshowfromimshowtoolsand use it:fromimshowtoolsimportimshowimporttensorflowastf(x_train,y_train),(x_test,y_test)=tf.keras.datasets.mnist.load_data()imshow(x_train[0])imshow(x_train[0],x_train[1],x_train[2])imshow(*x_train[:20],cmap='binary')imshow(*x_train[:100],cmap='binary',size=(10,10))You can use any matplotlib compatiblecmapExampleipynbnotebook andPythonalong with test images
provided in the example folder.Get Numpy ImageYou can use obtain numpy image in any of['RGB', 'RGBA', 'ARGB', 'BW', 'L', "BGR", "BGRA", "ABGR"]colorspaces.image=imshow(*x_train[:100],return_image=True)image=imshow(*x_train[:100],return_image="RGBA")image=imshow(*x_train[:100],return_image="RGB")image=imshow(*x_train[:100],return_image="BW")print(image.shape)# cv2.imwrite("saved_sample.png", image)# do stuff with 'image' or even# imshow(image)Output:(288,432,3)(288,432,4)(288,432,3)(288,432)Rows and Columnsimshow(*x_train[:15],cmap='Purples',rows=1)imshow(*x_train[:24],cmap='Greens',columns=4)Open CV Imageslenna=cv2.imread('example/lenna.png')imshow(lenna)cvshow(lenna)imshow(lenna,mode='BGR')image=imshow(*[lennafor_inrange(12)],return_image="BW")print(image.shape)imshow(image)NamespacesIf you do not want to useimshowdirectly in your app (maybe you have another function named imshow), you shall use it likeimportimshowtoolsimshowtools.imshow(your_image)or if you like to use a custom namespaceimportimshowtoolsasmy_namespacemy_namespace.imshow(your_image)ContributingPull requests are very welcome.Fork the repoCreate new branch with feature name as branch nameCheck if things work with a jupyter notebookRaise a pull requestLicencePlease see attachedLicence
Package: imsize
imsizeLightning-fast extraction of image dimensions & bit depth. Tested on Python 3.8+ and Ubuntu 22.04.Supports PGM / PPM / PNM / PFM / PNG / BMP / JPG / TIFF / INSP / EXR / HDR / DNG / CR2 / NEF / RAW / NPY.Installing on Linux:pip install imsizeDocumentation:pydoc imsizeCommand-line usage:imsize --helpBuilding & installing from source:make installBuilding & releasing to PyPI:make release
Package: imsosorry
I'm so sorrySometimes it can be necessary to call upon the ancient arts...A module to uwuify strings of text.InstallationYou can installimsosorrythrough PyPi using$pipinstallimsosorryor, by installing the development version through GitHub.$pipinstallgit+https://github.com/letsbuilda/imsosorryExample usageimportimsosorryprint(imsosorry.uwuify("i'm very sorry"))
Package: im-squeck
Squeck(Squonk2 Deck) is s Textual-UI (TUI) for the
summary visualisation of multiple Squonk2 environments.Squeckuses thesquonk2-python-clientto create aDeckdisplaying
summary information for multiple Squonk2 environments and uses Will McGugan’stextualframework to provide the user with a simple,
text-based user interface modelled on the populark9sKubernetes monitor.It displays a summary of the environments, where: -A green tick indicates that the authenticator service has issued a token for the serviceThe service version is displayed for those that are runningANO RESPONSEbanner is displayed for services that are not respondingInstallationSqueckis a Python application, written with Python 3.10 and published
toPyPIand is easily installed usingpip:pip install im-squeckExecutionBefore runningSqueckyou must have access to at least one Squonk2 environment.Squeckobtains details of the environment through a YAML-basedenvironmentsfile. An example file,environments, is located in the root
of this project:WhenSqueckstarts it will look for the environments file in your home
directory, in the file~/.squonk2/environments. If you place your populated
environments file there you need do nothing else prior to runningSqueck.
If you prefer to put yourenvironmentsfile elsewhere, or have multiple
files, set the path to your file using the environment variableSQUONK2_ENVIRONMENTS_FILE:export SQUONK2_ENVIRONMENTS_FILE=~/my-squonk2-environmentsWith an environments file in place you can runSqueck:squeckLoggingYou can enable logging fromSqueckand the underlying textual framework by
setting the environment variableSQUONK2_LOGFILEwhen running the
application:SQUONK2_LOGFILE=./squeck.log squeckDebuggingTextualdoesn’t like anything being written to the console so printing
(even tostderr) will topple the display. That’s whystderris
diverted when the application is running and nothing is printed.
There comes a time, though, when you need to see the error log.
For these times you can runSqueckwithout stderr diverted:squeck --enable-stderr
Package: imstack
ImStackOptimizing the pixel values of an image to minimize some loss is common
in some applications like style transfer. But because a change to any
one pixel doesn’t affect much of the image, results are often noisy and
slow. By representing an image as a stack of layers at different
resolutions, we get parameters that affect a large part of the image
(low-res layers) as well as some that can encode fine detail (the
high-res layers). There are better ways to do this, but I found myself
using this approach enough that I decided to turn it into a proper
library.Here’s acolab
notebookshowing this in action, generating images to match a CLIP prompt.InstallThis package is available on pypi so install should be as easy as:pip install imstackHow to useWe create a new image stack like so:ims=ImStack(n_layers=3)By default, the first layer is 32x32 pixels and each subsequent layer is
2x larger. We can visualize the layers with:ims.plot_layers()The parameters (pixels) of the layers are set to requires_grad=True, so
you can pass the layers to an optimizer with something likeoptimizer = optim.Adam(ims.layers, lr=0.1, weight_decay=1e-4)to
modify them based on some loss. Calling the forward pass
(image = ims()) returns a tensor representation of the combined image,
suitable for various pytorch operations.For convenience, you can also get a PIL Image for easy viewing with:ims.to_pil()Loading images into an ImStackYou don’t need to start from scratch - pass in a PIL image or a filename
and the ImStack will be initialized such that the layers combine to
re-create the input image as closely as possible.fromPILimportImage# Load the input imageinput_image=Image.open('demo_image.png')input_imageNote how the lower layers capture broad shapes while the final layer is
mostly fine detail.# Create an image stack with init_image=input_image and plot the layersims_w_init=ImStack(n_layers=3,base_size=16,scale=4,out_size=256,init_image=input_image)ims_w_init.plot_layers()ExamplesText-to-image with ImStack+CLIPVery fast text-to-image, using CLIP to calculate a loss that measures
how well the image matches a text prompt. In this example, the prompt
was ‘A watercolor painting of an underwater submarine’:Image.open('clip_eg.png')colab
linkand a CLOOB
versionStyle TransferSimple style transfer, with an ImStack being optimized such that content
loss to one image and style loss to another are minimized.Image.open('style_tf_eg.png')colab
link
Package: im-standardize-molecule
Theim-standardize_moleculemodule is a utility provided byInformatics Matters.It contains a Python module to:
1. Take an original SMILES (Simple Molecule Input Line rESpresentation) and
convert it to an Isomeric or Nonisomeric canonical SMILES representation in a consistent way.
2. Convert anrdkit.Chem.rdchem.Molobject to a standard format.PreparationNote that although this module is available on PyPI, it is not possible to
simply install it and run it. The module is strongly dependent onRDKit.
In most cases, one of the the Informatics Matters RDKit container images can be used.
More details can be found here:IM-RDKitRDKit can also be installed withConda.TestingTo check installation is successful, from within an RDKit environment, run:python -m unittest test.testUsagestandardize_to_noniso_smiles(osmiles:str)standardize_to_iso_smiles(osmiles:str)Takes a smiles and returns the converted smiles and standardized molecule as anrdkit.Chem.rdchem.MolExample:from standardize_molecule import standardize_to_noniso_smiles
noniso = standardize_to_noniso_smiles('N[C@@H](C[C@@H]1CCNC1O)[C@@H](O)CO')
[17:30:44] Initializing MetalDisconnector
[17:30:44] Running MetalDisconnector
[17:30:44] Initializing Normalizer
[17:30:44] Running Normalizer
[17:30:44] Running Uncharger
print(noniso[0])
NC(CC1CCNC1O)C(O)COstandardize_molecule(molecule: object, osmiles:str = ‘NotProvided’)Takes an rdkit.Chem.rdchem.Mol object and (optionally) a smiles string for logging and returns
a standardized molecule.Example:from rdkit import Chem
from standardize_molecule import standardize_molecule
mol = Chem.MolFromSmiles('C1=CC=CC=C1')
std = standardize_molecule(mol, 'C1=CC=CC=C1')
[17:37:40] Initializing MetalDisconnector
[17:37:40] Running MetalDisconnector
[17:37:40] Initializing Normalizer
[17:37:40] Running Normalizer
[17:37:40] Running Uncharger
print(std)
<rdkit.Chem.rdchem.Mol object at 0x7f18ca2a93f0>
print(noniso[1].GetNumHeavyAtoms())
13
Package: imstegapy
ImstegAn image steganography tool used for hiding text inside images made as a hobby project.Installationpip install imstegapyExample Usageimportimstegcodec=imsteg.StegCodec()img=codec.encode("path/to/file.png","text here")img.save("imagename.png")# only pngs seems to work properly.print(codec.decode("imagename.png"))>>>texthere
Package: imsto_client
#imsto-go client in python## installation`sudo pip-2.7 install -e .` (recommend)or`sudo python setup.py install`## django settings`settings.py`:~~~DEFAULT_FILE_STORAGE = 'imsto_client.django.ImageStorage'IMSTO_HOST = 'localhost:8964'IMSTO_ROOF = 'demo'IMSTO_URL_PREFIX = '/'IMSTO_THUMB_PATH = '/thumb'~~~`admins`~~~from django.contrib import adminfrom imsto_client.django.widgets import AdminImageWidgetclass GoodsAdmin(admin.ModelAdmin):def formfield_for_dbfield(self, db_field, **kwargs):if db_field.name == 'image_path':request = kwargs.pop("request", None)kwargs['widget'] = AdminImageWidgetreturn db_field.formfield(**kwargs)return super(GoodsAdmin,self).formfield_for_dbfield(db_field, **kwargs)"""more other methods""~~~## nginx configurationsee also: imsto-go/INSTALL.md
Package: imsvdex
IMSVDEXAPI to access and modify XML files in theIMS Vocabulary Definition Exchangeformat:The IMS Vocabulary Definition Exchange (VDEX) specification defines a
grammar  for the exchange of value lists of various classes: collections
often denoted "vocabulary". Specifically, VDEX defines a grammar for the
exchange of simple machine-readable lists of values, or terms, together with
information that may aid a human being in understanding the meaning or
applicability of the various terms. VDEX may be used to express valid data
for use in instances of IEEE LOM, IMS Metadata, IMS Learner Information Package
and ADL SCORM, etc, for example. In these cases, the terms are often not human
language words or phrases but more abstract tokens. VDEX can also express
strictly hierarchical schemes in a compact manner while allowing for more loose
networks of relationship to be expressed if required.[CITVDEXSITE].[CITVDEXSITE]citation from IMS Global, theVDEX-specification-pageThis module takes the VDEX-XML objects and offers an API to them.VDEX Version 1 Final Specification is supported, except VDEX references.Changes1.2 (2020-06-15)Python 3 support.
[ale-rt, reinhardt, thet]Add tox/travis testing environment.
[thet]Cleanup/Blacken codebase.
[thet]1.1 (2015-06-25)Use lxml instead of elementtree
[tomgross]Adding posibility to generate vdex from a twodimension matrix, and
corresponding export functionality.
WARNING: The constructor arguments changed. Please update accordingly
[do3cc]
Package: im-swagger-spy
im-swagger-spypytest plugin for matching methods in swagger with those used in testsУстановкаpipinstallgit+https://github.com/dasshit/im-swagger-spy.gitИспользованиеЕсть несколько вариантов использованияВариант №1pytest.ini[pytest]addopts=--swagger-url http://localhost/client/v101/u/api.yaml# Адрес, с которого можно получить swagger.json|yaml или openapi.json|yaml--swagger-prefix /api/v101                          # Префикс к path методов из документации--swagger-name test.ru                              # Название сервиса (для отчета)--swagger-report  reports/                          # Путь к папке для сохранения отчетаconftest.pyimportpytestimportrequests@pytest.fixture(scope='session')defsession(swagger_http_spy):session=requests.Session()swagger_http_spy.register_as_hook(session)yieldsession# Запросы этой сессии попадут в отчетCIpytesttests/
python-mim_swagger_spybuildДругие примерыМожно посмотреть в example/
Package: imswitchclient
ImSwitchClientThis is a package that connects ImSwitch’s REST API to the rest of the world (e.g. jupyter lab)Free software: MIT licenseDocumentation:https://imswitchclient.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2023-07-03)First release on PyPI.
Package: imteksimfw
IMTEK-Simulation custom FireWorks extensionsJohannes Hörmann,johannes.hoermann@imtek.uni-freiburg.de, Mar 2020Quick startInstall the official FireWorks package, i.e. bypip install fireworks,
(https://github.com/materialsproject/fireworks) and subsequently make this
package available to your FireWorks environment, i.e. bypip install imteksimfw.Custom FireTasks quick startTo use custom FireTasks withinimteksimfw, appendADD_USER_PACKAGES:
  - imteksimfw.fireworks.user_objects.firetasksto your~/.fireworks/FW_config.yaml.Configuration samples part of theFireWorks RocketLauncher Managerinclude this line already.
Package: imtoolkit
IMToolkitIMToolkit, an open-source index modulation (IM) toolkit, attempts to facilitate reproducible research in wireless communications.
The major advantages of this toolkit are highlighted as follows:It accelerates bit error ratio and average mutual information simulations by relying on a state-of-the-art Nvidia GPU and the massively parallel algorithms proposed in [1].It also supports the representative multiplexing schemes for ideal MIMO and OFDM scenarios, in addition to the IM family.It containsa comprehensive database of designed active indices, that determine the achievable performance of the generalized spatial modulation or the subcarrier-index modulation.For more information, please refer to the following webpages.IMToolkit official website.A detailed tutorial for the imtoolkit command.A comprehensive database of the designed active indices.A compute capsule on Code Ocean, that reproduces the same results as those reported in [1].Installation GuideIMToolkit is available from the Python official package repositoryPyPi.> pip install imtoolkitThis installation requires NumPy, Pandas, SciPy, SymPy, Numba, and tqdm, all of which are popular Python packages.
Additionally, it is strongly recommended to installCuPy5.40+.
IMToolkit is heavily dependent on CuPy to achieve significantly fast Monte Carlo simulations.The key components required by CuPy are listed here.In case CuPy is not installed in your environment, IMToolkit uses NumPy only.
Note that the CuPy-based simulation is 145 times faster than the NumPy-based calculation, as reported in [1].The above PyPi packageexcluded the designed active indices due to their large file size, which exceeds 500MB.
Hence, this reduced-size PyPi package will automatically download a required file from the GitHub repository or a mirror website.
If you need all the project files, to useimtoolkitoffline, it is recommended to obtain the whole package from GitHub as follows:> pip install git+https://github.com/imtoolkit/imtoolkitThe IMToolkit development team welcomes other researchers' contributions and pull requests.
In that case, it would be better to install the latest package and activate the editable mode as follows:> git clone https://github.com/imtoolkit/imtoolkit
> pip install -e ./imtoolkit # this activates the editable modeA detailed tutorial for the installed imtoolkit command is available here.CitationsIt would be highly appreciated if you cite the following reference when using IMToolkit.[1] N. Ishikawa, ``IMToolkit: An open-source index modulation toolkit for reproducible research based on massively parallel algorithms,'' IEEE Access, vol. 7, pp. 93830--93846, July 2019.Of course, if your project relies on CuPy, the following reference is strongly recommended.[2] R. Okuta, Y. Unno, D. Nishino, S. Hido, and C. Loomis, ``CuPy: A NumPy-compatible library for NVIDIA GPU calculations,'' in Conference on Neural Information Processing Systems Workshop, Long Beach, CA, USA, December 4--9, 2017.Contributor(s)Naoki Ishikawa (Web/Google Scholar/ResearchGate/Publons)You might become a valuable contributor of this project. Any contributions and issues are appreciated.
Package: im-tools-36
InstallationThis project is published
on thePython Package Index (PyPI)at:https://pypi.org/project/im-tools-36/.
It should be installable from Python distribution platforms or Integrated Development Environments (IDEs).
Otherwise, it can be installed from a command console:For all users, after acquiring administrative rights:First installation:pip installim-tools-36Installation update:pip install--upgradeim-tools-36For the current user (no administrative rights required):First installation:pip install--userim-tools-36Installation update:pip install--user--upgradeim-tools-36DocumentationThe documentation is available athttps://src.koda.cnrs.fr/eric.debreuve/im-tools-36/-/wikis/home.AcknowledgmentsThe project is developed withPyCharm Community.The development relies on several open-source packages
(seeinstall_requiresinsetup.py, if present; otherwiseimportstatements should be searched for).The code is formatted byBlack,The Uncompromising Code Formatter.The imports are ordered byisort…your imports, so you don’t have to.
Package: imTriangle
imTriangleThis snippet of code attempts to put triangle pixelation effect on images.InstallationRun the following to install:pipinstallimTriangleUsageimportcv2importnumpyasnpfromimTriangleimporttriangleimg_fullname='assets/lotus.jpg'img=cv2.imread(img_fullname)img_out=img.copy()[h,w,d]=img.shapeforiinrange(d):img_out[:,:,i]=triangle(img[:,:,i].copy())cv2.imwrite('assets/lotus-triangled.jpg',img_out)OrimTriangle --input 'assets/lotus.jpg' --output 'assets/lotus-triangled.jpg'OutputThis is a sample image:The sample image after tirangle pixelation effect:
Package: imu-listener
IMU ListenerROS package for receiving IMU data from a RealSense camera using rospy.InstallationThis package requires the following dependencies:rospy
--[This packages is also installed when you install ros in your system]UsageTo use the IMU Listener package, follow these steps:Set the IMU topic by modifying theimu_topicvariable in theimu_listener.pyfile.Run the package.The IMU Listener will start subscribing to the specified IMU topic and display the received orientation data.You can customize theimu_callbackmethod in theImuListenerclass to process the IMU data according to your requirements.LicenseThis package is distributed under the MIT License. See theLICENSEfile for more information.