Saravanan666/pypi-org huggingface dataset:
Package: nhlapip
nhlapip - Low-dependency NHL API interface for PythonInstallationInstall nhlapip with pip:pipinstallnhlapipUsageWith PythonThe API is exposed via endpoint-based classes. Seebelow for a full list of endpoints. Some quick examples:# Player Data for Joe Sakicfromnhlapip.playerimportPlayersakic=Player('8451101')print(sakic.get_data())# Player's All Seasons Statisticsprint(sakic.get_stats_allseasons())# All Teams' Rostersfromnhlapip.teamimportTeamall_teams=Team()print(all_teams.get_roster())Many usage examples can be found in thePandas showcasethat shows data retrieval for many endpoints.Command line interface (CLI)A very simple CLI is also available. This is still in active development. Some examples:echo'\n\Get data nhlapip for 1 player:\n'nhlapipPlayer8451101echo'\n\nGet data for 2 Teams :\n'nhlapipTeam12Many usage examples can be found in theCLI showcasethat shows CLI data retrieval for many endpoints.Currently implemented endpointsMajor endpointsTeamsTeam MetadataTeam().get_data()Team RostersTeam().get_roster()Team SchedulesTeam().get_schedule_next(),Team().get_schedule_previous()Team StatsTeam().get_stats()People (Player)Players metadataPlayer.get_data()Players all season statsPlayer.get_stats_allseasons()Games (Game)Games contentGame.get_content()Games full live feedGame.get_feed()Games box score infoGame.get_boxscore()Games line score infoGame.get_linescore()TournamentsPlayoffsTournament("playoffs")OlympicsTournament("olympics")World CupsTournament("worldcup")ScheduleGeneric API with all parametersSchedule()StandingsStandings()Minor endpointsDivisionsDivisions()ConferencesConferences()DraftsDrafts()SeasonsSeasons()AwardsAwards()VenuesVenues()Draft prospectsDraftProspects()Metadata endpointsGame TypesGameTypesMd()Game StatusesGameStatusMd()Play TypesPlayTypesMd()Tournament TypesTournamentTypesMd()Standings TypesStandingsTypesMd()Stats TypesStatTypesMd()Event TypesEventTypesMd()NHL API data for R usersThis package is a Python port of a more mature and feature-rich R package{nhlapi}. If you are an R user, please check the package out onGitHuband onCRAN.AcknowledgmentsThanks go to Drew Hynes for documenting this so well onGitLab.Copyright messageNHL and the NHL Shield are registered trademarks of the National Hockey League. NHL and NHL team marks are the property of the NHL and its teams. © NHL 2020. All Rights Reserved.
Package: nhl-core
NHL CoreThe National Hockey League (NHL) was kind enough to provide all of the historical data on a free web interface. This library was created to parse the data that is retrieved from the api. After json data is retrieved it can be parsed by passing it to anNHLDatapython object. The documentation can be foundhere.ExampleIn the following example, the data for a single team is retrieved.fromnhlimportNHLData,API_TEAM_ENDPOINTfromrequestsimportgetjson_data=get(API_TEAM_ENDPOINT).json()if'teams'injson_data:print(NHLData(json_data['teams'][0]))The result is the following:{
    "id": 1,
    "name": "New Jersey Devils",
    "link": "/api/v1/teams/1",
    "venue": {
        "name": "Prudential Center",
        "link": "/api/v1/venues/null",
        "city": "Newark",
        "timeZone": {
            "id": "America/New_York",
            "offset": -4,
            "tz": "EDT"
        }
    },
    "abbreviation": "NJD",
    "teamName": "Devils",
    "locationName": "New Jersey",
    "firstYearOfPlay": "1982",
    "division": {
        "id": 18,
        "name": "Metropolitan",
        "nameShort": "Metro",
        "link": "/api/v1/divisions/18",
        "abbreviation": "M"
    },
    "conference": {
        "id": 6,
        "name": "Eastern",
        "link": "/api/v1/conferences/6"
    },
    "franchise": {
        "franchiseId": 23,
        "teamName": "Devils",
        "link": "/api/v1/franchises/23"
    },
    "shortName": "New Jersey",
    "officialSiteUrl": "http://www.newjerseydevils.com/",
    "franchiseId": 23,
    "active": true
}The user could also access the values directly. For instance getting theteamNamewould require:print(NHLData(json_data['teams'][0].teamName))The user can also access nested values:print(NHLData(json_data['teams'][0].franchise.franchiseId))CopyrightAll data is owned by the NHL. The result of each query will contain a copyright that should be included in all work. An example is shown below:NHL and the NHL Shield are registered trademarks of the National Hockey League. NHL and NHL team marks are the property of the NHL and its teams. © NHL 2023. All Rights Reserved.
Package: nhl-logo-scraper
Scrapes logos for all NHL teams, leagues, and networksContentsContentsContentsUsageContributingNotesLicenseUsageFirst clone the project.$ git clone https://github.com/blindman/nhl-logo-scraper.gitOnce you’ve cloned the project, run the following commands to get the utility working in your terminal.$ pip install .
$ nhlscraper --helpScrape$ nhlscraper scrape [--output=DIR] [--format EXTENSIONS] [--archive]--output=DIRThe directory to dump all of the files [default: ./output]--formatEXTENSIONSImage output formats (svg and/or png) [default: svg]--archiveArchive any previous logos that were downloaded [default: True]--debugAllow debugging logs throughClean$ nhlscraper clean [--dir=DIR] [--category CATEGORIES] [--full]--dir=DIRThe directory that the files live in [default: ./output]--categoryCATEGORIESCategories to remove all files (league, network, team)--fullClean all files created by this tool (includes archives)--debugAllow debugging logs throughOther$ nhlscraper -h | --help$ nhlscraper --versionContributingAssuming you’ve cloned the project and created a virtualenv, run the following command to work with the code.$ virtualenv –python python3 venv
$ source venv/bin/activate
$ pip install -e .[test]To test the code, run the following command.$ python setup.py testNotesThis is a fork of my oldimageDownloaderrepository which did the same thing but as a bash script and for the previous version of nhl.comYou may have noticed thatnhl.comis requested and parsed to find ::code`nhl-logos.css` instead of retrieving the css file directly. This is because (I believe) the path to that file could potentially change. The current path is ::code::…/builds/…/f0683b50089da6c16c1df297a9a74ce08e79b94b_1507226889/…/nhl-logos.cssand since the big chunk in the middle looks like a unique identifier I am going to assume it will change. I am looking to implement some sort of caching so it doesn’t make a request every time.LicenseMIT © [Jon Heller](https://github.com/blindman)
Package: nhlrank
Track current rankings, as well as trends and recent patterns for your favorite
team.Model the probability of winning the next game, making playoffs, winning
specific playoff games, or the championship as a whole.NotesI hope to extend this to include individual/player statistics at some point
too.Initially available as acommand line interface.Eventually this will be hosted as a website rendered by a Flask API and
Svelte front-end, and available in a more dynamic, engaging format.I suggest usingdirenvto automatically load/unload thevenvshell.sudoaptinstalldirenvRunningRequiresPython3andvenv.  See theargcompletepackage page for
details on how to set it up with various shells, the tab-completion is working
on this project and highly useful to anyone using this program.gitclonehttps://github.com/nutratech/nhlrank.gitcdnhlrankmakeinitmakedeps./spfetch# if CSV is out of date./spstand-c# "-c" means used cached, e.g. don't fetch./spstand-c-t"Detroit Red Wings"# show details for a team./spstand-c-srating# sort teams in standings by Glicko rating# sort teams in standings by average opponent, include team details./spstand-c-t"Anaheim Ducks"-savg_opp# show help./sp-h./spstand-hShortcut for testingYou can create a symbolic link for quick testing.sudoln-s"<FULL_PATH_TO_sp>"/usr/local/bin/spTest it.spstand-h
Package: nhlscrapi
PurposeProvide a Python API for accessing NHL game data including play by play, game summaries, player stats et c. The library hides the guts of the NHL website scraping process and encapsulates not only the data gathering, but data output. This project is inspired by theRpackagenhlscrapr, an all around must for NHL analytics geeks and R power users.nhlscrapi is in the early/initial stages, but will be updated regularly. Currently, the package support most of the game summary reports, but all of the important and essential ones.Related projects:nhlscraprpy-nhlInstallationGetting started is as easy as:pip install nhlscrapiFor more information on the setup, see thePyPi: nhlscrapi. The documentation for the package can be found atnhlscrapi: NHL Scraper API.Usage ExampleScrape data for game 1226 of 2014, Ottawa vs Pittsburgh.fromnhlscrapi.games.gameimportGame,GameKey,GameTypefromnhlscrapi.games.cumstatsimportScore,ShotCt,Corsi,Fenwickseason=2014# 2013-2014 seasongame_num=1226#game_type=GameType.Regular# regular season gamegame_key=GameKey(season,game_type,game_num)# define stat types that will be counted as the plays are parsedcum_stats={'Score':Score(),'Shots':ShotCt(),'Corsi':Corsi(),'Fenwick':Fenwick()}game=Game(game_key,cum_stats=cum_stats)# also http requests and processing are lazy# accumulators require play by play info so they parse the RTSS PBPprint('Final         :{}'.format(game.cum_stats['Score'].total))print('Shootout      :{}'.format(game.cum_stats['Score'].shootout.total))print('Shots         :{}'.format(game.cum_stats['Shots'].total))print('EV Shot Atts  :{}'.format(game.cum_stats['Corsi'].total))print('Corsi         :{}'.format(game.cum_stats['Corsi'].share()))print('FW Shot Atts  :{}'.format(game.cum_stats['Fenwick'].total))print('Fenwick       :{}'.format(game.cum_stats['Fenwick'].share()))# http req for roster report# only parses the sections related to officials and coachesprint('\nRefs          :{}'.format(game.refs))print('Linesman      :{}'.format(game.linesman))print('Coaches')print('  Home        :{}'.format(game.home_coach))print('  Away        :{}'.format(game.away_coach))# scrape all remaining reportsgame.load_all()Current Release: v0.4.4This is a pre-release and is not stable and fully fit for production. The first full stable release (v1.0.0) will be made available once the framework for allNHL game reportsare completed. Currently, Play-by-Play, Home/Away TOI, Roster, Face-off Comparison and Event Summary reports are functional.LicenseThe NHL Scraper API is a free Python library provided under Apache License version 2.0.Free software: Apache License, v2.0Documentation:nhlscrapi: NHL Scraper API
Package: nhm-pyportal
pyportalA Python wrapper around the API for the Natural History Museum'sData Portal.This module is new and under development, so does not include all actions available through the API; it prioritises the record search functionality. It is liable to change dramatically between versions.We have more generic (and comprehensive) API documentation availablehere.RequirementsPython 3.7+Installationpipinstall-egit+git://github.com/NaturalHistoryMuseum/nhm-pyportal.git#egg=pyportalQuickstart UsageStart by creating anAPIobject:importpyportalapi=pyportal.API()SearchingYou can either search for all records, or specifically for assets/media. The syntax is very similar for both.frompyportalimportconstants# specify any resource you want, but the IDs for the specimens and index lots resources are built inresource_id=constants.resources.specimens# find all records in the specimens resourcesearch=api.records(resource_id)# OR find all assets (images) in the specimens resourcesearch=api.assets(resource_id)The search above is equivalent tothis searchon the Data Portal website.There is a helper method to transform a data portal URL into adictthat can be passed into the search constructor.url='https://data.nhm.ac.uk/dataset/56e711e6-c847-4f99-915a-6894bb5c5dea/resource/05ff2255-c38a-40c9-b657-4ccb55ab2feb?filters=collectionCode%3Abot'# these two searches are equivalentprint(api.records(constants.resources.specimens,collectionCode='bot').count())# 775440print(api.records(**api.from_url(url)).count())# 775440You can specify the following parameters (all are optional):query: a free-text search, e.g.query='bugs'sort: a list of fields and sort directions, e.g.sort=['country asc', 'family desc']fields: a list of fields to return for each record (leave blank to return all), e.g.fields=['country', 'family', 'genus']offset: skip the firstnresults, e.g.offset=50limit: return onlynresultsper page(defaults to 100), e.g.limit=10Any other keyword arguments will be consideredfilters.search=api.records(constants.resources.specimens,query='bugs',sort=['country asc','family desc'],fields=['country','family','genus'],offset=50,limit=10)Viewing resultsIterate through all results using.all()(this ignoreslimit):forrecordinsearch.all():print(record)Or just view the first one with.first():print(search.first())You could also view a page (blocks of records in the size set bylimit) at a time using.next():try:page=search.next()forrecordinpage:print(record)exceptStopIteration:# raised by search.next() if there's no next pageprint('No more results.')If you just want the total number of records, use.count():print(search.count())
Package: nhound
nhoundDocumentationInstallationUsageDevelopmentWhat is this?How to keep content on Notion up to date and avoid rot?The answer is withnhound, you can. It's a bot. It will hound (aka nag) the
authors of pages on Notion to keep those pages up to date.FeaturesMain FeaturesThis is a feature list for version 1.Reads all the pages on Notion via the API.By default, it sets a reminder to the owner every 3 months.Redis?By default, it picks either the last person who edited the page or its
creator.Reminder template.Notifications are sent via email.If there is/calloutblock,Pick the owners from that block only.Owners can override this time (1w, 6m, whatever), the bot will use that.If there is either no owner or the owner is no longer on Notion, it whines
at the admins.The bot runs once per day. This is a DevOps problem…Stretch goalsNotifications are sent as Notion notifications. Is this possible?Notifications are sent to Slack.Notifications are sent to Microsoft Teams.Random elements in the message template to make it more
fun⸮
Package: nhpp
nhppINSTALLATION:pip install nhppPURPOSE:This package is a standalone module for
generating non-homogeneous Poisson processes (nhpp).
Homogeneous Poisson processes are easily generated by specifying
an arrival rate, lambda, then generating samples from
X ~ exp(1 / lambda). These samples indicate the inter-arrival
times between events, or the delay between events.The above case is only true when lambda is a constant.
Generalizing to the case of lambda(t), a time-dependent arrival
rate, is much trickier. A couple main approaches exist
to tackle this issue:(1) relate the INTEGRATED rate function LAMBDA(t) to a homogeneous Poisson process via an inversion function,
(2) use a "thinning" method which acts as an acceptance-rejection sampling routine.The method nhpp.get_arrivals can be used in two different ways. The first method allows the user to specify a
piecewise linear function by passing a dictionary specifying the function's 'knots'. See the example usage below.Alternatively, if the true arrival rate function lambda(t) is known, one can define a function to be then passed as
an argument. In this case, the 'knots' that must be passed as an argument must specify a piecewise linear function
that dominates the true rate function everywhere in the domain: lambda(t) <= piecewise(t) for all t. See example
usage below.EXAMPLE USAGE WITH PIECEWISE LINEAR FUNCTION# Specify the piecewise linear arrival rate via knots.
# Below we specify arrival_rate = 1 at time = 0, arrival_rate = 2 at time = 5,
# arrival_rate = 1 at time = 2.5 (linearity between time = 0 and time = 5), etc.

>>> knots = {0: 1, 5: 2, 12: 0.3, 15: 0.3, 16: 0, 18: 0, 20: 2}

>>> arrs = nhpp.get_arrivals(knots)

# Print out arrival times.
>>> for arr in arrs:
		print(round(arr, 2))

0.08
1.1
1.14
2.35
2.41
2.45
2.91
3.67
4.41
4.65
4.7
6.78
7.13
7.18
8.12
10.15
18.33
19.21
19.53
19.54EXAMPLE USAGE FOR KNOWN ARRIVAL FUNCTION# Define a quadratic rate function.
def rate(t):
	return t*(5-t)

# Specify a piecewise linear function that dominates rate(t):
knots = {0: 0, 1: 6.25, 2.5: 6.25, 4: 6.25, 5: 0}

arrivals = get_arrivals(knots, rate)

for arr in arrivals:
	print(round(arr, 2))

0.59
0.73
0.74
0.89
1.02
1.11
1.39
1.6
1.61
1.7
2.1
2.17
2.18
2.7
3.04
3.24
3.47
3.57
3.6
3.61Next stepsFuture progress on this package will include a means to only specify the rate function
without having to include the 'knots'.
Package: nhp-prep
nhp-prepThis is a CLI Tool that has been created to pre-process historical data that has been collected
in multiple instances. This includes data collected at Seneca Zoo and Mellon Institute.RequirementsThis packagerequires Python 3.InstallingTo install this CLI tool you can run the below commandpip3 install nhp-prepUpdatingIf you already have this tool installed, you can update it to the latest stable release by using the following command:pip3 install -U nhp-prepAlternatively, you clone this repo and then run this command fromwithinthe repository folderpython3 setup.py installAnother way to install this solution is by running the following command fromwithinthe repository folder:pip install -e .Both the above commands would install the package globally andnhp-prepwill be available on your system.How to useThere are multiple instances in which you can use this tool.nhp-prep COMMAND [OPTIONS]There are four use-cases (commands) in which you can use this tool:Mapping columns from prior to current format (reorder-columns)nhp-prep reorder-columns -i <directory_with_files_to_reorder_columns_OR_unique_CSV_file> -o <output_directory> -r <file_with_reference_columns>Rename the files to follow current standard (rename)nhp-prep rename -i <directory_files_to_rename> -o <output_directory>The current format for the file is:YYYY-MM-DD_HHmmh_<experiment_name>_<Subject_name>_<Researcher_name_or_initials>_data.csvTimestamp estimation trials from historical data files based on column  (timestamp-estimate)nhp-prep timestamp-estimate -i <directory_with_files_OR_unique_CSV_file> -o <output_directory>Since v0.3.0Since the previous 3 steps are common across the different datasets collected, the dev team decided to merge them into one single command (preparation-steps):nhp-prep preparation-steps -i <input_directory> -o <output_directory>The previous command will run sequentially the steps 1 to 3. The only command left outside of the bundle is the #4 since that is only applicable for the Baboons' data and requires the additional reference file.Renaming of Subject according to logs file (needs the file) (sub-rename)nhp-prep sub-rename -r <file_with_columns_and_reference_subject_names> -i <directory_with_files_OR_unique_CSV_file> -o <output_directory>Merge multiple CSV files into a single file. The input should be a directory and so is the outputnhp-prep merge-csv -i <directory_with_files_OR_unique_CSV_file> -o <output_directory>You could also runnhp-prep --helpto see the available commands and their corresponding usage.If you want to know all the options available for an specific command, run the following:nhp-prep COMMAND --helpExample:nhp-prep sub-rename --helpFeedbackPlease feel free to leave feedback in issues/PRs.
Package: nhpy
nhpynehntai api wrapper for python.Read theDocumentationPlanningget book by idget related bookssearch with queryget comments of a bookuser relatedloginuser searchget user profileCode SnippetfromnhpyimportNhPynhpy=NhPy()my_book=nhpy.get_book(394659)rel_books=nhpy.get_related_books(my_book.id)my_search=nhpy.search(["neko"])book_comment=nhpy.comments(394659)
Package: nhs-aws-helpers
NHS AWS Helperssome useful boto3 utilitiesquick startcontributingcontributors seecontributinginstallingpipinstallnhs-aws-helperstestingthe library comes with a some pytest  fixtures ...nhs_aws_helpers/fixtures.py# conftest.py# noinspection PyUnresolvedReferencesfromnhs_aws_helpers.fixturesimport*# noqa: F403# mytest.pyimportpytestfrommypy_boto3_dynamodb.service_resourceimportTable@pytest.fixture(scope="function",name="my_temp_ddb_table")defmy_temp_table_fixture()->Table:yield fromtemp_dynamodb_table("my-source-table-to-clone")defmy_test(my_temp_ddb_table:Table):# do things with tableprint(my_temp_ddb_table.table_name)
Package: nhs-dos
NHS DoS API ClientA client library for interacting with NHS DoS APIsFree software: GNU General Public License v3Documentation:https://nhs-dos.readthedocs.io.Python SupportSupport for Python 3.6+ only.This library does not supportLegacy Python(Python 2).FeaturesThis package provides a simple python API client for interacting with NHS Service Directories.Current support for the Urgent & Emergency Care DoS APIs:GetServiceByServiceIdGetServiceByOdsCodeCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.2.0 (2018-05-19)### REST APIGetting a single service using Service ID or ODS Code### MiscRequires Python 3.6+0.1.0 (2017-12-21)First release on PyPI.
Package: nhs-number
nhs-numberPython package to provide utilities for NHS Numbers, including validity checks, normalisation, and generation.Package InformationLicenseVersionSupported versionsCoverageWheelImplementationStatusDownloadsDocumentationA new and improved documentation site is available athttps://nhs-number.uk-fci.techChangeloghttps://nhs-number.uk-fci.tech/changelog/
Package: nhssums
nhssumsThe nhssums package provides functions for working with NHS number checksums.NHS Number OverviewNHS numbers are issued to patients of the NHS in the UK.The number consists of 9 digits and a single digit checksum.For more information, please see theNHS number Wikipedia articleon the subject.InstalationTo install thepublished versionof the
package from PyPI:python3 -m pip install nhssumsUsageUseis_valid()to iterate over a list of numbers:>>>nhssums=[1234567881,1234567806,123456876,1234512343]>>>nhssums.is_valid(nhs_numbers)[True,True,False,True]To check if the checksum is valid for a single number, useis_number_valid():>>>importnhssums>>>nhssums.is_number_valid(1234567881)True>>>nhssums.is_number_valid(1234567882)FalseFinally,generate_checksum()will return a valid checksum, for a given input
number. It can also return the full number (input + checksum) if required:>>>nhssums.generate_checksum(123451234)3>>>nhssums.generate_checksum(123451234,full_output=True)1234512343LicenseThis package is released under an MIT license.