Skip to content

Instantly share code, notes, and snippets.

View fasiha's full-sized avatar
💭
🧘‍♂️🐻

Ahmed Fasih fasiha

💭
🧘‍♂️🐻
View GitHub Profile
@fasiha
fasiha / test_pinned_register_v2.py
Created November 8, 2012 03:57
Compare performance of using host-registered pinned and unpinned host memory, version 2
#!/usr/bin/env python
"""
Compare performance of using host-registered pinned and unpinned host memory,
with more than one block for larger arrays, and with unpinned tried first.
"""
import numpy as np
import pycuda.autoinit
// See pages 173 and 175 of Snyder's "Map Projections---A Working Manual" (1987): http://pubs.usgs.gov/pp/1395/report.pdf
function satelliteVerticalR(H, R) {
var P = 1.0 + H/R;
function forward(λ, φ) {
var cosφ = Math.cos(φ),
k = (P - 1) / (P - cosφ * Math.cos(λ));
return [
R * k * cosφ * Math.sin(λ),
R * k * Math.sin(φ)
@fasiha
fasiha / _.md
Created May 27, 2013 02:46
satellite
@fasiha
fasiha / _.md
Created May 27, 2013 02:46
satellite, venezuela by Harrison
@fasiha
fasiha / _.md
Created May 27, 2013 02:51
Europe from the East, Harrison
@fasiha
fasiha / _.md
Created June 18, 2013 18:27
Maximal coverage satellite projection
@fasiha
fasiha / _.md
Created June 18, 2013 19:21
BaseMap orthographic
@fasiha
fasiha / _.md
Created July 24, 2013 16:49
Europe from the East, Harrison
-- run from Terminal with:
-- $ osascript enter.scpt N
-- where N is the number of times Chrome will see "Return"
on run arg
log "Going to switch to Chrome and hit Return"
log arg
log "times"
log "Hit Control-C to cancel"
clear();
%% Parameters
% Input file
INFILE = 'ASTGTM2_N43E011_dem.tif';
% Fractional order of the texture filter, between 0 and 2
ALPHA = .5;
%% Helper functions
% Makes a vector of zero-centered Fourier frequency indexes