Saravanan666/pypi-org huggingface dataset:
Package: aiconfig-extension-hugging-face
This extension contains AIConfig model parsers with two main subfolders:local_inference: Loads models onto your machine and uses Hugging Face transformers and diffusors locally.remote_inference_client: Uses Hugging Face's InferenceClient API to connect to models remotelyUsagePart 1: Update and test this extensionIf you are not testing and developing locally (just using the published extension), ignore this and go to Part 2From theaiconfig/extensions/HuggingFace, run this command:pip3 install build && cd python && python -m build && pip3 install dist/*.whlLink your local dev environment to the current dir:pip3 install -e .. Afterwards if you dopip3 list | grep aiconfig, you should see this linked to your local path. If you ever wish to use the published extension, you will need to first remove the extension:pip3 uninstall aiconfig-extension-hugging-face && pip3 install aiconfig-extension-hugging-faceAfter you're done testing, be sure to delete the generated folder(s) in theaiconfig/HuggingFacedir. It'll probably look something likepython/distandpython/<package_name>.egg-infoPart 2: Importing and using this extensionpip3 install aiconfig-extension-hugging-faceImport the library to your code:from aiconfig_extension_hugging_face import <EXTENSION>.Import the AIConfig model registery:from aiconfig import ModelRegistryParserIn code, add all the relevant model parser objects that you want to use from this extension to the registry. Ex:ModelParserRegistry.register_model_parser(HuggingFaceTextGenerationTransformer()). You can read the docstrings underModelParserRegistryclass for more infoIn your AIConfig, add a fieldmodel_parserswith the model you want to use and the id of the extension you want to use: . Ex:https://github.com/lastmile-ai/aiconfig/blob/f1840995b7a12acba371a59ac3b8c69b3962fc68/cookbooks/Getting-Started/travel.aiconfig.json#L19-L22Now whenever you callaiconfig.run()these model parsers will be loaded and available!
Package: aiconfig-extension-llama-guard
LLama Guard with AIConfigLLama Guard is a 7b model released by Meta. This extension allows you to use it with AIConfig.LLaMA Guard allows you to define your own “safety taxonomy” — custom policies to determine which interactions are safe vs. unsafe between humans (prompts) and AI models (responses). What makes this cool is that it allows you to enforce your own policiesON TOPof the standard guardrails that a model ships with (instead of merely overriding them).[!NOTE] This extension also loads the entire model into memory.Part 1: Installating, Importing, and using this extensionInstall this module: runpip3 install aiconfig_extension_llama_guardin terminalAdd these lines to your code:fromaiconfig_extension_llama_guardimportLLamageGuardParserfromaiconfig.registryimportModelParserRegistryIn code, construct and load the model parser that to from this extension to the registry:ModelParserRegistry.register_model_parser(LLamageGuard()). You can read the docstrings underModelParserRegistryclass for more info o nwhat this does.Use theLLamageGuardmodel parser however you please. Check out our tutorial to get started (video walkthrough,Jupyter notebook) You can watch our video tutorial or check our Jupyter notebook tutoPart 2: Updating & Developing this extensionIf you are not developing this extension locally (just using the published extension), feel free to ignore this partNavigate toextensions/LLama-Guard/pythonand run this command:pip3 install -e .(this creates a local copy of the python module which is linked to this directory)Edit and test the extension as you please. Feel free to submit a push request on GitHub!After you're done testing, be sure to uninstall the local link to this directory if you ever want to use the published version:pip3 uninstall aiconfig_extension_llama_guard
Package: aicooking-ble
Aicooking BLEManage Aicooking BLE devicesAicookingShenzhen chuangxinlian Electronics CXL001Tesla Cook BBQ100 (CXL001-Y)InstallationInstall this via pip (or your favourite package manager):pip install aicooking-bleContributors ✨Thanks goes to these wonderful people (emoji key):This project follows theall-contributorsspecification. Contributions of any kind welcome!CreditsThis package was created withCopierand thebrowniebroke/pypackage-templateproject template.
Package: aicore-nb
Teaching ToolsRunpython aicore_nb_toolin your terminal and let the magic happen.You can also install the package to work in any directory and without worrying about dependencies. Simply runpip install aicore-nb-tools, and once installed runpython -m aicore_nb_tool. It will ask you for the API token, please, ask the team how to get one.The script connects to an S3 bucket with the questions. Those questions are stored usign the lesson id, and in order to get those ids, it connects to an RDS to make a query to check it.
Package: aicore-nb-tools
Teaching ToolsTool for generating questions and answers for students.The script connects to an S3 bucket with the questions. Those questions are stored usign the lesson id, and in order to get those ids, it connects to an RDS to make a query to check it.InstallationRunpython aicore_nb_toolin your terminal and let the magic happen.You can also install the package to work in any directory and without worrying about dependencies. Simply runpip install aicore-nb-tools, and once installed runpython -m aicore_nb_tool. It will ask you for the API token, please, ask the team how to get one.UsageYou can pass the API token as an argument to the tool, for example:python -m aicore_nb_tool --token <token>The module also accepts the following arguments:-p, --pathway: Pathway of the cohort that is going to be askedThe argument uses regex, so anything similar to the name of the pathway will work. For example-p Sciencewill matchData Science-ng, --no_groups: Whether to create groups or notSo for example, if you want to generate a notebook for the Data Science Pathway with no defined groups, you can run:python -m aicore_nb_tool --pathway Science --no_groups --token <token>
Package: aicrowd-api
AIcrowd APIPython client for server side API of theaicrowd.comwebapp.Free software: GNU General Public License v3Documentation:https://aicrowd-api.readthedocs.io.InstallationDeploymentpipinstallgit+https://github.com/AIcrowd/aicrowd_api.gitDevelopmentgitclonehttps://github.com/AIcrowd/aicrowd_apicdaicrowd_api
pipinstall-rrequirements_dev.txt
pipinstall-e.UsageInstantiate API objectfromaicrowd_apiimportAPIasAICROWD_APIauth_token="<YOUR AICROWD AUTH TOKEN>"api=AICROWD_API(auth_token)Authenticate participantwithAPI_KEYapi.authenticate_participant(EXAMPLE_API_KEY)withusernameapi_key=api.authenticate_participant_with_username("spMohanty")Get all Submissionschallenge_id="test_challenge"submissions=api.get_all_submissions(challenge_id)print(submissions)Create Submissionchallenge_id="test_challenge"submission=api.create_submission(challenge_id)print(submission)# Output# ========================================# AIcrowdSubmission	:	5261# 	challenge_id	:	test_challenge# 	round_id	:	False# 	score	:	False# 	score_secondary	:	False# 	grading_status	:	submitted# 	message	:# ========================================Get submissionchallenge_id="test_challenge"submission_id=5262submission=api.get_submission(challenge_id,submission_id)Update submissionAssuming you have asubmissionobject by usingapi.create_submissionorapi.get_submission.
You can update the submission by :# Update paramssubmission.grading_status="graded"submission.score=0.98submission.score_secondary=0.98submission.update()print(submission)# Output## ========================================# AIcrowdSubmission	:	5262# 	challenge_id	:	test_challenge# 	round_id	:	False# 	score	:	0.98# 	score_secondary	:	0.98# 	grading_status	:	graded# 	message	:# ========================================Tests# Setup the environment varriablescpenviron.sh.exampleenviron.sh# Then modify the respective environment variablessourceenviron.sh
pyteststests/AuthorS.P.Mohantymohanty@aicrowd.comArjun Nemaninemani@aicrowd.com
Package: aicrowd-repo2docker
repo2dockerrepo2dockerfetches a git repository and builds a container image based on
the configuration files found in the repository.See therepo2docker documentationfor more information on using repo2docker.For support questions please search or post tohttps://discourse.jupyter.org/c/binder.See thecontributing guidefor information on contributing to
repo2docker.Please note that this repository is participating in a study into sustainability
of open source projects. Data will be gathered about this repository for
approximately the next 12 months, starting from 2021-06-11.Data collected will include number of contributors, number of PRs, time taken to
close/merge these PRs, and issues closed.For more information, please visitour informational pageor download ourparticipant information sheet.Using repo2dockerPrerequisitesDocker to build & run the repositories. Thecommunity editionis recommended.Python 3.6+.Supported on Linux and macOS.See documentation note about Windows support.InstallationThis a quick guide to installingrepo2docker, see our documentation fora full guide.To install from PyPI:pipinstalljupyter-repo2dockerTo install from source:gitclonehttps://github.com/jupyterhub/repo2docker.gitcdrepo2docker
pipinstall-e.UsageThe core feature of repo2docker is to fetch a git repository (from GitHub or locally),
build a container image based on the specifications found in the repository &
optionally launch the container that you can use to explore the repository.Note that Docker needs to be running on your machine for this to work.Example:jupyter-repo2dockerhttps://github.com/norvig/pytudesAfter building (it might take a while!), it should output in your terminal
something like:Copy/pastethisURLintoyourbrowserwhenyouconnectforthefirsttime,tologinwithatoken:http://0.0.0.0:36511/?token=f94f8fabb92e22f5bfab116c382b4707fc2cade56ad1ace0If you copy paste that URL into your browser you will see a Jupyter Notebook
with the contents of the repository you had just built!For more information on how to userepo2docker, see theusage guide.Repository specificationsRepo2Docker looks for configuration files in the source repository to
determine how the Docker image should be built. For a list of the configuration
files thatrepo2dockercan use, see thecomplete list of configuration files.The philosophy of repo2docker is inspired byHeroku Build Packs.Docker ImageRepo2Docker can be run inside a Docker container if access to the Docker Daemon is provided, for example seeBinderHub. Docker images arepublished to quay.io. The oldDocker Hub imageis no longer supported.
Package: aicsapi-tool-python
aicsapi-tool-python|   .gitignore
|   .kvvars    # specifies environment variables needed by "keyvault_certgen.py" & "keyvault_utils.py"
|   LICENSE   
|   README.md
|   requirements.txt    # package dependencies
|   requirements_dev.txt    # required for packaging
|   setup.py    # for wrapping into a PyPI package
|
+---aicsapi_tool_python    # actual codes
|       appinsight_transport.py    # for logging custom events w/ correlation id to Azure Appinsights
|       keyvault_certgen.py    # provides utilities to generate X509v3 cert and upload to Azure KV
|       keyvault_tokenCache.py    # for caching credentials to save login time
|       keyvault_utils.py    # device-code sign in to Azure, get/import secret & cert to Azure KV
|       __init__.py
|
\---tests        # test_*.py performs unit test for the corresponding module
        test_appinsight_transport.py
        test_keyvault_certgen.py
        test_keyvault_tokenCache.py
        test_keyvault_utils.pyDescriptionA package to help Python API template in:Logging to Azure Application InsightsFetching secret from Azure Key VaultGenerating self-signed certificate and upload it to Azure Key VaultCaching credential token to save login timeInstallationThis package has been published to PyPI, so you can usepip install aicsapi-tool-pythonNoteWhen calling methods inkeyvault_utilsorkeyvault_certgen, be sure to have the following environment variables set:KEY_VAULT_URL 
KEY_VAULT_SECRET_NAME 
KEY_VAULT_CERT_NAME
AZURE_TENANT_IDExample: Generate Self-signed Certification and Upload to Azure KVEnsure required env. variables are loaded, create.kvvarsunder current working directoryKEY_VAULT_URL="https://[your keyvault name].vault.azure.net"  
KEY_VAULT_CERT_NAME="certificate name"
AZURE_TENANT_ID="your azure tenant id"Run the following code snippet withpython certgen.py [your ASUS account name] [filename of generated key & cert]# certgen.pyfromaicsapi_tool_python.keyvault_certgenimportgenerate_v3cert,upload_v3cert_to_kvimportsysasus_account=sys.argv[1]cert_name=sys.argv[2]generate_v3cert(asus_account,cert_name)upload_v3cert_to_kv(cert_name+'.pfx')
Package: aics-bead-alignment-core
aics_bead_alignment_coreaics_bead_alignment_core==1.2.0A uitlity package containing functions to align bead imagesFeaturesStore values and retain the prior value in memory... some other functionalityInstallationStable Release:pip install aics_bead_alignment_coreDevelopment Head:pip install git+https://github.com/BrianWhitneyAI/aics_bead_alignment_core.gitDocumentationFor full package documentation please visitBrianWhitneyAI.github.io/aics_bead_alignment_core.DevelopmentSeeCONTRIBUTING.mdfor information related to developing the code.The Commands You Need To Knowmake installThis will setup a virtual environment local to this project and install all of the
project's dependencies into it. The virtual env will be located inaics_bead_alignment_core/venv.make test,make fmt,make lint,make type-check,make import-sortQuality assurancepip install -e .[dev]This will install your package in editable mode with all the required development
dependencies.make docsThis will generate documentation using sphinx.make publishandmake publish-snapshotRunning this command will start the process of publishing to PyPI`make bumpversion' - [release, major, minor, patch, dev]update verisoning with new releasesmake cleanThis will clean up various Python and build generated files so that you can ensure
that you are working in a clean workspace.Suggested Git Branch Strategymainis for the most up-to-date development, very rarely should you directly
commit to this branch. GitHub Actions will run on every push and on a CRON to this
branch but still recommended to commit to your development branches and make pull
requests to main. If you push a tagged commit with bumpversion, this will also release to PyPI.Your day-to-day work should exist on branches separate frommain. Even if it is
just yourself working on the repository, make a PR from your working branch tomainso that you can ensure your commits don't break the development head. GitHub Actions
will run on every push to any branch or any pull request from any branch to any other
branch.It is recommended to use "Squash and Merge" commits when committing PR's. It makes
each set of changes tomainatomic and as a side effect naturally encourages small
well defined PR's.
Package: aicsfeature
AICS Features Extractionfrom aicsfeatures.extractor import */feature_calcFunctions related to feature extraction. Feature extraction should be done like this:from aicsfeatures.extractor import *

features_result = xxx.get_features(args=None, seg=image_xxx)where xxx can bemem, for cell membrane-related featuresdna, for nucleus-related featuresstructure, for structure-specific features.stack, for stack-related features.Assumptions of each function about the input image should be detailed inside the function like thisAssumptions:
        - Input is a ZYX 16-bit numpy array (2D images can be passed in as a 1YX)
        - There is a single object of interest
        - Background has value 0
        - Object of interest have pixel value > 0The resultfeatures_resultshould always be a single row Pandas dataframe.exutils.py:Main routine for feature calculation. We try to re-use functions from skimage (shape analysis) and Mahotas (texture analysis). Here is also the place to implement new features that are not found in those packages. We try to be general and do not say anything specific about the type of biological structure that the input image should represent.mem.py:Wrappers for feature extraction of cell membrane images.dna.py:Wrappers for feature extraction of dna images.structure.py:Wrappers for feature extraction of structures images. Things to be defined: which type of feature we should extract for each given structure. Or do we do all to all?stack.py:Wrappers for feature extraction of whole stack images.How to BuildThe default project layout and build steps are discussed inBUILD.md. Some of the information
is related to the AICS build process.Legal documentsLicense(Before you release the project publicly please check with your manager to ensure the license is appropriate and has been run through legal review as necessary.)Contribution Agreement(Additionally update the contribution agreement to reflect
the level of contribution you are expecting, and the level of support you intend to provide.)
Package: aicsimageprocessing
aicsimageprocessingA generalized scientific image processing module from the Allen Institute for Cell Science.InstallationInstall Requires:Prior to installing this package, you must havenumpyinstalled.pipinstallnumpyStable Release:pip install aicsimageprocessingDevelopment Head:pip install git+https://github.com/AllenCellModeling/aicsimageprocessing.gitDocumentationFor full package documentation please visitAllenCellModeling.github.io/aicsimageprocessing.DevelopmentSeeCONTRIBUTING.mdfor information related to developing the code.Free software: Allen Institute Software License
Package: aics-pipeline-uploaders
aics_pipeline_uploadersThis package contains resources for uploading pipeline data to FMSaics_pipeline_uploaders==1.2.0FeaturesStore values and retain the prior value in memory... some other functionalityInstallationStable Release:pip install aics_pipeline_uploadersDevelopment Head:pip install git+https://github.com/BrianWhitneyAI/aics_pipeline_uploaders.gitDocumentationFor full package documentation please visitBrianWhitneyAI.github.io/aics_pipeline_uploaders.DevelopmentSeeCONTRIBUTING.mdfor information related to developing the code.The Four Commands You Need To Knowmake installThis will setup a virtual environment local to this project and install all of the
project's dependencies into it. The virtual env will be located incamera-alignment-core/venv.make test,make fmt,make lint,make type-check,make import-sortQuality assurancepip install -e .[dev]This will install your package in editable mode with all the required development
dependencies.make cleanThis will clean up various Python and build generated files so that you can ensure
that you are working in a clean workspace.Suggested Git Branch Strategymainis for the most up-to-date development, very rarely should you directly
commit to this branch. GitHub Actions will run on every push and on a CRON to this
branch but still recommended to commit to your development branches and make pull
requests to main. If you push a tagged commit with bumpversion, this will also release to PyPI.Your day-to-day work should exist on branches separate frommain. Even if it is
just yourself working on the repository, make a PR from your working branch tomainso that you can ensure your commits don't break the development head. GitHub Actions
will run on every push to any branch or any pull request from any branch to any other
branch.It is recommended to use "Squash and Merge" commits when committing PR's. It makes
each set of changes tomainatomic and as a side effect naturally encourages small
well defined PR's.
Package: aicsshparam
AICS Spherical Harmonics ParametrizationSpherical harmonics parametrization for 3D starlike shapes.Installation:Stable Release:pip install aicsshparamBuild from source to make customization:git clone git@github.com:AllenCell/aics-shparam.gitcd aics-shparampip install -e .How to useHere we outline an example of how one could use spherical harmonics coefficients as shape descriptors on a synthetic dataset composed by 3 different shapes: spheres, cubes and octahedrons.# Import required packagesimportnumpyasnpimportpandasaspdimportmatplotlib.pyplotaspltfromsklearn.decompositionimportPCAfromaicsshparamimportshtools,shparamfromskimage.morphologyimportball,cube,octahedronnp.random.seed(42)# for reproducibility# Function that returns binary images containing one of the three# shapes: cubes, spheres octahedrons of random sizes.defget_random_3d_shape():idx=np.random.choice([0,1,2],1)[0]element=[ball,cube,octahedron][idx]label=['ball','cube','octahedron'][idx]img=element(10+int(10*np.random.rand()))img=np.pad(img,((1,1),(1,1),(1,1)))img=img.reshape(1,*img.shape)# Rotate shapes to increase dataset variability.img=shtools.rotate_image_2d(image=img,angle=360*np.random.rand()).squeeze()returnlabel,img# Compute spherical harmonics coefficients of shape and store them# in a pandas dataframe.df_coeffs=pd.DataFrame([])foriinrange(30):# Get a random shapelabel,img=get_random_3d_shape()# Parameterize with L=4, which corresponds to50 coefficients# in total(coeffs,_),_=shparam.get_shcoeffs(image=img,lmax=4)coeffs.update({'label':label})df_coeffs=df_coeffs.append(coeffs,ignore_index=True)# Vizualize the resulting dataframewithpd.option_context('display.max_rows',5,'display.max_columns',5):display(df_coeffs)# Let's use PCA to reduce the dimensionality of the coefficients# dataframe from 51 down to 2.pca=PCA(n_components=2)trans=pca.fit_transform(df_coeffs.drop(columns=['label']))df_trans=pd.DataFrame(trans)df_trans.columns=['PC1','PC2']df_trans['label']=df_coeffs.label# Vizualize the resulting dataframewithpd.option_context('display.max_rows',5,'display.max_columns',5):display(df_trans)# Scatter plot to show how similar shapes are grouped together.fig,ax=plt.subplots(1,1,figsize=(3,3))forlabel,df_labelindf_trans.groupby('label'):ax.scatter(df_label.PC1,df_label.PC2,label=label,s=50)plt.legend(loc='upper left',bbox_to_anchor=(1.05,1))plt.xlabel('PC1')plt.ylabel('PC2')plt.show()ReferenceFor an example of how this package was used to analyse a dataset of over 200k single-cell images at the Allen Institute for Cell Science, please check out our paper inbioaRxiv.DevelopmentSeeCONTRIBUTING.mdfor information related to developing the code.Questions?If you have any questions, feel free to leave a comment in our Allen Cell forum:https://forum.allencell.org/.Free software: Allen Institute Software License