Still on the left!!!
Column1 | Column1 | Column1 |
---|---|---|
Column1 | Column1 | Column1 |
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 |
An example of a diff code block:
Unchanged Line
- Removed Line
+ Added Line