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
import matplotlib.pyplot as plt | |
from matplotlib.patches import Ellipse | |
import numpy as np | |
fig, ax = plt.subplots(num=1, clear=True) | |
ax.set(xlim=(-1, 5), ylim=(-5, 3)) | |
el = Ellipse((2, -1), 0.5, 0.5) | |
ax.add_patch(el) |
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 selenium import webdriver | |
from selenium.webdriver.common.keys import Keys | |
KMSID, KMSPASSWD = "", "" | |
fireFoxOptions = webdriver.FirefoxOptions() | |
fireFoxOptions.headless = True | |
driver = webdriver.Firefox(options=fireFoxOptions) | |
driver.get("http://kms.kasi.re.kr") |
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 import rcParams | |
def add_inner_title(ax, title, loc, style="pe", | |
extra_prop=None, extra_kwargs=None): | |
from matplotlib.offsetbox import AnchoredText | |
from matplotlib.patheffects import withStroke | |
kwargs = dict(pad=0., borderpad=0.5) | |
if style == "pe": |
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.backends.backend_agg import FigureCanvasAgg as InlineCanvas | |
def get_inlined_fig(fig): | |
fig.set_canvas(InlineCanvas(fig)) | |
return fig | |
def get_inlined_figs(**figs): |
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 functools import partial | |
from ..utils.gui_box import AnchoredGuiBox | |
class WidgetSet(): | |
def __init__(self, box, **kwargs): | |
self.gui = box.gui | |
self.kwargs = kwargs | |
self.params = [] |
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.axes import Axes | |
from matplotlib.font_manager import FontProperties | |
from matplotlib import rcParams | |
from matplotlib.transforms import Bbox, TransformedBbox | |
from matplotlib.offsetbox import (AnchoredOffsetbox, | |
DrawingArea, TextArea, | |
HPacker, VPacker) |
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
import numpy as np | |
def match_time(t_begin, t_end, s_begin, s_end): | |
""" | |
Given the list of start and end of target times (t_begin, t_end), | |
find indices that source time (s_begin, s_end) belongs to. | |
Returns two indicies. First is those sources belongs to, | |
and the second is the indices to the gap between target times. | |
""" |
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
#! ./svc_python/bin/python | |
import glob | |
import sys | |
import os | |
import random | |
import astropy.io.fits as pyfits | |
from stsci.image import combine | |
import numpy as np |
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
<link rel="import" href="../core-scaffold/core-scaffold.html"> | |
<link rel="import" href="../core-header-panel/core-header-panel.html"> | |
<link rel="import" href="../core-menu/core-menu.html"> | |
<link rel="import" href="../core-item/core-item.html"> | |
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-menu/core-submenu.html"> | |
<link rel="import" href="../google-map/google-map.html"> | |
<polymer-element name="my-element"> |
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
// ==UserScript== | |
// @name Fix Chrome in kms.kasi.re.kr | |
// @namespace http://use.i.E.your.homepage/ | |
// @version 0.7 | |
// @description enter something useful | |
// @match http://kms.kasi.re.kr/* | |
// @match http://intra.kasi.re.kr/* | |
// @copyright 2013+, Jae-Joon Lee | |
// ==/UserScript== |
NewerOlder