Coder Social home page Coder Social logo

data's Introduction

Data

A place for keeping and discussing additional data we plan to provide through CDragon.

patches.json

This file contains the start and end timestamps for each patch, back to preseason 3.

The patches are contained in a list accessible through the patches key. Each patch has start and end times (as ints), a name (str), and a season ID (int). In additional, the regional offsets are provided (in seconds) for each platform and are accessible via the key shifts.

All timestamps are in UTC time.

Below is an example of loading the start time for the most recent patch in Python:

import arrow, json

with open('patches.json') as f:
    data = json.load(f)

patch = data['patches'][-1]  # most recent
utc_timestamp = patch['start']
north_america_timestamp = utc_timestamp + data['shifts']['NA1']
dt = arrow.get(north_america_timestamp)
print(dt.to('US/Pacific'))  # 2018-01-24T03:00:00-08:00  (for patch 8.2)
# which corresponds to 3am on January 24th, 2018 in Pacific Time.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.