Skip to content

Instantly share code, notes, and snippets.

View MichaelCurrie's full-sized avatar
💭
🧬Ⓗ Certified Human · http://certifiedh.com

Michael B. Currie MichaelCurrie

💭
🧬Ⓗ Certified Human · http://certifiedh.com
View GitHub Profile
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 9.
Asset,Type,Asset Value,Debt,Net Value,Change vs 2015,Change,Stake,Latitude,Longitude,Notes
Trump Tower (New York City),Office and retail,471,100,371,-159,Down,1,40.768277,-73.981455,Opened 1983
1290 Avenue of the Americas (New York City),Office and retail,2310,950,408,-62,Down,0.3,40.768277,-73.981455,
Niketown (New York City),Office and retail,400,10,390,-52,Down,1,40.768277,-73.981455,Ground lease through 2079
40 Wall Street (New York City),Office and retail,501,156,345,-28,Down,1,40.768277,-73.981455,
Trump Park Avenue (New York City),Residential and retail,191,14.3,176.7,-27,Down,1,40.768277,-73.981455,"49,564 sq. ft. of condos; 27,467 sq. ft. of retail"
Trump Parc/Trump Parc East (New York City),Residential and retail,88,0,88,17,Up,1,40.768277,-73.981455,"11,750 sq. ft. of condos; 14,963 sq. feet of retail; 13,108 sq. ft. of garage"
"Trump International Hotel and Tower, Central Park West (New York City)","Hotel, condos and retail",38,0,38,21,Up,1,40.768277,-73.981455,
"Trump World Tower, 845 United Natio
@MichaelCurrie
MichaelCurrie / split_bubbles_d3.html
Created November 4, 2016 04:21
Splitting bubbles using d3.js v4
<!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;
@MichaelCurrie
MichaelCurrie / awss3connect.md
Last active March 25, 2021 12:05
Connecting your local machine to an S3 bucket

Connecting your local machine to an S3 bucket

Steps to get a file on your local machine uploaded to an AWS S3 bucket, and then downloaded and used in an AWS EC2 Ubuntu Instance. (In this case we do the reverse, but the process is similar)

STEP 1

Get security credentials to be able to use the AWS command line utility:

@MichaelCurrie
MichaelCurrie / GUI_on_ubuntu.sh
Created August 7, 2016 13:32
Access GUI on Amazon Ubuntu instance
#==========================================================================================================
# 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)
@MichaelCurrie
MichaelCurrie / SIMSUN.ttf
Last active June 3, 2016 19:00
Kivy SoundLoader with chinese characters in sound path
This file has been truncated, but you can view the full file.
@MichaelCurrie
MichaelCurrie / python_multiprocessing_example.py
Last active May 23, 2020 02:49
Python multiprocessing example
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
A basic example using multiple processes
We spawn 4 processes. Each process is made to draw N/4 random
integers from 1 to 10, for some fixed large N.
Then the processes adds up its list of numbers, passes it into a queue,
and the main program adds up the subtotals to get a grand total.
@MichaelCurrie
MichaelCurrie / time_conversions.py
Last active January 19, 2016 04:09
ISO 8601 UTC timestamp recipe
#!/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
@MichaelCurrie
MichaelCurrie / autopep8 Travis-CI.md
Last active April 26, 2021 17:18
Automatically fix PEP-8 issues using Travis-CI

PEP-8 is a set of Python style recommendations. pep8 is a module that checks your .py file for violations. To make your Travis-CI build fail if you have any violations, you could add these lines to your .travis.yml:

before_install:
    - pip install pep8
    
script:
    # Run pep8 on all .py files in all subfolders
    # (I ignore "E402: module level import not at top of file"
    # because of use case sys.path.append('..'); import <module>)
@MichaelCurrie
MichaelCurrie / buildozer_make.sh
Created October 1, 2015 15:15
Makefile for buildozer.
#!/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
@MichaelCurrie
MichaelCurrie / mp3toogg.py
Created August 26, 2015 21:10
Convert all MP3 files to OGG in all folders and subfolders.
# -*- 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