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 tkinter import *; | |
| from random import randint; | |
| from time import sleep; | |
| WIDTH = 500; | |
| HEIGHT = 500; | |
| # create the cells matrix | |
| def init_cells(window, population): | |
| global HEIGHT; |
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
| #version 3.7; | |
| global_settings{ assumed_gamma 1.0 } | |
| #default{ finish{ ambient 0.1 diffuse 0.9 }} | |
| #include "colors.inc" | |
| #include "textures.inc" | |
| #include "glass.inc" | |
| #include "metals.inc" | |
| #include "golds.inc" |
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 socket; | |
| import sys; | |
| host = "127.0.0.1"; | |
| sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM); | |
| client_addr = ("127.0.0.1", 10000); | |
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
| #version 3.7; | |
| global_settings{ assumed_gamma 1.0 } | |
| #default{ finish{ ambient 0.1 diffuse 0.9 }} | |
| // libraries | |
| #include "colors.inc" | |
| #include "textures.inc" | |
| #include "glass.inc" | |
| #include "metals.inc" |
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 tkinter as tk; | |
| import random; | |
| import time; | |
| def randomColor(): | |
| return "#%03x" % random.randint(0, 0xFFF); | |
| class BouncyBall(object): |
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
| #version 3.7; | |
| global_settings{ assumed_gamma 1.0 } | |
| #default{ finish{ ambient 0.1 diffuse 0.9 }} | |
| #include "colors.inc" | |
| light_source { | |
| <50, 20, 10> | |
| color White |
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
| class Node(object): | |
| def __init__(self): | |
| self.data = None; | |
| self.next = None; | |
| self.prev = None; | |
| def __init__(self): | |
| self.data = None; | |
| self.next = None; | |
| self.prev = None; |
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
| #version 3.7 | |
| global_settings{ assumed_gamma 1.0 } | |
| #default{ finish{ ambient 0.1 diffuse 0.9 }} | |
| #include "colors.inc" | |
| light_source { | |
| <50, 20, 10> | |
| color White |
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 "Arduino.h" | |
| #include <inttypes.h> | |
| #define BUTTON_PIN 4 | |
| #define BUZZ_PIN 5 | |
| #define RED_LED_PIN 8 | |
| #define GREEN_LED_PIN 9 | |
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 tkinter as tk; | |
| import random; | |
| import time; | |
| WIDTH = HEIGHT = 800; | |
| POPULATION = 200; | |
| # returns a hex color between #000 and #FFF in the form of a string |