Saravanan666/pypi-org huggingface dataset:
Package: scanpy
Scanpy – Single-Cell Analysis in PythonScanpy is a scalable toolkit for analyzing single-cell gene expression data
built jointly withanndata.  It includes
preprocessing, visualization, clustering, trajectory inference and differential
expression testing.  The Python-based implementation efficiently deals with
datasets of more than one million cells.Discuss usage on the scverseDiscourse. Read thedocumentation.
If you'd like to contribute by opening an issue or creating a pull request, please take a look at ourcontributing guide.
If Scanpy is useful for your research, consider citingGenome Biology (2018).
Package: scanpy-scripts
scanpy-scriptsA command-line interface for functions of the Scanpy suite, to facilitate flexible constrution of workflows, for example in Galaxy, Nextflow, Snakemake etc.InstallThe recommended way of using this package is through the latest container produced by Biocondahere. If you must, one can install scanpy-scripts via conda:condainstallscanpy-scriptspip installation is also possible, however the version of mnnpy is not patched as in the conda version, and so theintegratecommand will not work.pipinstallscanpy-scriptsFor development installation, we suggest following the github actions python-package.yml file.Currently, tests run on python 3.9, so those are the recommended versions if not installing via conda. BKNN doesn't currently install on Python 3.10 due to a skip in Bioconda.Test installationThere is an example script included:scanpy-scripts-tests.batsThis requires thebatstesting framework to run. The script downloadsa well-known test 10X datasetand executes all of the commands described below.CommandsAvailable commands are described below. Each has usage instructions available via--help, consult function documentation in scanpy for further details.Usage: scanpy-cli [OPTIONS] COMMAND [ARGS]...

  Command line interface to [scanpy](https://github.com/theislab/scanpy)

Options:
  --debug              Print debug information
  --verbosity INTEGER  Set scanpy verbosity
  --version            Show the version and exit.
  --help               Show this message and exit.

Commands:
  read       Read 10x data and save in specified format.
  filter     Filter data based on specified conditions.
  norm       Normalise data per cell.
  hvg        Find highly variable genes.
  scale      Scale data per gene.
  regress    Regress-out observation variables.
  pca        Dimensionality reduction by PCA.
  neighbor   Compute a neighbourhood graph of observations.
  embed      Embed cells into two-dimensional space.
  cluster    Cluster cells into sub-populations.
  diffexp    Find markers for each clusters.
  paga       Trajectory inference by abstract graph analysis.
  dpt        Calculate diffusion pseudotime relative to the root cells.
  integrate  Integrate cells from different experimental batches.
  multiplet  Execute methods for multiplet removal.
  plot       Visualise data.VersioningMajor and major versions will follow the scanpy versions. The first digit of the patch should follow the scanpy patch version as well, subsequent digits in the patch are reserved for changes in this repository.
Package: scanpy-utils
Utility functions forscanpyFree software: MIT licenseInstallationpip install scanpy-utilsDocumentationSeehttps://scanpy-utils.readthedocs.io/en/latest/reference/index.htmlDevelopmentTo run all the tests run:toxNote, to combine the coverage data from all the tox environments run:Windowsset PYTEST_ADDOPTS=--cov-append
toxOtherPYTEST_ADDOPTS=--cov-append toxChangelog0.1.1 (2021-08-11)Fixget_markersfunction to addpct.1andpct.2columns even if no markers were
found.0.1 (2021-06-24) Initial releaseget_markersfunction to extract markers from adata and addpct.1,pct.2fieldswrite_mtxfunction to dump adata in cellranger mtx formatclean_metadatafunction to merge and remove duplicates fromadata.varafter mergingPlotting:feature_plotfunction to plot hexbin feature plot on UMAPplot_compositionfunction to plot composition of clusters based on other metadataexpr_colormapfunction with custom colormap for expression
Package: scanRBP
What is scanRBP?scanRBP loads RNA-protein binding motif PWM and computes the log-odds scores for all the loaded RBPs across a given genomic sequence + draws a heatmap of the scores.The scores can be described as follows (biopython docs):Here we can see positive values for symbols more frequent in the motif than in the background and negative for symbols more frequent in the background. 0.0 means that it's equally likely to see a symbol in the background and in the motif.Using the background distribution and PWM with pseudo-counts added, it's easy to compute the log-odds ratios, telling us what are the log odds of a particular symbol to be coming from a motif against the background.For more information, see thebiopython docs.InstallationThe easiest way to install scanRBP is to simply run:$ pip install scanRBPQuick StartSuper quick example:# taking a random sequence, will produce binding scores and a heatmap
# output: example1_PWM.tab # file with log-odds vectors for all proteins for the given command line sequence
# output: example1.png/pdf # heatmap image with clustering of protein binding vectors
./scanRBP AAAGCGGCGACTTATTATATCCCCATATATTATATCTTCTTCTCTTATATATAAACCAGAGATAGATGTGTGTGGTGG example1 -heatmap example1

# instead of taking one single sequence, the input can be a fasta file with multiple sequences
./scanRBP data.fastaDocumentationPDF reference manualGoogle docsof the above PDF (comment if you like)Change logv0.1.7: November 2023added mCross and CISBP-RNA motifs
Package: scanreports
This module contains some parser classes and utility scripts for network
security scan report file processing and review.Supported formats are:NMAP xml reportsNessus xml reports (v2)MBSA xml reports… and others.The example scripts are in the bin directory and are installed automatically.This module is under quite heavy development and changes. Please report any
regressions or new bugs tohile@iki.fi, I’ll try to stabilize the code base
in 2.x series, first release was just a quick’n’dirty version.
Package: scansort
ScansortScansorthelps to collate and rename book scan imagesInstallationpip install scansortSynopsisscansort [-h] [-v]
         -odd ODD -even EVEN [-missing MISSING]
         [-action {move,copy}] [-o OUTPUT] workdirDesctiptionWhen using a book-edge scanner (such as Plustek OpticBook), it is handy
to scan two sides of a book separately. This way you do not need to
rotate the book to scan the next page. Scanned images from different
sides normally make their way into separate directories.Scansorthelps one to collate these directories and rename images
accodring to the actual page numbers.The utility assumes that:The collection of images covers a monotonically increasing range of
page numbers (with known missing numbers possible). This implies
that front-, body-, and (possibly) back-matter must be scanned and
processed separately.Even- and odd-numbered pages are put into separate directories.Also, see anexampleof the indented workflow.Optionsworkdirargument defines a working directory relative to which all
other directory names and paths are interpreted. By default the current
directory is used.All page numbers must correspond to the actual "physical" page numbering
in the book.-odd, -evendirectory name/pathSource directories with scanned images of odd- and even-numbered pages.-missingnum[,num]*Comma-separated list of page numbers missing in the source directories
(either accidentally skipped during scanning or not present at all).-action{move,copy}Whether to preserve or delete the original images from the source
directories. Defaults tocopy.-odirectory name/pathOutput directory for renamed scanned images. Defaults tooutand will
be created automatically if does not exist.-h, --helpShow a help message and exit.-v, --versionShow a version information and exit.ExampleAfter scanning a book I am normally left with something like this:$ tree ./book
./book
├── lside
│   ├── scan0001.tiff
│   ├── scan0002.tiff
│     ...
└── rside
    ├── scan0001.tiff
    ├── scan0002.tiff
      ...

2 directories, 198 fileswherersidecontains even-numbered pages. Suppose I skimmed through
the directories and realised I missed two pages: 2 and 6.Then I runscansortto collate the directories:$ scansort -odd lside -even rside -missing 2,6 ./bookThe utility opens an editor to review the result:# Please review the correspondence between files and book pages
'./book/lside/scan0001.tiff':   1
'./book/lside/scan0002.tiff':   3
'./book/rside/scan0001.tiff':   4
'./book/lside/scan0003.tiff':   5
'./book/lside/scan0004.tiff':   7
'./book/rside/scan0002.tiff':   8
...I can edit the page numbers right away or remove all lines to cancel the
operation (e.g. if it turns out there are more pages missing). Then I
save and close the editor and the pages are collated:$ tree ./book/out
./book/out
├── scan0001.tif
├── scan0003.tif
├── scan0004.tif
├── scan0005.tif
├── scan0007.tif
    ...
└── scan0200.tif

0 directories, 198 filesNote that the missing page number are omitted. I can then scan those
separately and put in place.
Package: scanspec
scanspecSpecify step and flyscan paths in a serializable, efficient and Pythonic way using combinations of:Specs like Line or SpiralOptionally SnakingZip, Product and Concat to composeMasks with multiple Regions to restrictSerialize the Spec rather than the expanded Path and reconstruct it on the
server. It can them be iterated over like acycler, or a stack of scan Frames
can be produced and expanded Paths created to consume chunk by chunk.Sourcehttps://github.com/dls-controls/scanspecPyPIpip install scanspecDocumentationhttps://dls-controls.github.io/scanspecReleaseshttps://github.com/dls-controls/scanspec/releasesAn example ScanSpec of a 2D snaked grid flyscan inside a circle spending 0.4s at
each point:fromscanspec.specsimportLine,flyfromscanspec.regionsimportCirclegrid=Line(y,2.1,3.8,12)*~Line(x,0.5,1.5,10)spec=fly(grid,0.4)&Circle(x,y,1.0,2.8,radius=0.5)Which when plotted looks like:Scan points can be iterated through directly for convenience:forpointinspec.midpoints():print(point)# ...# {'y': 3.1818181818181817, 'x': 0.8333333333333333, 'DURATION': 0.4}# {'y': 3.1818181818181817, 'x': 0.7222222222222222, 'DURATION': 0.4}or a Path created from the stack of Frames and chunks of a given length
consumed from it for performance:fromscanspec.coreimportPathstack=spec.calculate()len(stack[0])# 44stack[0].axes()# ['y', 'x', 'DURATION']path=Path(stack,start=5,num=30)chunk=path.consume(10)chunk.midpoints# {'x': <ndarray len=10>, 'y': <ndarray len=10>, 'DURATION': <ndarray len=10>}chunk.upper# bounds are same dimensionality as positionsSeehttps://dls-controls.github.io/scanspecfor more detailed documentation.
Package: scan-tagger
scan-taggerA helper script for applying metadata fromExif Notesto scans.IntroductionExif Notes is a great way to track your film shots and apply that metadata to
the digitized files.  However, I always need to do some manipulation of the
scripts it produces before I can actually run them.scan-taggeris a tool to
help automate those changes.InstallationComing soon!UsageIn its simplest form, you can just runscan-taggeragainst your Exif Notes
script and provide a starting filename:[$]> scan-tagger Arista.EDU\ ULTRA\ 100_ExifToolCmds.txt 000010460001.jpgThis will perform a few basic adjustments on the file, and then update the
filenames to000010460001.jpg,000010460002.jpg, etc.For more advanced usage, pass the-ioption to enter interactive mode.  This
provides a small line-by-line interface modelled aftergit add -pthat allows
more control over the process.
Package: scantechstackvulns
Get Technology Stack VulnerabilitiesThis package is useful for fetching known vulnerabilities of third party components used in projects fromNVDsite.Getting StartedUsing get-techstack-vulnerabilities takes almost no time! Simply install via the pip command:pip install scantechstackvulnsFrom here you can import it into your source file by calling:from scantechstackvulns import TechStackHow it worksIt takes list of thirdparty components with versions as a input and generates an excel file of known vulnerabilities of that list of components.UsageThe below is the way to use of this packagefrom scantechstackvulns import TechStack

technology_stack = [
    "postgresql 11.11",                     #|
    "spring framework vmware 4.3.25",       #| 
    "spring framework pivotal 4.3.25",      #|----- sample data
    "apache tomcat 9.0.58",                 #|
    "oracle jdk 1.8.0 update 252"           #|
]

output_file = "directory/file_name.xlsx"

TechStack.scan(techstack, output_file)Notetechnology stack must contain exact versionas of now only xlsx extension supports in output filehereis the sample xlsx file to verifyLicenseThis repository is licensed under theMITlicense.
SeeLICENSEfor details.
Package: scantree
scantreeRecursive directory iterator supporting:flexible filtering including wildcard path matchingin memory representation of file-tree (for repeated access)efficient access to directory entry properties (posix.DirEntryinterface) extended with real path and path relative to the recursion root directorydetection and handling of cyclic symlinksInstallationpip install scantreeUsageSee source code for full documentation, some generic examples below.Get matching file paths:fromscantreeimportscantree,RecursionFiltertree=scantree('/path/to/dir',RecursionFilter(match=['*.txt']))print([path.relativeforpathintree.filepaths()])print([path.realforpathintree.filepaths()])['d1/d2/file3.txt', 'd1/file2.txt', 'file1.txt']   
['/path/to/other_dir/file3.txt', '/path/to/dir/d1/file2.txt', '/path/to/dir/file1.txt']Access metadata of directory entries in file tree:d2=tree.directories[0].directories[0]print(type(d2))print(d2.path.absolute)print(d2.path.real)print(d2.path.is_symlink())print(d2.files[0].relative)scantree._node.DirNode
/path/to/dir/d1/d2
/path/to/other_dir
True
d1/d2/file3.txtAggregate information by operating on tree:hello_count=tree.apply(file_apply=lambdapath:sum([w.lower()=='hello'forwinpath.as_pathlib().read_text().split()]),dir_apply=lambdadir_:sum(dir_.entries),)print(hello_count)3hello_count_tree=tree.apply(file_apply=lambdapath:{'name':path.name,'count':sum([w.lower()=='hello'forwinpath.as_pathlib().read_text().split()])},dir_apply=lambdadir_:{'name':dir_.path.name,'count':sum(e['count']foreindir_.entries),'sub_counts':[eforeindir_.entries]},)frompprintimportpprintpprint(hello_count_tree){'count': 3,
 'name': 'dir',
 'sub_counts': [{'count': 2, 'name': 'file1.txt'},
                {'count': 1,
                 'name': 'd1',
                 'sub_counts': [{'count': 1, 'name': 'file2.txt'},
                                {'count': 0,
                                 'name': 'd2',
                                 'sub_counts': [{'count': 0,
                                                 'name': 'file3.txt'}]}]}]}Flexible filtering:without_hidden_files=scantree('.',RecursionFilter(match=['*','!.*']))without_palindrome_linked_dirs=scantree('.',lambdapaths:[pforpinpathsifnot(p.is_dir()andp.is_symlink()andp.name==p.name[::-1])])Comparison:tree=scandir('path/to/dir')# make some operations on filesystem, make sure file tree is the same:asserttree==scandir('path/to/dir')# tree contains absolute/real path info:importshutilshutil.copytree('path/to/dir','path/to/other_dir')new_tree=scandir('path/to/other_dir')asserttree!=new_treeassert([p.relativeforpintree.leafpaths()]==[p.relativeforpinnew_tree.leafpaths()])Inspect symlinks:fromscantreeimportCyclicLinkedDirfile_links=[]dir_links=[]cyclic_links=[]deffile_apply(path):ifpath.is_symlink():file_links.append(path)defdir_apply(dir_node):ifdir_node.path.is_symlink():dir_links.append(dir_node.path)ifisinstance(dir_node,CyclicLinkedDir):cyclic_links.append((dir_node.path,dir_node.target_path))scantree('.',file_apply=file_apply,dir_apply=dir_apply)
Package: scanwalk
scanwalkscanwalk.walk()walks a directory tree, generatingDirEntryobjects.
It's an alternative toos.walk()modelled onos.scandir().>>>importscanwalk>>>forentryinscanwalk.walk('demo'):...print('📁'ifentry.is_dir()else'📄',entry.path)...📁 demo📁 demo/dir2📁 demo/dir1📁 demo/dir1/dir1.1📄 demo/dir1/dir1.1/file_a📄 demo/dir1/file_c📁 demo/dir1/dir1.2📄 demo/dir1/dir1.2/file_ba rough equivalent usingos.walk()would be>>>importos>>>forparent,dirnames,filenamesinos.walk('demo'):...print('📁',parent)...fornameinfilenames:...print('📄',os.path.join(parent,name))...📁 demo📁 demo/dir2📁 demo/dir1📄 demo/dir1/file_c📁 demo/dir1/dir1.1📄 demo/dir1/dir1.1/file_a📁 demo/dir1/dir1.2📄 demo/dir1/dir1.2/file_bto skip the contents of a directory set theDireEntry.skipattribute>>>importscanwalk>>>forentryinscanwalk.walk('demo'):...ifentry.name=='dir1.1':...entry.skip=True...else:...print(entry.path)...demodemo/dir2demo/dir1demo/dir1/file_cdemo/dir1/dir1.2demo/dir1/dir1.2/file_bComparisonos.walk()scanwalk.walk()Yields(dirpath, dirnames, filenames)DirEntryobjectsConsumersNestedforloopsFlatforloop, list comprehension, or generator expressionGroupingDirectories & files seperatedDirectories & files intermingledTraversalDepth first or breadth firstSemi depth first, directories traversed on arrivalExceptionsonerror()callbacktry/exceptblockAllocationsBuilds intermediate listsDirect fromos.scandir()MaturityMatureAlphaTestsThorough automated unit testsNonePerformance1.0x1.1 - 1.2x fasterInstallationpython-mpipinstallscanwalkRequirementsPython 3.7+LicenseMITQuestions and AnswersWhat's wrong withos.walk()?os.walk()is plenty good enough, it's just an awkward return type to use
inside a list comprehension, a generator expression, or similar.Why usescanwalk?scanwalk.walk()eeks out a little more speed (10-20% in an adhoc benchmark).
It doesn't require nested for loops, so code is a bit easier to read and write.
In particular list comprehensions  and generator expressions become simpler.Why not usescanwalk?scanwalkis still alpha, mostly untested, and almost entirely undocumented.
It only supports newer Pythons, on platforms with a workingos.scandir().scanwalk.walk()behaviour differs fromos.walk()directories and files are intermingled, rather than seperatedTraversal is always semi depth-firstRelated workscandir- backport ofos.scandir()for Python 2.7 and 3.4TODOImplement context manager protocol, similar toos.scandir()DocumentationTestsContinuous IntegrationCoverageCode quality checks (MyPy, flake8, etc.)scanwalk.copytree()?scanwalk.DirEntry.depth?Linux io_uring support?
Package: scap4chan
IntroductionA 4chan scraper to scrap partiular board's all its contents and store into a folder. It can also scrap all the images from a particular thread.RequirementsTQDMRequestsBASC-py4chanInstallationpip install scap4chanUsagefromscap4chanimportscrape4chan_boardscrape4chan_board('pol',num_threads=10,debug=False)
Package: scape
Scape is a python framework using several class to describe the behavior of a equipment based on raspberry pi,
intended to simplify the design and development in raspberry pi.Quick startInstall scapepip install scapeCreate a projectpython -m scape init <project name>Start projectcd <project name>
python main.py runThe project should print the following words to the screen(the order of words may differ).hello
from scape
Package: scape-academy
Scrape AcademyScrape Academy provides a framework and an utility helps you to develop web scraping applications.Simple web page  scrapingScrape Academy helps you to download web pages to scrape.# Download a page from https://www.python.jpfrombs4importBeautifulSoupfromscrapeacademyimportcontext,runasyncdefrun_simple():page=awaitcontext.get("https://www.python.jp")soup=BeautifulSoup(page,features="html.parser")print(soup.title.text)run(run_simple())scrapeacademy.run()startsasyncioevent loop and run a scraping function.In the async function, you can usecontext.get()method to download the page. Thecontext.get()throttle the requests to the server. By default,context.get()waits 0.1 seconds between requests.Cache downloaded filesWhile developping the scraper, you usually need to investigate the HTML over and over. To help investigations, you can save the downloaded files to the cache directory.Thecontext.get()method saves downloaded file to the cache directory ifnameparameter is supplied.# Save https://www.python.jpfromscrapeacademyimportcontext,runasyncdefsave_index():page=awaitcontext.get("https://www.python.jp",name="python_jp_index")run(run_simple())Later, you can load the saved HTML from the cache to scrape using another script.# Parse saved HTML file.fromscrapeacademyimportcontexthtml=context.load("python_jp_index")soup=BeautifulSoup(page,features="html.parser")print(soup.title.text)Command line utilityScrape Academy provides thescrapeacademycommand to make development easier.You can inspect the cached files with web browser.$scrapeacademyopenpython_jp_indexOr, you can view the file with vi editor as follow.$vi`scrapeacademypathpython_jp_index`
Package: scape-apa
conda config --append channels bioconda
conda config --append channels conda-forge
conda create -n test_conda python=3.9
conda activate test_condaconda install pip
conda install -c bioconda bedtools
pip install taichi
pip install .scape --help
scape gen_utr_annotation --helppython -m scape --help
python -m scape gen_utr_annotation --help
Package: scapegoat_mod
A pure python scapegoat splay tree class is provided.  It is
thoroughly unit tested, passes pylint, and is known
to run on CPython 2.x, CPython 3.x, Pypy 2.2 and
Jython 2.7b2.This scapegoat tree looks like a dictionary that’s always
sorted by key.  It also reorganizes itself on every
put.Perhaps the most interesting thing about a scapegoat tree,
is it is balanced even for ordered keys, without any storage
overhead (unlike treaps and red-black trees).
Package: scapr
scaprScreen Capture in PythonA script that uses Pillow's ImageGrab to capture screenshots.Usageusage:scapr[-h][--auto][--secondsSLEEP_SEC][--countSTOP_COUNT][--folderOUTPUT_DIR][--regionREGION_BOX][--flat]Command-lineutilitytocapturescreenshots.

options:-h,--helpshowthishelpmessageandexit--autoDonotprompttostartcapturingscreenshots.Beginrightaway.--secondsSLEEP_SECNumberofsecondstopausebetweenscreenshots.--countSTOP_COUNTNumberofscreenshotstotakebeforestopping.--folderOUTPUT_DIRNameoffolderforsavingcapturedscreenshots.--regionREGION_BOXRegiontocapture(insteadoffullscreen).Specifyboxcoordinates,separatedbycommas(nospacesbetween),as'x1,y1,x2,y2'wherex1andy1aretheleft-toppixelcoordinates,andx2andy2aretheright-bottompixelcoordinates.Example:'--region 100,100,600,600'tocapturea500x500imagestartingat100pixelsfromtopandleft.--flatDonotcreateasub-folderforeachcapturesession(a'flat'outputfolderstructure).ReferencePillowPillow -ImageGrabPython -KeyboardInterrupt
Package: scapula-predict
Scapula Predict这是一个用于RTSA术式术前辅助设计的包。它提供了关节盂平面确定、入钉位置计算两个功能。这两个功能通过如下步骤实现：读入3D模型文件。importscapula_predicts=scapula_predict.scapula('2.ply')选择关节盂平面并计算圆心。s.select_points()s.computer_circle()将圆心移动至O点，并计算平面法向量。s.move_center_to_O()s.find_vector()计算最合适的钉子位置s.find_nail()print(s.location)计算导板面的模式s.find_guide()我们同时提供了一个模型可视化的代码，它通过传递一个包含需要可视化模型的列表实现。s.show([s.mesh,s.cylinder,s.guide_mesh])