This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$startfolder = "c:\data\*" | |
$folders = get-childitem $startfolder | where{$_.PSiscontainer -eq "True"} | |
"Directory Name`tDirectory Size (MB)" | |
foreach ($fol in $Folders){ | |
$colItems = (Get-ChildItem $fol.fullname -recurse | Measure-Object -property length -sum) | |
$size = "{0:N2}" -f ($colItems.sum / 1MB) | |
"$($fol.name)`t$size" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rows, cols = 10, 10 | |
iceraster = (10*numpy.random.random((rows, cols))).astype(int)*5 | |
iceraster = numpy.where( (iceraster >= 20), 20, iceraster) | |
outarray = numpy.zeros((rows, cols), numpy.float) | |
NumberOfDays = 3 | |
#Obsolete pixel-by-pixel version, takes very long | |
for (i,j), value in numpy.ndenumerate(outarray): | |
if iceraster[i,j] == 0: | |
outarray[i,j] = outarray[i,j] + ( 0.0 / NumberOfDays) | |
elif iceraster[i,j] == 5: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
maps.google.com | |
### get the google maps api key | |
### install django on ubuntu test server and centOS | |
### install PostGres and PostGIS 2.0 | |
### install gdal on python 2.7 | |
### get apache or ngnix server | |
### get openlayers and GeoDjango |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Install Postgres 9.1, PostGIS and create PostGIS template on a clean Ubuntu 11.10 Oneiric Ocelot box | |
# http://wildfish.com | |
# add the ubuntu gis ppa | |
sudo apt-get -y install python-software-properties | |
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable | |
sudo apt-get update |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(rgdal) | |
library(RgoogleMaps) | |
boreholes<- read.csv("boreholes.csv", sep=",", header=TRUE) | |
bh_grd <- SpatialPoints(boreholes[,c("East","North")], | |
proj4string=CRS("+proj=utm +zone=32 +datum=WGS84")) | |
bholes<- SpatialPointsDataFrame(bh_grd,boreholes[,-c(2,3)]) | |
bholes<-bholes[,-c(2,3)] | |
bh_geo<- spTransform(bholes, CRS("+proj=longlat +datum=WGS84")) | |
North<-coordinates(bh_geo)[,2] |
NewerOlder