Saravanan666/pypi-org huggingface dataset:
Package: keraTorch
KeraTorchImplementing Keras clone with pytorch backend.Installpip install keratorchHow to usefromkeraTorch.modelimportSequentialfromkeraTorch.layersimport*fromkeraTorch.lossesimport*The data:x_train.shape,y_train.shape,x_valid.shape,y_valid.shape((50000, 784), (50000,), (10000, 784), (10000,))Model definition:model=Sequential()model.add(Dense(100,x_train.shape[1],activation='relu'))model.add(Dense(50,activation='relu'))model.add(Dense(10))model.add(Activation('softmax'))Doesn't actually compile anything but to look like keras we specify the loss as below.ce4softmaxmeans crossentropy for softmax loss.model.compile(ce4softmax)Burrow for Fastai's learning rate finder to find best learning rate:bs=256model.lr_find(x_train,y_train,bs=bs)Min numerical gradient: 9.12E-03
Min loss divided by 10: 1.45E-02We have the same.fitand.predictfunctions:model.fit(x_train,y_train,bs,epochs=10,lr=1e-2)epochtrain_lossvalid_losstime02.2981582.27043300:0112.2491952.05490500:0122.0829481.47477100:0131.8068540.90492300:0141.5260040.73778600:0151.2930550.70595800:0161.1058060.66675500:0170.9580040.68737300:0180.8384950.69625500:0190.7417850.69734100:01preds=model.predict(x_valid)accuracy=(preds.argmax(axis=-1)==y_valid).mean()print(f'Predicted accuracy is{accuracy:.2f}')Predicted accuracy is 0.81
Package: keravis
keraviskeravis is a high-level API for ConvNet visualizations in Keras. As of v1.0, it supports visualizations ofConvolutional layer activations2-dimensional feature space representationsSaliency maps (vanilla backprop, guided backprop, and occlusion)Generated inputs that result in maximal class scoresPatches in a set of images that maximally activate an intermediate neuronwith support for nested pretrained models.This is a hobby project that was inspired by lecture 14 of Stanford's CS231n: Convolutional Neural Networks for Visual Recognitionhttp://cs231n.stanford.edu/. It is not yet optimized for serious use (seekeras-visinstead).InstallationYou can install keravis using pippipinstallkeravisUsageRead thedocumentationSample VisualizationsBelow are sample visualizations from a small convolutional network trained on MNISTfromkeravisimportfeature_spacefeature_space(model,X=x_test[:5000],y=y_test[:5000],kind='tsne')fromkeravisimportsaliency_backpropsaliency_backprop(model,test_img,class_idx=7)fromkeravisimportsaliency_guided_backpropsaliency_guided_backprop(model,test_img,class_idx=7)fromkeravisimportmaximal_class_score_inputmaximal_class_score_input(model,class_idx=5,dim=(28,28,1))fromkeravisimportmaximally_activating_patchesmaximally_activating_patches(model,'conv2d_1',X=x_test)
Package: kerberos-proxy-auth
kerberos-proxy-authThis package patchesrequestsandurllib3at runtime to authenticate with kerberos proxy (spnego)Installationa) using a NON-kerberos proxy (if available)set the environment variables to NON-kerberos proxy and usepip install ...sethttps_proxy=http://<NONkerberosproxy>:8080sethttp_proxy=http://<NONkerberosproxy>:8080
pipinstallkerberos-proxy-authb) from behind the kerberos proxydownloadthis package manuallyas well as all its dependancies.run this commandpipinstallpath/to/kerberos-proxy-auth-main.zippath/to/dependancy1.zippath/to/dependancy2.zip[...]UsageAfter installationset the environment variablessethttps_proxy=http://<kerberosproxy>:8080sethttp_proxy=http://<kerberosproxy>:8080start python and userequests,urllib3orpipeven from behind the kerberos proxy without any further action.importrequestsr=requests.get('https://example.org')print(r.status_code)# expected: 200r=requests.head('https://example.org')print(r.status_code)# expected: 200r=requests.request('GET','https://example.org')print(r.status_code)# expected : 200importurllib3,oshttp=urllib3.poolmanager.proxy_from_url(os.getenv('https_proxy'))r=http.request('GET','https://example.org')print(r.status)# expected : 200ToDotest, feedback, contribute improvementsrework to support other environments (currently only: windows/system)
Package: kerberos-py23
This is a small modification to the PyKerberos project making it usable with python3/python2.
The original source is athttp://trac.calendarserver.org/browser/PyKerberos/trunk?rev=14295.This Python package is a high-level wrapper for Kerberos (GSSAPI) operations.
The goal is to avoid having to build a module that wraps the entire Kerberos.framework,
and instead offer a limited set of functions that do what is needed for client/server
Kerberos authentication based on <http://www.ietf.org/rfc/rfc4559.txt>.
Package: kerberos-sspi
kerberos-sspiThis Python package is API level equivalent to the kerberos python
package but instead of using the MIT krb5 package it uses the windows
sspi functionality. That allows your server and/or client that uses the
kerberos package to run under windows by alternatively loading
kerberos-sspi instead of the kerberos package.(If you use python with cygwin you probably just use the original
kerberos package with a compiled MIT kerberos package.)How to use itHere is an example:try:importkerberosaskexcept:importkerberos_sspiaskfrombase64importencodestring,decodestringflags=k.GSS_C_CONF_FLAG|k.GSS_C_INTEG_FLAG|k.GSS_C_MUTUAL_FLAG|k.GSS_C_SEQUENCE_FLAGerrc,client=k.authGSSClientInit("test@vm-win7-kraemer",gssflags=flags)# to run a kerberos enabled server under my account i do as domain admin:#  setspn -A test/vm-win7-kraemer MYDOMAIN\kraemer# (might have to wait a few minutes before all DCs in active directory pick it up)errs,server=k.authGSSServerInit("test@vm-win7-kraemer")cres=sres=k.AUTH_GSS_CONTINUEresponse=""round=0whilesres==k.AUTH_GSS_CONTINUEorcres==k.AUTH_GSS_CONTINUE:ifcres==k.AUTH_GSS_CONTINUE:cres=k.authGSSClientStep(client,response)ifcres==-1:print("clientstep error")breakresponse=k.authGSSClientResponse(client)ifsres==k.AUTH_GSS_CONTINUE:sres=k.authGSSServerStep(server,response)ifsres==-1:print("serverstep error")breakresponse=k.authGSSServerResponse(server)print("round:",round)print("server status :",sres)print("client status :",cres)round+=1ifsres==k.AUTH_GSS_COMPLETEandcres==k.AUTH_GSS_COMPLETE:print("client: my username:",k.authGSSClientUserName(client))print("server: who authenticated to me:",k.authGSSServerUserName(server))print("server: my spn:",k.authGSSServerTargetName(server))else:print("failed!")What’s not workingThe methods:changePasswordgetServerPrincipalDetailsare not implemented and throw an exceptionThe flags:GSS_C_ANON_FLAGGSS_C_PROT_READY_FLAGGSS_C_TRANS_FLAGare not supported (and are not defined either so aceessing them will
throw an exception as well). Why? I couldn’t find corresponding
ISC_REQ_* for these flags…
Package: kerbitat
KerbitatKerbitat is a profiling tool for pridicting running time of a DNN model on NVIDIA GPUs.
It can predict the performance of the target GPU from the profiling result of the source GPU.How it worksKerbitat use KernelProfiler from habitat to get mangled kernel names of running DNN model.Kerbitat convert the mangled kernel names to feature vector.Kerbitat use a trained model to predict the performance of the target GPU from the
feature vector.Kerbitat use the predicted performance to estimate the execution time of the target GPU.
A Big Thanks to habitat team for providing KernelProfiler and all the other great thoughts.How to usefromkerbitatimportKerbitat,GPU_TYPE...# your own codekerbitat_instance=Kerbitat(GPU_TYPE.A40)kerbitat_instance.profiling(lambda:train_one_step(model,optimizer,x,y))kerbitat_instance.get_target_time(GPU_TYPE.RTX2080Ti)# 0.03143 sec per mini batch predicted on GPU RTX 2080 Tikerbitat_instance.convert_rate(GPU_TYPE.M40)# The execution time on GPU M40 is 4.722 times longer than on GPU A40AcknowledgementThis work is based on CentML'sHabitat, A very big thanks to them.DeepView.Predict (aka Habitat) began as a research project in the EcoSystem Group at the University of Toronto. The accompanying research paper appeared in the proceedings of USENIX ATC'21. If you are interested, you can read a preprint of the paper here.@inproceedings{habitat-yu21,author={Yu, Geoffrey X. and Gao, Yubo and Golikov, Pavel and Pekhimenko,Gennady},title={{Habitat: A Runtime-Based Computational Performance Predictor forDeep Neural Network Training}},booktitle={{Proceedings of the 2021 USENIX Annual Technical Conference(USENIX ATC'21)}},year={2021},}
Package: kerblaxion
KERBLAXIONSpace Invaders + Galaxian CloneInstallationKERBLAXION currently requiresPython 3.10. In theory, it will also work with newer versions of Python afterpygame's incompatibilities with Python 3.11 have been fixed.The latest stable version of KERBLAXION is available onpypi, which means it can be installed with eitherpiporpipx. We recommend usingpipxbecause it will install the game within its own isolated environment:pipxinstallkerblaxionAfterwards, you can run the game via:kerblaxion
Package: kerbrute
kerbruteAn script to perform kerberos bruteforcing by using the Impacket library.When is executed, as input it receives a user or list of users and a password or list of password. Then is performs a brute-force attack to enumerate:Valid username/passwords pairsValid usernamesUsernames without pre-authentication requiredAs a result, the script generates a list of valid credentials discovered, and the TGT's generated due those valid credentials.InstallationFrom pypi:pip3 install kerbruteFrom repo:git clone https://github.com/TarlogicSecurity/kerbrute
cd kerbrute
pip install -r requirements.txtUseHelp without arguments:root@kali:~#kerbrute
Impacketv0.9.18-Copyright2018SecureAuthCorporation

usage:kerbrute.py[-h][-debug](-userUSER|-usersUSERS)[-passwordPASSWORD|-passwordsPASSWORDS]-domainDOMAIN[-dc-ip<ip_address>][-threadsTHREADS][-outputfileOUTPUTFILE][-no-save-ticket]optionalarguments:-h,--helpshowthishelpmessageandexit-debugTurnDEBUGoutputON-userUSERUsertoperformbruteforcing-usersUSERSFilewithuserperline-passwordPASSWORDPasswordtoperformbruteforcing-passwordsPASSWORDSFilewithpasswordperline-domainDOMAINDomaintoperformbruteforcing-dc-ip<ip_address>IPAddressofthedomaincontroller-threadsTHREADSNumberofthreadstoperformbruteforcing.Default=1-outputfileOUTPUTFILEFiletosavediscovereduser:password-no-save-ticketDonotsaveretrievedTGTswithcorrectcredentials

Examples:./kerbrute.py-usersusers_file.txt-passwordspasswords_file.txt-domaincontoso.comExample of execution:root@kali:~#kerbrute-domainjurassic.park-usersusers.txt-passwordspasswords.txt-outputfilejurassic_passwords.txt
Impacketv0.9.18-Copyright2018SecureAuthCorporation[*]Stupendous=>triceratops:Sh4rpH0rns[*]SavedTGTintriceratops.ccache[*]Validuser=>velociraptor[NOTPREAUTH][*]Validuser=>trex[*]Saveddiscoveredpasswordsinjurassic_passwords.txt
Package: kerch
KerchKerch is a Python package meant for various kernel methods, and in particular Deep Restricted Kernel Machines. You can natively perform SVMs, LS-SVMs, (K)PCA with various kernels, automatic centering, out-of-sample, etc.The package is built on PyTorch and supports GPU acceleration.ExamplesLS-SVMInstallationPIPFrom sourceAcknowledgementsResourcesLicenseExamplesTraining and plotting an LS-SVMThis is done by first instantiating a model, setting its dataset, searching for the hyperparameters, fitting with those
parameters and plotting. The implementation can be foundhere.mdl=kerch.model.LSSVM(type="rbf",# kernel typerepresentation="dual")# initiate modelmdl.set_data_prop(data=data,# datalabels=labels,# corresponding labelsproportions=[1,0,0])# initiate datasetmdl.hyperopt({"gamma","sigma"},# define which parameters to tunemax_evals=500,# define how many trialsk=10)# 10-fold cross-validationmdl.fit()# fit the optimal parameters foundkerch.plot.plot_model(mdl)# plot the model using the built-in methodOut-of-sample kernels with normalization and centeringThe factory class alows for the fast instantiation of various implemented kernels. Centering and normalization are
options to choose from and the out-of-sample will also satisfy these properties, based on statistics relative ti the
sample. You can easily use numpy arrays ore even python builtins such asrange(). An implementation can be foundheresample=np.sin(np.arange(0,15)/np.pi)+.1oos=np.sin(np.arange(15,30)/np.pi)+.1k=kerch.kernel.factory(type="polynomial",sample=sample,center=True,normalize=True)k.K# = k.k()k.k(y=oos)k.k(x=oos)k.k(x=oos,y=oos)InstallationAs for now, there are two ways to install the package.PIPUsing pip, it suffices to runpip install kerch. Just rerun this command with the suffix--upgradeto upgrade the package to its newest version.From sourceYou can also install the package directly from the GitHub repository.git clone --recursive https://github.com/hdeplaen/kerch
cd kerch
pip install -e .ResourcesDocumentationE-DUALITY: ERC Adv. Grant website.ESAT-STADIUS: KU Leuven, Department of Electrical Engineering (ESAT), STADIUS Center for
Dynamical Systems, Signal Processing and Data Analytics.ContributorsThe contributors and acknowledgements can be found in theCONRIBUTORSfile.LicenseKerch has a MIT license, as found in theLICENSEfile.
Package: kerchunk
kerchunkCloud-friendly access to archival dataKerchunk is a library that provides a unified way to represent a variety of chunked, compressed
data formats (e.g. NetCDF, HDF5, GRIB),
allowing efficient access to the data from traditional file systems or cloud object storage.
It also provides a flexible way to create
virtual datasets from multiple files.  It does this by extracting the byte ranges,
compression information and other information about the
data and storing this metadata in a new, separate object.  This means that you can
create a virtual aggregate dataset over potentially many source
files, for efficient, parallel and cloud-friendlyin-situaccess without having to copy or
translate the originals. It is a gateway to in-the-cloud massive data processing while
the data providers still insist on using legacy formats for archival storage.Why Kerchunk:We provide the following things:completely serverless architecturemetadata consolidation, so you can understand a many-file dataset (metadata plus physical storage) in a single readread from all of the storage backends supported by fsspec, including object storage (s3, gcs, abfs, alibaba), http,
cloud user storage (dropbox, gdrive) and network protocols (ftp, ssh, hdfs, smb...)loading of various file types (currently netcdf4/HDF, grib2, tiff, fits, zarr), potentially heterogeneous within a
single dataset, without a need to go via the specific driver (e.g., no need for h5py)asynchronous concurrent fetch of many data chunks in one go, amortizing the cost of latencyparallel access with a library like zarr without any lockslogical datasets viewing many (>~millions) data files, and direct access/subselection to them via coordinate
indexing across an arbitrary number of dimensionsFor further information, please seethe documentation.
Package: kerdokustats
KerdokuBot Stats Package.InstallationTo install KerdokuStats:$ pip install kerdokustatsExample code:fromkerdokustatsimportkerdokuguilds=kerdoku().guilds#Show bot guilds countusers=kerdoku().users#Show bot users counttime=kerdoku().time#Show bot LSRTprint(guilds)print(users)print(time)If you have a question or idea, go to KerdokuBot technical support server.https://kerdokuds.ml
Package: kerefcord
# kerefcord.pyA modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python.Future Of kerefcordKerefcord is a new Python library/lib simular to discord.py
kerefcord.py is made by KerefKey FeaturesModern Pythonic API usingasyncandawait.Proper rate limit handling.Optimised in both speed and memory.InstallingPython 3.8 or higher is requiredTo install the library without full voice support, you can just run the following command:# Linux/macOSpython3-mpipinstall-Ukerefcord.py# Windowspy-3-mpipinstall-Ukerefcord.pyOtherwise to get voice support you should run the following command:# Linux/macOSpython3-mpipinstall-U"kerefcord.py[voice]"# Windowspy-3-mpipinstall-Ukerefcord.py[voice]To install the development version, do the following:$gitclonehttps://github.com/KerefDiscord/kerefcord.py$cdkerefcord.py$python3-mpipinstall-U.[voice]Optional PackagesPyNaCl(for voice support)Please note that on Linux installing voice you must install the following packages via your favourite package manager (e.g.apt,dnf, etc) before running the above commands:libffi-dev (orlibffi-develon some systems)python-dev (e.g.python3.6-devfor Python 3.6)Quick ExampleimportkerefcordclassMyClient(discrap.Client):asyncdefon_ready(self):print('Logged on as',self.user)asyncdefon_message(self,message):# don't respond to ourselvesifmessage.author==self.user:returnifmessage.content=='ping':awaitmessage.channel.send('pong')client=MyClient()client.run('token')Bot Exampleimportkerefcordfromkerefcord.extimportcommandsbot=commands.Bot(command_prefix='>')@bot.command()asyncdefping(ctx):awaitctx.send('pong')bot.run('token')You can find more examples in the examples directory.LinksDocumentationOfficial Discord ServerDiscord API
Package: keres
IntroductionKeres is a Bayes filter for amyloid fibrillogenesis fluorimetry data
and a suite to test the filter.The test suite requires thecopasi simulator.Home Page & RepositoryHome Page:http://pypi.python.org/pypi/keres/Repository:https://github.com/jcstroud/keres.gitDocumentation:http://pythonhosted.org/keres/ExampleAn example of use is in the “examples” directory.
There are two ways to try the example.Change to the directory and run the command:./test-bayes settings.cfgInstall the package, ensuring that the bin directory
of your pythong install is in your path:bayestest settings.cfg
Package: kerfed.client
kerfed.clientA client for the Kerfed Engine which reliably analyzes 2D or 3D CAD geometry into a well-defined data structure. It can be used for many applications, including e-commerce, robotic automation, and process analysis.Check out an API demo which converts a mesh into a full milling plan with G-code atCarveWizard.Installpip install kerfed.clientQuick Startimportosimportkerfed.clientaskeif__name__=="__main__":# create a clientclient=ke.EngineClient(api_key="kerfed_api_key_here")# Generate a GeometryRequestfilename="tray.stl.zip"withopen(filename,"rb")asf:request=ke.GeometryRequest(source=ke.FileBlob(name=filename,data=f.read(),),source_units="inches",)# Start the geometry request running in the cloud.task_id=client.geometry_start(request,upload=True)# This will either return a `GeometryReponse` or raise an error.response=client.geometry_result(task_id=task_id)
Package: kerfed.protos
kerfed.protosKerfed APIs all consume and produce data defined as Protobuf 3 messages or theJSON mappingof these messages. The message definitions and documentation can be found onbuf.build. Bindings for Typescript and Python are available through the default packaging systems:npm add@kerfed/protospip installkerfed.protosAll APIs consuming and emitting JSON use thepreserving_proto_field_nameoption which prevents field names likegeom_idfrom being mapped togeomId, and theuse_integers_for_enumsoption. Most users of the REST interface should use client libraries likekerfed.clientinstead of this package.from google.protobuf.json_format import MessageToJson
json = MessageToJson(request, 
                     preserving_proto_field_name=True,
                     use_integers_for_enums=True)
Package: kerfex
kerfexGeneric feature extraction usingkeras pre-built CNN'swith imagenet weights.Getting StartedDependenciesYou need Python 3.7 or later to runkerfex. You can find it atpython.org.You aso need pandas, numpy, keras and tensorflow packages, which is available fromPyPI. If you have PyPI, run:pip install pandas numpy keras tensorflowInstallationClone this repo to your local machine using:git clone https://github.com/caiocarneloz/kerfex.gitOr install it using pip:pip install kerfexUsageThedemo.pyfile shows a simple example using VGG16 with threeUnsplashimages from the authors@mybibimbaplife,@davidbraud, and@analoglugunler. The "extract" function requires:CNN instance itselfCNN pre-processing moduleList of imagesImages shapeAs return, the function will send a pandas Dataframe containing the numerical features extracted from every image, where each line represents a single image and each column represents a single feature:0          1          2   ...      15599     15600     15601
	
0  	 0.000000   0.000000   0.000000   ...   0.000000  0.000000  3.754401
1  	 0.000000  15.284859  37.369953   ...  22.756908  6.398854  0.000000
2  	12.172541   0.000000   0.000000   ...   0.000000  0.000000  0.000000
Package: kerground
kergroundStupid simple background worker based on python.Kergroundis super basic - no need for Redis/RabbitMQ. It does not utilize to much RAM because events are saved in plain old json files.QuickstartInstallpipinstallkergroundIn your app folder create a new package calleddependencies(you can add this inutilsor whatever you consider fit otherwise)#app/dependencies/kerground.pyfromkergroundimportKergroundker=Kerground()You can set onKergroundthe following params:tasks_path- path where theeventswill be saved by default in "./.kergroundtasks";pool- wait in seconds for pending tasks;Nextregisteryour background workers like:#some_module_.pyfromapp.dependenciesimportker@ker.register(ker.MODE.THREAD,max_retries=3)defconvert_files(event:list[str]):pass# some heavy duty stuff here# or just go with the defaults@ker.registerdefconvert_files_v2(event:list[str]):pass# some heavy duty stuff hereTheeventmust be json serializable!There are 3 mode available:ker.MODE.THREAD- distribute events withthreading.Threadif you have urls to wait;ker.MODE.PROCESS- (default) distribute events withmultiprocessing.Processif you have some CPU intensive tasks;ker.MODE.SYNC- distribute events one by one for the func to process;By defaultmax_retriesis0you can increase this number if you need to get data from some urls and there is a posibility they will fail.Now you can send an event to background worker (kerground) like:#some_other_module_possible_route_handler.pyfromapp.dependenciesimportkerdefsend_files_for_conversion(files:List[UploadFile]):filepaths=[file.filenameforfileinfiles]msgid=ker.enqueue("convert_files",filepaths)returnf"Files were sent for conversion with id:{msgid}"Pass toker.enqueuethe function name you want to call in background along with the json parsable *args and **kwargs. Functionker.enqueuewill return an id which you can later inspect for it's status withker.check_status(msgid).Prepare theworker.pyfile:# ./worker.pyfromapp.dependenciesimportkerif__name__=="__main__":ker.listen()You can check theexamplefolder which was used for tests.DashboardKerground offers a small dashboard in which you can see the functions registered and their status count in a table.
To see the dashboard create a new fileworker_dashboard.pyand add the following code:#./worker_dashboard.pyfromapp.dependenciesimportkerif__name__=="__main__":ker.dashboard()Go tohttp://localhost:3030/to see the dashboard.The data used to fill the tasks table from the dashboard is taken by calling function:ker.get_current_tasks().
You are free to create a custom endpoint in your choosed web framework and call that func.
More features will be added soon.Submit any questions/issues you have! Fell free to fork it and improve it!
Package: kermout-strips-api
fsATC Kermout Strips APIUsed to interact with Kermout's fsATC Strips System remotely. Here it is onPyPI!.How do I get it?Install using pip or check out the release page!pipinstallkermout-strips-apiCheck out the tests for an example of how it works!Typical usagefromkermout_strips_apiimportPlanplan={'Callsign':'UAL256','Aircraft':'B737','Flight_Rules':'IFR','Departure':'KSAN','Arrival':'KJFK','Altitude':'5000','Routes':'DCT GPS','remarks':'bout to go vertical',}s=Plan(plan)s.filePlan()s.startLoop()inp=input("Stop?\n")print("")s.stopLoop()s.deletePlan()