Skip to content

Instantly share code, notes, and snippets.

@revaldianggara
Last active December 17, 2020 12:44
Show Gist options
  • Save revaldianggara/d9c66dd72eebe7c6ea2e39a0d30920cb to your computer and use it in GitHub Desktop.
Save revaldianggara/d9c66dd72eebe7c6ea2e39a0d30920cb to your computer and use it in GitHub Desktop.
JDS_forecast_passanger_traffic
# Enter your code here. Read input from STDIN. Print output to STDOUT
import numpy as np
N = int(input())
data = []
temp = []
for i in range(N):
data.append(input().split())
temp.append(float(data[i][1]))
from scipy import interpolate
leng = list(range(len((temp))))
interpolation = interpolate.interp1d(leng,temp,fill_value='extrapolate')
y = interpolation(range(len(temp),len(temp)+12))
for x in y:
print(x)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment