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;
}
""" | |
Add `# noqa: FXXX` comments to all lines with violations from flake8 | |
""" | |
# MIT License | |
# | |
# Copyright (c) 2022 Alex Riina | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal |
#!/usr/bin/env python3 | |
import re | |
import os | |
import subprocess | |
import statistics | |
class NoQueryPlanOutput(Exception): | |
pass |
# It only has two dependencies numpy and tensorflow | |
import numpy as np | |
import tensorflow as tf | |
from config import cfg | |
# Class defining a Convolutional Capsule | |
# consisting of multiple neuron layers | |
# |
Instructions tested with a Raspberry Pi 2 with an 8GB memory card. Probably also works fine on a Raspberry Pi 3.
Download the latest Raspbian Jessie Light
image. Earlier versions of Raspbian won't work.
Write it to a memory card using Etcher, put the memory card in the RPi and boot it up.
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
import string | |
from lxml import etree | |
from lxml.etree import QName | |
from lxml.builder import E | |
from hypothesis import strategies as st | |
NS = "http://relaxng.org/ns/structure/1.0" |
def determineIfPointLiesWithinPolygon(self, locationToTest): | |
# Check that the argument is actually a LocationObject. | |
if isinstance(locationToTest, LocationObject): | |
# Set crossings value to initial zero value. | |
iCrossings = 0 | |
# For each segment of the polygon (i.e. line drawn between each of the polygon's vertices) check whether | |
# a ray cast straight down from the test location intersects the segment (keep in mind that the segment | |
# may be intersected either coming or going). If the ray does cross the segment, increment the iCrossings |