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
.... | |
def deps(self, id): | |
def getMoreDeps(id, prevdeps=list()): | |
deps = self.get(id)[0].depends | |
for dep in deps: | |
if not dep in prevdeps: | |
prevdeps = getMoreDeps(dep, prevdeps) | |
prevdeps.extend(deps) |
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
def getMoreDeps(id, prevdeps=None): | |
deps = self.get(id)[0].depends | |
if prevdeps is None: | |
prevdeps = list() | |
for dep in deps: | |
if not dep in prevdeps: | |
getMoreDeps(dep, prevdeps) | |
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
def deps(self, id): | |
def getMoreDeps(id, prevdeps=None): | |
deps = self.get(id)[0].depends | |
if prevdeps is None: | |
prevdeps = list() | |
for dep in deps: | |
prevdeps.extend(getMoreDeps(dep, prevdeps)) | |
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 _winreg, os, sys | |
import win32api, win32con | |
import subprocess | |
from pywinauto import application | |
def deactivate(): | |
windir = os.getenv("windir", "C:\Windows") | |
if os.path.exists(windir + "\system32\WPA.dbl"): |
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
from django import template | |
from socialites.wiki.models import Page | |
import re | |
wikilink = re.compile(r"\[\[([^\]]+)\]\]") | |
register = template.Library() | |
@register.filter | |
def wikify(value): | |
for match in wikilink.finditer(value): |
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
def save_page(request, page_name): | |
content = request.POST["content"] | |
try: | |
page = Page.objects.get(pk=page_name) | |
page.content = content | |
if "tags" in request.POST: | |
tags = request.POST['tags'].split() | |
taglist = [Tag.objects.get_or_create(name=tag)[0] for tag in tags] |
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 re, os | |
import urllib2 | |
baseurl = "http://hof.voyeurweb.com/gallery/" | |
nexturlre = re.compile(r'Overview Page</a> \| <a href="([^"]*)">') | |
imgurlre = re.compile(r'<img src="([^"]*)" alt="([^"]*)" border="0" />') | |
def downloadNext(url, cat): | |
print "==================\nOpening %s"%url | |
f = urllib2.urlopen(url) |
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
... other html | |
<div style="width:25%;float:left"> | |
<a href="a/" class="ls1">a</a> | |
<a href="s/" class="ls3">s</a> | |
<a href="d/" class="ls4">d</a> | |
<a href="f/" class="ls1">f</a> | |
</div> | |
... other html | |
<div style="width:25%;float:left"> |
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
<EntityReborn|> SocPuppet: reloadplugins | |
<SocPuppet> Ok! | |
<EntityReborn|> SocPuppet: commit_check | |
<EntityReborn|> SocPuppet: commit_last | |
<SocPuppet> http://github.com/EntityReborn/SocPuppet/commit/0ed8de946ab353512a5de423a639d3b722efb089: Added commit plugin. | |
<EntityReborn|> and, I'm gunna push a commit right now. | |
<SocPuppet> http://github.com/EntityReborn/SocPuppet/commit/8b5cbd53b188492c4d7b750793be9ae837799392: Refined several things |
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
from twisted.web import server, resource | |
from twisted.internet import reactor | |
class Simple(resource.Resource): | |
isLeaf = True | |
def render_GET(self, request): | |
return "html" | |
def render_POST(self, request): | |
print request |
OlderNewer