When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:
main {
max-width: 38rem;
padding: 2rem;
margin: auto;
}
import re | |
def valida_nit_nb(valor): | |
""" | |
Valida um número de NIT/NB (Número de Identificação do Trabalhador). | |
Parâmetros: | |
- valor (str|int): Número do NIT/NB a ser validado. | |
Retorna: |
import decimal | |
import re | |
INPUT_FILE = "input.svg" | |
OUTPUT_FILE = "output.svg" | |
DECIMAL_DIGITS = 10 | |
REGEX = r"[0-9.]+e-\d+" | |
# https://regex101.com/r/9SaiS7/1 |
''' Read and parse SVG files returning a shapely GeometryCollection containing the paths and primitives found. | |
Transforms are applied and all shapes are returned in the SVG root elements coordinate space. Primitives (rect, | |
circle and ellipse) are converted to equivalent paths, and only shape outlines are rendered, stroke properties | |
have no affect and are discarded. | |
Curved paths (arc and bezier commands and rounded rect, ellipse and circle elements) are linearized using a | |
naive approach that attempts to create enough segments to reduce maximum distance to the curve to below a | |
certain threshold, although this is probably not very efficient and most likely implemented in a fairly | |
broken way.''' |
This tutorial was originally written by Jannie Theunissen on onesheep.org. However, the website has been down for a while and this a clone from the web.archive.org backup. Also, the parts regarding the macOS are updated according to this post. You may find OneSheep here on Twitter and Jannie Theunissen here on StackOverflow. If you have any comments on this Gist please poke me here on Twitter, otherwise, I might miss your comments.
We were recently asked to automate some editing tasks for the Spotlight English editors w
#! /usr/bin/bash | |
"""": | |
# if Nix not installed, install it, then rerun this script with nix-shell | |
[ -f /etc/nix/nix.conf ] || curl -L https://nixos.org/nix/install | sh -s -- --daemon | |
exec nix-shell --command "python $0 $@" \ | |
-p python311 \ | |
-p python3Packages.numpy | |
# add any package you want above and they will be added to the shell | |
exit 1 | |
""" #" |
class PWindow extends PApplet { | |
PWindow() { | |
super(); | |
PApplet.runSketch(new String[] {this.getClass().getSimpleName()}, this); | |
} | |
void settings() { | |
size(500, 200); | |
} |
// gif by dave @beesandbombs | |
int[][] result; | |
float t, c; | |
float ease(float p) { | |
return 3*p*p - 2*p*p*p; | |
} | |
float ease(float p, float g) { |