Saravanan666/pypi-org huggingface dataset:
Package: decode
de:codeDESHIMA code for data analysisInstallationpipinstalldecode==2.11.0Quick lookde:code ships with a quick look commanddecode-qlook, which will be available from the CUI after installation. It has several subcommands for each observation type. For example, to quick-look at a raster observation:$decode-qlookraster/path/to/dems.zarr.zipwheredems.zarr.zipis the merged observation data (DESHIMA measurement set: DEMS) to be checked. By default, it will output an image of the result plots by a simple analysis (e.g. continuum map, etc). You can also get the result data themselves by changing the output format:$decode-qlookraster/path/to/dems.zarr.zip--formatzarr.zipSee the command help for all available options:# list of the subcommands and descriptions$decode-qlook--help# list of the available command options$decode-qlookraster--helpIf you are not sure about the observation type, theautosubcommand may be useful to automatically select the appropriate command to use:$decode-qlookauto/path/to/dems.zarr.zipFinally, all subcommands are available as functions in theqlooksubmodule. For example, therastercommand corresponds todecode.qlook.rasterand the following Python code is equivalent to the CUI:importdecodedecode.qlook.raster("/path/to/dems.zarr.zip")Seethe qlook module documentationfor more information.
Package: decode-datastore-client
decode-datastore-clientThis library contains a minimal client library developed as part of the DECODE
project in order to provide a Python client for the encrypted datastore
component.The purpose of this library is to enable a Python based client application to
easily read from and write to the datastore.The datastore API is implemented using a simple RPC framework calledTwirp. This framework uses protocol
buffers as a transport layer, and provides a suite of tools for generating
server stubs as well as client bindings in a number of programming languages
and can be thought of as being akin to a simpler version ofGRPC.DocumentationDocumentation for this library has been published to:https://decode-datastore-client.readthedocs.io/en/latest/Please have a look there for some more detailed installation instructions and
usage examples.
Package: decode_image
Simple Decode Encode Image=================================Simple Command line and module for Decode/Encode Image FileUsage=========<pre>usage: decode_image.py [-h] [-m IMAGE] [-o IMAGE_OUT] [-s STRING] [-c] [-f FILENAME] {decode,encode} ...optional arguments:-h, --help            show this help message and exit-m IMAGE, --image IMAGEImage path-o IMAGE_OUT, --image-out IMAGE_OUTSave Image path-s STRING, --string STRINGString Image have being encode-c, --copy            Copy string out/result to clipboard-f FILENAME, --file FILENAMEStore string out/result to fileTYPE:{decode,encode}decode              Decode Image File FROM stringencode              Encode Image File TO string        encode              Encode Image File TO string</pre>Author==============licface <licface@yahoo.com>
Package: decode-mcd
Multiobjective-Counterfactuals-for-DesignMCD generates counterfactuals that meet multiple, customizable objectives in both the feature and performance spaces.About The ProjectMultiobjective Counterfactuals for Design (MCD) is a framework primarily intended for the generation of design
alternatives that meet user-specified
performance criteria while remaining within a certain region of the design space. To use MCD, you need a dataset of
designs that are reasonably representative of the desired region of the design space, including performance metrics,
as well as a model capable of predicting the performance metrics of a given design. MCD is model agnostic - this means
that the model need not be a differentiable machine learning model, or,
in fact, a machine learning model in the first place. MCD also offers high flexibility in terms of the number and 'type'
of performance targets that can be specified.
Performance targets can be any combination of:'Continuous Targets': (e.g. I want suggested bike designs to weigh between 2 and 4 kilograms)'Classification Targets': (e.g. I want suggested bike designs to be classified as dirt bikes)'Probability Targets': (e.g. I want each suggested design to have a higher probability of
belonging to classes A or B than of
belonging to C or D)Built WithQuick-Start GuideInstallationInstall MCD with:pip install decode-mcdRun:importrandomfrompymoo.core.variableimportRealimportnumpyasnpfromdecode_mcdimportDesignTargets,DataPackage,MultiObjectiveProblem,CounterfactualsGenerator,ContinuousTargetx=np.random.random(100)x=x.reshape(100,1)y=x*100defpredict(_x):return_x*100+random.random()data_package=DataPackage(features_dataset=x,predictions_dataset=y,query_x=x[0].reshape(1,1),design_targets=DesignTargets([ContinuousTarget(label=0,lower_bound=25,upper_bound=75)]),datatypes=[Real(bounds=(0,1))])problem=MultiObjectiveProblem(data_package=data_package,prediction_function=lambdadesign:predict(design),constraint_functions=[])generator=CounterfactualsGenerator(problem=problem,pop_size=10,initialize_from_dataset=False)generator.generate(n_generations=10)counterfactuals=generator.sample_with_dtai(num_samples=10,gower_weight=1,avg_gower_weight=1,cfc_weight=1,diversity_weight=50)print(counterfactuals)RoadmapWe are currently working on support for gradient-based optimizationSee theopen issuesfor a full
list of proposed features (and
known issues).ContributingContributions are what make the open source community such an amazing place to learn, inspire, and create. Any
contributions you make aregreatly appreciated.If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also
simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!Fork the ProjectCreate your Feature Branch (git checkout -b feature/AmazingFeature)Commit your Changes (git commit -m 'Add some AmazingFeature')Push to the Branch (git push origin feature/AmazingFeature)Open a Pull RequestLicenseDistributed under the MIT License. SeeLICENSEfor more information.
Package: decoder
DecoderAutomating the Manual :)A simple script to try and decode a string in various encoding mechanisms regardless of it's (original) type.The one-liner doesn't make much sense right? Don't worry, I gotcha!Let's say you've a string(you obtained from somewhere, maybe a boot2root machine, ctf, etc.), you know it's encoded(isn't a hash and is not encrypted)but just can't figure out the encoding mechanism used? No worries, this script will try and decode it in most used encoding mechanisms (i.e. base64, rot47, atbash, etc.)Once the results come back, make sure to go through each and every line! That's all manual :3The script for now only supports:Base16Base32Base64Base85AtbashBaconianCaesarMorseRot13Rot47Tested On (OS & Python version)Ubuntu 20.04 LTS -- Python 3.8.5Arch Linux -- Python 3.9.2Downloading & Installationpip3installdecoderORgitclonehttps://github.com/Anon-Exploiter/decoder/cddecoder/python3setup.pybuildpython3setup.pyinstallUsageDecoding a string from directly from argument:decoder-s'uryyb'Decoding a string from a file:decoder-frot47-encoded.txtTodosAdd ColorsUtilize internal libraries to add all the decoding (rather than custom written code)Filing Bugs/ContributionFeel free to file a issue or create a PR for that issue if you come across any.ScreenshotsContributors@thehackersbrain-#2- Coloring output and refactoring whole code base!CreditsBig thanks toautodecoder(was a lot of help while writing this)Thanks to@thehackersbrain'sBloggermachine which made me write thisWell this is shit work, any other tools which have the same functionality and actually work? Yes!https://github.com/oreosES/autodecoderhttps://github.com/Ciphey/Ciphey
Package: decoder.py
"decoder.py" is a cross-platform module for decoding compressed audio files.It uses external decoders by turning their stdout into a file-like object which is completely compatible with the Wave_readclass from wave.py module.With it you can decode the following file formats:MPEG Layers 1, 2, and 3 ( *.mp1, *.mp2, *.mp3 ),MPEG-4 HE-AAC ( *.mp4, *.m4a, *.m4b, *.aac ),OGG Vorbis ( *.ogg ),Free Lossless Audio Codec ( *.flac ),OGG FLAC ( *.oga ),Windows Media Audio ( *.wma )In combination with PyAudio, or some similar module/library, you can use "decoder.py" to play compressed audio files.For full documentation consult the source code.
Package: decoder-ring
Decoder_Ringpip install decoder-ringfrom decoder_ring import ContrastiveSearchConceptThe fluency and usefulness of text generation models depends on the decoder used to select tokens from probabilities and build the text output.Two examples: greedy decoding always selects the most probable token; random sampling considers all possible tokens with their given probability.The goal of decoder_ring is a common API with type hints, helpful error messages and logs, parameter restrictions, encouragement of random seeds, etc. to make text decoding clear and reproducible. In the future this should support many more decoder types.DocumentationI would like to expand on the documentation in all of the decoder options, links to relevant papers etc., to make this library and the overall decoder concept accessible to new users.Supported methodsContrastiveSearch (params: random_seed, penalty_alpha, top_k)GreedyDecoderRandomSampling (params: random_seed)TypicalDecoder (params: random_seed, typical_p)Writer Examples (text input and output)fromdecoderimportBasicWriter,RandomSamplingbasic=BasicWriter('gpt2',RandomSampling)writer_output=basic.write_text(prompt="Hello, my name is",max_length=20,early_stopping=True)Decoder Examples (with customization)Start with a HuggingFace Transformers / PyTorch model and tokenized text:model=AutoModelForCausalLM.from_pretrained("gpt2")tokenizer=AutoTokenizer.from_pretrained("gpt2")content=tokenizer.encode("Hello, my name is",return_tensors="pt")Example with Transformers' default greedy decoder:decoder1=GreedyDecoder(model)greedy_output=decoder1.generate_text(prompt=content,max_length=20,early_stopping=True)tokenizer.decode(greedy_output[0],skip_special_tokens=True)Example with typical decoding, which will require arandom_seedbefore generating text, and atypical_pbetween 0 and 1:decoder3=TypicalDecoder(model,random_seed=603,typical_p=0.4)typical_output=decoder3.generate_text(prompt=content,max_length=20,early_stopping=True)# new random seeddecoder3.set_random_seed(101)typical_output_2=decoder3.generate_text(prompt=content,max_length=20,early_stopping=True)LicenseApache license for compatibility with the Transformers library
Package: decoders
Decoders for 🤗 transformersThis package provides a convenient interface for extensible and customizable generation strategies -aka decoders- in 🤗 transformers.It also provides extra implementations out of the box, like the Stochastic Beam Search decoder.Installationpip install decodersUsageSimple use of the new interface:fromdecodersimportinject_supervitamined_decodersfromtransformersimportT5ForConditionalGenerationmodel=T5ForConditionalGeneration.from_pretrained('t5-small')inject_supervitamined_decoders(model)model.generate(...)DecodersStochastic Beam SearchThis decoder is a stochastic version of the Beam Search decoder. It is a HF implementation of the paperStochastic Beam Search.It can be used as follows:fromdecodersimportOldStochasticBeamSearchDecoder,inject_supervitamined_decodersfromtransformersimportT5ForConditionalGenerationmodel=T5ForConditionalGeneration.from_pretrained('t5-small')inject_supervitamined_decoders(model)decoder=OldStochasticBeamSearchDecoder()outputs=model.generate(input_ids,generation_strategy=decoder,num_beams=4,num_return_sequences=4,# sample without repl. = return all beamslength_penalty=0.0,# for correct probabilities, disable length penaltyreturn_dict_in_generate=True,output_scores=True,early_stopping=True,# early stopping because without length penalty, we can discard worse sequences# return_dict_in_generate and output_scores are required for sbs for now,# as scores keep the past generated gumbel noise, which is used by the logits processor)Note that when sampling without replacement, you must setnum_beamsandnum_return_sequencesto the same value, the number of SWOR samples that you want to obtain.Of course, the samples for the same input are not independent. If you want R different groups of SWOR samples of size n, you should replicate your batched input tensor by R, and then set num_beams and num_return_sequences to n.Seeherefor a full example.Included goodiesBinaryCodeTransformerThe BinaryCodeTransformer is a custom transformer model that acts like a probabilistic binary sequence generator. Given a discrete probability distribution over all possible binary sequences of a given length, it generates a sequence of that length according to that distribution. It is useful to test HF compatible sample-without-replacement decoders, like the Stochastic Beam Search decoder.The code maps each of the 2^n possible binary sequences of length n to its positive integer decimal representation. Then, it uses that number as the index of the corresponding probability in the input distribution. Since we are interested in autoregressive generation, the model computes the conditional probabilities by summing over the possible continuations of the sequence.FakeTransformerThe FakeTransformer operates as a very simple Probabilistic Finite State Automaton. Seeherefor a full explanation.
Package: decode-server-django
Decode Server DjangoA middleware for Django for authenticating requests fromDecode Auth Server.InstallingInstall using pip:pipinstalldecode_server_djangoA simple exampleTo integrate your Django app with Decode Auth you need to set the Decode public key and register the middleware with the app.# in settings.py of your app add the public keyDECODE_PUBLIC_KEY="""-----BEGIN RSA PUBLIC KEY-----...REDACTED...-----END RSA PUBLIC KEY-----"""# And register the middlewareMIDDLEWARE=['decode_server_django.middleware.DecodeAuthMiddleware',...]Now all the routes will be protected by the middleware and only Decode Auth will be able to call them.DevelopingTo install Decode Server Flask, alogn with the tools you need to develop and run tests, run the following in your virtualenv:pipinstall-e.[dev]Pushing updates# First build the redistributablepythonsetup.pybdist_wheelsdist# and then push it to pypi.orgtwineuploaddist/*
Package: decode-server-flask
Decode Server FlaskA middleware for Flask for authenticating requests fromDecode Auth Server.InstallingInstall using pip:pipinstalldecode_server_flaskA simple exampleTo integrate your Flask app with Decode Auth you only need to import the middleware and register it with the app.
A simple example on how to do it:fromflaskimportFlaskfromdecode_server_flaskimportdecode_server_flaskfromosimportenvironapp=Flask(__name__)# To setup the middleware, you need to get the Decode's RSA Public Key.# You can read the key from an ENV variable.decode_public_key=os.environ["DECODE_PUBLIC_KEY"]# Or you can read the key from file.public_key_file=open("decode-key.pub","r")decode_public_key=public_key_file.read()# Then just pass the key to the middlewareapp.wsgi_app=decode_server_flask(app.wsgi_app,decode_public_key)# Now all the routes are protected!# To call them you need a valid JWT which only the Decode Auth server can generate.@app.route("/me",methods=["GET"])defme_api():return{"user":"Paul Muad'Dib","affiliation":"Fremen","house":"Atreides",}DevelopingTo install Decode Server Flask, alogn with the tools you need to develop and run tests, run the following in your virtualenv:pipinstall-e.[dev]Pushing updates# First build the redistributablepythonsetup.pybdist_wheelsdist# and then push it to pypi.orgtwineuploaddist/*
Package: decodificador
DECODIFICADOR ASCIIPython Boilerplate contains all the boilerplate you need to create a Python package.Free software: MIT licenseDocumentation:https://decodificador.readthedocs.io.FeaturesThis is an ascii decoder easy to useCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2018-03-12)First release on PyPI.
Package: decohints
decohints🇷🇺 Версия на русскомA decorator for decorators that allows you to see the parameters of a decorated function when using it in PyCharm.PyPi:https://pypi.org/project/decohints/Reasons for creationBelow is an example of a decorator with parameters without the use ofdecohints:fromfunctoolsimportwrapsdefdecorator_with_params(aa=None,bb=None,cc=None):def_decorator(func):@wraps(func)defwrapper(*args,**kwargs):try:result=func(*args,**kwargs)exceptException:print("Error")returnreturnresultreturnwrapperreturn_decorator@decorator_with_params()deftest(a:int,b:int)->int:returna+bIf you type belowtest()in PyCharm and wait, it will show decorator wrapper parameter hints astestfunction
parameter hints:This is not convenient and can confuse developers, which is why this library was made.InstallationpipinstalldecohintsUsage✅ Works with all kinds of decorators⚠️ If your decorator is already wrapped in another decorator, thendecohintsshould be on topTo use, you need to follow two simple steps:Import thedecohintsdecorator from thedecohintslibrary:fromdecohintsimportdecohintsWrap your decorator with adecohintsdecorator:@decohintsdefyour_decorator():...The following is an example of a decorator with parameters, with usingdecohints:fromfunctoolsimportwrapsfromdecohintsimportdecohints@decohintsdefdecorator_with_params(aa=None,bb=None,cc=None):def_decorator(func):@wraps(func)defwrapper(*args,**kwargs):try:result=func(*args,**kwargs)exceptException:print("Error")returnreturnresultreturnwrapperreturn_decorator@decorator_with_params()deftest(a:int,b:int)->int:returna+bIf you type belowtest()in PyCharm and wait, it will showtestfunction parameter hints:❕Examples of use with decorator class, class decorators, and more are found at here:clickAlternativesSpecifying the type of wrapper✅ Works with all kinds of decorator functionsSpecifying the typewrapper: funcwill have the same behavior as usingdecohints.Example:fromfunctoolsimportwrapsdefdecorator(func):@wraps(func)defwrapper(*args,**kwargs):try:result=func(*args,**kwargs)exceptException:print("Error")returnreturnresultwrapper:funcreturnwrapper@decoratordeftest(a:int,b:int)->int:returna+bIf you type belowtest()in PyCharm and wait, it will showtestfunction parameter hints:Specifying an output type in a decorator with parameters❗️This method only works in decorator functions with parametersIf you specify theCallabletype from thetypingmodule for the result of the decorator with parameters, then the
behavior will be the same as usingdecohints.Example:fromfunctoolsimportwrapsfromtypingimportCallabledefdecorator_with_params(aa=None,bb=None,cc=None)->Callable:def_decorator(func):@wraps(func)defwrapper(*args,**kwargs):try:result=func(*args,**kwargs)exceptException:print("Error")returnreturnresultreturnwrapperreturn_decorator@decorator_with_params()deftest(a:int,b:int)->int:returna+bIf you type belowtest()in PyCharm and wait, it will showtestfunction parameter hints:
Package: decol
decolA tool to drop or keep columns from a CSV file.Featurescolumns can be specified as 1-based integer indexes or column headersmultiple indexes or headers can be specified as a comma-separated listnegative indexes are supportedindex ranges are also supported, e.g. 1:2 for the first two columnUsage$ decol -h
Usage: decol [OPTIONS] INPUT OUTPUT

  A tool to drop or keep columns from a CSV file.

Options:
  -c, --columns COLUMNS       Comma-separated list of 1-based column indexes
                              to remove. Negative integers will index from the
                              end. May use a range, e.g. 1:2 or -3:-2 for
                              first and second of three columns. Ranges must
                              always be given in left to right column order
                              for both positive and negative indexes. Mutually
                              exclusive with --headers.
  -H, --headers HEADERS       Comma-separated list of columns to remove by
                              first-line header. Mutually exclusive with
                              --columns.
  -s, --sep SEPARATOR         Column separator.  [default: ,]
  -o, --output-sep SEPARATOR  Output column separator. [default: --sep value]
  --keep                      Keep only the specified columns in the order
                              specified in --columns or --headers.  [default:
                              False]
  --version                   Show the version and exit.
  -h, --help                  Show this message and exit.
Package: decolib
Various useful python decorators:- retry(tries, delay=3, backoff=2)         Retries a function or method until it complite without exeptions         delay sets the initial delay, and backoff sets how much the delay should         lengthen after each failure. backoff must be greater than 1, or else it         isn't really a backoff. tries must be at least 0, and delay greater than 0- memoizedClassic memoization. Function cache results, then return objects from cache for same argumets
Package: decolle
# Deep Continuous Local Learning (DECOLLE)DECOLLE is an online learning framework for spiking neural networks.
The algorithmic details are described in this [Frontiers paper](https://www.frontiersin.org/articles/10.3389/fnins.2020.00424/full).
If you use this work in your research, please cite as:` @ARTICLE{decolle2020,AUTHOR={Kaiser,Jacques and Mostafa, Hesham and Neftci, Emre},TITLE={SynapticPlasticity Dynamics for Deep Continuous Local Learning(DECOLLE)},JOURNAL={Frontiersin Neuroscience},VOLUME={14},PAGES={424},YEAR={2020},URL={https://www.frontiersin.org/article/10.3389/fnins.2020.00424},DOI={10.3389/fnins.2020.00424},ISSN={1662-453X}`### Installing
Clone and install. The Python setuptools will take care of dependencies` git clonehttps://github.com/nmi-lab/decolle-public.gitcddecolle-publicpython setup.py install--user`The following will run decolle on the default parameter set` cd scripts python train_lenet_decolle.py `All parameter sets are contained in scripts/parameters, you can use them as such:` cd scripts python train_lenet_decolle.py--params_file=parameters/params_dvsgestures_torchneuromorphic_attention.yml`## AuthorsEmre Neftci-Initial work- [eneftci](https://github.com/eneftci)Jacques Kaiser- [jackokaiser](https://github.com/jackokaiser)Massi Iacono- [miacono](https://github.com/miacono)## LicenseThis project is licensed under the GPLv3 License - see the [LICENSE.txt](LICENSE.txt) file for details
Package: decolyzer
package name: decolyzerdescription: the package has multiple functions in it as below:decogoat: This is a decorator function which will help to run commands/processes/scripts
(e.g. tcpdump/top etc.) before and after the execution of your own function.
The function will delete any existing files before the execution of your own function.
The function will also rename the files after the execution of your own function.Ssh class: This is a class based off of paramiko package and will help create ssh connections.scp_operation: This function mimics scp command of linux/unix os.analyze_capture: This is a function to parse traffic capture such as e.g. capture.pcapHelp documentation:README -https://github.com/patelsamirj111/decolyzer/blob/main/README.mdgithub package files -https://github.com/patelsamirj111/decolyzer