I'm going through the code execution of featuresAt in Mapbox GL JS. This is to take notes and understand how all of this works.
Initiating the feature search based on the example on Mapbox GL API Docs...
map.on('click', function(e) {| #!/usr/bin/env python | |
| # Implementation of algorithm from http://stackoverflow.com/a/22640362/6029703 | |
| import numpy as np | |
| import pylab | |
| def thresholding_algo(y, lag, threshold, influence): | |
| signals = np.zeros(len(y)) | |
| filteredY = np.array(y) | |
| avgFilter = [0]*len(y) | |
| stdFilter = [0]*len(y) |
I'm going through the code execution of featuresAt in Mapbox GL JS. This is to take notes and understand how all of this works.
Initiating the feature search based on the example on Mapbox GL API Docs...
map.on('click', function(e) {There are three easy to make mistakes in go. I present them here in the way they are often found in the wild, not in the way that is easiest to understand.
All three of these mistakes have been made in Kubernetes code, getting past code review at least once each that I know of.
What do these lines do? Make predictions and then scroll down.
func print(pi *int) { fmt.Println(*pi) }| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset='utf-8' /> | |
| <title></title> | |
| <meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' /> | |
| <script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.5.1/mapbox-gl.js'></script> | |
| <link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.5.1/mapbox-gl.css' rel='stylesheet' /> | |
| <style> | |
| body { margin:0; padding:0; } |
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| "gopkg.in/mgo.v2" | |
| "gopkg.in/mgo.v2/bson" | |
| "log" | |
| ) |
| --- | |
| - name: Create directory to put elixir in | |
| sudo: 'yes' | |
| shell: "mkdir -p /opt/elixir/v0.15.0" | |
| - name: Install unzip | |
| apt: name=unzip state=present update_cache=true | |
| - name: Unzip elixir release | |
| sudo: 'yes' |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <title>Besier Curve</title> | |
| <style> | |
| circle { | |
| cursor: pointer; | |
| } |
| # required: ffmpeg (e.g. from homebrew), terminal-notifier from https://github.com/alloy/terminal-notifier | |
| # you can schedule this with launchd to run e.g. weekly | |
| # Specify in seconds how long the script should record (default here is 1 hour). | |
| seconds=3600 | |
| # Date format for the recording file name | |
| DATE=`date "+%d-%m-%y_%H-%M"` | |
| # start ffmpeg recording |
| # Elixir v1.0 | |
| defmodule Rules do | |
| defmacro __using__(_) do | |
| quote do | |
| import unquote(__MODULE__) | |
| @before_compile unquote(__MODULE__) | |
| @rules [] | |
| end | |
| end |
| # this forces dpkg not to call sync() after package extraction and speeds up install | |
| RUN echo "force-unsafe-io" > /etc/dpkg/dpkg.cfg.d/02apt-speedup | |
| # we don't need and apt cache in a container | |
| RUN echo "Acquire::http {No-Cache=True;};" > /etc/apt/apt.conf.d/no-cache |