I hereby claim:
- I am anirishduck on github.
- I am anirishduck (https://keybase.io/anirishduck) on keybase.
- I have a public key ASB3UsHkBF639z5lPcdgUozy8vWBKsuIVCTPGTr_k3VVngo
To claim this, I am signing this object:
SELECT date_trunc('month', date(q.created_at)) AS month, COUNT(DISTINCT r.artifact_id) AS with_outcomes, COUNT(DISTINCT q.id) AS total FROM quizzes q | |
LEFT OUTER JOIN learning_outcome_results r ON (r.g_shard_id = q.g_shard_id AND r.artifact_id = q.id AND r.artifact_type = 'Quizzes::QuizSubmission') | |
WHERE date(q.created_at) > date('2017-07-01') | |
GROUP BY date_trunc('month', date(q.created_at)) |
from petrify.solid import Vector, Box, Cylinder, Node, Union | |
from petrify.edge import Chamfer | |
port = 2.65 | |
outer = 2.28 | |
inner = 2.22 | |
wall = 0.125 | |
mm_p_in = 25.4 | |
to_mm = Vector(mm_p_in, mm_p_in, mm_p_in) |
from petrify.solid import Vector, Box, Cylinder, Node, Union | |
from petrify.edge import Chamfer | |
port = 2.65 | |
outer = 2.28 | |
inner = 2.22 | |
wall = 0.125 | |
mm_p_in = 25.4 | |
to_mm = Vector(mm_p_in, mm_p_in, mm_p_in) |
#!/bin/bash | |
if [[ "$1" == "--help" ]] ; then | |
echo -n "Diff cloudgate secrets from HEAD to the specified git ref. " >&2 | |
echo "Skips inaccessible vaults." >&2 | |
echo >&2 | |
echo "usage: $0 [REF] [ENVS...]" >&2 | |
echo >&2 | |
echo " REF: a git ref, defaults to HEAD^" >&2 | |
echo " ENVS: the environments to diff, defaults to all" >&2 |
I hereby claim:
To claim this, I am signing this object:
def check_out_and_err(*args, **kwargs): | |
""" | |
Pipe from BOTH stdout and stderr. Avoids deadlock by performing nonblocking | |
reads. Why this isn't in the stdlib is beyond me. | |
""" | |
if 'stdout' in kwargs or 'stderr' in kwargs: | |
raise ValueError("stdout/stderr arguments not allowed.") |
import os | |
from contextlib import contextmanager | |
@contextmanager | |
def pipe(my_end): | |
""" | |
Context manager that produces a unidirectional pipe, automatically always | |
closing the other end of that pipe. Useful for creating pipes to use with | |
subprocesses. |
""" Utility methods for context managers. License is BSD 3-Clause. """ | |
from collections import defaultdict | |
from unittest import TestCase | |
class nested(object): | |
""" | |
This context manager is different from ``contextlib.nested``. | |
``contextlib.nested`` is one-shot: once instantiated it can only be used | |
in a ``with`` statement once. This manager can be infinitely re-used. So | |
the following code works with this incarnation of ``nested``, but not with |
import fcntl | |
from contextlib import contextmanager | |
@contextmanager | |
def flocked(fd): | |
""" Locks FD before entering the context, always releasing the lock. """ | |
try: | |
fcntl.flock(fd, fcntl.LOCK_EX) | |
yield | |
finally: |