I hereby claim:
- I am dlamblin on github.
- I am lamblin (https://keybase.io/lamblin) on keybase.
- I have a public key ASBAVHV42mQM8gQI_cDjr5CrDH6F8c5nkiEHQRKwFivIjgo
To claim this, I am signing this object:
<html><head><link rel="canonical" | |
href="https://gistpreview.github.io/?a64325011f0147a56dbc5316b6ec17c2" | |
/><style> | |
html , body { height: 100%; width 100%; margin: 0; display: flow-root; } | |
div { margin: 1em; border: 1pt solid black; float: left; display: block; | |
font: 8pt/calc(12in/70) sans-serif; text-align: center; padding: 0; } | |
.ruler { background-image: | |
repeating-linear-gradient(#ccc 0 0.5pt, transparent 0.5pt 100%), | |
repeating-linear-gradient(90deg, #ccc 0 0.5pt, transparent 0.5pt 100%); |
#!/usr/bin/env python | |
from argparse import ArgumentParser | |
from fileinput import input | |
from itertools import groupby | |
from json import dumps | |
from typing import Generator | |
""" | |
The intent of this script is to convert the many versions.tf files found | |
with `find . -name versions.tf` (finds 124 files in my repo) into json, so |
I hereby claim:
To claim this, I am signing this object:
In order to practice Python, Sophie worked on some Python that implements a game.
The first practice was to figure out how to take an ordered list of cards and shuffle that list like a deck of cards. After quickly figuring out a way to shuffle cards and then display the mixed up deck, she worked on making a guessing game out of it.
refmt | mentions | EG | |
---|---|---|---|
detab | 468 | Fixed crash when detabbing with zero spaces per tab. | |
entab | 88 | Add C functions to centralize entab processing | |
reindent | 6311 | lang_css: reindented parser_css.mly |
#!/usr/bin/env python3 | |
# vim: et sw=4 ai | |
""" | |
This script takes in files named in presumed yaml format and OVERWRITES them | |
with all their keys sorted by the key name. It does not preserve comments. I've | |
not tested it with lists. | |
Using '-' as a filename opens and consumes stdin in addition to other files. | |
stdin is written to stdout with the same processing. |
""" | |
This module contains four methods for muting file descriptors. | |
You can mute the standard file descriptors: | |
with mute_stdout(): | |
... | |
with mute_stderr(): | |
... | |
with mute_stdout_stderr(): | |
... | |
Or mute a list of known file descriptors: |
# Licensed to the Apache Software Foundation (ASF) under one | |
# or more contributor license agreements. See the NOTICE file | |
# distributed with this work for additional information | |
# regarding copyright ownership. The ASF licenses this file | |
# to you under the Apache License, Version 2.0 (the | |
# "License"); you may not use this file except in compliance | |
# with the License. You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
# Licensed to the Apache Software Foundation (ASF) under one | |
# or more contributor license agreements. See the NOTICE file | |
# distributed with this work for additional information | |
# regarding copyright ownership. The ASF licenses this file | |
# to you under the Apache License, Version 2.0 (the | |
# "License"); you may not use this file except in compliance | |
# with the License. You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
""" | |
n-gram of a string by characters (not by words) | |
takes all args as input unless the first two args are numbers which are in | |
order, then it assume these are min and max length. Default min max is 2 - 60 | |
""" | |
def ngram(inp='', mn=2, mx=60): | |
""" |