This file contains 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
sink("Z.bonus.txt") | |
library(spatstat) | |
library(cwhmisc) | |
set.seed(40888) | |
ssize <- 5 | |
ssize2 <- 10 | |
#Create point patterns for testing | |
#create point pattern |
This file contains 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
import csv | |
import pyodbc | |
MDB = 'c:/path/to/my.mdb' | |
DRV = '{Microsoft Access Driver (*.mdb)}' | |
PWD = 'mypassword' | |
conn = pyodbc.connect('DRIVER=%s;DBQ=%s;PWD=%s' % (DRV,MDB,PWD)) | |
curs = conn.cursor() |
This file contains 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
#------------------------------------------------------------------------------- | |
# Name: module1 | |
# Purpose: | |
# | |
# Author: Samsung-User | |
# | |
# Created: 15/03/2012 | |
# Copyright: (c) Samsung-User 2012 | |
# Licence: <your licence> | |
#------------------------------------------------------------------------------- |
This file contains 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
# x < 8 | |
# x - y > 2 | |
# what is max x + y | |
values = [] | |
for x in range(100): | |
for y in range(100): | |
if x < 8 and x - y > 2: | |
print x + y | |
values.append(x+y) |
This file contains 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
# | |
# install Geoserver on Ubuntu Lucid 10.10 | |
# note: Geoserver is proxied through apache so port 8080 is not used | |
# | |
# @spara 11/15/10 | |
# | |
# setup sources | |
sudo sh -c "echo ' ' >> /etc/apt/sources.list" | |
sudo sh -c "echo 'deb http://us.archive.ubuntu.com/ubuntu/ Lucid multiverse' >> /etc/apt/sources.list" |
This file contains 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
# | |
# ServerRoot: The top of the directory tree under which the server's | |
# configuration, error, and log files are kept. | |
# | |
# Do not add a slash at the end of the directory path. If you point | |
# ServerRoot at a non-local disk, be sure to point the LockFile directive | |
# at a local disk. If you wish to share the same ServerRoot for multiple | |
# httpd daemons, you will need to change at least LockFile and PidFile. |
This file contains 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 | |
# setup repository | |
sudo wget -qO- http://apt.opengeo.org/gpg.key | apt-key add - | |
sudo chmod 655 /etc/apt/sources.list | |
sudo echo "deb http://apt.opengeo.org/ubuntu lucid main" >> /etc/apt/sources.list | |
sudo chmod 644 /etc/apt/sources.list | |
sudo apt-get update | |
# install opengeo suite |
This file contains 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
import arcpy | |
arcpy.env.overwriteOutput = True | |
arcpy.env.workspace = 'C:\\Users\\a391665\\Documents\\ArcGIS\\Default.gdb' | |
ws = 'C:\\Users\\a391665\\Documents\\ArcGIS\\Default.gdb' | |
Comuni = 'C:\\Users\\a391665\\Documents\\ArcGIS\\Sardegna3.gdb\\Comuni' | |
Linee = 'C:\\Users\\a391665\\Documents\\ArcGIS\\Sardegna3.gdb\\Linee' | |
rows = arcpy.SearchCursor(Comuni) |
This file contains 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
#!/usr/bin/env python | |
#Author: scw | |
from shapely.geometry import Point, Polygon | |
from math import sqrt | |
from sys import maxint | |
# define our polygon of interest, and the point we'd like to test | |
# for the nearest location | |
polygon = Polygon(((0, 0), (0, 1), (1, 1), (1, 0), (0, 0))) | |
point = Point(0.5, 1.5) |
This file contains 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
from fabric.api import * | |
from fabric.contrib.console import confirm | |
import tempfile | |
import re | |
PROJ_VER='4.8.0' | |
GEOS_VER='3.3.3' | |
GDAL_VER='1.9.0' | |
PROJ_PATH='/usr/local/proj/' + PROJ_VER |