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
// Tearing test | |
#include "32blit.hpp" | |
uint16_t width = 160; | |
uint16_t height = 120; | |
uint32_t prev_buttons = blit::buttons; | |
void init(void) { | |
blit::set_screen_mode(blit::lores); |
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
// Update test | |
#include <unistd.h> | |
#include "32blit.hpp" | |
#include "../../../../../../usr/include/zconf.h" | |
uint16_t width = 160; | |
uint16_t height = 120; | |
uint32_t prev_buttons = blit::buttons; |
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
// Tearing test | |
#include "32blit.hpp" | |
uint16_t width = 160; | |
uint16_t height = 120; | |
uint32_t prev_buttons = blit::buttons; | |
uint32_t updates = 0; |
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
import click | |
import pyudev | |
import socket | |
import serial | |
import serial.threaded | |
class Worker(serial.threaded.Protocol): | |
def __init__(self, socket): | |
self.socket = socket |
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
// hpp | |
#pragma once | |
#include <cstdint> | |
#include "32blit.hpp" | |
enum Sound { | |
BlockSmash, |
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
// [ 56.0, 4*62.0, 48.0, 0.6 ], // WHAM 5.04 outer side large | |
// [ 56.0, 2*62.0, 48.0, 0.6 ], // WHAM 5.04 outer side small | |
// [ 56.5, 63.5, 48.0, 0.6 ], // WHAM 5.04 inner | |
// [ 56.5, 62.5, 48.0, 0.6, [0.125, 0.5, 0.25, 0.125] ], // WHAM 5.04 outer | |
$fs = 0.1; | |
module fillet(r) { |
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
bl_info = { | |
"name": "Infinite Backups", | |
"author": "Alistair Buxton <[email protected]>", | |
"version": (1, 0), | |
"blender": (2, 80, 0), | |
"doc_url": "https://gist.github.com/ali1234/415c5ac863c5649c41a22fe061351a22", | |
"tracker_url": "https://gist.github.com/ali1234/415c5ac863c5649c41a22fe061351a22", | |
"category": "System", | |
} |
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
#!/usr/bin/env python3 | |
from collections import defaultdict | |
from itertools import combinations, permutations | |
from math import isqrt | |
from subprocess import check_call | |
def inner(n): | |
return range(1, n+1) |
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
Convexity | |
--------- | |
Explanation for mathematicians: | |
1. Every object in OpenSCAD must be closed. An object is closed if it partitions space into two regions: | |
"inside" (the object itself) and "outside" (the rest of the empty space that the object does not occupy). | |
For the purposes of understanding convextity, we can ignore positions that lie exactly on the object's surface, | |
and say that any arbitrarily selected position in space must be either inside or outside the object - never both. |
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
# https://github.com/going-digital/Talkie ported to Python | |
import queue | |
import random | |
import numpy as np | |
class BitReader: | |
def __init__(self, data): |