Saravanan666/pypi-org huggingface dataset:
Package: hyperparameter
HyperparameterENGLISH|中文文档Hyperparameter, Make configurable AI applications.Build for Python hackers.Quick StartHyperparameterusesauto _ paramdecorator to convert keywords arguments into configurable parameters:fromhyperparameterimportauto_param@auto_param("foo")deffoo(x,y=1,z="a"):returnf"x={x}, y={y}, z={z}"The parameters can be controlled withparam_scopefromhyperparameterimportparam_scopefoo(1)# x=1, y=1, z='a'withparam_scope(**{"foo.y":2}):foo(1)# x=1, y=2, z='a'Advanced UsageRead/Write Parametersfromhyperparameterimportparam_scope# create param_scopewithparam_scope():passwithparam_scope("foo.y=1","foo.z=b"):passwithparam_scope(**{"foo.y":1,"foo.z":2}):pass# read param with default valuewithparam_scope(**{"foo.y":2})asps:y=ps.foo.y(1)y=ps.foo.y|1y=param_scope.foo.y(1)y=param_scope.foo.y|1foo(1)# x=1, y=2, z='a'# wite values to param_scopewithparam_scope(**{"foo.y":2})asps:ps.foo.y=2param_scope.foo.y=2Nested ScopeHyperparametersupport nestedparam_scope:fromhyperparameterimportparam_scope# no param_scope, use the default value defined in foofoo(1)# x=1, y=1, z='a'# start a new param_scope# and set the default value of `foo.y` to `2`withparam_scope(**{"foo.y":2})asps:# found one param_scope `ps`,# and receive default value of `foo.y` from `ps`foo(1)# x=1, y=2, z='a'# start another param_scope# and set the default value of `foo.y` to `3`withparam_scope(**{"foo.z":"b"})asps2:# found nested param_scope `ps2`,# and receive default values of `foo.z` from `ps2`foo(1)# x=1, y=2, z='b'# `ps2` ends here, and `foo.y` is restored to `2`foo(1)# x=1, y=2, z='a'# `ps` ends here, and `foo.y` is restored to `1`foo(1)# x=1, y=1, z='a'CMD Line ArgumentsAn example CLI app:fromhyperparameterimportparam_scope,auto_param@auto_paramdefmain(a=0,b=1):# `inline default values`print(a,b)if__name__=="__main__":importargparseparser=argparse.ArgumentParser()parser.add_argument("-D","--define",nargs="*",default=[],action="extend")args=parser.parse_args()withparam_scope(*args.define):main()Examplesparameter tunning for researchersThis example shows how to use hyperparameter in your research projects, and make your experiments reproducible.experiment tracing for data scientistsThis example shows experiment management with hyperparameter, and tracing the results with mlflow.tracing.
Package: hyperparameter-tuning
hptThis repository is under construction :construction:A minimal hyperparameter tuning framework to help you train hundreds of models.It's essentially a set of helpful wrappers over optuna.InstallInstall package fromPyPI:pip install hyperparameter-tuningGetting startedfromhpt.tunerimportObjectiveFunction,OptunaTunerobj_func=ObjectiveFunction(X_train,y_train,X_test,y_test,hyperparameter_space=HYPERPARAM_SPACE_PATH,# path to YAML fileeval_metric="accuracy",s_train=s_train,s_val=s_test,threshold=0.50,)tuner=OptunaTuner(objective_function=obj_func,direction="maximize",# NOTE: can pass other useful study kwargs here (e.g. storage))# Then just run optimize as you would for an optuna.Study objecttuner.optimize(n_trials=20,n_jobs=4)# Results are stored in tuner.resultstuner.results# You can reconstruct the best predictor with:clf=obj_func.reconstruct_model(obj_func.best_trial)Defining a hyperparameter spaceThe hyperparameter space is provided either path to a YAML file, or as adictwith the same structure.
Example hyperparameter spaceshereandhere.The YAML file must follow this structure:# One or more top-level algorithmsDT:# Full classpath of algorithm's constructorclasspath:sklearn.tree.DecisionTreeClassifier# One or more key-word arguments to be passed to the constructorkwargs:# Kwargs may be sampled from a distributionmax_depth:type:int# either 'int' or 'float'range:[10,100]# minimum and maximum valueslog:True# (optionally) whether to use logarithmic scale# Kwargs may be sampled from a fixed set of categoriescriterion:-'gini'-'entropy'# Kwargs may be a pre-defined valuemin_samples_split:4# You may explore multiple algorithms at onceLR:classpath:sklearn.linear_model.LogisticRegressionkwargs:# An example of a float hyperparameterC:type:floatrange:[0.01,1.0]log:True
Package: hyperparse
Hyperparse : A Simple Shell Environment Variables ParserIntroductionThis script provides a way to parse environment variables and use them as hyperparameters in Python scripts.The script parses a string that contains a comma-separated list of key-value pairs, where each key-value pair is separated by an equal sign (=). The keys should be strings, and the values can be integers, floats, lists of integers or floats, booleans, or None. The script can handle values that are enclosed in single or double quotes.The script also provides a set_hyper function that allows you to set the variables in your Python script. You can pass in a dictionary of hyperparameters and a namespace or dictionary of arguments. The function will update the namespace or dictionary with the hyperparameters.UsageFirst set a variable in shell and run the python filemain.py.exportusermode="a=1,b,c=[1,2,3],d=4,e=3.2,f=itud,g=False"pythonmain.pyParse variables# main.pyfromhyperparserimportget_hyperusermode=get_hyper("usermode")print(usermode)# {"a": 1, "b": None, "c": [1, 2, 3], "d": 4, "e": 3.2, "f": "itud"}Reset argparse elements# main.pyfromhyperparseimportget_hyper,set_hyperusermode=get_hyper("usermode")parser=argparse.ArgumentParser()parser.add_argument('--a',type=int,default=5)parser.add_argument('--f',type=str,default="hello")args=parser.parse_args()set_hyper(usermode,args)print(args)# Namespace(a=1, f='itud')Reset Local Variables# main.pyfromhyperparseimportget_hyper,set_hyperusermode=get_hyper("usermode")a=5f="stk"set_hyper(usermode)print(a)# 1print(f)# itud```# hyperparse
Package: hyperpixel2r
HyperPixel 2" Round Touch DriverPre-requisitesYou must install the HyperPixel 2r drivers which enable an i2c bus for the touch IC -https://github.com/pimoroni/hyperpixel4/tree/hp2-roundInstallingStable library from PyPi:Just runpip3 install hyperpixel2rIn some cases you may need to usesudoor install pip with:sudo apt install python3-pipLatest/development library from GitHub:git clone https://github.com/pimoroni/hyperpixel2r-pythoncd hyperpixel2r-pythonsudo ./install.shUsageSet up touch driver instance:touch=Touch(bus=11,i2c_addr=0x15,interrupt_pin=27):Touches should be read by decorating a handler with@touch.on_touch.The handler should accept the argumentstouch_id,x,yandstate.touch_id- 0 or 1 depending on which touch is trackedx- x coordinate from 0 to 479y- y coordinate from 0 to 479state- touch stateTruefor touched,Falsefor releasedFor example:@touch.on_touchdefhandle_touch(touch_id,x,y,state):print(touch_id,x,y,state)Changelog0.0.1Initial Release
Package: hyperpoints
.. raw:: html<embed><p align="center"><img width="300" src="https://github.com/yngtodd/hyperpoints/blob/master/img/pylibrary.png"></p></embed>--------------------------.. image:: https://badge.fury.io/py/hyperpoints.png:target: http://badge.fury.io/py/hyperpoints.. image:: https://travis-ci.org/yngtodd/hyperpoints.png?branch=master:target: https://travis-ci.org/yngtodd/hyperpoints=============================hyperpoints=============================Distributed hyperparameter optimization and reinforcement learning algorithms.Features--------* TODODocumentation-------------The full documentation is at http://hyperpoints.rtfd.org.History-------0.0.1 (2018-10-24)++++++++++++++++++* First release on PyPI.
Package: hyper-prompt
Hyper-promptA Highly Customize-able prompt for your shellRequirementsPython3Powerline Fonts :https://github.com/powerline/fontsGetting Startedgitclonehttps://github.com/artbycrunk/hyper-promptcdhyper-prompt
pythonsetup.pyinstallConfigure for your desired shell* BashAdd the following to your.bashrcfile:function_update_ps1(){PS1=$(hyper-prompt$?)}if[[$TERM!=linux&&!$PROMPT_COMMAND=~_update_ps1]];thenPROMPT_COMMAND="_update_ps1;$PROMPT_COMMAND"fi* ZshAdd the following to your.zshrc:functionprompt_precmd(){PS1="$(hyper-prompt--shellzsh$?)"}functionadd_prompt_precmd(){forsin"${precmd_fn[@]}";doif["$s"="prompt_precmd"];thenreturnfidoneprecmd_fn+=(prompt_precmd)}if["$TERM"!="linux"];thenadd_prompt_precmdfi* FishAdd the following to your~/.config/fish/config.fish:functionfish_prompthyper-prompt--shellbare$statusend* tcshAdd the following to your.tcshrc:aliasprecmd'set prompt="`hyper-prompt --shell tcsh $?`"'Customization OptionsConfig FileHyper prompt will lookup multiple locations for a config file for options on how to display your prompt..It will first look for ahyper_prompt.jsonin your current project/folder, if it doesn't exists look for$HOME/.hyper_prompt.jsonelse finally look for$HOME/.config/hyper_prompt/config.jsonUse~/.config/hyper-prompt/config.jsonas a config file for customizations.Example of a default config"theme":"default","mode":"patched","segments":["username",{"type":"virtual",// a user built segment which is discoverable via the python path"module":"hyper_prompt.segments.virtual"}]SegmentsSegments are the building blocks of hyper-promptYou can mix and match different segments to build your prompt.Issues, feature requests, and contributionsIf you come across a problem with the extension, pleasefile an issueContributions are always welcome!Any and all feedback is appreciated and welcome!If someone has alreadyfiled an issuethat encompasses your feedback, please leave a 👍/👎 reaction on the issueOtherwise please file a new issueRelease NotesSeeCHANGELOG.mdSeeRecent ReleasesEnjoy!
Package: hyper-python
Hyper Python LibraryThe Hyper Python library provides convenient access to the Hyper API from
applications written in the Python language.DocumentationSee theAPI docs.Installationpipinstall--upgradehyper-pythonRequirementsPython 3UsageThe library needs to be configured with your account's secret key which is
available in yourHyper Dashboard. Sethyper.api_keyto its
value:importhyperhyper.api_key='sk_...'# create licenselicense=hyper.License.create(email='hello@hyper.co',plan='f80gre098nbgoiA',# see API docs for remaining parameters)# print the license's emailprint(license.email)# retrieve specific licenselicense=hyper.License.retrieve('6WHJ-GIPG-28KF-U0MB')# print that license's emailprint(license.email)# update specific licenselicense=hyper.License.update(key='6WHJ-GIPG-28KF-U0MB',metadata={'hwid':'09584903'})# print that license's metadataprint(license.metadata)# delete specific licensehyper.License.delete('6WHJ-GIPG-28KF-U0MB')# list licenseslicenses=hyper.License.list(limit=50,# default is 10page=1#default is 1)# print the first license's emailprint(licenses.data[0].email)# send specific licensehyper.License.send('6WHJ-GIPG-28KF-U0MB')Handling exceptionsUnsuccessful requests raise exceptions. The class of the exception will reflect
the sort of error that occurred.try:# Use Hyper's library to make requests...passexcepthyper.error.AuthenticationErrorase:# Authentication with Hyper's API failed# (maybe you changed API keys recently)passexcepthyper.error.InvalidRequestErrorase:# Invalid parameters were supplied to Hyper's APIpassexceptExceptionase:# Something else happened, unrelated to Hyperpass
Package: hyper-requests
Concurrent request HTTP execution libraryWhat is it?hyper-requests is a Python library, enabling multithreading of API calls using asyncio. It takes a list of URLs and a list of parameters as input and then uses the requests library to make these calls asynchronously (https://pypi.org/project/requests/).UsageInstallationInstall hyper-requests using pip:pipinstallhyper-requestsExampleimporthyper_requests# Define the request parametersparams=[{'url':'http://httpbin.org/get','data':'value1'},{'url':'http://httpbin.org/get','data':'value3'},{'url':'http://httpbin.org/get','data':'value5'},{'url':'http://httpbin.org/get','data':'value7'},{'url':'http://httpbin.org/get','data':'value9'}]# Create an instance of AsyncRequests and execute the requestsreturned_data=hyper_requests.get(request_params=params,workers=10)# Process the returned dataforresponseinreturned_data:print(response)This example demonstrates the usage of hyper-requests to perform asynchronous HTTP(s) requests.First, make sure you have installed hyper-requests by running the command pip install hyper-requests.Next, import hyper_requests and utilise the .get() function.Create a list of request parameters using dictionaries, where each dictionary represents a set of parameters for an individual request. In this example, each request MUST have a URL specified with the 'url' key, all other paramters must match the classic request template.These must now be inputed to the .get() function, with the number of concurrent worker threads to use with the workers argument (in this case, workers=10). The return value is a list of json responses.Finally, process the returned data as desired. In this example, each response is printed, but you can perform further operations based on your specific needs.PerformanceIt is hyper fast!Within thetest/performancedirectory there is a performance test that makes 20 API calls to the random joke generator api:https://official-joke-api.appspot.com/random_joke.Using hyper requests the time taken to make these calls is ~2 second, using synchronous api calls takes ~16 seconds.=============================testsessionstarts==============================collecting...collected1item

test_performance.py::PerformanceTest::test_api_performance==============================1passedin17.76s==============================Processfinishedwithexitcode0PASSED[100%]AsynchronousExecutiontime:1.845513105392456seconds
AsynchronousDatalength:20SynchronousExecutiontime:15.81911015510559seconds
SynchronousDatalength:20TODOCreate input to .get() more intuitive e.g. mirror the requests functionalityAdd time limit on requests to deal with request limits
Package: hyper-rpc
hyper-rpcSimple RPC with Protobuf ServicesUsesgrpcio_toolsandpurerpcunder the hood.Install$pipinstallhyper-rpcExampleTLDR; See theexampledirectoryDefine an RPC service in agreeter.proto.syntax="proto3";serviceGreeter{rpcSayHello(HelloRequest)returns(HelloReply){}rpcSayHelloGoodbye(HelloRequest)returns(streamHelloReply){}rpcSayHelloToMany(streamHelloRequest)returns(streamHelloReply){}rpcSayHelloToManyAtOnce(streamHelloRequest)returns(HelloReply){}}messageHelloRequest{stringname=1;}messageHelloReply{stringmessage=1;}Then generate the services and stubs withhyper-rpc.$pipinstallhyper-rpc
$hrpcgreeter.protoThis createsgreeter_gprc.py(services) andgreeter_pb2.py(stubs) files.You can then write an async-ready server."""Greeter server."""fromgreeter_grpcimportGreeterServicerfromgreeter_pb2importHelloReply,HelloRequestfrompurerpcimportServerclassGreeter(GreeterServicer):asyncdefSayHello(self,message):returnHelloReply(message=f"Hello{message.name}")asyncdefSayHelloToMany(self,input_messages):asyncformessageininput_messages:yieldHelloReply(message=f"Hello,{message.name}")if__name__=="__main__":server=Server(50055)server.add_service(Greeter().service)server.serve(backend="trio")And a client."""Greeter client."""importanyioimportpurerpcfromgreeter_grpcimportGreeterStubfromgreeter_pb2importHelloReply,HelloRequestasyncdefgen():foriinrange(5):yieldHelloRequest(name=str(i))asyncdefmain():asyncwithpurerpc.insecure_channel("localhost",50055)aschannel:stub=GreeterStub(channel)reply=awaitstub.SayHello(HelloRequest(name="World"))print(reply.message)asyncforreplyinstub.SayHelloToMany(gen()):print(reply.message)if__name__=="__main__":anyio.run(main,backend="trio")And run them in separate terminals to see the output.$ python server.py # terminal 1
$ python client.py # terminal 2Output:Hello, World
Hello, 0
Hello, 1
Hello, 2
Hello, 3
Hello, 4Go forth andRemote Procedure Call.
Package: hypers
hypershypers provides a data structure in python for hyperspectral data. The data structure includes:Tools for processing and exploratory analysis of hyperspectral dataInteractive hyperspectral viewer (using PyQt) that can be accessed as a method from the objectAllows for unsupervised machine learning directly on the objectThe data structure is built on top of the numpyndarray, and this package simply adds additional functionality that
allows for quick analysis of hyperspectral data. Importantly, this means that the object can still be used as a
normal numpy array.Please note that this package is currently in pre-release. It can still be used, however there is likely to be
significant changes to the API. The first public release will be v0.1.0.ContentsInstallationFeaturesExamplesDocumentationLicenseInstallationTo install usingpip:pip install hypersThe following packages will also be installed:numpyscipyPyQt5pyqtgraphFeaturesFeatures implemented inhypersinclude:Hyperspectral viewerVertex component analysisAbundance mappingA full list of features can be foundhere.ExamplesInteractive viewerThe interactive viewer can be particularly helpful for exploring a completely new dataset for the first time to get
a feel for the type of data you are working with. An example from a coherent anti-Stokes Raman (CARS) dataset is
shown below:DocumentationThe docs are hostedhere.Licensehypers is licensed under the OSI approved BSD 3-Clause License.ReferencesVCA algorithmJ. M. P. Nascimento and J. M. B. Dias, "Vertex component analysis: a fast algorithm to unmix hyperspectral data,"
in IEEE Transactions on Geoscience and Remote Sensing, 2005Adapted fromrepo.
Package: hyperscan
Hyperscan/Vectorscan for PythonA CPython extension forVectorscan, an open source fork ofHyperscan, Intel's open source (prior to version 5.4),
high-performance multiple regex matching library.✅ Binarymanylinux-compatible wheels✅ Statically linked (no need to build Hyperscan/Vectorscan)✅ChimerasupportInstallation# 🪄 Installing libhs is NOT required, because python-hyperscan is statically linkedpipinstallhyperscanBuild OptimizationIf you'd like to use Intel's Hyperscan rather than Vectorscan, or if
you'd like to enable native CPU detection to build optimized non-FAT
libraries (default off in Vectorscan), extending themanylinux-hyperscanDocker image used to build the binary wheels
for this library should be fairly straightforward.API Supportpython-hyperscancurrently exposesmostof the C API, with the
following caveats or exceptions:Nostream compressionsupport.Nocustom allocatorsupport.hs_expression_info,hs_expression_ext_info,hs_populate_platform, andhs_serialized_database_infonot
exposed yet.See thedocumentationfor more detailed build instructions.ResourcesPyPI ProjectDocumentationHyperscan C API Documentation
Package: hypers-cas
# cas[![Code Health](https://landscape.io/github/unistra/django-cas/master/landscape.svg?style=flat)](https://landscape.io/github/unistra/django-cas/master)CAS client for Django.  This is K-State&#39;s fork of the original, which lives athttps://bitbucket.org/cpcc/django-cas/overview.  This fork is actively maintaned andincludes several new features.Current version: 0.8.5https://github.com/kstateome/django-cas## InstallSee the document at Bitbuckethttps://bitbucket.org/cpcc/django-cas/overview## Settings.py for CASAdd the following to middleware if you want to use CAS::MIDDLEWARE_CLASSES = ('cas.middleware.CASMiddleware',)Add these to ``settings.py`` to use the CAS Backend::CAS_SERVER_URL = "Your Cas Server"CAS_LOGOUT_COMPLETELY = TrueTo disable CAS authentication for the entire django admin app, you should use the ``CAS_ADMIN_AUTH`` parameter::CAS_ADMIN_AUTH = FalseThe ``CAS_ADMIN_PREFIX`` is deprecated since version 1.1.4 and will be removed in 1.1.5 release.# Additional FeaturesThis fork contains additional features not found in the original:*  Proxied Hosts*  CAS Response Callbacks*  CAS Gateway*  Proxy Tickets (From Edmund Crewe)## Proxied HostsYou will need to setup middleware to handle the use of proxies.Add a setting ``PROXY_DOMAIN`` of the domain you want the client to use.  Then addMIDDLEWARE_CLASSES = ('cas.middleware.ProxyMiddleware',)This middleware needs to be added before the django ``common`` middleware.## CAS Response CallbacksTo store data from CAS, create a callback function that accepts the ElementTree object from theproxyValidate response. There can be multiple callbacks, and they can live anywhere. Define thecallback(s) in ``settings.py``:CAS_RESPONSE_CALLBACKS = ('path.to.module.callbackfunction','anotherpath.to.module.callbackfunction2',)and create the functions in ``path/to/module.py``:def callbackfunction(tree):username = tree[0][0].textuser, user_created = User.objects.get_or_create(username=username)profile, created = user.get_profile()profile.email = tree[0][1].textprofile.position = tree[0][2].textprofile.save()## CAS GatewayTo use the CAS Gateway feature, first enable it in settings. Trying to use it without explicitlyenabling this setting will raise an ImproperlyConfigured:CAS_GATEWAY = TrueThen, add the ``gateway`` decorator to a view:from cas.decorators import gateway@gateway()def foo(request):#stuffreturn render(request, 'foo/bar.html')## Custom Forbidden PageTo show a custom forbidden page, set ``CAS_CUSTOM_FORBIDDEN`` to a ``path.to.some_view``.  Otherwise,a generic ``HttpResponseForbidden`` will be returned.## Proxy TicketsThis fork also includes Edmund Crewe's proxy ticket patch:http://code.google.com/r/edmundcrewe-proxypatch/source/browse/django-cas-proxy.patch
Package: hyperscreen
hyperscreenPython Boilerplate contains all the boilerplate you need to create a Python package.Free software: MIT licenseDocumentation:https://hyperscreen.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2019-09-19)First release on PyPI.
Package: hyperscript
HyperscriptHyperscript is a lightweight library that allows you to write HTML with Python. It is heavily inspired byHyperScript.Example usage>>> print(h("p", "Hello world!"))
<p>Hello world!</p>Class and id selectors>>> print(h("p.class1#id", "Hello world!"))
<p class="class1" id="id">Hello world!</p>Style>>> print(h("p", "Hello world!", {"style": {"color": "red"}}))
<p style="color: red">Hello world!</p>Nesting elements>>> print(h("div", h("p", "Hello world!")))
<div><p>Hello world!</p></div>Properties>>> print(h("a", {"href": "https://www.example.com"}, "link"))
<a href="https://www.example.com">link</a>
Package: hyper-sh
Hyper_shdocker-py adapted to HyperIt uses underscore ‘_’ instead of ‘-’ in its name like the originalHyper_service, but you can actually install either spelling.This is a thin adaptation layer of docker-py for it to work with Hyper’s credential schemeInstall from pippip install hyper_shHow to usehyper_sh is used with the same API as docker-pyfrom hyper_sh import Client
c = Client()  # without argument, config is guessed by reading ~/.hyper/config.json
print c.images()from hyper_sh import Client
c = Client("path/to/config.json")  # you can pass a specific config.json
print c.images()from hyper_sh import Client
c = Client({'clouds': {
    os.environ['hyper_endpoint']: {
        "accesskey": os.environ['hyper_accesskey'],
        "secretkey": os.environ['hyper_secretkey']
    }
}})  # or you can give the content of a config.json directly
print c.images()APIAt the moment, hyper_sh maps 1:1 to the api of docker-py, which means that some api will not work, as they are not supported byHyper_.https://docker-py.readthedocs.ioThere are some other API supported byHyper_that are not yet supported by this module (i.e. fip managment).
Patches are welcome.