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
# Get the row names and put them in a new file called combined.csv | |
head -4 firstFile.txt | tail -1 > combined.csv | |
# Get the data from all files and append to combined.csv | |
# The more complicated 'find, while, do, done' is there because my file names had spaces in | |
find ./*.txt | while read file; do awk 'NR>5' "$file"; done >> combined.csv | |
# Finally do a row count reconcilisation | |
wc -l *.txt && wc -l combined.csv |
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 pandas as pd | |
from sqlalchemy import create_engine # database connection | |
import numpy as np | |
import pyproj | |
from scipy import spatial | |
# connect to the database, and query for all the unique weather station names and locations: | |
disk_engine = create_engine('sqlite:///WeatherData.db') |
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
source('Seating_Plan_Functions.R') | |
# Example run: | |
N <- c('Bill','Sandra','Frank','Jane','Henry','Sarah','Jeremy','John','Rich','Geoff','Smithy','Neil','Arthur','Sophie','Emmet','Andy') | |
# Community matrix (which guests know which guests) | |
C <- matrix(c( 1,50,10,10,10,10,0,10,10,10,10,10,10,0,10,10, | |
50,1,10,10,10,10,0,10,0,10,10,10,10,0,10,0, | |
10,10,1,50,10,10,0,0,0,0,0,10,0,0,0,0, | |
10,10,50,1,10,10,0,0,0,0,0,0,0,0,0,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
import requests | |
import re | |
import datetime | |
import time | |
import os | |
# function to build form data given date and time | |
def get_form_data(date, time): | |
return { 'Type': 'Observation', | |
'PredictionSiteID': 'ALL', |
NewerOlder