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
#Main Program, used to georeference and index rasters. This is intended to be run in ArcGIS 10.1 or higher. | |
#import basic modules | |
import os, arcpy, shutil | |
#import all modules from 3rd parties | |
import xlrd, xlwt, zipfile | |
############################BEGIN LOCAL FUNCTIONS##################################### | |
###a1. Check for error:### |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/> | |
<style> | |
html, body, #map { | |
height: 100%; | |
padding: 0; |
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
fname = 'C:\\Temp\\SIC_Core.txt' | |
ofname = 'C:\\Temp\\SIC_Fixed.txt' | |
with open(fname, 'r') as ifile: | |
input = ifile.readlines(-1) | |
with open(ofname, 'w') as ofile: | |
i = 0 | |
while i < len(input): |
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
vagrant [tu (master)⚡]> pry | |
[1] pry(main)> my_array = [5,3,7,2] | |
=> [5, 3, 7, 2] | |
[2] pry(main)> my_array.sort | |
=> [2, 3, 5, 7] | |
[3] pry(main)> my_array | |
=> [5, 3, 7, 2] | |
[4] pry(main)> my_array.sort! | |
=> [2, 3, 5, 7] | |
[5] pry(main)> include Math |
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
var myNum = 3; | |
function arrayOfLight(myNum){ | |
var myArr = []; | |
for (i = 1; i <= myNum; i++) { | |
myArr.push(i); | |
} | |
return myArr; |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>The HTML5 Herald</title> | |
<meta name="description" content="The HTML5 Herald"> | |
<meta name="author" content="SitePoint"> |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Ajax Example</title> | |
<meta name="description" content="The HTML5 Herald"> | |
<meta name="author" content="SitePoint"> |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title></title> | |
<meta name="description" content="The HTML5 Herald"> | |
<meta name="author" content="SitePoint"> |
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
def getConstitInfo(page) | |
doc = Nokogiri::HTML(open(htmlDOC)) | |
regexp = /(\d+)\)$/ | |
ridingsList = [] | |
constitList = doc.css('.constituency a') | |
constitList.each do |constit| | |
ridingsList.push({:name => constit.text, :riding_id => | |
regexp.match(constit.attributes["href"])[1]}) | |
end |
OlderNewer