Saravanan666/pypi-org huggingface dataset:
Package: samba-metric
SAMBA (Smoothed imAge MicroBiome distAnce)This code is attached to the paper "SAMBA: A Novel Smoothed Image-Based Metric for Microbial Sequencing Data Analysis".
SAMBA is a novel microbial metric. SAMBA utilizes the iMic method to transform microbial data into images, incorporating phylogenetic structure and abundance similarity.
This image-based representation enhances data visualization and analysis. Moreover, SAMBA employs a fast Fourier transform (FFT) with adjustable thresholding to smooth the images,
reducing noise and accentuating meaningful information. Various distance metrics, such as SAM and MSE, can be applied to the processed images.How to apply SAMBASAMBA's code is available at thisGitHubas well asPyPi.SAMBA's GitHubThere is an example in example_use.py.
You should follow the following steps:Load the raw ASVs table in the following format: the first column is named "ID",
each row represents a sample and each column represents an ASV. The last row
contains the taxonomy information, named "taxonomy".df = pd.read_csv("example_data/for_preprocess.csv")Apply the MIPMLP with the defaulting parameters (seeMIPMLPfor more explanations).processed = MIPMLP.preprocess(df)micro2matrix (translate microbiome into matrix according toiMic, and save the images in a prepared folderfolder = "example_data/2D_images"
 micro2matrix(processed, folder, save=True)Calculate the distance matrix according to SAMBA
One can choose the FFT cutoff (in the range of [0,1]), and the final metric (one of "sam","mse","d1","d2","d3").DM = build_SAMBA_distance_matrix(folder,cutoff=CUTOFF,metric=METRIC)If a tag table is available. One can load the tag file and visualize the data according to the SAMBA metric by the plot_umap function.
"example_data" is the folder path for saving.tag = pd.read_csv("example_data/tag.csv",index_col=0)
plot_umap(DM,tag,"example_data")SAMBA's PyPiInstall the SAMBA packagepip install samba-metricApply the MIPMLP with the default parametersprocessed = MIPMLP.preprocess(df)or -  load a MIPMLP processed data directly.processed = pd.read_csv("example_data.csv",index_col=0)Apply SAMBA on a MIPMLP processed data:from samba import *
# If the tag is available
tag = pd.read_csv("example_data/tag.csv",index_col=0)

folder = "FOLDER_NAME"
array_of_imgs,bact_names, ordered_df = micro2matrix(processed, folder, save=False)

# Calculate the distance matrix according to SAMBA
DM = build_SAMBA_distance_matrix(folder,imgs=array_of_imgs,ordered_df=ordered_df)
DM.to_csv(f"{folder}/samba_dists.csv")If a tag table is available. One can load the tag file and visualize the data according to the SAMBA metric by the plot_umap function.
"example_data" is the folder path for saving.tag = pd.read_csv("example_data/tag.csv",index_col=0)
plot_umap(DM,tag,"example_data")
Package: samba-sampler
SAMBA - Sampling Algorithms with Matrix-Based Weight AllocationSAMBA is a Python package providing sampling methods via matrix-based distance measures to mitigate autocorrelation.Installation and UsageThe package can be installed via pip:$pipinstallsamba_samplerDetailed information on the usage of the package can be found in thedocumentation.
For a quick start, the following example shows how to use the package:importsamba_samplerassambasampler=samba.LanguageSampler()# Default parametersprint(sampler.sample(5))ChangelogVersion 0.3.2 (2023-07-18)Added taxa filtering, applying to the Glottolog dataVersion 0.3.1 (2023-07-17)Added first version of the walking distance matrix derived from Guzman Naranjo & Jäger (2023).Version 0.3 (2023-07-13)Initial release, following on thearcaverborumproject.Community GuidelinesWhile the author can be contacted directly for support, it is recommended that third parties use GitHub standard features, such as issues and pull requests, to contribute, report problems, or seek support.Contributing guidelines, including a code of conduct, can be found in the CONTRIBUTING.md file.Author, Citation, and AcknowledgementsThe library is developed by Tiago Tresoldi (tiago@tresoldi.org).The library is developed in the context of the Cultural Evolution of Texts project, with funding from the Riksbankens Jubileumsfond (grant agreement ID: MXM19-1087:1).If you usesamba_sampler, please cite it as:Tresoldi, Tiago (2023). SAMBA (Sampling Algorithms with Matrix-Based Weight Allocation): a Python package providing sampling methods via matrix-based distance measures to mitigate autocorrelation. Version 0.3. Uppsala: Uppsala University.In BibTeX:@misc{Tresoldi2023samba,author={Tresoldi, Tiago},title={SAMBA (Sampling Algorithms with Matrix-Based Weight Allocation): a Python package providing sampling methods via matrix-based distance measures to mitigate autocorrelation. Version 0.3.},howpublished={\url{https://github.com/tresoldi/samba_sampler}},address={Uppsala},published={Upssala University},year={2023}}
Package: sambuca-core
for Bathymetry, Un-mixing, and Concentration Assessment (SAMBUCA).Home-page: https://github.com/csiro-aquatic-remote-sensing/sambuca_coreAuthor: Daniel CollinsAuthor-email: daniel.collins@csiro.auLicense: CSIRO Open Source Software Licence AgreementDescription: .. image:: https://travis-ci.org/csiro-aquatic-remote-sensing/sambuca_core.svg:target: https://travis-ci.org/csiro-aquatic-remote-sensing/sambuca_core:alt: Build Status.. image:: https://readthedocs.org/projects/sambuca-core/badge/?version=latest:target: https://sambuca-core.readthedocs.io/en/latest/?badge=latest:alt: Documentation Status* **Free software:** CSIRO Open Source Software Licence Agreement* **Homepage:** https://github.com/csiro-aquatic-remote-sensing/sambuca_core* **Documentation:** https://sambuca-core.readthedocs.io/en/latest/* **Version:** 1.3.3Contains the core model components for the Semi-Analytical Modelfor Bathymetry, Un-mixing, and Concentration Assessment (SAMBUCA).Installation------------::pip install sambuca_coreFor everything else, please refer to the`project documentation <https://sambuca-core.readthedocs.io/en/latest/>`_.Keywords: Hydrology Modeling BathymetryPlatform: anyClassifier: Development Status :: 3 - AlphaClassifier: Intended Audience :: ScientistsClassifier: Topic :: Hydrology :: Water QualityClassifier: License :: OSI Approved :: MIT LicenseClassifier: Programming Language :: Python :: 2.7Classifier: Programming Language :: Python :: 3.5Classifier: Programming Language :: Python :: 3.6Provides-Extra: devProvides-Extra: test
Package: samclipdiffusion
SAM + CLIP + DIFFUSIONStuff about this pipeline was a bit harder to run and follow, I wanted to write a simple package to allow people to use it with a higher level of abstraction. Based on the repos on the citation part.InstallationpipinstallsamclipdiffusionUsage!wgethttps://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pthfromsamclipdiffusionimportImageSegmentersegmenter_inp=ImageSegmenter()image_path='image_path'search_text="target object"prompt="how to modify"inpainted_image=segmenter_inp.inpaint_image(image_path,search_text,prompt)ExamplesExampleswith and w/o installing the package.CitationThis repository is based on the following repos, I just merged them together and made some changes to make it work.https://github.com/IDEA-Research/Grounded-Segment-Anything/blob/main/grounded_sam.ipynbhttps://github.com/maxi-w/CLIP-SAM/blob/main/main.ipynbTODOAdd more examplesOptimize, make it memory efficient, it's awful right nowAdd better images to the examples :D
Package: sam-cpp-python
Python Bindings forsam.cppInstallationFrom pypipipinstallsam_cpp_pythonFrom sourcegitclonehttps://github.com/neka-nat/sam-cpp-python.gitcdsam-cpp-python
pipinstall.Exampleimportcv2importnumpyasnpimportsam_cppimage=cv2.imread("img.jpg")image=cv2.cvtColor(image,cv2.COLOR_BGR2RGB)predictor=sam_cpp.create_sam_predictor()predictor.set_image(image)masks=predictor.predict(np.array([10,10],dtype=np.float32))print(masks)Result
Package: same
# samesame api client## Install```bashpip3 install same```## UsageIn a terminal:1. get help```bashsame -h             # get help and available module, method, propertysame -h use         # get help for `use` apisame -h sense       # get help for `sense` modulesame -h sense like  # get help for `sense.like` method```2. login: most api need to authorization, so, you should login at first```bashsame login MOBILE PASSWORD [EMAIL]  # use mobile or email to loginsame use SECRET                     # use token directly```## LICENSEMIT
Package: sameh-stirling
sameh_stirlingThesameh_stirlingmodule contains functions for creating interactive Dash charts.Installationpip install sameh-stirlingUsageThe module contains two chart functions:stacked_barCreates an interactive stacked bar chart using Plotly Dash.fromsameh_stirling.stacked_barimportstacked_barimportpandasaspddata=pd.DataFrame({"name":["Ashley","Ashley","Ashley","Patricia","Patricia","Patricia","Betty","Betty","Betty","Helen","Helen","Helen"],"year":[1920,1960,2000,1920,1960,2000,1920,1960,2000,1920,1960,2000],"n":[2089,17503,17997,6199,47952,7453,22877,11378,880,70621,40471,6909]})stacked_bar(data,layout_kwargs={},px_kwargs={})data(DataFrame): DataFrame containing the datalayout_kwargs(dict): Keyword arguments passed toplotly.layout- optionalpx_kwargs(dict): Keyword arguments passed toplotly.express-optionalbubble_chartCreates an interactive bubble chart using Plotly Dash.fromsameh_stirling.bubble_chartimportbubble_chartimportplotly.expressaspxdata=px.data.gapminder()bubble_chart(data,layout_kwargs={},px_kwargs={})data(DataFrame): DataFrame containing the datalayout_kwargs(dict): Keyword arguments passed toplotly.layout- optionalpx_kwargs(dict): Keyword arguments passed toplotly.express-optionalBoth functions return a Dash app that can be run withapp.run_server().The charts allow selecting dimensions, customizing the font, and passing keyword arguments toplotly.expressandplotly.layoutto customize the appearance.See the source code for more details on usage and customization options.ContributingContributions to add more charts are welcome! Please open an issue or PR.LicenseMIT
Package: samep
インストールwin:
py -3 -m pip install samep
linux:
python3.8 -m pip install samep追加項目メインファイル#main.pyfromdiscord.extimportcommandsascfromdiscordimportIntentsfromasyncpgwimportstartimportasyncioclassMain(c.Bot):def__init__(self):super().__init__(command_prefix='!',description='this is bot',intents=Intents.all())self.tables=[]asyncdefps_connect(self):"postgresqlに接続"self.pool=awaitstart.connect('postgres://username:password@/dbname')asyncdefadd_table(self,table):"""postgtesqlに作成するテーブルを追加する"""iftablenotinself.tables:self.tables.append(table)asyncdefon_ready(self):print('起動しました。')self.load_extension('samep.extension')fortableinself.tables:awaitstart.create(self.pool,table)asyncdefstart(self):awaitsuper().start('bot token')defmain(self):loop=asyncio.get_event_loop()loop.run_until_complete(self.ps_connect())loop.run_until_complete(self.start())loop.close()if__name__=='__main__':bot=Main()bot.main()
Package: samepack
SamepackA javascript bundler that tries to keep the output bundle similar to the source code.Setuppipinstallsamepack-UUsagesame-obundle.jstests/sample/index.jsSeetests/sample/index.jsfor an example of how js code is to be written.OtherThis cannot pull packages from npm yet.This should not be used for serious web apps, it should be used for extensions (to boost review times) and education only.
Package: same-stats
Same Stats Different GraphsA Python tool to create datasets whose graphs are different from one another but their statistics are the same. This is a modified version of the code provided atAutodesk.This library makes it easy for you to turn one shape to another and create GIFs for this transformation on the command line.InstallationTo install the package, type:pipinstallsame-statsUsageTo turn a dinosaur shape into a bull eye shape, type:python-msame_stats--shape_start=dino--shape_end=bullseyeAnd a GIF like below will be saved to thegifsdirectory asdino_bullseye.gif:Argument options:--shape_start: Shape start.
Options:dino,rando,slant,big_slant--shape_end: Target shape.
Options:x,h_lines,v_lines,wide_lines,high_lines,slant_up,slant_down,center,star,down_parab,circle,bullseye,dots--iters: Number of iteration--decimals: Number of decimals--frames: Number of frames
Package: samesyslib
Common functions for Data ScienceCommon libs used by SameSystem Data Science team.Example Usage# /opt/settings/config.ymldatabase:user:'root'# ----frompathlibimportPathfromsamesyslib.utilsimportload_configconfig_path=Path("/opt/settings/config.yml")conf=load_config(config_path)conf['database']['user']# orfromsamesyslib.dbimportDBfromsamesyslib.db_configimportDBConfigdb=DB(DBConfig().get_config())InstallThe latest stable version can always be installed or updated via pip:pipinstallsamesyslibTest Coveragepipinstallpytest-cov
python-mpytest--cov=samesyslibtestsUpdatingAfter editing the functions, increment package version number insetup.pybefore pushing to master, so that pypi package can be automatically build. To update installed package:pipinstallsamesyslib--upgradeDevelopment VersionThe latest development version can be installed directly from GitHub:pipinstallgit+https://github.com/samesystem-ds/samesyslib.gitLicenseCode and documentation are available according to the MIT License
(seeLICENSE).
Package: sa-metameta
sa-metametaMeta information of SQLAlchemy metadata by enginePurposeThis module is designed to have a top-level class instance to which SQLAlchemyEngineinstances can be registered as aMetaEngine. EachMetaEnginecan then be probed directly to retrieve all tables by user schema. Thus an application can reference multiple databases and use the reflectedTableinstances to create queries for each.This module has classes that will probe a RDBMS that supports theinformation_schema.schemaview to get table information for each schema in a database. Currently, only PostgreSQL is fully supported.This module will supportpsycopg2andasyncpg.This module requiresSQLAlchemy>= v1.4 for database probing andTableclass creation.This module currently supports only table object creation.OverviewAfter instantiating the MetaMeta class, an engine can be registered. Once that is done, the database can be probed for tables. Once that has completed successfully, the tables can be referenced starting from the MetaMeta instance to the engine, to the schema, and then to the table.Example:importsqlalchemyassafromsa_metametaimportmetaengine=sa.create_engine("postgresql://postgres:pg_passwd@localhost:5432/my_database")mm=meta.MetaMeta()# This will use the database name from the URL as the attribute namemm.register_engine(engine)# This will probe all schemata in my_database and for each schema, the tables will be reflected.mm.my_database.discover()# now we can see what tables have been found by using list()list(mm.my_database.public)["table1","table2",...]The engine, schema, and table can be referenced by dot or subscript notation:engine=mm["my_database"]schema=mm["my_database"]["public"]table1=mm["my_database"]["public"]["table1"]# orengine=mm.my_databaseschema=mm.my_database.publictable1=mm.my_database.public.table1To reference columns, use the Table().c.column syntax.query=sa.select(table1.c.label).filter(table1.c.quatloos>200)db=engine.session()res=db.execute(query).all()The engine can be exported as yaml or ddl. This will write a.yamlor a.sqlfile depending on the method called.mm.my_database.as_yaml()# "my_database.yaml"mm.my_database.as_ddl()# "my_database.sql"
Package: sameWidther
sameWidtherscript that accepts OTF/TTF/UFO files and gets you random words of the same width, nice for specimens.installinginstall this package via pippython -m pip install sameWidtherinstall directly from cloned repo, navigate to the repo in your terminalpython setup.py installusageyou can use it as commandline toolsameWidther Desktop/sameWidth/font.ufo ENG 4000 10or directly in your python scriptfrom sameWidther import SameWidther, TTFont, Font
# font = SameWidther(Font('font.ufo'), 'ENG')
font = SameWidther(TTFont('font.otf'), 'GER')
print(font.getWords(3000, 10, case='upper'))argumentspositionalfont - path to OTF/TTF/UFO file that you want to uselanguage - three letter code of language that you want to have the words in, ENG/GER available. Or provide existing path to a database in json format of such structure["word", "house", "word2", ...]width - width of the wordswordCount - number of words that you needoptional - keyword argumentsthreshold - (default: 10) how much in width can the words differcase - (default: lower) do you want to lower, upper or capitalize the case of the words?word databases[ENG] Englishhttps://github.com/dwyl/english-words[GER] Germanhttps://github.com/creativecouple/all-the-german-wordsother resourcescustomized OTF/TTF kern dumphttps://gist.github.com/m4rc1e/59017729923ac4930dcd76823c0acb91Happy Specimening
Package: samewords
Samewords=========[![DocumentationStatus](https://readthedocs.org/projects/samewords/badge/?version=latest)](http://samewords.readthedocs.io/en/latest/?badge=latest)[![DOI](https://zenodo.org/badge/92066873.svg)](https://zenodo.org/badge/latestdoi/92066873)*Word disambigutaion in critical text editions*In critical textual editions notes in the critical apparatus arenormally made to the line where the words occur. This leads to ambiguousreferences when a critical apparatus note refers to a word that occursmore than once in a line. For example:We have a passage of text here, such a nice place for a criticalnote.----1 a] om. MIt is very unclear which of three instances of "a" the note refers to.[Reledmac](https://www.ctan.org/pkg/reledmac) is a great LaTeX packagethat facilitates typesetting critical editions of prime quality. Italready provides facilities for disambiguating identical words, but itrequires the creator of the critical text to mark all potentialinstances of ambiguous references manually (see the *reledmac* handbookfor the details on that). *Samewords* automates this step for theeditor.Install and usage-----------------``` {.sourceCode .bash}pip3 install samewords```That's it!This requires Python 3.6 installed in your system. For more details oninstallation, see the [installation]{role="ref"} section.Now call the script with the file you want annotated as the onlyargument to get the annotated version back in the terminal.``` {.sourceCode .bash}samewords my-awesome-edition.tex```This will send the annotated version to `stdout`. To see that itactually contains some `\sameword{}` macros, you can try running itthrough `grep`:``` {.sourceCode .bash}samewords my-awesome-edition.tex | grep sameword```You can define a output location with the `--output` option:``` {.sourceCode .bash}samewords --output ~/Desktop/test/output my-awesome-edition.tex```This will check whether `~/Desktop/test/output` is a directory or afile. If it is a directory, it will put the file inside that directory(with the original name). If it is a file, it will ask you whether youwant to overwrite it. If it is neither a directory nor a file, it willcreate the file `output` and write the content to that.Alternatively regular unix redirecting will work just as well in a Unixcontext:``` {.sourceCode .bash}samewords my-beautiful-edition.tex > ~/Desktop/test/output.tex```See more in the[documentation](https://samewords.readthedocs.io/en/latest/).
Package: samexporter
SAM ExporterExportingSegment Anythingmodels to different formats.TheSegment Anything repositorydoes not have a way to exportencoderto ONNX format. There are some pull requests for this feature, but they have not accepted by SAM authors. Therefore, I want to create an easy tool to export Segment Anything models to different output formats as an easy option.Supported models:SAM ViT-BSAM ViT-LSAM ViT-HMobileSAM*InstallationFrom PyPi:pipinstallsamexporterFrom source:gitclonehttps://github.com/vietanhdev/samexportercdsamexporter
pipinstall-e.UsageDownload all models fromSegment Anythingrepository (*.pth).Download MobileSAM fromhttps://github.com/ChaoningZhang/MobileSAM.original_models
   + sam_vit_b_01ec64.pth
   + sam_vit_h_4b8939.pth
   + sam_vit_l_0b3195.pth
   + mobile_sam.pt
   ...Convert encoder SAM-H to ONNX format:python-msamexporter.export_encoder--checkpointoriginal_models/sam_vit_h_4b8939.pth\--outputoutput_models/sam_vit_h_4b8939.encoder.onnx\--model-typevit_h\--quantize-outoutput_models/sam_vit_h_4b8939.encoder.quant.onnx\--use-preprocessConvert decoder SAM-H to ONNX format:python-msamexporter.export_decoder--checkpointoriginal_models/sam_vit_h_4b8939.pth\--outputoutput_models/sam_vit_h_4b8939.decoder.onnx\--model-typevit_h\--quantize-outoutput_models/sam_vit_h_4b8939.decoder.quant.onnx\--return-single-maskRemove--return-single-maskif you want to return multiple masks.Inference using the exported ONNX model:python-msamexporter.inference\--encoder_modeloutput_models/sam_vit_h_4b8939.encoder.onnx\--decoder_modeloutput_models/sam_vit_h_4b8939.decoder.onnx\--imageimages/truck.jpg\--promptimages/truck_prompt.json\--outputoutput_images/truck.png\--showpython-msamexporter.inference\--encoder_modeloutput_models/sam_vit_h_4b8939.encoder.onnx\--decoder_modeloutput_models/sam_vit_h_4b8939.decoder.onnx\--imageimages/plants.png\--promptimages/plants_prompt1.json\--outputoutput_images/plants_01.png\--showpython-msamexporter.inference\--encoder_modeloutput_models/sam_vit_h_4b8939.encoder.onnx\--decoder_modeloutput_models/sam_vit_h_4b8939.decoder.onnx\--imageimages/plants.png\--promptimages/plants_prompt2.json\--outputoutput_images/plants_02.png\--showShort options:Convert all Meta's models to ONNX format:bashconvert_all_meta_sam.shConvert MobileSAM to ONNX format:bashconvert_mobile_sam.shTipsUse "quantized" models for faster inference and smaller model size. However, the accuracy may be lower than the original models.SAM-B is the most lightweight model, but it has the lowest accuracy. SAM-H is the most accurate model, but it has the largest model size. SAM-M is a good trade-off between accuracy and model size.AnyLabelingThis package was originally developed for auto labeling feature inAnyLabelingproject. However, you can use it for other purposes.LicenseThis project is licensed under the MIT License - see theLICENSEfile for details.
Package: sam-games
Effective-octoThis is a simple, educative, open sourde codeThe package contains 3 modules of simple game codesAfter importing the moduleThe games can be invoked by calling the main function .main() in themno arguments are requiredTic-Tac-ToeTic-tac-toe, noughts and crosses, or Xs and Os is a paper-and-pencil game for two players.who take turns marking the spaces in a three-by-three grid with X or O.Playes take turns and the position to mark their symbol is given as matrix input(row,col)The player who succeeds in placing three of their marks in a horizontal, vertical, or diagonal row is the winner.Rock-Paper-ScissorRock paper scissors is a hand game originating in China, played between two people, in which each player simultaneously forms one of three shapesHere shapes are choosen as inputs of int format and the opponent (your pc) chooes its choice in a random mannerThese shapes are "rock", "paper", and "scissors". A simultaneous, zero-sum game, it has three possible outcomes: a draw, a win or a loss.SnakeThis module requires another package called 'freegames'. Make sure its installed before calling this module.Snake is a sub-genre of action video games where the player maneuvers the end of a growing line.The player must keep the snake from colliding with both other obstacles and itself, which gets harder as the snake lengthens.github url --https://github.com/2028-design/effective-octoLicenseMIT