Skip to content

Instantly share code, notes, and snippets.

View andersy005's full-sized avatar
:octocat:

Anderson Banihirwe andersy005

:octocat:
View GitHub Profile
@andersy005
andersy005 / .condarc
Created September 1, 2019 02:57 — forked from ocefpaf/.condarc
# See https://www.anaconda.com/understanding-and-improving-condas-performance/ for more info.
# help debug channel issues
show_channel_urls: true
# pip will always be installed with python
add_pip_as_python_dependency: true
# strict priority and conda-forge at the top will ensure
# that all of your packages will be from conda-forge unless they only exist on defaults
<object>
<embed src="https://travel.state.gov/content/dam/passports/content-page-resources/FIG_cropper.swf" width="100%" height="100%">
</object>
import pandas as pd
from matplotlib import pyplot as plt
import numpy as np
%matplotlib inline
url = 'https://storage.googleapis.com/pangeo-cmip6/pangeo-cmip6-zarr-consolidated-stores.csv'
df = pd.read_csv(url)
run_count = df[df.activity_id == 'CMIP'].groupby(['experiment_id', 'source_id']).zstore.count()
rcu = run_count.unstack(level=-1)
@andersy005
andersy005 / etl_prefect.ipynb
Created January 9, 2020 23:01 — forked from rabernat/etl_prefect.ipynb
Better prefect ETL
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@andersy005
andersy005 / GIF-Screencast-OSX.md
Created January 10, 2020 17:02 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@andersy005
andersy005 / fish_shell_local_install.sh
Created January 25, 2020 19:32 — forked from masih/fish_shell_local_install.sh
Installs Fish Shell without root access
#!/bin/bash
# Script for installing Fish Shell on systems without root access.
# Fish Shell will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
FISH_SHELL_VERSION=2.1.1
@andersy005
andersy005 / data-science-process.md
Created April 13, 2020 16:55 — forked from jayascript/data-science-process.md
A basic outline of the steps I take to go from raw data to deployed model.

Data Science Process

Steps to take for a comprehensive analysis.

Stage 1: Define

Project background.

Step 1.1: Describe.

# -*- coding: utf-8 -*-
""" Deletes all tweets below a certain retweet threshold.
"""
import tweepy
from datetime import datetime
# Constants
CONSUMER_KEY = ''
@andersy005
andersy005 / prefect_coiled_demo.ipynb
Created July 10, 2020 00:39 — forked from cicdw/prefect_coiled_demo.ipynb
Outline of Prefect + Coiled demo
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@andersy005
andersy005 / paramiko_yubikey.py
Created August 4, 2020 23:15 — forked from graysonchao/paramiko_yubikey.py
RSA+YubiKey 2FA example using Paramiko
username = raw_input("Enter SSH username:")
yubikey_string = getpass.getpass('Enter YubiKey OTP:')
client = paramiko.client.SSHClient()
# Any means of getting the PKey will do. This code assumes you've only got one key loaded in your active ssh-agent.
# See also:
# - http://docs.paramiko.org/en/1.17/api/keys.html#paramiko.pkey.PKey
# - http://docs.paramiko.org/en/1.17/api/client.html#paramiko.client.SSHClient.connect
my_pkey = paramiko.agent.Agent().get_keys()[0]