Skip to content

Instantly share code, notes, and snippets.

View GenevieveBuckley's full-sized avatar

Genevieve Buckley GenevieveBuckley

  • Monash University
  • Melbourne
View GitHub Profile
@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 / 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 / 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 / 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 / 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 / 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 }
#!/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.