Skip to content

Instantly share code, notes, and snippets.

@willbowditch
willbowditch / rename.py
Last active November 8, 2022 22:31
Rename Google Cloud Storage Objects using regex in Python
"""Rename GCS Objects using a regex.
This one finds files that have the format ANSData_RawData26Nov2016ML12952.dat
and renames them to ANSData_RawData 26 May 2016 ML12768.dat
"""
import re
from google.cloud import storage
# Grab the bucket
@willbowditch
willbowditch / profile.md
Created November 29, 2018 22:08
Profile from chunk 3 of geoviews projection
644332 function calls (617869 primitive calls) in 628.080 seconds

   Ordered by: internal time

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1  268.726  268.726  268.726  268.726 {method 'transform_points' of 'cartopy._crs.CRS' objects}
        1  191.124  191.124  625.980  625.980 projection.py:188(_process_element)
        8  127.947   15.993  127.947   15.993 {built-in method numpy.core.multiarray.concatenate}
        1   34.910   34.910   34.910   34.910 projection.py:195(<dictcomp>)

Setting up Spark (2.3.1) for Jupyterlab or Atom Hydrogen using Homebrew (OS X)

30th July 2018

  • Install Java 8 brew cask install java8

    • I had to remove Java 10, or spark attempted to use this brew cask uninstall java
  • Install Apache Spark brew install apache-spark

@willbowditch
willbowditch / debug.md
Created December 5, 2017 10:24
atom beautify autopep8
@willbowditch
willbowditch / keybase.md
Created November 23, 2017 09:33
keybase.md

Keybase proof

I hereby claim:

  • I am willbowditch on github.
  • I am willbowditch (https://keybase.io/willbowditch) on keybase.
  • I have a public key ASA2zxQjL2DjhpTHncv2Sc-KP7HXWbcmBQnhiwlcvN4Vqgo

To claim this, I am signing this object: