Today we will learn about convex hulls using GeoPandas.
The result is less dramatic when we apply to the map of PR. El resultado.
Today we will learn about convex hulls using GeoPandas.
The result is less dramatic when we apply to the map of PR. El resultado.
# -*- coding: utf-8 -*- | |
import scraperwiki, urllib2, re, urllib | |
from bs4 import BeautifulSoup | |
def download(): | |
file("CAdS",'w').write(urllib.urlopen("www.uaca.ac.cr/bv/ebooks/novela/3.pdf").read()) | |
def scrape(): | |
u=file("CAdS.pdf") | |
x=scraperwiki.pdftoxml(u.read()) |
; greatest common divisor | |
(defn gcd [a b] | |
(if (= b 0) | |
a | |
(gcd b (rem a b)))) | |
; > (gcd 15 25) | |
; > 5 |
(def zero {:L nil :R nil } ) | |
(def one {:L zero :R nil }) | |
(def half {:L zero :R one }) | |
(defn neg [x] (if (= x nil) nil { :L (neg (:R x) ) :R (neg (:L x)) }) ) |
from skimage import io | |
import matplotlib.pyplot as plt | |
import numpy as np | |
plt.rcParams['figure.figsize'] = 6,6 | |
im = io.imread("filename.jpg") | |
#crop | |
piece = im[1250:2250, 1250:2250,:] |
screencasts on ubuntu have been a pain in the neck. this gist is to document some of the difficulties so I don't have to repeat them.
the idea started when trying to convert a d3.js graphic into animatic gif and found this github program. The term is screen capture
Here is what I came up with
main : Element | |
main = flow down | |
[ leftAligned (toText "A") | |
, leftAligned (toText "B") | |
, leftAligned (toText "C") | |
] |
main : Element | |
main = collage 400 400 | |
(map (move (50, 0) )( | |
(motif x red ) ++ (motif (t x) blue ) ++ (motif (t (t x)) green ) ++ | |
(motif (t (t (t x))) orange ) )) | |
-- build motif from path and color | |
motif : [(number, number)] -> Color -> [Form] | |
motif z color = [ traced (solid color) (path z) , move ( last z) (filled color (circle 3.0))] |