Skip to content

Instantly share code, notes, and snippets.

Dmitry Groza boxfrommars

Block or report user

Report or block boxfrommars

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View forecast.py
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)
View DST.md

Определения

везде я буду указывать только время начала периода, то есть 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
View load_weather.py
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)
View readme.md

%PROJECT_NAME%

Description of the project

Install

Production Requirements

  • PHP >= 5.5.9
View tolls.js
// Константы для определения меры принадлежности точки
var ANGLE_MAX = 10; // максимаьное значение для меры угла (максимальное значение cos -- 1)
var ANGLE_POWER = 4; // чувствительность к углу (чем больше число, тем меньшая ошибка будет приводить к большему уменьшению меры угла)
var DISTANCE_COEFF = .17; // коэффициент подстройки (грубо говоря, сколько метров считаем за единицу меры)
var DISTANCE_POWER = 1; // чувствительность к расстоянию
var DISTANCE_MAX = 10; // максимаьное значение для меры расстояния
/**
View gist:44f70311e842be1f4451
/9j/4AAQSkZJRgABAQEASABIAAD//gA8Q1JFQVRPUjogZ2QtanBlZyB2MS4wICh1c2luZyBJSkcgSlBFRyB2NjIpLCBxdWFsaXR5ID0gMTAwCv/bAEMABgQFBgUEBgYFBgcHBggKEAoKCQkKFA4PDBAXFBgYFxQWFhodJR8aGyMcFhYgLCAjJicpKikZHy0wLSgwJSgpKP/bAEMBBwcHCggKEwoKEygaFhooKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKP/CABEIAckBLAMBEQACEQEDEQH/xAAcAAABBQEBAQAAAAAAAAAAAAAEAQIDBQYABwj/xAAUAQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIQAxAAAAHOExESCDSQ4QhHkQwYcIOHEJKSFwOJSQcOFFFFOFHHHDhTKkooowQecINEIyEhEOGEQgWFFsEDiQUcKKKKcOEFFFFMsKKSkQ44eNIiAkICEgBCvGCjg0vS/JiQcKOFEFFFFOFFFM2RDzhhMMEJBpERg4EQlURHHCChRoS0LoeKOOOFFFFOOFFMscPFGijBR40hOKorhgORnDThSY0o4eagmOHHCiinCnDhTKDhwo0QYOOFBxhlRRCQGJhpxGEF+EBBWGgLgccOFOFFOFHGWFIRSUaOISQkByuMqTDy8AggQkK8jDS2CwwoC7L44cKKKccKKZYeMJBohww4lIDOFKTBhcEI0NJAMcFF4PJgUzxpizFFFOOOOHGVCAc4lGnDSMmIDLlUThoeQhpMMCgkOLQkEAypBDYCnCiHCiimWCwUUJIiIYMJwcxBCHDgkGL0KGkwUWQSWRKRABijcDxRTjhThTLhBCcTiEQ0iJSEwIwJOEHB4cGBQaWJehpOAlKYw2QScKccKKcZ0cRnE4pAOBRR554REg0sixAB4aTBhtS+HjCIBMQasU4U4U4UQzpIcQkopGKQjQkwJXjyyN+Z4ritJQ03JpiclGkIMAiHHHHD
View request.sh
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
View find.sh
# 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 Nov 27, 2011
copy files to sony walkman nwz-b163f from ubuntu with alphabetical sorting
View walkman-copy.sh
find -type f -print0 | sort -z | cpio -0 -pd /media/WALKMAN/MUSIC/kn
You can’t perform that action at this time.