The goal is to replace individual double quotes " with single quotes ' without affecting docstring triple double quotes """.
%s/([^"])"([^"])/$1'$2/g
| # /// script | |
| # requires-python = ">=3.13" | |
| # dependencies = [ | |
| # "openpyxl", | |
| # "pandas", | |
| # ] | |
| # /// | |
| """ | |
| Given a folder of Connections.csv files downloaded through LinkedIn, |
| """Solutions for 2024 Advent of Code puzzles. | |
| https://adventofcode.com/2024 | |
| """ | |
| import argparse | |
| from collections import Counter, defaultdict | |
| from copy import deepcopy | |
| from functools import cmp_to_key | |
| from itertools import permutations, product | |
| from math import gcd, log2, prod |
| # pylint: disable=unspecified-encoding | |
| """Solutions for 2022 Advent of Code puzzles. | |
| https://adventofcode.com/2022 | |
| """ | |
| import argparse | |
| import functools | |
| import itertools | |
| import json | |
| from queue import LifoQueue |
| $('.dx').each((i, el) => { | |
| let val = $(el).html(); | |
| if (val.slice(-1) === '"') { | |
| $(el).html((parseFloat(val.slice(0, -1)) * 25.4).toFixed(1) + ' mm'); | |
| } | |
| }); |
| """ | |
| Create a custom grid-paper design as a minified vector image. | |
| This uses a unique adaptation of "stroke-dasharray" to create the grid | |
| pattern in a very small svg. | |
| Usage: | |
| python grid_maker.py > grid.svg | |
| python grid_mater.py --help |
| """ | |
| When run in cron, automatically adds compliant alias names to local DNS. | |
| Use at your own risk. | |
| Patrick Fuller, 25 June 17 | |
| """ | |
| import re | |
| import paramiko | |
| import pymongo |
| """ | |
| Exports issues from a list of repositories to individual csv files. | |
| Uses basic authentication (Github username + password) to retrieve issues | |
| from a repository that username has access to. Supports Github API v3. | |
| Forked from: unbracketed/export_repo_issues_to_csv.py | |
| """ | |
| import argparse | |
| import csv | |
| from getpass import getpass | |
| import requests |
| ####################################################################### | |
| # | |
| # This file contains crystal structure data downloaded from the | |
| # Cambridge Structural Database (CSD) hosted by the Cambridge | |
| # Crystallographic Data Centre (CCDC). | |
| # | |
| # Full information about CCDC data access policies and citation | |
| # guidelines are available at http://www.ccdc.cam.ac.uk/access/V1 | |
| # | |
| # Audit and citation data items may have been added by the CCDC. |
The goal is to replace individual double quotes " with single quotes ' without affecting docstring triple double quotes """.
%s/([^"])"([^"])/$1'$2/g
| #!/bin/bash | |
| # When SCSS is changed in a commit, this compiles and commits the affected css. | |
| # This script assumes a project directory of the form: | |
| # main.scss | |
| # main.css | |
| # scss | |
| # | file_1.scss | |
| # | ... | |
| # | file_n.scss |