Saravanan666/pypi-org huggingface dataset:
Package: brainsurf
DescriptionBrainSurf is a Python library for processing and analyzing EEG (electroencephalography) signals. It provides a collection of tools and methods for reading, preprocessing, analyzing, and visualizing EEG data. The library is built using the NumPy, SciPy, and Matplotlib packages and is designed to be easily extensible for custom analysis and visualization needsInstallationBrainSurf can be installed using pip, a Python package manager. To install the latest stable version of the library, run the following command :pip install brainsurfGithubAlternatively, you can clone the repository from GitHub and install it from source:git clone https://github.com/preethihiremath/brainsurfcd esppip install -r requirements.txtpython setup.py installUsageimportbrainsurf.io.mffasload_inputimportbrainsurf.utils.dataasutilimportbrainsurf.utils.performanceasperformanceimportbrainsurf.preprocessing.filteringasfilterimportbrainsurf.preprocessing.artifact_removalasartifactimportbrainsurf.preprocessing.epochingasepoching#load EEG data from filesuriya_baseline=load_input.convert_mff_to_eegdata("C:/Users/Preethi V Hiremath/Downloads/Meditators/Suriya/BS.mff")values=np.asarray(suriya_baseline['sec'],dtype=object)sampling_freq=util.estimate_sampling_frequency(values)pre_preprocessed_data=preprocess_eeg_data(suriya_baseline,sampling_freq)print(performance.calculate_memory_efficiency())performance.monitor_resource_usage()
Package: braintrust
BraintrustA Python library for logging data to Braintrust.braintrustis distributed as
alibrary on PyPI. It is open source andavailable on GitHub.QuickstartInstall the library with pip.pipinstallbraintrustThen, run a simple experiment with the following code (replaceYOUR_API_KEYwith
your Braintrust API key):frombraintrustimportEvaldefis_equal(expected,output):returnexpected==outputEval("Say Hi Bot",data=lambda:[{"input":"Foo","expected":"Hi Foo",},{"input":"Bar","expected":"Hello Bar",},],# Replace with your eval datasettask=lambdainput:"Hi "+input,# Replace with your LLM callscores=[is_equal],)
Package: brainviewer
🧠 BrainViewerA Python-based 3D Viewer for Visualizing ROIs using FreeSurfer Reconstruction👁️‍🗨️ OverviewA Python-based 3D Viewer for viszalizing ROIs using the result of FreeSurfer reconstruction. The main functions of this software are brain surface visualization, ROIs visualization and relative settings.🔆HighlightsBrain surface files (.pial .white)Brain segmentation files (.nii .nii.gz .mgz)ROIs selection and visualization (marching cubes)Settings of colors and views🖥️ Installationpipinstallbrainviewer🗝️ Usagepython-mbrainviewer
Package: brainwalk
brainwalk::: {.cell 0=‘h’ 1=‘i’ 2=‘d’ 3=‘e’}importsyssys.path.append("..")frombrainwalk.coreimport*:::Spatial graph embeddings for ObsidianMDInstallpipinstallbrainwalkHow to use# Find the Obsidian Vault directory and assert that it existsimportosfrompathlibimportPathvault_dir=Path(os.getcwd())/'vault-stub'assertvault_dir.exists()# Retrieve a Gensim word2vec model of your Obsidian Graphfrombrainwalk.coreimportbrainwavefromwirewalk.coreimportjaccard_coefficientmodel=brainwave(vault_dir,jaccard_coefficient)model.wv.key_to_index{'Vulnera ubera': 0,
 'Causam mihi': 1,
 'Sussudio': 2,
 'Ne fuit': 3,
 'Brevissimus moenia': 4,
 'Alimenta': 5,
 'American Psycho (film)': 6,
 'Aras Teucras': 7,
 'Tydides': 8,
 'Dives': 9,
 'Caelum': 10,
 'Vita': 11,
 'Isolated note': 12,
 'Tarpeia': 13,
 'Manus': 14,
 'Amor': 15,
 'lipsum/Isolated note': 16,
 'Bacchus': 17,
 'Virtus': 18,
 'Aetna': 19}model.wv.most_similar("Vulnera ubera")[('Ne fuit', 0.9992153644561768),
 ('Bacchus', 0.9991818070411682),
 ('Manus', 0.9991797804832458),
 ('Tydides', 0.9991616606712341),
 ('Sussudio', 0.9991515278816223),
 ('Vita', 0.9991357922554016),
 ('American Psycho (film)', 0.9991220831871033),
 ('lipsum/Isolated note', 0.9991198182106018),
 ('Virtus', 0.9991057515144348),
 ('Causam mihi', 0.999089777469635)]
Package: brainways
BrainwaysWhat Is Brainways?Brainways is an AI-based tool for automated registration, quantification and generation of brain-wide activity networks based on fluorescence in coronal slices.Why Brainways?Coronal slice registration, cell quantification and whole-brain contrast analysis between experimental conditions should be made easily accessible from a single software, without requiring programming experience.
Customization should be made easy by having a highly flexible pythonic backend.Getting StartedTo install and run brainways, run the following in your python environment:pipinstallnapari-brainways
napari-wnapari_brainwaysFollow ourgetting started guidefor more details.How it worksBrainways allows users to register, quantify and provide statistical contrast analysis by following several simple steps:Rigid registration of coronal slices to a 3D atlas.Non-rigid registration of coronal slices to a 3D atlas, to account for individual difference and imperfections in acquisition procedure.Cell detection (usingStarDist).Quantification of cell counts per brain region.Statistical analysis:ANOVA contrast analysis.PLS (Partial Least Square) analysis.Network graph creation.ArchitectureBrainways is implemented as three python packages.napari-brainwayscontains the GUI implementation as anapariplugin. napari-brainways is usingbrainwaysas its backend. All of the functionality is implemented in the brainways package. This separation was done to guarantee that brainways is a GUI-agnostic software, and can be fully accessed and manipulated through python code to allow custom complex usage scenarios. The code that was used to train, evaluate and run the automatic registration model resides inbrainways-reg-model.Development StatusBrainways is being actively developed by Ben Kantor of Bartal lab, Tel Aviv University, Israel. Our releases can be foundhere.CitationIf you use brainways, please citeKantor and Bartal (2023):@article{kantor2023brainways,
  title={Brainways: An Open-Source AI-based Software For Registration and Analysis of Fluorescent   Markers on Coronal Brain Slices},
  author={Kantor, Ben and Ben-Ami Bartal, Inbal},
  journal={bioRxiv},
  pages={2023--05},
  year={2023},
  publisher={Cold Spring Harbor Laboratory}
}LicenseDistributed under the terms of theGNU GPL v3.0license,
"napari-brainways" is free and open source softwareIssuesIf you encounter any problems, pleasefile an issuealong with a detailed description.
Package: brainweb
The following example may be launched interactively via any of the following:Local fileGitHub PreviewBrainWeb-based multimodal models of 20 normal brainsThis project was initially inspired by “BrainWeb: 20 Anatomical Models
of 20 Normal
Brains.”However there are a number of generally useful tools, image processing &
display functions included in this project. For example, this includesvolshow()for interactive comparison of multiple 3D volumes,get_file()for caching data URLs, andregister()for image
coregistration.Download and Preprocessing for PET-MR SimulationsThis notebook will not re-download/re-process files if they already
exist.Output data~/.brainweb/subject_*.npz: dtype(shape):float32(127, 344, 344)Raw data
source~/.brainweb/subject_*.bin.gz: dtype(shape):uint16(362, 434, 362)Installpip install brainwebAuthor: Casper da Costa-Luis <casper.dcl@physics.org>Date: 2017-2020Licence:MPLv2.0from__future__importprint_function,division%matplotlibnotebookimportbrainwebfrombrainwebimportvolshowimportnumpyasnpfromosimportpathfromtqdm.autoimporttqdmimportlogginglogging.basicConfig(level=logging.INFO)Raw Data# downloadfiles=brainweb.get_files()# read last filedata=brainweb.load_file(files[-1])# show last subjectprint(files[-1])volshow(data,cmaps=['gist_ncar']);~/.brainweb/subject_54.bin.gzTransformConvert raw image data:Siemens Biograph mMR resolution (~2mm) & dimensions (127, 344, 344)PET/T1/T2/uMap intensitiesPET defaults to FDG intensity ratios; could use e.g. Amyloid insteadrandomised structure for PET/T1/T2t (1 + g [2 G_sigma(r) - 1]), wherer = rand(127, 344, 344) in [0, 1),Gaussian smoothing sigma = 1,g = 1 for PET; 0.75 for MR, andt = the PET or MR piecewise constant phantom# show region probability masksPetClass=brainweb.FDGlabel_probs=brainweb.get_label_probabilities(files[-1],labels=PetClass.all_labels)volshow(label_probs[brainweb.trim_zeros_ROI(label_probs)],titles=PetClass.all_labels,frameon=False);brainweb.seed(1337)forfintqdm(files,desc="mMR ground truths",unit="subject"):vol=brainweb.get_mmr_fromfile(f,petNoise=1,t1Noise=0.75,t2Noise=0.75,petSigma=1,t1Sigma=1,t2Sigma=1,PetClass=PetClass)# show last subjectprint(f)volshow([vol['PET'][:,100:-100,100:-100],vol['uMap'][:,100:-100,100:-100],vol['T1'][:,100:-100,100:-100],vol['T2'][:,100:-100,100:-100]],cmaps=['hot','bone','Greys_r','Greys_r'],titles=["PET","uMap","T1","T2"],frameon=False);~/.brainweb/subject_54.bin.gz# add some lesionsbrainweb.seed(1337)im3d=brainweb.add_lesions(vol['PET'])volshow(im3d[:,100:-100,100:-100],cmaps=['hot']);# bonus: use brute-force registration to transform#!pip install -U 'brainweb[register]'reg=brainweb.register(data[:,::-1],target=vol['PET'],src_resolution=brainweb.Res.brainweb,target_resolution=brainweb.Res.mMR)volshow({"PET":vol['PET'][:,100:-100,100:-100],"RawReg":reg[:,100:-100,100:-100],"T1":vol['T1'][:,100:-100,100:-100],},cmaps=['hot','gist_ncar','Greys_r'],ncols=3,tight_layout=5,figsize=(9.5,3.5),frameon=False);
Package: brainweb-dl
Brainweb-DLWelcome to Brainweb-DL, a powerful Python toolkit for downloading and converting the Brainweb dataset.FeaturesEffortless Dataset Management:Automatically download, cache, and format the Brainweb dataset with ease. Convert it to the convenient nifti format or numpy array hassle-free.Multiple Image Generation:Generate high-quality T1, T2, T2*, and PD images directly from the Brainweb dataset. Perfect for testing purposes, although keep in mind that the values provided are approximate.Available dataThe Brainweb project kindly provides:A normal brain phantom (named subject0afterwards), with T1, T2 and PD contrasts, with a variety of noise levels and intensity non-uniformities. As well as a anatomical model (in the form of either crisp or fuzzy segmentation of brain tissues, at a fixed resolution of 181x217x181 images).The same for a multiple sclerosis brain phantom (named subject1afterwards).A set of 20 normal brains (with ids equal to[4, 5, 6, 18, 20, 38, 41-54]) , with a T1 contrast (with 1mm resolution at (181, 217,181)), as well as the crisp and fuzzy segmentation of brain tissues (with a shape of (362, 434,362)) [^1].This project provides aCLIand aPython APIto download and convert theses data. On top of that, it can generate new contrasts (e.g. T2*) from the segmentations, and reshape the data to the desired resolution [^2].[^1]: Note that the classification of tissue is not the same as for subject 0 and 1
[^2]: This requires scipy to be installed.Get StartedData LocationThe cached data directory follows this priority order:User-specific argument (brainweb_dirin most functions)BRAINWEB_DIRenvironment variable~/.cache/brainwebfolderPython Script Usagefrombrainweb_dlimportget_mridata=get_mri(sub_id=44,contrast="T1")The Brainweb dataset is downloaded and cached by default in the~/.cache/brainwebfolder.Command Line Interfacebrainweb-dl44--contrast=T1For more information, seebrainweb-dl --help.InstallationGet up and running quickly!pipinstallbrainweb-dlDevelopmentJoin our community and contribute to Brainweb-DL!gitclonegit@github.com/paquiteau/brainweb-dlcdbrainweb-dl
pipinstall-e.[dev,test,doc]TODO ListHelp us improve and shape the future of Brainweb-DL:Add unit tests.Implement fuzzy search and multiple subjects download in parallel.Develop an interface to generate T1, T2, T2*, and PD images.Enhance the search for the location of the Brainweb dataset (User > Environment Variable > Default Location).Introduce an interface to download as BIDS format.AcknowledgementWe extend our gratitude to the following for their contributions:Casper De Clercqfor the preliminary work and original idea. Check out his great work if you are interested in PET imaging and registration functionalities.BrainWebfor providing this valuable dataset to the community.:star2: If you like this work, don't forget to star it and share it 🌟
Package: brainy-mind
<p align=”center”><img src=”https://github.com/pelkmanslab/brainy/raw/master/ui/web/assets/images/brainy_logo.png” alt=”logo” height=”121” width=”121”></p>##Aboutbrainybrainyis a nimble workflow managing tool, at the core of [iBRAIN](https://github.com/pelkmanslab/iBRAIN/) functionality. It allows creation of projects according to the expected framework layout. It also oversees the execution of the projects and provides monitoring of any relevant progress of the conducted computation.##iBRAINiBRAIN is a software framework for scientific computation primarily applied for BigData extraction and analysis in context of HPC and HTS as well as large bioinformatical analysis.##DocumentationA really good place to understand what isbrainyis to read theuser manual:[User manual](https://github.com/pelkmanslab/brainy/wiki/User-Manual)[Developer Documentation](https://github.com/pelkmanslab/brainy/wiki/Developer-Documentation)> Tip: get help about the commands you need by sayingbrainy helporbrainy help project##Getting startedCreate you first project` brainy create project PureAwesomeness--fromdemo `Go inside the project folder and adjust settings in your pipelines. Afterwards run the project.` cd PureAwesomeness # Adjust settings in .brainy <project settings> and hello.br <pipe description> YAML files brainy run project `To see the report in your local web browser, do` brainy ui serve `If things are looking good, continue by submitting your project into thecloud. Find out how to do this in the [Cloud](https://github.com/pelkmanslab/brainy/wiki/User-Manual#Cloud) section of the brainy’s User Manual.##Installation> On Ubuntu (debian): sudo apt-get install python-setuptools git && sudo easy_install pip> On Mac: brew install libyaml>It is strongly recommended to use [conda](http://conda.pydata.org/docs/) as python 2.7+ environment.The package is available on [PyPI](https://pypi.python.org/pypi/brainy-mind/).` pip installbrainy-mind`To get the bleedding edge version you have to clone the repository and install brainy in developer mode from local folder:` cd && git clonehttps://github.com/pelkmanslab/brainycd brainy && pip install-e. `Once installed, inspect the state of configuration in~/.brainy/folder.Remember that you can generate~/.brainy/configfrom the template again by` brainy init config `You will have to edit the template that has been copied according to your cluster scheduler settings and so on.> Supported OS/platforms areLinuxandMac OSX.##TestsTo run nose tests navigate into` cd tests && nosetests-s`
Package: brainyquote-api
DISCLAIMERThis repository is not at all associated with brainyquote.com . The software is only to be used for educational purposes only. By downloading this code you agree with this disclaimer and any misuse is not held in responsibility with the author.brainyquote-apiUNOFFICIALAPI forbrainyquotes.com. Must have >= Python 3.7 installed for this program to function properly.Installationpip install brainyquote-apiUsagefrombrainyquote_apiimportquote# Example of this module in use.# This is a tool used to scrape the brainyquote.com page for quotes based on the specified category# It returns a randomised quote based on the maximum page you want the scraping tool to go through# An example of this tool in action would be thisquote=quoteCall(category()[79],3)# This would return the randomised quote from the specified category given by category()[79]# This function returns a list of all categories on the website and when you call the quoteCall and use category()[*index value*] then it uses the specified category according to its index value in the listcategories=category()
Package: braket-backend-blueqat
Braket-backend-blueqat (bqbraket)Convertblueqat.Circuittobraket.circuits.Circuit.Installpip install braket-backend-blueqatUsageUse as functionfromblueqatimportCircuitimportbqbraketbraket_circuit=bqbraket.convert(Circuit().h[0].cx[0,1])Use as backendfromblueqatimportCircuitimportbqbraket# Register as backendbqbraket.register_backend()# Run with braketconverter backendCircuit().h[0].cx[0,1].run(backend="braketconverter")
Package: bra-loterias
Bra LoteriasBra loterias é um CLI para coletar resultados, conferir e gerar jogos das loterias CAIXA.Como instalar o projetoPara instalação do CLI com PIPX:pipxinstallbra-loteriasOu com PIP:pipinstallbra-loteriasComo usar?O CLI tem como parâmetro o nome jogo que deseja os resultados. Por exemplo, a mega-sena:bra-loteriasresultadosmega-senaResultado:{'concurso':'concurso 2586','data':'quarta 26.04.23','numeros_sorteados':['10','18','41','49','53','59'],'resultado_premio_principal':'acumulou','resultados':[{'FAIXAS':'Sena','GANHADORES':'0','PREMIO (R$)':'0,00'},{'FAIXAS':'Quina','GANHADORES':'76','PREMIO (R$)':'64.781,77'},{'FAIXAS':'Quadra','GANHADORES':'6.010','PREMIO (R$)':'1.170,29'}],'estimativa_prox_sorteio':'R$ 50.347.934,06','link':'https://noticias.uol.com.br/loterias/mega-sena/'}Para mais opções, você pode consultar tambem a flag--help:Usage:bra-loteriasresultados[OPTIONS]JOGORetornaoresultadodojogosemquestão.

╭─Arguments────────────────────────────────────────────────────╮
│*jogoTEXTNomedojogo[default:None][required]│
╰────────────────────────────────────────────────────────────────╯
╭─Options──────────────────────────────────────────────────────╮
│--helpShowthismessageandexit.│
╰────────────────────────────────────────────────────────────────╯
Package: brambox
Basic Requisites for Algorithms on iMages toolBOXBrambox is a python toolbox that provides the necessary tools to convert image annotations, compute statistics and more.
Its main use is for object detection algorithms and datasets.Installing# From wheelpipinstallbrambox# From sourcepipinstallgit+https://gitlab.com/eavise/bramboxThis project is python 3.6 and higher so on some systems you might want to use 'pip3.6' instead of 'pip'UsingOnce you installed brambox, you can import it in your own python program with:importbramboxasbbFor tutorials and the API documentationclick here.ContributingSeethe contribution guidelinesMain ContributorsHere is a list of people that made noteworthy contributions and helped to get this project where it stands today!Tanguy OphoffMaarten Vandersteegen
Package: bran
Bran provides transcoders forASN.1serialization and deserialization, andDER-encoding.The purpose is to provide a serialization format for native Python types,
such as nested dicts, whose serialization is unambiguous and stable. That
is two values with the same contents serialize to the same byte string.That makes it possible to create hashes and MACs to verify message
integrity.Note that this doesnotmake this package a full implementation ofASN.1specs. That is not the goal. The goal is just to have a stable byte
representation of Python values;DERin particular is only picked because
it helps in this.UsageCodeYou just encode some values. In most cases, you’ll want to use theDERTranscoderclass.test={'some':{'nested':42,'value':(0,1,False)}}frombranimportDERTranscodertranscoder=DERTranscoder()encoded=transcoder.encode(test)decoded=transcoder.decode(encoded)assertdecoded==testIn order for bran to be this simple to use, some assumptions are made. The
one with the most impact is thatanycollections.Mappingwill be encoded
to the same byte representation, which means when decoded, it will become a
Pythondict. Similar assumptions are made forcollections.Setandcollections.Sequence.For the purpose of hashing, consider the following code:frombran.hashimporthashertest={'some':{'nested':42,'value':(0,1,False)}}h=hasher()h.update(test)print(h.hexdigest())# yields SHA512 hash of the DER serialized testimporthashlibh=hasher(hashfunc=hashlib.md5)h.update(test)print(h.hexdigest())# yields MD5 hash of the DER serialized testContributingSeeCONTRIBUTING.mdfor details.LicenseLicensed under MITNFA (MIT +no-false-attribs) License. See theLICENSE.txtfile for details.
Package: brancher
Brancher: A user-centered Python package for differentiable probabilistic inferenceBrancher allows to design and train differentiable Bayesian models using stochastic variational inference. Brancher is based on the deep learning framework PyTorch.Building probabilistic modelsProbabilistic models are defined symbolically. Random variables can be created as follows:a=NormalVariable(loc=0.,scale=1.,name='a')b=NormalVariable(loc=0.,scale=1.,name='b')It is possible to chain together random variables by using arithmetic and mathematical functions:c=NormalVariable(loc=a**2+BF.sin(b),scale=BF.exp(b),name='a')In this way, it is possible to create arbitrarely complex probabilistic models. It is also possible to use all the deep learning tools of PyTorch in order to define probabilistic models with deep neural networks.Example: Autoregressive modelingProbabilistic modelProbabilistic models are defined symbolically:T=20driving_noise=1.measure_noise=0.3x0=NormalVariable(0.,driving_noise,'x0')y0=NormalVariable(x0,measure_noise,'x0')b=LogitNormalVariable(0.5,1.,'b')x=[x0]y=[y0]x_names=["x0"]y_names=["y0"]fortinrange(1,T):x_names.append("x{}".format(t))y_names.append("y{}".format(t))x.append(NormalVariable(b*x[t-1],driving_noise,x_names[t]))y.append(NormalVariable(x[t],measure_noise,y_names[t]))AR_model=ProbabilisticModel(x+y)Observe dataOnce the probabilistic model is define, we can decide which variable is observed:[yt.observe(data[yt][:,0,:])forytiny]Autoregressive variational distributionThe variational distribution can have an arbitrary structure:Qb=LogitNormalVariable(0.5,0.5,"b",learnable=True)logit_b_post=DeterministicVariable(0.,'logit_b_post',learnable=True)Qx=[NormalVariable(0.,1.,'x0',learnable=True)]Qx_mean=[DeterministicVariable(0.,'x0_mean',learnable=True)]fortinrange(1,T):Qx_mean.append(DeterministicVariable(0.,x_names[t]+"_mean",learnable=True))Qx.append(NormalVariable(BF.sigmoid(logit_b_post)*Qx[t-1]+Qx_mean[t],1.,x_names[t],learnable=True))variational_posterior=ProbabilisticModel([Qb]+Qx)model.set_posterior_model(variational_posterior)InferenceNow that the models are specified we can perform approximate inference using stochastic gradient descent:inference.perform_inference(AR_model,number_iterations=500,number_samples=300,optimizer="SGD",lr=0.001)
Package: branches
RP TreeRP Tree is a command-line tool to generate directory tree diagrams.InstallationTo installRP Tree, just run the following command:$pipinstallrptreeUsage$rptree/path/to/directory/Note:The-hor--helpoption provides help on using RP Tree.Sample Output$rptreehello/
./hello/
│
├──hello/
│├──__init__.py
│└──hello.py
│
├──tests/
│└──test_hello.py
│
├──LICENSE
├──README.md
├──requirements.txt
└──setup.pyThat's it! You've generated a nice directory tree diagram.FeaturesIf you run RP Tree with a directory path as an argument, then you get a full directory tree diagram printed on your screen. The default input directory is your current directory.RP Tree also provides the following options:-v,--versionshows the application version and exits-h,--helpshow a usage message-d,--dir-onlygenerates a directory-only tree diagram-o,--output-filegenerates a full directory tree diagram and save it to a file in markdown formatRelease History0.1.1Display the entries in alphabetical order0.1.0A work in progressAbout the AuthorLeodanis Pozo Ramos - Email:leodanis@realpython.com
Package: branchesv
branchesvPython package to get the information of all the repos in a directoryFree software: GNU General Public License v3Documentation:https://branchesv.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2016-06-07)First release on PyPI.
Package: branchmgr
Branch Manager for GitHubThis tool manages branch permissions for GitHub repositories. The goal is to
ensure that branches of repositories in your organisation are appropriately
protected by controlling their status only via the API, rather than manually
configuring the branch status.Right now this tool is in an early alpha.Release History1.0.0 (2017-03-15)Initial release, with support for setting protected branches with the
configuration used by the Python Hyper project.