Skip to content

Instantly share code, notes, and snippets.

def build_timeline(builder_input, builder_output, solver_output):
solver_input = builder_output['solver_input']
courier_map = {c['index']: c['number'] for c in builder_output['maps']['couriers']}
points_map = {p['index']: p for p in builder_output['maps']['waypoints']}
approved_points = {p[0] for p in solver_input['vehicles_assigned_to_points']}
route_points = []
for driver_ind, route in enumerate(solver_output['routes']):
cursor = solver_input['vehicle_shifts'][driver_ind][0] + 1
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import forecastio
import pandas as pd
import time, datetime
from shapely import wkt
import os
api_key = 'Your key'
curr_dir = os.path.dirname(__file__)
groups = pd.read_csv('%s/data/hexagon-groups.csv' % curr_dir, index_col=0)

Определения

везде я буду указывать только время начала периода, то есть 2015-06-01 03:20 это интервал [2015-06-01 03:20, 2015-06-01 03:30) -- правое значение исключено, т.е. точнее [2015-06-01 03:20, 2015-06-01 02:29:59.999]

запись 2015-11-01 06:20Z указывает на UTC-время

Переход на зимнее время (UTC-4h -> UTC-5h)

UTC Boston Local Interval
import numpy as np
import pandas as pd
import time
base_url = 'https://www.wunderground.com/history/airport/KBOS/{}/{}/{}/DailyHistory.html?&reqdb.zip=&reqdb.magic=&reqdb.wmo=&format=1'
d_range = pd.to_datetime(np.arange('2015-12-29', '2016-06-15', dtype='datetime64[D]'))
print(d_range)

%PROJECT_NAME%

Description of the project

Install

Production Requirements

  • PHP >= 5.5.9
curl -X POST -H "Content-Type: application/json" -d '{"application_id": "2", "auth_key": "DtF9cZPqTF8Wy9Q", "timestamp": "1333630580", "nonce": "1340569516", "signature": "13293a5bd2026b957ebbb36c89d9649aae9e5503", "user": {"login": "injoit", "password": "injoit", "owner_id": "4"}}' https://api.quickblox.com/auth.json
# This command will search in the current directory and all sub directories for a file named rc.conf.
find . -name "rc.conf" -print
# This command will search in the current directory and all sub directories. All files named rc.conf will be processed by the chmod -o+r command. The argument '{}' inserts each found file into the chmod command line. The \; argument indicates the exec command line has ended.
find . -name "rc.conf" -exec chmod o+r '{}' \;
# This command will search in the current directory and all sub directories. All files that contain the string will have their path printed to standard output.
find . -exec grep "www.athabasca" '{}' \; -print
@boxfrommars
boxfrommars / walkman-copy.sh
Created November 27, 2011 20:11
copy files to sony walkman nwz-b163f from ubuntu with alphabetical sorting
find -type f -print0 | sort -z | cpio -0 -pd /media/WALKMAN/MUSIC/kn