Saravanan666/pypi-org huggingface dataset:
Package: iso4
iso4Implementation ofISO 4(Rules for the abbreviation of title words and titles of publications) /CIEPS LTWA(ISSN International Centre's List of Title Word Abbreviations) as a Python library.Usage>>>fromiso4importabbreviate>>>abbreviate("Recent Advances in Studies on Cardiac Structure and Metabolism")'Recent Adv. Stud. Card. Struct. Metab.'>>>abbreviate("Journal of the American Academy of Dermatology",periods=False)'J Am Acad Dermatol'>>>abbreviate("Real Living with Multiple Sclerosis")Traceback(mostrecentcalllast):File"<stdin>",line1,in<module>...Exception:Ambiguouswordintitle:real;mustdisambiguatebetweenlangs:eng,fre,spa>>>abbreviate("Real Living with Multiple Sclerosis",disambiguation_langs=['eng'])'Real Living Mult. Scler.'>>>abbreviate("Anales de la Real Academia de Farmacia",True,['spa'])'An. R. Acad. Farm.'VIM PluginA VIM plugin allows to abbreviate names directly from inside vim.Install with VundleThe easiest way to install the plugin is via a vim plugin manager.
I usevundleThen, just add the following to your.vimrcfile.Plugin  'adlpr/iso4'Then run:PluginInstallfrom within VIM.UseThe following command will change the current line to its abbreviation:ISO4The command can also be used in visual mode.NotesPotential future improvements:stricter treatment of language in generalbetter fuzzy matching with diacriticsconversion from non-Latin scriptsConsider this function fairly hacky as is;do not expect 100% accuracy!
Package: iso4217
This Python package containsISO 4217currency data, represented asenummodule which was introduced in 3.4.  Note that this works on Python 2.7
as well as 3.10, the latest version of Python, throughenum34package.>>> from iso4217 import Currency
>>> Currency.usd
<Currency.usd: 'USD'>
>>> Currency.usd.code
'USD'
>>> Currency.usd.currency_name
'US Dollar'
>>> Currency.usd.exponent  # USD has cents
2
>>> Currency.jpy
<Currency.jpy: 'JPY'>
>>> Currency.jpy.currency_name
'Yen'
>>> Currency.jpy.exponent  # JPY has no minor units
0
>>> Currency('KRW')  # Get by the code string
<Currency.krw: 'KRW'>
>>> Currency.krw is Currency('KRW')
TrueWritten byHong Minhee.  Distributed under Public Domain.
Package: iso-4217
This package contains ISO 4217activeandhistoricalcurrency data.
Written and tested for Python 3.6 and above.
Supportspintfor operations with currency units.>>> from iso_4217 import Currency
>>> Currency.USD
<Currency.USD: 'US Dollar'>
>>> Currency.USD.value
'US Dollar'
>>> Currency.USD.number
840
>>> Currency('US Dollar')
<Currency.USD: 'US Dollar'>
>>> Currency.JPY.entities
frozenset({'JAPAN'})
>>> Currency.ZWR
<Currency.ZWR: 'Zimbabwe Dollar (2009)'>
>>> Currency.ZWR.entities
frozenset()
>>> Currency.ZWR.withdrew_entities
(Historic(entity='ZIMBABWE', name='Zimbabwe Dollar'...2009, month=6), begin=None)),)
>>> Currency.VED
<Currency.VED: 'Bolívar Soberano (VED)'>Pint units and subunits are available with convenientunitandsubunitproperties on Currency. Accessing these properties requirespintpackage installed
and automatically defines currency units in application default registry.>>> Currency.USD.unit * 5 + Currency.USD.subunit * 5
<Quantity(5.05, 'USD')>Currency units can be defined in any UnitRegistry manually>>> import pint
>>> from decimal import Decimal
>>> from iso_4217 import define_currency_units
>>> reg = define_currency_units(pint.UnitRegistry(non_int_type=Decimal))
>>> 5 * reg.USD
<Quantity(5, 'USD')>But units from separate registries should not be mixed>>> Currency.USD.unit == reg.USD
Traceback (most recent call last):
...
ValueError: Cannot operate with Unit and Unit of different registries.If you want to replace registry used by Currency just replace the application registry:>>> pint.set_application_registry(reg)
>>> Currency.USD.unit == reg.USD
TrueSubunits are defined withssuffix:>>> 5 * reg.USDs
<Quantity(5, 'USDs')>
>>> (5 * reg.USDs).to("USD")
<Quantity(0.05, 'USD')>
>>> (5 * reg.BHDs).to_base_units()
<Quantity(0.005, 'BHD')>Each currency is defined within it’s own dimension:>>> (5 * reg.USD).to('EUR')
Traceback (most recent call last):
...
pint.errors.DimensionalityError: Cannot convert from 'USD' ([currency_USD]) to 'EUR' ([currency_EUR])But automatic currency conversion can be made via pint Contexts>>> context = pint.Context()
>>> eur_to_usd = lambda r, eur: eur * r("1.2 USD/EUR")
>>> context.add_transformation("[currency_EUR]", "[currency_USD]", eur_to_usd)
>>> (Currency.EUR.unit * 5).to('USD', context)
<Quantity(6.0, 'USD')>Inspired byiso4217package by Hong Minhee.
Package: iso639
iso639======A simple (really simple) library for working with ISO639-2 language codes.Tested for Python 2.7 & 3.4.Includes data from Congress library: http://www.loc.gov/standards/iso639-2/php/code_list.php (+ updates)Installation------------The easiest way is using `pip`:pip install iso639Alternatives------------* **pycountry**: https://bitbucket.org/flyingcircus/pycountry - a more-featured package* **iso639**: https://github.com/noumar/iso639 - another package with the same nameExample usage-------------```pythonimport iso639>>> iso639.to_name('sv')u'Swedish'>>> iso639.to_native('sv')u'svenska'```For more examples, see doctests in the source code.Acknowledgments---------------@hosford42 - adding the native language support
Package: iso-639
StatusLicenseGNU Affero General Public License version 3 (AGPLv3)SupportsISO 639-1ISO 639-2ISO 639-3ISO 639-5Breaking changes0.4.4:retiredhas been changed to { ‘code’: (datetime, [_Language, …], ‘description’) }.0.4.0:alpha3has been renamed topart3.languages.alpha3might be used as an aggregation of all ‘three letter codes’ in the future.CompatibilityThis library is aimed to befully compatiblewithpycountry.languagesv1.11 and before. In v1.12 they broke their own API and this library willnot supportthe new API.It provides the following attribute abstractions:terminology->part2tbibliographic->part2balpha2->part1If you have no intentions on usingpycountry.languagesor want/need to keep compatibility then please use thepartXattributes for brevity and clarity.UsageAs taken frompycountry.languagesv1.11 documentation, with modifications and further additions.>>>fromiso639importlanguages>>>frompprintimportpprint>>>len(languages)7981>>>type(list(languages)[0])<class'iso639.iso639._Language'># Compatibility>>>aragonese=languages.get(alpha2='an')>>>aragonese.alpha2'an'>>>aragonese.bibliographic'arg'>>>aragonese.terminology'arg'>>>aragonese.name'Aragonese'>>>bengali=languages.get(alpha2='bn')>>>bengali.name'Bengali'# We *do not* deviate from the standard>>>try:...bengali.common_name...exceptAttributeErrorase:...print(e)'_Language'objecthasnoattribute'common_name'# New API>>>aragonese=languages.get(part1='an')>>>aragonese.part1'an'>>>aragonese.part2b'arg'>>>aragonese.part2t'arg'>>>aragonese.part3'arg'>>>aragonese.name'Aragonese'>>>aragonese.inverted'Aragonese'>>>pprint(vars(aragonese)){'inverted':'Aragonese','macro':'','name':'Aragonese','names':[],'part1':'an','part2b':'arg','part2t':'arg','part3':'arg','part5':''}>>>sanapana=languages.get(retired='sap')>>>[type(elem).__name__foreleminsanapana]['datetime','list','str']>>>[lang.part3forlanginsanapana[1]]['spn','aqt']Contains external dataISO 639-1, on 2014-11-28ISO 639-2, on 2014-11-28ISO 639-3 Code Set, dated 2015-05-05ISO 639-3 Language Names Index, dated 2015-05-05ISO 639-3 Macrolanguage Mappings, dated 2015-05-05ISO 639-3 Retired Code Element Mappings, dated 2015-05-05ISO 639-5, dated 2011-05-12
Package: iso_639_codes
This package may be used for translation between ISO 639-1 and ISO 639-2.>>>fromiso_639_codesimporttranslate>>>translate("cs")'cze'>>>translate("cze")'cs'Or alternative value in case that the code was not found:>>>translate("xe",alt="alt")'alt'There are two dicts which you may use for translation yourself:iso_639_codes.iso_639_2_to_1iso_639_codes.iso_639_1_to_2InstallationModule is hosted atPYPI, and
can be installed usingPIP:pip install iso_639_codes
Package: iso6709
ISO 6709This is a package for converting ISO6709 formatted strings into decimal representation.FormatsThis library supports the following DMS formats:±DD.DDDD±DDD.DDDD/-  Latitude and Longitude in Degrees±DDMM.MMMM±DDDMM.MMMM/- Latitude and Longitude in Degrees and Minutes±DDMMSS.SSSS±DDDMMSS.SSSS/- Latitude and Longitude in Degrees, Minutes and SecondsAs well as the standard altitude/height suffix:±AAAAUsage>>> from iso6709 import Location
>>> loc = Location('+27.5916+086.5640+8850/') # Mount Everest
>>> print (loc.lat.degrees, loc.lng.degrees, loc.alt
27.5916 86.5640 8850Changelog0.1.5 (2019-07-01)Update license clause to SPDX format0.1.4 (2019-06-28)Add support for negative altitudes (thanks @pistatium!)Bumped development versions for security fixes0.1.3 (2017-08-25)Fix an issue where rst files weren’t included in source pkg.0.1.2 (2017-08-25)First release on PyPI.
Package: iso8601
Simple module to parse ISO 8601 datespip install iso8601Documentation:https://pyiso8601.readthedocs.org/PyPI:https://pypi.org/project/iso8601/Source:https://github.com/micktwomey/pyiso8601This module parses the most common forms of ISO 8601 date strings (e.g. 2007-01-14T20:34:22+00:00) into datetime objects.>>> import iso8601
>>> iso8601.parse_date("2007-01-25T12:00:00Z")
datetime.datetime(2007, 1, 25, 12, 0, tzinfo=<iso8601.Utc>)
>>>See the LICENSE file for the license this package is released under.If you want more full featured parsing look at:https://arrow.readthedocs.io- arrowhttps://pendulum.eustace.io- pendulumhttps://labix.org/python-dateutil- python-dateutilhttps://docs.python.org/3/library/datetime.html#datetime.datetime.fromisoformat- Yes, Python 3 has built in parsing too!Parsed FormatsYou can parse full date + times, or just the date. In both cases a datetime instance is returned but with missing times defaulting to 0, and missing days / months defaulting to 1.DatesYYYY-MM-DDYYYYMMDDYYYY-MM (defaults to 1 for the day)YYYY (defaults to 1 for month and day)Timeshh:mm:ss.nnhhmmss.nnhh:mm (defaults to 0 for seconds)hhmm (defaults to 0 for seconds)hh (defaults to 0 for minutes and seconds)Time ZonesNothing, will use the default timezone given (which in turn defaults to UTC).Z (UTC)+/-hh:mm+/-hhmm+/-hhWhere it Differs From ISO 8601Known differences from the ISO 8601 spec:You can use a “ “ (space) instead of T for separating date from time.Days and months without a leading 0 (2 vs 02) will be parsed.If time zone information is omitted the default time zone given is used (which in turn defaults to UTC). Use a default of None to yield naive datetime instances.Referenceshttps://en.wikipedia.org/wiki/ISO_8601https://www.cl.cam.ac.uk/~mgk25/iso-time.html- simple overviewhttps://web.archive.org/web/20090309040208/http://hydracen.com/dx/iso8601.htm- more detailed enumeration of valid formats.Testingpoetry installpoetry run noxNote that you need all the pythons installed to perform a tox run (see below). pyenv helps hugely, use pyenv install for the versions you need then use ‘pyenv local version …’ to link them in (the tox-pyenv plugin will pick them up).Alternatively, to test only with your current python:poetry installpytestReleasingjust prepare-releasejust do-releaseSupported Python VersionsTested against:Python 3.7Python 3.8Python 3.9Python 3.10Python 3.11Python 3.12PyPy 3Python 3 versions < 3.7 are untested but should work.ChangesSeeCHANGELOG.md.
Package: iso8601plus
Simple module to parse ISO 8601 datesThis module parses the most common forms of ISO 8601 date strings (e.g.
2007-01-14T20:34:22+00:00) into datetime objects.>>> import iso8601
>>> iso8601.parse_date("2007-01-25T12:00:00Z")
datetime.datetime(2007, 1, 25, 12, 0, tzinfo=<iso8601.iso8601.Utc ...>)
>>>Changes0.1.6Removed Apache 2.0 license, now MIT license, same as original0.1.5Forked original version by Michael Twomey locatedhttp://code.google.com/p/pyiso8601/Added the ability to parse date without any time information.Apache 2.0 license0.1.4The default_timezone argument wasn’t being passed through correctly,
UTC was being used in every case. Fixes issue 10.0.1.3Fixed the microsecond handling, the generated microsecond values were
way too small. Fixes issue 9.0.1.2Adding ParseError to __all__ in iso8601 module, allows people to import it.
Addresses issue 7.Be a little more flexible when dealing with dates without leading zeroes.
This violates the spec a little, but handles more dates as seen in the
field. Addresses issue 6.Allow date/time separators other than T.0.1.1When parsing dates without a timezone the specified default is used. If no
default is specified then UTC is used. Addresses issue 4.
Package: iso8601.py
Parse utilities for iso8601 encoding.Whereas iso8601 encoding is offered bydatetime.isoformat(),
the standard library offers no means to decode an iso8601 format
datetime into adatetimeobject.  This module just makes up for that deficiency in an
unobtrusive way.Synopsisimport iso8601
dt = iso8601.parse_datetime("1994-11-05T08:15:30-05:00")Descriptionparse_datetime(string)Parse an iso8601-encoded datetime string.Args:string: an iso8601 datetime string.Returns:Adatetimeobject.Raises:ValueError: Could not parse the provided string.ISO8601_RERegular expression for an iso8601 encoded date, to be used for
validation or manual parsing.InstallationTo install iso8601, make sure you have Python 2.7 or greater
installed. Then run this command from the command prompt:python setup.py installIf you’re upgrading from a previous version, you need to remove it
first.Though it is not a requirement, it is highly suggested that you haveDistributeinstalled.For custom installation locations, please see:http://packages.python.org/distribute/easy_install.html#custom-installation-locationsLicenseiso8601 is distributed under theLGPLv2.1 license.
Package: iso8601utils
iso8601utilsDatastructures and utilities for representing, parsing, and validating ISO 8601dates,times,date-times,durations, andintervals.Datastructures>>>fromiso8601utilsimportparsers,interval,duration# Intervals>>>i=parsers.interval('R8/2016-08-01T23:10:59.111Z/2016-08-08T00:13:23.001Z')>>>iiso8601utils.interval(R8/2016-08-01T23:10:59.111000Z/2016-08-08T00:13:23.001000Z)# Decompose interval into an (int, datetime, datetime, iso8601utils.duration)# tuple representing (repeats, start, end, duration)>>>tuple(i)(8,datetime.datetime(2016,8,1,23,10,59,111000,tzinfo=Z),datetime.datetime(2016,8,8,0,13,23,1000,tzinfo=Z),iso8601utils.duration(P6DT1H2M23.89S))# Public properties>>>i.repeats8>>>i.startdatetime.datetime(2016,8,1,23,10,59,111000,tzinfo=Z)>>>i.enddatetime.datetime(2016,8,8,0,13,23,1000,tzinfo=Z)>>>i.durationiso8601utils.duration(P6DT1H2M23.89S)# Durations>>>d=parsers.duration('P3Y6M4DT12H30M5S')>>>diso8601utils.duration(P3Y6M4DT12H30M5S)# Decompose duration into a (timedelta, monthdelta) tuple>>>tuple(d)(datetime.timedelta(4,45005),MonthDelta(42))# Public properties>>>d.timedeltadatetime.timedelta(4,45005)>>>d.monthdeltaMonthDelta(42)# Add and subtract durations with datetime objects>>>fromdatetimeimportdatetime>>>dt=datetime(2016,11,4,4,49,4)>>>dt+ddatetime.datetime(2020,5,8,17,19,9)>>>dt-ddatetime.datetime(2013,4,30,16,18,59)# Add and subtract durations>>>a=duration(years=1,months=5,days=3,hours=12)>>>b=duration(days=2,hours=5)>>>a+biso8601utils.duration(P1Y5M3DT17H)>>>a-biso8601utils.duration(P1Y5M1DT7H)# Compare durations>>>a<bFalse>>>a>bTrueParsers>>>fromiso8601utilsimportparsers# Parse intervals>>>parsers.interval('2016-08-01T23:10:59.111Z/2016-08-08T00:13:23.001Z')iso8601utils.interval(2016-08-01T23:10:59.111000Z/2016-08-08T00:13:23.001000Z)>>>parsers.interval('R5/2002-08-15T16:20:05.100+08:10/2002-10-12T17:05:25.020-01:40')iso8601utils.interval(R5/2002-08-15T16:20:05.100000+08:10/2002-10-12T17:05:25.020000-01:40)# Parse durations>>>parsers.duration('P3Y6M4DT12H30M5S')iso8601utils.duration(P3Y6M4DT12H30M5S)# Parse times>>>parsers.time('13:15+05:10')datetime.time(13,15,tzinfo=+05:10)# Parse dates>>>parsers.date('1981-04-05')datetime.date(1981,4,5)# Parse datetimes>>>parsers.datetime('2007-08-09T12:30-02:00')datetime.datetime(2007,8,9,12,30,tzinfo=-02:00)# Parse ordinal dates>>>parsers.date('1981-095')datetime.date(1981,4,5)# Parse week dates>>>parsers.date('2016-W43-1')datetime.date(2016,10,24)Validators# Validate strings>>>fromiso8601utilsimportvalidators>>>validators.interval('1999-12-31T16:00:00.000+04:00/P5DT7H')True>>>validators.interval('23P7DT5H')False>>>validators.duration('P3Y6M4W7DT12H30M5S')True>>>validators.duration('23P7DT5H')False>>>validators.time('13:15+05:10')True>>>validators.date('1981-04-05')True>>>validators.date('1981-095')True>>>validators.date('1981-W43-1')True>>>validators.date('1981W43-1')False
Package: isochrones
Provides simple interface for interacting with stellar model grids.https://isochrones.readthedocs.ioBasic UsageFor simplest out-of-the-box usage after installation, make a file calledstar.inithat
looks something like this:Teff = 5770, 100
feh = 0.0, 0.15
logg = 4.5, 0.1
V = 10.0, 0.05Any combination of spectroscopic or [supported] photometric properties, as well
as parallax, can go as properties into this file.Once you’ve made this file, typestarfitat the command line.  Or if you want to be organized,
you can putstar.iniin a folder calledmystar[or whatever]
and runstarfit mystarfrom the command line.  Thestarfitscript
will create an HDF5 file containing the savedStarModel, which you
can load from python usingStarModel.load_hdf, as well as triangle
plots illustrating the fit.AttributionIf you useisochronesin your research, please citethis ASCL reference.
Package: isocodes
isocodesisocodes provides you access to lists of various ISO standards (e.g. country, language, language scripts, and currency names).The data is coming fromhttps://salsa.debian.org/iso-codes-team/iso-codes, many thanks to them.Installationpip install isocodesUsageCountries (ISO 3166)Get methodYou can acces one country by using the method get with the parameters being the json keys of the .json files in the share/iso-codes/json folderExample>>> from isocodes import countries
>>> countries.get(name="Germany")
{'alpha_2': 'DE', 'alpha_3': 'DEU', 'flag': '🇩🇪', 'name': 'Germany', 'numeric': '276', 'official_name': 'Federal Republic of Germany'}Items propertyYou can get a json parsed list from the .json files in the share/iso-codes/json folder with the items property.That list contains each countries in the form of the dictionary that you can get with the method get.Example>>> from isocodes import countries
>>> for country in countries.items:
...     print(country)
...
{'alpha_2': 'AW', 'alpha_3': 'ABW', 'flag': '🇦🇼', 'name': 'Aruba', 'numeric': '533'}
{'alpha_2': 'AF', 'alpha_3': 'AFG', 'flag': '🇦🇫', 'name': 'Afghanistan', 'numeric': '004', 'official_name': 'Islamic Republic of Afghanistan'}
{'alpha_2': 'AO', 'alpha_3': 'AGO', 'flag': '🇦🇴', 'name': 'Angola', 'numeric': '024', 'official_name': 'Republic of Angola'}
{'alpha_2': 'AI', 'alpha_3': 'AIA', 'flag': '🇦🇮', 'name': 'Anguilla', 'numeric': '660'}
{'alpha_2': 'AX', 'alpha_3': 'ALA', 'flag': '🇦🇽', 'name': 'Åland Islands', 'numeric': '248'}by_xxx propertyYou can get a list with sorted data by one of the property with the by_xxx property, xxx being one of the data key (alpha_2, name, numeric, etc.).Example>>> countries.by_numeric[0]
('004', {'alpha_2': 'AF', 'alpha_3': 'AFG', 'flag': '🇦🇫', 'name': 'Afghanistan', 'numeric': '004', 'official_name': 'Islamic Republic of Afghanistan'})Languages (ISO 639-2)Same as countries but you replace countries by languagesCurrencies (ISO 4217)Same as countries but you replace countries by currenciesCountries and Subdivisions (ISO 3166-2)Same as countries but you replace countries by subdivisions_countriesFormer countries (ISO 3166-3)Same as countries but you replace countries by former_countriesExtended languages (ISO 639-3)Same as countries but you replace countries by extendend_languagesLanguage families (ISO 639-5)Same as countries but you replace countries by language_familiesScript names (ISO 15924)Same as countries but you replace countries by script_namesTranslationsTranslations are included in this project with gettext support. The domain names are to be found onhttps://salsa.debian.org/iso-codes-team/iso-codesExample>>> import gettext
>>> import isocodes
>>> french = gettext.translation('iso_639-2', isocodes.LOCALES_DIR, languages=['fr'])
>>> french.install()
>>> _("French")
'français'DevelopDon't forget to clone the submodules as well and execute update.sh to update the debian's iso-codes repo.
Package: isodaterange
READMEThis project contains a library which converts an ISO date/time string into a range.UsageThe module contains one function -get_date_range- which converts a given ISO
date/time string into a range and returns this range as a list. It is used as
follows:importisodaterangerange=isodaterange.get_date_range("2019-07")# returns [datetime.datetime(2019, 7, 1, 0, 0, 0), datetime.datetime(2019, 7, 31, 23, 59, 59)]range=isodaterange.get_date_range("2019-04-01/2019-06-23")# returns [datetime.datetime(2019, 4, 1, 0, 0, 0), datetime.datetime(2019, 6, 23, 23, 59, 59)]range=isodaterange.get_date_range("P1Y")# returns [now, date one year from now]TestingThere is atestsmodule which contains unit tests. This can be run as follows:python3 -m unittest isodaterange.testsLicense(c) UK Research and Innovation (UKRI), 2019 - 2020, British Antarctic Survey.
You may use and re-use this software and associated documentation files free of charge in any format or medium, under
the terms of the Open Government Licence v3.0.
You may obtain a copy of the Open Government Licence athttp://www.nationalarchives.gov.uk/doc/open-government-licence/
Package: isodatetimehandler
An alternate jsonpickle handler for datetimeThisjsonpicklehandler serializesdatetime.datetimeobjects as ISO-8601 formatted strings.  Such strings may be
treated as aDATETIMEtype in a RDBMS such as SQLite
allowing date-related query clauses to work with serialized
datetime objects directly.InstallationpipinstallisodatetimehandlerUsageimportisodatetimehandlerThen usejsonpickleas you normally would.
Package: isodd-lucasedng
is_odd - lucasedngUnder construction! Not ready for use yet! Currently experimenting and planning!Developed by Lucas Gonçalves (c) 2024Examples of How To UseUsing is_odd methodfromis_oddimportis_odd# Check if a number is oddnumber=4ifis_odd(number):print(f"{number}is odd.")else:print(f"{number}is not odd.")This simple library allows you to easily check if a number is odd. The is_odd method takes an integer as input and returnsTrueif the number is odd, andFalseotherwise.Check out more on my GitHub or follow me for updates.