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
| local TOPICS=($(cat "${DIR}/../../env/broker/kafka/docker-mounts/topics.txt" | awk 'BEGIN { FS="," } !/^$/{ print $1 }' | xargs)) | |
| local OFFSET_FILE=/tmp/delete-offsets.json | |
| local NUM_TOPICS=${#TOPICS[@]} | |
| local TOPIC_INDEX=1 | |
| echo -n "{\"partitions\":[" > $OFFSET_FILE | |
| for TOPIC in $TOPICS; do | |
| echo -n "{\"topic\":\"${TOPIC}\",\"partition\":0,\"offset\":-1}" >> $OFFSET_FILE | |
| if [[ $((TOPIC_INDEX + 1)) < $NUM_TOPICS ]]; then | |
| echo -n "," >> $OFFSET_FILE |
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 pygame | |
| import time | |
| import sys | |
| width = 800 | |
| height = 300 | |
| pygame.init() | |
| win = pygame.display.set_mode((width, 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
| import pygame | |
| import sys | |
| from pygame.locals import * | |
| TILE_PIXELS = 8 | |
| tileGroups = [ | |
| { "x": 1, "y": 11, "tilesW": 16, "tilesH": 16, "offset": 0 }, | |
| { "x": 130, "y": 11, "tilesW": 16, "tilesH": 16, "offset": 0 }, | |
| { "x": 259, "y": 11, "tilesW": 16, "tilesH": 16, "offset": 0 }, |
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 pygame | |
| import sys | |
| from pygame.locals import * | |
| BACKGROUND_COLOR = pygame.Color(0, 0, 100) | |
| TEXT_COLOR = pygame.Color(255, 255, 255) | |
| SCREEN_WIDTH = 800 | |
| SCREEN_HEIGHT = 600 | |
| HALF_SCREEN_WIDTH = SCREEN_WIDTH / 2 | |
| HALF_SCREEN_HEIGHT = SCREEN_HEIGHT / 2 |
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 sys | |
| import pygame | |
| import math | |
| from pygame.locals import * | |
| TILE_SIZE = 16 | |
| HORIZONTAL_TILES = 20 | |
| VERTICAL_TILES = 10 | |
| SCREEN_WIDTH = TILE_SIZE * HORIZONTAL_TILES | |
| SCREEN_HEIGHT = TILE_SIZE * VERTICAL_TILES |
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
| walkRightImageCodes = ['A1', 'A2', 'A7', 'Fb9', 'Bx5'] | |
| walkRightImageData = [] | |
| # easy to read version | |
| for code in walkRightImageCodes: | |
| filename = "%s.png" % code | |
| imageData = pygame.image.load(filename).convert() | |
| walkRightImageData.append(imageData) | |
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 sys | |
| import pygame | |
| import math | |
| from pygame.locals import * | |
| WIDTH = 800 | |
| HEIGHT = 600 | |
| BLACK = Color(0, 0, 0) |
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 sys | |
| import pygame | |
| import math | |
| from pygame.locals import * | |
| TILE_SIZE = 32 | |
| WIDTH = 32 * 20 | |
| HEIGHT = 32 * 10 |
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 random | |
| prefixes = ['',\ | |
| 'Laser-shooting',\ | |
| 'Kitten-filled',\ | |
| 'Smooth-scrolling',\ | |
| 'Action-packed',\ | |
| 'Addictive'\ | |
| ] |
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 sys | |
| import pygame | |
| import math | |
| from pygame.locals import * | |
| WIDTH = 800 | |
| HEIGHT = 600 | |
| BLACK = Color(0, 0, 0) | |
| BLUE = Color(0, 0, 200) |
NewerOlder