Models | Examples |
---|---|
Display ads | Yahoo! |
Search ads |
#How I built an audio book reader for my nearly blind grandfather
Last year, when visiting my family back home in Holland, I also stopped by my grand-parents. My grand-father, now 93 years old, had always been a very active man. However, during the presceding couple of months, he'd gone almost completely blind and now spent his days sitting in a chair. Trying to think of something for him to do, I suggested he try out audio books. After finally convincing him -- he said audio books were for sad old people -- that listening to a well performed recording is actually a wonderful experience, I realized the problem of this idea.
####The problem with audio devices and the newly blind. After my first impulse to jump up and go buy him an
#!/usr/bin/env python -O | |
import argparse | |
import sys | |
import numpy | |
import h5py | |
import csv | |
class ColType: | |
UNKNOWN = 1 |
""" | |
Given an arbitrarily nested dictionary, create a PyTables Table | |
Populate a table row given the contents of a dictionary | |
""" | |
import tables | |
import numpy as np | |
import sys |
#!/usr/bin/env bash | |
command_exists() { | |
command -v "$@" > /dev/null 2>&1 | |
} | |
# Ensure that wget exists | |
if command_exists wget; then | |
wget='wget -O' | |
else |
Cross-origin resource sharing (CORS) is a mechanism that allows restricted resources (e.g. fonts) on a web page to be requested from another domain outside the domain from which the first resource was served. This is set on the server-side and there is nothing you can do from the client-side to change that setting, that is up to the server/API. There are some ways to get around it tho.
Sources : MDN - HTTP Access Control | Wiki - CORS
CORS is set server-side by supplying each request with additional headers which allow requests to be requested outside of the own domain, for example to your localhost
. This is primarily set by the header:
Access-Control-Allow-Origin
This took quite a bit of figuring out because the web is littered with Vega 2 examples but Vega 3 is a bit different.
https://vega.github.io/vega/docs/api/view/#view_change
var spec = {
data: {"url": "https://fivethirtyeight.datasettes.com/fivethirtyeight-45d758d/most-common-name%2Fsurnames.json?_shape=array"},
mark: "bar",
<!DOCTYPE qgis_style> | |
<qgis_style version="2"> | |
<symbols> | |
<symbol name="qartoon" force_rhr="0" clip_to_extent="1" alpha="1" type="fill"> | |
<layer class="SimpleFill" enabled="1" locked="0" pass="0"> | |
<prop v="3x:0,0,0,0,0,0" k="border_width_map_unit_scale"/> | |
<prop v="0,0,0,255" k="color"/> | |
<prop v="round" k="joinstyle"/> | |
<prop v="1,1" k="offset"/> | |
<prop v="3x:0,0,0,0,0,0" k="offset_map_unit_scale"/> |