Example of how to create dynamic map distance scales.
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
# -*- coding: utf-8 -*- | |
""" | |
Convert all MP3 files to OGG in all folders and subfolders starting | |
at the location of this source file. | |
@author: Michael Currie | |
""" | |
import os, collections | |
from glob import glob |
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
# -*- coding: utf-8 -*- | |
""" | |
Created on Sun Jun 22 22:26:53 2014 | |
Scrape a website to find content on Beatles Rankings | |
@author: @MichaelCurrie | |
http://michaelcurrie.com/blog/2014/7/7/john-lennon-vs-paul-mccartney-a-quantitative-analysis |
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 | |
# run this from ~/github/Lanki | |
# Remove any previous buildozer files from the folder | |
buildozer android clean | |
git pull | |
# Create the .buildozer folder and download its subcomponents, including the blacklist.txt file we are about to modify | |
buildozer android update |
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 math | |
import os | |
import numpy as np | |
from matplotlib import pyplot as plt | |
from matplotlib import animation | |
import h5py | |
#SPEED_UP = 4 | |
#DT = 0.05 |
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 | |
# -*- coding: utf-8 -*- | |
""" | |
Here we use timezone-aware datetime objects, as opposed to timezone-naive ones. | |
Source: Python manuals, stackoverflow posts, trial and error. | |
""" | |
from datetime import datetime | |
import time |
This file has been truncated, but you can view the full file.
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
#========================================================================================================== | |
# Access GUI of machine | |
# 1. Install the Ubuntu Desktop we'll be connecting to | |
sudo apt-get update | |
sudo apt-get install -y ubuntu-desktop | |
# 2. Install a server that will allow remote machines to connect | |
sudo apt-get install -y x11vnc | |
# Configure the password for the server (alabaster) |
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> | |
<meta charset="utf-8"> | |
<style> | |
.button { | |
min-width: 130px; | |
padding: 4px 5px; | |
cursor: pointer; | |
text-align: center; | |
font-size: 13px; | |
border: 1px solid #e0e0e0; |
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
CREATE FUNCTION sandbox.MonthNormalizedYearDiff(@StartDate DATE, @EndDate DATE) | |
RETURNS FLOAT | |
AS | |
BEGIN | |
/* | |
MONTH-NORMALIZED YEAR DIFF | |
How many years are between 31 December 2015 and 31 January 2016, say? You could say | |
31 days in January / 366 days in the year 2016. But notice how if I then try to | |
"de-annualize" the resulting fraction, I can't multiply by 12, since 31/366 != 1/12. |
OlderNewer