Skip to content

Instantly share code, notes, and snippets.

View marks's full-sized avatar

Mark Silverberg marks

View GitHub Profile
$ ckanapi dump datasets -r http://data.noaa.gov --all -O json.json
Traceback (most recent call last):
File "/usr/local/bin/ckanapi", line 9, in <module>
load_entry_point('ckanapi==3.3', 'console_scripts', 'ckanapi')()
File "/Library/Python/2.7/site-packages/ckanapi/cli/main.py", line 95, in main
return dump_things(ckan, thing[0], arguments)
File "/Library/Python/2.7/site-packages/ckanapi/cli/dump.py", line 33, in dump_things
return dump_things_worker(ckan, thing, arguments)
File "/Library/Python/2.7/site-packages/ckanapi/cli/dump.py", line 135, in dump_things_worker
'include_datasets': False})
(function(){
var uStatePaths=[
{id:"HI",n:"Hawaii",d:"M233.08751,519.30948L235.02744,515.75293L237.2907,515.42961L237.61402,516.23791L235.51242,519.30948L233.08751,519.30948ZM243.27217,515.59127L249.4153,518.17784L251.51689,517.85452L253.1335,513.97465L252.48686,510.57977L248.28366,510.09479L244.24213,511.87306L243.27217,515.59127ZM273.9878,525.61427L277.706,531.11074L280.13092,530.78742L281.26255,530.30244L282.7175,531.59573L286.43571,531.43407L287.40568,529.97912L284.49577,528.20085L282.55584,524.48263L280.45424,520.92609L274.63444,523.83599L273.9878,525.61427ZM294.19545,534.50564L295.48874,532.5657L300.17691,533.53566L300.82356,533.05068L306.96668,533.69732L306.64336,534.99062L304.05678,536.44556L299.69193,536.12224L294.19545,534.50564ZM299.53027,539.67879L301.47021,543.55866L304.54176,542.42703L304.86509,540.81041L303.24848,538.70882L299.53027,538.3855L299.53027,539.67879ZM306.4817,538.54716L308.74496,535.63726L313.43313,538.06218L317.79798,539.19381L322.16284,541.94205L322.16284,543.88198L318.6063,545.6
var codes_to_category = {}
codes_to_category['100'] = "Fire, Other"
codes_to_category['110'] = "Structure fire, Other (conversion only)"
codes_to_category['111'] = "Building fire"
codes_to_category['112'] = "Fires in structure other than in a building"
codes_to_category['113'] = "Cooking fire, confined to container"
codes_to_category['114'] = "Chimney or flue fire, confined to chimney or flue"
codes_to_category['115'] = "Incinerator overload or malfunction, fire confined"
codes_to_category['116'] = "Fuel burner/boiler malfunction, fire confined"
codes_to_category['117'] = "Commercial Compactor fire, confined to rubbish"
<?php $homepage_page_id = 1009; ?>
<?php if(get_field('acf_homepage-featured-image', $homepage_page_id)){ ?>
hi
<?php the_field('acf_homepage-featured-image', $homepage_page_id); ?>
<?php } ?>
@marks
marks / 1_tristate_sites.sql
Last active August 29, 2015 14:04
SQL queries for finding all AQE/AQS sites and data within a bounding box from LouisvilleAirMap.com Data Visualization Wizard
SELECT * FROM
-- combine AQE and AQS tables into one result set
(
SELECT 'aqe' AS site_type, location_ele::VARCHAR(255) AS elevation, id::VARCHAR(255) AS id, location_lat::float AS latitude, location_lon::float AS longitude, NULL::VARCHAR(255) AS msa_name, title::VARCHAR(255) AS name, NULL::VARCHAR(255) AS state_name FROM "7c0608e3-fb4d-4fb3-928c-5351e5b9b122" aqe
UNION ALL
SELECT 'aqs' AS site_type, elevation::VARCHAR(255) AS elevation, aqs_id::VARCHAR(255) AS id, lat::float AS latitude, lon::float AS longitude, msa_name::VARCHAR(255) AS msa_name, site_name::VARCHAR(255) AS name, state_name::VARCHAR(255) AS state_name FROM "b1b1e239-f5e2-4bc0-9572-6056fac5257b" aqs
)
AS sites
@marks
marks / test.rb
Created July 10, 2014 00:45 — forked from frank-lsf/test.rb
# In the following code, the two gsub's have different outcomes.
ver = 9999
str = "\t<key>CFBundleDevelopmentRegion</key>\n\t<string>en</string>\n\t<key>CFBundleVersion</key>\n\t<string>0.1.190</string>\n\t<key>AppID</key>\n\t<string>000000000000000</string>"
puts str.gsub /(CFBundleVersion<\/key>\n\t.*\.).*(<\/string>)/, "#{$1}#{ver}#{$2}"
puts '--------'
puts str.gsub /(CFBundleVersion<\/key>\n\t.*\.).*(<\/string>)/, "#{$1}#{ver}#{$2}"
<article class="photo">
<img src="https://mirror-api-playground.appspot.com/links/filoli-spring-fling.jpg" width="100%" height="100%">
<section>
</section>
</article>
@marks
marks / README.md
Created May 24, 2014 00:36
QHP Individual_Medical_Landscape

README is empty

@marks
marks / README.md
Created May 24, 2014 00:36
QHP Individual_Medical_Landscape

README is empty

@marks
marks / README.md
Created May 24, 2014 00:36
QHP Individual_Medical_Landscape

README is empty