```
echo "foo"
```
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
SELECT | |
DATE(timestamp) AS download_date, | |
COUNTIF(details.ci = TRUE) AS ci_downloads, | |
COUNTIF(details.ci IS NULL OR details.ci = FALSE) AS non_ci_downloads | |
FROM `bigquery-public-data.pypi.file_downloads` | |
WHERE DATE(timestamp) >= DATE_SUB(CURRENT_DATE(), INTERVAL 7 DAY) | |
GROUP BY download_date | |
ORDER BY download_date; |
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 unittest.mock import patch | |
import boto3 | |
from botocore.stub import Stubber | |
# create an ssm client | |
ssm = boto3.client("ssm") | |
# create an sqs client | |
sqs = boto3.client("sqs") |
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
""" | |
Add users to a Mastodon instance list. | |
Uses https://mastodonpy.readthedocs.io/ | |
""" | |
from os import environ | |
from pathlib import Path | |
from mastodon import Mastodon | |
from mastodon.errors import MastodonNotFoundError, MastodonServiceUnavailableError |
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
DIAGRAMS := $(wildcard *.puml */*puml) | |
SVGS := $(DIAGRAMS:.puml=.svg) | |
PNGS := $(DIAGRAMS:.puml=.png) | |
all: $(SVGS) $(PNGS) | |
%.png: %.puml | |
plantuml -tpng "$<" | |
%.svg: %.puml |
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
try: | |
# importlib.metadata is present in Python 3.8 and later | |
import importlib.metadata as importlib_metadata | |
except ImportError: | |
# use the shim package importlib-metadata pre-3.8 | |
import importlib_metadata as importlib_metadata | |
try: | |
__version__ = importlib_metadata.version(__package__ or __name__) | |
except importlib_metadata.PackageNotFoundError: |
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
class Hypermail < Formula | |
desc "Hypermail is a free (GPL) program to convert email from Unix mbox format to html." | |
homepage "http://www.hypermail-project.org/" | |
url "https://github.com/hypermail-project/hypermail/releases/download/v2.4.0/hypermail-2.4.0.tar.gz" | |
sha256 "f97995b9bb1ece888968467cdad05e3daa7662ff3e3a5739e378b4f3adeb26c6" | |
license "GPL-2.0" | |
depends_on "bison" => :build | |
depends_on "gcc" |
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
flip(inputInt) { | |
return inputInt = 1 - inputInt; | |
} | |
void main() { | |
print(flip(0)); | |
print(flip(1)); | |
} |
Prerequsites:
- GitHub account with admin-level rights to repos, possibly even org-level admin.
- Command Line familiarity
jq
tool
Note: Commands have been written assuming a macOS machine, they may work on other platforms, but I haven't tested those.
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 github import Github | |
gh = Github('SET_GITHUB_ACCESS_TOKE_HERE') | |
org = gh.get_organization('SET_ORG_NAME_HERE') | |
repos = org.get_repos() | |
for repo in repos: | |
if repo.archived: |
NewerOlder