Still on the left!!!
| Column1 | Column1 | Column1 |
|---|---|---|
| Column1 | Column1 | Column1 |
| #!/usr/local/bin/python3 | |
| # <bitbar.title>GitHub Notifier</bitbar.title> | |
| # <bitbar.version>v1.0</bitbar.version> | |
| # <bitbar.author>Waylan Limberg</bitbar.author> | |
| # <bitbar.author.github>waylan</bitbar.author.github> | |
| # <bitbar.desc>Display a list of unread GitHub Notifications.</bitbar.desc> | |
| # <bitbar.image>https://github.com/primer/octicons</bitbar.image> | |
| # <bitbar.dependencies>python,agithub</bitbar.dependencies> | |
| # <bitbar.abouturl>http://url-to-about.com/</bitbar.abouturl> |
| from mistune import create_markdown | |
| from mistune.renderers import BaseRenderer | |
| import re | |
| ESCAPE_CHAR = re.compile(r'(?<!\\)([\\`*_()\[\]#+-])') | |
| UL_BULLET = re.compile(r'(?<=^)(\*)( +)', re.MULTILINE) | |
| def indent(text, level, tab_length=4): | |
| ''' Indent block of text by level ''' |
| try: | |
| import HTMLParser as parser | |
| except ImportError: | |
| from html import parser | |
| class TestParser(parser.HTMLParser): | |
| def handle_starttag(self, tag, attrs): | |
| print ("STAG:", tag) |
| import pandas as pd | |
| # "W-SUN" for Monday to Sunday week. Use "W-SAT" for Sunday to Saturday... | |
| date_range = pd.period_range('1/1/2019', '12/31/2019', freq='W-SUN') | |
| """ | |
| >>> date_range | |
| PeriodIndex(['2018-12-31/2019-01-06', '2019-01-07/2019-01-13', | |
| '2019-01-14/2019-01-20', '2019-01-21/2019-01-27', | |
| ... |
| #!/usr/bin/python | |
| # From http://www.leancrew.com/all-this/2013/03/combining-python-and-applescript/ | |
| # Updated for Python 3 | |
| import subprocess | |
| def asrun(ascript): | |
| "Run the given AppleScript and return the standard output and error." |
| from pkg_resources import iter_entry_points | |
| import click | |
| def get_entry_point_object(name): | |
| """ Return the object associated with an installed console script entry point. """ | |
| entry_points = [ep for ep in iter_entry_points('console_scripts', name=name)] | |
| if len(entry_points) < 1: | |
| raise ValueError("'{}' is not an installed console script.".format(name)) | |
| return entry_points[0].resolve() |
| import os | |
| import shutil | |
| def copy_file(src, dst): | |
| """ | |
| Copy src to dst ensuring parent directories are created. | |
| The dst may be a directory, as long as it already exists. | |
| """ | |
| # If destination directory doesn't exist, create it. | |
| dst_dir = os.path.dirname(dst) |
| Sub FancyTitleCase() | |
| ' | |
| ' Fancy Title Case Macro | |
| ' | |
| ' | |
| Dim lclist As String, wrd As Integer, sTest As String | |
| ' list of lowercase words, surrounded by spaces | |
| lclist = " a an and at but by for from in nor of on or so the this to up yet v v. vs vs. " | |
| Selection.Range.Case = wdTitleWord |
| from functools import wraps | |
| try: | |
| # py>=3.2 | |
| from tempfile import TemporaryDirectory | |
| except ImportError: | |
| from backports.tempfile import TemporaryDirectory | |
| from pathlib2 import Path | |
| def tempdir(files=None, **kw): | |
| """ |
Still on the left!!!
| Column1 | Column1 | Column1 |
|---|---|---|
| Column1 | Column1 | Column1 |