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
using UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
[RequireComponent(typeof(MeshFilter))] | |
[RequireComponent(typeof(MeshRenderer))] | |
public class MeshCombiner : MonoBehaviour { | |
private List<MeshFilter> meshFilters; | |
private CombineInstance[] combineInstances; |
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 os | |
import datetime | |
import PIL | |
from PIL import Image | |
from PIL import ImageFont | |
from PIL import Image | |
from PIL import ImageDraw | |
class ImageCompositionTool(object): |
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 requests | |
import json | |
import urllib.request | |
import datetime | |
# import username, password, etc from config.py file that looks like this: | |
""" | |
config = { | |
"user": "minecraft account", | |
"password": "minecraft account password", |
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 pygame | |
import random | |
from pygame.locals import KEYDOWN, K_LEFT, K_RIGHT, K_UP, K_DOWN, QUIT | |
# init pygame, with white background 500x500 pixels in size | |
pygame.init() | |
screen = pygame.display.set_mode((500, 500)) | |
background = pygame.Surface((500, 500)) | |
background.fill((255, 255, 255)) |
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 pygame | |
from pygame.locals import MOUSEBUTTONDOWN, QUIT | |
# create a Card class that inherits the Sprite class | |
class Card(pygame.sprite.Sprite): | |
def __init__(self, image, rect, name): | |
# here we call the init function of the pygame.sprite.Sprite class. | |
# this means we can use all sprite class functions: | |
# http://www.pygame.org/docs/ref/sprite.html |
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
Complete this phrase. As sick as a... | |
Penguin | |
Parrot | |
Puffin | |
Partridge | |
Parrot | |
Which legal document states a person's wishes regarding the disposal of their property after death? | |
Will | |
Shall |
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
qa = [ | |
{ | |
"question": "Complete this phrase. As sick as a...", | |
"choices": ["Penguin", "Parrot", "Puffin", "Partridge"], | |
"answer": "Parrot" | |
}, | |
{ | |
"question": "Which legal document states a person's wishes regarding the disposal of their property after death?", | |
"choices": ["Will", "Shall", "Would", "Should"], |
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
# -*- coding: utf-8 -*- | |
import pygame | |
from pygame.locals import QUIT, KEYDOWN, K_ESCAPE, K_RETURN | |
import os | |
class Game(object): | |
def __init__(self): | |
pygame.mixer.pre_init(44100, -16, 2, 2048) # sounds | |
pygame.init() |
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 pygame | |
from pygame.locals import QUIT, KEYDOWN, K_ESCAPE, K_LEFT, K_RIGHT, K_DOWN, K_UP | |
# Game dimensions | |
screen_width, screen_height = 800, 800 | |
pygame.mixer.pre_init(44100, -16, 2, 2048) # sounds | |
pygame.init() | |
pygame.display.set_caption("Lighting test") # Set app name |
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 pygame | |
import random | |
pygame.init() | |
SCREEN_WIDTH = 400 | |
SCREEN_HEIGHT = 400 | |
SIZE = (SCREEN_WIDTH, SCREEN_HEIGHT) | |
SCREEN = pygame.display.set_mode(SIZE) | |
pygame.display.set_caption('Colour Birth') |