Saravanan666/pypi-org huggingface dataset:
Package: usingversion
usingversionusingversionis a package designed to help
other packages help their users keep tract of
what version they are using.It was built with packages that are maintained withpoetryin
mind but it works in a more limited way with other
approaches.What is the Problem?As developers, we would like to have a single source or truth for
the version number of packages we maintain. In projects that usepoetry,
this is apyproject.tomlfile, which typically begins
something like[tool.poetry]
name = "mypackage"
version = "1.2.3"
...Once I have put a version number there, I would like the
codeimportmypackagemyppackage.versionto return the version number frompyproject.toml.The issue is that project versions go through different
lifecycle phases. A package that has been built and published
onpypihas the version number that
started inpyproject.tomlwhen it was built encoded elsewhere.
But a newer version that I am actively developing, testing, or debugging
before release only has thepyproject.tomlversion.usingversionknows about this, and knows how to find the version
in either of those places in different scenarios. It makesmypackage.versionalways work no matter how I am using or developing
or testing.What about the+As an added measure, to reduce confusion between development and
production environments, when the version number comes straight
frompyproject.tomlin a development environment, a+is
appended. This indicates that the source could have been modified
in the development environment. So instead of"1.2.3", the
version will be reported as"1.2.3+".For Package MaintainersTo useusingversionin your package, first take
a dependency onusingversion. In Poetry, you would
do this withpoetryaddusingversionIn other environments, you might add it to e.g.requirements.txt.Now, just
add the following to the very end of your top-level__init__.py:fromusingversionimportgetattr_with_version__getattr__=getattr_with_version("mypackage",__file__,__name__)Be sure to substitute the actual name of your package for"mypackage".To test, tryimportmypackageprint(f"The version of mypackage is{mypackage.version}.")For End UsersThere's really nothing all that exciting to do.
You might not even know or care that the developer
of a package you depend on chose to useusingversion.
If a packagesomepackagethat you depend on usesusingversionthen you can check the version withimportsomepackageprint(f"The version of somepackage is{somepackage.version}.")Unless the maintainters ofsomepackagehave chosen
otherwise,somepackage._versionis the same assomepackage.versionso you can use whichever you
prefer.
Package: usit
USIT : Universal Scanning InterfacePython package for scientific experiments automationThe purpose of this package it to provide easy and efficient tools to deal with your scientific instruments, and to run automated experiments with them, by command line instructions or through a graphical user interface (GUI).Created by Quentin Chateiller, Python drivers from Quentin Chateiller and Bruno Garbin, for the C2N-CNRS (Center for Nanosciences and Nanotechnologies, Palaiseau, France) ToniQ team.Please visithttps://usit.readthedocs.io/for the full documentation of this package
Package: usito
Introduction to usitoThis package is provided by researchers of theInstitute of Applied Optics (University of Stuttgart). It enables students and fellow researchers a simple introduction intoneural networksand allows the generic use of those networks. The package shall also grow over time, that we can provide more sophisticated architectures and modified class methods (e.g. for layers or activation functions).Our development is (at least currently) solely based on the keras and tensorflow engine.Participation is welcomed.Welcome to the ITO family.Plug in and play :)Your developers and maintainers,
AliB and FelixFischerHow to get started#importing the packageimportusito#loading exampledata=usito.load('./test.csv',header=0)ToDos:[x] Data import and export
[x] Zipping and unzipping option
[ ] Creating pip package for usito
Package: usk
Copyright (c) 2020 UniSat and Al-Farabi Science Park and Yaakov AzatPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Description: UniSat Nano-Satellites Educational Program
Platform: UNKNOWN
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: Implementation :: CPython
Requires-Python: >=3.6
Package: usmerge
Unsupervised MergeA simple Python package to cluster one-dimention series, following my working paper.Installationinstall the package using pip:pip install usmergeSOM-K ClusterThe steps are over here.Implement the SOM algorithm. Enter the data to be clustered into the SOM network and train. Because only moderately accurate clustering results are needed, training time can be greatly reduced. Algorithm convergence is not necessary.After the training has concluded, the self-organization net- work makes each node in the output layer a nerve cell sen- sitive to a particular pattern. The inward star-like (Hu et al., 2002) weighting vector corresponding to each node becomes the center vector of each input pattern.Use the inward star-like weighting vector obtained in (2) as the initial clustering center and implement the K-means clustering algorithm.Obtain the SOM-K derived clusters and conduct relevant analysis.UsageIf you want to use som-k cluster.from usmerge import som_k_merge

result = som_k_merge(data,3,sig=0.5,lr=0.5,echo=1000)Of course, you could ignore the parameter(sig, lr, echo), I have initialized thiese parameters, but you could change if you want.
Package: usncarve
Python script to carve NTFS USN records from arbitrary binary dataDescriptionThe NTFS USN Change journal is a volume-specific log  which records metadata changes to files. It is a treasure trove of information during a forensic investigation. As the change journal reaches its maximum size, clusters of the journal’s disk space are marked unallocated by the operating system to be used when needed at a later time. As with many other artifacts, USN change journal records in unallocated space can be extremely valuable. Better yet, due to the compact nature of change journal records, I routinely find millions of records outside of the file system’s allocated clusters.This script will carve NTFS USN journal records from arbitrary binary data, and output to a file in binary format. The investigator can then parse these records with a tool of their own choosing. At this time the script only supports raw/dd input files.Usage and  OutputSimply specify the input and output files:dev@computer:$ python usncarve.py -f file.raw -o usn.rawCommand-Line Optionsusage: usncarve.py [-h] -f FILE -o OUTFILE

optional arguments:
    -h, --help            show this help message and exit
    -f FILE, --file FILE  Carve USN records from the given file
    -o OUTFILE, --outfile OUTFILE
                        Output to the given fileInstallationUsing setup.py:python setup.py installUsing pip:pip install usncarveTravis-CI
Package: usnews-scrapper
U.S.News Scrapper is a Python library that collect data from the website ofusnewsand output those data in a file for offline usage. Till now, it is only capable of collecting graduate schools data and output it in .xls format. After generating the .xls file, it will be opened by default excel file opener.Visit github_ page for detailed informations.SetupVisit github_ page for detailed informations.$ pip install usnews_scrapperUsageusage: python usnews_scrapper.py [-h] -u URL [-o OUTPUTFILENAME] [-p PAUSETIME] [–from STARTPAGE] [–to ENDPAGE]Collects data from usnews and generates excel fileoptional arguments:
-h, –help                              Show this help message and exit
-u URL, –url URL                       The usnews address to collect data from. Put the URL within qoutes i.e. “ or ‘ .
-o OUTPUTFILENAME                       The output file name without extension.
-p PAUSETIME, –pause PAUSETIME             The pause time between loading pages from usnews.
–from STARTPAGE                        The page number from which the scrapper starts working.
–to ENDPAGE                            The page number to which the scrapper works.ExamplesCopy the address of the page from usnews website and in the Command Prompt and enter this command -$ cd USNews-Scrapper$ python usnews_scrapper.py –url=”https://www.usnews.com/best-graduate-schools/top-science-schools/computer-science-rankings” -o file_name -p 2 –from=2 –to=5The output file will be saved in current directory under the name of file_name_*.xlsAuthorsJoy Ghosh-www.ijoyghosh.com
Package: usody-sanitize
Usody SanitizeUnder development.A tool to securely erase disks by performing a certificate-based validation of
the wipe process.It ensures that the data on the disk is completely and
irrecoverably erased, protecting sensitive information from being recovered.
The tool uses industry-standard wiping methods to securely erase the data on
the disk, making it impossible to recover. The tool also generates a
certificate of sanitize process that can be used to verify the authenticity of the wipe
process. This tool is perfect for businesses and individuals who need to
securely and permanently remove sensitive data from their disks.DependenciesThis tool useshdparmandsmartmontoolsfor the sanitize process, make sure to have them installed before running
sanitize.For Debian users, run the following command:aptupdate
aptinstallpython3-pydanticnvme-clismartmontoolsxxdErasure tools dependenciesNVME disksOn debian we need the dependencynvme-cli.aptupdate
aptinstallnvme-clinvme-cliis a valuable tool to efficiently and securely erase the data while benefiting from the speed and security
features inherent in NVMe technology. This is particularly important in scenarios where data confidentiality,
performance, and compliance are critical concerns.InstallationInstall the package from the official PyPi repository:$pipinstallusody_sanitize---> 100%UsageSanitize is written to make it easy to use via terminal or import and integrate with your code.Terminal clientErase a single disk using the default method:sanitize-d/dev/sdc-mBASIC--confirmImport client@Todo: Show some examples.
Package: usolitaire
Play solitaire in your terminal.Point and click to move cards, or use the keyboard shortcuts.Install with:pip install usolitaireRun with:usolitaireTo run from sources, you can run with:python -m usolitaire.appFree software: MIT licenseHistoryI built the first version of this app in 2017 using theurwidlibrary, while
I was attendingRecurse Center.In 2023, after attending Europython and learning theTextualframework,
which solved all the gripes I had withurwidbefore, I decided to rewrite
it in Textual and added the features that were missing.
Package: usoptimize
UltraStar Stream Optimizer (usoptimize)A Python CLI UltraStar Song Converter to optimize song files for the web.
It converts video files to an optimized and web playable format and converts txts to UTF-8.InstallationYou can install the UltraStar Stream Optimizer fromPyPI:python -m pip install usoptimizeThe reader is supported on Python 3.0 and above.How to useBefore using the UltraStar Stream Optimizer, you need to install the FFmpeg.For windows you can use:https://github.com/icedterminal/ffmpeg-installer/releasesUltraStar Stream Optimizer is a command line application, namedusoptimize. To see a help page runusoptimize --help.$ usoptimize --help
usage: usoptimize [-h] -i <path of songs> -o <output path> [-r]

A Python CLI UltraStar Song Converter to optimize song files for the web.

optional arguments:
  -h, --help            show this help message and exit
  -i <path of songs>, --input <path of songs>
                        Filepath of songs that should be converted
  -o <output path>, --output <output path>
                        Destination directory of converted songs
  -r, --replace         Whether or not to replace old existing files in output
                        dir
Package: usort
μsortSafe, minimal import sorting for Python projects.μsort is a safe, minimal import sorter. Its primary goal is to make no "dangerous"
changes to code. This is achieved by detecting distinct "blocks" of imports that are
the most likely to be safely interchangeable, and only reordering imports within these
blocks without altering formatting. Code style is left as an exercise for linters
and formatters.Within a block, µsort will follow common Python conventions for grouping imports based
on source (standard library, third-party, first-party, or relative), and then sorting
lexicographically within each group. This will commonly look like:importrefrompathlibimportPathfromtypingimportIterablefromunittest.mockimportcall,Mock,patchimportaiohttpfromaiosqliteimportconnectimportfoofrombarimportbarfrom.mainimportmainBlocks are inferred from a number of real world conditions, including any intermediate
statements between imports:importwarningswarnings.filterwarnings(...)importreimportsysIn this case, µsort detects two blocks–separated by the call tofilterwarnings(),
and will only sort imports inside of each block. Running µsort on this code
will generate no changes, because each block is already sorted.Imports can be excluded from blocks using the#usort:skipdirective, or with#isort:skipfor compatibility with existing codebases. µsort will leave
these imports unchanged, and treat them as block separators.See theUser Guidefor more details about how blocks are detected,
and how sorting is performed.Installµsort requires Python 3.6 or newer to run. Install µsort with:$pipinstallusortUsageTo format one or more files or directories in-place:$usortformat<path>[<path>...]To generate a diff of changes without modifying files:$usortdiff<path>To just validate that files are formatted correctly, like during CI:$usortcheck<path>pre-commitµsort provides apre-commithook. To enforce sorted
imports before every commit, add the following to your.pre-commit-config.yamlfile:-repo:https://github.com/facebook/usortrev:v1.0.7hooks:-id:usortLicenseμsort is MIT licensed, as found in theLICENSEfile.
Package: uspec
USpecUSpecis a 'Domain Specific Language' (DSL) testing tool written in Python to test Python code in a 'Behavior-Driven Development' (BDD) mannar.Alomost the same grammar asRspecAlternative representaiotn of a test case ofunittest. Since Uspec file can be tested by unittest, Developers can gradually migrate existing unittests to USpec.What is USpec?USpec has the alomost the same grammar as RSpecLet's assume thatBowling classcalculates the sum of game scores if there is no strikes and spares.bowling.pyclassBowling(object):def__init__(self):self._score=0defhit(self,pins):self._score+=pinsdefscore(self):returnself._scoreFor example, the instance of the Bowling class returns 80 for 20 same hit numbers 4, 4, ... , 4.
This example can be written inbowling_spec.rbbyRspec filewhich is the most common BDD tool.
UsingUSpec, we can write a spec Python filebowling_spec.pyequivalent tobowling_spec.rbbowling_spec.rbRSpec.describeBowling,"#score"docontext"with no strikes or spares"doit"sums the pin count for each roll"dobowling=Bowling.new20.times{bowling.hit(4)}expect(bowling.score).toeq80endendendbowling_spec.pyfromuspecimportdescription,context,itwithdescription(Bowling,"#score"):withcontext("with no strikes or spaces"):@it("sums the pin count for each roll")def_(self):bowling=Bowling()foriinrange(20):bowling.hit(4)self.assertEqual(bowling.score(),80)Uspec file is an alternative representation of unittest fileWhen a Uspec file is loaded by Python runtime, it generates a sub class ofunittest.TestCasein that place.The equivalent test case of the USpec filebowling_spec.pyabove benerated by USpec is:importunittestclassTestBowling_Score__WithNoStrikesOrSpaces(unittest.TestCase):deftest_sums_the_pin_count_for_each_roll(self):bowling=Bowling()foriinrange(20):bowling.hit(4)self.assertEqual(bowling.score(),80)Uspec file can be tested by unittestUspec file behaves as if it was written in unittest format, so it can be tested by unittest below:$ python -m unittest -v bowling_spec.py 
 test0000: Bowling#score (with no strikes or spaces) sums the pin count for each roll (uspec.TestBowling#score) ... ok
 
 ----------------------------------------------------------------------
 Ran 1 tests in 0.000s
 
 OKMix of Uspec files and unittest files can be also tested by unittest.
Assume thattest_baseball.pyis the traditional unittest file.
Sincebowling_spec.pyandtest_baseball.pycan be processed simultaneously by unittest, The total count of test cases becomes sum of test case of these files:$ python -m unittest -v bowling_spec.py   test_baseball.py
 test0000: Bowling#score (with no strikes or spaces) sums the pin count for each roll (uspec.TestBowling#score) ... ok
 test_game_countes (test_baseball.py.TestBaseball) ... ok
 
 ----------------------------------------------------------------------
 Ran 2 tests in 0.000s
 
 OKUsageAuthorTakahide Nogayama-NogayamaLicenseThis project is licensed under the MIT License - see theLICENSEfile for detailsContributingPlease readCONTRIBUTING.mdfor details on our code of conduct, and the process for submitting pull requests to us.
Package: uspec_finder
uspec-finderObservation planning and finding charts for ULTRASPECuspec_finderprovides a Python scriptusfinderfor observation planning with
ULTRASPEC on the Thai National Telescope. It allows you to generate finding charts as
well as specify the instrument setup you require, whilst providing an estimate of
observing cadence, exposure time and S/N estimates.uspec_finderis written in Python and is based on TKinter. It should be compatible
with Python2 and Python3, but is only tested on Python3.InstallationThe software is written as much as possible to make use of core Python
components. It requires my ownhcam_widgetsmodule.
It also relies on the third party librariesastropyfor astronomical
calculations and catalog lookup, as well asgingafor
image display. Optionally, you can also useastroqueryto expand
the range of surveys one can download images from.Installing usingpipshould take care of these dependencies. Simply install with:pip install uspec_finderor if you don’t have root access:sudo pip install uspec_finderor:pip install --user uspec_finderFree software: MIT licenseDocumentation:https://uspec-finder.readthedocs.io.History0.1.0 (2017-02-11)First release on PyPI.
Package: us-pls
us-plsA client to pull and query data from the Public Libraries Survey.us-plsThe Public Libraries SurveyInstallationGetting startedGetting dataUnderstanding the variables"But I don't want to read!"The Public Libraries SurveyFrom the Institute of Museum and Library Services'website:The Public Libraries Survey (PLS) examines when, where, and how library services are changing to meet the needs of the public. These data, supplied annually by public libraries across the country, provide information that policymakers and practitioners can use to make informed decisions about the support and strategic management of libraries.Installationpipinstallus-plsGetting startedBegin by selecting the year of the survey:>>>fromus_plsimportPublicLibrariesSurvey>>>pls_client=PublicLibrariesSurvey(year=2017)<PublicLibrariesSurvey2017>Getting dataThe survey offers three datasets:Public Library System Data File (DatafileType.SystemData). This contains one row per library in the USPublic Library State Summary/State Characteristics Data File (DatafileType.StateSummaryAndCharacteristicData). The contains one row per state in the US, as well as outlying areas.Public Library Outlet Data File (OutletData). The contains data for public library service outlets (e.g., central, branch, bookmobile, and books-by-mail-only outlets)To select and query a dataset, do the following:>>>fromus_plsimportDatafileType>>>pls_client.get_stats(_for=DatafileType.<Typeofinterest>)<pandas.DataFramewiththedata>Understanding the variablesUnfortunately, the PLS does not have any API serving its data. As a result, this client works by scraping the PLS page (which contains all of its surveys), storing its survey and documentation URLs, and then downloading the surveys and documentation for the year of interest.Because the documentation files are PDFs, and lack a standardized formatting from year to year, there is no deterministic way to extract variable data from them programmatically.As a result, the client will also download a given year's survey's documentation. (By default it will store this in the your current directory underdata/<survey-year>/Documentation.pdf.) So, if you want to verify what a variable name means, or, if you'd like to read more about that survey's methodology, that documentation file will be your friend."But I don't want to read!"If you really hate reading, or you want a broad overview of what each datafile contains, run the following (we're using the Outlet Data file as an example):>>>pls_client.read_docs(on=DatafileType.OutletData)"Public Library Outlet Data File includes..."
Package: usps-api
This is a simple Python wrapper for the USPS API. Instead of having to deal with XML, use this library and receive nicely formatted JSON back while tracking shipments, creating shipments, and validating addresses.InstallationTo install usps-api, use pip:pip install usps-apiOr to install from source:python setup.py installConfigurationNote: In order to use any of these APIs, you need to register with USPS and get aUSERIDhttps://www.usps.com/business/web-tools-apis/welcome.htm. For the create_shipment endpoint, you will also need to request further permissions by emailinguspstechnicalsupport@mailps.custhelp.comabout Label API access.UsageTrack ShipmentsfromuspsimportUSPSApiusps=USPSApi('XXXXXXXXXXXX')track=usps.track('00000000000000000000')print(track.result)Create ShipmentThecreate_shipmentfunction needs a to and from address, weight (in ounces), service type and label type. Service types and lable types can be found inusps/constants.py. Defaults areSERVICE_PRIORITYandLABEL_ZPL.fromuspsimportUSPSApi,AddressfromuspsimportSERVICE_PRIORITY,LABEL_ZPLto_address=Address(name='Tobin Brown',address_1='1234 Test Ave.',city='Test',state='NE',zipcode='55555')from_address=Address(name='Tobin Brown',address_1='1234 Test Ave.',city='Test',state='NE',zipcode='55555')weight=12# weight in ouncesusps=USPSApi('XXXXXXXXXXXX',test=True)label=usps.create_label(to_address,from_address,weight,SERVICE_PRIORITY,LABEL_ZPL)print(label.result)Validate AddressfromuspsimportUSPSApi,Addressaddress=Address(name='Tobin Brown',address_1='1234 Test Ave.',city='Test',state='NE',zipcode='55555')usps=USPSApi('XXXXXXXXXXXX',test=True)validation=usps.validate_address(address)print(validation.result)LicenseMIT. SeeLICENSEfor more details.