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
#!/usr/bin/env python3 | |
""" Write non-outlier corresponding points from Adelaide RMF datasets | |
The datasets appear to be based at | |
`https://www.ai4space.group/research/adelaidermf`_ - but the links there are | |
broken (I've emailed the first contact listed on that page). | |
In the meantime, I found what appear to be the data files at `data/AdelaideRMF` in | |
`https://github.com/trungtpham/RCMSA`_. |
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
#!/usr/bin/env python3 | |
""" Calculate and apply optimal scale and shift to subtitle times | |
Takes CSV of form: | |
text,video_time,srt_time | |
tranquilo,0:01:25,00:01:21.5 | |
ya_empezo_el_abuso,00:34:59.5,00:36:23 | |
ignacio,00:59:27.5,01:01:54.2 | |
tengo_que_llevar,1:20:30.5,01:23:51.2 |
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
#!/usr/bin/env python3 | |
""" Convert Github notebook URL to NBGitPuller URL | |
See: https://nbgitpuller.readthedocs.io/en/latest/link.html | |
""" | |
from argparse import ArgumentParser, RawDescriptionHelpFormatter | |
from warnings import warn | |
from urllib.parse import urlparse |
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
#!/usr/bin/env python3 | |
from pathlib import Path | |
import zipfile | |
from argparse import ArgumentParser, RawDescriptionHelpFormatter | |
def unpack_zip(zip_path, out_dir): | |
out_path = out_dir / zip_path.stem |
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
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
name | |
HEUNG YUEN RESTAURANT | |
ILLY CAFFE SF_PIER 39 | |
AMICI'S EAST COAST PIZZERIA | |
LOCAL CATERING | |
OUI OUI! MACARON | |
Hula Truck (#2) | |
GENKI CREPES & MINI MART | |
UNCLE LEE CAFE | |
Twirl and Dip |
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
#!/usr/bin/env python3 | |
""" Process .py file with nosetests assert_true etc for pytest | |
It does a fairly crude (regexp) job of taking lines nosetests lines like:: | |
yield assert_true, 1 == 2 | |
and replacing them with:: | |
assert 1 == 2 |
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
#!/usr/bin/env python3 | |
"""Process attendance data | |
Start by downloading an attendance sheet in HTML or Excel format. | |
You can download attendance data using the ".." icon in the Attendance | |
interface. | |
Download in Excel format using the "Download Excel" option. |
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
#!/usr/bin/env python3 | |
"""Print URL for multi-user teams chat | |
Start by downloading an attendance sheet in HTML using the ".." icon in the | |
Attendance interface, and selecting "View Attendance Sheet". This will give | |
you an HTML file download. Note the filename. Then run this program, passing | |
the filename of the downloaded file. It will print out a URL you can paste | |
into your browser. If you do, your browser will open Teams with a chat ready | |
to fill out, and all the people listed anywhere on the attendance sheet added | |
(regardless of whether they attended or not). |
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
#!/usr/bin/env python | |
""" Reset disk for VirtualBox vmdk | |
""" | |
import os.path as op | |
from subprocess import check_output | |
import plistlib | |
import re | |
from argparse import ArgumentParser, RawDescriptionHelpFormatter |
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
#!/usr/bin/env python3 | |
""" Show bluetooth power for named device on macOS | |
""" | |
import sys | |
import json | |
from subprocess import check_output, DEVNULL | |
from argparse import ArgumentParser, RawDescriptionHelpFormatter | |
NewerOlder