This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
| input = new Float64Array([1,2,3,4]) | |
| encoded = Buffer.from(input.buffer).toString('base64') | |
| buff = Buffer.from(encoded, 'base64'); | |
| decoded = new Float64Array(Uint8Array.from(buff).buffer) |
| """ | |
| Functions for computing the population count (aka Hamming weight) of an array | |
| in-place using the built-in popcount routine. | |
| Works with any integer datatype 64 bit-width or smaller. | |
| Compile with gcc flag -mpopcnt | |
| Adapted from | |
| https://gist.github.com/aldro61/f604a3fa79b3dec5436a by Alexandre Drouin | |
| """ | |
| import numpy as np | |
| cimport numpy as np |
| """ | |
| Compile with gcc flag -mpopcnt | |
| """ | |
| import numpy as np | |
| cimport numpy as np | |
| cimport cython | |
| from libc.stdint cimport uint32_t, uint8_t | |
| cdef extern int __builtin_popcount(unsigned int) nogil |
| module ActiveAdminHelper | |
| def admin_arbre_context | |
| @admin_arbre_context ||= Arbre::Context.new(assigns, self) | |
| end | |
| def default_renderer | |
| case controller.send(:resource_class).name | |
| when "ActiveAdmin::Page" | |
| "page" |
| key: > | |
| <%= case name | |
| when 'A' # critical | |
| 1 | |
| when 'B' # warining | |
| 2 | |
| else # ok | |
| 0 | |
| end %> |
| <!DOCTYPE> | |
| <html> | |
| <head><title>GA Dash Demo</title></head> | |
| <body onload="chart1.render();" > | |
| <!-- Add Google Analytics authorization button --> | |
| <button id="authorize-button" style="visibility: hidden"> | |
| Authorize Analytics</button> | |
| <!-- Div element where the Line Chart will be placed --> |