Saravanan666/pypi-org huggingface dataset:
Package: ksu
KSU Compression Algorithm ImplementationAlgortihm 1 fromNearest-Neighbor Sample Compression: Efficiency, Consistency, Infinite DimensionsInstallationWith pip:pip install ksuFrom source:git clone --depth=1 https://github.com/nimroha/ksu_classifier.gitcd ksu_classifierpython setup.py installUsageCommand LineThis package provides two command line tools:e-netandksu:e-netconstructs anepsilon netfor a given epsilonksuruns the full algorithmBoth provide the -h flag to specify the arguments, and both can save the result to the disk innumpy's .npzformatCodeThis package provides a classKSU(Xs, Ys, metric, [gram, prune, logLevel, n_jobs])XsandYsare the data points and their respective labels asnumpy  arraysmetricis either a callable to compute the metric or a string that names one of our provided metrics (printKSU.METRICS.keys()for the full list)gram(optional, default=None)a precomputedgramian matrix, will be calculated if not provided.prune(optional, default=False)a boolean indicating whether to prune the compressed set or not (Algorithm 2 fromNear-optimal sample compression for nearest neighbors)logLevel(optional, default='CRITICAL')a string indicating the logging level (set to 'INFO' or 'DEBUG' to get more information)n_jobs(optional, default=1)an integer defining how many cpus to use (scipy logic), pass -1 to use all. For n_jobs below -1, (n_cpus + 1 + n_jobs) are used. Thus for n_jobs = -2, all CPUs but one are used.KSUprovides a methodcompressData([delta, minCompress, maxCompress, greedy, stride, logLevel, numProcs])Which selects the subset with the lowest estimated error with confidence1 - delta. Can take arguments:delta(optional, default=0.1)confidence for error upper boundminCompress(optional, default=0.05)minimal compression ratiomaxCompress(optional, default=0.1)maximum compression ratiogreedy(optional, default=True)whether to use greedy or hierarichal strategy for net constructionstride(optional, default=200)how many gammas to skip between each iteration (since similar gammas will produce similar nets)logLevel(optional, default='CRITICAL')a string indicating the logging level (set to 'INFO' or 'DEBUG' to get more information)numProcs(optional, default=1)number of processes to useYou can then rungetClassifier()which returns a 1-NN Classifer (based onsklearn's K-NN) fitted to the compressed data.Or, rungetCompressedSet()to get the compressed data as a tuple of numpy arrays(compressedXs, compressedYs).Seescripts/for example usageBuilt-in metrics['chebyshev', 'yule', 'sokalmichener', 'canberra', 'EarthMover', 'rogerstanimoto', 'matching', 'dice', 'EditDistance', 'braycurtis', 'russellrao', 'cosine', 'cityblock', 'l1', 'manhattan', 'sqeuclidean', 'jaccard', 'seuclidean', 'sokalsneath', 'kulsinski', 'minkowski', 'mahalanobis', 'euclidean', 'l2', 'hamming', 'correlation', 'wminkowski']
Package: ksubscribe
ksubscribePython-Event-Based-Programming-MethodologyKsubscribe library for Python CodersThis is a library that help python coder to run event-based methodology.You can subscribe an event from object to another object. Ksubscribe library is designed withSingleton design pattern. So, if you create more that one Ksubscribe object, the all object is actuallysame object.!!!!Firstly, subscriber can subscribe an any event that is created before.  After this operation, subscriber classmust have inform functions.You can see the inform function in below. Subscribed classc can send only one parameter that can be list, dict etc.def inform(self,eventName,parameters=None)You can publish the event from subscriber like this fromsubscribed classself.slaveEventObject = Ksubscribe()
    def eventTwoSecond(self):
        self.slaveEventObject._publish(eventName="everyTwoSecond")The ksubscribe library has these function that is mentioned in below.def _subscribeForAnEvent(self,subscriber,eventName:str)
       If this function returns True, subsciption is built.
       If this function returns False, subscription is not built.


    def _createAnEvent(self, eventName:str)
       If this function returns True, event is created.
       If this function returns False, event is not created.


    def _publish(self,eventName:str,parameters=None)
        This function does not return any value.


    def _removeAnEvent(self,eventName:str)
        If this function returns True, event is removed from event list.
        If this function returns False, event is not removed from event list


    def _removeAllEvents(self)
        If this function returns True, all events are removed.
        If this function returns False, all events are not removed.
    

    def _removeSubscriberFromEvent(self,subscriber, eventName:str)
        If this function returns True, subscriber is removed from event's subscriber list.
        If this function returns False, subscriber is not removed from event's subscriber list.You can checkexample usageIf you have any question, send mail tome
Package: ksu-sso-auth
Установкаpip install ksu-sso-authНастройкаВ settings проекта добавить:'sso_auth' в INSTALLED_APPSПосле этого выполнить командыpython3 manage.py makemigrations sso_auth
python3 manage.py migrateДобавить в urls.py проекта в переменную urlpatterns выше всего остального следующий код:path('admin/login/', AdminLogin.as_view()),
path('admin/logout/', UserLogout.as_view()),
path('sso/', include('sso_auth.urls')),До этого сделать импорт:from django.urls import path, include
from sso_auth.views import AdminLogin, UserLogoutВ settings проекта добавить:'sso_auth.middleware.OauthMiddleware' в MIDDLEWAREкод ниже. нужно заполнить реальными данными от сервера авторизации# settings for sso login
AUTH_USER_MODEL = 'sso_auth.OauthUser'
AUTHENTICATION_BACKENDS = ('sso_auth.backends.TokenAuth',)
SSO_URL = 'http://127.0.0.1:8000/oauth/'
CLIENT_ID = '1bc2aea0-4dad-4f4a-9f3d-4e205b0fc10a'
CLIENT_SECRET = 'Zo8DtoPgu6m533ySFDfBImo0Lao_sh50dxE-EAHJCkwCrNvaPztIsOQaxdB0nKrX11o'
REDIRECT_URI = 'http://127.0.0.1:8001/sso/process'
Package: ksv
decodes/encodes entire Kubernetes secrets filesFree software: Apache Software License 2.0Installationpip install ksv
# or pip3, ksv requires Python 3UsageDecoding all secret values:ksv < some_secrets_file_with_base64_encoded_data_values.yamlEncoding all secret values:ksv --encode < some_secrets_file_with_plaintext_data_values.yamlRound trip:ksv < test.yaml | ksv --encodeCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2018-02-21)First release on PyPI.
Package: ksvmlib
kSVMlibKernel SVM library based on sklearn and GPlib.
Provides similar functionality to GPlib for SVMs.Setup kSVMlibCreate and activate virtualenv (for python2) or
venv (for python3)# for python3python3-mvenv.env# or for python2python2-mvirtualenv.envsource.env/bin/activateUpgrade pippython-mpipinstall--upgradepipInstall kSVMlib packagepython-mpipinstallksvmlibUse kSVMlibImport kSVMlib to use it in your python script.importksvmlibGenerate some random data.importnumpyasnpdata={}data['X']=np.vstack((np.random.multivariate_normal([1,1],[[1,0],[0,1]],100),np.random.multivariate_normal([3,3],[[1,0],[0,1]],100)))data['Y']=np.vstack((np.ones((100,1)),np.zeros((100,1)),))validation=ksvmlib.dm.RandFold(fold_len=0.2,n_folds=1)train_set,test_set=validation.get_folds(data)[0]Initialize the KSVM model and a metric to measure the results.model=ksvmlib.KSVM(ksvmlib.ker.SquaredExponential())accuracy=ksvmlib.me.Accuracy()Fit the model to the data.fitting_method=ksvmlib.fit.GridSearch(obj_fun=accuracy.fold_measure,max_fun_call=300)train_validation=ksvmlib.dm.RandFold(fold_len=0.2,n_folds=3)log=fitting_method.fit(model,train_validation.get_folds(train_set))print("Fitting log:{}".format(log))Finally plot the results.print("Accuracy:{}".format(accuracy.measure(model,train_set,test_set)))ksvmlib.plot.kernel_sort_data(model,test_set)There are more examples in examples/ directory. Check them out!Develop kSVMlibUpdate API documentationsource./.env/bin/activatepipinstallSphinxcddocs/sphinx-apidoc-f-o./../ksvmlib
Package: ksx1026
Python implementation for KS X 1026-1.KS X 1026-1KS X 1026-1 is a Korean standard for Hangul processing guide for
information interchange. More informations are availablehere.InstallationKS X 1026 Python is available via PyPipip install ksx1026or setup.pypython setup.py installNormalizationsHangul DecompositionReturns a Johab Modern Hangul Syllable Block for the given Wanseong
Modern Hangul Syllable Blockchar S: Single character Hangul Syllable. If not, return input.>>> from ksx1026.normalization import decomposeHangul
>>> c = "\uAC01"
>>> d = decomposeHangul(c)
>>> print(d.encode('raw_unicode_escape'))
b'\\u1100\\u1161\\u11a8'Hangul CompositionReturns a Wanseong Modern Hangul Syllable Block for the given Johab
Modern Hangul Syllable Block. Even when a portion of an Old Hangul
Syllable Block is a Modern Hangul Syllable Block,unlike UAX #15, that
portion is not transformed to a Wanseong Modern Hangul Syllable Block.string source: unicode string.>>> from ksx1026.normalization import composeHangul
>>> source = "\u1100\u1161\u11a8"
>>> d = composeHangul(source)
>>> print(d.encode('raw_unicode_escape'))
b'\\uac01'
>>> source = "\u1100\u1161\u11c3"
>>> d = composeHangul(source)
>>> print(d.encode('raw_unicode_escape'))
b'\\u1100\\u1161\\u11c3'Hangul RecompositionIf one uses a UAX #15 algorithm instead of the above composeHangul
function for normalization, an Old Hangul Syllable Block can be
decomposed into a Wanseong Modern Hangul Syllable Block and Johab Hangul
Letter(s). In such cases, after applying, one can use the following
recomposition algorithm to restore a character string in Normalization
Form NFC or NFKC to an L V T format.string source: unicode string>>> from ksx1026.normalization import recomposeHangul
>>> source = "\uac00\u11c3"
>>> d = recomposeHangul(source)
>>> print(d.encode('raw_unicode_escape'))
b'\\u1100\\u1161\\u11c3'Normalization of Compatibility/Halfwidth Hangul Letters and Hangul-embedded symbolsNormalizing Compatibility/Halfwidth Hangul Letters and Hangul-embedded
symbols (NormalizeJamoKDKC)string source: unicode string>>> from ksx1026.normalization import normalizeJamoKDKC
>>> source = "\u3200"
>>> d = normalizeJamoKDKC(source)
>>> print(d.encode('raw_unicode_escape'))
>>> b'(\\u1100\\u1160)
Package: ksylint
ksylintCheck kaitai .ksy files for errors and style flaws.InstallationpipinstallksylintUsageksylinthello_world.ksyMissing style guide tests (TODO)General formattingUse block YAML style in most general cases, unless explicitly specified/allowed otherwise.Formatting of maps-inside-sequences MUST have - delimiter and first map element on the same first line.Meta section (meta)xref — keys inside MUST be in alphabetic orderlicense — MUST be a valid SPDX license expressionks-version — SHOULD list lowest possible KS compiler version that is able to compile this file.KS syntax allows usage of some top-level elements deep inside the hierarchy — this can be useful during development, for example, for purpose of grafting one .ksy file into another quickly. However, in production-quality .ksy files, one MUST NOT use keys like title, imports or ks-version (i.e. everything except explicitly listed in a list above) on intermediate levels.The following keys are reserved for internal use (i.e. debugging and test running) and MUST NOT be used in general-purpose .ksy files: ks-debug, ks-opaque-typesDocumentationSingle-line documentation strings SHOULD BE formatted using raw unquoted string literals.Multi-line SHOULD BE formatted using YAML literal style scalar, i.e. using : | syntax.Lines should be wrapped to be 80 columns long. If it doesn’t fit into single line after wrapping, then it’s a multi-line docstring, so use proper multi-line syntax.There is no formal conversion of docstrings into language-specific docstrings now in KS, but generally we SHOULD keep it close to CommonMark formatting, i.e.:paragraphs separated by an empty linebullet lists created by an asterisk * and a space at the beginning of the lineuse backticks ` to wrap identifiers and small pieces of codeSequence attributesAttribute identifiersTrailing paddingNot checkedAll identifiers, docstrings, comments and generally all human-readable text SHOULD be kept in English, unless there’s a very good reason not to do so.application — SHOULD name a particular application, if there’s any; if there are too many to list (for example, network packet formats or executables are used virtually everywhere), then one SHOULD omit this field.file-extension — if there’s only one extension, MUST be a string; if there are several, MUST be an sequence in block form and SHOULD order extensions from most popular extension to least popular.
Package: kt17py
kt17pyA Python wrapper to the FORTRAN code for the KT17 dynamic magnetic field model for Mercury's magnetosphere.See Korth, H., Johnson, C. L., Philpott, L.,Tsyganenko, N. A., & Anderson, B. J.(2017). A dynamic model of Mercury’s
magnetospheric magnetic field. Geophysical Research Letters, 44.https://doi.org/10.1002/2017GL074699How to useimportnumpyasnpfromkt17py.kt17import*kt17=Kt17(0.39,50.0)xyz_msm=np.array([[-2.0,0.0,0.5]])b_msm=kt17.bfield(xyz_msm)Testing buildsSince kt17py contains Fortran files that need to be compiled before use, the tests are currently run against the version
of kt17py (if any) found on current PYTHONPATH.python -m unittest tests/kt17.py
Package: ktagz
KTagZ-------------A command line program for Linux that can add tags, description to a file andallows you to perform a full text search on those tags to search for files.### NoteThis package is for demonstration purposes only. A full fledged package is yet to come. Please raise issues on github. And feel free to fork and contribute.### Installation1. You need xapian to run. So install usingsudo apt-get install python-xapian libxapian-dev2. Install via ppa (Precise, Saucy, Trusty)sudo add-apt-repository ppa:kkantnaik/ppasudo apt-get updatesudo apt-get install ktagzORInstall in a virtual environmentvirtualenv --system-site-packages venvsource venv/bin/activatepip install ktagz### Running Examples1. Getting Helpkhirod@kurosaki:~/Documents/KTagZ$ ktagz -husage: ktagz [-h] [-f FILENAME] [-st] [-sd] [-sn]optional arguments:-h, --help            show this help message and exit-f FILENAME, --filename FILENAMEyou want to index a new file-st, --searchtags     search for a file based on tags-sd, --searchdescriptionsearch for a file based on its description-sn, --searchname     search for a file based on its name2. Indexing a File(venv)khirod@kurosaki:~/Documents/KTagZ$ ktagz -f LICENSETags [separated by a space]: licenseDescription [short description]: A GPL V3 license file(venv)khirod@kurosaki:~/Documents/KTagZ$ ktagz -f LICENSE.txtTags [separated by a space]: license ktagzDescription [short description]: A GPL V2 license file3. Index a directory recursively(venv)khirod@kurosaki:~/Documents/KTagZ$ ktagz -d tagzpackage/Tags [separated by a space]: module tagz main_moduleDescription [short description]: Tagz module that contains all the python files.4. Searching a File using tags(venv)khirod@kurosaki:~/Documents/TagZ$ ktagz -stEnter tags to be searched [space separated]: licenseResults are--------------------------------------*  File Name: LICENSE*  Description: A GPL V3 license file.*  File Path: /home/khirod/Documents/KTagZ/LICENSE*  File Tags: [u'license']*  File Name: LICENSE.txt*  Description: A GPL V2 license file.*  File Path: /home/khirod/Documents/KTagZ/LICENSE.txt*  File Tags: [u'license', u'ktagz']LICENSE appears as top result, because we gave only one tag license and that is satisfied with LICENSE whileLICENSE.txt also had 'ktagz' as a tag hence it got a lower score and appeared lower.5. Search a File using description(venv)khirod@kurosaki:~/Documents/TagZ$ ktagz -sdRough description to be searched: license V2 fileResults are--------------------------------------*  File Name: LICENSE.txt*  Description: A GPL V2 license file.*  File Path: /home/khirod/Documents/KTagZ/LICENSE.txt*  File Tags: [u'license', u'tagz']*  File Name: LICENSE*  Description: A GPL V3 license file.*  File Path: /home/khirod/Documents/KTagZ/LICENSE*  File Tags: [u'license', u'tagz']Here LICENSE.txt appears as top result because the description only LICENSE.txt had all the three words we mentionedin description while LICENSE had only two.
Package: kt-ai-commons
AI-commons IntroIt is designed to provide a reference point for AI beginners to obtain modeling and data.AI-Sample-Dataset usescautionBefore creating a dataset, be sure to create a variable with get_connection.
    And when you are done using the library, please close the connection.create a variable with get_connection('connection' is a variable name that designates a DB connection.)connection = get_connection()close the connection('connection' is a variable name that designates a DB connection.)close_connection(connection)OneNavi Driving data SampleLibrary installationpip install kt-ai-commonsTrain Dataset Loadingfrom kt_ai_commons import dataset
    df_train = dataset.onenavi_train()Evaluation Dataset Loadingfrom kt_ai_commons import dataset
    df_valid = dataset.onenavi_evaluation()PNU Dataset Loadingfrom kt_ai_commons import dataset
    df_valid = dataset.onenavi_pnu()Signal Dataset Loadingfrom kt_ai_commons import dataset
    df_valid = dataset.onenavi_signal()Weather Dataset Loadingfrom kt_ai_commons import dataset
    df_valid = dataset.onenavi_weather()Accuracy calculation functionfrom kt_ai_commons import featureCalculation
    etaa=featureCalculation.cal_etaa(df_valid,et,eta)Reference : The user is responsible for issues and problems caused by using this library.
Package: ktb
kinect-toolboxOverviewThis is a set of helper functions to make using the Microsoft Kinect V2 with python easier. Libfreenect2 provides a robust interface for the kinect but it follows a more "C++ like" design paradigm. With this wrapper the kinect can be used more like a cv2 webcam. This package provides methods to get color, depth, registered color, registered depth, and ir images, record video, get point clouds (quickly), and makes the kinect interface all around more pythonic.Credit for point cloud acceleration methods goes to stackoverflow userLogic1.InstallationInstall libfreenect2Update your paths:exportLIBFREENECT2_INSTALL_PREFIX=~/freenect2exportLD_LIBRARY_PATH=$HOME/freenect2/lib:$LD_LIBRARY_PATHInstall required python packages:pipinstall-rrequirements.txtTest installation:pythontest.pyThis package has been tested on Ubuntu 18.04 with python3.6.Usageimportcv2importktbk=ktb.Kinect()whileTrue:# Specify as many types as you want herecolor_frame=k.get_frame(ktb.COLOR)cv2.imshow('frame',color_frame)ifcv2.waitKey(1)&0xFF==ord('q'):breakMethodsKinect()The kinect class. Supports the following input arguments:params_file: Kinect parameters file or dict. Parameters file can contain the kinect intrinsic parameters and a 3D transformation (which is applied to point clouds).device_index: Use to interface with a specific device if more than one is connected.headless: If true, will allow the kinect to collect and process data without a display. Connect the Kinect to a server and collect data remotely!pipeline: Optionally pass a pylibfreenect2 pipeline that will be used with the kinect. Note that this will override the headless argument - Headless requires CUDA or OpenCL pipeline. Possible types are as follows:OpenGLPacketPipelineCpuPacketPipelineOpenCLPacketPipelineCudaPacketPipelineOpenCLKdePacketPipelineKinect.get_frame()Get a video frame from the kinect. Optionally specify a list of image types and the function will return a corresponding list of images. Available types are:Frame TypeDescriptionRAW_COLORreturns a 1920 x 1080 color imageRAW_DEPTHreturns a 512 x 424 depth image (units are mm)COLORreturns a 512 x 424 color image, registered to depth imageDEPTHreturns a 512 x 424 undistorted depth, image (units are mm)IRreturns a 512 x 424 ir imageNote that depth images have units in millimeters. To display them in a window without clipping first rescale the values:frame=frame/4500.Kinect.record()Records a video from the kinect. Halts execution and opens a cv2 window displaying a stream from the kinect while writing the stream to disk. Optionally specify any of the above frame types to record that specific stream.Kinect.get_ptcld()Get a point cloud from the kinect. Returns an point cloud of size [512, 424, 3], corresponding a grid of xyz points. Optionally return a color map derived from the registered color image.
Package: ktblast
k-t BLASTPython implementation of several k-t BLAST-like MR reconstruction
algorithms.Currently included modules are:UNFOLDk-t BLASTUsageSee examples module and doc strings – both good resources for full
arguments list and usage.# UNFOLD algorithmfromktblastimportunfoldsx,sy,st=kspace[:]recon=unfold(kspace,time_axis=-1)# k-t BLAST algorithmfromktblastimportktblastsx,sy,st=kspace[:]sx,sy,st=calib[:]recon=ktblast(kspace,calib,psi,time_axis=-1)AboutI couldn’t find any implementation of these algorithms that were
easy to get up and running in Python, so I decided to write my own.
Package: ktcal2
What’s this project?This project aims to perform a library/tool make a SSH brute force password attack that you can useas a library as a command line tool.The goal of ktcal2 is that it uses newnon-blocking I/O AsyncIO framework, includedPython 3.4.Some links:Documentation:http://ktcal2.readthedocs.org(currently not working).AsyncSSH: This project useAsyncSSHlibrary internally.LicenceThis project isBSD… Copy it! And, if you remember, please mention me in credits :)How to installPIPsudopython3.4-mpipinstallPyCryptosudopython3.4-mpipinstallktcal2kt-cal2-hManuallysudopython3.4-mpipinstallPyCryptogitclonehttps://github.com/cr0hn/ktcal2.gitktcal2cdktcal2sudopython3.4-mpip-rrequirements.txtinstallpython3.4kt-cal2.py-hHow use it?You can use this project in command line tool or as a library, in your Python projects.As a toolYou can test SSH passwords, using a wordlist or brute forcer password generation.Using wordlistBasic usage:python3.4ktcal2.py--password-wordlistmy_password_list.txt-uroot127.0.0.1Using user name wordlist:python3.4ktcal2.py--password-wordlistmy_password_list.txt--user-wordlistuser_names.txt127.0.0.1Using password wordlist brute forcektcal2 can generates all combinations of wordlist based in rules.If we want to generate all combinations, with 4 word length(–max-length 4)using onlynumbers (-N), 0000-9999:python3.4ktcal2.py-uroot--max-length4-N127.0.0.1All combinations. 2 max and minimum length, only numbers 00-99:python3.4ktcal2.py-uroot-N--max-length2--min-length2127.0.0.1All combinations. 2 max and minimum length. Using numbers, low and upper letters (00..aa..AA):python3.4ktcal2.py-uroot-N-c-C--max-length2--min-length2127.0.0.1As a libraryfromktcal2.apiimportrunfromktcal2.lib.dataimportGlobalParameters,PasswordConfigdefcustom_display(message):"""Displays debug info in a custom way"""print("----->>>%s<<<-----"%message)if__name__=="__main__":# Configure password generator, for brute forcer mode.password_config=PasswordConfig(low_chars=True,numbers=True,special=True,min_len=4,max_len=5)config=GlobalParameters(target=dst,verbosity=2,# If we wan to display infodisplay_function=custom_display,# Net optionsconcurrency=20,# Credentialsusername_list=("root"forxinrange(1)),password_config=password_config)run(config)
Package: kt-cambio
kt-cambioConversor de moedas.Pré-requisitosPython instalado e disponível no terminal de comandos.Instalaçãopip install kt-cambioUsobrlusd [--cambio <CAMBIO>] <REAL>Onde:REAL Valor em real.--cambio, -c Càmbio do dólar.Exemplo:brlusd 5000.00
909.09usdbrl [--cambio <CAMBIO>] <DOLAR>Onde:DOLAR Valor em dólar.--cambio, -c Càmbio do dólar.Exemplo:usdbrl 909.09
4999.99