Saravanan666/pypi-org huggingface dataset:
Package: uniqtoken
“uniqtoken” is DEPRECATED!
Please see new version “uqid”:https://pypi.python.org/pypi/uqid/Old “uniqtoken” usage:pip install uniqtoken
from uniqtoken import uniqtoken

token1 = uniqtoken()
token2 = uniqtoken()
assert token1 != token2Starts with a sequence random enough to be indexed efficiently when token is used as a hash key.This random sequence is long enough to be hard to guess.Ends with explicit timestamp with precision about 0.01 seconds (system dependent) to be more unique.Is more than 3x faster than standarduuid.uuid4()- see tests inuniqtoken.py:test().Is ready to be used as a fixed length string token containing exactly 64 safe hex digits.
Package: unique
Unique will be a system for uniquely storingnormalizeobjects in
a unique B-Tree, with a backing store which records history and makes
it hard to tamper with: git.  It could be used as a basic key/value
store, given a suitably lax storage schema.  But its goal is to be a
useful first normal form (1NF) store.This is currently in very early stages of development.  Please contact
the author or send pull requests if you want to get involved!  See
TODO.org for the roadmap.Project LicenseThis project is licensed under the MIT license.  Go wild!AuthorSam Vilain <sam@vilain.net>
Package: unique-character
Python module for counting unique symbolModule get nuber of uniq chars in text file, string or functionInstallpip install unique-character==0.0.3Options:unique_character.cli_unique_character [-h]unique_character.cli_unique_character [--file FILE]unique_character.cli_unique_character [--string STRING]from unique_character import count_letter
assert count_letter('1234') == 4Examples:Command:python3.8-munique_character.cli_unique_character--stringaaabbcc123Return:3Command:python3.8-munique_character.cli_unique_character--filetext_file.txtReturn:100Import module in your python file:test.py
    from unique_character import count_command_line
    print(count_command_line())

python3.8 -m  test.py --string aaabbcc123Return:3
Package: unique-characters-TurchinskiyD
Counting Unique CharactersThis module allows you to count the unique characters that it receives upon entry.
Works with files and strings.Getting startedA variableargsis created to which all the arguments that were passed
to the CLI during the execution of thecreate_parser()function are assigned.In functionfile_check()receives an objectargsas an input and determines the type:ifargscontains a file, then theload_file()file handler function is run
and the contents of the file are passed to theunique_characters()function;ifargsdoes not contain a file, butargscontains a string, then that string
is passed to theunique_characters()functionTheunique_characters()function processes the string passed to it
and returns the number of unique characters in that string.
Package: unique-char-counter-cli-kir-boh
Hello there!
Since you installed my module, you shoud know possibilities#First unique_char_counter_cli.py:By importing unique_char_counter_cli.py from unique_char_counter_cli_kir_boh, you will be able to use four functions:
 
    return_amount_once_occured_items - gets hashable obj, cache it, count unique items deespite indentations.
    
    get_obj_from_cli - The get_obj_from_cli function takes no arguments and returns a namespace object generated from
        parsing command line arguments using the argparse module. It expects the user to pass either a string or a file
        containing a hashable object. The function uses mutually exclusive arguments, so the user can only pass either the 
        string or the file, but not both. The hashable object is the only mandatory argument, which is obtained from the 
        command line.
    
    read_file_in_chunks - reed file in chanks not to take a lot memory, gets two atrib 'path_to_file' (hasahable_obj) and
        chunck_size (by defoult chunck_size=1000)
    
    main - gets args from 'get_obj_from_cli', wich should be either file or string and hashable obj, then if it's fille,
        it will execute 'read_file_in_chunks' then 'return_amount_once_occured_items' to return and print result

Hint: To use main from venv: python -m env_name\lib\site-packages\unique_char_counter_cli_kir_boh\unique_char_counter_cli.py -s 'f'   
      If you did't use venv: python -m path\shown\after\innstaling\unique_char_counter_cli_kir_boh\unique_char_counter_cli.py -s 'f'#tests package:By importing tests_unique_char_counter_cli.py from unique_char_counter_cli_kir_boh.tests, you will get a Python file 
    with a TestUniqueCharCounterCli class that inherits from unittest.TestCas:
        
    The test_return_amount_once_occured_items_with_string, test_return_amount_once_occured_items_with_empty_string,
        test_return_amount_once_occured_items_with_space, and test_return_amount_once_occured_items_with_unhashable_obj 
        methods test the return_amount_once_occured_items function with different inputs.
        
    The `test_main_with_mock_file` methods test the `main` function with different inputs using the `mock_open` and 
        `mock_get_obj_from_cli` decorators.
        
    The `test_read_file_in_chunks` method tests the `read_file_in_chunks` function with a file input.
    
Hint: To use unittests from venv: python -m env_name\lib\site-packages\unique_char_counter_cli_kir_boh\tests\test_unique_char_counter_cli.py
      If you did't use venv: python -m path\shown\after\innstaling\unique_char_counter_cli_kir_boh\tests\test_unique_char_counter_cli.py
      To use with coverage: coverage run -m unittest discover -s path\shown\after\innstaling\unique_char_counter_cli_kir_boh\tests
Package: unique-color
SummaryProvide 33 unique colors in hex or rgb format.Installationpip install unique-colorORgit clone https://github.com/YichaoOU/unique_color

cd unique_color

python setup.py installUsageThe following command return a list of 33 colors.from unique_color import unique_color as uc

my_colors = uc.unique_color()

my_colors = uc.unique_color_hex()

my_colors = uc.unique_color_rgb()
Package: unique_defaults
unique_defaultsGuarantee new objects are used for each function call.This allows writing signatures with mutable defaultswithoutsharing the
underlying object between function calls.fromunique_defaultsimportunique_listsdefclassic(a=[]):a.append("again")return" ".join(a)classic()=="again"classic()=="again again"@unique_listsdefunique(a=[]):a.append("again")return" ".join(a)unique()=="again"unique()=="again"Using the mutable object directly in the function signature leads to shorter and
more accurate annotations, as well as simplifying the function's logic.fromtypingimportList,Optionalfromunique_defaultsimportunique_listsdefclassic(a:Optional[List]=None):ifaisNone:a=[]a.append("again")return" ".join(a)classic()=="again"classic()=="again"@unique_listsdefunique(a:List=[]):a.append("again")return" ".join(a)unique()=="again"unique()=="again"Individual arguments can be targeted, instead of a general type.fromunique_defaultsimportunique_defaults@unique_defaults('line_list')deflog_list(line_list=[],_running_log=[]):line_list[:0]=["NOTICE:"]line=" ".join(line_list)_running_log.append(line)return_running_loglog_list(["first"])==["NOTICE: first"]log_list(["second"])==["NOTICE: first","NOTICE: second"]Any types can be made uniquefromunique_defaultsimportunique_defaultsclassCount:def__init__(self):self.count=0defadd(self,n):self.count+=ndefclassic(a=Count()):a.add(1)returnaclassic().count==1classic().count==2@unique_defaults(Count)defunique(a=Count()):a.add(1)returnaunique().count==1unique().count==1
Package: unique-distribution-name-874b102b-1a57-4164-85a0-5086844152b9
projectnameLorem ipsum, dolor sit amet consectetur adipisicing elit. Odio, temporibus recusandae? Repellat debitis nostrum maiores totam. Reprehenderit qui cum sequi quisquam quas molestiae atque sed iusto quibusdam quidem hic nostrum possimus animi blanditiis voluptate neque dicta harum, maiores expedita omnis velit magnam! Quaerat quo minus quasi! Maxime repellat placeat, distinctio molestias ab eum qui itaque ipsam minus minima labore doloribus quasi facere eligendi neque sunt quod adipisci perferendis quo beatae vero reprehenderit?Consequuntur numquam suscipit repellendus magni doloribus reprehenderit odit amet accusamus dolores, eligendi ea, voluptate sint assumenda voluptatum deleniti sed voluptatem, officiis perspiciatis laudantium sapiente exercitationem praesentium dolor quasi nam. Quia quas obcaecati, ratione eum porro minima. Fugiat eaque voluptatibus in, aliquid inventore velit adipisci possimus amet ex aut.
Package: unique-function
Unique-function PackageTo install the function you need to execute a command:"pip install unique-function"this package is able to identify the unique characters of the transmitted line and text from the file.To define unique characters, run python and import the package:"from unique_package import unique_function"
"unique_function.unique_symbols("your text")"when executing two commands, the --file has higher priorityGithub-flavored Markdown
Package: unique-id
# UNIQUE-IDUnique-ID is a small lib to generate unique ids - string values.# HOW TO INSTALL?To install `unique-id` use pip package manager.`pip install unique-id`# HOW TO USE IT?To get unique ID you have to call method `get_unique_id`.```pythonfrom unique_id import get_unique_id# Default returns id with length 14 and without `:*^`\",.~;%+-'` chars.my_id = get_unique_id()print(my_id)# Returns id with length 8 and without `A` and `a` letters.my_id = get_unique_id(length=8, excluded_chars="Aa")print(my_id)```
Package: unique-id-gen
unique_id_genA package that generates unique randomized idsFree software: MIT licenseDocumentation:https://unique-id-gen.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2016-12-21)First release on PyPI.
Package: unique-names-generator
py-unique-names-generatorGenerate unique and memorable name stringsPrerequisitesPython 3.6 or greater.Installation$pipinstallunique-names-generatorUsageIn[1]:fromunique_names_generatorimportget_random_nameIn[2]:get_random_name()Out[2]:'Pink Dragon'Parameterscombo- List of listsThe package comes with a bunch of random names as lists. By default, we use acolorandanimalto generate a random name.
Other lists areADJECTIVES,ANIMALS,COLORS,COUNTRIES,LANGUAGES,NAMES,STAR_WARS.In[1]:fromunique_names_generatorimportget_random_nameIn[2]:fromunique_names_generator.dataimportADJECTIVES,STAR_WARSIn[3]:get_random_name(combo=[ADJECTIVES,STAR_WARS])Out[3]:'Furious Yoda'separator- A string, default is blank spaceIn[1]:fromunique_names_generatorimportget_random_nameIn[2]:fromunique_names_generator.dataimportADJECTIVES,NAMESIn[69]:get_random_name(combo=[ADJECTIVES,NAMES],separator="_")Out[69]:'Fun_Antonie'style- A string, one of capital|lowercase|uppercase.In[1]:fromunique_names_generatorimportget_random_nameIn[2]:fromunique_names_generator.dataimportADJECTIVES,NAMESIn[3]:get_random_name(separator="-",style="lowercase")Out[3]:'crimson-cat'And, you can pass your own list of words. But let's face it, then this package would just be a function which randomly chooses a word from a list of strings. So its better to keep adding to the list here or fork it for your own use.
Package: uniquepath
Simple utility to remove duplicate in PATH-like environment variables.On Unix, it outputs the transformed variable so it can be used like this :$ PATH=`uniquepath.py PATH`On Windows, there is a helper.batscript that achieve the same effect (even if it is not as explicit):C:\uniquepath.bat PATHThe command line also offers ways to append, prepend, and remove path to the variable and it supports wildcard (usefull for remove).Usageusage: uniquepath.py [-h] [-v] [-r PATH] [-a PATH] [-p PATH]
                     [--separator CHAR] [--debug]
                     variable

positional arguments:
  variable              environment variable or variable value to process.

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  -r PATH, --remove PATH
                        remove value(s) from the environment variable.
  -a PATH, --append PATH
                        append value(s) to the environment variable.
  -p PATH, --prepend PATH
                        prepend value(s) to the environment variable.
  --separator CHAR      changes the path separator (default is os specific).
  --debug               different output format more readable but invalid. DO
                        NOT ASSIGN to an environment variable.

On Windows: use uniquepath.bat helper script.There are also 2 usage examples in the directorypyenv.bat(to switch python version) and the helper scriptuniquepath.batfor windows.InstallationDownload uniquepath.py fromhttp://github.com/elmotec/uniquepathLicenseLicensed under the term ofMIT License. See file LICENSE.
Package: unique-project
Unique-function PackageTo install the function you need to execute a command:
"python3 -m pip install --index-urlhttps://test.pypi.org/simple/--no-deps Unique-function"
this package is able to identify the unique characters of the transmitted line and text from the file.
to define unique characters from a string, run the command:
--string "your text"
to determine the unique characters of the file, run the command:
--file "path/to/file"
when executing two commands, the --file has higher priorityGithub-flavored Markdown
Package: unique-queue
UniqueQueueA Python UniqueQueue class - a FIFO queue, but which ignores attempts to re-add duplicate items, even after they're popped.ExampleWhen doing activities like web scraping, you must keep a queue of pending pages to visit/scrape, based on links found on already-scraped pages. You must also avoid re-visiting already-visited pages, or risk duplicates in the output dataset.This is an example of one such simple scraper:fromunique_queueimportUniqueQueueimportrequestsdefextract_urls(html:str)->list[str]:"""Crude function to extract a list of URL links from a webpage."""urls:list[str]=[]if'<a href="'inhtml:forxinhtml.split('<a href="')[1:]:url=x.split('"')[0]if'choosealicense.com'inurlandurl.startswith('https://'):urls.append(url)returnurls# Seed URL to start traversalseed_url="https://choosealicense.com/"# Initialize a UniqueQueue instanceq=UniqueQueue([seed_url])# For the example, say this is what we're trying to solve:# the number of time a string "example" appearsnumber_of_times_EXAMPLE_appears=0# Perform URL traversalwhilenotq.empty():# Get the next URL from the queueurl=q.pop()# Load the pagehtml=requests.get(url).text# Update the end result goalnumber_of_times_EXAMPLE_appears+=html.lower().count('example')# Add the new URLs to searchq.extend(extract_urls(html))# Print statsprint(f"Completed:{q.completed_count()}. Remaining:{q.remaining_count()}.")print(f"The string 'example' appears{number_of_times_EXAMPLE_appears}times on 'choosealicense.com'.")
Package: unique-sam
Unique-SamUnique-Samis a simple command line tool to remove the duplicated
alignments in theSAMfile.
If the MAPQ field of the alignment is available,unique-samwill keep
one and only one alignment with the highest score. Otherwise,unique-samwill calculate a score according to the alignment’s MD or
CIGAR field and use the calculated value to remove the duplicated
alignments.InstallInstall with the source code, in the source folder:pythonsetup.pyinstallIf you have**pip**installed, you can simply runpipinstallunique-samAfter installation you can accessunique-samfrom your command
line.Usageunique-samneed a SAM format file to run properly. Before usingunique-samcommand, we must sort the sam file by theQNAMEfield. You can usesamtoolsto achieve this purpose,
refer to samtools for more helps:samtoolssort--helpFor basic usage, in your command line environment:unique-saminput.sam-ooutput.sam-s ParameterIf you don’t have access to samtools, you can use-soption ofunique-sam:unique-sam-sinput.sam-ooutput.samThe sort functionality ofunique-samis implemented ascopy a temp file from the original sam fileextract the header of the sam filesort the alignments with Bashsortprogram-k Parameter-kparameter give you the control on how to extract the alignment
key from qname field the parameter of the-kis a regular
expression. You should group the key part with parentheses. ** e.g.
1** > qname:N|GACGCGGATCTT/500407:4:H03E5AFXX:1:21109:5977:6969_2:N:0:ATACAA> >-k'(.*)\_[1-2](.*)'> > key will be:N|GACGCGGATCTT/500407:4:H03E5AFXX:1:21109:5977:6969:N:0:ATACAA>
which will remove the_1/2part of the qname.** e.g. 2** > qname:HWI-ST667_0147:1:1101:1128:2079#CGATGT/1>
>-k'(.*)\/[1-2]'> > key will be:HWI-ST667_0147:1:1101:1128:2079#CGATGT> which will remove the/1/2part of the qname.For more aboutunique-samrun:unique-sam--helpUnique StrategyFollowing strategies are applied to find the unique & the best alignmentKeep the alignment pair that has the highest score. If more than one
pairs are found to have the same “Highest Score”, these pairs will be
removed.Read1 and Read2 should be mapped on different strands.The segment length decided by the read pairs should be longer than
0.7 * read lengthLog FileAll removed alignments will be written into log fileinput.sam.logunder current folder. Each line of the log file start with a symbol and
followed by the deleted alignment (the original alignment record in theinput.sam). The symbol describe the reason of why this/these
alignments should be removed. The specification of these symbols are
listed in the follow table:| Symbol | Description | | —— | ———– | |!|
Error lines | |<| Low score alignments | |=| Pairs
with more than one best score | |~| Read pair mapped on the
same strand | |?| Segment length too short | |-|
Invalid read1/2 information in flag filed or unmapped segment |CopyrightCopyright (c) 2015dlmeduLi@163.com
Package: unique-variable
Count unique charactersThis package allows you to protect the unique characters that it receives at the entrance. Works with files and strings.Getting startedThe program receives files as input, processes them and passes them to the script.parser.add_argument('--word', help='Enter the string')parser.add_argument('--file', type=argparse.FileType('r'))arguments = parser.parse_args()Function run_functionThe function receives an object as an input and determines the type, transfers the
data to a specific function.args - object witch is the result of parser.parse_args()Returns the number of unique charactersFunction count_letterCounts unique letters from given string. To speed up the work, the function has a cache, which, in case of
repetition of input data, returns a ready value._word - input string _Returns  the number of unique charactersFunction count_letter_in_fileFunction read string from file_file -input file objects _Returns the result of functioncount_letteror None, when file is not valid\ No newline at end of file
Package: uniqueWordList
uniqueWordListCreates an object with a list of each unique word in a plaintext document.Install withpip install uniqueWordListTakes the file path as its input.var.wordCountreturns the list's length,var.wordListreturns the list itself.importuniqueWordListtest_text=uniqueWordList.getList('someBook.txt',alphanumeric=True)print(test_text.wordCount)withopen('asdf.txt','w')asoutput:output.write(str(test_text.wordList))Strengths, weaknesses, and things to considerSetting alphanumeric toTruewill count any number or alphanumeric combo (ex: 1b, 1e5). Some of these will probably not be real words. It is set toFalseby default.Speaking of things that aren't real words: if there are any typos or deliberate misspellings they will be counted as separate words. Similarily, the plural versions of words will be counted as their own words as well.Same goes for people being cut off mid-word. "You stu-" will be counted as['you', 'stu']Because of how the list is made you might also find an entry like['a', 'b', 'c']when an author spells out "now I know my A,B,Cs" or similar text.Legalese is also common.['trademarkcopyright', 'wwwgutenbergorg']were both common in lists during tests. The easiest way to avoid these types of words may be to just delete those segments from your text docs manually.Overall the accuracy of the lists generated depends entirely on the author's writing style and the quality of the document. Your mileage may vary.
Package: uniquify
ExamplesShorten names/paths by extracting non-common parts:>>> from uniquify import shortname, shortpath
>>> shortname(['__common_part___abc___common_part__',
...            '__common_part___xbc___common_part__',
...            '__common_part___xyz___common_part__'])
['abc', 'xbc', 'xyz']
>>> shortpath(['some/long/path/___/alpha/___/___/',
...            'some/long/path/___/beta/___/___/',
...            'some/long/path/___/gamma/___/___/'])
['alpha', 'beta', 'gamma']Convert common parts into skip marks:>>> from uniquify import skipcommonname, skipcommonpath
>>> skipcommonname(['ab__common_part___c',
...                 'ij__common_part___k',
...                 'xy__common_part___z'])
['ab...c', 'ij...k', 'xy...z']
>>> skipcommonpath(['alpha/common/path/beta',
...                 'epsilon/common/path/delta',
...                 'phi/common/path/psi'])
['alpha/.../beta', 'epsilon/.../delta', 'phi/.../psi']InstallInstall it frompypipip install uniquify
# easy_install uniquify
Package: uniquipy
uniquipyMinimal python cli-tool to find and handle file duplicates in a directory based on file hashes.InstallationSimply clone this repository and install using pip, i.e., in the repository's root directory, runpip install .It is recommended to install this package only to a virtual environment. (Create withpython3 -m venv venvand activate an existing environment viasource venv/bin/activate.)UsageRununiquipy -hto get usage information in the terminal. Use the verbose-option (-v) in below commands to get progress indicators and verbose feedback on results. In the following, optional arguments are given in the form of[...].In order to analyze a directory, rununiquipy analyze -i <dir> [-m md5|sha1|sha256|sha512] [-v]A directory can be transformed into a format where only single copies/unique files are stored explicitly (along with information on how to reconstruct the original source). To perform this transformation, useuniquipy pack -i <dir> -o <dir> [-m md5|sha1|sha256|sha512] [-v]In order to revert thepack-command, rununiquipy unpack -i <dir> -o <dir> [-v]The input directory (-i) expects a directory containing anindex.txt-file and adata/-directory (as generated previously usinguniquipy pack ..).
Package: uni-rank
Uni-rankUni-rank is a mini python package to get the ordered list of USANationaluniversities based on their latest ranking onusnews.com/best-collegesThis package also provides few other information likestate,city,zip code.The result can be stored as acsvorjsonfile.InstallationUni-rank requires Python 3 to run.Install the package by running:pipinstall-Uuni-rankUsage# importfromunirankimportRanking# instantiaterank=Ranking()# get the ordered list of USA universitiesusa=rank.get_usa()#print the resultprint(usa)Helper Functions1. Get University Namesrank.get_names()2. Get Top 100 University Namesrank.get_top_names(100)2. Filter Universities by StatesInput: State List,Output: DataFrame of filtered universitiesstates=['NJ','MA']state_result=rank.select_by_state(states)print(state_result)3. Filter Universities by CitiesInput: City List,Output: DataFrame of filtered universitiescities=['Cambridge']city_result=rank.select_by_city(cities)print(city_result)Export1. Export as CSVrank.save_csv(usa,"usa_list.csv")2. Export as jsonrank.save_json(usa,"usa_list.json")USA University Properties:keydetaildisplayNameNamerankingDisplayRankRankstateStatecityCityzipZip CodedescriptionDescriptionNoteIntend to extend the package to support other types of rankings and also include other countries on later versions, hence the nameuni-ranknotusa-rankLicenseGNU General Public LicenseHistory1.0.2 (15-03-2021)Added a helper method1.0.1 (14-03-2021)First release on PyPIBug fixes