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
docker-compose rm -f -s -v yourService |
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 Phaser from 'phaser'; | |
class Game extends Phaser.Game { | |
constructor (width, height, mode, domElement='content', arg=null) { | |
super(width, height, mode, domElement, arg); | |
this.state.add('Game', GameState, true); | |
} | |
} | |
class GameState extends Phaser.State { |
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 sys | |
import os | |
# SDL is the library which Pygame uses | |
# We use SDL to put the game window at the screen's centre | |
os.environ['SDL_VIDEO_CENTERED'] = '1' | |
SCREEN_SIZE = (800, 640) | |
BLACK = (0, 0, 0) | |
WHITE = (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 | |
import sys | |
import random | |
SCREEN_SIZE = WIDTH, HEIGHT = (800, 640) | |
BLACK = (0, 0, 0) | |
WHITE = (255, 255, 255) | |
GREEN = (50, 255, 50) | |
BLUE = (50, 50, 255) | |
SCORE_LIMIT = 5 |
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 sys | |
SCREEN_SIZE = WIDTH, HEIGHT = (640, 480) | |
BLACK = (0, 0, 0) | |
WHITE = (255, 255, 255) | |
RED = (255, 50, 50) | |
GREEN = (50, 255, 50) | |
CIRCLE_RADIUS = 30 |
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
class Planet | |
constructor: (@radius, @colour, @baseX, @baseY, @orbitSpeed) -> | |
@x = @baseX | |
@y = @baseY | |
@startTime = Date.now() | |
@theta = 0 | |
update: (sun) -> | |
newTime = Date.now() |
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
class Transition | |
constructor: (@currentState, @input, @nextState) -> | |
match: (currentState, input) -> | |
return @currentState is currentState and @input is input | |
getNextState: -> | |
return @nextState |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
'''A web scraper for the Government of Trindad and Tobago's Ministry data. The | |
main link: http://www.ttconnect.gov.tt/''' | |
from lxml import html | |
import requests | |
import json | |
from collections import OrderedDict | |
from argparse import ArgumentParser |
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
var populateSieve = function(N) { | |
'use strict'; | |
var arr = [N+1]; | |
arr[0] = false; | |
arr[1] = false; | |
for (var i = 2; i <= N; i++) { | |
arr[i] = true; | |
} | |
return arr; | |
}; |
NewerOlder