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 PyQt4.QtCore import QEvent, Qt | |
from PyQt4.QtGui import QLineEdit | |
class MyLineEdit(QLineEdit): | |
def __init__(self, *args, **kwargs): | |
QLineEdit.__init__(self, *args, **kwargs) | |
self.completions = [] # All available completions | |
self.partials = [] # Parsed completions according to partially typed word | |
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
s = __import__("socket").socket() | |
s.connect(("irc.freenode.net", 6667)) | |
s.send("NICK __import__\r\n") | |
s.send("USER __import__ irc.freenode.net bla :__import__\r\n") | |
readbuffer = "" | |
while True: | |
readbuffer += s.recv(1024) | |
temp = readbuffer.split("\n") | |
readbuffer = temp.pop() | |
for line in temp: |
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
<lahwran> <__import__> [13:33:23] lahwran, someone is telling me if I bought MC in beta version, it's free updates till release, then you need to pay. Is this true? | |
<lahwran> they are incorrect | |
<lahwran> it doesn't matter when you buy minecraft; you get minecraft | |
<lahwran> if you bought in alpha, you bought minecraft /plus addons/ | |
<lahwran> where addons = stuff created by mojang | |
<__import__> ok, so say mojang/notch updates the final client, what happens to beta buyers? | |
<lahwran> nothing | |
<lahwran> it updates as usual | |
<__import__> ok | |
<__import__> beta buyers won't get addons? |
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 sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy import Column, Integer, String, create_engine | |
from sqlalchemy.orm import sessionmaker | |
Base = declarative_base() | |
class Info(Base): | |
__tablename__ = 'infos' | |
id = Column(Integer, primary_key=True) | |
keyword = Column(String, unique=True) |
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
#!/usr/bin/env python | |
from PyQt4 import QtCore, QtGui | |
class GraphWidget(QtGui.QGraphicsView): | |
def __init__(self): | |
super(GraphWidget, self).__init__() | |
self.font = QtGui.QFont("System") | |
fontinfo = self.finfo = QtGui.QFontMetrics(self.font) |
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
groups: | |
Admins: | |
permissions: | |
- '*' | |
inheritance: | |
default: false | |
Moderators: | |
permissions: | |
- worldguard.region.define | |
- worldguard.region.redefine |
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 launchUpdate(updated, user, ticket, appdata=None): | |
if appdata: | |
appdata = os.path.abspath(appdata) | |
if sys.platform == "win32": | |
os.putenv("APPDATA", appdata) | |
else: | |
os.environ["HOME"] = appdata | |
url = "minecraft.jar?user={0}&ticket={1}".format(user, ticket) |
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 urllib2 | |
import subprocess | |
loginurl = "https://login.minecraft.net/?&user={0}&password={1}&version=9999" | |
user = "user" | |
pass_ = "pass" | |
loginurl = loginurl.format(user, pass_) | |
print "attempting login" | |
data = urllib2.urlopen(loginurl) |
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 os, sys | |
from subprocess import Popen | |
# java -cp "%APPDATA%\.minecraft\bin\*" -Djava.library.path="%APPDATA%\.minecraft\bin\natives" net.minecraft.client.Minecraft | |
appdata = os.path.dirname(os.path.abspath(__file__)) | |
# java -cp ... | |
args = ['java', '-cp',] |
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 os, sys | |
from subprocess import Popen | |
# java -cp "%APPDATA%\.minecraft\bin\*" -Djava.library.path="%APPDATA%\.minecraft\bin\natives" net.minecraft.client.Minecraft | |
appdata = os.path.dirname(os.path.abspath(__file__)) | |
# java -cp ... | |
args = ['java', '-cp',] |