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
from machine import Pin | |
import utime | |
buzzer = Pin(16, Pin.OUT) | |
dit_time = 0.05 | |
dah_time = dit_time * 3 | |
message = "SOS WE ARE SINKING" |
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
from machine import Pin | |
import utime | |
p = [Pin(i, Pin.OUT) for i in range(7)] | |
button = Pin(28, Pin.IN, Pin.PULL_DOWN) | |
digits = [ | |
0b0111111, | |
0b0000110, | |
0b1011011, |
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
program pendulum | |
implicit none | |
real :: time, dt, g, l, y, v | |
integer :: n, i | |
read (*,*) time, dt, g, l, y, v | |
n = ceiling(time / dt) | |
do i=2,n |
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
#include <math.h> | |
#include <stdlib.h> | |
#include <raylib.h> | |
#include <raymath.h> | |
typedef struct Hermite { | |
float x; | |
float y; | |
float d; | |
} Hermite; |
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
#include <stdio.h> | |
typedef struct mat4 { | |
float m[16]; | |
} mat4; | |
typedef struct vec3 { | |
float x; | |
float y; | |
float z; |
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
#include <stdint.h> | |
#include <math.h> | |
#define STB_IMAGE_WRITE_IMPLEMENTATION | |
#include "stb_image_write.h" | |
struct rgb { | |
uint8_t r; | |
uint8_t g; | |
uint8_t b; |
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
public class MainProgram { | |
public static void main(String[] args) { | |
Nat n1 = Nat.int2Nat(10); | |
Nat n2 = Nat.int2Nat(20); | |
Nat n3 = n1.add(n2); | |
int x = Nat.nat2Int(n3); | |
System.out.println(x); |
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
#include <iostream> | |
#include <vector> | |
#include <optional> | |
#include <functional> | |
#include <cctype> | |
using namespace std; | |
struct unit { |
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
#include <stdio.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <math.h> | |
#define STB_IMAGE_IMPLEMENTATION | |
#include "stb_image.h" | |
#define STB_IMAGE_WRITE_IMPLEMENTATION |
NewerOlder