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
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 |
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 bs4 import BeautifulSoup as bs | |
import requests | |
url = "en.wikipedia.org/wiki/List_of_X-Men_comics" | |
r = requests.get("http://" +url) | |
data = r.text | |
soup = bs(data) | |
text = soup.get_text() |
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 |
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 |
NewerOlder