Saravanan666/pypi-org huggingface dataset:
Package: nameko-vault
nameko-vaultExtension forNamekothat integrates withVault.To use this tool it is necessary to configure the following parameters in your
nameko config.yml file:VAULT_URL: <vault_api_url>
VAULT_TOKEN: <authentication_token>UsageTo use the tool it's needed inform the mount point of the path in which you want
to obtain any secrets. This mount point can be informed when instantiating the
provider or passing this information directly to the method being used.Example 1:# path: example/path/secretvault=VaultProvider(mount_point="example")vault.get_kv_secret(path="path/secret")Example 2:# path: example/path/secretvault=VaultProvider()vault.get_kv_secret(mount_point="example",path="path/secret")List SecretsThe methodget_kv_secrets_listreturns a list of secrets contained in a given
pathvault=VaultProvider()vault.get_kv_secrets_list(mount_point="example",path="path")['path/test1', 'path/test2']Get KV Secret DataThe methodget_kv_secretreturns the content cotained in a given pathvault=VaultProvider()vault.get_kv_secret(mount_point="example",path="path/test")[
   {
      "data":{
         "pass":"test",
         "user":"sample"
      },
      "metadata":{
         "created_time":"2020-07-01T17:44:48.054175763Z",
         "deletion_time":"",
         "destroyed":False,
         "version":1
      }
   }
]Create or Update KV SecretMethod to create an secret or update an existing one in a given path.vault=VaultProvider()secret={"example":"Test","number":42}vault.create_or_update_kv_secret(mount_point="example",path="path/test",secret=secret){
   'request_id': '4ce62ee7-0f88-3efc-d745-5e2fbc423789',
   'lease_id': '',
   'renewable': False,
   'lease_duration': 0,
   'data': {
      'created_time': '2020-09-10T00:25:40.92411625Z',
      'deletion_time': '',
      'destroyed': False,
      'version': 1
   },
   'wrap_info': None,
   'warnings': None,
   'auth': None
}Patch KV SecretMethod to update an existing path. Either to add a new key/value to the secret and/or update the value for an existing key. Raises anhvac.exceptions.InvalidRequestif the path hasn’t been written to previously.vault=VaultProvider()secret={"example":"New Test"}vault.patch_kv_secret(mount_point="example",path="path/test",secret=secret){
   'request_id': '7bf2a869-dc66-efa2-3679-814ef76fb447',
   'lease_id': '',
   'renewable': False,
   'lease_duration': 0,
   'data': {
      'created_time': '2020-09-10T00:31:32.6783082Z',
      'deletion_time': '',
      'destroyed': False,
      'version': 2
   },
   'wrap_info': None,
   'warnings': None,
   'auth': None
}Delete KV Secret (metadata and all versions)Method to delete an existing path with all his versions and metadata on a given path.vault=VaultProvider()path="path/secret"vault.delete_metadata_and_all_versions_kv_secret(path)
Package: nameko-wrapper
Nameko Wrappernameko-wrapper包主要包含了一些编写nameko微服务所需要的常用工具，主要包括nameko方法优化，elasticsearch优化，统一异常处理以及一些其他工具。Nameko方法优化rpc异常处理优化nameko_wrapper.rpc.rpc对nameko rpc进行异常处理和响应优化，处理合理微服务产生的异常和统一响应内容格式。rpc响应优化nameko_wrapper.response为微服务响应提供统一的响应nameko异常统一nameko_wrapper.exception为编写微服务应用提供统一的异常类，可以方便用户自己定义处理异常；常见依赖注入添加nameko_wrapper.dependency_provider提供常见的nameko 依赖注入，比如Elasticsearch依赖注入ElasticSearch优化文档搜索优化提供文档初始化函数nameko_wrapper.elasticsearch.documents.init_document_index提供更简洁的搜索方式扩展官方的文档类，提供唯一约束和诸多便捷查询方法nameko_wrapper.elasticsearch.documents.ExtendDocument其它工具nameko配置读取方法nameko_wrapper.configdict访问转属性访问的方法nameko_wrapper.utils.converts.dict2obj
Package: nameless
An example package. Replace this with a proper project description. Generated withhttps://github.com/ionelmc/cookiecutter-pylibraryFree software: BSD licenseInstallationpip install namelessDocumentationhttps://python-nameless.readthedocs.org/DevelopmentTo run the all tests run:toxChangelog0.1.0 (2014-06-10)First release on PyPI.
Package: nameless-minimal
An example package. Replace this with a proper project description. Generated withhttps://github.com/ionelmc/cookiecutter-pylibrary-minimalFree software: BSD licenseInstallationpip install nameless-minimalDocumentationhttps://python-nameless-minimal.readthedocs.org/DevelopmentTo run the all tests run:toxChangelog0.1.0 (2014-01-01)First release on PyPI.
Package: namelist
py-namelistParse Fortran Namelists to dict-like objects and backDownloadTo get the latest release dogitclonehttps://git.geomar.de:martin-claus/py-namelist.git--branchv0.1.0--depth=1or, if you prefer the latest unstable versiongitclonehttps://git.geomar.de:martin-claus/py-namelist.gitUsageTo parse a namelist file you callparse_namelist_file(fobj)where fobj is a file-like object offering aread()andseek()method
(usually the standard python file object). Alternatively, you can parse a string usingparse_namelist_string(str).importnamelistwithopen(your_nml_file)asfobj:nmls=namelist.parse_namelist_file(fobj)nmlswill be a list of instances of theNamelistclass.Namelistis a subclass ofOrderedDict(ordictif you use Python < 2.7).
ANamelistinstance,nml, is initialized with an name and optionally with initial values.nml=Namelist("param",(("key1",val1),...))The name attribute will set the read-only property name ofnml. To change, add or delete values the
same methods are available as fordict.printnml.namenml.update({"eggs":1,"spam":[1,2,3]})del(nml["param"])To create a Fortran readable string representation of theNamelistinstance, just use thestr()build-ins=str(nml)or justprint(nml)A string representation of theNamelistinstance that can be used byeval()to create copies of it can be created byrepr()printrepr(nml)Note: The parsing of namelist does not have to strictly follow the Fortran standard. Hence, some namelists that are perfectly accepted by some Fortran version are not guaranteed to be correctly parsed byparse_namelist_string(). Always check the content of yourNamelistobject. If you do find a namelist that does not work, please create an issue athttps://git.geomar.de/martin-claus/py-namelist/together with the namelist that does not work.
Package: namely
namelyNon-official Python client forNamelyLearn more about Namely APIhereInstallationpipinstallnamelyGet started# Import Namely API ClientfromnamelyimportClient# Initialise Namely API Clientclient=Client("https://<your-domain>.namely.com/api/v1/","<your-namely-api-token>")# Get all profilesget_all=client.profiles.get_all(multi_threading=False)# Get profile by Namely idperson=client.profiles.get("<person-namely-id>")# Get my Namely profileme=client.profiles.get_me()# Get all profiles by filtersmikes=client.profiles.filter(first_name="Mike")# Update profile by Namely idprofile_to_update={"user_status":"inactive"}updated_profile=client.profiles.update("<person-namely-id>",profile_to_update)# Create Namely profilenew_profile={"first_name":"John","last_name":"Smith","user_status":"active","start_date":"2019-01-01","email":"work@email.com"}created_profile=client.profiles.create(new_profile)LicenseThe MIT License
Package: name-matching
Name matchingName matching is a Python package for the matching of company names. This package has been developed to match the names of companies from different databases together to allow them to be merged. The package has a number of options to determine how exact the matches should be and also for the selection of different name matching algorithms.For a more in-depth discussion of the name matching package please see thecompany name matchingmedium postInstallationThe package can be installed via PiPy:pipinstallname_matchingAlternatively you could install the package by downloading the repo, navigating to the folder and run the setup in pip locallypipinstall.UsageTo see example usage of the package you can use the notebook folder. An example of the usage is also given belowimportpandasaspdfromname_matching.name_matcherimportNameMatcher# define a dataset with bank namesdf_companies_a=pd.DataFrame({'Company name':['Industrial and Commercial Bank of China Limited','China Construction Bank','Agricultural Bank of China','Bank of China','JPMorgan Chase','Mitsubishi UFJ Financial Group','Bank of America','HSBC','BNP Paribas','CrÃ©dit Agricole']})# alter each of the bank names a bit to test the matchingdf_companies_b=pd.DataFrame({'name':['Bank of China Limited','Mitsubishi Financial Group','Construction Bank China','Agricultural Bank','Bank of Amerika','BNP Parisbas','JP Morgan Chase','HSCB','Industrial and Commercial Bank of China','Credite Agricole']})# initialise the name matchermatcher=NameMatcher(number_of_matches=1,legal_suffixes=True,common_words=False,top_n=50,verbose=True)# adjust the distance metrics to usematcher.set_distance_metrics(['bag','typo','refined_soundex'])# load the data to which the names should be matchedmatcher.load_and_process_master_data(column='Company name',df_matching_data=df_companies_a,transform=True)# perform the name matching on the data you want matchedmatches=matcher.match_names(to_be_matched=df_companies_b,column_matching='name')# combine the datasets based on the matchescombined=pd.merge(df_companies_a,matches,how='left',left_index=True,right_on='match_index')combined=pd.merge(combined,df_companies_b,how='left',left_index=True,right_index=True)ContributingAll contributions are welcome. For more substantial changes, please open an issue first to discuss what you would like to change.LicenseThe code is licensed under the MIT/X license an extended version of the licence:MITThanksThanks to the work of implementing name matching algorithms done in theAbydos package. These form the basis of the name matching algorithms used in this package.
Package: name-of-thrones
Name of ThronesCommand line tool to generate words that sound like characters from Game of
Thrones. Useful for unique project names, host names and the occasional stray
cat.InstallationYou can install theName of Thronesusing pip:$pipinstallname-of-thronesUsageYou can use thename-of-thronescommand from the shell to run Name of Thrones:$name-of-thrones--helpGenerate words that sound like characters from Game of Thrones.Usage:name-of-thrones [--quantity=<number>] [--min=<length>] [--max=<length>][--json] [--nocolour] [--alphabetical] [--length] [--reverse]name-of-thrones (-h | --help | --version)Options:--version                show program's version number and exit.-h, --help               show this help message and exit.-q, --quantity=<number>  the quantity of words to generate [default: 10].--min=<length>           the minimum length of each word [default: 4].--max=<length>           the maximum length of each word [default: 10].-j, --json               output the words in JSON format.-n, --nocolour           output the words without colourization.-a, --alphabetical       output the words in alphabetical order.-l, --length             output the words in order of their length.-r, --reverse            reverse the order of the words.LicenceCopyright © 2023 Matthew Stevens, released under theISC Licence.
Package: nameparts
[![Build Status](https://secure.travis-ci.org/polera/nameparts.png)](http://travis-ci.org/polera/nameparts)nameparts is a Python module that I wrote to address a problem splitting full names into individual
parts (first, middle, last, etc.)You can use it like this:>>> from nameparts import Name
>>> n = Name("Thurston Howel III")
>>> n.first_name
'Thurston'
>>> n.last_name
'Howel'
>>> n.as_dict
{'first_name': 'Thurston', 'last_name': 'Howel', \
  'middle_name': None, 'suffix': None, 'generation': 'III', \
  'salutation': None}
>>> n = Name("Smith, John Paul")
>>> n.first_name
'John'
>>> n.last_name
'Smith'
>>> n.middle_name
'Paul'If you suspect you may see more than one name in a given field (i.e. separated by a/k/a) you can use MultiName:>>> from nameparts import MultiName
>>> names = MultiName("Bruce Wayne a/k/a Batman")
>>> names
[<Name: 'Bruce Wayne'>, <Name: 'Batman'>]
>>> [n.as_dict for n in names]
[{'last_name': 'Wayne', 'salutation': None, 'first_name': 'Bruce', 'suffix': None,
  'generation': None, 'middle_name': None, 'aliases': None},
 {'last_name': '', 'salutation': None, 'first_name': 'Batman', 'suffix': None,
  'generation': None, 'middle_name': None, 'aliases': None}]MultiName automatically uses the string ‘a/k/a’ to split names, but you can provide an optional splitter argument to
override that:>>> from nameparts import MultiName
>>> names = MultiName("Tony Stark | Ironman | Stark, Tony", splitter="|")
>>> names
[<Name: 'Tony Stark'>, <Name: 'Ironman'>, <Name: 'Tony Stark'>]InstallingFrom source:python setup.py installvia pip:pip install namepartsnameparts runs on CPython 2.6, 2.7, 3.2 and PyPyLicensenameparts is released under the BSD license.Comments/Questions/ImprovementsAny of the above are welcome.  Contact me at the email address in my profile.
Package: namerator
generate random names from a list of like namesInstallationFrom the project root directory:$ python setup.py installUsageSimply run it:$ nameratorUse –help/-h to view info on the arguments:$ namerator --help
usage: namerator [-h] [--num NUM] [--output OUTPUT]
                 [--freq-output FREQ_OUTPUT]
                 path

positional arguments:
  path

optional arguments:
  -h, --help            show this help message and exit
  --num NUM, -n NUM
  --output OUTPUT, -o OUTPUT
  --freq-output FREQ_OUTPUT, -f FREQ_OUTPUTRelease Notes0.1.0:Ready for release, works0.0.1:Project created
Package: names
namesRandom name generatorInstallationThe script isavailable on PyPI.  To install with pip:sudo pip install namesUsageNames can be used as a command line utility or imported as a Python package.Command Line UsageTo use the script from the command line:$namesJohnPowellPython Package UsageHere are examples of all current features:>>>importnames>>>names.get_full_name()u'Patricia Halford'>>>names.get_full_name(gender='male')u'Patrick Keating'>>>names.get_first_name()'Bernard'>>>names.get_first_name(gender='female')'Christina'>>>names.get_last_name()'Szczepanek'LicenseThis project is released under anMIT License.Data in the following files are public domain (derived from 1990 Census data):dist.all.lastdist.female.firstdist.male.firstChanges0.3.0 (2013-05-14)Fixed Python 3 supportImproved tests and fixed minor bugs0.2 (2013-02-17)Initial releaseContributingPlease file bugs to theGithub issue tracker.  Pull requests are welcome.Hacking and Pull RequestsPlease try to conform toPEP8for code contributions and ensure that the
tests continue to function.Please include new tests with your pull requests when appropriate.Running the testsYou will needtoxandcoverageinstalled to run the tests on your code:$pipinstalltoxcoverageTo run the tests and generate a coverage report:$./runtests.shThe coverage output should look similar to this:_____________________ summary _____________________
py27: commands succeeded
py32: commands succeeded
py33: commands succeeded
pypy: commands succeeded
flake8: commands succeeded
congratulations :)
Name             Stmts   Miss Branch BrMiss  Cover
--------------------------------------------------
names/__init__      25      0      8      0   100%
names/main           4      0      0      0   100%
--------------------------------------------------
TOTAL               29      0      8      0   100%
Package: name-sanitizer
Name SanitizerMotivationThis package arises from the need to clean file and directory names to be able to include them in our different projects. Sometimes these files are usually many and are at different levels of depth, for example, google sources.
At other times we want to have an image repository but the names are very varied and / or contain special characters not supported for imports in some languages ... this package will help you with that.Let's not forget the good android studio, surely you are already tired of manually renaming the files.Installpip install name-sanitizerSimple usagepython -m nsThe package will work in the current path where the console is open. Remember that in Linux you can open the terminal contextually and in Windows, you can click on the breadcrumb in the folder, type cmd, press enter and the console will open in that path.Options--a=> Replace the file or directory name with an anonymous one.--r=> Run the sanitizer recursively from the current directory.--only_dir=> Run the sanitizer for directories only--only_file=> Run the sanitizer for files only--extensions=> Defines the specific extensions where the sanitizer will act. (By default it includes directories)Options usageAll the parameters except the extensions work as a flag, if you set it, it will work.Example:python -m ns --r --aThis will run the sanitizer recursively anonymizing files for child directoriesExtensions:You can define that the sanitizer only works on files with a certain extension. To do this, you must specify the extensions including the period, if there is more than one you must add them with a comma and without spaces.Example:python -m ns --extension=.ttf,.mp3 --r --only_fileThis will run the sanitizer recursively only for files with the extension .ttf and .mp3 without renaming the directories.
Package: names_comparator
comparatorSimple tool to compare almost similar names which are comingfrom the same source(for example list of all company owners and officers of that company). Helps to cluster together persons with a slight difference in name spelling/typos. Better suited for Cyrillic names, but should work everywhere.It’s heuristic based and as any algorithm of such a nature itmake errorssometime (see Accuracy section below for details).InstallationInstall from PyPI.$pipinstallnames_comparatorAccuracyYou can test your installation on a ground truth data and check confusion matrix by running:$pythoncomparator/__init__.pycomparator/data/ground_truth.csv+--------------------+----------+----------+||Positive|Negative|+--------------------+----------+----------+|Predictedpositive|290|9||Predictednegative|14|687|+--------------------+----------+----------+Precision:0.97Recall:0.95F1score:0.96You can also run it with debug flag to see all the errors algorithm made:$pythoncomparator/__init__.pycomparator/data/ground_truth.csvyesUsage>>>fromcomparatorimportfull_compare>>>full_compare("Barack Hussein Obama","Obama, Barak")True>>>full_compare("Петро Мазепа","Мазепа Петро")True>>>full_compare("Марченко Петро Миколайович","Панченко Петро Миколайович")False>>>full_compare("Овдієнко Сергій Костантинович","Овдієнко Сергій Костянтинович")True>>>full_compare("Іванов Михайло Юрійович","Іванов Юрій Михайлович")False
Package: nameseer
nameseer ['name-seer'] - a Thai person name classifiernameseer('name-seer') is a python library for Thai name classification. It can determine whether a given name is a Thai person name or a Thai corporate name.nameseeruses linguistics features within the name to determine whether the name is a Thai person name or not.nameseercomes with a pre-trained model that was trained on 700,000 company names and 700,000 person names, with 99.4% accuracy when tested on 400,000 unseen names.nameseeris based on the name-ethnicity classifier, orginally proposed here:Treeratpituk, Pucktada, and C. Lee Giles. "Name-ethnicity classification and ethnicity-sensitive name matching." Proceedings of the AAAI Conference on Artificial Intelligence. Vol. 26. No. 1. 2012.Paper URL :https://ojs.aaai.org/index.php/AAAI/article/download/8324/8183Requirementsabydosscikit-learnnltkpythainlppython >= 3.7.6Installationnameseercan be installed usingpippip install nameseerUsagesOnce installed, you can usenameseerwithin your python code to classify whether a Thai name is a person name or a corporate name.>>> from nameseer import NameClassifier

>>> nc = NameClassifier.load_pretrained_model()
>>> nc.classify_names(['ประยุทธ์ จันทร์โอชา','แอดวานซ์อินโฟร์ เซอร์วิส'])
['person', 'company']CitationTreeratpituk, Pucktada (2022). Nameseer: a Thai person name classifier. Mar 29, 2022. See https://github.com/botx/nameseerAuthorPucktada Treeratpituk, Bank of Thailand (pucktadt@bot.or.th)LicenseThis project is licensed under the Apache Software License 2.0 - see theLICENSEfile for details
Package: namesex-light
namesex_lightNamesex_light is a lighweight package that predicts the gender tendency of Chinese given names. This module comes with a L2 regularized logistic regression trained on 10,730 Chinese given names (in traditional Chinese) with reliable gender lables collected from public data. The predict() function takes a list of names and output predicted gender tendency (1 for male and 0 for female) or probability of being a male name. Namesex_light has a sister project, namesex, that performs similar tasks with higher accuracy.Additional information about namesex and namesex_light can be foundin another document (in Chinese).The prediction performance evaluated by ten-fold cross validation is:MetricPerformancePerformance Std. Dev.Accuracy0.89570.007327F10.89200.007873Precision0.88520.012238Recall0.89910.008936Logloss114.356.413972Use pip/pip3 to install namesex_light.:pip install namesex_lightTo use namesex_light, pass in an array or list of given names to predict(). For each element in the input list, predict() returns 1 or 0 for male or female prediction. Set “predprob = True” to return probability of being a male name. The following is a simple sample code.:>>> import namesex_light
>>> nsl = namesex_light.namesex_light()
>>> nsl.predict(['民豪', '愛麗', '志明'])
array([1, 0, 1])
>>> nsl.predict(['民豪', '愛麗', '志明'], predprob=True)
array([0.99968932, 0.00530066, 0.9938986 ])Note that namesex_light was trained using Chinese given names only. However, it may be used to classifier translated names as well:>>> nsl.predict(['阿波羅', '阿波羅', '雷', '艾美', '布蘭妮', '阿曼達'])
array([1, 1, 1, 0, 0, 1])This module is intended for a quick plug-and-play. The original training dataset is not included.Testing DatasetThis package comes with a small testing dataset that was not used for model training. The following sample code illustrate a simple usage.:>>> testdata = namesex_light.testdata()
>>> nsl = namesex_light.namesex_light()
>>> pred = nsl.predict(testdata.gname)
>>> print("The first 5 given names are: {}".format(testdata.gname[0:5]))
The first 5 given names are: ['翊如', '妤庭', '諆璋', '大閎', '和維']
>>> print("    and their sex:          {}".format(testdata.sex[0:5]))
    and their sex:          [0, 0, 1, 1, 1]
>>> print("    and their predicted sex:{}".format(pred[0:5]))
    and their predicted sex:[0 0 1 1 1]
>>> accuracy = np.sum(pred == testdata.sex) / len(pred)
>>> print(" Prediction accuracy = {}".format(accuracy))
 Prediction accuracy = 0.8627450980392157Note that the accuracy is slightly lower compared to the accuracy of ten-fold cross valudation. I guess this is normal since this testset is collected from a source that is different from the training dataset.
Package: namesfr
Random french name generatorUsageNamesfr can be used as a command line utility or imported as a Python package.Command Line UsageTo use the script from the command line:$namesfrAlexandreCrouzierPython Package UsageHere are examples of all current features:>>>importnamesfr>>>namesfr.get_full_name()u'Aurélien Germond'>>>namesfr.get_full_name(gender='male')u'Frédéric Castan'>>>namesfr.get_first_name()'Thierry'>>>namesfr.get_first_name(gender='female')'Iris'>>>namesfr.get_last_name()'Faust'LicenseThis project is released under anMIT License.Data in the following files are public domain (governement data source 2018):dist.all.lastdist.female.firstdist.male.first
Package: names-generator
Clone of the Moby/Docker random name generator as a Python package.Installation$pipinstallnames_generatorUsagePython APIThe API only really consists of a single function.>>>fromnames_generatorimportgenerate_name>>>generate_name()'vigorous_goldstine'Customize the formatting of the name by specifying astyle,
one ofplain,capital,hyphen, orunderscore(default).>>>generate_name(style='capital')'Hardcore Thompson'Pin a seed value for the underlying PRNG to reproduce a given name.>>>generate_name(seed=42)==generate_name(seed=42)TrueCommand-lineThe package also exposes a basic command-line interface for scripting outside of Python$generate_nameclever_matsumoto$generate_name--style=capitalHeuristicEinstein$generate_name--helpusage:generate_name[-h][-v][--styleNAME]Generaterandomnamepairing.options:-s,--styleNAMEFormatting(default:underscore).-h,--helpShowthismessageandexit.-v,--versionShowtheversionandexit.Documentationandissuetrackingat:https://github.com/glentner/names_generator