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
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
#!/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
""" | |
Folderizer 2 | |
""" | |
import re | |
from path import path | |
root = path("./Test") | |
def find_pattern(names): | |
pattern = "S\d+E\d" |
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
""" | |
Folderizer. | |
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
def move_2(self): | |
if self.arrows[0]: #Up | |
self.movement(self.dir.y, -self.speed, "Up") | |
if self.arrows[1]: #Left | |
self.movement(self.dir.x, -self.speed, "Left") | |
if self.arrows[2]: #Down | |
self.movement(self.dir.y, self.speed, "Down") | |
if self.arrows[3]: #Right | |
self.movement(self.dir.x, self.speed, "Right") |
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
#!/bin/bash | |
# Kill Conky If Running . If you want to run this conky along with other | |
# Put a "#" Symbol before the "test" word from below line . | |
test -z "`pgrep conky`" || killall -9 conky | |
# The directory of conkyrcs | |
#conky_dir="./conkyrc" | |
# The command for start conkys |
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
## | |
# — SETTINGS — # | |
background no | |
update_interval 1 | |
cpu_avg_samples 2 | |
net_avg_samples 2 | |
double_buffer yes | |
no_buffers yes | |
text_buffer_size 1024 | |
imlib_cache_size 0 |
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
#!/bin/bash | |
uri=$1 #URI of RSS Feed | |
lines=$2 #Number of headlines | |
titlenum=$3 #Number of extra titles | |
#Script start | |
#Require a uri, as a minimum | |
if [[ "$uri" == "" ]]; then | |
echo "No URI specified, cannot continue!" >&2 |
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
#!/bin/bash | |
while [[ 1 -eq 1 ]]; do | |
for i in $(echo /usr/share/backgrounds/*.jpg); do | |
echo $i | |
gsettings set org.gnome.desktop.background picture-uri file:///${i} | |
sleep 60; | |
done | |
done |
OlderNewer