Skip to content

Instantly share code, notes, and snippets.

View GenevieveBuckley's full-sized avatar

Genevieve Buckley GenevieveBuckley

  • Monash University
  • Melbourne
View GitHub Profile
#!/usr/bin/env python3
"""
quicky script that compares two conda environments
can be handy for debugging differences between two environments
This could be made much cleaner and more flexible -- but it does the job.
Please let me know if you extend or improve it.
@GenevieveBuckley
GenevieveBuckley / pip_install
Created September 28, 2020 10:00 — forked from chrisRedwine/pip_install
Pip install a specific github repo tag or branch
# From https://coderwall.com/p/-wbo5q/pip-install-a-specific-github-repo-tag-or-branch
pip install -e git://github.com/{ username }/{ reponame }.git@{ tag name }#egg={ desired egg name }
@GenevieveBuckley
GenevieveBuckley / mount_smbfs.sh
Created March 19, 2020 01:39 — forked from natritmeyer/mount_smbfs.sh
How to mount and unmount a SMB share on Mac OS X (using mount_smbfs)
#Mounting the share is a 2 stage process:
# 1. Create a directory that will be the mount point
# 2. Mount the share to that directory
#Create the mount point:
mkdir share_name
#Mount the share:
mount_smbfs //username:password@server.name/share_name share_name/
@GenevieveBuckley
GenevieveBuckley / process_wrapper.py
Created September 17, 2019 02:33 — forked from yunwilliamyu/process_wrapper.py
Redirect Python stderr/stdout for a block
import sys
import contextlib
@contextlib.contextmanager
def output_wrapper():
save_stdout = sys.stdout
save_stderr = sys.stderr
sys.stdout = open('stdout.log', 'a')
sys.stderr = open('stderr.log', 'a')
yield
sys.stdout = save_stdout
@GenevieveBuckley
GenevieveBuckley / modern-geospatial-python.md
Created September 9, 2019 09:47 — forked from jqtrde/modern-geospatial-python.md
Modern remote sensing image processing with Python
@GenevieveBuckley
GenevieveBuckley / QImageViewer.py
Created June 13, 2019 07:13 — forked from acbetter/QImageViewer.py
Image Viewer Example by PyQt5 and Python 3
#!/usr/bin/python3
# -*- coding: utf-8 -*-
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QImage, QPixmap, QPalette, QPainter
from PyQt5.QtPrintSupport import QPrintDialog, QPrinter
from PyQt5.QtWidgets import QLabel, QSizePolicy, QScrollArea, QMessageBox, QMainWindow, QMenu, QAction, \
qApp, QFileDialog
@GenevieveBuckley
GenevieveBuckley / skimage_3d_compatibility.py
Last active April 16, 2019 12:47 — forked from emmanuelle/skimage_3d_compatibility.py
Inspect which functions of scikit-image are compatible with 3-D arrays.
import numpy as np
import inspect
from skimage import exposure, feature, filters, measure, morphology, \
restoration, segmentation, transform, util
def only_one_nondefault(args):
"""
Returns True if the function has only one non-keyword parameter,
False otherwise.
@GenevieveBuckley
GenevieveBuckley / git-tag-delete-local-and-remote.sh
Created April 3, 2019 02:27 — forked from mobilemind/git-tag-delete-local-and-remote.sh
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@GenevieveBuckley
GenevieveBuckley / markdown-details-collapsible.md
Created February 28, 2019 03:14 — forked from pierrejoubert73/markdown-details-collapsible.md
How to add a collapsible section in markdown.

A collapsible section with markdown

Click to expand!

Heading

  1. A numbered
  2. list
    • With some
    • Sub bullets
@GenevieveBuckley
GenevieveBuckley / ..git-pr.md
Created November 19, 2018 03:53 — forked from gnarf/..git-pr.md
git pr - Global .gitconfig aliases for Pull Request Managment

Install

Either copy the aliases from the .gitconfig or run the commands in add-pr-alias.sh

Usage

Easily checkout local copies of pull requests from remotes:

  • git pr 4 - creates local branch pr/4 from the github upstream(if it exists) or origin remote and checks it out
  • git pr 4 someremote - creates local branch pr/4 from someremote remote and checks it out