package
stringlengths 1
122
| pacakge-description
stringlengths 0
1.3M
|
---|---|
alexfitter
|
No description available on PyPI.
|
alexflipnote.py
|
AlexFlipnote.pyAn easy-to-use Python Wrapper for the AlexFlipnote APIRequirementsPython 3.8 or aboveaiohttp (python -m pip install -U aiohttp)InstallationInstall the package by doing one of the following commands:Using pip (recommended):pip install alexflipnote.py -Upython -m pip install alexflipnote.py -UDocumentationSee the full and detaileddocs hereLinksAPI|Changelogs|Examples|Github|PyPiMade byThis wrapper is made bySoheab_#6240(150665783268212746), DM me on Discord or join my serverherefor anything related to this wrapper.Join AlexFlipnote's serverhereto suggest or report anything on the API.
|
alexflow
|
alexflowALEXFlow is a python workflow library built for reproducible complex workflow, mainly for machine learning training.Get StartedFor the installation from pypi, simply install via pip.pip install alexflowRemarksSupport of type hints withdataclassesluigi does not work well with type hints, which makes it difficult to build workflow when it is complex. With use of dataclasses, we'd like to gain benefit of type hints.Build workflow by composition, rather than parameter bucket relies.Parameter bucket rely finally build a huge global state at the entrypoint of workflow, which is pretty difficult to maintain in general as it is works similarly with global variables... Instead, we've decided to compose workflow with compositions. With this architecture we can gain the benefit of divide and conquer strategy.Focus of reproducibility with immutability tasksTask class is designed to be a immutable dataclass object, for distributed execution, strong consistency, and reproducibility. And also thoseTaskobjects can be serialized as json object, and you can easily trace the exact parameters used to generate theOutput.Dependency via Outputs, rather than TasksDescription of workflow dependency byOutputmakes it easy to run partially graph.A exmaple of Task constructionAlso you can see the example workflow atexamples/workflow.py.fromtypingimportTuplefromsklearnimportlinear_modelfromdataclassesimportdataclass,fieldfromalexflowimportTask,no_default,NoDefaultVar,Output,BinaryOutput@dataclass(frozen=True)classTrain(Task):# Here you can write parameter of task as dataclass fields. Task's unique id will be# generated from given parameters' and each task is executed at once while the entire# graph computation.X:NoDefaultVar[Output]=no_defaulty:NoDefaultVar[Output]=no_defaultmodel_type:NoDefaultVar[str]=no_default# Here you can describe in-significant parameter with compare=False, with following# dataclass' object equality. Even you changed those variables, Task's unique id is# consistent.verbose:bool=field(default=True,compare=False)definput(self):"""Here describes the dependent output of your task"""returnself.X,self.ydefoutput(self):"""Here describes the dependent output of your task"""returnself.build_output(BinaryOutput,key="model.pkl")defrun(self,input:Tuple[BinaryOutput,BinaryOutput],output:BinaryOutput):# Dependent output you defined in `input()` method is available as input variable.X=input[0].load()y=input[1].load()model_class=getattr(linear_model,self.model_type)cls=model_class().fit(X,y)# And you can store what you want to output in following manner.output.store(cls)
|
alexis
|
No description available on PyPI.
|
alexislib
|
Mi primera libreria
|
alexisomggeneratelatextable
|
No description available on PyPI.
|
alexisomghw2
|
No description available on PyPI.
|
alexisomgmhshwgeneratelatex
|
No description available on PyPI.
|
alex-junior
|
Just for fun
|
alexkar7_py_helloworld
|
No description available on PyPI.
|
alexlib
|
Welcome to alexlibFill your life with one-liners, take your code to artistic level of brevity and readability while simultaneously being more productive by typing less boilerplate lines of code that are needless to say.This package extends many native Python classes to equip you with an uneasy-to-tame power. The major classes extended are:listis extended toListForget thatforloops exist, because with this class,forloops are implicitly used to apply a function to all items.
Inevitably while programming, one will encounter objects of the same type and you will be struggling to get a tough grab on them.Listis a powerful structure that put at your disposal a grip, so tough, that the objects you have at hand start behaving like one object. Behaviour is ala-JavaScript implementation offorEachmethod of Arrays.dictis extended toStruct.Combines the power of dot notation like classes and key access like dictionaries.pathlib.Pathis extended toPPobjects are incredibly powerful for parsing paths,nomore than one line of code is required to doanyoperation. Take a shufti at this:path = tb.P("dataset/type1/meta/images/file3.ext")
>> path[0] # allows indexing!
P("dataset")
>> path[-1] # nifty!
P("file3.ext")
>> path[2:-1] # even slicing!
P("meta/images/file3.ext")This and much more, is only on top of the indespensiblepathlib.Pathfunctionalities.Additionally, the package provides many other new classes, e.g.ReadandSave. Together withP, they provide comprehensible support for file management. Life cannot get easier with those. Every class inherits attributes that allow saving and loading in one line.Furthermore, those classes are inextricably connected. For example, globbing a pathPobject returns aListobject. You can move back and forth betweenListandStructandDataFramewith one method, and so on.InstallIn the commandline:pip install alexlib.Being a thin extension on top of almost pure Python, you need to worrynotabout your venv, the package is not aggressive in requirements, it installs itself peacefully, never interfere with your other packages. If you do not havenumpy,matplotlibandpandas, it simply throwsImportErrorat runtime, that's it.Getting StartedThat's as easy as taking candy from a baby; whenever you start a Python file, preface it with following in order to unleash the library:import alexlib.toolbox as tbA Taste of PowerSuppose you want to know how many lines of code in your repository. The procedure is to glob all.pyfiles recursively, read string code, split each one of them by lines, count the lines, add up everything from all strings of code.To achieve this, all you need is an eminently readable one-liner.tb.P.cwd().search("*.py", r=True).read_text().split('\n').apply(len).to_numpy().sum()How does this make perfect sense?searchreturnsListofPpath objectsread_textis aPmethod, but it is being run againstListobject. Behind the scenes,responsible black magicfails to find such a method inListand realizes it is a method of items inside the list, so it runs it against them and thus read all files and containerize them in anotherListobject and returns it.A similar story applies tosplitwhich is a method of strings in Python.Next,applyis a method ofList. Sure enough, it lives up to its apt name and applies the passed functionlento all items in the list and returns anotherListobject that contains the results..to_numpy()convertsListtonumpyarray, then.sumis a method ofnumpy, which gives the final result.Methods naming convention likeapplyandto_numpyare inspired from the popularpandaslibrary, resulting in almost non-existing learning curve.Friendly interactive tutorial.Please refer toHereon the main git repo.Full docs:ClickHereAuthorAlex Al-Saffar.email
|
alexlopespereira
|
Failed to fetch description. HTTP Status Code: 404
|
alexlukash-django-shopping-cart
|
No description available on PyPI.
|
alex_message_client
|
No description available on PyPI.
|
alex_message_server
|
No description available on PyPI.
|
alex_mess_client
|
No description available on PyPI.
|
alex_mess_server
|
No description available on PyPI.
|
alex-moldovan-first-package
|
No description available on PyPI.
|
alex-music
|
AlexAlex is a cli youtube music playerHow to installHave pip installedRequirements: mpv, yt-dlpInstall Alex:pip install alex-musicUsageLaunching:python -m alex_musicAlso,
You can add an alias for alex_music in your .bashrc fileecho "alias alex='python -m alex_music'" >> ~/.bashrcThen, alex_music can be launched by:alexPlay some musicplay despacitoAdd to playlistadd baby shark tu tu ruandplayFor more commandshelp
|
alex_nester
|
UNKNOWN
|
alexnet-pytorch
|
AlexNet-PyTorchUpdate (Feb 16, 2020)Now you can install this library directly using pip!pip3 install --upgrade alexnet_pytorchUpdate (Feb 13, 2020)The update is for ease of use and deployment.Example: Export to ONNXExample: Extract featuresExample: VisualIt is also now incredibly simple to load a pretrained model with a new number of classes for transfer learning:fromalexnet_pytorchimportAlexNetmodel=AlexNet.from_pretrained('alexnet',num_classes=10)Update (January 15, 2020)This update allows you to use NVIDIA's Apex tool for accelerated training. By default choicehybrid training precision+dynamic loss amplifiedversion, if you need to learn more and details aboutapextools, please visithttps://github.com/NVIDIA/apex.OverviewThis repository contains an op-for-op PyTorch reimplementation ofAlexNet.The goal of this implementation is to be simple, highly extensible, and easy to integrate into your own projects. This implementation is a work in progress -- new features are currently being implemented.At the moment, you can easily:Load pretrained AlexNet modelsUse AlexNet models for classification or feature extractionUpcoming features: In the next few days, you will be able to:Quickly finetune an AlexNet on your own datasetExport AlexNet models for productionTable of contentsAbout AlexNetModel DescriptionInstallationUsageLoad pretrained modelsExample: ClassifyExample: Extract featuresExample: Export to ONNXExample: VisualContributingAbout AlexNetIf you're new to AlexNets, here is an explanation straight from the official PyTorch implementation:Current approaches to object recognition make essential use of machine learning methods. To improve their performance, we can collect larger datasets, learn more powerful models, and use better techniques for preventing overfitting. Until recently, datasets of labeled images were relatively
small — on the order of tens of thousands of images (e.g., NORB [16], Caltech-101/256 [8, 9], and
CIFAR-10/100 [12]). Simple recognition tasks can be solved quite well with datasets of this size,
especially if they are augmented with label-preserving transformations. For example, the currentbest error rate on the MNIST digit-recognition task (<0.3%) approaches human performance [4].
But objects in realistic settings exhibit considerable variability, so to learn to recognize them it is
necessary to use much larger training sets. And indeed, the shortcomings of small image datasets
have been widely recognized (e.g., Pinto et al. [21]), but it has only recently become possible to collect labeled datasets with millions of images. The new larger datasets include LabelMe [23], which
consists of hundreds of thousands of fully-segmented images, and ImageNet [6], which consists of
over 15 million labeled high-resolution images in over 22,000 categories.Model DescriptionAlexNet competed in the ImageNet Large Scale Visual Recognition Challenge on September 30, 2012. The network achieved a top-5 error of 15.3%, more than 10.8 percentage points lower than that of the runner up. The original paper's primary result was that the depth of the model was essential for its high performance, which was computationally expensive, but made feasible due to the utilization of graphics processing units (GPUs) during training.The 1-crop error rates on the imagenet dataset with the pretrained model are listed below.Model structureTop-1 errorTop-5 erroralexnet43.4820.93InstallationInstall from pypi:pipinstallalexnet_pytorchInstall from source:gitclonehttps://github.com/lornatang/AlexNet-PyTorch.gitcdAlexNet-PyTorch
pipinstall-e.UsageLoading pretrained modelsLoad an AlexNet:fromalexnet_pytorchimportAlexNetmodel=AlexNet.from_name('alexnet')Load a pretrained AlexNet:fromalexnet_pytorchimportAlexNetmodel=AlexNet.from_pretrained('alexnet')Example: ClassificationWe assume that in your current directory, there is aimg.jpgfile and alabels_map.txtfile (ImageNet class names). These are both included inexamples/simple.All pre-trained models expect input images normalized in the same way,
i.e. mini-batches of 3-channel RGB images of shape(3 x H x W), whereHandWare expected to be at least224.
The images have to be loaded in to a range of[0, 1]and then normalized usingmean = [0.485, 0.456, 0.406]andstd = [0.229, 0.224, 0.225].Here's a sample execution.importjsonimporttorchimporttorchvision.transformsastransformsfromPILimportImagefromalexnet_pytorchimportAlexNet# Open imageinput_image=Image.open("img.jpg")# Preprocess imagepreprocess=transforms.Compose([transforms.Resize(256),transforms.CenterCrop(224),transforms.ToTensor(),transforms.Normalize(mean=[0.485,0.456,0.406],std=[0.229,0.224,0.225]),])input_tensor=preprocess(input_image)input_batch=input_tensor.unsqueeze(0)# create a mini-batch as expected by the model# Load class nameslabels_map=json.load(open("labels_map.txt"))labels_map=[labels_map[str(i)]foriinrange(1000)]# Classify with AlexNetmodel=AlexNet.from_pretrained("alexnet")model.eval()# move the input and model to GPU for speed if availableiftorch.cuda.is_available():input_batch=input_batch.to("cuda")model.to("cuda")withtorch.no_grad():logits=model(input_batch)preds=torch.topk(logits,k=5).indices.squeeze(0).tolist()print("-----")foridxinpreds:label=labels_map[idx]prob=torch.softmax(logits,dim=1)[0,idx].item()print(f"{label:<75}({prob*100:.2f}%)")Example: Feature ExtractionYou can easily extract features withmodel.extract_features:importtorchfromalexnet_pytorchimportAlexNetmodel=AlexNet.from_pretrained('alexnet')# ... image preprocessing as in the classification example ...inputs=torch.randn(1,3,224,224)print(inputs.shape)# torch.Size([1, 3, 224, 224])features=model.extract_features(inputs)print(features.shape)# torch.Size([1, 256, 6, 6])Example: Export to ONNXExporting to ONNX for deploying to production is now simple:importtorchfromalexnet_pytorchimportAlexNetmodel=AlexNet.from_pretrained('alexnet')dummy_input=torch.randn(16,3,224,224)torch.onnx.export(model,dummy_input,"demo.onnx",verbose=True)Example: Visualcd $REPO$/framework
sh start.shThen open the browser and type in the browser addresshttp://127.0.0.1:20000/.Enjoy it.ImageNetSeeexamples/imagenetfor details about evaluating on ImageNet.For more datasets result. Please seeresearch/README.md.ContributingIf you find a bug, create a GitHub issue, or even better, submit a pull request. Similarly, if you have questions, simply post them as GitHub issues.I look forward to seeing what the community does with these models!CreditImageNet Classification with Deep Convolutional Neural NetworksAlex Krizhevsky,Ilya Sutskever,Geoffrey E. HintonAbstractWe trained a large, deep convolutional neural network to classify the 1.2 million
high-resolution images in the ImageNet LSVRC-2010 contest into the 1000 different classes. On the test data, we achieved top-1 and top-5 error rates of 37.5%
and 17.0% which is considerably better than the previous state-of-the-art. The
neural network, which has 60 million parameters and 650,000 neurons, consists
of five convolutional layers, some of which are followed by max-pooling layers,
and three fully-connected layers with a final 1000-way softmax. To make training faster, we used non-saturating neurons and a very efficient GPU implementation of the convolution operation. To reduce overfitting in the fully-connected
layers we employed a recently-developed regularization method called “dropout”
that proved to be very effective. We also entered a variant of this model in the
ILSVRC-2012 competition and achieved a winning top-5 test error rate of 15.3%,
compared to 26.2% achieved by the second-best entry.paper@article{AlexNet,
title:{ImageNet Classification with Deep Convolutional Neural Networks},
author:{Alex Krizhevsky,Ilya Sutskever,Geoffrey E. Hinton},
journal={nips},
year={2012}
}
|
alex-nn
|
Stay tuned!More examples and documentation to comeAlex - a neural network analyzerAlex is a Domain Specific Language (DSL) for declaring, representing, analyzing and generating neural networks.
This DSL can be considered as a configuration file to define a neural network.How to install:pip install alex-nnHow to runCommand Line Interfacealex-nnPythonMotivationAlex the little chefDeep learning is like cooking. You have a bunch of ingredients and you put them in a pot. You have some intuitions and somewhat limited theoretical understanding of why this soup tastes better than that one, but you don't really know what's going on. Alex is a little chef that helps you distill and refine your networks. Alex is committed to helping you find better recipes for your use case.What does Alex do?
|
alexpackagetest
|
AboutDescriptionThis is a test package built by Alex. It has a couple of functions.LicenseMITInstallationpoetry add alexpackagetestGitHub Repositoryhttps://github.com/Alex-Angelico/alextestpackage
|
alexpdf
|
This is the hompage of our project
|
alexpdfmoshycode
|
This is the homepage of our project.
|
alexPlot
|
alexPlotA simple plotting library for plottingzfitPDFs and datasets, this package contains functions useful for plotting in 1D. These plotting functions are built with matplotlib functions and make use of zfit.Space and zfit.pdf.SumPDF objects. By default asymmetric errors are applied and pulls are computed with PDF integrals. The libarary can be used with theonly_canvasoption to act like another normal matplotlib plotting function.,ggggggggggg,
,dPYb, dP"""88""""""Y8,,dPYb, I8
IP'`Yb Yb, 88 `8bIP'`Yb I8
I8 8I `" 88 ,8PI8 8I 88888888
I8 8' 88aaaad8P" I8 8' I8
,gggg,gg I8 dP ,ggg, ,gg, ,gg88""""" I8 dP ,ggggg, I8
dP" "Y8I I8dP i8" "8i d8""8b,dP" 88 I8dP dP" "Y8gggI8
i8' ,8I I8P I8, ,8I dP ,88" 88 I8P i8' ,8I ,I8,
,d8, ,d8b,,d8b,_ `YbadP' ,dP ,dP"Y8, 88 ,d8b,_ ,d8, ,d8',d88b,
P"Y8888P"`Y88P'"Y88888P"Y8888" dP" "Y8 88 8P'"Y88P"Y8888P" 8P""Y8Setting upTo installpip install alexPlotorgit clone ssh://[email protected]:7999/amarshal/alexPlot.git
pip install --no-dependencies -e .
python -c 'import alexPlot'Thenimport alexPlot
# to ask for help
alexPlot.help()
# to ask for examples
alexPlot.examples()
# to overwrite default options
alexPlot.options.estimate_pulls = FalsePlotting dataimport zfit
import numpy as np
import alexPlot
# plot using numpy array
data = np.random.normal(0,1,1000)
alexPlot.plot_data(data, figure_title='Numpy example')
# plot using a zfit dataset
obs = zfit.Space("x", limits=(-5, 5))
data = zfit.Data.from_numpy(obs=obs, array=data)
alexPlot.plot_data(data, also_plot_hist=True, color='tab:blue', figure_title='zfit example')Plotting pdf# Example with KDE
obs = zfit.Space("x", limits=(-5, 5))
data = np.random.normal(0,1,1000)
data = zfit.Data.from_numpy(obs=obs, array=data)
model_KDE = zfit.pdf.GaussianKDE1DimV1(obs=obs, data=data, bandwidth='silverman')
alexPlot.plot_pdf(model_KDE)
# Example with an exponential plus a Gaussian
obs = zfit.Space("x", limits=(0, 30))
mean = zfit.Parameter("mean", 17,)
sigma = zfit.Parameter("sigma", 2,)
model_Gauss = zfit.pdf.Gauss(mean, sigma, obs)
lam = zfit.Parameter("lam", -0.1)
model_Exp = zfit.pdf.Exponential(lam, obs)
frac = zfit.Parameter("frac", 0.2,)
total_model = zfit.pdf.SumPDF([model_Gauss,model_Exp], obs=obs, fracs=[frac])
alexPlot.plot_pdf(total_model)Plotting data and pdf# Example with KDE
alexPlot.plot_pdf_data(model_KDE, data, filename='examples/example_KDE_data.png', figure_title='KDE')
# Example with an exponential plus a Gaussian
alexPlot.plot_pdf_data(total_model, data)Extra functionality# Add weights
alexPlot.plot_pdf_data(total_model, data_np,
weights=np.abs(np.random.normal(0,1,np.shape(data_np))), stack=True)
# Highlight a signal peak and zoom in
alexPlot.plot_pdf_data(total_model, data_np, dash_signal=True, ymax=50)# Add lables
alexPlot.plot_pdf_data(total_model, data,
dash_signal=True, label='Total PDF',
component_labels=['Signal', 'Background'],
xlabel=r'Some dimension (MeV/$c^2$)', units=r'MeV/$c^2$')
# Plot a log yscale
alexPlot.plot_pdf_data(total_model, data, log=True)# Plot multiple datasets
data_A = np.random.normal(-1,1,1000)
data_B = np.random.normal(2,1,10000)
alexPlot.plot_data([data_A, data_B], color=['tab:blue','tab:red'], also_plot_hist=True, bins=35)
# Plot multiple datasets normalised
alexPlot.plot_data([data_A, data_B], label=['Dataset A', 'Dataset B'],
density=True, also_plot_hist=True, bins=35)# Use custom pyplot commands
alexPlot.plot_pdf_data(total_model, data, log=True,
extra_pyplot_commands=["plt.axvline(x=15,c='k')"])
# Overlay custom pyplot objects
plt.figure(figsize=(13,10))
alexPlot.plot_pdf_data(total_model, data, only_canvas=True, stack=True,
component_colors=['tab:cyan','tab:grey'], color='r', pulls=False)
plt.axhline(y=10,c='r')
plt.savefig("examples/only_canvas.png")
plt.close("all")# Use xlims
alexPlot.plot_pdf_data(total_model, data, stack=True, xmin=10, xmax=22,
component_colors=['tab:cyan','tab:grey'], color='r')
# Plot multiple PDFs at once (note stack only stacks PDFs within same SumPDF)
obs = zfit.Space("x", limits=(-5, 5))
data_np = np.random.normal(0,1,2500)
data = zfit.Data.from_numpy(obs=obs, array=data_np)
model_KDE_A = zfit.pdf.GaussianKDE1DimV1(obs=obs, data=data, bandwidth='silverman')
data = zfit.Data.from_numpy(obs=obs, array=data_np[:1250])
model_KDE_B = zfit.pdf.GaussianKDE1DimV1(obs=obs, data=data, bandwidth='silverman')
yield_A = zfit.Parameter("yield_A", 2500)
model_KDE_A.set_yield(yield_A)
yield_B = zfit.Parameter("yield_B", 1250)
model_KDE_B.set_yield(yield_B)
alexPlot.plot_pdf_data([model_KDE_A, model_KDE_B], data_np, color=["#ffb366",'b'], component_colors=[["#ffb366"],['b']], alpha=[1.,0.25], label=['plot_A', 'plot_B'], stack=True),ggggggggggg,
,dPYb, dP"""88""""""Y8,,dPYb, I8
IP'`Yb Yb, 88 `8bIP'`Yb I8
I8 8I `" 88 ,8PI8 8I 88888888
I8 8' 88aaaad8P" I8 8' I8
,gggg,gg I8 dP ,ggg, ,gg, ,gg88""""" I8 dP ,ggggg, I8
dP" "Y8I I8dP i8" "8i d8""8b,dP" 88 I8dP dP" "Y8gggI8
i8' ,8I I8P I8, ,8I dP ,88" 88 I8P i8' ,8I ,I8,
,d8, ,d8b,,d8b,_ `YbadP' ,dP ,dP"Y8, 88 ,d8b,_ ,d8, ,d8',d88b,
P"Y8888P"`Y88P'"Y88888P"Y8888" dP" "Y8 88 8P'"Y88P"Y8888P" 8P""Y8test
|
alex-practing-pdf
|
This is the homepage of our project.
|
alex-proiect-hello
|
No description available on PyPI.
|
alex-py
|
UNKNOWN
|
alexrasero-sales
|
No description available on PyPI.
|
alex-sales
|
sales_ibd_ORM
|
alex_sayhi
|
UNKNOWN
|
alex-solver
|
No description available on PyPI.
|
alextbremmidterm
|
alextbremmidtermAlex Bremner midterm exampleFree software: MIT licenseDocumentation:https://AlexTBrem.github.io/alextbremmidtermFeaturesTODOCreditsThis package was created withCookiecutterand thegiswqs/pypackageproject template.
|
alex_test
|
This is really just a demo package.
|
alextoolkit
|
DescriptionChange Log0.0.1 (01/05/2023)-First Release
|
alex-tools
|
No description available on PyPI.
|
aleyna-sutbas-cs453-hw1
|
No description available on PyPI.
|
aleyna-sutbas-dictionary
|
Failed to fetch description. HTTP Status Code: 404
|
alf
|
Python OAuth 2 Clientalfis an OAuth 2 Client based onrequests.Sessionwith seamless support for theClient Credentials Flow.FeaturesAutomatic token retrieving and renewingToken expiration controlAutomatic token storageAutomatic retry on status 401 (UNAUTHORIZED)UsageInitialize the client and use it as arequests.Sessionobject.fromalf.clientimportClientalf=Client(token_endpoint='http://example.com/token',client_id='client-id',client_secret='secret')resource_uri='http://example.com/resource'alf.put(resource_uri,data='{"name": "alf"}',headers={'Content-Type':'application/json'})alf.get(resource_uri)alf.delete(resource_uri)Using your custom token storageNow passing an object with get and set attributes you can store or retrieve a token.This object can be a Redis, Memcache or your custom object.fromalf.clientimportClientfromredisimportStrictRedisredis=StrictRedis(host='localhost',port=6379,db=0)alf=Client(token_endpoint='http://example.com/token',client_id='client-id',client_secret='secret',token_storage=redis)resource_uri='http://example.com/resource'alf.put(resource_uri,data='{"name": "alf"}',headers={'Content-Type':'application/json'})alf.get(resource_uri)alf.delete(resource_uri)How does it work?Before the request, a token will be requested on the authentication endpoint
and a JSON response with theaccess_tokenandexpires_inkeys will be
expected.Multiple attempts will be issued after an error response from the endpoint if
thetoken_retriesargument is used. Checktoken-retryingfor more info.alfkeeps the token until it is expired according to theexpires_invalue.The token will be used on aBearer authorization
headerfor
the original request.GET /resource/1 HTTP/1.1
Host: example.com
Authorization: Bearer token-12312If the request fails with a 401 (UNAUTHORIZED) status, a new token is retrieved
from the endpoint and the request is retried. This happens only once, if it
fails again the error response is returned.The token will be reused for every following request until it is expired.Token RetryingThe client supports theretry interface from urllib3to repeat attempts to
retrieve the token from the endpoint.The following code will retry the token request 5 times when the response status
is 500 and it will wait 0.3 seconds longer after each error (known asbackoff).fromrequests.packages.urllib3.utilimportRetryfromalf.clientimportClientalf=Client(token_endpoint='http://example.com/token',client_id='client-id',client_secret='secret',token_retry=Retry(total=5,status_forcelist=[500],backoff_factor=0.3))WorkflowTroubleshootingIn case of an error retrieving a token, the error response will be returned,
the real request won’t happen.Related projectsdjalfAn extended client that uses Django’s cache backend to share tokens between
server instances.tornado-alfA port of thealfclient using tornado’sAsyncHTTPClient.
|
alfa
|
ALFA provides a global overview of features distribution composing NGS dataset(s). Given a set of aligned reads (BAM files) and an annotation file (GTF format), the tool produces plots of the raw and normalized distributions of those reads among genomic categories (stop codon, 5’-UTR, CDS, intergenic, etc.) and biotypes (protein coding genes, miRNA, tRNA, etc.). Whatever the sequencing technique, whatever the organism.See all information onalfa GitHub project page.ContributorsMathieu Bahin, Benoit Noel, Auguste Genovesio (Biocomp team, IBENS, Paris, France)Charles Bernard, Leila Bastianelli and Valentine Murigneux
|
alfabet
|
A machine-Learning derived, Fast, Accurate Bond dissociation Enthalpy Tool (ALFABET)This library contains the trained graph neural network model for the prediction of homolytic bond dissociation energies (BDEs) of organic molecules with C, H, N, and O atoms. This package offers a command-line interface to the web-based model predictions atbde.ml.nrel.gov.The basic interface works as follows, wherepredictexpects a list of SMILES strings of the target molecules>>>fromalfabetimportmodel>>>model.predict(['CC','NCCO'])molecule bond_index bond_type fragment1 fragment2 ... bde_pred is_valid
0 CC 0 C-C [CH3] [CH3] ... 90.278282 True
1 CC 1 C-H [H] [CH2]C ... 99.346184 True
2 NCCO 0 C-N [CH2]CO [NH2] ... 89.988495 True
3 NCCO 1 C-C [CH2]O [CH2]N ... 82.122429 True
4 NCCO 2 C-O [CH2]CN [OH] ... 98.250961 True
5 NCCO 3 H-N [H] [NH]CCO ... 99.134750 True
6 NCCO 5 C-H [H] N[CH]CO ... 92.216087 True
7 NCCO 7 C-H [H] NC[CH]O ... 92.562988 True
8 NCCO 9 H-O [H] NCC[O] ... 105.120598 TrueThe model breaks all single, non-cyclic bonds in the input molecules and calculates their bond dissociation energies. Typical prediction errors are less than 1 kcal/mol.
The model is based on Tensorflow (2.x), and makes heavy use of theneural fingerprintlibrary (0.1.x).For additional details, see the publication:
St. John, P. C., Guan, Y., Kim, Y., Kim, S., & Paton, R. S. (2020). Prediction of organic homolytic bond dissociation enthalpies at near chemical accuracy with sub-second computational cost. Nature Communications, 11(1). doi:10.1038/s41467-020-16201-zNote:For the exact model described in the text, installalfabetversion 0.0.x. Versions >0.1 have been updated for tensorflow 2.InstallationInstallation withcondais recommended, asrdkitcan otherwise be difficult to install$condacreate-nalfabet-cconda-forgepython=3.7rdkit
$sourceactivatealfabet
$pipinstallalfabet``
|
alfa-cli
|
alfa-cliThis package provides a command line tool forALFA.InstallationYou can directly install alfa-cli usingpip. This will install the alfa-cli package as well as all dependencies.$pipinstall-Ualfa-cliIf you already have alfa-cli installed and want to upgrade to the latest version, you can run:$pipinstall--upgradealfa-cliUsageOnce alfa-cli is installed, you can run it with the following template.$alfa[options]<command><subcommand>[parameters]For more information regarding the usage, you can refer to the provided help information.$alfa--help
$alfa<command>--help
$alfa<command><subcommand>--helpCommand CompletionThe alfa-cli package includes a command completion feature, but is not automatically installed.
To enable tab completion you can follow the instructions below:Forbash, run the following command, or append it to~/.bashrc$.alfa-complete.shForzsh, run the following command, or append it to~/.zshrc$.alfa-complete.zshDevelopmentTo install requirements locally:1.Activate local venv$virtualenvvenv
$sourcevenv/bin/activate2.Install requirements from setup.py$pipinstall-e".[dev]"To develop alfa-cli alongside alfa-sdk, you can opt to install a local copy of the alfa-sdk instead.$pipinstall-e/path/to/alfa-sdk-pyRunning it locallyYou can run the cli directly as a python module.$pythonalfa_cli[options]<command><subcommand>[parameters]Alternatively, you can install your local copy of alfa-cli in develop mode, and use it normally.$pythonsetup.pydevelop
$alfa[options]<command><subcommand>[parameters]Changelog0.1.48 (2021-01-11)Adjust --spec option to not mutate source spec file0.1.47 (2022-01-03)Update descriptions integration commandsDefine integration id in specification file when initialising a new integration0.1.46 (2021-10-15)Read team-id from alfa.yml when deploying an integration0.1.45 (2021-09-28)Fix name of the platformRegion key, that Local Runner uses accessing the context0.1.44 (2021-09-20)Enable deployment of a release into any allowed team0.1.43 (2021-08-13)Include alfaID and platformRegion in context when invoking an algorithm or integration locally0.1.42 (2021-07-19)Fix for local invocation on a windows device0.1.41 (2021-07-01)Fix for excluding files and folders when deploying an integration0.1.40 (2021-06-04)Fix issue with using tempfile in Windows0.1.39 (2021-05-05)Handling of large payloads when invoking node algorithms locally0.1.37 (2021-04-15)Append context inside problem body when running invoke-local0.1.36 (2021-04-07)Call algorithm pre & post processing functions when running invoke-local
|
alfacoins
|
Python ALFACoinsA Python3.6 wapper aournd theALFACoinsAPIs.byCarrene.Descriptionalfacoinsis a Python3.6 Library for interacting withALFAcoins API.alfacoinsprovides cryptocurrency payment integration on your website viaALFAcoins.alfacoinsallows you to integrate payments with the following cryptocurrencies:Bitcoin (BTC)Ethereum (ETH)XRP (XRP)Bitcoin Cash (BCH)Litecoin (LTC)Dash (DASH)APIsget_feesget_rateget_ratescreate_order*order_status*bitsend*bitsend_status*refund*statistics**: Private APIInstallationpip3.6installalfacoinsGetting StartedGatewayYou can get an instance ofALFACoinsclass like this:For public APIsfromalfacoinsimportALFACoinsalfacoins=ALFACoins()For private APIsfromalfacoinsimportALFACoinsalfacoins=ALFACoins(name='shop-name',password='password',secret_key='07fc884cf02af307400a9df4f2d15490')Create orderresult=alfacoins.create_order(type='litecointestnet',amount=1.2345,currency='USD',order_id=1,options={'notificationURL':'https://example.io/notify','redirectURL':'https://example.io/redirect','payerName':'Bob','payerEmail':'[email protected]',},description='This is for test!',)Additional information and API documentation is here:ALFAcoins API Reference.
|
alfacoins-api-python
|
ALFAcoins API Python implementation.A Python3.6 wrapper around theALFACoinsAPIs.byArash Fatahzade.Descriptionalfacoins_api_pythonis a Python3.6 Library for interacting withALFAcoins API.alfacoins_api_pythonprovides cryptocurrency payment integration on your website viaALFAcoins.alfacoins_api_pythonallows you to integrate payments with the following cryptocurrencies:Bitcoin (BTC)Ethereum (ETH)XRP (XRP)Bitcoin Cash (BCH)Litecoin (LTC)Dash (DASH)APIsget_feesget_rateget_ratescreate_order*order_status*bitsend*bitsend_status*refund*statistics**: Private APIBuildingYou need to have Python 3.6+ in order to use this package.
Consider usingpyenvfor virtual Python 3.6 environment.pip3.6install-rrequirements_dev.txt
python3.6setup.pybuildInstallationpip3.6installalfacoins_api_pythonGetting StartedGatewayYou can get an instance ofALFACoinsclass like this:For public APIsfromalfacoins_api_pythonimportALFACoinsalfacoins=ALFACoins()For private APIsfromalfacoins_api_pythonimportALFACoinsalfacoins=ALFACoins(name='shop-name',password='password',secret_key='07fc884cf02af307400a9df4f2d15490')Create orderresult=alfacoins.create_order(type='litecointestnet',amount=1.2345,currency='USD',order_id=1,options={'notificationURL':'https://example.io/notify','redirectURL':'https://example.io/redirect','payerName':'Bob','payerEmail':'[email protected]',},description='This is for test!',)Additional information and API documentation is here:ALFAcoins API Reference.
|
alfahor
|
ALFAHOR - ALgorithm For Accurate H/RTrace the vertical structure of protoplanetary disks by masking line emission. Based on Pinte et al. 2018.InstallYou can installALFAHORusingpippip install alfahorTo run the examples/tutorials you may need some files from theMAPS collaboration. Any problems or questions can be sent [email protected] does it work?ALFAHORis a package that allows you to easily handle spectral data in FITS file format. It has an interactive interface to create masks and define visually the near and far sides of channel map emission in protoplanetary disks. Further details on the method and implementation can be found in Paneque-Carreño et al. (2022, under review) andPinte et al. 2018.CitationsIf you useALFAHORas part of your research, please cite Paneque-Carreño et al. (2022, under review)
|
alfa-integrations
|
No description available on PyPI.
|
alfajor
|
Tasty functional testing.Alfajor provides a modern, object-oriented and browser-neutral interface to
HTTP resources. With Alfajor, your Python scripts and test code have a live,
synchronized mirror of the browser’s X/HTML DOM, even with DOM changes made on
the client by JavaScript.Alfajor provides:A straightforward ‘browser’ object, with an implementation that
communicates in real-time with live web browsers via Selenium and a fast,
no-javascript implementation via an integrated WSGI gatewayUse a specific browser, or, via integration with the ‘nose’ test runner,
switch out the browser backend via a command line option to your tests.
Firefox, Safari, WSGI- choose which you want on a run-by-run basis.Synchronized access to the page DOM via a rich dialect of lxml, with great
time-saving shortcuts that make tests compact, readable and fun to write.Optional management of server processes under test, allowing them to
transparently start and stop on demand as your tests run.An ‘apiclient’ with native JSON response support, useful for testing REST
and web api implementations at a fine-grained level.A friendly BSD license.
|
alfalfa-client
|
Alfalfa ClientThe purpose of this repository is to provide a standalone client for use with the Alfalfa application. It additionally includes a Historian to quickly/easily enable saving of results from Alfalfa simulations.UsageThis repo is packaged and hosted onPyPI here.pipinstallalfalfa-clientimportalfalfa_client.alfalfa_clientasacimportalfalfa_client.historianasahclient=ac.AlfalfaClienthistorian=ah.HistorianSetup and TestingThis repository is setup to use:pyenvfor managing python versionspoetryfor managing environmentpre-commitfor managing code stylingtox for running tests in isolated build environments. See the expected python versions intox.iniAssuming poetry is installed and the necessary python versions are installed, the following should exit cleanly:gitclonehttps://github.com/NREL/alfalfa-client.gitcdalfalfa-client
poetryruntoxThis may take some time resolving on the initial run, but subsequent runs should be faster.Seethis gistfor additional info.HistoryThe implemented client is previously referred to as Boptest, from the alfalfa/client/boptest.py implementation. It has been ported as a standalone package for easier usage across projects.ReleasingMerge all branches into develop, make sure tests passUpdate the version (assume version is 0.1.2):poetry version 0.1.2Update the version test file (i.e. my-repo/tests/test_version.py) to match the above versionMake sure tests pass:poetry run toxMerge develop into main (previously, master), make sure tests passCreate a tag:git tag 0.1.2Build:poetry buildPublishpoetry publish(this will push to pypi)Create a new release on the Github repository using the tag and link to PyPI
|
alfano
|
The Alfano package is used with the Goddard Mission Analysis ToolKit (GMAT) to implement continuous low-thrust orbit transfer trajectory simulations. The primary module for use with GMAT is the YawAngles.py procedure found in the Alfano/controls subpackage. YawAngles.py depends on the AlfanoLib.py from the utilities package. AlfanoLib.py implements the Alfano optimal control equations. Rather than compute the trajectory functions in real time, GenerateControlTable.py is provided in the controls subpackage and uses AlfanoLib.py to generate a JSON file containing thrust angles by orbit ratio. YawAngles.py reads the created JSON file to iteratively provide the optimal low-thrust yaw angles to GMAT for each revolution of a circle-to-circle orbit transfer.
|
alfanous
|
Alfanous is a Quranic search engine provides simple and advanced search services in the diverse information of the Holy Quran . $ sudo pip install alfanous
|
alfanousDesktop
|
A desktop GUI interface for alfanous Quran search engine API
|
alfa-orders
|
alfa-ordersLib for loading AlfaBank orders fromhttps://engine.paymentgate.ruUsage:importdatetimeasdtfromalfa_orders.apiimportAlfaServiceusername,password=("**********","**********")service=AlfaService(username,password)# from_date, to_date should be in UTC+3from_date,to_date=dt.datetime(2019,9,1),dt.datetime(2019,10,1)transactions=list(service.get_transactions(from_date,to_date))refunds=list(service.get_refunds(from_date,to_date))
|
alfa-sdk
|
alfa-sdkThis package provides a Python SDK for developing algorithms usingALFA.InstallationYou can directly install alfa-sdk usingpip. This will install the alfa-sdk package as well as all dependencies.$pipinstallalfa-sdkIf you already have alfa-sdk installed and want to upgrade to the latest version, you can run:$pipinstall--upgradealfa-sdkDevelopmentTo install requirements locally:1.Activate local venv$virtualenvvenv
$sourcevenv/bin/activate2.Install requirements from setup.py$pipinstall-e".[dev]"Changelog0.1.52 (2022-04-11)Add new services in endpoints listMake keepalive optional0.1.49-0.1.51 (2022-03-30)Initialize session with keepalive0.1.48 (2022-03-11)Invoke an algorithm/integration with the run_options definedAdd upload_data_file method in DataClient0.1.47 (2022-02-18)Refactor credentials handlingAuth adjustments to match behaviour of alfa-sdk-js0.1.46 (2022-02-09)Clarify error message in get_active_instance when there are no instances0.1.45 (2022-01-07)Update AlgorithmClient.list_algorithms to use specified team_id0.1.44 (2021-11-07)Append neo sessionid to auth cookie0.1.43 (2021-10-28)Add support for setting default options in sessionAdd ability to set custom alfa environment in endpoint helper0.1.42 (2021-10-19)Expose method to just create Endpoint helper based on session0.1.41 (2021-10-8)Enable creating RequestError with custom status code0.1.40 (2021-9-20)Fix handling of team_id in algorithm & integrations resource0.1.39 (2021-9-17)Fix handling of integration_id in Integration Client0.1.38 (2021-9-13)Adjust Algorithm and Integration clients to support specifiedteam_id0.1.37 (2021-8-12)Fetch configuration from config store when no other source of the configuration is available0.1.36 (2021-5-28)Improve error handling when error message is not a string0.1.35 (2021-5-12)Prioritize user-defined client id and client secret over cached token0.1.34 (2021-4-5)Prioritize credentials in parameters over context0.1.33 (2021-3-23)Remove None values from request parameters0.1.32 (2021-3-19)Use new quinyx domain (web-*.quinyx.com)0.1.31 (2021-1-6)Store alfa_id, alfa_env, and region on Session object0.1.30 (2020-12-11)Only throw TokenNotFoundError during authentication when neither a token nor cookie are found0.1.29 (2020-11-24)Added endpoints and resolve strategy for Quinyx AlfaAdded fetching of alfa_id and regionAdded use of alfa_id and region to EndpointHelper, Authentication, and Session0.1.28 (2020-11-13)Added support for macaroon tokens specified in ALFA_CONTEXT to authenticate requests0.1.26 (2020-10-9)Added function argument to IntegrationClient.invoke and definition of function_type0.1.25 (2020-9-29)Added support for integrations0.1.21 (?)fetch data for Meta Unit from Alfa when it exists0.1.20 (2020-3-24)enabled fetching secret values of a team the client is allowed to access0.1.19 (2020-3-12)enabled the definition of the team_id of a client0.1.18 (2020-3-9)added Dataclient.update_data_file method0.1.17 (2020-3-5)added fallback mechanisms for local handling of MetaInstances when there is no file found locally0.1.16 (2020-3-4)added AlgorithmClient.get_contextadded AlgorithmClient.get_active_instance_from_contextadded local handling of MetaUnits and MetaInstances0.1.15 (2020-2-19)added prefix, skip, limit, and order arguments to list_data_files function0.1.14 (2020-1-27)replace deprecated secrets service0.1.13 (2020-1-22)add store_kpi function0.1.12 (2020-1-09)generalize errors according to alfa errorshandle errors based on error codes0.1.11 (2019-9-02)generalized auth tokens0.1.10 (2019-7-15)allow handling of instances without storing to disk0.1.0 - 0.1.9 (2019-3-19)initial version + bugfixes
|
alfasim-sdk
|
ALFAsim API/SDKFree software: MIT licenseDocumentation:https://alfasim-sdk.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.
|
alf-auth0
|
alf-auth0
===Python OAuth 2 Clientalfis an OAuth 2 Client based onrequests.Sessionwith seamless support for theClient Credentials Flow.FeaturesAutomatic token retrieving and renewingToken expiration controlAutomatic token storageAutomatic retry on status 401 (UNAUTHORIZED)Works with Auth0 Client Credentials FlowUsageInitialize the client and use it as arequests.Sessionobject.fromalf.clientimportClientalf=Client(token_endpoint='http://example.com/token',client_id='client-id',client_secret='secret')resource_uri='http://example.com/resource'alf.put(resource_uri,data='{"name": "alf"}',headers={'Content-Type':'application/json'})alf.get(resource_uri)alf.delete(resource_uri)Using your custom token storageNow passing an object with get and set attributes you can store or retrieve a token.This object can be a Redis, Memcache or your custom object.fromalf.clientimportClientfromredisimportStrictRedisredis=StrictRedis(host='localhost',port=6379,db=0)alf=Client(token_endpoint='http://example.com/token',client_id='client-id',client_secret='secret',token_storage=redis)resource_uri='http://example.com/resource'alf.put(resource_uri,data='{"name": "alf"}',headers={'Content-Type':'application/json'})alf.get(resource_uri)alf.delete(resource_uri)Using alf with Auth0For the Client to work with Auth0 you need to initialize it withaudienceandtoken_default_expire_in.Auth0 is not returningexpires_inwhen you call authentication endpoint. As a result you should
settoken_default_expire_inas the same value (or a bit smaller, to be safe) that you
have set it in Auth0 management console > APIs > <your_api_name> > Settings >
Token Expiration (Seconds) fieldAudienceshould be set as your API Identifier in Auth0.fromalf.clientimportClientalf=Client(token_endpoint='http://example.com/token',audience='http://api.example.com/my-api/',token_default_expire_in=86400client_id='client-id',client_secret='secret')resource_uri='http://example.com/resource'How does it work?Before the request, a token will be requested on the authentication endpoint
and a JSON response with theaccess_tokenandexpires_inkeys will be
expected.Multiple attempts will be issued after an error response from the endpoint if
thetoken_retriesargument is used. Checktoken-retryingfor more info.alfkeeps the token until it is expired according to theexpires_invalue.The token will be used on aBearer authorization
headerfor
the original request.GET /resource/1 HTTP/1.1
Host: example.com
Authorization: Bearer token-12312If the request fails with a 401 (UNAUTHORIZED) status, a new token is retrieved
from the endpoint and the request is retried. This happens only once, if it
fails again the error response is returned.The token will be reused for every following request until it is expired.Token RetryingThe client supports theretry interface from urllib3to repeat attempts to
retrieve the token from the endpoint.The following code will retry the token request 5 times when the response status
is 500 and it will wait 0.3 seconds longer after each error (known asbackoff).fromrequests.packages.urllib3.utilimportRetryfromalf.clientimportClientalf=Client(token_endpoint='http://example.com/token',client_id='client-id',client_secret='secret',token_retry=Retry(total=5,status_forcelist=[500],backoff_factor=0.3))WorkflowTroubleshootingIn case of an error retrieving a token, the error response will be returned,
the real request won’t happen.Related projectsdjalfAn extended client that uses Django’s cache backend to share tokens between
server instances.tornado-alfA port of thealfclient using tornado’sAsyncHTTPClient.
|
alfa-utilities
|
Agglomerative Late Fusion Algorithm (ALFA) UtilitiesOverviewThis python package contains all ALFA related utilities, so that the base detectors and the ALFA detector can interact with each other.
|
alfeios
|
AlfeiosEnrich your command-line shell with Herculean cleaning capabilitiesAs fifth Labour, Heracles was charged with cleaning theAugean stables.
The beautiful stables had not been cleaned for thirty years and were
overshadowed in filth.
Instead of turning to the mop and bucket,
Heracles used a radically innovative tool:
theAlfeios riverwaters
and managed to wash everything in just one day.Let's do a comparison with the data on your hard drives.
Backups have been made, files have been renamed, directories have been moved
... Slowly but surely things have diverged significantly,
up to a point where you did not feel safe to delete anything.
That is where things got worse as you started accumulating
duplicates, sacrificing all hopes to control your data.
As a result cleaning your hard drives now appears to you as the fifth labour
of Heracles, humanly impossible.Alfeios is an innovative tool that makes this overwhelming task feasible.
It recursively indexes the content of your hard drives, going inside zip, tar,
gztar, bztar and xztar compressed files.
Its index is content-based, meaning that two files with different names and
different dates will be identified as duplicate if they share the same content.
This will tell you when files can safely be removed,
gaining space and cleaning data on your hard drives.Installpip install alfeiosRunAlfeios is a software that operates from acommand-line interfacein a shell.Upon installation, on any operating system thanks to the magic ofPython
entry points,
three commands are added to your shell.
One low-level command:alfeios indexand two high-level
commands:alfeios duplicateandalfeios missing.alfeios indexIndex content of a root directory:Index all file and directory contents in a root directory
including the inside of zip, tar, gztar, bztar and xztar compressed filesContents are identified by their hash-code, type (file or directory) and
sizeIt saves two files tagged with the current time in a .alfeios folder
in the root directory:A tree.json.file that is a dictionary: path -> contentA forbidden.json file that lists paths with no accessExample:alfeios index
alfeios idx D:/Pictures
alfeios ialfeios idxandalfeios ican be used as aliases foralfeios indexIf no positional argument is passed, the root directory is
defaulted to the current working directory.alfeios duplicateFind duplicate content in a root directory:List all duplicated files and directories in a root directorySave result as a duplicate_listing.json file tagged with the current time
in a .alfeios folder in the root directoryPrint the potential space gainExample:alfeios duplicate
alfeios dup -s D:/Pictures
alfeios d D:/Pictures/.alfeios/2020_01_29_10_29_39_listing.jsonalfeios dupandalfeios dcan be used as aliases foralfeios duplicateIf no positional argument is passed, the root directory is
defaulted to the current working directory.The '-s' or '--save-index' optional flag saves the tree.json and forbidden.json
files tagged with the current time in a .alfeios folder in the root directory.If a tree.json file is passed as positional argument instead of a root
directory, the tree is deserialized from the json file
instead of being generated, which is significantly quicker but of course
less up to date.alfeios missingFind missing content in a new root directory from an old root directory:List all files and directories that are present in an old root directory
and that are missing in a new oneSave result as a missing_listing.json file tagged with the current time
in a .alfeios folder in the old root directoryPrint the number of missing filesExample:alfeios missing D:/Pictures E:/AllPictures
alfeios mis -s D:/Pictures E:/AllPictures
alfeios m D:/Pictures/.alfeios/2020_01_29_10_29_39_listing.json E:/AllPicsalfeios misandalfeios mcan be used as aliases foralfeios missingThe '-s' or '--save-index' optional flag saves the tree.json and forbidden.json
files tagged with the current time in a .alfeios folder in the 2 root
directories.If a tree.json file is passed as positional argument instead of a root
directory, the corresponding tree is deserialized from the json file
instead of being generated, which is significantly quicker but of course
less up to date.For developersgit clone https://github.com/hoduche/alfeiosThen from the newly created alfeios directory, run:pip install -e .And in a Python file, call:importpathlibimportalfeios.apifolder_path=pathlib.Path('D:/Pictures')alfeios.api.index(folder_path)To build:flake8 -v alfeios tests
pytest -vv
python3 -m build
python3 -m twine upload dist/*Areas for improvementViewerFor the moment Alfeios output are raw json files that are left at the user
disposal.
A dedicated json viewer with graph display could be a better decision support
tool.File ManagerFor the moment Alfeios is in read-only mode. It could be enriched with other
file managerCRUDfunctions, in particular duplicate removal possibilities.File SystemFor the moment Alfeios is only a add-on to the command line shell.
Its content-based index could be further rooted in the file system and
refreshed incrementally after each file system operation, supporting thecopy-on-write principle.
|
alfendiwin
|
Th Package is about daily python job, including accessing postgresql, google tts, web crawler, multicharts, line tools etc.
just for personal use.
|
alfeneve
|
API Client for Alfen Eve EV charging units.InstallationAs a CLI tool:$pipinstallalfeneve[cli]As a library:$pipinstallalfeneveConfigurationThe CLI tool usesomniconf. This allows you to provide any CLI
argument using a file or through the environment (or a combination).Directly as arguments:$alfen-eve--alfen-endpointhttps://192.168.1.23--alfen-usernameadmin--alfen-passwordfooUsing a YAML file (make sure to installPyYAML, or useomniconf[yaml]):$catsettings.yamlalfen:endpoint:https://192.168.1.23username:adminpassword:foo$alfen-eve--yaml-filenamesettings.yamlUsing environment variables:$ALFEN_ENDPOINT=https://192.168.1.23ALFEN_USERNAME=adminALFEN_PASSWORD=fooalfen-eveAPI CredentialsAlfen ships a tool to allow you to configure your Alfen charging unit calledACE Service Installer (or just Service Installer).
This tool requires a Service Account that you canrequest from Alfen.The API doesn’t actually use this account directly though. It seems that the API credentials are hard-coded, and the Service Installer either ships with this
password, or can infer or request this password from Alfen. Regardless, you can use the Service Installer tool to sniff out the credentials.At this time this process is a bit involved, and requires you to know how to insert yourself as a proxy between the Service Installer and your charging unit
on Windows. The broad steps are as follows (usingmitmproxy):Install mitmproxy.Start mitmproxy at least once to generate the certificates:mitmproxy –listen-port 8090.Install the mitmproxy certificate asTrusted Root Certificate(you can find it in the.mitmproxyfolder in your User Account).Start mitmproxymitmproxy –listen-port 8090 –insecureand set it as the OS Global Proxy usingInternet Options.If all is configured properly, you can now start the Service Installer and login using your Service Account.Connect to your Alfen charger, and look in the mitmproxy window. There should be a request to/api/login. You can find the username and password in this request.Configure these credentials as specified above.Make sure to remove mitmproxy as your OS Global Proxy.ExamplesUse as a CLI tool:$alfen-eve--modecategoriescategory----------genericgeneric2accelerotempstatesmeter1meter4ledsocppdisplaycommMbusTCP$alfen-eve--modeproperties--properties-categorymeter4namevalueidcat-------------------------------------------------------OD_sensOptionalEnergyMeter455217_0meter4OD_sensEnergyMeterType415218_0meter4meter4_voltageL1N225.15221_3meter4meter4_voltageL2N225.75221_4meter4meter4_voltageL3N228.65221_5meter4...Use as a library:fromalfeneve.alfenimportAlfenfrompprintimportpprintwithAlfen("https://192.168.1.23",("admin","foo"))aseve:cats=eve.categories()pprint(cats)# ['generic',# 'generic2',# 'accelero',# 'temp',# 'states',# 'meter1',# 'meter4',# 'leds',# 'ocpp',# 'display',# 'comm',# 'MbusTCP']properties=eve.properties(category="generic")pprint(list(properties))# [<AlfenProperty(name=OD_manufacturerDeviceName, value=NG910, id=1008_0, cat=generic)>,# <AlfenProperty(name=OD_manufacturerHardwareVersion, value=G0, id=1009_0, cat=generic)>,# <AlfenProperty(name=OD_manufacturerSoftwareVersion, value=4.8.0-3168, id=100A_0, cat=generic)>,# ... ]LicenseMIT
|
alfen-eve-modbus-tcp
|
alfen_eve_modbus_tcpalfen_eve_modbus_tcp is a python library that collects data from Alfen Eve Car Chargers over Modbus TCP.InstallationTo install, either clone this project and install usingsetuptools:python3 setup.py installor install the package from PyPi:pip3 install alfen-eve-modbus-tcpUsageThe scriptexample.pyprovides a minimal example of connecting to and displaying all registers from an Alfen Eve Car Charger over Modbus TCP.usage: example.py [-h] [--timeout TIMEOUT] [--json] host port
positional arguments:
host Modbus TCP address
port Modbus TCP port
optional arguments:
-h, --help show this help message and exit
--timeout TIMEOUT Connection timeout
--json Output as JSONOutput:Car Charger(192.168.2.136:502: timeout=1, retries=3):
Registers:
Name: DIE_14966
Manufacturer: Alfen NV
Modbus Table Version: 1
Firmware Version: 6.1.0-4159
Station Serial Number: ACE0287582
Date Year: 2023
Date Month: 7
Date day: 15
Time hour: 21
Time minute: 3
Time second: 39
Uptime: 125689398
Time zone: 60
Station Active Maximum Current: 25
Temperature: 35.9375
OCPP state: 1
Nr of sockets: 1
Availability: Operable
Mode 3 state: NotConnected, A
Actual Applied Max Current for Socket: 6.0
Remaining time before fallback to safe current: 0
Meter State: Initialised & Updated
Meter Last Value Timestamp: 334
Meter Type: RTU
Voltage Phase L1N: 238.1899871826172
Voltage Phase L2N: 240.63999938964844
Voltage Phase L3N: 238.4399871826172
Voltage Phase L1L2: nan
Voltage Phase L2L3: nan
Voltage Phase L3L1: nan
Current N: nan
Current Phase L1: 0.0
Current Phase L2: 0.0
Current Phase L3: 0.0
Current Sum: nan
Power Factor Phase L1: nan
Power Factor Phase L2: nan
Power Factor Phase L3: nan
Power Factor Sum: 0.0
Frequency: 50.000003814697266
Real Power Phase L1: nan
Real Power Phase L2: nan
Real Power Phase L3: nan
Real Power Sum: 0.0
Apparent Power Phase L1: nan
Apparent Power Phase L2: nan
Apparent Power Phase L3: nan
Apparent Power Sum: nan
Reactive Power Phase L1: nan
Reactive Power Phase L2: nan
Reactive Power Phase L3: nan
Reactive Power Sum: nan
Real Energy Delivered Phase L1: nan
Real Energy Delivered Phase L2: nan
Real Energy Delivered Phase L3: nan
Real Energy Delivered Sum: 31.0
Real Energy Consumed Phase L1: nan
Real Energy Consumed Phase L2: nan
Real Energy Consumed Phase L3: nan
Real Energy Consumed Sum: nan
Apparent Energy Phase L1: nan
Apparent Energy Phase L2: nan
Apparent Energy Phase L3: nan
Apparent Energy Sum: nan
Reactive Energy Phase L1: nan
Reactive Energy Phase L2: nan
Reactive Energy Phase L3: nan
Reactive Energy Sum: nan
Modbus Slave Max Current: 6.0
Active Load Balancing Safe Current: 6.0
Modbus Slave Received Setpoint Accounted For: Yes
Phases used for charging: 3
SCN Name:
SCN Sockets: 0
SCN Total Consumption Phase L1: 0.0
SCN Total Consumption Phase L2: 0.0
SCN Total Consumption Phase L3: 0.0
SCN Actual Max Current Phase L1: 0.0
SCN Actual Max Current Phase L2: 0.0
SCN Actual Max Current Phase L3: 0.0
SCN Max Current Phase L1: 6.0
SCN Max Current Phase L2: 6.0
SCN Max Current Phase L3: 6.0
Max current valid time L1: 0
Max current valid time L2: 0
Max current valid time L3: 0
SCN safe current: 6.0
SCN Modbus Slave Max Current enable: DisabledPassing--jsonreturns:{
"c_name": "DIE_14966",
"c_manufacturer": "Alfen NV",
"c_modbus_table_version": 1,
"c_firmware_version": "6.1.0-4159",
"c_platform_type": "NG910",
"c_station_serial_number": "ACE0287582",
"c_date_year": 2023,
"c_date_month": 7,
"c_date_day": 15,
"c_time_hour": 21,
"c_time_minute": 10,
"c_time_second": 48,
"c_uptime": 126118547,
"c_time_zone": 60,
"station_active_max_current": 25,
"temperature": 35.8125,
"ocpp_state": 1,
"nr_of_sockets": 1,
"meter_state": 3,
"meter_last_value_timestamp": 29,
"meter_type": 0,
"voltage_phase_L1N": 237.8199920654297,
"voltage_phase_L2N": 240.75999450683594,
"voltage_phase_L3N": 238.80999755859375,
"voltage_phase_L1L2": NaN,
"voltage_phase_L2L3": NaN,
"voltage_phase_L3L1": NaN,
"current_N": NaN,
"current_phase_L1": 0.0,
"current_phase_L2": 0.0,
"current_phase_L3": 0.0,
"current_sum": NaN,
"power_factor_phase_L1": NaN,
"power_factor_phase_L2": NaN,
"power_factor_phase_L3": NaN,
"power_factor_sum": 0.0,
"frequency": 50.02000427246094,
"real_power_phase_L1": NaN,
"real_power_phase_L2": NaN,
"real_power_phase_L3": NaN,
"real_power_sum": 0.0,
"apparent_power_phase_L1": NaN,
"apparent_power_phase_L2": NaN,
"apparent_power_phase_L3": NaN,
"apparent_power_sum": NaN,
"reactive_power_phase_L1": NaN,
"reactive_power_phase_L2": NaN,
"reactive_power_phase_L3": NaN,
"reactive_power_sum": NaN,
"real_energy_delivered_phase_L1": NaN,
"real_energy_delivered_phase_L2": NaN,
"real_energy_delivered_phase_L3": NaN,
"real_energy_delivered_sum": 31.0,
"real_energy_consumed_phase_L1": NaN,
"real_energy_consumed_phase_L2": NaN,
"real_energy_consumed_phase_L3": NaN,
"real_energy_consumed_sum": NaN,
"apparent_energy_phase_L1": NaN,
"apparent_energy_phase_L2": NaN,
"apparent_energy_phase_L3": NaN,
"apparent_energy_sum": NaN,
"reactive_energy_phase_L1": NaN,
"reactive_energy_phase_L2": NaN,
"reactive_energy_phase_L3": NaN,
"reactive_energy_sum": NaN,
"availability": 1,
"mode_3_state": "A",
"actual_applied_max_current": 6.0,
"modbus_slave_max_current_valid_time": 0,
"modbus_slave_max_current": 6.0,
"active_load_balancing_safe_current": 6.0,
"modbus_slave_received_setpoint_accounted_for": 1,
"charge_using_1_or_3_phases": 3,
"scn_name": "",
"scn_sockets": 0,
"scn_total_consumption_phase_l1": 0.0,
"scn_total_consumption_phase_l2": 0.0,
"scn_total_consumption_phase_l3": 0.0,
"scn_actual_max_current_phase_l1": 0.0,
"scn_actual_max_current_phase_l2": 0.0,
"scn_actual_max_current_phase_l3": 0.0,
"scn_max_current_phase_l1": 6.0,
"scn_max_current_phase_l2": 6.0,
"scn_max_current_phase_l3": 6.0,
"remaining_valid_time_max_current_phase_l1": 0,
"remaining_valid_time_max_current_phase_l2": 0,
"remaining_valid_time_max_current_phase_l3": 0,
"scn_safe_current": 6.0,
"scn_modbus_slave_max_current_enable": 0
}ConnectingIf you wish to use Modbus TCP the following parameters are relevant:host = IP or DNS name of your Modbus TCP device, requiredport = TCP port of the Modbus TCP device, requiredConnecting to the car charger:>>> import alfen_eve_modbus_tcp
# Car Charger over Modbus TCP
>>> car_charger = alfen_eve_modbus_tcp.CarCharger(host="192.168.2.136", port=502)Test the connection, remember that only a single connection at a time is allowed:>>> car_charger.connect()
True
>>> car_charger.connected()
TrueWhile it is not necessary to explicitly callconnect()before reading registers, you should do so before callingconnected(). The connection can be closed by callingdisconnect().Printing the class yields basic device parameters:>>> car_charger
Car Charger(192.168.2.136:502: timeout=1, retries=3)Reading RegistersReading a single input register by name:>>> car_charger.read("c_manufacturer")
{'c_manufacturer': 'Alfen NV'}Read all input registers usingread_all():>>> car_charger.read_all()
{
'c_name': 'DIE_14966',
'c_manufacturer': 'Alfen NV',
'c_modbus_table_version': 1,
'c_firmware_version': '6.1.0-4159',
'c_platform_type': 'NG910',
'c_station_serial_number': 'ACE0287582',
'c_date_year': 2023,
'c_date_month': 7,
'c_date_day': 15,
'c_time_hour': 21,
'c_time_minute': 23,
'c_time_second': 45,
'c_uptime': 126895863,
'c_time_zone': 60,
'station_active_max_current': 25,
'temperature': 35.75,
'ocpp_state': 1,
'nr_of_sockets': 1,
'meter_state': 3,
'meter_last_value_timestamp': 602,
'meter_type': 0,
'voltage_phase_L1N': 239.1999969482422,
'voltage_phase_L2N': 241.25,
'voltage_phase_L3N': 238.6599884033203,
'voltage_phase_L1L2': nan,
'voltage_phase_L2L3': nan,
'voltage_phase_L3L1': nan,
'current_N': nan,
'current_phase_L1': 0.0,
'current_phase_L2': 0.0,
'current_phase_L3': 0.0,
'current_sum': nan,
'power_factor_phase_L1': nan,
'power_factor_phase_L2': nan,
'power_factor_phase_L3': nan,
'power_factor_sum': 0.0,
'frequency': 50.060001373291016,
'real_power_phase_L1': nan,
'real_power_phase_L2': nan,
'real_power_phase_L3': nan,
'real_power_sum': 0.0,
'apparent_power_phase_L1': nan,
'apparent_power_phase_L2': nan,
'apparent_power_phase_L3': nan,
'apparent_power_sum': nan,
'reactive_power_phase_L1': nan,
'reactive_power_phase_L2': nan,
'reactive_power_phase_L3': nan,
'reactive_power_sum': nan,
'real_energy_delivered_phase_L1': nan,
'real_energy_delivered_phase_L2': nan,
'real_energy_delivered_phase_L3': nan,
'real_energy_delivered_sum': 31.0,
'real_energy_consumed_phase_L1': nan,
'real_energy_consumed_phase_L2': nan,
'real_energy_consumed_phase_L3': nan,
'real_energy_consumed_sum': nan,
'apparent_energy_phase_L1': nan,
'apparent_energy_phase_L2': nan,
'apparent_energy_phase_L3': nan,
'apparent_energy_sum': nan,
'reactive_energy_phase_L1': nan,
'reactive_energy_phase_L2': nan,
'reactive_energy_phase_L3': nan,
'reactive_energy_sum': nan,
'availability': 1,
'mode_3_state': 'A',
'actual_applied_max_current': 6.0,
'modbus_slave_max_current_valid_time': 0,
'modbus_slave_max_current': 6.0,
'active_load_balancing_safe_current': 6.0,
'modbus_slave_received_setpoint_accounted_for': 1,
'charge_using_1_or_3_phases': 3,
'scn_name': '',
'scn_sockets': 0,
'scn_total_consumption_phase_l1': 0.0,
'scn_total_consumption_phase_l2': 0.0,
'scn_total_consumption_phase_l3': 0.0,
'scn_actual_max_current_phase_l1': 0.0,
'scn_actual_max_current_phase_l2': 0.0,
'scn_actual_max_current_phase_l3': 0.0,
'scn_max_current_phase_l1': 6.0,
'scn_max_current_phase_l2': 6.0,
'scn_max_current_phase_l3': 6.0,
'remaining_valid_time_max_current_phase_l1': 0,
'remaining_valid_time_max_current_phase_l2': 0,
'remaining_valid_time_max_current_phase_l3': 0,
'scn_safe_current': 6.0,
'scn_modbus_slave_max_current_enable': 0
}Register DetailsIf you need more information about a particular register, to look up the units or enumerations, for example:>>> car_charger.registers["modbus_slave_max_current"]
# unit, address, length, type, datatype, valuetype, name, unit, batching
(
1,
1210,
2,
<registerType.HOLDING: 2>,
<registerDataType.FLOAT32: 6>,
<class 'float'>,
'Modbus Slave Max Current',
'A',
7
)ContributingContributions are more than welcome.
|
alfi
|
Alfi: Approximate Latent Force InferenceDon't miss out!Implement Latent Force Models in under 10 lines of code!This library implements several Latent Force Models. These are all implemented in building blocks simplifying the creation of novel models or combinations.We support analytical (exact) inference in addition to inducing point approximations for non-linear LFMs written in PyTorch.Installationpip install alfiDocumentationSee Jupyter notebooks in the documentationhere. Alternatively, directly browse the notebooks in thedocs/notebooks/directory. The docs contain linear, non-linear (both variational and MCMC methods), and partial Latent Force Models. The notebooks also contain complete examples from the literature such as a replication of the analytical linear Latent Force Model fromLawrence et al., 2006
|
alfie
|
alfie: an alignment-free, kingdom level taxonomic classifier for DNA barcode data.Alfie classifies sequences using a neural network which takes k-mer frequencies (default k = 4)
as inputs and makes kingdom level classification predictions. At present, the program contains
trained models for classification of cytochrome c oxidase I (COI) barcode sequences to the
taxonomic level: kingdom. The program is effective at classifying sequences >200 base pairs in
length, and no alignment information is needed.Alfie can be deployed from the command line for rapid file-to-file classification of sequences.
This is an effective means of separating contaminant sequences in a DNA metabarcoding or
environmental DNA dataset from sequences of interest.For increased control, alfie can also be deployed as a module from within Python. The alfie
package also contains functions that can aid a user in the training and application of a custom
alignment-free classifier, which allows the program to be applied to different DNA barcodes
(or genes) or on different taxonomic levels.
|
alfipy
|
Experimental
|
alfonscli
|
Alfons Command Line InterfaceThis is a tool to publish and subscribing to MQTT packets toAlfons.$ alfonscli
-p, --profile Profile to load default arguments from
-s, --server Host:port
-u, --user Username
-pw,--password Password
-t, --topic Topic to subscribe/publish to
-m, --message Message to publish. Only subscribing if not set
-c, --continuous Don't quit after receiving the first packet
|
alfonsiot
|
Alfons IoTThis is a package for IoT's to interact with Alfons.import alfonsiot
def onMessage(iot, topic, payload):
print("onMessage", topic, payload)
def onTopicMessage(message):
print("Got message from specified", message)
def onConnect(iot):
print("Connected!", iot)
iot.subscribe("topic", onTopicMessage)
iot.publish("topic", "Message!")
iot = alfonsiot.start(host="", port="", username="", password="")
iot.onConnect = onConnect
iot.onMessage = onMessage
|
alfonslistener
|
Alfons ListenerSimple program for listening on a topic and when it's received running a script.Setupconfig.yamlinfo:
server: "host:port"
username: "username"
password: "iot"
ssl: True
commands:
- topic: "topic"
script: "script-to-run"
- topic: "topic2"
python: "module:function"
script: "script-to-run2"Creating a daemon$ ./service_install.shIf you want to install the service under a name other than "alfonslistener" you can change thenamevariable on the top of the file.
|
alfonsopdf
|
This is the homepage of our project.
|
alfort
|
AlfortAlfort is simple and plain ELM-like interactive applicaiton framework for Python.
Alfort is motivated to provide declaretive UI framework independent from any backends.Alfort is developping now. So there will be breaking changes.FeaturesRendering with Virtual DOM (this feature is truely inspired from hyperapp)Elm-like Movel-View-Update architectureIndependent from Real DOMSimple implementation (under 1k loc)Installation$pipinstallalfortExampleCodefromtypingimportCallablefromenumimportEnum,autofromclickimportpromptfromalfortimportAlfort,Dispatch,Effectfromalfort.vdomimportNode,Patch,PatchText,Props,VDOMhandlers:dict[str,Callable[[],None]]={}classMsg(Enum):Up=auto()Down=auto()classTextNode(Node):def__init__(self,text:str)->None:print(text)defapply(self,patch:Patch)->None:matchpatch:casePatchText(new_text):print(new_text)case_:raiseValueError(f"Invalid patch:{patch}")classAlfortSimpleCounter(Alfort[int,Msg,TextNode]):defcreate_text(self,text:str,dispatch:Dispatch[Msg],)->TextNode:handlers["u"]=lambda:dispatch(Msg.Up)handlers["d"]=lambda:dispatch(Msg.Down)returnTextNode(text)defcreate_element(self,tag:str,props:Props,children:list[TextNode],dispatch:Dispatch[Msg],)->TextNode:raiseValueError("create_element should not be called")defmain(self,)->None:self._main()whileTrue:c=prompt("press u or d")ifhandle:=handlers.get(c):handle()defmain()->None:defview(state:int)->VDOM:returnf"Count:{state}"definit()->tuple[int,list[Effect[Msg]]]:return(0,[])defupdate(msg:Msg,state:int)->tuple[int,list[Effect[Msg]]]:matchmsg:caseMsg.Up:return(state+1,[])caseMsg.Down:return(state-1,[])app=AlfortSimpleCounter(init=init,view=view,update=update)app.main()if__name__=="__main__":main()OutputCount: 0
press u or d: u
Count: 1
press u or d: u
Count: 2
press u or d: u
Count: 3
press u or d: d
Count: 2
press u or d: d
Count: 1If you need more exmplaes, please check theexamples.ConceptAlfort is inspired by TEA(The Elm Architecture). So Alfort makes you create an interactive application withView,ModelandUpdate. If you need more specification about TEA, please see thisdocumentation.Therefore, Alfort doesn't support Command. So Alfort uses functions whose type isCallable[[Callable[[Msg], None]], Coroutine[None, None, Any]]to achieve side effect.
You can run some tasks which have side effects in this function. And, if you need, you can pass the result of side effect as Message todicpatchwhich is given as an argument.
This idea is inspired byhyperapp.For now, Alfort doesn't support the following features.Event subscriptionVirtual DOM comparison by keyPort to the outside of runtime.Alfort doesn't provide Real DOM or other Widgets manupulation.
But there is an iterface between your concrete target and Alfort's Virtual DOM.
It isPatche. So you have to implement some codes to handle some patches.alfort-domis an implementation for manupulation DOM.For developmentInstall Poery plugins$poetryselfadd"poethepoet[poetry_plugin]"Run tests$poetrypoetestRun linter and formatter$poetrypoecheckSee AlsoElmhyperappLicenseApache-2.0
|
alfort-dom
|
Alfort-DOMAlfort-DOM is Elm-like web application framework for Python. It usesAlfortto handle Vritual DOM andPyodideto run its codes on browser.Installation$pipinstallalfort-domExamplefromdataclassesimportdataclassfromtypingimportTypeAliasfromalfortimportEffectfromalfort.vdomimportVDom,elfromalfort_domimportAlfortDom@dataclass(frozen=True)classCountUp:value:int=1@dataclass(frozen=True)classCountDown:value:int=1Msg:TypeAlias=CountUp|CountDowndeftitle(text:str)->VDom:returnel("h1",{},[text])defcount(cnt:int)->VDom:returnel("div",{"style":{"margin":"8px"}},[str(cnt)])defbuttons()->VDom:button_style={"margin":"4px","width":"50px"}returnel("div",{},[el("button",{"style":button_style,"onclick":CountDown(10)},["-10"]),el("button",{"style":button_style,"onclick":CountDown()},["-"]),el("button",{"style":button_style,"onclick":CountUp()},["+"]),el("button",{"style":button_style,"onclick":CountUp(10)},["+10"]),],)defview(state:dict[str,int])->VDom:returnel("div",{"style":{"display":"flex","justify-content":"center","align-items":"center","flex-flow":"column",}},[title("Simple Counter"),count(state["count"]),buttons()],)definit()->tuple[dict[str,int],list[Effect[Msg]]]:return({"count":0},[])defupdate(msg:Msg,state:dict[str,int])->tuple[dict[str,int],list[Effect[Msg]]]:matchmsg:caseCountUp(value):return({**state,"count":state["count"]+value},[])caseCountDown(value):return({**state,"count":state["count"]-value},[])app=AlfortDom[dict[str,int],Msg](init=init,view=view,update=update,)app.main(root="root")If you need more exmplaes, please check theexamples.For developmentInstall Poery plugins$poetryselfadd"poethepoet[poetry_plugin]"Run tests$poetrypoetestRun linter and formatter$poetrypoecheckRun examples$poetrypoerun-exampleSee AlsoElmPyodideAlfortLicenseApache-2.0
|
alfpdf
|
This is the homepage of our test project
|
alfpy
|
alfpyalfpy is a bionformatics Python package that provides alignment-free framework
to compare biological sequences (DNA/RNA/protein) and infers their
phylogenetic relationships.alfpy also contains Python scripts with user-friendly command-line interfaces
that let you compare unaligned FASTA sequences with more than 40 distance methods.Latest source codeThe official source code repository is at:https://github.com/aziele/alfpyWeb sitesalfpy is also available as a web app:http://www.combio.pl/alfreeRequirementsPython (https://www.python.org/) version 2.7 or >= 3.3NumPy (http://www.numpy.org/).InstallationOption 1: Get the latest official versionInstall the latest official version withpipsudo pip install alfpyIf you are not allowed to usesudo, install alfpy as user:sudo pip install --user alfpyOption 2: Get the latest development versionGet it using this shell command, which requires Git:git clone https://github.com/aziele/alfpy.gitIf you don’t feel like using git, just download the package manually as agzipped tarball.Unpack the zip package, go to the directory and run the installation:cd alfpy
python setup.py installor:python setup.py install --userAlfpy usageThe examples of using Alfpy are available at:http://www.combio.pl/alfree/download/.TestingTo run tests, go to the alfpy source code directory and type:python -m unittest discoverIf you want to test a specific file (e.g.test_word_distance.py), type:python -m unittest tests.test_word_distanceContactDrop us any feedback at:[email protected] on twitter@a_zielezinski.Licensealfpy is under the MIT license; seeLICENSE.txt. Distribution,
modification and redistribution, incorporation into other software,
and pretty much everything else is allowed.
|
alfred
|
No description available on PyPI.
|
alfred3
|
Welcome to alfred3Alfred3 is a package for Python 3 offering an easy way to create
computer experiments that meet the highest standards of Open Science.
Specifically, experiments created with alfred3 are transparent,
accessible, reproducible, and adhere to theFAIR principles for
research software. In its core
version, alfred3 comes well-equipped for the creation of dynamic
content that can be delivered online via a webserver or offline running
on local machines. In addition, thealfred3-interact
pluginenables users to
create interactive group experiments with features such as automated
group forming, quick access to members' experiment data, and a
prepacked chat functionality.Further advantages include:All alfred3 scripts are written inPython
3, a very popular open source programming
language that is easy to learn and fast to develop with, as it
focuses on code readability. Thus, even minimal programming skills
are sufficient to create experiments with alfred3 (see the
requirement section for more details and suggestions on beginner
tutorials).Alfred3 uses the principle of Object-oriented programming (OOP) to
maximize code reusability. By simply copying and pasting elements
between scripts, users can instantly integrate content from previous
experiments with their current project.Experimenters can share experiments created with alfred3 the same way
they share code from their data analysis. In addition to highly
reusable code, transparency and ease of sharing are two key
advantages of using script-based experimental software.Using open source software is a core principle of Open Science and
both Python 3 and alfred3 are published under permissive open source
licenses. Researchers will not face the hurdles associated with
closed source software when trying to reproduce an alfred3 experiment
(seeThe Open Science Training
Handbookfor more information on the importance of using open source research
software for your experiments and data analyses).Online experiments written in alfred3 support all types of mobile
devices through a responsive interface, making them suitable for a wide range of applications and settings (e.g., laboratory experiments where users are invited to bring their own devices, or surveying passers-py with tablets in public spaces)Alfred3 is optimized for the collection of personal data in full
compliance with both the GDPR and official German guidelines on data
management in psychological science (English
version|German
version).
The core version of alfred3 already includes data encryption and
decryption methods as well as unlinked storage options for personal or
sensitive data (meaning that you can store personal data separately
without the possibility of linking it back to experimental data).InstallationIf you have Python 3.7 or newer installed, just install alfred3 via pip$ pip3 install alfred3DocumentationDocumentation and tutorials for alfred3's most important features
is available here:Link to docsQuestions and AnswersWe useGitHub Discussions.
You can ask questions, share ideas, and showcase your work there. Do not
hesitate to ask!A "Hello, world" experimentCreating a hello-world experiment is as easy as writing thisscript.pyfile. You can even do it in a simple text editor. Note that the file
must be namedscript.pyimportalfred3asalexp=al.Experiment()exp+=al.Page("Hello, world!",name="hello_world")To run the script, open a terminal and change the working directory to
your experiment directory:$ cd path/to/experimentNext, simply execute the following command in the terminal::$ alfred3 runIf you haveGoogle Chromeinstalled on your machine, a browser window
with the experiment opens automatically. Otherwise, open any webbrowser
and visithttp://127.0.0.1:5000/startto start the experiment.Of course, this "Hello, world" experiment does not contain much content:
Only a single page with a heading. To learn how to add content to an
experiment, visit our tutorials in thealfred3 documentation.CitationIf you are publishing research conducted using alfred3, the
following citation is required:Treffenstaedt, C., Brachem, J., & Wiemann, P. (2021). Alfred3 - A
library for rapid experiment development (Version x.x.x). Göttingen,
Germany:https://doi.org/10.5281/zenodo.1437219If you want to use alfred3 and need more information, don't hesitate to
contact us [email protected] Mailing ListIf you want to stay up to date with current developments, you can join
ourmailing list.
We use this list to announce new releases and spread important
information concerning the use of Alfred. You can expect to receive at
most one mail per month.
|
alfred3-dbtools
|
alfred3_dbtoolsThis module provides additional tools for working with databases in the context of alfred3 experiments (seealfred3 on GitHub).Installationpipinstallalfred3_dbtoolsUsageTo import the tools for working with mongodb, include this statement at the beginning of your script:fromalfred3_dbtoolsimportmongotoolsYou can then access the classes provided in the module:mongotools.MongoDBConnectorcan be used to establish an independent connection to an instance ofpymongo.MongoClient.Access to the client is provided viamongotools.MongoDBConnector.db. This will return either a database instance or, if a specific collection was given during initialisation, that collection instance.Seehelp(mongotools.MongoDBConnector)for details.mongotools.ExpMongoDBConnectorcan be used to establish a connection to an experiments' MongoDBs.The constructor takes one parameter:experiment, which needs to be an alfred experiment. Seehelp(mongotools.ExpMongoDBConnector)for details.mongotools.ExpMongoDBConnector.dbwill return the MongoDBcollectionof theMongoSavingAgentwith the lowest activation level (i.e. the primaryMongoSavingAgent). It will raise aValueError, if the lowest activation level is occupied by two or moreMongoSavingAgents.mongotools.ExpMongoDBConnector.list_agentswill return a list of allMongoSavingAgents added to the experiment.Your experiment needs to have at leastone MongoSavingAgentfor this class to work.Refer to thepymongo documentationfor further details on how to interact with the clients.
|
alfred3-interact
|
alfred3-interact: Interactive web-experiments in alfred3Alfred3-interact is a plugin foralfred3.
It allows for the creation of interactive web experiments, predominantly
in the social sciences. As prerequisites,
you need to havePython 3.7or newer andalfred3 v2.2.0or newer installed.Installation$ pip3 install alfred3_interactDocumentationDocumentation for alfred3_interact is available here:Link to docsQuick exampleBelow is an examplescript.pyfor creating an experiment with an
asynchronous exchange of data between participants matching:Initialize a group spec and thealfred3_interact.MatchMakerduring experiment setupUse aalfred3_interact.WaitingPagefor matchmaking inside itswait_forhook method.Find a group viaMatchMaker.matchand bind it to the
experiment plugins object.Now the group object is available in sections, pages, and elements
through the experiment session object. You can use it to access data
from other participants in the same group.# script.pyimportalfred3asalimportalfred3_interactasaliexp=al.Experiment()@exp.setupdefsetup(exp):spec=ali.SequentialSpec("role1","role2",nslots=10,name="mygroup")exp.plugins.mm=ali.MatchMaker(spec,exp=exp)@exp.memberclassMatch(ali.WaitingPage):defwait_for(self):group=self.exp.plugins.mm.match()[email protected](al.Page):title="Match successful"defon_exp_access(self):group=self.exp.plugins.grouptxt=f"You have successfully matched to role:{group.me.role}"self+=al.Text(txt,align="center")if__name__=="__main__":exp.run()The demo experiment can be started by executing the following command
from the experiment directory (i.e. the directory in which you placed
thescript.py):$ alfred3 runCitationAlfred3-interact was developed for research at the department for
economic and social psychology, Georg-August-University Göttingen.If you are publishing research conducted using alfred3, the
following citation is required:Brachem, J. & Treffenstädt, C. (2021). Alfred3-interact - Interactive web experiments in alfred3. (Version x.x.x). Göttingen,
Germany:https://doi.org/10.5281/zenodo.1437219
|
alfred3-reaction-times
|
alfred-reaction-timesAlfred3 library for measurement of reaction timesInstallationPlease note, that the base package alfred3 must also be installed.$ pip install alfred3Afterwards, you can install alfred3_reaction_times:$ pip install alfred3-reaction-timesA "Hello world" experimentimportalfred3asalimportalfred3_reaction_timesasartexp=al.Experiment()exp+=al.Page('Reacting to "Hello World"',name="hello_world")exp.hello_world+=al.Text('Please press any key when you see "Hello World')exp.hello_world+=art.ReactionTimes(art.Trial(art.Fixation(element=al.Text("X"),# any alfred3 element to be shownduration=5# display duration in seconds),art.Stimulus(al.Text("Hello world"),# any alfred3 element to be shownart.Reaction("any")# definition of the keys that are considered as the proper reaction)))In this example, an "X" will be shown as a fixation stimulus, followed by the text
"Hello World" after 5 secondsOn further information on how to write and run an alfred3 experiment,
please read thealfred3 documentation
|
alfred3-scheduler
|
alfred3_scheduler
|
alfred5
|
🎩 AlfredClientSimplest Alfred Client that I use my own projects.Usagepipinstallalfred5Projects dir structurePut your codes andrequirements.txttosrcfoldersInstallalfred5viapipinstallalfred5--target=src/libsAdd the top of themain.pyimportsyssys.path.insert(0,"src/libs")If u want to use different--targetfor ex.useWorkflowClient.run(packagedir=".")Sample of default structure:If u install all of requirements, dont need to createrequirements.txtfile insrcIf you usevscode, add the code that below to.vscode/settings.jsonto debug your file{"python.analysis.extraPaths":["./src/libs"],"python.analysis.exclude":["./src/libs"]}ViaSnippetsClientAPI create custom snippets programmaicallyViaWorkflowClientAPI create custom alfred workflowCraeterequirements.txtfile for your python project to letalfred5installs them if needed 🙃To installfrom requirements.txtdo all import packages insidemain- Useglobalkeyword to access imported packages globallyclient.queryis the query stringclient.page_countis the page count for pagination resultsDont need to addalfred5torequirements.txtUseWorkflowClient.logto log your message to alfred debuggerdebugging alfred workflowwhy this project use stderr for all logging operationUseWorkflowClient(main, cache=True)method to use caching systemJust do it for static (not timebased nor any dynamic stuff) responseDb path isdb/results.ymlalso you can see it from workflow debug panel⭐️ Example Projectfromreimportsubfromurllib.parseimportquote_plusimportsyssys.path.insert(0,"src/libs")fromalfred5importWorkflowClientasyncdefmain(client:WorkflowClient):# To auto install requirements all import operation must be in hereglobalgetfromrequestsimportgetquery=client.queryclient.log(f"my query:{query}")# use it to see your log in workflow debug panel# (use cache=True) Use cache system to quick response instead of old style that below# if client.load_cached_response():# returnchar_count=str(len(query))word_count=str(len(query.split(" ")))line_count=str(len(query.split("\n")))encoded_string=quote_plus(query)remove_dublication=" ".join(dict.fromkeys(query.split(" ")))upper_case=query.upper()lower_case=query.lower()capitalized=query.capitalize()template=sub(r"[a-zA-Z0-9]","X",query)client.add_result(encoded_string,"Encoded",arg=encoded_string)client.add_result(remove_dublication,"Remove dublication",arg=remove_dublication)client.add_result(upper_case,"Upper Case",arg=upper_case)client.add_result(lower_case,"Lower Case",arg=lower_case)client.add_result(capitalized,"Capitalized",arg=capitalized)client.add_result(template,"Template",arg=template)client.add_result(char_count,"Characters",arg=char_count)client.add_result(word_count,"Words",arg=word_count)client.add_result(line_count,"Lines",arg=line_count)# (use cache=True) to cache result for query instead of old style that below# if u work with static results (not dynamic; coin price etc.)# client.cache_response()if__name__=="__main__":WorkflowClient.run(main)# WorkflowClient.run(main, cache=True)🔰 How to Create Workflow🪪 LicenseCopyright 2023 Yunus Emre Ak ~ YEmreAk.com
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
|
alfred-api
|
Failed to fetch description. HTTP Status Code: 404
|
alfred-cli
|
AlfredAlfred is an extensible automation tool designed tostreamline repository operations. It allows you various commands as continuous integration, runner, build commands ...You'll craft advanced commands harnessingthe strengths of both worlds: shell and Python.Demointroductory videoQuick-startYou will generate commands to launch of the linter and unit tests process.$alfred--newpylintsrc/myapp$alfred--newpytesttests/unitalfredUsage: alfred [OPTIONS] COMMAND [ARGS]...
alfred is an extensible automation tool designed to streamline repository
operations.
Options:
-d, --debug display debug information like command runned and working
directory
-v, --version display the version of alfred
--new open a wizard to generate a new command
-c, --check check the command integrity
--completion display instructions to enable completion for your shell
--help Show this message and exit.
Commands:
lint run linter on codebase
tests run unit tests on codebaseLinksDocumentation :https://alfred-cli.readthedocs.io/en/latestPyPI Release :https://pypi.org/project/alfred-cliSource code:https://github.com/FabienArcellier/alfred-cliChat:https://discord.gg/nMn9YPRGSYRelatedalfredexists thanks to this 2 amazing open source projects.clickplumbumLicenseMIT LicenseCopyright (c) 2021-2023 Fabien ArcellierPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
|
alfredcmd
|
==========Alfred Cmd==========.. image:: https://img.shields.io/pypi/v/alfredcmd.svg:target: https://pypi.python.org/pypi/alfredcmd.. image:: https://img.shields.io/travis/GustavoKatel/alfredcmd.svg:target: https://travis-ci.org/GustavoKatel/alfredcmd.. image:: https://readthedocs.org/projects/alfredcmd/badge/?version=latest:target: https://alfredcmd.readthedocs.io/en/latest/?badge=latest:alt: Documentation StatusCreate portable custom commands and scripts.This is currently in beta, but usable.Usage------All the config are located in :code:`$USER/.alfred/alfred.toml`Config~~~~~~.. code-block:: toml[variables]mode="debug"[function.branch]exec="git rev-parse --abbrev-ref HEAD"[command.st]exec="git status"[command.cc]exec="git commit -a {@}"[command.push]exec="git push {@}"[command.b]exec="echo {branch()}"[command.pythonCall]exec="~/.alfred/myscript.py::myFunction"type="python"Run~~~.. code-block:: console$ alfred st$ al ccVariables~~~~~~~~~Variables are predefined values that can be injected in commands and functionsExample:.. code-block:: toml[variables]mode="debug"[command.print]exec="echo {mode}"Commands~~~~~~~~Predefined commands that will be executed by AlfredCommands are defined like this.. code-block:: toml[command.COMMAND_NAME]exec="EXECUTION_LINE"type="shell"format=trueecho=falsehelp="HELP INFO"Where:- **COMMAND_NAME** is the alias that Alfred will use to identify that command in the cli- **EXECUTION_LINE** is the code that will be called. Alfred accepts multiline entries, whichwill be wrapped in a script file and executed with the default shell executor.- **type** the type of the command. Alfred currently accepts `shell` and `python` command types- **format** marks if the instance should apply the formatter in the exec line or not.If false, the placeholders `{}` will not be interpreted- **echo** marks if the instance should print the command that will be executed before executing it- **help** a descriptive message that will be showed in `alfred @list`Functions~~~~~~~~~Functions can be created to enhance command execution during format time and are defined like this:.. code-block:: toml[function.FUNCTION_NAME]exec="EXECUTION_LINE"format=trueWhere:- **FUNCTION_NAME** is the alias that Alfred will use to identify that function in the formatter- **EXECUTION_LINE** is the code that will be called. Currently Alfred only accepts one-line shell commands in functions.- **format** marks if the instance should apply the formatter in the exec line or not.If false, the placeholders `{}` will not be interpretedBuilt-in Alfred commands~~~~~~~~~~~~~~~~~~~~~~~~- `al[fred] @help` Show help- `al[fred] @list` List all commands- `al[fred] @version` Show versionInstallation------------Stable release~~~~~~~~~~~~~~To install Alfred, run this command in your terminal:.. code-block:: console$ pip install alfredcmdThis is the preferred method to install Alfred, as it will always install the most recent stable release.If you don't have `pip`_ installed, this `Python installation guide`_ can guideyou through the process... _pip: https://pip.pypa.io.. _Python installation guide: http://docs.python-guide.org/en/latest/starting/installation/From sources~~~~~~~~~~~~~The sources for Alfred can be downloaded from the `Github repo`_.You can either clone the public repository:.. code-block:: console$ git clone git://github.com/GustavoKatel/alfredcmdOr download the `tarball`_:.. code-block:: console$ curl -OL https://github.com/GustavoKatel/alfredcmd/tarball/masterOnce you have a copy of the source, you can install it with:.. code-block:: console$ python setup.py install.. _Github repo: https://github.com/GustavoKatel/alfredcmd.. _tarball: https://github.com/GustavoKatel/alfredcmd/tarball/masterCredits-------This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template... _Cookiecutter: https://github.com/audreyr/cookiecutter.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage=======History=======0.1.0 (2018-03-21)------------------* First release on PyPI.
|
alfred-collection
|
No description available on PyPI.
|
alfred-docker-compose
|
No description available on PyPI.
|
alfred-genie
|
Genie for AlfredGitHub
licenseTwitter FollowUsing from AlfredInstallAlfred Genie.alfredworkflowin Alfred and use thegeniecommand to use any available function.Using from Command line$ pip install alfred-genieThen the following commands will be available$ alfred-genie
Usage: alfred-genie [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
base64-decode
base64-encode
commands # ignore this as this is only used from Alfred
format-json
minify-jsonContributingPull requests are welcome. For major changes, please open an issue first
to discuss what you would like to change.You’ll need a working version ofPython3to run these scripts.Create and use new virtual envpython3 -m venv venv
source venv/bin/activateInstall required dependencies$ pip install -r requirements.txtRun locally$ python local_main.py ...Creating Alfred WorkflowFor publishing it in workflow, we need to perform following additional
steps[ ] Open workflow file in Alfred[ ] Open workflow directory in Terminal[ ] Apply any changes from this directory to workflow directory[ ] Install dependencies in workflow directorypip install--target=.click[ ] Export workflow and publish to GithubPublishing Updates to PyPi$makepackageEnter the username and password for pypi.org repo when promptedLicenseMIT
|
alfred-installer
|
AlfredA script to install all your favourite applications and perform the most
common tasks automatically in Debian, Ubuntu and their derivative distros.Alfred can install the most common applications and packages for you, while you
take a nap or walk the dog. Just tell Alfred what you want him to do for you and
he will take care of it in no time. This is perfect for Linux beginners and lazy
users like me, specially for those times when you have just installed the system.Python script usageOpen a terminal, paste the line below and then press enter. You will have to type your password.wgethttps://raw.githubusercontent.com/derkomai/alfred/master/alfred.py&&python3alfred.pyBash script usage (now obsolete and discontinued)The graphical, beginner-friendly wayDownload Alfred inthis link: right click on the link, selectsave link asand click OK, ensuring that the file name is justalfred.shwithout any other extensions.Open your downloads folder. You should see a file namedalfred.sh.Right clickalfred.shfile, selectPropertiesand open the tab namedPermissionsin the dialog.Now, depending on your system, you should see something likeAllow executing file as a programor a table where you can giveExecutionpermissions for the file owner. Ensure this is activated and click OK.If you are using Ubuntu or at least the Nautilus file browser, ensure thatEdit > Preferences > Behaviour > Executable text files > Run executable text files when they are openedoption is activated.Openalfred.shby clicking on it.You will be asked for your password. Type it and click OK.Select the tasks you want to perform and click OK. Wait for them to complete. That's it.The easy command line wayOpen a terminal, paste the line below and then press enter. You will have to type your password.sudoapt-yinstallgit&&gitclonehttps://github.com/derkomai/alfred&&sudo./alfred/alfred.shDonationIf you find Alfred useful and it has saved you some time or trouble, you can support it by making a small donation through Paypal or cryptocurrencies.Paypal:Bitcoin address:3F888TKJvWvkRmGVDyeCFAoBbFnLoYsrYPBitcoin Cash address:1LfY7Mjh3z11ek1A2exKm3JdXw8VheNHdUEthereum/ERC20 address:0x0Ddc94917100387909cb6141c2e7e453bd31D3f7Litecoin address:MVXhiKnsMTiZYWfzdQ9BdJT8wDpSNrBme1XRP address:rFeeJw6rsoeSmu9BAL12gHSaMwtvFQgifStellar address:GBON6KJYAQMRYTMEOSZQI22MOGZK7FWKDLAIWXRLZSG2XEZ6RG73PUGTNeo address:AGehUh61V2mjmhwsk3sGus5hEVYQZxexZa
|
alfred-jira
|
# alfred-jira #
|
alfred_npm_helper
|
UNKNOWN
|
alfredo
|
Alfredo - Born to serve!************************Alfredo is a simple, extensible gtalk bot. It's capable of doing any kind of tasks, implemented as separated commands.Here is a typical session: ::you: inv some textalfredo: called inv some text -> txet emosImplementing a new command**************************Commands are implemented as Plugins (more at plugnplay <https://github.com/daltonmatos/plugnplay>). Just create a new class:from alfredo import Plugin, ICommandclass SomeCommand(Plugin):implements = [ICommand]def help(self):return ('short help', 'long help')def name(self):return 'mycommand'def match_name(self, command):return 'mycommand' == commanddef run(self, user, *args)# process some logicreturn resultIn this case we create a new command named 'mycommand'. If we send this message to alfredo:mycommand p1 p2 p3the ``run()`` method would be called like this: ``run('[email protected]', 'p1', 'p2', 'p3')``. This method must return a string, that will be sent back to the original user.How to use it*************To start talking to a running instance of alfredo just add ``[email protected]`` to your gtalk conacts list and you are done!Or try out your own commands from the example code.Dependencies************Alfredo's core components only needs:* plugnplay - https://github.com/daltonmatos/plugnplay* xmpppy - http://xmpppy.sourceforge.net/The included commands needs:* BeautifulSoup - http://www.crummy.com/software/BeautifulSoup/* requests - https://github.com/kennethreitz/requests* simplejson - http://code.google.com/p/simplejson/You can even run the requirements file to get up your environment::pip install -r requirements.txt--Dalton [email protected]
|
alfredo-distributions
|
No description available on PyPI.
|
alfredo-py
|
Idiomatic way for Python developers to integrate with Alfredo services.
|
alfredo-python
|
Idiomatic way for Python developers to integrate with Alfredo services.Contents1Installation2Command Line Interface Usage3Python Software Development Kit4Development1InstallationOn most systems, you can usepip(recommended):# Make sure we have an up-to-date version of pip and setuptools:pipinstall--upgradepipsetuptoolspipinstallalfredo-pythonBoth Python 2 and 3 are supported.2Command Line Interface UsageThe main command to interact with Alfredo stack isalfredo.Input is expected to be in YAML format, and also the output is serialized in that way.You can setRUOTE_ROOTand/orVIRGO_ROOTenv vars to point the CLI and the SDK to your desired installation of the Alfredo stack.After that, you can executealfredoto get the usage help.You can also executealfredo-helpto get an updated list of the options you have, with examples.3Python Software Development KitThe main module you need to import to interact with the Alfredo stack isalfredo.The main functions of the module are theruoteandvirgoones, to get the client object to further interact with respective services.You can usealfredo.ruote()to get annonymous access to the open endpoints in Ruote. The same applies forvirgo.For instance, you can use the annonymous access to get a token given an email and a password.Please feel free of using the Python console to get used to the SDK prior to using it in real Python code.>>>alfredo.ruote().sso.token_by_email.create(email='[email protected]',password='*******')400-BadRequestnon_field_errors:-Unabletologinwithprovidedcredentials.>>>alfredo.ruote().sso.token_by_email.create(email='[email protected]',password='********')200-OKtoken:b1cff2aab075744ddda6b00805617f561e940107You can usealfredo.ruote(token='b1cff2aab075744ddda6b00805617f561e940107')to get an authenticated client against Ruote.>>>alfredo.ruote(token='b1bff2aab075744ddda6b00805617f561e940107')200-OKAWSclusters:http://api.teamjamon.com/AWSclusters/apps:http://api.teamjamon.com/apps/clusters:http://api.teamjamon.com/clusters/datasets:http://api.teamjamon.com/datasets/files:http://api.teamjamon.com/files/jobs:http://api.teamjamon.com/jobs/queues:http://api.teamjamon.com/queues/users:http://api.teamjamon.com/users/vdcs:http://api.teamjamon.com/vdcs/Most of the functions mimic the url structure of the http API, and receives named parameters as input.Please refer to the Alfredo API documentation for further details.4DevelopmentYou can create your fork of the repo before making any change.Never forget to install the requirements first if you are using an isolated virtualenv:pip install-rrequirements.txtAnd to include the test requirements if you are planning to pass the tests locallypip install-rrequirements-test.txtYou can run the tests usingnosetests--with-coverage--cover-package=alfredo--stopCurrently, the main branch isdevelopbecause the code is still in beta. You can make PRs againstdevelop.
|
alfred-osint
|
# alfred-osint
Alfred is a advanced OSINT information gathering tool.
|
alfred-py
|
alfred-py: Born For Deeplearningalfred-pycan be called from terminal viaalfredas a tool for deep-learning usage. It also provides massive utilities to boost your daily efficiency APIs, for instance, if you want draw a box with score and label, if you want logging in your python applications, if you want convert your model to TRT engine, justimport alfred, you can get whatever you want. More usage you can read instructions below.Functions SummarySince many new users of alfred maybe not very familiar with it, conclude functions here briefly, more details see my updates:Visualization, draw boxes, masks, keypoints is very simple, even3Dboxes on point cloud supported;Command line tools, such as view your annotation data in any format (yolo, voc, coco any one);Deploy, you can using alfred deploy your tensorrt models;DL common utils, such as torch.device() etc;Renders, render your 3D models.A pic visualized from alfred:InstallTo installalfred, it is very simple:requirements:lxml [optional]
pycocotools [optional]
opencv-python [optional]then:sudopip3installalfred-pyalfred is both a lib and a tool, you can import it's APIs, or you can directly call it inside your terminal.A glance of alfred, after you installed above package, you will havealfred:datamodule:# show VOC annotationsalfreddatavocview-iJPEGImages/-lAnnotations/# show coco anntationsalfreddatacocoview-jannotations/instance_2017.json-iimages/# show yolo annotationsalfreddatayoloview-iimages-llabels# show detection label with txt formatalfreddatatxtview-iimages/-ltxts/# show more of dataalfreddata-h# eval toolsalfreddataevalvoc-hcabmodule:# count files number of a typealfredcabcount-d./images-tjpg# split a txt file into train and testalfredcabsplit-fall.txt-r0.9,0.1-ntrain,valvisionmodule;# extract video to imagesalfredvisionextract-vvideo.mp4# combine images to videoalfredvision2video-dimages/-hto see more:usage:alfred[-h][--version]{vision,text,scrap,cab,data}...
positionalarguments:{vision,text,scrap,cab,data}visionvisionrelatedcommands.texttextrelatedcommands.scrapscraprelatedcommands.cabcabinetrelatedcommands.datadatarelatedcommands.
optionalarguments:-h,--helpshowthishelpmessageandexit--version,-vshowversioninfo.inside every child module, you can call it's-has well:alfred text -h.if you are on windows, you can install pycocotools via:pip install "git+https://github.com/philferriere/cocoapi.git#egg=pycocotools&subdirectory=PythonAPI", we have made pycocotools as an dependencies since we need pycoco API.Updatesalfred-pyhas been updating for 3 years, and it will keep going!2050-xxx:to be continue;2023.04.28: Update the 3d keypoints visualizer, now you can visualize Human3DM kpts in realtime:For detailes reference toexamples/demo_o3d_server.py.
The result is generated from MotionBert.2022.01.18: Now alfred support a Mesh3D visualizer server based on Open3D:fromalfred.vis.mesh3d.o3dsocketimportVisOpen3DSocketdefmain():server=VisOpen3DSocket()whileTrue:server.update()if__name__=="__main__":main()Then, you just need setup a client, send keypoints3d to server, and it will automatically visualized out.
Here is what it looks like:2021.12.22: Now alfred supported keypoints visualization, almost all datasets supported in mmpose were also supported by alfred:fromalfred.vis.image.poseimportvis_pose_result# preds are poses, which is (Bs, 17, 3) for coco bodyvis_pose_result(ori_image,preds,radius=5,thickness=2,show=True)2021.12.05: You can usingalfred.deploy.tensorrtfor tensorrt inference now:fromalfred.deploy.tensorrt.commonimportdo_inference_v2,allocate_buffers_v2,build_engine_onnx_v3defengine_infer(engine,context,inputs,outputs,bindings,stream,test_image):# image_input, img_raw, _ = preprocess_np(test_image)image_input,img_raw,_=preprocess_img((test_image))print('input shape: ',image_input.shape)inputs[0].host=image_input.astype(np.float32).ravel()start=time.time()dets,labels,masks=do_inference_v2(context,bindings=bindings,inputs=inputs,outputs=outputs,stream=stream,input_tensor=image_input)img_f='demo/demo.jpg'withbuild_engine_onnx_v3(onnx_file_path=onnx_f)asengine:inputs,outputs,bindings,stream=allocate_buffers_v2(engine)# Contexts are used to perform inference.withengine.create_execution_context()ascontext:print(engine.get_binding_shape(0))print(engine.get_binding_shape(1))print(engine.get_binding_shape(2))INPUT_SHAPE=engine.get_binding_shape(0)[-2:]print(context.get_binding_shape(0))print(context.get_binding_shape(1))dets,labels,masks,img_raw=engine_infer(engine,context,inputs,outputs,bindings,stream,img_f)2021.11.13: Now I add Siren SDK support!from functools import wraps
from alfred.siren.handler import SirenClient
from alfred.siren.models import ChatMessage, InvitationMessage
siren = SirenClient('daybreak_account', 'password')
@siren.on_received_invitation
def on_received_invitation(msg: InvitationMessage):
print('received invitation: ', msg.invitation)
# directly agree this invitation for robots
@siren.on_received_chat_message
def on_received_chat_msg(msg: ChatMessage):
print('got new msg: ', msg.text)
siren.publish_txt_msg('I got your message O(∩_∩)O哈哈~', msg.roomId)
if __name__ == '__main__':
siren.loop()Using this, you can easily setup a Chatbot. By using Siren client.2021.06.24: Add a useful commandline tool,change your pypi source easily!!:alfred cab changesourceAnd then your pypi will using aliyun by default!2021.05.07: Upgrade Open3D instructions:
Open3D>0.9.0 no longer compatible with previous alfred-py. Please upgrade Open3D, you can build Open3D from source:git clone --recursive https://github.com/intel-isl/Open3D.git
cd Open3D && mkdir build && cd build
sudo apt install libc++abi-8-dev
sudo apt install libc++-8-dev
cmake .. -DPYTHON_EXECUTABLE=/usr/bin/python3Ubuntu 16.04 blow I tried all faild to build from source. So, please using open3d==0.9.0 for alfred-py.2021.04.01: A unified evaluator had added. As all we know, for many users, writting Evaluation might coupled deeply with your project. But with Alfred's help, you can do evaluation in any project by simply writting 8 lines of codes, for example, if your dataset format is Yolo, then do this:definfer_func(img_f):image=cv2.imread(img_f)results=config_dict['model'].predict_for_single_image(image,aug_pipeline=simple_widerface_val_pipeline,classification_threshold=0.89,nms_threshold=0.6,class_agnostic=True)iflen(results)>0:results=np.array(results)[:,[2,3,4,5,0,1]]# xywh to xyxyresults[:,2]+=results[:,0]results[:,3]+=results[:,1]returnresultsif__name__=='__main__':conf_thr=0.4iou_thr=0.5imgs_root='data/hand/images'labels_root='data/hand/labels'yolo_parser=YoloEvaluator(imgs_root=imgs_root,labels_root=labels_root,infer_func=infer_func)yolo_parser.eval_precisely()Then you can get your evaluation results automatically. All recall, precision, mAP will printed out. More dataset format are on-going.2021.03.10:
New addedImageSourceIterclass, when you want write a demo of your project which need to handle any input such as image file / folder / video file etc. You can usingImageSourceIter:fromalfred.utils.file_ioimportImageSourceIter# data_f can be image_file or image_folder or videoiter=ImageSourceIter(ops.test_path)whileTrue:itm=next(iter)ifisinstance(itm,str):itm=cv2.imread(itm)# cv2.imshow('raw', itm)res=detect_for_pose(itm,det_model)cv2.imshow('res',itm)ifiter.video_mode:cv2.waitKey(1)else:cv2.waitKey(0)And then you can avoid write anything else of deal with file glob or reading video in cv.note that itm return can be a cv array or a file path.2021.01.25:alfrednow support self-defined visualization on coco format annotation (not using pycoco tools):If your dataset in coco format but visualize wrongly pls fire a issue to me, thank u!2020.09.27:
Now, yolo and VOC can convert to each other, so that using Alfred you can:convert yolo2voc;convert voc2yolo;convert voc2coco;convert coco2voc;By this, you can convert any labeling format of each other.2020.09.08: After a long time past,alfredgot some updates:
We providingcoco2yoloability inside it. Users can run this command to convert your data to yolo format:alfred data coco2yolo -i images/ -j annotations/val_split_2020.jsonOnly should provided is your image root path and your json file. And then all result will generated intoyolofolder under images or in images parent dir.After that (you got your yolo folder), then you can visualize the conversion result to see if it correct or not:alfred data yolovview -i images/ -l labels/2020.07.27: After a long time past,alfredfinally get some updates:Now, you can using alfred draw Chinese charactors on image without xxxx undefined encodes.fromalfred.utils.cv_wrapperimportput_cn_txt_on_imgimg=put_cn_txt_on_img(img,spt[-1],[points[0][0],points[0][1]-25],1.0,(255,255,255))Also, you now canmerge2 VOC datasets! This is helpful when you have 2 dataset and you want merge them into a single one.alfred data mergevoc -hYou can see more promotes.2020.03.08:Several new files added inalfred:alfred.utils.file_io: Provide file io utils for common purpose
alfred.dl.torch.env: Provide seed or env setup in pytorch (same API as detectron2)
alfred.dl.torch.distribute: utils used for distribute training when using pytorch2020.03.04: We have added someevaluation toolto calculate mAP for object detection model performance evaluation, it's useful and can visualize result:this usage is also quite simple:alfred data evalvoc -g ground-truth -d detection-results -im imageswhere-gis your ground truth dir (contains xmls or txts),-dis your detection result files dir,-imis your images fodler. You only need save all your detected results into txts, one image one txt, and format like this:bottle0.14981801295500bus0.126013613404316horse0.12526430117500307pottedplant0.1458521278292118tvmonitor0.070565388895001962020.02.27: We just update alicensemodule inside alfred, say you want apply license to your project or update license, simple:alfredcablicense-o'MANA'-n'YoloV3'-u'manaai.cn'you can found more detail usage withalfred cab license -h2020-02-11: open3d has changed their API. we have updated new open3d inside alfred, you can simply using latest open3d and runpython3 examples/draw_3d_pointcloud.pyyou will see this:2020-02-10:alfrednow support windows (experimental);2020-02-01:武汉加油!alfredfix windows pip install problem related to encoding 'gbk';2020-01-14: Added cabinet module, also add some utils under data module;2019-07-18: 1000 classes imagenet labelmap added. Call it from:fromalfred.vis.image.get_dataset_label_mapimportimagenet_labelmap# also, coco, voc, cityscapes labelmap were all added infromalfred.vis.image.get_dataset_label_mapimportcoco_labelmapfromalfred.vis.image.get_dataset_label_mapimportvoc_labelmapfromalfred.vis.image.get_dataset_label_mapimportcityscapes_labelmap2019-07-13: We add a VOC check module in command line usage, you can now visualize your VOC format detection data like this:alfred data voc_view -i ./images -l labels/2019-05-17: We addingopen3das a lib to visual 3d point cloud in python. Now you can do some simple preparation and visual 3d box right on lidar points and show like opencv!!You can achieve this by only usingalfred-pyandopen3d!example code can be seen underexamples/draw_3d_pointcloud.py.code updated with latest open3d API!.2019-05-10: A minor updates butreally usefulwhich we calledmute_tf, do you want to disable tensorflow ignoring log? simply do this!!fromalfred.dl.tf.commonimportmute_tfmute_tf()importtensorflowastfThen, the logging message were gone....2019-05-07: Adding some protos, now you can parsing tensorflow coco labelmap by using alfred:fromalfred.protos.labelmap_pb2importLabelMapfromgoogle.protobufimporttext_formatwithopen('coco.prototxt','r')asf:lm=LabelMap()lm=text_format.Merge(str(f.read()),lm)names_list=[i.display_nameforiinlm.item]print(names_list)2019-04-25: Adding KITTI fusion, now you can get projection from 3D label to image like this:
we will also add more fusion utils such as fornuScenedataset.We providing kitti fusion kitti for convertcamera link 3d pointsto image pixel, and convertlidar link 3d pointsto image pixel. Roughly going through of APIs like this:# convert lidar prediction to image pixelfromalfred.fusion.kitti_fusionimportLidarCamCalibData,\load_pc_from_file,lidar_pts_to_cam0_frame,lidar_pt_to_cam0_framefromalfred.fusion.commonimportdraw_3d_box,compute_3d_box_lidar_coords# consit of prediction of lidar# which is x,y,z,h,w,l,rotation_yres=[[4.481686,5.147319,-1.0229858,1.5728549,3.646751,1.5121397,1.5486346],[-2.5172017,5.0262384,-1.0679419,1.6241353,4.0445814,1.4938312,1.620804],[1.1783253,-2.9209857,-0.9852259,1.5852798,3.7360613,1.4671413,1.5811548]]forpinres:xyz=np.array([p[:3]])c2d=lidar_pt_to_cam0_frame(xyz,frame_calib)ifc2disnotNone:cv2.circle(img,(int(c2d[0]),int(c2d[1])),3,(0,255,255),-1)hwl=np.array([p[3:6]])r_y=[p[6]]pts3d=compute_3d_box_lidar_coords(xyz,hwl,angles=r_y,origin=(0.5,0.5,0.5),axis=2)pts2d=[]forptinpts3d[0]:coords=lidar_pt_to_cam0_frame(pt,frame_calib)ifcoordsisnotNone:pts2d.append(coords[:2])pts2d=np.array(pts2d)draw_3d_box(pts2d,img)And you can see something like this:note:compute_3d_box_lidar_coordsfor lidar prediction,compute_3d_box_cam_coordsfor KITTI label,cause KITTI label is based on camera coordinates!.since many users ask me how to reproduces this result, you can checkout demo file underexamples/draw_3d_box.py;2019-01-25: We just adding network visualization tool forpytorchnow!! How does it look? Simply print outevery layer network with output shape, I believe this is really helpful for people to visualize their models!➜ mask_yolo3 git:(master) ✗ python3 tests.py
----------------------------------------------------------------
Layer (type) Output Shape Param #
================================================================
Conv2d-1 [-1, 64, 224, 224] 1,792
ReLU-2 [-1, 64, 224, 224] 0
.........
Linear-35 [-1, 4096] 16,781,312
ReLU-36 [-1, 4096] 0
Dropout-37 [-1, 4096] 0
Linear-38 [-1, 1000] 4,097,000
================================================================
Total params: 138,357,544
Trainable params: 138,357,544
Non-trainable params: 0
----------------------------------------------------------------
Input size (MB): 0.19
Forward/backward pass size (MB): 218.59
Params size (MB): 527.79
Estimated Total Size (MB): 746.57
----------------------------------------------------------------Ok, that is all. what you simply need to do is:fromalfred.dl.torch.model_summaryimportsummaryfromalfred.dl.torch.commonimportdevicefromtorchvision.modelsimportvgg16vgg=vgg16(pretrained=True)vgg.to(device)summary(vgg,input_size=[224,224])Support you input (224, 224) image, you will got this output, or you can change any other size to see how output changes. (currently not support for 1 channel image)2018-12-7: Now, we adding a extensible class for quickly write an image detection or segmentation demo.If you want write a demo whichdo inference on an image or an video or right from webcam, now you can do this in standared alfred way:classENetDemo(ImageInferEngine):def__init__(self,f,model_path):super(ENetDemo,self).__init__(f=f)self.target_size=(512,1024)self.model_path=model_pathself.num_classes=20self.image_transform=transforms.Compose([transforms.Resize(self.target_size),transforms.ToTensor()])self._init_model()def_init_model(self):self.model=ENet(self.num_classes).to(device)checkpoint=torch.load(self.model_path)self.model.load_state_dict(checkpoint['state_dict'])print('Model loaded!')defsolve_a_image(self,img):images=Variable(self.image_transform(Image.fromarray(img)).to(device).unsqueeze(0))predictions=self.model(images)_,predictions=torch.max(predictions.data,1)prediction=predictions.cpu().numpy()[0]-1returnpredictiondefvis_result(self,img,net_out):mask_color=np.asarray(label_to_color_image(net_out,'cityscapes'),dtype=np.uint8)frame=cv2.resize(img,(self.target_size[1],self.target_size[0]))# mask_color = cv2.resize(mask_color, (frame.shape[1], frame.shape[0]))res=cv2.addWeighted(frame,0.5,mask_color,0.7,1)returnresif__name__=='__main__':v_f=''enet_seg=ENetDemo(f=v_f,model_path='save/ENet_cityscapes_mine.pth')enet_seg.run()After that, you can directly inference from video. This usage can be found at git repo:The repo usingalfred:http://github.com/jinfagang/pt_enet2018-11-6: I am so glad to announce that alfred 2.0 released!😄⛽️👏👏 Let's have a quick look what have been updated:# 2 new modules, fusion and vis
from alred.fusion import fusion_utilsFor the modulefusioncontains many useful sensor fusion helper functions you may use, such as project lidar point cloud onto image.2018-08-01: Fix the video combined function not work well with sequence. Add a order algorithm to ensure video sequence right.
also add some draw bbox functions into package.can be called like this:2018-03-16: Slightly updatealfred, now we can using this tool to combine a video sequence back original video!
Simply do:# alfred binary exectuable programalfredvision2video-d./video_imagesCapablealfredis both a library and a command line tool. It can do those things:# extract images from video
alfred vision extract -v video.mp4
# combine image sequences into a video
alfred vision 2video -d /path/to/images
# get faces from images
alfred vision getface -d /path/contains/images/Just try it out!!CopyrightAlfredbuild byLucas Jinwith ❤️, welcome star and send PR. If you got any question, you can ask me via wechat:jintianiloveu, this code released under GPL-3 license.
|
alfred-pyflow
|
alfred-pyflow
|
alfred-rfc
|
No description available on PyPI.
|
alfreds
|
Alfreds CLI ToolAlfreds (www.alfreds.ai) is the LLM platform for data teams. It enables data teams to create LLM agents that can be used
in different stages of data workflows.
Alfreds command-line tool allows data teams to install alfreds platform on their local machines and perform various tasks.PrerequisitesPython 3.6 or higherDockerLinux or macOSInstallationTo install alfreds, run the following command:pip install alfredsUsageAlfreds can perform the following tasks:Initialize alfreds:alfreds init --agent_path {agent_absolute_path} --working_dir {working_dir_absolute_path} --seed_dir {seeds_absolute_path(optional)}This command initializes alfreds with the specified agent, working directory, and seeds (optional).Example:alfreds init --agent_path /Users/subu/alfreds/agent --working_dir /Users/subu/alfreds/working_dir --seed_dir /Users/subu/alfreds/seedsUpdate the agent:alfreds update_agent {agent_absolute_path}This command updates the agent with the specified absolute path.Example:alfreds update_agent /Users/subu/alfreds/agentUpdate the working directory:alfreds update_working_dir {working_dir_absolute_path}This command updates the working directory with the specified absolute path.Seed the application:alfreds seed {seed dir/csv file absolute path}This command seeds the application with the specified seed directory or CSV file.Stop alfreds:alfreds stopThis command stops the alfreds application.Start alfreds:alfreds startThis command starts the alfreds application.Refresh alfreds:alfreds refreshThis command refreshes the alfreds application.Alfreds Help:alfreds --helpThis command displays the help menu for alfreds.Please note that you need to provide the absolute paths for the agent, working directory, and seeds when using the respective commands.If you have any questions or need further assistance, please refer to the alfreds documentation or contact our support team.
|
alfred-tools
|
Tools to automate projects in DjangoFramework
|
alfred-workflow-flyer
|
No description available on PyPI.
|
alfred-workflow-packager
|
Alfred Workflow PackagerCopyright 2016-2023 Caleb EvansReleased under the MIT licenseAlfred Workflow Packager is a command-line utility which makes the process of
packaging and exporting anAlfredworkflow
incredibly quick and easy. The utility supports Alfred 3 and up, on projects running Python 3 (Python 2 is no longer supported).SetupYou can install the utility viapip3, either globally or within a virtualenv:pip3installalfred-workflow-packagerUsage1. Create configuration fileOnce you've installed AWP, you must configure it for every project where you
wish to use it. To do so, create apackager.jsonfile in the root directory of
your project; this file configures AWP for that particular project.Example{"export_files":["Fruit.alfredworkflow"],"bundle_id":"com.yourname.fruit","readme":"README.txt","resources":["icon.png","src/*.py","src/data/*.json"]}Required settingsexport_filesThe paths of the exported workflows (relative to your project directory).bundle_idThe unique bundle ID of your workflow. You must have one set in the installed
workflow, or AWP will not be able to find your workflow when packaging.resourcesA list of zero or more files/folder patterns representing files or folders to
copy from your project to the installed workflow. The directory structures and
filenames are preserved when copying.Local project:- icon.png
- fruit
- apple.py
- banana.applescript
- orange.phpInstalled workflow (before running utility):- info.plist
- special_file.jsonpackager.json resources:["icon.png","fruit/*.json"]Installed workflow (after running utility):- info.plist
- icon.png
- special_file.json
- fruit
- apple.py
- banana.applescript
- orange.phpNote that files and folders already present in the installed workflow arenottouched if they are not in theresourceslist.Optional settingsreadmeThe path to the README file to use for this workflow; theAbout this Workflowfield in your workflow is populated with the contents of this file.2. Run utilityYou can run the utility via theawpcommand:awpRunningawpwill copy those project resources listed inpackager.jsonto
the installed workflow (in their respective locations), but only if their
contents or permissions have changed. If you ever need to ignore this equality
check, you can force the copying of all files/directories by passing--force/-f.awp--forceawp-fSetting the workflow versionPassing the--versionoption (also-v) toawpallows you to set the
version of the installed workflow directly. I highly recommend usingsemantic
versioningto version your workflow releases.awp--version1.2.0awp-v1.2.0Exporting the workflowWhen you're pleased with your work and you're ready to publish a new release,
you can export the installed workflow to your project directory by passing the--exportflag (or-e) toawp.awp--exportawp-eNote that you can set the version and export the workflow simultaneously:awp-v1.2.0-eNew in AWP v1.1.0:If you wish to temporarily export the workflow to a
different file (different fromexport_filesinpackager.json), you can
pass one or more optional paths to--export:awp-v1.3.0-beta.1-e~/Desktop/fruit-beta-alfred-5.alfredworkflow4. Configure workflow objectsThe last important step is to update any script objects in your workflow (i.e.objects of typeScript Filter,Run Script,etc.) to reference the
files copied to the installed workflow directory.You should set theLanguageto/bin/bashand use the appropriate shell
command to call your script. Use"$@"if your input is passed as argv, or"{query}"if your input is passed as {query}.Python/usr/bin/python3-mfruit.apple"$@"/usr/bin/python3-mfruit.apple"{query}"AppleScript/usr/bin/osascriptfruit/banana.applescript"$@"/usr/bin/osascriptfruit/banana.applescript"{query}"PHP/usr/bin/phpfruit/orange.php"$@"/usr/bin/phpfruit/orange.php"{query}"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.