This file contains hidden or 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
#!/bin/bash | |
set -eou pipefail | |
CARD="" | |
for card_path in /sys/class/drm/card*/device; do | |
if [[ -L "$card_path/driver" ]] && [[ $(basename $(readlink "$card_path/driver")) == "amdgpu" ]]; then | |
CARD="$card_path" | |
break | |
fi |
This file contains hidden or 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
from __future__ import annotations | |
import colorsys | |
import random | |
import time | |
Grid = list[list[int]] | |
Weights = list[list[float]] | |
WIDTH = 40 |
This file contains hidden or 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
from PIL import Image, ImageDraw | |
char_width = 12 | |
char_height = 18 | |
chars_x = 16 | |
chars_y = 16 | |
black = (128, 128, 128, 255) | |
white = (255, 255, 255, 255) |
This file contains hidden or 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 bpy | |
import os | |
from mathutils import Vector | |
from math import radians, sqrt, sin, cos, tan, pi | |
CAM_DEGREES = radians(60) | |
This file contains hidden or 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 math | |
import timeit | |
import random | |
def combsort(shrink, data): | |
gap = len(data) | |
sorted = False | |
while not sorted: | |
gap = math.floor(gap / shrink) |
This file contains hidden or 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
#include <Adafruit_NeoPixel.h> | |
// It's good to name these what they mean rather than what they are! | |
#define PIN_LED_STRIP_FRONT 2 | |
#define PIN_LED_STRIP_REAR 6 | |
#define NUM_LEDS 10 | |
// Parameter 1 = number of pixels in strip | |
// Parameter 2 = pin number (most are valid) |
This file contains hidden or 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
#[derive(Clone, Copy)] | |
#[repr(u32)] | |
pub enum Enum_Unnamed37 { | |
UndefinedFilter = 0, | |
PointFilter = 1, | |
BoxFilter = 2, | |
TriangleFilter = 3, | |
HermiteFilter = 4, | |
HanningFilter = 5, | |
HammingFilter = 6, |
This file contains hidden or 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
function Logger(id) | |
{ | |
this.id = id; | |
this.rawLog = []; | |
// Variables of Logs | |
// Contains their values [0[ & COOJA timestamp [n-1] | |
this.macAdd = []; | |
this.csmaChannel = []; | |
this.ipv6LinkLocal = []; | |
this.collectProcessId = []; // Client/Server? |
This file contains hidden or 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
function keyDown(e:KeyboardEvent):void { | |
trace('A key has been pressed.'); | |
trace(e.keyCode); | |
trace(e.charCode); | |
if (e.keyCode == Keyboard.SPACE) { | |
trace('Space was pressed.'); | |
} | |
} |
This file contains hidden or 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
#include <Servo.h> | |
#include "SerialParser.h" | |
/*--------------------------------------------------------------------------------------*/ | |
#define SERVO_COUNT 32 | |
/*--------------------------------------------------------------------------------------*/ | |
Servo servos[SERVO_COUNT]; |
NewerOlder