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
| --- | |
| title: 'Multivariate Distances: Mahalanobis vs. Euclidean' | |
| author: "Billy Raseman" | |
| date: "July 12, 2018" | |
| output: html_document | |
| --- | |
| Below is the code used to create the plots for https://waterprogramming.wordpress.com/2018/07/23/multivariate-distances-mahalanobis-vs-euclidean/. My apologies that it is not entirely reproducible. I found it a bit easier to post-process a few of the plots (particularly for the PCA part)! | |
| ```{r} |
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
| import json | |
| import requests | |
| from lxml import html | |
| from collections import OrderedDict | |
| import argparse | |
| def parse(source,destination,date): | |
| for i in range(5): | |
| try: | |
| url = "https://www.expedia.com/Flights-Search?trip=oneway&leg1=from:{0},to:{1},departure:{2}TANYT&passengers=adults:1,children:0,seniors:0,infantinlap:Y&options=cabinclass%3Aeconomy&mode=search&origref=www.expedia.com".format(source,destination,date) |
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
| import os | |
| def createFolder(directory): | |
| try: | |
| if not os.path.exists(directory): | |
| os.makedirs(directory) | |
| except OSError: | |
| print ('Error: Creating directory. ' + directory) | |
These are instructions for setting up git to authenticate with GitHub when you have 2-factor authentication set up. This authentication should be inherited by any GUI client you are using. These are intentionally brief instructions, with links to more detail in the appropriate places.
-
Download and install the git command-line client (if required).
-
Open the git bash window and introduce yourself to git (if required):
git config --global user.name 'Firstname Lastname' git config --global user.email '[email protected]'
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
| I followed these two blogs to install server | |
| 1. http://koo.fi/blog/2015/03/19/openstreetmap-nominatim-server-for-geocoding/#Compile_Nominatim | |
| This explains ( and is the main blog which I followed) various steps | |
| 2. https://www.linuxbabe.com/linux-server/openstreetmap-tile-server-ubuntu-16-04 | |
| This explains how to setup swap files and install tiles if needed. | |
| I will use Ubuntu 14.04 LTS as the platform. Just a basic install with ssh server. We will install Apache to serve http requests. Make sure you have enough disk space and RAM to hold the data and serve it efficiently. I used the Finland extract, which was about a 200 MB download. The resulting database was 26 GB after importing, indexing and adding Wikipedia data. The Wikipedia data probably actually took more disk space than the OSM data. My server has 4 GB RAM, which seems to be enough for this small data set. | |
| 1. Sofware requirements |
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
| license: mit |
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/python | |
| # -*- coding: utf-8 -*- | |
| from time import sleep | |
| from random import randint | |
| from selenium import webdriver | |
| from pyvirtualdisplay import Display | |
| class MuncherySpider(): | |
| def __init__(self): |
Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.
- The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.
Translations: (No guarantee that the translations are up-to-date)
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 | |
| wget http://207.251.86.238/cctv261.jpg | |
| wget http://207.251.86.238/cctv254.jpg | |
| wget http://207.251.86.238/cctv490.jpg | |
| wget http://207.251.86.238/cctv263.jpg | |
| wget http://207.251.86.238/cctv644.jpg | |
| wget http://207.251.86.238/cctv696.jpg | |
| wget http://207.251.86.238/cctv722.jpg | |
| wget http://207.251.86.238/cctv200.jpg | |
| wget http://207.251.86.238/cctv31.jpg |
NewerOlder