Skip to content

Instantly share code, notes, and snippets.

View bitcraft's full-sized avatar

Leif Theden bitcraft

  • Chicago, Illinois
View GitHub Profile
# os.environ["SDL_VIDEODRIVER"] = "dummy"
"""
sudo pip3 install pygame
sudo apt-get install python3-pyaudio
delay is in milliseconds
pasuspender python3 soundboard.py
Hold Escape to quit
---
combat_run: "${{user}} ran away!"
combat_player_run: You have run away!
combat_used_x: "${{user}} used ${{name}}!"
combat_used_x_on_y: "${{user}} used ${{name}} on ${{target}}!"
combat_swap: "${{user}} sent out ${{target}}!"
combat_call_tuxemon: Go ${{name}}!
combat_opponent_call_tuxemon: "${{user}} sent out ${{name}}!"
combat_state_poison_damage: "${{name}} took poison damage!"
combat_status_damage: "${{name}} took ${{status}} damage!"
from sys import exit
import pygame
from pygame.locals import *
SCREEN_SIZE = (1280, 960)
pygame.init()
screen = pygame.display.set_mode(SCREEN_SIZE, RESIZABLE, 32)
{
"slug": "txmn_bigfin",
"name_trans": "txmn_bigfin_name",
"description_trans": "txmn_bigfin_descr",
"category_trans": "txmn_bigfin_category",
"slug": "txmn_bigfin",
"name_trans": "txmn_bigfin_name",
"description_trans": "txmn_bigfin_descr",
"category_trans": "txmn_bigfin_category",
static PyObject*
surf_blit_list (PyObject* self, PyObject* args)
{
SDL_Surface *src, *dest = PySurface_AsSurface (self);
GAME_Rect *src_rect, temp;
PyObject *srcobject, *argrect = NULL;
SDL_Rect dest_rect, sdlsrc_rect;
int result;
def set_position(self, x, y):
"""Set the X and Y coordinates of the sprite simultaneously.
:Parameters:
`x` : int
X coordinate of the sprite.
`y` : int
Y coordinate of the sprite.
"""
from glob import glob
from flask import Flask, jsonify
app = Flask(__name__)
scan_dir = 'c:\\*'
@app.route('/files')
def get_files():