Saravanan666/pypi-org huggingface dataset:
Package: cas-client
A Python CAS (Central Authentication Service) client for interfacing with a CAS
service implementation, such ashttps://github.com/rbCAS/CASinoorhttps://github.com/apereo/cas.This project provides tools for building well-formed CAS-related URLs, parsing
CAS XML payloads and managing the server-side session stores necessary for
handling SLO (single logout).InstallationSupports Python 2.7 and 3.4.$ git clone git@github.com:discogs/python-cas-client.git
$ cd python-cas-client
python-cas-client$ pip install .
...Testingcas_clientusestoxto run its unit tests under Python 2.7 and 3.4.python-cas-client$ toxExampleThe following un-tested pseudo-code shows how you might usecas_clientin a
Flask project.from cas_client import CASClient
from flask import Flask, redirect, request, session, url_for

app = Flask(__name__)

app_login_url = 'http://www.my-app.com/login'
cas_url = 'http://cas.my-app.com'
cas_client = CASClient(cas_url, auth_prefix='')

@app.route('/login')
def login():
    ticket = request.args.get('ticket')
    if ticket:
        try:
            cas_response = cas_client.perform_service_validate(
                ticket=ticket,
                service_url=app_login_url,
                )
        except:
            # CAS server is currently broken, try again later.
            return redirect(url_for('root'))
        if cas_response and cas_response.success:
            session['logged-in'] = True
            return redirect(url_for('root'))
    del(session['logged-in'])
    cas_login_url = cas_client.get_login_url(service_url=app_login_url)
    return redirect(cas_login_url)

@app.route('/logout')
def logout():
    del(session['logged-in'])
    cas_logout_url = cas_client.get_logout_url(service_url=app_login_url)
    return redirect(cas_logout_url)

@app.route('/')
def root():
    if session.get('logged-in'):
        return 'You Are Logged In'
    else:
        return 'You Are Not Logged In'This pseudo-code does not handle server-side session stores or single logout,
only the bare minimum for standard login and logout.
Package: case
Version:1.5.3Web:http://case.readthedocs.org/Download:http://pypi.python.org/pypi/case/Source:http://github.com/celery/case/Keywords:testing utilities, python, unittest, mockAboutInstallationYou can install case either via the Python Package Index (PyPI)
or from source.To install usingpip,:$ pip install -U caseTo install usingeasy_install,:$ easy_install -U caseDownloading and installing from sourceDownload the latest version of case fromhttp://pypi.python.org/pypi/case/You can install it by doing the following,:$ tar xvfz case-0.0.0.tar.gz
$ cd case-0.0.0
$ python setup.py build
# python setup.py installThe last command must be executed as a privileged user if
you are not currently using a virtualenv.Using the development versionWith pipYou can install the latest snapshot of case using the following
pip command:$ pip install https://github.com/celery/case/zipball/master#egg=case
Package: case-attribute-discovery
Case Attribute DiscoveryPython package to discover case attributes from an event log and their value distribution (stochastic if discrete, probability distribution
if continuous).Example of useimportpandasaspdfromcase_attribute_discovery.configimportDEFAULT_CSV_IDSfromcase_attribute_discovery.discoveryimportdiscover_case_attributes# Read event logevent_log=pd.read_csv("path_to_event_log.csv")# Simple callcase_attributes=discover_case_attributes(event_log=event_log,log_ids=DEFAULT_CSV_IDS)# Call specifying the columns to not take into account for case attribute analysiscase_attributes=discover_case_attributes(event_log=event_log,log_ids=DEFAULT_CSV_IDS,avoid_columns=[DEFAULT_CSV_IDS.case,DEFAULT_CSV_IDS.activity,DEFAULT_CSV_IDS.start_time,DEFAULT_CSV_IDS.end_time])# Call specifying a confidence (or noise) threshold to allow a certain noise# in the variability of the attribute along the trace:#  - For each trace, the confidence of the most frequent value is computed (i.e.#  the % of activity instances from that trace with that same value). For example,#  a trace with 8 activity instances with 'amount'=100 and 2 with 'amount'=150#  will have a confidence of 0.8.#  - The average confidence in all traces must be higher or equal to the specified#  one to consider that column a case attribute.case_attributes=discover_case_attributes(event_log=event_log,log_ids=DEFAULT_CSV_IDS,confidence_threshold=0.9)To see a more detailed example of use, and the format of the output, you can check thistest file.
Package: case-changer
A python port of the npm packagechange-case.Transform a string between camelCase, PascalCase, Capital Case, snake_case, param-case, CONSTANT_CASE and others.Free software: MIT licenseInstallationpip install case-changerYou can also install the in-development version with:pip install https://github.com/philipptempel/python-case-changer/archive/master.zipDocumentationhttps://python-case-changer.readthedocs.io/DevelopmentTo run the all tests run:toxNote, to combine the coverage data from all the tox environments run:Windowsset PYTEST_ADDOPTS=--cov-append
toxOtherPYTEST_ADDOPTS=--cov-append toxChangelog0.1.0 (2020-03-30)First release on PyPI.
Package: case_class
Zero-dependency scala-like case classes for Python 2 + 3.FeaturesSimple usage: Just inherit fromcase_class.CaseClassSimple Installation: Zero dependenciesplays well with inheritanceCaseClassandAbstractCaseClass`usable as a Mix-InCase-to-case inheritance forbidden by defaultuseAbstractCaseClassto allow only subclasses to be instantiateduseInheritableCaseClassto override allow both super and
subclasses to be instantiated.`also plays well with Multiple Inheritance
*super()calls still work as expectedequality based on argumentscalls constructor only once per combination of argumentsworks with==operator andis(referential equality) operator.automaticrepr()functionworks in both Python 2 and Python 3!InstallThis package is published on thePython Package IndexInstallation can be done simply via pip:pipinstallcase_classAlternatively, clone this repository and run setup.py:gitclonehttps://github.com/tkw1536/PythonCaseClasspythonsetup.pyinstallExamples# Import the CaseClass modulefromcase_classimportCaseClass# Create a symbol case classclassSymbol(CaseClass):def__init__(self,name):self.name=name# Create an instancex=Symbol("x")print(x)# Symbol('x')# And create another onealso_x=Symbol('x')print(x==also_x)# equality via operatorprint(xisalso_x)# referential equalityAnother example can be found inexample.py.License + AcknowledgementsThis module and associated documentation is Copyright (c) Tom Wiesing 2016
and licensed under the MIT license, seelicensefor details. Small
parts of the code are adapted from thesixmodule, which is Copyright (c) 2010-2015 Benjamin Peterson.
Package: case-convert
Convert CaseCross-language library to convert case with permissive inputs.Language supportedThe library is available in:jspythonCode examplesCode example: JavaScriptimport{camelCase}from"../src/index";camelCase("helloGreat world");// helloGreatWorldcamelCase("__hello Great--world");// helloGreatWorldCode example: Pythonfromcase_convertimportcamel_casecamel_case("helloGreat world")# helloGreatWorldcamel_case("__hello Great--world")# helloGreatWorldCases supportedThe library can convert to the following cases:camelkebabpascalsnakeupperIssues/Bug report or improvement ideashttps://gitlab.com/olive007/case-convert/-/issuesLicenseGNU Lesser General Public License v3 or later (LGPLv3+)
Package: case-converter
Case ConverterA robust python package for transforming string cases such asHello, world!intohelloWorld(camelcase).General usagefromcaseconverterimportcamelcasecamelcase("Hello, world!")# output: helloWorldDelimeter behaviorIf multiple delimeter characters are identified next to eachother they will be considered as a single delimeter. For example,-_contains 2 different delimeter characters and is considered a single delimeter.Available conversionscamelcasefromcaseconverterimportcamelcasecamelcase("Hello, world!")helloWorldcobolcasefromcaseconverterimportcobolcasecobolcase("Hello, world!")HELLO-WORLDflatcasefromcaseconverterimportflatcaseflatcase("Hello, world!")helloworldkebabcasefromcaseconverterimportkebabcasekebabcase("Hello, world!")hello-worldmacrocasefromcaseconverterimportmacrocasemacrocase("Hello, world!")HELLO_WORLDAdditional optionsdelims_only : bool- Only consider delimiters as boundaries (default:False).pascalcasefromcaseconverterimportpascalcasepascalcase("Hello, world!")HelloWorldsnakecasefromcaseconverterimportsnakecasesnakecase("Hello, world!")hello_worldOptions for all conversionsStripping punctuationPunctuation is stripped when doing a case conversion. However, should you
wish to keep the punctuation you can do so by passingstrip_punctuation=False.camelcase("Hello, world!",strip_punctuation=False)# output: hello,World!Delimeter customizationDefault delimiters used to denote a token boundary.DELIMITERS=" -_"You can passdelimsto each case conversion function to specify a custom
set of delimiters.# Use a pipe `|` as the only delimiter.camelcase("Hello,|world!",delims="|")# output: helloWorldBoundaries definitionsNameDescriptionOnDelimeterUppercaseNextOn a delimieter, upper case the following characterOnDelimeterLowercaseNextOn a delimeter, lower case the following characterOnUpperPrecededByLowerAppendUpperOn an upper case character followed by a lower case character, append the upper case characterOnUpperPrecededByLowerAppendLowerOn an upper case character preceeded by a lower case character append the lower case characterOnUpperPrecededByUpperAppendJoinOn an upper case caharacter preceeded by an upper append the join character. Join characters are context dependent. Example: macro cast join character is_OnUpperPrecededByUpperAppendCurrentOn an upper case character preceeded by an upper case character append the upper case characterContributingWrite clean code.Write new tests for new use-cases.Test your code before raising a PR.Useblackto format your code.
Package: case-convertor
Case ConverterA robust python package for transforming string cases such asHello, world!intohelloWorld(camelcase).General usagefromcaseconverterimportcamelcasecamelcase("Hello, world!")# output: helloWorldDelimeter behaviorIf multiple delimeter characters are identified next to eachother they will be considered as a single delimeter. For example,-_contains 2 different delimeter characters and is considered a single delimeter.Available conversionscamelcasefromcaseconverterimportcamelcasecamelcase("Hello, world!")helloWorldcobolcasefromcaseconverterimportcobolcasecobolcase("Hello, world!")HELLO-WORLDflatcasefromcaseconverterimportflatcaseflatcase("Hello, world!")helloworldkebabcasefromcaseconverterimportkebabcasekebabcase("Hello, world!")hello-worldmacrocasefromcaseconverterimportmacrocasemacrocase("Hello, world!")HELLO_WORLDAdditional optionsdelims_only : bool- Only consider delimiters as boundaries (default:False).pascalcasefromcaseconverterimportpascalcasepascalcase("Hello, world!")HelloWorldsnakecasefromcaseconverterimportsnakecasesnakecase("Hello, world!")hello_worldOptions for all conversionsStripping punctuationPunctuation is stripped when doing a case conversion. However, should you
wish to keep the punctuation you can do so by passingstrip_punctuation=False.camelcase("Hello, world!",strip_punctuation=False)# output: hello,World!Delimeter customizationDefault delimiters used to denote a token boundary.DELIMITERS=" -_"You can passdelimsto each case conversion function to specify a custom
set of delimiters.# Use a pipe `|` as the only delimiter.camelcase("Hello,|world!",delims="|")# output: helloWorldBoundaries definitionsNameDescriptionOnDelimeterUppercaseNextOn a delimieter, upper case the following characterOnDelimeterLowercaseNextOn a delimeter, lower case the following characterOnUpperPrecededByLowerAppendUpperOn an upper case character followed by a lower case character, append the upper case characterOnUpperPrecededByLowerAppendLowerOn an upper case character preceeded by a lower case character append the lower case characterOnUpperPrecededByUpperAppendJoinOn an upper case caharacter preceeded by an upper append the join character. Join characters are context dependent. Example: macro cast join character is_OnUpperPrecededByUpperAppendCurrentOn an upper case character preceeded by an upper case character append the upper case characterContributingWrite clean code.Write new tests for new use-cases.Test your code before raising a PR.Useblackto format your code.Reference
Package: casefy
IntroductionCasefy (/keɪsfaɪ/) is a lightweight Python package to convert the casing of strings. It has no third-party dependencies and supports Unicode.InstallationThe latest release can be installed usingpip:pipinstall-UcasefyCasefy is alsoavailableas an Arch Linux AUR package.ExamplesNote: for more details, you can check theAPI Reference.importcasefy# camelCasestring=casefy.camelcase("foo_bar")print(string)# fooBarstring=casefy.camelcase("FooBar")print(string)# fooBarstring=casefy.camelcase("FOO BAR")print(string)# fooBar# PascalCasestring=casefy.pascalcase("foo_bar")print(string)# FooBarstring=casefy.pascalcase("fooBar")print(string)# FooBar# snake_casestring=casefy.snakecase("fooBar")print(string)# foo_barstring=casefy.snakecase("fooBARbaz",keep_together=["bar"])print(string)# foo_bar_bazstring=casefy.snakecase("FOO BAR")print(string)# foo_bar# CONST_CASEstring=casefy.constcase("fooBar")print(string)# FOO_BAR# kebab-casestring=casefy.kebabcase("fooBar")print(string)# foo-bar# UPPER-KEBAB-CASEstring=casefy.upperkebabcase("fooBar")print(string)# FOO-BAR# separator casestring=casefy.separatorcase("fooBar",separator="/")print(string)# foo/barstring=casefy.separatorcase("fooBARbaz",separator="%",keep_together=["bar"])print(string)# foo%bar%baz# Sentence casestring=casefy.sentencecase("fooBar")print(string)# Foo bar# Title Casestring=casefy.titlecase("fooBar")print(string)# Foo Bar# Alphanum3ric case (removes non-alphanumeric chars)string=casefy.alphanumcase("foo - 123 ; bar!")print(string)# foo123barContributeIf you find a bug, please open an issue. Pull Requests are also welcome!AcknowledgementsThis project started when I saw that the packagepython-stringcasewas flagged-out-of-date in the Arch AUR Repository. The projectstringcaseseems not to be actively maintained anymore, so I decided to address its issues and pull requests and solve them in this new package. I kept the API as similar as possible, in order to facilitate any possible migration. I thankTaka Okunishi(author of stringcase) and its contributors for their work.Related projectscase-conversionoffers a very similar functionality as this project. I probably wouldn't have written this package if I had known of it before. However, the code of Casefy is more lightweight and just enough for most cases. If you need more functionality, e.g., detecting the case of a string, go withcase-conversion.Inflectionpresents some overlap with this project as well, allowing the transformation of strings from CamelCase to underscored_string, but also singularizing and pluralizing English words.LicenseCasefy is distributed under theMITlicense.
Package: caseine_design
# Caseine Design Python supportThe VPL Design Plugin allows an educator to create moodle VPL that may be prepared and pushed on
a moodle instance using a command line.To handle python labs, the VPL Design Plugin make uses of python decorations that have no
python level semantics, but may be used by the VPL Design Plugin command line to prepare the lab
before upload.This plugin has been created mainly for the caseine.org platform, but may be used for other Moddle
instances with the VPL tool.
Package: case-insensitive-dictionary
Case Insensitive DictTyped Python Case Insensitive DictionaryInstallInstall and update usingpip.$pipinstall-Ucase-insensitive-dictionaryAPI ReferenceMethodDescriptionclear()Removes all elements from the dictionary.copy()Returns a copy of the dictionary.get(key, default)Returns the value (case-insensitively), of the item specified with the key.Falls back to the default value if the specified key does not exist.fromkeys(iterable, value)Returns a dictionary with the specified keys and the specified value.keys()Returns the dictionary's keys.values()Returns the dictionary's values.items()Returns the key-value pairs.pop(key)Remove the specified item (case-insensitively).The value of the removed item is the return value.popitem()Remove the last item that was inserted into the dictionary.For Python version <3.7, popitem() removes a random item.ExampleCaseInsensitiveDict:>>>fromtypingimportUnion>>>fromcase_insensitive_dictimportCaseInsensitiveDict>>>case_insensitive_dict=CaseInsensitiveDict[Union[str,int],str](data={"Aa":"b",1:"c"})>>>case_insensitive_dict["aa"]'b'>>>case_insensitive_dict[1]'c'which also supports json encoding/decoding:>>>importjson>>>fromcase_insensitive_dictimportCaseInsensitiveDict,CaseInsensitiveDictJSONEncoder,case_insensitive_dict_json_decoder>>>case_insensitive_dict=CaseInsensitiveDict[str,str](data={"Aa":"b"})>>>json_string=json.dumps(obj=case_insensitive_dict,cls=CaseInsensitiveDictJSONEncoder)>>>json_string'{"Aa": "b"}'>>>case_insensitive_dict=json.loads(s=json_string,object_hook=case_insensitive_dict_json_decoder)>>>case_insensitive_dictCaseInsensitiveDict({'Aa':'b'})ContributingContributions are welcome via pull requests.First time setup$gitclonegit@github.com:DeveloperRSquared/case-insensitive-dict.git
$cdcase-insensitive-dict
$poetryinstall
$poetryshellTools including black, mypy etc. will run automatically if you installpre-commitusing the instructions below$pre-commitinstall
$pre-commitrun--all-filesRunning tests$poetryrunpytestLinksSource Code:https://github.com/DeveloperRSquared/case-insensitive-dict/PyPI Releases:https://pypi.org/project/case-insensitive-dictionary/Issue Tracker:https://github.com/DeveloperRSquared/case-insensitive-dict/issues/
Package: caseireplace
caseireplacePython3 module to case insensitive replace of strings.InstallationInstall with pippip3 install -U caseireplaceUsageIn [1]: import caseireplace

In [2]: caseireplace.insensitive_replace(
    text="I want a hIPpo for my birthday",
    old="hippo",
    new="giraffe"
    )

Out[2]: 'I want a giraffe for my birthday'
Package: caseless-dictionary
caseless-dictionaryA simple, fast, typed, and tested implementation for a python3.6+ case-insensitive dictionary. This class extends and
maintains the original functionality of the builtindict.Key Features:Easy: If you don't care about the case of the key in a dictionary then this implementation is easy to use since it
acts just like adictobj.Great Developer Experience: Being fully typed makes it great for editor support.Fully Tested: Our test suit fully tests the functionality to ensure thatCaselessDictruns as expected.There is More!!!:ModifiableItemsDict: CaselessDict is built on top of
theModifiableItemsDict, which is a library that enables the user to modify the key or/and value ofdicttype
object at runtime.Installationpip install caseless-dictionarySimple CaselessDict Examplefromcaseless_dictionaryimportCaselessDictnormal_dict:dict={"   CamelCase   ":1,"  UPPER   ":"TWO",3:"  Number as Key  "}caseless_dict:CaselessDict=CaselessDict(normal_dict)print(caseless_dict)# {'camelcase': 1, 'upper': 'TWO', 3: 'Number as Key'}print("CamelCase"incaseless_dict)# Trueprint("camelcase"incaseless_dict)# Trueprint(caseless_dict[" camelCASE  "])# 1Simple UpperCaselessDict Examplefromcaseless_dictionaryimportUpperCaselessDictfromtypingimportIterableiterable:Iterable=[("   wArNIng",0),("deBug   ",10)]upper_caseless_dict:dict=UpperCaselessDict(iterable)print(upper_caseless_dict)# {'WARNING': 0, 'DEBUG': 10}print("warning"inupper_caseless_dict)# Trueupper_caseless_dict["WarninG"]=30print(upper_caseless_dict)# {'WARNING': 30, 'DEBUG': 10}Simple TitleCaselessDict Examplefromcaseless_dictionaryimportTitleCaselessDictfromtypingimportIterableiterable:Iterable={" Brave   ":1,"   ProtonMail    ":2}title_caseless_dict:dict=TitleCaselessDict(iterable)print(title_caseless_dict)# {'Brave': 1, 'Protonmail': 2}title_caseless_dict.pop("  protonMAIL  ")print(title_caseless_dict)# {'Brave': 1}AcknowledgmentsDuring the class '(Advanced) Python For Engineers III' taught byRaymond Hettinger,
Raymond taught us how to inherit from the builtin Pythondictby creating a Case-insensitive Dict.
I thought this was a wonderful learning experience so I decided to create a project that would build upon what he
taught.
Package: casepropods.dummy
Example casepro data pod returning statically configured data.Install$ pip install casepropods.dummyUsageIn casepro’s settings file, add the pod as an installed app, and configure the pods that you would like to show in the UI:INSTALLED_APPS+=('casepropods.dummy.plugin.DummyPodPlugin',)PODS=[{# maps this pod to the dummy pod type'label':'dummy_pod',# title of the pod to show in the ui'title':'Maternal Health Info',# static data to show as item in the ui for this pod# (only relevant to the dummy pod type)'data':{'items':[{'name':'EDD','value':'2015-07-18'},{'name':'Clinic Code','value':'2034 6524 6421'}]}}]
Package: casers
casersFeaturescaseexamplecamelsomeTextsnakesome_textkebabsome-textpascalSomeTextconstantSOME_TEXTInstallationpip install casersUsageThe examples are checked by pytest>>>fromcasersimportto_camel,to_snake,to_kebab>>>to_camel("some_text")=="someText"True>>>to_snake("someText")=="some_text"True>>>to_kebab("someText")=="some-text"True>>>to_kebab("some_text")=="some-text"Truepydanticpip install "casers[pydantic]"The package supports for pydantic 1 and 2 versions>>>fromcasers.pydanticimportCamelAliases>>>classModel(CamelAliases):...snake_case:str>>>Model.model_validate({"snakeCase":"value"}).snake_case=="value"True>>>Model.model_validate_json('{"snakeCase": "value"}').snake_case=="value"TrueBenchmark------------------------------------------------------------------------------------------------- benchmark: 5 tests -------------------------------------------------------------------------------------------------
Name (time in us)                              Min                   Max                Mean             StdDev              Median                IQR            Outliers  OPS (Kops/s)            Rounds  Iterations
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_to_camel_rust                          6.7330 (1.0)        131.7090 (1.0)        7.4058 (1.0)       3.6480 (1.0)        6.8550 (1.0)       0.0612 (1.0)     1007;4697      135.0292 (1.0)       42768           1
test_to_camel_python_builtin               36.3011 (5.39)     1,019.0560 (7.74)      40.5981 (5.48)     14.3812 (3.94)      37.2550 (5.43)      0.5290 (8.64)     901;2044       24.6317 (0.18)      12326           1
test_to_camel_rust_parallel                72.9470 (10.83)      605.7979 (4.60)     124.9733 (16.88)    41.6080 (11.41)    113.4912 (16.56)    31.3647 (512.21)    414;199        8.0017 (0.06)       2407           1
test_to_camel_pure_python                 122.8340 (18.24)      361.8060 (2.75)     136.7272 (18.46)    30.4976 (8.36)     124.9164 (18.22)     3.6801 (60.10)    818;1421        7.3138 (0.05)       7458           1
test_to_camel_python_builtin_parallel     135.2120 (20.08)      674.6668 (5.12)     187.0079 (25.25)    61.5008 (16.86)    166.2684 (24.26)    46.5950 (760.93)    329;276        5.3474 (0.04)       2500           1
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Legend:
  Outliers: 1 Standard Deviation from Mean; 1.5 IQR (InterQuartile Range) from 1st Quartile and 3rd Quartile.
  OPS: Operations Per Second, computed as 1 / MeanLicenseMIT LICENSEContributionContribution guidelines for this project