package
stringlengths 1
122
| pacakge-description
stringlengths 0
1.3M
|
---|---|
allenact-plugins
|
A collection of plugins/extensions for use within the AllenAct framework.
|
allenai-common
|
AllenAI-CommonThis repository is a copy-paste of the common components
from the1.1.0version ofAllenNLP library.The following classes were extracted:FromParamsParamsLazyRegistrableAnd freed from ML/DL/NLP dependencies (e.g.scikit-learn,torch,nltk,spacy,tensorboardX,transformers).Usagepipinstallallenai-commonfromallenai_commonimportRegistrable,Params,Lazy,FromParams# Do something you would normally do when solving NLP tasks using AllenNLP# But at this time use imported modules for non-NLP tasks
|
allen-bradley-toolkit
|
TODO: Fill in Later
|
allencell-ml-segmenter
|
allencell-ml-segmenterA plugin to leverage ML segmentation in napari.Thisnapariplugin was generated withCookiecutterusing@napari'scookiecutter-napari-plugintemplate.InstallationYou can installallencell-ml-segmenterviapip:pip install allencell-ml-segmenterTo install latest development version :pip install git+https://github.com/AllenCell/allencell-ml-segmenter.gitContributingContributions are very welcome. Tests can be run withtox, please ensure
the coverage at least stays the same before you submit a pull request.LicenseDistributed under the terms of theBSD-3license,
"allencell-ml-segmenter" is free and open source softwareIssuesIf you encounter any problems, pleasefile an issuealong with a detailed description.
|
allencrf
|
#AllenCRF
A full features CRF for PyTorch extracted from theAllenNLP FrameworkDocsSee the AllenNLPdocumentation about CRFfor full API docs.WhyThe CRF implementation in the AllenNLP framework is very good and easy to use. It notably has a convenient API
for specifying allowed (and thus forbidden) transitions.We extracted the CRF implementation from the framework, so that we can use it without the other dependencies
that AllenNLP includes.CreditsTheoriginal implementationwas written byJoel Gruswith ongoing work from the good folks at AllenNLP.
|
allencv
|
No description available on PyPI.
|
allenhe_nester
|
UNKNOWN
|
allenlib
|
init:
logo_allenlib():a logo of allenlib
computer_os:
dfrgui():open dfrgui
repairdisk(a):repair a disk
cleanmgr():clean the computer
message:
info(t,m):show info t:title m:message
warning(t,m):show warning t:title m:message
error(t,m):show error t:title m:message
ask(t,m):ask t:title m:message
ok(t,m):ask ok t:title m:message
yes(t,m):ask yes t:title m:message
retry(t,m):ask retry t:title m:message
ync(t,m):ask ync t:title m:message
printfun:
printfun(a):print fun a
raise:
raise(a):raise Exception(a)
speak:
speak(a):speak a
translate(a):translate a
print_load:
progess_bar(title,range):bar for linux
progess_bar_win(title,range):bar for windows
simplepygame:
it is simple than pygame,but it is only a pygame tool!
font(filename,size):set font
text(text,colorlist,bgcolor=None):show text
update():update
isquit():is quit?
autoquit():quit
quitis():auto isquit autoquit
quitwhile():quit is for while ...:
bgmsc:play background music
msc():sound value
playmsc(msc):msc() + autoplay
nobgm():stop background music
readini:
class readini(file):
read(section,value)
getbool(section,value)
-----The End of readini
|
allenng321
|
Failed to fetch description. HTTP Status Code: 404
|
allennlp
|
An Apache 2.0 NLP research library, built on PyTorch, for developing state-of-the-art deep learning models on a wide variety of linguistic tasks.⚠️NOTICE:The AllenNLP library is now in maintenance mode. That means we are no longer adding new features or upgrading dependencies. We will still respond to questions and address bugs as they arise up until December 16th, 2022. If you have any concerns or are interested in maintaining AllenNLP going forward, please open an issue on this repository.AllenNLP has been a big success, but as the field is advancing quickly it's time to focus on new initiatives. We're working hard to makeAI2 Tangothe best way to organize research codebases. If you are an active user of AllenNLP, here are some suggested alternatives:If you like the trainer, the configuration language, or are simply looking for a better way to manage your experiments, check outAI2 Tango.If you like AllenNLP'smodulesandnnpackages, check outdelmaksym/allennlp-light. It's even compatible withAI2 Tango!If you like the framework aspect of AllenNLP, check outflair. It has multiple state-of-art NLP models and allows you to easily use pretrained embeddings such as those from transformers.If you like the AllenNLP metrics package, check outtorchmetrics. It has the same API as AllenNLP, so it should be a quick learning curve to make the switch.If you want to vectorize text, trythe transformers library.If you want to maintain the AllenNLP Fairness or Interpret components, please get in touch. There is no alternative to it, so we are looking for a dedicated maintainer.If you are concerned about other AllenNLP functionality, please create an issue. Maybe we can find another way to continue supporting your use case.Quick Links↗️Website🔦Guide🖼Gallery💻Demo📓Documentation(latest|stable|commit)⬆️Upgrade Guide from 1.x to 2.0❓Stack Overflow✋Contributing Guidelines🤖Officially Supported ModelsPretrained ModelsDocumentation(latest|stable|commit)⚙️Continuous Build🌙Nightly ReleasesIn this READMEGetting Started Using the LibraryPluginsPackage OverviewInstallationInstalling via pipInstalling using DockerInstalling from sourceRunning AllenNLPIssuesContributionsCitingTeamGetting Started Using the LibraryIf you're interested in using AllenNLP for model development, we recommend you check out theAllenNLP Guidefor a thorough introduction to the library, followed by our more advanced guides
onGitHub Discussions.When you're ready to start your project, we've created a couple of template repositories that you can use as a starting place:If you want to useallennlp trainand config files to specify experiments, usethis
template. We recommend this approach.If you'd prefer to use python code to configure your experiments and run your training loop, usethis template. There are a few
things that are currently a little harder in this setup (loading a saved model, and using
distributed training), but otherwise it's functionality equivalent to the config files
setup.In addition, there are external tutorials:Hyperparameter optimization for AllenNLP using OptunaTraining with multiple GPUs in AllenNLPTraining on larger batches with less memory in AllenNLPHow to upload transformer weights and tokenizers from AllenNLP to HuggingFaceAnd others on theAI2 AllenNLP blog.PluginsAllenNLP supports loading "plugins" dynamically. A plugin is just a Python package that
provides custom registered classes or additionalallennlpsubcommands.There is ecosystem of open source plugins, some of which are maintained by the AllenNLP
team here at AI2, and some of which are maintained by the broader community.PluginMaintainerCLIDescriptionallennlp-modelsAI2NoA collection of state-of-the-art modelsallennlp-semparseAI2NoA framework for building semantic parsersallennlp-serverAI2YesA simple demo server for serving modelsallennlp-optunaMakoto HiramatsuYesOptunaintegration for hyperparameter optimizationAllenNLP will automatically find any official AI2-maintained plugins that you have installed,
but for AllenNLP to find personal or third-party plugins you've installed,
you also have to create either a local plugins file named.allennlp_pluginsin the directory where you run theallennlpcommand, or a global plugins file at~/.allennlp/plugins.
The file should list the plugin modules that you want to be loaded, one per line.To test that your plugins can be found and imported by AllenNLP, you can run theallennlp test-installcommand.
Each discovered plugin will be logged to the terminal.For more information about plugins, see theplugins API docs. And for information on how to create a custom subcommand
to distribute as a plugin, see thesubcommand API docs.Package OverviewallennlpAn open-source NLP research library, built on PyTorchallennlp.commandsFunctionality for the CLIallennlp.commonUtility modules that are used across the libraryallennlp.dataA data processing module for loading datasets and encoding strings as integers for representation in matricesallennlp.fairnessA module for bias mitigation and fairness algorithms and metricsallennlp.modulesA collection of PyTorch modules for use with textallennlp.nnTensor utility functions, such as initializers and activation functionsallennlp.trainingFunctionality for training modelsInstallationAllenNLP requires Python 3.6.1 or later andPyTorch.We support AllenNLP on Mac and Linux environments. We presently do not support Windows but are open to contributions.Installing via conda-forgeThe simplest way to install AllenNLP is using conda (you can choose a different python version):conda install -c conda-forge python=3.8 allennlpTo install optional packages, such aschecklist, useconda install -c conda-forge allennlp-checklistor simply installallennlp-alldirectly. The plugins mentioned above are similarly installable, e.g.conda install -c conda-forge allennlp-models allennlp-semparse allennlp-server allennlp-optunaInstalling via pipIt's recommended that you install the PyTorch ecosystembeforeinstalling AllenNLP by following the instructions onpytorch.org.After that, just runpip install allennlp.⚠️ If you're using Python 3.7 or greater, you should ensure that you don't have the PyPI version ofdataclassesinstalled after running the above command, as this could cause issues on certain platforms. You can quickly check this by runningpip freeze | grep dataclasses. If you see something likedataclasses=0.6in the output, then just runpip uninstall -y dataclasses.If you need pointers on setting up an appropriate Python environment or would like to install AllenNLP using a different method, see below.Setting up a virtual environmentCondacan be used set up a virtual environment with the
version of Python required for AllenNLP. If you already have a Python 3
environment you want to use, you can skip to the 'installing via pip' section.Download and install Conda.Create a Conda environment with Python 3.8 (3.7 or 3.9 would work as well):conda create -n allennlp_env python=3.8Activate the Conda environment. You will need to activate the Conda environment in each terminal in which you want to use AllenNLP:conda activate allennlp_envInstalling the library and dependenciesInstalling the library and dependencies is simple usingpip.pipinstallallennlpTo install the optional dependencies, such aschecklist, runpipinstallallennlp[checklist]Or you can just install all optional dependencies withpip install allennlp[all].Looking for bleeding edge features? You can install nightly releases directly frompypiAllenNLP installs a script when you install the python package, so you can run allennlp commands just by typingallennlpinto a terminal. For example, you can now test your installation withallennlp test-install.You may also want to installallennlp-models, which contains the NLP constructs to train and run our officially
supported models, many of which are hosted athttps://demo.allennlp.org.pipinstallallennlp-modelsInstalling using DockerDocker provides a virtual machine with everything set up to run AllenNLP--
whether you will leverage a GPU or just run on a CPU. Docker provides more
isolation and consistency, and also makes it easy to distribute your
environment to a compute cluster.AllenNLP providesofficial Docker imageswith the library and all of its dependencies installed.Once you haveinstalled Docker,
you should also install theNVIDIA Container Toolkitif you have GPUs available.Then run the following command to get an environment that will run on GPU:mkdir-p$HOME/.allennlp/
dockerrun--rm--gpusall-v$HOME/.allennlp:/root/.allennlpallennlp/allennlp:latestYou can test the Docker environment withdockerrun--rm--gpusall-v$HOME/.allennlp:/root/.allennlpallennlp/allennlp:latesttest-installIf you don't have GPUs available, just omit the--gpus allflag.Building your own Docker imageFor various reasons you may need to create your own AllenNLP Docker image, such as if you need a different version
of PyTorch. To do so, just runmake docker-imagefrom the root of your local clone of AllenNLP.By default this builds an image with the tagallennlp/allennlp, but you can change this to anything you want
by setting theDOCKER_IMAGE_NAMEflag when you callmake. For example,make docker-image DOCKER_IMAGE_NAME=my-allennlp.If you want to use a different version of Python or PyTorch, set the flagsDOCKER_PYTHON_VERSIONandDOCKER_TORCH_VERSIONto something like3.9and1.9.0-cuda10.2, respectively. These flags together determine the base image that is used. You can see the list of valid
combinations in this GitHub Container Registry:github.com/allenai/docker-images/pkgs/container/pytorch.After building the image you should be able to see it listed by runningdocker images allennlp.REPOSITORY TAG IMAGE ID CREATED SIZE
allennlp/allennlp latest b66aee6cb593 5 minutes ago 2.38GBInstalling from sourceYou can also install AllenNLP by cloning our git repository:gitclonehttps://github.com/allenai/allennlp.gitCreate a Python 3.7 or 3.8 virtual environment, and install AllenNLP ineditablemode by running:pipinstall-Upipsetuptoolswheel
pipinstall--editable.[dev,all]This will makeallennlpavailable on your system but it will use the sources from the local clone
you made of the source repository.You can test your installation withallennlp test-install.
Seehttps://github.com/allenai/allennlp-modelsfor instructions on installingallennlp-modelsfrom source.Running AllenNLPOnce you've installed AllenNLP, you can run the command-line interface
with theallennlpcommand (whether you installed frompipor from source).allennlphas various subcommands such astrain,evaluate, andpredict.
To see the full usage information, runallennlp --help.You can test your installation by runningallennlp test-install.IssuesEveryone is welcome to file issues with either feature requests, bug reports, or general questions. As a small team with our own internal goals, we may ask for contributions if a prompt fix doesn't fit into our roadmap. To keep things tidy we will often close issues we think are answered, but don't hesitate to follow up if further discussion is needed.ContributionsThe AllenNLP team at AI2 (@allenai) welcomes contributions from the community.
If you're a first time contributor, we recommend you start by reading ourCONTRIBUTING.mdguide.
Then have a look at our issues with the tagGood First Issue.If you would like to contribute a larger feature, we recommend first creating an issue with a proposed design for discussion. This will prevent you from spending significant time on an implementation which has a technical limitation someone could have pointed out early on. Small contributions can be made directly in a pull request.Pull requests (PRs) must have one approving review and no requested changes before they are merged. As AllenNLP is primarily driven by AI2 we reserve the right to reject or revert contributions that we don't think are good additions.CitingIf you use AllenNLP in your research, please citeAllenNLP: A Deep Semantic Natural Language Processing Platform.@inproceedings{Gardner2017AllenNLP,title={AllenNLP: A Deep Semantic Natural Language Processing Platform},author={Matt Gardner and Joel Grus and Mark Neumann and Oyvind Tafjordand Pradeep Dasigi and Nelson F. Liu and Matthew Peters andMichael Schmitz and Luke S. Zettlemoyer},year={2017},Eprint={arXiv:1803.07640},}TeamAllenNLP is an open-source project backed bythe Allen Institute for Artificial Intelligence (AI2).
AI2 is a non-profit institute with the mission to contribute to humanity through high-impact AI research and engineering.
To learn more about who specifically contributed to this codebase, seeour contributorspage.
|
allennlp-dataframe-mapper
|
AllenNLP integration for sklearn-pandasallennlp-dataframe-mapperis a Python library that providesAllenNLPintegration forsklearn-pandas.InstallationInstalling the library and dependencies is simple usingpip.$pipinstallallennlp-dataframe-mapperExampleThis library enables users to specify the in a jsonnet config file.
Here is an example of the mapper for a famousiris dataset.Configallennlp-dataframe-mapperis specified the transformations of the mapper injsonnetconfig file like followingmapper_iris.jsonnet:{"type":"default","features":[[["sepal length (cm)"],null],[["sepal width (cm)"],null],[["petal length (cm)"],null],[["petal width (cm)"],null],[["species"],[{"type":"flatten"},{"type":"label-encoder"}]],],"df_out":true,}MapperThe mapper takes a param of transformations from the config file.
We can use thefit_transformshortcut to both fit the mapper and see what transformed data.fromallennlp.commonimportParamsfromallennlp_dataframe_mapperimportDataFrameMapperparams=Params.from_file("mapper_iris.jsonnet")mapper=DataFrameMapper.from_params(params=params)print(mapper)# DataFrameMapper(df_out=True,# features=[(['sepal length (cm)'], None, {}),# (['sepal width (cm)'], None, {}),# (['petal length (cm)'], None, {}),# (['petal width (cm)'], None, {}),# (['species'], [FlattenTransformer(), LabelEncoder()], {})])mapper.fit_transform(df)LicenseMIT
|
allennlp-datalawyer
|
No description available on PyPI.
|
allennlp-hydra
|
AllenNLP-HydraPlugin ForAllenNLPthat enables
composing configs through the use of theHydra Library from Facebook Research.NOTEthere is no affiliation between this project and AllenNLP or the Allen
Institute for AI.We use the samecontributions guidelineas AllenNLP in order to maintain similar code styles. For this reasonour style
guideis
the same asthat found in their repository.Install InstructionsClone the repopipinstall.echoallennlp_hydra>>~.allennlp_pluginsThe second line addsallennlp-hydrato the allennlp plugins file so that it
can globally be recognized.Basic GuideSay you have the following directory structure:project
+-- conf
| +-- dataset_readers
| | +-- A.yaml
| | +-- B.yaml
| +-- models
| | +-- C.yaml
| | +-- D.yaml
| +-- config.yaml
+-- experimentsconf/dataset_readers/A.yaml:type: A
start_token: <s>
end_token: </s>conf/dataset_readers/B.yaml:type: B
start_token: [CLS]
end_token: [SEP]conf/models/C.yaml:type: C
layers: 5conf/models/D.yaml:type:Dinput_dim:10config.yamldefaults:
- dataset_reader: A
- model: C
debug: falseThen running the commandallennlpcomposeconfconfigexample-sexperimentsProduces the fileproject/experiments/config.json{"dataset_reader":{"type":"A","start_token":"<s>","end_token":"</s>"},"model":{"type":"C","layers":5},"debug":false}If you want to override the config and use theBdataset reader with theDmodel, you would modify the previous command:allennlpcomposeconfconfigexample-sexperiments-omodel=Ddataset_reader=BProduces the fileproject/experiments/config.json{"dataset_reader":{"type":"B","start_token":"[CLS]","end_token":"[SEP]"},"model":{"type":"D","input_dim":10},"debug":false}And if you wanted to changeinput_dimof modelDto 25:allennlpcomposeconfconfigexample-sexperiments-omodel=Ddataset_reader=Bmodel.input_dim=25Produces the fileproject/experiments/config.json{"dataset_reader":{"type":"B","start_token":"[CLS]","end_token":"[SEP]"},"model":{"type":"D","input_dim":25},"debug":false}
|
allennlp-light
|
allennlp-lightInstallationInstall PyTorch:pytorch.orgpip install allennlp-lightExample>>>fromallennlp_lightimportSeq2SeqEncoder>>>Seq2SeqEncoder.list_available()['compose','feedforward','gated-cnn-encoder','pass_through','gru','lstm','rnn','augmented_lstm','alternating_lstm','stacked_bidirectional_lstm','pytorch_transformer']AboutAsAllenNLP frameworkhonorably retires and will not update dependencies,allennlp-lightis a port of AllenNLP's awesomemodulesandnnportions into a standalone package with minimum dependencies.allennlp-lightnatively integrates withTango(check it out!) by using itsFromParams/Registrableso you get allennlp's components for free, registered, and ready to use. \The modules are thoroughlydocumentedandtestedin the originalAllenNLP repository.To learn how to use them, check the relevan section in theAllenNLP guide.AllenNLP is licensed under Apache 2 Licence, so please see below thecopyrightnotice and thelist of changes.CopyrightBelow is the copyright notice that applies to all source codes.Copyright 2017 The Allen Institute for Artificial Intelligence
Adapted by Maksym Del from https://github.com/allenai/allennlp/tree/8571d930fe6dc6291c6351c6e599576b007cf22f
SPDX-License-Identifier: Apache-2.0List of changesI kept the log of how I got from allennlp to allennlp-light.Copied with changes from
https://github.com/allenai/allennlp/tree/8571d930fe6dc6291c6351c6e599576b007cf22f
Only codes from allennlp/modules and allennlp/nn folders are copied.
The purpose is to integrate AllenNLP modules with the Tango project (https://github.com/allenai/tango).
The following is the list of the changes made to the AllenNLP original (allennlp/modules and allennlp/nn) files:
Removed files and folders:
- allennlp/modules/transformer
- allennlp/modules/token_embedders
- allennlp/modules/text_field_embedders
- allennlp/modules/backbones
- allennlp/modules/elmo.py
- allennlp/modules/elmo_lstm.py
- allennlp/nn/parallel
- allennlp/nn/checkpoint
- allennlp/nn/beam_search.py
- allennlp/nn/module.py
Removed from the nn/util.py file:
- line: from itertools import chain
- line: import torch.distributed as dist
- line: from allennlp.common.util import int_to_device, is_distributed, is_global_primary
- func: find_text_field_embedder
- func: find_embedding_layer
- func: move_to_device
- func: distributed_device
- line: _V = TypeVar("_V", int, float, torch.Tensor)
- func: dist_reduce
- func: dist_reduce_sum
- func: _collect_state_dict
- func: load_state_dict_distributed
- func: _broadcast_params
- class: _IncompatibleKeys
- func: _check_incompatible_keys
Removed from the nn/__init__.py file:
- line: from allennlp.nn.module import Module
Removed/added from/to the modules/__init__.py file:
- line: from allennlp.modules.backbones import Backbone
- line: from allennlp.modules.elmo import Elmo
- line: from allennlp.modules.text_field_embedders import TextFieldEmbedder
- line: from allennlp.modules.token_embedders import TokenEmbedder, Embedding
+ line: from allennlp.modules.span_extractors import SpanExtractor
Removed/added from/to the modules/span_extractors/span_extractor_with_span_width_embedding.py file:
- from allennlp.modules.token_embedders.embedding import Embedding
+ from torch.nn import Embedding
Removed from /nn/initializers.py file:
- class: PretrainedModelInitializer
Renamed across all files and folders:
* from allennlp.common.checks import ConfigurationError -> from tango.common.exceptions import ConfigurationError
* from allennlp.common -> from tango.common // this line redirects imports of Registrable and FromParams classes to Tango versions
* allennlp -> allennlp-light
|
allennlp-models
|
Officially supported AllenNLP models.❗️ To file an issue, please open a ticket onallenai/allennlpand tag it with "Models". ❗️⚠️NOTICE:The AllenNLP ecosystem is now in maintenance mode. That means we are no longer adding new features or upgrading dependencies. We will still respond to questions and address bugs as they arise up until December 16th, 2022.In this READMEAboutTasks and componentsPre-trained modelsInstallingFrom PyPIFrom sourceUsing DockerAboutThis repository contains the components - such asDatasetReader,Model, andPredictorclasses - for applyingAllenNLPto a wide variety of NLPtasks.
It also provides an easy way to download and usepre-trained modelsthat were trained with these components.Tasks and componentsThis is an overview of the tasks supported by the AllenNLP Models library along with the corresponding components provided, organized by category. For a more comprehensive overview, see theAllenNLP Models documentationor thePaperswithcode page.ClassificationClassification tasks involve predicting one or more labels from a predefined set to assign to each input. Examples include Sentiment Analysis, where the labels might be{"positive", "negative", "neutral"}, and Binary Question Answering, where the labels are{True, False}.🛠Components provided:Dataset readers for various datasets, includingBoolQandSST, as well as aBiattentive Classification Networkmodel.Coreference ResolutionCoreference resolution tasks require finding all of the expressions in a text that refer to common entities.Seenlp.stanford.edu/projects/coreffor more details.🛠Components provided:A generalCorefmodel and several dataset readers.GenerationThis is a broad category for tasks such as Summarization that involve generating unstructered and often variable-length text.🛠Components provided:Several Seq2Seq models such aBart,CopyNet, and a generalComposed Seq2Seq, along with corresponding dataset readers.Language ModelingLanguage modeling tasks involve learning a probability distribution over sequences of tokens.🛠Components provided:Several language model implementations, such as aMasked LMand aNext Token LM.Multiple ChoiceMultiple choice tasks require selecting a correct choice among alternatives, where the set of choices may be different for each input. This differs from classification where the set of choices is predefined and fixed across all inputs.🛠Components provided:Atransformer-based multiple choice modeland a handful of dataset readers for specific datasets.Pair ClassificationPair classification is another broad category that contains tasks such as Textual Entailment, which is to determine whether, for a pair of sentences, the facts in the first sentence imply the facts in the second.🛠Components provided:Dataset readers for several datasets, includingSNLIandQuora Paraphrase.Reading ComprehensionReading comprehension tasks involve answering questions about a passage of text to show that the system understands the passage.🛠Components provided:Models such asBiDAFand atransformer-based QA model, as well as readers for datasets such asDROP,QuAC, andSQuAD.Structured PredictionStructured prediction includes tasks such as Semantic Role Labeling (SRL), which is for determining the latent predicate argument structure of a sentence and providing representations that can answer basic questions about sentence meaning, including who did what to whom, etc.🛠Components provided:Dataset readers forPenn Tree Bank,OntoNotes, etc., and several models including one forSRLand a very generalgraph parser.Sequence TaggingSequence tagging tasks include Named Entity Recognition (NER) and Fine-grained NER.🛠Components provided:AConditional Random Field modeland dataset readers for datasets such asCoNLL-2000,CoNLL-2003,CCGbank, andOntoNotes.Text + VisionThis is a catch-all category for any text + vision multi-modal tasks such Visual Question Answering (VQA), the task of generating a answer in response to a natural language question about the contents of an image.🛠Components provided:Several models such as aViLBERT model for VQAand one forVisual Entailment, along with corresponding dataset readers.Pre-trained modelsEvery pretrained model in AllenNLP Models has a correspondingModelCardin theallennlp_models/modelcards/folder.
Many of these models are also hosted on theAllenNLP Demoand theAllenNLP Project Gallery.To programmatically list the available models, you can run the following from a Python session:>>>fromallennlp_modelsimportpretrained>>>print(pretrained.get_pretrained_models())The output is a dictionary that maps the model IDs to theirModelCard:{'structured-prediction-srl-bert': <allennlp.common.model_card.ModelCard object at 0x14a705a30>, ...}You can load aPredictorfor any of these models with thepretrained.load_predictor()helper.
For example:>>>pretrained.load_predictor("mc-roberta-swag")Here is a list of pre-trained models currently available.coref-spanbert- Higher-order coref with coarse-to-fine inference (with SpanBERT embeddings).evaluate_rc-lerc- A BERT model that scores candidate answers from 0 to 1.generation-bart- BART with a language model head for generation.glove-sst- LSTM binary classifier with GloVe embeddings.lm-masked-language-model- BERT-based masked language modellm-next-token-lm-gpt2- OpenAI's GPT-2 language model that generates the next token.mc-roberta-commonsenseqa- RoBERTa-based multiple choice model for CommonSenseQA.mc-roberta-piqa- RoBERTa-based multiple choice model for PIQA.mc-roberta-swag- RoBERTa-based multiple choice model for SWAG.nlvr2-vilbert- ViLBERT-based model for Visual Entailment.nlvr2-vilbert- ViLBERT-based model for Visual Entailment.pair-classification-adversarial-binary-gender-bias-mitigated-roberta-snli- RoBERTa finetuned on SNLI with adversarial binary gender bias mitigation.pair-classification-binary-gender-bias-mitigated-roberta-snli- RoBERTa finetuned on SNLI with binary gender bias mitigation.pair-classification-decomposable-attention-elmo- The decomposable attention model (Parikh et al, 2017) combined with ELMo embeddings trained on SNLI.pair-classification-esim- Enhanced LSTM trained on SNLI.pair-classification-roberta-mnli- RoBERTa finetuned on MNLI.pair-classification-roberta-rte- A pair classification model patterned after the proposed model in Devlin et al, fine-tuned on the SuperGLUE RTE corpuspair-classification-roberta-snli- RoBERTa finetuned on SNLI.rc-bidaf-elmo- BiDAF model with ELMo embeddings instead of GloVe.rc-bidaf- BiDAF model with GloVe embeddings.rc-naqanet- An augmented version of QANet that adds rudimentary numerical reasoning ability, trained on DROP (Dua et al., 2019), as published in the original DROP paper.rc-nmn- A neural module network trained on DROP.rc-transformer-qa- A reading comprehension model patterned after the proposed model in Devlin et al, with improvements borrowed from the SQuAD model in the transformers projectroberta-sst- RoBERTa-based binary classifier for Stanford Sentiment Treebanksemparse-nlvr- The model is a semantic parser trained on Cornell NLVR.semparse-text-to-sql- This model is an implementation of an encoder-decoder architecture with LSTMs and constrained type decoding trained on the ATIS dataset.semparse-wikitables- The model is a semantic parser trained on WikiTableQuestions.structured-prediction-biaffine-parser- A neural model for dependency parsing using biaffine classifiers on top of a bidirectional LSTM.structured-prediction-constituency-parser- Constituency parser with character-based ELMo embeddingsstructured-prediction-srl-bert- A BERT based model (Shi et al, 2019) with some modifications (no additional parameters apart from a linear classification layer)structured-prediction-srl- A reimplementation of a deep BiLSTM sequence prediction model (Stanovsky et al., 2018)tagging-elmo-crf-tagger- NER tagger using a Gated Recurrent Unit (GRU) character encoder as well as a GRU phrase encoder, with GloVe embeddings.tagging-fine-grained-crf-tagger- This model identifies a broad range of 16 semantic types in the input text. It is a reimplementation of Lample (2016) and uses a biLSTM with a CRF layer, character embeddings and ELMo embeddings.tagging-fine-grained-transformer-crf-tagger- Fine-grained NER modelve-vilbert- ViLBERT-based model for Visual Entailment.vgqa-vilbert- ViLBERT (short for Vision-and-Language BERT), is a model for learning task-agnostic joint representations of image content and natural language.vqa-vilbert- ViLBERT (short for Vision-and-Language BERT), is a model for learning task-agnostic joint representations of image content and natural language.InstallingFrom PyPIallennlp-modelsis available on PyPI. To install withpip, just runpipinstallallennlp-modelsNote that theallennlp-modelspackage is tied to theallennlpcore package. Therefore when you install the models package you will get the corresponding version ofallennlp(if you haven't already installedallennlp). For example,pipinstallallennlp-models==2.2.0
pipfreeze|grepallennlp# > allennlp==2.2.0# > allennlp-models==2.2.0From sourceIf you intend to install the models package from source, then you probably also want toinstallallennlpfrom source.
Once you haveallennlpinstalled, run the following within the same Python environment:gitclonehttps://github.com/allenai/allennlp-models.gitcdallennlp-modelsALLENNLP_VERSION_OVERRIDE='allennlp'pipinstall-e.
pipinstall-rdev-requirements.txtTheALLENNLP_VERSION_OVERRIDEenvironment variable ensures that theallennlpdependency is unpinned so that your local install ofallennlpwill be sufficient. If, however, you haven't installedallennlpyet and don't want to manage a local install, just omit this environment variable andallennlpwill be installed from the main branch on GitHub.Bothallennlpandallennlp-modelsare developed and tested side-by-side, so they should be kept up-to-date with each other. If you look at the GitHub Actionsworkflow forallennlp-models, it's always tested against the main branch ofallennlp. Similarly,allennlpis always tested against the main branch ofallennlp-models.Using DockerDocker provides a virtual machine with everything set up to run AllenNLP--
whether you will leverage a GPU or just run on a CPU. Docker provides more
isolation and consistency, and also makes it easy to distribute your
environment to a compute cluster.Once you haveinstalled Dockeryou can either use aprebuilt image from a releaseor build an image locally with any version ofallennlpandallennlp-models.If you have GPUs available, you also need to install thenvidia-dockerruntime.To build an image locally from a specific release, rundockerbuild\--build-argRELEASE=1.2.2\--build-argCUDA=10.2\-tallennlp/models-<Dockerfile.releaseJust replace theRELEASEandCUDAbuild args with what you need. You can checkthe available tagson Docker Hub to see which CUDA versions are available for a givenRELEASE.Alternatively, you can build against specific commits ofallennlpandallennlp-modelswithdockerbuild\--build-argALLENNLP_COMMIT=d823a2591e94912a6315e429d0fe0ee2efb4b3ee\--build-argALLENNLP_MODELS_COMMIT=01bc777e0d89387f03037d398cd967390716daf1\--build-argCUDA=10.2\-tallennlp/models-<Dockerfile.commitJust change theALLENNLP_COMMIT/ALLENNLP_MODELS_COMMITandCUDAbuild args to the desired commit SHAs and CUDA versions, respectively.Once you've built your image, you can run it like this:mkdir-p$HOME/.allennlp/
dockerrun--rm--gpusall-v$HOME/.allennlp:/root/.allennlpallennlp/modelsNote: the--gpus allis only valid if you've installed the nvidia-docker runtime.
|
allennlp-optuna
|
allennlp-optuna: Hyperparameter Optimization Library for AllenNLPallennlp-optunaisAllenNLPplugin for
hyperparameter optimization usingOptuna.Supported environmentsMachine \ DeviceSingle GPUMulti GPUsSingle Node:white_check_mark:PartialMulti Nodes:white_check_mark:PartialAllenNLP provides a way of distributed training (https://medium.com/ai2-blog/c4d7c17eb6d6).
Unfortunately,allennlp-optunadoesn't fully support this feature.
With multiple GPUs, you can run hyperparameter optimization.
But you cannot enable a pruning feature.
(For more detail, please seehimkt/allennlp-optuna#20andoptuna/optuna#1990)Alternatively,allennlp-optunasupports distributed optimization with multiple machines.
Please read thetutorialabout
distributed optimization inallennlp-optuna.
You can also learn about a mechanism of Optuna in thepaperordocumentation.DocumentationYou can read the documentation onreadthedocs.1. Installationpipinstallallennlp_optuna# Create .allennlp_plugins at the top of your repository or $HOME/.allennlp/plugins# For more information, please see https://github.com/allenai/allennlp#pluginsecho'allennlp_optuna'>>.allennlp_plugins2. Optimization2.1. AllenNLP configModel configuration written in Jsonnet.You have to replace values of hyperparameters with jsonnet functionstd.extVar.
Remember casting external variables to desired types bystd.parseInt,std.parseJson.locallr=0.1;// before↓↓↓locallr=std.parseJson(std.extVar('lr'));// afterFor more information, please refer toAllenNLP Guide.2.2. Define hyperparameter search speacesYou can define search space in Json.Each hyperparameter config must havetypeandkeyword.
You can see what parameters are available for each hyperparameter inOptuna API reference.[{"type":"int","attributes":{"name":"embedding_dim","low":64,"high":128}},{"type":"int","attributes":{"name":"max_filter_size","low":2,"high":5}},{"type":"int","attributes":{"name":"num_filters","low":64,"high":256}},{"type":"int","attributes":{"name":"output_dim","low":64,"high":256}},{"type":"float","attributes":{"name":"dropout","low":0.0,"high":0.5}},{"type":"float","attributes":{"name":"lr","low":5e-3,"high":5e-1,"log":true}}]Parameters forsuggest_#{type}are available for config oftype=#{type}. (e.g. whentype=float,
you can see the available parameters insuggest_floatPlease see theexamplein detail.2.3. Optimize hyperparameters by allennlp cliallennlptune\config/imdb_optuna.jsonnet\config/hparams.json\--serialization-dirresult/hpo\--study-nametestOptionally, you can specify the metrics and direction you are optimizing for:allennlptune\config/imdb_optuna.jsonnet\config/hparams.json\--serialization-dirresult/hpo\--study-nametest\--metricsbest_validation_accuracy\--directionmaximize2.4. [Optional] Specify Optuna configurationsYou can choose a pruner/sample implemented in Optuna.
To specify a pruner/sampler, create a JSON config fileThe example ofoptuna.jsonlooks like:{"pruner":{"type":"HyperbandPruner","attributes":{"min_resource":1,"reduction_factor":5}},"sampler":{"type":"TPESampler","attributes":{"n_startup_trials":5}}}And add a epoch callback to your configuration.
(https://guide.allennlp.org/hyperparameter-optimization#6)callbacks: [
{
type: 'optuna_pruner',
}
],config/imdb_optuna.jsonnetis a simple configuration for allennlp-optunaconfig/imdb_optuna_with_pruning.jsonnetis a configuration using Optuna pruner (and TPEsampler)$diffconfig/imdb_optuna.jsonnetconfig/imdb_optuna_with_pruning.jsonnet
32d31
<datasets_for_vocab_creation:['train'],
58a58,62
>callbacks:[>{>type:'optuna_pruner',
>}>],Then, you can use a pruning callback by running following:allennlptune\config/imdb_optuna_with_pruning.jsonnet\config/hparams.json\--optuna-param-pathconfig/optuna.json\--serialization-dirresult/hpo_with_optuna_config\--study-nametest_with_pruning3. Get best hyperparametersallennlpbest-params\--study-nametest4. Retrain a model with optimized hyperparametersallennlpretrain\config/imdb_optuna.jsonnet\--serialization-dirretrain_result\--study-nametest5. Hyperparameter optimization at scale!you can run optimizations in parallel.
You can easily run distributed optimization by adding an option--skip-if-existstoallennlp tunecommand.allennlp tune \
config/imdb_optuna.jsonnet \
config/hparams.json \
--optuna-param-path config/optuna.json \
--serialization-dir result \
--study-name test \
--skip-if-existsallennlp-optuna uses SQLite as a default storage for storing results.
You can easily run distributed optimizationover machinesby using MySQL or PostgreSQL as a storage.For example, if you want to use MySQL as a storage,
the command should be like following:allennlp tune \
config/imdb_optuna.jsonnet \
config/hparams.json \
--optuna-param-path config/optuna.json \
--serialization-dir result \
--study-name test \
--storage mysql://<user_name>:<passwd>@<db_host>/<db_name> \
--skip-if-existsYou can run the above command on each machine to
run multi-node distributed optimization.If you want to know about a mechanism of Optuna distributed optimization,
please see the official documentation:https://optuna.readthedocs.io/en/latest/tutorial/10_key_features/004_distributed.htmlReferenceCookpad Techlife (in Japanese):https://techlife.cookpad.com/entry/2020/11/06/110000allennlp-optunais used for optimizing hyperparameter of NER model
|
allennlp-pvt-nightly
|
AnApache 2.0NLP research library, built on PyTorch,
for developing state-of-the-art deep learning models on a wide variety of linguistic tasks.Quick LinksWebsiteTutorialForumDocumentationContributing GuidelinesModel ListContinuous BuildPackage Overviewallennlpan open-source NLP research library, built on PyTorchallennlp.commandsfunctionality for a CLI and web serviceallennlp.dataa data processing module for loading datasets and encoding strings as integers for representation in matricesallennlp.modelsa collection of state-of-the-art modelsallennlp.modulesa collection of PyTorch modules for use with textallennlp.nntensor utility functions, such as initializers and activation functionsallennlp.servicea web server to that can serve demos for your modelsallennlp.trainingfunctionality for training modelsInstallationAllenNLP requires Python 3.6.1 or later. The preferred way to install AllenNLP is viapip. Just runpip install allennlpin your Python environment and you're good to go!If you need pointers on setting up an appropriate Python environment or would like to install AllenNLP using a different method, see below.Windows is currently not officially supported, although we try to fix issues when they are easily addressed.Installing via pipSetting up a virtual environmentCondacan be used set up a virtual environment with the
version of Python required for AllenNLP. If you already have a Python 3.6 or 3.7
environment you want to use, you can skip to the 'installing via pip' section.Download and install Conda.Create a Conda environment with Python 3.6condacreate-nallennlppython=3.6Activate the Conda environment. You will need to activate the Conda environment in each terminal in which you want to use AllenNLP.condaactivateallennlpInstalling the library and dependenciesInstalling the library and dependencies is simple usingpip.pipinstallallennlpThat's it! You're now ready to build and train AllenNLP models.
AllenNLP installs a script when you install the python package, meaning you can run allennlp commands just by typingallennlpinto a terminal.You can now test your installation withallennlp test-install.pipcurrently installs Pytorch for CUDA 9 only (or no GPU). If you require an older version,
please visithttps://pytorch.org/and install the relevant pytorch binary.Installing using DockerDocker provides a virtual machine with everything set up to run AllenNLP--
whether you will leverage a GPU or just run on a CPU. Docker provides more
isolation and consistency, and also makes it easy to distribute your
environment to a compute cluster.Once you haveinstalled Dockerjust run the following command to get an environment that will run on either the cpu or gpu.mkdir-p$HOME/.allennlp/
dockerrun--rm-v$HOME/.allennlp:/root/.allennlpallennlp/allennlp:v0.9.0You can test the Docker environment withdocker run --rm -v $HOME/.allennlp:/root/.allennlp allennlp/allennlp:v0.9.0 test-install.Installing from sourceYou can also install AllenNLP by cloning our git repository:gitclonehttps://github.com/allenai/allennlp.gitCreate a Python 3.6 virtual environment, and install AllenNLP ineditablemode by running:pipinstall--editable.This will makeallennlpavailable on your system but it will use the sources from the local clone
you made of the source repository.You can test your installation withallennlp test-install.
The full development environment also requires the JVM andperl,
which must be installed separately../scripts/verify.pywill run
the full suite of tests used by our continuous build environment.Running AllenNLPOnce you've installed AllenNLP, you can run the command-line interface either
with theallennlpcommand (if you installed viapip) orallennlp(if you installed via source).$ allennlp
Run AllenNLP
optional arguments:
-h, --help show this help message and exit
--version show program's version number and exit
Commands:
configure Run the configuration wizard.
train Train a model.
evaluate Evaluate the specified model + dataset.
predict Use a trained model to make predictions.
make-vocab Create a vocabulary.
elmo Create word vectors using a pretrained ELMo model.
fine-tune Continue training a model on a new dataset.
dry-run Create a vocabulary, compute dataset statistics and other
training utilities.
test-install
Run the unit tests.
find-lr Find a learning rate range.Docker imagesAllenNLP releases Docker images toDocker Hubfor each release. For information on how to run these releases, seeInstalling using Docker.Building a Docker imageFor various reasons you may need to create your own AllenNLP Docker image.
The same image can be used either with a CPU or a GPU.First, you need toinstall Docker.
Then run the following command
(it will take some time, as it completely builds the
environment needed to run AllenNLP.)dockerbuild-fDockerfile.pip--tagallennlp/allennlp:latest.You should now be able to see this image listed by runningdocker images allennlp.REPOSITORY TAG IMAGE ID CREATED SIZE
allennlp/allennlp latest b66aee6cb593 5 minutes ago 2.38GBRunning the Docker imageYou can run the image withdocker run --rm -it allennlp/allennlp:latest. The--rmflag cleans up the image on exit and the-itflags make the session interactive so you can use the bash shell the Docker image starts.You can test your installation by runningallennlp test-install.IssuesEveryone is welcome to file issues with either feature requests, bug reports, or general questions. As a small team with our own internal goals, we may ask for contributions if a prompt fix doesn't fit into our roadmap. We allow users a two week window to follow up on questions, after which we will close issues. They can be re-opened if there is further discussion.ContributionsThe AllenNLP team at AI2 (@allenai) welcomes contributions from the greater AllenNLP community, and, if you would like to get a change into the library, this is likely the fastest approach. If you would like to contribute a larger feature, we recommend first creating an issue with a proposed design for discussion. This will prevent you from spending significant time on an implementation which has a technical limitation someone could have pointed out early on. Small contributions can be made directly in a pull request.Pull requests (PRs) must have one approving review and no requested changes before they are merged. As AllenNLP is primarily driven by AI2 (@allenai) we reserve the right to reject or revert contributions that we don't think are good additions.CitingIf you use AllenNLP in your research, please citeAllenNLP: A Deep Semantic Natural Language Processing Platform.@inproceedings{Gardner2017AllenNLP,title={AllenNLP: A Deep Semantic Natural Language Processing Platform},author={Matt Gardner and Joel Grus and Mark Neumann and Oyvind Tafjordand Pradeep Dasigi and Nelson F. Liu and Matthew Peters andMichael Schmitz and Luke S. Zettlemoyer},year={2017},Eprint={arXiv:1803.07640},}TeamAllenNLP is an open-source project backed bythe Allen Institute for Artificial Intelligence (AI2).
AI2 is a non-profit institute with the mission to contribute to humanity through high-impact AI research and engineering.
To learn more about who specifically contributed to this codebase, seeour contributorspage.
|
allennlp-runmodel
|
allennlp-runmodelRun aAllenNLPtrained model, and serve it with WebAPI.UsageRun the programExecute the program in terminator, the option--helpwill show help message:$allennlp-runmodel--helpUsage: allennlp-runmodel [OPTIONS] COMMAND1 [ARGS]... [COMMAND2 [ARGS]...]...Start a webservice for running AllenNLP models.Options:-V, --version-h, --host TEXT TCP/IP host for HTTP server. [default:localhost]-p, --port INTEGER TCP/IP port for HTTP server. [default:8000]-a, --path TEXT File system path for HTTP server Unix domainsocket. Listening on Unix domain sockets isnot supported by all operating systems.-l, --logging-config FILE Path to logging configuration file (JSON,YAML or INI) (ref: https://docs.python.org/library/logging.config.html#logging-config-dictschema)-v, --logging-level [critical|fatal|error|warn|warning|info|debug|notset]Sets the logging level, only affected when`--logging-config` not specified. [default:info]--help Show this message and exit.Commands:load Load a pre-trained AllenNLP model from it's archive file, and putit...and$allennlp-runmodelload--help
Usage:allennlp-runmodelload[OPTIONS]ARCHIVELoadapre-trainedAllenNLPmodelfromit'sarchivefile,andputitintothewebservicecontrainer.
Options:-m,--model-nameTEXTModelnameusedinURL.eg:http://xxx.xxx.xxx.xxx:8000/?model=model_name-t,--num-threadsINTEGERSetsthenumberofOpenMPthreadsusedforparallelizingCPUoperations.[default:4(onthismachine)]-w,--max-workersINTEGERUsesapoolofatmostmax_workersthreadstoexecutecallsasynchronously.[default:num_threads/cpu_count(1onthismachine)]-w,--worker-type[process|thread]Setstheworkersexecuteinthreadorprocess.[default:process]-d,--cuda-deviceINTEGERIfCUDA_DEVICEis>=0,themodelwillbeloadedontothecorrespondingGPU.OtherwiseitwillbeloadedontotheCPU.[default:-1]-e,--predictor-nameTEXTOptionallyspecifywhich`Predictor`subclass;otherwise,thedefaultoneforthemodelwillbeused.--helpShowthismessageandexit.loadsub-command can be called many times to load multiple models.eg:allennlp-runmodel--port8080load--model-namemodel1/path/of/model1.tar.gzload--model-namemodel2/path/of/model2.tar.gzMake prediction from HTTP clientcurl\--header"Content-Type: application/json"\--requestPOST\--data'{"premise":"Two women are embracing while holding to go packages.","hypothesis":"The sisters are hugging goodbye while holding to go packages after just eating lunch."}'\http://localhost:8080/?model=model1
|
allennlp-semparse
|
allennlp-semparseA framework for building semantic parsers (including neural module networks) with AllenNLP, built by the authors of AllenNLPInstallingallennlp-semparseis available on PyPI. You can install throughpipwithpip install allennlp-semparseSupported datasetsATISText2SQLNLVRWikiTableQuestionsSupported modelsGrammar-based decoding models, following the parser originally introduced inNeural
Semantic Parsing with Type Constraints for Semi-Structured
Tables.
The models that are currently checked in are all based on this parser, applied to various datasets.Neural module networks. We don't have models checked in for this yet, butDomainLanguagesupports defining them, and we will add some models to the repo once papers go through peer
review. The code is slow (batching is hard), but it works.TutorialsComing sometime in the future... You can look atthis old
tutorial,
but the part about using NLTK to define a grammar is outdated. Now you can useDomainLanguageto
define a python executor, and we analyze the type annotations in the functions in that executor to
automatically infer a grammar for you. It is much easier to use than it used to be. Until we get
around to writing a better tutorial for this, the best way to get started using this is to look at
some examples. The simplest is theArithmetic
languagein theDomainLanguagetest (there's also a bit of description in theDomainLanguagedocstring).
After looking at those, you can look at more complex (real) examples in thedomain_languagesmodule.
Note that the executor you define can havelearned parameters, making it a neural module network.
The best place to get an example of that is currentlythis unfinished implementation of N2NMNs on
the CLEVR
dataset.
We'll have more examples of doing this in the not-too-distant future.
|
allennlp-server
|
A demo server for AllenNLP models.❗️ To file an issue, please open a ticket onallenai/allennlpand tag it with "Server". ❗️InstallationFrom PyPIallennlp-serveris available on PyPI. To install withpip, just runpipinstallallennlp-serverNote that theallennlp-serverpackage is tied to theallennlpcore packageandallennlp-modelspackage. Therefore when you install the server package you will get the latest compatible version ofallennlpandallennlp-models(if you haven't already installedallennlporallennlp-models). For example,pipinstallallennlp-server
pipfreeze|grepallennlp# > allennlp==2.2.0# > allennlp-models==2.2.0# > allennlp-server==1.0.0From sourceYou can install AllenNLP Server by cloning our git repository:gitclonehttps://github.com/allenai/allennlp-serverCreate a Python 3.8 virtual environment, and install AllenNLP Server ineditablemode by running:pipinstall--editable.Running AllenNLP ServerAllenNLP Server is a plugin for AllenNLP which adds a "serve" subcommand:allennlpserve--help
|
allennlp-shiba
|
Allennlp Integration forShibaallennlp-shiab-modelis a Python library that provides AllenNLP integration forshiba-model.SHIBA is an approximate reimplementation of CANINE[1]in raw Pytorch, pretrained on the Japanese wikipedia corpus using random span masking. If you are unfamiliar with CANINE, you can think of it as a very efficient (approximately 4x as efficient) character-level BERT model. Of course, the name SHIBA comes from the identically named Japanese canine.InstallationInstalling the library and dependencies is simple usingpip.pipinstallallennlp-shibaExampleThis library enables users to specify the in a jsonnet config file. Here is an example of the model in jsonnet config file:{"dataset_reader":{"tokenizer":{"type":"shiba",},"token_indexers":{"tokens":{"type":"shiba",}},},"model":{"shiba_embedder":{"type":"basic","token_embedders":{"shiba":{"type":"shiba","eval_model":true,}}}}}ReferenceJoshua Tanner and Masato Hagiwara (2021).SHIBA: Japanese CANINE model. GitHub repository, GitHub.
|
allennlp-utils
|
No description available on PyPI.
|
allennlp-wordsplitter-corenlp
|
allennlp_wordsplitter_corenlpAdd aCoreNLPWordSplitterintoAllenNLP's tokenizers.config{"dataset_reader":{// ... ..."tokenizer":{"word_splitter":{"type":"corenlp_remote","url":"http://10.1.1.174:9000"}},// ... ...},// ... ...}CLIallennlptrain--include-packageallennlp_wordsplitter_corenlp-s/your/output/dir/your/training/config/file
|
allennlp-wordsplitter-ltp
|
allennlp_wordsplitter_ltpnlpAdd aLTPWordSplitterintoAllenNLP's tokenizers.config{"dataset_reader":{// ... ..."tokenizer":{"word_splitter":{"type":"ltp_remote","url":"http://10.1.1.174:12345/ltp"}},// ... ...},// ... ...}CLIallennlptrain--include-packageallennlp_wordsplitter_ltp-s/your/output/dir/your/training/config/file
|
allenpoly
|
AllenpolyExtension of AllenNLP that allows to train models in Polyaxon cluster.Local usage:$ export POLYAXON_NO_OP=true
$ allenpoly train config.json --include-package your_package --serialization_dir ./experiment_dir/Polyaxon cluster usage:Example experiment file:...
run:
cmd: allenpoly train config.json --include-package your_package --serialization_dir $POLYAXON_RUN_OUTPUTS_PATHExample of config.json:trainer: {
type: 'callback',
...
callbacks: [{
"type": "poly_track_metrics", # Used in place of `track_metrics`
...
}]
}
|
allen-py-client
|
AllenPyClient is an unofficial Python wrapper to develop applications integrating Allen’s official web API.⏩ Quick ExampleIn this example, we will fetch the links of the videos available to us.main.pyfromallenimportAllenClientimportosenv=os.environuser=env['user']passwd=env['passwd']client=AllenClient(username=user,password=passwd)videos=client.get_recorded_videos()forvideoinvideos:link=video.get_link()# Print the video link with the subject name and recording dateprint(f'{video.subject_name}({video.get_recording_date()}) -{link}')You can also use the library from a command line.$ allen help
$ allen videos👩🏫 Installationpip install allen-py-client📈 Required Python ModulesThe list of required python modules can be found in therequirements.txtfile.📜 DocumentationTo view the documentation for this project, visit thedocumentation page.
|
allens-assignment
|
Creating a simple list of calculation functions that takes variable input puts (two inputs or one input) depending on what operation is required.Objective: Test Allen’s AssingmentChange Log0.0.1 (14/03/2023)-First Test Release
|
allensdk
|
No description available on PyPI.
|
allen-s-interval-algebra
|
No description available on PyPI.
|
allen-ytconcate
|
"# yt-concate"
|
alles-apin
|
No description available on PyPI.
|
allescacher
|
Like @functools.cache / @functools.lru_cache but with non-hashable objectsTested against Windows 10 / Python 3.11 / Anacondapip install allescacherCache Everything DecoratorThis module provides a decoratorcache_everythingthat can be used to cache the results of function calls.
It uses a dictionary to store cached results and allows
customization of cache size and eviction strategy.
Unlike some caching mechanisms that rely on hashable arguments,
the "cache_everything" decorator accepts a wide range
of argument types, including non-hashable objects,
complex data structures, and even functions as arguments.
This means you can cache the results of functions that
operate on mutable or unhashable input data,
making it suitable for a broader set of use cases.
For example, if your function operates on lists,
dictionaries, or custom objects, you can still
apply the decorator without the need to convert
these inputs into hashable forms. This flexibility simplifies
the caching process and allows you to cache results
efficiently for functions that work with diverse and
potentially non-hashable data.Usage:Tocachetheresultsofafunction,decorateitwith`@cache_everything`.Example:importnumpyasnpimportrandomfromallescacherimportcache_everything,cache_dict_modulecache_dict_module.maxsize=Nonecache_dict_module.del_min_used=True@cache_everythingdefgetnparray(l):returnnp.array(l)/10*3done=[]for_inrange(1000):done.append(getnparray([random.randint(0,10)forxinrange(random.randint(1,5))]))# Clear the cache for the 'getnparray' functioncache_dict_module.cache_dict[getnparray.__qualname__].clear()ModuleVariables:-`cache_dict_module`:Amodule-levelvariableusedtostorethecachedictionary.-`cache_dict_module.cache_dict`:Thecachedictionarywherecachedresultsarestored.-`cache_dict_module.maxsize`:Themaximumsizeofthecache(Noneforunlimited).-`cache_dict_module.del_min_used`:Aflagtodeterminewhethertoevicttheleast-usedcacheentry.Decorator:-`@cache_everything`:Decoratesafunctiontoenablecachingofitsresults.Functions:-`cache_everything(f_py=None)`:Thedecoratorfunctionthatcanbeusedtocachefunctionresults.Thismoduleprovidesaflexiblecachingmechanismthatcanbeappliedtofunctionstoimproveperformancebyretrievingcachedresultsforknowninputarguments,reducingtheneedforredundantcomputations.
|
all-escapes
|
Registers a codec for representing binary escapes in text domain.>>>b"Hello, World!".decode("all-escapes")'\\x48\\x65\\x6c\\x6c\\x6f\\x2c\\x20\\x57\\x6f\\x72\\x6c\\x64\\x21'>>>r"\x48\x65\x6c\x6c\x6f\x2c\x20\x57\x6f\x72\x6c\x64\x21".encode("all-escapes")b'Hello, World!'
|
allesfitter
|
No description available on PyPI.
|
allesLib
|
No description available on PyPI.
|
allestm
|
AllesTM - Predicting various structural features of transmembrane proteins.AllesTM is an integrated tool to predict almost all structural features of
transmembrane proteins that can be extracted from atomic coordinate
data. It blends several machine learning algorithms: random forests and
gradient boosting machines, convolutional neural networks in their
original form as well as those enhanced by dilated convolutions and
residual connections, and, finally, long short-term memory architectures.PrerequisitesInstalling and running HHblitsAllesTM uses a multiple sequence alignment in a3m format as input which has
first to be created by HHblits, a database search tool.
HHblits and detailed installation instructions can be found on itsGitHub page.Here is a short extract:git clone https://github.com/soedinglab/hh-suite.git
mkdir -p hh-suite/build && cd hh-suite/build
cmake -DCMAKE_INSTALL_PREFIX=. ..
make -j 4 && make installAfter installation, a database can be downloaded fromhere. Make sure you check for the lastest versionhere.After extracting the database usingtar -xvf uniclust30_2018_08_hhsuite.tar.gz, HHblits can be run with the following command:hhblits -i infile.fasta -o output.hhr -oa3m msa.a3m -d PATH_TO_DB/uniclust30_2018_08/uniclust30_2018_08, -maxfilt 99999999Themaxfiltoption is important to include all hits, themsa.a3moutput
file will serve as input for AllesTM.Computing requirementsAllesTM uses more than 100 different trained models and some of them are quite
large. The tool was tested on a machine with 16 GB RAM which is the minimum for
it to work. If you experience issues and have a machine with 'only' 16 GB of
RAM, consider closing all other programs you have running.During the first run, all models will be downloaded as they are not included in
the package. The download size in total
will be about 11 GB, therefore make sure that you have a fast internet
connection during that first run. Just to clarify, after the models are
downloaded and AllesTM finds them this download does not have to be repeated.InstallationFrom PyPIThe easiest way to install AllesTM is by typingpip install --user allestmIf python and pip is installed, this will get the necessary dependencies and AllesTM itself installed in your the user's home directory. See the section about model files while the --user option makes sense.From sourceThe package can easily be installed from the latest source here in the repo.git clone https://github.com/phngs/allestm.git
cd allestm
pip install --user .All dependencies like tensorflow and scikit-learn will be automatically
installed. If you want to use tensorflow with GPU support, make sure you
install it yourself (the speedup will be marginal, if noticable at all).Model filesThe model files will be downloaded automatically (about 11 GB) if AllesTM does not find them. The-mparameter gives you the possibility to specify you own location for the model files, if not given, AllesTM will download them into the package directory. The-mflag can become handy ifThe package was installed into a system directory and there is no possiblity
to store the model files there, e.g. because of missing permissions.The model files should be stored in a location which is accessible over the
network, so that AllesTM can be run on a cluster.UsageTo get information about the command line options call:allestm -hAllesTM can be run using the following command:allestm msa.a3m output.jsonDuring install, an example file is included. See the end of the output ofallestm -hon how to call AllesTM with the example file.OutputThe output is in JSON format and has the following levels:TargetAlgorithm(Fold)PredictionsThe fold level is omitted for the final predictions denoted by 'avg'. As 'avg' represents the final preditions, this is what you are most probably interested in. See the publication for a detailed explanation of the different targets and usage of algorithms. Here is a short description:continuous.PhiAnglesTorsion angle phi from -180 to +180 degrees.continuous.PsiAnglesTorsion angle psi from -180 to +180 degrees.continuous.BfactorsPer protein z-normalized B-factors (not directly comparable to original B-factors)binary.BfactorsBinary flexibility, 1 is a probablitly of 100% that the residue is flexible, 0 means not flexible.continuous.RsaComplexRelative solvent accessiblity of the protein in its complexcontinuous.RsaChainRelative solvent accessiblity of the protein as a monomerecontinuous.RsaDiffRelative solvent accessiblity difference between the protein in complex and its monomeric formcontinuous.ZCoordinatesDistance in Angstroem from the membrane center, i.e. 0 is exactly between the two membrane boundaries (which are on average at -15 and +15)categorical.TopologyPrediction of membrane protein topology per residue in 4 states, each position in the array is the probability for that state:[inside, transmembrane, outside, reentrant region]e.g. [0.1, 0.6, 0.2, 0.1] means that the residue is most probably in the transmembrane regioncategorical.SecStrucThree-state seconary structure with the three states [helix, sheet, coil]{
"continuous.PhiAngles":{
"avg":[
-34.597,
-66.266,
-63.31,
...
],
"cnn":{
"0":[
18.339,
-66.729,
-63.547
],
"1":[
3.474,
-65.085,
-66.94
],
...
},
"dcnn":{
...
},
"lstm":{
...
},
"rf":{
...
},
"xgb":{
...
},
"blending":{
...
}
},
"continuous.PsiAngles":{
"avg":[
8.346,
-29.853,
-38.515,
...
],
...
},
"continuous.Bfactors":{
"avg":[
1.852,
1.488,
1.473,
...
],
...
},
"binary.Bfactors":{
"avg":[
[
0.169,
0.831
],
[
0.199,
0.801
],
[
0.198,
0.802
],
...
],
...
},
"continuous.RsaComplex":{
"avg":[
0.75,
0.485,
0.641,
...
],
...
},
"continuous.RsaChain":{
"avg":[
0.78,
0.536,
0.7,
...
],
...
},
"continuous.RsaDiff":{
"avg":[
0.035,
0.047,
0.045,
...
],
...
},
"continuous.ZCoordinates":{
"avg":[
-14.872,
-14.395,
-14.356,
...
],
...
},
"categorical.Topology":{
"avg":[
[
0.894,
0.054,
0.041,
0.01
],
[
0.813,
0.127,
0.047,
0.013
],
[
0.574,
0.364,
0.041,
0.02
],
...
],
...
},
"categorical.SecStruc":{
"avg":[
[
0.229,
0.039,
0.733
],
[
0.763,
0.013,
0.224
],
[
0.917,
0.007,
0.077
],
...
],
...
}
}CitationTo be published.
|
alley
|
Alley is a framework-agnostic migration helper for MongoDB.
|
alleycat-link
|
AlleyCATis a free, open-source computer-aided transcription (CAT) system for stenographers. It lets you write and edit documents such as court transcripts and translation dictionaries on both web and desktop. AlleyCAT originated as a free alternative to professional CAT software, which is proprietary and very expensive.It is not intended to replace or compete withPlover, the open-source stenography engine; instead, it connects to Plover to leverage its existing ecosystem, such as the ability to use several brands of hobbyist, student, and professional steno writers, and plugins contributed by the community.What even is a CAT system?TL;DR: Think of it as like a word processor, but with steno integration.CAT software allows you to write documents, usually court transcripts, using stenography. Each steno stroke is stored in the document alongside the text it translates to. The CAT system also lets you modify the document's layout, fix spelling errors or mistranslations, create cover pages and indexes, and more.When you write into a CAT system with a steno writer, the steno notes areimmutablylinked with the translations, so that even when you go back and edit the document, the original steno notes remain intact. This is especially important for court reporters, since the steno notes are considered the primary source of truth.While CAT software is primarily used by court reporters, some of these features could still be useful to students and hobbyists: for example, having all of your notes in one document linked to the original steno is great for identifying areas of improvement after a practice session.Why "AlleyCAT"?She's a free-range CAT: "no owner, no home, no rules." —@stenowitch, January 2022InstallationPre-built binaries for the latest stable version are available on thereleases page. Download the corresponding package for your platform:.msifor Windows,.dmgfor macOS, and.AppImagefor Linux.You can also build a bleeding-edge version of AlleyCAT from the source code. See theDevelopmentsection below for more information.If you just want to try AlleyCAT without installing, a web version is also available atalleycat.sammdot.ca. There are couple of caveats to this:Files can only be saved into your web browser's downloads folderAlleyCAT will not be able to connect to the Plover instance running on your computer, for security reasons [^1][^1]: Remote websites running inside a browser environment are typically blocked from connecting to anything running locally. I had originally implemented this using a WebSocket, but that only works when the website is also local.DesignAlleyCAT is a hybrid web-desktop application built withTauri,React, andTipTap. The majority of the application's code is written in TypeScript, and a smaller portion of it in Rust and Python. The core of AlleyCAT is a React application, wrapped in Tauri in order to allow it to run on a desktop. The Tauri side also allows it to perform platform-specific operations such as saving files to the disk.AlleyCAT can talk to Plover withAlleyCAT Link(or Link for short), which is a Plover plugin that sends stroke and translation data over a local connection, either a Unix domain socket on macOS and Linux, or TCP port 2228[^2] on Windows.[^3] This lets AlleyCAT leverage Plover's existing ecosystem -- you can write into AlleyCAT with any machine Plover can support, in any system Plover can support, with your own dictionaries, and using any other plugins you may have installed. Link can be installed throughpipor Plover's plugins manager.[^2]: ACAT on a phone keypad :smile:
[^3]: Windows does support named pipes, and more recent versions of Windows also support Unix domain sockets, but the tooling for working with both asynchronously (asyncioon the Python side, and Tokio on the Rust side) is not nearly as developed.DevelopmentBuilding the desktop app from source requires Node v16+ and Rust v1.64+; the web version requires only Node. Ensureyarn(andcargoon desktop) are installed before proceeding.In order to connect AlleyCAT with Plover, you will also need a full Plover 4.0.0-dev10+ installation.Project StructureThe repository has four main parts:alleycat (this repository)
├─ alleycat_link
├─ app
│ └─ src
├─ public
└─ src/alleycat_link: Plover plugin/app/src: Tauri application (desktop only)/public: Static assets/src: React application (web and desktop)Building from SourceClone the repository:$gitclonehttps://github.com/sammdot/alleycat.git
$cdalleycatInstall all the dependencies, including TypeScript, React, and the Tauri CLI:$yarninstallOn Linux, you will also need to install additional dependencies:$sudoapt-getupdate
$sudoapt-getinstall-ylibgtk-3-devwebkit2gtk-4.0libappindicator3-devlibrsvg2-devpatchelfDevelopmentTo start a development server for just the web version:$yarnstartTo start the desktop version for development:$yarnstartappBoth of these start a web server onlocalhost:3000. You should be able to access the web version from a browser even when running the desktop version.To install the Plover plugin locally:$plover-splover_pluginsinstall-e.whereploveris the path to the main Plover binary (orplover_console.exeon Windows), then make sure to enable thealleycat_linkextension in Plover, and allow network connections if needed.ProductionTo build the web version for production:$yarnbuildThe generated files for the web version will be in the/builddirectory. These files can be served statically, and should also work offline.To build the desktop version on your machine's platform:$yarnbuildappThe generated files for the desktop version will be in the/app/target/releasedirectory. This may include a standalone application binary, an application bundle, and/or an installer package, depending on the platform. These files can be installed on your system or distributed.
|
alleycat-reactive
|
AlleyCat - ReactiveA part of the AlleyCat project which supports theReactive Object Pattern.IntroductionAlleyCat Reactive is a project to explore the possibility of bridging the gap between the
two most widely used programming paradigms, namely, the object-oriented programming (OOP),
and functional programming (FP).It aims to achieve its goal by proposing a new design pattern based on theReactive Extensions (Rx).Even though it is already available onPyPI repositoryasalleycat-reactivepackage, the project is currently at a proof-of-concept stage
and highly experimental.As such, there can be significant changes in the API at any time in future. Furthermore, the project
may even be discontinued in case the idea it is based upon proves to be an infeasible one.So, please use it at your discretion and consider opening an issue if you encounter a problem.Reactive Object PatternAlleyCat Reactive provides an API to implement what we term asReactive Object PatternorROPfor short. Despite its rather pretentious name, it merely means defining class properties
which can also serve as anObservablein Rx.But why do we need such a thing?We won't delve into this subject too much since you can learn about the concept from many
other websites.In short, it's much better to define data in a declarative manner, or as "data pipelines",
especially when it's changing over time. And Rx is all about composing and manipulating such
pipelines in a potentially asynchronous context.But what if the data do not come from an asynchronous source, like Tweets or GUI events,
but are just properties of an object? Of course, Rx can handle synchronous data as well, but the
cost of using it may outweigh the benefits in such a scenario.In a traditional OOP system, properties of an object are mere values which are often
mutable, but not observable by default. To observe the change of a property over time, we
must use an observer pattern, usually in the form of a separate event.Some implementation of Rx allows converting such an event into anObservable. Still, it
can be a tedious task to define an event for every such property, and it requires a lot of
boilerplate code to convert them into Rx pipelines.More importantly, the resulting pipelines and their handling code don't have any clear
relationship with the original object or its properties from which they got derived. They
are just a bunch of statements which you can put anywhere in the project, and that's not
how you want to design your business logic in an OOP project.In a well-designed OOP project, classes form a coherent whole by participating in
inheritance hierarchies. They may reference, extend, or redefine properties of their
parents or associated objects to express the behaviours and traits of the domain concepts
they represent.And there is another problem with usingObservablesin such a manner. Once you build an Rx
pipeline, you can't retrieve the value flowing inside unless you write still more boilerplate
code to subscribe to the stream and store its value to an outside variable.This practice is usually discouraged as an anti-pattern, and so is the use ofSubjects.
However, the object is not observing some outside data (e.g. Tweets) but owns it, which is
one of the few cases where the use of aSubjectcan be justified. In such a context, it's
perfectly reasonable to assume that an object always has access to a snapshot of all the
states it owns.So, what if we can define such state data of an object asObservableswhich can also
behave like ordinary properties? Wouldn't it be nice if we can easily access them as in OOP
while still being able to observe and compose them like in Rx?And that is what this project is trying to achieve.UsageTo achieve the goal outlined in the previous section, we provide a way to define a property
which can also turn into anObservable. And there are two different types of such
property classes you can use for that purpose.Reactive PropertyFirstly, there is a type of property that can manage its state, which is implemented byReactiveProperty[T]class. To define such a property using an initial value, you can use
a helper functionfrom_valueas follows:fromalleycat.reactiveimportRPfromalleycat.reactiveimportfunctionsasrvclassToto:# Create an instance of ReactiveProperty[int] with an initial value of '99':value:RP[int]=rv.from_value(99)# You know the song, don't you?Note thatRP[T]is just a convenient alias forReactiveProperty[T]which you can use for
type hinting. As with other type annotations in Python, it is not strictly necessary. But it
can be particularly useful when you want to lazily initialize the property.You can declare an 'empty' property usingnew_propertyand initialize it later as shown
below. Because it may be difficult to see what type of data the property expects without an
initial value, using an explicit type annotation can make the code more readable:fromalleycat.reactiveimportRPfromalleycat.reactiveimportfunctionsasrvclassMyClass:# Declare an empty property first.value:RP[int]=rv.new_property()def__init__(self,init_value:int):# Then assign a value as you would do to an ordinary property.self.value=init_valueAReactivePropertycan be can be read and modified like an ordinary class attribute. And
also you can make it a read-only property by setting theread_onlyargument toTruelike the
following example:fromalleycat.reactiveimportRPfromalleycat.reactiveimportfunctionsasrvclassArcadiaBay:writeable:RP[str]=rv.from_value("life is strange")read_only:RP[str]=rv.from_value("the past",read_only=True)place=ArcadiaBay()print(place.writeable)# "life is strange"print(place.read_only)# "the past"place.writeable="It's awesome"print(place.writeable)# "It's awesome"place.read_only="Let me rewind."# Throws an AttributeError# Of course, you can't change the past. But the game is hella cool!But haven't we talked about Rx? Of course, we have! And that's the whole point of
the library, after all.To convert a reactive property into anObservableof the same type, you can use observe
method like this:fromalleycat.reactiveimportRPfromalleycat.reactiveimportfunctionsasrvclassNena:ballons:RP[int]=rv.from_value(98)nena=Nena()luftballons=[]rv.observe(nena.ballons).subscribe(luftballons.append)# Returns a Disposable. See Rx API.print(luftballons)# Returns [98].nena.ballons=nena.ballons+1print(luftballons)# [98, 99] # Ok, I lied before. It's about Nena. not Toto :PIf you are familiar with Rx, you may notice the similarities betweenReactivePropertywithBehaviorSubject. In fact, the former is a wrapper around the latter, andobservereturns anObservableinstance backed by such a subject.To learn about all the exciting things we can do with anObservable, you may want to
read the official documentation of Rx. We will introduce a few examples later, but before
that, we better learn about the other variant of the reactive value first.Reactive ViewReactiveView[T](orRV[T]for short) is another derivative ofReactiveValue, from
whichReactivePropertyis also derived (hence, the alias offunctionsmodule used
above,"rv").The main difference is that while the latter owns a state value itself, a reactive view
reflects it from an outside source specified as anObservable. To create a reactive
view from an instance ofObservable, you can usefrom_observablefunction like this:importrxfromalleycat.reactiveimportRVfromalleycat.reactiveimportfunctionsasrvclassJoni:big:RV[str]=rv.from_observable(rx.of("Yellow","Taxi"))If you are familiar with Rx, you may see it as a wrapper around anObservable, while
a reactive property can be seen as one around aSubject.Like its counterpart, you can initialize a reactive view either eagerly or lazily. In order
to create a lazy-initializing view, you can usenew_view, and later provide anObservableas shown below:importrxfromalleycat.reactiveimportRVfromalleycat.reactiveimportfunctionsasrvclassBothSides:love:RV[str]=rv.new_view()def__init__(self):self.love=rx.of("Moons","Junes","Ferris wheels")It also acceptsread_onlyoption from its constructor (default toTrue, in contrast to the case
withReactiveProperty) setting of which will make it 'writeable'.It may sound unintuitive since a 'view' usually implies immutability. However, what changes
when you set a value of a reactive view is the sourceObservablethat the view monitors,
not the data itself, as is the case with a reactive property.Lastly, you can convert a reactive property into a view by calling itsas_viewmethod.
It's a convenient shortcut to callobserveto obtain anObservableof a reactive property
so that it can be used to initialize an associated view.The code below shows how you can derive a view from an existing reactive property:fromalleycat.reactiveimportRP,RVfromalleycat.reactiveimportfunctionsasrvclassExample:value:RP[str]=rv.from_value("Boring!")# I know. But it's not easy to make it interesting, alright?view:RV[str]=value.as_view()OperatorsAs we know how to create reactive properties and values, now it's time to learn how to
transform them. Both variants ofReactiveValueprovidesmapmethod, with which you
can map an arbitrary function or lambda expression over each value in the pipeline:fromalleycat.reactiveimportRP,RVfromalleycat.reactiveimportfunctionsasrvclassCounter:word:RP[str]=rv.new_property()count:RV[str]=word.as_view().map(len).map(lambdao,c:f"The word has{c}letter(s)")# The first argument 'o' is the current instance of Counter class.counter=Counter()counter.word="Supercalifragilisticexpialidocious!"print(counter.count)# Prints "The word has 35 letter(s)". Wait, did you actually count that?You can also usepipeto chain arbitrary Rx operators to build a more complex pipeline like this:fromrximportoperatorsasopsfromalleycat.reactiveimportRP,RVfromalleycat.reactiveimportfunctionsasrvclassCrowsCounter:animal:RP[str]=rv.new_property()# The first argument 'o' is the current instance of Counter class.crows:RV[str]=animal.as_view().pipe(lambdao:(ops.map(str.lower),ops.filter(lambdav:v=="crow"),ops.map(lambda_:1),ops.scan(lambdav1,v2:v1+v2,0)))counting=CrowsCounter()counting.animal="cat"counting.animal="Crow"counting.animal="CROW"counting.animal="dog"print(counting.crows)# Returns 2.There are also convenient counterparts tomerge,combine_latest, andzipfrom Rx API,
which you can use to combine two or more reactive values in a more concise manner:fromalleycat.reactiveimportRP,RVfromalleycat.reactiveimportfunctionsasrvclassRectangle:width:RP[int]=rv.from_value(100)height:RP[int]=rv.from_value(200)area:RV[int]=rv.combine_latest(width,height)(lambdav:v[0]*v[1])rectangle=Rectangle()print(rectangle.area)# Prints 20,000... you do the math!rectangle.width=150print(rectangle.area)# Prints 30,000.rectangle.height=50print(rectangle.area)# Prints 750.InstallThe library can be installed usingpipas follows:pipinstallalleycat-reactiveLicenseThis project is provided under the terms ofMIT License.
|
alleycat-ui
|
AlleyCat UIA lightweight GUI widget toolkit forUPBGE(Uchronia Project Blender Game Engine) based onCairo.IntroductionAlleyCat UIis a lightweight GUI toolkit which means it doesn't rely on native peers,
like Blender objects or any of its GUI related APIs.It doesn't necessarily mean that it'd be faster in performance or lighter in memory
consumption than those that do. However, being lightweight has its certain benefits too.Because there is no native object to worry about, it is relatively easy to create a new
type of components or extend the existing ones. Basically, you can make anything as
long as you can draw it as an image, and the library exposes aCairocontext which
provides many useful features to paint shapes.InstallThe library can be installed usingpipas follows:pipinstallalleycat-uiYou will need to haveCairolibrary in your library path in order forAlleyCat UIto work. Linux users can install it using a package manager while on Windows, you may
get it fromhere(rename it tolibcairo-2.dlland put it where Python looks for native libraries, like the value ofPATHenvironment
variable).How to UseTo use UI components provided byAlleyCat UI, you need to create a proper context
first. In most cases, you can usealleycat.ui.blender.UIto create a new context:fromalleycat.ui.blenderimportUIcontext=UI().create_context()Then you can use this context instance to create UI components, like labels and buttons
like this:fromalleycat.uiimportLabel,LabelButtonfromalleycat.ui.blenderimportUIcontext=UI().create_context()label=Label(context,text_size=18)button=LabelButton(context,text="Button 1",text_size=16)An important thing to remember is that only those components whose hierarchy is attached
to an activeWindowcan be rendered on screen. For example, if you create aPaneland add aLabelto it, they won't be visible until you add the parent panel to an
existing window.If you want to create a window like popups or frames, you can useFramewhich can be
optionally configured to be draggable and resizable. On the other hand, if you just want
to add components to the screen, you can use anOverlayinstead, which is a transparent
window that is automatically resized to fill the current screen:fromalleycat.uiimportBounds,Label,Overlayfromalleycat.ui.blenderimportUIcontext=UI().create_context()overlay=Overlay(context)label=Label(context,text="My Label",text_size=18)label.bounds=Bounds(10,10,180,40)overlay.add(label)When you are done using the UI, you need to destroy the context by invoking itsdispose()method. It is not strictly necessary if you are running the project withblenderplayer, but it may cause a crash if you run it inside Blender and stop the engine
without properly disposing the context.StatusThe project is in a very early stage of development and only provides a minimal set of
components and layout managers. Admittedly, the documentation is not sufficient to guide
new users to get started with the library at the moment.I will try to keep adding more components and enhancing the documentation. But for now,
I'd encourage you to take a look at the test cases to get a better idea of how to use each
APIs.Please use it at your own risks. If you have any questions about the project, feel free
to visitUPBGE Discord serverand askmysticfall#4102for support.LicenseThis project is provided under the terms ofGNU General Public License v3 (GPL3).
|
allezup
|
No description available on PyPI.
|
allfiles
|
allfiles privites functions which iterate files or directories
in direcotory trees.
The code of allfiles is almost a recipe 2.17 “Walking Directory Trees” in Python Cookbook, 2nd Edition.
However, it is modified as my wish.Example::>>> from allfiles import allfiles
>>> allfiles('C:\Python32\lib')
<generator object allfiles at 0x02C8A2B0>
>>> for f in allfiles('C:\Python32\lib'):
... print(f)
...
C:\Python32\lib\abc.py
C:\Python32\lib\aifc.py
C:\Python32\lib\antigravity.py
C:\Python32\lib\argparse.py
C:\Python32\lib\ast.py
C:\Python32\lib\asynchat.py
C:\Python32\lib\asyncore.py
C:\Python32\lib\base64.py
C:\Python32\lib\bdb.py
C:\Python32\lib\binhex.py
(and more files...)
|
all-fives-domino
|
All Fives DominoSimple version of a domino variantInstallingInstall thePyPI Package:pip install all-fives-dominoExamplesTODO
|
allfreqs
|
allfreqsCalculate allele frequencies from a sequence multialignment.Free software: MIT licenseDocumentation:https://allfreqs.readthedocs.ioGitHub repo:https://github.com/robertopreste/allfreqsFeaturesCalculate allele frequencies from a nucleotide multialignment in fasta or csv format.Allele frequencies will be returned as a table in which each row is a nucleotide position (based on
the provided reference sequence) and columns are A, C, G, T frequencies as well as gaps and other
non-canonical nucleotides.For example, given the following multialignment:IDSequencerefACGTACGTseq1A-GTAGGNseq2ACCAGCGTthe resulting allele frequencies will be:positionACGTgapoth1.0_A1.00.00.00.00.00.02.0_C0.00.50.00.00.50.03.0_G0.00.50.50.00.00.04.0_T0.50.00.00.50.00.05.0_A0.50.00.50.00.00.06.0_C0.00.50.50.00.00.07.0_G0.00.01.00.00.00.08.0_T0.00.00.00.50.00.5Frequencies of non-canonical (ambiguous) nucleotides are by default squashed into theothcolumn, but they can also be shown separately using a simple flag.allfreqs can be used either as a command line tool or through its Python API.For more information, please refer to theUsagesection of the documentation.InstallationPLEASE NOTE: allfreqs only supports Python >= 3.6!The preferred installation method for allfreqs is usingpip:$pipinstallallfreqsFor more information, please refer to theInstallationsection of the documentation.CreditsThis package was created withCookiecutterand thecc-pypackageproject template.History0.1.0 (2019-07-08)First release.0.1.1 (2019-08-08)Read and process multialignments from fasta and csv files (Python module only).0.1.2 (2019-10-17)Add tests with and without reference included in multialignments;Add tests with real datasets (coming from haplogroup-specific multialignments).0.1.3 (2019-10-18)Add more detailed tests for real datasets;Implement more efficient frequency calculation;Add dunder methods and sanity checks;Fix requirements and testing framework;Clean code.0.2.0 (2020-03-07)Removenumpyandpandasfrom requirements as they are installed byscikit-bio;Movetestsmodule insideallfreqs;Addcimodule for internal management;Clean code.0.3.0 (2020-04-02)Add option to allow ambiguous nucleotides shown separately.
|
allgit
|
allgitAllgit makes working with many git repositories easier, especially keeping them all up-to-date, managing branches between them, and making changes across multiple projects.It works regardless of where the repositories came from andwithoutrequiring any configuration - no lists of repositories to maintain, no "super-repository", nor any other additional management.It also serves as a platform for other scripts - if we can write a script that works on just one repository, allgit can run it across any number.SetupSimplypip install allgitAliasingallgitto make it as easy as possible to use is also recommended; add this to your~/.bash_profileor preferred shell's config file:alias ag='allgit'If you would like to use an alternative git client, for examplehub, you can also set this environment variable:export ALLGIT_GIT_TOOL=hubNote that this tool will only be used for user-specified commands, not internally, so it does not need to be full-fidelity.Basics and WorkflowAllgit commands start with options that control it and how it finds and chooses repositories, a separator, and a command to run in each repo. By default it works on all repositories immediately in the current directory, but we can filter by branches (-b) or locally modified (-m), among other things.To separate allgit's options from the command to run, we use--by itself, with space on both sides; allgit will take everything that follows, as-is, to be the command it should run. Note that the commands are runinsideeach repository,notthe current directory.Because we will often run git commands, we can use a single-as the separator instead and allgit will assume that what follows should be passed to git. These are exactly equivalent:allgit - pullandallgit -- git pull.Brief ExampleCommandsNotes$ allgit - pull -rPull all repositories up-to-date; note the single-between allgit and the (implied-git) command(Make some changes)$ allgit -m - statusShow the status of the modified repositories$ allgit -m - checkout -b my_featureCreate a feature branch in modified repositories; we can now work with these repositories based on that branch$ allgit -b my_feature -- make testRun tests; note the--to run a non-git command$ allgit -b my_feature - commit -am "Feature!"Commit the changes$ allgit -b my_feature - push -u origin my_featurePush the feature branch up for collaboration or reviewNote that this workflow is the same no matter how many repositories we have or even how many are involved in the feature changes - no repeating commands per repo!(For an even better branch workflow, check out myBranchTools)(( create a separate file with more, and more sophisticated, example workflows, also refer reader to -h/--help here ))More on BranchesBranches are integral to change management in git; it turns out that feature and release branches are a very natural way to group projects that allgit should work on together. On the flip side, allgit makes it very easy make consistent branches among related projects.(( Does this belong as an example workflow? ))For example, if some of our repositories need to branch for release together, we can use an earlier release branch to create the new one; first, make sure they're all on the same branch and up-to-date:$ allgit -b past_release - checkout master
$ allgit -b past_release - pullThen, create the new release branch and push it up:$ allgit -b past_release - checkout -b new_release
$ allgit -b past_release - push -u origin new_releaseIn fact, it can be useful to, judiciously, make branches for the sole purpose grouping repositories; allgit's-b/--branchesfilter just checks if any of the desired branches exist, they don't have to be checked out.On the other hand, we often work with varied repositories that may branch for release on different schedules or come from multiple sources which may have differing branching and naming practices.Allgit's--checkout --branches(-cb) was literally made for this. By specifying a list of branches in last-one-wins order, a single command can ensure that all the projects are coherent.For example, say we have a complex group of repositories that integrate together: we have a feature branch across a few, some have branched for 'SpamRelease', many have 'main' as their primary branch, and one still uses 'master', we could simply run:$ allgit -cb my_feature SpamRelease main masterAllgit will check out the right branches in the projects that have them; we can even add a- pull -rto the end to ensure they're all up-to-date.Finding and FilteringRepositories grow and multiply; that's why we need allgit in the first place. To find repositories, allgit searches one level into the directories specified on the command line (or the current directory), and doesn't search inside repositories it finds.So, if we run it in a directory with some repositories cloned as immediate children, it will find those; if we run it while inside a repo, it will just work on the current repo. These defaults control the scope and keep runs quick.To search deeper, maybe we keep our repos organized in folders, we can specify those directories to search or give a--depth(-d); note it still doesn't search inside repositories unless we pass--subrepos. Toreallyfind them all--recursive(-r) searches to an unlimited depth and looks for subrepos.Often, though, we want to be a bit more selective about which repos we work on. First, we can simply give a list on the command line; while that could be tedious or error-prone, the shell's "wildcard" (or "globbing") feature can be really useful. For example, to work only on "bare" repositories in the current directory:$ allgit *.git - fetchAllgit also offers a couple git-related filters, in addition to--branchescovered above,--modified(-m) will select only repositories with local modifications.We can even use commands or scripts to create our own filters with--test(-t), which takes a command and based on the exit status it will work on the repository or skip it. For exampleallgit -t test -f Makefile -- makewill use/bin/testto check for a Makefile and, if found, make the default target. This must be the last allgit option and will take everything up to the separator as the test command, so that command can't have a bare-nor--(if those are necessary, we can always wrap it in a script, of course.)These mechanisms add together, so we can readily compose a command to work on only modified repositories with certain branches among particular directories.(( this is awkward, trying to show that they're AND'd together ))Finally, for even more control, allgit offers-i/--includeto add repos to the ones selected by the filters and-x/--excludeto do the opposite.Fetch and CheckoutFor the most part, allgit aims to be a transparent "dispatcher" for whatever git commands, aliases, or custom scripts we want to run; however there are a couple git operations it offers to support high-level workflows.To ensure that we have current branches to filter on,-f/--fetchwill do a fetch in each repository before checking branches or running commands. This adds significant time, so it is an option; note that even without fetching, allgit always searches the remote branches our clone knows about.The other built-in operation is-c/--checkout, mentioned above, which checks out branches in order of preference in repositories that have them.Note, when testing with--dry-run, fetching is considered "safe" (and is necessary for showing exactly what would be done), while checkout willnotbe run, only printed.(( Add a section for other misc goodies like--clone-script))
|
allgo
|
A||GO python libraryDescriptionAllGo is a SaaS (Software as a Service) platform provided by Inria. It may be seen as a virtual showroom of technonogies developed by research teams.
First followhttps://allgo.inria.fr/users/sign_upto create an account on AllGo (anyone may create such an account). Once your account creation is confirmed, please connect tohttps://allgo.inria.frto obtain your private token, which will allow yo to use the AllGo REST API. You will need this token later (cf. §3 below).Installpip install allgoUsageCreate a app :app = allgo.App('ndsafir', token="ead123baaef55412")NB: token in optional, if you already provide your token with an env variable ALLGO_TOKEN or create a file ~/.allgo_token (without breakline)Submit a job :files = {'files[0]': open('tmp.png', 'rb')}
params = '-nopeaks 1 -2dt false -noise 0 -p 1 -bits 8 -iter 5 -adapt 0'
app.run(files=files, params=params)run is blocking, when finish all files produce by A||Go are download in the current directoryExample :https://gitlab.inria.fr/allgo/notebooks/ndsafir
|
allhub
|
About allhuballhubis a REST API library for Github REST API v3 written in python. Currently, this library is under heavy
development. Maybe i will cut a release once i am confident that major part of the library covered with tests.Featuresallhubis heavily inspired by Javascript, meaning that you can access the properties on JSON
object either object.prop or object["prop"]. I feel the later version is kind of verbose, and I recommend
you use the object.prop.I have seen most of the Github libraries are not covered comprehensively. But this library aims to covers
all of REST API v3.I have designed this library keeping programmer ergonomics in mind, so that you create only one object
to access any of the API.LicenseApache License 2.0
MITin case you need some other license, please let me know.ExamplesfromallhubimportAllHuballhub=AllHub("username","tokenxxxxxxxxxxxxxxx","app_tokenxxxxxxxxxxxxxx","password")response=allhub.xxxxxxxxx()TODOallhubrequires some love. Currently, unit tests are almost non existent. Love to take the coverage to 100%.
But I am severely limited by time and priorities. If someone wants to send unit tests, please fork and
send the patch away.You are more than welcome.
|
allianceauth
|
Alliance AuthAn auth system for EVE Online to help in-game organizations manage online service access.ContentOverviewDocumentationSupportRelease NotesDeveloper TeamContributingOverviewAlliance Auth (AA) is a web site that helps Eve Online organizations efficiently manage access to applications and services.Main features:Automatically grants or revokes user access to external services (e.g. Discord, Mumble) and web apps (e.g. SRP requests) based on the user's current membership toin-game organizationsandgroupsProvides a central web site where users can directly access web apps (e.g. SRP requests, Fleet Schedule) and manage their access to external services and groups.Includes a set of connectors (called"services") for integrating access management with many popular external applications / services like Discord, Mumble, Teamspeak 3, SMF and othersIncludes a set of webappswhich add many useful functions, e.g.: fleet schedule, timer board, SRP request management, fleet activity trackerCan be easily extended with additional services and apps. Many are provided by the community and can be found here:Community CreationsEnglish :flag_gb:, Chinese :flag_cn:, German :flag_de:, Spanish :flag_es:, Korean :flag_kr:, Russian :flag_ru:, Italian :flag_it:, French :flag_fr:, Japanese :flag_jp: and Ukrainian :flag_ua: LocalizationFor further details about AA - including an installation guide and a full list of included services and plugin apps - please see theofficial documentation.ScreenshotHere is an example of the Alliance Auth web site with some plug-ins apps and services enabled:SupportGet help on Discordor submit anissue.Development TeamActive DevelopersAaron KableAriel RinCol CrunchErik KalkokenRounon Daxsnipereagle1Former DevelopersAdarnofBasraahBeta Testers / Bug Fixersghotikaezonmmolitor87orbitroomTargetZ3R0tehfiendSpecial thanks toNikdoof, as hisauthwas the foundation for the original work on this project.ContributingAlliance Auth is maintained and developed by the community and we welcome every contribution!To see what needs to be worked on please review our issue list or chat with our active developers on Discord.Also, please make sure you have signed theLicense Agreementby logging in athttps://developers.eveonline.combefore submitting any pull requests.In addition to the core AA system we also very much welcome contributions to our growing list of 3rd party services and plugin apps. Please seeAA Community Creationsfor details.
|
allianceauth-afat
|
Alliance Auth AFAT — Another Fleet Activity TrackerAn Improved FAT/PAP System forAlliance Auth.Alliance Auth AFAT — Another Fleet Activity TrackerFeatures and HighlightsScreenshotsDashboardFat Link ListFat Link DetailsAdd Fat Link View for FCsInstallationImportantStep 1: Install the AppStep 2: Update Your AA SettingsStep 3: Finalizing the InstallationUpdatingData MigrationImport From Native FATImport From ImicusFATUninstall ImicusFATSettingsPermissionsChangelogTranslation StatusContributingCreditsFeatures and HighlightsAutomatic tracking of participation on FAT links created via ESIMultiple ESI fleets (with your alts)Manually end ESI tracking per fleetFleet type classification (can be added in the admin backend)Ship type overview per FAT linkGraphical statistics viewsCustom module nameRe-open FAT link if the FAT link has expired and is within the defined grace time
(only for clickable FAT links)Manually add pilots to clickable FAT links, in case they missed clicking the link
(for a period of 24 hours after the FAT links original expiry time)Log for the following actions (Logs are kept for a certain time, 60 days per default):Create FAT linkChange FAT linkRemove FAT linkRe-open FAT linkManually add pilot to FAT linkRemove pilot from FAT linkAFAT will work alongside the built-in native FAT System and ImicusFAT.
However, data doesn't share, but you can migrate their data to AFAT, for more
information, see below.ScreenshotsDashboardFat Link ListFat Link DetailsAdd Fat Link View for FCsInstallationImportantThis app is a plugin for Alliance Auth. If you don't have Alliance Auth running already,
please install it first before proceeding. (See the officialAA installation guidefor details)For users migrating from one of the other FAT systems, please read the specific
instructions FIRST.Step 1: Install the AppMake sure you're in the virtual environment (venv) of your Alliance Auth installation.
Then install the latest version:pipinstallallianceauth-afatStep 2: Update Your AA SettingsConfigure your AA settings in yourlocal.pyas follows:Add'afat',toINSTALLED_APPSAdd the scheduled tasks# AFAT - https://github.com/ppfeufer/allianceauth-afatCELERYBEAT_SCHEDULE["afat_update_esi_fatlinks"]={"task":"afat.tasks.update_esi_fatlinks","schedule":crontab(minute="*/1"),}CELERYBEAT_SCHEDULE["afat_logrotate"]={"task":"afat.tasks.logrotate","schedule":crontab(minute="0",hour="1"),}Step 3: Finalizing the InstallationRun migrations & copy static filespythonmanage.pycollectstatic
pythonmanage.pymigrateRestart your supervisor services for AA.UpdatingTo update your existing installation of AFAT, first enable your
virtual environment (venv) of your Alliance Auth installation.pipinstall-Uallianceauth-afat
pythonmanage.pycollectstatic
pythonmanage.pymigrateFinally, restart your supervisor services for AAIt is possible that some versions need some more changes. Always read therelease notesto find out
more.Data MigrationRight after theinitialinstallation and running migrations,
you can import the data from Alliance Auth's native FAT system or from ImicusFAT if
you have used one of these until now.Import From Native FATTo import from the native FAT module, simply run the following command:pythonmyauth/manage.pyafat_import_from_allianceauth_fatImport From ImicusFATTo import from the ImicusFAT module, simply run the following command:pythonmyauth/manage.pyafat_import_from_imicusfatUninstall ImicusFATNow that you've migrated, you can uninstalImicusFAT.First, remove all Django migrations forImicusFATwith:pythonmanage.pymigrateimicusfatzeroThis will remove all migrations forImicusFATincluding its DB tables.Should this command throw an error, a bit of manual labor is needed, but nothing you
can't handle, I'm sure.pythonmanage.pymigrateimicusfatzero--fakeAnd remove all DB tables beginning withimicusfat_from your DB manually afterwards.Now that the DB is cleaned up, time to remove te app.pipuninstallallianceauth-imicusfatNow removeimicusfatfrom yourINSTALLED_APPSin yourlocal.py, restart
supervisor and ... Done!SettingsTo customize the module, the following settings are available.NameDescriptionDefault ValueValue TypeAFAT_APP_NAMECustom application name, in case you'd like a different nameFleet Activity TrackingstringAFAT_DEFAULT_FATLINK_EXPIRY_TIMEDefault expiry time for clickable FAT links in Minutes60intAFAT_DEFAULT_FATLINK_REOPEN_GRACE_TIMETime in minutes a FAT link can be re-opened after it has expired60intAFAT_DEFAULT_FATLINK_REOPEN_DURATIONTime in minutes a FAT link is re-opened60intAFAT_DEFAULT_LOG_DURATIONTime in days before log entries are being removed from the DB60intPermissionsNameDescriptionNotesbasic_accessCan access the AFAT moduleYour line member probably want this permission, so they can see the module and click the FAT links they are given. They also can see their own statistics with this permission.manage_afatCan manage the AFAT moduleYour Military lead probably should get this permissionadd_fatlinkCan create FAT LinksYour regular FC or who ever should be able to add FAT links should have this permissionstats_corporation_ownCan see own corporation statisticsstats_corporation_otherCan see statistics of other corporationslogs_viewCan view the modules logsChangelogTo keep track of all changes, please read theChangelog.Translation StatusDo you want to help translate this app into your language or improve the existing
translation? -Join our team of translators!ContributingYou want to contribute to this project? That's cool!Please make sure to read thecontribution guidelines.(I promise, it's not much, just some basics)CreditsAFAT is maintained by @ppfeufer and is based onImicusFATby @exiom with @Aproia and @ppfeufer which is based onallianceauth-bfatby @colcrunchBoth of these modules are no longer maintained and are deprecated. Both modules will
not run with the latest stable releases of Alliance Auth.
|
allianceauth-app-utils
|
allianceauth-app-utilsCommonly used utility functions and classes for rapid development of Alliance Auth apps.DescriptionThis package contains a variety of commonly used utility functions and classes that help speed up development of Alliance Auth apps and reduce code duplication across apps.DocumentationFor a full description of the API please see thedocumentation.
|
allianceauth-auth-stats
|
Auth ReportsAuth Data in report form, in Auth, fully configurableAKA Corp Stats 3.0Configurable Report Framework for corporate level aggregation of any dataeach "field" is a smart filter similar to secure groups ( can use secure groups filters too ) or a "field only" filter provided by any application in the alliance auth ecosystem.These filters MUST be the more modern kind with either aprocess_fieldoraudit_filtermethods. Legacy filters using onlyprocess_filterwill not show any data.Please see this link for more infoWhat it needs:require corporate member tokens to build the corp groups to see people not known to auth, to make a report for that too. these can be added with the pluss button in the menubarMin Release Req's:a basic report that does what corpstats 2.0 does nowalts to mainsjoin dateslast loginpermissions that give access to all reports at acorp/alli/state/holding corpsleveloverview screen with passing/failing per corp per "report" ( maybe have this as optional aka "show_on_global_overview_report" )Nice to haves future plansstate level report that shows all members of a statecsv/json/other exportmore things...Filters/stats provided by this appshow all alts for a main, with option to only show in corp altsInstallationBETA INSTALLThis will be updated with QOL in later releases but this is still BETA softwareBare Metalpip install allianceauth-auth-stats==0.0.1b2add'authstats',to your local.pymigratepython manage.py migratecollectstaticpython manage.py collectstatic --noinputsync commandspython manage.py reports_sync_filtersrestart authcontinue to the common sectionDockeraddallianceauth-auth-stats==0.0.1b1to your requirements.txt file and rebuild your containersdocker compose build --no-cacheadd'authstats',and'solo',to your local.pyrecreate you docker stackdocker compose up -denter your auth container and run migrations and collect static and sync filtersdocker compose exec auth bashauth collectstaticauth migrateauth reports_sync_filterscontinue to the common sectionCommon setup stepsrun the following command to sync all the available filtersmanage.py reports_sync_filtersIn the auth admin site edit theAuth Reports Configurationto your liking.set your states to include in reports at a minimum.Create a newReport Field: Character Altsdefaults are finecreate your first report.Name "Corpstats"Check show character imagesSetup your fieldsDon't forget to add the characters field you setup in the previous step. i recommend you uncheck sorting on this field.add permissions to the parties you wish to be able to use reports. permisions are defined below.ScreenshotsPermissionsThere are some basic access permsAll permissions are filtered by main character, if a person has neutral alts loaded they will also be visible to someone who can see their main.PermAdmin SitePermDescriptionbasic_accessnillCan access reports moduleShows the Auth Reports module in the menu and gives access to the UIown_corpnillCan access own corporations reports.own_alliancenillCan access own alliances reports.own_statenillCan access own states reports.Future Permsthese are not hooked up yetPermAdmin SitePermDescriptionrestricted_reportsnillCan access restricted reports.holding_corpsnillCan access configured holding corp reports.Note: Configure the "Holding Corps" in theAuth Reports ConfigurationAdmin Model. via the auth admin interface.SettingsSettingDefaultDescriptionAUTHSTATS_APP_NAME"Auth Reports"Name on the menu for Auth StatsContributingMake sure you have signed theLicense Agreementby logging in athttps://developers.eveonline.combefore submitting any pull requests. All bug fixes or features must not include extra superfluous formatting changes.
|
allianceauth-blacklist
|
allianceauth-blacklistYou Shall Not Pass!InstallationInstall from pippip install allianceauth-blacklistAdd'blacklist'to INSTALLED_APPS in local.pyRun the management command to update AA's State systempython myauth/manage.py blacklist_stateGive permissionsdone skiFeaturesIntegration with Alliance Auth's State System, creates an maintains a Blacklisted State to ensure no services access is granted to Blacklisted usersNotesComments on NotesPermissionsCategoryPermAdmin SiteAuth SiteAccessview_basic_eve_notesCan View own corps notesnillAccessview_eve_blacklistCan View the BlacklistnillAccessview_eve_notesCan view all eve notesnillNotesadd_basic_eve_notesCan Add own corp members to notesnillNotesadd_new_eve_notesCan add new eve notesnillNotesview_restricted_eve_notesCan View restricted eve notesnillNotesadd_restricted_eve_notesCan Add restricted eve notesnillNotesadd_to_blacklistCan add/remove from the BlacklistnillCommentsview_eve_note_commentsCan view eve note commentsnillCommentsview_eve_note_restricted_commentsCan view restricted eve note commentsnillCommentsadd_new_eve_note_commentsCan add comments on eve notesnillCommentsadd_new_eve_note_restricted_commentsCan add new restricted comments to eve notesnillContributingMake sure you have signed theLicense Agreementby logging in athttps://developers.eveonline.combefore submitting any pull requests. All bug fixes or features must not include extra superfluous formatting changes.
|
allianceauth-celeryanalytics
|
celeryanalyticscelery task and worker analytics forAlliance Auth.InstallationWith your venv active,Pip installpip install -U allianceauth-celeryanalyticsAddceleryanalyticsto yourINSTALLED_APPSin yourlocal.pyFrom terminal run migrationspython manage.py migrate celeryanalyticspython manage.py collectstaticOptionalif you wish to havve the module cealup old tasks its self runpython manage.py ca_setup_taskUsageThis module has no permissions. it will start logging all completed and failed tasks on install using the celery signals. To view the UI you need to be superuser, and selectTask Queuesfrom the side menuTask MenuToggle sections of the UI on/off hereWorkersShows basic info on alll running workersNOTEif you only have a single worker shown, you are probably missing the-n %(program_name)s_%(process_num)02dparameter in your the supervisor config commands.Active TasksShows tasks that are running in the what workersFuture TasksShows tasks that are held by workers with a future ETA. These may have been retries with a cool down or tasks scheduled to run in the future.Queue BacklogShows tasks split by Queue and Priority that are still pending in the queueSpecifics on failed/completed tasksView the successful/failed tasks in admin of your auth. as below;CleanupIf you wish to perform a tidy-up of the database you can run the following command from your terminalpython manage.py ca_run_housekeepingSettingsCA_HOUSEKEEPING_DB_BACKLOGdefines how long (in days) records should be kept in
your database. Default is 14 days.CA_RESULT_MAX_LENif you are using a results fed app you may wish to limit the result spam to database.
in yourlocal.pyadd the settingCA_RESULT_MAX_LEN=1000set the integer to what ever you want as your max length. Default is-1or unlimited.CA_LOG_SUCCESS_TO_DBIf you don't want the module to logSuccessful Tasksto database, set this toFalse. Default isTrueCA_LOG_FAILURE_TO_DBIf you don't want the module to logFailed Tasksto database, set this toFalse. Default isTrueIssuesPlease remember to report any celeryanalytics related issues using the issues onthisrepository.
|
allianceauth-celeryanalytics-housekeeping
|
Alliance Auth Celery Analytics HousekeepingHousekeeping for Alliance Auth Celery Analyticspipinstallallianceauth-celeryanalytics-housekeepingInlocal.pyaddceleryanalytics_housekeepingto yourINSTALLED_APPS.Also add the following:## AA Celery Analytics Housekeepingif("celeryanalytics"inINSTALLED_APPSand"celeryanalytics_housekeeping"inINSTALLED_APPS):# Keep 10 days (default)CELERYANALYTICS_HOUSEKEEPING_DB_BACKLOG=10# Run every hourCELERYBEAT_SCHEDULE["celeryanalytics_housekeeping.tasks.run_housekeeping"]={"task":"celeryanalytics_housekeeping.tasks.run_housekeeping","schedule":crontab(minute=0,hour=0),}
|
allianceauth-corptools
|
CorpToolsLightweight Toolbox of Bits and bobs for todays Eve Group on the go!This module is the core of the CorpTools Ecosystem, this includes;Invoices: Automatic tracking of payments made to a holding wallet.Moons: Moon Mining tracking and Tax system.Indy Dash: What Industrial structures have what rigs and where are they.Pinger: High performance pings from the notification endpoint, using the data avaialbe from character audit.IncludedBits and Bobs:Character AuditAssetsRolesContactsNotificationsStandingsMarketsSkillsListQueueAudit/ExportWalletActivity AnalysisHistoryClonesImplantsCorp AuditWalletsStructuresAssetsSec GroupFiltersAudit Fully LoadedAssetsLocationTypeGroupSkill ListCorporate RolesCorporate TitleMain time in corpActive Devs:AaronKableInstallationInstall the Repo from gitpip install -U git+https://github.com/pvyParts/allianceauth-corp-tools.gitAdd'corptools',to yourINSTALLED_APPSin your projectslocal.pyrun migrations, collectstatic and restart authrun the corp tools setup managemnt commandpython manage.py ct_setupsetup your perms as documented belowadd characters and corp tokens as required.Set Corp Tools NameAdd the below lines to yourlocal.pysettings file, Changing the contexts to yours.You can optionally se the name of the app in the ui by setting this setting## name for Corp ToolsCORPTOOLS_APP_NAME="Character Audit"UsageSeting up automatic updatesThis will show how to do daily updates.Currently this is:2 times an hour ( minute 15, and 45) 1/48th of the total character updates, for at worst 1 update per character per dayCorp update run on all corps hourly at minute 30Got Audit AdminClickCreate or Update Periodic Tasksyou can edit the schedules to work more inline with your group as required.PermissionsThere are some basic access permsAll permissions are filtered by main character, if a person has neutral alts loaded they will also be visible to someone who can see their main.CharacterPermAdmin SitePermDescriptionview_characterauditnillCan view character audit.Generic Access perm to show the Member Audit Menu itemglobal_hrnillCan access other character's data for characters in any corp/alliance/state.Superuser level accessalliance_hrnillCan access other character's data for own alliance.Alliance only level accesscorp_hrnillCan access other character's data for own corp.Own Corp restricted level accessCorporatePermAdmin SitePermDescriptionglobal_corp_managernillCan access other character's data for characters in any corp/alliance/state.Superuser level accessalliance_corp_managernillCan access other character's data for own alliance.Alliance only level accessown_corp_managernillCan access other character's data for own corp.Own Corp restricted level accessholding_corp_structuresnillCan access configured holding corp structure data.Holding Corp Structure data accessholding_corp_walletsnillCan access configured holding corp wallet data.Holding Corp Structure data accessholding_corp_assetsnillCan access configured holding corp asset data.Holding Corp Structure data accessNote: Configure the "Holding Corps" in theCorptools ConfigurationAdmin Model. via the auth admin interface.SettingsModulesEach section of the character audit can be enabled and disabled via settings in yourlocal.pyTrueEnables the moduleFalseDisables the ModuleYou can also exclude section of hte updates from the "Active" metric, this is handy should you wish to add a module and not have everyone be marked as "Inactive" in the audit module. or if CCP is having issues with part of the ESI.Looks at AssetsTrueMasks the section in the active calculationFalseEnforces the section in the active calculationTo assist with auth related tasks we requestpublicDataon top of the configured set.ModuleEnable Setting (Default)Active Setting (Default)DescriptionScopes RequestedNoteAssetsCT_CHAR_ASSETS_MODULE(True)CT_CHAR_ACTIVE_IGNORE_ASSETS_MODULE(False)Character Assets'esi-assets.read_assets.v1'Fully enabled with a Sec Group FilterStandingsCT_CHAR_STANDINGS_MODULE(True)CT_CHAR_ACTIVE_IGNORE_STANDINGS_MODULE(False)Character NPC Standings'esi-characters.read_standings.v1'Fully enabledKillmailsCT_CHAR_KILLMAILS_MODULE(True)CT_CHAR_ACTIVE_IGNORE_KILLMAILS_MODULE(False)Character Killmails'esi-killmails.read_killmails.v1'Future VersionFittingsCT_CHAR_FITTINGS_MODULE(True)CT_CHAR_ACTIVE_IGNORE_FITTINGS_MODULE(False)Character Fittings'esi-fittings.read_fittings.v1'Future VersionCalendarCT_CHAR_CALENDAR_MODULE(True)CT_CHAR_ACTIVE_IGNORE_CALENDAR_MODULE(False)Character Killmails'esi-calendar.read_calendar_events.v1'Future VersionContactsCT_CHAR_CONTACTS_MODULE(True)CT_CHAR_ACTIVE_IGNORE_CONTACTS_MODULE(False)Character Contacts'esi-characters.read_contacts.v1'Fully enabledNotificationsCT_CHAR_NOTIFICATIONS_MODULE(True)CT_CHAR_ACTIVE_IGNORE_NOTIFICATIONS_MODULE(False)Character Notifications'esi-characters.read_notifications.v1'Fully enabledRolesCT_CHAR_ROLES_MODULE(True)CT_CHAR_ACTIVE_IGNORE_ROLES_MODULE(False)Character Roles and Titles'esi-characters.read_titles.v1', 'esi-characters.read_corporation_roles.v1'Fully enabled with a Sec Group FilterIndustryCT_CHAR_INDUSTRY_MODULE(True)CT_CHAR_ACTIVE_IGNORE_INDUSTRY_MODULE(False)Character Indy Jobs'esi-industry.read_character_jobs.v1'Fully enabledMiningCT_CHAR_MINING_MODULE(True)CT_CHAR_ACTIVE_IGNORE_MINING_MODULE(False)Character Mining Ledgers'esi-industry.read_character_mining.v1'Future VersionWallets/Markets/ContractsCT_CHAR_WALLET_MODULE(True)CT_CHAR_ACTIVE_IGNORE_WALLET_MODULE(False)Character Wallets, Contracts and Trading/Orders'esi-markets.read_character_orders.v1', 'esi-wallet.read_character_wallet.v1', 'esi-contracts.read_character_contracts.v1'Fully EnabledSkillsCT_CHAR_SKILLS_MODULE(True)CT_CHAR_ACTIVE_IGNORE_SKILLS_MODULE(False)Character Skills/Queues and Doctrine Tools'esi-skills.read_skillqueue.v1','esi-skills.read_skills.v1'Fully Enabled with Sec Group FiltersClonesCT_CHAR_CLONES_MODULE(True)CT_CHAR_ACTIVE_IGNORE_CLONES_MODULE(False)Character Medical and Jump Clone Module'esi-clones.read_implants.v1', 'esi-clones.read_clones.v1'Fully Enabled with a Sec Group FilterFleetCT_CHAR_FLEET_MODULE(True)nillCharacter Fleet Tools'esi-fleets.read_fleet.v1', 'esi-fleets.write_fleet.v1`Future VersionMailCT_CHAR_MAIL_MODULE(False)CT_CHAR_ACTIVE_IGNORE_MAIL_MODULE(False)Character Mail Views'esi-mail.read_mail.v1`Fully EnabledHelpersCT_CHAR_HELPER_MODULE(False)CT_CHAR_ACTIVE_IGNORE_HELPER_MODULE(False)Character Helpers'esi-ui.open_window.v1','esi-ui.write_waypoint.v1'Future VersionsOpportunitiesCT_CHAR_OPPORTUNITIES(False)nillCharacter Opportunities'esi-characters.read_opportunities.v1'Future VersionsLoyalty PointsCT_CHAR_LOYALTYPOINTS_MODULE(False)CT_CHAR_ACTIVE_IGNORE_LOYALTYPOINTS_MODULE(True)Character LP'esi-characters.read_loyalty.v1'Fully EnabledExtra ScopesIfAssets,Clones,WalletsorMinningare enabled these extra spoces are requested:'esi-universe.read_structures.v1''esi-search.search_structures.v1'Other SettingsSettingDefaultDescriptionCORPTOOLS_APP_NAME"Character Audit"Name on the menu for Character AuditCT_CHAR_MAX_INACTIVE_DAYS3Days till data is considered StaleCORPTOOLS_DISCORD_BOT_COGS["corptools.cogs.routes", "corptools.cogs.locate"]Discord bot cogs to enable/disableCT_PAGINATION_SIZE30000Max items per page of data in the UICT_USERS_CAN_FORCE_REFRESHFalseSet toTrueto force cache invalidation on a regular user requresting updates from the UI. Superusers will always cache invalidate on requesting an update.ContributingMake sure you have signed theLicense Agreementby logging in athttps://developers.eveonline.combefore submitting any pull requests. All bug fixes or features must not include extra superfluous formatting changes.
|
allianceauth-corptools-indydash
|
IndyDashRequires CorptoolsDisplay Structures that have industry purposes and what rigs and crap they have.
|
allianceauth-corptools-moons
|
Moon Toolsmoon frack monitoring and taxation, taxation is calculated ( default, but configurable ) 2 weekly and includes all valid "taxes" from the period.tax optionsCorp FilterRank system for all strucutres that are captured in a "Tax Group"Flat rate or configurable variable tax rates per ore typeMore specific overrides the restRegion filterConstellation FilterSystem FilterMoon Filterinstallationthis app is built on corptools and invoices. install them first.pip install allianceauth-corptools-moonsadd 'moons' to your installed apps in local.pyset your "public" moons variable inlocal.pyPUBLIC_MOON_CORPS=[1234,56789,101112]# where the numbers are the corp idsrun migrationsrun the setup management taskpython manage.py setup_moon_toolwait for the tasks to finish.you need to ensure all your corps have pulled data and are working correctly before you invoice for the first time.setup your tax brackets and taxation rates / zones in adminadmin > moons > mining tax ( Highest rank is run first )check the settings in consolepython manage.py current_tax_outstandingCalculating!
Last Invoice 2021-09-06 00:00:00+00:00!
Doing some math... Please wait...
We've seen 56 known members!
We've seen 12 unknown characters!
Who have mined $833,068,517,622.8707 worth of ore!
Current Tax puts this at $195,791,603,220.688 in taxes!
the structures included are:
[system] - [name]
[system] - [name]
[system] - [name]
[system] - [name]
[system] - [name]
[system] - [name]once you are happy, open admin and enable and then run theSend Moon Invoicestask. This will now run every 14 days.
|
allianceauth-corptools-pinger
|
High Performance PingsLeverage the corptools data to notify via discord certain events at a corp/alliance levelfilter on/off regions/const/system/corps/alliances/types/strucutre type/notification type via admin. end specific notifications to different places via webhooksconfigurable @ settingsWhat Pings are Available:Structuresattack/reinforceStructureLostShieldsStructureLostArmorStructureUnderAttacklow fuel ()abandoned ()destroyed (StructureDestroyed)low power (StructureWentLowPower)anchoring (StructureAnchoring)unanchoring (StructureUnanchoring)high power (StructureWentHighPower)transfer (OwnershipTransferred)POSattack/reinforceTowerAlertMsgSovattacksSovStructureReinforcedEntosisCaptureStartedpos anchoring (AllAnchoringMsg)MoonsExtraction Started (MoonminingExtractionStarted)Extraction Complete (MoonminingExtractionFinished)Laser Fired (MoonminingLaserFired)auto fracture (MoonminingAutomaticFracture)HRNew application (CorpAppNewMsg)OptimisationSeparate Worker QueueEditmyauth/myauth/celery.pyapp.conf.task_routes={.....'pinger.tasks.corporation_notification_update':{'queue':'pingbot'},.....}Add program block tosupervisor.conf[program:pingbot]command=/path/to/venv/venv/bin/celery -A myauth worker --pool=threads --concurrency=5 -Q pingbotdirectory=/home/allianceserver/myauthuser=allianceservernumprocs=1stdout_logfile=/home/allianceserver/myauth/log/pingbot.logstderr_logfile=/home/allianceserver/myauth/log/pingbot.logautostart=trueautorestart=truestartsecs=10stopwaitsecs=60killasgroup=truepriority=998
|
allianceauth-discordbot
|
AA-DiscordbotAA-Discordbot forAlliance Auth.FeaturesBot Framework, easily extensible with more CogsIntegration with Alliance Auth, able to fetch data directly from its django project.Channel/Direct messaging feature, with Tasks and a Queue/ConsumerCurrent CogsAbout!about - Bot Information and StatisticsAuth!auth or /auth - A direct link to the Auth Install to catch users familiar with other bots.Members!lookup [search string] - Fetch a users Main, Affiliation, State, Groups and linked characters from any character.!altcorp [search string] - search for users with characters in an altcorpRemind!remindme [5s/m/h/d text] - Sets a simple non-persistent reminder timer when the bot will respond with the textSov!vuln [context] - Returns a list of Vulnerable sov structures for a Region/Constellation/Solar_System or alliance!sov [context] - Returns a list ofallsov structures for a Region/Constellation/Solar_System or alliance!lowadm - Lists sov in need of ADM-ing, context provided in settings.Time!time or /time - Returns the current EVE Time.Timers!timer - Returns the next Structure timer from allianceauth.timerboard.Ticket/help and Message context command to create private support threadsPriceCheck:amarr - Check an item price on Amarr marketjita - Check an item price on Jita marketprice - Check an item price on Jita and Amarr marketEaster Eggs,!happybirthday [text] - Wishes the text a happy birthday, works with user mentionsWelcomeGoodbyeWelcome - Responds to user join events with predefined messages.Goodbye - Responds to user leave events with predefined messages.AdminSlash commands to help with setting up a discord server when you are not admin or owner.accessed via/admin [command]add_role / add_role_read / rem_role - add/remove a role to a channelnew_channel - create a new channel and assign it a role for read accesspromote_role_to_god/demote_role_to_god - promote/demote a role to/from full admin so for when you need itempty_roles - list all roles on server with no membersclear_empty_roles - remove all empty roles from the serverorphans - find any user in discord with no auth user attachedget_webhooks - returns any webhooks setup in this current channel, or creates one for you and returns thatuptime - how long the bot has been up forInstallationEnsure you have installed and configured the Alliance Auth Discord Service,https://allianceauth.readthedocs.io/en/latest/features/services/discord.htmlUpdate yourDiscord Developer Applicationto include the Privileged Intents that we call. Please enable all intents.Install the app with your venv activepipinstallallianceauth-discordbotAdd'aadiscordbot',and'solo',to your INSTALLED_APPS list in local.py.Add the below lines to yourlocal.pysettings file, Changing the contexts to yours.## Settings for Allianceauth-Discordbot# Admin CommandsADMIN_DISCORD_BOT_CHANNELS=[111,222,333]# Sov CommandsSOV_DISCORD_BOT_CHANNELS=[111,222,333]# Adm CommandsADM_DISCORD_BOT_CHANNELS=[111,222,333]DISCORD_BOT_SOV_STRUCTURE_OWNER_IDS=[1000169]# Centre for Advanced Studies exampleDISCORD_BOT_MEMBER_ALLIANCES=[111,222,333]# A list of alliances to be considered "Mains"DISCORD_BOT_ADM_REGIONS=[10000002]# The Forge ExampleDISCORD_BOT_ADM_SYSTEMS=[30000142]# Jita ExampleDISCORD_BOT_ADM_CONSTELLATIONS=[20000020]# Kimitoro ExamplePRICE_CHECK_HOSTNAME="evepraisal.com"# Point to your favorite evepraisal## Insert AADiscordBot's logging into Django Logging configLOGGING['handlers']['bot_log_file']={'level':'INFO','class':'logging.handlers.RotatingFileHandler','filename':os.path.join(BASE_DIR,'log/discord_bot.log'),'formatter':'verbose','maxBytes':1024*1024*5,'backupCount':5,}LOGGING['loggers']['aadiscordbot']={'handlers':['bot_log_file'],'level':'DEBUG'}Add the below lines tomyauth/celery.pysomewhere above theapp.autodiscover_tasks...line## Route AA Discord bot tasks away from AllianceAuthapp.conf.task_routes={'aadiscordbot.tasks.*':{'queue':'aadiscordbot'}}Run migrationspython manage.py migrate(There should be none from this app)Gather your static filespython manage.py collectstatic(There should be none from this app)Fetchbot_conf.pyfrom the Git Repo into the root of your AA install, besidemanage.pywgethttps://raw.githubusercontent.com/pvyParts/allianceauth-discordbot/master/bot_conf.pyAmend your supervisor.conf, correcting paths as required and addauthbotto the launch group at the end of the conf[program:authbot]command=/home/allianceserver/venv/auth/bin/python /home/allianceserver/myauth/bot_conf.pydirectory=/home/allianceserver/myauthuser=allianceservernumprocs=1autostart=trueautorestart=truestopwaitsecs=600stdout_logfile=/home/allianceserver/myauth/log/authbot.logstderr_logfile=/home/allianceserver/myauth/log/authbot.log#This block should already exist, add authbot to it[group:myauth]programs=beat,worker,gunicorn,authbotpriority=999Go to admin and configure your admin users in the bot config model.Enable groups/states/users to utilize the lookup command by adding permissions undercorputils | corp stats |corputils.view_alliance_corpstatsOptional SettingsBuilt in Cogs# Change the bots default Cogs, add or remove if you want to use any of the extra cogs.DISCORD_BOT_COGS=["aadiscordbot.cogs.about",# about the bot"aadiscordbot.cogs.admin",# Discord server admin helpers"aadiscordbot.cogs.members",# Member lookup commands"aadiscordbot.cogs.timers",# timer board integration"aadiscordbot.cogs.auth",# return auth url"aadiscordbot.cogs.sov",# some sov helpers"aadiscordbot.cogs.time",# whats the time Mr Eve Server"aadiscordbot.cogs.eastereggs",# some "fun" commands from ariel..."aadiscordbot.cogs.remind",# very Basic in memory reminder tool"aadiscordbot.cogs.reaction_roles",# auth group integrated reaction roles"aadiscordbot.cogs.services",# service activation data"aadiscordbot.cogs.price_check",# Price Checks"aadiscordbot.cogs.eightball",# 8ball should i install this cog"aadiscordbot.cogs.welcomegoodbye",# Customizable user join/leave messages"aadiscordbot.cogs.models",# Populate and Maintain Django Models for Channels and Servers"aadiscordbot.cogs.quote",# Save and recall messages"aadiscordbot.cogs.prom_export",# Admin Level Logging cog"aadiscordbot.cogs.tickets",# Private thread ticket system with pingable groups.]Additional Rate Limiting# configure the optional rate limited# this is a bot_task function and how many / time period# 100/s equates to 100 per second max# 10/m equates to 10 per minute or 1 every 6 seconds max# 60/h equates to 60 per hour or one per minute maxDISCORD_BOT_TASK_RATE_LIMITS={"send_channel_message_by_discord_id":"100/s","send_direct_message_by_discord_id":"1/s","send_direct_message_by_user_id":"1/s"}Reaction Roles❗❗❗This will bypass the Group Leadership/Join Request System: This is intended for open groups but not limited to it! ❗❗❗The bot is able to run a reaction roles system that is compatible with auth and public users on a discord.If a member is part of auth it will do auth syncing of rolesIf a member is not found in auth and the reaction role message has the public flag set it will assign roles to anyone who reactsHow To Reaction Role!Setup the inital Message you wish to use buy using the command!rrOptionalEdit the name and settings of this message inAdmin > Discord Bot > Reaction Role MessagesReact to the message with the reactions you wish to use.The bot will counter react to the reactions when it creates the binding in auth.GotoAdmin > Discord Bot > Reaction Role BindingsAssign the groups you want for each reactionMessages AdminReactions AdminIntegrationsStatisticsAdds zkill Monthly/Yearly stats to !lookuptimezonesUpdates thetimecommand to have all timezones configured in auth.Welcome Messaages`
With the WelcomeGoodbye Cog activated, Discordbot will grab a random message from the Welcome or Goodbye Message Model and send it to the Guild System channelThese can be configured in admin under/admin/aadiscordbot/welcomemessage/and/admin/aadiscordbot/goodbyemessage/The messages support some string formatting`{user_mention} - A Discord @ Mention`{guild_name} - The name of the Discord Server`{auth_url} - A link to AuthWelcome {user_mention} to {guild_name}, I hope you enjoy your stay.
You can Authenticate for more access {auth_url}Private Thread Ticket System❗❗❗While this is fully functional, this is still in early stages of development, Please report any issues you find!❗❗❗With theaadiscordbot.cogs.ticketsCog activated, users wll be able to issue the/helpcommand to pick a group to get help from.The groups available for selection are configurable in the site admin underDiscord Bot > Ticket Cog ConfigurationYou also need to choose a channel to create the threads in from the site adminDiscord Bot > Ticket Cog Configuration:Anyone who can use the/helpcommand must have View and Send Message permissions on this channel otherwise they will not be able to see the tickets authbot creates for themAuthbot must have the permissions to create private threads in this channelAuthbot must have the permissions to send messages to this channelUsing AA-Discordbot from my projectSend MessagesYou can use the send_message helper to send a message with text/embed to:Discord user_idDiscord channel_idAuth User Model ObjectAuth user_pkaadiscordbot/tasks.pyExample Usagefromdjango.contrib.auth.modelsimportUserfromdjango.appsimportapps## Use a small helper to check if AA-Discordbot is installsdefdiscord_bot_active():returnapps.is_installed('aadiscordbot')## Only import it, if it is installedifdiscord_bot_active():fromaadiscordbot.tasksimportsend_message# if you want to send discord embed import them too.fromdiscordimportEmbed,Color## this helper can be called to Queue up a Message## AA Should not act on these, only AA-DiscordBot will consume themifdiscord_bot_active():usr=User.objects.get(pk=1)# discord ID of usermsg="Channel ID Tests"e=Embed(title="Channel ID Tests!",description="This is a Test Embed.\n\n```Discord Channel ID```",color=Color.yellow())e.add_field(name="Test Field 1",value="Value of some kind goes here")send_message(channel_id=639252062818926642,embed=e)# Embedsend_message(channel_id=639252062818926642,message=msg)# Messagesend_message(channel_id=639252062818926642,message=msg,embed=e)# Both# Discord ID of channelmsg="User ID Tests"e=Embed(title="User ID Tests!",description="This is a Test Embed.\n\n```Discord User ID```",color=Color.nitro_pink())e.add_field(name="Test Field 1",value="Value of some kind goes here")send_message(user_id=318309023478972417,embed=e)# Embedsend_message(user_id=318309023478972417,message=msg)# Messagesend_message(user_id=318309023478972417,message=msg,embed=e)# Both# User modelmsg="Auth User Model Tests"e=Embed(title="Auth User Model Tests!",description="This is a Test Embed.\n\n```Auth User Model```",color=Color.dark_orange())e.add_field(name="Test Field 1",value="Value of some kind goes here")send_message(user=usr,embed=e)# Embedsend_message(user=usr,message=msg)# Messagesend_message(user=usr,message=msg,embed=e)# Both# User PK idmsg="Auth User PK Tests"e=Embed(title="Auth User PK Tests!",description="This is a Test Embed.\n\n```Auth User PK```",color=Color.brand_green())e.add_field(name="Test Field 1",value="Value of some kind goes here")send_message(user_pk=1,embed=e)# Embedsend_message(user_pk=1,message=msg)# Messagesend_message(user_pk=1,message=msg,embed=e)# Both# Mixture of all of the abovemsg="All Together Tests"e=Embed(title="All Together Tests!",description="This is a Test Embed.\n\n```All Together```",color=Color.blurple())e.add_field(name="Test Field 1",value="Value of some kind goes here")send_message(channel_id=639252062818926642,user_id=318309023478972417,user=User.objects.get(pk=1),message=msg,embed=e)Registering 3rd Party Cogs (Handling Commands)Inauth_hooks.py, define a function that returns an array of cog modules, and register it as adiscord_cogs_hook:@hooks.register('discord_cogs_hook')defregister_cogs():return["yourapp.cogs.cog_a","yourapp.cogs.cog_b"]Optional SettingsIsolate AuthBot from Auth's Discord ServiceAUTHBOT_DISCORD_APP_ID='App ID for dedicated bot'AUTHBOT_DISCORD_BOT_TOKEN='Token for dedicated bot'IssuesPlease remember to report any aa-discordbot related issues using the issues onthisrepository.TroubleshootingPy-Cord and discord.py fighting in venvProblem:Something has gone funny with my venv after i installed another app that wanteddiscord.pyReason:This is due to the Py-cord lib sharing thediscordnamespace. Py-Cord is however a drop in replacement. So no issues should arise from using it over the now legacy discord.py lib.YMMVFix:Uninstalldiscord.pyby runningpip uninstall discord.pywith your venv active.Reinstallpy-cordby runningpip install -U py-cord==2.0.0b3with your venv active.Approach the dev from the app that overrode your py-cord to update to a maintained lib.
|
allianceauth-discord-multiverse
|
Discord MultiverseService module for managing an unlimited number of discord servers from a single auth instance. It can run side by side with the core auth discord service, or completely standalone.Most of the code is borrowed from Alliance Auth's core Discord Service Module[link] and re-purposed to be guild agnostic.Active Devs:AaronKable- THIS APPLICATION IS NOT PRODUCTION READYMID PRIO:TODO: Check the performance with massive servers/counts...TODO: ensure no cache conflictsTODO: Instructions and documentationTODO: Maybe custom client/secrets at a server level?HIGH PRIO!TODO: Check AuthBot to see what it does.TODO: Check/update all members on change of server model.Installationpip installpackageAdd'aadiscordmultiverse',to yourINSTALLED_APPSin your projectslocal.pyRun migrations, collectstatic and restart auth.Setup your permissions as documented belowAccess Control and Server PermissionsFirst and foremost to accessANYserver a user must have this permission;aadiscordmultiverse | discord managed server | Can access the Discord Multiverse servicesAccess control to each server is managed by the Server ModelYou can grant access by adding one of the following to the managed server in admin.User StateUser GroupsMain Characters FactionMain Characters AllianceMain Characters CorporationMain CharacterAdding a Guild to AuthAdd a newDISCORD MANAGED SERVERin adminSet the guild id to match your new serverset any access control settings you needSet the ignored groups for the server. These groups wll not be synced to this discord server.Click SaveGoto Services in the main auth siteClick "Link Discord" on the new server and add your auth bot to the correct server.People can now join as required
|
allianceauth-graphql
|
allianceauth-graphqlGraphQL integration for AllianceAuthFree software: GNU General Public License v3This version is in beta, please open an issue if you face any bug.CompatibilityVersions>=0.16are only compatible with AllianceAuth v3.SetupThe following is assuming you have a functioning AllianceAuth installation.Install pluginpip install allianceauth-graphql.Add the following apps to the bottom of yourINSTALLED_APPSin the local.py settings file:'allianceauth_graphql','graphene_django',"graphql_jwt.refresh_token.apps.RefreshTokenConfig",Add the following settings to your local.py file:fromdatetimeimporttimedelta# ...GRAPHENE={'SCHEMA':'allianceauth_graphql.schema.schema',"MIDDLEWARE":["graphql_jwt.middleware.JSONWebTokenMiddleware",],}AUTHENTICATION_BACKENDS+=["graphql_jwt.backends.JSONWebTokenBackend",]GRAPHQL_JWT={"JWT_VERIFY_EXPIRATION":True,"JWT_LONG_RUNNING_REFRESH_TOKEN":True,"JWT_EXPIRATION_DELTA":timedelta(days=1),"JWT_REFRESH_EXPIRATION_DELTA":timedelta(days=7),}Feel free to edit the expiration limits of your tokens.Edit your projects url.py file:It should looks something like thisfromdjango.conf.urlsimportincludefromallianceauthimporturlsfromdjango.urlsimportre_pathurlpatterns=[re_path(r'',include(urls)),]handler500='allianceauth.views.Generic500Redirect'handler404='allianceauth.views.Generic404Redirect'handler403='allianceauth.views.Generic403Redirect'handler400='allianceauth.views.Generic400Redirect'After the edit:fromdjango.conf.urlsimportincludefromallianceauthimporturlsfromallianceauth_graphqlimporturlsasaa_gql_urlsfromdjango.urlsimportre_pathurlpatterns=[re_path(r'',include(urls)),re_path(r'graphql/',include(aa_gql_urls)),]handler500='allianceauth.views.Generic500Redirect'handler404='allianceauth.views.Generic404Redirect'handler403='allianceauth.views.Generic403Redirect'handler400='allianceauth.views.Generic400Redirect'Run migrations.If you haveSHOW_GRAPHIQLsetting set toTrue(see below), run collectstaticsRestart AllianceAuth.Community Creations IntegrationCurrently the package supports the integration with the following community packages:allianceauth-pve: v1.11.xBe sure to check if you have the right versions of these package or the GraphQL will not have the same behaviour as the apps.SettingsSettingDefaultDescriptionSHOW_GRAPHIQLTrueShows the graphiql UI in the browserGRAPHQL_LOGIN_SCOPES['publicData']Tokens needed. Unlike AllianceAuth pages, you need to login with the scopes you'll use, otherwise you won't be able to perform some queriesREDIRECT_SITENo defaultThe URL domain for redirecting after email verification. It has to have the protocol and not the slash at the end:http(s)://<yoursite>REDIRECT_PATH/registration/callback/Path to append to REDIRECT_SITE for building the redirect URLCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.
|
allianceauth-group-assigner
|
Group AssignerSimple plugin forAllianceAuthto assign groups to users when they change states.Installationpip install allianceauth-group-assigneradd'groupassign',to yourINSTALLED_APPSin the local.py,run migrationsrestart authSetupAdd groups to the required State in adminadmin/groupassign/stategroupbinding/this module will not remove groupsyou can achieve this with the groups state permissions.If you wish to sync you existing users there is a task that can be setup.In Django Admin select periodic tasksClick Add NewSe the name to Something meaning full "Sync all State Group Bindings"Pickgroupassign.tasks.check_all_bindingsfrom the task drop downEnsure Enabled is checkedClick The green arrow inline with the crontab schedule to add a new cron.Set the cron to: Minutes0, Hours0, Days of the Week0, rest leave as*this will run the updates first day of each week at GMT 0000 (Or set it to what ever timer you like)Click Save on the cron window.Click save on The Periodic task.select the new task and pickRun Selected Taskfrom the dropdown at the top and clickGoContributingMake sure you have signed theLicense Agreementby logging in athttps://developers.eveonline.combefore submitting any pull requests. All bug fixes or features must not include extra superfluous formatting changes. If you have an issue with formatting, push it in it's own PR for discussion.Change logv0.0.1First release
|
allianceauth-imicusfat
|
ImicusFATAn Improved FAT/PAP System forAlliance Auth.Feature Highlights/DifferencesFATLink Creation and Population from ESIFleet Type Classification (can be added in the Admin Menu)Graphical Statistics ViewsMany Core Functionality Improvements and FixesImicusFAT will work alongside the built-in AA-FAT System and bFAT*. However data does not share, but you can migrate their data to ImicusFAT, for more information see below.ContentsInstallationStep 1 - Install appStep 2 - Update your AA settingsStep 3 - Finalize the installationUpdatingData MigrationImport from AA-FATImport from bFATSettingsCreditsInstallationImportant: This app is a plugin for Alliance Auth. If you don't have Alliance Auth running already, please install it first before proceeding. (see the officialAA installation guidefor details)Important: For users migrating from bFAT, please readMigrating from bFATspecific instructions FIRST.Step 1 - Install appMake sure you are in the virtual environment (venv) of your Alliance Auth installation. Then install the latest version:pipinstallallianceauth-imicusfatStep 2 - Update your AA settingsConfigure your AA settings (local.py) as follows:Add'imicusfat',toINSTALLED_APPSAdd the scheduled task so ESI links will be updated automagically# ImicusFAT - https://gitlab.com/evictus.iou/allianceauth-imicusfatCELERYBEAT_SCHEDULE["imicusfat_update_esi_fatlinks"]={"task":"imicusfat.tasks.update_esi_fatlinks","schedule":crontab(minute="*/1"),}Step 3 - Finalize the installationRun migrations & copy static filespythonmanage.pycollectstatic
pythonmanage.pymigrateRestart your supervisor services for AA.UpdatingTo update your existing installation of ImicusFAT, first enable your virtual environment (venv) of your Alliance Auth installation.pipinstall-Uallianceauth-imicusfat
pythonmanage.pycollectstatic
pythonmanage.pymigrateFinally restart your supervisor services for AAData MigrationRight after the initial installation and running migrations, you can import the data from Alliance Auth's own FAT system or bFAT, if you have used it until now.!!IMPORTANT!!Only do this once and ONLY BEFORE you are using ImicusFAT.Import from AA-FATpythonmyauth/manage.pyimicusfat_import_from_allianceauth_fatImport from bFATpythonmyauth/manage.pyimicusfat_import_from_bfatSettingsTo customize the module, the following settings are available.NameDescriptionDefault ValueIMICUSFAT_DEFAULT_FATLINK_EXPIRY_TIMESets the default expiry time in minutes for clickable FAT links60Credits• ImicusFAT • Developed and Maintained by @exiom with @Aproia and @ppfeufer • Based onallianceauth-bfatby @colcrunch •
|
allianceauth-invoices
|
Invoice ManagerInvoice module forAllianceAuthwith simplicity and extendability in mind.IncludedBits and Bobs:Simple Invoice ModelAssigned to CharacterDue DatesInvoice Ref used for tracking paymentsNotificationsSimple task for checking for paymentsTheToDoList:Make Payment Corp selectable at invoice levelAdd the Open info in game from SRP-ModInstallationthis app is built as a sub module ofcorptools, please install this first.Install the apppip install -U allianceauth-invoicesAdd'invoices',to yourINSTALLED_APPSin your projectslocal.pyrun migrations, collect static and restart authpython manage.py migrate invoicespython manage.py collectstaticsupervisorctrl restart allgo go the following address to set up default cron tasksAUTH ADDRESS/invoice/admin_create_tasks/setup your perms as documented belowadd characters and corp tokens as requiredSetup update tasks if you wish for the data to be auto updated. See Usage Below.UpdatesInstall the apppip install -U allianceauth-invoicesrun migrations, collect static and restart authpython manage.py migrate invoicespython manage.py collectstaticsupervisorctrl restart allSet Corp IDAdd the below lines to yourlocal.pysettings file, Changing the contexts to yours.## Settings for Invoice ManagerPAYMENT_CORP=123456789You can optionally se the name of the app in the ui by setting this setting## name for Invoice ManagerINVOICES_APP_NAME="Invoices Pay Now!"PermissionsThere are some basic access permsAdmin perms are filtered by main character, if a person has neutral alts loaded their invoices will also be visible to someone who can see their main.PermAdmin SitePermDescriptionaccess_invoicesnillCan Access the Invoice App.Generic Access perm to show the Invoice menu optionview_allnillCan View All Invoices.Superuser level accessview_alliancenillCan View Own Alliances Invoices.Alliance only level accessview_corpnillCan View Own Corps Invoices.Corp restricted level accessNotification SettingsYou can disable the notifications generated by this app for either discord or auth by setting the following tofalsethe defaults areTrue## No Auth NotificationsINVOICES_SEND_AUTH_NOTIFICATIONS=False## No Discord NotificationsINVOICES_SEND_DISCORD_BOT_NOTIFICATIONS=False
|
allianceauth-loki-logging
|
Alliance Auth Loki LoggerPython logging handler and formatter forlokifor django. Supports blocking calls and non blocking ones, using threading.Build on top ofdjango-loki-reloaded.Why?A single location for all logs across auth, Separate to auth! With search and notifications etc. Complete with python trace type data for everything.InstallationHave aloki instance configured and runningBare Metal:pipinstallallianceauth-loki-loggingorpipinstallgit+https://github.com/Solar-Helix-Independent-Transport/allianceauth-loki-logging.gitDockeradd this to your requirements file and rebuild your imageallianceauth-loki-logging>=1.0.0orallianceauth-loki-logging @ git+https://github.com/Solar-Helix-Independent-Transport/allianceauth-loki-logging.gitUsageLokiHandleris a custom logging handler that pushes log messages to Loki.Modify your settings to integrateallianceauth_loki_loggingwith Django's logging:in yourlocal.pyadd this at the end, Be sure to read the comments and update any that need to be updated. Specifically the url for loki.LOKI_URL="'http://loki:3100/loki/api/v1/push'### Override the defaults from base.pyLOGGING={'version':1,'disable_existing_loggers':False,'formatters':{'verbose':{'format':"[%(asctime)s]%(levelname)s[%(name)s:%(lineno)s]%(message)s",'datefmt':"%d/%b/%Y %H:%M:%S"},'simple':{'format':'%(levelname)s%(message)s'},},'handlers':{'extension_file':{'level':'INFO','class':'logging.handlers.RotatingFileHandler','filename':os.path.join(BASE_DIR,'log/extensions.log'),'formatter':'verbose','maxBytes':1024*1024*5,# edit this line to change max log file size'backupCount':5,# edit this line to change number of log backups},'console':{'level':'DEBUG'ifDEBUGelse'INFO',# edit this line to change logging level to console'class':'logging.StreamHandler','formatter':'verbose',},'notifications':{# creates notifications for users with logging_notifications permission'level':'ERROR',# edit this line to change logging level to notifications'class':'allianceauth.notifications.handlers.NotificationHandler','formatter':'verbose',},},'loggers':{'allianceauth':{'handlers':['notifications'],'level':'ERROR',},'extensions':{'handlers':['extension_file'],'level':'DEBUG'ifDEBUGelse'INFO',}}}### LOKI Specific settingsLOGGING['formatters']['loki']={'class':'allianceauth_loki_logging.LokiFormatter'# required}print(f"Configuring Loki Log job to:{os.path.basename(os.sys.argv[0])}")LOGGING['handlers']['loki']={'level':'DEBUG'ifDEBUGelse'INFO',# Required # We are auto setting the log level to only record debug when in debug.'class':'allianceauth_loki_logging.LokiHandler',# Required'formatter':'loki',#Required'timeout':1,# Post request timeout, default is 0.5. Optional# Loki url. Defaults to localhost. Optional.'url':,LOKI_URL,# Extra tags / labels to attach to the log. Optional, but usefull to differentiate instances.'tags':{"job":os.path.basename(os.sys.argv[0]),# Auto set the job to differentiate between celery, gunicorn, manage.py etc.# you could add extra tags here if you were running multiple auths and needed to be able to tell them apart in a single loki instance eg:# "auth": "CoolAuth 1",},# Push mode. Can be 'sync' or 'thread'. Sync is blocking, thread is non-blocking. Defaults to sync. Optional.'mode':'thread',}LOGGING['root']={# Set the root logger'handlers':['loki','console'],'level':'DEBUG'ifDEBUGelse'INFO',# Auto set the log level to only record debug when in debug}WORKER_HIJACK_ROOT_LOGGER=False# Do not overide with celery logging.Diagnosing issues with logs not being pushed in HIGHLY threaded environmentsadd the following to your loki config to bypass the rate limits.limits_config:max_streams_per_user:0max_global_streams_per_user:0
|
allianceauth-mumble-tagger
|
Mumble TaggerThis is a simple plugin forAlliance Authto append a "Tag" too the end of a display name on mumble depending on a users group association.Setuppip install allianceauth-mumble-taggeradd'mumbletagger',to INSTALLED_APPS in your local.pymigrate database and restart authSetup your tags in the admin paneljob done.PicsAdmin Setup DemoUser in MumbleContributeAll contributions are welcome, but please if you create a PR for functionality or bugfix, do not mix in unrelated formatting changes along with it.
|
allianceauth-mumbletemps
|
Mumble Temp Links⚠️ This does nothing on it's own you also need to update your authenticator!To my fork found here. More on that in the setup instructions below!ThisAlliance Authmodule lets you give temp access to your mumble service with ease.UsageA user with the create permission creates a link and copies it to the people who need access,
TempLink users will be given the groupGuest, mumble ACL's can be setup to restrict access as required.
The mumble chat command!kicktempswill purge the mumble server of all temp users, if they still have a valid Templink they will be able to reconnect until it either expires or is removed from the tool. Only members who have theKick Userpermission can use the command.Setup⚠️This is assuming you already have configured a fully functioning mumble service.Auth Pluginpip install allianceauth-mumbletempsadd'mumbletemps',to yourINSTALLED_APPSin the local.py, I recommend it is at the top for menu ordering.run migrationsrestart authSettingsSettingDefaultDescriptionMUMBLE_TEMPS_FORCE_SSOTrueSetting this toFalsewill allow users to auth with the non-sso methodMUMBLE_TEMPS_SSO_PREFIX[TEMP]Display Name Prefix for an SSO'd temp user in mumbleMUMBLE_TEMPS_LOGIN_PREFIX[*TEMP]Display Name Prefix for a non-SSO'd temp user in mumbleMumble AuthenticatorTo update your mumble authenticator if you git cloned the original repo we will add my branch as a remote and checkout the updated code.⚠️It is a good idea to backup yourauthenticator.inifile before startingcdinto the folder you have the authenticator code in.git statusto confirm it is a git repo and the correct placegit remote add upstream [email protected]:aaronkable/mumble-authenticator.gitto add the remotegit fetch upstreamto grab the updatesgit checkout upstream/masterto roll over to my coderestart your authenticator with supervisorℹ️ The authenticator.log should show something likeStarting AllianceAuth mumble authenticator V:1.0.0 - TempLinksIf you are on the correct branch and version, if not you may still be running the default auth version and will need to investigate why. Users will get prompted for passwords when they try to connect with a temp link and you are not running this version. The Authenticator version needs to match this version!If you did not use the git clone method of installing the authenticator, simply copy the contents ofmy fork found hereon top of your current install,BE SURE TO BACKUP YOURauthenticator.iniBEFORE YOU START!Auth Login BypassTo enable people to not have to register on auth, ensure you have fully updateddjango-esiEdit your projectsurls.pyfile:It should look something like this, if yours is different only add the parts outlined below:fromdjango.urlsimportre_pathfromdjango.conf.urlsimportincludefromallianceauthimporturlsurlpatterns=[re_path(r'',include(urls)),]handler500='allianceauth.views.Generic500Redirect'handler404='allianceauth.views.Generic404Redirect'handler403='allianceauth.views.Generic403Redirect'handler400='allianceauth.views.Generic400Redirect'Edit it to add a new import and a new urlfromdjango.urlsimportre_pathfromdjango.conf.urlsimportincludefromallianceauthimporturlsfrommumbletemps.viewsimportlink# *** New Importurlpatterns=[re_path(r'^mumbletemps/join/(?P<link_ref>[\w\-]+)/$',link,name='join'),# *** New URL override BEFORE THE MAIN IMPORTre_path(r'',include(urls)),]handler500='allianceauth.views.Generic500Redirect'handler404='allianceauth.views.Generic404Redirect'handler403='allianceauth.views.Generic403Redirect'handler400='allianceauth.views.Generic400Redirect'Restart services and you're done.PermissionsPermAdmin SiteAuth Sitemumbletemps.create_new_linksNoneCan create and delete Temp Links.PreviewManagement and CreationOPTIONAL Login Screen ( Non SSO mode )Templink User View
|
allianceauth-oidc-provider
|
allianceauth_oidcAllianceauth OIDC ProviderFeaturesOIDC / OAuth2Scopes AvailableopenidemailprofileIncludesgroupsclaim with all a members groups and state as a list of stringsApplication level permissionsglobal accessState accessgroup accessExampleSetup/Install:pip install allianceauth-oidc-provideradd to INSTALLED_APPS'allianceauth_oidc',
'oauth2_provider',Extra Settings Required# at the top of the filefrompathlibimportPath# Add these to the file further downOAUTH2_PROVIDER_APPLICATION_MODEL='allianceauth_oidc.AllianceAuthApplication'OAUTH2_PROVIDER={"OIDC_ENABLED":True,# https://django-oauth-toolkit.readthedocs.io/en/stable/oidc.html#creating-rsa-private-key"OIDC_RSA_PRIVATE_KEY":Path("/path/to/key/file").read_text(),## Load your private key"OAUTH2_VALIDATOR_CLASS":"allianceauth_oidc.auth_provider.AllianceAuthOAuth2Validator","SCOPES":{"openid":"User Profile","email":"Registered email","profile":"Main Character affiliation and Auth groups"},"PKCE_REQUIRED":False,"APPLICATION_ADMIN_CLASS":"allianceauth_oidc.admin.ApplicationAdmin",'ACCESS_TOKEN_EXPIRE_SECONDS':60,'REFRESH_TOKEN_EXPIRE_SECONDS':24*60*60,'ROTATE_REFRESH_TOKEN':True,}Please seethisfor more info on creating and managing a private keyAdd the endpoints to yoururls.pypath('o/', include('allianceauth_oidc.urls', namespace='oauth2_provider')),run migrationsrestart authApplication setupThe Big 4Authorization:https://your.url/o/authorize/Token:https://your.url/o/token/Profile:https://your.url/o/userinfo/Issuerhttps://your.url/oClaimsopenid profile emailClaim key mappingnameEve Main Character Name ( Profile Grant? )emailRegistered email on auth ( Email Grant )groupsList of all groups with the members state thrown in too ( Profile Grant )subPK of user modelWikiJSManually create and groups you care for your users to have in the wiki and the service will map them for you. This greatly cuts down on group spam.
in auth createAdministratorsto give access to the full wiki admin site.Administration > Authentication > Generic OpenID Connect / OAuth2Skip User ProfileoffEmail claimemailDisplay Name ClaimnameMap GroupsonGroups ClaimgroupsAllow Self RegistrationonGrafanaTested only with access no group mapping as yetGroup>Team mapping requires Grafana cloud or Enterprise and is outside of the scope of this doc./etc/grafana/grafana.ini[auth.generic_oauth]enabled=truename=Your Site Nameallow_sign_up=trueclient_id=******client_secret=*****scopes=openid,email,profileempty_scopes=falseemail_attribute_path=emailname_attribute_path=nameauth_url=https://your.url/o/authorize/token_url=https://your.url/o/token/api_url=https://your.url/o/userinfo/Debugging an applicationEnableDebug Modefor the specific application in the auth admin site.then in yourgunicorn.loglook for long lines similar to this after you attempt to log in,[01/Jan/2099 00:00:05] WARNING [allianceauth_oidc.signals:12] {"access_token": "abcdefghijklmnopqrstuvwxyz", "expires_in": 60, "token_type": "Bearer", "scope": "openid profile email", "refresh_token": "abcdefghijklmnopqrstuvwxyz", "id_token": "long ass string here"}take theid_tokenfield and paste it intohttps://jwt.io/to debug the data being sent to the application. it should be fairly self explanitory expect for these 2 fields.issis the issuer that must match exactly in the applications own settings.subis your user id if you need to debug why user is being sent.
|
allianceauth-pve
|
allianceauth-pvePvE tool for AllianceAuthFree software: GNU General Public License v3FeaturesThis package aims at helping groups of people manage PvE sessions, centralized loot management and loot taxes.Create a rotationRotations are a sort of containers for entries. When created, they have some options to customize the behavior of the tool with the entries, such as tax rate, count of setups of the system before ratting etc.They can be created by the people with the right permission (seebelow). For them, a button will be avaiable in the main page. It'll lead to a form for creating a rotation.FieldDescriptionNamePriorityThe priority for the rotation in the list of active rotations. Rotations are displayed in descending order of priority.Tax rateTax rate in percentage. 0 for disabling taxes.Max daily setupsThe maximum number of helped setups a user can get per day. This option is thought for wormholes where you should setup a system before ratting in it. Set to 0 for disabling tracking setups. Defaults to 1.Min people share setupThe minimum number of users in an entry for considering the setups valid. Defaults to 3Entry buttonsCustom buttonsto be shown in the Entry forms. You can select them by holding Ctrl and left-clicking. The package comes with buttons for the main C5 and C6 wormhole. sites.Roles setupsRoles presetsfor Entry forms. You can select them by holding Ctrl and left-clicking.Add EntriesEntries are the corrisponding of an actual PvE fleet. They consist in an estimated total loot value and a set of shares.
When an Entry is submitted to a rotation, all the rules of tax rate and setups are applied and the loot value is split between the participants according to their share weight.
To add an entry to a rotation, click on the plus button on the bottom left of the screen.Every entry has a list of shares. To add a share, search for the character you want to add in the panel on the right and click the add button.A share will be added with the first role in the list, 1 site count and no setup. Setups are helpful in wormholes when you want to track who helped setting up a system before ratting. Roles defines how loot will be split between the shares: for example, if someone has 1 site count and a role with a value of 1 and someone else has 1 site count and a role with a value of 2, this last person will receive double the amount of money of the first one.In order to add a role, you can click on theNew Rolebutton and create one from scratch or load a roles setup, if you chose at least one in the rotation form, by clicking on theLoad Roles Setupbutton.When you have a role loaded, you can choose it from the dropdown select on the shares.On the center of the right panel there is the Estimated total section. There is a numeric field and a list of buttons if you selected at least one in the rotation form. you can either input the estimated total by hand or click on the buttons while you are running the sites.On the right of the Estimated total field there are 4 buttons for incrementing the site count of the shares. If you hover each of them there'll be a tooltip telling what each button does.
The ones that change selected chars only edit the shares with the green arrow. This is helpful if you are doing the form while you are running the sites: if a person leaves, you can click on the arrow and it'll be unselected.Once you have submitted the entry, you'll see updating the summary and the entry list on the rotation page. You can edit an entry by clicking the arrow on the right of the row in the entry list and then click on the edit button.When the loot is sold, a person with the right permission (seebelow) can close the rotation and insert the sales value in the form. Then the closed rotation page will be shown with the right amount of money to send to each person, calculated on the sales value.You can see all the closed rotations from the dashboard.Funding ProjectsIn the dashboard, there is a section for funding projects. People with the appropriate permission (seebelow) can create projects and add them to the list. When adding entries, an active funding project can be selected with a percentage of the entry to be added to the project. The money will be added to the project total once the rotation is closed.In each project page, there is a list of the people who have contributed to the project and the total amount of money they have contributed and the current completion percentage of the project.Projects need to be closed manually by people with the appropriate permission and they will not appear during entry creation.Closed RotationIn a closed rotation summary, you can click on a character name and on an actual total to copy their value. Once you do so, the corresponding row in the table will be of a different color to help tracking down who is already being copied. To reset a row color, click on theXbutton on the right of the row.Buttons and Roles SetupsButtons and roles setups can be created in the admin page by people who have access.SettingsSettingDefaultDescriptionPVE_ONLY_MAINSFalseWhen set toTrue, only main characters are shown in search barHelp wantedThis modeling is based on how whormoles fleets and loot are managed. If you have some feature requests for other types of environment, pls joinAllianceAuth discordand give me a shout in the #pve-tool channel. I don't have any experience in anything except whormholes so any help is appriciated.InstallationThe following is assuming you have a functioning AllianceAuth installation.pip install allianceauth-pveAddallianceauth_pve(note the underscore) to yourINSTALLED_APPSRun migrationsRun collectstaticRestart AllianceAuthUpdatingpip install -U allianceauth-pveRun migrationsRun collectstaticRestart AllianceAuthPermissionsThe following permissions are provided:access_pve: only users with this permission can see the tool and be added in entries.manage_entries: only users with this permissions can create entries.manage_rotations: only users with this permissions can create and close rotations.manage_funding_projects: only users with this permissions can create and close funding projects.You'll have to assign this permissions to desired groups/states to make the tool work.CreditsFrom an original idea of iRBlue.This package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.
|
allianceauth-securegroups
|
Secure GroupsPlugin for Auto Group Bot Stuffs forAlliance Auth.On its own this app does very little! However it leverages any module that is capable of providing a filter. Giving you the ability to add a very wide range of automatic filtration options your groups.FeaturesManual Groups, either auto join or still request join via Alliance Auth's Built in Group Management system.Auto Groups, process all member states for a filter and add/remove who ever passes/doesn't.A Grace on failure feature when already in the group with notifications to users to alow time to rectifyPings to users on discord and in auth when they are due for and removedSmart Group Filters included with this app:Character in Alliance on accountCharacter in Corp on accountUser has groupApps that provide a filterInformation for Third Party Developers can be foundHereNot in any particular order:CorpToolsAssets in LocationsSkill List checksMain's Time in CorpAll characters loaded in corp-toolsStatisticszKill - x Kills in x MonthsBlacklist module ( link )users has no flags or has or has never had blacklisted charMember Auditvia itsintegration.Activity FilterAsset FilterCharacter Age FilterMember Audit Compliance FilterSkill Set FilterSkill Point FilterSoon(tm) WishlistFilter for PAP's per Time PeriodPlease request any "filters" you feel are worthwhile.InstallationInstallpip install allianceauth-securegroupsedit yourlocal.pyamd add'securegroups',toINSTALLED_APPSrun migrationspython myauth/manage.py migrate securegroupsrestart authsupervisorctrl restart allcreate the update task by runningpython myauth/manage.py setup_securegroup_taskthis will create a daily task to run all your smart group checks. you cam edit this schedule as you desire from withing the admin site.Admin > Periodic Tasks > Secure Group UpdaterConfigurationCreate an Auth Group.Admin > Group Management > Group > Add Group.WARNING: There is a bug in auth that will wipe andy "AuthGroup" Settings on first save, to get around this, Set your groups name then click save and continue, then edit the rest of the settings.Group Settings:The Smart Group will override the important ones.Hidden On, Internal Off, Public OffThe rest of the settings are observed as per Alliance Auth's normal group behaviorOpen: Setting this will let anyone that passes the checks to join without a manager approval.States:Set states here to limit auto groups to specific statesHaving no states will make an autogroup run against the entire user base. ( this is not recommended )Create your Smart FiltersThese will be in admin but can be under many apps that may provide a 3rd party filterCreate the filter and add your options as needed.Set any Filters "Grace Periods",Admin > Secure Groups > Smart Filtersthe default is 5 Days.0 is no grace.after the elapsed time the user will be removed.Setup the Smart GroupAdmin > Secure Groups > Smart Groups > Add Smart GroupGroup: pick group from step oneDescriptionOptional: to add to the group description in listFilters: pick your Smart Filters from Step 2Enabled: Turning this off Smart Groups don't show im the groups screen or run in any tasksCan Grace: Turning this off overrides all grace periods for Instant Kick during updates.Auto Group: Hides the group from the Secure Groups list, and will run every user in "member" States and constantly keep it in sync.Include In Updates: Setting this off will alow you to have a check om join and never again style group.NotificationsYou can send a simple update log to a discord webhookset these up inAdmin > Secure Groups > Group Update Webhooks > Add Group Update WebhookIf you are using the AllianceAuth Discord Bot fromHereusers will be notified of pending removals and or removals from groups via DM's from the bot with an explanation. This requires no configuration.ScreenshotsAdmin Setup of Smart GroupsUser Group SelectionUser Failed ChecksUser Passed ChecksAudit Secure GroupsDiscord Message ExampleIssuesPlease remember to report any Secure Groups related issues using the issues onthisrepository.ContributingMake sure you have signed theLicense Agreementby logging in atEVE Developersbefore submitting any pull requests.All bug fixes or features must not include extra superfluous formatting changes.
|
allianceauth-signal-pings
|
Signal PingsThis is a simple plugin forAlliance Authto send a "signal" to a discord webhook when a user does something in auth.Current SignalsGroup Join / Group LeaveHR applicationsTimerboard Create/Update/DeletesFleet Operation Create/Update/DeletesCharacterOwnership Gain and LossesSRP Requests with (WIP: Discord @mentions)TODO/WishlistSome translationsSetuppip install allianceauth-signal-pingsadd'signalpings',to INSTALLED_APPS in your local.pymigrate database and restart authSetup your webhooks in the admin panelsetup signals to ping for in the admin panelprepare for pingagedon.PicsAdmin Create WebhooksAdmin create groups to signalPingsContributeAll contributions are welcome, but please if you create a PR for functionality or bugfix, do not mix in unrelated formatting changes along with it.
|
allianceauth-site-claim
|
Site ClaimInstallation install from pypi or gitInstall the app and pre-reqspip install allianceauth-site-claim
or
pip install git+https://github.com/Solar-Helix-Independent-Transport/allianceauth-site-claim.gitadd'siteclaim',and'solo',( if its not already there )
to your local.pymigraterestart auth and authbotSettingsSettingDefaultWhat it doesSITE_CLAIM_ENABLE_SITESTrueEnable or disable the Sites CogSITE_CLAIM_ENABLE_ESSTrueEnable or disable the ESS Cog
|
allianceauth-tax-tools
|
Tax ToolsRequires Corptools for data with the wallet module enabled
|
allianceauth-wiki-js
|
Wiki-JS serviceSimple User and group management forWiki JSas a service of AllianceAuthSetupinstall and setup your Wiki.js instancefrom the Wiki Docsactivate venvpip install -U allianceauth-wiki-jsadd'wikijs',to yourINSTALLED_APPSin your projectslocal.pygenerate aFull AccessAPI key iun the wiki with maximum expiration be sure to copy it as the key wont be shown again.add the settings ( outlined below ) to yourlocal.pyrun migrations and restart authsetup permissions ( outlined below )PermissionsPermCodenameAdminFrontendCan access the WikiJS serviceaccess_wikijs-Gives access to Wiki.js serviceCan add wiki js-Admin add-Can change wiki js-Admin Edit-Can delete wiki js-Admin Delete-Can view wiki js-Admin View-SettingsSettingdefaultDescriptionWIKIJS_API_KEY""your global API key from the wiki admin sectionWIKIJS_URL""You Wiki's base URLWIKIJS_AADISCORDBOT_INTEGRATIONTrueEnables an AADiscordbot cog with the ability to search the wikiIf you have issues with auth not being able to access the wiki due to SSL/redirection or similar. ( Cloudlfair can cause issues)SettingdefaultDescriptionWIKIJS_API_URLWIKIJS_URLURL Overide for API accessadd this setting to your local py with a direct link to the wiki# if auth is on the same box as wikiWIKIJS_API_URL="http://localhost:3000"# if auth is on a different machine you could use the public ip adress of that machine.WIKIJS_API_URL="http://10.0.0.150:3000"FAQI lost admin when i registered my admin user.add a group calledAdministratorsto your auth instance and give it to anyone who needs admin on the wiki.I cant lock down my wiki to registered members only.i had to delete a row from the database manually to remove the guest roles permissions. Ask in the AA discord.
|
alliancepy
|
A library to access The Orange Alliance API.
This module makes it easy to access the official First Tech Challenge database and use it in your Python projects for things like data science and more.View the full documentationhereInstall with:pipinstallalliancepyHere’s a simple example:importalliancepyfromalliancepyimportSeasonclient=alliancepy.Client(api_key="api_key_goes_here",application_name="application_name_goes_here")team=client.team(16405)print(team.opr(Season.SKYSTONE))SupportsSupports Python 3.6 and up.
|
allib
|
Collection of modules that I personally find useful. You probably don’t want to add it to your requirements, but feel free to copy-paste code from the Github source code.
|
allie
|
No description available on PyPI.
|
alligator
|
Simple offline task queues. For Python.“See you later, alligator.”Latest documentation athttp://alligator.readthedocs.org/en/latest/.RequirementsPython 3.6+(Optional)redisfor the Redis backend(Optional)boto3>=1.12.0for the SQS backendBasic UsageThis example uses Django, but there’s nothing Django-specific about Alligator.I repeat, You can use it withanyPython code that would benefit from
background processing.fromalligatorimportGatorfromdjango.contrib.auth.modelsimportUserfromdjango.shortcutsimportsend_email# Make a Gator instance.# Under most circumstances, you would configure this in one place &# import that instance instead.gator=Gator('redis://localhost:6379/0')# The task itself.# Nothing special, just a plain *undecorated* function.deffollow_email(followee_username,follower_username):followee=User.objects.get(username=followee_username)follower=User.objects.get(username=follower_username)subject='You got followed!'message='Hey{}, you just got followed by{}! Whoohoo!'.format(followee.username,follower.username)send_email(subject,message,'[email protected]',[followee.email])# An simple, previously expensive view.@login_requireddeffollow(request,username):# You'd import the task function above.ifrequest.method=='POST':# Schedule the task.# Use args & kwargs as normal.gator.task(follow_email,request.user.username,username)returnredirect('...')Running TasksRather than trying to do autodiscovery, fanout, etc., you control how your
workers are configured & what they consume.If your needs are simple, run the includedlatergator.pyworker:$pythonlatergator.pyredis://localhost:6379/0If you have more complex needs, you can create a new executable file
(bin script, management command, whatever) & drop in the following code.fromalligatorimportGator,Worker# Bonus points if you import that one pre-configured ``Gator`` instead.gator=Gator('redis://localhost:6379/0')# Consume & handle all tasks.worker=Worker(gator)worker.run_forever()LicenseNew BSDRunning TestsAlligator has 95%+ test coverage & aims to be passing/stable at all times.If you’d like to run the tests, clone the repo, then run:$ virtualenv -p python3 env
$ . env/bin/activate
$ pip install -r requirements-tests.txt
$ python setup.py develop
$ pytest -s -v --cov=alligator --cov-report=html testsThe full test suite can be run via:$ export ALLIGATOR_TESTS_INCLUDE_SQS=true
$ ./tests/run_all.shThis requires all backends/queues to be running, as well as valid AWS
credentials ifALLIGATOR_TESTS_INCLUDE_SQS=trueis set.WHY?!!1!Because I have NIH-syndrome.Or because I longed for something simple (~375 loc).Or because I wanted something with tests (90%+ coverage) & docs.Or because I wanted pluggable backends.Or because testing some other queuing system was a pain.Or because I’m an idiot.RoadmapPost-1.0.0:Expand the supported backendsKafka?ActiveMQ support?RabbitMQ support????
|
allin
|
allinAllin is an experimental asynchronous web framework.I didn't expect this framework to be used in a production environment, as it's still in the early stages of development.Not sure when this framework can be used in production 😬You can help this project get better by creating anissueor PR. Thank you for your time!Table of Contents::raised_eyebrow: Why ?:books: Roadmap:star_struck: Features:love_you_gesture: Quick Start:sunglasses: InstallationFrom sourceWithpipAllinis heavily inspired byFlask,Starlette&Falcon.:raised_eyebrow: Why ?I'm just curious :monocle_face:Yup, I'm curious about how a web application based onASGIworks.It may not yet fully comply with theASGIapplication specifications as documented. But, for the main features like route mapping, HTTP responses, error handling, parsing the request body it's there....and I want to build my own framework from scratch so I know how the application works.Literally, the "framework parts" weren't built from scratch as I also used third party modules and some "parts from other sources" were used as references.This is part of the journey:books: RoadmapLifespan ProtocolHTTP ProtocolHTTP HeadersHTTP RequestJSON Body SupportMessagePack Body SupportForm Data SupportCookiesQuery ParametersHTTP ResponsesJSONResponseMessagePackResponseHTTP MiddlewareBefore HTTP RequestAfter HTTP RequestRoutingDecorator shortcuts such as@get,@post,@put, etc. are available.Nesting routersExtensionWebsocket Support:star_struck: FeaturesGlobal variables. (It means, you can access theappandrequestobject instances globally)Error handlingJSONandMessagePackrequests are supported out of the box (thanks tomsgspec)Form Data Support (application/x-www-form-urlencodedormultipart/form-data)Decorator shortcuts such as@get,@post,@put, etc. are available.Nesting routers:love_you_gesture: Quick StartHere is an example application based on theAllinframework and I'm sure you are familiar with it.fromallinimportAllin,JSONResponseapp=Allin()@app.route("/")asyncdefindex():returnJSONResponse({"message":"Hello World!"}):point_down: ExplanationTheappvariable is the ASGI application instance.And we create an endpoint with the route/on the lineapp.route(...)Then we add theindex()function to handle the/route.And the handler function will return a JSON response with the content{"message": "Hello World!"}That's it! looks familiar right?Want more? check out othersample projects here:sunglasses: InstallationInstall from sourcegit clone --depth 1 https://github.com/aprilahijriyan/allin.git
cd allinNeedhttps://python-poetry.org/installed on your devicepoetry build
pip install ./dist/*.whlInstall withpipCurrently I just published the pre-release versionv0.1.1a0. So, maybe you need to install it with the--preoption. Example:pip install --pre allin
|
allin1
|
All-In-One Music Structure AnalyzerThis package provides models for music structure analysis, predicting:Tempo (BPM)BeatsDownbeatsFunctional segment boundariesFunctional segment labels (e.g., intro, verse, chorus, bridge, outro)Table of ContentsInstallationUsage for CLIUsage for PythonVisualization & SonificationAvailable ModelsSpeedAdvanced Usage for ResearchConcerning MP3 FilesTrainingCitationInstallation1. Install PyTorchVisitPyTorchand install the appropriate version for your system.2. Install NATTEN (Required for Linux and Windows; macOS will auto-install)Linux: Download fromNATTEN websitemacOS: Auto-installs withallin1.Windows: Build from source:pipinstallninja# Recommended, not requiredgitclonehttps://github.com/SHI-Labs/NATTENcdNATTEN
make3. Install the packagepipinstallgit+https://github.com/CPJKU/madmom# install the latest madmom directly from GitHubpipinstallallin1# install this package4. (Optional) Install FFmpeg for MP3 supportFor ubuntu:sudoaptinstallffmpegFor macOS:brewinstallffmpegUsage for CLITo analyze audio files:allin1your_audio_file1.wavyour_audio_file2.mp3Results will be saved in the./structdirectory by default:./struct
└──your_audio_file1.json
└──your_audio_file2.jsonThe analysis results will be saved in JSON format:{"path":"/path/to/your_audio_file.wav","bpm":100,"beats":[0.33,0.75,1.14,...],"downbeats":[0.33,1.94,3.53,...],"beat_positions":[1,2,3,4,1,2,3,4,1,...],"segments":[{"start":0.0,"end":0.33,"label":"start"},{"start":0.33,"end":13.13,"label":"intro"},{"start":13.13,"end":37.53,"label":"chorus"},{"start":37.53,"end":51.53,"label":"verse"},...]}All available options are as follows:$allin1-h
usage:allin1[-h][-oOUT_DIR][-v][--viz-dirVIZ_DIR][-s][--sonif-dirSONIF_DIR][-a][-e][-mMODEL][-dDEVICE][-k][--demix-dirDEMIX_DIR][--spec-dirSPEC_DIR]paths[paths...]positionalarguments:pathsPathtotracks
options:-h,--helpshowthishelpmessageandexit-oOUT_DIR,--out-dirOUT_DIRPathtoadirectorytostoreanalysisresults(default:./struct)-v,--visualizeSavevisualizations(default:False)--viz-dirVIZ_DIRDirectorytosavevisualizationsif-visprovided(default:./viz)-s,--sonifySavesonifications(default:False)--sonif-dirSONIF_DIRDirectorytosavesonificationsif-sisprovided(default:./sonif)-a,--activSaveframe-levelrawactivationsfromsigmoidandsoftmax(default:False)-e,--embedSaveframe-levelembeddings(default:False)-mMODEL,--modelMODELNameofthepretrainedmodeltouse(default:harmonix-all)-dDEVICE,--deviceDEVICEDevicetouse(default:cudaifavailableelsecpu)-k,--keep-byproductsKeepdemixedaudiofilesandspectrograms(default:False)--demix-dirDEMIX_DIRPathtoadirectorytostoredemixedtracks(default:./demix)--spec-dirSPEC_DIRPathtoadirectorytostorespectrograms(default:./spec)Usage for PythonAvailable functions:analyze()load_result()visualize()sonify()analyze()Analyzes the provided audio files and returns the analysis results.importallin1# You can analyze a single file:result=allin1.analyze('your_audio_file.wav')# Or multiple files:results=allin1.analyze(['your_audio_file1.wav','your_audio_file2.mp3'])A result is a dataclass instance containing:AnalysisResult(path='/path/to/your_audio_file.wav',bpm=100,beats=[0.33,0.75,1.14,...],beat_positions=[1,2,3,4,1,2,3,4,1,...],downbeats=[0.33,1.94,3.53,...],segments=[Segment(start=0.0,end=0.33,label='start'),Segment(start=0.33,end=13.13,label='intro'),Segment(start=13.13,end=37.53,label='chorus'),Segment(start=37.53,end=51.53,label='verse'),Segment(start=51.53,end=64.34,label='verse'),Segment(start=64.34,end=89.93,label='chorus'),Segment(start=89.93,end=105.93,label='bridge'),Segment(start=105.93,end=134.74,label='chorus'),Segment(start=134.74,end=153.95,label='chorus'),Segment(start=153.95,end=154.67,label='end'),]),Unlike CLI, it does not save the results to disk by default. You can save them as follows:result=allin1.analyze('your_audio_file.wav',out_dir='./struct',)Parameters:paths:Union[PathLike, List[PathLike]]List of paths or a single path to the audio files to be analyzed.out_dir:PathLike(optional)Path to the directory where the analysis results will be saved. By default, the results will not be saved.visualize:Union[bool, PathLike](optional)Whether to visualize the analysis results or not. If a path is provided, the visualizations will be saved in that directory. Default is False. If True, the visualizations will be saved in './viz'.sonify:Union[bool, PathLike](optional)Whether to sonify the analysis results or not. If a path is provided, the sonifications will be saved in that directory. Default is False. If True, the sonifications will be saved in './sonif'.model:str(optional)Name of the pre-trained model to be used for the analysis. Default is 'harmonix-all'. Please refer to the documentation for the available models.device:str(optional)Device to be used for computation. Default is 'cuda' if available, otherwise 'cpu'.include_activations:bool(optional)Whether to include activations in the analysis results or not.include_embeddings:bool(optional)Whether to include embeddings in the analysis results or not.demix_dir:PathLike(optional)Path to the directory where the source-separated audio will be saved. Default is './demix'.spec_dir:PathLike(optional)Path to the directory where the spectrograms will be saved. Default is './spec'.keep_byproducts:bool(optional)Whether to keep the source-separated audio and spectrograms or not. Default is False.multiprocess:bool(optional)Whether to use multiprocessing for extracting spectrograms. Default is True.Returns:Union[AnalysisResult, List[AnalysisResult]]Analysis results for the provided audio files.load_result()Loads the analysis results from the disk.result=allin1.load_result('./struct/24k_Magic.json')visualize()Visualizes the analysis results.fig=allin1.visualize(result)fig.show()Parameters:result:Union[AnalysisResult, List[AnalysisResult]]List of analysis results or a single analysis result to be visualized.out_dir:PathLike(optional)Path to the directory where the visualizations will be saved. By default, the visualizations will not be saved.Returns:Union[Figure, List[Figure]]List of figures or a single figure containing the visualizations.Figureis a class frommatplotlib.pyplot.sonify()Sonifies the analysis results.
It will mix metronome clicks for beats and downbeats, and event sounds for segment boundaries
to the original audio file.y,sr=allin1.sonify(result)# y: sonified audio with shape (channels=2, samples)# sr: sampling rate (=44100)Parameters:result:Union[AnalysisResult, List[AnalysisResult]]List of analysis results or a single analysis result to be sonified.out_dir:PathLike(optional)Path to the directory where the sonifications will be saved. By default, the sonifications will not be saved.Returns:Union[Tuple[NDArray, float], List[Tuple[NDArray, float]]]List of tuples or a single tuple containing the sonified audio and the sampling rate.Visualization & SonificationThis package provides a simple visualization (-vor--visualize) and sonification (-sor--sonify) function for the analysis results.allin1-v-syour_audio_file.wavThe visualizations will be saved in the./vizdirectory by default:./viz
└──your_audio_file.pdfThe sonifications will be saved in the./sonifdirectory by default:./sonif
└──your_audio_file.sonif.wavFor example, a visualization looks like this:You can try it atHugging Face Space.Available ModelsThe models are trained on theHarmonix Setwith 8-fold cross-validation.
For more details, please refer to thepaper.harmonix-all: (Default) An ensemble model averaging the predictions of 8 models trained on each fold.harmonix-foldN: A model trained on fold N (0~7). For example,harmonix-fold0is trained on fold 0.By default, theharmonix-allmodel is used. To use a different model, use the--modeloption:allin1--modelharmonix-fold0your_audio_file.wavSpeedWith an RTX 4090 GPU and Intel i9-10940X CPU (14 cores, 28 threads, 3.30 GHz),
theharmonix-allmodel processed 10 songs (33 minutes) in 73 seconds.Advanced Usage for ResearchThis package provides researchers with advanced options to extractframe-level raw activations and embeddingswithout post-processing. These have a resolution of 100 FPS, equivalent to 0.01 seconds per frame.CLIActivationsThe--activoption also saves frame-level raw activations from sigmoid and softmax:$allin1--activyour_audio_file.wavYou can find the activations in the.npzfile:./struct
└──your_audio_file1.json
└──your_audio_file1.activ.npzTo load the activations in Python:>>>importnumpyasnp>>>activ=np.load('./struct/your_audio_file1.activ.npz')>>>activ.files['beat','downbeat','segment','label']>>>beat_activations=activ['beat']>>>downbeat_activations=activ['downbeat']>>>segment_boundary_activations=activ['segment']>>>segment_label_activations=activ['label']Details of the activations are as follows:beat: Raw activations from thesigmoidlayer forbeat tracking(shape:[time_steps])downbeat: Raw activations from thesigmoidlayer fordownbeat tracking(shape:[time_steps])segment: Raw activations from thesigmoidlayer forsegment boundary detection(shape:[time_steps])label: Raw activations from thesoftmaxlayer forsegment labeling(shape:[label_class=10, time_steps])You can access the label names as follows:>>>allin1.HARMONIX_LABELS['start','end','intro','outro','break','bridge','inst','solo','verse','chorus']EmbeddingsThis package also provides an option to extract raw embeddings from the model.$allin1--embedyour_audio_file.wavYou can find the embeddings in the.npyfile:./struct
└──your_audio_file1.json
└──your_audio_file1.embed.npyTo load the embeddings in Python:>>>importnumpyasnp>>>embed=np.load('your_audio_file1.embed.npy')Each model embeds for every source-separated stem per time step,
resulting in embeddings shaped as[stems=4, time_steps, embedding_size=24]:The number of source-separated stems (the order is bass, drums, other, vocals).The number of time steps (frames). The time step is 0.01 seconds (100 FPS).The embedding size of 24.Using the--embedoption with theharmonix-allensemble model will stack the embeddings,
saving them with the shape[stems=4, time_steps, embedding_size=24, models=8].PythonThe Python APIallin1.analyze()offers the same options as the CLI:>>>allin1.analyze(paths='your_audio_file.wav',include_activations=True,include_embeddings=True,)AnalysisResult(path='/path/to/your_audio_file.wav',bpm=100,beats=[...],downbeats=[...],segments=[...],activations={'beat':array(...),'downbeat':array(...),'segment':array(...),'label':array(...)},embeddings=array(...),)Concerning MP3 FilesDue to variations in decoders, MP3 files can have slight offset differences.
I recommend you to first convert your audio files to WAV format using FFmpeg (as shown below),
and use the WAV files for all your data processing pipelines.ffmpeg-iyour_audio_file.mp3your_audio_file.wavIn this package, audio files are read usingDemucs.
To my understanding, Demucs converts MP3 files to WAV using FFmpeg before reading them.
However, using a different MP3 decoder can yield different offsets.
I've observed variations of about 20~40ms, which is problematic for tasks requiring precise timing like beat tracking,
where the conventional tolerance is just 70ms.
Hence, I advise standardizing inputs to the WAV format for all data processing,
ensuring straightforward decoding.TrainingPlease refer toTRAINING.md.CitationIf you use this package for your research, please cite the following paper:@inproceedings{taejun2023allinone,title={All-In-One Metrical And Functional Structure Analysis With Neighborhood Attentions on Demixed Audio},author={Kim, Taejun and Nam, Juhan},booktitle={IEEE Workshop on Applications of Signal Processing to Audio and Acoustics (WASPAA)},year={2023}}
|
allink-core
|
allink-coreallink-core is a heavily opinionated collection of django apps, django-cms plugins and other utilities. allink-core was implemented to create a standardized ecosystem for django-cms projects developed atallink AG.allink-core is ment to be used with our boilerplate project which is hosted on thedivio cloud. (feel free to send us amessageif you would like to have a look.)
The steps we describe here are mostly closely coupled to our setup and environment. So the described steps might not make sense to you, when you don't know our setup. Also we skip steps which we already included in the boilerplate.Documentationv2.x.xWorking on documentationmake docswill serve you a preview of the local docs on "http://127.0.0.1:8000". More Information onmkdocs.orgormkdocs rtd.Release conventionsMajorv.0.x.x, v.1.x.x and v.2.x.x are not compatible with each other. We never migrated from one to an other and doing so would be a be a lot of manual work, as there have been a lot of database changes. We try to minimize the need for a new major version. The decision if v3.x.x will be compatible with v.2.x.x has yet to be made.MinorWhen you make changes that affect both thebackendand thefrontendthe project dependencies need to be updated at the same time. To quickly see which releases belong together you should make aminorrelease in both repositories.ExampleA new CMS plugin together with styles has been added to the core. Release a newminorversion:[email protected] that only affect a single repo should be tagged with apatchrelease. Usually needed for small adjustments and bugfixes.ExampleA bugfix has been made in allink-core. Release a newpatchversion:allink-core==v2.3.2Workflow when making updates to allink-core repo while working on a project.The idea is that we want to be able to make changes to the allink-core repo with real life data. This can be achieved, when we are able to switch out the installed allink-core form the requirements.in with a local allink-core repo. This way we can also maintain a proper git history.Prepare allink-core repositoryTo work on the allink-core repo you first need to pull theallink-corerepo. The setup expects it to be at "~/projects/allink-core". If it isn't in this location, just create a symlink which points to your allink-core repo.make sure you are up to date with the current version branch e.g "v2.0.x" and you working on your own branch.create a virtualenvvirtualenv envinstall requirementspip install -r requiremnts_dev.txtFor the next steps, we assume you are working on theboilerplate-2.0project, but this should work with every project which follows the same principles and have allink-core installed.Prepare boilerplate-2.0 repositoryTo override the already installed allink-core requirements, we have to mount the local allink-core directory as a volume into the docker container. Add- "~/projects/allink-core/allink_core:/app/allink_core:rw"to the docker-compose.yml file.To work directly on allink-core in the same directory as the boilerplate-project, we create a symlink.ln -s ~/projects/allink-core/allink_core allink_coreMake sure you do not commit these changes, as your teammates probably do not care about having a local allink-core mapped in their project.Make added or updated translations with the following command:./manage.py makemessages --symlinksYou are all set. When you now rundocker-compose upyour application will run with your local allink-core repo. However if you rundocker-compose buildyou will still be installing the allink-core repo from the requirements file.If you need to rundocker-compose buildwith your new branch. Just commit your changes to your feature branch on the allink-core repo and add it to the boilerplate-2.0 requirementsfile with the corresponding commit hash. e.g:https://github.com/allink/allink-core/tarball/ccb67deaed7dbc07bd565c717a21c0a07752bd9dcreate a new release of allink-corecreate a new pull request (make sure you include your changes to CHANGELOG.md)merge back to version branch e.g v2.0.xmake patchormake minordepending on what version you want to create. (this will create a new commit and push the new tags to github) If you need an other version do it withbumpversion.create a new release on PyPi. First usemake release-testto release in the test repository and finally usemake release(make sure you have the correct credentials for allink in your~/.pypircalso fortest-pypi)
|
allink_essentials
|
collection of code fragments
|
all-in-one
|
All In OneAll In Oneis a package that allows the user to do lot of things regarding audio, video, networks, the web, external programs, mail, etc.Installing the packageIf on Windows, go to your CMD or PowerShell. If on Mac or Linux, go to your terminal.Then, just type the following and hit Returnpipinstallall_in_oneAnd you're all set! Just go to your code editor and import the package.Code example on mailing to a friend :# Importing the packageimportall_in_one# The mail contentmessage="""Hey, dude!I am able to send a mail through Python!Your friend,X"""# Defining the Mailer Classmailer=all_in_one.Mail()# Setting the Mail Credentialsmailer.set_mail_creds("[email protected]","foopassword")# Sending the messagemailer.mail_to("mail.server.com",495,"[email protected]","[email protected]",message)Don't worry! More features are going to be added soon!
|
allinoneinstagrambot
|
AllInOneInstagramBotLooking for Instagram automation? I'm proud to present you aAll-in-One Instagram Bot.. This bot will allow you to grow your following and engagement by liking, following, commenting and sending PM automatically with your Android phone/tablet/emulator.No root required.## Cool! What can I do with this bot?
- Works without rooting
- Works with both emulators and physical devices
- Can be used stand-alone (without the use of a computer)
- Includes realistic random human-like delays and actions
- Can watch stories while interacting
- Comment post with emojis and [spintax logic]
- Send PM
- Type like a human (letter by letter by faking using suggestions. For example you won't type `H - e - l - l - o` letter by letter but something like `H - He - Hello`)
- Browse carousels and watch their contents
- Watch videos for a specific amount of time
- Scheduler
- Getting tasty telegram reports
- Supports multiple actions in one session
- Lots of customizable limits to keep your account safe from soft bans
- Available interactions
- interact with a user's followers or following
- interact with a top or recent hashtag's post likers
- interact with a top or recent hashtag post
- interact with a top or recent place's post likers
- interact with a top or recent place post
- interact with user's post likers
- interact with a single blogger
- interact with your feed
- interact with users from a list (*.txt)
- interact with posts from links inside a list (*.txt)
- unfollow any followers
- unfollow any followers, followed by bot
- unfollow any followers, followed by bot, who don't follow you back
- unfollow from a list (*.txt)
- scrape mode for collecting usernames instead of interacting with them (you will find more information about that in the doc)Lots of available filters to customize who you interact withyou can blacklist people to avoid interacting with themyou can whitelist people to not remove them when you unfollow peoplebiography main characters and languageprofile name main charactersprivate / public / business / non business accountnumber of posts / followers / following
... and more!
|
allinpay
|
通联支付python工具
|
allinpractice
|
No description available on PyPI.
|
allinsso
|
No description available on PyPI.
|
allintrophy
|
No description available on PyPI.
|
allinusersettings
|
No description available on PyPI.
|
allinux
|
Linux command collections
|
allison
|
AllisonAllison: is a library of Artificial IntelligenceAbout AllisonThis project implements the main machine learning and deep learning architectures in Python,
using libraries such as Numpy, Scipy and Matplotlib for the visualizations.
its objective is to show how machine learning works
inside and not be a black box for many people.RequirementsNumpyMatplotlibScipyPandasInstallclone the repositorygit clone https://github.com/Mitchell-Mirano/Allison.gitinstall a virtual environmentpython -m virtualenv envinstall the requirementspip install -r requirements.txtNow you can use AllisonExamples in Allisonfor examples review examples directory
|
alliteration
|
alliterationversion number: 0.0.1
author: Pragy AgarwalOverviewAI to boost your alliteration skills!Installation / UsageTo install use pip:$ pip install alliterationOr clone the repo:$ git clone https://github.com/AgarwalPragy/alliteration.git
$ python setup.py installContributingTBDExampleTBD
|
allitnil
|
No description available on PyPI.
|
allium
|
alliumCompute oscillations of radially symmetric things
|
allium-hash
|
No description available on PyPI.
|
alljson
|
Make any type JSON-serializable.A Python module which makesjson.dumpswork with several builtin
and stdlib types. A hook for registering any custom type is also
provided.InstallingSimply installalljsonwith pip or add it to your project dependencies:pip install alljsonSupported typesAfter installing, the following types are JSON-serializable:generatorssetandfrozensetdictitem/key/value iterators and viewsdatetime.dateanddatetime.datetime(as strings in ISO format)uuid.UUIDdecimal.Decimal(serialized as string in order to preserve precision)reversedresultsIn addition to these, the following Python 3 types are supported:map,filter,rangeiteratorsenum.Enumpathlib.Pathtypes.MappingProxyTypeclasses implementingSequenceandMappingabc interfacesRegistering custom typesIn order to register a new type, usealljson.register_encoder(type, encoder_function).encoder_functionshould take object of given
type as the only parameter and return a simple JSON-serializable
Python value (such asdictorstr).For example:import arrow
import alljson
alljson.register_encoder(arrow.Arrow, arrow.Arrow.isoformat)Acknowledgementspth trick was stolen from delightfulfuture-fstringsproject
|
allkernAna
|
Suavizado con kernel gaussianoEsta libreria realiza una gráfica del suavizado de una función cuando se grafican los datos del número de casos cada dÃa durante la pandemia del Covid-19.
|
all-label-converter
|
Label ConverterHello everyone, I'm trying to develop a solution to the problem I've had before while working on Computer vision with this repo.To train different models, there must be different types of labeling, for example coco, voc etc.Added labelling types.COCOPascal VOCCreate MLYOLO DarknetTensorflow Object Detection CSVTensorflow TFRecordInstallationUse the package managerpipto install foobar.pipinstallall_label_converterUsageimportall_label_convertercommon_objects=all_label_converter.import_dataset('{files_path}','{type_dataset_ex_coco}')all_label_converter.export_dataset(common_objects,"{target_dataset}","{target_file_path}")And you can see dataset translated according to your request.LicenseMIT
|
allmaker
|
No description available on PyPI.
|
allmath
|
No description available on PyPI.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.