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
#: kivy 1.9.1 | |
<Main>: | |
HUD: | |
size_hint: 1., 1. | |
pos: 0,0 | |
<HUD>: | |
spacing: 10 | |
Button: |
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/python3 | |
import kivy | |
kivy.require("1.9.0") | |
from kivy.app import App | |
from kivy.uix.widget import Widget | |
from kivy.uix.image import Image | |
from kivy.graphics import Rectangle | |
from kivy.clock import Clock | |
from kivy.properties import ObjectProperty |
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
<Main> | |
size: 400, 400 | |
canvas: | |
Rectangle: | |
pos: self.pos1 | |
size: 30, 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
<Main> | |
size: 400, 400 | |
canvas: | |
Line: | |
points: root.line1 | |
width: 1.0 | |
Rectangle: | |
pos: self.pos1 | |
size: 30, 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
import os | |
def set_dir(file_path): | |
here = os.path.dirname(file_path) | |
os.chdir(here) | |
if __name__ == "__main__": | |
set_dir(__file__) |
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 python2 | |
""" | |
This is a program to sort downloaded series files into individual folders. | |
This program does in no way condone illegal file downloading. | |
Downloading files illegally is immoral and WRONG, and can be punished by up to life in prison or the death penalty (depending on your state or country). | |
Illegal downloads steals the hard earned money of not only starving artists but most importantly hard working executive producers, who desire nothing but the well being of their audience, but thanks to illegal downloading, can barely survive in todays economy living only by sleeping on their friends couches and hitchhiking to work. | |
Use this program at your own discretion, I am in no way responsible for what you do with it, or how you chose to live your life, but call your mom dude... seriously. |
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 Bolt(pygame.sprite.DirtySprite): | |
def __init__(self, player): | |
self.player = player | |
self.image = pygame.image.load("bolt.png").convert_alpha() | |
self.rect = self.image.get_rect() | |
self.pos = vec2d(player.rect.center) | |
self.dirty = 1 | |
self.lvl = 1 | |
self.dmg = int((player.lvl * 0.5) + (self.lvl * 0.5) + 25) | |
self.speed = 25 + self.lvl |
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
chimp = Chimp() | |
fist = Fist() | |
allsprites = pygame.sprite.LayeredDirty((chimp, fist)) | |
allsprites.clear(screen, background) | |
# mainloop | |
rects = allsprites.draw(screen) | |
pygame.display.update(rects) |
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 numpy as np | |
from PIL import Image, ImageDraw | |
from vec2d import vec2d | |
from random import randint as rai | |
class Poly(object): | |
"""This generates a polygon in a numpy Array""" |
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
from kivy.config import Config | |
xwidth, xheight = 1024, 960 | |
Config.set("graphics", "width", xwidth) | |
Config.set("graphics", "height", xheight) | |
Config.write() | |
from kivy.app import App | |
from kivy.core.window import Window |
NewerOlder