Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from matplotlib.legend_handler import HandlerLine2D | |
class HandlerXoffset(HandlerLine2D): | |
def __init__(self, marker_pad=0.3, numpoints=1, x_offset=0, **kw): | |
HandlerLine2D.__init__(self, marker_pad=marker_pad, numpoints=numpoints, **kw) | |
self._xoffset = x_offset | |
def get_xdata(self, legend, xdescent, ydescent, width, height, fontsize): | |
numpoints = self.get_numpoints(legend) | |
if numpoints > 1: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Copyright (C) 2006 Stefan van der Walt <stefan@sun.ac.za> | |
## | |
## Redistribution and use in source and binary forms, with or without | |
## modification, are permitted provided that the following conditions are | |
## met: | |
## | |
## 1. Redistributions of source code must retain the above copyright | |
## notice, this list of conditions and the following disclaimer. | |
## 2. Redistributions in binary form must reproduce the above copyright | |
## notice, this list of conditions and the following disclaimer in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def add_range_annotation(ax, start, end, txt_str, y_height=.5, txt_kwargs=None, arrow_kwargs=None): | |
""" | |
Adds horizontal arrow annotation with text in the middle | |
Parameters | |
---------- | |
ax : matplotlib.Axes | |
The axes to draw to | |
start : float |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun tac-python-header () | |
(interactive "*") | |
(occur "^\\s-*\\(\\(class\\)\\|\\(def\\)\\)\\|\\(@\\)") | |
) | |
(define-skeleton py-np-def | |
"Skeleton for function definition that includes numppydoc style " | |
"Name: " | |
"def " str "(" ("Parameter, %s: " (unless (equal ?\( (char-before)) ", ") | |
str) "):" \n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ophyd import SimDetector | |
from ophyd.areadetector.plugins import ProcessPlugin, TIFFPlugin | |
from ophyd.areadetector.filestore_mixins import FileStoreBase | |
from ophyd.areadetector.trigger_mixins import SingleTrigger | |
from ophyd.device import (Component as C) | |
prefix = 'XF:31IDA-BI{Cam:Tbl}' | |
class LocalTiff(TIFFPlugin, FileStoreBase): | |
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tcaswell@xf23id1-srv2:~/bnl_source/conda-prescriptions$ conda create -n dl_test matplotlib=1.3.1 | |
Fetching package metadata: /home/tcaswell/mc3/lib/python3.5/site-packages/requests/packages/urllib3/connection.py:266: SubjectAltNameWarning: Certificate for pergamon.cs.nsls2.local has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/shazow/urllib3/issues/497 for details.) | |
SubjectAltNameWarning | |
.... | |
Solving package specifications: .................... | |
Package plan for installation in environment /home/tcaswell/mc3/envs/dl_test: | |
The following packages will be downloaded: | |
package | build |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
## | |
## Bash install script for mongo 3.2 for Ubuntu 15.04, because of | |
## the replacement of upstart with systemd | |
## | |
## - AUTHOR: Alexandru Budurovici <https://w0rldart.com> | |
## - VERSION: 1.0 | |
## |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.