Saravanan666/pypi-org huggingface dataset:
Package: tiffany
Tiffany - Read/Write Multipage-Tiff with PIL without PIL========================================================Tiffany stands for any tiff. The tiny module solves a large set ofproblems, has no dependencies and just works wherever Python works.Tiffany was developed in the course of the *Pydica* project and willnow appear on PyPi.Abstract========During the development of *Pydica* (Python Distributed Capture) we wereconfronted with the problem to read multipage Tiff scans. The GUI toolkit*PySide (Qt)* does support Tiff, but only shows the first page. We also hadto support Fax compression (CCITT G3/G4), but *Qt* supports this.As a first approach we copied single pages out of multi-page tiff filesusing *tiffcp* or *tiffutil* (OS X) as a temp file for display. A sub-optimumsolution, especially for data security reasons.The second approach replaced this by a tiny modification of the linkage ofthe tiff directories (IFD). This way, a tiff file could be patched in memorywith the wanted page offset and then be shown without any files involved.Unfortunately also this solution was not satisfactory:- our tiff files have anomalies in their tiff tags like too many null-bytesand wrong tag order,- Qt's implementation of tiff is over-pedantic and ignores all tags after thesmallest error.Being a good friend of *Fredrik Lundh* and his *PIL* since years, I tried toattack the problem using this. Sadly Fredrik hasn't worked much on this since2006, and the situation is slightly messed up:*PIL* has a clean-up of tiff tags, but cannot cope with fax compression by default.There exists a patch since many years, but this complicates the build processand pulls with *libtiff* a lot of dependencies in.Furthermore, *PIL* is unable to write fax compressed files, but blows the dataup to the full size, making this approach only a half solution as well.After a longer odyssey I saw then the light of a Tiffany lamp:I use only a hand-full of *PIL*s files, without any modification, pretend to unpacka tiff file, but actually cheating. Only the tiff tags are nicely processed andstreamlined, but the compressed data is taken unmodified as-is.When writing a tiff page out, the existing data is just assembled in the correctorder.For many projects like *Pydica* that are processing tiff files without editingtheir contents, this is a complete solution of their tiff problem. The dependenciesof the project stay minimal, there are no binaries required, and Tiffany is withless than 300 lines remarkably small.Because just 5 files from *PIL* are used and the _imaging module is not compiledat all, I'm talking about "PIL without PIL" ;-)Tiffany is a stand-alone module and has no interference with *PIL*.You can see this by looking at ``import_mapper.py``. This module modifies ``__import__``so that the *PIL* modules appear as top-level internally, but become sub-modules oftiffany in ``sys.modules``.Please let me know if this stuff works for you, and send requests to<tismer@stackless.com> or use the links in the bitbucket website:https://bitbucket.org/pydica/tiffanyeasiest way to install tiffany:``$ pip install tiffany``# EOF
Package: tiffanyke-aquastat
Analytics Value Chain Assignment 1Author: Tiffany Ke (tkt1750)This project is for Northwestern MSiA 423 Analytics Value Chain Assignment 1.The requirments for this assignment are as below:Create a Python package from the functions in develop-aquastat-functions.ipynb  download. Be sure to add all of the files required for a pip installable Python package and structure the package according to the guidelines from the Python package module.Adhere to module writing guidelines from the Writing Python modules lecture.Add unit tests in the appropriate location within the package for each testable function. The unit tests for time_slice() have already been developed for you in develop-time-slice-tests.ipynb  download. Bonus points if your unhappy path tests for the other functions cover different use cases than the examples.Configure a Python logger through Python’s logging package and add logging that includes at least two of the four levels: DEBUG, INFO, WARNING, ERRORAdd one-line docstrings to variable_slice() and country_slice()Add full docstrings to time_series(), plot_heatmap(), and plot_histogram()
Package: tifffolder
tifffolderLazily read a subset of data from a folder of images using numpy slicing syntax.  Includes simplified but robust file pattern matching syntax and multithreaded file reading.  Note: this is not intended to promote a folder of tiffs as a useful way to store lots of information (things like hdf5/n5/klb are preferable).  But for data that begins as a folder of tiffs, tifffolder simplifies the process of parsing that folder into data along different axes (and could be used as an intermediate step in the coversion to a better format if desired).Install with pip$pipinstalltifffolderInstall with conda$condainstall-ctalleytifffolderUsage>>>fromtifffolderimportTiffFolder>>>tf=TiffFolder('/folder/of/tiffs',patterns={'t':'_stack{d4}','c':'_ch{d1}'})# get dataset shape and order of axes>>>tf.shape(10,2,65,184,157)# (nt, nc, nz, ny, nx)>>>tf.axes'tczyx'# reorder data  (still experimental)>>>tf.axes='tzcxy'>>>tf.shape(10,65,2,157,184)# data is only read from disk when explicitly indexed# get the last 10 Z planes from every other timepoint,# in the first channel cropping to the middle half in Y>>>data=tf[::2,0,-10:,tf.shape[-2]*1//4:tf.shape[-2]*3//4]>>>data.shape(5,10,92,157)# (nt, nz, ny, nx)# Can also be used as an iterator/generator for lazily reading data>>>fortimepointintf:>>>do_something(timepoint)# or just load the whole thing>>>alldata=tf.asarray()>>>alldata.shape==tf.shapeTrue# asarray() also accepts any axis kwargs>>>somedata=tf.asarray(t=range(1,10),c=0)# Or just to select filenames along certain axes:>>>tf.select_filenames(t=range(1,10,2),c=0)['./test_ch0_stack0001_488nm.tif','./test_ch0_stack0003_488nm.tif','./test_ch0_stack0005_488nm.tif','./test_ch0_stack0007_488nm.tif','./test_ch0_stack0009_488nm.tif']Specifying filename patterns:tifffolder converts a simplified regex syntax into relatively robust lookahead regex that will match patterns in any order in the filename or fail elegantly.The TiffFolder class accepts apatternsparameter (dict or list of two-tuples).  For each (key, value) in thepatternsdict:key = the axis name (e.g.'x', 'y', 'z', 'c', 't', 's')value = the simplified regex where:things in brackets{}will be capturedthings outside of brackest will be required to match, but not captured{d}means match any number of digits{D}means match any number of NON-digits{}means match any alphanumeric character (excluding underscore){d2}means match exactly two digits (for example)For example:>>>patterns={'rel':'_{d7}msec','w':'_{d3}nm','t':'_stack{d4}','c':'_ch{d1}','cam':'Cam{D1}'}>>>tf=TiffFolder('/folder/of/tiffs',patterns)>>>tf._parse_filename('cell1_ch0_stack0009_488nm_0034829msec.tif'){'rel':34829,'w':488,'t':9,'c':0,'cam':None}>>>tf._parse_filename('cell1_CamA_ch2_stack0001_560nm_0034829msec.tif'){'rel':34829,'w':560,'t':1,'c':2,'cam':'A'}>>>tifffolder.build_regex('cam','Cam{}')'(?=.*Cam(?P<cam>[a-zA-Z0-9]+))?'>>>tifffolder.build_regex('c','_ch{d1}')'(?=.*_ch(?P<c>\\d{1}))?'todocheck axis reorderingcheck z planes across files
Package: tiff-inspector
tiff-inspectorTiff-Inspectoris a Python package that allows you to easily inspect the content and metadata of TIFF (Tagged Image File Format) files. The package provides an easy-to-use interface to view and analyze the hierarchical structure, series, levels, and tags of TIFF files.FeaturesInspect hierarchical structure of TIFF files.View metadata for series, levels, and individual pages.Extract and display image descriptions.Display metadata and tag values in a human-readable format.Supports XML and plain text descriptions.InstallationYou can install Tiff-Inspector using pip:pipinstalltiffinspectorDependenciestifffilexmltodictIPythonUsageTo use the Tiff-Inspector package, simply import the TiffInspector class and create an instance with the path to the TIFF file.fromtiffinspectorimportTiffInspector# Instantiate the TiffInspector with the path to the TIFF filetiff_inspector=TiffInspector("path/to/tiff/file.tif")# Display the reporttiff_inspector.display_report(expanded=False,levels=None,max_text_length=None)You can customize the display of the report by modifying the parameters:expanded: If set to True, it will expand the JSON structures in the report.levels: Set the number of tree levels to display. If set to None, it will display the entire tree.max_text_length: Set the maximum length of text values in the report. If set to None, it will display the entire text.DocumentationFor more detailed information on the package and its functions, please refer to the source code and comments within the package.LicenseThis package is released under theMIT License.
Package: tiffit
tiffitLightweight command-line interface for handling tiff files in BigTIFF format.Convert, extract information, and concatenate. That's it. Nothing fancy.installation and usageInstall with pip and then use from command line.pip install tiffit

# convert file into a well-behaved bigtiff file
tiffit convert old.tiff new.tiff

# get info about file without loading into memory
tiffit info filename.tiff

# concatenate two tiff files into a single bigtiff file
tiffit concat file1.tiff file2.tiff newfile.tiffNotes / caveatsIf there is other information you would like read out from the info command, please let me know, bearing in mind I am trying to keep this interface fairly universal and simple.For an excellent overview of tiff (thousands of incompatible file formats), see [https://www.fileformat.info/format/tiff/egff.htm](this excellent overview). It is a bit dated, but is still the best thing I've found.If you need a package with more complexity, see:opencvpillowtiffiletifftoolsTo doadd keyword argument to info so user can check on specific image in stack.
Better yet, don't allow mixing of formats just make this a pure bigtiff library: add autoconversion of concatenated files.add verbosity controller for convert and concat.AcknowledgmentsPowered by thetifffileandtifftoolspackages.Developed with support from NIH Bioinformatics, NIEHS Neurobehavioral Core, NIEHS Neurobiology Laboratories. In particular thanks to Shaohua Wang for help during development.
Package: tiffler
TifflerA Niffler that only likes shiny variablesInstallationpipinstall-UtifflerUsageimporttifflertemplate="One{unit}was equal to {num_sickles:int} Sickles or {num_knuts:int} Knuts."variables=tiffler.scan(template,"one Galleon was equal to 17 Sickles or 493 Knuts.",case_sensitive=False)print(variables)#{'unit': 'Galleon', 'num_sickles': 17, 'num_knuts': 493}importtifflertemplate="\s+{item}: {price:int} {unit:str:\w+}"bill="""Pewter cauldron: 15 galeons,Brass cauldron: 21 galeons,Copper cauldron: 25 galeons,"""formatchintiffler.search(template,bill,case_sensitive=False):print(match)# {'item': 'Pewter cauldron', 'price': 15, 'unit': 'galeons'}# {'item': 'Brass cauldron', 'price': 21, 'unit': 'galeons'}# {'item': 'Copper cauldron', 'price': 25, 'unit': 'galeons'}
Package: tiffreader
Why?Compared to PIL and some other tiff related projects, this package is
more for scientific imaging.Features exposed from libtiff:responds topixel bit depthnumber of channelscompression schemesequential and random access to frames in multi-frame tiffquery length of multi-frame tiffOpenfromtiffreaderimportTiffReadertif=TiffReader.open("file_path.tif")Random Accesstif.seek(10)frame=tif.read_current()# gives a 2D numpy arrayis equivalent toframe=tif[10]Sequential Accessexample for an average image of the 10th to 20th frames:tif.seek(10)result=np.zeros(tif.shape,dtype=np.uint64)forframeinzip(tif,range(10)):result+=frameresult/=10Additionallyfromtiffreaderimportsave_tiffarray=np.array([[1,2,3,4],[5,6,7,8]],dtype=np.uint8)save_tiff(array,"tif_path.tif")tif.length# length of multi-frame tiff stacktif.shape# shape of one frametiffinfo("tif_path.tif",["width","height"])# wraps tiffinfo to query for additional tags
Package: tiffslide_xarray
TiffSlide-XarrayA simple integration library between tiffslide and xarray.InstallationInstall from pypi:pip install tiffslide-xarrayUsageThis library hooks into xarray's extension system as a backend engine. So
it can be used even without importing.fromxarrayimportopen_datasetslide_level0=open_dataset("input.svs")The library automatically recoginizes "tiff" and "svs" files. If required,
the "engine" keyword can force usage:slide_level0=open_dataset("input.another_extension",engine="tiffslide")Tifflside uses the fsspec and tifffiles packages to open files. Options to these
libraries can be passed using the "storage_options" and "tifffile_options" keyword
arguments.slide_level0=open_dataset("s3://input.svs",storage_options={"s3":...})By default, the level 0 of the the file is read. Other levels can be read by using
the "level" keyword.slide_level1=open_dataset("input.svs",level=1)Negative levels are allowed to allow indexing from end of the level array.slide_level_last=open_dataset("input.svs",level=-1)Opening All LevelsTo open all the levels in the slide, use the "open_all" to return a datatree of the
slide.fromtiffslide_xarrayimportopen_all_levelsslide=open_all_levels(input.svs)The returned datatree places level0 at the root group, and places subsequent
levels at the f"level{n}" group.Data and MetaData ModelThe data for each slide is accessible at "image,"slide_level0.imageslide_level0["image]Coordinates for the x, y and c dimensions are added, in units of "pixels" in the level 0
slide. This makes the cordinates between different levels directly compariable. The library
assumes there are three channels, in the order of (r, g, b).>>>slide_level0.x[0,1,2...]>>>slide_level0.y[0,1,2...]>>>slide_level0.c['r','g','b']All the metadata from the slide is stored in the dataset attributes. The source file name is
added to the metadata of both the 'image' array and the dataset. If found in the metadata, the microns
per pixel (mpp) is stored in the attributes of the 'x' and 'y' coordinates.Lazy LoadingSlides are lazy loaded which makes the initial open very quick, and
loading of small regions is quick (but not cached). Loading of large regions can be slow.
To manage this, be sure to call "load" on datasets to bring them into memory
if they will be accessed multiple times.For example, this code will execute two costly reads:roi=slide_level1.sel(x=slice(10000,40000),x=slice(5000,20000))# select a large ROIroi2=2.0*roi# first readroi2=3.0*roi# second readCalling "load" on "roi" or "slide_level1" solves this problem.roi=slide_level1.sel(x=slice(10000,40000),x=slice(5000,20000))# select a large ROIroi=roi.load()# load the ROI into memory for subsequent processing.roi2=2.0*roi# no readroi2=3.0*roi# no readRequesting FeedbackThis project currently in alpha to obtain feedback on the API. Please
submit issues or API feature/modification requests to:https://github.com/swamidasslab/tiffslide-xarray.
Package: tiffstack2avi
tiffstack2Avi.convert() converts multiple tiff sequences to avi files
using ffmpeg (https://ffmpeg.org/). Intended to work on tiff sequences
generated by fastCamRecord
(http://www.brain-recording.science/software).Installpip install tiffstack2aviUsageYou first need to install ffmpeg (https://ffmpeg.org/) on your computer.
Then,import tiffstack2avi
tiffstack2avi.convert()Choose the folders that contain tiff sequences. The tiff files should be
named frame%d.tif. It would be great if you could aknowledge my work and
cite my paper (in prep..).
Package: tiff-stack-crop-tool
tiff-stack-crop-toolUtility for cropping tiff stacks in 3D.Free software: MIT licenseDocumentation:https://tiff-stack-crop-tool.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.5 (2020-10-27)First release on PyPI.
Package: tifft
tifftTechnical Indicators for Financial TradingInstallation$pipinstall-UtifftDocker imageThe image is available atDocker Hub.$dockerimagepulldceoy/tifftUsageCalculator Classes for Pythonimportnumpyasnpfromtifft.bollingerbandsimportBollingerBandsCalculatorfromtifft.macdimportMacdCalculatorfromtifft.rsiimportRsiCalculatorprices=np.random.randn(100)*100# MACDmacdc=MacdCalculator(fast_ema_span=12,slow_ema_span=26,macd_ema_span=9)df_macd=macdc.calculate(values=prices)print(df_macd)# Bollinger Bandsbbc=BollingerBandsCalculator(window_size=20,sd_multiplier=2)df_bb=bbc.calculate(values=prices)print(df_bb)# RSIrsic=RsiCalculator(window_size=14,upper_line=70,lower_line=30)df_rsi=rsic.calculate(values=prices)print(df_rsi)Command-line ToolsFetch the historical data of DJIA, SP500, and NASDAQ100 from FRED (St. Louis Fed).$tiffthistoryDJIASP500NASDAQ100Fetch the data of SP500 from FRED and calculate the MACD.$tifftmacdSP500Fetch the data of SP500 from FRED and calculate the Bollinger Bands.$tifftbbSP500Fetch the data of SP500 from FRED and calculate the RSI.$tifftrsiSP500Runtifft --helpfor information.
Package: tiffutils
tiffutilsVarious TIFF utility functions.This module provide various functionality for working with TIFF files that
is not available in other modules.Currently, the primary functionality is the ability to load and save RAW
Bayer images to and from DNGs and Numpy ndarrays.Requirementspython-devThis is a Python C API module, so the Python headers are requiredPython 2 and Python 3 are supportedTested on Python 3.6+libtiff-dev > 4.0.3libtiff with support for CFA (color filter array) tags is requiredSupport is merged into the libtiff trunk, and will be released with
the version of libtiff following 4.0.3.A patch for libtiff 4.0.3 is included as libtiff-4.0.3.patchThe latest version can be downloaded from thelibtiff website.Building and installingFirst ensure that you have libtiff > 4.0.3.  If not, you need to configure,
build, and install a newer version.  The CVS trunk already includes the required
CFA tag support, so it can be used directly. Otherwise, download libtiff 4.0.3,
apply the included patch, and configure, build, and install libtiff.$ cd /path/to/libtiff
$ patch -p1 < /path/to/tiffutils/libtiff-4.0.3.patchOnce all dependencies are met, it is simple to build and install the module:$ python setup.py installOr, for Python 3:$ python3 setup.py installOf course, if the installation location requires root permissions,sudomay
be necessary.TestsThetest/directory contains module unit tests, which can be run with nose.
These tests are additionally dependent on GExiv2, for verifying image metadata.$ pip install nose
$ nosetests
Package: tiff-utils
tiff_utilsThis class is a simple way of working with tiff files## Importfrom`tiff_utilsimporttiff-During reads, all tags are collected and resolution is extracted in micronsby default, specifying a file name loads the image, tags and resolution information.myImage=`tiff(fileName.tif)print(myImage.shape)print(myImage.image.dtype)print(myImage.y_resolution,myImage.x_resolution)print(myImage.tags)loadImage=False can be specified when instantiating the class to load only tags and resolution information.myImage=tiff(fileName.tiff,loadImage=False)An image can be loaded manually by calling class method: .loadImage()myImage.loadImage()-During writes, the class.write() method will automatically:Determine if BigTiff is required (currently files >= 2GB)myImage.write() # Automatically determines whether BigTiff is required
myImage.write(bigTiff=True) # Force the writer to use BigTiffManage compression (currently defaults to 'zlib')myImage.write() # Defaults to zlib compression
myImage.write(compression=0) # No compressionManage tiled-tiff writes (currently defaults to (512,512))myImage.write()myImage.write(tile=None)myImage.write(tile=(1024,1024))​    CAUTION: be careful when calling .write() because it will overwrite the original image
​        if the file name was not changed.-Class methods enable easy:Replacement of image with a different np.array: .newImage(array)myImage=`tiff(fileName.tif)myImage.newImage(array=np.random.random((10,1024,1024),dtype=np.uint16))Assign a new file name: .newFileName(fileNameString)myImage.newFileName('/a/new/place/to/store/my/file.tif')Conversion of dtype:myImage.to8bit()myImage.to16bit()myImage.toFloat()myImage.toFloat32()myImage.toFloat64()myImage.toDtype(np.uint16)myImage.toDtype(np.uint8)myImage.toDtype(np.float)Assigning of new resolution in microns: .newResolution((yres,xres))myImage.newResolution((0.5,0.5))Resizing of image to a specified resolution in microns: .resizeImage((x_res,y_res)) or .resizeImage(int)myImage.resizeImage((25,25))#Resize to 25 microns y,xClone an image class: newClass = currentClass.clone(newFilePath=None, array=None, newResolutionMicrons=None)newImageClass = myImage.clone()
Package: tiflash
AnunofficialPython flash programmer forTexas Instruments
Launchpads.Read The DocsPlease see thereadthedocs pagefor the
most up to date documentation.Getting StartedTIFlash uses Texas Instruments’s Code Composer Studio scripting interface (Debug Server
Scripting)
to flash devices. It’s essentially a python/command line interface for
CCS. This is helpful when just needing to perform simple actions like
flashing, erasing or resetting a device without having to spin up an
entire CCS GUI session.Follow the steps below to get TIFlash set up on your computer.PrerequisitesYou will need to haveCode Composer
Studioinstalled along with drivers
for any devices you plan to use (offered during installation of CCS or
available in CCS’s Resource Explorer).You’ll also needPythoninstalled on your computer, either 2.7 or 3.6+ (preferred) will work.InstallingInstall TIFlash via PyPi (recommended)pip install tiflashInstall via git repo (used for development)git install https://github.com/webbcam/tiflash.git
cd tiflash
pip install -r requirements.txt
pip install -e .QuickstartTIFlash can be used via Python directly or using the commandline.Command LineInstalling TIFlash via pip will install the commandline application.From a command prompt:tiflash -h      # display help menu
tiflash -s L4000CE flash /path/to/image.hex -o ResetOnRestart TrueFor more commandline examples see theCLI docsPythonTIFlash can also be used directly in your Python scripts.import tiflash
tiflash.flash(serno='L4000CE', image='/path/to/image.hex', options={'ResetOnRestart':True})For more python examples see theAPI docsContributingPlease readCONTRIBUTING.rstfor details on the
process for submitting pull requests to us.VersioningFor the versions available, see thetags on this
repository.AuthorsCameron Webb-Initial work-webbcamSee also the list ofcontributorswho
participated in this project.LicenseThis project is licensed under the MIT License - see theLICENSEfile for detailsDisclaimerPlease see theDisclaimer.AcknowledgmentsDebug Server
Scripting
Package: tif-monitor-core
monitor core package####Deployment InstructionsThe deployment is now automated in Jenkins. The only difference is that in the setup.py you need to update the version
number.Once the changes have been made and the version number updated, committing to the master branch will trigger Jenkins to
build and save the changesthis urlMore details about the monitor can be found on theWIKI####Old Deployment InstructionsA PyPi package. To publish a new version:Create an account on pypi.org and ask Sam to add you to the project as a collaboratorInstall setuptools, wheel and twine - ** pip install --upgrade setuptools wheel twine **Increment the package version in setup.pyCreate package - ** python setup.py sdist bdist_wheel **Ensure that only your newly created package is in the dist directory (2 files). Delete any old packages.Upload package to pypi - ** twine upload dist/* **Run ** pip install --upgrade monitor-core ** to install the latest version in your project