Skip to content

Instantly share code, notes, and snippets.

@raianul
raianul / getty_02_.json
Created May 28, 2017 06:44
Getty-417-02
{
"ReportUsageRequestBody": {
"TransactionId": "newscred-1493611203032-237061",
"AssetUsages": [
[
{
"asset_id": "669336318",
"usage_date": "2017-04-29",
"quantity": 1
},
{
"ReportUsageRequestBody": {
"TransactionId": "newscred-1493611203032-237061",
"AssetUsages": [
[
{
"asset_id": "664122930",
"usage_date": "2017-04-14",
"quantity": 1
},
@raianul
raianul / gist:c0b4ff15433c9a0d3c4a
Created June 4, 2015 03:57
Alter SQL for ShutterStock DB
ALTER TABLE `publish_events` ADD `channel` VARCHAR(32) NULL DEFAULT NULL AFTER `created_at`;
ALTER TABLE `publish_events` CHANGE `organization` `organization` VARCHAR(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT 'Null';
/*
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
*
* Uses the built in easing capabilities added In jQuery 1.1
* to offer multiple easing options
*
* TERMS OF USE - jQuery Easing
*
* Open source under the BSD License.
*
@raianul
raianul / direction.py
Last active August 29, 2015 13:57
Get Google Map Direction by location and destination.
import requests
GOOGLE_API = {
'distance': 'http://maps.googleapis.com/maps/api/directions/json'
}
def get(key, options):
if key not in GOOGLE_API:
return False
@raianul
raianul / pediem.py
Created March 8, 2014 07:14
Get Per Diem Value by Event Date and Zipcode
import requests
import datetime
PER_DIEM_API = 'https://explore.data.gov/resource/perdiem.json'
def get(params):
r = requests.get(PER_DIEM_API, params=params)
return r.json()