Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
interface NodeDefinition{ | |
description?: string, | |
// assign one texture OR assign one texture to each face of the cube. | |
tiles?: [string] | [string, string, string, string, string, string] | |
//TODO: add Node Box support https://dev.minetest.net/Node_Drawtypes | |
drawtype?: "normal"|"airlike"|"allfaces"|"allfaces_optional"|"glasslike"|"glasslike_framed"|"glasslike_framed_optional"|"liquid"|"flowingliquid"|"torchlike"|"signlike"|"plantlike"|"plantlike_rooted"|"raillike"|"fencelike"|"firelike"|"nodebox"|"mesh" | |
visual_scale?: number, //default is 1 | |
drop?: string, | |
on_punch?: (this: void, pos: Position, node: Node, player: ObjectRef)=>void | |
//Returning true in on_timer will cause the timer to run again for the same interval |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 imutils | |
import cv2 | |
from time import sleep | |
from imutils import resize | |
from datetime import datetime | |
cv2.startWindowThread() | |
cap = cv2.VideoCapture(0) | |
avg = None |
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
extern crate macroquad; | |
const FOREGROUND: macroquad::color::Color = macroquad::color::LIGHTGRAY; | |
const TEXTCOLOR: macroquad::color::Color = macroquad::color::RED; | |
const BACKGROUND: macroquad::color::Color = macroquad::color::DARKBLUE; | |
const TEXTFADEOUT_SECONDS: f64 = 1.5; | |
const TEXTSIZE: f32 = 30.0; | |
mod tictactoe { | |
// X = -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
extern crate macroquad; | |
const WIDTH_HEIGHT: usize = 60; | |
const WIDTH_HEIGHT_FLOAT: f32 = WIDTH_HEIGHT as f32; | |
const SECONDS_PER_TICK: f64 = 0.15; | |
const FOREGROUND_COLOR: macroquad::color::Color = macroquad::color::WHITE; | |
const FOREGROUND_COLOR2: macroquad::color::Color = macroquad::color::LIGHTGRAY; | |
struct SnowFlakeSim { | |
snow_bars: [usize; WIDTH_HEIGHT], |
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
tool | |
extends MeshInstance | |
export (Texture) var texture = null setget extrude_mesh_from_image | |
# a cube made out of 6 quads, a quad is made out of 2 triangles | |
const TRIANGLECUBE = [ | |
{ |
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
extern crate base64; | |
extern crate image; | |
fn main() { | |
println!("hello world"); | |
let testimage = image::RgbImage::from_fn(32, 32, |x, y| { | |
let sum = x / 4 + y / 4; | |
if sum % 2 == 0 { | |
return image::Rgb([0; 3]); | |
} |
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 tkinter | |
import random | |
from threading import Thread | |
from time import sleep | |
sign_pool = "abcdefghijklmnopqrstuvwxyz0123456789".upper() | |
number_of_items = 5 | |
pause_time_peritem_seconds = 1 | |
reverse = True |
NewerOlder